@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,81 @@
1
+ import { Text } from '../chunk-4KOMHDZD.js';
2
+ import { Button } from '../chunk-2CUFS5LF.js';
3
+ import '../chunk-R47NEOSI.js';
4
+ import { cn } from '../chunk-FEK5XGZW.js';
5
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
6
+ import * as React from 'react';
7
+ import { FileX, AlertCircle, Search } from 'lucide-react';
8
+ import { jsxs, jsx } from 'react/jsx-runtime';
9
+
10
+ var sizeStyles = {
11
+ sm: "py-8 px-4",
12
+ md: "py-12 px-6",
13
+ lg: "py-16 px-8"
14
+ };
15
+ var EmptyState = React.forwardRef(
16
+ (_a, ref) => {
17
+ var _b = _a, {
18
+ title,
19
+ description,
20
+ icon,
21
+ illustration,
22
+ action,
23
+ secondaryAction,
24
+ variant = "default",
25
+ size = "md",
26
+ className
27
+ } = _b, props = __objRest(_b, [
28
+ "title",
29
+ "description",
30
+ "icon",
31
+ "illustration",
32
+ "action",
33
+ "secondaryAction",
34
+ "variant",
35
+ "size",
36
+ "className"
37
+ ]);
38
+ const getDefaultIcon = () => {
39
+ switch (variant) {
40
+ case "search":
41
+ return /* @__PURE__ */ jsx(Search, { className: "h-12 w-12 text-muted-foreground/50" });
42
+ case "error":
43
+ return /* @__PURE__ */ jsx(AlertCircle, { className: "h-12 w-12 text-destructive/50" });
44
+ default:
45
+ return /* @__PURE__ */ jsx(FileX, { className: "h-12 w-12 text-muted-foreground/50" });
46
+ }
47
+ };
48
+ const textColor = variant === "error" ? "destructive" : "muted";
49
+ return /* @__PURE__ */ jsxs(
50
+ "div",
51
+ __spreadProps(__spreadValues({
52
+ ref,
53
+ role: "status",
54
+ className: cn(
55
+ "flex flex-col items-center justify-center text-center",
56
+ sizeStyles[size],
57
+ className
58
+ )
59
+ }, props), {
60
+ children: [
61
+ illustration ? /* @__PURE__ */ jsx("div", { className: "mb-6", children: illustration }) : /* @__PURE__ */ jsx("div", { className: "mb-4", children: icon || getDefaultIcon() }),
62
+ /* @__PURE__ */ jsx(Text, { as: "h3", weight: "semibold", color: textColor, className: "text-lg mb-2", children: title }),
63
+ /* @__PURE__ */ jsx(Text, { as: "p", color: textColor, className: "text-sm max-w-md mb-6", children: description }),
64
+ (action || secondaryAction) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
65
+ action && /* @__PURE__ */ jsx(Button, { onClick: action.onClick, variant: "default", className: "glass-hover", children: action.label }),
66
+ secondaryAction && /* @__PURE__ */ jsx(Button, { onClick: secondaryAction.onClick, variant: "outline", className: "glass-hover", children: secondaryAction.label })
67
+ ] })
68
+ ]
69
+ })
70
+ );
71
+ }
72
+ );
73
+ EmptyState.displayName = "EmptyState";
74
+ var SearchEmptyState = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(EmptyState, __spreadValues({ ref, variant: "search" }, props)));
75
+ SearchEmptyState.displayName = "SearchEmptyState";
76
+ var ErrorEmptyState = React.forwardRef(
77
+ (props, ref) => /* @__PURE__ */ jsx(EmptyState, __spreadValues({ ref, variant: "error" }, props))
78
+ );
79
+ ErrorEmptyState.displayName = "ErrorEmptyState";
80
+
81
+ export { EmptyState, ErrorEmptyState, SearchEmptyState };
@@ -0,0 +1,28 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as react_hook_form from 'react-hook-form';
3
+ import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
4
+ import * as React from 'react';
5
+ import * as LabelPrimitive from '@radix-ui/react-label';
6
+ import { Slot } from '@radix-ui/react-slot';
7
+
8
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
9
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
10
+ declare const useFormField: () => {
11
+ invalid: boolean;
12
+ isDirty: boolean;
13
+ isTouched: boolean;
14
+ isValidating: boolean;
15
+ error?: react_hook_form.FieldError;
16
+ id: string;
17
+ name: string;
18
+ formItemId: string;
19
+ formDescriptionId: string;
20
+ formMessageId: string;
21
+ };
22
+ declare function FormItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
23
+ declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
24
+ declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element;
25
+ declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
26
+ declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element | null;
27
+
28
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
@@ -0,0 +1,97 @@
1
+ import { Label } from '../chunk-4JOV7FXW.js';
2
+ import { cn } from '../chunk-FEK5XGZW.js';
3
+ import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
4
+ import * as React from 'react';
5
+ import { Slot } from '@radix-ui/react-slot';
6
+ import { FormProvider, Controller, useFormContext, useFormState } from 'react-hook-form';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ var Form = FormProvider;
10
+ var FormFieldContext = React.createContext({});
11
+ var FormField = (_a) => {
12
+ var props = __objRest(_a, []);
13
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, __spreadValues({}, props)) });
14
+ };
15
+ var useFormField = () => {
16
+ const fieldContext = React.useContext(FormFieldContext);
17
+ const itemContext = React.useContext(FormItemContext);
18
+ const { getFieldState } = useFormContext();
19
+ const formState = useFormState({ name: fieldContext.name });
20
+ const fieldState = getFieldState(fieldContext.name, formState);
21
+ if (!fieldContext) {
22
+ throw new Error("useFormField should be used within <FormField>");
23
+ }
24
+ const { id } = itemContext;
25
+ return __spreadValues({
26
+ id,
27
+ name: fieldContext.name,
28
+ formItemId: `${id}-form-item`,
29
+ formDescriptionId: `${id}-form-item-description`,
30
+ formMessageId: `${id}-form-item-message`
31
+ }, fieldState);
32
+ };
33
+ var FormItemContext = React.createContext({});
34
+ function FormItem(_a) {
35
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
36
+ const id = React.useId();
37
+ return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", __spreadValues({ "data-slot": "form-item", className: cn("grid gap-2", className) }, props)) });
38
+ }
39
+ function FormLabel(_a) {
40
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
41
+ const { error, formItemId } = useFormField();
42
+ return /* @__PURE__ */ jsx(
43
+ Label,
44
+ __spreadValues({
45
+ "data-slot": "form-label",
46
+ "data-error": !!error,
47
+ className: cn("data-[error=true]:text-destructive", className),
48
+ htmlFor: formItemId
49
+ }, props)
50
+ );
51
+ }
52
+ function FormControl(_a) {
53
+ var props = __objRest(_a, []);
54
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
55
+ return /* @__PURE__ */ jsx(
56
+ Slot,
57
+ __spreadValues({
58
+ "data-slot": "form-control",
59
+ id: formItemId,
60
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
61
+ "aria-invalid": !!error
62
+ }, props)
63
+ );
64
+ }
65
+ function FormDescription(_a) {
66
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
67
+ const { formDescriptionId } = useFormField();
68
+ return /* @__PURE__ */ jsx(
69
+ "p",
70
+ __spreadValues({
71
+ "data-slot": "form-description",
72
+ id: formDescriptionId,
73
+ className: cn("text-muted-foreground text-sm", className)
74
+ }, props)
75
+ );
76
+ }
77
+ function FormMessage(_a) {
78
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
79
+ var _a2;
80
+ const { error, formMessageId } = useFormField();
81
+ const body = error ? String((_a2 = error == null ? void 0 : error.message) != null ? _a2 : "") : props.children;
82
+ if (!body) {
83
+ return null;
84
+ }
85
+ return /* @__PURE__ */ jsx(
86
+ "p",
87
+ __spreadProps(__spreadValues({
88
+ "data-slot": "form-message",
89
+ id: formMessageId,
90
+ className: cn("text-destructive text-sm", className)
91
+ }, props), {
92
+ children: body
93
+ })
94
+ );
95
+ }
96
+
97
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
@@ -0,0 +1,12 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ButtonProps } from './button.js';
3
+ import 'class-variance-authority/types';
4
+ import 'react';
5
+ import 'class-variance-authority';
6
+
7
+ interface HapticButtonProps extends ButtonProps {
8
+ hapticStyle?: "light" | "medium" | "heavy";
9
+ }
10
+ declare function HapticButton({ hapticStyle, onClick, ...props }: HapticButtonProps): react_jsx_runtime.JSX.Element;
11
+
12
+ export { HapticButton };
@@ -0,0 +1,17 @@
1
+ import { Button } from '../chunk-2CUFS5LF.js';
2
+ import { useHaptic } from '../chunk-R47NEOSI.js';
3
+ import '../chunk-FEK5XGZW.js';
4
+ import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ function HapticButton(_a) {
8
+ var _b = _a, { hapticStyle = "light", onClick } = _b, props = __objRest(_b, ["hapticStyle", "onClick"]);
9
+ const { trigger } = useHaptic();
10
+ const handleClick = (e) => {
11
+ trigger(hapticStyle);
12
+ onClick == null ? void 0 : onClick(e);
13
+ };
14
+ return /* @__PURE__ */ jsx(Button, __spreadValues({ onClick: handleClick }, props));
15
+ }
16
+
17
+ export { HapticButton };
@@ -0,0 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { OTPInput } from 'input-otp';
4
+
5
+ declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
6
+ containerClassName?: string;
7
+ }): react_jsx_runtime.JSX.Element;
8
+ declare function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
9
+ declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<"div"> & {
10
+ index: number;
11
+ }): react_jsx_runtime.JSX.Element;
12
+ declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
13
+
14
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,62 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
3
+ import * as React from 'react';
4
+ import { OTPInput, OTPInputContext } from 'input-otp';
5
+ import { MinusIcon } from 'lucide-react';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
+
8
+ function InputOTP(_a) {
9
+ var _b = _a, {
10
+ className,
11
+ containerClassName
12
+ } = _b, props = __objRest(_b, [
13
+ "className",
14
+ "containerClassName"
15
+ ]);
16
+ return /* @__PURE__ */ jsx(
17
+ OTPInput,
18
+ __spreadValues({
19
+ "data-slot": "input-otp",
20
+ containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
21
+ className: cn("disabled:cursor-not-allowed", className)
22
+ }, props)
23
+ );
24
+ }
25
+ function InputOTPGroup(_a) {
26
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
27
+ return /* @__PURE__ */ jsx("div", __spreadValues({ "data-slot": "input-otp-group", className: cn("flex items-center", className) }, props));
28
+ }
29
+ function InputOTPSlot(_a) {
30
+ var _b = _a, {
31
+ index,
32
+ className
33
+ } = _b, props = __objRest(_b, [
34
+ "index",
35
+ "className"
36
+ ]);
37
+ var _a2;
38
+ const inputOTPContext = React.useContext(OTPInputContext);
39
+ const { char, hasFakeCaret, isActive } = (_a2 = inputOTPContext == null ? void 0 : inputOTPContext.slots[index]) != null ? _a2 : {};
40
+ return /* @__PURE__ */ jsxs(
41
+ "div",
42
+ __spreadProps(__spreadValues({
43
+ "data-slot": "input-otp-slot",
44
+ "data-active": isActive,
45
+ className: cn(
46
+ "data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-base shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
47
+ className
48
+ )
49
+ }, props), {
50
+ children: [
51
+ char,
52
+ hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
53
+ ]
54
+ })
55
+ );
56
+ }
57
+ function InputOTPSeparator(_a) {
58
+ var props = __objRest(_a, []);
59
+ return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ "data-slot": "input-otp-separator", role: "separator" }, props), { children: /* @__PURE__ */ jsx(MinusIcon, {}) }));
60
+ }
61
+
62
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+
3
+ type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
4
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
5
+
6
+ export { Input, type InputProps };
@@ -0,0 +1,3 @@
1
+ export { Input } from '../chunk-CW24PLDW.js';
2
+ import '../chunk-FEK5XGZW.js';
3
+ import '../chunk-3GWWZKX7.js';
@@ -0,0 +1,8 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ import { VariantProps } from 'class-variance-authority';
5
+
6
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
7
+
8
+ export { Label };
@@ -0,0 +1,3 @@
1
+ export { Label } from '../chunk-4JOV7FXW.js';
2
+ import '../chunk-FEK5XGZW.js';
3
+ import '../chunk-3GWWZKX7.js';
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Components } from 'react-markdown';
3
+
4
+ type LazyMarkdownProps = {
5
+ content: string;
6
+ className?: string;
7
+ components?: Components;
8
+ };
9
+ declare function LazyMarkdown(props: LazyMarkdownProps): react_jsx_runtime.JSX.Element;
10
+
11
+ export { LazyMarkdown };
@@ -0,0 +1,13 @@
1
+ import { __spreadValues } from '../chunk-3GWWZKX7.js';
2
+ import dynamic from 'next/dynamic';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ var MarkdownRendererDynamic = dynamic(
6
+ () => import('./markdown-renderer.js').then((m) => m.MarkdownRenderer),
7
+ { ssr: false }
8
+ );
9
+ function LazyMarkdown(props) {
10
+ return /* @__PURE__ */ jsx(MarkdownRendererDynamic, __spreadValues({}, props));
11
+ }
12
+
13
+ export { LazyMarkdown };
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ import { ButtonProps } from './button.js';
3
+ import 'class-variance-authority/types';
4
+ import 'class-variance-authority';
5
+
6
+ interface LinkButtonProps extends Omit<ButtonProps, "asChild"> {
7
+ href: string;
8
+ children: React.ReactNode;
9
+ }
10
+ /**
11
+ * LinkButton - A semantically correct button that navigates using Next.js Link
12
+ *
13
+ * @description
14
+ * Combines the visual styling of Button with proper link semantics for navigation.
15
+ * Use this instead of Button with onClick for navigation to get:
16
+ * - Proper HTML semantics (<a> tag)
17
+ * - Right-click "Open in new tab"
18
+ * - Cmd/Ctrl+click to open in new tab
19
+ * - Better SEO and accessibility
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <LinkButton href="/menu/dishes/123" variant="default" size="sm">
24
+ * View Details
25
+ * </LinkButton>
26
+ * ```
27
+ */
28
+ declare const LinkButton: React.ForwardRefExoticComponent<LinkButtonProps & React.RefAttributes<HTMLAnchorElement>>;
29
+
30
+ export { LinkButton, type LinkButtonProps };
@@ -0,0 +1,17 @@
1
+ import { Button } from '../chunk-2CUFS5LF.js';
2
+ import '../chunk-R47NEOSI.js';
3
+ import '../chunk-FEK5XGZW.js';
4
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
5
+ import * as React from 'react';
6
+ import Link from 'next/link';
7
+ import { jsx } from 'react/jsx-runtime';
8
+
9
+ var LinkButton = React.forwardRef(
10
+ (_a, ref) => {
11
+ var _b = _a, { href, children } = _b, buttonProps = __objRest(_b, ["href", "children"]);
12
+ return /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, buttonProps), { asChild: true, children: /* @__PURE__ */ jsx(Link, { href, ref, children }) }));
13
+ }
14
+ );
15
+ LinkButton.displayName = "LinkButton";
16
+
17
+ export { LinkButton };
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Components } from 'react-markdown';
3
+
4
+ type MarkdownRendererProps = {
5
+ content: string;
6
+ className?: string;
7
+ components?: Components;
8
+ };
9
+ declare function MarkdownRenderer({ content, className, components }: MarkdownRendererProps): react_jsx_runtime.JSX.Element;
10
+
11
+ export { MarkdownRenderer };
@@ -0,0 +1,10 @@
1
+ import '../chunk-3GWWZKX7.js';
2
+ import ReactMarkdown from 'react-markdown';
3
+ import remarkGfm from 'remark-gfm';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ function MarkdownRenderer({ content, className, components }) {
7
+ return /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], components, children: content }) });
8
+ }
9
+
10
+ export { MarkdownRenderer };
@@ -0,0 +1,23 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface MultiSelectOption {
4
+ value: string;
5
+ label: string;
6
+ }
7
+ interface MultiSelectComboboxProps {
8
+ options: MultiSelectOption[];
9
+ selected: string[];
10
+ onSelectionChange: (values: string[]) => void;
11
+ placeholder?: string;
12
+ searchPlaceholder?: string;
13
+ emptyText?: string;
14
+ className?: string;
15
+ disabled?: boolean;
16
+ loading?: boolean;
17
+ maxDisplay?: number;
18
+ onSearchChange?: (value: string) => void;
19
+ shouldFilter?: boolean;
20
+ }
21
+ declare function MultiSelectCombobox({ options, selected, onSelectionChange, placeholder, searchPlaceholder, emptyText, className, disabled, loading, maxDisplay, onSearchChange, shouldFilter, }: MultiSelectComboboxProps): react_jsx_runtime.JSX.Element;
22
+
23
+ export { MultiSelectCombobox, type MultiSelectOption };
@@ -0,0 +1,114 @@
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 { Badge } from '../chunk-NKHH23YK.js';
5
+ import { Button } from '../chunk-2CUFS5LF.js';
6
+ import '../chunk-R47NEOSI.js';
7
+ import { cn } from '../chunk-FEK5XGZW.js';
8
+ import '../chunk-3GWWZKX7.js';
9
+ import * as React from 'react';
10
+ import { X, ChevronsUpDown, Check } from 'lucide-react';
11
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
12
+
13
+ function MultiSelectCombobox({
14
+ options,
15
+ selected,
16
+ onSelectionChange,
17
+ placeholder = "Select items...",
18
+ searchPlaceholder = "Search...",
19
+ emptyText = "No items found.",
20
+ className,
21
+ disabled = false,
22
+ loading = false,
23
+ maxDisplay = 3,
24
+ onSearchChange,
25
+ shouldFilter = true
26
+ }) {
27
+ const [open, setOpen] = React.useState(false);
28
+ const handleSelect = (value) => {
29
+ const newSelected = selected.includes(value) ? selected.filter((item) => item !== value) : [...selected, value];
30
+ onSelectionChange(newSelected);
31
+ };
32
+ const handleRemove = (value, e) => {
33
+ e.stopPropagation();
34
+ onSelectionChange(selected.filter((item) => item !== value));
35
+ };
36
+ const selectedLabels = selected.map((value) => {
37
+ var _a;
38
+ return ((_a = options.find((opt) => opt.value === value)) == null ? void 0 : _a.label) || value;
39
+ }).slice(0, maxDisplay);
40
+ const remainingCount = selected.length - maxDisplay;
41
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
42
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
43
+ Button,
44
+ {
45
+ variant: "outline",
46
+ role: "combobox",
47
+ "aria-expanded": open,
48
+ className: cn(
49
+ "w-full justify-between h-auto min-h-10 py-2",
50
+ selected.length === 0 && "text-muted-foreground",
51
+ className
52
+ ),
53
+ disabled,
54
+ children: [
55
+ /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 flex-1 text-left", children: selected.length === 0 ? /* @__PURE__ */ jsx("span", { children: placeholder }) : /* @__PURE__ */ jsxs(Fragment, { children: [
56
+ selectedLabels.map((label, i) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "text-xs", children: [
57
+ label,
58
+ /* @__PURE__ */ jsx(
59
+ "div",
60
+ {
61
+ role: "button",
62
+ tabIndex: 0,
63
+ className: "ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",
64
+ onClick: (e) => handleRemove(selected[i], e),
65
+ onKeyDown: (e) => {
66
+ if (e.key === "Enter" || e.key === " ") {
67
+ e.preventDefault();
68
+ handleRemove(selected[i], e);
69
+ }
70
+ },
71
+ children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
72
+ }
73
+ )
74
+ ] }, selected[i])),
75
+ remainingCount > 0 && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "text-xs", children: [
76
+ "+",
77
+ remainingCount,
78
+ " more"
79
+ ] })
80
+ ] }) }),
81
+ /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
82
+ ]
83
+ }
84
+ ) }),
85
+ /* @__PURE__ */ jsx(PopoverContent, { className: "w-full p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { shouldFilter, children: [
86
+ /* @__PURE__ */ jsx(CommandInput, { placeholder: searchPlaceholder, onValueChange: onSearchChange }),
87
+ /* @__PURE__ */ jsxs(CommandList, { children: [
88
+ /* @__PURE__ */ jsx(CommandEmpty, { children: loading ? "Loading..." : emptyText }),
89
+ /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(
90
+ CommandItem,
91
+ {
92
+ value: option.value,
93
+ onSelect: () => handleSelect(option.value),
94
+ children: [
95
+ /* @__PURE__ */ jsx(
96
+ Check,
97
+ {
98
+ className: cn(
99
+ "mr-2 h-4 w-4",
100
+ selected.includes(option.value) ? "opacity-100" : "opacity-0"
101
+ )
102
+ }
103
+ ),
104
+ option.label
105
+ ]
106
+ },
107
+ option.value
108
+ )) })
109
+ ] })
110
+ ] }) })
111
+ ] });
112
+ }
113
+
114
+ export { MultiSelectCombobox };
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { Button } from './button.js';
4
+ import 'class-variance-authority/types';
5
+ import 'class-variance-authority';
6
+
7
+ declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): react_jsx_runtime.JSX.Element;
8
+ declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): react_jsx_runtime.JSX.Element;
9
+ declare function PaginationItem({ ...props }: React.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
10
+ type PaginationLinkProps = {
11
+ isActive?: boolean;
12
+ } & Pick<React.ComponentProps<typeof Button>, "size"> & React.ComponentProps<"a">;
13
+ declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): react_jsx_runtime.JSX.Element;
14
+ declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
15
+ declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
16
+ declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
17
+
18
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };