conversion-ui-library 1.0.9 → 1.1.11

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.
@@ -0,0 +1,81 @@
1
+ import { DropdownMenu as DropdownMenuRoot, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from '../ui/menu';
2
+ import { IconName } from '../../lib/Icons/icon-registry';
3
+ import * as React from "react";
4
+ export type DropdownMenuItemType = {
5
+ type?: "item";
6
+ label: string;
7
+ icon?: IconName;
8
+ shortcut?: string;
9
+ onClick?: () => void;
10
+ disabled?: boolean;
11
+ destructive?: boolean;
12
+ } | {
13
+ type: "checkbox";
14
+ label: string;
15
+ icon?: IconName;
16
+ checked?: boolean;
17
+ onCheckedChange?: (checked: boolean) => void;
18
+ disabled?: boolean;
19
+ } | {
20
+ type: "radio";
21
+ label: string;
22
+ value: string;
23
+ disabled?: boolean;
24
+ } | {
25
+ type: "separator";
26
+ } | {
27
+ type: "label";
28
+ label: string;
29
+ } | {
30
+ type: "submenu";
31
+ label: string;
32
+ icon?: IconName;
33
+ items: DropdownMenuItemType[];
34
+ };
35
+ export interface DropdownMenuProps {
36
+ /**
37
+ * The trigger element that opens the dropdown
38
+ */
39
+ trigger: React.ReactNode;
40
+ /**
41
+ * Array of menu items
42
+ */
43
+ items: DropdownMenuItemType[];
44
+ /**
45
+ * Alignment of the dropdown content
46
+ * @default "start"
47
+ */
48
+ align?: "start" | "center" | "end";
49
+ /**
50
+ * Side offset for the dropdown
51
+ * @default 4
52
+ */
53
+ sideOffset?: number;
54
+ /**
55
+ * Custom className for the content
56
+ */
57
+ contentClassName?: string;
58
+ /**
59
+ * Custom className for the trigger wrapper
60
+ */
61
+ className?: string;
62
+ /**
63
+ * Open state (controlled)
64
+ */
65
+ open?: boolean;
66
+ /**
67
+ * Callback when open state changes
68
+ */
69
+ onOpenChange?: (open: boolean) => void;
70
+ /**
71
+ * Radio group value (for radio items)
72
+ */
73
+ radioValue?: string;
74
+ /**
75
+ * Radio group value change handler
76
+ */
77
+ onRadioValueChange?: (value: string) => void;
78
+ }
79
+ export declare const DropdownMenu: React.ForwardRefExoticComponent<DropdownMenuProps & React.RefAttributes<HTMLDivElement>>;
80
+ export { DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuRadioGroup, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, };
81
+ //# sourceMappingURL=DropdownMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,YAAY,IAAI,gBAAgB,EAChC,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAG1D,MAAM,MAAM,oBAAoB,GAC5B;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MA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,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AA0FD,eAAO,MAAM,YAAY,0FAkDxB,CAAC;AAKF,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import * as React from "react";
3
+ declare const meta: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<import('./DropdownMenu').DropdownMenuProps & React.RefAttributes<HTMLDivElement>>;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ argTypes: {
11
+ align: {
12
+ control: "select";
13
+ options: string[];
14
+ description: string;
15
+ };
16
+ sideOffset: {
17
+ control: "number";
18
+ description: string;
19
+ };
20
+ };
21
+ };
22
+ export default meta;
23
+ type Story = StoryObj<typeof meta>;
24
+ export declare const Default: Story;
25
+ export declare const WithIcons: Story;
26
+ export declare const WithCheckboxes: Story;
27
+ export declare const WithRadioGroup: Story;
28
+ export declare const WithSubmenu: Story;
29
+ export declare const WithLabelsAndGroups: Story;
30
+ export declare const WithDisabledItems: Story;
31
+ export declare const AlignmentVariations: Story;
32
+ export declare const Controlled: Story;
33
+ export declare const RealWorldExample: Story;
34
+ //# sourceMappingURL=DropdownMenu.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvD,O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CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EACL,YAAY,GACZ,YAAY,GACZ,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,GACN,MAAM,GACN,KAAK,GACL,KAAK,GACL,UAAU,GACV,KAAK,GACL,MAAM,GACN,WAAW,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,6FAiK3B,CAAC"}
1
+ {"version":3,"file":"EditorTextField.d.ts","sourceRoot":"","sources":["../../../src/components/EditorTextField/EditorTextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuB/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,yBAAyB,CAAC;AAyBjC,QAAA,MAAM,mBAAmB;;;;;mFA0BxB,CAAC;AAkBF,MAAM,WAAW,oBACf,SAAQ,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EACL,YAAY,GACZ,YAAY,GACZ,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,GACN,MAAM,GACN,KAAK,GACL,KAAK,GACL,UAAU,GACV,KAAK,GACL,MAAM,GACN,WAAW,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,6FAuK3B,CAAC"}
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
28
+ //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AAKtE,QAAA,MAAM,YAAY,mDAA6B,CAAA;AAE/C,QAAA,MAAM,mBAAmB,0HAAgC,CAAA;AAEzD,QAAA,MAAM,iBAAiB,qHAA8B,CAAA;AAErD,QAAA,MAAM,kBAAkB,yDAA+B,CAAA;AAEvD,QAAA,MAAM,eAAe,sDAA4B,CAAA;AAEjD,QAAA,MAAM,sBAAsB,0HAAmC,CAAA;AAE/D,QAAA,MAAM,sBAAsB;YAGhB,OAAO;wCAejB,CAAA;AAIF,QAAA,MAAM,sBAAsB,6KAY1B,CAAA;AAIF,QAAA,MAAM,mBAAmB,0KAgBvB,CAAA;AAGF,QAAA,MAAM,gBAAgB;YAGV,OAAO;wCAYjB,CAAA;AAGF,QAAA,MAAM,wBAAwB,+KAoB5B,CAAA;AAIF,QAAA,MAAM,qBAAqB,4KAmBzB,CAAA;AAGF,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAYjB,CAAA;AAGF,QAAA,MAAM,qBAAqB,4KASzB,CAAA;AAGF,QAAA,MAAM,oBAAoB;8BAGvB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAOvC,CAAA;AAGD,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAA"}