@bearmenu/ui 0.5.2 → 0.6.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 (227) hide show
  1. package/dist/{chunk-ERMIA7NP.js → chunk-7PPCH42H.js} +3 -3
  2. package/dist/{chunk-HLQ2IRE7.js → chunk-BAZFVSSG.js} +3 -3
  3. package/dist/chunk-D5QHEHXJ.js +26 -0
  4. package/dist/{chunk-UISA4CIG.js → chunk-N2KNBPAQ.js} +2 -2
  5. package/dist/{chunk-7H54PTVH.js → chunk-PSR7N36A.js} +38 -10
  6. package/dist/chunk-RIDXFY6M.js +38 -0
  7. package/dist/chunk-UUJVXN2O.js +82 -0
  8. package/dist/chunk-WKMLZDUT.js +122 -0
  9. package/dist/chunk-XK2ZDQVE.js +122 -0
  10. package/dist/{chunk-4KOMHDZD.js → chunk-Y5D5LP4A.js} +18 -3
  11. package/dist/chunk-YJ6OBKZJ.js +32 -0
  12. package/dist/{chunk-ESO2EM3L.js → chunk-ZBBUKXM5.js} +2 -2
  13. package/dist/chunk-ZFNOCP6W.js +106 -0
  14. package/dist/components/accordion.js +11 -5
  15. package/dist/components/alert-dialog.js +5 -3
  16. package/dist/components/alert.d.ts +4 -1
  17. package/dist/components/alert.js +25 -9
  18. package/dist/components/avatar.d.ts +17 -2
  19. package/dist/components/avatar.js +91 -12
  20. package/dist/components/badge.d.ts +1 -1
  21. package/dist/components/badge.js +1 -1
  22. package/dist/components/breadcrumb.js +5 -2
  23. package/dist/components/button-group.d.ts +14 -0
  24. package/dist/components/button-group.js +39 -0
  25. package/dist/components/button.d.ts +3 -1
  26. package/dist/components/button.js +1 -1
  27. package/dist/components/calendar.js +3 -3
  28. package/dist/components/card.d.ts +13 -5
  29. package/dist/components/card.js +2 -2
  30. package/dist/components/carousel.d.ts +20 -3
  31. package/dist/components/carousel.js +72 -12
  32. package/dist/components/checkbox.js +1 -1
  33. package/dist/components/circular-progress.d.ts +16 -0
  34. package/dist/components/circular-progress.js +105 -0
  35. package/dist/components/combobox.d.ts +27 -0
  36. package/dist/components/combobox.js +102 -0
  37. package/dist/components/command.d.ts +16 -3
  38. package/dist/components/command.js +2 -2
  39. package/dist/components/currency-input.d.ts +1 -0
  40. package/dist/components/currency-input.js +73 -52
  41. package/dist/components/date-input.d.ts +10 -0
  42. package/dist/components/date-input.js +40 -0
  43. package/dist/components/description-list.d.ts +15 -0
  44. package/dist/components/description-list.js +67 -0
  45. package/dist/components/dialog.d.ts +13 -2
  46. package/dist/components/dialog.js +1 -1
  47. package/dist/components/drawer.d.ts +5 -2
  48. package/dist/components/drawer.js +47 -9
  49. package/dist/components/dropdown-menu.d.ts +7 -2
  50. package/dist/components/dropdown-menu.js +22 -6
  51. package/dist/components/empty-state.js +2 -2
  52. package/dist/components/field.d.ts +22 -0
  53. package/dist/components/field.js +130 -0
  54. package/dist/components/form.d.ts +2 -1
  55. package/dist/components/form.js +11 -1
  56. package/dist/components/haptic-button.js +3 -3
  57. package/dist/components/input-group.d.ts +18 -0
  58. package/dist/components/input-group.js +92 -0
  59. package/dist/components/input.d.ts +8 -2
  60. package/dist/components/input.js +1 -1
  61. package/dist/components/item.d.ts +23 -0
  62. package/dist/components/item.js +120 -0
  63. package/dist/components/kbd.d.ts +13 -0
  64. package/dist/components/kbd.js +49 -0
  65. package/dist/components/lazy-markdown.d.ts +3 -1
  66. package/dist/components/lazy-markdown.js +7 -7
  67. package/dist/components/link-button.js +1 -1
  68. package/dist/components/multi-select-combobox.js +92 -83
  69. package/dist/components/multi-select-menu.d.ts +0 -4
  70. package/dist/components/multi-select-menu.js +28 -17
  71. package/dist/components/native-select.d.ts +12 -0
  72. package/dist/components/native-select.js +49 -0
  73. package/dist/components/pagination.d.ts +5 -2
  74. package/dist/components/pagination.js +66 -7
  75. package/dist/components/place-about-tab.js +4 -4
  76. package/dist/components/place-card.js +1 -1
  77. package/dist/components/place-details-mobile.js +4 -4
  78. package/dist/components/popover.d.ts +7 -1
  79. package/dist/components/popover.js +1 -1
  80. package/dist/components/progress.d.ts +5 -1
  81. package/dist/components/progress.js +17 -3
  82. package/dist/components/radio-group.js +12 -3
  83. package/dist/components/rating.d.ts +2 -0
  84. package/dist/components/rating.js +88 -70
  85. package/dist/components/scroll-fade.d.ts +15 -0
  86. package/dist/components/scroll-fade.js +116 -0
  87. package/dist/components/search-bar.d.ts +1 -2
  88. package/dist/components/search-bar.js +37 -60
  89. package/dist/components/searchable-select.js +76 -72
  90. package/dist/components/select.d.ts +5 -1
  91. package/dist/components/select.js +30 -14
  92. package/dist/components/selection-bar.d.ts +11 -0
  93. package/dist/components/selection-bar.js +65 -0
  94. package/dist/components/separator.js +3 -2
  95. package/dist/components/sheet.d.ts +1 -1
  96. package/dist/components/sheet.js +1 -1
  97. package/dist/components/skeleton-card.js +1 -1
  98. package/dist/components/skeleton.js +1 -1
  99. package/dist/components/slider.js +21 -4
  100. package/dist/components/sliding-panels.js +9 -6
  101. package/dist/components/spinner.d.ts +17 -0
  102. package/dist/components/spinner.js +50 -0
  103. package/dist/components/stepper.d.ts +18 -0
  104. package/dist/components/stepper.js +199 -0
  105. package/dist/components/switch.js +4 -3
  106. package/dist/components/table.d.ts +23 -5
  107. package/dist/components/table.js +121 -35
  108. package/dist/components/tabs.d.ts +3 -1
  109. package/dist/components/tabs.js +37 -9
  110. package/dist/components/tag-group.d.ts +9 -0
  111. package/dist/components/tag-group.js +26 -0
  112. package/dist/components/tag.d.ts +17 -0
  113. package/dist/components/tag.js +61 -0
  114. package/dist/components/text.d.ts +1 -1
  115. package/dist/components/text.js +1 -1
  116. package/dist/components/textarea.js +2 -1
  117. package/dist/components/toast.js +1 -1
  118. package/dist/components/toaster.js +1 -1
  119. package/dist/components/toggle-group.js +1 -1
  120. package/dist/components/toggle.js +1 -1
  121. package/dist/components/tooltip.d.ts +3 -2
  122. package/dist/components/tooltip.js +16 -2
  123. package/package.json +45 -26
  124. package/src/components/accordion.tsx +11 -6
  125. package/src/components/alert-dialog.tsx +4 -2
  126. package/src/components/alert.tsx +20 -8
  127. package/src/components/avatar.tsx +106 -13
  128. package/src/components/badge.tsx +12 -11
  129. package/src/components/breadcrumb.tsx +5 -2
  130. package/src/components/button-group.stories.tsx +52 -0
  131. package/src/components/button-group.tsx +40 -0
  132. package/src/components/button.test.tsx +174 -0
  133. package/src/components/button.tsx +42 -19
  134. package/src/components/calendar.tsx +2 -2
  135. package/src/components/card.tsx +55 -13
  136. package/src/components/carousel.tsx +85 -13
  137. package/src/components/checkbox.test.tsx +58 -0
  138. package/src/components/checkbox.tsx +8 -3
  139. package/src/components/circular-progress.stories.tsx +39 -0
  140. package/src/components/circular-progress.tsx +102 -0
  141. package/src/components/collapsible.stories.tsx +7 -3
  142. package/src/components/combobox.stories.tsx +82 -0
  143. package/src/components/combobox.test.tsx +118 -0
  144. package/src/components/combobox.tsx +136 -0
  145. package/src/components/command.test.tsx +91 -0
  146. package/src/components/command.tsx +38 -15
  147. package/src/components/currency-input.test.tsx +63 -0
  148. package/src/components/currency-input.tsx +84 -66
  149. package/src/components/date-input.stories.tsx +31 -0
  150. package/src/components/date-input.tsx +43 -0
  151. package/src/components/description-list.stories.tsx +62 -0
  152. package/src/components/description-list.tsx +68 -0
  153. package/src/components/dialog.test.tsx +84 -0
  154. package/src/components/dialog.tsx +64 -24
  155. package/src/components/drawer.tsx +72 -23
  156. package/src/components/dropdown-menu.test.tsx +180 -0
  157. package/src/components/dropdown-menu.tsx +31 -6
  158. package/src/components/field.stories.tsx +36 -0
  159. package/src/components/field.test.tsx +157 -0
  160. package/src/components/field.tsx +146 -0
  161. package/src/components/form.stories.tsx +3 -2
  162. package/src/components/form.test.tsx +95 -0
  163. package/src/components/form.tsx +9 -0
  164. package/src/components/haptic-button.tsx +1 -1
  165. package/src/components/input-group.stories.tsx +61 -0
  166. package/src/components/input-group.tsx +99 -0
  167. package/src/components/input.test.tsx +103 -0
  168. package/src/components/input.tsx +24 -7
  169. package/src/components/item.stories.tsx +52 -0
  170. package/src/components/item.tsx +115 -0
  171. package/src/components/kbd.stories.tsx +33 -0
  172. package/src/components/kbd.tsx +46 -0
  173. package/src/components/lazy-markdown.tsx +10 -7
  174. package/src/components/multi-select-combobox.test.tsx +101 -0
  175. package/src/components/multi-select-combobox.tsx +85 -82
  176. package/src/components/multi-select-menu.tsx +49 -41
  177. package/src/components/native-select.stories.tsx +52 -0
  178. package/src/components/native-select.tsx +45 -0
  179. package/src/components/pagination.tsx +64 -5
  180. package/src/components/popover.tsx +66 -3
  181. package/src/components/progress.tsx +27 -4
  182. package/src/components/radio-group.test.tsx +64 -0
  183. package/src/components/radio-group.tsx +11 -3
  184. package/src/components/rating.test.tsx +112 -0
  185. package/src/components/rating.tsx +97 -82
  186. package/src/components/scroll-fade.stories.tsx +98 -0
  187. package/src/components/scroll-fade.tsx +127 -0
  188. package/src/components/search-bar.stories.tsx +1 -32
  189. package/src/components/search-bar.tsx +22 -59
  190. package/src/components/searchable-select.tsx +69 -73
  191. package/src/components/select.tsx +34 -19
  192. package/src/components/selection-bar.stories.tsx +37 -0
  193. package/src/components/selection-bar.tsx +65 -0
  194. package/src/components/separator.tsx +5 -2
  195. package/src/components/sheet.tsx +1 -1
  196. package/src/components/skeleton.tsx +2 -2
  197. package/src/components/slider.test.tsx +45 -0
  198. package/src/components/slider.tsx +31 -12
  199. package/src/components/sliding-panels.tsx +8 -5
  200. package/src/components/spinner.stories.tsx +35 -0
  201. package/src/components/spinner.tsx +50 -0
  202. package/src/components/stepper.stories.tsx +71 -0
  203. package/src/components/stepper.tsx +220 -0
  204. package/src/components/switch.test.tsx +52 -0
  205. package/src/components/switch.tsx +4 -3
  206. package/src/components/table.tsx +140 -35
  207. package/src/components/tabs.test.tsx +107 -0
  208. package/src/components/tabs.tsx +70 -23
  209. package/src/components/tag-group.stories.tsx +39 -0
  210. package/src/components/tag-group.tsx +28 -0
  211. package/src/components/tag.stories.tsx +50 -0
  212. package/src/components/tag.tsx +63 -0
  213. package/src/components/text.test.tsx +1 -1
  214. package/src/components/text.tsx +19 -3
  215. package/src/components/textarea.test.tsx +48 -0
  216. package/src/components/textarea.tsx +2 -1
  217. package/src/components/toast.tsx +4 -3
  218. package/src/components/toggle.tsx +2 -2
  219. package/src/components/tooltip.tsx +12 -2
  220. package/src/globals.css +126 -90
  221. package/dist/chunk-2BMJRXQX.js +0 -80
  222. package/dist/chunk-4AVS6CV4.js +0 -89
  223. package/dist/chunk-4UO73SKC.js +0 -26
  224. package/dist/chunk-CW24PLDW.js +0 -24
  225. package/dist/chunk-IQASCH2V.js +0 -25
  226. package/dist/chunk-NKHH23YK.js +0 -31
  227. package/dist/chunk-QJ54Z7TC.js +0 -83
@@ -10,7 +10,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.Dialog
10
10
  declare const SheetPortal: React.FC<DialogPrimitive.DialogPortalProps>;
11
11
  declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
12
  declare const sheetVariants: (props?: ({
13
- side?: "left" | "right" | "top" | "bottom" | null | undefined;
13
+ side?: "left" | "right" | "bottom" | "top" | null | undefined;
14
14
  } & class_variance_authority_types.ClassProp) | undefined) => string;
15
15
  interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
16
16
  }
@@ -26,7 +26,7 @@ var SheetOverlay = React.forwardRef((_a, ref) => {
26
26
  });
27
27
  SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
28
28
  var sheetVariants = cva(
29
- "fixed z-[1000] gap-4 glass bg-background p-6 shadow-2xl transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
29
+ "fixed z-[1000] gap-4 bg-background border-border p-6 shadow-2xl transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
30
30
  {
31
31
  variants: {
32
32
  side: {
@@ -1,4 +1,4 @@
1
- import { Skeleton } from '../chunk-UISA4CIG.js';
1
+ import { Skeleton } from '../chunk-N2KNBPAQ.js';
2
2
  import { AspectRatio } from '../chunk-3VMDCCCX.js';
3
3
  import { cn } from '../chunk-FEK5XGZW.js';
4
4
  import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
@@ -1,3 +1,3 @@
1
- export { Skeleton } from '../chunk-UISA4CIG.js';
1
+ export { Skeleton } from '../chunk-N2KNBPAQ.js';
2
2
  import '../chunk-FEK5XGZW.js';
3
3
  import '../chunk-3GWWZKX7.js';
@@ -5,16 +5,33 @@ import * as SliderPrimitive from '@radix-ui/react-slider';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
7
7
  var Slider = React.forwardRef((_a, ref) => {
8
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8
+ var _b = _a, { className, value, defaultValue } = _b, props = __objRest(_b, ["className", "value", "defaultValue"]);
9
+ const thumbCount = React.useMemo(() => {
10
+ if (Array.isArray(value)) return value.length;
11
+ if (Array.isArray(defaultValue)) return defaultValue.length;
12
+ return 1;
13
+ }, [value, defaultValue]);
9
14
  return /* @__PURE__ */ jsxs(
10
15
  SliderPrimitive.Root,
11
16
  __spreadProps(__spreadValues({
12
17
  ref,
13
- className: cn("relative flex w-full touch-none select-none items-center", className)
18
+ "data-slot": "slider",
19
+ value,
20
+ defaultValue,
21
+ className: cn(
22
+ "relative flex w-full touch-none select-none items-center data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
23
+ className
24
+ )
14
25
  }, props), {
15
26
  children: [
16
- /* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full glass border border-border/50", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-white shadow-lg" }) }),
17
- /* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-primary ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:shadow-lg hover:shadow-primary/20 hover:scale-110" })
27
+ /* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-muted", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
28
+ Array.from({ length: thumbCount }, (_, i) => /* @__PURE__ */ jsx(
29
+ SliderPrimitive.Thumb,
30
+ {
31
+ className: "block size-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-transform focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:scale-110"
32
+ },
33
+ i
34
+ ))
18
35
  ]
19
36
  })
20
37
  );
@@ -1,4 +1,4 @@
1
- import { Button } from '../chunk-2BMJRXQX.js';
1
+ import { Button } from '../chunk-ZFNOCP6W.js';
2
2
  import '../chunk-R47NEOSI.js';
3
3
  import { cn } from '../chunk-FEK5XGZW.js';
4
4
  import '../chunk-3GWWZKX7.js';
@@ -37,8 +37,11 @@ var SlidingPanels = ({
37
37
  return /* @__PURE__ */ jsx(
38
38
  "div",
39
39
  {
40
- className: cn("relative overflow-hidden transition-[height] duration-300", className),
41
- style: { height: containerHeight },
40
+ className: cn(
41
+ "relative overflow-clip transition-[height] duration-500 ease-[cubic-bezier(0.32,0.72,0,1)]",
42
+ className
43
+ ),
44
+ style: { height: containerHeight, overflowClipMargin: "8px" },
42
45
  children: panels.map((panel, index) => {
43
46
  const isActive = panel.id === currentPanel;
44
47
  const isLeft = index < currentIndex;
@@ -50,10 +53,10 @@ var SlidingPanels = ({
50
53
  panelRefs.current[index] = el;
51
54
  },
52
55
  className: cn(
53
- "absolute top-0 left-0 w-full transition-transform duration-300",
56
+ "absolute top-0 left-0 w-full transition-transform duration-500 ease-[cubic-bezier(0.32,0.72,0,1)]",
54
57
  isActive && "translate-x-0",
55
- isLeft && "-translate-x-full",
56
- isRight && "translate-x-full"
58
+ isLeft && "-translate-x-[calc(100%+8px)]",
59
+ isRight && "translate-x-[calc(100%+8px)]"
57
60
  ),
58
61
  "aria-hidden": !isActive,
59
62
  children: [
@@ -0,0 +1,17 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const spinnerVariants: (props?: ({
6
+ size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
7
+ tone?: "inherit" | "default" | "destructive" | "primary" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ declare const Spinner: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
10
+ size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
11
+ tone?: "inherit" | "default" | "destructive" | "primary" | null | undefined;
12
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & {
13
+ /** Visually-hidden label for screen readers. Defaults to "Loading". */
14
+ label?: string;
15
+ } & React.RefAttributes<HTMLSpanElement>>;
16
+
17
+ export { Spinner, spinnerVariants };
@@ -0,0 +1,50 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
3
+ import * as React from 'react';
4
+ import { Loader2 } from 'lucide-react';
5
+ import { cva } from 'class-variance-authority';
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
+
8
+ var spinnerVariants = cva("animate-spin shrink-0", {
9
+ variants: {
10
+ size: {
11
+ xs: "size-3",
12
+ sm: "size-4",
13
+ default: "size-5",
14
+ lg: "size-6",
15
+ xl: "size-8"
16
+ },
17
+ tone: {
18
+ default: "text-muted-foreground",
19
+ primary: "text-primary",
20
+ destructive: "text-destructive",
21
+ inherit: ""
22
+ }
23
+ },
24
+ defaultVariants: {
25
+ size: "default",
26
+ tone: "default"
27
+ }
28
+ });
29
+ var Spinner = React.forwardRef(
30
+ (_a, ref) => {
31
+ var _b = _a, { className, size, tone, label = "Loading" } = _b, props = __objRest(_b, ["className", "size", "tone", "label"]);
32
+ return /* @__PURE__ */ jsxs(
33
+ "span",
34
+ __spreadProps(__spreadValues({
35
+ ref,
36
+ role: "status",
37
+ "data-slot": "spinner",
38
+ className: cn("inline-flex items-center justify-center", className)
39
+ }, props), {
40
+ children: [
41
+ /* @__PURE__ */ jsx(Loader2, { "aria-hidden": true, className: spinnerVariants({ size, tone }) }),
42
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: label })
43
+ ]
44
+ })
45
+ );
46
+ }
47
+ );
48
+ Spinner.displayName = "Spinner";
49
+
50
+ export { Spinner, spinnerVariants };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+
3
+ interface StepperStep {
4
+ id: string;
5
+ title: string;
6
+ description?: string;
7
+ }
8
+ declare const Stepper: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
9
+ steps: StepperStep[];
10
+ activeStep: number;
11
+ /** Highest step the user has reached (enables clicking back). Defaults to activeStep. */
12
+ furthestStep?: number;
13
+ /** When provided, steps render as buttons. */
14
+ onStepClick?: (index: number) => void;
15
+ ariaLabel?: string;
16
+ } & React.RefAttributes<HTMLElement>>;
17
+
18
+ export { Stepper, type StepperStep };
@@ -0,0 +1,199 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
3
+ import * as React from 'react';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var Stepper = React.forwardRef(
7
+ (_a, ref) => {
8
+ var _b = _a, {
9
+ className,
10
+ steps,
11
+ activeStep,
12
+ furthestStep,
13
+ onStepClick,
14
+ ariaLabel = "Progress"
15
+ } = _b, props = __objRest(_b, [
16
+ "className",
17
+ "steps",
18
+ "activeStep",
19
+ "furthestStep",
20
+ "onStepClick",
21
+ "ariaLabel"
22
+ ]);
23
+ var _a2;
24
+ const reachable = furthestStep != null ? furthestStep : activeStep;
25
+ const isInteractive = typeof onStepClick === "function";
26
+ return /* @__PURE__ */ jsxs(
27
+ "nav",
28
+ __spreadProps(__spreadValues({
29
+ ref,
30
+ "aria-label": ariaLabel,
31
+ className: cn("w-full", className)
32
+ }, props), {
33
+ children: [
34
+ /* @__PURE__ */ jsx("ol", { className: "hidden md:flex w-full items-center", "data-slot": "stepper", children: steps.map((step, i) => {
35
+ const status = i < activeStep ? "complete" : i === activeStep ? "current" : "upcoming";
36
+ const isLast = i === steps.length - 1;
37
+ const canClick = isInteractive && i <= reachable;
38
+ const Item = canClick ? "button" : "div";
39
+ const itemProps = canClick ? {
40
+ type: "button",
41
+ onClick: () => onStepClick == null ? void 0 : onStepClick(i),
42
+ disabled: !canClick
43
+ } : {};
44
+ return /* @__PURE__ */ jsxs("li", { className: "contents", "data-status": status, children: [
45
+ /* @__PURE__ */ jsxs(
46
+ Item,
47
+ __spreadProps(__spreadValues({}, itemProps), {
48
+ "aria-current": status === "current" ? "step" : void 0,
49
+ className: cn(
50
+ "group inline-flex items-center gap-2 rounded-full text-sm transition-opacity",
51
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
52
+ canClick && status !== "current" && "hover:opacity-80"
53
+ ),
54
+ children: [
55
+ /* @__PURE__ */ jsx(StepCircle, { index: i, status }),
56
+ /* @__PURE__ */ jsx(
57
+ "span",
58
+ {
59
+ className: cn(
60
+ "whitespace-nowrap transition-colors",
61
+ status === "current" && "font-semibold text-foreground",
62
+ status === "complete" && "font-medium text-foreground/80",
63
+ status === "upcoming" && "text-foreground/40"
64
+ ),
65
+ children: step.title
66
+ }
67
+ )
68
+ ]
69
+ })
70
+ ),
71
+ !isLast && /* @__PURE__ */ jsx(StepConnector, { filled: i < activeStep })
72
+ ] }, step.id);
73
+ }) }),
74
+ /* @__PURE__ */ jsxs("div", { className: "md:hidden", children: [
75
+ /* @__PURE__ */ jsx("ol", { className: "flex items-center gap-1.5", role: "list", children: steps.map((step, i) => {
76
+ const status = i < activeStep ? "complete" : i === activeStep ? "current" : "upcoming";
77
+ const canClick = isInteractive && i <= reachable;
78
+ return /* @__PURE__ */ jsx("li", { className: "flex-1", children: canClick ? /* @__PURE__ */ jsx(
79
+ "button",
80
+ {
81
+ type: "button",
82
+ onClick: () => onStepClick == null ? void 0 : onStepClick(i),
83
+ "aria-label": `${i + 1}. ${step.title}`,
84
+ "aria-current": status === "current" ? "step" : void 0,
85
+ className: cn(
86
+ "block w-full h-1.5 rounded-full transition-colors",
87
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
88
+ status === "current" && "bg-foreground",
89
+ status === "complete" && "bg-foreground/50",
90
+ status === "upcoming" && "bg-foreground/15"
91
+ )
92
+ }
93
+ ) : /* @__PURE__ */ jsx(
94
+ "div",
95
+ {
96
+ "aria-label": `${i + 1}. ${step.title}`,
97
+ "aria-current": status === "current" ? "step" : void 0,
98
+ className: cn(
99
+ "block w-full h-1.5 rounded-full transition-colors",
100
+ status === "current" && "bg-foreground",
101
+ status === "complete" && "bg-foreground/50",
102
+ status === "upcoming" && "bg-foreground/15"
103
+ )
104
+ }
105
+ ) }, step.id);
106
+ }) }),
107
+ /* @__PURE__ */ jsx("p", { className: "mt-3 text-xs uppercase tracking-[0.12em] text-foreground/40", children: `${activeStep + 1} / ${steps.length}` }),
108
+ /* @__PURE__ */ jsx("p", { className: "mt-1 text-base font-semibold text-foreground", children: (_a2 = steps[activeStep]) == null ? void 0 : _a2.title })
109
+ ] })
110
+ ]
111
+ })
112
+ );
113
+ }
114
+ );
115
+ Stepper.displayName = "Stepper";
116
+ function StepCircle({ index, status }) {
117
+ const isFilled = status !== "upcoming";
118
+ const isComplete = status === "complete";
119
+ return /* @__PURE__ */ jsxs(
120
+ "span",
121
+ {
122
+ "aria-hidden": "true",
123
+ className: "relative inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full",
124
+ children: [
125
+ /* @__PURE__ */ jsx(
126
+ "span",
127
+ {
128
+ className: cn(
129
+ "absolute inset-0 rounded-full border transition-opacity duration-300",
130
+ isFilled ? "opacity-0 border-transparent" : "opacity-100 border-foreground/25"
131
+ )
132
+ }
133
+ ),
134
+ /* @__PURE__ */ jsx(
135
+ "span",
136
+ {
137
+ className: cn(
138
+ "absolute inset-0 rounded-full bg-foreground origin-center transition-transform duration-300 ease-out",
139
+ isFilled ? "scale-100" : "scale-0"
140
+ )
141
+ }
142
+ ),
143
+ /* @__PURE__ */ jsx(
144
+ "span",
145
+ {
146
+ className: cn(
147
+ "relative text-xs font-semibold transition-opacity duration-200",
148
+ isComplete ? "opacity-0" : "opacity-100",
149
+ status === "current" ? "text-background" : "text-foreground/40"
150
+ ),
151
+ children: index + 1
152
+ }
153
+ ),
154
+ /* @__PURE__ */ jsx(
155
+ "svg",
156
+ {
157
+ className: "pointer-events-none absolute inset-0 m-auto h-3.5 w-3.5 text-background",
158
+ viewBox: "0 0 24 24",
159
+ fill: "none",
160
+ stroke: "currentColor",
161
+ strokeWidth: "3",
162
+ strokeLinecap: "round",
163
+ strokeLinejoin: "round",
164
+ children: /* @__PURE__ */ jsx(
165
+ "path",
166
+ {
167
+ d: "M5 12 L10 17 L20 7",
168
+ pathLength: 1,
169
+ strokeDasharray: "1",
170
+ strokeDashoffset: isComplete ? 0 : 1,
171
+ style: {
172
+ transition: isComplete ? "stroke-dashoffset 450ms cubic-bezier(0.65, 0, 0.35, 1) 180ms" : "stroke-dashoffset 150ms ease-in"
173
+ }
174
+ }
175
+ )
176
+ }
177
+ )
178
+ ]
179
+ }
180
+ );
181
+ }
182
+ function StepConnector({ filled }) {
183
+ return /* @__PURE__ */ jsx(
184
+ "div",
185
+ {
186
+ "aria-hidden": "true",
187
+ className: "relative h-1 flex-1 mx-3 overflow-hidden rounded-full bg-foreground/10",
188
+ children: /* @__PURE__ */ jsx(
189
+ "div",
190
+ {
191
+ className: "absolute inset-y-0 left-0 rounded-full bg-foreground/50 transition-[width] duration-500 ease-out",
192
+ style: { width: filled ? "100%" : "0%" }
193
+ }
194
+ )
195
+ }
196
+ );
197
+ }
198
+
199
+ export { Stepper };
@@ -9,17 +9,18 @@ var Switch = React.forwardRef((_a, ref) => {
9
9
  return /* @__PURE__ */ jsx(
10
10
  SwitchPrimitive.Root,
11
11
  __spreadProps(__spreadValues({
12
+ ref,
13
+ "data-slot": "switch",
12
14
  className: cn(
13
- "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input glass data-[state=checked]:shadow-lg data-[state=checked]:shadow-primary/20 hover:shadow-md",
15
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input aria-invalid:ring-2 aria-invalid:ring-destructive/40",
14
16
  className
15
17
  )
16
18
  }, props), {
17
- ref,
18
19
  children: /* @__PURE__ */ jsx(
19
20
  SwitchPrimitive.Thumb,
20
21
  {
21
22
  className: cn(
22
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-all duration-300 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 data-[state=checked]:bg-primary-foreground backdrop-blur-md border border-border/50"
23
+ "pointer-events-none block size-5 rounded-full bg-background shadow-md ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 data-[state=checked]:bg-primary-foreground"
23
24
  )
24
25
  }
25
26
  )
@@ -1,12 +1,30 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
 
3
- declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
4
- declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
4
+ declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & {
5
+ containerClassName?: string;
6
+ } & React.RefAttributes<HTMLTableElement>>;
7
+ declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & {
8
+ sticky?: boolean;
9
+ } & React.RefAttributes<HTMLTableSectionElement>>;
5
10
  declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
6
11
  declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
7
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
8
- declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
12
+ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & {
13
+ interactive?: boolean;
14
+ } & React.RefAttributes<HTMLTableRowElement>>;
15
+ type SortDirection = "asc" | "desc" | "none";
16
+ declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & {
17
+ sortable?: boolean;
18
+ sortDirection?: SortDirection;
19
+ onSort?: () => void;
20
+ } & React.RefAttributes<HTMLTableCellElement>>;
9
21
  declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
10
22
  declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
23
+ declare const TableEmpty: {
24
+ ({ colSpan, children, className, ...props }: React.ComponentProps<"tr"> & {
25
+ colSpan: number;
26
+ }): react_jsx_runtime.JSX.Element;
27
+ displayName: string;
28
+ };
11
29
 
12
- export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
30
+ export { Table, TableBody, TableCaption, TableCell, TableEmpty, TableFooter, TableHead, TableHeader, TableRow };
@@ -1,23 +1,47 @@
1
1
  import { cn } from '../chunk-FEK5XGZW.js';
2
- import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
2
+ import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
3
3
  import * as React from 'react';
4
- import { jsx } from 'react/jsx-runtime';
4
+ import { ChevronUp, ChevronDown, ChevronsUpDown } from 'lucide-react';
5
+ import { jsx, jsxs } from 'react/jsx-runtime';
5
6
 
6
- var Table = React.forwardRef(
7
- (_a, ref) => {
8
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
9
- return /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx("table", __spreadValues({ ref, className: cn("w-full caption-bottom text-sm", className) }, props)) });
10
- }
11
- );
7
+ var Table = React.forwardRef((_a, ref) => {
8
+ var _b = _a, { className, containerClassName } = _b, props = __objRest(_b, ["className", "containerClassName"]);
9
+ return /* @__PURE__ */ jsx("div", { className: cn("relative w-full overflow-auto rounded-xl border border-border", containerClassName), children: /* @__PURE__ */ jsx(
10
+ "table",
11
+ __spreadValues({
12
+ ref,
13
+ "data-slot": "table",
14
+ className: cn("w-full caption-bottom text-sm", className)
15
+ }, props)
16
+ ) });
17
+ });
12
18
  Table.displayName = "Table";
13
19
  var TableHeader = React.forwardRef((_a, ref) => {
14
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
15
- return /* @__PURE__ */ jsx("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
20
+ var _b = _a, { className, sticky } = _b, props = __objRest(_b, ["className", "sticky"]);
21
+ return /* @__PURE__ */ jsx(
22
+ "thead",
23
+ __spreadValues({
24
+ ref,
25
+ "data-slot": "table-header",
26
+ className: cn(
27
+ "bg-muted/50 [&_tr]:border-b [&_tr]:border-border",
28
+ sticky && "sticky top-0 z-10",
29
+ className
30
+ )
31
+ }, props)
32
+ );
16
33
  });
17
34
  TableHeader.displayName = "TableHeader";
18
35
  var TableBody = React.forwardRef((_a, ref) => {
19
36
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
20
- return /* @__PURE__ */ jsx("tbody", __spreadValues({ ref, className: cn("[&_tr:last-child]:border-0", className) }, props));
37
+ return /* @__PURE__ */ jsx(
38
+ "tbody",
39
+ __spreadValues({
40
+ ref,
41
+ "data-slot": "table-body",
42
+ className: cn("[&_tr:last-child]:border-0", className)
43
+ }, props)
44
+ );
21
45
  });
22
46
  TableBody.displayName = "TableBody";
23
47
  var TableFooter = React.forwardRef((_a, ref) => {
@@ -26,40 +50,74 @@ var TableFooter = React.forwardRef((_a, ref) => {
26
50
  "tfoot",
27
51
  __spreadValues({
28
52
  ref,
29
- className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)
53
+ "data-slot": "table-footer",
54
+ className: cn("border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0", className)
30
55
  }, props)
31
56
  );
32
57
  });
33
58
  TableFooter.displayName = "TableFooter";
34
- var TableRow = React.forwardRef(
35
- (_a, ref) => {
36
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
37
- return /* @__PURE__ */ jsx(
38
- "tr",
39
- __spreadValues({
40
- ref,
41
- className: cn(
42
- "border-b border-border/50 transition-all duration-300 hover:bg-muted/30 hover:backdrop-blur-sm data-[state=selected]:bg-muted/50",
43
- className
44
- )
45
- }, props)
46
- );
47
- }
48
- );
49
- TableRow.displayName = "TableRow";
50
- var TableHead = React.forwardRef((_a, ref) => {
51
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
59
+ var TableRow = React.forwardRef((_a, ref) => {
60
+ var _b = _a, { className, interactive } = _b, props = __objRest(_b, ["className", "interactive"]);
52
61
  return /* @__PURE__ */ jsx(
53
- "th",
62
+ "tr",
54
63
  __spreadValues({
55
64
  ref,
65
+ "data-slot": "table-row",
56
66
  className: cn(
57
- "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
67
+ "border-b border-border transition-colors data-[state=selected]:bg-muted",
68
+ interactive && "cursor-pointer hover:bg-muted/50",
58
69
  className
59
70
  )
60
71
  }, props)
61
72
  );
62
73
  });
74
+ TableRow.displayName = "TableRow";
75
+ var TableHead = React.forwardRef(
76
+ (_a, ref) => {
77
+ var _b = _a, { className, sortable, sortDirection = "none", onSort, children } = _b, props = __objRest(_b, ["className", "sortable", "sortDirection", "onSort", "children"]);
78
+ if (!sortable) {
79
+ return /* @__PURE__ */ jsx(
80
+ "th",
81
+ __spreadProps(__spreadValues({
82
+ ref,
83
+ "data-slot": "table-head",
84
+ className: cn(
85
+ "h-11 px-4 text-left align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground [&:has([role=checkbox])]:pr-0",
86
+ className
87
+ )
88
+ }, props), {
89
+ children
90
+ })
91
+ );
92
+ }
93
+ const ariaSort = sortDirection === "asc" ? "ascending" : sortDirection === "desc" ? "descending" : "none";
94
+ return /* @__PURE__ */ jsx(
95
+ "th",
96
+ __spreadProps(__spreadValues({
97
+ ref,
98
+ "data-slot": "table-head",
99
+ "aria-sort": ariaSort,
100
+ className: cn(
101
+ "h-11 px-4 text-left align-middle text-xs font-semibold uppercase tracking-wide text-muted-foreground [&:has([role=checkbox])]:pr-0",
102
+ className
103
+ )
104
+ }, props), {
105
+ children: /* @__PURE__ */ jsxs(
106
+ "button",
107
+ {
108
+ type: "button",
109
+ onClick: onSort,
110
+ className: "inline-flex items-center gap-1 rounded-sm text-inherit transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
111
+ children: [
112
+ children,
113
+ sortDirection === "asc" ? /* @__PURE__ */ jsx(ChevronUp, { className: "size-3.5", "aria-hidden": true }) : sortDirection === "desc" ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5", "aria-hidden": true }) : /* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-3.5 opacity-50", "aria-hidden": true })
114
+ ]
115
+ }
116
+ )
117
+ })
118
+ );
119
+ }
120
+ );
63
121
  TableHead.displayName = "TableHead";
64
122
  var TableCell = React.forwardRef((_a, ref) => {
65
123
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
@@ -67,15 +125,43 @@ var TableCell = React.forwardRef((_a, ref) => {
67
125
  "td",
68
126
  __spreadValues({
69
127
  ref,
70
- className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)
128
+ "data-slot": "table-cell",
129
+ className: cn("p-4 align-middle text-sm [&:has([role=checkbox])]:pr-0", className)
71
130
  }, props)
72
131
  );
73
132
  });
74
133
  TableCell.displayName = "TableCell";
75
134
  var TableCaption = React.forwardRef((_a, ref) => {
76
135
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
77
- return /* @__PURE__ */ jsx("caption", __spreadValues({ ref, className: cn("mt-4 text-sm text-muted-foreground", className) }, props));
136
+ return /* @__PURE__ */ jsx(
137
+ "caption",
138
+ __spreadValues({
139
+ ref,
140
+ "data-slot": "table-caption",
141
+ className: cn("mt-4 text-sm text-muted-foreground", className)
142
+ }, props)
143
+ );
78
144
  });
79
145
  TableCaption.displayName = "TableCaption";
146
+ var TableEmpty = (_a) => {
147
+ var _b = _a, {
148
+ colSpan,
149
+ children = "No results.",
150
+ className
151
+ } = _b, props = __objRest(_b, [
152
+ "colSpan",
153
+ "children",
154
+ "className"
155
+ ]);
156
+ return /* @__PURE__ */ jsx("tr", __spreadProps(__spreadValues({ "data-slot": "table-empty" }, props), { children: /* @__PURE__ */ jsx(
157
+ "td",
158
+ {
159
+ colSpan,
160
+ className: cn("h-24 text-center text-sm text-muted-foreground", className),
161
+ children
162
+ }
163
+ ) }));
164
+ };
165
+ TableEmpty.displayName = "TableEmpty";
80
166
 
81
- export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
167
+ export { Table, TableBody, TableCaption, TableCell, TableEmpty, TableFooter, TableHead, TableHeader, TableRow };