@mijn-ui/react-dropdown-menu 0.2.0 → 0.3.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,97 +1,198 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as tailwind_merge from 'tailwind-merge';
3
+ import * as _mijn_ui_react_core from '@mijn-ui/react-core';
4
+ import { UnstyledComponentWithSlots } from '@mijn-ui/react-core';
2
5
  import * as tailwind_variants from 'tailwind-variants';
3
- import * as _mijn_ui_react_theme from '@mijn-ui/react-theme';
4
- import { UnstyledComponentWithSlots, DropdownMenuSlots, UnstyledProps } from '@mijn-ui/react-theme';
6
+ import { VariantProps } from 'tailwind-variants';
5
7
  import * as React from 'react';
6
8
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
7
9
 
10
+ declare const dropdownMenuStyles: tailwind_variants.TVReturnType<{
11
+ inset: {
12
+ true: {
13
+ item: string;
14
+ label: string;
15
+ subTrigger: string;
16
+ };
17
+ };
18
+ }, {
19
+ base: string;
20
+ trigger: string;
21
+ subTrigger: string;
22
+ subTriggerIcon: string;
23
+ subContent: string[];
24
+ content: string[];
25
+ item: string[];
26
+ checkboxItem: string[];
27
+ checkboxItemIconWrapper: string;
28
+ checkboxItemIcon: string;
29
+ radioItem: string[];
30
+ radioItemIconWrapper: string;
31
+ radioItemIcon: string;
32
+ label: string;
33
+ separator: string;
34
+ shortcut: string;
35
+ }, undefined, {
36
+ inset: {
37
+ true: {
38
+ item: string;
39
+ label: string;
40
+ subTrigger: string;
41
+ };
42
+ };
43
+ }, {
44
+ base: string;
45
+ trigger: string;
46
+ subTrigger: string;
47
+ subTriggerIcon: string;
48
+ subContent: string[];
49
+ content: string[];
50
+ item: string[];
51
+ checkboxItem: string[];
52
+ checkboxItemIconWrapper: string;
53
+ checkboxItemIcon: string;
54
+ radioItem: string[];
55
+ radioItemIconWrapper: string;
56
+ radioItemIcon: string;
57
+ label: string;
58
+ separator: string;
59
+ shortcut: string;
60
+ }, tailwind_variants.TVReturnType<{
61
+ inset: {
62
+ true: {
63
+ item: string;
64
+ label: string;
65
+ subTrigger: string;
66
+ };
67
+ };
68
+ }, {
69
+ base: string;
70
+ trigger: string;
71
+ subTrigger: string;
72
+ subTriggerIcon: string;
73
+ subContent: string[];
74
+ content: string[];
75
+ item: string[];
76
+ checkboxItem: string[];
77
+ checkboxItemIconWrapper: string;
78
+ checkboxItemIcon: string;
79
+ radioItem: string[];
80
+ radioItemIconWrapper: string;
81
+ radioItemIcon: string;
82
+ label: string;
83
+ separator: string;
84
+ shortcut: string;
85
+ }, undefined, unknown, unknown, undefined>>;
86
+ type DropdownMenuVariantProps = VariantProps<typeof dropdownMenuStyles>;
87
+ type DropdownMenuSlots = keyof ReturnType<typeof dropdownMenuStyles>;
88
+
8
89
  declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
9
90
  declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
10
91
  declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
11
92
  declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
12
93
  type DropdownMenuBaseProps = UnstyledComponentWithSlots<DropdownMenuSlots>;
13
94
  declare const useDropdownStyles: (unstyledOverride?: boolean) => {
14
- classNames: _mijn_ui_react_theme.SlotsToClasses<"base" | "trigger" | "subTrigger" | "subTriggerIcon" | "subContent" | "content" | "item" | "checkboxItem" | "checkboxItemIconWrapper" | "checkboxItemIcon" | "radioItem" | "radioItemIconWrapper" | "radioItemIcon" | "label" | "separator" | "shortcut"> | undefined;
95
+ classNames: _mijn_ui_react_core.SlotsToClasses<"base" | "trigger" | "subTrigger" | "subTriggerIcon" | "checkboxItemIconWrapper" | "checkboxItemIcon" | "radioItemIconWrapper" | "radioItemIcon" | "label" | "separator" | "shortcut" | "subContent" | "content" | "item" | "checkboxItem" | "radioItem"> | undefined;
15
96
  isUnstyled: boolean | undefined;
16
97
  base: (slotProps?: ({
17
98
  inset?: boolean | undefined;
18
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
99
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
19
100
  trigger: (slotProps?: ({
20
101
  inset?: boolean | undefined;
21
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
102
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
22
103
  subTrigger: (slotProps?: ({
23
104
  inset?: boolean | undefined;
24
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
105
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
25
106
  subTriggerIcon: (slotProps?: ({
26
107
  inset?: boolean | undefined;
27
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
108
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
28
109
  subContent: (slotProps?: ({
29
110
  inset?: boolean | undefined;
30
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
111
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
31
112
  content: (slotProps?: ({
32
113
  inset?: boolean | undefined;
33
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
114
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
34
115
  item: (slotProps?: ({
35
116
  inset?: boolean | undefined;
36
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
117
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
37
118
  checkboxItem: (slotProps?: ({
38
119
  inset?: boolean | undefined;
39
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
120
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
40
121
  checkboxItemIconWrapper: (slotProps?: ({
41
122
  inset?: boolean | undefined;
42
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
123
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
43
124
  checkboxItemIcon: (slotProps?: ({
44
125
  inset?: boolean | undefined;
45
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
126
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
46
127
  radioItem: (slotProps?: ({
47
128
  inset?: boolean | undefined;
48
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
129
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
49
130
  radioItemIconWrapper: (slotProps?: ({
50
131
  inset?: boolean | undefined;
51
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
132
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
52
133
  radioItemIcon: (slotProps?: ({
53
134
  inset?: boolean | undefined;
54
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
135
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
55
136
  label: (slotProps?: ({
56
137
  inset?: boolean | undefined;
57
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
138
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
58
139
  separator: (slotProps?: ({
59
140
  inset?: boolean | undefined;
60
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
141
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
61
142
  shortcut: (slotProps?: ({
62
143
  inset?: boolean | undefined;
63
- } & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string | undefined;
144
+ } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
64
145
  };
65
146
  type DropdownMenuProps = DropdownMenuPrimitive.DropdownMenuProps & DropdownMenuBaseProps;
66
147
  declare const DropdownMenu: ({ classNames, unstyled, ...props }: DropdownMenuProps) => react_jsx_runtime.JSX.Element;
67
- type DropdownTriggerProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Trigger> & UnstyledProps;
148
+ type DropdownTriggerProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Trigger> & {
149
+ unstyled?: boolean;
150
+ };
68
151
  declare const DropdownMenuTrigger: ({ unstyled, className, ...props }: DropdownTriggerProps) => react_jsx_runtime.JSX.Element;
69
- type DropdownMenuSubTriggerProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.SubTrigger> & UnstyledProps & {
152
+ type DropdownMenuSubTriggerProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.SubTrigger> & {
153
+ unstyled?: boolean;
154
+ } & {
70
155
  inset?: boolean;
71
156
  };
72
157
  declare const DropdownMenuSubTrigger: ({ unstyled, className, inset, children, ...props }: DropdownMenuSubTriggerProps) => react_jsx_runtime.JSX.Element;
73
- type DropdownMenuSubContentProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.SubContent> & UnstyledProps;
158
+ type DropdownMenuSubContentProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.SubContent> & {
159
+ unstyled?: boolean;
160
+ };
74
161
  declare const DropdownMenuSubContent: ({ unstyled, className, ...props }: DropdownMenuSubContentProps) => react_jsx_runtime.JSX.Element;
75
- type DropdownMenuContentProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Content> & UnstyledProps;
162
+ type DropdownMenuContentProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Content> & {
163
+ unstyled?: boolean;
164
+ };
76
165
  declare const DropdownMenuContent: ({ className, unstyled, sideOffset, ...props }: DropdownMenuContentProps) => react_jsx_runtime.JSX.Element;
77
166
  type DropdownMenuItemProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Item> & {
78
167
  inset?: boolean;
79
- } & UnstyledProps;
168
+ } & {
169
+ unstyled?: boolean;
170
+ };
80
171
  declare const DropdownMenuItem: ({ unstyled, className, inset, ...props }: DropdownMenuItemProps) => react_jsx_runtime.JSX.Element;
81
- type DropdownMenuCheckboxItemProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.CheckboxItem> & UnstyledProps;
172
+ type DropdownMenuCheckboxItemProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.CheckboxItem> & {
173
+ unstyled?: boolean;
174
+ };
82
175
  declare const DropdownMenuCheckboxItem: ({ className, unstyled, children, checked, ...props }: DropdownMenuCheckboxItemProps) => react_jsx_runtime.JSX.Element;
83
- type DropdownMenuRadioItemProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.RadioItem> & UnstyledProps;
176
+ type DropdownMenuRadioItemProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.RadioItem> & {
177
+ unstyled?: boolean;
178
+ };
84
179
  declare const DropdownMenuRadioItem: ({ className, unstyled, children, ...props }: DropdownMenuRadioItemProps) => react_jsx_runtime.JSX.Element;
85
180
  type DropdownMenuLabelProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Label> & {
86
181
  inset?: boolean;
87
- } & UnstyledProps;
182
+ } & {
183
+ unstyled?: boolean;
184
+ };
88
185
  declare const DropdownMenuLabel: ({ className, unstyled, inset, ...props }: DropdownMenuLabelProps) => react_jsx_runtime.JSX.Element;
89
- type DropdownMenuSeparatorProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Separator> & UnstyledProps;
186
+ type DropdownMenuSeparatorProps = React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Separator> & {
187
+ unstyled?: boolean;
188
+ };
90
189
  declare const DropdownMenuSeparator: ({ className, unstyled, ...props }: DropdownMenuSeparatorProps) => react_jsx_runtime.JSX.Element;
91
- type DropdownMenuShortcutProps = React.ComponentPropsWithRef<"span"> & UnstyledProps;
190
+ type DropdownMenuShortcutProps = React.ComponentPropsWithRef<"span"> & {
191
+ unstyled?: boolean;
192
+ };
92
193
  declare const DropdownMenuShortcut: {
93
194
  ({ className, unstyled, ...props }: DropdownMenuShortcutProps): react_jsx_runtime.JSX.Element;
94
195
  displayName: string;
95
196
  };
96
197
 
97
- export { DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownTriggerProps, useDropdownStyles };
198
+ export { DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuSlots, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuVariantProps, type DropdownTriggerProps, dropdownMenuStyles, useDropdownStyles };
package/dist/index.js CHANGED
@@ -1,15 +1,77 @@
1
1
  "use client";
2
2
 
3
3
  // src/dropdown-menu.tsx
4
- import { useTVUnstyled } from "@mijn-ui/react-hooks";
5
4
  import {
6
- cn,
7
- dropdownMenuStyles
8
- } from "@mijn-ui/react-theme";
9
- import { createContext } from "@mijn-ui/react-utilities";
5
+ createContext,
6
+ useTVUnstyled
7
+ } from "@mijn-ui/react-core";
10
8
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "@mijn-ui/shared-icons";
11
9
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
10
+ import { cnBase, tv } from "tailwind-variants";
12
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
+ var itemFocusClasses = ["focus:bg-bg-secondary"];
13
+ var commonContentClasses = [
14
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border border-outline-default bg-bg-default-alt text-fg-default shadow-lg"
15
+ ];
16
+ var commonItemClasses = [
17
+ "relative flex cursor-default select-none items-center py-1.5 pl-8 pr-2 text-sm outline-none transition-colors"
18
+ ];
19
+ var commonIconWrapperClasses = "absolute left-2 flex h-3.5 w-3.5 items-center justify-center";
20
+ var dropdownMenuStyles = tv({
21
+ slots: {
22
+ base: "",
23
+ trigger: "",
24
+ subTrigger: "focus-visible:bg-bg-secondary data-[state=open]:bg-bg-secondary flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none",
25
+ subTriggerIcon: "pointer-events-none ml-auto size-4 shrink-0",
26
+ subContent: [
27
+ "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
28
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
29
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
30
+ ...commonContentClasses
31
+ ],
32
+ content: [
33
+ "data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=open]:fade-in-0",
34
+ "data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
35
+ "data-[side=bottom]:slide-in-from-bottom-6 data-[side=left]:slide-in-from-left-6 data-[side=right]:slide-in-from-right-6 data-[side=top]:slide-in-from-top-6",
36
+ ...commonContentClasses,
37
+ "!duration-300"
38
+ ],
39
+ item: [
40
+ ...itemFocusClasses,
41
+ "data-[disabled]:pointer-events-none",
42
+ "data-[disabled]:opacity-50",
43
+ "relative flex h-9 cursor-default select-none items-center gap-2 px-2 text-sm outline-none transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
44
+ ],
45
+ checkboxItem: [
46
+ ...itemFocusClasses,
47
+ "data-[disabled]:pointer-events-none",
48
+ "data-[disabled]:opacity-50",
49
+ ...commonItemClasses
50
+ ],
51
+ checkboxItemIconWrapper: commonIconWrapperClasses,
52
+ checkboxItemIcon: "size-4",
53
+ radioItem: [
54
+ ...itemFocusClasses,
55
+ "data-[disabled]:pointer-events-none",
56
+ "data-[disabled]:opacity-50",
57
+ ...commonItemClasses
58
+ ],
59
+ radioItemIconWrapper: commonIconWrapperClasses,
60
+ radioItemIcon: "size-2 fill-current",
61
+ label: "px-2 py-1.5 text-sm font-semibold",
62
+ separator: "bg-bg-tertiary h-px -mx-1 my-1",
63
+ shortcut: "ml-auto text-xs tracking-widest opacity-60"
64
+ },
65
+ variants: {
66
+ inset: {
67
+ true: {
68
+ item: "pl-8",
69
+ label: "pl-8",
70
+ subTrigger: "pl-8"
71
+ }
72
+ }
73
+ }
74
+ });
13
75
  var DropdownMenuGroup = DropdownMenuPrimitive.Group;
14
76
  var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
15
77
  var DropdownMenuSub = DropdownMenuPrimitive.Sub;
@@ -42,7 +104,7 @@ var DropdownMenuTrigger = ({
42
104
  DropdownMenuPrimitive.Trigger,
43
105
  {
44
106
  className: trigger({
45
- className: cn(classNames?.trigger, className)
107
+ className: cnBase(classNames?.trigger, className)
46
108
  }),
47
109
  ...props
48
110
  }
@@ -60,7 +122,7 @@ var DropdownMenuSubTrigger = ({
60
122
  DropdownMenuPrimitive.SubTrigger,
61
123
  {
62
124
  className: subTrigger({
63
- className: cn(classNames?.subTrigger, className),
125
+ className: cnBase(classNames?.subTrigger, className),
64
126
  inset
65
127
  }),
66
128
  ...props,
@@ -86,7 +148,7 @@ var DropdownMenuSubContent = ({
86
148
  DropdownMenuPrimitive.SubContent,
87
149
  {
88
150
  className: subContent({
89
- className: cn(classNames?.subContent, className)
151
+ className: cnBase(classNames?.subContent, className)
90
152
  }),
91
153
  ...props
92
154
  }
@@ -104,7 +166,7 @@ var DropdownMenuContent = ({
104
166
  {
105
167
  sideOffset,
106
168
  className: content({
107
- className: cn(classNames?.content, className)
169
+ className: cnBase(classNames?.content, className)
108
170
  }),
109
171
  ...props
110
172
  }
@@ -121,7 +183,7 @@ var DropdownMenuItem = ({
121
183
  DropdownMenuPrimitive.Item,
122
184
  {
123
185
  className: item({
124
- className: cn(classNames?.item, className),
186
+ className: cnBase(classNames?.item, className),
125
187
  inset
126
188
  }),
127
189
  ...props
@@ -145,7 +207,7 @@ var DropdownMenuCheckboxItem = ({
145
207
  DropdownMenuPrimitive.CheckboxItem,
146
208
  {
147
209
  className: checkboxItem({
148
- className: cn(classNames?.checkboxItem, className)
210
+ className: cnBase(classNames?.checkboxItem, className)
149
211
  }),
150
212
  checked,
151
213
  ...props,
@@ -182,7 +244,7 @@ var DropdownMenuRadioItem = ({
182
244
  DropdownMenuPrimitive.RadioItem,
183
245
  {
184
246
  className: radioItem({
185
- className: cn(classNames?.radioItem, className)
247
+ className: cnBase(classNames?.radioItem, className)
186
248
  }),
187
249
  ...props,
188
250
  children: [
@@ -218,7 +280,7 @@ var DropdownMenuLabel = ({
218
280
  DropdownMenuPrimitive.Label,
219
281
  {
220
282
  className: label({
221
- className: cn(classNames?.label, className),
283
+ className: cnBase(classNames?.label, className),
222
284
  inset
223
285
  }),
224
286
  ...props
@@ -235,7 +297,7 @@ var DropdownMenuSeparator = ({
235
297
  DropdownMenuPrimitive.Separator,
236
298
  {
237
299
  className: separator({
238
- className: cn(classNames?.separator, className)
300
+ className: cnBase(classNames?.separator, className)
239
301
  }),
240
302
  ...props
241
303
  }
@@ -251,7 +313,7 @@ var DropdownMenuShortcut = ({
251
313
  "span",
252
314
  {
253
315
  className: shortcut({
254
- className: cn(classNames?.shortcut, className)
316
+ className: cnBase(classNames?.shortcut, className)
255
317
  }),
256
318
  ...props
257
319
  }
@@ -274,5 +336,6 @@ export {
274
336
  DropdownMenuSubContent,
275
337
  DropdownMenuSubTrigger,
276
338
  DropdownMenuTrigger,
339
+ dropdownMenuStyles,
277
340
  useDropdownStyles
278
341
  };
@@ -1 +1 @@
1
- {"inputs":{"src/dropdown-menu.tsx":{"bytes":11382,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@mijn-ui/react-hooks","kind":"import-statement","external":true},{"path":"@mijn-ui/react-theme","kind":"import-statement","external":true},{"path":"@mijn-ui/react-utilities","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@radix-ui/react-dropdown-menu","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":32,"imports":[{"path":"src/dropdown-menu.tsx","kind":"import-statement","original":"./dropdown-menu"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"@mijn-ui/react-hooks","kind":"import-statement","external":true},{"path":"@mijn-ui/react-theme","kind":"import-statement","external":true},{"path":"@mijn-ui/react-utilities","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@radix-ui/react-dropdown-menu","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"exports":["DropdownMenu","DropdownMenuCheckboxItem","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuLabel","DropdownMenuPortal","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubContent","DropdownMenuSubTrigger","DropdownMenuTrigger","useDropdownStyles"],"entryPoint":"src/index.ts","inputs":{"src/dropdown-menu.tsx":{"bytesInOutput":6367},"src/index.ts":{"bytesInOutput":0}},"bytes":6784}}}
1
+ {"inputs":{"src/dropdown-menu.tsx":{"bytes":14419,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@mijn-ui/react-core","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@radix-ui/react-dropdown-menu","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":32,"imports":[{"path":"src/dropdown-menu.tsx","kind":"import-statement","original":"./dropdown-menu"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"@mijn-ui/react-core","kind":"import-statement","external":true},{"path":"@mijn-ui/shared-icons","kind":"import-statement","external":true},{"path":"@radix-ui/react-dropdown-menu","kind":"import-statement","external":true},{"path":"tailwind-variants","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"exports":["DropdownMenu","DropdownMenuCheckboxItem","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","DropdownMenuLabel","DropdownMenuPortal","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubContent","DropdownMenuSubTrigger","DropdownMenuTrigger","dropdownMenuStyles","useDropdownStyles"],"entryPoint":"src/index.ts","inputs":{"src/dropdown-menu.tsx":{"bytesInOutput":9056},"src/index.ts":{"bytesInOutput":0}},"bytes":9495}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mijn-ui/react-dropdown-menu",
3
3
  "author": "Htet Aung Lin<htetaunglin.coder@gmail.com>",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "homepage": "https://mijn-ui.vercel.app",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -26,22 +26,20 @@
26
26
  "lucide-react": "^0.479.0",
27
27
  "react": "19.0.0",
28
28
  "react-dom": "19.0.0",
29
- "@mijn-ui/react-button": "0.2.0",
30
- "@mijn-ui/react-core": "0.1.0",
31
- "@mijn-ui/react-theme": "0.2.0",
29
+ "@mijn-ui/react-button": "0.3.0",
30
+ "@mijn-ui/react-core": "0.3.0",
32
31
  "eslint-config-custom": "0.0.1",
33
32
  "tsconfig": "0.0.0",
34
33
  "tsup-config": "0.0.0"
35
34
  },
36
35
  "dependencies": {
37
36
  "@radix-ui/react-dropdown-menu": "^2.1.3",
38
- "@mijn-ui/react-hooks": "0.0.18",
39
- "@mijn-ui/react-utilities": "0.0.9",
40
37
  "@mijn-ui/shared-icons": "0.1.0"
41
38
  },
42
39
  "peerDependencies": {
43
- "@mijn-ui/react-core": "^0.2.0",
44
- "@mijn-ui/react-theme": "^0.2.0",
40
+ "@mijn-ui/react-core": "^0.3.0",
41
+ "tailwind-merge": "^3.0.0",
42
+ "tailwind-variants": "^3.0.0",
45
43
  "react": "^19.0",
46
44
  "react-dom": "^19.0"
47
45
  },