@mesob/ui 0.2.3 → 0.2.4

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 (230) hide show
  1. package/dist/components.d.ts +992 -0
  2. package/dist/components.js +8030 -0
  3. package/dist/components.js.map +1 -0
  4. package/dist/hooks.d.ts +6 -0
  5. package/dist/hooks.js +85 -0
  6. package/dist/hooks.js.map +1 -0
  7. package/dist/providers.d.ts +20 -0
  8. package/dist/providers.js +61 -0
  9. package/dist/providers.js.map +1 -0
  10. package/dist/use-entity-params-nqD69tdX.d.ts +82 -0
  11. package/package.json +14 -27
  12. package/dist/components/accordion.d.ts +0 -10
  13. package/dist/components/accordion.js +0 -74
  14. package/dist/components/accordion.js.map +0 -1
  15. package/dist/components/alert-dialog.d.ts +0 -17
  16. package/dist/components/alert-dialog.js +0 -187
  17. package/dist/components/alert-dialog.js.map +0 -1
  18. package/dist/components/alert.d.ts +0 -13
  19. package/dist/components/alert.js +0 -74
  20. package/dist/components/alert.js.map +0 -1
  21. package/dist/components/animated-tabs.d.ts +0 -26
  22. package/dist/components/animated-tabs.js +0 -290
  23. package/dist/components/animated-tabs.js.map +0 -1
  24. package/dist/components/app-breadcrumbs-context.d.ts +0 -19
  25. package/dist/components/app-breadcrumbs-context.js +0 -19
  26. package/dist/components/app-breadcrumbs-context.js.map +0 -1
  27. package/dist/components/app-breadcrumbs.d.ts +0 -25
  28. package/dist/components/app-breadcrumbs.js +0 -175
  29. package/dist/components/app-breadcrumbs.js.map +0 -1
  30. package/dist/components/app-header-actions.d.ts +0 -39
  31. package/dist/components/app-header-actions.js +0 -644
  32. package/dist/components/app-header-actions.js.map +0 -1
  33. package/dist/components/app-sidebar.d.ts +0 -24
  34. package/dist/components/app-sidebar.js +0 -667
  35. package/dist/components/app-sidebar.js.map +0 -1
  36. package/dist/components/aspect-ratio.d.ts +0 -6
  37. package/dist/components/aspect-ratio.js +0 -14
  38. package/dist/components/aspect-ratio.js.map +0 -1
  39. package/dist/components/avatar.d.ts +0 -9
  40. package/dist/components/avatar.js +0 -63
  41. package/dist/components/avatar.js.map +0 -1
  42. package/dist/components/badge.d.ts +0 -13
  43. package/dist/components/badge.js +0 -48
  44. package/dist/components/badge.js.map +0 -1
  45. package/dist/components/breadcrumb.d.ts +0 -14
  46. package/dist/components/breadcrumb.js +0 -110
  47. package/dist/components/breadcrumb.js.map +0 -1
  48. package/dist/components/button-group.d.ts +0 -17
  49. package/dist/components/button-group.js +0 -106
  50. package/dist/components/button-group.js.map +0 -1
  51. package/dist/components/button.d.ts +0 -17
  52. package/dist/components/button.js +0 -68
  53. package/dist/components/button.js.map +0 -1
  54. package/dist/components/calendar.d.ts +0 -13
  55. package/dist/components/calendar.js +0 -262
  56. package/dist/components/calendar.js.map +0 -1
  57. package/dist/components/card.d.ts +0 -12
  58. package/dist/components/card.js +0 -98
  59. package/dist/components/card.js.map +0 -1
  60. package/dist/components/carousel.d.ts +0 -24
  61. package/dist/components/carousel.js +0 -268
  62. package/dist/components/carousel.js.map +0 -1
  63. package/dist/components/chart.d.ts +0 -43
  64. package/dist/components/chart.js +0 -271
  65. package/dist/components/chart.js.map +0 -1
  66. package/dist/components/checkbox.d.ts +0 -7
  67. package/dist/components/checkbox.js +0 -41
  68. package/dist/components/checkbox.js.map +0 -1
  69. package/dist/components/collapsible.d.ts +0 -8
  70. package/dist/components/collapsible.js +0 -38
  71. package/dist/components/collapsible.js.map +0 -1
  72. package/dist/components/command.d.ts +0 -22
  73. package/dist/components/command.js +0 -281
  74. package/dist/components/command.js.map +0 -1
  75. package/dist/components/context-menu.d.ts +0 -28
  76. package/dist/components/context-menu.js +0 -233
  77. package/dist/components/context-menu.js.map +0 -1
  78. package/dist/components/data-table/index.d.ts +0 -53
  79. package/dist/components/data-table/index.js +0 -823
  80. package/dist/components/data-table/index.js.map +0 -1
  81. package/dist/components/dialog.d.ts +0 -18
  82. package/dist/components/dialog.js +0 -146
  83. package/dist/components/dialog.js.map +0 -1
  84. package/dist/components/drawer.d.ts +0 -16
  85. package/dist/components/drawer.js +0 -138
  86. package/dist/components/drawer.js.map +0 -1
  87. package/dist/components/dropdown-menu.d.ts +0 -28
  88. package/dist/components/dropdown-menu.js +0 -241
  89. package/dist/components/dropdown-menu.js.map +0 -1
  90. package/dist/components/empty.d.ts +0 -15
  91. package/dist/components/empty.js +0 -110
  92. package/dist/components/empty.js.map +0 -1
  93. package/dist/components/entity/index.d.ts +0 -236
  94. package/dist/components/entity/index.js +0 -1796
  95. package/dist/components/entity/index.js.map +0 -1
  96. package/dist/components/field.d.ts +0 -30
  97. package/dist/components/field.js +0 -279
  98. package/dist/components/field.js.map +0 -1
  99. package/dist/components/form.d.ts +0 -28
  100. package/dist/components/form.js +0 -150
  101. package/dist/components/form.js.map +0 -1
  102. package/dist/components/hover-card.d.ts +0 -9
  103. package/dist/components/hover-card.js +0 -48
  104. package/dist/components/hover-card.js.map +0 -1
  105. package/dist/components/input-group.d.ts +0 -20
  106. package/dist/components/input-group.js +0 -265
  107. package/dist/components/input-group.js.map +0 -1
  108. package/dist/components/input-otp.d.ts +0 -14
  109. package/dist/components/input-otp.js +0 -76
  110. package/dist/components/input-otp.js.map +0 -1
  111. package/dist/components/input.d.ts +0 -6
  112. package/dist/components/input.js +0 -29
  113. package/dist/components/input.js.map +0 -1
  114. package/dist/components/item.d.ts +0 -28
  115. package/dist/components/item.js +0 -220
  116. package/dist/components/item.js.map +0 -1
  117. package/dist/components/kbd.d.ts +0 -6
  118. package/dist/components/kbd.js +0 -39
  119. package/dist/components/kbd.js.map +0 -1
  120. package/dist/components/label.d.ts +0 -7
  121. package/dist/components/label.js +0 -32
  122. package/dist/components/label.js.map +0 -1
  123. package/dist/components/link.d.ts +0 -12
  124. package/dist/components/link.js +0 -51
  125. package/dist/components/link.js.map +0 -1
  126. package/dist/components/menubar.d.ts +0 -29
  127. package/dist/components/menubar.js +0 -261
  128. package/dist/components/menubar.js.map +0 -1
  129. package/dist/components/mesob-context.d.ts +0 -34
  130. package/dist/components/mesob-context.js +0 -53
  131. package/dist/components/mesob-context.js.map +0 -1
  132. package/dist/components/mesob-logo.d.ts +0 -13
  133. package/dist/components/mesob-logo.js +0 -80
  134. package/dist/components/mesob-logo.js.map +0 -1
  135. package/dist/components/navigation-menu.d.ts +0 -18
  136. package/dist/components/navigation-menu.js +0 -178
  137. package/dist/components/navigation-menu.js.map +0 -1
  138. package/dist/components/page/index.d.ts +0 -46
  139. package/dist/components/page/index.js +0 -205
  140. package/dist/components/page/index.js.map +0 -1
  141. package/dist/components/pagination.d.ts +0 -18
  142. package/dist/components/pagination.js +0 -160
  143. package/dist/components/pagination.js.map +0 -1
  144. package/dist/components/popover.d.ts +0 -10
  145. package/dist/components/popover.js +0 -54
  146. package/dist/components/popover.js.map +0 -1
  147. package/dist/components/powered-by.d.ts +0 -8
  148. package/dist/components/powered-by.js +0 -114
  149. package/dist/components/powered-by.js.map +0 -1
  150. package/dist/components/progress.d.ts +0 -7
  151. package/dist/components/progress.js +0 -41
  152. package/dist/components/progress.js.map +0 -1
  153. package/dist/components/radio-group.d.ts +0 -8
  154. package/dist/components/radio-group.js +0 -55
  155. package/dist/components/radio-group.js.map +0 -1
  156. package/dist/components/resizable.d.ts +0 -11
  157. package/dist/components/resizable.js +0 -58
  158. package/dist/components/resizable.js.map +0 -1
  159. package/dist/components/scroll-area.d.ts +0 -8
  160. package/dist/components/scroll-area.js +0 -70
  161. package/dist/components/scroll-area.js.map +0 -1
  162. package/dist/components/section/index.d.ts +0 -14
  163. package/dist/components/section/index.js +0 -147
  164. package/dist/components/section/index.js.map +0 -1
  165. package/dist/components/select.d.ts +0 -18
  166. package/dist/components/select.js +0 -181
  167. package/dist/components/select.js.map +0 -1
  168. package/dist/components/separator.d.ts +0 -7
  169. package/dist/components/separator.js +0 -36
  170. package/dist/components/separator.js.map +0 -1
  171. package/dist/components/sheet.d.ts +0 -16
  172. package/dist/components/sheet.js +0 -136
  173. package/dist/components/sheet.js.map +0 -1
  174. package/dist/components/shell.d.ts +0 -13
  175. package/dist/components/shell.js +0 -548
  176. package/dist/components/shell.js.map +0 -1
  177. package/dist/components/sidebar-context.d.ts +0 -19
  178. package/dist/components/sidebar-context.js +0 -17
  179. package/dist/components/sidebar-context.js.map +0 -1
  180. package/dist/components/sidebar.d.ts +0 -66
  181. package/dist/components/sidebar.js +0 -943
  182. package/dist/components/sidebar.js.map +0 -1
  183. package/dist/components/skeleton.d.ts +0 -5
  184. package/dist/components/skeleton.js +0 -23
  185. package/dist/components/skeleton.js.map +0 -1
  186. package/dist/components/slider.d.ts +0 -7
  187. package/dist/components/slider.js +0 -76
  188. package/dist/components/slider.js.map +0 -1
  189. package/dist/components/sonner.d.ts +0 -7
  190. package/dist/components/sonner.js +0 -43
  191. package/dist/components/sonner.js.map +0 -1
  192. package/dist/components/spinner.d.ts +0 -6
  193. package/dist/components/spinner.js +0 -28
  194. package/dist/components/spinner.js.map +0 -1
  195. package/dist/components/spotlight-search.d.ts +0 -25
  196. package/dist/components/spotlight-search.js +0 -395
  197. package/dist/components/spotlight-search.js.map +0 -1
  198. package/dist/components/switch.d.ts +0 -7
  199. package/dist/components/switch.js +0 -41
  200. package/dist/components/switch.js.map +0 -1
  201. package/dist/components/table.d.ts +0 -13
  202. package/dist/components/table.js +0 -124
  203. package/dist/components/table.js.map +0 -1
  204. package/dist/components/tabs.d.ts +0 -10
  205. package/dist/components/tabs.js +0 -77
  206. package/dist/components/tabs.js.map +0 -1
  207. package/dist/components/textarea.d.ts +0 -6
  208. package/dist/components/textarea.js +0 -26
  209. package/dist/components/textarea.js.map +0 -1
  210. package/dist/components/theme-toggle.d.ts +0 -8
  211. package/dist/components/theme-toggle.js +0 -94
  212. package/dist/components/theme-toggle.js.map +0 -1
  213. package/dist/components/toggle-group.d.ts +0 -14
  214. package/dist/components/toggle-group.js +0 -102
  215. package/dist/components/toggle-group.js.map +0 -1
  216. package/dist/components/toggle.d.ts +0 -13
  217. package/dist/components/toggle.js +0 -53
  218. package/dist/components/toggle.js.map +0 -1
  219. package/dist/components/tooltip.d.ts +0 -10
  220. package/dist/components/tooltip.js +0 -66
  221. package/dist/components/tooltip.js.map +0 -1
  222. package/dist/hooks/use-mobile.d.ts +0 -3
  223. package/dist/hooks/use-mobile.js +0 -22
  224. package/dist/hooks/use-mobile.js.map +0 -1
  225. package/dist/hooks/use-router.d.ts +0 -7
  226. package/dist/hooks/use-router.js +0 -36
  227. package/dist/hooks/use-router.js.map +0 -1
  228. package/dist/hooks/use-translation.d.ts +0 -5
  229. package/dist/hooks/use-translation.js +0 -42
  230. package/dist/hooks/use-translation.js.map +0 -1
@@ -1,68 +0,0 @@
1
- // src/lib/utils.ts
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
- function cn(...inputs) {
5
- return twMerge(clsx(inputs));
6
- }
7
-
8
- // src/components/button.tsx
9
- import { Slot } from "@radix-ui/react-slot";
10
- import { cva } from "class-variance-authority";
11
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
- var buttonVariants = cva(
13
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
14
- {
15
- variants: {
16
- variant: {
17
- default: "bg-primary text-primary-foreground hover:bg-primary-600 dark:hover:bg-primary-400",
18
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
19
- outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
20
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary-600 dark:hover:bg-secondary-400",
21
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
22
- link: "text-primary underline-offset-4 hover:text-primary-600 dark:hover:text-primary-400 hover:underline"
23
- },
24
- size: {
25
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
26
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
27
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
28
- icon: "size-9",
29
- "icon-sm": "size-8",
30
- "icon-lg": "size-10"
31
- }
32
- },
33
- defaultVariants: {
34
- variant: "default",
35
- size: "default"
36
- }
37
- }
38
- );
39
- function Button({
40
- className,
41
- variant,
42
- size,
43
- asChild = false,
44
- leftIcon,
45
- rightIcon,
46
- children,
47
- ...props
48
- }) {
49
- const Comp = asChild ? Slot : "button";
50
- return /* @__PURE__ */ jsx(
51
- Comp,
52
- {
53
- "data-slot": "button",
54
- className: cn(buttonVariants({ variant, size, className })),
55
- ...props,
56
- children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
57
- leftIcon,
58
- children,
59
- rightIcon
60
- ] })
61
- }
62
- );
63
- }
64
- export {
65
- Button,
66
- buttonVariants
67
- };
68
- //# sourceMappingURL=button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/button.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { cn } from '@mesob/ui/lib/utils';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type * as React from 'react';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground hover:bg-primary-600 dark:hover:bg-primary-400',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n outline:\n 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary-600 dark:hover:bg-secondary-400',\n ghost:\n 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:text-primary-600 dark:hover:text-primary-400 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n 'icon-sm': 'size-8',\n 'icon-lg': 'size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\ntype ButtonProps = React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n };\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n leftIcon,\n rightIcon,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {leftIcon}\n {children}\n {rightIcon}\n </>\n )}\n </Comp>\n );\n}\n\nexport { Button, buttonVariants };\n"],"mappings":";AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACJA,SAAS,YAAY;AACrB,SAAS,WAA8B;AAwDnC,SAQI,UARJ,KAQI,YARJ;AArDJ,IAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OACE;AAAA,QACF,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,QACX,WAAW;AAAA,MACb;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AASA,SAAS,OAAO;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAgB;AACd,QAAM,OAAO,UAAU,OAAO;AAE9B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,eAAe,EAAE,SAAS,MAAM,UAAU,CAAC,CAAC;AAAA,MACzD,GAAG;AAAA,MAEH,oBACC,WAEA,iCACG;AAAA;AAAA,QACA;AAAA,QACA;AAAA,SACH;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
@@ -1,13 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { Button } from './button.js';
3
- import * as React from 'react';
4
- import { DayPicker, DayButton } from 'react-day-picker';
5
- import 'class-variance-authority/types';
6
- import 'class-variance-authority';
7
-
8
- declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
9
- buttonVariant?: React.ComponentProps<typeof Button>['variant'];
10
- }): react_jsx_runtime.JSX.Element;
11
- declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): react_jsx_runtime.JSX.Element;
12
-
13
- export { Calendar, CalendarDayButton };
@@ -1,262 +0,0 @@
1
- "use client";
2
-
3
- // src/lib/utils.ts
4
- import { clsx } from "clsx";
5
- import { twMerge } from "tailwind-merge";
6
- function cn(...inputs) {
7
- return twMerge(clsx(inputs));
8
- }
9
-
10
- // src/components/button.tsx
11
- import { Slot } from "@radix-ui/react-slot";
12
- import { cva } from "class-variance-authority";
13
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
- var buttonVariants = cva(
15
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
16
- {
17
- variants: {
18
- variant: {
19
- default: "bg-primary text-primary-foreground hover:bg-primary-600 dark:hover:bg-primary-400",
20
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
21
- outline: "border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
22
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary-600 dark:hover:bg-secondary-400",
23
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
24
- link: "text-primary underline-offset-4 hover:text-primary-600 dark:hover:text-primary-400 hover:underline"
25
- },
26
- size: {
27
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
28
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
29
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
30
- icon: "size-9",
31
- "icon-sm": "size-8",
32
- "icon-lg": "size-10"
33
- }
34
- },
35
- defaultVariants: {
36
- variant: "default",
37
- size: "default"
38
- }
39
- }
40
- );
41
- function Button({
42
- className,
43
- variant,
44
- size,
45
- asChild = false,
46
- leftIcon,
47
- rightIcon,
48
- children,
49
- ...props
50
- }) {
51
- const Comp = asChild ? Slot : "button";
52
- return /* @__PURE__ */ jsx(
53
- Comp,
54
- {
55
- "data-slot": "button",
56
- className: cn(buttonVariants({ variant, size, className })),
57
- ...props,
58
- children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
59
- leftIcon,
60
- children,
61
- rightIcon
62
- ] })
63
- }
64
- );
65
- }
66
-
67
- // src/components/calendar.tsx
68
- import {
69
- IconChevronDown,
70
- IconChevronLeft,
71
- IconChevronRight
72
- } from "@tabler/icons-react";
73
- import * as React from "react";
74
- import {
75
- DayPicker,
76
- getDefaultClassNames
77
- } from "react-day-picker";
78
- import { jsx as jsx2 } from "react/jsx-runtime";
79
- function Calendar({
80
- className,
81
- classNames,
82
- showOutsideDays = true,
83
- captionLayout = "label",
84
- buttonVariant = "ghost",
85
- formatters,
86
- components,
87
- ...props
88
- }) {
89
- const defaultClassNames = getDefaultClassNames();
90
- return /* @__PURE__ */ jsx2(
91
- DayPicker,
92
- {
93
- showOutsideDays,
94
- className: cn(
95
- "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
96
- String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
97
- String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
98
- className
99
- ),
100
- captionLayout,
101
- formatters: {
102
- formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
103
- ...formatters
104
- },
105
- classNames: {
106
- root: cn("w-fit", defaultClassNames.root),
107
- months: cn(
108
- "flex gap-4 flex-col md:flex-row relative",
109
- defaultClassNames.months
110
- ),
111
- month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
112
- nav: cn(
113
- "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
114
- defaultClassNames.nav
115
- ),
116
- button_previous: cn(
117
- buttonVariants({ variant: buttonVariant }),
118
- "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
119
- defaultClassNames.button_previous
120
- ),
121
- button_next: cn(
122
- buttonVariants({ variant: buttonVariant }),
123
- "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
124
- defaultClassNames.button_next
125
- ),
126
- month_caption: cn(
127
- "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
128
- defaultClassNames.month_caption
129
- ),
130
- dropdowns: cn(
131
- "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
132
- defaultClassNames.dropdowns
133
- ),
134
- dropdown_root: cn(
135
- "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
136
- defaultClassNames.dropdown_root
137
- ),
138
- dropdown: cn(
139
- "absolute bg-popover inset-0 opacity-0",
140
- defaultClassNames.dropdown
141
- ),
142
- caption_label: cn(
143
- "select-none font-medium",
144
- captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
145
- defaultClassNames.caption_label
146
- ),
147
- table: "w-full border-collapse",
148
- weekdays: cn("flex", defaultClassNames.weekdays),
149
- weekday: cn(
150
- "text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
151
- defaultClassNames.weekday
152
- ),
153
- week: cn("flex w-full mt-2", defaultClassNames.week),
154
- week_number_header: cn(
155
- "select-none w-(--cell-size)",
156
- defaultClassNames.week_number_header
157
- ),
158
- week_number: cn(
159
- "text-[0.8rem] select-none text-muted-foreground",
160
- defaultClassNames.week_number
161
- ),
162
- day: cn(
163
- "relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
164
- props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md" : "[&:first-child[data-selected=true]_button]:rounded-l-md",
165
- defaultClassNames.day
166
- ),
167
- range_start: cn(
168
- "rounded-l-md bg-accent",
169
- defaultClassNames.range_start
170
- ),
171
- range_middle: cn("rounded-none", defaultClassNames.range_middle),
172
- range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
173
- today: cn(
174
- "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
175
- defaultClassNames.today
176
- ),
177
- outside: cn(
178
- "text-muted-foreground aria-selected:text-muted-foreground",
179
- defaultClassNames.outside
180
- ),
181
- disabled: cn(
182
- "text-muted-foreground opacity-50",
183
- defaultClassNames.disabled
184
- ),
185
- hidden: cn("invisible", defaultClassNames.hidden),
186
- ...classNames
187
- },
188
- components: {
189
- Root: ({ className: className2, rootRef, ...props2 }) => {
190
- return /* @__PURE__ */ jsx2(
191
- "div",
192
- {
193
- "data-slot": "calendar",
194
- ref: rootRef,
195
- className: cn(className2),
196
- ...props2
197
- }
198
- );
199
- },
200
- Chevron: ({ className: className2, orientation, ...props2 }) => {
201
- if (orientation === "left") {
202
- return /* @__PURE__ */ jsx2(IconChevronLeft, { className: cn("size-4", className2), ...props2 });
203
- }
204
- if (orientation === "right") {
205
- return /* @__PURE__ */ jsx2(
206
- IconChevronRight,
207
- {
208
- className: cn("size-4", className2),
209
- ...props2
210
- }
211
- );
212
- }
213
- return /* @__PURE__ */ jsx2(IconChevronDown, { className: cn("size-4", className2), ...props2 });
214
- },
215
- DayButton: CalendarDayButton,
216
- WeekNumber: ({ children, ...props2 }) => {
217
- return /* @__PURE__ */ jsx2("td", { ...props2, children: /* @__PURE__ */ jsx2("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
218
- },
219
- ...components
220
- },
221
- ...props
222
- }
223
- );
224
- }
225
- function CalendarDayButton({
226
- className,
227
- day,
228
- modifiers,
229
- ...props
230
- }) {
231
- const defaultClassNames = getDefaultClassNames();
232
- const ref = React.useRef(null);
233
- React.useEffect(() => {
234
- if (modifiers.focused) {
235
- ref.current?.focus();
236
- }
237
- }, [modifiers.focused]);
238
- return /* @__PURE__ */ jsx2(
239
- Button,
240
- {
241
- ref,
242
- variant: "ghost",
243
- size: "icon",
244
- "data-day": day.date.toLocaleDateString(),
245
- "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
246
- "data-range-start": modifiers.range_start,
247
- "data-range-end": modifiers.range_end,
248
- "data-range-middle": modifiers.range_middle,
249
- className: cn(
250
- "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
251
- defaultClassNames.day,
252
- className
253
- ),
254
- ...props
255
- }
256
- );
257
- }
258
- export {
259
- Calendar,
260
- CalendarDayButton
261
- };
262
- //# sourceMappingURL=calendar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/button.tsx","../../src/components/calendar.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { cn } from '@mesob/ui/lib/utils';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type * as React from 'react';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground hover:bg-primary-600 dark:hover:bg-primary-400',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n outline:\n 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary-600 dark:hover:bg-secondary-400',\n ghost:\n 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:text-primary-600 dark:hover:text-primary-400 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n 'icon-sm': 'size-8',\n 'icon-lg': 'size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\ntype ButtonProps = React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n };\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n leftIcon,\n rightIcon,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {leftIcon}\n {children}\n {rightIcon}\n </>\n )}\n </Comp>\n );\n}\n\nexport { Button, buttonVariants };\n","'use client';\n\nimport { Button, buttonVariants } from '@mesob/ui/components/button';\nimport { cn } from '@mesob/ui/lib/utils';\nimport {\n IconChevronDown,\n IconChevronLeft,\n IconChevronRight,\n} from '@tabler/icons-react';\nimport * as React from 'react';\nimport {\n type DayButton,\n DayPicker,\n getDefaultClassNames,\n} from 'react-day-picker';\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n}) {\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\n 'bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n captionLayout={captionLayout}\n formatters={{\n formatMonthDropdown: (date) =>\n date.toLocaleString('default', { month: 'short' }),\n ...formatters,\n }}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn(\n 'flex gap-4 flex-col md:flex-row relative',\n defaultClassNames.months,\n ),\n month: cn('flex flex-col w-full gap-4', defaultClassNames.month),\n nav: cn(\n 'flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between',\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant }),\n 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n 'flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)',\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n 'w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5',\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn(\n 'relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md',\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn(\n 'absolute bg-popover inset-0 opacity-0',\n defaultClassNames.dropdown,\n ),\n caption_label: cn(\n 'select-none font-medium',\n captionLayout === 'label'\n ? 'text-sm'\n : 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5',\n defaultClassNames.caption_label,\n ),\n table: 'w-full border-collapse',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none',\n defaultClassNames.weekday,\n ),\n week: cn('flex w-full mt-2', defaultClassNames.week),\n week_number_header: cn(\n 'select-none w-(--cell-size)',\n defaultClassNames.week_number_header,\n ),\n week_number: cn(\n 'text-[0.8rem] select-none text-muted-foreground',\n defaultClassNames.week_number,\n ),\n day: cn(\n 'relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none',\n props.showWeekNumber\n ? '[&:nth-child(2)[data-selected=true]_button]:rounded-l-md'\n : '[&:first-child[data-selected=true]_button]:rounded-l-md',\n defaultClassNames.day,\n ),\n range_start: cn(\n 'rounded-l-md bg-accent',\n defaultClassNames.range_start,\n ),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('rounded-r-md bg-accent', defaultClassNames.range_end),\n today: cn(\n 'bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none',\n defaultClassNames.today,\n ),\n outside: cn(\n 'text-muted-foreground aria-selected:text-muted-foreground',\n defaultClassNames.outside,\n ),\n disabled: cn(\n 'text-muted-foreground opacity-50',\n defaultClassNames.disabled,\n ),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className, rootRef, ...props }) => {\n return (\n <div\n data-slot=\"calendar\"\n ref={rootRef}\n className={cn(className)}\n {...props}\n />\n );\n },\n Chevron: ({ className, orientation, ...props }) => {\n if (orientation === 'left') {\n return (\n <IconChevronLeft className={cn('size-4', className)} {...props} />\n );\n }\n\n if (orientation === 'right') {\n return (\n <IconChevronRight\n className={cn('size-4', className)}\n {...props}\n />\n );\n }\n\n return (\n <IconChevronDown className={cn('size-4', className)} {...props} />\n );\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...props }) => {\n return (\n <td {...props}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n {...props}\n />\n );\n}\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) {\n ref.current?.focus();\n }\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n variant=\"ghost\"\n size=\"icon\"\n data-day={day.date.toLocaleDateString()}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-range-start={modifiers.range_start}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n className={cn(\n 'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Calendar, CalendarDayButton };\n"],"mappings":"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","names":["jsx","className","props"]}
@@ -1,12 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
-
4
- declare function Card({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
5
- declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
6
- declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
7
- declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
8
- declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
9
- declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
10
- declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
11
-
12
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -1,98 +0,0 @@
1
- // src/lib/utils.ts
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
- function cn(...inputs) {
5
- return twMerge(clsx(inputs));
6
- }
7
-
8
- // src/components/card.tsx
9
- import { jsx } from "react/jsx-runtime";
10
- function Card({ className, ...props }) {
11
- return /* @__PURE__ */ jsx(
12
- "div",
13
- {
14
- "data-slot": "card",
15
- className: cn(
16
- "bg-card text-card-foreground border-border flex flex-col gap-6 rounded-xl border py-6",
17
- className
18
- ),
19
- ...props
20
- }
21
- );
22
- }
23
- function CardHeader({ className, ...props }) {
24
- return /* @__PURE__ */ jsx(
25
- "div",
26
- {
27
- "data-slot": "card-header",
28
- className: cn(
29
- "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
30
- className
31
- ),
32
- ...props
33
- }
34
- );
35
- }
36
- function CardTitle({ className, ...props }) {
37
- return /* @__PURE__ */ jsx(
38
- "div",
39
- {
40
- "data-slot": "card-title",
41
- className: cn("leading-none font-semibold", className),
42
- ...props
43
- }
44
- );
45
- }
46
- function CardDescription({ className, ...props }) {
47
- return /* @__PURE__ */ jsx(
48
- "div",
49
- {
50
- "data-slot": "card-description",
51
- className: cn("text-muted-foreground text-sm", className),
52
- ...props
53
- }
54
- );
55
- }
56
- function CardAction({ className, ...props }) {
57
- return /* @__PURE__ */ jsx(
58
- "div",
59
- {
60
- "data-slot": "card-action",
61
- className: cn(
62
- "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
63
- className
64
- ),
65
- ...props
66
- }
67
- );
68
- }
69
- function CardContent({ className, ...props }) {
70
- return /* @__PURE__ */ jsx(
71
- "div",
72
- {
73
- "data-slot": "card-content",
74
- className: cn("px-6", className),
75
- ...props
76
- }
77
- );
78
- }
79
- function CardFooter({ className, ...props }) {
80
- return /* @__PURE__ */ jsx(
81
- "div",
82
- {
83
- "data-slot": "card-footer",
84
- className: cn("flex items-center px-6 [.border-t]:pt-6", className),
85
- ...props
86
- }
87
- );
88
- }
89
- export {
90
- Card,
91
- CardAction,
92
- CardContent,
93
- CardDescription,
94
- CardFooter,
95
- CardHeader,
96
- CardTitle
97
- };
98
- //# sourceMappingURL=card.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/utils.ts","../../src/components/card.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import { cn } from '@mesob/ui/lib/utils';\nimport type * as React from 'react';\n\nfunction Card({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n 'bg-card text-card-foreground border-border flex flex-col gap-6 rounded-xl border py-6',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n '@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('leading-none font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n 'col-start-2 row-span-2 row-start-1 self-start justify-self-end',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn('px-6', className)}\n {...props}\n />\n );\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('flex items-center px-6 [.border-t]:pt-6', className)}\n {...props}\n />\n );\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n};\n"],"mappings":";AAAA,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACAI;AAFJ,SAAS,KAAK,EAAE,WAAW,GAAG,MAAM,GAAgC;AAClE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAAgC;AACvE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,8BAA8B,SAAS;AAAA,MACpD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,gBAAgB,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC7E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,iCAAiC,SAAS;AAAA,MACvD,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAgC;AACzE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,QAAQ,SAAS;AAAA,MAC9B,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,2CAA2C,SAAS;AAAA,MACjE,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -1,24 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { Button } from './button.js';
3
- import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react';
4
- import * as React from 'react';
5
- import 'class-variance-authority/types';
6
- import 'class-variance-authority';
7
-
8
- type CarouselApi = UseEmblaCarouselType[1];
9
- type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
10
- type CarouselOptions = UseCarouselParameters[0];
11
- type CarouselPlugin = UseCarouselParameters[1];
12
- type CarouselProps = {
13
- opts?: CarouselOptions;
14
- plugins?: CarouselPlugin;
15
- orientation?: 'horizontal' | 'vertical';
16
- setApi?: (api: CarouselApi) => void;
17
- };
18
- declare function Carousel({ orientation, opts, setApi, plugins, className, children, ...props }: React.ComponentProps<'div'> & CarouselProps): react_jsx_runtime.JSX.Element;
19
- declare function CarouselContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
20
- declare function CarouselItem({ className, ...props }: React.ComponentProps<'fieldset'>): react_jsx_runtime.JSX.Element;
21
- declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
22
- declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
23
-
24
- export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };