@kala-ui/react 0.0.1-beta.7 → 0.0.2

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 (291) hide show
  1. package/dist/components/accordion/accordion-skeleton.js +1 -1
  2. package/dist/components/accordion/accordion.js +2 -1
  3. package/dist/components/action-icon/action-icon.d.ts +12 -0
  4. package/dist/components/action-icon/action-icon.js +35 -0
  5. package/dist/components/action-icon/action-icon.stories.d.ts +9 -0
  6. package/dist/components/action-icon/action-icon.stories.js +42 -0
  7. package/dist/components/action-icon/index.d.ts +1 -0
  8. package/dist/components/action-icon/index.js +1 -0
  9. package/dist/components/alert/alert-skeleton.js +4 -3
  10. package/dist/components/alert/alert.d.ts +2 -2
  11. package/dist/components/alert/alert.js +8 -6
  12. package/dist/components/alert/alert.stories.js +13 -9
  13. package/dist/components/alert/index.d.ts +1 -1
  14. package/dist/components/alert-dialog/alert-dialog.js +8 -5
  15. package/dist/components/app-shell/app-shell.d.ts +58 -0
  16. package/dist/components/app-shell/app-shell.js +111 -0
  17. package/dist/components/app-shell/app-shell.stories.d.ts +8 -0
  18. package/dist/components/app-shell/app-shell.stories.js +35 -0
  19. package/dist/components/app-shell/index.d.ts +1 -0
  20. package/dist/components/app-shell/index.js +1 -0
  21. package/dist/components/avatar/avatar.d.ts +2 -2
  22. package/dist/components/avatar/avatar.stories.js +1 -1
  23. package/dist/components/badge/badge.d.ts +1 -1
  24. package/dist/components/badge/badge.js +1 -1
  25. package/dist/components/badge/badge.stories.js +1 -1
  26. package/dist/components/banner/banner-skeleton.js +1 -1
  27. package/dist/components/banner/banner.d.ts +1 -1
  28. package/dist/components/banner/banner.stories.js +1 -1
  29. package/dist/components/box/box.d.ts +8 -0
  30. package/dist/components/box/box.js +10 -0
  31. package/dist/components/box/box.stories.d.ts +8 -0
  32. package/dist/components/box/box.stories.js +32 -0
  33. package/dist/components/box/index.d.ts +1 -0
  34. package/dist/components/box/index.js +1 -0
  35. package/dist/components/breadcrumbs/breadcrumbs-skeleton.js +1 -1
  36. package/dist/components/breadcrumbs/breadcrumbs.stories.js +1 -1
  37. package/dist/components/burger/burger.d.ts +8 -0
  38. package/dist/components/burger/burger.js +21 -0
  39. package/dist/components/burger/burger.stories.d.ts +8 -0
  40. package/dist/components/burger/burger.stories.js +31 -0
  41. package/dist/components/burger/index.d.ts +1 -0
  42. package/dist/components/burger/index.js +1 -0
  43. package/dist/components/button/button.d.ts +2 -2
  44. package/dist/components/button/button.stories.js +10 -7
  45. package/dist/components/button-group/button-group.stories.js +1 -1
  46. package/dist/components/calendar/calendar-skeleton.js +1 -1
  47. package/dist/components/calendar/calendar.d.ts +1 -1
  48. package/dist/components/calendar/calendar.js +1 -1
  49. package/dist/components/calendar/calendar.types.d.ts +3 -3
  50. package/dist/components/card/card-skeleton.js +2 -2
  51. package/dist/components/card/card.js +17 -14
  52. package/dist/components/card/index.d.ts +1 -1
  53. package/dist/components/center/center.d.ts +7 -0
  54. package/dist/components/center/center.js +10 -0
  55. package/dist/components/center/center.stories.d.ts +7 -0
  56. package/dist/components/center/center.stories.js +25 -0
  57. package/dist/components/center/index.d.ts +1 -0
  58. package/dist/components/center/index.js +1 -0
  59. package/dist/components/charts/area-chart.js +1 -1
  60. package/dist/components/charts/bar-chart.js +1 -1
  61. package/dist/components/charts/donut-chart.js +1 -1
  62. package/dist/components/charts/index.d.ts +2 -2
  63. package/dist/components/charts/index.js +2 -2
  64. package/dist/components/charts/line-chart.js +1 -1
  65. package/dist/components/charts/radial-bar-chart.js +1 -1
  66. package/dist/components/charts/theme-utils.d.ts +1 -1
  67. package/dist/components/charts/use-theme-aware-chart.d.ts +1 -1
  68. package/dist/components/charts/use-theme-aware-chart.js +2 -1
  69. package/dist/components/checkbox/checkbox.js +1 -1
  70. package/dist/components/checkbox/checkbox.stories.js +12 -8
  71. package/dist/components/close-button/close-button.d.ts +7 -0
  72. package/dist/components/close-button/close-button.js +9 -0
  73. package/dist/components/close-button/close-button.stories.d.ts +7 -0
  74. package/dist/components/close-button/close-button.stories.js +18 -0
  75. package/dist/components/close-button/index.d.ts +1 -0
  76. package/dist/components/close-button/index.js +1 -0
  77. package/dist/components/code/code.d.ts +8 -0
  78. package/dist/components/code/code.js +14 -0
  79. package/dist/components/code/code.stories.d.ts +8 -0
  80. package/dist/components/code/code.stories.js +31 -0
  81. package/dist/components/code/index.d.ts +1 -0
  82. package/dist/components/code/index.js +1 -0
  83. package/dist/components/collapse/collapse.d.ts +17 -0
  84. package/dist/components/collapse/collapse.js +34 -0
  85. package/dist/components/collapse/index.d.ts +1 -0
  86. package/dist/components/collapse/index.js +1 -0
  87. package/dist/components/color-input/color-input.d.ts +28 -0
  88. package/dist/components/color-input/color-input.js +35 -0
  89. package/dist/components/color-input/color-input.stories.d.ts +10 -0
  90. package/dist/components/color-input/color-input.stories.js +41 -0
  91. package/dist/components/color-input/index.d.ts +1 -0
  92. package/dist/components/color-input/index.js +1 -0
  93. package/dist/components/combobox/combobox-skeleton.js +1 -1
  94. package/dist/components/combobox/combobox.d.ts +1 -1
  95. package/dist/components/combobox/combobox.js +17 -8
  96. package/dist/components/combobox/combobox.stories.js +1 -1
  97. package/dist/components/command/command.d.ts +2 -2
  98. package/dist/components/command/command.stories.js +14 -19
  99. package/dist/components/container/container.d.ts +1 -1
  100. package/dist/components/container/index.d.ts +1 -1
  101. package/dist/components/container/index.js +1 -1
  102. package/dist/components/data-table/column-header-filter.js +11 -6
  103. package/dist/components/data-table/data-table-skeleton.js +5 -15
  104. package/dist/components/data-table/data-table.js +18 -15
  105. package/dist/components/data-table/data-table.stories.js +3 -5
  106. package/dist/components/date-picker/date-picker.d.ts +1 -1
  107. package/dist/components/date-picker/date-picker.js +3 -3
  108. package/dist/components/date-picker/date-picker.types.d.ts +1 -1
  109. package/dist/components/dialog/dialog-skeleton.js +1 -1
  110. package/dist/components/dialog/dialog.js +6 -4
  111. package/dist/components/dialog/dialog.stories.js +2 -2
  112. package/dist/components/dnd/dnd.d.ts +4 -5
  113. package/dist/components/dnd/dnd.js +5 -5
  114. package/dist/components/dnd/dnd.stories.js +48 -40
  115. package/dist/components/drawer/drawer.stories.js +2 -2
  116. package/dist/components/empty-state/empty-state-skeleton.js +2 -3
  117. package/dist/components/empty-state/empty-state.d.ts +1 -1
  118. package/dist/components/field/field-skeleton.js +1 -1
  119. package/dist/components/field/field.stories.js +1 -1
  120. package/dist/components/file-upload/file-upload-skeleton.js +1 -1
  121. package/dist/components/flex/flex.d.ts +7 -5
  122. package/dist/components/flex/flex.js +2 -2
  123. package/dist/components/flex/index.d.ts +1 -1
  124. package/dist/components/flex/index.js +1 -1
  125. package/dist/components/grid/grid.d.ts +24 -0
  126. package/dist/components/grid/grid.js +136 -0
  127. package/dist/components/grid/grid.stories.d.ts +8 -0
  128. package/dist/components/grid/grid.stories.js +31 -0
  129. package/dist/components/grid/index.d.ts +1 -0
  130. package/dist/components/grid/index.js +1 -0
  131. package/dist/components/group/group.d.ts +2 -2
  132. package/dist/components/group/group.js +1 -1
  133. package/dist/components/group/index.d.ts +1 -1
  134. package/dist/components/group/index.js +1 -1
  135. package/dist/components/header/header-skeleton.js +1 -1
  136. package/dist/components/header/header.d.ts +3 -3
  137. package/dist/components/header/header.js +17 -31
  138. package/dist/components/header/index.d.ts +1 -1
  139. package/dist/components/heading/heading.d.ts +4 -2
  140. package/dist/components/heading/heading.js +3 -7
  141. package/dist/components/heading/index.d.ts +1 -1
  142. package/dist/components/heading/index.js +1 -1
  143. package/dist/components/indicator/index.d.ts +1 -0
  144. package/dist/components/indicator/index.js +1 -0
  145. package/dist/components/indicator/indicator.d.ts +30 -0
  146. package/dist/components/indicator/indicator.js +89 -0
  147. package/dist/components/indicator/indicator.stories.d.ts +10 -0
  148. package/dist/components/indicator/indicator.stories.js +75 -0
  149. package/dist/components/input/input.js +1 -1
  150. package/dist/components/input/input.stories.js +1 -1
  151. package/dist/components/input-group/input-group.stories.js +1 -1
  152. package/dist/components/kbd/index.d.ts +1 -0
  153. package/dist/components/kbd/index.js +1 -0
  154. package/dist/components/kbd/kbd.d.ts +6 -0
  155. package/dist/components/kbd/kbd.js +13 -0
  156. package/dist/components/kbd/kbd.stories.d.ts +9 -0
  157. package/dist/components/kbd/kbd.stories.js +28 -0
  158. package/dist/components/label/label.stories.js +1 -1
  159. package/dist/components/list/list-skeleton.js +2 -2
  160. package/dist/components/list/list.js +1 -1
  161. package/dist/components/list/list.stories.js +1 -1
  162. package/dist/components/list/list.types.d.ts +2 -2
  163. package/dist/components/loading-overlay/index.d.ts +1 -0
  164. package/dist/components/loading-overlay/index.js +1 -0
  165. package/dist/components/loading-overlay/loading-overlay.d.ts +19 -0
  166. package/dist/components/loading-overlay/loading-overlay.js +19 -0
  167. package/dist/components/loading-overlay/loading-overlay.stories.d.ts +8 -0
  168. package/dist/components/loading-overlay/loading-overlay.stories.js +46 -0
  169. package/dist/components/metric-card/metric-card-skeleton.js +2 -2
  170. package/dist/components/metric-card/metric-card.js +1 -1
  171. package/dist/components/multi-select/multi-select-skeleton.js +1 -1
  172. package/dist/components/multi-select/multi-select.stories.js +1 -1
  173. package/dist/components/nav-link/index.d.ts +1 -0
  174. package/dist/components/nav-link/index.js +1 -0
  175. package/dist/components/nav-link/nav-link.d.ts +26 -0
  176. package/dist/components/nav-link/nav-link.js +26 -0
  177. package/dist/components/nav-link/nav-link.stories.d.ts +9 -0
  178. package/dist/components/nav-link/nav-link.stories.js +37 -0
  179. package/dist/components/navigation/navigation-skeleton.js +1 -1
  180. package/dist/components/number-input/index.d.ts +1 -0
  181. package/dist/components/number-input/index.js +1 -0
  182. package/dist/components/number-input/number-input.d.ts +40 -0
  183. package/dist/components/number-input/number-input.js +69 -0
  184. package/dist/components/number-input/number-input.stories.d.ts +11 -0
  185. package/dist/components/number-input/number-input.stories.js +54 -0
  186. package/dist/components/overlay/index.d.ts +1 -0
  187. package/dist/components/overlay/index.js +1 -0
  188. package/dist/components/overlay/overlay.d.ts +22 -0
  189. package/dist/components/overlay/overlay.js +45 -0
  190. package/dist/components/overlay/overlay.stories.d.ts +9 -0
  191. package/dist/components/overlay/overlay.stories.js +47 -0
  192. package/dist/components/page-transition/page-transition.stories.js +1 -1
  193. package/dist/components/pagination/index.d.ts +1 -1
  194. package/dist/components/pagination/index.js +1 -1
  195. package/dist/components/pagination/pagination-skeleton.js +1 -1
  196. package/dist/components/pagination/pagination.d.ts +44 -28
  197. package/dist/components/pagination/pagination.js +53 -79
  198. package/dist/components/pagination/pagination.stories.d.ts +1 -0
  199. package/dist/components/pagination/pagination.stories.js +31 -5
  200. package/dist/components/paper/index.d.ts +1 -0
  201. package/dist/components/paper/index.js +1 -0
  202. package/dist/components/paper/paper.d.ts +12 -0
  203. package/dist/components/paper/paper.js +39 -0
  204. package/dist/components/paper/paper.stories.d.ts +7 -0
  205. package/dist/components/paper/paper.stories.js +30 -0
  206. package/dist/components/password-strength-indicator/password-strength-indicator.stories.js +1 -1
  207. package/dist/components/popover/popover-skeleton.js +1 -1
  208. package/dist/components/popover/popover.stories.js +2 -2
  209. package/dist/components/progress/index.d.ts +1 -1
  210. package/dist/components/progress/progress.d.ts +1 -1
  211. package/dist/components/progress/progress.stories.js +1 -1
  212. package/dist/components/radio-group/radio-group-skeleton.js +1 -1
  213. package/dist/components/radio-group/radio-group.stories.js +1 -1
  214. package/dist/components/resizable/resizable.stories.js +8 -8
  215. package/dist/components/ring-progress/index.d.ts +1 -0
  216. package/dist/components/ring-progress/index.js +1 -0
  217. package/dist/components/ring-progress/ring-progress.d.ts +24 -0
  218. package/dist/components/ring-progress/ring-progress.js +20 -0
  219. package/dist/components/ring-progress/ring-progress.stories.d.ts +9 -0
  220. package/dist/components/ring-progress/ring-progress.stories.js +46 -0
  221. package/dist/components/scroll-area/scroll-area.stories.js +26 -26
  222. package/dist/components/segmented-control/index.d.ts +1 -0
  223. package/dist/components/segmented-control/index.js +1 -0
  224. package/dist/components/segmented-control/segmented-control.d.ts +19 -0
  225. package/dist/components/segmented-control/segmented-control.js +46 -0
  226. package/dist/components/segmented-control/segmented-control.stories.d.ts +10 -0
  227. package/dist/components/segmented-control/segmented-control.stories.js +53 -0
  228. package/dist/components/select/select.js +1 -1
  229. package/dist/components/select/select.stories.js +1 -1
  230. package/dist/components/separator/separator.stories.js +1 -1
  231. package/dist/components/session-card/session-card-skeleton.js +2 -2
  232. package/dist/components/session-card/session-card.js +1 -1
  233. package/dist/components/sidebar/sidebar-skeleton.js +2 -2
  234. package/dist/components/skeleton/index.d.ts +3 -3
  235. package/dist/components/skeleton/index.js +1 -1
  236. package/dist/components/skeleton/skeleton.types.d.ts +0 -249
  237. package/dist/components/slider/index.d.ts +1 -1
  238. package/dist/components/slider/slider.js +1 -1
  239. package/dist/components/slider/slider.stories.js +1 -1
  240. package/dist/components/social-login-button/social-login-button.js +6 -6
  241. package/dist/components/sparkline-chart/sparkline-chart.js +6 -3
  242. package/dist/components/sparkline-chart/sparkline-chart.stories.js +1 -1
  243. package/dist/components/spinner/spinner.d.ts +1 -1
  244. package/dist/components/spoiler/index.d.ts +1 -0
  245. package/dist/components/spoiler/index.js +1 -0
  246. package/dist/components/spoiler/spoiler.d.ts +14 -0
  247. package/dist/components/spoiler/spoiler.js +20 -0
  248. package/dist/components/spoiler/spoiler.stories.d.ts +8 -0
  249. package/dist/components/spoiler/spoiler.stories.js +35 -0
  250. package/dist/components/stack/index.d.ts +1 -1
  251. package/dist/components/stack/index.js +1 -1
  252. package/dist/components/stack/stack.d.ts +2 -2
  253. package/dist/components/stack/stack.js +1 -1
  254. package/dist/components/steps/steps-skeleton.js +1 -1
  255. package/dist/components/steps/steps.js +7 -5
  256. package/dist/components/steps/steps.stories.js +6 -2
  257. package/dist/components/switch/index.d.ts +1 -1
  258. package/dist/components/switch/switch.js +1 -1
  259. package/dist/components/switch/switch.stories.js +1 -1
  260. package/dist/components/table/table-skeleton.js +2 -2
  261. package/dist/components/table/table.js +4 -3
  262. package/dist/components/table/table.stories.js +10 -7
  263. package/dist/components/tabs/tabs-skeleton.js +1 -1
  264. package/dist/components/tabs/tabs.d.ts +3 -3
  265. package/dist/components/tabs/tabs.js +1 -1
  266. package/dist/components/tabs/tabs.stories.js +5 -5
  267. package/dist/components/text/index.d.ts +1 -1
  268. package/dist/components/text/index.js +1 -1
  269. package/dist/components/text/text.d.ts +7 -5
  270. package/dist/components/text/text.js +2 -2
  271. package/dist/components/text/text.stories.js +34 -3
  272. package/dist/components/textarea/textarea.js +1 -1
  273. package/dist/components/textarea/textarea.stories.js +1 -1
  274. package/dist/components/timeline/index.d.ts +1 -0
  275. package/dist/components/timeline/index.js +1 -0
  276. package/dist/components/timeline/timeline.d.ts +35 -0
  277. package/dist/components/timeline/timeline.js +36 -0
  278. package/dist/components/timeline/timeline.stories.d.ts +7 -0
  279. package/dist/components/timeline/timeline.stories.js +21 -0
  280. package/dist/components/toast/toast.js +6 -6
  281. package/dist/components/toggle/toggle.stories.js +1 -1
  282. package/dist/components/tooltip/tooltip.stories.js +1 -1
  283. package/dist/components/user-menu-dropdown/user-menu-dropdown.js +1 -1
  284. package/dist/config/tailwind-base.d.ts +10 -0
  285. package/dist/config/tailwind-base.js +1 -0
  286. package/dist/index.d.ts +25 -0
  287. package/dist/index.js +25 -10
  288. package/dist/lib/animations.js +94 -94
  289. package/dist/primitives/command/Command.js +2 -1
  290. package/dist/styles/globals.css +415 -82
  291. package/package.json +101 -24
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Button } from "../button";
4
+ import { LoadingOverlay } from "./loading-overlay";
5
+ const meta = {
6
+ title: "Components/LoadingOverlay",
7
+ component: LoadingOverlay,
8
+ parameters: {
9
+ layout: "centered",
10
+ },
11
+ tags: ["autodocs"],
12
+ argTypes: {
13
+ visible: { control: "boolean" },
14
+ zIndex: { control: "number" },
15
+ transitionDuration: { control: "number" },
16
+ },
17
+ };
18
+ export default meta;
19
+ const LoadingOverlayDemo = (props) => {
20
+ const [visible, setVisible] = React.useState(false);
21
+ // Toggle visible state for demo
22
+ const toggle = () => setVisible((v) => !v);
23
+ return (_jsxs("div", { className: "relative w-80 h-40 border rounded p-4 flex flex-col items-center justify-center gap-4 overflow-hidden", children: [_jsxs("div", { className: "text-center", children: [_jsx("p", { className: "font-medium mb-2", children: "Form or Content" }), _jsx("p", { className: "text-sm text-gray-500 mb-4", children: "This content will be covered by the overlay" }), _jsx(Button, { onClick: toggle, size: "sm", children: visible ? "Hide Overlay" : "Show Overlay" })] }), _jsx(LoadingOverlay, { visible: visible, zIndex: 10, ...props })] }));
24
+ };
25
+ export const Default = {
26
+ render: (args) => _jsx(LoadingOverlayDemo, { ...args }),
27
+ args: {
28
+ overlayProps: { radius: "sm", blur: 2 },
29
+ },
30
+ };
31
+ export const CustomLoader = {
32
+ render: (args) => _jsx(LoadingOverlayDemo, { ...args }),
33
+ args: {
34
+ loaderProps: {
35
+ children: (_jsx("div", { className: "bg-white p-3 rounded shadow-lg text-sm font-medium", children: "Loading custom content..." })),
36
+ },
37
+ overlayProps: { color: "rgba(0,0,0,0.4)", blur: 1 },
38
+ },
39
+ };
40
+ export const WithTransition = {
41
+ render: (args) => _jsx(LoadingOverlayDemo, { ...args }),
42
+ args: {
43
+ transitionDuration: 500,
44
+ overlayProps: { radius: "sm", blur: 2 },
45
+ },
46
+ };
@@ -7,8 +7,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  */
8
8
  import * as React from "react";
9
9
  import { cn } from "../../lib/utils";
10
- import { Card } from "../card/card";
11
- import { Skeleton } from "../skeleton/skeleton";
10
+ import { Card } from "../card";
11
+ import { Skeleton } from "../skeleton";
12
12
  import { SkeletonCircle } from "../skeleton/skeleton-patterns";
13
13
  /**
14
14
  * Metric Card skeleton component with multiple variants
@@ -8,7 +8,7 @@ const MetricCard = React.forwardRef(({ title, value, icon, change, changeLabel,
8
8
  if (skeleton) {
9
9
  return (_jsx(Card, { ref: ref, "data-comp": "metric-card", className: cn(className), ...props, children: skeleton }));
10
10
  }
11
- return (_jsx(MetricCardSkeleton, { className: className, ...skeletonConfig }));
11
+ return _jsx(MetricCardSkeleton, { className: className, ...skeletonConfig });
12
12
  }
13
13
  const getChangeColor = (changeValue) => {
14
14
  if (changeValue > 0)
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  * Shows selected tags and input area.
7
7
  */
8
8
  import { cn } from "../../lib/utils";
9
- import { Skeleton } from "../skeleton/skeleton";
9
+ import { Skeleton } from "../skeleton";
10
10
  /**
11
11
  * Multi-Select skeleton component
12
12
  *
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { Skeleton } from "../skeleton/skeleton";
3
+ import { Skeleton } from "../skeleton";
4
4
  import { MultiSelect } from "./multi-select";
5
5
  const meta = {
6
6
  title: "Forms/MultiSelect",
@@ -0,0 +1 @@
1
+ export * from "./nav-link";
@@ -0,0 +1 @@
1
+ export * from "./nav-link";
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ export interface NavLinkProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
3
+ /** Link label */
4
+ label: React.ReactNode;
5
+ /** Link description */
6
+ description?: React.ReactNode;
7
+ /** Left icon */
8
+ icon?: React.ReactNode;
9
+ /** Right section (e.g. badge, icon) */
10
+ rightSection?: React.ReactNode;
11
+ /** Active state */
12
+ active?: boolean;
13
+ /** Collapsed/Expanded state for nested items */
14
+ defaultOpened?: boolean;
15
+ /** Controlled opened state */
16
+ opened?: boolean;
17
+ /** Callback for opened state change */
18
+ onChangeOpened?: (opened: boolean) => void;
19
+ /** Nested links */
20
+ children?: React.ReactNode;
21
+ /** Disable right section rotation when opened */
22
+ disableRightSectionRotation?: boolean;
23
+ /** Indentation for nested items */
24
+ indent?: boolean;
25
+ }
26
+ export declare const NavLink: React.ForwardRefExoticComponent<NavLinkProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { ChevronRight } from "lucide-react";
3
+ import * as React from "react";
4
+ import { cn } from "../../lib/utils";
5
+ export const NavLink = React.forwardRef(({ className, label, description, icon, rightSection, active, defaultOpened = false, opened: openedProp, onChangeOpened, children, disableRightSectionRotation = false, indent = false, onClick, ...props }, ref) => {
6
+ const [opened, setOpened] = React.useState(defaultOpened);
7
+ const isOpened = openedProp !== undefined ? openedProp : opened;
8
+ const handleToggle = (e) => {
9
+ if (children) {
10
+ e.preventDefault();
11
+ if (openedProp === undefined) {
12
+ setOpened(!opened);
13
+ }
14
+ onChangeOpened?.(!isOpened);
15
+ }
16
+ onClick?.(e);
17
+ };
18
+ return (_jsxs(_Fragment, { children: [_jsxs("button", { ref: ref, className: cn("flex w-full items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", active
19
+ ? "bg-accent text-accent-foreground"
20
+ : "text-muted-foreground", className), onClick: handleToggle, ...props, children: [icon && (_jsx("span", { className: "flex items-center justify-center", children: icon })), _jsxs("div", { className: "flex flex-1 flex-col items-start overflow-hidden", children: [_jsx("span", { className: "truncate", children: label }), description && (_jsx("span", { className: "truncate text-xs text-muted-foreground font-normal", children: description }))] }), (rightSection || children) && (_jsx("span", { className: cn("flex items-center justify-center text-muted-foreground transition-transform duration-200", children &&
21
+ !disableRightSectionRotation &&
22
+ opened &&
23
+ "rotate-90"), children: rightSection ||
24
+ (children && _jsx(ChevronRight, { className: "h-4 w-4" })) }))] }), children && opened && (_jsx("div", { className: cn("flex flex-col gap-1", indent && "pl-4"), children: children }))] }));
25
+ });
26
+ NavLink.displayName = "NavLink";
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { NavLink } from "./nav-link";
3
+ declare const meta: Meta<typeof NavLink>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof NavLink>;
6
+ export declare const Default: Story;
7
+ export declare const Active: Story;
8
+ export declare const WithDescription: Story;
9
+ export declare const Nested: Story;
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Activity, Home, Settings, User } from "lucide-react";
3
+ import { NavLink } from "./nav-link";
4
+ const meta = {
5
+ title: "Components/NavLink",
6
+ component: NavLink,
7
+ tags: ["autodocs"],
8
+ argTypes: {
9
+ active: { control: "boolean" },
10
+ disabled: { control: "boolean" },
11
+ indent: { control: "boolean" },
12
+ },
13
+ };
14
+ export default meta;
15
+ export const Default = {
16
+ args: {
17
+ label: "Dashboard",
18
+ icon: _jsx(Home, { className: "h-4 w-4" }),
19
+ },
20
+ };
21
+ export const Active = {
22
+ args: {
23
+ label: "Settings",
24
+ icon: _jsx(Settings, { className: "h-4 w-4" }),
25
+ active: true,
26
+ },
27
+ };
28
+ export const WithDescription = {
29
+ args: {
30
+ label: "Profile",
31
+ description: "Manage your personal information",
32
+ icon: _jsx(User, { className: "h-4 w-4" }),
33
+ },
34
+ };
35
+ export const Nested = {
36
+ render: () => (_jsxs("div", { className: "w-64 border rounded-md p-2", children: [_jsx(NavLink, { label: "Main", icon: _jsx(Home, { className: "h-4 w-4" }) }), _jsxs(NavLink, { label: "Settings", icon: _jsx(Settings, { className: "h-4 w-4" }), defaultOpened: true, children: [_jsx(NavLink, { label: "Account", indent: true }), _jsx(NavLink, { label: "Security", indent: true, active: true }), _jsx(NavLink, { label: "Notifications", indent: true })] }), _jsx(NavLink, { label: "Activity", icon: _jsx(Activity, { className: "h-4 w-4" }), rightSection: _jsx("span", { className: "text-xs font-bold", children: "New" }) })] })),
37
+ };
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  * Supports horizontal and vertical layouts with configurable items.
7
7
  */
8
8
  import { cn } from "../../lib/utils";
9
- import { Skeleton } from "../skeleton/skeleton";
9
+ import { Skeleton } from "../skeleton";
10
10
  /**
11
11
  * Navigation skeleton component
12
12
  *
@@ -0,0 +1 @@
1
+ export * from "./number-input";
@@ -0,0 +1 @@
1
+ export * from "./number-input";
@@ -0,0 +1,40 @@
1
+ import * as React from "react";
2
+ export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
3
+ /**
4
+ * Value for controlled component
5
+ */
6
+ value?: number | string;
7
+ /**
8
+ * Default value for uncontrolled component
9
+ */
10
+ defaultValue?: number | string;
11
+ /**
12
+ * Callback fired when value changes
13
+ */
14
+ onChange?: (value: number | string) => void;
15
+ /**
16
+ * Minimum value
17
+ */
18
+ min?: number;
19
+ /**
20
+ * Maximum value
21
+ */
22
+ max?: number;
23
+ /**
24
+ * Step size
25
+ */
26
+ step?: number;
27
+ /**
28
+ * If true, renders with error styles
29
+ */
30
+ error?: boolean;
31
+ /**
32
+ * If true, renders with success styles
33
+ */
34
+ success?: boolean;
35
+ /**
36
+ * If true, hides the controls (spinners)
37
+ */
38
+ hideControls?: boolean;
39
+ }
40
+ export declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,69 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ChevronDown, ChevronUp } from "lucide-react";
3
+ import * as React from "react";
4
+ import { inputStyles } from "../../config/input";
5
+ import { cn } from "../../lib/utils";
6
+ export const NumberInput = React.forwardRef(({ className, value: valueProp, defaultValue, onChange, min, max, step = 1, disabled, error, success, hideControls = false, ...props }, ref) => {
7
+ const [internalValue, setInternalValue] = React.useState((valueProp ?? defaultValue ?? "").toString());
8
+ React.useEffect(() => {
9
+ if (valueProp !== undefined) {
10
+ setInternalValue(valueProp.toString());
11
+ }
12
+ }, [valueProp]);
13
+ const handleChange = (e) => {
14
+ const val = e.target.value;
15
+ if (val === "" || /^-?\d*\.?\d*$/.test(val)) {
16
+ setInternalValue(val);
17
+ onChange?.(val === "" ? "" : Number.parseFloat(val));
18
+ }
19
+ };
20
+ const handleBlur = (e) => {
21
+ if (internalValue === "" || internalValue === "-")
22
+ return;
23
+ let val = Number.parseFloat(internalValue);
24
+ let changed = false;
25
+ if (min !== undefined && val < min) {
26
+ val = min;
27
+ changed = true;
28
+ }
29
+ if (max !== undefined && val > max) {
30
+ val = max;
31
+ changed = true;
32
+ }
33
+ if (changed) {
34
+ setInternalValue(val.toString());
35
+ onChange?.(val);
36
+ }
37
+ props.onBlur?.(e);
38
+ };
39
+ const increment = () => {
40
+ let val = Number.parseFloat(internalValue || "0");
41
+ if (Number.isNaN(val))
42
+ val = 0;
43
+ const next = val + step;
44
+ if (max !== undefined && next > max)
45
+ return;
46
+ // Fix floating point precision
47
+ const precision = step.toString().split(".")[1]?.length || 0;
48
+ const nextFixed = precision > 0 ? next.toFixed(precision) : next.toString();
49
+ setInternalValue(nextFixed);
50
+ onChange?.(Number.parseFloat(nextFixed));
51
+ };
52
+ const decrement = () => {
53
+ let val = Number.parseFloat(internalValue || "0");
54
+ if (Number.isNaN(val))
55
+ val = 0;
56
+ const next = val - step;
57
+ if (min !== undefined && next < min)
58
+ return;
59
+ // Fix floating point precision
60
+ const precision = step.toString().split(".")[1]?.length || 0;
61
+ const nextFixed = precision > 0 ? next.toFixed(precision) : next.toString();
62
+ setInternalValue(nextFixed);
63
+ onChange?.(Number.parseFloat(nextFixed));
64
+ };
65
+ return (_jsxs("div", { className: "relative flex items-center", children: [_jsx("input", { type: "text", role: "spinbutton", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": internalValue === "" ? undefined : Number.parseFloat(internalValue), ref: ref, value: internalValue, onChange: handleChange, onBlur: handleBlur, disabled: disabled, className: cn(inputStyles.base, error && inputStyles.error, success && inputStyles.success, !hideControls && "pr-10", className), ...props }), !hideControls && !disabled && (_jsxs("div", { className: "absolute right-1 top-1 bottom-1 flex flex-col border-l", children: [_jsx("button", { type: "button", tabIndex: -1, className: "flex h-1/2 items-center justify-center px-2 text-muted-foreground hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", onClick: increment, disabled: max !== undefined &&
66
+ Number.parseFloat(internalValue || "0") >= max, children: _jsx(ChevronUp, { className: "h-3 w-3" }) }), _jsx("button", { type: "button", tabIndex: -1, className: "flex h-1/2 items-center justify-center px-2 text-muted-foreground hover:bg-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", onClick: decrement, disabled: min !== undefined &&
67
+ Number.parseFloat(internalValue || "0") <= min, children: _jsx(ChevronDown, { className: "h-3 w-3" }) })] }))] }));
68
+ });
69
+ NumberInput.displayName = "NumberInput";
@@ -0,0 +1,11 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { NumberInput } from "./number-input";
3
+ declare const meta: Meta<typeof NumberInput>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof NumberInput>;
6
+ export declare const Default: Story;
7
+ export declare const WithMinMax: Story;
8
+ export declare const WithStep: Story;
9
+ export declare const HiddenControls: Story;
10
+ export declare const WithError: Story;
11
+ export declare const Disabled: Story;
@@ -0,0 +1,54 @@
1
+ import { NumberInput } from "./number-input";
2
+ const meta = {
3
+ title: "Components/NumberInput",
4
+ component: NumberInput,
5
+ tags: ["autodocs"],
6
+ argTypes: {
7
+ min: { control: "number" },
8
+ max: { control: "number" },
9
+ step: { control: "number" },
10
+ error: { control: "boolean" },
11
+ success: { control: "boolean" },
12
+ hideControls: { control: "boolean" },
13
+ },
14
+ };
15
+ export default meta;
16
+ export const Default = {
17
+ args: {
18
+ placeholder: "Enter a number",
19
+ },
20
+ };
21
+ export const WithMinMax = {
22
+ args: {
23
+ placeholder: "Age (18-100)",
24
+ min: 18,
25
+ max: 100,
26
+ defaultValue: 25,
27
+ },
28
+ };
29
+ export const WithStep = {
30
+ args: {
31
+ placeholder: "Step 0.5",
32
+ step: 0.5,
33
+ defaultValue: 1.5,
34
+ },
35
+ };
36
+ export const HiddenControls = {
37
+ args: {
38
+ placeholder: "No controls",
39
+ hideControls: true,
40
+ defaultValue: 10,
41
+ },
42
+ };
43
+ export const WithError = {
44
+ args: {
45
+ defaultValue: 100,
46
+ error: true,
47
+ },
48
+ };
49
+ export const Disabled = {
50
+ args: {
51
+ defaultValue: 50,
52
+ disabled: true,
53
+ },
54
+ };
@@ -0,0 +1 @@
1
+ export * from "./overlay";
@@ -0,0 +1 @@
1
+ export * from "./overlay";
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import { type BoxProps } from "../box";
3
+ export interface OverlayProps extends BoxProps {
4
+ /** Overlay background color, ignored if gradient is set, default #000 */
5
+ color?: string;
6
+ /** Overlay background opacity, ignored if gradient is set, default 0.6 */
7
+ backgroundOpacity?: number;
8
+ /** Overlay background blur in px */
9
+ blur?: number;
10
+ /** Overlay background gradient, overrides color and backgroundOpacity */
11
+ gradient?: string;
12
+ /** Overlay z-index */
13
+ zIndex?: number;
14
+ /** Use fixed position instead of absolute, default false */
15
+ fixed?: boolean;
16
+ /** Overlay border radius */
17
+ radius?: number | string;
18
+ /** Content inside overlay */
19
+ children?: React.ReactNode;
20
+ }
21
+ declare const Overlay: React.ForwardRefExoticComponent<Omit<OverlayProps, "ref"> & React.RefAttributes<HTMLElement>>;
22
+ export { Overlay };
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../../lib/utils";
4
+ import { Box } from "../box";
5
+ // Helper to convert hex to rgb (simplified)
6
+ const hexToRgb = (hex) => {
7
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
8
+ return result
9
+ ? {
10
+ r: parseInt(result[1], 16),
11
+ g: parseInt(result[2], 16),
12
+ b: parseInt(result[3], 16),
13
+ }
14
+ : null;
15
+ };
16
+ const Overlay = React.forwardRef(({ className, color = "#000", backgroundOpacity = 0.6, blur, gradient, zIndex, fixed = false, radius, style, children, ...props }, ref) => {
17
+ const backgroundStyle = gradient
18
+ ? { backgroundImage: gradient }
19
+ : color.startsWith("#")
20
+ ? {
21
+ backgroundColor: `rgba(${hexToRgb(color)?.r ?? 0}, ${hexToRgb(color)?.g ?? 0}, ${hexToRgb(color)?.b ?? 0}, ${backgroundOpacity})`,
22
+ }
23
+ : {
24
+ backgroundColor: color,
25
+ // If we can't parse color, we can't easily set rgba.
26
+ // We could use `opacity` but that affects children.
27
+ // Alternative: Use a pseudo-element or just accept that named colors + opacity prop might behave like standard opacity if we can't mix them.
28
+ // Or just leave it as is and let user pass rgba string as color.
29
+ };
30
+ // Refined approach: If we used the `opacity` CSS property, it would fade out the children (like text/loader).
31
+ // The requirement is to only fade the background.
32
+ // So if it's a hex color, we convert to RGBA.
33
+ // If it's not hex, we rely on the user passing a valid color string (which might be rgba).
34
+ // If they pass a named color like 'red' and opacity 0.5, we can't easily mix them without a lib.
35
+ // I will stick to hex conversion for now as it covers most cases (default is #000).
36
+ return (_jsx(Box, { ref: ref, className: cn(fixed ? "fixed" : "absolute", "inset-0", className), style: {
37
+ ...backgroundStyle,
38
+ backdropFilter: blur ? `blur(${blur}px)` : undefined,
39
+ zIndex,
40
+ borderRadius: radius,
41
+ ...style,
42
+ }, ...props, children: children }));
43
+ });
44
+ Overlay.displayName = "Overlay";
45
+ export { Overlay };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Overlay } from "./overlay";
3
+ declare const meta: Meta<typeof Overlay>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Overlay>;
6
+ export declare const Default: Story;
7
+ export declare const WithBlur: Story;
8
+ export declare const Gradient: Story;
9
+ export declare const WithContent: Story;
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from "../button";
3
+ import { Overlay } from "./overlay";
4
+ const meta = {
5
+ title: "Components/Overlay",
6
+ component: Overlay,
7
+ parameters: {
8
+ layout: "centered",
9
+ },
10
+ tags: ["autodocs"],
11
+ argTypes: {
12
+ color: { control: "color" },
13
+ backgroundOpacity: { control: { type: "range", min: 0, max: 1, step: 0.05 } },
14
+ blur: { control: { type: "range", min: 0, max: 20, step: 1 } },
15
+ zIndex: { control: { type: "number" } },
16
+ radius: { control: { type: "number" } },
17
+ fixed: { control: "boolean" },
18
+ },
19
+ };
20
+ export default meta;
21
+ export const Default = {
22
+ render: (args) => (_jsxs("div", { className: "relative h-40 w-80 bg-gray-100 flex items-center justify-center", children: [_jsx("div", { className: "text-gray-700 font-medium", children: "Content under overlay" }), _jsx(Overlay, { ...args })] })),
23
+ args: {
24
+ backgroundOpacity: 0.6,
25
+ blur: 0,
26
+ },
27
+ };
28
+ export const WithBlur = {
29
+ render: (args) => (_jsxs("div", { className: "relative h-40 w-80 bg-gray-100 flex items-center justify-center", children: [_jsx("div", { className: "text-gray-700 font-medium", children: "Content under blur" }), _jsx(Overlay, { ...args })] })),
30
+ args: {
31
+ backgroundOpacity: 0.6,
32
+ blur: 2,
33
+ },
34
+ };
35
+ export const Gradient = {
36
+ render: (args) => (_jsxs("div", { className: "relative h-40 w-80 bg-gray-100 flex items-center justify-center", children: [_jsx("div", { className: "text-gray-700 font-medium", children: "Content under gradient" }), _jsx(Overlay, { ...args })] })),
37
+ args: {
38
+ gradient: "linear-gradient(145deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0) 100%)",
39
+ },
40
+ };
41
+ export const WithContent = {
42
+ render: (args) => (_jsxs("div", { className: "relative h-40 w-80 bg-gray-100", children: [_jsx("div", { className: "p-4 text-gray-700", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx(Overlay, { ...args, className: "flex items-center justify-center", children: _jsx(Button, { variant: "secondary", children: "Overlay Action" }) })] })),
43
+ args: {
44
+ backgroundOpacity: 0.8,
45
+ color: "#000",
46
+ },
47
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
- import { Button } from "../button/button";
3
+ import { Button } from "../button";
4
4
  import { PageTransition } from "./page-transition";
5
5
  const meta = {
6
6
  title: "Components/PageTransition",
@@ -1,3 +1,3 @@
1
- export { generatePagination, type PageItem, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, } from "./pagination";
1
+ export { Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, } from "./pagination";
2
2
  export type { PaginationSkeletonConfig, PaginationSkeletonProps, } from "./pagination-skeleton";
3
3
  export { PaginationSkeleton } from "./pagination-skeleton";
@@ -1,2 +1,2 @@
1
- export { generatePagination, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from "./pagination";
1
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from "./pagination";
2
2
  export { PaginationSkeleton } from "./pagination-skeleton";
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  * Shows page buttons and navigation controls.
7
7
  */
8
8
  import { cn } from "../../lib/utils";
9
- import { Skeleton } from "../skeleton/skeleton";
9
+ import { Skeleton } from "../skeleton";
10
10
  /**
11
11
  * Pagination skeleton component
12
12
  *