@getgreenline/blaze-ui 1.0.15 → 1.0.17

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 (129) hide show
  1. package/dist/components/accordion.d.ts +8 -0
  2. package/dist/components/accordion.d.ts.map +1 -0
  3. package/dist/components/accordion.js +19 -0
  4. package/dist/components/alert.d.ts +10 -0
  5. package/dist/components/alert.d.ts.map +1 -0
  6. package/dist/components/alert.js +26 -0
  7. package/dist/components/aspect-ratio.d.ts +4 -0
  8. package/dist/components/aspect-ratio.d.ts.map +1 -0
  9. package/dist/components/aspect-ratio.js +8 -0
  10. package/dist/components/avatar.d.ts +7 -0
  11. package/dist/components/avatar.d.ts.map +1 -0
  12. package/dist/components/avatar.js +15 -0
  13. package/dist/components/breadcrumb.d.ts +12 -0
  14. package/dist/components/breadcrumb.d.ts.map +1 -0
  15. package/dist/components/breadcrumb.js +29 -0
  16. package/dist/components/button-group.d.ts +12 -0
  17. package/dist/components/button-group.d.ts.map +1 -0
  18. package/dist/components/button-group.js +29 -0
  19. package/dist/components/button.js +1 -1
  20. package/dist/components/carousel.d.ts +20 -0
  21. package/dist/components/carousel.d.ts.map +1 -0
  22. package/dist/components/carousel.js +92 -0
  23. package/dist/components/chart.d.ts +41 -0
  24. package/dist/components/chart.d.ts.map +1 -0
  25. package/dist/components/chart.js +133 -0
  26. package/dist/components/collapsible.d.ts +6 -0
  27. package/dist/components/collapsible.d.ts.map +1 -0
  28. package/dist/components/collapsible.js +14 -0
  29. package/dist/components/command.d.ts +19 -0
  30. package/dist/components/command.d.ts.map +1 -0
  31. package/dist/components/command.js +35 -0
  32. package/dist/components/context-menu.d.ts +26 -0
  33. package/dist/components/context-menu.d.ts.map +1 -0
  34. package/dist/components/context-menu.js +52 -0
  35. package/dist/components/dialog.d.ts +16 -0
  36. package/dist/components/dialog.d.ts.map +1 -0
  37. package/dist/components/dialog.js +37 -0
  38. package/dist/components/drawer.d.ts +14 -0
  39. package/dist/components/drawer.d.ts.map +1 -0
  40. package/dist/components/drawer.js +36 -0
  41. package/dist/components/dropdown-menu.d.ts +26 -0
  42. package/dist/components/dropdown-menu.d.ts.map +1 -0
  43. package/dist/components/dropdown-menu.js +52 -0
  44. package/dist/components/empty.d.ts +12 -0
  45. package/dist/components/empty.d.ts.map +1 -0
  46. package/dist/components/empty.js +35 -0
  47. package/dist/components/field.d.ts +25 -0
  48. package/dist/components/field.d.ts.map +1 -0
  49. package/dist/components/field.js +74 -0
  50. package/dist/components/form.d.ts +25 -0
  51. package/dist/components/form.d.ts.map +1 -0
  52. package/dist/components/form.js +60 -0
  53. package/dist/components/hover-card.d.ts +7 -0
  54. package/dist/components/hover-card.d.ts.map +1 -0
  55. package/dist/components/hover-card.js +15 -0
  56. package/dist/components/input-group.d.ts +17 -0
  57. package/dist/components/input-group.d.ts.map +1 -0
  58. package/dist/components/input-group.js +64 -0
  59. package/dist/components/input-otp.d.ts +12 -0
  60. package/dist/components/input-otp.d.ts.map +1 -0
  61. package/dist/components/input-otp.js +22 -0
  62. package/dist/components/item.d.ts +24 -0
  63. package/dist/components/item.d.ts.map +1 -0
  64. package/dist/components/item.js +68 -0
  65. package/dist/components/kbd.d.ts +4 -0
  66. package/dist/components/kbd.d.ts.map +1 -0
  67. package/dist/components/kbd.js +11 -0
  68. package/dist/components/menubar.d.ts +27 -0
  69. package/dist/components/menubar.d.ts.map +1 -0
  70. package/dist/components/menubar.js +55 -0
  71. package/dist/components/navigation-menu.d.ts +15 -0
  72. package/dist/components/navigation-menu.d.ts.map +1 -0
  73. package/dist/components/navigation-menu.js +33 -0
  74. package/dist/components/pagination.d.ts +14 -0
  75. package/dist/components/pagination.d.ts.map +1 -0
  76. package/dist/components/pagination.js +31 -0
  77. package/dist/components/progress.d.ts +5 -0
  78. package/dist/components/progress.d.ts.map +1 -0
  79. package/dist/components/progress.js +9 -0
  80. package/dist/components/resizable.d.ts +9 -0
  81. package/dist/components/resizable.d.ts.map +1 -0
  82. package/dist/components/resizable.js +16 -0
  83. package/dist/components/segmented-control.js +1 -1
  84. package/dist/components/separator.d.ts +5 -0
  85. package/dist/components/separator.d.ts.map +1 -0
  86. package/dist/components/separator.js +9 -0
  87. package/dist/components/sheet.js +10 -10
  88. package/dist/components/sidebar.d.ts +70 -0
  89. package/dist/components/sidebar.d.ts.map +1 -0
  90. package/dist/components/sidebar.js +213 -0
  91. package/dist/components/skeleton.d.ts +3 -0
  92. package/dist/components/skeleton.d.ts.map +1 -0
  93. package/dist/components/skeleton.js +8 -0
  94. package/dist/components/slider.d.ts +5 -0
  95. package/dist/components/slider.d.ts.map +1 -0
  96. package/dist/components/slider.js +15 -0
  97. package/dist/components/sonner.d.ts +4 -0
  98. package/dist/components/sonner.d.ts.map +1 -0
  99. package/dist/components/sonner.js +22 -0
  100. package/dist/components/spinner.d.ts +3 -0
  101. package/dist/components/spinner.d.ts.map +1 -0
  102. package/dist/components/spinner.js +9 -0
  103. package/dist/components/switch.js +1 -1
  104. package/dist/components/table.d.ts +11 -0
  105. package/dist/components/table.d.ts.map +1 -0
  106. package/dist/components/table.js +29 -0
  107. package/dist/components/tabs.d.ts +8 -0
  108. package/dist/components/tabs.d.ts.map +1 -0
  109. package/dist/components/tabs.js +18 -0
  110. package/dist/components/textarea.d.ts +4 -0
  111. package/dist/components/textarea.d.ts.map +1 -0
  112. package/dist/components/textarea.js +8 -0
  113. package/dist/components/toggle-group.d.ts +8 -0
  114. package/dist/components/toggle-group.d.ts.map +1 -0
  115. package/dist/components/toggle-group.js +22 -0
  116. package/dist/components/toggle.d.ts +10 -0
  117. package/dist/components/toggle.d.ts.map +1 -0
  118. package/dist/components/toggle.js +27 -0
  119. package/dist/components/tooltip.d.ts +8 -0
  120. package/dist/components/tooltip.d.ts.map +1 -0
  121. package/dist/components/tooltip.js +18 -0
  122. package/dist/globals.css +155 -188
  123. package/dist/hooks/use-mobile.d.ts +2 -0
  124. package/dist/hooks/use-mobile.d.ts.map +1 -0
  125. package/dist/hooks/use-mobile.js +18 -0
  126. package/dist/index.d.ts +40 -0
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js +40 -0
  129. package/package.json +29 -3
@@ -0,0 +1,35 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime.js';
2
+ import { Command as Command$1 } from 'cmdk';
3
+ import { SearchIcon } from 'lucide-react';
4
+ import { cn } from '../lib/utils.js';
5
+ import { Dialog, DialogHeader, DialogTitle, DialogDescription, DialogContent } from './dialog.js';
6
+
7
+ function Command({ className, ...props }) {
8
+ return (jsx(Command$1, { "data-slot": "command", className: cn("tw:bg-popover tw:text-popover-foreground tw:flex tw:h-full tw:w-full tw:flex-col tw:overflow-hidden tw: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: "tw:sr-only", children: [jsx(DialogTitle, { children: title }), jsx(DialogDescription, { children: description })] }), jsx(DialogContent, { className: cn("tw:overflow-hidden tw:p-0", className), showCloseButton: showCloseButton, children: jsx(Command, { className: "[&_[cmdk-group-heading]]:tw:text-muted-foreground **:data-[slot=command-input-wrapper]:tw:h-12 [&_[cmdk-group-heading]]:tw:px-2 [&_[cmdk-group-heading]]:tw:font-medium [&_[cmdk-group]]:tw:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:tw:pt-0 [&_[cmdk-input-wrapper]_svg]:tw:h-5 [&_[cmdk-input-wrapper]_svg]:tw:w-5 [&_[cmdk-input]]:tw:h-12 [&_[cmdk-item]]:tw:px-2 [&_[cmdk-item]]:tw:py-3 [&_[cmdk-item]_svg]:tw:h-5 [&_[cmdk-item]_svg]:tw:w-5", children: children }) })] }));
12
+ }
13
+ function CommandInput({ className, ...props }) {
14
+ return (jsxs("div", { "data-slot": "command-input-wrapper", className: "tw:flex tw:h-9 tw:items-center tw:gap-2 tw:border-b tw:px-3", children: [jsx(SearchIcon, { className: "tw:size-4 tw:shrink-0 tw:opacity-50" }), jsx(Command$1.Input, { "data-slot": "command-input", className: cn("placeholder:tw:text-muted-foreground tw:flex tw:h-10 tw:w-full tw:rounded-md tw:bg-transparent tw:py-3 tw:text-sm tw:outline-hidden disabled:tw:cursor-not-allowed disabled:tw:opacity-50", className), ...props })] }));
15
+ }
16
+ function CommandList({ className, ...props }) {
17
+ return (jsx(Command$1.List, { "data-slot": "command-list", className: cn("tw:max-h-[300px] tw:scroll-py-1 tw:overflow-x-hidden tw:overflow-y-auto", className), ...props }));
18
+ }
19
+ function CommandEmpty({ ...props }) {
20
+ return (jsx(Command$1.Empty, { "data-slot": "command-empty", className: "tw:py-6 tw:text-center tw:text-sm", ...props }));
21
+ }
22
+ function CommandGroup({ className, ...props }) {
23
+ return (jsx(Command$1.Group, { "data-slot": "command-group", className: cn("tw:text-foreground [&_[cmdk-group-heading]]:tw:text-muted-foreground tw:overflow-hidden tw:p-1 [&_[cmdk-group-heading]]:tw:px-2 [&_[cmdk-group-heading]]:tw:py-1.5 [&_[cmdk-group-heading]]:tw:text-xs [&_[cmdk-group-heading]]:tw:font-medium", className), ...props }));
24
+ }
25
+ function CommandSeparator({ className, ...props }) {
26
+ return (jsx(Command$1.Separator, { "data-slot": "command-separator", className: cn("tw:bg-border tw:-mx-1 tw:h-px", className), ...props }));
27
+ }
28
+ function CommandItem({ className, ...props }) {
29
+ return (jsx(Command$1.Item, { "data-slot": "command-item", className: cn("data-[selected=true]:tw:bg-accent data-[selected=true]:tw:text-accent-foreground [&_svg:not([class*='text-'])]:tw:text-muted-foreground tw:relative tw:flex tw:cursor-default tw:items-center tw:gap-2 tw:rounded-sm tw:px-2 tw:py-1.5 tw:text-sm tw:outline-hidden tw:select-none data-[disabled=true]:tw:pointer-events-none data-[disabled=true]:tw:opacity-50 [&_svg]:tw:pointer-events-none [&_svg]:tw:shrink-0 [&_svg:not([class*='size-'])]:tw:size-4", className), ...props }));
30
+ }
31
+ function CommandShortcut({ className, ...props }) {
32
+ return (jsx("span", { "data-slot": "command-shortcut", className: cn("tw:text-muted-foreground tw:ml-auto tw:text-xs tw:tracking-widest", className), ...props }));
33
+ }
34
+
35
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
+ declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
6
+ declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
7
+ declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
8
+ declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
9
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
10
+ inset?: boolean;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
13
+ declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
14
+ declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
15
+ inset?: boolean;
16
+ variant?: "default" | "destructive";
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
19
+ declare function ContextMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
20
+ declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
21
+ inset?: boolean;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
24
+ declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
25
+ export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
26
+ //# sourceMappingURL=context-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/components/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AAKpE,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAExD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAI3D;AAED,iBAAS,gBAAgB,CAAC,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,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AY,CAAC,2CAmBhE;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,SAAS,CAAC,2CAkB7D;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAYA;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,SAAS,CAAC,2CAQ7D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAW9B;AAED,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,CAAA"}
@@ -0,0 +1,52 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime.js';
2
+ import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
3
+ import { CheckIcon, CircleIcon, ChevronRightIcon } from 'lucide-react';
4
+ import { cn } from '../lib/utils.js';
5
+
6
+ function ContextMenu({ ...props }) {
7
+ return jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
8
+ }
9
+ function ContextMenuTrigger({ ...props }) {
10
+ return (jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props }));
11
+ }
12
+ function ContextMenuGroup({ ...props }) {
13
+ return (jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props }));
14
+ }
15
+ function ContextMenuPortal({ ...props }) {
16
+ return (jsx(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props }));
17
+ }
18
+ function ContextMenuSub({ ...props }) {
19
+ return jsx(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
20
+ }
21
+ function ContextMenuRadioGroup({ ...props }) {
22
+ return (jsx(ContextMenuPrimitive.RadioGroup, { "data-slot": "context-menu-radio-group", ...props }));
23
+ }
24
+ function ContextMenuSubTrigger({ className, inset, children, ...props }) {
25
+ return (jsxs(ContextMenuPrimitive.SubTrigger, { "data-slot": "context-menu-sub-trigger", "data-inset": inset, className: cn("tw:focus:bg-accent tw:focus:text-accent-foreground tw:data-[state=open]:bg-accent tw:data-[state=open]:text-accent-foreground tw:[&_svg:not([class*='text-'])]:text-muted-foreground tw:flex tw:cursor-default tw:items-center tw:rounded-sm tw:px-2 tw:py-1.5 tw:text-sm tw:outline-hidden tw:select-none tw:data-[inset]:pl-8 tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0 tw:[&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, jsx(ChevronRightIcon, { className: "tw:ml-auto" })] }));
26
+ }
27
+ function ContextMenuSubContent({ className, ...props }) {
28
+ return (jsx(ContextMenuPrimitive.SubContent, { "data-slot": "context-menu-sub-content", className: cn("tw:bg-popover tw:text-popover-foreground tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:z-50 tw:min-w-[8rem] tw:origin-(--radix-context-menu-content-transform-origin) tw:overflow-hidden tw:rounded-md tw:border tw:p-1 tw:shadow-lg", className), ...props }));
29
+ }
30
+ function ContextMenuContent({ className, ...props }) {
31
+ return (jsx(ContextMenuPrimitive.Portal, { children: jsx(ContextMenuPrimitive.Content, { "data-slot": "context-menu-content", className: cn("tw:bg-popover tw:text-popover-foreground tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:z-50 tw:max-h-(--radix-context-menu-content-available-height) tw:min-w-[8rem] tw:origin-(--radix-context-menu-content-transform-origin) tw:overflow-x-hidden tw:overflow-y-auto tw:rounded-md tw:border tw:p-1 tw:shadow-md", className), ...props }) }));
32
+ }
33
+ function ContextMenuItem({ className, inset, variant = "default", ...props }) {
34
+ return (jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("tw:focus:bg-accent tw:focus:text-accent-foreground tw:data-[variant=destructive]:text-destructive tw:data-[variant=destructive]:focus:bg-destructive/10 tw:dark:data-[variant=destructive]:focus:bg-destructive/20 tw:data-[variant=destructive]:focus:text-destructive tw:data-[variant=destructive]:*:[svg]:!text-destructive tw:[&_svg:not([class*='text-'])]:text-muted-foreground tw:relative tw:flex tw:cursor-default tw:items-center tw:gap-2 tw:rounded-sm tw:px-2 tw:py-1.5 tw:text-sm tw:outline-hidden tw:select-none tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50 tw:data-[inset]:pl-8 tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0 tw:[&_svg:not([class*='size-'])]:size-4", className), ...props }));
35
+ }
36
+ function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
37
+ return (jsxs(ContextMenuPrimitive.CheckboxItem, { "data-slot": "context-menu-checkbox-item", className: cn("tw:focus:bg-accent tw:focus:text-accent-foreground tw:relative tw:flex tw:cursor-default tw:items-center tw:gap-2 tw:rounded-sm tw:py-1.5 tw:pr-2 tw:pl-8 tw:text-sm tw:outline-hidden tw:select-none tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50 tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0 tw:[&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [jsx("span", { className: "tw:pointer-events-none tw:absolute tw:left-2 tw:flex tw:size-3.5 tw:items-center tw:justify-center", children: jsx(ContextMenuPrimitive.ItemIndicator, { children: jsx(CheckIcon, { className: "tw:size-4" }) }) }), children] }));
38
+ }
39
+ function ContextMenuRadioItem({ className, children, ...props }) {
40
+ return (jsxs(ContextMenuPrimitive.RadioItem, { "data-slot": "context-menu-radio-item", className: cn("tw:focus:bg-accent tw:focus:text-accent-foreground tw:relative tw:flex tw:cursor-default tw:items-center tw:gap-2 tw:rounded-sm tw:py-1.5 tw:pr-2 tw:pl-8 tw:text-sm tw:outline-hidden tw:select-none tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50 tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0 tw:[&_svg:not([class*='size-'])]:size-4", className), ...props, children: [jsx("span", { className: "tw:pointer-events-none tw:absolute tw:left-2 tw:flex tw:size-3.5 tw:items-center tw:justify-center", children: jsx(ContextMenuPrimitive.ItemIndicator, { children: jsx(CircleIcon, { className: "tw:size-2 tw:fill-current" }) }) }), children] }));
41
+ }
42
+ function ContextMenuLabel({ className, inset, ...props }) {
43
+ return (jsx(ContextMenuPrimitive.Label, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("tw:text-foreground tw:px-2 tw:py-1.5 tw:text-sm tw:font-medium tw:data-[inset]:pl-8", className), ...props }));
44
+ }
45
+ function ContextMenuSeparator({ className, ...props }) {
46
+ return (jsx(ContextMenuPrimitive.Separator, { "data-slot": "context-menu-separator", className: cn("tw:bg-border tw:-mx-1 tw:my-1 tw:h-px", className), ...props }));
47
+ }
48
+ function ContextMenuShortcut({ className, ...props }) {
49
+ return (jsx("span", { "data-slot": "context-menu-shortcut", className: cn("tw:text-muted-foreground tw:ml-auto tw:text-xs tw:tracking-widest", className), ...props }));
50
+ }
51
+
52
+ export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
12
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
15
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
16
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAKzD,iBAAS,MAAM,CAAC,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAEnD;AAED,iBAAS,aAAa,CAAC,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAEtD;AAED,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,MAAM,CAAC,2CAErD;AAED,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAEpD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAWtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG;IACxD,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,2CAyBA;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQpD;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime.js';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
+ import { XIcon } from 'lucide-react';
4
+ import { cn } from '../lib/utils.js';
5
+
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("tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:fixed tw:inset-0 tw:z-50 tw: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("tw:bg-background tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:fixed tw:top-[50%] tw:left-[50%] tw:z-50 tw:grid tw:w-full tw:max-w-[calc(100%-2rem)] tw:translate-x-[-50%] tw:translate-y-[-50%] tw:gap-4 tw:rounded-lg tw:border tw:p-6 tw:shadow-lg tw:duration-200 tw:sm:max-w-lg", className), ...props, children: [children, showCloseButton && (jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "tw:ring-offset-background tw:focus:ring-ring tw:data-[state=open]:bg-accent tw:data-[state=open]:text-muted-foreground tw:absolute tw:top-4 tw:right-4 tw:rounded-xs tw:opacity-70 tw:transition-opacity tw:hover:opacity-100 tw:focus:ring-2 tw:focus:ring-offset-2 tw:focus:outline-hidden tw:disabled:pointer-events-none tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0 tw:[&_svg:not([class*='size-'])]:size-4", children: [jsx(XIcon, {}), jsx("span", { className: "tw:sr-only", children: "Close" })] }))] })] }));
23
+ }
24
+ function DialogHeader({ className, ...props }) {
25
+ return (jsx("div", { "data-slot": "dialog-header", className: cn("tw:flex tw:flex-col tw:gap-2 tw:text-center tw:sm:text-left", className), ...props }));
26
+ }
27
+ function DialogFooter({ className, ...props }) {
28
+ return (jsx("div", { "data-slot": "dialog-footer", className: cn("tw:flex tw:flex-col-reverse tw:gap-2 tw:sm:flex-row tw:sm:justify-end", className), ...props }));
29
+ }
30
+ function DialogTitle({ className, ...props }) {
31
+ return (jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("tw:text-lg tw:leading-none tw:font-semibold", className), ...props }));
32
+ }
33
+ function DialogDescription({ className, ...props }) {
34
+ return (jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("tw:text-muted-foreground tw:text-sm", className), ...props }));
35
+ }
36
+
37
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { Drawer as DrawerPrimitive } from "vaul";
3
+ declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
9
+ declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
12
+ declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
13
+ export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
14
+ //# sourceMappingURL=drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../src/components/drawer.tsx"],"names":[],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AG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime.js';
2
+ import { Drawer as Drawer$1 } from 'vaul';
3
+ import { cn } from '../lib/utils.js';
4
+
5
+ function Drawer({ ...props }) {
6
+ return jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
7
+ }
8
+ function DrawerTrigger({ ...props }) {
9
+ return jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
10
+ }
11
+ function DrawerPortal({ ...props }) {
12
+ return jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
13
+ }
14
+ function DrawerClose({ ...props }) {
15
+ return jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
16
+ }
17
+ function DrawerOverlay({ className, ...props }) {
18
+ return (jsx(Drawer$1.Overlay, { "data-slot": "drawer-overlay", className: cn("tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:fixed tw:inset-0 tw:z-50 tw:bg-black/50", className), ...props }));
19
+ }
20
+ function DrawerContent({ className, children, ...props }) {
21
+ return (jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [jsx(DrawerOverlay, {}), jsxs(Drawer$1.Content, { "data-slot": "drawer-content", className: cn("tw:group/drawer-content tw:bg-background tw:fixed tw:z-50 tw:flex tw:h-auto tw:flex-col", "tw:data-[vaul-drawer-direction=top]:inset-x-0 tw:data-[vaul-drawer-direction=top]:top-0 tw:data-[vaul-drawer-direction=top]:mb-24 tw:data-[vaul-drawer-direction=top]:max-h-[80vh] tw:data-[vaul-drawer-direction=top]:rounded-b-lg tw:data-[vaul-drawer-direction=top]:border-b", "tw:data-[vaul-drawer-direction=bottom]:inset-x-0 tw:data-[vaul-drawer-direction=bottom]:bottom-0 tw:data-[vaul-drawer-direction=bottom]:mt-24 tw:data-[vaul-drawer-direction=bottom]:max-h-[80vh] tw:data-[vaul-drawer-direction=bottom]:rounded-t-lg tw:data-[vaul-drawer-direction=bottom]:border-t", "tw:data-[vaul-drawer-direction=right]:inset-y-0 tw:data-[vaul-drawer-direction=right]:right-0 tw:data-[vaul-drawer-direction=right]:w-3/4 tw:data-[vaul-drawer-direction=right]:border-l tw:data-[vaul-drawer-direction=right]:sm:max-w-sm", "tw:data-[vaul-drawer-direction=left]:inset-y-0 tw:data-[vaul-drawer-direction=left]:left-0 tw:data-[vaul-drawer-direction=left]:w-3/4 tw:data-[vaul-drawer-direction=left]:border-r tw:data-[vaul-drawer-direction=left]:sm:max-w-sm", className), ...props, children: [jsx("div", { className: "tw:bg-muted tw:mx-auto tw:mt-4 tw:hidden tw:h-2 tw:w-[100px] tw:shrink-0 tw:rounded-full tw:group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] })] }));
22
+ }
23
+ function DrawerHeader({ className, ...props }) {
24
+ return (jsx("div", { "data-slot": "drawer-header", className: cn("tw:flex tw:flex-col tw:gap-0.5 tw:p-4 tw:group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center tw:group-data-[vaul-drawer-direction=top]/drawer-content:text-center tw:md:gap-1.5 tw:md:text-left", className), ...props }));
25
+ }
26
+ function DrawerFooter({ className, ...props }) {
27
+ return (jsx("div", { "data-slot": "drawer-footer", className: cn("tw:mt-auto tw:flex tw:flex-col tw:gap-2 tw:p-4", className), ...props }));
28
+ }
29
+ function DrawerTitle({ className, ...props }) {
30
+ return (jsx(Drawer$1.Title, { "data-slot": "drawer-title", className: cn("tw:text-foreground tw:font-semibold", className), ...props }));
31
+ }
32
+ function DrawerDescription({ className, ...props }) {
33
+ return (jsx(Drawer$1.Description, { "data-slot": "drawer-description", className: cn("tw:text-muted-foreground tw:text-sm", className), ...props }));
34
+ }
35
+
36
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
9
+ inset?: boolean;
10
+ variant?: "default" | "destructive";
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
13
+ declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
15
+ declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
16
+ inset?: boolean;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
19
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
20
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
21
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
22
+ inset?: boolean;
23
+ }): import("react/jsx-runtime").JSX.Element;
24
+ declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
25
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
26
+ //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AAKtE,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,2CAEzD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,MAAM,CAAC,2CAI3D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,GAAG,KAAK,EACT,EAAE,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ACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC,2CAQ9D;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAW9B;AAED,iBAAS,eAAe,CAAC,EACvB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,GAAG,CAAC,2CAExD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG;IACjE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAeA;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,2CAW/D;AAED,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAA"}
@@ -0,0 +1,52 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime.js';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+ import { CheckIcon, CircleIcon, ChevronRightIcon } from 'lucide-react';
4
+ import { cn } from '../lib/utils.js';
5
+
6
+ function DropdownMenu({ ...props }) {
7
+ return jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
8
+ }
9
+ function DropdownMenuPortal({ ...props }) {
10
+ return (jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props }));
11
+ }
12
+ function DropdownMenuTrigger({ ...props }) {
13
+ return (jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
14
+ }
15
+ function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
16
+ return (jsx(DropdownMenuPrimitive.Portal, { children: jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("tw:bg-popover tw:text-popover-foreground tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:z-50 tw:max-h-(--radix-dropdown-menu-content-available-height) tw:min-w-[8rem] tw:origin-(--radix-dropdown-menu-content-transform-origin) tw:overflow-x-hidden tw:overflow-y-auto tw:rounded-md tw:border tw:p-1 tw:shadow-md", className), ...props }) }));
17
+ }
18
+ function DropdownMenuGroup({ ...props }) {
19
+ return (jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
20
+ }
21
+ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
22
+ return (jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("tw:focus:bg-accent tw:focus:text-accent-foreground tw:data-[variant=destructive]:text-destructive tw:data-[variant=destructive]:focus:bg-destructive/10 tw:dark:data-[variant=destructive]:focus:bg-destructive/20 tw:data-[variant=destructive]:focus:text-destructive tw:data-[variant=destructive]:*:[svg]:!text-destructive tw:[&_svg:not([class*='text-'])]:text-muted-foreground tw:relative tw:flex tw:cursor-default tw:items-center tw:gap-2 tw:rounded-sm tw:px-2 tw:py-1.5 tw:text-sm tw:outline-hidden tw:select-none tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50 tw:data-[inset]:pl-8 tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0 tw:[&_svg:not([class*='size-'])]:size-4", className), ...props }));
23
+ }
24
+ function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
25
+ return (jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("tw:focus:bg-accent tw:focus:text-accent-foreground tw:relative tw:flex tw:cursor-default tw:items-center tw:gap-2 tw:rounded-sm tw:py-1.5 tw:pr-2 tw:pl-8 tw:text-sm tw:outline-hidden tw:select-none tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50 tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0 tw:[&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [jsx("span", { className: "tw:pointer-events-none tw:absolute tw:left-2 tw:flex tw:size-3.5 tw:items-center tw:justify-center", children: jsx(DropdownMenuPrimitive.ItemIndicator, { children: jsx(CheckIcon, { className: "tw:size-4" }) }) }), children] }));
26
+ }
27
+ function DropdownMenuRadioGroup({ ...props }) {
28
+ return (jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
29
+ }
30
+ function DropdownMenuRadioItem({ className, children, ...props }) {
31
+ return (jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("tw:focus:bg-accent tw:focus:text-accent-foreground tw:relative tw:flex tw:cursor-default tw:items-center tw:gap-2 tw:rounded-sm tw:py-1.5 tw:pr-2 tw:pl-8 tw:text-sm tw:outline-hidden tw:select-none tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50 tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0 tw:[&_svg:not([class*='size-'])]:size-4", className), ...props, children: [jsx("span", { className: "tw:pointer-events-none tw:absolute tw:left-2 tw:flex tw:size-3.5 tw:items-center tw:justify-center", children: jsx(DropdownMenuPrimitive.ItemIndicator, { children: jsx(CircleIcon, { className: "tw:size-2 tw:fill-current" }) }) }), children] }));
32
+ }
33
+ function DropdownMenuLabel({ className, inset, ...props }) {
34
+ return (jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("tw:px-2 tw:py-1.5 tw:text-sm tw:font-medium tw:data-[inset]:pl-8", className), ...props }));
35
+ }
36
+ function DropdownMenuSeparator({ className, ...props }) {
37
+ return (jsx(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("tw:bg-border tw:-mx-1 tw:my-1 tw:h-px", className), ...props }));
38
+ }
39
+ function DropdownMenuShortcut({ className, ...props }) {
40
+ return (jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("tw:text-muted-foreground tw:ml-auto tw:text-xs tw:tracking-widest", className), ...props }));
41
+ }
42
+ function DropdownMenuSub({ ...props }) {
43
+ return jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
44
+ }
45
+ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
46
+ return (jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("tw:focus:bg-accent tw:focus:text-accent-foreground tw:data-[state=open]:bg-accent tw:data-[state=open]:text-accent-foreground tw:[&_svg:not([class*='text-'])]:text-muted-foreground tw:flex tw:cursor-default tw:items-center tw:gap-2 tw:rounded-sm tw:px-2 tw:py-1.5 tw:text-sm tw:outline-hidden tw:select-none tw:data-[inset]:pl-8 tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0 tw:[&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, jsx(ChevronRightIcon, { className: "tw:ml-auto tw:size-4" })] }));
47
+ }
48
+ function DropdownMenuSubContent({ className, ...props }) {
49
+ return (jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn("tw:bg-popover tw:text-popover-foreground tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:z-50 tw:min-w-[8rem] tw:origin-(--radix-dropdown-menu-content-transform-origin) tw:overflow-hidden tw:rounded-md tw:border tw:p-1 tw:shadow-lg", className), ...props }));
50
+ }
51
+
52
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -0,0 +1,12 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ declare function Empty({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
+ declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
4
+ declare const emptyMediaVariants: (props?: ({
5
+ variant?: "default" | "icon" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react/jsx-runtime").JSX.Element;
8
+ declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
10
+ declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, };
12
+ //# sourceMappingURL=empty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/components/empty.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWlE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWxE;AAED,QAAA,MAAM,kBAAkB;;8EAavB,CAAA;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,2CASvE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAW3E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,GACX,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { jsx } from 'react/jsx-runtime.js';
2
+ import { cva } from 'class-variance-authority';
3
+ import { cn } from '../lib/utils.js';
4
+
5
+ function Empty({ className, ...props }) {
6
+ return (jsx("div", { "data-slot": "empty", className: cn("tw:flex tw:min-w-0 tw:flex-1 tw:flex-col tw:items-center tw:justify-center tw:gap-6 tw:rounded-lg tw:border-dashed tw:p-6 tw:text-center tw:text-balance tw:md:p-12", className), ...props }));
7
+ }
8
+ function EmptyHeader({ className, ...props }) {
9
+ return (jsx("div", { "data-slot": "empty-header", className: cn("tw:flex tw:max-w-sm tw:flex-col tw:items-center tw:gap-2 tw:text-center", className), ...props }));
10
+ }
11
+ const emptyMediaVariants = cva("tw:flex tw:shrink-0 tw:items-center tw:justify-center tw:mb-2 tw:[&_svg]:pointer-events-none tw:[&_svg]:shrink-0", {
12
+ variants: {
13
+ variant: {
14
+ default: "tw:bg-transparent",
15
+ icon: "tw:bg-muted tw:text-foreground tw:flex tw:size-10 tw:shrink-0 tw:items-center tw:justify-center tw:rounded-lg tw:[&_svg:not([class*='size-'])]:size-6",
16
+ },
17
+ },
18
+ defaultVariants: {
19
+ variant: "default",
20
+ },
21
+ });
22
+ function EmptyMedia({ className, variant = "default", ...props }) {
23
+ return (jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })), ...props }));
24
+ }
25
+ function EmptyTitle({ className, ...props }) {
26
+ return (jsx("div", { "data-slot": "empty-title", className: cn("tw:text-lg tw:font-medium tw:tracking-tight", className), ...props }));
27
+ }
28
+ function EmptyDescription({ className, ...props }) {
29
+ return (jsx("div", { "data-slot": "empty-description", className: cn("tw:text-muted-foreground tw:[&>a:hover]:text-primary tw:text-sm/relaxed tw:[&>a]:underline tw:[&>a]:underline-offset-4", className), ...props }));
30
+ }
31
+ function EmptyContent({ className, ...props }) {
32
+ return (jsx("div", { "data-slot": "empty-content", className: cn("tw:flex tw:w-full tw:max-w-sm tw:min-w-0 tw:flex-col tw:items-center tw:gap-4 tw:text-sm tw:text-balance", className), ...props }));
33
+ }
34
+
35
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -0,0 +1,25 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import { Label } from "../components/label";
3
+ declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
4
+ declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
5
+ variant?: "legend" | "label";
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare const fieldVariants: (props?: ({
9
+ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
12
+ declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
14
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
15
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
16
+ declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
17
+ children?: React.ReactNode;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
20
+ errors?: Array<{
21
+ message?: string;
22
+ } | undefined>;
23
+ }): import("react/jsx-runtime").JSX.Element | null;
24
+ export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle, };
25
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAG3C,iBAAS,QAAQ,CAAC,EAAE,SA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AAS,EACT,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAA;CACjD,kDAsCA;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,CAAA"}
@@ -0,0 +1,74 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime.js';
2
+ import { useMemo } from 'react';
3
+ import { cva } from 'class-variance-authority';
4
+ import { cn } from '../lib/utils.js';
5
+ import { Label } from './label.js';
6
+ import { Separator } from './separator.js';
7
+
8
+ function FieldSet({ className, ...props }) {
9
+ return (jsx("fieldset", { "data-slot": "field-set", className: cn("tw:flex tw:flex-col tw:gap-6", "has-[>[data-slot=checkbox-group]]:tw:gap-3 has-[>[data-slot=radio-group]]:tw:gap-3", className), ...props }));
10
+ }
11
+ function FieldLegend({ className, variant = "legend", ...props }) {
12
+ return (jsx("legend", { "data-slot": "field-legend", "data-variant": variant, className: cn("tw:mb-3 tw:font-medium", "data-[variant=legend]:tw:text-base", "data-[variant=label]:tw:text-sm", className), ...props }));
13
+ }
14
+ function FieldGroup({ className, ...props }) {
15
+ return (jsx("div", { "data-slot": "field-group", className: cn("group/field-group @container/field-group tw:flex tw:w-full tw:flex-col tw:gap-7 data-[slot=checkbox-group]:tw:gap-3 [&>[data-slot=field-group]]:tw:gap-4", className), ...props }));
16
+ }
17
+ const fieldVariants = cva("group/field tw:flex tw:w-full tw:gap-3 data-[invalid=true]:tw:text-destructive", {
18
+ variants: {
19
+ orientation: {
20
+ vertical: ["tw:flex-col [&>*]:tw:w-full [&>.tw:sr-only]:tw:w-auto"],
21
+ horizontal: [
22
+ "tw:flex-row tw:items-center",
23
+ "[&>[data-slot=field-label]]:tw:flex-auto",
24
+ "has-[>[data-slot=field-content]]:tw:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:tw:mt-px",
25
+ ],
26
+ responsive: [
27
+ "tw:flex-col [&>*]:tw:w-full [&>.tw:sr-only]:tw:w-auto @md/field-group:tw:flex-row @md/field-group:tw:items-center @md/field-group:[&>*]:tw:w-auto",
28
+ "@md/field-group:[&>[data-slot=field-label]]:tw:flex-auto",
29
+ "@md/field-group:has-[>[data-slot=field-content]]:tw:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:tw:mt-px",
30
+ ],
31
+ },
32
+ },
33
+ defaultVariants: {
34
+ orientation: "vertical",
35
+ },
36
+ });
37
+ function Field({ className, orientation = "vertical", ...props }) {
38
+ return (jsx("div", { role: "group", "data-slot": "field", "data-orientation": orientation, className: cn(fieldVariants({ orientation }), className), ...props }));
39
+ }
40
+ function FieldContent({ className, ...props }) {
41
+ return (jsx("div", { "data-slot": "field-content", className: cn("group/field-content tw:flex tw:flex-1 tw:flex-col tw:gap-1.5 tw:leading-snug", className), ...props }));
42
+ }
43
+ function FieldLabel({ className, ...props }) {
44
+ return (jsx(Label, { "data-slot": "field-label", className: cn("group/field-label peer/field-label tw:flex tw:w-fit tw:gap-2 tw:leading-snug group-data-[disabled=true]/field:tw:opacity-50", "has-[>[data-slot=field]]:tw:w-full has-[>[data-slot=field]]:tw:flex-col has-[>[data-slot=field]]:tw:rounded-md has-[>[data-slot=field]]:tw:border [&>*]:data-[slot=field]:tw:p-4", "has-data-[state=checked]:tw:bg-primary/5 has-data-[state=checked]:tw:border-primary dark:has-data-[state=checked]:tw:bg-primary/10", className), ...props }));
45
+ }
46
+ function FieldTitle({ className, ...props }) {
47
+ return (jsx("div", { "data-slot": "field-label", className: cn("tw:flex tw:w-fit tw:items-center tw:gap-2 tw:text-sm tw:leading-snug tw:font-medium group-data-[disabled=true]/field:tw:opacity-50", className), ...props }));
48
+ }
49
+ function FieldDescription({ className, ...props }) {
50
+ return (jsx("p", { "data-slot": "field-description", className: cn("tw:text-muted-foreground tw:text-sm tw:leading-normal tw:font-normal group-has-[[data-orientation=horizontal]]/field:tw:text-balance", "last:tw:mt-0 nth-last-2:tw:-mt-1 [[data-variant=legend]+&]:tw:-mt-1.5", "[&>a:hover]:tw:text-primary [&>a]:tw:underline [&>a]:tw:underline-offset-4", className), ...props }));
51
+ }
52
+ function FieldSeparator({ children, className, ...props }) {
53
+ return (jsxs("div", { "data-slot": "field-separator", "data-content": !!children, className: cn("tw:relative tw:-my-2 tw:h-5 tw:text-sm group-data-[variant=outline]/field-group:tw:-mb-2", className), ...props, children: [jsx(Separator, { className: "tw:absolute tw:inset-0 tw:top-1/2" }), children && (jsx("span", { className: "tw:bg-background tw:text-muted-foreground tw:relative tw:mx-auto tw:block tw:w-fit tw:px-2", "data-slot": "field-separator-content", children: children }))] }));
54
+ }
55
+ function FieldError({ className, children, errors, ...props }) {
56
+ const content = useMemo(() => {
57
+ if (children) {
58
+ return children;
59
+ }
60
+ if (!errors?.length) {
61
+ return null;
62
+ }
63
+ if (errors?.length == 1) {
64
+ return errors[0]?.message;
65
+ }
66
+ return (jsx("ul", { className: "tw:ml-4 tw:flex tw:list-disc tw:flex-col tw:gap-1", children: errors.map((error, index) => error?.message && jsx("li", { children: error.message }, index)) }));
67
+ }, [children, errors]);
68
+ if (!content) {
69
+ return null;
70
+ }
71
+ return (jsx("div", { role: "alert", "data-slot": "field-error", className: cn("tw:text-destructive tw:text-sm tw:font-normal", className), ...props, children: content }));
72
+ }
73
+
74
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle };
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { FormProvider, type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
5
+ declare const Form: typeof FormProvider;
6
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const useFormField: () => {
8
+ invalid: boolean;
9
+ isDirty: boolean;
10
+ isTouched: boolean;
11
+ isValidating: boolean;
12
+ error?: import("react-hook-form").FieldError;
13
+ id: string;
14
+ name: string;
15
+ formItemId: string;
16
+ formDescriptionId: string;
17
+ formMessageId: string;
18
+ };
19
+ declare function FormItem({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
20
+ declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
21
+ declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): import("react/jsx-runtime").JSX.Element;
22
+ declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
23
+ declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element | null;
24
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
25
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/components/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAEL,YAAY,EAGZ,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAA;AAKxB,QAAA,MAAM,IAAI,EAAE,OAAO,YAA2B,CAAA;AAa9C,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,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