@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.
@@ -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" | "link" | null | undefined;
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 "../shadcns/lib/utils";
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: {
@@ -1,3 +1,4 @@
1
+ export * from "./accordions";
1
2
  export * from "./button";
2
3
  export * from "./dragResize";
3
4
  export * from "./dragSortable";
@@ -1,3 +1,4 @@
1
+ export * from "./accordions";
1
2
  export * from "./button";
2
3
  export * from "./dragResize";
3
4
  export * from "./dragSortable";
@@ -4,3 +4,4 @@ export * from "./useCookies";
4
4
  export * from "./useDragResize";
5
5
  export * from "./useAsyncFetcher";
6
6
  export * from "./useCollapse";
7
+ export * from "./useMounted";
@@ -4,3 +4,4 @@ export * from "./useCookies";
4
4
  export * from "./useDragResize";
5
5
  export * from "./useAsyncFetcher";
6
6
  export * from "./useCollapse";
7
+ export * from "./useMounted";
@@ -0,0 +1,3 @@
1
+ export declare function useMounted(): {
2
+ isMounded: boolean;
3
+ };
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { useEffect, useState } from "react";
3
+ export function useMounted() {
4
+ const [isMounded, setMounded] = useState(false);
5
+ useEffect(() => { setMounded(true); }, []);
6
+ return { isMounded };
7
+ }
@@ -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.625rem;
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
+ }
@@ -1 +1,2 @@
1
+ export * from "./shadcns.type";
1
2
  export * from "./components.type";
@@ -1 +1,2 @@
1
+ export * from "./shadcns.type";
1
2
  export * from "./components.type";
@@ -0,0 +1 @@
1
+ export type { ComponentProps } from "react";
@@ -0,0 +1 @@
1
+ export {};
@@ -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;
@@ -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.28",
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
  }
@@ -1,2 +0,0 @@
1
- import { ClassValue } from "clsx";
2
- export declare function cn(...inputs: ClassValue[]): string;
@@ -1,5 +0,0 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
- export function cn(...inputs) {
4
- return twMerge(clsx(...inputs));
5
- }