@xwadex/fesd-next 0.3.4-7.6 → 0.3.4-7.7
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/components/anchors/anchors.d.ts +16 -0
- package/dist/components/anchors/anchors.js +26 -0
- package/dist/components/anchors/index.d.ts +1 -0
- package/dist/components/anchors/index.js +1 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/tests/index.d.ts +1 -0
- package/dist/components/tests/index.js +1 -0
- package/dist/components/tests/tests.d.ts +4 -0
- package/dist/components/tests/tests.js +8 -0
- package/dist/hooks/useAnchors.d.ts +8 -5
- package/dist/hooks/useAnchors.js +74 -68
- package/dist/shadcns/components/ui/accordion.d.ts +7 -0
- package/dist/shadcns/components/ui/accordion.js +18 -0
- package/dist/shadcns/components/ui/alert-dialog.d.ts +14 -0
- package/dist/shadcns/components/ui/alert-dialog.js +39 -0
- package/dist/shadcns/components/ui/alert.d.ts +9 -0
- package/dist/shadcns/components/ui/alert.js +24 -0
- package/dist/shadcns/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/shadcns/components/ui/aspect-ratio.js +7 -0
- package/dist/shadcns/components/ui/avatar.d.ts +6 -0
- package/dist/shadcns/components/ui/avatar.js +14 -0
- package/dist/shadcns/components/ui/badge.d.ts +9 -0
- package/dist/shadcns/components/ui/badge.js +22 -0
- package/dist/shadcns/components/ui/breadcrumb.d.ts +11 -0
- package/dist/shadcns/components/ui/breadcrumb.js +27 -0
- package/dist/shadcns/components/ui/button.d.ts +10 -0
- package/dist/shadcns/components/ui/button.js +32 -0
- package/dist/shadcns/components/ui/calendar.d.ts +8 -0
- package/dist/shadcns/components/ui/calendar.js +74 -0
- package/dist/shadcns/components/ui/card.d.ts +9 -0
- package/dist/shadcns/components/ui/card.js +24 -0
- package/dist/shadcns/components/ui/carousel.d.ts +19 -0
- package/dist/shadcns/components/ui/carousel.js +91 -0
- package/dist/shadcns/components/ui/chart.d.ts +40 -0
- package/dist/shadcns/components/ui/chart.js +114 -0
- package/dist/shadcns/components/ui/checkbox.d.ts +4 -0
- package/dist/shadcns/components/ui/checkbox.js +9 -0
- package/dist/shadcns/components/ui/collapsible.d.ts +5 -0
- package/dist/shadcns/components/ui/collapsible.js +13 -0
- package/dist/shadcns/components/ui/command.d.ts +18 -0
- package/dist/shadcns/components/ui/command.js +34 -0
- package/dist/shadcns/components/ui/context-menu.d.ts +25 -0
- package/dist/shadcns/components/ui/context-menu.js +51 -0
- package/dist/shadcns/components/ui/dialog.d.ts +15 -0
- package/dist/shadcns/components/ui/dialog.js +36 -0
- package/dist/shadcns/components/ui/drawer.d.ts +13 -0
- package/dist/shadcns/components/ui/drawer.js +35 -0
- package/dist/shadcns/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/shadcns/components/ui/dropdown-menu.js +51 -0
- package/dist/shadcns/components/ui/form.d.ts +24 -0
- package/dist/shadcns/components/ui/form.js +57 -0
- package/dist/shadcns/components/ui/hover-card.d.ts +6 -0
- package/dist/shadcns/components/ui/hover-card.js +14 -0
- package/dist/shadcns/components/ui/input-otp.d.ts +11 -0
- package/dist/shadcns/components/ui/input-otp.js +21 -0
- package/dist/shadcns/components/ui/input.d.ts +3 -0
- package/dist/shadcns/components/ui/input.js +6 -0
- package/dist/shadcns/components/ui/label.d.ts +4 -0
- package/dist/shadcns/components/ui/label.js +8 -0
- package/dist/shadcns/components/ui/menubar.d.ts +26 -0
- package/dist/shadcns/components/ui/menubar.js +54 -0
- package/dist/shadcns/components/ui/navigation-menu.d.ts +14 -0
- package/dist/shadcns/components/ui/navigation-menu.js +31 -0
- package/dist/shadcns/components/ui/pagination.d.ts +13 -0
- package/dist/shadcns/components/ui/pagination.js +29 -0
- package/dist/shadcns/components/ui/popover.d.ts +7 -0
- package/dist/shadcns/components/ui/popover.js +17 -0
- package/dist/shadcns/components/ui/progress.d.ts +4 -0
- package/dist/shadcns/components/ui/progress.js +8 -0
- package/dist/shadcns/components/ui/radio-group.d.ts +5 -0
- package/dist/shadcns/components/ui/radio-group.js +12 -0
- package/dist/shadcns/components/ui/resizable.d.ts +8 -0
- package/dist/shadcns/components/ui/resizable.js +15 -0
- package/dist/shadcns/components/ui/scroll-area.d.ts +5 -0
- package/dist/shadcns/components/ui/scroll-area.js +11 -0
- package/dist/shadcns/components/ui/select.d.ts +15 -0
- package/dist/shadcns/components/ui/select.js +38 -0
- package/dist/shadcns/components/ui/separator.d.ts +4 -0
- package/dist/shadcns/components/ui/separator.js +8 -0
- package/dist/shadcns/components/ui/sheet.d.ts +13 -0
- package/dist/shadcns/components/ui/sheet.js +40 -0
- package/dist/shadcns/components/ui/sidebar.d.ts +69 -0
- package/dist/shadcns/components/ui/sidebar.js +211 -0
- package/dist/shadcns/components/ui/skeleton.d.ts +2 -0
- package/dist/shadcns/components/ui/skeleton.js +6 -0
- package/dist/shadcns/components/ui/slider.d.ts +4 -0
- package/dist/shadcns/components/ui/slider.js +10 -0
- package/dist/shadcns/components/ui/sonner.d.ts +3 -0
- package/dist/shadcns/components/ui/sonner.js +13 -0
- package/dist/shadcns/components/ui/switch.d.ts +4 -0
- package/dist/shadcns/components/ui/switch.js +8 -0
- package/dist/shadcns/components/ui/table.d.ts +10 -0
- package/dist/shadcns/components/ui/table.js +28 -0
- package/dist/shadcns/components/ui/tabs.d.ts +7 -0
- package/dist/shadcns/components/ui/tabs.js +17 -0
- package/dist/shadcns/components/ui/textarea.d.ts +3 -0
- package/dist/shadcns/components/ui/textarea.js +6 -0
- package/dist/shadcns/components/ui/toggle-group.d.ts +7 -0
- package/dist/shadcns/components/ui/toggle-group.js +21 -0
- package/dist/shadcns/components/ui/toggle.d.ts +9 -0
- package/dist/shadcns/components/ui/toggle.js +26 -0
- package/dist/shadcns/components/ui/tooltip.d.ts +7 -0
- package/dist/shadcns/components/ui/tooltip.js +17 -0
- package/dist/shadcns/hooks/use-mobile.d.ts +1 -0
- package/dist/shadcns/hooks/use-mobile.js +15 -0
- package/dist/shadcns/lib/utils.d.ts +2 -0
- package/dist/shadcns/lib/utils.js +5 -0
- package/package.json +13 -1
- package/dist/components/TestComponent.d.ts +0 -4
- package/dist/components/TestComponent.js +0 -10
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AnchorOptions } from "../../hooks/index.js";
|
|
2
|
+
interface PropsType extends React.ComponentProps<"div"> {
|
|
3
|
+
name: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const AnchorTarget: React.FC<PropsType>;
|
|
6
|
+
export declare const AnchorContainer: React.FC<PropsType>;
|
|
7
|
+
export declare const AnchorOffseter: React.FC<PropsType>;
|
|
8
|
+
type TriggerProps = AnchorOptions & React.ComponentProps<"div"> & {};
|
|
9
|
+
export declare const AnchorTrigger: React.FC<TriggerProps>;
|
|
10
|
+
export declare const Anchors: {
|
|
11
|
+
Trigger: import("react").FC<TriggerProps>;
|
|
12
|
+
Target: import("react").FC<PropsType>;
|
|
13
|
+
Container: import("react").FC<PropsType>;
|
|
14
|
+
Offseter: import("react").FC<PropsType>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useAnchors } from "../../hooks/index.js";
|
|
4
|
+
import { cn } from "../../utils/index.js";
|
|
5
|
+
export const AnchorTarget = ({ children, className, name }) => {
|
|
6
|
+
const { registerAnchors } = useAnchors();
|
|
7
|
+
return (_jsx("div", { className: cn(className), ...registerAnchors(name), children: children }));
|
|
8
|
+
};
|
|
9
|
+
export const AnchorContainer = ({ children, className, name }) => {
|
|
10
|
+
const { registerContainers } = useAnchors();
|
|
11
|
+
return (_jsx("div", { className: cn(className), ...registerContainers(name), children: children }));
|
|
12
|
+
};
|
|
13
|
+
export const AnchorOffseter = ({ children, className, name }) => {
|
|
14
|
+
const { registerOffseters } = useAnchors();
|
|
15
|
+
return (_jsx("div", { className: cn(className), ...registerOffseters(name), children: children }));
|
|
16
|
+
};
|
|
17
|
+
export const AnchorTrigger = ({ children, className, ...options }) => {
|
|
18
|
+
const { scrollToAnchor } = useAnchors();
|
|
19
|
+
return (_jsx("div", { className: cn(className), onClick: () => scrollToAnchor(options), children: children }));
|
|
20
|
+
};
|
|
21
|
+
export const Anchors = {
|
|
22
|
+
Trigger: AnchorTrigger,
|
|
23
|
+
Target: AnchorTarget,
|
|
24
|
+
Container: AnchorContainer,
|
|
25
|
+
Offseter: AnchorOffseter
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./anchors";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./anchors";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./anchors";
|
|
2
|
+
export * from "./tests";
|
package/dist/components/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./anchors";
|
|
2
|
+
export * from "./tests";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Tests } from "./tests";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Tests } from "./tests";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Button } from "../../shadcns/components/ui/button";
|
|
4
|
+
const Tests = () => {
|
|
5
|
+
return (_jsx(Button, { children: "test123133232" }));
|
|
6
|
+
};
|
|
7
|
+
Tests.displayName = "Tests";
|
|
8
|
+
export default Tests;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { animate } from "motion/react";
|
|
2
|
+
import type { Easing } from "motion/react";
|
|
2
3
|
export interface PropsTypes {
|
|
3
4
|
}
|
|
4
5
|
export interface AnimateOptions {
|
|
@@ -13,15 +14,16 @@ export interface AnchorOptions extends AnimateOptions {
|
|
|
13
14
|
anchor: string;
|
|
14
15
|
container?: string;
|
|
15
16
|
offseters?: string | string[];
|
|
16
|
-
direction?: "x" | "y"
|
|
17
|
+
direction?: "x" | "y";
|
|
17
18
|
align?: "start" | "center" | "end";
|
|
18
19
|
offset?: number;
|
|
19
20
|
}
|
|
20
21
|
export interface ScrollOptions extends AnimateOptions {
|
|
22
|
+
controllerKey: string;
|
|
21
23
|
containerDom: HTMLElement | Window;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
anchorScrollValue: {
|
|
25
|
+
left: number;
|
|
26
|
+
top: number;
|
|
25
27
|
};
|
|
26
28
|
containerScrollValue: {
|
|
27
29
|
left: number;
|
|
@@ -29,6 +31,7 @@ export interface ScrollOptions extends AnimateOptions {
|
|
|
29
31
|
};
|
|
30
32
|
direction?: AnchorOptions["direction"];
|
|
31
33
|
}
|
|
34
|
+
export type AnimateController = ReturnType<typeof animate>;
|
|
32
35
|
export declare function useAnchors(): {
|
|
33
36
|
registerAnchors: typeof registerAnchors;
|
|
34
37
|
registerContainers: typeof registerContainers;
|
package/dist/hooks/useAnchors.js
CHANGED
|
@@ -3,96 +3,102 @@
|
|
|
3
3
|
// version: 0.0.1.bate
|
|
4
4
|
// dev: wade
|
|
5
5
|
import { useCallback, useMemo, useRef } from "react";
|
|
6
|
-
import { animate,
|
|
6
|
+
import { animate, motionValue } from "motion/react";
|
|
7
7
|
import { create } from "zustand";
|
|
8
8
|
export function useAnchors() {
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
9
|
+
const controllerRef = useRef(new Map());
|
|
10
|
+
const scrollAnimations = useCallback(({ controllerKey, containerDom, anchorScrollValue, containerScrollValue, direction = "y", duration = 0.5, delay = 0, ease = [0.215, 0.61, 0.355, 1.0], onScroll: onPlay, onScrolled, onScrolling }) => {
|
|
11
|
+
if (direction !== "y" && direction !== "x") {
|
|
12
|
+
console.error(`Scroll Direction isn't 'x' or 'y' `);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
12
15
|
const { left: scrollLeft, top: scrollTop } = containerScrollValue;
|
|
13
|
-
const {
|
|
16
|
+
const { left: anchorLeft, top: anchorTop } = anchorScrollValue;
|
|
14
17
|
const isScrollX = direction === "x";
|
|
15
18
|
const isScrollY = direction === "y";
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
delay,
|
|
21
|
-
onPlay: onScroll,
|
|
22
|
-
onUpdate: onUpdate,
|
|
23
|
-
onComplete: onScrolled,
|
|
24
|
-
};
|
|
25
|
-
if ((isBoth || isScrollX) && (scrollX !== scrollLeft)) {
|
|
26
|
-
motionValue.set(scrollLeft);
|
|
27
|
-
animateRef.current = animate(motionValue, scrollX, animationsOptions);
|
|
19
|
+
const startValue = isScrollX ? scrollLeft : scrollTop;
|
|
20
|
+
const endValue = isScrollX ? anchorLeft : anchorTop;
|
|
21
|
+
if (startValue == endValue) {
|
|
22
|
+
controllerRef.current.delete(controllerKey);
|
|
28
23
|
return;
|
|
29
24
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
function onUpdate(value) {
|
|
36
|
-
if (isScrollX)
|
|
37
|
-
containerDom.scrollTo({ left: value });
|
|
38
|
-
if (isScrollY)
|
|
39
|
-
containerDom.scrollTo({ top: value });
|
|
40
|
-
if (isBoth)
|
|
41
|
-
containerDom.scrollTo({ top: value, left: value });
|
|
25
|
+
const motionStartValue = motionValue(startValue);
|
|
26
|
+
const onUpdate = (value) => {
|
|
27
|
+
const left = isScrollX ? value : undefined;
|
|
28
|
+
const top = isScrollY ? value : undefined;
|
|
29
|
+
containerDom.scrollTo({ left, top });
|
|
42
30
|
onScrolling?.(value);
|
|
43
|
-
}
|
|
31
|
+
};
|
|
32
|
+
const onComplete = () => {
|
|
33
|
+
controllerRef.current.delete(controllerKey);
|
|
34
|
+
onScrolled?.();
|
|
35
|
+
};
|
|
36
|
+
const options = { duration, ease, delay, onPlay, onUpdate, onComplete };
|
|
37
|
+
controllerRef.current.set(controllerKey, animate(motionStartValue, endValue, options));
|
|
44
38
|
}, []);
|
|
45
39
|
const scrollToAnchor = useCallback((anchorOptions) => {
|
|
46
|
-
if (animateRef.current)
|
|
47
|
-
animateRef.current?.stop();
|
|
48
40
|
const { anchor: anchorName, container: containerName, offseters, align, offset = 0, ...options } = anchorOptions;
|
|
49
|
-
const isContainer = containerName && containerName !== "window";
|
|
50
41
|
const stores = getAnchorsStores();
|
|
51
|
-
const
|
|
42
|
+
const isScrolltoAnchor = anchorName !== "#";
|
|
43
|
+
const isScrollContainer = containerName && containerName !== "window";
|
|
44
|
+
const controllerKey = containerName ?? "window";
|
|
45
|
+
if (controllerRef.current.has(controllerKey)) {
|
|
46
|
+
controllerRef.current.get(controllerKey)?.stop();
|
|
47
|
+
controllerRef.current.delete(controllerKey);
|
|
48
|
+
}
|
|
49
|
+
const anchorDom = isScrolltoAnchor
|
|
50
|
+
? stores.anchors.get(anchorName)
|
|
51
|
+
: undefined;
|
|
52
|
+
if (isScrolltoAnchor && !(anchorDom instanceof HTMLElement))
|
|
53
|
+
return;
|
|
54
|
+
const containerDom = isScrollContainer
|
|
52
55
|
? stores.containers.get(containerName)
|
|
53
56
|
: window;
|
|
57
|
+
if (!containerDom)
|
|
58
|
+
return;
|
|
54
59
|
const containerScrollValue = {
|
|
55
|
-
top: Math.round(
|
|
60
|
+
top: Math.round(isScrollContainer
|
|
56
61
|
? containerDom.scrollTop
|
|
57
62
|
: containerDom.pageYOffset),
|
|
58
|
-
left: Math.round(
|
|
63
|
+
left: Math.round(isScrollContainer
|
|
59
64
|
? containerDom.scrollLeft
|
|
60
|
-
: pageXOffset)
|
|
65
|
+
: pageXOffset)
|
|
66
|
+
};
|
|
67
|
+
const containerRect = isScrollContainer
|
|
68
|
+
? containerDom.getBoundingClientRect()
|
|
69
|
+
: { top: 0, left: 0 };
|
|
70
|
+
const containerOffsetValue = {
|
|
71
|
+
left: containerScrollValue.left - (isScrollContainer ? containerRect.left : 0),
|
|
72
|
+
top: containerScrollValue.top - (isScrollContainer ? containerRect.top : 0)
|
|
61
73
|
};
|
|
62
|
-
const
|
|
74
|
+
const offsetsValue = Array.isArray(offseters)
|
|
63
75
|
? offseters.reduce((init, offseter) => {
|
|
64
|
-
const
|
|
65
|
-
const width = (init.width ?? 0) + (
|
|
66
|
-
const height = (init.height ?? 0) + (
|
|
76
|
+
const offseterDom = stores.offseters.get(offseter);
|
|
77
|
+
const width = (init.width ?? 0) + (offseterDom ? offseterDom.clientWidth : 0);
|
|
78
|
+
const height = (init.height ?? 0) + (offseterDom ? offseterDom.clientHeight : 0);
|
|
67
79
|
return { width, height };
|
|
68
80
|
}, {})
|
|
69
81
|
: { width: 0, height: 0 };
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
82
|
+
const offsetsSumValue = {
|
|
83
|
+
width: options.direction === "x" ? offsetsValue.width + offset : 0,
|
|
84
|
+
height: options.direction === "y" ? offsetsValue.height + offset : 0,
|
|
73
85
|
};
|
|
74
|
-
const
|
|
75
|
-
|
|
86
|
+
const anchorRect = anchorDom ? anchorDom.getBoundingClientRect() : { left: 0, top: 0 };
|
|
87
|
+
const anchorScrollValue = {
|
|
88
|
+
left: isScrolltoAnchor
|
|
89
|
+
? Math.round(anchorRect.left + containerOffsetValue.left - offsetsSumValue.width)
|
|
90
|
+
: offsetsSumValue.width,
|
|
91
|
+
top: isScrolltoAnchor
|
|
92
|
+
? Math.round(anchorRect.top + containerOffsetValue.top - offsetsSumValue.height)
|
|
93
|
+
: offsetsSumValue.height
|
|
76
94
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
top: (isContainer ? containerDom.getBoundingClientRect().top : 0)
|
|
85
|
-
};
|
|
86
|
-
const offsets = {
|
|
87
|
-
x: offsetValue.width - offset,
|
|
88
|
-
y: offsetValue.height - offset
|
|
89
|
-
};
|
|
90
|
-
AnimationsOptions.scrollValue = {
|
|
91
|
-
x: Math.round(anchorRect.left + containerScrollValue.left - offsets.x - containerRect.left),
|
|
92
|
-
y: Math.round(anchorRect.top + containerScrollValue.top - offsets.y - containerRect.top),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
scrollAnimations(AnimationsOptions);
|
|
95
|
+
scrollAnimations({
|
|
96
|
+
controllerKey,
|
|
97
|
+
containerDom,
|
|
98
|
+
containerScrollValue,
|
|
99
|
+
anchorScrollValue,
|
|
100
|
+
...options
|
|
101
|
+
});
|
|
96
102
|
}, []);
|
|
97
103
|
const returnsMemo = useMemo(() => ({
|
|
98
104
|
registerAnchors,
|
|
@@ -121,15 +127,15 @@ const ANCHOR_ATTRIBUTE = "data-anchor";
|
|
|
121
127
|
const CONTAINER_ATTRIBUTE = "data-anchor-container";
|
|
122
128
|
const OFFSETER_ATTRIBUTE = "data-anchor-offseter";
|
|
123
129
|
export function registerAnchors(name) {
|
|
124
|
-
const register = (node) => registration({ key: "anchors", name, node });
|
|
130
|
+
const register = useCallback((node) => registration({ key: "anchors", name, node }), [name]);
|
|
125
131
|
return { ref: register, [ANCHOR_ATTRIBUTE]: name };
|
|
126
132
|
}
|
|
127
133
|
export function registerContainers(name) {
|
|
128
|
-
const register = (node) => registration({ key: "containers", name, node });
|
|
134
|
+
const register = useCallback((node) => registration({ key: "containers", name, node }), [name]);
|
|
129
135
|
return { ref: register, [CONTAINER_ATTRIBUTE]: name };
|
|
130
136
|
}
|
|
131
137
|
export function registerOffseters(name) {
|
|
132
|
-
const register = (node) => registration({ key: "offseters", name, node });
|
|
138
|
+
const register = useCallback((node) => registration({ key: "offseters", name, node }), [name]);
|
|
133
139
|
return { ref: register, [OFFSETER_ATTRIBUTE]: name };
|
|
134
140
|
}
|
|
135
141
|
export const useAnchorsStores = create()(() => ({
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
|
+
import { ChevronDownIcon } from 'lucide-react';
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
function Accordion({ ...props }) {
|
|
7
|
+
return _jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
8
|
+
}
|
|
9
|
+
function AccordionItem({ className, ...props }) {
|
|
10
|
+
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn('border-b last:border-b-0', className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
13
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn('focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180', className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" })] }) }));
|
|
14
|
+
}
|
|
15
|
+
function AccordionContent({ className, children, ...props }) {
|
|
16
|
+
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm", ...props, children: _jsx("div", { className: cn('pt-0 pb-4', className), children: children }) }));
|
|
17
|
+
}
|
|
18
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { buttonVariants } from '../../components/ui/button';
|
|
6
|
+
function AlertDialog({ ...props }) {
|
|
7
|
+
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
8
|
+
}
|
|
9
|
+
function AlertDialogTrigger({ ...props }) {
|
|
10
|
+
return _jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
11
|
+
}
|
|
12
|
+
function AlertDialogPortal({ ...props }) {
|
|
13
|
+
return _jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
14
|
+
}
|
|
15
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
16
|
+
return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50', className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function AlertDialogContent({ className, ...props }) {
|
|
19
|
+
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", className: cn('bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg', className), ...props })] }));
|
|
20
|
+
}
|
|
21
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn('flex flex-col gap-2 text-center sm:text-left', className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
28
|
+
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn('text-lg font-semibold', className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
31
|
+
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn('text-muted-foreground text-sm', className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
function AlertDialogAction({ className, ...props }) {
|
|
34
|
+
return _jsx(AlertDialogPrimitive.Action, { className: cn(buttonVariants(), className), ...props });
|
|
35
|
+
}
|
|
36
|
+
function AlertDialogCancel({ className, ...props }) {
|
|
37
|
+
return (_jsx(AlertDialogPrimitive.Cancel, { className: cn(buttonVariants({ variant: 'outline' }), className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
|
+
const alertVariants = cva('relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current', {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: 'bg-card text-card-foreground',
|
|
8
|
+
destructive: 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
variant: 'default',
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
function Alert({ className, variant, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "alert", role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function AlertTitle({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "alert-title", className: cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function AlertDescription({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-description", className: cn('text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed', className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
4
|
+
function AspectRatio({ ...props }) {
|
|
5
|
+
return _jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
|
|
6
|
+
}
|
|
7
|
+
export { AspectRatio };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
|
+
declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
function Avatar({ className, ...props }) {
|
|
6
|
+
return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", className: cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
function AvatarImage({ className, ...props }) {
|
|
9
|
+
return (_jsx(AvatarPrimitive.Image, { "data-slot": "avatar-image", className: cn('aspect-square size-full', className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function AvatarFallback({ className, ...props }) {
|
|
12
|
+
return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn('bg-muted flex size-full items-center justify-center rounded-full', className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "outline" | "destructive" | "secondary" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
const badgeVariants = cva('inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden', {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
|
|
9
|
+
secondary: 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
|
|
10
|
+
destructive: 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
11
|
+
outline: 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: 'default',
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
function Badge({ className, variant, asChild = false, ...props }) {
|
|
19
|
+
const Comp = asChild ? Slot : 'span';
|
|
20
|
+
return (_jsx(Comp, { "data-slot": "badge", className: cn(badgeVariants({ variant }), className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<'nav'>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<'a'> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
3
|
+
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
function Breadcrumb({ ...props }) {
|
|
6
|
+
return _jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
7
|
+
}
|
|
8
|
+
function BreadcrumbList({ className, ...props }) {
|
|
9
|
+
return (_jsx("ol", { "data-slot": "breadcrumb-list", className: cn('text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5', className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
12
|
+
return (_jsx("li", { "data-slot": "breadcrumb-item", className: cn('inline-flex items-center gap-1.5', className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
15
|
+
const Comp = asChild ? Slot : 'a';
|
|
16
|
+
return (_jsx(Comp, { "data-slot": "breadcrumb-link", className: cn('hover:text-foreground transition-colors', className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
19
|
+
return (_jsx("span", { "data-slot": "breadcrumb-page", role: "link", "aria-disabled": "true", "aria-current": "page", className: cn('text-foreground font-normal', className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
22
|
+
return (_jsx("li", { "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn('[&>svg]:size-3.5', className), ...props, children: children ?? _jsx(ChevronRight, {}) }));
|
|
23
|
+
}
|
|
24
|
+
function BreadcrumbEllipsis({ className, ...props }) {
|
|
25
|
+
return (_jsxs("span", { "data-slot": "breadcrumb-ellipsis", role: "presentation", "aria-hidden": "true", className: cn('flex size-9 items-center justify-center', className), ...props, children: [_jsx(MoreHorizontal, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
|
|
26
|
+
}
|
|
27
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "outline" | "link" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
10
|
+
destructive: 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
11
|
+
outline: 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
|
12
|
+
secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
|
|
13
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
14
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
18
|
+
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
19
|
+
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
20
|
+
icon: 'size-9',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
variant: 'default',
|
|
25
|
+
size: 'default',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
function Button({ className, variant, size, asChild = false, ...props }) {
|
|
29
|
+
const Comp = asChild ? Slot : 'button';
|
|
30
|
+
return (_jsx(Comp, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
31
|
+
}
|
|
32
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DayButton, DayPicker } from 'react-day-picker';
|
|
3
|
+
import { Button } from '../../../shadcns/components/ui/button';
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
|
+
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { Calendar, CalendarDayButton };
|