@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,44 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface StickyContainerProps {
|
|
4
|
+
/** Content to render inside the sticky container */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Additional className for the sticky element */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Additional className for the inner container wrapper */
|
|
9
|
+
containerClassName?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Top offset when sticky.
|
|
12
|
+
* Defaults to "sticky-header-safe" which uses the global CSS class
|
|
13
|
+
* to handle safe-area-inset-top correctly on all devices.
|
|
14
|
+
*/
|
|
15
|
+
topOffset?: string;
|
|
16
|
+
/** z-index when sticky (default: z-40) */
|
|
17
|
+
zIndex?: string;
|
|
18
|
+
/** Whether to show the background/border/shadow when sticky (default: true) */
|
|
19
|
+
showStickyStyles?: boolean;
|
|
20
|
+
/** Custom className for when sticky */
|
|
21
|
+
stickyClassName?: string;
|
|
22
|
+
/** Hide children until sticky state is reached */
|
|
23
|
+
hideUntilSticky?: boolean;
|
|
24
|
+
/** Optional ID for the sticky container (useful for measuring height for nested sticky elements) */
|
|
25
|
+
id?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Reusable sticky container component with automatic background/shadow when stuck
|
|
29
|
+
* Uses native CSS position: sticky with IntersectionObserver to detect sticky state
|
|
30
|
+
*
|
|
31
|
+
* Supports nested sticky elements - children can use `sticky bottom-0` to stick
|
|
32
|
+
* to the bottom of this container when scrolling.
|
|
33
|
+
*
|
|
34
|
+
* Automatically handles PWA safe area insets via CSS class.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <StickyContainer>
|
|
38
|
+
* <SearchBar />
|
|
39
|
+
* <div className="sticky bottom-0">Categories</div>
|
|
40
|
+
* </StickyContainer>
|
|
41
|
+
*/
|
|
42
|
+
declare const StickyContainer: ({ children, className, containerClassName, topOffset, zIndex, showStickyStyles, stickyClassName, hideUntilSticky, id, }: StickyContainerProps) => react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { StickyContainer };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useSticky } from '../chunk-EUHEIWHZ.js';
|
|
2
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
3
|
+
import '../chunk-3GWWZKX7.js';
|
|
4
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var StickyContainer = ({
|
|
7
|
+
children,
|
|
8
|
+
className,
|
|
9
|
+
containerClassName,
|
|
10
|
+
topOffset = "sticky-header-safe",
|
|
11
|
+
zIndex = "z-40",
|
|
12
|
+
showStickyStyles = true,
|
|
13
|
+
stickyClassName,
|
|
14
|
+
hideUntilSticky = false,
|
|
15
|
+
id
|
|
16
|
+
}) => {
|
|
17
|
+
const { isSticky, ref, sentinelRef } = useSticky();
|
|
18
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx("div", { ref: sentinelRef, className: "h-px w-full", "aria-hidden": "true" }),
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
id,
|
|
25
|
+
className: cn(
|
|
26
|
+
"sticky px-4 transition-all duration-200",
|
|
27
|
+
hideUntilSticky ? isSticky ? "py-4 opacity-100 translate-y-0" : "py-0 opacity-0 -translate-y-2 pointer-events-none" : "py-4",
|
|
28
|
+
topOffset,
|
|
29
|
+
zIndex,
|
|
30
|
+
showStickyStyles && isSticky ? stickyClassName || "bg-background border-b border-border" : "bg-transparent border-b border-transparent",
|
|
31
|
+
className
|
|
32
|
+
),
|
|
33
|
+
children: /* @__PURE__ */ jsx("div", { className: cn(containerClassName, "lg:px-4"), children })
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export { StickyContainer };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
|
|
4
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
|
|
6
|
+
export { Switch };
|
|
@@ -0,0 +1,31 @@
|
|
|
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 SwitchPrimitive from '@radix-ui/react-switch';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var Switch = React.forwardRef((_a, ref) => {
|
|
8
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
SwitchPrimitive.Root,
|
|
11
|
+
__spreadProps(__spreadValues({
|
|
12
|
+
className: cn(
|
|
13
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input glass data-[state=checked]:shadow-lg data-[state=checked]:shadow-primary/20 hover:shadow-md",
|
|
14
|
+
className
|
|
15
|
+
)
|
|
16
|
+
}, props), {
|
|
17
|
+
ref,
|
|
18
|
+
children: /* @__PURE__ */ jsx(
|
|
19
|
+
SwitchPrimitive.Thumb,
|
|
20
|
+
{
|
|
21
|
+
className: cn(
|
|
22
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-all duration-300 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 data-[state=checked]:bg-primary-foreground backdrop-blur-md border border-border/50"
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
30
|
+
|
|
31
|
+
export { Switch };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
4
|
+
declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
7
|
+
declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
|
|
8
|
+
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
10
|
+
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
11
|
+
|
|
12
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var Table = React.forwardRef(
|
|
7
|
+
(_a, ref) => {
|
|
8
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
9
|
+
return /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx("table", __spreadValues({ ref, className: cn("w-full caption-bottom text-sm", className) }, props)) });
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
Table.displayName = "Table";
|
|
13
|
+
var TableHeader = React.forwardRef((_a, ref) => {
|
|
14
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
15
|
+
return /* @__PURE__ */ jsx("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props));
|
|
16
|
+
});
|
|
17
|
+
TableHeader.displayName = "TableHeader";
|
|
18
|
+
var TableBody = React.forwardRef((_a, ref) => {
|
|
19
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
20
|
+
return /* @__PURE__ */ jsx("tbody", __spreadValues({ ref, className: cn("[&_tr:last-child]:border-0", className) }, props));
|
|
21
|
+
});
|
|
22
|
+
TableBody.displayName = "TableBody";
|
|
23
|
+
var TableFooter = React.forwardRef((_a, ref) => {
|
|
24
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"tfoot",
|
|
27
|
+
__spreadValues({
|
|
28
|
+
ref,
|
|
29
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)
|
|
30
|
+
}, props)
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
TableFooter.displayName = "TableFooter";
|
|
34
|
+
var TableRow = React.forwardRef(
|
|
35
|
+
(_a, ref) => {
|
|
36
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"tr",
|
|
39
|
+
__spreadValues({
|
|
40
|
+
ref,
|
|
41
|
+
className: cn(
|
|
42
|
+
"border-b border-border/50 transition-all duration-300 hover:bg-muted/30 hover:backdrop-blur-sm data-[state=selected]:bg-muted/50",
|
|
43
|
+
className
|
|
44
|
+
)
|
|
45
|
+
}, props)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
TableRow.displayName = "TableRow";
|
|
50
|
+
var TableHead = React.forwardRef((_a, ref) => {
|
|
51
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
"th",
|
|
54
|
+
__spreadValues({
|
|
55
|
+
ref,
|
|
56
|
+
className: cn(
|
|
57
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
58
|
+
className
|
|
59
|
+
)
|
|
60
|
+
}, props)
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
TableHead.displayName = "TableHead";
|
|
64
|
+
var TableCell = React.forwardRef((_a, ref) => {
|
|
65
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
67
|
+
"td",
|
|
68
|
+
__spreadValues({
|
|
69
|
+
ref,
|
|
70
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)
|
|
71
|
+
}, props)
|
|
72
|
+
);
|
|
73
|
+
});
|
|
74
|
+
TableCell.displayName = "TableCell";
|
|
75
|
+
var TableCaption = React.forwardRef((_a, ref) => {
|
|
76
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
77
|
+
return /* @__PURE__ */ jsx("caption", __spreadValues({ ref, className: cn("mt-4 text-sm text-muted-foreground", className) }, props));
|
|
78
|
+
});
|
|
79
|
+
TableCaption.displayName = "TableCaption";
|
|
80
|
+
|
|
81
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
|
|
4
|
+
type TabsVariant = "pill" | "underline";
|
|
5
|
+
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
7
|
+
variant?: TabsVariant;
|
|
8
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
|
|
12
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,55 @@
|
|
|
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 TabsPrimitive from '@radix-ui/react-tabs';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var TabsVariantContext = React.createContext("pill");
|
|
8
|
+
var Tabs = TabsPrimitive.Root;
|
|
9
|
+
var TabsList = React.forwardRef((_a, ref) => {
|
|
10
|
+
var _b = _a, { className, variant = "pill", children } = _b, props = __objRest(_b, ["className", "variant", "children"]);
|
|
11
|
+
return /* @__PURE__ */ jsx(TabsVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(
|
|
12
|
+
TabsPrimitive.List,
|
|
13
|
+
__spreadProps(__spreadValues({
|
|
14
|
+
ref,
|
|
15
|
+
className: cn(
|
|
16
|
+
variant === "pill" ? "inline-flex h-12 items-center justify-center gap-2 rounded-3xl glass p-1 text-muted-foreground border border-border/50 shadow-lg" : "inline-flex h-auto items-center gap-0 rounded-none bg-transparent border-b border-border p-0 shadow-none text-muted-foreground",
|
|
17
|
+
className
|
|
18
|
+
)
|
|
19
|
+
}, props), {
|
|
20
|
+
children
|
|
21
|
+
})
|
|
22
|
+
) });
|
|
23
|
+
});
|
|
24
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
25
|
+
var TabsTrigger = React.forwardRef((_a, ref) => {
|
|
26
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
27
|
+
const variant = React.useContext(TabsVariantContext);
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
TabsPrimitive.Trigger,
|
|
30
|
+
__spreadValues({
|
|
31
|
+
ref,
|
|
32
|
+
className: cn(
|
|
33
|
+
variant === "pill" ? "inline-flex items-center justify-center whitespace-nowrap rounded-2xl px-4 py-2 text-sm font-medium ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary/90 data-[state=active]:text-primary-foreground data-[state=active]:shadow-lg data-[state=active]:backdrop-blur-md data-[state=active]:border data-[state=active]:border-border/50 hover:bg-accent/50 hover:text-accent-foreground [@media(pointer:coarse)]:active:scale-95" : "relative inline-flex items-center justify-center whitespace-nowrap rounded-none px-4 h-12 text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:text-foreground data-[state=active]:bg-transparent data-[state=active]:shadow-none text-muted-foreground hover:text-foreground/80 cursor-pointer",
|
|
34
|
+
className
|
|
35
|
+
)
|
|
36
|
+
}, props)
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
40
|
+
var TabsContent = React.forwardRef((_a, ref) => {
|
|
41
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
TabsPrimitive.Content,
|
|
44
|
+
__spreadValues({
|
|
45
|
+
ref,
|
|
46
|
+
className: cn(
|
|
47
|
+
"mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
48
|
+
className
|
|
49
|
+
)
|
|
50
|
+
}, props)
|
|
51
|
+
);
|
|
52
|
+
});
|
|
53
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
54
|
+
|
|
55
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const textVariants: (props?: ({
|
|
7
|
+
variant?: "h2" | "h3" | "label" | "body" | "caption" | "h1" | "h4" | "display" | "body-lg" | "body-sm" | "overline" | null | undefined;
|
|
8
|
+
color?: "inherit" | "default" | "destructive" | "muted" | "primary" | "primary-foreground" | null | undefined;
|
|
9
|
+
weight?: "bold" | "medium" | "normal" | "semibold" | null | undefined;
|
|
10
|
+
leading?: "none" | "normal" | "tight" | "snug" | "relaxed" | "loose" | null | undefined;
|
|
11
|
+
tracking?: "normal" | "tight" | "wide" | "wider" | null | undefined;
|
|
12
|
+
wrap?: "balance" | "pretty" | "nowrap" | null | undefined;
|
|
13
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
+
type TextTag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div" | "label" | "strong" | "em" | "small" | "li" | "dt" | "dd";
|
|
15
|
+
type TextOwnProps<T extends TextTag = "p"> = {
|
|
16
|
+
as?: T;
|
|
17
|
+
variant?: VariantProps<typeof textVariants>["variant"];
|
|
18
|
+
color?: VariantProps<typeof textVariants>["color"];
|
|
19
|
+
weight?: VariantProps<typeof textVariants>["weight"];
|
|
20
|
+
leading?: VariantProps<typeof textVariants>["leading"];
|
|
21
|
+
tracking?: VariantProps<typeof textVariants>["tracking"];
|
|
22
|
+
wrap?: VariantProps<typeof textVariants>["wrap"];
|
|
23
|
+
className?: string;
|
|
24
|
+
};
|
|
25
|
+
type TextProps<T extends TextTag = "p"> = TextOwnProps<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof TextOwnProps<T> | "color">;
|
|
26
|
+
declare function Text<T extends TextTag = "p">({ as, variant, color, weight, leading, tracking, wrap, className, ...props }: TextProps<T>): react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare namespace Text {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { Text, type TextTag, textVariants };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var Textarea = React.forwardRef(
|
|
7
|
+
(_a, ref) => {
|
|
8
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
"textarea",
|
|
11
|
+
__spreadValues({
|
|
12
|
+
className: cn(
|
|
13
|
+
"flex min-h-[80px] w-full rounded-xl border border-border bg-input/50 backdrop-blur-md px-4 py-3 text-base transition-all duration-300 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:bg-input focus-visible:border-accent-foreground/30 focus-visible:shadow-lg focus-visible:shadow-accent/10 disabled:cursor-not-allowed disabled:opacity-50 resize-none",
|
|
14
|
+
className
|
|
15
|
+
),
|
|
16
|
+
ref
|
|
17
|
+
}, props)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
Textarea.displayName = "Textarea";
|
|
22
|
+
|
|
23
|
+
export { Textarea };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
7
|
+
declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
8
|
+
declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
|
|
9
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
|
|
11
|
+
declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
|
|
16
|
+
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
17
|
+
|
|
18
|
+
export { Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useToast } from '../chunk-EBAMCZDW.js';
|
|
2
|
+
import { ToastProvider, Toast, ToastTitle, ToastDescription, ToastClose, ToastViewport } from '../chunk-ERMIA7NP.js';
|
|
3
|
+
import '../chunk-FEK5XGZW.js';
|
|
4
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Toaster() {
|
|
8
|
+
const { toasts } = useToast();
|
|
9
|
+
return /* @__PURE__ */ jsxs(ToastProvider, { children: [
|
|
10
|
+
toasts.map((_a) => {
|
|
11
|
+
var _b = _a, { id, title, description, action } = _b, props = __objRest(_b, ["id", "title", "description", "action"]);
|
|
12
|
+
return /* @__PURE__ */ jsxs(Toast, __spreadProps(__spreadValues({}, props), { children: [
|
|
13
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1", children: [
|
|
14
|
+
title && /* @__PURE__ */ jsx(ToastTitle, { children: title }),
|
|
15
|
+
description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
|
|
16
|
+
] }),
|
|
17
|
+
action,
|
|
18
|
+
/* @__PURE__ */ jsx(ToastClose, {})
|
|
19
|
+
] }), id);
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ jsx(ToastViewport, {})
|
|
22
|
+
] });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { Toaster };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { toggleVariants } from './toggle.js';
|
|
6
|
+
import 'class-variance-authority/types';
|
|
7
|
+
import '@radix-ui/react-toggle';
|
|
8
|
+
|
|
9
|
+
declare function ToggleGroup({ className, variant, size, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { toggleVariants } from '../chunk-ESO2EM3L.js';
|
|
2
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
3
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var ToggleGroupContext = React.createContext({
|
|
9
|
+
size: "default",
|
|
10
|
+
variant: "default"
|
|
11
|
+
});
|
|
12
|
+
function ToggleGroup(_a) {
|
|
13
|
+
var _b = _a, {
|
|
14
|
+
className,
|
|
15
|
+
variant,
|
|
16
|
+
size,
|
|
17
|
+
children
|
|
18
|
+
} = _b, props = __objRest(_b, [
|
|
19
|
+
"className",
|
|
20
|
+
"variant",
|
|
21
|
+
"size",
|
|
22
|
+
"children"
|
|
23
|
+
]);
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
ToggleGroupPrimitive.Root,
|
|
26
|
+
__spreadProps(__spreadValues({
|
|
27
|
+
"data-slot": "toggle-group",
|
|
28
|
+
"data-variant": variant,
|
|
29
|
+
"data-size": size,
|
|
30
|
+
className: cn(
|
|
31
|
+
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
32
|
+
className
|
|
33
|
+
)
|
|
34
|
+
}, props), {
|
|
35
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
36
|
+
})
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
function ToggleGroupItem(_a) {
|
|
40
|
+
var _b = _a, {
|
|
41
|
+
className,
|
|
42
|
+
children,
|
|
43
|
+
variant,
|
|
44
|
+
size
|
|
45
|
+
} = _b, props = __objRest(_b, [
|
|
46
|
+
"className",
|
|
47
|
+
"children",
|
|
48
|
+
"variant",
|
|
49
|
+
"size"
|
|
50
|
+
]);
|
|
51
|
+
const context = React.useContext(ToggleGroupContext);
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
ToggleGroupPrimitive.Item,
|
|
54
|
+
__spreadProps(__spreadValues({
|
|
55
|
+
"data-slot": "toggle-group-item",
|
|
56
|
+
"data-variant": context.variant || variant,
|
|
57
|
+
"data-size": context.size || size,
|
|
58
|
+
className: cn(
|
|
59
|
+
toggleVariants({
|
|
60
|
+
variant: context.variant || variant,
|
|
61
|
+
size: context.size || size
|
|
62
|
+
}),
|
|
63
|
+
"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
|
|
64
|
+
className
|
|
65
|
+
)
|
|
66
|
+
}, props), {
|
|
67
|
+
children
|
|
68
|
+
})
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
declare const toggleVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "outline" | null | undefined;
|
|
9
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
|
|
4
|
+
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
5
|
+
declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
6
|
+
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
|
|
9
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
8
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
9
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
10
|
+
var TooltipContent = React.forwardRef((_a, ref) => {
|
|
11
|
+
var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
TooltipPrimitive.Content,
|
|
14
|
+
__spreadValues({
|
|
15
|
+
ref,
|
|
16
|
+
sideOffset,
|
|
17
|
+
className: cn(
|
|
18
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
19
|
+
className
|
|
20
|
+
)
|
|
21
|
+
}, props)
|
|
22
|
+
);
|
|
23
|
+
});
|
|
24
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
25
|
+
|
|
26
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '../chunk-3GWWZKX7.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
var MOBILE_BREAKPOINT = 768;
|
|
5
|
+
function useIsMobile() {
|
|
6
|
+
const [isMobile, setIsMobile] = React.useState(void 0);
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
9
|
+
const onChange = () => {
|
|
10
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
11
|
+
};
|
|
12
|
+
mql.addEventListener("change", onChange);
|
|
13
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
14
|
+
return () => mql.removeEventListener("change", onChange);
|
|
15
|
+
}, []);
|
|
16
|
+
return !!isMobile;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { useIsMobile };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ToastProps, ToastActionElement } from './toast.js';
|
|
3
|
+
import 'class-variance-authority/types';
|
|
4
|
+
import '@radix-ui/react-toast';
|
|
5
|
+
import 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
type ToasterToast = ToastProps & {
|
|
8
|
+
id: string;
|
|
9
|
+
title?: React.ReactNode;
|
|
10
|
+
description?: React.ReactNode;
|
|
11
|
+
action?: ToastActionElement;
|
|
12
|
+
};
|
|
13
|
+
type Action = {
|
|
14
|
+
type: "ADD_TOAST";
|
|
15
|
+
toast: ToasterToast;
|
|
16
|
+
} | {
|
|
17
|
+
type: "UPDATE_TOAST";
|
|
18
|
+
toast: Partial<ToasterToast>;
|
|
19
|
+
} | {
|
|
20
|
+
type: "DISMISS_TOAST";
|
|
21
|
+
toastId?: ToasterToast["id"];
|
|
22
|
+
} | {
|
|
23
|
+
type: "REMOVE_TOAST";
|
|
24
|
+
toastId?: ToasterToast["id"];
|
|
25
|
+
};
|
|
26
|
+
interface State {
|
|
27
|
+
toasts: ToasterToast[];
|
|
28
|
+
}
|
|
29
|
+
declare const reducer: (state: State, action: Action) => State;
|
|
30
|
+
type Toast = Omit<ToasterToast, "id">;
|
|
31
|
+
declare function toast({ ...props }: Toast): {
|
|
32
|
+
id: string;
|
|
33
|
+
dismiss: () => void;
|
|
34
|
+
update: (props: ToasterToast) => void;
|
|
35
|
+
};
|
|
36
|
+
declare function useToast(): {
|
|
37
|
+
toast: typeof toast;
|
|
38
|
+
dismiss: (toastId?: string) => void;
|
|
39
|
+
toasts: ToasterToast[];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { reducer, toast, useToast };
|