@fileverse/ui 1.6.0 → 2.1.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.
@@ -1,9 +1,15 @@
1
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
1
2
  import { ClassProp } from 'class-variance-authority/types';
2
3
  import { default as default_2 } from 'react';
4
+ import { GridProps as GridProps_2 } from '@radix-ui/themes';
5
+ import { icons } from 'lucide-react';
3
6
  import { JSX as JSX_2 } from 'react/jsx-runtime';
4
7
  import * as LabelPrimitive from '@radix-ui/react-label';
5
8
  import * as React_2 from 'react';
9
+ import { ReactNode } from 'react';
10
+ import { SetStateAction } from 'react';
6
11
  import * as SwitchPrimitives from '@radix-ui/react-switch';
12
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
7
13
  import { VariantProps } from 'class-variance-authority';
8
14
 
9
15
  export declare const Avatar: default_2.ForwardRefExoticComponent<AvatarProps & default_2.RefAttributes<HTMLImageElement>>;
@@ -19,24 +25,104 @@ declare const avatarVariants: (props?: ({
19
25
 
20
26
  export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
21
27
 
28
+ export declare const ButtonGroup: React_2.FC<ButtonGroupProps>;
29
+
30
+ /**
31
+ * TODO: WIP
32
+ */
33
+ export declare interface ButtonGroupProps {
34
+ children?: React_2.ReactNode[];
35
+ className?: string;
36
+ }
37
+
22
38
  export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
23
39
  toggleLeftIcon?: boolean;
24
40
  toggleRightIcon?: boolean;
25
41
  onClick?: (event: React_2.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
26
42
  leftIcon?: keyof typeof Icons | string | undefined;
27
43
  rightIcon?: keyof typeof Icons | string | undefined;
44
+ isLoading?: boolean;
45
+ elevation?: number;
28
46
  }
29
47
 
30
48
  declare const buttonVariants: (props?: ({
31
49
  variant?: "link" | "default" | "danger" | "outline" | "secondary" | "ghost" | null | undefined;
32
- size?: "sm" | "md" | "lg" | "icon" | null | undefined;
50
+ size?: "sm" | "md" | "lg" | null | undefined;
33
51
  } & ClassProp) | undefined) => string;
34
52
 
53
+ export declare const Card: React_2.ForwardRefExoticComponent<CardProps & React_2.RefAttributes<HTMLDivElement>>;
54
+
55
+ export declare const CardContent: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
56
+
57
+ export declare const CardControlWrapper: ({ defaultSize, deleteFunction, children, }: {
58
+ deleteFunction: () => void;
59
+ defaultSize: CardSize;
60
+ children: (size: CardSize) => ReactNode;
61
+ }) => JSX_2.Element;
62
+
63
+ export declare const CardDescription: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLParagraphElement> & React_2.RefAttributes<HTMLParagraphElement>>;
64
+
65
+ export declare const CardFooter: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
66
+
67
+ export declare const CardHeader: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
68
+
69
+ export declare interface CardProps extends React_2.HTMLAttributes<HTMLDivElement> {
70
+ title?: string;
71
+ size?: CardSize;
72
+ type?: FileType;
73
+ url?: string;
74
+ likeCount?: number;
75
+ text?: string;
76
+ classNames?: string;
77
+ }
78
+
79
+ export declare type CardSize = "sm" | "md" | "lg";
80
+
81
+ export declare const CardTitle: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLHeadingElement> & React_2.RefAttributes<HTMLParagraphElement>>;
82
+
83
+ export declare const Checkbox: React_2.ForwardRefExoticComponent<CheckboxProps & React_2.RefAttributes<HTMLButtonElement>>;
84
+
85
+ export declare interface CheckboxProps extends React_2.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
86
+ label?: string;
87
+ labelPosition?: "left" | "right";
88
+ }
89
+
90
+ declare const checkboxVariants: (props?: ({
91
+ variant?: "default" | "hover" | "focus" | null | undefined;
92
+ } & ClassProp) | undefined) => string;
93
+
94
+ export declare const Divider: {
95
+ ({ direction, size, className, ...props }: DividerProps): JSX_2.Element;
96
+ displayName: string;
97
+ };
98
+
99
+ export declare interface DividerProps extends React_2.HTMLAttributes<HTMLDivElement> {
100
+ direction?: "horizontal" | "vertical";
101
+ size?: "sm" | "md" | "lg" | "xlg";
102
+ }
103
+
104
+ export declare type FileType = "dDoc" | "dPage" | "whiteboard" | "note" | "link" | "media";
105
+
106
+ export declare const GridLayout: (props: GridProps) => JSX_2.Element;
107
+
108
+ export declare type GridProps = GridProps_2;
109
+
35
110
  export declare const Icon: {
36
111
  ({ name, size, fill, stroke, className, ...props }: IconProps): JSX_2.Element | null;
37
112
  displayName: string;
38
113
  };
39
114
 
115
+ export declare const IconButton: ({ icon, variant, size, className, elevation, rounded, ...props }: IconButtonProps) => JSX_2.Element;
116
+
117
+ export declare interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Pick<ButtonProps, "variant"> {
118
+ icon: keyof typeof Icons | string;
119
+ size?: "sm" | "md" | "lg";
120
+ isLoading?: boolean;
121
+ className?: string;
122
+ elevation?: number;
123
+ rounded?: boolean;
124
+ }
125
+
40
126
  export declare interface IconProps extends SvgProps, VariantProps<typeof iconVariants> {
41
127
  name: keyof typeof Icons;
42
128
  className?: string;
@@ -53,7 +139,7 @@ declare const Icons: {
53
139
  Download: ({ fill, width, height, ...props }: IconProps) => JSX_2.Element;
54
140
  Grid: ({ fill, width, height, ...props }: IconProps) => JSX_2.Element;
55
141
  Heart: ({ fill, width, height, ...props }: IconProps) => JSX_2.Element;
56
- HeartBeat: ({ fill, width, height, ...props }: IconProps) => JSX_2.Element;
142
+ HeartBeat: ({ width, height, ...props }: IconProps) => JSX_2.Element;
57
143
  ImagePlus: ({ fill, width, height, ...props }: IconProps) => JSX_2.Element;
58
144
  InfoCircle: ({ fill, width, height, ...props }: IconProps) => JSX_2.Element;
59
145
  Dashboard: ({ fill, width, height, ...props }: IconProps) => JSX_2.Element;
@@ -88,6 +174,12 @@ declare const iconVariants: (props?: ({
88
174
  size?: "sm" | "md" | "lg" | null | undefined;
89
175
  } & ClassProp) | undefined) => string;
90
176
 
177
+ declare const iconVariants_2: (props?: ({
178
+ size?: "sm" | "md" | "lg" | null | undefined;
179
+ } & ClassProp) | undefined) => string;
180
+
181
+ export declare const ImageCard: ({ type, size, url, likeCount, classNames, }: CardProps) => JSX_2.Element;
182
+
91
183
  export declare const Label: React_2.ForwardRefExoticComponent<LabelProps & React_2.RefAttributes<HTMLLabelElement>>;
92
184
 
93
185
  export declare interface LabelProps extends React_2.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, VariantProps<typeof labelVariants> {
@@ -96,11 +188,69 @@ export declare interface LabelProps extends React_2.ComponentPropsWithoutRef<typ
96
188
 
97
189
  declare const labelVariants: (props?: ClassProp | undefined) => string;
98
190
 
191
+ export declare const LucideIcon: default_2.MemoExoticComponent<({ name, className, size, strokeWidth, fill, ...props }: LucideIconProps) => JSX_2.Element | null>;
192
+
193
+ export declare interface LucideIconProps extends VariantProps<typeof iconVariants_2> {
194
+ name: keyof typeof icons;
195
+ className?: string;
196
+ strokeWidth?: number;
197
+ fill?: string;
198
+ }
199
+
200
+ export declare const PortalCard: ({ title, size, type, url, likeCount, classNames, }: CardProps) => JSX_2.Element;
201
+
202
+ export declare const SegmentedControl: default_2.ForwardRefExoticComponent<SegmentedControlProps & default_2.RefAttributes<HTMLDivElement>>;
203
+
204
+ export declare interface SegmentedControlProps extends default_2.AllHTMLAttributes<HTMLDivElement> {
205
+ options: ReactNode[];
206
+ container: boolean;
207
+ currentState?: number;
208
+ setCurrentState: default_2.Dispatch<SetStateAction<number>>;
209
+ }
210
+
211
+ export declare type SortState = {
212
+ keyName: string | null;
213
+ order: "default" | "asc" | "desc";
214
+ };
215
+
99
216
  declare interface SvgProps extends default_2.SVGProps<SVGSVGElement> {
100
217
  fill?: string;
101
218
  stroke?: string;
102
219
  }
103
220
 
221
+ export declare const Table: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableElement> & React_2.RefAttributes<HTMLTableElement>>;
222
+
223
+ export declare const TableBody: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
224
+
225
+ export declare const TableCaption: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableCaptionElement> & React_2.RefAttributes<HTMLTableCaptionElement>>;
226
+
227
+ export declare const TableCell: React_2.ForwardRefExoticComponent<React_2.TdHTMLAttributes<HTMLTableCellElement> & React_2.RefAttributes<HTMLTableCellElement>>;
228
+
229
+ export declare type TableDataProps = {
230
+ [key: string]: any;
231
+ };
232
+
233
+ export declare const TableFooter: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
234
+
235
+ export declare const TableHead: React_2.ForwardRefExoticComponent<TableHeadProps & React_2.RefAttributes<HTMLTableCellElement>>;
236
+
237
+ export declare const TableHeader: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableSectionElement> & React_2.RefAttributes<HTMLTableSectionElement>>;
238
+
239
+ declare interface TableHeadProps extends React_2.ThHTMLAttributes<HTMLTableCellElement> {
240
+ enableSorting?: boolean;
241
+ sortOrder?: "default" | "asc" | "desc";
242
+ }
243
+
244
+ export declare const TableRow: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLTableRowElement> & React_2.RefAttributes<HTMLTableRowElement>>;
245
+
246
+ export declare const Tabs: React_2.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React_2.RefAttributes<HTMLDivElement>>;
247
+
248
+ export declare const TabsContent: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
249
+
250
+ export declare const TabsList: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
251
+
252
+ export declare const TabsTrigger: React_2.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
253
+
104
254
  export declare const Tag: React_2.ForwardRefExoticComponent<TagProps & React_2.RefAttributes<HTMLDivElement>>;
105
255
 
106
256
  export declare interface TagProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof tagVariants> {
@@ -130,6 +280,8 @@ export declare interface TextAreaFieldProps extends React_2.TextareaHTMLAttribut
130
280
  isValid?: boolean;
131
281
  }
132
282
 
283
+ export declare const TextBlockCard: ({ type, size, text, classNames }: CardProps) => JSX_2.Element;
284
+
133
285
  export declare const TextField: React_2.ForwardRefExoticComponent<TextFieldProps & React_2.RefAttributes<HTMLInputElement>>;
134
286
 
135
287
  export declare interface TextFieldProps extends React_2.InputHTMLAttributes<HTMLInputElement> {
@@ -182,4 +334,22 @@ declare const tooltipVariants: (props?: ({
182
334
  defaultVariants?: "variant" | "beakPosition" | null | undefined;
183
335
  } & ClassProp) | undefined) => string;
184
336
 
337
+ export declare const useHoverAndLongPress: ({ delay, }: UseHoverAndLongPressProps) => {
338
+ onMouseEnter: () => void;
339
+ onMouseLeave: () => void;
340
+ onTouchStart: () => void;
341
+ onTouchEnd: () => void;
342
+ isActive: boolean;
343
+ };
344
+
345
+ declare interface UseHoverAndLongPressProps {
346
+ delay?: number;
347
+ }
348
+
349
+ export declare function useSortableData(initialData: TableDataProps[], defaultSortState?: SortState): {
350
+ data: TableDataProps[];
351
+ sortState: SortState;
352
+ sortData: (keyName: string) => void;
353
+ };
354
+
185
355
  export { }