@clidey/ux 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,20 +1,47 @@
1
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
1
3
  import { ClassProp } from 'class-variance-authority/types';
2
4
  import { ClassValue } from 'clsx';
5
+ import { Command as Command_2 } from 'cmdk';
3
6
  import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
7
+ import { default as default_2 } from 'react';
4
8
  import { Drawer as Drawer_2 } from 'vaul';
5
9
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
6
10
  import { JSX } from 'react/jsx-runtime';
7
11
  import * as LabelPrimitive from '@radix-ui/react-label';
12
+ import { LucideIcon } from 'lucide-react';
8
13
  import * as PopoverPrimitive from '@radix-ui/react-popover';
9
14
  import * as React_2 from 'react';
15
+ import * as ResizablePrimitive from 'react-resizable-panels';
16
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
10
17
  import * as SelectPrimitive from '@radix-ui/react-select';
11
18
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
19
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
20
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
12
21
  import * as TabsPrimitive from '@radix-ui/react-tabs';
13
22
  import { toast } from 'sonner';
14
23
  import { ToasterProps } from 'sonner';
15
24
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
16
25
  import { VariantProps } from 'class-variance-authority';
17
26
 
27
+ export declare function Accordion({ ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Root>): JSX.Element;
28
+
29
+ export declare function AccordionContent({ className, children, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Content>): JSX.Element;
30
+
31
+ export declare function AccordionItem({ className, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Item>): JSX.Element;
32
+
33
+ export declare function AccordionTrigger({ className, children, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Trigger>): JSX.Element;
34
+
35
+ export declare function Alert({ className, variant, ...props }: React_2.ComponentProps<"div"> & VariantProps<typeof alertVariants>): JSX.Element;
36
+
37
+ export declare function AlertDescription({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
38
+
39
+ export declare function AlertTitle({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
40
+
41
+ declare const alertVariants: (props?: ({
42
+ variant?: "default" | "destructive" | null | undefined;
43
+ } & ClassProp) | undefined) => string;
44
+
18
45
  export declare function Badge({ className, variant, asChild, ...props }: React_2.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
19
46
  asChild?: boolean;
20
47
  }): JSX.Element;
@@ -58,8 +85,22 @@ export declare function CardHeader({ className, ...props }: React_2.ComponentPro
58
85
 
59
86
  export declare function CardTitle({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
60
87
 
88
+ export declare function Checkbox({ className, ...props }: React_2.ComponentProps<typeof CheckboxPrimitive.Root>): JSX.Element;
89
+
61
90
  export declare function cn(...inputs: ClassValue[]): string;
62
91
 
92
+ export declare function Command({ className, ...props }: React_2.ComponentProps<typeof Command_2>): JSX.Element;
93
+
94
+ export declare function CommandEmpty({ ...props }: React_2.ComponentProps<typeof Command_2.Empty>): JSX.Element;
95
+
96
+ export declare function CommandGroup({ className, ...props }: React_2.ComponentProps<typeof Command_2.Group>): JSX.Element;
97
+
98
+ export declare function CommandInput({ className, ...props }: React_2.ComponentProps<typeof Command_2.Input>): JSX.Element;
99
+
100
+ export declare function CommandItem({ className, ...props }: React_2.ComponentProps<typeof Command_2.Item>): JSX.Element;
101
+
102
+ export declare function CommandList({ className, ...props }: React_2.ComponentProps<typeof Command_2.List>): JSX.Element;
103
+
63
104
  export declare function ContextMenu({ ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Root>): JSX.Element;
64
105
 
65
106
  export declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): JSX.Element;
@@ -93,6 +134,22 @@ export declare function ContextMenuSubTrigger({ className, inset, children, ...p
93
134
 
94
135
  export declare function ContextMenuTrigger({ ...props }: React_2.ComponentProps<typeof ContextMenuPrimitive.Trigger>): JSX.Element;
95
136
 
137
+ export declare function Dialog({ ...props }: React_2.ComponentProps<typeof SheetPrimitive.Root>): JSX.Element;
138
+
139
+ export declare function DialogContent({ className, children, showCloseButton, ...props }: React_2.ComponentProps<typeof SheetPrimitive.Content> & {
140
+ showCloseButton?: boolean;
141
+ }): JSX.Element;
142
+
143
+ export declare function DialogDescription({ className, ...props }: React_2.ComponentProps<typeof SheetPrimitive.Description>): JSX.Element;
144
+
145
+ export declare function DialogFooter({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
146
+
147
+ export declare function DialogHeader({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
148
+
149
+ export declare function DialogTitle({ className, ...props }: React_2.ComponentProps<typeof SheetPrimitive.Title>): JSX.Element;
150
+
151
+ export declare function DialogTrigger({ ...props }: React_2.ComponentProps<typeof SheetPrimitive.Trigger>): JSX.Element;
152
+
96
153
  export declare function Drawer({ ...props }: React_2.ComponentProps<typeof Drawer_2.Root>): JSX.Element;
97
154
 
98
155
  export declare function DrawerClose({ ...props }: React_2.ComponentProps<typeof Drawer_2.Close>): JSX.Element;
@@ -142,6 +199,30 @@ export declare function DropdownMenuSubTrigger({ className, inset, children, ...
142
199
 
143
200
  export declare function DropdownMenuTrigger({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
144
201
 
202
+ export declare const EmptyState: ({ className, title, description, icon, children, }: {
203
+ className?: string;
204
+ title: string;
205
+ description: string;
206
+ icon: React.ReactNode;
207
+ children?: React.ReactNode;
208
+ }) => JSX.Element;
209
+
210
+ export declare function formatDate(date: Date): string;
211
+
212
+ export declare function Icon({ icon, size, className, ...props }: IconProps): JSX.Element;
213
+
214
+ declare interface IconProps extends React_2.HTMLAttributes<HTMLSpanElement> {
215
+ /**
216
+ * The icon SVG element to render.
217
+ */
218
+ icon: React_2.ReactElement<React_2.SVGProps<SVGSVGElement>>;
219
+ /**
220
+ * Optional size (applies w/h to the icon SVG).
221
+ * @default 24
222
+ */
223
+ size?: number;
224
+ }
225
+
145
226
  export declare function Input({ className, type, ...props }: React_2.ComponentProps<"input">): JSX.Element;
146
227
 
147
228
  export declare function Label({ className, ...props }: React_2.ComponentProps<typeof LabelPrimitive.Root>): JSX.Element;
@@ -172,6 +253,41 @@ export declare function PopoverContent({ className, align, sideOffset, ...props
172
253
 
173
254
  export declare function PopoverTrigger({ ...props }: React_2.ComponentProps<typeof PopoverPrimitive.Trigger>): JSX.Element;
174
255
 
256
+ export declare function ResizableHandle({ withHandle, className, ...props }: React_2.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
257
+ withHandle?: boolean;
258
+ }): JSX.Element;
259
+
260
+ export declare function ResizablePanel({ ...props }: React_2.ComponentProps<typeof ResizablePrimitive.Panel>): JSX.Element;
261
+
262
+ export declare function ResizablePanelGroup({ className, ...props }: React_2.ComponentProps<typeof ResizablePrimitive.PanelGroup>): JSX.Element;
263
+
264
+ export declare function ScrollArea({ className, children, ...props }: React_2.ComponentProps<typeof ScrollAreaPrimitive.Root>): JSX.Element;
265
+
266
+ export declare function SearchInput({ className, ...props }: React_2.ComponentProps<"input">): JSX.Element;
267
+
268
+ export declare function SearchSelect({ options, placeholder, searchPlaceholder, value, onChange, buttonClassName, contentClassName, disabled, extraOptions, side, align, onlyIcon, }: SearchSelectProps): JSX.Element;
269
+
270
+ declare type SearchSelectOption = {
271
+ value: string;
272
+ label: string;
273
+ icon?: React_2.ReactNode;
274
+ };
275
+
276
+ declare type SearchSelectProps = {
277
+ options: SearchSelectOption[];
278
+ placeholder?: string;
279
+ searchPlaceholder?: string;
280
+ value?: string;
281
+ onChange?: (value: string) => void;
282
+ buttonClassName?: string;
283
+ contentClassName?: string;
284
+ disabled?: boolean;
285
+ extraOptions?: React_2.ReactNode;
286
+ side?: "top" | "bottom" | "left" | "right";
287
+ align?: "start" | "center" | "end";
288
+ onlyIcon?: boolean;
289
+ };
290
+
175
291
  export declare function Select({ ...props }: React_2.ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
176
292
 
177
293
  export declare function SelectContent({ className, children, position, ...props }: React_2.ComponentProps<typeof SelectPrimitive.Content>): JSX.Element;
@@ -188,11 +304,27 @@ export declare function SelectTrigger({ className, size, children, ...props }: R
188
304
 
189
305
  export declare function SelectValue({ ...props }: React_2.ComponentProps<typeof SelectPrimitive.Value>): JSX.Element;
190
306
 
191
- declare function Separator({ className, orientation, decorative, ...props }: React_2.ComponentProps<typeof SeparatorPrimitive.Root>): JSX.Element;
307
+ export declare function Separator({ className, orientation, decorative, ...props }: React_2.ComponentProps<typeof SeparatorPrimitive.Root>): JSX.Element;
308
+
309
+ export declare function Sheet({ ...props }: React_2.ComponentProps<typeof SheetPrimitive.Root>): JSX.Element;
310
+
311
+ export declare function SheetContent({ className, children, side, ...props }: React_2.ComponentProps<typeof SheetPrimitive.Content> & {
312
+ side?: "top" | "right" | "bottom" | "left";
313
+ }): JSX.Element;
314
+
315
+ export declare function SheetDescription({ className, ...props }: React_2.ComponentProps<typeof SheetPrimitive.Description>): JSX.Element;
316
+
317
+ export declare function SheetFooter({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
318
+
319
+ export declare function SheetHeader({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
320
+
321
+ export declare function SheetTitle({ className, ...props }: React_2.ComponentProps<typeof SheetPrimitive.Title>): JSX.Element;
322
+
323
+ export declare function SheetTrigger({ ...props }: React_2.ComponentProps<typeof SheetPrimitive.Trigger>): JSX.Element;
192
324
 
193
325
  export declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React_2.ComponentProps<"div"> & {
194
326
  side?: "left" | "right";
195
- variant?: "sidebar" | "floating" | "inset";
327
+ variant?: "sidebar" | "floating" | "inset" | "embed";
196
328
  collapsible?: "offcanvas" | "icon" | "none";
197
329
  }): JSX.Element;
198
330
 
@@ -278,6 +410,26 @@ export declare function SidebarTrigger({ className, onClick, ...props }: React_2
278
410
 
279
411
  export declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
280
412
 
413
+ export declare function StackList({ children, separatorClassName, }: StackListProps): JSX.Element;
414
+
415
+ export declare function StackListItem({ item, children, keyClassName, valueClassName, rowClassName, itemClassName, }: StackListItemProps): JSX.Element;
416
+
417
+ declare type StackListItemProps = {
418
+ item: default_2.ReactNode;
419
+ children: default_2.ReactNode;
420
+ keyClassName?: string;
421
+ valueClassName?: string;
422
+ rowClassName?: string;
423
+ itemClassName?: string;
424
+ };
425
+
426
+ declare type StackListProps = {
427
+ children: default_2.ReactNode;
428
+ separatorClassName?: string;
429
+ };
430
+
431
+ export declare function Switch({ className, ...props }: React_2.ComponentProps<typeof SwitchPrimitive.Root>): JSX.Element;
432
+
281
433
  export declare function Table({ className, ...props }: React_2.ComponentProps<"table">): JSX.Element;
282
434
 
283
435
  export declare function TableBody({ className, ...props }: React_2.ComponentProps<"tbody">): JSX.Element;
@@ -286,11 +438,13 @@ export declare function TableCaption({ className, ...props }: React_2.ComponentP
286
438
 
287
439
  export declare function TableCell({ className, ...props }: React_2.ComponentProps<"td">): JSX.Element;
288
440
 
289
- export declare function TableHead({ className, ...props }: React_2.ComponentProps<"th">): JSX.Element;
441
+ export declare function TableHead({ className, ...props }: React_2.ComponentProps<"th"> & {
442
+ icon?: React_2.ReactNode;
443
+ }): JSX.Element;
290
444
 
291
445
  export declare function TableHeader({ className, ...props }: React_2.ComponentProps<"thead">): JSX.Element;
292
446
 
293
- export declare function TableRow({ className, ...props }: React_2.ComponentProps<"tr">): JSX.Element;
447
+ export declare function TableRow({ className, style, ...props }: React_2.ComponentProps<"tr">): JSX.Element;
294
448
 
295
449
  export declare function Tabs({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Root>): JSX.Element;
296
450
 
@@ -327,8 +481,37 @@ export declare function TooltipProvider({ delayDuration, ...props }: React_2.Com
327
481
 
328
482
  export declare function TooltipTrigger({ ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Trigger>): JSX.Element;
329
483
 
484
+ export declare function toTitleCase(str: string): string;
485
+
486
+ export declare const Tree: default_2.ForwardRefExoticComponent<default_2.HTMLAttributes<HTMLDivElement> & {
487
+ data: TreeDataItem[] | TreeDataItem;
488
+ initialSelectedItemId?: string;
489
+ onSelectChange?: (item: TreeDataItem | undefined) => void;
490
+ expandAll?: boolean;
491
+ folderIcon?: LucideIcon;
492
+ itemIcon?: LucideIcon;
493
+ } & default_2.RefAttributes<HTMLDivElement>>;
494
+
495
+ export declare interface TreeDataItem {
496
+ id: string;
497
+ name: string;
498
+ icon?: LucideIcon;
499
+ children?: TreeDataItem[];
500
+ }
501
+
330
502
  export declare function useSidebar(): SidebarContextProps;
331
503
 
332
504
  export declare const useTheme: () => ThemeProviderState;
333
505
 
506
+ export declare function VirtualizedTableBody({ rowCount, rowHeight, height, className, children, }: VirtualizedTableBodyProps): JSX.Element;
507
+
508
+ declare type VirtualizedTableBodyProps = {
509
+ rowCount: number;
510
+ rowHeight?: number;
511
+ height?: number;
512
+ className?: string;
513
+ style?: React_2.CSSProperties;
514
+ children: (index: number, style: React_2.CSSProperties) => React_2.ReactNode;
515
+ };
516
+
334
517
  export { }