@mateosuarezdev/react-ui 1.0.58 → 1.0.60
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.cjs +4 -4
- package/dist/index.d.ts +36 -0
- package/dist/index.js +1853 -1559
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { ImgHTMLAttributes } from 'react';
|
|
|
22
22
|
import { InputHTMLAttributes } from 'react';
|
|
23
23
|
import { JSX } from 'react/jsx-runtime';
|
|
24
24
|
import { Locale } from 'date-fns';
|
|
25
|
+
import { LucideIcon } from 'lucide-react';
|
|
25
26
|
import { MotionValue } from 'motion/react';
|
|
26
27
|
import { MouseEventHandler } from 'react';
|
|
27
28
|
import { ReactNode } from 'react';
|
|
@@ -223,6 +224,26 @@ export declare const Divider: ({ className }: {
|
|
|
223
224
|
className?: string;
|
|
224
225
|
}) => JSX.Element;
|
|
225
226
|
|
|
227
|
+
export declare const DropdownMenu: (props: DropdownMenuProps) => JSX.Element;
|
|
228
|
+
|
|
229
|
+
declare interface DropdownMenuProps {
|
|
230
|
+
prevMenuId?: string;
|
|
231
|
+
children?: string | default_2.ReactNode;
|
|
232
|
+
customTrigger?: ({ triggerRef, triggerProps, toggle, open, }: {
|
|
233
|
+
triggerRef: RefObject<HTMLButtonElement | null>;
|
|
234
|
+
triggerProps: any;
|
|
235
|
+
toggle: VoidFunction;
|
|
236
|
+
open: boolean;
|
|
237
|
+
}) => default_2.ReactNode;
|
|
238
|
+
items?: MenuItem[];
|
|
239
|
+
align?: "start" | "center" | "end";
|
|
240
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
241
|
+
offset?: number;
|
|
242
|
+
level?: number;
|
|
243
|
+
className?: string;
|
|
244
|
+
triggerClassName?: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
226
247
|
/**
|
|
227
248
|
* ElasticHeader - Creates a pull-to-zoom effect on scroll
|
|
228
249
|
*
|
|
@@ -486,6 +507,21 @@ declare interface LongPressOptions {
|
|
|
486
507
|
moveThreshold?: number;
|
|
487
508
|
}
|
|
488
509
|
|
|
510
|
+
export declare const MenuFocusProvider: ({ children }: {
|
|
511
|
+
children: default_2.ReactNode;
|
|
512
|
+
}) => JSX.Element;
|
|
513
|
+
|
|
514
|
+
export declare interface MenuItem {
|
|
515
|
+
icon?: LucideIcon;
|
|
516
|
+
label?: string;
|
|
517
|
+
shortcut?: string;
|
|
518
|
+
destructive?: boolean;
|
|
519
|
+
separator?: boolean;
|
|
520
|
+
onClick?: () => void;
|
|
521
|
+
submenu?: MenuItem[];
|
|
522
|
+
disabled?: boolean;
|
|
523
|
+
}
|
|
524
|
+
|
|
489
525
|
declare interface ModalsContextType {
|
|
490
526
|
add: (id: string) => void;
|
|
491
527
|
remove: (id: string) => void;
|