@kala-ui/react 0.0.1-beta.6 → 0.0.1-beta.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 (302) hide show
  1. package/CHANGELOG.md +110 -110
  2. package/LICENSE +21 -21
  3. package/README.md +366 -366
  4. package/dist/components/accordion/accordion-skeleton.js +1 -1
  5. package/dist/components/accordion/accordion.js +2 -1
  6. package/dist/components/action-icon/action-icon.d.ts +12 -0
  7. package/dist/components/action-icon/action-icon.js +35 -0
  8. package/dist/components/action-icon/action-icon.stories.d.ts +9 -0
  9. package/dist/components/action-icon/action-icon.stories.js +42 -0
  10. package/dist/components/action-icon/index.d.ts +1 -0
  11. package/dist/components/action-icon/index.js +1 -0
  12. package/dist/components/alert/alert-skeleton.js +4 -3
  13. package/dist/components/alert/alert.d.ts +2 -2
  14. package/dist/components/alert/alert.js +8 -6
  15. package/dist/components/alert/alert.stories.js +13 -9
  16. package/dist/components/alert/index.d.ts +1 -1
  17. package/dist/components/alert-dialog/alert-dialog.js +8 -5
  18. package/dist/components/app-shell/app-shell.d.ts +58 -0
  19. package/dist/components/app-shell/app-shell.js +111 -0
  20. package/dist/components/app-shell/app-shell.stories.d.ts +8 -0
  21. package/dist/components/app-shell/app-shell.stories.js +35 -0
  22. package/dist/components/app-shell/index.d.ts +1 -0
  23. package/dist/components/app-shell/index.js +1 -0
  24. package/dist/components/avatar/avatar.d.ts +2 -2
  25. package/dist/components/avatar/avatar.stories.js +1 -1
  26. package/dist/components/badge/badge.d.ts +1 -1
  27. package/dist/components/badge/badge.js +1 -1
  28. package/dist/components/badge/badge.stories.js +1 -1
  29. package/dist/components/banner/banner-skeleton.js +1 -1
  30. package/dist/components/banner/banner.d.ts +1 -1
  31. package/dist/components/banner/banner.stories.js +1 -1
  32. package/dist/components/box/box.d.ts +8 -0
  33. package/dist/components/box/box.js +10 -0
  34. package/dist/components/box/box.stories.d.ts +8 -0
  35. package/dist/components/box/box.stories.js +32 -0
  36. package/dist/components/box/index.d.ts +1 -0
  37. package/dist/components/box/index.js +1 -0
  38. package/dist/components/breadcrumbs/breadcrumbs-skeleton.js +1 -1
  39. package/dist/components/breadcrumbs/breadcrumbs.stories.js +1 -1
  40. package/dist/components/burger/burger.d.ts +8 -0
  41. package/dist/components/burger/burger.js +21 -0
  42. package/dist/components/burger/burger.stories.d.ts +8 -0
  43. package/dist/components/burger/burger.stories.js +31 -0
  44. package/dist/components/burger/index.d.ts +1 -0
  45. package/dist/components/burger/index.js +1 -0
  46. package/dist/components/button/button.d.ts +2 -2
  47. package/dist/components/button/button.stories.js +10 -7
  48. package/dist/components/button-group/button-group.stories.js +1 -1
  49. package/dist/components/calendar/calendar-skeleton.js +1 -1
  50. package/dist/components/calendar/calendar.d.ts +1 -1
  51. package/dist/components/calendar/calendar.js +1 -1
  52. package/dist/components/calendar/calendar.types.d.ts +3 -3
  53. package/dist/components/card/card-skeleton.js +2 -2
  54. package/dist/components/card/card.js +17 -14
  55. package/dist/components/card/index.d.ts +1 -1
  56. package/dist/components/center/center.d.ts +7 -0
  57. package/dist/components/center/center.js +10 -0
  58. package/dist/components/center/center.stories.d.ts +7 -0
  59. package/dist/components/center/center.stories.js +25 -0
  60. package/dist/components/center/index.d.ts +1 -0
  61. package/dist/components/center/index.js +1 -0
  62. package/dist/components/charts/area-chart.js +1 -1
  63. package/dist/components/charts/bar-chart.js +1 -1
  64. package/dist/components/charts/donut-chart.js +1 -1
  65. package/dist/components/charts/index.d.ts +2 -2
  66. package/dist/components/charts/index.js +2 -2
  67. package/dist/components/charts/line-chart.js +1 -1
  68. package/dist/components/charts/radial-bar-chart.js +1 -1
  69. package/dist/components/charts/theme-utils.d.ts +1 -1
  70. package/dist/components/charts/use-theme-aware-chart.d.ts +1 -1
  71. package/dist/components/charts/use-theme-aware-chart.js +2 -1
  72. package/dist/components/checkbox/checkbox.js +1 -1
  73. package/dist/components/checkbox/checkbox.stories.js +12 -8
  74. package/dist/components/close-button/close-button.d.ts +7 -0
  75. package/dist/components/close-button/close-button.js +9 -0
  76. package/dist/components/close-button/close-button.stories.d.ts +7 -0
  77. package/dist/components/close-button/close-button.stories.js +18 -0
  78. package/dist/components/close-button/index.d.ts +1 -0
  79. package/dist/components/close-button/index.js +1 -0
  80. package/dist/components/code/code.d.ts +8 -0
  81. package/dist/components/code/code.js +14 -0
  82. package/dist/components/code/code.stories.d.ts +8 -0
  83. package/dist/components/code/code.stories.js +31 -0
  84. package/dist/components/code/index.d.ts +1 -0
  85. package/dist/components/code/index.js +1 -0
  86. package/dist/components/collapse/collapse.d.ts +17 -0
  87. package/dist/components/collapse/collapse.js +34 -0
  88. package/dist/components/collapse/index.d.ts +1 -0
  89. package/dist/components/collapse/index.js +1 -0
  90. package/dist/components/color-input/color-input.d.ts +28 -0
  91. package/dist/components/color-input/color-input.js +35 -0
  92. package/dist/components/color-input/color-input.stories.d.ts +10 -0
  93. package/dist/components/color-input/color-input.stories.js +41 -0
  94. package/dist/components/color-input/index.d.ts +1 -0
  95. package/dist/components/color-input/index.js +1 -0
  96. package/dist/components/combobox/combobox-skeleton.js +1 -1
  97. package/dist/components/combobox/combobox.d.ts +1 -1
  98. package/dist/components/combobox/combobox.js +17 -8
  99. package/dist/components/combobox/combobox.stories.js +1 -1
  100. package/dist/components/command/command.d.ts +2 -2
  101. package/dist/components/command/command.stories.js +14 -19
  102. package/dist/components/container/container.d.ts +11 -0
  103. package/dist/components/container/container.js +29 -0
  104. package/dist/components/container/container.stories.d.ts +8 -0
  105. package/dist/components/container/container.stories.js +34 -0
  106. package/dist/components/container/index.d.ts +1 -0
  107. package/dist/components/container/index.js +1 -0
  108. package/dist/components/data-table/column-header-filter.js +11 -6
  109. package/dist/components/data-table/data-table-skeleton.js +5 -15
  110. package/dist/components/data-table/data-table.js +18 -15
  111. package/dist/components/data-table/data-table.stories.js +3 -5
  112. package/dist/components/date-picker/date-picker.d.ts +1 -1
  113. package/dist/components/date-picker/date-picker.js +3 -3
  114. package/dist/components/date-picker/date-picker.types.d.ts +1 -1
  115. package/dist/components/dialog/dialog-skeleton.js +1 -1
  116. package/dist/components/dialog/dialog.js +6 -4
  117. package/dist/components/dialog/dialog.stories.js +2 -2
  118. package/dist/components/dnd/dnd.d.ts +4 -5
  119. package/dist/components/dnd/dnd.js +5 -5
  120. package/dist/components/dnd/dnd.stories.js +18 -10
  121. package/dist/components/drawer/drawer.stories.js +2 -2
  122. package/dist/components/empty-state/empty-state-skeleton.js +2 -3
  123. package/dist/components/empty-state/empty-state.d.ts +1 -1
  124. package/dist/components/field/field-skeleton.js +1 -1
  125. package/dist/components/field/field.stories.js +1 -1
  126. package/dist/components/file-upload/file-upload-skeleton.js +1 -1
  127. package/dist/components/flex/flex.d.ts +18 -0
  128. package/dist/components/flex/flex.js +78 -0
  129. package/dist/components/flex/flex.stories.d.ts +8 -0
  130. package/dist/components/flex/flex.stories.js +51 -0
  131. package/dist/components/flex/index.d.ts +1 -0
  132. package/dist/components/flex/index.js +1 -0
  133. package/dist/components/grid/grid.d.ts +24 -0
  134. package/dist/components/grid/grid.js +136 -0
  135. package/dist/components/grid/grid.stories.d.ts +8 -0
  136. package/dist/components/grid/grid.stories.js +31 -0
  137. package/dist/components/grid/index.d.ts +1 -0
  138. package/dist/components/grid/index.js +1 -0
  139. package/dist/components/group/group.d.ts +7 -0
  140. package/dist/components/group/group.js +9 -0
  141. package/dist/components/group/group.stories.d.ts +7 -0
  142. package/dist/components/group/group.stories.js +34 -0
  143. package/dist/components/group/index.d.ts +1 -0
  144. package/dist/components/group/index.js +1 -0
  145. package/dist/components/header/header-skeleton.js +1 -1
  146. package/dist/components/header/header.d.ts +3 -3
  147. package/dist/components/header/header.js +17 -31
  148. package/dist/components/header/index.d.ts +1 -1
  149. package/dist/components/heading/heading.d.ts +14 -0
  150. package/dist/components/heading/heading.js +40 -0
  151. package/dist/components/heading/heading.stories.d.ts +9 -0
  152. package/dist/components/heading/heading.stories.js +45 -0
  153. package/dist/components/heading/index.d.ts +1 -0
  154. package/dist/components/heading/index.js +1 -0
  155. package/dist/components/indicator/index.d.ts +1 -0
  156. package/dist/components/indicator/index.js +1 -0
  157. package/dist/components/indicator/indicator.d.ts +30 -0
  158. package/dist/components/indicator/indicator.js +89 -0
  159. package/dist/components/indicator/indicator.stories.d.ts +10 -0
  160. package/dist/components/indicator/indicator.stories.js +75 -0
  161. package/dist/components/input/input.js +1 -1
  162. package/dist/components/input/input.stories.js +1 -1
  163. package/dist/components/input-group/input-group.stories.js +1 -1
  164. package/dist/components/kbd/index.d.ts +1 -0
  165. package/dist/components/kbd/index.js +1 -0
  166. package/dist/components/kbd/kbd.d.ts +6 -0
  167. package/dist/components/kbd/kbd.js +13 -0
  168. package/dist/components/kbd/kbd.stories.d.ts +9 -0
  169. package/dist/components/kbd/kbd.stories.js +28 -0
  170. package/dist/components/label/label.stories.js +1 -1
  171. package/dist/components/list/list-skeleton.js +2 -2
  172. package/dist/components/list/list.js +1 -1
  173. package/dist/components/list/list.stories.js +1 -1
  174. package/dist/components/list/list.types.d.ts +2 -2
  175. package/dist/components/loading-overlay/index.d.ts +1 -0
  176. package/dist/components/loading-overlay/index.js +1 -0
  177. package/dist/components/loading-overlay/loading-overlay.d.ts +19 -0
  178. package/dist/components/loading-overlay/loading-overlay.js +19 -0
  179. package/dist/components/loading-overlay/loading-overlay.stories.d.ts +8 -0
  180. package/dist/components/loading-overlay/loading-overlay.stories.js +46 -0
  181. package/dist/components/metric-card/metric-card-skeleton.js +2 -2
  182. package/dist/components/metric-card/metric-card.js +1 -1
  183. package/dist/components/multi-select/multi-select-skeleton.js +1 -1
  184. package/dist/components/multi-select/multi-select.stories.js +1 -1
  185. package/dist/components/nav-link/index.d.ts +1 -0
  186. package/dist/components/nav-link/index.js +1 -0
  187. package/dist/components/nav-link/nav-link.d.ts +26 -0
  188. package/dist/components/nav-link/nav-link.js +26 -0
  189. package/dist/components/nav-link/nav-link.stories.d.ts +9 -0
  190. package/dist/components/nav-link/nav-link.stories.js +37 -0
  191. package/dist/components/navigation/navigation-skeleton.js +1 -1
  192. package/dist/components/number-input/index.d.ts +1 -0
  193. package/dist/components/number-input/index.js +1 -0
  194. package/dist/components/number-input/number-input.d.ts +40 -0
  195. package/dist/components/number-input/number-input.js +69 -0
  196. package/dist/components/number-input/number-input.stories.d.ts +11 -0
  197. package/dist/components/number-input/number-input.stories.js +54 -0
  198. package/dist/components/overlay/index.d.ts +1 -0
  199. package/dist/components/overlay/index.js +1 -0
  200. package/dist/components/overlay/overlay.d.ts +22 -0
  201. package/dist/components/overlay/overlay.js +45 -0
  202. package/dist/components/overlay/overlay.stories.d.ts +9 -0
  203. package/dist/components/overlay/overlay.stories.js +47 -0
  204. package/dist/components/page-transition/page-transition.stories.js +1 -1
  205. package/dist/components/pagination/index.d.ts +1 -1
  206. package/dist/components/pagination/index.js +1 -1
  207. package/dist/components/pagination/pagination-skeleton.js +1 -1
  208. package/dist/components/pagination/pagination.d.ts +44 -28
  209. package/dist/components/pagination/pagination.js +53 -79
  210. package/dist/components/pagination/pagination.stories.d.ts +1 -0
  211. package/dist/components/pagination/pagination.stories.js +31 -5
  212. package/dist/components/paper/index.d.ts +1 -0
  213. package/dist/components/paper/index.js +1 -0
  214. package/dist/components/paper/paper.d.ts +12 -0
  215. package/dist/components/paper/paper.js +39 -0
  216. package/dist/components/paper/paper.stories.d.ts +7 -0
  217. package/dist/components/paper/paper.stories.js +30 -0
  218. package/dist/components/password-strength-indicator/password-strength-indicator.stories.js +1 -1
  219. package/dist/components/popover/popover-skeleton.js +1 -1
  220. package/dist/components/popover/popover.stories.js +2 -2
  221. package/dist/components/progress/index.d.ts +1 -1
  222. package/dist/components/progress/progress.d.ts +1 -1
  223. package/dist/components/progress/progress.stories.js +1 -1
  224. package/dist/components/radio-group/radio-group-skeleton.js +1 -1
  225. package/dist/components/radio-group/radio-group.stories.js +1 -1
  226. package/dist/components/ring-progress/index.d.ts +1 -0
  227. package/dist/components/ring-progress/index.js +1 -0
  228. package/dist/components/ring-progress/ring-progress.d.ts +24 -0
  229. package/dist/components/ring-progress/ring-progress.js +20 -0
  230. package/dist/components/ring-progress/ring-progress.stories.d.ts +9 -0
  231. package/dist/components/ring-progress/ring-progress.stories.js +46 -0
  232. package/dist/components/scroll-area/scroll-area.stories.js +1 -1
  233. package/dist/components/segmented-control/index.d.ts +1 -0
  234. package/dist/components/segmented-control/index.js +1 -0
  235. package/dist/components/segmented-control/segmented-control.d.ts +19 -0
  236. package/dist/components/segmented-control/segmented-control.js +46 -0
  237. package/dist/components/segmented-control/segmented-control.stories.d.ts +10 -0
  238. package/dist/components/segmented-control/segmented-control.stories.js +53 -0
  239. package/dist/components/select/select.js +1 -1
  240. package/dist/components/select/select.stories.js +1 -1
  241. package/dist/components/separator/separator.stories.js +1 -1
  242. package/dist/components/session-card/session-card-skeleton.js +2 -2
  243. package/dist/components/session-card/session-card.js +1 -1
  244. package/dist/components/sidebar/sidebar-skeleton.js +2 -2
  245. package/dist/components/skeleton/index.d.ts +3 -3
  246. package/dist/components/skeleton/index.js +1 -1
  247. package/dist/components/skeleton/skeleton.types.d.ts +0 -249
  248. package/dist/components/slider/index.d.ts +1 -1
  249. package/dist/components/slider/slider.js +1 -1
  250. package/dist/components/slider/slider.stories.js +1 -1
  251. package/dist/components/social-login-button/social-login-button.js +6 -6
  252. package/dist/components/sparkline-chart/sparkline-chart.js +6 -3
  253. package/dist/components/sparkline-chart/sparkline-chart.stories.js +1 -1
  254. package/dist/components/spinner/spinner.d.ts +1 -1
  255. package/dist/components/spoiler/index.d.ts +1 -0
  256. package/dist/components/spoiler/index.js +1 -0
  257. package/dist/components/spoiler/spoiler.d.ts +14 -0
  258. package/dist/components/spoiler/spoiler.js +20 -0
  259. package/dist/components/spoiler/spoiler.stories.d.ts +8 -0
  260. package/dist/components/spoiler/spoiler.stories.js +35 -0
  261. package/dist/components/stack/index.d.ts +1 -0
  262. package/dist/components/stack/index.js +1 -0
  263. package/dist/components/stack/stack.d.ts +7 -0
  264. package/dist/components/stack/stack.js +9 -0
  265. package/dist/components/stack/stack.stories.d.ts +8 -0
  266. package/dist/components/stack/stack.stories.js +44 -0
  267. package/dist/components/steps/steps-skeleton.js +1 -1
  268. package/dist/components/steps/steps.js +7 -5
  269. package/dist/components/steps/steps.stories.js +6 -2
  270. package/dist/components/switch/index.d.ts +1 -1
  271. package/dist/components/switch/switch.js +1 -1
  272. package/dist/components/switch/switch.stories.js +1 -1
  273. package/dist/components/table/table-skeleton.js +2 -2
  274. package/dist/components/table/table.js +4 -3
  275. package/dist/components/table/table.stories.js +10 -7
  276. package/dist/components/tabs/tabs-skeleton.js +1 -1
  277. package/dist/components/tabs/tabs.stories.js +5 -5
  278. package/dist/components/text/index.d.ts +1 -0
  279. package/dist/components/text/index.js +1 -0
  280. package/dist/components/text/text.d.ts +16 -0
  281. package/dist/components/text/text.js +66 -0
  282. package/dist/components/text/text.stories.d.ts +8 -0
  283. package/dist/components/text/text.stories.js +71 -0
  284. package/dist/components/textarea/textarea.js +1 -1
  285. package/dist/components/textarea/textarea.stories.js +1 -1
  286. package/dist/components/timeline/index.d.ts +1 -0
  287. package/dist/components/timeline/index.js +1 -0
  288. package/dist/components/timeline/timeline.d.ts +35 -0
  289. package/dist/components/timeline/timeline.js +36 -0
  290. package/dist/components/timeline/timeline.stories.d.ts +7 -0
  291. package/dist/components/timeline/timeline.stories.js +21 -0
  292. package/dist/components/toast/toast.js +6 -6
  293. package/dist/components/toggle/toggle.stories.js +1 -1
  294. package/dist/components/tooltip/tooltip.stories.js +1 -1
  295. package/dist/components/user-menu-dropdown/user-menu-dropdown.js +1 -1
  296. package/dist/config/tailwind-base.d.ts +10 -0
  297. package/dist/config/tailwind-base.js +1 -0
  298. package/dist/index.d.ts +31 -0
  299. package/dist/index.js +31 -10
  300. package/dist/primitives/command/Command.js +2 -1
  301. package/dist/styles/globals.css +545 -61
  302. package/package.json +523 -418
@@ -3,7 +3,7 @@ import { Slot } from "@radix-ui/react-slot";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { badgeStyles } from "../../config/badge";
5
5
  import { cn } from "../../lib/utils";
6
- import { Skeleton } from "../skeleton/skeleton";
6
+ import { Skeleton } from "../skeleton";
7
7
  const badgeVariants = cva(badgeStyles.base, {
8
8
  variants: badgeStyles.variants,
9
9
  defaultVariants: badgeStyles.defaultVariants,
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Skeleton } from "../skeleton/skeleton";
2
+ import { Skeleton } from "../skeleton";
3
3
  import { Badge } from "./badge";
4
4
  const meta = {
5
5
  title: "Data Display/Badge",
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  * Provides zero-CLS skeleton state that matches actual banner layout.
7
7
  */
8
8
  import { cn } from "../../lib/utils";
9
- import { Skeleton } from "../skeleton/skeleton";
9
+ import { Skeleton } from "../skeleton";
10
10
  import { SkeletonCircle } from "../skeleton/skeleton-patterns";
11
11
  /**
12
12
  * Banner skeleton component
@@ -12,7 +12,7 @@ import { type VariantProps } from "class-variance-authority";
12
12
  import type * as React from "react";
13
13
  import type { BannerSkeletonConfig } from "../skeleton/skeleton.types";
14
14
  declare const bannerVariants: (props?: ({
15
- variant?: "error" | "info" | "warning" | "success" | null | undefined;
15
+ variant?: "success" | "warning" | "info" | "error" | null | undefined;
16
16
  position?: "fixed" | "static" | null | undefined;
17
17
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
18
18
  export interface BannerProps extends React.ComponentProps<"div">, VariantProps<typeof bannerVariants> {
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Skeleton } from "../skeleton/skeleton";
2
+ import { Skeleton } from "../skeleton";
3
3
  import { Banner } from "./banner";
4
4
  const meta = {
5
5
  title: "Feedback/Banner",
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ export interface BoxProps extends React.HTMLAttributes<HTMLElement> {
3
+ asChild?: boolean;
4
+ as?: React.ElementType;
5
+ [key: string]: any;
6
+ }
7
+ declare const Box: React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<HTMLElement>>;
8
+ export { Box };
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import * as React from "react";
4
+ import { cn } from "../../lib/utils";
5
+ const Box = React.forwardRef(({ className, asChild = false, as: Tag = "div", ...props }, ref) => {
6
+ const Comp = asChild ? Slot : Tag;
7
+ return _jsx(Comp, { className: cn(className), ref: ref, ...props });
8
+ });
9
+ Box.displayName = "Box";
10
+ export { Box };
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Box } from "./box";
3
+ declare const meta: Meta<typeof Box>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Box>;
6
+ export declare const Default: Story;
7
+ export declare const WithCustomStyles: Story;
8
+ export declare const AsChild: Story;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box } from "./box";
3
+ const meta = {
4
+ title: "Components/Box",
5
+ component: Box,
6
+ tags: ["autodocs"],
7
+ argTypes: {
8
+ asChild: {
9
+ control: "boolean",
10
+ description: "Change the default rendered element for the one passed as a child, merging their props and behavior.",
11
+ },
12
+ },
13
+ };
14
+ export default meta;
15
+ export const Default = {
16
+ args: {
17
+ children: "This is a box",
18
+ className: "p-4 bg-gray-100 rounded border border-gray-200",
19
+ },
20
+ };
21
+ export const WithCustomStyles = {
22
+ args: {
23
+ children: (_jsxs(_Fragment, { children: [_jsx("h3", { className: "font-bold mb-2", children: "Box with custom styles" }), _jsx("p", { children: "You can use any Tailwind utility classes on the Box component." })] })),
24
+ className: "p-6 bg-blue-50 text-blue-900 rounded-lg shadow-sm",
25
+ },
26
+ };
27
+ export const AsChild = {
28
+ args: {
29
+ asChild: true,
30
+ children: (_jsx("button", { type: "button", className: "px-4 py-2 bg-primary text-primary-foreground rounded hover:opacity-90 transition-opacity", children: "I am a button rendered via Box asChild" })),
31
+ },
32
+ };
@@ -0,0 +1 @@
1
+ export * from "./box";
@@ -0,0 +1 @@
1
+ export * from "./box";
@@ -7,7 +7,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
7
7
  */
8
8
  import { Fragment } from "react";
9
9
  import { cn } from "../../lib/utils";
10
- import { Skeleton } from "../skeleton/skeleton";
10
+ import { Skeleton } from "../skeleton";
11
11
  /**
12
12
  * Breadcrumbs skeleton component
13
13
  *
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Skeleton } from "../skeleton/skeleton";
2
+ import { Skeleton } from "../skeleton";
3
3
  import { Breadcrumbs } from "./breadcrumbs";
4
4
  const meta = {
5
5
  title: "Navigation/Breadcrumbs",
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ export interface BurgerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ /** State of the burger */
4
+ opened?: boolean;
5
+ /** Size of the burger */
6
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
7
+ }
8
+ export declare const Burger: React.ForwardRefExoticComponent<BurgerProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../../lib/utils";
4
+ export const Burger = React.forwardRef(({ className, opened, size = "md", ...props }, ref) => {
5
+ const sizeClasses = {
6
+ xs: "h-3 w-4",
7
+ sm: "h-4 w-5",
8
+ md: "h-5 w-6",
9
+ lg: "h-6 w-8",
10
+ xl: "h-8 w-10",
11
+ };
12
+ const lineSizeClasses = {
13
+ xs: "h-0.5",
14
+ sm: "h-0.5",
15
+ md: "h-0.5",
16
+ lg: "h-1",
17
+ xl: "h-1",
18
+ };
19
+ return (_jsxs("button", { ref: ref, type: "button", className: cn("relative flex flex-col justify-between cursor-pointer transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", sizeClasses[size], className), "aria-label": opened ? "Close navigation" : "Open navigation", "aria-expanded": opened, ...props, children: [_jsx("div", { className: cn("bg-foreground w-full rounded transition-transform origin-top-left", lineSizeClasses[size], opened && "translate-x-[3px] rotate-45") }), _jsx("div", { className: cn("bg-foreground w-full rounded transition-opacity", lineSizeClasses[size], opened && "opacity-0") }), _jsx("div", { className: cn("bg-foreground w-full rounded transition-transform origin-bottom-left", lineSizeClasses[size], opened && "translate-x-[3px] -rotate-45") })] }));
20
+ });
21
+ Burger.displayName = "Burger";
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Burger } from "./burger";
3
+ declare const meta: Meta<typeof Burger>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Burger>;
6
+ export declare const Default: Story;
7
+ export declare const Interactive: Story;
8
+ export declare const Sizes: Story;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useDisclosure } from "@kala-ui/react-hooks";
3
+ import { Flex } from "../flex";
4
+ import { Burger } from "./burger";
5
+ const meta = {
6
+ title: "Components/Burger",
7
+ component: Burger,
8
+ tags: ["autodocs"],
9
+ argTypes: {
10
+ opened: { control: "boolean" },
11
+ size: {
12
+ control: { type: "select" },
13
+ options: ["xs", "sm", "md", "lg", "xl"],
14
+ },
15
+ },
16
+ };
17
+ export default meta;
18
+ export const Default = {
19
+ args: {
20
+ opened: false,
21
+ },
22
+ };
23
+ export const Interactive = {
24
+ render: () => {
25
+ const [opened, { toggle }] = useDisclosure(false);
26
+ return _jsx(Burger, { opened: opened, onClick: toggle });
27
+ },
28
+ };
29
+ export const Sizes = {
30
+ render: () => (_jsxs(Flex, { align: "center", gap: 4, children: [_jsx(Burger, { size: "xs" }), _jsx(Burger, { size: "sm" }), _jsx(Burger, { size: "md" }), _jsx(Burger, { size: "lg" }), _jsx(Burger, { size: "xl" })] })),
31
+ };
@@ -0,0 +1 @@
1
+ export * from "./burger";
@@ -0,0 +1 @@
1
+ export * from "./burger";
@@ -5,8 +5,8 @@
5
5
  import * as React from "react";
6
6
  import type { ButtonProps } from "./button.types";
7
7
  declare const buttonVariants: (props?: ({
8
- variant?: "default" | "link" | "dark" | "light" | "info" | "warning" | "success" | "primary" | "secondary" | "danger" | "destructive" | "outline" | "muted" | "ghost" | "outline-primary" | "outline-secondary" | "outline-success" | "outline-warning" | "outline-danger" | "outline-info" | "outline-dark" | "outline-light" | "outline-muted" | null | undefined;
9
- size?: "default" | "icon" | "sm" | "lg" | "xs" | null | undefined;
8
+ variant?: "link" | "default" | "dark" | "light" | "primary" | "secondary" | "success" | "danger" | "destructive" | "warning" | "info" | "outline" | "muted" | "ghost" | "outline-primary" | "outline-secondary" | "outline-success" | "outline-warning" | "outline-danger" | "outline-info" | "outline-dark" | "outline-light" | "outline-muted" | null | undefined;
9
+ size?: "default" | "icon" | "xs" | "sm" | "lg" | null | undefined;
10
10
  fullWidth?: boolean | null | undefined;
11
11
  rounded?: boolean | null | undefined;
12
12
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1,6 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { fn } from "@storybook/test";
3
- import { Skeleton } from "../skeleton/skeleton";
3
+ import { Box } from "../box";
4
+ import { Flex } from "../flex";
5
+ import { Stack } from "../stack";
6
+ import { Skeleton } from "../skeleton";
4
7
  import { Button } from "./button";
5
8
  const meta = {
6
9
  title: "Buttons/Button",
@@ -63,19 +66,19 @@ export const Default = {
63
66
  },
64
67
  };
65
68
  export const Variants = {
66
- render: (args) => (_jsx("div", { className: "flex flex-col gap-4", children: _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { ...args, variant: "primary", children: "Primary" }), _jsx(Button, { ...args, variant: "secondary", children: "Secondary" }), _jsx(Button, { ...args, variant: "success", children: "Success" }), _jsx(Button, { ...args, variant: "warning", children: "Warning" }), _jsx(Button, { ...args, variant: "danger", children: "Danger" }), _jsx(Button, { ...args, variant: "info", children: "Info" }), _jsx(Button, { ...args, variant: "light", children: "Light" }), _jsx(Button, { ...args, variant: "dark", children: "Dark" }), _jsx(Button, { ...args, variant: "link", children: "Link" }), _jsx(Button, { ...args, variant: "ghost", children: "Ghost" })] }) })),
69
+ render: (args) => (_jsx(Stack, { gap: 4, children: _jsxs(Flex, { wrap: "wrap", gap: 2, children: [_jsx(Button, { ...args, variant: "primary", children: "Primary" }), _jsx(Button, { ...args, variant: "secondary", children: "Secondary" }), _jsx(Button, { ...args, variant: "success", children: "Success" }), _jsx(Button, { ...args, variant: "warning", children: "Warning" }), _jsx(Button, { ...args, variant: "danger", children: "Danger" }), _jsx(Button, { ...args, variant: "info", children: "Info" }), _jsx(Button, { ...args, variant: "light", children: "Light" }), _jsx(Button, { ...args, variant: "dark", children: "Dark" }), _jsx(Button, { ...args, variant: "link", children: "Link" }), _jsx(Button, { ...args, variant: "ghost", children: "Ghost" })] }) })),
67
70
  };
68
71
  export const OutlineVariants = {
69
- render: (args) => (_jsx("div", { className: "flex flex-col gap-4", children: _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { ...args, variant: "outline", children: "Default Outline" }), _jsx(Button, { ...args, variant: "outline-primary", children: "Primary" }), _jsx(Button, { ...args, variant: "outline-secondary", children: "Secondary" }), _jsx(Button, { ...args, variant: "outline-success", children: "Success" }), _jsx(Button, { ...args, variant: "outline-warning", children: "Warning" }), _jsx(Button, { ...args, variant: "outline-danger", children: "Danger" }), _jsx(Button, { ...args, variant: "outline-info", children: "Info" }), _jsx(Button, { ...args, variant: "outline-light", children: "Light" }), _jsx(Button, { ...args, variant: "outline-dark", children: "Dark" })] }) })),
72
+ render: (args) => (_jsx(Stack, { gap: 4, children: _jsxs(Flex, { wrap: "wrap", gap: 2, children: [_jsx(Button, { ...args, variant: "outline", children: "Default Outline" }), _jsx(Button, { ...args, variant: "outline-primary", children: "Primary" }), _jsx(Button, { ...args, variant: "outline-secondary", children: "Secondary" }), _jsx(Button, { ...args, variant: "outline-success", children: "Success" }), _jsx(Button, { ...args, variant: "outline-warning", children: "Warning" }), _jsx(Button, { ...args, variant: "outline-danger", children: "Danger" }), _jsx(Button, { ...args, variant: "outline-info", children: "Info" }), _jsx(Button, { ...args, variant: "outline-light", children: "Light" }), _jsx(Button, { ...args, variant: "outline-dark", children: "Dark" })] }) })),
70
73
  };
71
74
  export const Sizes = {
72
- render: (args) => (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { ...args, size: "xs", children: "Extra Small" }), _jsx(Button, { ...args, size: "sm", children: "Small" }), _jsx(Button, { ...args, size: "default", children: "Default" }), _jsx(Button, { ...args, size: "lg", children: "Large" }), _jsx(Button, { ...args, size: "icon", children: _jsx("span", { className: "h-4 w-4", children: "\uD83D\uDE80" }) })] })),
75
+ render: (args) => (_jsxs(Flex, { align: "center", gap: 2, children: [_jsx(Button, { ...args, size: "xs", children: "Extra Small" }), _jsx(Button, { ...args, size: "sm", children: "Small" }), _jsx(Button, { ...args, size: "default", children: "Default" }), _jsx(Button, { ...args, size: "lg", children: "Large" }), _jsx(Button, { ...args, size: "icon", children: _jsx(Box, { as: "span", className: "h-4 w-4", children: "\uD83D\uDE80" }) })] })),
73
76
  };
74
77
  export const States = {
75
- render: (args) => (_jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { ...args, children: "Normal" }), _jsx(Button, { ...args, disabled: true, children: "Disabled" }), _jsx(Button, { ...args, isLoading: true, children: "Loading" })] })),
78
+ render: (args) => (_jsxs(Flex, { wrap: "wrap", gap: 2, children: [_jsx(Button, { ...args, children: "Normal" }), _jsx(Button, { ...args, disabled: true, children: "Disabled" }), _jsx(Button, { ...args, isLoading: true, children: "Loading" })] })),
76
79
  };
77
80
  export const Shapes = {
78
- render: (args) => (_jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { ...args, children: "Default" }), _jsx(Button, { ...args, rounded: true, children: "Rounded Pill" })] })),
81
+ render: (args) => (_jsxs(Flex, { wrap: "wrap", gap: 2, children: [_jsx(Button, { ...args, children: "Default" }), _jsx(Button, { ...args, rounded: true, children: "Rounded Pill" })] })),
79
82
  };
80
83
  export const FullWidth = {
81
84
  args: {
@@ -87,7 +90,7 @@ export const FullWidth = {
87
90
  },
88
91
  };
89
92
  export const LoadingSkeleton = {
90
- render: () => (_jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Skeleton, { className: "h-10 w-24 rounded-md" }), _jsx(Skeleton, { className: "h-10 w-32 rounded-md" }), _jsx(Skeleton, { className: "h-10 w-28 rounded-md" })] })),
93
+ render: () => (_jsxs(Flex, { wrap: "wrap", gap: 2, children: [_jsx(Skeleton, { className: "h-10 w-24 rounded-md" }), _jsx(Skeleton, { className: "h-10 w-32 rounded-md" }), _jsx(Skeleton, { className: "h-10 w-28 rounded-md" })] })),
91
94
  parameters: {
92
95
  docs: {
93
96
  description: {
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ChevronDown, Minus, Plus } from "lucide-react";
3
3
  import { Button } from "../button";
4
- import { Skeleton } from "../skeleton/skeleton";
4
+ import { Skeleton } from "../skeleton";
5
5
  import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, } from "./button-group";
6
6
  const meta = {
7
7
  title: "Buttons/ButtonGroup",
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  * Displays month header and calendar grid.
7
7
  */
8
8
  import { cn } from "../../lib/utils";
9
- import { Skeleton } from "../skeleton/skeleton";
9
+ import { Skeleton } from "../skeleton";
10
10
  /**
11
11
  * Calendar skeleton component
12
12
  *
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { type DayButton, DayPicker } from "react-day-picker";
3
- import { Button } from "../button/button";
3
+ import { Button } from "../button";
4
4
  export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
5
5
  buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
6
  isLoading?: boolean;
@@ -4,7 +4,7 @@ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from "lucide-reac
4
4
  import * as React from "react";
5
5
  import { DayPicker, getDefaultClassNames, } from "react-day-picker";
6
6
  import { cn } from "../../lib/utils";
7
- import { Button, buttonVariants } from "../button/button";
7
+ import { Button, buttonVariants } from "../button";
8
8
  import { CalendarSkeleton } from "./calendar-skeleton";
9
9
  function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components, isLoading = false, skeletonConfig, skeleton, ...props }) {
10
10
  if (isLoading) {
@@ -1,7 +1,7 @@
1
- import type { DayPicker } from "react-day-picker";
2
1
  import type * as React from "react";
3
- import type { Button } from "../button/button";
4
- import type { CalendarSkeletonConfig } from "../skeleton/skeleton.types";
2
+ import type { DayPicker } from "react-day-picker";
3
+ import type { Button } from "../button";
4
+ import type { CalendarSkeletonConfig } from "./calendar-skeleton";
5
5
  export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
6
6
  buttonVariant?: React.ComponentProps<typeof Button>["variant"];
7
7
  isLoading?: boolean;
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
6
6
  * Provides zero-CLS skeleton states that match actual card layouts.
7
7
  */
8
8
  import { cn } from "../../lib/utils";
9
- import { Skeleton } from "../skeleton/skeleton";
9
+ import { Skeleton } from "../skeleton";
10
10
  import { SkeletonText } from "../skeleton/skeleton-patterns";
11
11
  /**
12
12
  * Card skeleton component with multiple variants
@@ -19,7 +19,7 @@ import { SkeletonText } from "../skeleton/skeleton-patterns";
19
19
  * ```
20
20
  */
21
21
  export function CardSkeleton({ variant = "default", hasHeader = true, hasFooter = false, imagePosition = "top", contentRows = 3, showActions = false, className, "data-testid": dataTestId, }) {
22
- return (_jsxs("div", { "data-testid": dataTestId || "card-skeleton", className: cn("rounded-md border bg-card overflow-hidden", className), children: [variant === "default" && (_jsx(DefaultCardSkeleton, { hasHeader: hasHeader, contentRows: contentRows, hasFooter: hasFooter, showActions: showActions })), variant === "withImage" && (_jsx(WithImageCardSkeleton, { hasHeader: hasHeader, contentRows: contentRows, hasFooter: hasFooter, showActions: showActions })), variant === "withImageTop" && (_jsx(WithImageTopCardSkeleton, { hasHeader: hasHeader, contentRows: contentRows, hasFooter: hasFooter, showActions: showActions })), variant === "horizontal" && (_jsx(HorizontalCardSkeleton, { imagePosition: imagePosition, hasHeader: hasHeader, contentRows: contentRows, hasFooter: hasFooter, showActions: showActions })), variant === "withFooter" && (_jsx(WithFooterCardSkeleton, { hasHeader: hasHeader, contentRows: contentRows, showActions: showActions })), variant === "minimal" && _jsx(MinimalCardSkeleton, { contentRows: contentRows })] }));
22
+ return (_jsxs("div", { "data-testid": dataTestId || "card-skeleton", className: cn("rounded-md border bg-card overflow-hidden", className), children: [variant === "default" && (_jsx(DefaultCardSkeleton, { hasHeader: hasHeader, contentRows: contentRows, hasFooter: hasFooter, showActions: showActions })), variant === "withImage" && (_jsx(WithImageCardSkeleton, { hasHeader: hasHeader, contentRows: contentRows, hasFooter: hasFooter, showActions: showActions })), variant === "withImageTop" && (_jsx(WithImageTopCardSkeleton, { hasHeader: hasHeader, contentRows: contentRows, hasFooter: hasFooter, showActions: showActions })), variant === "horizontal" && (_jsx(HorizontalCardSkeleton, { imagePosition: imagePosition, hasHeader: hasHeader, contentRows: contentRows, hasFooter: hasFooter, showActions: showActions })), variant === "withFooter" && (_jsx(WithFooterCardSkeleton, { hasHeader: hasHeader, contentRows: contentRows, showActions: showActions })), variant === "minimal" && (_jsx(MinimalCardSkeleton, { contentRows: contentRows }))] }));
23
23
  }
24
24
  /**
25
25
  * Default variant: header + content rows
@@ -3,45 +3,48 @@ import * as React from "react";
3
3
  import { cardStyles } from "../../config/card";
4
4
  import { cn } from "../../lib/utils";
5
5
  import { CardSkeleton } from "./card-skeleton";
6
+ import { Box } from "../box";
7
+ import { Heading } from "../heading";
8
+ import { Text } from "../text";
6
9
  const Card = React.forwardRef(({ className, isLoading = false, skeletonConfig, skeleton, children, ...props }, ref) => {
7
10
  if (isLoading) {
8
11
  if (skeleton) {
9
- return (_jsx("div", { ref: ref, className: cn(cardStyles.base, className), children: skeleton }));
12
+ return (_jsx(Box, { ref: ref, className: cn(cardStyles.base, className), children: skeleton }));
10
13
  }
11
14
  return _jsx(CardSkeleton, { ...skeletonConfig });
12
15
  }
13
- return (_jsx("div", { ref: ref, className: cn(cardStyles.base, className), ...props, children: children }));
16
+ return (_jsx(Box, { ref: ref, className: cn(cardStyles.base, className), ...props, children: children }));
14
17
  });
15
18
  Card.displayName = "Card";
16
19
  function CardHeader({ className, ...props }) {
17
- return _jsx("div", { className: cn(cardStyles.header, className), ...props });
20
+ return _jsx(Box, { className: cn(cardStyles.header, className), ...props });
18
21
  }
19
22
  function CardTitle({ className, ...props }) {
20
- return _jsx("h5", { className: cn(cardStyles.title, className), ...props });
23
+ return _jsx(Heading, { as: "h5", className: cn(cardStyles.title, className), ...props });
21
24
  }
22
25
  function CardSubtitle({ className, ...props }) {
23
- return _jsx("h6", { className: cn(cardStyles.subtitle, className), ...props });
26
+ return _jsx(Heading, { as: "h6", className: cn(cardStyles.subtitle, className), ...props });
24
27
  }
25
28
  function CardDescription({ className, ...props }) {
26
- return _jsx("p", { className: cn(cardStyles.description, className), ...props });
29
+ return _jsx(Text, { className: cn(cardStyles.description, className), ...props });
27
30
  }
28
31
  function CardAction({ className, ...props }) {
29
- return _jsx("div", { className: cn("ml-auto", className), ...props });
32
+ return _jsx(Box, { className: cn("ml-auto", className), ...props });
30
33
  }
31
34
  function CardContent({ className, ...props }) {
32
- return _jsx("div", { className: cn(cardStyles.content, className), ...props });
35
+ return _jsx(Box, { className: cn(cardStyles.content, className), ...props });
33
36
  }
34
37
  function CardFooter({ className, ...props }) {
35
- return _jsx("div", { className: cn(cardStyles.footer, className), ...props });
38
+ return _jsx(Box, { className: cn(cardStyles.footer, className), ...props });
36
39
  }
37
40
  function CardImage({ className, alt = "", ...props }) {
38
41
  if (!alt) {
39
42
  console.warn("CardImage: Missing alt text. Images should have descriptive alt text for accessibility.");
40
43
  }
41
- return (_jsx("img", { alt: alt, className: cn(cardStyles.image, className), ...props }));
44
+ return (_jsx(Box, { as: "img", alt: alt, className: cn(cardStyles.image, className), ...props }));
42
45
  }
43
46
  function CardImageOverlay({ className, ...props }) {
44
- return _jsx("div", { className: cn(cardStyles.overlay, className), ...props });
47
+ return _jsx(Box, { className: cn(cardStyles.overlay, className), ...props });
45
48
  }
46
49
  function CardMarker({ className, position = "top-left", variant = "default", color = "default", children, ...props }) {
47
50
  const positionClasses = {
@@ -60,17 +63,17 @@ function CardMarker({ className, position = "top-left", variant = "default", col
60
63
  };
61
64
  // Base marker styles
62
65
  if (variant === "default") {
63
- return (_jsx("div", { className: cn("absolute z-10 rounded px-2 py-1 text-xs font-semibold shadow-sm", positionClasses[position], colorClasses[color], className), ...props, children: children }));
66
+ return (_jsx(Box, { className: cn("absolute z-10 rounded px-2 py-1 text-xs font-semibold shadow-sm", positionClasses[position], colorClasses[color], className), ...props, children: children }));
64
67
  }
65
68
  // Icon marker - larger, rounded, typically just an icon
66
69
  if (variant === "icon") {
67
- return (_jsx("div", { className: cn("absolute z-10 flex h-10 w-10 items-center justify-center rounded-full shadow-lg", position === "top-left" && "top-2 left-2", position === "top-right" && "top-2 right-2", position === "bottom-left" && "bottom-2 left-2", position === "bottom-right" && "bottom-2 right-2", colorClasses[color], className), ...props, children: children }));
70
+ return (_jsx(Box, { className: cn("absolute z-10 flex h-10 w-10 items-center justify-center rounded-full shadow-lg", position === "top-left" && "top-2 left-2", position === "top-right" && "top-2 right-2", position === "bottom-left" && "bottom-2 left-2", position === "bottom-right" && "bottom-2 right-2", colorClasses[color], className), ...props, children: children }));
68
71
  }
69
72
  // Ribbon marker - diagonal corner ribbon
70
73
  if (variant === "ribbon") {
71
74
  const ribbonPosition = position.startsWith("top") ? "top" : "bottom";
72
75
  const ribbonSide = position.endsWith("left") ? "left" : "right";
73
- return (_jsx("div", { className: cn("absolute z-10 px-8 py-1 text-xs font-semibold shadow-lg", ribbonPosition === "top" &&
76
+ return (_jsx(Box, { className: cn("absolute z-10 px-8 py-1 text-xs font-semibold shadow-lg", ribbonPosition === "top" &&
74
77
  ribbonSide === "left" &&
75
78
  "top-3 -left-8 -rotate-45 origin-top-left", ribbonPosition === "top" &&
76
79
  ribbonSide === "right" &&
@@ -1,2 +1,2 @@
1
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardImage, CardImageOverlay, CardMarker, type CardMarkerProps, CardSubtitle, CardTitle, type CardProps, } from "./card";
1
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardImage, CardImageOverlay, CardMarker, type CardMarkerProps, type CardProps, CardSubtitle, CardTitle, } from "./card";
2
2
  export { CardSkeleton } from "./card-skeleton";
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export interface CenterProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ asChild?: boolean;
4
+ inline?: boolean;
5
+ }
6
+ declare const Center: React.ForwardRefExoticComponent<CenterProps & React.RefAttributes<HTMLDivElement>>;
7
+ export { Center };
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import * as React from "react";
4
+ import { cn } from "../../lib/utils";
5
+ const Center = React.forwardRef(({ className, inline = false, asChild = false, ...props }, ref) => {
6
+ const Comp = asChild ? Slot : "div";
7
+ return (_jsx(Comp, { className: cn("flex items-center justify-center", inline ? "inline-flex" : "flex", className), ref: ref, ...props }));
8
+ });
9
+ Center.displayName = "Center";
10
+ export { Center };
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Center } from "./center";
3
+ declare const meta: Meta<typeof Center>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Center>;
6
+ export declare const Default: Story;
7
+ export declare const Inline: Story;
@@ -0,0 +1,25 @@
1
+ import { Center } from "./center";
2
+ const meta = {
3
+ title: "Components/Center",
4
+ component: Center,
5
+ tags: ["autodocs"],
6
+ argTypes: {
7
+ inline: {
8
+ control: "boolean",
9
+ },
10
+ },
11
+ };
12
+ export default meta;
13
+ export const Default = {
14
+ args: {
15
+ className: "h-20 bg-primary/20 rounded",
16
+ children: "Centered content",
17
+ },
18
+ };
19
+ export const Inline = {
20
+ args: {
21
+ inline: true,
22
+ className: "h-10 w-20 bg-primary/20 rounded",
23
+ children: "Inline",
24
+ },
25
+ };
@@ -0,0 +1 @@
1
+ export * from "./center";
@@ -0,0 +1 @@
1
+ export * from "./center";
@@ -7,8 +7,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { useMemo } from "react";
8
8
  import { cn } from "../../lib/utils";
9
9
  import { Chart } from "./chart";
10
- import { getDefaultChartOptions } from "./utils";
11
10
  import { useThemeAwareChart } from "./use-theme-aware-chart";
11
+ import { getDefaultChartOptions } from "./utils";
12
12
  export function AreaChart({ series, categories, colors, height = 350, width = "100%", className, title, subtitle, toolbar = false, animations = true, curve = "smooth", stacked = false, dataLabels = false, yAxisLabel, referenceLines = [], options: customOptions, }) {
13
13
  const { colors: themeColors } = useThemeAwareChart();
14
14
  const chartOptions = useMemo(() => {
@@ -7,8 +7,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { useMemo } from "react";
8
8
  import { cn } from "../../lib/utils";
9
9
  import { Chart } from "./chart";
10
- import { getDefaultChartOptions } from "./utils";
11
10
  import { useThemeAwareChart } from "./use-theme-aware-chart";
11
+ import { getDefaultChartOptions } from "./utils";
12
12
  export function BarChart({ series, categories, colors, height = 350, width = "100%", className, title, subtitle, toolbar = false, animations = true, horizontal = false, stacked = false, dataLabels = false, barWidth = 70, options: customOptions, }) {
13
13
  const { colors: themeColors } = useThemeAwareChart();
14
14
  const chartOptions = useMemo(() => {
@@ -7,8 +7,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { useMemo } from "react";
8
8
  import { cn } from "../../lib/utils";
9
9
  import { Chart } from "./chart";
10
- import { getDefaultChartOptions } from "./utils";
11
10
  import { useThemeAwareChart } from "./use-theme-aware-chart";
11
+ import { getDefaultChartOptions } from "./utils";
12
12
  export function DonutChart({ series, labels, colors, height = 350, width = "100%", className, title, subtitle, animations = true, donut = true, donutSize = 65, dataLabels = true, legend = true, options: customOptions, }) {
13
13
  const { colors: themeColors } = useThemeAwareChart();
14
14
  const chartOptions = useMemo(() => {
@@ -5,10 +5,10 @@
5
5
  export { AreaChart } from "./area-chart";
6
6
  export { BarChart } from "./bar-chart";
7
7
  export { Chart, ChartSkeleton } from "./chart";
8
+ export * from "./chart.types";
8
9
  export { DonutChart, PieChart } from "./donut-chart";
9
10
  export { LineChart } from "./line-chart";
10
11
  export { RadialBarChart } from "./radial-bar-chart";
11
- export * from "./chart.types";
12
- export * from "./utils";
13
12
  export * from "./theme-utils";
14
13
  export { useThemeAwareChart } from "./use-theme-aware-chart";
14
+ export * from "./utils";
@@ -5,10 +5,10 @@
5
5
  export { AreaChart } from "./area-chart";
6
6
  export { BarChart } from "./bar-chart";
7
7
  export { Chart, ChartSkeleton } from "./chart";
8
+ export * from "./chart.types";
8
9
  export { DonutChart, PieChart } from "./donut-chart";
9
10
  export { LineChart } from "./line-chart";
10
11
  export { RadialBarChart } from "./radial-bar-chart";
11
- export * from "./chart.types";
12
- export * from "./utils";
13
12
  export * from "./theme-utils";
14
13
  export { useThemeAwareChart } from "./use-theme-aware-chart";
14
+ export * from "./utils";
@@ -7,8 +7,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { useMemo } from "react";
8
8
  import { cn } from "../../lib/utils";
9
9
  import { Chart } from "./chart";
10
- import { getDefaultChartOptions } from "./utils";
11
10
  import { useThemeAwareChart } from "./use-theme-aware-chart";
11
+ import { getDefaultChartOptions } from "./utils";
12
12
  export function LineChart({ series, categories, colors, height = 350, width = "100%", className, title, subtitle, toolbar = false, animations = true, curve = "smooth", strokeWidth = 2, markers = true, yAxisLabel, options: customOptions, }) {
13
13
  const { colors: themeColors } = useThemeAwareChart();
14
14
  const chartOptions = useMemo(() => {
@@ -7,8 +7,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { useMemo } from "react";
8
8
  import { cn } from "../../lib/utils";
9
9
  import { Chart } from "./chart";
10
- import { getDefaultChartOptions } from "./utils";
11
10
  import { useThemeAwareChart } from "./use-theme-aware-chart";
11
+ import { getDefaultChartOptions } from "./utils";
12
12
  export function RadialBarChart({ series, labels, colors, height = 350, width = "100%", className, title, subtitle, animations = true, dataLabels = true, hollowSize = "50%", options: customOptions, }) {
13
13
  const { colors: themeColors } = useThemeAwareChart();
14
14
  const chartOptions = useMemo(() => {
@@ -66,5 +66,5 @@ export declare function createThemeAwareChart(): {
66
66
  /**
67
67
  * Get current theme
68
68
  */
69
- getTheme: () => "dark" | "light" | "neutral" | "accent";
69
+ getTheme: () => "dark" | "light" | "accent" | "neutral";
70
70
  };
@@ -8,5 +8,5 @@
8
8
  */
9
9
  export declare function useThemeAwareChart(): {
10
10
  colors: import("./theme-utils").ThemeColorScheme;
11
- theme: "dark" | "light" | "neutral" | "accent";
11
+ theme: "dark" | "light" | "accent" | "neutral";
12
12
  };