@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.
- package/dist/chunk-2CUFS5LF.js +80 -0
- package/dist/chunk-3GWWZKX7.js +33 -0
- package/dist/chunk-3VMDCCCX.js +10 -0
- package/dist/chunk-4AVS6CV4.js +89 -0
- package/dist/chunk-4JOV7FXW.js +17 -0
- package/dist/chunk-4KOMHDZD.js +89 -0
- package/dist/chunk-4UO73SKC.js +26 -0
- package/dist/chunk-7H54PTVH.js +116 -0
- package/dist/chunk-CW24PLDW.js +24 -0
- package/dist/chunk-EBAMCZDW.js +112 -0
- package/dist/chunk-ERMIA7NP.js +106 -0
- package/dist/chunk-ESO2EM3L.js +46 -0
- package/dist/chunk-EUHEIWHZ.js +32 -0
- package/dist/chunk-FEK5XGZW.js +8 -0
- package/dist/chunk-NKHH23YK.js +31 -0
- package/dist/chunk-R47NEOSI.js +78 -0
- package/dist/chunk-UXAYXRFN.js +69 -0
- package/dist/chunk-X6GATUI2.js +19 -0
- package/dist/components/accordion.d.ts +9 -0
- package/dist/components/accordion.js +53 -0
- package/dist/components/alert-dialog.d.ts +23 -0
- package/dist/components/alert-dialog.js +98 -0
- package/dist/components/alert.d.ts +11 -0
- package/dist/components/alert.js +52 -0
- package/dist/components/aspect-ratio.d.ts +6 -0
- package/dist/components/aspect-ratio.js +2 -0
- package/dist/components/avatar.d.ts +8 -0
- package/dist/components/avatar.js +47 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/badge.js +3 -0
- package/dist/components/breadcrumb.d.ts +14 -0
- package/dist/components/breadcrumb.js +96 -0
- package/dist/components/button.d.ts +16 -0
- package/dist/components/button.js +4 -0
- package/dist/components/calendar.d.ts +11 -0
- package/dist/components/calendar.js +56 -0
- package/dist/components/card.d.ts +13 -0
- package/dist/components/card.js +4 -0
- package/dist/components/carousel.d.ts +24 -0
- package/dist/components/carousel.js +198 -0
- package/dist/components/checkbox.d.ts +6 -0
- package/dist/components/checkbox.js +25 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +26 -0
- package/dist/components/command.d.ts +84 -0
- package/dist/components/command.js +4 -0
- package/dist/components/currency-input.d.ts +17 -0
- package/dist/components/currency-input.js +121 -0
- package/dist/components/dialog.d.ts +22 -0
- package/dist/components/dialog.js +3 -0
- package/dist/components/drawer.d.ts +27 -0
- package/dist/components/drawer.js +85 -0
- package/dist/components/dropdown-menu.d.ts +28 -0
- package/dist/components/dropdown-menu.js +211 -0
- package/dist/components/empty-state.d.ts +22 -0
- package/dist/components/empty-state.js +81 -0
- package/dist/components/form.d.ts +28 -0
- package/dist/components/form.js +97 -0
- package/dist/components/haptic-button.d.ts +12 -0
- package/dist/components/haptic-button.js +17 -0
- package/dist/components/input-otp.d.ts +14 -0
- package/dist/components/input-otp.js +62 -0
- package/dist/components/input.d.ts +6 -0
- package/dist/components/input.js +3 -0
- package/dist/components/label.d.ts +8 -0
- package/dist/components/label.js +3 -0
- package/dist/components/lazy-markdown.d.ts +11 -0
- package/dist/components/lazy-markdown.js +13 -0
- package/dist/components/link-button.d.ts +30 -0
- package/dist/components/link-button.js +17 -0
- package/dist/components/markdown-renderer.d.ts +11 -0
- package/dist/components/markdown-renderer.js +10 -0
- package/dist/components/multi-select-combobox.d.ts +23 -0
- package/dist/components/multi-select-combobox.js +114 -0
- package/dist/components/pagination.d.ts +18 -0
- package/dist/components/pagination.js +101 -0
- package/dist/components/popover.d.ts +8 -0
- package/dist/components/popover.js +3 -0
- package/dist/components/progress.d.ts +6 -0
- package/dist/components/progress.js +30 -0
- package/dist/components/radio-group.d.ts +7 -0
- package/dist/components/radio-group.js +30 -0
- package/dist/components/rating.d.ts +15 -0
- package/dist/components/rating.js +120 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.js +44 -0
- package/dist/components/search-bar.d.ts +17 -0
- package/dist/components/search-bar.js +92 -0
- package/dist/components/searchable-select.d.ts +22 -0
- package/dist/components/searchable-select.js +104 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +129 -0
- package/dist/components/separator.d.ts +6 -0
- package/dist/components/separator.js +25 -0
- package/dist/components/sheet.d.ts +29 -0
- package/dist/components/sheet.js +96 -0
- package/dist/components/skeleton-card.d.ts +13 -0
- package/dist/components/skeleton-card.js +154 -0
- package/dist/components/skeleton.d.ts +6 -0
- package/dist/components/skeleton.js +3 -0
- package/dist/components/slider.d.ts +6 -0
- package/dist/components/slider.js +24 -0
- package/dist/components/sliding-panels.d.ts +19 -0
- package/dist/components/sliding-panels.js +75 -0
- package/dist/components/sonner.d.ts +6 -0
- package/dist/components/sonner.js +23 -0
- package/dist/components/sticky-container.d.ts +44 -0
- package/dist/components/sticky-container.js +39 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +31 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/table.js +81 -0
- package/dist/components/tabs.d.ts +12 -0
- package/dist/components/tabs.js +55 -0
- package/dist/components/text.d.ts +31 -0
- package/dist/components/text.js +3 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +23 -0
- package/dist/components/toast.d.ts +18 -0
- package/dist/components/toast.js +3 -0
- package/dist/components/toaster.d.ts +5 -0
- package/dist/components/toaster.js +25 -0
- package/dist/components/toggle-group.d.ts +12 -0
- package/dist/components/toggle-group.js +72 -0
- package/dist/components/toggle.d.ts +13 -0
- package/dist/components/toggle.js +3 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.js +26 -0
- package/dist/components/use-mobile.d.ts +3 -0
- package/dist/components/use-mobile.js +19 -0
- package/dist/components/use-toast.d.ts +42 -0
- package/dist/components/use-toast.js +2 -0
- package/dist/hooks/use-haptic.d.ts +22 -0
- package/dist/hooks/use-haptic.js +2 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +19 -0
- package/dist/hooks/use-mounted-theme.d.ts +6 -0
- package/dist/hooks/use-mounted-theme.js +18 -0
- package/dist/hooks/use-sticky.d.ts +18 -0
- package/dist/hooks/use-sticky.js +2 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +2 -0
- package/package.json +203 -0
- package/src/components/accordion.tsx +57 -0
- package/src/components/alert-dialog.tsx +116 -0
- package/src/components/alert.tsx +57 -0
- package/src/components/aspect-ratio.tsx +9 -0
- package/src/components/avatar.tsx +49 -0
- package/src/components/badge.tsx +38 -0
- package/src/components/breadcrumb.tsx +102 -0
- package/src/components/button.tsx +94 -0
- package/src/components/calendar.tsx +60 -0
- package/src/components/card.tsx +67 -0
- package/src/components/carousel.tsx +230 -0
- package/src/components/checkbox.tsx +27 -0
- package/src/components/collapsible.tsx +28 -0
- package/src/components/command.tsx +148 -0
- package/src/components/currency-input.tsx +158 -0
- package/src/components/dialog.tsx +103 -0
- package/src/components/drawer.tsx +99 -0
- package/src/components/dropdown-menu.tsx +228 -0
- package/src/components/empty-state.tsx +118 -0
- package/src/components/form.tsx +152 -0
- package/src/components/haptic-button.tsx +19 -0
- package/src/components/input-otp.tsx +70 -0
- package/src/components/input.tsx +23 -0
- package/src/components/label.tsx +20 -0
- package/src/components/lazy-markdown.tsx +20 -0
- package/src/components/link-button.tsx +40 -0
- package/src/components/markdown-renderer.tsx +20 -0
- package/src/components/multi-select-combobox.tsx +148 -0
- package/src/components/pagination.tsx +106 -0
- package/src/components/popover.tsx +30 -0
- package/src/components/progress.tsx +27 -0
- package/src/components/radio-group.tsx +37 -0
- package/src/components/rating.tsx +136 -0
- package/src/components/scroll-area.tsx +45 -0
- package/src/components/search-bar.tsx +113 -0
- package/src/components/searchable-select.tsx +134 -0
- package/src/components/select.tsx +152 -0
- package/src/components/separator.tsx +25 -0
- package/src/components/sheet.tsx +121 -0
- package/src/components/skeleton-card.tsx +282 -0
- package/src/components/skeleton.tsx +17 -0
- package/src/components/slider.tsx +24 -0
- package/src/components/sliding-panels.tsx +99 -0
- package/src/components/sonner.tsx +25 -0
- package/src/components/sticky-container.tsx +88 -0
- package/src/components/switch.tsx +28 -0
- package/src/components/table.tsx +90 -0
- package/src/components/tabs.tsx +72 -0
- package/src/components/text.test.tsx +192 -0
- package/src/components/text.tsx +114 -0
- package/src/components/textarea.tsx +22 -0
- package/src/components/toast.tsx +129 -0
- package/src/components/toaster.tsx +31 -0
- package/src/components/toggle-group.tsx +69 -0
- package/src/components/toggle.tsx +46 -0
- package/src/components/tooltip.tsx +29 -0
- package/src/components/use-mobile.tsx +19 -0
- package/src/components/use-toast.ts +180 -0
- package/src/globals.css +409 -0
- package/src/hooks/use-haptic.ts +118 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/use-mounted-theme.ts +20 -0
- package/src/hooks/use-sticky.ts +47 -0
- package/src/lib/utils.ts +6 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
4
|
+
|
|
5
|
+
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
8
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
9
|
+
} & {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
12
|
+
label?: string;
|
|
13
|
+
shouldFilter?: boolean;
|
|
14
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
value?: string;
|
|
17
|
+
onValueChange?: (value: string) => void;
|
|
18
|
+
loop?: boolean;
|
|
19
|
+
disablePointerSelection?: boolean;
|
|
20
|
+
vimBindings?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
type CommandDialogProps = DialogProps;
|
|
23
|
+
declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
25
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
26
|
+
} & {
|
|
27
|
+
asChild?: boolean;
|
|
28
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
29
|
+
value?: string;
|
|
30
|
+
onValueChange?: (search: string) => void;
|
|
31
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
32
|
+
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
35
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
36
|
+
} & {
|
|
37
|
+
asChild?: boolean;
|
|
38
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
39
|
+
label?: string;
|
|
40
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
44
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
45
|
+
} & {
|
|
46
|
+
asChild?: boolean;
|
|
47
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
51
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
52
|
+
} & {
|
|
53
|
+
asChild?: boolean;
|
|
54
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
|
|
55
|
+
heading?: React.ReactNode;
|
|
56
|
+
value?: string;
|
|
57
|
+
forceMount?: boolean;
|
|
58
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
60
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
61
|
+
} & {
|
|
62
|
+
asChild?: boolean;
|
|
63
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
64
|
+
alwaysRender?: boolean;
|
|
65
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
66
|
+
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
67
|
+
children?: React.ReactNode;
|
|
68
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
69
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
70
|
+
} & {
|
|
71
|
+
asChild?: boolean;
|
|
72
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
73
|
+
disabled?: boolean;
|
|
74
|
+
onSelect?: (value: string) => void;
|
|
75
|
+
value?: string;
|
|
76
|
+
keywords?: string[];
|
|
77
|
+
forceMount?: boolean;
|
|
78
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
79
|
+
declare const CommandShortcut: {
|
|
80
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
81
|
+
displayName: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface CurrencyInputProps {
|
|
4
|
+
value: number | null;
|
|
5
|
+
onChange: (value: number | null) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
currency?: string;
|
|
8
|
+
locale?: string;
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const CurrencyInput: React.ForwardRefExoticComponent<CurrencyInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
16
|
+
|
|
17
|
+
export { CurrencyInput };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Input } from '../chunk-CW24PLDW.js';
|
|
2
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
3
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var CurrencyInput = React.forwardRef(
|
|
8
|
+
(_a, ref) => {
|
|
9
|
+
var _b = _a, {
|
|
10
|
+
value,
|
|
11
|
+
onChange,
|
|
12
|
+
placeholder = "Enter amount",
|
|
13
|
+
currency: _currency = "$",
|
|
14
|
+
locale = "en-US",
|
|
15
|
+
min,
|
|
16
|
+
max,
|
|
17
|
+
disabled = false,
|
|
18
|
+
className,
|
|
19
|
+
error
|
|
20
|
+
} = _b, props = __objRest(_b, [
|
|
21
|
+
"value",
|
|
22
|
+
"onChange",
|
|
23
|
+
"placeholder",
|
|
24
|
+
"currency",
|
|
25
|
+
"locale",
|
|
26
|
+
"min",
|
|
27
|
+
"max",
|
|
28
|
+
"disabled",
|
|
29
|
+
"className",
|
|
30
|
+
"error"
|
|
31
|
+
]);
|
|
32
|
+
const [displayValue, setDisplayValue] = React.useState("");
|
|
33
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
34
|
+
const formatNumber = (num) => {
|
|
35
|
+
if (num === null || isNaN(num)) return "";
|
|
36
|
+
return new Intl.NumberFormat(locale, {
|
|
37
|
+
minimumFractionDigits: 0,
|
|
38
|
+
maximumFractionDigits: 2
|
|
39
|
+
}).format(num);
|
|
40
|
+
};
|
|
41
|
+
const parseInput = (input) => {
|
|
42
|
+
const cleaned = input.replace(/[^\d.-]/g, "");
|
|
43
|
+
const parsed = parseFloat(cleaned);
|
|
44
|
+
return isNaN(parsed) ? null : parsed;
|
|
45
|
+
};
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
if (!isFocused) {
|
|
48
|
+
setDisplayValue(formatNumber(value));
|
|
49
|
+
}
|
|
50
|
+
}, [value, isFocused, locale]);
|
|
51
|
+
const handleInputChange = (e) => {
|
|
52
|
+
const inputValue = e.target.value;
|
|
53
|
+
setDisplayValue(inputValue);
|
|
54
|
+
const parsedValue = parseInput(inputValue);
|
|
55
|
+
if (parsedValue !== null) {
|
|
56
|
+
if (min !== void 0 && parsedValue < min) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (max !== void 0 && parsedValue > max) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
onChange(parsedValue);
|
|
64
|
+
};
|
|
65
|
+
const handleFocus = () => {
|
|
66
|
+
setIsFocused(true);
|
|
67
|
+
if (value !== null && value !== void 0 && !isNaN(value)) {
|
|
68
|
+
setDisplayValue(value.toString());
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const handleBlur = () => {
|
|
72
|
+
setIsFocused(false);
|
|
73
|
+
if (value !== null && value !== void 0 && !isNaN(value)) {
|
|
74
|
+
setDisplayValue(formatNumber(value));
|
|
75
|
+
} else {
|
|
76
|
+
setDisplayValue("");
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const handleKeyDown = (e) => {
|
|
80
|
+
if ([8, 9, 27, 13, 46, 35, 36, 37, 38, 39, 40].includes(e.keyCode)) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if ((e.ctrlKey || e.metaKey) && [65, 67, 86, 88, 90].includes(e.keyCode)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (e.keyCode >= 48 && e.keyCode <= 57 || // 0-9
|
|
87
|
+
e.keyCode >= 96 && e.keyCode <= 105 || // numpad 0-9
|
|
88
|
+
e.keyCode === 190 || e.keyCode === 110 || // decimal point
|
|
89
|
+
e.keyCode === 189 || e.keyCode === 109) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
e.preventDefault();
|
|
93
|
+
};
|
|
94
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
95
|
+
/* @__PURE__ */ jsx(
|
|
96
|
+
Input,
|
|
97
|
+
__spreadValues({
|
|
98
|
+
ref,
|
|
99
|
+
type: "text",
|
|
100
|
+
value: displayValue,
|
|
101
|
+
onChange: handleInputChange,
|
|
102
|
+
onFocus: handleFocus,
|
|
103
|
+
onBlur: handleBlur,
|
|
104
|
+
onKeyDown: handleKeyDown,
|
|
105
|
+
placeholder,
|
|
106
|
+
disabled,
|
|
107
|
+
className: cn(
|
|
108
|
+
"pl-8",
|
|
109
|
+
// Space for currency symbol
|
|
110
|
+
error && "border-destructive focus-visible:ring-destructive",
|
|
111
|
+
className
|
|
112
|
+
)
|
|
113
|
+
}, props)
|
|
114
|
+
),
|
|
115
|
+
error && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive mt-1 ml-1", children: error })
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
CurrencyInput.displayName = "CurrencyInput";
|
|
120
|
+
|
|
121
|
+
export { CurrencyInput };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
|
+
|
|
5
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
6
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
8
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const DialogHeader: {
|
|
12
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const DialogFooter: {
|
|
16
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
|
+
|
|
22
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as vaul from 'vaul';
|
|
2
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
3
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
|
|
7
|
+
declare const Drawer: {
|
|
8
|
+
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
declare const DrawerPortal: typeof vaul.Portal;
|
|
13
|
+
declare const DrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const DrawerHeader: {
|
|
17
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
declare const DrawerFooter: {
|
|
21
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
25
|
+
declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
26
|
+
|
|
27
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Drawer as Drawer$1 } from 'vaul';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var Drawer = (_a) => {
|
|
8
|
+
var _b = _a, {
|
|
9
|
+
shouldScaleBackground = false
|
|
10
|
+
} = _b, props = __objRest(_b, [
|
|
11
|
+
"shouldScaleBackground"
|
|
12
|
+
]);
|
|
13
|
+
return /* @__PURE__ */ jsx(Drawer$1.Root, __spreadValues({ shouldScaleBackground }, props));
|
|
14
|
+
};
|
|
15
|
+
Drawer.displayName = "Drawer";
|
|
16
|
+
var DrawerTrigger = Drawer$1.Trigger;
|
|
17
|
+
var DrawerPortal = Drawer$1.Portal;
|
|
18
|
+
var DrawerClose = Drawer$1.Close;
|
|
19
|
+
var DrawerOverlay = React.forwardRef((_a, ref) => {
|
|
20
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
Drawer$1.Overlay,
|
|
23
|
+
__spreadValues({
|
|
24
|
+
ref,
|
|
25
|
+
className: cn("fixed inset-0 z-[1000] bg-black/60", className)
|
|
26
|
+
}, props)
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
30
|
+
var DrawerContent = React.forwardRef((_a, ref) => {
|
|
31
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
32
|
+
return /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
33
|
+
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
34
|
+
/* @__PURE__ */ jsxs(
|
|
35
|
+
Drawer$1.Content,
|
|
36
|
+
__spreadProps(__spreadValues({
|
|
37
|
+
ref,
|
|
38
|
+
className: cn(
|
|
39
|
+
"fixed inset-x-0 bottom-0 z-[1000] flex h-auto max-h-[90vh] flex-col rounded-t-2xl bg-surface border-t border-border shadow-2xl",
|
|
40
|
+
className
|
|
41
|
+
)
|
|
42
|
+
}, props), {
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full dark:bg-muted bg-primary" }),
|
|
45
|
+
children
|
|
46
|
+
]
|
|
47
|
+
})
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
});
|
|
51
|
+
DrawerContent.displayName = "DrawerContent";
|
|
52
|
+
var DrawerHeader = (_a) => {
|
|
53
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("grid gap-1.5 p-4 text-center sm:text-left", className) }, props));
|
|
55
|
+
};
|
|
56
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
57
|
+
var DrawerFooter = (_a) => {
|
|
58
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
59
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("mt-auto flex flex-col gap-2 p-4", className) }, props));
|
|
60
|
+
};
|
|
61
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
62
|
+
var DrawerTitle = React.forwardRef((_a, ref) => {
|
|
63
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
64
|
+
return /* @__PURE__ */ jsx(
|
|
65
|
+
Drawer$1.Title,
|
|
66
|
+
__spreadValues({
|
|
67
|
+
ref,
|
|
68
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
69
|
+
}, props)
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
73
|
+
var DrawerDescription = React.forwardRef((_a, ref) => {
|
|
74
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
Drawer$1.Description,
|
|
77
|
+
__spreadValues({
|
|
78
|
+
ref,
|
|
79
|
+
className: cn("text-sm dark:text-muted-foreground light:text-dark", className)
|
|
80
|
+
}, props)
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
DrawerDescription.displayName = Drawer$1.Description.displayName;
|
|
84
|
+
|
|
85
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
|
+
|
|
5
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: "default" | "destructive";
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
}): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
}): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
|
+
import { CheckIcon, CircleIcon, ChevronRightIcon } from 'lucide-react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function DropdownMenu(_a) {
|
|
8
|
+
var props = __objRest(_a, []);
|
|
9
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, __spreadValues({ "data-slot": "dropdown-menu" }, props));
|
|
10
|
+
}
|
|
11
|
+
function DropdownMenuPortal(_a) {
|
|
12
|
+
var props = __objRest(_a, []);
|
|
13
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, __spreadValues({ "data-slot": "dropdown-menu-portal" }, props));
|
|
14
|
+
}
|
|
15
|
+
function DropdownMenuTrigger(_a) {
|
|
16
|
+
var props = __objRest(_a, []);
|
|
17
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, __spreadValues({ "data-slot": "dropdown-menu-trigger" }, props));
|
|
18
|
+
}
|
|
19
|
+
function DropdownMenuContent(_a) {
|
|
20
|
+
var _b = _a, {
|
|
21
|
+
className,
|
|
22
|
+
sideOffset = 4
|
|
23
|
+
} = _b, props = __objRest(_b, [
|
|
24
|
+
"className",
|
|
25
|
+
"sideOffset"
|
|
26
|
+
]);
|
|
27
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
28
|
+
DropdownMenuPrimitive.Content,
|
|
29
|
+
__spreadValues({
|
|
30
|
+
"data-slot": "dropdown-menu-content",
|
|
31
|
+
sideOffset,
|
|
32
|
+
className: cn(
|
|
33
|
+
"bg-card text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border border-border p-1 shadow-lg",
|
|
34
|
+
className
|
|
35
|
+
)
|
|
36
|
+
}, props)
|
|
37
|
+
) });
|
|
38
|
+
}
|
|
39
|
+
function DropdownMenuGroup(_a) {
|
|
40
|
+
var props = __objRest(_a, []);
|
|
41
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, __spreadValues({ "data-slot": "dropdown-menu-group" }, props));
|
|
42
|
+
}
|
|
43
|
+
function DropdownMenuItem(_a) {
|
|
44
|
+
var _b = _a, {
|
|
45
|
+
className,
|
|
46
|
+
inset,
|
|
47
|
+
variant = "default"
|
|
48
|
+
} = _b, props = __objRest(_b, [
|
|
49
|
+
"className",
|
|
50
|
+
"inset",
|
|
51
|
+
"variant"
|
|
52
|
+
]);
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
DropdownMenuPrimitive.Item,
|
|
55
|
+
__spreadValues({
|
|
56
|
+
"data-slot": "dropdown-menu-item",
|
|
57
|
+
"data-inset": inset,
|
|
58
|
+
"data-variant": variant,
|
|
59
|
+
className: cn(
|
|
60
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
61
|
+
className
|
|
62
|
+
)
|
|
63
|
+
}, props)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function DropdownMenuCheckboxItem(_a) {
|
|
67
|
+
var _b = _a, {
|
|
68
|
+
className,
|
|
69
|
+
children,
|
|
70
|
+
checked
|
|
71
|
+
} = _b, props = __objRest(_b, [
|
|
72
|
+
"className",
|
|
73
|
+
"children",
|
|
74
|
+
"checked"
|
|
75
|
+
]);
|
|
76
|
+
return /* @__PURE__ */ jsxs(
|
|
77
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
78
|
+
__spreadProps(__spreadValues({
|
|
79
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
80
|
+
className: cn(
|
|
81
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
82
|
+
className
|
|
83
|
+
),
|
|
84
|
+
checked
|
|
85
|
+
}, props), {
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
88
|
+
children
|
|
89
|
+
]
|
|
90
|
+
})
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
function DropdownMenuRadioGroup(_a) {
|
|
94
|
+
var props = __objRest(_a, []);
|
|
95
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.RadioGroup, __spreadValues({ "data-slot": "dropdown-menu-radio-group" }, props));
|
|
96
|
+
}
|
|
97
|
+
function DropdownMenuRadioItem(_a) {
|
|
98
|
+
var _b = _a, {
|
|
99
|
+
className,
|
|
100
|
+
children
|
|
101
|
+
} = _b, props = __objRest(_b, [
|
|
102
|
+
"className",
|
|
103
|
+
"children"
|
|
104
|
+
]);
|
|
105
|
+
return /* @__PURE__ */ jsxs(
|
|
106
|
+
DropdownMenuPrimitive.RadioItem,
|
|
107
|
+
__spreadProps(__spreadValues({
|
|
108
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
109
|
+
className: cn(
|
|
110
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
111
|
+
className
|
|
112
|
+
)
|
|
113
|
+
}, props), {
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
116
|
+
children
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
function DropdownMenuLabel(_a) {
|
|
122
|
+
var _b = _a, {
|
|
123
|
+
className,
|
|
124
|
+
inset
|
|
125
|
+
} = _b, props = __objRest(_b, [
|
|
126
|
+
"className",
|
|
127
|
+
"inset"
|
|
128
|
+
]);
|
|
129
|
+
return /* @__PURE__ */ jsx(
|
|
130
|
+
DropdownMenuPrimitive.Label,
|
|
131
|
+
__spreadValues({
|
|
132
|
+
"data-slot": "dropdown-menu-label",
|
|
133
|
+
"data-inset": inset,
|
|
134
|
+
className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className)
|
|
135
|
+
}, props)
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
function DropdownMenuSeparator(_a) {
|
|
139
|
+
var _b = _a, {
|
|
140
|
+
className
|
|
141
|
+
} = _b, props = __objRest(_b, [
|
|
142
|
+
"className"
|
|
143
|
+
]);
|
|
144
|
+
return /* @__PURE__ */ jsx(
|
|
145
|
+
DropdownMenuPrimitive.Separator,
|
|
146
|
+
__spreadValues({
|
|
147
|
+
"data-slot": "dropdown-menu-separator",
|
|
148
|
+
className: cn("bg-border -mx-1 my-1 h-px", className)
|
|
149
|
+
}, props)
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
function DropdownMenuShortcut(_a) {
|
|
153
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
154
|
+
return /* @__PURE__ */ jsx(
|
|
155
|
+
"span",
|
|
156
|
+
__spreadValues({
|
|
157
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
158
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className)
|
|
159
|
+
}, props)
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function DropdownMenuSub(_a) {
|
|
163
|
+
var props = __objRest(_a, []);
|
|
164
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, __spreadValues({ "data-slot": "dropdown-menu-sub" }, props));
|
|
165
|
+
}
|
|
166
|
+
function DropdownMenuSubTrigger(_a) {
|
|
167
|
+
var _b = _a, {
|
|
168
|
+
className,
|
|
169
|
+
inset,
|
|
170
|
+
children
|
|
171
|
+
} = _b, props = __objRest(_b, [
|
|
172
|
+
"className",
|
|
173
|
+
"inset",
|
|
174
|
+
"children"
|
|
175
|
+
]);
|
|
176
|
+
return /* @__PURE__ */ jsxs(
|
|
177
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
178
|
+
__spreadProps(__spreadValues({
|
|
179
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
180
|
+
"data-inset": inset,
|
|
181
|
+
className: cn(
|
|
182
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
183
|
+
className
|
|
184
|
+
)
|
|
185
|
+
}, props), {
|
|
186
|
+
children: [
|
|
187
|
+
children,
|
|
188
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
189
|
+
]
|
|
190
|
+
})
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
function DropdownMenuSubContent(_a) {
|
|
194
|
+
var _b = _a, {
|
|
195
|
+
className
|
|
196
|
+
} = _b, props = __objRest(_b, [
|
|
197
|
+
"className"
|
|
198
|
+
]);
|
|
199
|
+
return /* @__PURE__ */ jsx(
|
|
200
|
+
DropdownMenuPrimitive.SubContent,
|
|
201
|
+
__spreadValues({
|
|
202
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
203
|
+
className: cn(
|
|
204
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
205
|
+
className
|
|
206
|
+
)
|
|
207
|
+
}, props)
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type EmptyStateAction = {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
};
|
|
7
|
+
interface EmptyStateProps {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
illustration?: React.ReactNode;
|
|
12
|
+
action?: EmptyStateAction;
|
|
13
|
+
secondaryAction?: EmptyStateAction;
|
|
14
|
+
variant?: "default" | "search" | "error";
|
|
15
|
+
size?: "sm" | "md" | "lg";
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const SearchEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "variant" | "icon"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const ErrorEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "variant" | "icon"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
|
|
22
|
+
export { EmptyState, ErrorEmptyState, SearchEmptyState };
|