@bioturing/components 0.28.1 → 0.29.2

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.
Files changed (46) hide show
  1. package/dist/components/breadcrumb/style.css +1 -1
  2. package/dist/components/checkbox/style.css +1 -1
  3. package/dist/components/choice-list/component.js +137 -50
  4. package/dist/components/choice-list/component.js.map +1 -1
  5. package/dist/components/choice-list/style.css +1 -1
  6. package/dist/components/code-block/component.js +8 -8
  7. package/dist/components/color-select/style.css +1 -1
  8. package/dist/components/combobox/component.js +171 -141
  9. package/dist/components/combobox/component.js.map +1 -1
  10. package/dist/components/combobox/style.css +1 -1
  11. package/dist/components/drag-drop/style.css +1 -1
  12. package/dist/components/dropdown-menu/component.js +110 -100
  13. package/dist/components/dropdown-menu/component.js.map +1 -1
  14. package/dist/components/dropdown-menu/item.css +1 -1
  15. package/dist/components/dropdown-menu/item.js +52 -49
  16. package/dist/components/dropdown-menu/item.js.map +1 -1
  17. package/dist/components/dropdown-menu/style.css +1 -1
  18. package/dist/components/ds-root/component.js +22 -17
  19. package/dist/components/ds-root/component.js.map +1 -1
  20. package/dist/components/ds-root/style.css +1 -1
  21. package/dist/components/form/style.css +1 -1
  22. package/dist/components/modal/style.css +1 -1
  23. package/dist/components/nav/style.css +1 -1
  24. package/dist/components/resizable/component.js +27 -26
  25. package/dist/components/resizable/component.js.map +1 -1
  26. package/dist/components/scroll-area/component.js +70 -24
  27. package/dist/components/scroll-area/component.js.map +1 -1
  28. package/dist/components/scroll-area/style.css +1 -1
  29. package/dist/components/select-trigger/component.js +150 -0
  30. package/dist/components/select-trigger/component.js.map +1 -0
  31. package/dist/components/select-trigger/style.css +1 -0
  32. package/dist/components/switch/style.css +1 -1
  33. package/dist/components/table/style.css +1 -1
  34. package/dist/components/theme-provider/component.js.map +1 -1
  35. package/dist/components/theme-provider/style.css +1 -1
  36. package/dist/components/toast/component.js +13 -13
  37. package/dist/components/toast/component.js.map +1 -1
  38. package/dist/components/tour/style.css +1 -1
  39. package/dist/components/utils/WithRenderProp.js.map +1 -1
  40. package/dist/index.d.ts +101 -42
  41. package/dist/index.js +125 -125
  42. package/dist/tokens/and-theme/tokens.js +12 -12
  43. package/dist/tokens/and-theme/tokens.js.map +1 -1
  44. package/package.json +6 -6
  45. package/dist/components/combobox/trigger.js +0 -89
  46. package/dist/components/combobox/trigger.js.map +0 -1
@@ -1,218 +1,228 @@
1
1
  "use client";
2
- import { jsx as p, jsxs as b } from "react/jsx-runtime";
2
+ import { jsx as e, jsxs as b } from "react/jsx-runtime";
3
3
  import { useCallback as w, useRef as X, createElement as Y } from "react";
4
- import { Menu as h } from "@base-ui-components/react/menu";
4
+ import { Menu as P } from "@base-ui-components/react/menu";
5
5
  import { useControlled as Z } from "@base-ui-components/utils/useControlled";
6
6
  import { Popover as $ } from "@base-ui-components/react/popover";
7
7
  import { Command as g } from "../cmdk/index.js";
8
- import { PopupPanelSize as j } from "../popup-panel/constants.js";
9
- import { DropdownMenuItem as c } from "./item.js";
8
+ import { FormItemInputContext as O } from "antd/es/form/context";
9
+ import { PopupPanelSize as S } from "../popup-panel/constants.js";
10
+ import { DropdownMenuItem as K } from "./item.js";
10
11
  import './style.css';/* empty css */
11
- import { DropdownMenuDivider as O } from "./divider.js";
12
- import { parseAntdPlacement as K } from "../utils/placement.js";
13
- import { Input as a } from "../input/component.js";
14
- import { ScrollArea as z } from "../scroll-area/component.js";
15
- import { DROPDOWN_COLLISION_AVOIDANCE as N } from "../utils/constants.js";
16
- import { useCls as s, useAntdCssVarClassname as oo } from "../utils/antdUtils.js";
12
+ import { DropdownMenuDivider as a } from "./divider.js";
13
+ import { parseAntdPlacement as N } from "../utils/placement.js";
14
+ import { Input as s } from "../input/component.js";
15
+ import { ScrollArea as _ } from "../scroll-area/component.js";
16
+ import { DROPDOWN_COLLISION_AVOIDANCE as oo } from "../utils/constants.js";
17
+ import { useCls as ro, useAntdCssVarClassname as no } from "../utils/antdUtils.js";
17
18
  import { clsx as u } from "../utils/cn.js";
18
- const Co = ({
19
- children: B,
20
- items: S,
21
- placement: T,
22
- openOnHover: U,
23
- open: W,
19
+ const Mo = ({
20
+ children: j,
21
+ items: z,
22
+ placement: B,
23
+ openOnHover: F,
24
+ open: T,
24
25
  onOpenChange: v,
25
- className: q,
26
- itemRender: k,
26
+ className: U,
27
+ itemRender: E,
27
28
  classNames: o,
28
- size: y = "auto",
29
- showSearch: d,
30
- searchProps: E = {
29
+ size: k = "auto",
30
+ showSearch: t,
31
+ searchProps: y = {
31
32
  placeholder: "Search..."
32
33
  },
33
- popupMatchTriggerWidth: F,
34
+ popupMatchTriggerWidth: W,
34
35
  beforeList: C,
35
36
  afterList: D,
36
- keepOpenOnSelect: L,
37
+ keepOpenOnSelect: I,
37
38
  highlightedItemKey: G,
38
- selectedItemKeys: P,
39
- showCheckbox: M
39
+ selectedItemKeys: h,
40
+ showCheckbox: M,
41
+ getItemKeywords: q
40
42
  }) => {
41
- const [H, R] = Z({
42
- controlled: W,
43
+ const [H, x] = Z({
44
+ controlled: T,
43
45
  default: !1,
44
46
  name: "open"
45
47
  }), l = w(
46
48
  (r) => {
47
- R(r), v == null || v(r);
49
+ x(r), v == null || v(r);
48
50
  },
49
- [R, v]
50
- ), e = s(), V = oo(), x = K(T), J = X(null), A = S.reduce((r, n) => (r.length === 0 && n.type !== "header" && r.push({
51
+ [x, v]
52
+ ), d = ro(), L = no(), R = N(B), J = X(null), A = z.reduce((r, n) => (r.length === 0 && n.type !== "header" && r.push({
51
53
  label: null,
52
54
  items: []
53
55
  }), n.type === "header" ? r.push({
54
56
  label: n.title,
55
57
  items: []
56
58
  }) : (n.type === "item" || n.type === "divider") && r.length > 0 && r[r.length - 1].items.push(n), r), []), m = w(
57
- (r, n, t) => r.type === "item" ? /* @__PURE__ */ p(
58
- c,
59
+ (r, n, p) => r.type === "item" ? /* @__PURE__ */ e(
60
+ K,
59
61
  {
60
62
  item: r,
61
- inCombobox: d,
62
- selected: P == null ? void 0 : P.includes(r.key),
63
- onSelect: d ? () => {
63
+ inCombobox: t,
64
+ selected: h == null ? void 0 : h.includes(r.key),
65
+ onSelect: t ? () => {
64
66
  const i = new MouseEvent("click", {
65
67
  bubbles: !0,
66
68
  cancelable: !0
67
69
  });
68
- r.onClick(i), L || l == null || l(!1);
70
+ r.onClick(i), I || l == null || l(!1);
69
71
  } : void 0,
70
- itemRender: k,
71
- showCheckbox: M
72
+ itemRender: E,
73
+ showCheckbox: M,
74
+ getItemKeywords: q
72
75
  },
73
- n + "-" + t
74
- ) : r.type === "divider" ? /* @__PURE__ */ p(
75
- O,
76
+ n + "-" + p
77
+ ) : r.type === "divider" ? /* @__PURE__ */ e(
78
+ a,
76
79
  {
77
- inCombobox: d,
80
+ inCombobox: t,
78
81
  className: o == null ? void 0 : o.separator
79
82
  },
80
- n + "-" + t
83
+ n + "-" + p
81
84
  ) : null,
82
85
  [
83
86
  o,
84
- k,
87
+ E,
85
88
  l,
86
- d,
87
- L,
88
- P,
89
+ t,
90
+ I,
91
+ h,
89
92
  M
90
93
  ]
91
- ), I = w(
94
+ ), V = w(
92
95
  (r, n) => /* @__PURE__ */ b(
93
- h.Group,
96
+ P.Group,
94
97
  {
95
- className: u(e("dropdown-menu-group"), o == null ? void 0 : o.group),
98
+ className: u(d("dropdown-menu-group"), o == null ? void 0 : o.group),
96
99
  children: [
97
- r.label && /* @__PURE__ */ p(
98
- h.GroupLabel,
100
+ r.label && /* @__PURE__ */ e(
101
+ P.GroupLabel,
99
102
  {
100
103
  className: u(
101
- e("dropdown-menu-header"),
104
+ d("dropdown-menu-header"),
102
105
  o == null ? void 0 : o.groupLabel
103
106
  ),
104
- children: /* @__PURE__ */ p("span", { children: r.label })
107
+ children: /* @__PURE__ */ e("span", { children: r.label })
105
108
  }
106
109
  ),
107
- r.items.map((t, i) => m(t, n, i))
110
+ r.items.map((p, i) => m(p, n, i))
108
111
  ]
109
112
  },
110
113
  "group" + n
111
114
  ),
112
- [e, o, m]
113
- ), _ = w(
114
- (r, n) => r.label ? /* @__PURE__ */ p(
115
+ [d, o, m]
116
+ ), c = w(
117
+ (r, n) => r.label ? /* @__PURE__ */ e(
115
118
  g.Group,
116
119
  {
117
- className: u(e("dropdown-menu-group"), o == null ? void 0 : o.group),
118
- heading: /* @__PURE__ */ p(
119
- h.GroupLabel,
120
+ className: u(d("dropdown-menu-group"), o == null ? void 0 : o.group),
121
+ heading: /* @__PURE__ */ e(
122
+ P.GroupLabel,
120
123
  {
121
124
  className: u(
122
- e("dropdown-menu-header"),
125
+ d("dropdown-menu-header"),
123
126
  o == null ? void 0 : o.groupLabel
124
127
  ),
125
- children: /* @__PURE__ */ p("span", { children: r.label })
128
+ children: /* @__PURE__ */ e("span", { children: r.label })
126
129
  }
127
130
  ),
128
- children: r.items.map((t, i) => m(t, n, i))
131
+ children: r.items.map((p, i) => m(p, n, i))
129
132
  },
130
133
  "group" + n
131
- ) : r.items.map((t, i) => m(t, n, i)),
132
- [e, o, m]
134
+ ) : r.items.map((p, i) => m(p, n, i)),
135
+ [d, o, m]
133
136
  ), Q = w(
134
- () => d ? /* @__PURE__ */ b(
137
+ () => t ? /* @__PURE__ */ b(
135
138
  g,
136
139
  {
137
- className: e("dropdown-menu-container"),
138
- disablePointerSelection: d,
140
+ className: d("dropdown-menu-container"),
141
+ disablePointerSelection: t,
139
142
  defaultValue: G ? String(G) : void 0,
140
143
  children: [
141
- /* @__PURE__ */ Y(
144
+ /* @__PURE__ */ e(O.Provider, { value: {}, children: /* @__PURE__ */ Y(
142
145
  g.Input,
143
146
  {
144
- ...E,
147
+ ...y,
145
148
  key: "search",
146
- render: /* @__PURE__ */ p(a, { allowClear: !0, className: e("dropdown-menu-search") })
149
+ render: /* @__PURE__ */ e(
150
+ s,
151
+ {
152
+ allowClear: !0,
153
+ className: d("dropdown-menu-search"),
154
+ placeholder: "Search"
155
+ }
156
+ )
147
157
  }
148
- ),
158
+ ) }),
149
159
  C,
150
- /* @__PURE__ */ p(z, { children: /* @__PURE__ */ b(g.List, { className: e("dropdown-menu-list"), children: [
151
- /* @__PURE__ */ p(g.Empty, { className: e("dropdown-menu-empty"), children: "No results found." }),
152
- A.map(_)
160
+ /* @__PURE__ */ e(_, { fadeEdges: !0, children: /* @__PURE__ */ b(g.List, { className: d("dropdown-menu-list"), children: [
161
+ /* @__PURE__ */ e(g.Empty, { className: d("dropdown-menu-empty"), children: "No results found." }),
162
+ A.map(c)
153
163
  ] }) }),
154
164
  D
155
165
  ]
156
166
  }
157
- ) : /* @__PURE__ */ b("div", { className: e("dropdown-menu-container"), children: [
167
+ ) : /* @__PURE__ */ b("div", { className: d("dropdown-menu-container"), children: [
158
168
  C,
159
- /* @__PURE__ */ p(z, { children: A.map(I) }),
169
+ /* @__PURE__ */ e(_, { fadeEdges: !0, children: A.map(V) }),
160
170
  D
161
171
  ] }),
162
172
  [
173
+ t,
163
174
  d,
164
- e,
165
175
  G,
166
- E,
176
+ y,
167
177
  C,
168
178
  A,
169
- _,
179
+ c,
170
180
  D,
171
- I
181
+ V
172
182
  ]
173
- ), f = d ? $ : h;
183
+ ), f = t ? $ : P;
174
184
  return /* @__PURE__ */ b(
175
185
  f.Root,
176
186
  {
177
- openOnHover: U,
187
+ openOnHover: F,
178
188
  open: H,
179
189
  onOpenChange: l,
180
190
  children: [
181
- /* @__PURE__ */ p(
191
+ /* @__PURE__ */ e(
182
192
  f.Trigger,
183
193
  {
184
- render: B,
194
+ render: j,
185
195
  ref: J,
186
196
  className: u(
187
- e("dropdown-menu-trigger"),
197
+ d("dropdown-menu-trigger"),
188
198
  o == null ? void 0 : o.trigger,
189
- V
199
+ L
190
200
  )
191
201
  }
192
202
  ),
193
- /* @__PURE__ */ p(f.Portal, { children: /* @__PURE__ */ p(
203
+ /* @__PURE__ */ e(f.Portal, { children: /* @__PURE__ */ e(
194
204
  f.Positioner,
195
205
  {
196
- side: x.side,
197
- align: x.align,
206
+ side: R.side,
207
+ align: R.align,
198
208
  sideOffset: 4,
199
- className: u(e("dropdown-menu-root"), o == null ? void 0 : o.root),
200
- collisionAvoidance: N,
201
- children: /* @__PURE__ */ p(
209
+ className: u(d("dropdown-menu-root"), o == null ? void 0 : o.root),
210
+ collisionAvoidance: oo,
211
+ children: /* @__PURE__ */ e(
202
212
  f.Popup,
203
213
  {
204
214
  className: u(
205
- e(
215
+ d(
206
216
  "dropdown-menu",
207
217
  M && "dropdown-menu-show-checkbox",
208
- F && "dropdown-menu-match-trigger-width"
218
+ W && "dropdown-menu-match-trigger-width"
209
219
  ),
210
- q,
220
+ U,
211
221
  o == null ? void 0 : o.popup,
212
- V
222
+ L
213
223
  ),
214
224
  style: {
215
- "--size-width": y in j ? j[y] : void 0
225
+ "--size-width": k in S ? S[k] : void 0
216
226
  },
217
227
  children: Q()
218
228
  }
@@ -224,6 +234,6 @@ const Co = ({
224
234
  );
225
235
  };
226
236
  export {
227
- Co as DropdownMenu
237
+ Mo as DropdownMenu
228
238
  };
229
239
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../src/components/dropdown-menu/component.tsx"],"sourcesContent":["\"use client\";\nimport { Menu } from \"@base-ui-components/react/menu\";\nimport { useControlled } from \"@base-ui-components/utils/useControlled\";\nimport { Popover } from \"@base-ui-components/react/popover\";\nimport { type PopoverProps } from \"antd/es/popover\";\nimport { useCallback, useRef } from \"react\";\nimport {\n clsx,\n DROPDOWN_COLLISION_AVOIDANCE,\n parseAntdPlacement,\n useAntdCssVarClassname,\n useCls,\n} from \"../utils\";\nimport { Command } from \"../cmdk\";\nimport { ScrollArea } from \"../scroll-area\";\n\n// Import component-specific styles\nimport { Input } from \"../input\";\nimport { PopupPanelSize } from \"../popup-panel/constants\";\nimport { DropdownMenuItem } from \"./item\";\n\nimport \"./style.css\";\nimport { DropdownMenuDivider } from \"./divider\";\n\nexport type DropdownMenuItemType =\n | {\n /**\n * The type of the menu item\n */\n type: \"item\";\n /**\n * The label of the menu item\n */\n label?: React.ReactNode;\n /**\n * Whether the menu item is disabled\n */\n disabled?: boolean;\n /**\n * The icon of the menu item\n */\n icon?: React.ReactNode;\n /**\n * The key of the menu item\n */\n key: React.Key;\n /**\n * The onClick event handler of the menu item\n */\n onClick?: React.HTMLAttributes<HTMLElement>[\"onClick\"];\n /**\n * The onMouseEnter event handler of the menu item\n */\n onMouseEnter?: React.HTMLAttributes<HTMLElement>[\"onMouseEnter\"];\n /**\n * The onMouseLeave event handler of the menu item\n */\n onMouseLeave?: React.HTMLAttributes<HTMLElement>[\"onMouseLeave\"];\n /**\n * The onMouseOver event handler of the menu item\n */\n onMouseOver?: React.HTMLAttributes<HTMLElement>[\"onMouseOver\"];\n /**\n * The onMouseOut event handler of the menu item\n */\n onMouseOut?: React.HTMLAttributes<HTMLElement>[\"onMouseOut\"];\n /**\n * The className of the menu item\n */\n className?: string;\n /**\n * Whether the menu item is a danger item\n */\n danger?: boolean;\n /**\n * The ref of the menu item\n */\n ref?: React.Ref<HTMLElement>;\n }\n | {\n /**\n * The type of the menu item\n */\n type: \"divider\";\n }\n | {\n /**\n * The type of the menu item\n */\n type: \"header\";\n /**\n * The title of the menu item\n */\n title?: React.ReactNode;\n /**\n * The className of the menu item\n */\n className?: string;\n };\n\nexport interface DropdownMenuProps {\n /** Array of menu items to be displayed in the dropdown */\n items: DropdownMenuItemType[];\n /** Custom render function for the trigger element */\n children?: React.ComponentProps<typeof Menu.Trigger>[\"render\"];\n /**\n * Placement of the dropdown relative to the trigger element\n * @default \"bottomLeft\"\n */\n placement?: PopoverProps[\"placement\"];\n /**\n * Whether to open the dropdown on hover instead of click\n * @default false\n */\n openOnHover?: boolean;\n /**\n * Controlled open state of the dropdown\n */\n open?: boolean;\n /**\n * Callback fired when the dropdown open state changes\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Additional CSS class for the dropdown component\n */\n className?: string;\n /**\n * Custom class names for different parts of the dropdown\n * @default {}\n */\n classNames?: {\n root?: string;\n trigger?: string;\n popup?: string;\n group?: string;\n groupLabel?: string;\n item?: string;\n itemIcon?: string;\n itemText?: string;\n separator?: string;\n positioner?: string;\n };\n /**\n * Custom render function for menu items\n */\n itemRender?: (\n item: DropdownMenuItemType,\n props: React.HTMLAttributes<HTMLElement>\n ) => React.ReactElement;\n /**\n * Whether to show search input\n * @default false\n */\n showSearch?: boolean;\n /**\n * Size of the dropdown menu\n * @default \"auto\"\n */\n size?: \"auto\" | keyof typeof PopupPanelSize;\n /**\n * Search placeholder\n */\n searchProps?: Omit<\n React.ComponentProps<typeof Command.Input>,\n \"size\" | \"ref\"\n >;\n /**\n * Whether to match the width of the popup with the trigger\n * @default false\n */\n popupMatchTriggerWidth?: boolean;\n\n /**\n * Content to display before the list\n */\n beforeList?: React.ReactNode;\n /**\n * Content to display after the list\n */\n afterList?: React.ReactNode;\n /**\n * Whether to keep the dropdown open when an item is selected\n * @default false\n */\n keepOpenOnSelect?: boolean;\n /**\n * Control the highlighted state of the menu item\n */\n highlightedItemKey?: React.Key;\n /**\n * Control the selected state of the menu item\n */\n selectedItemKeys?: React.Key[];\n /**\n * Whether to show checkbox\n * @default false\n */\n showCheckbox?: boolean;\n}\n\ninterface DropdownMenuGroup {\n label: React.ReactNode | null;\n items: DropdownMenuItemType[];\n}\n\nexport const DropdownMenu = ({\n children,\n items,\n placement,\n openOnHover,\n open: outsideOpen,\n onOpenChange: outsideOnOpenChange,\n className,\n itemRender,\n classNames,\n size = \"auto\",\n showSearch,\n searchProps = {\n placeholder: \"Search...\",\n },\n popupMatchTriggerWidth,\n beforeList,\n afterList,\n keepOpenOnSelect,\n highlightedItemKey,\n selectedItemKeys,\n showCheckbox,\n}: DropdownMenuProps) => {\n const [open, setOpen] = useControlled({\n controlled: outsideOpen,\n default: false,\n name: \"open\",\n });\n const onOpenChange = useCallback(\n (newValue: boolean) => {\n setOpen(newValue);\n outsideOnOpenChange?.(newValue);\n },\n [setOpen, outsideOnOpenChange]\n );\n const cls = useCls();\n const antdCssVarClassname = useAntdCssVarClassname();\n const baseUIPlacement = parseAntdPlacement(placement);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const itemGroups = items.reduce<DropdownMenuGroup[]>((acc, current) => {\n // If no groups exist yet and current item is not a header, create default group\n if (acc.length === 0 && current.type !== \"header\") {\n acc.push({\n label: null,\n items: [],\n });\n }\n\n // If it's a header, create a new group\n if (current.type === \"header\") {\n acc.push({\n label: current.title,\n items: [],\n });\n }\n // If it's an item and we have at least one group, add it to the last group's items\n else if (\n (current.type === \"item\" || current.type === \"divider\") &&\n acc.length > 0\n ) {\n acc[acc.length - 1].items.push(current);\n }\n // Skip dividers\n return acc;\n }, []);\n\n const renderMenuItem = useCallback(\n (item: DropdownMenuItemType, i: number, j: number) => {\n if (item.type === \"item\") {\n return (\n <DropdownMenuItem\n key={i + \"-\" + j}\n item={item}\n inCombobox={showSearch}\n selected={selectedItemKeys?.includes(item.key)}\n onSelect={\n showSearch\n ? () => {\n const e = new MouseEvent(\"click\", {\n bubbles: true,\n cancelable: true,\n }) as unknown as React.MouseEvent<HTMLElement, MouseEvent>;\n item.onClick(e);\n if (!keepOpenOnSelect) onOpenChange?.(false);\n }\n : undefined\n }\n itemRender={itemRender}\n showCheckbox={showCheckbox}\n />\n );\n } else if (item.type === \"divider\") {\n return (\n <DropdownMenuDivider\n key={i + \"-\" + j}\n inCombobox={showSearch}\n className={classNames?.separator}\n />\n );\n }\n return null;\n },\n [\n classNames,\n itemRender,\n onOpenChange,\n showSearch,\n keepOpenOnSelect,\n selectedItemKeys,\n showCheckbox,\n ]\n );\n\n const renderGroup = useCallback(\n (group: DropdownMenuGroup, index: number) => (\n <Menu.Group\n key={\"group\" + index}\n className={clsx(cls(\"dropdown-menu-group\"), classNames?.group)}\n >\n {group.label && (\n <Menu.GroupLabel\n className={clsx(\n cls(\"dropdown-menu-header\"),\n classNames?.groupLabel\n )}\n >\n <span>{group.label}</span>\n </Menu.GroupLabel>\n )}\n {group.items.map((item, j) => renderMenuItem(item, index, j))}\n </Menu.Group>\n ),\n [cls, classNames, renderMenuItem]\n );\n\n const renderGroupShowSearch = useCallback(\n (group: DropdownMenuGroup, index: number) =>\n group.label ? (\n <Command.Group\n key={\"group\" + index}\n className={clsx(cls(\"dropdown-menu-group\"), classNames?.group)}\n heading={\n <Menu.GroupLabel\n className={clsx(\n cls(\"dropdown-menu-header\"),\n classNames?.groupLabel\n )}\n >\n <span>{group.label}</span>\n </Menu.GroupLabel>\n }\n >\n {group.items.map((item, j) => renderMenuItem(item, index, j))}\n </Command.Group>\n ) : (\n group.items.map((item, j) => renderMenuItem(item, index, j))\n ),\n [cls, classNames, renderMenuItem]\n );\n\n const renderMenuInner = useCallback(\n () =>\n showSearch ? (\n <Command\n className={cls(\"dropdown-menu-container\")}\n disablePointerSelection={showSearch}\n defaultValue={\n highlightedItemKey ? String(highlightedItemKey) : undefined\n }\n >\n <Command.Input\n {...searchProps}\n key=\"search\"\n render={\n <Input allowClear className={cls(\"dropdown-menu-search\")} />\n }\n />\n {beforeList}\n <ScrollArea>\n <Command.List className={cls(\"dropdown-menu-list\")}>\n <Command.Empty className={cls(\"dropdown-menu-empty\")}>\n No results found.\n </Command.Empty>\n {itemGroups.map(renderGroupShowSearch)}\n </Command.List>\n </ScrollArea>\n {afterList}\n </Command>\n ) : (\n <div className={cls(\"dropdown-menu-container\")}>\n {beforeList}\n <ScrollArea>{itemGroups.map(renderGroup)}</ScrollArea>\n {afterList}\n </div>\n ),\n [\n showSearch,\n cls,\n highlightedItemKey,\n searchProps,\n beforeList,\n itemGroups,\n renderGroupShowSearch,\n afterList,\n renderGroup,\n ]\n );\n\n const BaseComponent = showSearch ? Popover : Menu;\n\n return (\n <BaseComponent.Root\n openOnHover={openOnHover}\n open={open}\n onOpenChange={onOpenChange}\n >\n <BaseComponent.Trigger\n render={children}\n ref={buttonRef}\n className={clsx(\n cls(\"dropdown-menu-trigger\"),\n classNames?.trigger,\n antdCssVarClassname\n )}\n />\n <BaseComponent.Portal>\n <BaseComponent.Positioner\n side={baseUIPlacement.side}\n align={baseUIPlacement.align}\n sideOffset={4}\n className={clsx(cls(\"dropdown-menu-root\"), classNames?.root)}\n collisionAvoidance={DROPDOWN_COLLISION_AVOIDANCE}\n >\n <BaseComponent.Popup\n className={clsx(\n cls(\n \"dropdown-menu\",\n showCheckbox && \"dropdown-menu-show-checkbox\",\n popupMatchTriggerWidth && \"dropdown-menu-match-trigger-width\"\n ),\n className,\n classNames?.popup,\n antdCssVarClassname\n )}\n style={\n {\n \"--size-width\":\n size in PopupPanelSize ? PopupPanelSize[size] : undefined,\n } as React.CSSProperties\n }\n >\n {renderMenuInner()}\n </BaseComponent.Popup>\n </BaseComponent.Positioner>\n </BaseComponent.Portal>\n </BaseComponent.Root>\n );\n};\n"],"names":["DropdownMenu","children","items","placement","openOnHover","outsideOpen","outsideOnOpenChange","className","itemRender","classNames","size","showSearch","searchProps","popupMatchTriggerWidth","beforeList","afterList","keepOpenOnSelect","highlightedItemKey","selectedItemKeys","showCheckbox","open","setOpen","useControlled","onOpenChange","useCallback","newValue","cls","useCls","antdCssVarClassname","useAntdCssVarClassname","baseUIPlacement","parseAntdPlacement","buttonRef","useRef","itemGroups","acc","current","renderMenuItem","item","i","j","jsx","DropdownMenuItem","e","DropdownMenuDivider","renderGroup","group","index","jsxs","Menu","clsx","renderGroupShowSearch","Command","renderMenuInner","createElement","Input","ScrollArea","BaseComponent","Popover","DROPDOWN_COLLISION_AVOIDANCE","PopupPanelSize"],"mappings":";;;;;;;;;;;;;;;;;AA8MO,MAAMA,KAAe,CAAC;AAAA,EAC3B,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAMC;AAAA,EACN,cAAcC;AAAA,EACd,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,YAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,wBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC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AAAA,gBACF;AAAA,gBACA,OACE;AAAA,kBACE,gBACElB,KAAQkD,IAAiBA,EAAelD,CAAI,IAAI;AAAA,gBACpD;AAAA,gBAGD,UAAgB2C,EAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACnB;AAAA,QAAA,EAEJ,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"component.js","sources":["../../../src/components/dropdown-menu/component.tsx"],"sourcesContent":["\"use client\";\nimport { Menu } from \"@base-ui-components/react/menu\";\nimport { useControlled } from \"@base-ui-components/utils/useControlled\";\nimport { Popover } from \"@base-ui-components/react/popover\";\nimport { type PopoverProps } from \"antd/es/popover\";\nimport { useCallback, useRef } from \"react\";\nimport {\n clsx,\n DROPDOWN_COLLISION_AVOIDANCE,\n parseAntdPlacement,\n useAntdCssVarClassname,\n useCls,\n} from \"../utils\";\nimport { Command } from \"../cmdk\";\nimport { ScrollArea } from \"../scroll-area\";\nimport { FormItemInputContext } from \"antd/es/form/context\";\n\n// Import component-specific styles\nimport { Input } from \"../input\";\nimport { PopupPanelSize } from \"../popup-panel/constants\";\nimport { DropdownMenuItem } from \"./item\";\n\nimport \"./style.css\";\nimport { DropdownMenuDivider } from \"./divider\";\n\nexport type DropdownMenuItemType =\n | {\n /**\n * The type of the menu item\n */\n type: \"item\";\n /**\n * The label of the menu item\n */\n label?: React.ReactNode;\n /**\n * Whether the menu item is disabled\n */\n disabled?: boolean;\n /**\n * The icon of the menu item\n */\n icon?: React.ReactNode;\n /**\n * The key of the menu item\n */\n key: React.Key;\n /**\n * The onClick event handler of the menu item\n */\n onClick?: React.HTMLAttributes<HTMLElement>[\"onClick\"];\n /**\n * The onMouseEnter event handler of the menu item\n */\n onMouseEnter?: React.HTMLAttributes<HTMLElement>[\"onMouseEnter\"];\n /**\n * The onMouseLeave event handler of the menu item\n */\n onMouseLeave?: React.HTMLAttributes<HTMLElement>[\"onMouseLeave\"];\n /**\n * The onMouseOver event handler of the menu item\n */\n onMouseOver?: React.HTMLAttributes<HTMLElement>[\"onMouseOver\"];\n /**\n * The onMouseOut event handler of the menu item\n */\n onMouseOut?: React.HTMLAttributes<HTMLElement>[\"onMouseOut\"];\n /**\n * The className of the menu item\n */\n className?: string;\n /**\n * Whether the menu item is a danger item\n */\n danger?: boolean;\n /**\n * The ref of the menu item\n */\n ref?: React.Ref<HTMLElement>;\n }\n | {\n /**\n * The type of the menu item\n */\n type: \"divider\";\n }\n | {\n /**\n * The type of the menu item\n */\n type: \"header\";\n /**\n * The title of the menu item\n */\n title?: React.ReactNode;\n /**\n * The className of the menu item\n */\n className?: string;\n };\n\nexport interface DropdownMenuProps {\n /** Array of menu items to be displayed in the dropdown */\n items: DropdownMenuItemType[];\n /** Custom render function for the trigger element */\n children?: React.ComponentProps<typeof Menu.Trigger>[\"render\"];\n /**\n * Placement of the dropdown relative to the trigger element\n * @default \"bottomLeft\"\n */\n placement?: PopoverProps[\"placement\"];\n /**\n * Whether to open the dropdown on hover instead of click\n * @default false\n */\n openOnHover?: boolean;\n /**\n * Controlled open state of the dropdown\n */\n open?: boolean;\n /**\n * Callback fired when the dropdown open state changes\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Additional CSS class for the dropdown component\n */\n className?: string;\n /**\n * Custom class names for different parts of the dropdown\n * @default {}\n */\n classNames?: {\n root?: string;\n trigger?: string;\n popup?: string;\n group?: string;\n groupLabel?: string;\n item?: string;\n itemIcon?: string;\n itemText?: string;\n separator?: string;\n positioner?: string;\n };\n /**\n * Custom render function for menu items\n */\n itemRender?: (\n item: DropdownMenuItemType,\n props: React.HTMLAttributes<HTMLElement>\n ) => React.ReactElement;\n /**\n * Whether to show search input\n * @default false\n */\n showSearch?: boolean;\n /**\n * Size of the dropdown menu\n * @default \"auto\"\n */\n size?: \"auto\" | keyof typeof PopupPanelSize;\n /**\n * Search placeholder\n */\n searchProps?: Omit<\n React.ComponentProps<typeof Command.Input>,\n \"size\" | \"ref\"\n >;\n /**\n * Whether to match the width of the popup with the trigger\n * @default false\n */\n popupMatchTriggerWidth?: boolean;\n\n /**\n * Content to display before the list\n */\n beforeList?: React.ReactNode;\n /**\n * Content to display after the list\n */\n afterList?: React.ReactNode;\n /**\n * Whether to keep the dropdown open when an item is selected\n * @default false\n */\n keepOpenOnSelect?: boolean;\n /**\n * Control the highlighted state of the menu item\n */\n highlightedItemKey?: React.Key;\n /**\n * Control the selected state of the menu item\n */\n selectedItemKeys?: React.Key[];\n /**\n * Whether to show checkbox\n * @default false\n */\n showCheckbox?: boolean;\n /**\n * Function to extract keywords from the item for search filtering\n * @default (item) => [String(item.key), reactNodeToString(item.label)]\n */\n getItemKeywords?: (item: DropdownMenuItemType & { type: \"item\" }) => string[];\n}\n\ninterface DropdownMenuGroup {\n label: React.ReactNode | null;\n items: DropdownMenuItemType[];\n}\n\nexport const DropdownMenu = ({\n children,\n items,\n placement,\n openOnHover,\n open: outsideOpen,\n onOpenChange: outsideOnOpenChange,\n className,\n itemRender,\n classNames,\n size = \"auto\",\n showSearch,\n searchProps = {\n placeholder: \"Search...\",\n },\n popupMatchTriggerWidth,\n beforeList,\n afterList,\n keepOpenOnSelect,\n highlightedItemKey,\n selectedItemKeys,\n showCheckbox,\n getItemKeywords,\n}: DropdownMenuProps) => {\n const [open, setOpen] = useControlled({\n controlled: outsideOpen,\n default: false,\n name: \"open\",\n });\n const onOpenChange = useCallback(\n (newValue: boolean) => {\n setOpen(newValue);\n outsideOnOpenChange?.(newValue);\n },\n [setOpen, outsideOnOpenChange]\n );\n const cls = useCls();\n const antdCssVarClassname = useAntdCssVarClassname();\n const baseUIPlacement = parseAntdPlacement(placement);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const itemGroups = items.reduce<DropdownMenuGroup[]>((acc, current) => {\n // If no groups exist yet and current item is not a header, create default group\n if (acc.length === 0 && current.type !== \"header\") {\n acc.push({\n label: null,\n items: [],\n });\n }\n\n // If it's a header, create a new group\n if (current.type === \"header\") {\n acc.push({\n label: current.title,\n items: [],\n });\n }\n // If it's an item and we have at least one group, add it to the last group's items\n else if (\n (current.type === \"item\" || current.type === \"divider\") &&\n acc.length > 0\n ) {\n acc[acc.length - 1].items.push(current);\n }\n // Skip dividers\n return acc;\n }, []);\n\n const renderMenuItem = useCallback(\n (item: DropdownMenuItemType, i: number, j: number) => {\n if (item.type === \"item\") {\n return (\n <DropdownMenuItem\n key={i + \"-\" + j}\n item={item}\n inCombobox={showSearch}\n selected={selectedItemKeys?.includes(item.key)}\n onSelect={\n showSearch\n ? () => {\n const e = new MouseEvent(\"click\", {\n bubbles: true,\n cancelable: true,\n }) as unknown as React.MouseEvent<HTMLElement, MouseEvent>;\n item.onClick(e);\n if (!keepOpenOnSelect) onOpenChange?.(false);\n }\n : undefined\n }\n itemRender={itemRender}\n showCheckbox={showCheckbox}\n getItemKeywords={getItemKeywords}\n />\n );\n } else if (item.type === \"divider\") {\n return (\n <DropdownMenuDivider\n key={i + \"-\" + j}\n inCombobox={showSearch}\n className={classNames?.separator}\n />\n );\n }\n return null;\n },\n [\n classNames,\n itemRender,\n onOpenChange,\n showSearch,\n keepOpenOnSelect,\n selectedItemKeys,\n showCheckbox,\n ]\n );\n\n const renderGroup = useCallback(\n (group: DropdownMenuGroup, index: number) => (\n <Menu.Group\n key={\"group\" + index}\n className={clsx(cls(\"dropdown-menu-group\"), classNames?.group)}\n >\n {group.label && (\n <Menu.GroupLabel\n className={clsx(\n cls(\"dropdown-menu-header\"),\n classNames?.groupLabel\n )}\n >\n <span>{group.label}</span>\n </Menu.GroupLabel>\n )}\n {group.items.map((item, j) => renderMenuItem(item, index, j))}\n </Menu.Group>\n ),\n [cls, classNames, renderMenuItem]\n );\n\n const renderGroupShowSearch = useCallback(\n (group: DropdownMenuGroup, index: number) =>\n group.label ? (\n <Command.Group\n key={\"group\" + index}\n className={clsx(cls(\"dropdown-menu-group\"), classNames?.group)}\n heading={\n <Menu.GroupLabel\n className={clsx(\n cls(\"dropdown-menu-header\"),\n classNames?.groupLabel\n )}\n >\n <span>{group.label}</span>\n </Menu.GroupLabel>\n }\n >\n {group.items.map((item, j) => renderMenuItem(item, index, j))}\n </Command.Group>\n ) : (\n group.items.map((item, j) => renderMenuItem(item, index, j))\n ),\n [cls, classNames, renderMenuItem]\n );\n\n const renderMenuInner = useCallback(\n () =>\n showSearch ? (\n <Command\n className={cls(\"dropdown-menu-container\")}\n disablePointerSelection={showSearch}\n defaultValue={\n highlightedItemKey ? String(highlightedItemKey) : undefined\n }\n >\n <FormItemInputContext.Provider value={{}}>\n <Command.Input\n {...searchProps}\n key=\"search\"\n render={\n <Input\n allowClear\n className={cls(\"dropdown-menu-search\")}\n placeholder=\"Search\"\n />\n }\n />\n </FormItemInputContext.Provider>\n {beforeList}\n <ScrollArea fadeEdges>\n <Command.List className={cls(\"dropdown-menu-list\")}>\n <Command.Empty className={cls(\"dropdown-menu-empty\")}>\n No results found.\n </Command.Empty>\n {itemGroups.map(renderGroupShowSearch)}\n </Command.List>\n </ScrollArea>\n {afterList}\n </Command>\n ) : (\n <div className={cls(\"dropdown-menu-container\")}>\n {beforeList}\n <ScrollArea fadeEdges>{itemGroups.map(renderGroup)}</ScrollArea>\n {afterList}\n </div>\n ),\n [\n showSearch,\n cls,\n highlightedItemKey,\n searchProps,\n beforeList,\n itemGroups,\n renderGroupShowSearch,\n afterList,\n renderGroup,\n ]\n );\n\n const BaseComponent = showSearch ? Popover : Menu;\n\n return (\n <BaseComponent.Root\n openOnHover={openOnHover}\n open={open}\n onOpenChange={onOpenChange}\n >\n <BaseComponent.Trigger\n render={children}\n ref={buttonRef}\n className={clsx(\n cls(\"dropdown-menu-trigger\"),\n classNames?.trigger,\n antdCssVarClassname\n )}\n />\n <BaseComponent.Portal>\n <BaseComponent.Positioner\n side={baseUIPlacement.side}\n align={baseUIPlacement.align}\n sideOffset={4}\n className={clsx(cls(\"dropdown-menu-root\"), classNames?.root)}\n collisionAvoidance={DROPDOWN_COLLISION_AVOIDANCE}\n >\n <BaseComponent.Popup\n className={clsx(\n cls(\n \"dropdown-menu\",\n showCheckbox && \"dropdown-menu-show-checkbox\",\n popupMatchTriggerWidth && \"dropdown-menu-match-trigger-width\"\n ),\n className,\n classNames?.popup,\n antdCssVarClassname\n )}\n style={\n {\n \"--size-width\":\n size in PopupPanelSize ? PopupPanelSize[size] : undefined,\n } as React.CSSProperties\n }\n >\n {renderMenuInner()}\n </BaseComponent.Popup>\n </BaseComponent.Positioner>\n </BaseComponent.Portal>\n </BaseComponent.Root>\n );\n};\n"],"names":["DropdownMenu","children","items","placement","openOnHover","outsideOpen","outsideOnOpenChange","className","itemRender","classNames","size","showSearch","searchProps","popupMatchTriggerWidth","beforeList","afterList","keepOpenOnSelect","highlightedItemKey","selectedItemKeys","showCheckbox","getItemKeywords","open","setOpen","useControlled","onOpenChange","useCallback","newValue","cls","useCls","antdCssVarClassname","useAntdCssVarClassname","baseUIPlacement","parseAntdPlacement","buttonRef","useRef","itemGroups","acc","current","renderMenuItem","item","i","j","jsx","DropdownMenuItem","e","DropdownMenuDivider","renderGroup","group","index","jsxs","Menu","clsx","renderGroupShowSearch","Command","renderMenuInner","FormItemInputContext","createElement","Input","ScrollArea","BaseComponent","Popover","DROPDOWN_COLLISION_AVOIDANCE","PopupPanelSize"],"mappings":";;;;;;;;;;;;;;;;;;AAoNO,MAAMA,KAAe,CAAC;AAAA,EAC3B,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAMC;AAAA,EACN,cAAcC;AAAA,EACd,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,YAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,wBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,iBAAA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AgB;AAAA,oBAChBN,KAA0B;AAAA,kBAC5B;AAAA,kBACAN;AAAA,kBACAE,KAAA,gBAAAA,EAAY;AAAA,kBACZoB;AAAA,gBACF;AAAA,gBACA,OACE;AAAA,kBACE,gBACEnB,KAAQoD,IAAiBA,EAAepD,CAAI,IAAI;AAAA,gBACpD;AAAA,gBAGD,UAAgB4C,EAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACnB;AAAA,QAAA,EAEJ,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1 +1 @@
1
- @layer components{.ds-dropdown-menu-item{padding:.375rem .75rem;border-radius:var(--ds-border-radius-sm);cursor:pointer;display:flex;align-items:center;transition:all .3s var(--ds-motion-ease-out)}.ds-dropdown-menu-item:focus{outline:none}.ds-dropdown-menu-item:hover,.ds-dropdown-menu-item[data-active=true],.ds-dropdown-menu-item[data-selected=true],.ds-dropdown-menu-item[data-highlighted=true]{background:var(--ds-control-item-bg-hover)}.ds-dropdown-menu-item:active,.ds-dropdown-menu-item:focus,.ds-dropdown-menu-item[data-focus=true]{background:var(--ds-control-item-bg-active);font-weight:500}.ds-dropdown-menu:not(.ds-dropdown-menu-show-checkbox) .ds-dropdown-menu-item[data-actual-selected=true]{background:var(--ds-control-item-bg-active);font-weight:500}.ds-dropdown-menu-item[data-disabled=true]{pointer-events:none;color:var(--ds-color-text-disabled)}.ds-dropdown-menu-item[data-danger=true]{color:var(--ds-color-error)}.ds-dropdown-menu-item[data-danger=true]:hover{background:var(--ds-color-error-bg)}.ds-dropdown-menu-item[data-danger=true]:active,.ds-dropdown-menu-item[data-danger=true]:focus,.ds-dropdown-menu-item[data-danger=true][data-focus=true]{background:var(--ds-color-error-bg-hover)}.ds-dropdown-menu-item .ds-checkbox-wrapper{margin-right:.5rem}.ds-dropdown-menu-item .ds-dropdown-menu-item-icon{display:flex;align-items:center;justify-content:center;margin-right:.5rem;font-size:1rem;color:var(--ds-color-icon)}[data-danger=true] :is(.ds-dropdown-menu-item .ds-dropdown-menu-item-icon){color:var(--ds-color-error)}}
1
+ @layer components{.ds-dropdown-menu-item{padding:.375rem .75rem;border-radius:var(--ds-border-radius-sm);cursor:pointer;display:flex;align-items:center;transition:all .3s var(--ds-motion-ease-out)}.ds-dropdown-menu-item:focus{outline:none}.ds-dropdown-menu-item:hover,.ds-dropdown-menu-item[data-active=true],.ds-dropdown-menu-item[data-selected=true],.ds-dropdown-menu-item[data-highlighted=true]{background:var(--ds-control-item-bg-hover)}.ds-dropdown-menu-item:active,.ds-dropdown-menu-item:focus,.ds-dropdown-menu-item[data-focus=true]{background:var(--ds-control-item-bg-active);font-weight:500}.ds-dropdown-menu:not(.ds-dropdown-menu-show-checkbox) .ds-dropdown-menu-item[data-actual-selected=true]{background:var(--ds-control-item-bg-active);font-weight:500}.ds-dropdown-menu-item[data-disabled=true]{pointer-events:none;color:var(--ds-color-text-disabled)}.ds-dropdown-menu-item[data-danger=true]{color:var(--ds-color-error)}.ds-dropdown-menu-item[data-danger=true]:hover{background:var(--ds-color-error-bg)}.ds-dropdown-menu-item[data-danger=true]:active,.ds-dropdown-menu-item[data-danger=true]:focus,.ds-dropdown-menu-item[data-danger=true][data-focus=true]{background:var(--ds-color-error-bg-hover)}.ds-dropdown-menu-item .ds-checkbox-wrapper{margin-right:.5rem}.ds-dropdown-menu-item .ds-dropdown-menu-item-icon{display:flex;align-items:center;justify-content:center;margin-right:.5rem;font-size:1rem;color:var(--ds-color-icon)}[data-danger=true] .ds-dropdown-menu-item .ds-dropdown-menu-item-icon{color:var(--ds-color-error)}}
@@ -1,36 +1,38 @@
1
1
  "use client";
2
- import { jsxs as g, Fragment as k, jsx as r } from "react/jsx-runtime";
3
- import { useMemo as x } from "react";
4
- import { Command as E } from "../cmdk/index.js";
5
- import { Menu as L } from "@base-ui-components/react/menu";
2
+ import { jsxs as I, Fragment as x, jsx as r } from "react/jsx-runtime";
3
+ import { useMemo as h } from "react";
4
+ import { Command as j } from "../cmdk/index.js";
5
+ import { Menu as E } from "@base-ui-components/react/menu";
6
6
  import './item.css';/* empty css */
7
- import { Checkbox as h } from "antd";
8
- import { useCls as b } from "../utils/antdUtils.js";
9
- import { clsx as p } from "../utils/cn.js";
10
- const C = ({
7
+ import { Checkbox as w } from "antd";
8
+ import { reactNodeToString as L } from "../utils/reactToString.js";
9
+ import { useCls as D } from "../utils/antdUtils.js";
10
+ import { clsx as t } from "../utils/cn.js";
11
+ const J = ({
11
12
  item: o,
12
13
  inCombobox: u = !1,
13
- selected: i = !1,
14
- itemRender: t,
15
- itemProps: w = {},
14
+ selected: f = !1,
15
+ itemRender: p,
16
+ itemProps: y = {},
16
17
  classNames: n,
17
- onSelect: I,
18
- showCheckbox: e,
19
- indeterminate: M,
20
- renderAsNativeElement: O
18
+ onSelect: k,
19
+ showCheckbox: M,
20
+ indeterminate: e,
21
+ renderAsNativeElement: O,
22
+ getItemKeywords: g
21
23
  }) => {
22
- const d = b(), y = x(
23
- () => u ? E.Item : L.Item,
24
+ const d = D(), T = h(
25
+ () => u ? j.Item : E.Item,
24
26
  [u]
25
- ), f = x(() => ({
26
- className: p(
27
+ ), i = h(() => ({
28
+ className: t(
27
29
  d("dropdown-menu-item", u && "dropdown-menu-item-combobox"),
28
30
  n == null ? void 0 : n.item,
29
31
  o.className
30
32
  ),
31
33
  disabled: o.disabled,
32
34
  "data-danger": o.danger,
33
- "data-actual-selected": i,
35
+ "data-actual-selected": f,
34
36
  ref: o.ref,
35
37
  onClick: o.onClick,
36
38
  onMouseEnter: o.onMouseEnter,
@@ -38,20 +40,20 @@ const C = ({
38
40
  onMouseOver: o.onMouseOver,
39
41
  onMouseOut: o.onMouseOut,
40
42
  "data-value": typeof o.label == "string" ? o.label : String(o.key),
41
- render: t ? (j) => t(o, j) : void 0,
42
- children: u ? /* @__PURE__ */ g(k, { children: [
43
- e && /* @__PURE__ */ r(
44
- h,
43
+ render: p ? (b) => p(o, b) : void 0,
44
+ children: u ? /* @__PURE__ */ I(x, { children: [
45
+ M && /* @__PURE__ */ r(
46
+ w,
45
47
  {
46
- checked: i,
48
+ checked: f,
47
49
  tabIndex: -1,
48
- indeterminate: M
50
+ indeterminate: e
49
51
  }
50
52
  ),
51
53
  o.icon && /* @__PURE__ */ r(
52
54
  "span",
53
55
  {
54
- className: p(
56
+ className: t(
55
57
  d("dropdown-menu-item-icon"),
56
58
  n == null ? void 0 : n.itemIcon
57
59
  ),
@@ -61,26 +63,26 @@ const C = ({
61
63
  /* @__PURE__ */ r(
62
64
  "span",
63
65
  {
64
- className: p(
66
+ className: t(
65
67
  d("dropdown-menu-item-text"),
66
68
  n == null ? void 0 : n.itemText
67
69
  ),
68
70
  children: o.label
69
71
  }
70
72
  )
71
- ] }) : /* @__PURE__ */ g(k, { children: [
72
- e && /* @__PURE__ */ r(
73
- h,
73
+ ] }) : /* @__PURE__ */ I(x, { children: [
74
+ M && /* @__PURE__ */ r(
75
+ w,
74
76
  {
75
- checked: i,
77
+ checked: f,
76
78
  tabIndex: -1,
77
- indeterminate: M
79
+ indeterminate: e
78
80
  }
79
81
  ),
80
82
  o.icon && /* @__PURE__ */ r(
81
83
  "span",
82
84
  {
83
- className: p(
85
+ className: t(
84
86
  d("dropdown-menu-item-icon"),
85
87
  n == null ? void 0 : n.itemIcon
86
88
  ),
@@ -90,7 +92,7 @@ const C = ({
90
92
  /* @__PURE__ */ r(
91
93
  "span",
92
94
  {
93
- className: p(
95
+ className: t(
94
96
  d("dropdown-menu-item-text"),
95
97
  n == null ? void 0 : n.itemText
96
98
  ),
@@ -104,28 +106,29 @@ const C = ({
104
106
  n == null ? void 0 : n.itemText,
105
107
  d,
106
108
  u,
107
- M,
109
+ e,
108
110
  o,
109
- t,
110
- i,
111
- e
111
+ p,
112
+ f,
113
+ M
112
114
  ]);
113
- if (t)
114
- return t(o, {
115
- ...f,
116
- ...w
115
+ if (p)
116
+ return p(o, {
117
+ ...i,
118
+ ...y
117
119
  });
118
- const { render: v, ...T } = f;
119
- return O ? v ? v(f) : /* @__PURE__ */ r("div", { onClick: I, ...T }) : /* @__PURE__ */ r(
120
- y,
120
+ const { render: v, ...S } = i;
121
+ return O ? v ? v(i) : /* @__PURE__ */ r("div", { onClick: k, ...S }) : /* @__PURE__ */ r(
122
+ T,
121
123
  {
122
124
  value: String(o.key),
123
- onSelect: I,
124
- ...f
125
+ keywords: g ? g(o) : [String(o.key), L(o.label)],
126
+ onSelect: k,
127
+ ...i
125
128
  }
126
129
  );
127
130
  };
128
131
  export {
129
- C as DropdownMenuItem
132
+ J as DropdownMenuItem
130
133
  };
131
134
  //# sourceMappingURL=item.js.map