@codefast/ui 0.3.11 → 0.3.12-canary.1

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 (249) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +4 -0
  3. package/dist/components/accordion.d.ts +11 -29
  4. package/dist/components/accordion.d.ts.map +1 -0
  5. package/dist/components/accordion.js +11 -38
  6. package/dist/components/alert-dialog.d.ts +25 -60
  7. package/dist/components/alert-dialog.d.ts.map +1 -0
  8. package/dist/components/alert-dialog.js +17 -70
  9. package/dist/components/alert.d.ts +16 -27
  10. package/dist/components/alert.d.ts.map +1 -0
  11. package/dist/components/alert.js +33 -31
  12. package/dist/components/aspect-ratio.d.ts +5 -8
  13. package/dist/components/aspect-ratio.d.ts.map +1 -0
  14. package/dist/components/aspect-ratio.js +5 -7
  15. package/dist/components/avatar.d.ts +7 -17
  16. package/dist/components/avatar.d.ts.map +1 -0
  17. package/dist/components/avatar.js +8 -19
  18. package/dist/components/badge.d.ts +15 -21
  19. package/dist/components/badge.d.ts.map +1 -0
  20. package/dist/components/badge.js +53 -21
  21. package/dist/components/breadcrumb.d.ts +13 -35
  22. package/dist/components/breadcrumb.d.ts.map +1 -0
  23. package/dist/components/breadcrumb.js +14 -50
  24. package/dist/components/button-group.d.ts +15 -29
  25. package/dist/components/button-group.d.ts.map +1 -0
  26. package/dist/components/button-group.js +37 -28
  27. package/dist/components/button.d.ts +26 -35
  28. package/dist/components/button.d.ts.map +1 -0
  29. package/dist/components/button.js +87 -52
  30. package/dist/components/calendar.d.ts +10 -24
  31. package/dist/components/calendar.d.ts.map +1 -0
  32. package/dist/components/calendar.js +88 -93
  33. package/dist/components/card.d.ts +11 -34
  34. package/dist/components/card.d.ts.map +1 -0
  35. package/dist/components/card.js +12 -40
  36. package/dist/components/carousel.d.ts +25 -55
  37. package/dist/components/carousel.d.ts.map +1 -0
  38. package/dist/components/carousel.js +83 -115
  39. package/dist/components/chart.d.ts +37 -72
  40. package/dist/components/chart.d.ts.map +1 -0
  41. package/dist/components/chart.js +162 -151
  42. package/dist/components/checkbox-cards.d.ts +9 -15
  43. package/dist/components/checkbox-cards.d.ts.map +1 -0
  44. package/dist/components/checkbox-cards.js +9 -23
  45. package/dist/components/checkbox-group.d.ts +9 -16
  46. package/dist/components/checkbox-group.d.ts.map +1 -0
  47. package/dist/components/checkbox-group.js +8 -20
  48. package/dist/components/checkbox.d.ts +5 -9
  49. package/dist/components/checkbox.d.ts.map +1 -0
  50. package/dist/components/checkbox.js +7 -15
  51. package/dist/components/collapsible.d.ts +7 -14
  52. package/dist/components/collapsible.d.ts.map +1 -0
  53. package/dist/components/collapsible.js +7 -15
  54. package/dist/components/command.d.ts +24 -55
  55. package/dist/components/command.d.ts.map +1 -0
  56. package/dist/components/command.js +19 -70
  57. package/dist/components/context-menu.d.ts +23 -72
  58. package/dist/components/context-menu.d.ts.map +1 -0
  59. package/dist/components/context-menu.js +22 -90
  60. package/dist/components/dialog.d.ts +23 -53
  61. package/dist/components/dialog.d.ts.map +1 -0
  62. package/dist/components/dialog.js +21 -73
  63. package/dist/components/drawer.d.ts +29 -60
  64. package/dist/components/drawer.d.ts.map +1 -0
  65. package/dist/components/drawer.js +17 -59
  66. package/dist/components/dropdown-menu.d.ts +23 -73
  67. package/dist/components/dropdown-menu.d.ts.map +1 -0
  68. package/dist/components/dropdown-menu.js +22 -97
  69. package/dist/components/empty.d.ts +16 -37
  70. package/dist/components/empty.d.ts.map +1 -0
  71. package/dist/components/empty.js +33 -45
  72. package/dist/components/field.d.ts +26 -63
  73. package/dist/components/field.d.ts.map +1 -0
  74. package/dist/components/field.js +61 -90
  75. package/dist/components/form.d.ts +16 -37
  76. package/dist/components/form.d.ts.map +1 -0
  77. package/dist/components/form.js +51 -67
  78. package/dist/components/hover-card.d.ts +8 -21
  79. package/dist/components/hover-card.d.ts.map +1 -0
  80. package/dist/components/hover-card.js +9 -24
  81. package/dist/components/input-group.d.ts +29 -53
  82. package/dist/components/input-group.d.ts.map +1 -0
  83. package/dist/components/input-group.js +110 -67
  84. package/dist/components/input-number.d.ts +8 -28
  85. package/dist/components/input-number.d.ts.map +1 -0
  86. package/dist/components/input-number.js +15 -56
  87. package/dist/components/input-otp.d.ts +11 -24
  88. package/dist/components/input-otp.d.ts.map +1 -0
  89. package/dist/components/input-otp.js +14 -35
  90. package/dist/components/input-password.d.ts +6 -12
  91. package/dist/components/input-password.d.ts.map +1 -0
  92. package/dist/components/input-password.js +11 -31
  93. package/dist/components/input-search.d.ts +9 -18
  94. package/dist/components/input-search.d.ts.map +1 -0
  95. package/dist/components/input-search.js +17 -44
  96. package/dist/components/input.d.ts +5 -10
  97. package/dist/components/input.d.ts.map +1 -0
  98. package/dist/components/input.js +6 -10
  99. package/dist/components/item.d.ts +33 -69
  100. package/dist/components/item.d.ts.map +1 -0
  101. package/dist/components/item.js +69 -91
  102. package/dist/components/kbd.d.ts +6 -13
  103. package/dist/components/kbd.d.ts.map +1 -0
  104. package/dist/components/kbd.js +7 -14
  105. package/dist/components/label.d.ts +5 -9
  106. package/dist/components/label.d.ts.map +1 -0
  107. package/dist/components/label.js +6 -9
  108. package/dist/components/menubar.d.ts +24 -80
  109. package/dist/components/menubar.d.ts.map +1 -0
  110. package/dist/components/menubar.js +24 -100
  111. package/dist/components/native-select.d.ts +7 -16
  112. package/dist/components/native-select.d.ts.map +1 -0
  113. package/dist/components/native-select.js +8 -26
  114. package/dist/components/navigation-menu.d.ts +13 -36
  115. package/dist/components/navigation-menu.d.ts.map +1 -0
  116. package/dist/components/navigation-menu.js +26 -62
  117. package/dist/components/pagination.d.ts +15 -35
  118. package/dist/components/pagination.d.ts.map +1 -0
  119. package/dist/components/pagination.js +14 -56
  120. package/dist/components/popover.d.ts +9 -24
  121. package/dist/components/popover.d.ts.map +1 -0
  122. package/dist/components/popover.js +10 -28
  123. package/dist/components/progress-circle.d.ts +89 -106
  124. package/dist/components/progress-circle.d.ts.map +1 -0
  125. package/dist/components/progress-circle.js +71 -104
  126. package/dist/components/progress.d.ts +5 -10
  127. package/dist/components/progress.d.ts.map +1 -0
  128. package/dist/components/progress.js +8 -14
  129. package/dist/components/radio-cards.d.ts +5 -10
  130. package/dist/components/radio-cards.d.ts.map +1 -0
  131. package/dist/components/radio-cards.js +8 -22
  132. package/dist/components/radio-group.d.ts +6 -13
  133. package/dist/components/radio-group.d.ts.map +1 -0
  134. package/dist/components/radio-group.js +7 -18
  135. package/dist/components/radio.d.ts +6 -12
  136. package/dist/components/radio.d.ts.map +1 -0
  137. package/dist/components/radio.js +6 -11
  138. package/dist/components/resizable.d.ts +8 -18
  139. package/dist/components/resizable.d.ts.map +1 -0
  140. package/dist/components/resizable.js +8 -22
  141. package/dist/components/scroll-area.d.ts +21 -33
  142. package/dist/components/scroll-area.d.ts.map +1 -0
  143. package/dist/components/scroll-area.js +65 -85
  144. package/dist/components/select.d.ts +17 -50
  145. package/dist/components/select.d.ts.map +1 -0
  146. package/dist/components/select.js +27 -79
  147. package/dist/components/separator.d.ts +20 -29
  148. package/dist/components/separator.d.ts.map +1 -0
  149. package/dist/components/separator.js +28 -37
  150. package/dist/components/sheet.d.ts +30 -62
  151. package/dist/components/sheet.d.ts.map +1 -0
  152. package/dist/components/sheet.js +68 -81
  153. package/dist/components/sidebar.d.ts +67 -160
  154. package/dist/components/sidebar.d.ts.map +1 -0
  155. package/dist/components/sidebar.js +184 -302
  156. package/dist/components/skeleton.d.ts +5 -9
  157. package/dist/components/skeleton.d.ts.map +1 -0
  158. package/dist/components/skeleton.js +6 -9
  159. package/dist/components/slider.d.ts +5 -13
  160. package/dist/components/slider.d.ts.map +1 -0
  161. package/dist/components/slider.js +13 -35
  162. package/dist/components/sonner.d.ts +8 -10
  163. package/dist/components/sonner.d.ts.map +1 -0
  164. package/dist/components/sonner.js +14 -16
  165. package/dist/components/spinner.d.ts +6 -12
  166. package/dist/components/spinner.d.ts.map +1 -0
  167. package/dist/components/spinner.js +21 -34
  168. package/dist/components/switch.d.ts +5 -9
  169. package/dist/components/switch.d.ts.map +1 -0
  170. package/dist/components/switch.js +6 -13
  171. package/dist/components/table.d.ts +12 -37
  172. package/dist/components/table.d.ts.map +1 -0
  173. package/dist/components/table.js +13 -48
  174. package/dist/components/tabs.d.ts +8 -21
  175. package/dist/components/tabs.d.ts.map +1 -0
  176. package/dist/components/tabs.js +9 -24
  177. package/dist/components/textarea.d.ts +5 -9
  178. package/dist/components/textarea.d.ts.map +1 -0
  179. package/dist/components/textarea.js +6 -9
  180. package/dist/components/toggle-group.d.ts +10 -24
  181. package/dist/components/toggle-group.d.ts.map +1 -0
  182. package/dist/components/toggle-group.js +21 -39
  183. package/dist/components/toggle.d.ts +18 -25
  184. package/dist/components/toggle.d.ts.map +1 -0
  185. package/dist/components/toggle.js +42 -30
  186. package/dist/components/tooltip.d.ts +9 -24
  187. package/dist/components/tooltip.d.ts.map +1 -0
  188. package/dist/components/tooltip.js +10 -29
  189. package/dist/hooks/use-animated-value.d.ts +2 -4
  190. package/dist/hooks/use-animated-value.d.ts.map +1 -0
  191. package/dist/hooks/use-animated-value.js +67 -58
  192. package/dist/hooks/use-copy-to-clipboard.d.ts +6 -11
  193. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  194. package/dist/hooks/use-copy-to-clipboard.js +42 -39
  195. package/dist/hooks/use-is-mobile.d.ts +2 -4
  196. package/dist/hooks/use-is-mobile.d.ts.map +1 -0
  197. package/dist/hooks/use-is-mobile.js +20 -23
  198. package/dist/hooks/use-media-query.d.ts +2 -4
  199. package/dist/hooks/use-media-query.d.ts.map +1 -0
  200. package/dist/hooks/use-media-query.js +49 -46
  201. package/dist/hooks/use-mutation-observer.d.ts +3 -6
  202. package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
  203. package/dist/hooks/use-mutation-observer.js +33 -34
  204. package/dist/hooks/use-pagination.d.ts +15 -22
  205. package/dist/hooks/use-pagination.d.ts.map +1 -0
  206. package/dist/hooks/use-pagination.js +99 -99
  207. package/dist/index.d.ts +131 -69
  208. package/dist/index.d.ts.map +1 -0
  209. package/dist/index.js +68 -69
  210. package/dist/lib/utils.d.ts +10 -0
  211. package/dist/lib/utils.d.ts.map +1 -0
  212. package/dist/lib/utils.js +10 -0
  213. package/dist/primitives/checkbox-group.d.ts +84 -105
  214. package/dist/primitives/checkbox-group.d.ts.map +1 -0
  215. package/dist/primitives/checkbox-group.js +91 -105
  216. package/dist/primitives/input-number.d.ts +41 -51
  217. package/dist/primitives/input-number.d.ts.map +1 -0
  218. package/dist/primitives/input-number.js +417 -473
  219. package/dist/primitives/input.d.ts +43 -48
  220. package/dist/primitives/input.d.ts.map +1 -0
  221. package/dist/primitives/input.js +67 -66
  222. package/dist/primitives/progress-circle.d.ts +49 -79
  223. package/dist/primitives/progress-circle.d.ts.map +1 -0
  224. package/dist/primitives/progress-circle.js +134 -149
  225. package/package.json +33 -16
  226. package/{dist → src}/css/preset.css +86 -9
  227. /package/{dist → src}/css/amber.css +0 -0
  228. /package/{dist → src}/css/blue.css +0 -0
  229. /package/{dist → src}/css/cyan.css +0 -0
  230. /package/{dist → src}/css/emerald.css +0 -0
  231. /package/{dist → src}/css/fuchsia.css +0 -0
  232. /package/{dist → src}/css/gray.css +0 -0
  233. /package/{dist → src}/css/green.css +0 -0
  234. /package/{dist → src}/css/indigo.css +0 -0
  235. /package/{dist → src}/css/lime.css +0 -0
  236. /package/{dist → src}/css/neutral.css +0 -0
  237. /package/{dist → src}/css/orange.css +0 -0
  238. /package/{dist → src}/css/pink.css +0 -0
  239. /package/{dist → src}/css/purple.css +0 -0
  240. /package/{dist → src}/css/red.css +0 -0
  241. /package/{dist → src}/css/rose.css +0 -0
  242. /package/{dist → src}/css/sky.css +0 -0
  243. /package/{dist → src}/css/slate.css +0 -0
  244. /package/{dist → src}/css/stone.css +0 -0
  245. /package/{dist → src}/css/style.css +0 -0
  246. /package/{dist → src}/css/teal.css +0 -0
  247. /package/{dist → src}/css/violet.css +0 -0
  248. /package/{dist → src}/css/yellow.css +0 -0
  249. /package/{dist → src}/css/zinc.css +0 -0
@@ -1,34 +1,16 @@
1
- import { cn } from "@codefast/tailwind-variants";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "#lib/utils";
2
3
  import { ChevronDownIcon } from "lucide-react";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- //#region src/components/native-select.tsx
5
4
  function NativeSelect({ className, ...props }) {
6
- return /* @__PURE__ */ jsxs("div", {
7
- className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
8
- "data-slot": "native-select-wrapper",
9
- children: [/* @__PURE__ */ jsx("select", {
10
- className: cn("h-9 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className),
11
- "data-slot": "native-select",
12
- ...props
13
- }), /* @__PURE__ */ jsx(ChevronDownIcon, {
14
- "aria-hidden": "true",
15
- className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none",
16
- "data-slot": "native-select-icon"
17
- })]
18
- });
5
+ return (_jsxs("div", { className: cn("group/native-select relative", "w-fit", "has-[select:disabled]:opacity-50"), "data-slot": "native-select-wrapper", children: [_jsx("select", { className: cn("h-9 w-full min-w-0 px-3 py-2 pr-9", "rounded-lg border border-input", "bg-transparent shadow-xs outline-none", "text-sm", "appearance-none transition-[color,box-shadow]", "selection:bg-primary selection:text-primary-foreground", "placeholder:text-muted-foreground", "disabled:pointer-events-none disabled:cursor-not-allowed", "dark:bg-input/30", "dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20", "dark:aria-invalid:ring-destructive/40", className), "data-slot": "native-select", ...props }), _jsx(ChevronDownIcon, { "aria-hidden": "true", className: cn("absolute top-1/2 right-3.5", "size-4 text-muted-foreground", "-translate-y-1/2 opacity-50", "pointer-events-none select-none"), "data-slot": "native-select-icon" })] }));
19
6
  }
20
7
  function NativeSelectOption({ ...props }) {
21
- return /* @__PURE__ */ jsx("option", {
22
- "data-slot": "native-select-option",
23
- ...props
24
- });
8
+ return _jsx("option", { "data-slot": "native-select-option", ...props });
25
9
  }
26
10
  function NativeSelectOptGroup({ className, ...props }) {
27
- return /* @__PURE__ */ jsx("optgroup", {
28
- className: cn(className),
29
- "data-slot": "native-select-optgroup",
30
- ...props
31
- });
11
+ return _jsx("optgroup", { className: cn(className), "data-slot": "native-select-optgroup", ...props });
32
12
  }
33
- //#endregion
13
+ /* -----------------------------------------------------------------------------
14
+ * Exports
15
+ * -------------------------------------------------------------------------- */
34
16
  export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
@@ -1,44 +1,21 @@
1
- import * as _$_codefast_tailwind_variants0 from "@codefast/tailwind-variants";
2
- import { ComponentProps, JSX } from "react";
1
+ import type { ComponentProps, JSX } from "react";
3
2
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
4
-
5
- //#region src/components/navigation-menu.d.ts
6
- declare const navigationMenuTriggerVariants: _$_codefast_tailwind_variants0.VariantFunctionType<_$_codefast_tailwind_variants0.ConfigurationSchema, Record<string, never>>;
3
+ declare const navigationMenuTriggerVariants: import("@codefast/tailwind-variants").VariantFunctionType<import("@codefast/tailwind-variants").ConfigurationSchema, Record<string, never>>;
7
4
  interface NavigationMenuProps extends ComponentProps<typeof NavigationMenuPrimitive.Root> {
8
- viewport?: boolean;
5
+ viewport?: boolean;
9
6
  }
10
- declare function NavigationMenu({
11
- children,
12
- className,
13
- viewport,
14
- ...props
15
- }: NavigationMenuProps): JSX.Element;
7
+ declare function NavigationMenu({ children, className, viewport, ...props }: NavigationMenuProps): JSX.Element;
16
8
  type NavigationMenuListProps = ComponentProps<typeof NavigationMenuPrimitive.List>;
17
- declare function NavigationMenuList({
18
- children,
19
- className,
20
- ...props
21
- }: NavigationMenuListProps): JSX.Element;
9
+ declare function NavigationMenuList({ children, className, ...props }: NavigationMenuListProps): JSX.Element;
22
10
  type NavigationMenuItemProps = ComponentProps<typeof NavigationMenuPrimitive.Item>;
23
- declare function NavigationMenuItem({
24
- className,
25
- ...props
26
- }: NavigationMenuItemProps): JSX.Element;
11
+ declare function NavigationMenuItem({ className, ...props }: NavigationMenuItemProps): JSX.Element;
27
12
  type NavigationMenuTriggerProps = ComponentProps<typeof NavigationMenuPrimitive.Trigger>;
28
- declare function NavigationMenuTrigger({
29
- children,
30
- className,
31
- ...props
32
- }: NavigationMenuTriggerProps): JSX.Element;
13
+ declare function NavigationMenuTrigger({ children, className, ...props }: NavigationMenuTriggerProps): JSX.Element;
33
14
  type NavigationMenuContentProps = ComponentProps<typeof NavigationMenuPrimitive.Content>;
34
- declare function NavigationMenuContent({
35
- className,
36
- ...props
37
- }: NavigationMenuContentProps): JSX.Element;
15
+ declare function NavigationMenuContent({ className, ...props }: NavigationMenuContentProps): JSX.Element;
38
16
  type NavigationMenuLinkProps = ComponentProps<typeof NavigationMenuPrimitive.Link>;
39
- declare function NavigationMenuLink({
40
- className,
41
- ...props
42
- }: NavigationMenuLinkProps): JSX.Element;
43
- //#endregion
44
- export { NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, navigationMenuTriggerVariants };
17
+ declare function NavigationMenuLink({ className, ...props }: NavigationMenuLinkProps): JSX.Element;
18
+ export { navigationMenuTriggerVariants };
19
+ export { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, };
20
+ export type { NavigationMenuContentProps, NavigationMenuItemProps, NavigationMenuLinkProps, NavigationMenuListProps, NavigationMenuProps, NavigationMenuTriggerProps, };
21
+ //# sourceMappingURL=navigation-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-menu.d.ts","sourceRoot":"","sources":["../../src/components/navigation-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,uBAAuB,MAAM,iCAAiC,CAAC;AAS3E,QAAA,MAAM,6BAA6B,6IAMjC,CAAC;AAMH,UAAU,mBAAoB,SAAQ,cAAc,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC;IACvF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,cAAc,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,QAAe,EACf,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAenC;AAMD,KAAK,uBAAuB,GAAG,cAAc,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAEnF,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAWvC;AAMD,KAAK,uBAAuB,GAAG,cAAc,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAEnF,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAQzF;AAMD,KAAK,0BAA0B,GAAG,cAAc,CAAC,OAAO,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAEzF,iBAAS,qBAAqB,CAAC,EAC7B,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CAmB1C;AAMD,KAAK,0BAA0B,GAAG,cAAc,CAAC,OAAO,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAEzF,iBAAS,qBAAqB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CAuB/F;AAMD,KAAK,uBAAuB,GAAG,cAAc,CAAC,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAEnF,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAwBzF;AAqED,OAAO,EAAE,6BAA6B,EAAE,CAAC;AACzC,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,GACtB,CAAC;AAEF,YAAY,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,0BAA0B,GAC3B,CAAC"}
@@ -1,79 +1,43 @@
1
- import { buttonVariants } from "./button.js";
2
- import { cn, tv } from "@codefast/tailwind-variants";
3
- import { ChevronDownIcon } from "lucide-react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn, tv } from "#lib/utils";
5
3
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
6
- //#region src/components/navigation-menu.tsx
7
- const navigationMenuTriggerVariants = tv({ base: buttonVariants({
8
- className: "data-[state=open]:bg-secondary/50 data-[state=open]:text-secondary-foreground group/navigation-menu-trigger focus-visible:bg-secondary dark:hover:not-disabled:bg-secondary",
9
- variant: "ghost"
10
- }) });
4
+ import { ChevronDownIcon } from "lucide-react";
5
+ import { buttonVariants } from "#components/button";
6
+ /* -----------------------------------------------------------------------------
7
+ * Style: NavigationMenuTrigger
8
+ * -------------------------------------------------------------------------- */
9
+ const navigationMenuTriggerVariants = tv({
10
+ base: buttonVariants({
11
+ className: "data-open:bg-secondary/50 data-open:text-secondary-foreground group/navigation-menu-trigger focus-visible:bg-secondary dark:hover:not-disabled:bg-secondary",
12
+ variant: "ghost",
13
+ }),
14
+ });
11
15
  function NavigationMenu({ children, className, viewport = true, ...props }) {
12
- return /* @__PURE__ */ jsxs(NavigationMenuPrimitive.Root, {
13
- className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className),
14
- "data-slot": "navigation-menu",
15
- "data-viewport": viewport,
16
- ...props,
17
- children: [children, viewport ? /* @__PURE__ */ jsx(NavigationMenuViewport, {}) : null]
18
- });
16
+ return (_jsxs(NavigationMenuPrimitive.Root, { className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className), "data-slot": "navigation-menu", "data-viewport": viewport, ...props, children: [children, viewport ? _jsx(NavigationMenuViewport, {}) : null] }));
19
17
  }
20
18
  function NavigationMenuList({ children, className, ...props }) {
21
- return /* @__PURE__ */ jsxs(NavigationMenuPrimitive.List, {
22
- className: cn("flex flex-1 list-none items-center justify-center gap-1", className),
23
- "data-slot": "navigation-menu-list",
24
- ...props,
25
- children: [children, /* @__PURE__ */ jsx(NavigationMenuIndicator, { className: "invisible" })]
26
- });
19
+ return (_jsxs(NavigationMenuPrimitive.List, { className: cn("flex flex-1 items-center justify-center gap-1", "list-none", className), "data-slot": "navigation-menu-list", ...props, children: [children, _jsx(NavigationMenuIndicator, { className: "invisible" })] }));
27
20
  }
28
21
  function NavigationMenuItem({ className, ...props }) {
29
- return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Item, {
30
- className: cn("group-data-[viewport=false]/navigation-menu:relative", className),
31
- "data-slot": "navigation-menu-item",
32
- ...props
33
- });
22
+ return (_jsx(NavigationMenuPrimitive.Item, { className: cn("group-data-[viewport=false]/navigation-menu:relative", className), "data-slot": "navigation-menu-item", ...props }));
34
23
  }
35
24
  function NavigationMenuTrigger({ children, className, ...props }) {
36
- return /* @__PURE__ */ jsxs(NavigationMenuPrimitive.Trigger, {
37
- className: navigationMenuTriggerVariants({ className }),
38
- "data-slot": "navigation-menu-trigger",
39
- ...props,
40
- children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, {
41
- "aria-hidden": "true",
42
- className: "relative top-px ml-1 size-3 transition duration-300 group-data-[state=open]/navigation-menu-trigger:rotate-180"
43
- })]
44
- });
25
+ return (_jsxs(NavigationMenuPrimitive.Trigger, { className: navigationMenuTriggerVariants({ className }), "data-slot": "navigation-menu-trigger", ...props, children: [children, _jsx(ChevronDownIcon, { "aria-hidden": "true", className: cn("relative top-px", "ml-1 size-3", "transition duration-300", "group-data-open/navigation-menu-trigger:rotate-180") })] }));
45
26
  }
46
27
  function NavigationMenuContent({ className, ...props }) {
47
- return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Content, {
48
- className: cn("top-0 left-0 w-full ease-ui group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-2 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:p-1 group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=true]/navigation-menu:p-2 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in-0 data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 md:absolute md:w-auto", className),
49
- "data-slot": "navigation-menu-content",
50
- ...props
51
- });
28
+ return (_jsx(NavigationMenuPrimitive.Content, { className: cn("top-0 left-0", "w-full", "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-2 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:p-1 group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow", "group-data-[viewport=true]/navigation-menu:p-2", "data-[motion=from-end]:slide-in-from-right-52", "data-[motion=from-start]:slide-in-from-left-52", "data-[motion=to-end]:slide-out-to-right-52", "data-[motion=to-start]:slide-out-to-left-52", "ease-ui data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in-0", "data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out-0", "md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95", "group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95", className), "data-slot": "navigation-menu-content", ...props }));
52
29
  }
53
30
  function NavigationMenuLink({ className, ...props }) {
54
- return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Link, {
55
- className: cn("flex flex-col gap-1 rounded-sm p-2 text-sm outline-hidden transition hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80", className),
56
- "data-slot": "navigation-menu-link",
57
- ...props
58
- });
31
+ return (_jsx(NavigationMenuPrimitive.Link, { className: cn("flex flex-col gap-1", "p-2", "rounded-sm outline-hidden", "text-sm", "transition", "hover:bg-accent hover:text-accent-foreground", "focus:bg-accent focus:text-accent-foreground", "data-active:bg-accent/50 data-active:text-accent-foreground", "data-active:hover:bg-accent", "data-active:focus:bg-accent", "[&_svg]:shrink-0", "[&_svg:not([class*='size-'])]:size-4", "[&_svg:not([class*='text-'])]:text-muted-foreground", "data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80", className), "data-slot": "navigation-menu-link", ...props }));
59
32
  }
60
33
  function NavigationMenuViewport({ className, ...props }) {
61
- return /* @__PURE__ */ jsx("div", {
62
- className: "absolute top-full left-0 z-30 flex justify-center perspective-distant",
63
- children: /* @__PURE__ */ jsx(NavigationMenuPrimitive.Viewport, {
64
- className: cn("relative mt-2 min-h-[calc(var(--radix-navigation-menu-viewport-height)+2px)] w-full origin-[top_center] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg transition-[width,height] ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-90 sm:min-w-[calc(var(--radix-navigation-menu-viewport-width)+2px)]", className),
65
- "data-slot": "navigation-menu-viewport",
66
- ...props
67
- })
68
- });
34
+ return (_jsx("div", { className: cn("absolute top-full left-0 z-30 flex justify-center", "perspective-distant"), children: _jsx(NavigationMenuPrimitive.Viewport, { className: cn("relative", "mt-2 min-h-[calc(var(--radix-navigation-menu-viewport-height)+2px)] w-full overflow-hidden", "rounded-lg border", "bg-popover text-popover-foreground shadow-lg", "transition-[width,height] ease-ui", "sm:min-w-[calc(var(--radix-navigation-menu-viewport-width)+2px)]", "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-90", "data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "origin-[top_center]", className), "data-slot": "navigation-menu-viewport", ...props }) }));
69
35
  }
70
36
  function NavigationMenuIndicator({ className, ...props }) {
71
- return /* @__PURE__ */ jsx(NavigationMenuPrimitive.Indicator, {
72
- className: cn("top-full z-10 flex h-2 items-center justify-center overflow-hidden ease-ui data-[state=hidden]:animate-out data-[state=hidden]:fade-out-0 data-[state=visible]:animate-in data-[state=visible]:fade-in-0", className),
73
- "data-slot": "navigation-menu-indicator",
74
- ...props,
75
- children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] size-2.5 rotate-45 rounded-tl-xs bg-popover text-popover-foreground" })
76
- });
37
+ return (_jsx(NavigationMenuPrimitive.Indicator, { className: cn("top-full z-10 flex h-2 items-center justify-center overflow-hidden", "ease-ui data-[state=hidden]:animate-out data-[state=hidden]:fade-out-0", "data-[state=visible]:animate-in data-[state=visible]:fade-in-0", className), "data-slot": "navigation-menu-indicator", ...props, children: _jsx("div", { className: cn("relative top-[60%]", "size-2.5", "rounded-tl-xs", "bg-popover text-popover-foreground", "rotate-45") }) }));
77
38
  }
78
- //#endregion
79
- export { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerVariants };
39
+ /* -----------------------------------------------------------------------------
40
+ * Exports
41
+ * -------------------------------------------------------------------------- */
42
+ export { navigationMenuTriggerVariants };
43
+ export { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, };
@@ -1,46 +1,26 @@
1
- import { buttonVariants } from "./button.js";
2
- import { VariantProps } from "@codefast/tailwind-variants";
3
- import { ComponentProps, JSX } from "react";
4
-
5
- //#region src/components/pagination.d.ts
1
+ import type { VariantProps } from "#lib/utils";
2
+ import type { ComponentProps, JSX } from "react";
3
+ import { buttonVariants } from "#components/button";
6
4
  type PaginationProps = ComponentProps<"nav">;
7
- declare function Pagination({
8
- className,
9
- ...props
10
- }: PaginationProps): JSX.Element;
5
+ declare function Pagination({ className, ...props }: PaginationProps): JSX.Element;
11
6
  type PaginationContentProps = ComponentProps<"ul">;
12
- declare function PaginationContent({
13
- className,
14
- ...props
15
- }: PaginationContentProps): JSX.Element;
7
+ declare function PaginationContent({ className, ...props }: PaginationContentProps): JSX.Element;
16
8
  type PaginationItemProps = ComponentProps<"li">;
17
9
  declare function PaginationItem(props: PaginationItemProps): JSX.Element;
18
10
  interface PaginationLinkProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
19
- isActive?: boolean;
11
+ isActive?: boolean;
20
12
  }
21
- declare function PaginationLink({
22
- children,
23
- className,
24
- isActive,
25
- size,
26
- ...props
27
- }: PaginationLinkProps): JSX.Element;
13
+ declare function PaginationLink({ children, className, isActive, size, ...props }: PaginationLinkProps): JSX.Element;
28
14
  interface PaginationPreviousProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
29
- isActive?: boolean;
15
+ isActive?: boolean;
30
16
  }
31
- declare function PaginationPrevious({
32
- ...props
33
- }: PaginationPreviousProps): JSX.Element;
17
+ declare function PaginationPrevious({ ...props }: PaginationPreviousProps): JSX.Element;
34
18
  interface PaginationNextProps extends ComponentProps<"a">, Pick<VariantProps<typeof buttonVariants>, "size"> {
35
- isActive?: boolean;
19
+ isActive?: boolean;
36
20
  }
37
- declare function PaginationNext({
38
- ...props
39
- }: PaginationNextProps): JSX.Element;
21
+ declare function PaginationNext({ ...props }: PaginationNextProps): JSX.Element;
40
22
  type PaginationEllipsisProps = ComponentProps<"span">;
41
- declare function PaginationEllipsis({
42
- className,
43
- ...props
44
- }: PaginationEllipsisProps): JSX.Element;
45
- //#endregion
46
- export { Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps };
23
+ declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): JSX.Element;
24
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
25
+ export type { PaginationContentProps, PaginationEllipsisProps, PaginationItemProps, PaginationLinkProps, PaginationNextProps, PaginationPreviousProps, PaginationProps, };
26
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/components/pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,KAAK,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE7C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CASzE;AAMD,KAAK,sBAAsB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAEnD,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAQvF;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAEhD,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAE/D;AAMD,UAAU,mBACR,SAAQ,cAAc,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,EAAE,MAAM,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,cAAc,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,IAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAWnC;AAMD,UAAU,uBACR,SAAQ,cAAc,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,EAAE,MAAM,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAY9E;AAMD,UAAU,mBACR,SAAQ,cAAc,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,cAAc,CAAC,EAAE,MAAM,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAOtE;AAMD,KAAK,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAEtD,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAYzF;AAMD,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,CAAC;AACF,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,GAChB,CAAC"}
@@ -1,71 +1,29 @@
1
- import { buttonVariants } from "./button.js";
2
- import { cn } from "@codefast/tailwind-variants";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "#lib/utils";
3
3
  import { ChevronLeftIcon, ChevronRightIcon, EllipsisIcon } from "lucide-react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/components/pagination.tsx
4
+ import { buttonVariants } from "#components/button";
6
5
  function Pagination({ className, ...props }) {
7
- return /* @__PURE__ */ jsx("nav", {
8
- "aria-label": "pagination",
9
- className: cn("mx-auto flex w-full justify-center", className),
10
- "data-slot": "pagination",
11
- ...props
12
- });
6
+ return (_jsx("nav", { "aria-label": "pagination", className: cn("flex w-full justify-center", "mx-auto", className), "data-slot": "pagination", ...props }));
13
7
  }
14
8
  function PaginationContent({ className, ...props }) {
15
- return /* @__PURE__ */ jsx("ul", {
16
- className: cn("flex flex-row items-center gap-1", className),
17
- "data-slot": "pagination-content",
18
- ...props
19
- });
9
+ return (_jsx("ul", { className: cn("flex flex-row items-center gap-1", className), "data-slot": "pagination-content", ...props }));
20
10
  }
21
11
  function PaginationItem(props) {
22
- return /* @__PURE__ */ jsx("li", {
23
- "data-slot": "pagination-item",
24
- ...props
25
- });
12
+ return _jsx("li", { "data-slot": "pagination-item", ...props });
26
13
  }
27
14
  function PaginationLink({ children, className, isActive, size = "icon", ...props }) {
28
- return /* @__PURE__ */ jsx("a", {
29
- "aria-current": isActive ? "page" : void 0,
30
- className: buttonVariants({
31
- className,
32
- size,
33
- variant: isActive ? "outline" : "ghost"
34
- }),
35
- "data-slot": "pagination-link",
36
- ...props,
37
- children
38
- });
15
+ return (_jsx("a", { "aria-current": isActive ? "page" : undefined, className: buttonVariants({ className, size, variant: isActive ? "outline" : "ghost" }), "data-slot": "pagination-link", ...props, children: children }));
39
16
  }
40
17
  function PaginationPrevious({ ...props }) {
41
- return /* @__PURE__ */ jsxs(PaginationLink, {
42
- "aria-label": "Go to previous page",
43
- "data-slot": "pagination-previous",
44
- size: "md",
45
- ...props,
46
- children: [/* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", { children: "Previous" })]
47
- });
18
+ return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", "data-slot": "pagination-previous", size: "md", ...props, children: [_jsx(ChevronLeftIcon, { className: "size-4" }), _jsx("span", { children: "Previous" })] }));
48
19
  }
49
20
  function PaginationNext({ ...props }) {
50
- return /* @__PURE__ */ jsxs(PaginationLink, {
51
- "aria-label": "Go to next page",
52
- "data-slot": "pagination-next",
53
- size: "md",
54
- ...props,
55
- children: [/* @__PURE__ */ jsx("span", { children: "Next" }), /* @__PURE__ */ jsx(ChevronRightIcon, {})]
56
- });
21
+ return (_jsxs(PaginationLink, { "aria-label": "Go to next page", "data-slot": "pagination-next", size: "md", ...props, children: [_jsx("span", { children: "Next" }), _jsx(ChevronRightIcon, {})] }));
57
22
  }
58
23
  function PaginationEllipsis({ className, ...props }) {
59
- return /* @__PURE__ */ jsxs("span", {
60
- "aria-hidden": true,
61
- className: cn("flex size-10 items-center justify-center", className),
62
- "data-slot": "pagination-ellipsis",
63
- ...props,
64
- children: [/* @__PURE__ */ jsx(EllipsisIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
65
- className: "sr-only",
66
- children: "More pages"
67
- })]
68
- });
24
+ return (_jsxs("span", { "aria-hidden": true, className: cn("flex size-10 items-center justify-center", className), "data-slot": "pagination-ellipsis", ...props, children: [_jsx(EllipsisIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More pages" })] }));
69
25
  }
70
- //#endregion
71
- export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
26
+ /* -----------------------------------------------------------------------------
27
+ * Exports
28
+ * -------------------------------------------------------------------------- */
29
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, };
@@ -1,30 +1,15 @@
1
- import { ComponentProps, JSX } from "react";
1
+ import type { ComponentProps, JSX } from "react";
2
2
  import * as PopoverPrimitive from "@radix-ui/react-popover";
3
-
4
- //#region src/components/popover.d.ts
5
3
  type PopoverProps = ComponentProps<typeof PopoverPrimitive.Root>;
6
- declare function Popover({
7
- ...props
8
- }: PopoverProps): JSX.Element;
4
+ declare function Popover({ ...props }: PopoverProps): JSX.Element;
9
5
  type PopoverTriggerProps = ComponentProps<typeof PopoverPrimitive.Trigger>;
10
- declare function PopoverTrigger({
11
- ...props
12
- }: PopoverTriggerProps): JSX.Element;
6
+ declare function PopoverTrigger({ ...props }: PopoverTriggerProps): JSX.Element;
13
7
  type PopoverAnchorProps = ComponentProps<typeof PopoverPrimitive.Anchor>;
14
- declare function PopoverAnchor({
15
- ...props
16
- }: PopoverAnchorProps): JSX.Element;
8
+ declare function PopoverAnchor({ ...props }: PopoverAnchorProps): JSX.Element;
17
9
  type PopoverContentProps = ComponentProps<typeof PopoverPrimitive.Content>;
18
- declare function PopoverContent({
19
- align,
20
- className,
21
- sideOffset,
22
- ...props
23
- }: PopoverContentProps): JSX.Element;
10
+ declare function PopoverContent({ align, className, sideOffset, ...props }: PopoverContentProps): JSX.Element;
24
11
  type PopoverArrowProps = ComponentProps<typeof PopoverPrimitive.Arrow>;
25
- declare function PopoverArrow({
26
- className,
27
- ...props
28
- }: PopoverArrowProps): JSX.Element;
29
- //#endregion
30
- export { Popover, PopoverAnchor, type PopoverAnchorProps, PopoverArrow, type PopoverArrowProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps };
12
+ declare function PopoverArrow({ className, ...props }: PopoverArrowProps): JSX.Element;
13
+ export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };
14
+ export type { PopoverAnchorProps, PopoverArrowProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, };
15
+ //# sourceMappingURL=popover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAM5D,KAAK,YAAY,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAEjE,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAExD;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAE3E,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAEtE;AAMD,KAAK,kBAAkB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEzE,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAEpE;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAE3E,iBAAS,cAAc,CAAC,EACtB,KAAgB,EAChB,SAAS,EACT,UAAc,EACd,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CA8BnC;AAMD,KAAK,iBAAiB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAEvE,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAQ7E;AAMD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC;AAChF,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,GACpB,CAAC"}
@@ -1,41 +1,23 @@
1
1
  "use client";
2
- import { cn } from "@codefast/tailwind-variants";
3
- import { jsx } from "react/jsx-runtime";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from "#lib/utils";
4
4
  import * as PopoverPrimitive from "@radix-ui/react-popover";
5
- //#region src/components/popover.tsx
6
5
  function Popover({ ...props }) {
7
- return /* @__PURE__ */ jsx(PopoverPrimitive.Root, {
8
- "data-slot": "popover",
9
- ...props
10
- });
6
+ return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
11
7
  }
12
8
  function PopoverTrigger({ ...props }) {
13
- return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
14
- "data-slot": "popover-trigger",
15
- ...props
16
- });
9
+ return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
17
10
  }
18
11
  function PopoverAnchor({ ...props }) {
19
- return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
20
- "data-slot": "popover-anchor",
21
- ...props
22
- });
12
+ return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
23
13
  }
24
14
  function PopoverContent({ align = "center", className, sideOffset = 4, ...props }) {
25
- return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
26
- align,
27
- className: cn("z-50 min-w-32 origin-(--radix-popover-content-transform-origin) rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg outline-hidden ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className),
28
- "data-slot": "popover-content",
29
- sideOffset,
30
- ...props
31
- }) });
15
+ return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { align: align, className: cn("z-50", "min-w-32 p-4", "rounded-lg border", "bg-popover shadow-lg outline-hidden", "text-popover-foreground", "ease-ui data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "data-open:data-side-top:slide-in-from-bottom-2", "data-open:data-side-right:slide-in-from-left-2", "data-open:data-side-bottom:slide-in-from-top-2", "data-open:data-side-left:slide-in-from-right-2", "data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "data-closed:data-side-top:slide-out-to-bottom-2", "data-closed:data-side-right:slide-out-to-left-2", "data-closed:data-side-bottom:slide-out-to-top-2", "data-closed:data-side-left:slide-out-to-right-2", "origin-(--radix-popover-content-transform-origin)", className), "data-slot": "popover-content", sideOffset: sideOffset, ...props }) }));
32
16
  }
33
17
  function PopoverArrow({ className, ...props }) {
34
- return /* @__PURE__ */ jsx(PopoverPrimitive.Arrow, {
35
- className: cn("fill-popover", className),
36
- "data-slot": "popover-arrow",
37
- ...props
38
- });
18
+ return (_jsx(PopoverPrimitive.Arrow, { className: cn("fill-popover", className), "data-slot": "popover-arrow", ...props }));
39
19
  }
40
- //#endregion
20
+ /* -----------------------------------------------------------------------------
21
+ * Exports
22
+ * -------------------------------------------------------------------------- */
41
23
  export { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger };