@xwadex/fesd-next 0.3.28 → 0.3.30
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/accordions/accordion.d.ts +7 -0
- package/dist/components/accordions/accordion.js +50 -0
- package/dist/components/accordions/index.d.ts +1 -0
- package/dist/components/accordions/index.js +1 -0
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useMounted.d.ts +3 -0
- package/dist/hooks/useMounted.js +7 -0
- package/dist/styles/defaults.css +52 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/shadcns.type.d.ts +1 -0
- package/dist/types/shadcns.type.js +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +5 -0
- package/package.json +3 -2
- package/dist/shadcns/lib/utils.d.ts +0 -2
- package/dist/shadcns/lib/utils.js +0 -5
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
2
|
+
import type { ComponentProps } from "../../types/index.js";
|
|
3
|
+
declare function Accordion({ ...props }: ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,50 @@
|
|
|
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 "../../utils/index.js";
|
|
6
|
+
import { useMounted } from "../../hooks/index.js";
|
|
7
|
+
function Accordion({ ...props }) {
|
|
8
|
+
return _jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
9
|
+
}
|
|
10
|
+
function AccordionItem({ className, ...props }) {
|
|
11
|
+
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: className, ...props }));
|
|
12
|
+
}
|
|
13
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
14
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn(`
|
|
15
|
+
focus-visible:border-ring
|
|
16
|
+
focus-visible:ring-ring/50
|
|
17
|
+
flex
|
|
18
|
+
flex-1
|
|
19
|
+
items-start
|
|
20
|
+
justify-between
|
|
21
|
+
gap-4
|
|
22
|
+
rounded-md
|
|
23
|
+
py-4
|
|
24
|
+
text-left
|
|
25
|
+
text-sm
|
|
26
|
+
font-medium
|
|
27
|
+
transition-all
|
|
28
|
+
outline-none
|
|
29
|
+
focus-visible:ring-[3px]
|
|
30
|
+
disabled:pointer-events-none
|
|
31
|
+
disabled:opacity-50
|
|
32
|
+
[&[data-state=open]>svg]:rotate-180`, className), ...props, children: [children, _jsx(ChevronDownIcon, { className: `
|
|
33
|
+
text-muted-foreground
|
|
34
|
+
pointer-events-none
|
|
35
|
+
size-4
|
|
36
|
+
shrink-0
|
|
37
|
+
translate-y-0.5
|
|
38
|
+
transition-transform
|
|
39
|
+
duration-200` })] }) }));
|
|
40
|
+
}
|
|
41
|
+
function AccordionContent({ className, children, ...props }) {
|
|
42
|
+
const { isMounded } = useMounted();
|
|
43
|
+
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: cn(`
|
|
44
|
+
overflow-hidden
|
|
45
|
+
text-sm`, isMounded && `
|
|
46
|
+
data-[state=closed]:animate-accordion-up2
|
|
47
|
+
data-[state=open]:animate-accordion-down2
|
|
48
|
+
`), ...props, children: _jsx("div", { className: cn("pt-0 pb-4 group-data-[state=closed]:text-red", className), children: children }) }));
|
|
49
|
+
}
|
|
50
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./accordion";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./accordion";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" |
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
import { cn } from "../
|
|
4
|
+
import { cn } from "../utils/index.js";
|
|
5
5
|
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", {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
package/dist/components/index.js
CHANGED
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
package/dist/styles/defaults.css
CHANGED
|
@@ -67,10 +67,58 @@ a {
|
|
|
67
67
|
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
68
68
|
--color-sidebar-border: var(--sidebar-border);
|
|
69
69
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
70
|
+
|
|
71
|
+
--animate-collapsible-down: collapsible-down 0.2s ease-out;
|
|
72
|
+
--animate-collapsible-up: collapsible-up 0.2s ease-out;
|
|
73
|
+
--animate-accordion-down2: accordion-down 0.2s ease-out;
|
|
74
|
+
--animate-accordion-up2: accordion-up 0.2s ease-out;
|
|
75
|
+
|
|
76
|
+
--animate-accordion-down3: accordion-down3 2s ease-out;
|
|
77
|
+
--animate-accordion-up3: accordion-up3 2s ease-out;
|
|
78
|
+
|
|
79
|
+
@keyframes accordion-down {
|
|
80
|
+
from {
|
|
81
|
+
height: 0;
|
|
82
|
+
opacity: 0;
|
|
83
|
+
}
|
|
84
|
+
to {
|
|
85
|
+
height: var(--radix-accordion-content-height);
|
|
86
|
+
opacity: 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@keyframes accordion-up {
|
|
91
|
+
from {
|
|
92
|
+
height: var(--radix-accordion-content-height);
|
|
93
|
+
opacity: 1;
|
|
94
|
+
}
|
|
95
|
+
to {
|
|
96
|
+
height: 0;
|
|
97
|
+
opacity: 0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@keyframes accordion-down3 {
|
|
102
|
+
from {
|
|
103
|
+
color: #ff0000;
|
|
104
|
+
}
|
|
105
|
+
to {
|
|
106
|
+
color: #000000;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@keyframes accordion-up3 {
|
|
111
|
+
from {
|
|
112
|
+
color: #000000;
|
|
113
|
+
}
|
|
114
|
+
to {
|
|
115
|
+
color: #ff0000;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
70
118
|
}
|
|
71
119
|
|
|
72
120
|
:root {
|
|
73
|
-
--radius: 0.
|
|
121
|
+
--radius: 0.375rem;
|
|
74
122
|
--card: oklch(1 0 0);
|
|
75
123
|
--card-foreground: oklch(0.145 0 0);
|
|
76
124
|
--popover: oklch(1 0 0);
|
|
@@ -146,3 +194,6 @@ a {
|
|
|
146
194
|
@apply bg-background text-foreground;
|
|
147
195
|
}
|
|
148
196
|
}
|
|
197
|
+
|
|
198
|
+
@theme {
|
|
199
|
+
}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ComponentProps } from "react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ClassValue } from "clsx";
|
|
2
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
1
3
|
export declare const regexParse: (regexString: string, flags?: string) => RegExp | String;
|
|
2
4
|
export declare const regexReplaceEach: (currentValue: string, replace: {
|
|
3
5
|
pattern: string;
|
package/dist/utils/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
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
|
+
}
|
|
2
7
|
export const regexParse = (regexString, flags) => {
|
|
3
8
|
const regex = regexString.replace(/\\\\/g, "\\");
|
|
4
9
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwadex/fesd-next",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.30",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"tailwind-merge": "^3.3.1",
|
|
54
54
|
"tua-body-scroll-lock": "^1.5.3",
|
|
55
55
|
"react-sortablejs": "^6.1.4",
|
|
56
|
-
"motion": "^12.18.1"
|
|
56
|
+
"motion": "^12.18.1",
|
|
57
|
+
"tw-animate-css": "^1.3.4"
|
|
57
58
|
}
|
|
58
59
|
}
|