@xwadex/fesd-next 0.3.4-7.7 → 0.3.4-7.9
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.js +1 -1
- package/dist/components/tests/tests.js +5 -3
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/useAnchors.d.ts +5 -11
- package/dist/hooks/useAnchors.js +30 -33
- package/dist/hooks/useScrollContainers.d.ts +27 -0
- package/dist/hooks/useScrollContainers.js +53 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/shadcns/components/ui/accordion.js +1 -1
- package/dist/shadcns/components/ui/alert-dialog.js +1 -2
- package/dist/shadcns/components/ui/alert.d.ts +1 -1
- package/dist/shadcns/components/ui/alert.js +2 -1
- package/dist/shadcns/components/ui/avatar.js +1 -1
- package/dist/shadcns/components/ui/badge.d.ts +1 -1
- package/dist/shadcns/components/ui/badge.js +2 -1
- package/dist/shadcns/components/ui/breadcrumb.js +1 -1
- package/dist/shadcns/components/ui/button.d.ts +1 -1
- package/dist/shadcns/components/ui/button.js +1 -1
- package/dist/shadcns/components/ui/calendar.d.ts +1 -1
- package/dist/shadcns/components/ui/calendar.js +1 -2
- package/dist/shadcns/components/ui/card.js +2 -1
- package/dist/shadcns/components/ui/carousel.d.ts +1 -1
- package/dist/shadcns/components/ui/carousel.js +2 -2
- package/dist/shadcns/components/ui/chart.js +1 -1
- package/dist/shadcns/components/ui/checkbox.js +1 -1
- package/dist/shadcns/components/ui/command.d.ts +1 -1
- package/dist/shadcns/components/ui/command.js +1 -2
- package/dist/shadcns/components/ui/context-menu.js +1 -1
- package/dist/shadcns/components/ui/dialog.js +1 -1
- package/dist/shadcns/components/ui/drawer.js +1 -1
- package/dist/shadcns/components/ui/dropdown-menu.js +1 -1
- package/dist/shadcns/components/ui/form.js +1 -2
- package/dist/shadcns/components/ui/hover-card.js +1 -1
- package/dist/shadcns/components/ui/input-otp.js +1 -1
- package/dist/shadcns/components/ui/input.js +1 -1
- package/dist/shadcns/components/ui/label.js +1 -1
- package/dist/shadcns/components/ui/menubar.js +1 -1
- package/dist/shadcns/components/ui/navigation-menu.d.ts +1 -1
- package/dist/shadcns/components/ui/navigation-menu.js +2 -1
- package/dist/shadcns/components/ui/pagination.d.ts +1 -1
- package/dist/shadcns/components/ui/pagination.js +1 -2
- package/dist/shadcns/components/ui/popover.js +1 -1
- package/dist/shadcns/components/ui/progress.js +1 -1
- package/dist/shadcns/components/ui/radio-group.js +1 -1
- package/dist/shadcns/components/ui/resizable.js +1 -1
- package/dist/shadcns/components/ui/scroll-area.js +1 -1
- package/dist/shadcns/components/ui/select.js +1 -1
- package/dist/shadcns/components/ui/separator.js +1 -1
- package/dist/shadcns/components/ui/sheet.js +1 -1
- package/dist/shadcns/components/ui/sidebar.d.ts +2 -5
- package/dist/shadcns/components/ui/sidebar.js +1 -8
- package/dist/shadcns/components/ui/skeleton.js +1 -1
- package/dist/shadcns/components/ui/slider.js +1 -1
- package/dist/shadcns/components/ui/switch.js +1 -1
- package/dist/shadcns/components/ui/table.js +1 -1
- package/dist/shadcns/components/ui/tabs.js +1 -1
- package/dist/shadcns/components/ui/textarea.js +2 -1
- package/dist/shadcns/components/ui/toggle-group.d.ts +1 -1
- package/dist/shadcns/components/ui/toggle-group.js +1 -2
- package/dist/shadcns/components/ui/toggle.d.ts +1 -1
- package/dist/shadcns/components/ui/toggle.js +1 -1
- package/dist/shadcns/components/ui/tooltip.js +1 -1
- package/dist/shadcns/index.d.ts +48 -0
- package/dist/shadcns/index.js +48 -0
- package/dist/types/shadcns.type.d.ts +0 -1
- package/dist/types/shadcns.type.js +1 -0
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +0 -5
- package/package.json +3 -11
- package/dist/hooks/useIsMobile.d.ts +0 -1
- package/dist/hooks/useIsMobile.js +0 -16
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useAnchors } from "../../hooks/index.js";
|
|
4
|
-
import { cn } from "../../
|
|
4
|
+
import { cn } from "../../shadcns/index.js";
|
|
5
5
|
export const AnchorTarget = ({ children, className, name }) => {
|
|
6
6
|
const { registerAnchors } = useAnchors();
|
|
7
7
|
return (_jsx("div", { className: cn(className), ...registerAnchors(name), children: children }));
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Button } from "../../shadcns/
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Button } from "../../shadcns/index.js";
|
|
4
|
+
import { CarouselPrevious } from "../../shadcns/index.js";
|
|
5
|
+
import { Carousel } from "../../shadcns/index.js";
|
|
4
6
|
const Tests = () => {
|
|
5
|
-
return (_jsx(Button, { children: "test123133232" }));
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx(Carousel, { children: _jsx(CarouselPrevious, {}) }), _jsx(Button, { children: "test123133232" })] }));
|
|
6
8
|
};
|
|
7
9
|
Tests.displayName = "Tests";
|
|
8
10
|
export default Tests;
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { animate } from "motion/react";
|
|
2
2
|
import type { Easing } from "motion/react";
|
|
3
|
-
|
|
4
|
-
}
|
|
3
|
+
import { registerContainers } from "./useScrollContainers";
|
|
5
4
|
export interface AnimateOptions {
|
|
6
5
|
duration?: number;
|
|
7
6
|
delay?: number;
|
|
@@ -34,9 +33,9 @@ export interface ScrollOptions extends AnimateOptions {
|
|
|
34
33
|
export type AnimateController = ReturnType<typeof animate>;
|
|
35
34
|
export declare function useAnchors(): {
|
|
36
35
|
registerAnchors: typeof registerAnchors;
|
|
37
|
-
registerContainers: typeof registerContainers;
|
|
38
36
|
registerOffseters: typeof registerOffseters;
|
|
39
|
-
|
|
37
|
+
registerContainers: typeof registerContainers;
|
|
38
|
+
setStores: (options: AnchorStoreOptions) => void;
|
|
40
39
|
getStores: () => AnchorsStores;
|
|
41
40
|
scrollToAnchor: (anchorOptions: AnchorOptions) => void;
|
|
42
41
|
};
|
|
@@ -50,22 +49,17 @@ export declare function registerAnchors(name: string): {
|
|
|
50
49
|
ref: (node: HTMLDivElement | null) => void;
|
|
51
50
|
"data-anchor": string;
|
|
52
51
|
};
|
|
53
|
-
export declare function registerContainers(name: string): {
|
|
54
|
-
ref: (node: HTMLDivElement | null) => void;
|
|
55
|
-
"data-anchor-container": string;
|
|
56
|
-
};
|
|
57
52
|
export declare function registerOffseters(name: string): {
|
|
58
53
|
ref: (node: HTMLDivElement | null) => void;
|
|
59
54
|
"data-anchor-offseter": string;
|
|
60
55
|
};
|
|
61
56
|
export interface AnchorsStores {
|
|
62
57
|
anchors: Map<string, HTMLElement | null>;
|
|
63
|
-
containers: Map<string, HTMLElement | null>;
|
|
64
58
|
offseters: Map<string, HTMLElement | null>;
|
|
65
59
|
}
|
|
66
60
|
export declare const useAnchorsStores: import("zustand").UseBoundStore<import("zustand").StoreApi<AnchorsStores>>;
|
|
67
61
|
export declare const getAnchorsStores: () => AnchorsStores;
|
|
68
|
-
export interface
|
|
62
|
+
export interface AnchorStoreOptions extends RegistrationDatas {
|
|
69
63
|
action: "add" | "remove";
|
|
70
64
|
}
|
|
71
|
-
export declare const
|
|
65
|
+
export declare const setAnchorsStore: (options: AnchorStoreOptions) => void;
|
package/dist/hooks/useAnchors.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
// update: 2025.
|
|
3
|
-
// version: 0.0.
|
|
2
|
+
// update: 2025.11.07
|
|
3
|
+
// version: 0.0.2.bate
|
|
4
4
|
// dev: wade
|
|
5
5
|
import { useCallback, useMemo, useRef } from "react";
|
|
6
6
|
import { animate, motionValue } from "motion/react";
|
|
7
7
|
import { create } from "zustand";
|
|
8
|
+
import { getScrollContainersStores, registerContainers } from "./useScrollContainers";
|
|
9
|
+
const ANCHOR_ATTRIBUTE = "data-anchor";
|
|
10
|
+
const OFFSETER_ATTRIBUTE = "data-anchor-offseter";
|
|
8
11
|
export function useAnchors() {
|
|
9
12
|
const controllerRef = useRef(new Map());
|
|
10
13
|
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 }) => {
|
|
@@ -38,7 +41,8 @@ export function useAnchors() {
|
|
|
38
41
|
}, []);
|
|
39
42
|
const scrollToAnchor = useCallback((anchorOptions) => {
|
|
40
43
|
const { anchor: anchorName, container: containerName, offseters, align, offset = 0, ...options } = anchorOptions;
|
|
41
|
-
const
|
|
44
|
+
const anchorsStores = getAnchorsStores();
|
|
45
|
+
const scrollContainersStores = getScrollContainersStores();
|
|
42
46
|
const isScrolltoAnchor = anchorName !== "#";
|
|
43
47
|
const isScrollContainer = containerName && containerName !== "window";
|
|
44
48
|
const controllerKey = containerName ?? "window";
|
|
@@ -47,12 +51,12 @@ export function useAnchors() {
|
|
|
47
51
|
controllerRef.current.delete(controllerKey);
|
|
48
52
|
}
|
|
49
53
|
const anchorDom = isScrolltoAnchor
|
|
50
|
-
?
|
|
54
|
+
? anchorsStores.anchors.get(anchorName)
|
|
51
55
|
: undefined;
|
|
52
56
|
if (isScrolltoAnchor && !(anchorDom instanceof HTMLElement))
|
|
53
57
|
return;
|
|
54
58
|
const containerDom = isScrollContainer
|
|
55
|
-
?
|
|
59
|
+
? scrollContainersStores.containers.get(containerName)
|
|
56
60
|
: window;
|
|
57
61
|
if (!containerDom)
|
|
58
62
|
return;
|
|
@@ -73,7 +77,7 @@ export function useAnchors() {
|
|
|
73
77
|
};
|
|
74
78
|
const offsetsValue = Array.isArray(offseters)
|
|
75
79
|
? offseters.reduce((init, offseter) => {
|
|
76
|
-
const offseterDom =
|
|
80
|
+
const offseterDom = anchorsStores.offseters.get(offseter);
|
|
77
81
|
const width = (init.width ?? 0) + (offseterDom ? offseterDom.clientWidth : 0);
|
|
78
82
|
const height = (init.height ?? 0) + (offseterDom ? offseterDom.clientHeight : 0);
|
|
79
83
|
return { width, height };
|
|
@@ -102,9 +106,9 @@ export function useAnchors() {
|
|
|
102
106
|
}, []);
|
|
103
107
|
const returnsMemo = useMemo(() => ({
|
|
104
108
|
registerAnchors,
|
|
105
|
-
registerContainers,
|
|
106
109
|
registerOffseters,
|
|
107
|
-
|
|
110
|
+
registerContainers: registerContainers,
|
|
111
|
+
setStores: setAnchorsStore,
|
|
108
112
|
getStores: getAnchorsStores,
|
|
109
113
|
scrollToAnchor
|
|
110
114
|
}), [scrollToAnchor]);
|
|
@@ -117,54 +121,47 @@ export function registration({ name, key, node }) {
|
|
|
117
121
|
console.error(`Cannot register ${key} name '#'`);
|
|
118
122
|
return;
|
|
119
123
|
}
|
|
120
|
-
|
|
121
|
-
console.error(`Cannot register ${key} 'body' or 'html' `);
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
setAnchorStore({ key, name, node, action: node ? "add" : "remove" });
|
|
124
|
+
setAnchorsStore({ key, name, node, action: node ? "add" : "remove" });
|
|
125
125
|
}
|
|
126
|
-
const ANCHOR_ATTRIBUTE = "data-anchor";
|
|
127
|
-
const CONTAINER_ATTRIBUTE = "data-anchor-container";
|
|
128
|
-
const OFFSETER_ATTRIBUTE = "data-anchor-offseter";
|
|
129
126
|
export function registerAnchors(name) {
|
|
130
127
|
const register = useCallback((node) => registration({ key: "anchors", name, node }), [name]);
|
|
131
128
|
return { ref: register, [ANCHOR_ATTRIBUTE]: name };
|
|
132
129
|
}
|
|
133
|
-
export function registerContainers(name) {
|
|
134
|
-
const register = useCallback((node) => registration({ key: "containers", name, node }), [name]);
|
|
135
|
-
return { ref: register, [CONTAINER_ATTRIBUTE]: name };
|
|
136
|
-
}
|
|
137
130
|
export function registerOffseters(name) {
|
|
138
131
|
const register = useCallback((node) => registration({ key: "offseters", name, node }), [name]);
|
|
139
132
|
return { ref: register, [OFFSETER_ATTRIBUTE]: name };
|
|
140
133
|
}
|
|
141
134
|
export const useAnchorsStores = create()(() => ({
|
|
142
135
|
anchors: new Map(),
|
|
143
|
-
containers: new Map(),
|
|
136
|
+
// containers: new Map(),
|
|
144
137
|
offseters: new Map(),
|
|
145
138
|
}));
|
|
146
139
|
export const getAnchorsStores = () => useAnchorsStores.getState();
|
|
147
|
-
export const
|
|
148
|
-
const { key, action, name, node } =
|
|
140
|
+
export const setAnchorsStore = (options) => {
|
|
141
|
+
const { key, action, name, node } = options;
|
|
149
142
|
useAnchorsStores.setState(stores => {
|
|
150
143
|
switch (key) {
|
|
151
144
|
case "anchors":
|
|
152
|
-
|
|
145
|
+
const anchorDom = stores.anchors?.get(name);
|
|
146
|
+
if (action == "add" && node instanceof HTMLElement) {
|
|
147
|
+
if (anchorDom == node)
|
|
148
|
+
return stores;
|
|
153
149
|
stores.anchors?.set(name, node);
|
|
154
|
-
|
|
150
|
+
}
|
|
151
|
+
else if (action == "remove" && anchorDom) {
|
|
155
152
|
stores.anchors?.delete(name);
|
|
153
|
+
}
|
|
156
154
|
return { anchors: stores.anchors };
|
|
157
|
-
case "containers":
|
|
158
|
-
if (action == "add" && node instanceof HTMLElement)
|
|
159
|
-
stores.containers?.set(name, node);
|
|
160
|
-
if (action == "remove")
|
|
161
|
-
stores.containers?.delete(name);
|
|
162
|
-
return { containers: stores.containers };
|
|
163
155
|
case "offseters":
|
|
164
|
-
|
|
156
|
+
const offseterDom = stores.offseters?.get(name);
|
|
157
|
+
if (action == "add" && node instanceof HTMLElement) {
|
|
158
|
+
if (offseterDom == node)
|
|
159
|
+
return stores;
|
|
165
160
|
stores.offseters?.set(name, node);
|
|
166
|
-
|
|
161
|
+
}
|
|
162
|
+
else if (action == "remove" && offseterDom) {
|
|
167
163
|
stores.offseters?.delete(name);
|
|
164
|
+
}
|
|
168
165
|
return { offseters: stores.offseters };
|
|
169
166
|
default:
|
|
170
167
|
return stores;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface UseScrollContainers {
|
|
2
|
+
container?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare function useScrollContainers(options?: UseScrollContainers): {
|
|
5
|
+
container: HTMLElement | (Window & typeof globalThis);
|
|
6
|
+
setStores: (options: AnchorStoreOptions) => void;
|
|
7
|
+
getStores: () => ScrollContainersStores;
|
|
8
|
+
registerContainers: typeof registerContainers;
|
|
9
|
+
};
|
|
10
|
+
export declare function registration({ name, node }: RegistrationDatas): void;
|
|
11
|
+
export declare function registerContainers(name: string): {
|
|
12
|
+
ref: (node: HTMLDivElement | null) => void;
|
|
13
|
+
"data-scroll-container": string;
|
|
14
|
+
};
|
|
15
|
+
export interface ScrollContainersStores {
|
|
16
|
+
containers: Map<string, HTMLElement | null>;
|
|
17
|
+
}
|
|
18
|
+
export declare const useScrollContainersStores: import("zustand").UseBoundStore<import("zustand").StoreApi<ScrollContainersStores>>;
|
|
19
|
+
export declare const getScrollContainersStores: () => ScrollContainersStores;
|
|
20
|
+
export interface RegistrationDatas {
|
|
21
|
+
name: string;
|
|
22
|
+
node: HTMLDivElement | null;
|
|
23
|
+
}
|
|
24
|
+
export interface AnchorStoreOptions extends RegistrationDatas {
|
|
25
|
+
action: "add" | "remove";
|
|
26
|
+
}
|
|
27
|
+
export declare const setScrollContainerStore: (options: AnchorStoreOptions) => void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// update: 2025.11.07
|
|
3
|
+
// version: 0.0.1.bate
|
|
4
|
+
// dev: wade
|
|
5
|
+
import { useCallback } from "react";
|
|
6
|
+
import { create } from "zustand";
|
|
7
|
+
const CONTAINER_ATTRIBUTE = "data-scroll-container";
|
|
8
|
+
export function useScrollContainers(options) {
|
|
9
|
+
const { container: containerName } = options || {};
|
|
10
|
+
const stores = getScrollContainersStores();
|
|
11
|
+
const isScrollContainer = containerName && containerName !== "window";
|
|
12
|
+
const containerDom = isScrollContainer
|
|
13
|
+
? stores.containers.get(containerName)
|
|
14
|
+
: window;
|
|
15
|
+
return {
|
|
16
|
+
container: containerDom,
|
|
17
|
+
setStores: setScrollContainerStore,
|
|
18
|
+
getStores: getScrollContainersStores,
|
|
19
|
+
registerContainers
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export function registration({ name, node }) {
|
|
23
|
+
if (!node)
|
|
24
|
+
return;
|
|
25
|
+
if (node instanceof Window || node.tagName === "BODY" || node.tagName === "HTML") {
|
|
26
|
+
console.error(`Cannot register scroll container 'body' or 'html' `);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
setScrollContainerStore({ name, node, action: node ? "add" : "remove" });
|
|
30
|
+
}
|
|
31
|
+
export function registerContainers(name) {
|
|
32
|
+
const register = useCallback((node) => registration({ name, node }), [name]);
|
|
33
|
+
return { ref: register, [CONTAINER_ATTRIBUTE]: name };
|
|
34
|
+
}
|
|
35
|
+
export const useScrollContainersStores = create()(() => ({
|
|
36
|
+
containers: new Map(),
|
|
37
|
+
}));
|
|
38
|
+
export const getScrollContainersStores = () => useScrollContainersStores.getState();
|
|
39
|
+
export const setScrollContainerStore = (options) => {
|
|
40
|
+
const { action, name, node } = options;
|
|
41
|
+
useScrollContainersStores.setState(stores => {
|
|
42
|
+
const containerDom = stores.containers?.get(name);
|
|
43
|
+
if (action == "add" && node instanceof HTMLElement) {
|
|
44
|
+
if (containerDom == node)
|
|
45
|
+
return stores;
|
|
46
|
+
stores.containers?.set(name, node);
|
|
47
|
+
}
|
|
48
|
+
else if (action == "remove" && containerDom) {
|
|
49
|
+
stores.containers?.delete(name);
|
|
50
|
+
}
|
|
51
|
+
return { containers: stores.containers };
|
|
52
|
+
});
|
|
53
|
+
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
4
|
import { ChevronDownIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function Accordion({ ...props }) {
|
|
7
7
|
return _jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
8
8
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
4
|
-
import { cn } from '../../
|
|
5
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
4
|
+
import { cn, buttonVariants } from '../../index.js';
|
|
6
5
|
function AlertDialog({ ...props }) {
|
|
7
6
|
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
8
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const alertVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { cva } from 'class-variance-authority';
|
|
3
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
4
5
|
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
6
|
variants: {
|
|
6
7
|
variant: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function Avatar({ className, ...props }) {
|
|
6
6
|
return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", className: cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className), ...props }));
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "outline" | "destructive" | "secondary" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
7
7
|
asChild?: boolean;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
4
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
5
6
|
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
7
|
variants: {
|
|
7
8
|
variant: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
3
|
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function Breadcrumb({ ...props }) {
|
|
6
6
|
return _jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "outline" | "link" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
9
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
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
7
|
variants: {
|
|
8
8
|
variant: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DayButton, DayPicker } from 'react-day-picker';
|
|
3
|
-
import { Button } from '
|
|
3
|
+
import { Button } from '../../index.js';
|
|
4
4
|
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
5
|
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,8 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
|
|
5
5
|
import { DayPicker, getDefaultClassNames } from 'react-day-picker';
|
|
6
|
-
import { cn } from '../../
|
|
7
|
-
import { Button, buttonVariants } from '../../../shadcns/components/ui/button';
|
|
6
|
+
import { cn, Button, buttonVariants } from '../../index.js';
|
|
8
7
|
function Calendar({ className, classNames, showOutsideDays = true, captionLayout = 'label', buttonVariant = 'ghost', formatters, components, ...props }) {
|
|
9
8
|
const defaultClassNames = getDefaultClassNames();
|
|
10
9
|
return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn('bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent', String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../
|
|
3
|
+
import { cn } from '../../index.js';
|
|
3
4
|
function Card({ className, ...props }) {
|
|
4
5
|
return (_jsx("div", { "data-slot": "card", className: cn('bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm', className), ...props }));
|
|
5
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
|
|
3
|
-
import { Button } from '../../
|
|
3
|
+
import { Button } from '../../index.js';
|
|
4
4
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
5
5
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
6
6
|
type CarouselOptions = UseCarouselParameters[0];
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
5
5
|
import { ArrowLeft, ArrowRight } from 'lucide-react';
|
|
6
|
-
import { cn } from '../../
|
|
7
|
-
import { Button } from '../../
|
|
6
|
+
import { cn } from '../../index.js';
|
|
7
|
+
import { Button } from '../../index.js';
|
|
8
8
|
const CarouselContext = React.createContext(null);
|
|
9
9
|
function useCarousel() {
|
|
10
10
|
const context = React.useContext(CarouselContext);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as RechartsPrimitive from 'recharts';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
// Format: { THEME_NAME: CSS_SELECTOR }
|
|
7
7
|
const THEMES = { light: '', dark: '.dark' };
|
|
8
8
|
const ChartContext = React.createContext(null);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
4
4
|
import { CheckIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function Checkbox({ className, ...props }) {
|
|
7
7
|
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn('peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }) }));
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
|
-
import { Dialog } from '../../
|
|
3
|
+
import { Dialog } from '../../index.js';
|
|
4
4
|
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
6
6
|
title?: string;
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Command as CommandPrimitive } from 'cmdk';
|
|
4
4
|
import { SearchIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
6
|
-
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from '../../components/ui/dialog';
|
|
5
|
+
import { cn, Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from '../../index.js';
|
|
7
6
|
function Command({ className, ...props }) {
|
|
8
7
|
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn('bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md', className), ...props }));
|
|
9
8
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
4
4
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function ContextMenu({ ...props }) {
|
|
7
7
|
return _jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
import { XIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function Dialog({ ...props }) {
|
|
7
7
|
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function Drawer({ ...props }) {
|
|
6
6
|
return _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
4
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function DropdownMenu({ ...props }) {
|
|
7
7
|
return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
8
8
|
}
|
|
@@ -3,8 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Slot } from '@radix-ui/react-slot';
|
|
5
5
|
import { Controller, FormProvider, useFormContext, useFormState, } from 'react-hook-form';
|
|
6
|
-
import { cn } from '../../
|
|
7
|
-
import { Label } from '../../components/ui/label';
|
|
6
|
+
import { cn, Label } from '../../index.js';
|
|
8
7
|
const Form = FormProvider;
|
|
9
8
|
const FormFieldContext = React.createContext({});
|
|
10
9
|
const FormField = ({ ...props }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function HoverCard({ ...props }) {
|
|
6
6
|
return _jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
5
5
|
import { MinusIcon } from 'lucide-react';
|
|
6
|
-
import { cn } from '../../
|
|
6
|
+
import { cn } from '../../index.js';
|
|
7
7
|
function InputOTP({ className, containerClassName, ...props }) {
|
|
8
8
|
return (_jsx(OTPInput, { "data-slot": "input-otp", containerClassName: cn('flex items-center gap-2 has-disabled:opacity-50', containerClassName), className: cn('disabled:cursor-not-allowed', className), ...props }));
|
|
9
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../
|
|
2
|
+
import { cn } from '../../index.js';
|
|
3
3
|
function Input({ className, type, ...props }) {
|
|
4
4
|
return (_jsx("input", { type: type, "data-slot": "input", className: cn('file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', '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', className), ...props }));
|
|
5
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function Label({ className, ...props }) {
|
|
6
6
|
return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn('flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className), ...props }));
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
4
4
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function Menubar({ className, ...props }) {
|
|
7
7
|
return (_jsx(MenubarPrimitive.Root, { "data-slot": "menubar", className: cn('bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs', className), ...props }));
|
|
8
8
|
}
|
|
@@ -5,7 +5,7 @@ declare function NavigationMenu({ className, children, viewport, ...props }: Rea
|
|
|
5
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function NavigationMenuList({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function NavigationMenuItem({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/
|
|
8
|
+
declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
9
|
declare function NavigationMenuTrigger({ className, children, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare function NavigationMenuContent({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare function NavigationMenuViewport({ className, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
3
4
|
import { cva } from 'class-variance-authority';
|
|
4
5
|
import { ChevronDownIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
6
|
+
import { cn } from '../../index.js';
|
|
6
7
|
function NavigationMenu({ className, children, viewport = true, ...props }) {
|
|
7
8
|
return (_jsxs(NavigationMenuPrimitive.Root, { "data-slot": "navigation-menu", "data-viewport": viewport, className: cn('group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', className), ...props, children: [children, viewport && _jsx(NavigationMenuViewport, {})] }));
|
|
8
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button } from '../../
|
|
2
|
+
import { Button } from '../../index.js';
|
|
3
3
|
declare function Pagination({ className, ...props }: React.ComponentProps<'nav'>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function PaginationItem({ ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';
|
|
3
|
-
import { cn } from '../../
|
|
4
|
-
import { buttonVariants } from '../../components/ui/button';
|
|
3
|
+
import { cn, buttonVariants } from '../../index.js';
|
|
5
4
|
function Pagination({ className, ...props }) {
|
|
6
5
|
return (_jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn('mx-auto flex w-full justify-center', className), ...props }));
|
|
7
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function Popover({ ...props }) {
|
|
6
6
|
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function Progress({ className, value, ...props }) {
|
|
6
6
|
return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress", className: cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className), ...props, children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "bg-primary h-full w-full flex-1 transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) }));
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
4
4
|
import { CircleIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function RadioGroup({ className, ...props }) {
|
|
7
7
|
return (_jsx(RadioGroupPrimitive.Root, { "data-slot": "radio-group", className: cn('grid gap-3', className), ...props }));
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { GripVerticalIcon } from 'lucide-react';
|
|
4
4
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function ResizablePanelGroup({ className, ...props }) {
|
|
7
7
|
return (_jsx(ResizablePrimitive.PanelGroup, { "data-slot": "resizable-panel-group", className: cn('flex h-full w-full data-[panel-group-direction=vertical]:flex-col', className), ...props }));
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function ScrollArea({ className, children, ...props }) {
|
|
6
6
|
return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn('relative', className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
4
4
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function Select({ ...props }) {
|
|
7
7
|
return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function Separator({ className, orientation = 'horizontal', decorative = true, ...props }) {
|
|
6
6
|
return (_jsx(SeparatorPrimitive.Root, { "data-slot": "separator", decorative: decorative, orientation: orientation, className: cn('bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px', className), ...props }));
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
import { XIcon } from 'lucide-react';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function Sheet({ ...props }) {
|
|
7
7
|
return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
8
8
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { Button } from '../../
|
|
4
|
-
import { Input } from '../../components/ui/input';
|
|
5
|
-
import { Separator } from '../../components/ui/separator';
|
|
6
|
-
import { TooltipContent } from '../../components/ui/tooltip';
|
|
3
|
+
import { Button, Input, Separator, TooltipContent } from '../../index.js';
|
|
7
4
|
type SidebarContextProps = {
|
|
8
5
|
state: 'expanded' | 'collapsed';
|
|
9
6
|
open: boolean;
|
|
@@ -45,7 +42,7 @@ declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<'
|
|
|
45
42
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
46
43
|
variant?: "default" | "outline" | null | undefined;
|
|
47
44
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
48
|
-
} & import("class-variance-authority/
|
|
45
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
49
46
|
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<'button'> & {
|
|
50
47
|
asChild?: boolean;
|
|
51
48
|
isActive?: boolean;
|
|
@@ -4,14 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { Slot } from '@radix-ui/react-slot';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { PanelLeftIcon } from 'lucide-react';
|
|
7
|
-
import { useIsMobile } from '../../
|
|
8
|
-
import { cn } from '../../lib/utils';
|
|
9
|
-
import { Button } from '../../components/ui/button';
|
|
10
|
-
import { Input } from '../../components/ui/input';
|
|
11
|
-
import { Separator } from '../../components/ui/separator';
|
|
12
|
-
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from '../../components/ui/sheet';
|
|
13
|
-
import { Skeleton } from '../../components/ui/skeleton';
|
|
14
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '../../components/ui/tooltip';
|
|
7
|
+
import { cn, useIsMobile, Button, Input, Separator, Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Skeleton } from '../../index.js';
|
|
15
8
|
const SIDEBAR_COOKIE_NAME = 'sidebar_state';
|
|
16
9
|
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
17
10
|
const SIDEBAR_WIDTH = '16rem';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../
|
|
2
|
+
import { cn } from '../../index.js';
|
|
3
3
|
function Skeleton({ className, ...props }) {
|
|
4
4
|
return (_jsx("div", { "data-slot": "skeleton", className: cn('bg-accent animate-pulse rounded-md', className), ...props }));
|
|
5
5
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
|
|
7
7
|
const _values = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [value, defaultValue, min, max]);
|
|
8
8
|
return (_jsxs(SliderPrimitive.Root, { "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: cn('relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col', className), ...props, children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: cn('bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5'), children: _jsx(SliderPrimitive.Range, { "data-slot": "slider-range", className: cn('bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full') }) }), Array.from({ length: _values.length }, (_, index) => (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50" }, index)))] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function Switch({ className, ...props }) {
|
|
6
6
|
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn('peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn('bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0') }) }));
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../../
|
|
3
|
+
import { cn } from '../../index.js';
|
|
4
4
|
function Table({ className, ...props }) {
|
|
5
5
|
return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", { "data-slot": "table", className: cn('w-full caption-bottom text-sm', className), ...props }) }));
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function Tabs({ className, ...props }) {
|
|
6
6
|
return (_jsx(TabsPrimitive.Root, { "data-slot": "tabs", className: cn('flex flex-col gap-2', className), ...props }));
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from '../../
|
|
3
|
+
import { cn } from '../../index.js';
|
|
3
4
|
function Textarea({ className, ...props }) {
|
|
4
5
|
return (_jsx("textarea", { "data-slot": "textarea", className: cn('border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', className), ...props }));
|
|
5
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
-
import { toggleVariants } from '../../
|
|
4
|
+
import { toggleVariants } from '../../index.js';
|
|
5
5
|
declare function ToggleGroup({ className, variant, size, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
5
|
-
import { cn } from '../../
|
|
6
|
-
import { toggleVariants } from '../../components/ui/toggle';
|
|
5
|
+
import { cn, toggleVariants } from '../../index.js';
|
|
7
6
|
const ToggleGroupContext = React.createContext({
|
|
8
7
|
size: 'default',
|
|
9
8
|
variant: 'default',
|
|
@@ -4,6 +4,6 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
5
|
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
-
} & import("class-variance-authority/
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export { Toggle, toggleVariants };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
import { cn } from '../../
|
|
5
|
+
import { cn } from '../../index.js';
|
|
6
6
|
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
|
-
import { cn } from '../../
|
|
4
|
+
import { cn } from '../../index.js';
|
|
5
5
|
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
6
6
|
return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
|
|
7
7
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export * from "./components/ui/accordion";
|
|
2
|
+
export * from "./components/ui/alert-dialog";
|
|
3
|
+
export * from "./components/ui/alert";
|
|
4
|
+
export * from "./components/ui/aspect-ratio";
|
|
5
|
+
export * from "./components/ui/avatar";
|
|
6
|
+
export * from "./components/ui/badge";
|
|
7
|
+
export * from "./components/ui/breadcrumb";
|
|
8
|
+
export * from "./components/ui/button";
|
|
9
|
+
export * from "./components/ui/calendar";
|
|
10
|
+
export * from "./components/ui/card";
|
|
11
|
+
export * from "./components/ui/carousel";
|
|
12
|
+
export * from "./components/ui/chart";
|
|
13
|
+
export * from "./components/ui/checkbox";
|
|
14
|
+
export * from "./components/ui/collapsible";
|
|
15
|
+
export * from "./components/ui/command";
|
|
16
|
+
export * from "./components/ui/context-menu";
|
|
17
|
+
export * from "./components/ui/dialog";
|
|
18
|
+
export * from "./components/ui/drawer";
|
|
19
|
+
export * from "./components/ui/dropdown-menu";
|
|
20
|
+
export * from "./components/ui/form";
|
|
21
|
+
export * from "./components/ui/hover-card";
|
|
22
|
+
export * from "./components/ui/input-otp";
|
|
23
|
+
export * from "./components/ui/input";
|
|
24
|
+
export * from "./components/ui/label";
|
|
25
|
+
export * from "./components/ui/menubar";
|
|
26
|
+
export * from "./components/ui/navigation-menu";
|
|
27
|
+
export * from "./components/ui/pagination";
|
|
28
|
+
export * from "./components/ui/popover";
|
|
29
|
+
export * from "./components/ui/progress";
|
|
30
|
+
export * from "./components/ui/radio-group";
|
|
31
|
+
export * from "./components/ui/resizable";
|
|
32
|
+
export * from "./components/ui/scroll-area";
|
|
33
|
+
export * from "./components/ui/select";
|
|
34
|
+
export * from "./components/ui/separator";
|
|
35
|
+
export * from "./components/ui/sheet";
|
|
36
|
+
export * from "./components/ui/sidebar";
|
|
37
|
+
export * from "./components/ui/skeleton";
|
|
38
|
+
export * from "./components/ui/slider";
|
|
39
|
+
export * from "./components/ui/sonner";
|
|
40
|
+
export * from "./components/ui/switch";
|
|
41
|
+
export * from "./components/ui/tabs";
|
|
42
|
+
export * from "./components/ui/table";
|
|
43
|
+
export * from "./components/ui/textarea";
|
|
44
|
+
export * from "./components/ui/toggle-group";
|
|
45
|
+
export * from "./components/ui/toggle";
|
|
46
|
+
export * from "./components/ui/tooltip";
|
|
47
|
+
export * from "./hooks/use-mobile";
|
|
48
|
+
export * from "./lib/utils";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export * from "./components/ui/accordion";
|
|
2
|
+
export * from "./components/ui/alert-dialog";
|
|
3
|
+
export * from "./components/ui/alert";
|
|
4
|
+
export * from "./components/ui/aspect-ratio";
|
|
5
|
+
export * from "./components/ui/avatar";
|
|
6
|
+
export * from "./components/ui/badge";
|
|
7
|
+
export * from "./components/ui/breadcrumb";
|
|
8
|
+
export * from "./components/ui/button";
|
|
9
|
+
export * from "./components/ui/calendar";
|
|
10
|
+
export * from "./components/ui/card";
|
|
11
|
+
export * from "./components/ui/carousel";
|
|
12
|
+
export * from "./components/ui/chart";
|
|
13
|
+
export * from "./components/ui/checkbox";
|
|
14
|
+
export * from "./components/ui/collapsible";
|
|
15
|
+
export * from "./components/ui/command";
|
|
16
|
+
export * from "./components/ui/context-menu";
|
|
17
|
+
export * from "./components/ui/dialog";
|
|
18
|
+
export * from "./components/ui/drawer";
|
|
19
|
+
export * from "./components/ui/dropdown-menu";
|
|
20
|
+
export * from "./components/ui/form";
|
|
21
|
+
export * from "./components/ui/hover-card";
|
|
22
|
+
export * from "./components/ui/input-otp";
|
|
23
|
+
export * from "./components/ui/input";
|
|
24
|
+
export * from "./components/ui/label";
|
|
25
|
+
export * from "./components/ui/menubar";
|
|
26
|
+
export * from "./components/ui/navigation-menu";
|
|
27
|
+
export * from "./components/ui/pagination";
|
|
28
|
+
export * from "./components/ui/popover";
|
|
29
|
+
export * from "./components/ui/progress";
|
|
30
|
+
export * from "./components/ui/radio-group";
|
|
31
|
+
export * from "./components/ui/resizable";
|
|
32
|
+
export * from "./components/ui/scroll-area";
|
|
33
|
+
export * from "./components/ui/select";
|
|
34
|
+
export * from "./components/ui/separator";
|
|
35
|
+
export * from "./components/ui/sheet";
|
|
36
|
+
export * from "./components/ui/sidebar";
|
|
37
|
+
export * from "./components/ui/skeleton";
|
|
38
|
+
export * from "./components/ui/slider";
|
|
39
|
+
export * from "./components/ui/sonner";
|
|
40
|
+
export * from "./components/ui/switch";
|
|
41
|
+
export * from "./components/ui/tabs";
|
|
42
|
+
export * from "./components/ui/table";
|
|
43
|
+
export * from "./components/ui/textarea";
|
|
44
|
+
export * from "./components/ui/toggle-group";
|
|
45
|
+
export * from "./components/ui/toggle";
|
|
46
|
+
export * from "./components/ui/tooltip";
|
|
47
|
+
export * from "./hooks/use-mobile";
|
|
48
|
+
export * from "./lib/utils";
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { ClassValue } from "clsx";
|
|
2
|
-
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
1
|
export declare const regexParse: (regexString: string, flags?: string) => RegExp | String;
|
|
4
2
|
export declare const regexReplaceEach: (currentValue: string, replace: {
|
|
5
3
|
pattern: string;
|
package/dist/utils/index.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { lock, clearBodyLocks } from "tua-body-scroll-lock";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { twMerge } from "tailwind-merge";
|
|
4
|
-
export function cn(...inputs) {
|
|
5
|
-
return twMerge(clsx(...inputs));
|
|
6
|
-
}
|
|
7
2
|
export const regexParse = (regexString, flags) => {
|
|
8
3
|
const regex = regexString.replace(/\\\\/g, "\\");
|
|
9
4
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwadex/fesd-next",
|
|
3
|
-
"version": "0.3.4-7.
|
|
3
|
+
"version": "0.3.4-7.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,16 +14,8 @@
|
|
|
14
14
|
"types": "./dist/components/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"./shadcns": {
|
|
17
|
-
"import": "./dist/shadcns
|
|
18
|
-
"types": "./dist/shadcns
|
|
19
|
-
},
|
|
20
|
-
"./shadcns/hooks": {
|
|
21
|
-
"import": "./dist/shadcns/hooks/*",
|
|
22
|
-
"types": "./dist/shadcns/hooks/*"
|
|
23
|
-
},
|
|
24
|
-
"./shadcns/lib": {
|
|
25
|
-
"import": "./dist/shadcns/lib/*",
|
|
26
|
-
"types": "./dist/shadcns/lib/*"
|
|
17
|
+
"import": "./dist/shadcns/index.js",
|
|
18
|
+
"types": "./dist/shadcns/index.d.ts"
|
|
27
19
|
},
|
|
28
20
|
"./hooks": {
|
|
29
21
|
"import": "./dist/hooks/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useIsMobile(): boolean;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
const MOBILE_BREAKPOINT = 768;
|
|
4
|
-
export function useIsMobile() {
|
|
5
|
-
const [isMobile, setIsMobile] = useState(undefined);
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
8
|
-
const onChange = () => {
|
|
9
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
10
|
-
};
|
|
11
|
-
mql.addEventListener("change", onChange);
|
|
12
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
13
|
-
return () => mql.removeEventListener("change", onChange);
|
|
14
|
-
}, []);
|
|
15
|
-
return !!isMobile;
|
|
16
|
-
}
|