@xwadex/fesd-next 0.3.4-4.1 → 0.3.4-7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/components/TestComponent.d.ts +4 -0
  2. package/dist/components/TestComponent.js +10 -0
  3. package/dist/components/index.d.ts +2 -5
  4. package/dist/components/index.js +2 -7
  5. package/dist/hooks/index.d.ts +2 -1
  6. package/dist/hooks/index.js +2 -1
  7. package/dist/hooks/useAnchors.d.ts +51 -0
  8. package/dist/hooks/useAnchors.js +121 -0
  9. package/dist/hooks/useAsyncFetcher.d.ts +4 -3
  10. package/dist/hooks/useCookies.d.ts +1 -1
  11. package/dist/hooks/useCookies.js +9 -14
  12. package/dist/hooks/useDragResize.d.ts +6 -3
  13. package/dist/hooks/useDragResize.js +20 -8
  14. package/dist/hooks/useEffectLeave.d.ts +1 -0
  15. package/dist/hooks/useEffectLeave.js +12 -0
  16. package/dist/hooks/useEffectOne.d.ts +1 -0
  17. package/dist/hooks/useEffectOne.js +12 -0
  18. package/dist/hooks/useIsMobile.d.ts +1 -0
  19. package/dist/hooks/useIsMobile.js +16 -0
  20. package/dist/hooks/useLocations.d.ts +13 -0
  21. package/dist/hooks/useLocations.js +25 -0
  22. package/package.json +2 -8
  23. package/dist/components/accordions/accordion.d.ts +0 -10
  24. package/dist/components/accordions/accordion.js +0 -10
  25. package/dist/components/accordions/accordionContent.d.ts +0 -11
  26. package/dist/components/accordions/accordionContent.js +0 -20
  27. package/dist/components/accordions/accordionItem.d.ts +0 -11
  28. package/dist/components/accordions/accordionItem.js +0 -14
  29. package/dist/components/accordions/accordionTrigger.d.ts +0 -11
  30. package/dist/components/accordions/accordionTrigger.js +0 -88
  31. package/dist/components/accordions/index.d.ts +0 -35
  32. package/dist/components/accordions/index.js +0 -11
  33. package/dist/components/button.d.ts +0 -10
  34. package/dist/components/button.js +0 -31
  35. package/dist/components/dragResize/dragResize.d.ts +0 -19
  36. package/dist/components/dragResize/dragResize.js +0 -77
  37. package/dist/components/dragResize/dragResize.module.scss +0 -42
  38. package/dist/components/dragResize/dragResizeContext.d.ts +0 -10
  39. package/dist/components/dragResize/dragResizeContext.js +0 -9
  40. package/dist/components/dragResize/index.d.ts +0 -2
  41. package/dist/components/dragResize/index.js +0 -2
  42. package/dist/components/dragSortable/dragSortable.d.ts +0 -19
  43. package/dist/components/dragSortable/dragSortable.js +0 -11
  44. package/dist/components/dragSortable/dragSortable.module.scss +0 -7
  45. package/dist/components/dragSortable/index.d.ts +0 -1
  46. package/dist/components/dragSortable/index.js +0 -1
  47. package/dist/components/resizables/index.d.ts +0 -66
  48. package/dist/components/resizables/index.js +0 -8
  49. package/dist/components/resizables/resizableHandle.d.ts +0 -11
  50. package/dist/components/resizables/resizableHandle.js +0 -48
  51. package/dist/components/resizables/resizablePanel.d.ts +0 -10
  52. package/dist/components/resizables/resizablePanel.js +0 -9
  53. package/dist/components/resizables/resizablePanelGroup.d.ts +0 -10
  54. package/dist/components/resizables/resizablePanelGroup.js +0 -14
  55. package/dist/components/scrollAreas/index.d.ts +0 -1
  56. package/dist/components/scrollAreas/index.js +0 -1
  57. package/dist/components/scrollAreas/scroll-area.d.ts +0 -5
  58. package/dist/components/scrollAreas/scroll-area.js +0 -11
  59. package/dist/hooks/useCollapse.d.ts +0 -15
  60. package/dist/hooks/useCollapse.js +0 -52
  61. package/dist/styles/defaults.css +0 -155
@@ -1,88 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
4
- import { cn } from "../../utils/index.js";
5
- import { useImperativeHandle, useRef } from "react";
6
- const AccordionTrigger = (props) => {
7
- const { as, ref, children, className, ...restProps } = props;
8
- const Component = as || "button";
9
- const isButton = Component === "button";
10
- const insideRef = useRef(null);
11
- useImperativeHandle(ref, () => insideRef.current);
12
- return (_jsx(AccordionPrimitive.Header, { asChild: true, children: _jsx(AccordionPrimitive.Trigger, { asChild: true, "data-slot": "accordion-trigger", ...restProps, children: _jsx(Component, { ref: insideRef, type: isButton ? "button" : undefined, role: !isButton ? "button" : undefined, "aria-expanded": props["aria-expanded"], "aria-controls": props["aria-controls"], tabIndex: 0,
13
- // onKeyDown={(e) => console.log(e)}
14
- className: cn(`focus-visible:border-ring
15
- focus-visible:ring-ring/50
16
- focus-visible:ring-[3px]`, className), children: children }) }) }));
17
- };
18
- // type AccordionTriggerProps<T extends React.ElementType
19
- // > = ShadcnBaseProps<T, React.ComponentPropsWithoutRef<
20
- // typeof AccordionPrimitive.Trigger>
21
- // > & {
22
- // defaultIcon?: boolean
23
- // className?: string
24
- // children?: React.ReactNode
25
- // }
26
- // function AccordionTrigger<T extends React.ElementType = "button">({
27
- // as,
28
- // asChild,
29
- // children,
30
- // className,
31
- // defaultIcon,
32
- // ...props
33
- // }: AccordionTriggerProps<T>) {
34
- // const Component = as || "button"
35
- // const isButton = Component === "button"
36
- // const isUseIcon = defaultIcon && `
37
- // flex
38
- // flex-1
39
- // items-start
40
- // justify-between
41
- // gap-4
42
- // rounded-md
43
- // text-left
44
- // focus-visible:ring-[3px]
45
- // [&[data-state=open]>svg]:rotate-180
46
- // `
47
- // return (
48
- // <AccordionPrimitive.Header asChild>
49
- // <AccordionPrimitive.Trigger
50
- // asChild
51
- // data-slot="accordion-trigger"
52
- // {...props}
53
- // >
54
- // <Component
55
- // type={isButton ? "button" : undefined}
56
- // role={!isButton ? "button" : undefined}
57
- // aria-expanded={props["aria-expanded"]}
58
- // aria-controls={props["aria-controls"]}
59
- // tabIndex={0}
60
- // className={cn(`
61
- // outline-none
62
- // focus-visible:border-ring
63
- // focus-visible:ring-ring/50
64
- // disabled:pointer-events-none
65
- // disabled:opacity-50`,
66
- // isUseIcon,
67
- // className
68
- // )}
69
- // >
70
- // {children}
71
- // {isUseIcon && <ChevronDownIcon
72
- // className={`
73
- // text-muted-foreground
74
- // pointer-events-none
75
- // size-4
76
- // shrink-0
77
- // translate-y-0.5
78
- // transition-transform
79
- // duration-200
80
- // `}
81
- // />}
82
- // </Component>
83
- // </AccordionPrimitive.Trigger>
84
- // </AccordionPrimitive.Header>
85
- // )
86
- // }
87
- AccordionTrigger.displayName = "AccordionTrigger";
88
- export default AccordionTrigger;
@@ -1,35 +0,0 @@
1
- export declare const Accordions: {
2
- Root: {
3
- (props: import("../..").ShadcnBaseProps<import("react").ForwardRefExoticComponent<(import("@radix-ui/react-accordion").AccordionSingleProps | import("@radix-ui/react-accordion").AccordionMultipleProps) & import("react").RefAttributes<HTMLDivElement>>> & {
4
- as?: React.ElementType;
5
- }): import("react/jsx-runtime").JSX.Element;
6
- displayName: string;
7
- };
8
- Content: {
9
- (props: {
10
- as?: React.ElementType;
11
- } & import("@radix-ui/react-accordion").AccordionContentProps & import("react").RefAttributes<HTMLDivElement> & {
12
- as?: React.ElementType;
13
- ref?: React.Ref<Element>;
14
- }): import("react/jsx-runtime").JSX.Element;
15
- displayName: string;
16
- };
17
- Item: {
18
- (props: {
19
- as?: React.ElementType;
20
- } & import("@radix-ui/react-accordion").AccordionItemProps & import("react").RefAttributes<HTMLDivElement> & {
21
- as?: React.ElementType;
22
- ref?: React.Ref<Element>;
23
- }): import("react/jsx-runtime").JSX.Element;
24
- displayName: string;
25
- };
26
- Trigger: {
27
- (props: {
28
- as?: React.ElementType;
29
- } & import("@radix-ui/react-accordion").AccordionTriggerProps & import("react").RefAttributes<HTMLButtonElement> & {
30
- as?: React.ElementType;
31
- ref?: React.Ref<Element>;
32
- }): import("react/jsx-runtime").JSX.Element;
33
- displayName: string;
34
- };
35
- };
@@ -1,11 +0,0 @@
1
- import { default as AccordionRoot } from "./accordion";
2
- import { default as AccordionContent } from "./accordionContent";
3
- import { default as AccordionItem } from "./accordionItem";
4
- import { default as AccordionTrigger } from "./accordionTrigger";
5
- export const Accordions = {
6
- Root: AccordionRoot,
7
- Content: AccordionContent,
8
- Item: AccordionItem,
9
- Trigger: AccordionTrigger
10
- };
11
- // export * from "./accordion"
@@ -1,10 +0,0 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "class-variance-authority";
3
- declare const buttonVariants: (props?: ({
4
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "icon" | "sm" | "lg" | 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 };
@@ -1,31 +0,0 @@
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 "../utils/index.js";
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
- variants: {
7
- variant: {
8
- default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
9
- 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",
10
- 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",
11
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
12
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
13
- link: "text-primary underline-offset-4 hover:underline",
14
- },
15
- size: {
16
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
17
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
18
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
19
- icon: "size-9",
20
- },
21
- },
22
- defaultVariants: {
23
- variant: "default",
24
- size: "default",
25
- },
26
- });
27
- function Button({ className, variant, size, asChild = false, ...props }) {
28
- const Comp = asChild ? Slot : "button";
29
- return (_jsx(Comp, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props }));
30
- }
31
- export { Button, buttonVariants };
@@ -1,19 +0,0 @@
1
- import { DragResizePropsTypes, ResizeTypes } from "../../hooks/index.js";
2
- import { AsPropsTypes } from "../../types/index.js";
3
- type PropsTypes<T extends React.ElementType = "div"> = AsPropsTypes<T, {
4
- as?: React.ElementType;
5
- children: React.ReactNode;
6
- defaultWidth?: number;
7
- defaultHeight?: number;
8
- resizeClass?: string;
9
- dragLineWidth?: number;
10
- dragLineColor?: string;
11
- containerClass?: string;
12
- dragClass?: string;
13
- resizeStore?: boolean;
14
- resizeStoreKey?: string;
15
- resizeStoreValue?: ResizeTypes;
16
- } & DragResizePropsTypes>;
17
- declare const DragResizeBase: <T extends React.ElementType = "div">(props: PropsTypes<T>) => import("react/jsx-runtime").JSX.Element;
18
- declare const DragResize: React.MemoExoticComponent<typeof DragResizeBase>;
19
- export default DragResize;
@@ -1,77 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { memo, useCallback, useMemo, useState } from "react";
4
- import { useDragResize, useCookies } from "../../hooks/index.js";
5
- import { DragResizeContext } from "./dragResizeContext";
6
- import { mergeClassName } from "../../utils/index.js";
7
- import styles from "./dragResize.module.scss";
8
- const DragResizeBase = (props) => {
9
- const { as, children, defaultWidth, defaultHeight, resizeClass, containerClass, dragClass, resizeStore = true, resizeStoreKey, resizeStoreValue, active = true, direction = "width", minWidth = 500, maxWidth = 950, dragLineWidth = 5, dragLineColor = "rgba(0, 0, 0, 1)", onInit, onResizeStart, onResizing, onResizeEnd, ...othersProps } = props;
10
- const RootComponent = as || "div";
11
- const [isActive, setActive] = useState(active);
12
- const { setCookies, deleteCookies } = useCookies();
13
- const resizeCSS = useMemo(() => mergeClassName(styles.root, resizeClass ? resizeClass : ""), [resizeClass]);
14
- const dragCSS = useMemo(() => mergeClassName(styles.drag, dragClass ? dragClass : "", !isActive ? styles.off : ""), [isActive, dragClass]);
15
- const containerCSS = useMemo(() => mergeClassName(styles.container, containerClass ? containerClass : ""), [containerClass]);
16
- const isCookieStore = useMemo(() => resizeStore
17
- && resizeStoreKey
18
- && resizeStoreKey !== ""
19
- ? true : false, [resizeStore, resizeStoreKey]);
20
- const resizeDefauleStyles = useMemo(() => {
21
- if (!isCookieStore || !resizeStoreValue)
22
- return {
23
- width: minWidth + "px",
24
- // height: minHeight + "px"
25
- };
26
- const { width, height } = resizeStoreValue;
27
- return {
28
- width: width ? width + "px" : "inherit",
29
- height: height ? height + "px" : "inherit",
30
- };
31
- }, [isCookieStore, resizeStoreValue]);
32
- const onResizeEndHandler = useCallback((size) => {
33
- onResizeEnd?.(size);
34
- if (!isCookieStore)
35
- return;
36
- setCookies(resizeStoreKey, JSON.stringify(size));
37
- }, [isCookieStore, onResizeEnd, resizeStore]);
38
- //Hooks
39
- const { dragRef, resizeRef } = useDragResize({
40
- active: isActive,
41
- direction,
42
- minWidth,
43
- maxWidth,
44
- onInit,
45
- onResizeStart,
46
- onResizing,
47
- onResizeEnd: onResizeEndHandler,
48
- });
49
- //Context Functions
50
- const setResizeActive = useCallback((active) => setActive(active), [setActive]);
51
- const clearResizeStore = useCallback(() => resizeStoreKey
52
- ? deleteCookies(resizeStoreKey)
53
- : console.error("resizeStoreKey is not undefined"), [resizeStoreKey]);
54
- const defaultResizeSize = useCallback(() => {
55
- if (!resizeRef.current)
56
- return;
57
- resizeRef.current.style.width = minWidth + "px";
58
- // resizeRef.current.style.height = minHeight + "px"
59
- clearResizeStore();
60
- }, [resizeRef.current, clearResizeStore]);
61
- const contextValue = useMemo(() => ({
62
- setResizeActive,
63
- clearResizeStore,
64
- defaultResizeSize
65
- }), [
66
- setResizeActive,
67
- clearResizeStore,
68
- defaultResizeSize
69
- ]);
70
- return (_jsx(DragResizeContext, { value: contextValue, children: _jsxs(RootComponent, { ...othersProps, ref: resizeRef, className: resizeCSS, style: resizeDefauleStyles, children: [_jsx("div", { className: containerCSS, children: children }), _jsx("div", { ref: dragRef, className: dragCSS, style: {
71
- "--drag-line-width": dragLineWidth + "px",
72
- "--drag-line-color": dragLineColor
73
- } })] }) }));
74
- };
75
- const DragResize = memo(DragResizeBase);
76
- DragResize.displayName = "DragResize";
77
- export default DragResize;
@@ -1,42 +0,0 @@
1
- .root {
2
- width: inherit;
3
- height: inherit;
4
- display: flex;
5
- flex-direction: row;
6
- }
7
-
8
- .container {
9
- width: inherit;
10
- height: inherit;
11
- }
12
-
13
- .drag {
14
- --drag-line-width: 2px;
15
- --drag-line-color: rgbs(0, 0, 0, 1);
16
-
17
- width: 0;
18
- height: inherit;
19
- position: relative;
20
- z-index: 2;
21
-
22
- &::before {
23
- content: "";
24
- width: 0;
25
- height: inherit;
26
- border-left: var(--drag-line-width) solid var(--drag-line-color);
27
- position: absolute;
28
- inset: 0 0 0 calc(var(--drag-line-width) / 2 * -1);
29
- z-index: 1;
30
- opacity: 0;
31
- transition: 0.5s ease-in-out;
32
- }
33
-
34
- &:not(.off) {
35
- &:hover {
36
- cursor: ew-resize;
37
- &::before {
38
- opacity: 1;
39
- }
40
- }
41
- }
42
- }
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- export interface DragResizeContextType {
3
- setResizeActive: (active: boolean) => void;
4
- clearResizeStore: () => void;
5
- defaultResizeSize: () => void;
6
- }
7
- export declare const DragResizeContext: React.Context<DragResizeContextType | undefined> & {
8
- displayName: string;
9
- };
10
- export declare const useDragResizeContext: () => DragResizeContextType;
@@ -1,9 +0,0 @@
1
- "use client";
2
- import { use, createContext } from "react";
3
- export const DragResizeContext = Object.assign(createContext(undefined), { displayName: "DragResizeContext" });
4
- export const useDragResizeContext = () => {
5
- const context = use(DragResizeContext);
6
- if (context)
7
- return context;
8
- throw new Error("DragResizeContext is not defined!!");
9
- };
@@ -1,2 +0,0 @@
1
- export { default as DragResize } from "./dragResize";
2
- export * from "./dragResizeContext";
@@ -1,2 +0,0 @@
1
- export { default as DragResize } from "./dragResize";
2
- export * from "./dragResizeContext";
@@ -1,19 +0,0 @@
1
- import type { AsPropsTypes } from "../../types/index.js";
2
- import type { Sortable, Store } from "react-sortablejs";
3
- type PropsTypes<T extends React.ElementType = "div"> = AsPropsTypes<T, {
4
- as?: string;
5
- children: React.ReactNode;
6
- datasets: any[];
7
- rootClass?: string;
8
- sorterClass?: string;
9
- handlerClass?: string;
10
- style?: React.CSSProperties;
11
- disabled?: boolean;
12
- animation?: number;
13
- onChange?: (newState: any[], sortable: Sortable | null, store: Store) => void;
14
- onStart?: ((evt: Sortable.SortableEvent, sortable: Sortable | null, store: Store) => void) | undefined;
15
- onEnd?: ((evt: Sortable.SortableEvent, sortable: Sortable | null, store: Store) => void) | undefined;
16
- }>;
17
- declare const DragSortableBase: <T extends React.ElementType = "div">(props: PropsTypes<T>) => import("react/jsx-runtime").JSX.Element;
18
- declare const DragSortable: React.MemoExoticComponent<typeof DragSortableBase>;
19
- export default DragSortable;
@@ -1,11 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { memo } from "react";
4
- import { ReactSortable } from "react-sortablejs";
5
- const DragSortableBase = (props) => {
6
- const { as, children, datasets = [], rootClass, sorterClass, handlerClass, style, animation = 150, disabled = false, onChange, onStart, onEnd, ...othersProps } = props;
7
- return (_jsx(ReactSortable, { ...othersProps, tag: as, disabled: disabled, className: rootClass, ghostClass: sorterClass, handle: "." + handlerClass, fallbackClass: "sortable-fallback", list: datasets, setList: onChange, animation: animation, style: style, onStart: onStart, onEnd: onEnd, children: children }));
8
- };
9
- const DragSortable = memo(DragSortableBase);
10
- DragSortable.displayName = "DragSortable";
11
- export default DragSortable;
@@ -1,7 +0,0 @@
1
- .dragging {
2
- > * {
3
- &:hover {
4
- background-color: transparent !important;
5
- }
6
- }
7
- }
@@ -1 +0,0 @@
1
- export { default as DragSortable } from "./dragSortable";
@@ -1 +0,0 @@
1
- export { default as DragSortable } from "./dragSortable";
@@ -1,66 +0,0 @@
1
- export declare const Resizables: {
2
- Root: {
3
- (props: Omit<import("react").HTMLAttributes<keyof HTMLElementTagNameMap>, "id"> & {
4
- autoSaveId?: string | null;
5
- className?: string;
6
- direction: import("react-resizable-panels/dist/declarations/src/types").Direction;
7
- id?: string | null;
8
- keyboardResizeBy?: number | null;
9
- onLayout?: import("react-resizable-panels").PanelGroupOnLayout | null;
10
- storage?: import("react-resizable-panels").PanelGroupStorage;
11
- style?: import("react").CSSProperties;
12
- tagName?: keyof HTMLElementTagNameMap;
13
- dir?: "auto" | "ltr" | "rtl" | undefined;
14
- } & {
15
- children?: import("react").ReactNode | undefined;
16
- } & import("react").RefAttributes<import("react-resizable-panels").ImperativePanelGroupHandle> & {
17
- as?: keyof HTMLElementTagNameMap;
18
- }): import("react/jsx-runtime").JSX.Element;
19
- displayName: string;
20
- };
21
- Panel: {
22
- (props: Omit<import("react").HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLInputElement | HTMLProgressElement | HTMLSelectElement | HTMLButtonElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLSlotElement | HTMLScriptElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
23
- className?: string;
24
- collapsedSize?: number | undefined;
25
- collapsible?: boolean | undefined;
26
- defaultSize?: number | undefined;
27
- id?: string;
28
- maxSize?: number | undefined;
29
- minSize?: number | undefined;
30
- onCollapse?: import("react-resizable-panels").PanelOnCollapse;
31
- onExpand?: import("react-resizable-panels").PanelOnExpand;
32
- onResize?: import("react-resizable-panels").PanelOnResize;
33
- order?: number;
34
- style?: object;
35
- tagName?: keyof HTMLElementTagNameMap | undefined;
36
- } & {
37
- children?: import("react").ReactNode | undefined;
38
- } & import("react").RefAttributes<import("react-resizable-panels").ImperativePanelHandle> & {
39
- as?: keyof HTMLElementTagNameMap;
40
- }): import("react/jsx-runtime").JSX.Element;
41
- displayName: string;
42
- };
43
- Handle: {
44
- (props: Omit<import("react").HTMLAttributes<keyof HTMLElementTagNameMap>, "id" | "onFocus" | "onBlur" | "onClick" | "onPointerDown" | "onPointerUp"> & {
45
- className?: string;
46
- disabled?: boolean;
47
- hitAreaMargins?: import("react-resizable-panels").PointerHitAreaMargins;
48
- id?: string | null;
49
- onBlur?: () => void;
50
- onClick?: () => void;
51
- onDragging?: import("react-resizable-panels").PanelResizeHandleOnDragging;
52
- onFocus?: () => void;
53
- onPointerDown?: () => void;
54
- onPointerUp?: () => void;
55
- style?: import("react").CSSProperties;
56
- tabIndex?: number;
57
- tagName?: keyof HTMLElementTagNameMap;
58
- } & {
59
- children?: import("react").ReactNode | undefined;
60
- } & {
61
- as?: keyof HTMLElementTagNameMap;
62
- withHandle?: boolean;
63
- }): import("react/jsx-runtime").JSX.Element;
64
- displayName: string;
65
- };
66
- };
@@ -1,8 +0,0 @@
1
- import { default as ResizablePanelGroup } from "./resizablePanelGroup";
2
- import { default as ResizablePanel } from "./resizablePanel";
3
- import { default as ResizableHandle } from "./resizableHandle";
4
- export const Resizables = {
5
- Root: ResizablePanelGroup,
6
- Panel: ResizablePanel,
7
- Handle: ResizableHandle,
8
- };
@@ -1,11 +0,0 @@
1
- import * as ResizablePrimitive from 'react-resizable-panels';
2
- import type { ComponentProps } from "../../types/index.js";
3
- type PropsType = ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
4
- as?: keyof HTMLElementTagNameMap;
5
- withHandle?: boolean;
6
- };
7
- declare const ResizableHandle: {
8
- (props: PropsType): import("react/jsx-runtime").JSX.Element;
9
- displayName: string;
10
- };
11
- export default ResizableHandle;
@@ -1,48 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as ResizablePrimitive from 'react-resizable-panels';
4
- import { cn } from "../../utils/index.js";
5
- const ResizableHandle = (props) => {
6
- const { as = "div", withHandle, className, ...restProps } = props;
7
- return (_jsx(ResizablePrimitive.PanelResizeHandle, { tagName: as, "data-slot": "resizable-handle", className: cn(`
8
- w-px
9
- bg-border
10
- relative
11
-
12
- flex
13
- items-center
14
- justify-center
15
-
16
- after:absolute
17
- after:inset-y-0
18
- after:left-1/2
19
- after:w-1
20
- after:-translate-x-1/2
21
-
22
- focus-visible:ring-1
23
- focus-visible:ring-ring
24
- focus-visible:ring-offset-1
25
- focus-visible:outline-hidden
26
-
27
- data-[panel-group-direction=vertical]:h-px
28
- data-[panel-group-direction=vertical]:w-full
29
- data-[panel-group-direction=vertical]:after:left-0
30
- data-[panel-group-direction=vertical]:after:h-1
31
- data-[panel-group-direction=vertical]:after:w-full
32
- data-[panel-group-direction=vertical]:after:translate-x-0
33
- data-[panel-group-direction=vertical]:after:-translate-y-1/2
34
-
35
- [&[data-panel-group-direction=vertical]>div]:rotate-90`, className), ...restProps, children: withHandle && (_jsx("div", { className: `
36
- bg-border
37
- z-10
38
- flex
39
- h-4
40
- w-3
41
- items-center
42
- justify-center
43
- rounded-xs
44
- border
45
- `, children: _jsx("div", { className: "w-0.5 h-full bg-amber-600" }) })) }));
46
- };
47
- ResizableHandle.displayName = "ResizableHandle";
48
- export default ResizableHandle;
@@ -1,10 +0,0 @@
1
- import * as ResizablePrimitive from 'react-resizable-panels';
2
- import type { ComponentProps } from "../../types/index.js";
3
- type PropsType = ComponentProps<typeof ResizablePrimitive.Panel> & {
4
- as?: keyof HTMLElementTagNameMap;
5
- };
6
- declare const ResizablePanel: {
7
- (props: PropsType): import("react/jsx-runtime").JSX.Element;
8
- displayName: string;
9
- };
10
- export default ResizablePanel;
@@ -1,9 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as ResizablePrimitive from 'react-resizable-panels';
4
- const ResizablePanel = (props) => {
5
- const { as = "div", ...restProps } = props;
6
- return (_jsx(ResizablePrimitive.Panel, { tagName: as, "data-slot": "resizable-panel", ...restProps }));
7
- };
8
- ResizablePanel.displayName = "ResizablePanel";
9
- export default ResizablePanel;
@@ -1,10 +0,0 @@
1
- import * as ResizablePrimitive from 'react-resizable-panels';
2
- import type { ComponentProps } from "../../types/index.js";
3
- type PropsType = ComponentProps<typeof ResizablePrimitive.PanelGroup> & {
4
- as?: keyof HTMLElementTagNameMap;
5
- };
6
- declare const ResizablePanelGroup: {
7
- (props: PropsType): import("react/jsx-runtime").JSX.Element;
8
- displayName: string;
9
- };
10
- export default ResizablePanelGroup;
@@ -1,14 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as ResizablePrimitive from 'react-resizable-panels';
4
- import { cn } from "../../utils/index.js";
5
- const ResizablePanelGroup = (props) => {
6
- const { as = "div", className, ...restProps } = props;
7
- return (_jsx(ResizablePrimitive.PanelGroup, { tagName: as, "data-slot": "resizable-panel-group", className: cn(`
8
- flex
9
- h-full
10
- w-full
11
- data-[panel-group-direction=vertical]:flex-col`, className), ...restProps }));
12
- };
13
- ResizablePanelGroup.displayName = "ResizablePanelGroup";
14
- export default ResizablePanelGroup;
@@ -1 +0,0 @@
1
- export * from "./scroll-area";
@@ -1 +0,0 @@
1
- export * from "./scroll-area";
@@ -1,5 +0,0 @@
1
- import * as React from "react";
2
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
3
- declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
5
- export { ScrollArea, ScrollBar };
@@ -1,11 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
4
- import { cn } from "../../utils/index.js";
5
- function ScrollArea({ className, children, ...props }) {
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
- }
8
- function ScrollBar({ className, orientation = "vertical", ...props }) {
9
- return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "bg-border relative flex-1 rounded-full" }) }));
10
- }
11
- export { ScrollArea, ScrollBar };
@@ -1,15 +0,0 @@
1
- export interface CollapseTypes {
2
- defaultOpen?: boolean;
3
- transDuration?: number;
4
- transTiming?: string;
5
- transMode?: "fade" | "normal";
6
- transMounted?: boolean;
7
- transDelay?: number;
8
- active?: boolean;
9
- onChange?: (state: boolean) => void;
10
- }
11
- export declare function useCollapse({ defaultOpen, transMounted, transDuration, transTiming, transMode, transDelay, active, }: CollapseTypes): {
12
- setOpen: (state: boolean) => void;
13
- open: boolean;
14
- contentRef: import("react").RefObject<HTMLDivElement | null>;
15
- };