@xwadex/fesd-next 0.3.44 → 0.3.46

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 (38) hide show
  1. package/dist/components/checkboxs/checkbox.d.ts +4 -0
  2. package/dist/components/checkboxs/checkbox.js +9 -0
  3. package/dist/components/checkboxs/index.d.ts +1 -0
  4. package/dist/components/checkboxs/index.js +1 -0
  5. package/dist/components/comboboxs/comboboxs.d.ts +1 -0
  6. package/dist/components/comboboxs/comboboxs.js +39 -0
  7. package/dist/components/comboboxs/index.d.ts +1 -0
  8. package/dist/components/comboboxs/index.js +1 -0
  9. package/dist/components/commands/command.d.ts +18 -0
  10. package/dist/components/commands/command.js +34 -0
  11. package/dist/components/commands/index.d.ts +1 -0
  12. package/dist/components/commands/index.js +1 -0
  13. package/dist/components/dialogs/dialog.d.ts +15 -0
  14. package/dist/components/dialogs/dialog.js +36 -0
  15. package/dist/components/dialogs/index.d.ts +1 -0
  16. package/dist/components/dialogs/index.js +1 -0
  17. package/dist/components/dragBoxs/dragBoxs.js +1 -3
  18. package/dist/components/dragResize/dragResize.d.ts +1 -1
  19. package/dist/components/dragResize/dragResize.js +11 -6
  20. package/dist/components/index.d.ts +8 -0
  21. package/dist/components/index.js +8 -0
  22. package/dist/components/popovers/index.d.ts +1 -0
  23. package/dist/components/popovers/index.js +1 -0
  24. package/dist/components/popovers/popover.d.ts +7 -0
  25. package/dist/components/popovers/popover.js +17 -0
  26. package/dist/components/radios/index.d.ts +1 -0
  27. package/dist/components/radios/index.js +1 -0
  28. package/dist/components/radios/radio-group.d.ts +5 -0
  29. package/dist/components/radios/radio-group.js +12 -0
  30. package/dist/components/selects/index.d.ts +1 -0
  31. package/dist/components/selects/index.js +1 -0
  32. package/dist/components/selects/select.d.ts +15 -0
  33. package/dist/components/selects/select.js +38 -0
  34. package/dist/components/switchs/index.d.ts +1 -0
  35. package/dist/components/switchs/index.js +1 -0
  36. package/dist/components/switchs/switch.d.ts +4 -0
  37. package/dist/components/switchs/switch.js +8 -0
  38. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
2
+ import type { ComponentProps } from "../../types/index.js";
3
+ declare function Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Checkbox };
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
+ import { CheckIcon } from 'lucide-react';
5
+ import { cn } from "../../utils/index.js";
6
+ function Checkbox({ className, ...props }) {
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
+ }
9
+ export { Checkbox };
@@ -0,0 +1 @@
1
+ export * from "./checkbox";
@@ -0,0 +1 @@
1
+ export * from "./checkbox";
@@ -0,0 +1 @@
1
+ export declare function ComboboxDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Check, ChevronsUpDown } from "lucide-react";
4
+ import { cn } from "../../utils/index.js";
5
+ import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "../commands";
6
+ import { Popover, PopoverContent, PopoverTrigger, } from "../popovers";
7
+ import { useState } from "react";
8
+ const frameworks = [
9
+ {
10
+ value: "next.js",
11
+ label: "Next.js",
12
+ },
13
+ {
14
+ value: "sveltekit",
15
+ label: "SvelteKit",
16
+ },
17
+ {
18
+ value: "nuxt.js",
19
+ label: "Nuxt.js",
20
+ },
21
+ {
22
+ value: "remix",
23
+ label: "Remix",
24
+ },
25
+ {
26
+ value: "astro",
27
+ label: "Astro",
28
+ },
29
+ ];
30
+ export function ComboboxDemo() {
31
+ const [open, setOpen] = useState(false);
32
+ const [value, setValue] = useState("");
33
+ return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { role: "combobox", "aria-expanded": open, className: "w-[200px] justify-between", children: [value
34
+ ? frameworks.find((framework) => framework.value === value)?.label
35
+ : "Select framework...", _jsx(ChevronsUpDown, { className: "opacity-50" })] }) }), _jsx(PopoverContent, { className: "w-[200px] p-0", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: "Search framework...", className: "h-9" }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No framework found." }), _jsx(CommandGroup, { children: frameworks.map((framework) => (_jsxs(CommandItem, { value: framework.value, onSelect: (currentValue) => {
36
+ setValue(currentValue === value ? "" : currentValue);
37
+ setOpen(false);
38
+ }, children: [framework.label, _jsx(Check, { className: cn("ml-auto", value === framework.value ? "opacity-100" : "opacity-0") })] }, framework.value))) })] })] }) })] }));
39
+ }
@@ -0,0 +1 @@
1
+ export * from "./comboboxs";
@@ -0,0 +1 @@
1
+ export * from "./comboboxs";
@@ -0,0 +1,18 @@
1
+ import { Command as CommandPrimitive } from 'cmdk';
2
+ import type { ComponentProps } from "../../types/index.js";
3
+ import { Dialog } from '../dialogs';
4
+ declare function Command({ className, ...props }: ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: ComponentProps<typeof Dialog> & {
6
+ title?: string;
7
+ description?: string;
8
+ className?: string;
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function CommandInput({ className, ...props }: ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
12
+ declare function CommandList({ className, ...props }: ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
13
+ declare function CommandEmpty({ ...props }: ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
14
+ declare function CommandGroup({ className, ...props }: ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
15
+ declare function CommandSeparator({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
16
+ declare function CommandItem({ className, ...props }: ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
17
+ declare function CommandShortcut({ className, ...props }: ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
18
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Command as CommandPrimitive } from 'cmdk';
4
+ import { SearchIcon } from 'lucide-react';
5
+ import { cn } from "../../utils/index.js";
6
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from '../dialogs';
7
+ function Command({ className, ...props }) {
8
+ 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
+ }
10
+ function CommandDialog({ title = 'Command Palette', description = 'Search for a command to run...', children, className, showCloseButton = true, ...props }) {
11
+ return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn('overflow-hidden p-0', className), showCloseButton: showCloseButton, children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) })] }));
12
+ }
13
+ function CommandInput({ className, ...props }) {
14
+ return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn('placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] }));
15
+ }
16
+ function CommandList({ className, ...props }) {
17
+ return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn('max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto', className), ...props }));
18
+ }
19
+ function CommandEmpty({ ...props }) {
20
+ return (_jsx(CommandPrimitive.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));
21
+ }
22
+ function CommandGroup({ className, ...props }) {
23
+ return (_jsx(CommandPrimitive.Group, { "data-slot": "command-group", className: cn('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className), ...props }));
24
+ }
25
+ function CommandSeparator({ className, ...props }) {
26
+ return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn('bg-border -mx-1 h-px', className), ...props }));
27
+ }
28
+ function CommandItem({ className, ...props }) {
29
+ return (_jsx(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
30
+ }
31
+ function CommandShortcut({ className, ...props }) {
32
+ return (_jsx("span", { "data-slot": "command-shortcut", className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className), ...props }));
33
+ }
34
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1 @@
1
+ export * from "./command";
@@ -0,0 +1 @@
1
+ export * from "./command";
@@ -0,0 +1,15 @@
1
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
2
+ import type { ComponentProps } from "../../types/index.js";
3
+ declare function Dialog({ ...props }: ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DialogTrigger({ ...props }: ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DialogPortal({ ...props }: ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DialogClose({ ...props }: ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, ...props }: ComponentProps<typeof DialogPrimitive.Content> & {
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function DialogHeader({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
12
+ declare function DialogFooter({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
13
+ declare function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
15
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ import { XIcon } from 'lucide-react';
5
+ import { cn } from "../../utils/index.js";
6
+ function Dialog({ ...props }) {
7
+ return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
8
+ }
9
+ function DialogTrigger({ ...props }) {
10
+ return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
11
+ }
12
+ function DialogPortal({ ...props }) {
13
+ return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
14
+ }
15
+ function DialogClose({ ...props }) {
16
+ return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
17
+ }
18
+ function DialogOverlay({ className, ...props }) {
19
+ return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50', className), ...props }));
20
+ }
21
+ function DialogContent({ className, children, showCloseButton = true, ...props }) {
22
+ return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg', className), ...props, children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
23
+ }
24
+ function DialogHeader({ className, ...props }) {
25
+ return (_jsx("div", { "data-slot": "dialog-header", className: cn('flex flex-col gap-2 text-center sm:text-left', className), ...props }));
26
+ }
27
+ function DialogFooter({ className, ...props }) {
28
+ return (_jsx("div", { "data-slot": "dialog-footer", className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className), ...props }));
29
+ }
30
+ function DialogTitle({ className, ...props }) {
31
+ return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn('text-lg leading-none font-semibold', className), ...props }));
32
+ }
33
+ function DialogDescription({ className, ...props }) {
34
+ return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn('text-muted-foreground text-sm', className), ...props }));
35
+ }
36
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1 @@
1
+ export * from "./dialog";
@@ -0,0 +1 @@
1
+ export * from "./dialog";
@@ -61,9 +61,7 @@ const DragBoxsBase = (props) => {
61
61
  window.addEventListener("resize", resizeEvent);
62
62
  return () => window.removeEventListener("resize", resizeEvent);
63
63
  }, []);
64
- return (_jsx(_Fragment, { children: isMounded
65
- ? createPortal(_jsx(DndContext, { onDragEnd: dragEndEvent, modifiers: [dragModifiers], children: _jsx(DragBoxsContext, { value: { id, positions }, children: _jsx("div", { "data-components": "dragboxs-root", children: children }) }) }), document.body)
66
- : null }));
64
+ return (_jsx(_Fragment, { children: isMounded ? createPortal(_jsx(DndContext, { onDragEnd: dragEndEvent, modifiers: [dragModifiers], children: _jsx(DragBoxsContext, { value: { id, positions }, children: _jsx("div", { "data-components": "dragboxs-root", children: children }) }) }), document.body) : null }));
67
65
  };
68
66
  const DragBoxs = memo(DragBoxsBase);
69
67
  DragBoxs.displayName = "DragBoxs";
@@ -7,7 +7,7 @@ type PropsTypes<T extends React.ElementType = "div"> = AsPropsTypes<T, {
7
7
  defaultHeight?: number;
8
8
  className?: string;
9
9
  handlerClassName?: string;
10
- resizeStore?: boolean;
10
+ isResizeStore?: boolean;
11
11
  resizeStoreKey?: string;
12
12
  resizeStoreValue?: ResizeTypes;
13
13
  } & DragResizePropsTypes>;
@@ -5,14 +5,14 @@ import { useDragResize, useCookies } from "../../hooks/index.js";
5
5
  import { DragResizeContext } from "./dragResizeContext";
6
6
  import { cn } from "../../utils/index.js";
7
7
  const DragResizeBase = (props) => {
8
- const { as, children, defaultWidth, defaultHeight, className, handlerClassName, resizeStore = true, resizeStoreKey, resizeStoreValue, active = true, direction = "horizontal", minWidth = 500, maxWidth = 950, onInit, onResizeStart, onResizing, onResizeEnd, ...othersProps } = props;
8
+ const { as, children, defaultWidth, defaultHeight, className, handlerClassName, resizeStoreKey, resizeStoreValue, isResizeStore = true, active = true, direction = "horizontal", minWidth = 500, maxWidth = 950, onInit, onResizeStart, onResizing, onResizeEnd, ...othersProps } = props;
9
9
  const RootComponent = as || "div";
10
10
  const [isActive, setActive] = useState(active);
11
- const { setCookies, deleteCookies } = useCookies();
12
- const isCookieStore = useMemo(() => resizeStore
11
+ const { setCookies, deleteCookies, getCookies } = useCookies();
12
+ const isCookieStore = useMemo(() => isResizeStore
13
13
  && resizeStoreKey
14
14
  && resizeStoreKey !== ""
15
- ? true : false, [resizeStore, resizeStoreKey]);
15
+ ? true : false, [isResizeStore, resizeStoreKey]);
16
16
  const resizeDefauleStyles = useMemo(() => {
17
17
  if (!isCookieStore || !resizeStoreValue)
18
18
  return {
@@ -29,8 +29,13 @@ const DragResizeBase = (props) => {
29
29
  onResizeEnd?.(size);
30
30
  if (!isCookieStore)
31
31
  return;
32
- setCookies(resizeStoreKey, JSON.stringify(size));
33
- }, [isCookieStore, onResizeEnd, resizeStore]);
32
+ const resizeCookies = getCookies("dragResize");
33
+ const resizeStores = resizeCookies ? JSON.parse(resizeCookies) : {};
34
+ const resizeStoreName = resizeStoreKey;
35
+ resizeStores[resizeStoreName] = {};
36
+ resizeStores[resizeStoreName] = { ...size };
37
+ setCookies("dragResize", JSON.stringify(resizeStores));
38
+ }, [isCookieStore, onResizeEnd, isResizeStore]);
34
39
  //Hooks
35
40
  const { dragRef, resizeRef } = useDragResize({
36
41
  active: isActive,
@@ -5,3 +5,11 @@ export * from "./accordions";
5
5
  export * from "./resizables";
6
6
  export * from "./scrollAreas";
7
7
  export * from "./dropdowns";
8
+ export * from "./selects";
9
+ export * from "./checkboxs";
10
+ export * from "./switchs";
11
+ export * from "./radios";
12
+ export * from "./commands";
13
+ export * from "./popovers";
14
+ export * from "./dialogs";
15
+ export * from "./comboboxs";
@@ -7,3 +7,11 @@ export * from "./accordions";
7
7
  export * from "./resizables";
8
8
  export * from "./scrollAreas";
9
9
  export * from "./dropdowns";
10
+ export * from "./selects";
11
+ export * from "./checkboxs";
12
+ export * from "./switchs";
13
+ export * from "./radios";
14
+ export * from "./commands";
15
+ export * from "./popovers";
16
+ export * from "./dialogs";
17
+ export * from "./comboboxs";
@@ -0,0 +1 @@
1
+ export * from "./popover";
@@ -0,0 +1 @@
1
+ export * from "./popover";
@@ -0,0 +1,7 @@
1
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
2
+ import type { ComponentProps } from "../../types/index.js";
3
+ declare function Popover({ ...props }: ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function PopoverTrigger({ ...props }: ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, ...props }: ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
6
+ declare function PopoverAnchor({ ...props }: ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
7
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
4
+ import { cn } from "../../utils/index.js";
5
+ function Popover({ ...props }) {
6
+ return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
7
+ }
8
+ function PopoverTrigger({ ...props }) {
9
+ return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
10
+ }
11
+ function PopoverContent({ className, align = 'center', sideOffset = 4, ...props }) {
12
+ return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden', className), ...props }) }));
13
+ }
14
+ function PopoverAnchor({ ...props }) {
15
+ return _jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
16
+ }
17
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -0,0 +1 @@
1
+ export * from "./radio-group";
@@ -0,0 +1 @@
1
+ export * from "./radio-group";
@@ -0,0 +1,5 @@
1
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
2
+ import type { ComponentProps } from "../../types/index.js";
3
+ declare function RadioGroup({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function RadioGroupItem({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
5
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
4
+ import { CircleIcon } from 'lucide-react';
5
+ import { cn } from "../../utils/index.js";
6
+ function RadioGroup({ className, ...props }) {
7
+ return (_jsx(RadioGroupPrimitive.Root, { "data-slot": "radio-group", className: cn('grid gap-3', className), ...props }));
8
+ }
9
+ function RadioGroupItem({ className, ...props }) {
10
+ return (_jsx(RadioGroupPrimitive.Item, { "data-slot": "radio-group-item", className: cn('border-input text-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 dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "relative flex items-center justify-center", children: _jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" }) }) }));
11
+ }
12
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1 @@
1
+ export * from "./select";
@@ -0,0 +1 @@
1
+ export * from "./select";
@@ -0,0 +1,15 @@
1
+ import * as SelectPrimitive from '@radix-ui/react-select';
2
+ import type { ComponentProps } from "../../types/index.js";
3
+ declare function Select({ ...props }: ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function SelectGroup({ ...props }: ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
5
+ declare function SelectValue({ ...props }: ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: ComponentProps<typeof SelectPrimitive.Trigger> & {
7
+ size?: 'sm' | 'default';
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function SelectContent({ className, children, position, ...props }: ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,38 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as SelectPrimitive from '@radix-ui/react-select';
4
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
5
+ import { cn } from "../../utils/index.js";
6
+ function Select({ ...props }) {
7
+ return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
8
+ }
9
+ function SelectGroup({ ...props }) {
10
+ return _jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
11
+ }
12
+ function SelectValue({ ...props }) {
13
+ return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
14
+ }
15
+ function SelectTrigger({ className, size = 'default', children, ...props }) {
16
+ return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]: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 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })] }));
17
+ }
18
+ function SelectContent({ className, children, position = 'popper', ...props }) {
19
+ return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { "data-slot": "select-content", className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md', position === 'popper' &&
20
+ 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn('p-1', position === 'popper' &&
21
+ 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1'), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
22
+ }
23
+ function SelectLabel({ className, ...props }) {
24
+ return (_jsx(SelectPrimitive.Label, { "data-slot": "select-label", className: cn('text-muted-foreground px-2 py-1.5 text-xs', className), ...props }));
25
+ }
26
+ function SelectItem({ className, children, ...props }) {
27
+ return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className), ...props, children: [_jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] }));
28
+ }
29
+ function SelectSeparator({ className, ...props }) {
30
+ return (_jsx(SelectPrimitive.Separator, { "data-slot": "select-separator", className: cn('bg-border pointer-events-none -mx-1 my-1 h-px', className), ...props }));
31
+ }
32
+ function SelectScrollUpButton({ className, ...props }) {
33
+ return (_jsx(SelectPrimitive.ScrollUpButton, { "data-slot": "select-scroll-up-button", className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: _jsx(ChevronUpIcon, { className: "size-4" }) }));
34
+ }
35
+ function SelectScrollDownButton({ className, ...props }) {
36
+ return (_jsx(SelectPrimitive.ScrollDownButton, { "data-slot": "select-scroll-down-button", className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: _jsx(ChevronDownIcon, { className: "size-4" }) }));
37
+ }
38
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1 @@
1
+ export * from "./switch";
@@ -0,0 +1 @@
1
+ export * from "./switch";
@@ -0,0 +1,4 @@
1
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
2
+ import type { ComponentProps } from "../../types/index.js";
3
+ declare function Switch({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Switch };
@@ -0,0 +1,8 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
4
+ import { cn } from "../../utils/index.js";
5
+ function Switch({ className, ...props }) {
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
+ }
8
+ export { Switch };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwadex/fesd-next",
3
- "version": "0.3.44",
3
+ "version": "0.3.46",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",