@bearmenu/ui 0.1.0

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 (207) hide show
  1. package/dist/chunk-2CUFS5LF.js +80 -0
  2. package/dist/chunk-3GWWZKX7.js +33 -0
  3. package/dist/chunk-3VMDCCCX.js +10 -0
  4. package/dist/chunk-4AVS6CV4.js +89 -0
  5. package/dist/chunk-4JOV7FXW.js +17 -0
  6. package/dist/chunk-4KOMHDZD.js +89 -0
  7. package/dist/chunk-4UO73SKC.js +26 -0
  8. package/dist/chunk-7H54PTVH.js +116 -0
  9. package/dist/chunk-CW24PLDW.js +24 -0
  10. package/dist/chunk-EBAMCZDW.js +112 -0
  11. package/dist/chunk-ERMIA7NP.js +106 -0
  12. package/dist/chunk-ESO2EM3L.js +46 -0
  13. package/dist/chunk-EUHEIWHZ.js +32 -0
  14. package/dist/chunk-FEK5XGZW.js +8 -0
  15. package/dist/chunk-NKHH23YK.js +31 -0
  16. package/dist/chunk-R47NEOSI.js +78 -0
  17. package/dist/chunk-UXAYXRFN.js +69 -0
  18. package/dist/chunk-X6GATUI2.js +19 -0
  19. package/dist/components/accordion.d.ts +9 -0
  20. package/dist/components/accordion.js +53 -0
  21. package/dist/components/alert-dialog.d.ts +23 -0
  22. package/dist/components/alert-dialog.js +98 -0
  23. package/dist/components/alert.d.ts +11 -0
  24. package/dist/components/alert.js +52 -0
  25. package/dist/components/aspect-ratio.d.ts +6 -0
  26. package/dist/components/aspect-ratio.js +2 -0
  27. package/dist/components/avatar.d.ts +8 -0
  28. package/dist/components/avatar.js +47 -0
  29. package/dist/components/badge.d.ts +13 -0
  30. package/dist/components/badge.js +3 -0
  31. package/dist/components/breadcrumb.d.ts +14 -0
  32. package/dist/components/breadcrumb.js +96 -0
  33. package/dist/components/button.d.ts +16 -0
  34. package/dist/components/button.js +4 -0
  35. package/dist/components/calendar.d.ts +11 -0
  36. package/dist/components/calendar.js +56 -0
  37. package/dist/components/card.d.ts +13 -0
  38. package/dist/components/card.js +4 -0
  39. package/dist/components/carousel.d.ts +24 -0
  40. package/dist/components/carousel.js +198 -0
  41. package/dist/components/checkbox.d.ts +6 -0
  42. package/dist/components/checkbox.js +25 -0
  43. package/dist/components/collapsible.d.ts +8 -0
  44. package/dist/components/collapsible.js +26 -0
  45. package/dist/components/command.d.ts +84 -0
  46. package/dist/components/command.js +4 -0
  47. package/dist/components/currency-input.d.ts +17 -0
  48. package/dist/components/currency-input.js +121 -0
  49. package/dist/components/dialog.d.ts +22 -0
  50. package/dist/components/dialog.js +3 -0
  51. package/dist/components/drawer.d.ts +27 -0
  52. package/dist/components/drawer.js +85 -0
  53. package/dist/components/dropdown-menu.d.ts +28 -0
  54. package/dist/components/dropdown-menu.js +211 -0
  55. package/dist/components/empty-state.d.ts +22 -0
  56. package/dist/components/empty-state.js +81 -0
  57. package/dist/components/form.d.ts +28 -0
  58. package/dist/components/form.js +97 -0
  59. package/dist/components/haptic-button.d.ts +12 -0
  60. package/dist/components/haptic-button.js +17 -0
  61. package/dist/components/input-otp.d.ts +14 -0
  62. package/dist/components/input-otp.js +62 -0
  63. package/dist/components/input.d.ts +6 -0
  64. package/dist/components/input.js +3 -0
  65. package/dist/components/label.d.ts +8 -0
  66. package/dist/components/label.js +3 -0
  67. package/dist/components/lazy-markdown.d.ts +11 -0
  68. package/dist/components/lazy-markdown.js +13 -0
  69. package/dist/components/link-button.d.ts +30 -0
  70. package/dist/components/link-button.js +17 -0
  71. package/dist/components/markdown-renderer.d.ts +11 -0
  72. package/dist/components/markdown-renderer.js +10 -0
  73. package/dist/components/multi-select-combobox.d.ts +23 -0
  74. package/dist/components/multi-select-combobox.js +114 -0
  75. package/dist/components/pagination.d.ts +18 -0
  76. package/dist/components/pagination.js +101 -0
  77. package/dist/components/popover.d.ts +8 -0
  78. package/dist/components/popover.js +3 -0
  79. package/dist/components/progress.d.ts +6 -0
  80. package/dist/components/progress.js +30 -0
  81. package/dist/components/radio-group.d.ts +7 -0
  82. package/dist/components/radio-group.js +30 -0
  83. package/dist/components/rating.d.ts +15 -0
  84. package/dist/components/rating.js +120 -0
  85. package/dist/components/scroll-area.d.ts +7 -0
  86. package/dist/components/scroll-area.js +44 -0
  87. package/dist/components/search-bar.d.ts +17 -0
  88. package/dist/components/search-bar.js +92 -0
  89. package/dist/components/searchable-select.d.ts +22 -0
  90. package/dist/components/searchable-select.js +104 -0
  91. package/dist/components/select.d.ts +15 -0
  92. package/dist/components/select.js +129 -0
  93. package/dist/components/separator.d.ts +6 -0
  94. package/dist/components/separator.js +25 -0
  95. package/dist/components/sheet.d.ts +29 -0
  96. package/dist/components/sheet.js +96 -0
  97. package/dist/components/skeleton-card.d.ts +13 -0
  98. package/dist/components/skeleton-card.js +154 -0
  99. package/dist/components/skeleton.d.ts +6 -0
  100. package/dist/components/skeleton.js +3 -0
  101. package/dist/components/slider.d.ts +6 -0
  102. package/dist/components/slider.js +24 -0
  103. package/dist/components/sliding-panels.d.ts +19 -0
  104. package/dist/components/sliding-panels.js +75 -0
  105. package/dist/components/sonner.d.ts +6 -0
  106. package/dist/components/sonner.js +23 -0
  107. package/dist/components/sticky-container.d.ts +44 -0
  108. package/dist/components/sticky-container.js +39 -0
  109. package/dist/components/switch.d.ts +6 -0
  110. package/dist/components/switch.js +31 -0
  111. package/dist/components/table.d.ts +12 -0
  112. package/dist/components/table.js +81 -0
  113. package/dist/components/tabs.d.ts +12 -0
  114. package/dist/components/tabs.js +55 -0
  115. package/dist/components/text.d.ts +31 -0
  116. package/dist/components/text.js +3 -0
  117. package/dist/components/textarea.d.ts +6 -0
  118. package/dist/components/textarea.js +23 -0
  119. package/dist/components/toast.d.ts +18 -0
  120. package/dist/components/toast.js +3 -0
  121. package/dist/components/toaster.d.ts +5 -0
  122. package/dist/components/toaster.js +25 -0
  123. package/dist/components/toggle-group.d.ts +12 -0
  124. package/dist/components/toggle-group.js +72 -0
  125. package/dist/components/toggle.d.ts +13 -0
  126. package/dist/components/toggle.js +3 -0
  127. package/dist/components/tooltip.d.ts +9 -0
  128. package/dist/components/tooltip.js +26 -0
  129. package/dist/components/use-mobile.d.ts +3 -0
  130. package/dist/components/use-mobile.js +19 -0
  131. package/dist/components/use-toast.d.ts +42 -0
  132. package/dist/components/use-toast.js +2 -0
  133. package/dist/hooks/use-haptic.d.ts +22 -0
  134. package/dist/hooks/use-haptic.js +2 -0
  135. package/dist/hooks/use-mobile.d.ts +3 -0
  136. package/dist/hooks/use-mobile.js +19 -0
  137. package/dist/hooks/use-mounted-theme.d.ts +6 -0
  138. package/dist/hooks/use-mounted-theme.js +18 -0
  139. package/dist/hooks/use-sticky.d.ts +18 -0
  140. package/dist/hooks/use-sticky.js +2 -0
  141. package/dist/lib/utils.d.ts +5 -0
  142. package/dist/lib/utils.js +2 -0
  143. package/package.json +203 -0
  144. package/src/components/accordion.tsx +57 -0
  145. package/src/components/alert-dialog.tsx +116 -0
  146. package/src/components/alert.tsx +57 -0
  147. package/src/components/aspect-ratio.tsx +9 -0
  148. package/src/components/avatar.tsx +49 -0
  149. package/src/components/badge.tsx +38 -0
  150. package/src/components/breadcrumb.tsx +102 -0
  151. package/src/components/button.tsx +94 -0
  152. package/src/components/calendar.tsx +60 -0
  153. package/src/components/card.tsx +67 -0
  154. package/src/components/carousel.tsx +230 -0
  155. package/src/components/checkbox.tsx +27 -0
  156. package/src/components/collapsible.tsx +28 -0
  157. package/src/components/command.tsx +148 -0
  158. package/src/components/currency-input.tsx +158 -0
  159. package/src/components/dialog.tsx +103 -0
  160. package/src/components/drawer.tsx +99 -0
  161. package/src/components/dropdown-menu.tsx +228 -0
  162. package/src/components/empty-state.tsx +118 -0
  163. package/src/components/form.tsx +152 -0
  164. package/src/components/haptic-button.tsx +19 -0
  165. package/src/components/input-otp.tsx +70 -0
  166. package/src/components/input.tsx +23 -0
  167. package/src/components/label.tsx +20 -0
  168. package/src/components/lazy-markdown.tsx +20 -0
  169. package/src/components/link-button.tsx +40 -0
  170. package/src/components/markdown-renderer.tsx +20 -0
  171. package/src/components/multi-select-combobox.tsx +148 -0
  172. package/src/components/pagination.tsx +106 -0
  173. package/src/components/popover.tsx +30 -0
  174. package/src/components/progress.tsx +27 -0
  175. package/src/components/radio-group.tsx +37 -0
  176. package/src/components/rating.tsx +136 -0
  177. package/src/components/scroll-area.tsx +45 -0
  178. package/src/components/search-bar.tsx +113 -0
  179. package/src/components/searchable-select.tsx +134 -0
  180. package/src/components/select.tsx +152 -0
  181. package/src/components/separator.tsx +25 -0
  182. package/src/components/sheet.tsx +121 -0
  183. package/src/components/skeleton-card.tsx +282 -0
  184. package/src/components/skeleton.tsx +17 -0
  185. package/src/components/slider.tsx +24 -0
  186. package/src/components/sliding-panels.tsx +99 -0
  187. package/src/components/sonner.tsx +25 -0
  188. package/src/components/sticky-container.tsx +88 -0
  189. package/src/components/switch.tsx +28 -0
  190. package/src/components/table.tsx +90 -0
  191. package/src/components/tabs.tsx +72 -0
  192. package/src/components/text.test.tsx +192 -0
  193. package/src/components/text.tsx +114 -0
  194. package/src/components/textarea.tsx +22 -0
  195. package/src/components/toast.tsx +129 -0
  196. package/src/components/toaster.tsx +31 -0
  197. package/src/components/toggle-group.tsx +69 -0
  198. package/src/components/toggle.tsx +46 -0
  199. package/src/components/tooltip.tsx +29 -0
  200. package/src/components/use-mobile.tsx +19 -0
  201. package/src/components/use-toast.ts +180 -0
  202. package/src/globals.css +409 -0
  203. package/src/hooks/use-haptic.ts +118 -0
  204. package/src/hooks/use-mobile.ts +19 -0
  205. package/src/hooks/use-mounted-theme.ts +20 -0
  206. package/src/hooks/use-sticky.ts +47 -0
  207. package/src/lib/utils.ts +6 -0
@@ -0,0 +1,101 @@
1
+ import { buttonVariants } from '../chunk-2CUFS5LF.js';
2
+ import '../chunk-R47NEOSI.js';
3
+ import { cn } from '../chunk-FEK5XGZW.js';
4
+ import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
5
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ function Pagination(_a) {
9
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
10
+ return /* @__PURE__ */ jsx(
11
+ "nav",
12
+ __spreadValues({
13
+ role: "navigation",
14
+ "aria-label": "pagination",
15
+ "data-slot": "pagination",
16
+ className: cn("mx-auto flex w-full justify-center", className)
17
+ }, props)
18
+ );
19
+ }
20
+ function PaginationContent(_a) {
21
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
22
+ return /* @__PURE__ */ jsx(
23
+ "ul",
24
+ __spreadValues({
25
+ "data-slot": "pagination-content",
26
+ className: cn("flex flex-row items-center gap-1", className)
27
+ }, props)
28
+ );
29
+ }
30
+ function PaginationItem(_a) {
31
+ var props = __objRest(_a, []);
32
+ return /* @__PURE__ */ jsx("li", __spreadValues({ "data-slot": "pagination-item" }, props));
33
+ }
34
+ function PaginationLink(_a) {
35
+ var _b = _a, { className, isActive, size = "icon" } = _b, props = __objRest(_b, ["className", "isActive", "size"]);
36
+ return /* @__PURE__ */ jsx(
37
+ "a",
38
+ __spreadValues({
39
+ "aria-current": isActive ? "page" : void 0,
40
+ "data-slot": "pagination-link",
41
+ "data-active": isActive,
42
+ className: cn(
43
+ buttonVariants({
44
+ variant: isActive ? "outline" : "ghost",
45
+ size
46
+ }),
47
+ className
48
+ )
49
+ }, props)
50
+ );
51
+ }
52
+ function PaginationPrevious(_a) {
53
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
54
+ return /* @__PURE__ */ jsxs(
55
+ PaginationLink,
56
+ __spreadProps(__spreadValues({
57
+ "aria-label": "Go to previous page",
58
+ size: "default",
59
+ className: cn("gap-1 px-2.5 sm:pl-2.5", className)
60
+ }, props), {
61
+ children: [
62
+ /* @__PURE__ */ jsx(ChevronLeftIcon, {}),
63
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
64
+ ]
65
+ })
66
+ );
67
+ }
68
+ function PaginationNext(_a) {
69
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
70
+ return /* @__PURE__ */ jsxs(
71
+ PaginationLink,
72
+ __spreadProps(__spreadValues({
73
+ "aria-label": "Go to next page",
74
+ size: "default",
75
+ className: cn("gap-1 px-2.5 sm:pr-2.5", className)
76
+ }, props), {
77
+ children: [
78
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
79
+ /* @__PURE__ */ jsx(ChevronRightIcon, {})
80
+ ]
81
+ })
82
+ );
83
+ }
84
+ function PaginationEllipsis(_a) {
85
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
86
+ return /* @__PURE__ */ jsxs(
87
+ "span",
88
+ __spreadProps(__spreadValues({
89
+ "aria-hidden": true,
90
+ "data-slot": "pagination-ellipsis",
91
+ className: cn("flex size-9 items-center justify-center", className)
92
+ }, props), {
93
+ children: [
94
+ /* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
95
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
96
+ ]
97
+ })
98
+ );
99
+ }
100
+
101
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+
4
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
5
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+
8
+ export { Popover, PopoverContent, PopoverTrigger };
@@ -0,0 +1,3 @@
1
+ export { Popover, PopoverContent, PopoverTrigger } from '../chunk-4UO73SKC.js';
2
+ import '../chunk-FEK5XGZW.js';
3
+ import '../chunk-3GWWZKX7.js';
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
3
+
4
+ declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+
6
+ export { Progress };
@@ -0,0 +1,30 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
3
+ import * as React from 'react';
4
+ import * as ProgressPrimitive from '@radix-ui/react-progress';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ var Progress = React.forwardRef((_a, ref) => {
8
+ var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
9
+ return /* @__PURE__ */ jsx(
10
+ ProgressPrimitive.Root,
11
+ __spreadProps(__spreadValues({
12
+ ref,
13
+ className: cn(
14
+ "relative h-2 w-full overflow-hidden rounded-full glass border border-border/50",
15
+ className
16
+ )
17
+ }, props), {
18
+ children: /* @__PURE__ */ jsx(
19
+ ProgressPrimitive.Indicator,
20
+ {
21
+ className: "h-full w-full flex-1 bg-gradient-to-r from-primary to-secondary transition-all duration-500 ease-out shadow-lg",
22
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
23
+ }
24
+ )
25
+ })
26
+ );
27
+ });
28
+ Progress.displayName = ProgressPrimitive.Root.displayName;
29
+
30
+ export { Progress };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+
4
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+
7
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,30 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
3
+ import * as React from 'react';
4
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
5
+ import { Circle } from 'lucide-react';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ var RadioGroup = React.forwardRef((_a, ref) => {
9
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
10
+ return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, __spreadProps(__spreadValues({ className: cn("grid gap-2", className) }, props), { ref }));
11
+ });
12
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
13
+ var RadioGroupItem = React.forwardRef((_a, ref) => {
14
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
15
+ return /* @__PURE__ */ jsx(
16
+ RadioGroupPrimitive.Item,
17
+ __spreadProps(__spreadValues({
18
+ ref,
19
+ className: cn(
20
+ "aspect-square h-5 w-5 rounded-full border border-border glass text-primary transition-all duration-300 focus: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]:border-primary data-[state=checked]:shadow-lg data-[state=checked]:shadow-primary/20 hover:border-accent/50 hover:shadow-md",
21
+ className
22
+ )
23
+ }, props), {
24
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current animate-in zoom-in-50 duration-200" }) })
25
+ })
26
+ );
27
+ });
28
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
29
+
30
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ interface RatingProps {
4
+ value: number;
5
+ max?: number;
6
+ size?: "sm" | "md" | "lg";
7
+ showCount?: boolean;
8
+ reviewCount?: number;
9
+ readonly?: boolean;
10
+ onRatingChange?: (rating: number) => void;
11
+ className?: string;
12
+ }
13
+ declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<HTMLDivElement>>;
14
+
15
+ export { Rating };
@@ -0,0 +1,120 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
3
+ import * as React from 'react';
4
+ import { Star, StarHalf } from 'lucide-react';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ var Rating = React.forwardRef(
8
+ (_a, ref) => {
9
+ var _b = _a, {
10
+ value,
11
+ max = 5,
12
+ size = "md",
13
+ showCount = true,
14
+ reviewCount,
15
+ readonly = true,
16
+ onRatingChange,
17
+ className
18
+ } = _b, props = __objRest(_b, [
19
+ "value",
20
+ "max",
21
+ "size",
22
+ "showCount",
23
+ "reviewCount",
24
+ "readonly",
25
+ "onRatingChange",
26
+ "className"
27
+ ]);
28
+ const [hoverValue, setHoverValue] = React.useState(null);
29
+ const sizeClasses = {
30
+ sm: "h-3 w-3",
31
+ md: "h-4 w-4",
32
+ lg: "h-5 w-5"
33
+ };
34
+ const textSizeClasses = {
35
+ sm: "text-xs",
36
+ md: "text-sm",
37
+ lg: "text-base"
38
+ };
39
+ const handleClick = (rating) => {
40
+ if (!readonly && onRatingChange) {
41
+ onRatingChange(rating);
42
+ }
43
+ };
44
+ const handleMouseEnter = (rating) => {
45
+ if (!readonly) {
46
+ setHoverValue(rating);
47
+ }
48
+ };
49
+ const handleMouseLeave = () => {
50
+ if (!readonly) {
51
+ setHoverValue(null);
52
+ }
53
+ };
54
+ const displayValue = hoverValue != null ? hoverValue : value;
55
+ const fullStars = Math.floor(displayValue);
56
+ const hasHalfStar = displayValue % 1 !== 0;
57
+ const emptyStars = max - fullStars - (hasHalfStar ? 1 : 0);
58
+ return /* @__PURE__ */ jsxs(
59
+ "div",
60
+ __spreadProps(__spreadValues({
61
+ ref,
62
+ className: cn("flex items-center gap-1", !readonly && "cursor-pointer", className)
63
+ }, props), {
64
+ children: [
65
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
66
+ Array.from({ length: fullStars }).map((_, i) => /* @__PURE__ */ jsx(
67
+ Star,
68
+ {
69
+ className: cn(
70
+ sizeClasses[size],
71
+ "fill-primary text-primary transition-colors",
72
+ !readonly && "hover:fill-primary/80"
73
+ ),
74
+ onClick: () => handleClick(i + 1),
75
+ onMouseEnter: () => handleMouseEnter(i + 1),
76
+ onMouseLeave: handleMouseLeave
77
+ },
78
+ `full-${i}`
79
+ )),
80
+ hasHalfStar && /* @__PURE__ */ jsx(
81
+ StarHalf,
82
+ {
83
+ className: cn(
84
+ sizeClasses[size],
85
+ "fill-primary text-primary transition-colors",
86
+ !readonly && "hover:fill-primary/80"
87
+ ),
88
+ onClick: () => handleClick(fullStars + 1),
89
+ onMouseEnter: () => handleMouseEnter(fullStars + 1),
90
+ onMouseLeave: handleMouseLeave
91
+ }
92
+ ),
93
+ Array.from({ length: emptyStars }).map((_, i) => /* @__PURE__ */ jsx(
94
+ Star,
95
+ {
96
+ className: cn(
97
+ sizeClasses[size],
98
+ "text-muted-foreground/30 transition-colors",
99
+ !readonly && "hover:text-primary/50"
100
+ ),
101
+ onClick: () => handleClick(fullStars + (hasHalfStar ? 1 : 0) + i + 1),
102
+ onMouseEnter: () => handleMouseEnter(fullStars + (hasHalfStar ? 1 : 0) + i + 1),
103
+ onMouseLeave: handleMouseLeave
104
+ },
105
+ `empty-${i}`
106
+ ))
107
+ ] }),
108
+ showCount && reviewCount !== void 0 && /* @__PURE__ */ jsxs("span", { className: cn("text-muted-foreground ml-1", textSizeClasses[size]), children: [
109
+ "(",
110
+ reviewCount,
111
+ ")"
112
+ ] })
113
+ ]
114
+ })
115
+ );
116
+ }
117
+ );
118
+ Rating.displayName = "Rating";
119
+
120
+ export { Rating };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
3
+
4
+ declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+
7
+ export { ScrollArea, ScrollBar };
@@ -0,0 +1,44 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
3
+ import * as React from 'react';
4
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ var ScrollArea = React.forwardRef((_a, ref) => {
8
+ var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
9
+ return /* @__PURE__ */ jsxs(
10
+ ScrollAreaPrimitive.Root,
11
+ __spreadProps(__spreadValues({
12
+ ref,
13
+ className: cn("relative overflow-hidden", className)
14
+ }, props), {
15
+ children: [
16
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
17
+ /* @__PURE__ */ jsx(ScrollBar, {}),
18
+ /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
19
+ ]
20
+ })
21
+ );
22
+ });
23
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
24
+ var ScrollBar = React.forwardRef((_a, ref) => {
25
+ var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
26
+ return /* @__PURE__ */ jsx(
27
+ ScrollAreaPrimitive.ScrollAreaScrollbar,
28
+ __spreadProps(__spreadValues({
29
+ ref,
30
+ orientation,
31
+ className: cn(
32
+ "flex touch-none select-none transition-colors",
33
+ orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
34
+ orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
35
+ className
36
+ )
37
+ }, props), {
38
+ children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border/50 backdrop-blur-sm hover:bg-border transition-colors" })
39
+ })
40
+ );
41
+ });
42
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
43
+
44
+ export { ScrollArea, ScrollBar };
@@ -0,0 +1,17 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface SearchBarProps {
4
+ placeholder?: string;
5
+ value?: string;
6
+ onChange?: (value: string) => void;
7
+ isSearching?: boolean;
8
+ className?: string;
9
+ inputClassName?: string;
10
+ autoFocus?: boolean;
11
+ inputAriaLabel?: string;
12
+ size?: "default" | "compact";
13
+ variant?: "primary" | "secondary" | "editorial";
14
+ }
15
+ declare function SearchBar({ placeholder, value, onChange, isSearching, className, inputClassName, autoFocus, inputAriaLabel, size, variant, }: SearchBarProps): react_jsx_runtime.JSX.Element;
16
+
17
+ export { SearchBar };
@@ -0,0 +1,92 @@
1
+ import { Card } from '../chunk-UXAYXRFN.js';
2
+ import '../chunk-4KOMHDZD.js';
3
+ import { cn } from '../chunk-FEK5XGZW.js';
4
+ import '../chunk-3GWWZKX7.js';
5
+ import { Search, Loader2 } from 'lucide-react';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ function SearchBar({
9
+ placeholder = "Search...",
10
+ value = "",
11
+ onChange,
12
+ isSearching = false,
13
+ className,
14
+ inputClassName,
15
+ autoFocus = false,
16
+ inputAriaLabel,
17
+ size = "default",
18
+ variant = "editorial"
19
+ }) {
20
+ const handleInputChange = (e) => {
21
+ const newValue = e.target.value;
22
+ onChange == null ? void 0 : onChange(newValue);
23
+ };
24
+ const Wrapper = variant === "editorial" ? "div" : Card;
25
+ const wrapperClassName = variant === "editorial" ? cn(
26
+ "bg-surface border border-border rounded-[14px] h-12 flex items-center transition-colors focus-within:border-primary",
27
+ className
28
+ ) : cn(
29
+ "border-2 border-primary-foreground/20 backdrop-blur-xl rounded-lg p-0",
30
+ size === "compact" ? "md:p-1.5" : "md:p-2",
31
+ variant === "primary" ? "!bg-primary-foreground/10 !text-primary !border-primary/20" : "!bg-primary !text-primary-foreground !border-primary/20",
32
+ className
33
+ );
34
+ return /* @__PURE__ */ jsx(Wrapper, { className: wrapperClassName, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
35
+ /* @__PURE__ */ jsx(
36
+ "div",
37
+ {
38
+ className: cn(
39
+ "absolute top-1/2 z-10 -translate-y-1/2",
40
+ size === "compact" ? "left-3.5" : "left-4"
41
+ ),
42
+ children: /* @__PURE__ */ jsx(
43
+ Search,
44
+ {
45
+ className: cn(
46
+ variant === "editorial" ? "text-muted-foreground" : variant === "primary" ? "text-primary" : "text-primary-foreground",
47
+ size === "compact" ? "h-3.5 w-3.5" : "h-4 w-4"
48
+ )
49
+ }
50
+ )
51
+ }
52
+ ),
53
+ /* @__PURE__ */ jsx(
54
+ "input",
55
+ {
56
+ type: "text",
57
+ placeholder,
58
+ value,
59
+ onChange: handleInputChange,
60
+ autoFocus,
61
+ "aria-label": inputAriaLabel != null ? inputAriaLabel : placeholder,
62
+ className: cn(
63
+ "w-full bg-transparent border-0 focus:outline-none focus-visible:outline-none",
64
+ size === "compact" ? "pl-9 pr-3 py-2.5 text-sm placeholder:text-sm rounded-lg" : "pl-10 pr-4 py-3 text-[14px] placeholder:text-[14px] rounded-[14px]",
65
+ variant === "editorial" ? "text-foreground placeholder:text-muted-foreground" : variant === "primary" ? "!text-primary placeholder:text-primary/60" : "!text-primary-foreground placeholder:text-primary-foreground/60",
66
+ inputClassName
67
+ )
68
+ }
69
+ ),
70
+ isSearching && /* @__PURE__ */ jsx(
71
+ "div",
72
+ {
73
+ className: cn(
74
+ "absolute top-1/2 -translate-y-1/2",
75
+ size === "compact" ? "right-3.5" : "right-4"
76
+ ),
77
+ children: /* @__PURE__ */ jsx(
78
+ Loader2,
79
+ {
80
+ className: cn(
81
+ "animate-spin",
82
+ variant === "editorial" ? "text-muted-foreground" : "text-primary/60",
83
+ size === "compact" ? "h-3.5 w-3.5" : "h-4 w-4"
84
+ )
85
+ }
86
+ )
87
+ }
88
+ )
89
+ ] }) });
90
+ }
91
+
92
+ export { SearchBar };
@@ -0,0 +1,22 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface SelectOption {
4
+ value: string;
5
+ label: string;
6
+ description?: string;
7
+ }
8
+ interface SearchableSelectProps {
9
+ options: SelectOption[];
10
+ value: string | undefined;
11
+ onValueChange: (value: string | undefined) => void;
12
+ placeholder?: string;
13
+ searchPlaceholder?: string;
14
+ emptyText?: string;
15
+ className?: string;
16
+ disabled?: boolean;
17
+ loading?: boolean;
18
+ onSearchChange?: (search: string) => void;
19
+ }
20
+ declare function SearchableSelect({ options, value, onValueChange, placeholder, searchPlaceholder, emptyText, className, disabled, loading, onSearchChange, }: SearchableSelectProps): react_jsx_runtime.JSX.Element;
21
+
22
+ export { SearchableSelect, type SelectOption };
@@ -0,0 +1,104 @@
1
+ import { Popover, PopoverTrigger, PopoverContent } from '../chunk-4UO73SKC.js';
2
+ import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-7H54PTVH.js';
3
+ import '../chunk-4AVS6CV4.js';
4
+ import { Button } from '../chunk-2CUFS5LF.js';
5
+ import '../chunk-R47NEOSI.js';
6
+ import { cn } from '../chunk-FEK5XGZW.js';
7
+ import '../chunk-3GWWZKX7.js';
8
+ import * as React from 'react';
9
+ import { X, ChevronsUpDown, Check } from 'lucide-react';
10
+ import { jsxs, jsx } from 'react/jsx-runtime';
11
+
12
+ function SearchableSelect({
13
+ options,
14
+ value,
15
+ onValueChange,
16
+ placeholder = "Select...",
17
+ searchPlaceholder = "Search...",
18
+ emptyText = "No items found.",
19
+ className,
20
+ disabled = false,
21
+ loading = false,
22
+ onSearchChange
23
+ }) {
24
+ const [open, setOpen] = React.useState(false);
25
+ const selectedOption = options.find((opt) => opt.value === value);
26
+ const displayLabel = (selectedOption == null ? void 0 : selectedOption.label) || (value ? value : void 0);
27
+ const handleSelect = (selectedValue) => {
28
+ onValueChange(selectedValue === value ? void 0 : selectedValue);
29
+ setOpen(false);
30
+ };
31
+ const handleClear = (e) => {
32
+ e.stopPropagation();
33
+ onValueChange(void 0);
34
+ };
35
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
36
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
37
+ Button,
38
+ {
39
+ variant: "outline",
40
+ role: "combobox",
41
+ "aria-expanded": open,
42
+ className: cn(
43
+ "w-full justify-between h-10",
44
+ !value && "text-muted-foreground",
45
+ className
46
+ ),
47
+ disabled,
48
+ children: [
49
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: displayLabel || placeholder }),
50
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
51
+ value && /* @__PURE__ */ jsx(
52
+ "div",
53
+ {
54
+ role: "button",
55
+ tabIndex: 0,
56
+ className: "rounded-full p-0.5 hover:bg-accent cursor-pointer",
57
+ onClick: handleClear,
58
+ onKeyDown: (e) => {
59
+ if (e.key === "Enter" || e.key === " ") {
60
+ e.preventDefault();
61
+ handleClear(e);
62
+ }
63
+ },
64
+ children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
65
+ }
66
+ ),
67
+ /* @__PURE__ */ jsx(ChevronsUpDown, { className: "h-4 w-4 shrink-0 opacity-50" })
68
+ ] })
69
+ ]
70
+ }
71
+ ) }),
72
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-full p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { shouldFilter: !onSearchChange, children: [
73
+ /* @__PURE__ */ jsx(CommandInput, { placeholder: searchPlaceholder, onValueChange: onSearchChange }),
74
+ /* @__PURE__ */ jsxs(CommandList, { children: [
75
+ /* @__PURE__ */ jsx(CommandEmpty, { children: loading ? "Loading..." : emptyText }),
76
+ /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(
77
+ CommandItem,
78
+ {
79
+ value: option.value,
80
+ onSelect: () => handleSelect(option.value),
81
+ children: [
82
+ /* @__PURE__ */ jsx(
83
+ Check,
84
+ {
85
+ className: cn(
86
+ "mr-2 h-4 w-4",
87
+ value === option.value ? "opacity-100" : "opacity-0"
88
+ )
89
+ }
90
+ ),
91
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
92
+ /* @__PURE__ */ jsx("span", { children: option.label }),
93
+ option.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: option.description })
94
+ ] })
95
+ ]
96
+ },
97
+ option.value
98
+ )) })
99
+ ] })
100
+ ] }) })
101
+ ] });
102
+ }
103
+
104
+ export { SearchableSelect };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
+
4
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
5
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
7
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };