@choice-ui/react 1.5.3 → 1.5.5

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 (77) hide show
  1. package/dist/components/calendar/dist/index.js +2 -2
  2. package/dist/components/calendar/src/time-calendar/time-calendar.js +2 -2
  3. package/dist/components/code-block/dist/index.js +13 -13
  4. package/dist/components/code-block/src/code-block.js +11 -11
  5. package/dist/components/code-block/src/hooks/use-line-count.js +3 -3
  6. package/dist/components/combobox/dist/index.d.ts +2 -1
  7. package/dist/components/combobox/dist/index.js +7 -6
  8. package/dist/components/combobox/src/combobox.d.ts +2 -1
  9. package/dist/components/combobox/src/combobox.js +7 -6
  10. package/dist/components/command/src/components/command-group.js +2 -2
  11. package/dist/components/command/src/components/command-item.js +3 -3
  12. package/dist/components/command/src/hooks/index.js +2 -2
  13. package/dist/components/command/src/hooks/use-command-state.js +3 -3
  14. package/dist/components/command/src/hooks/use-command.js +2 -2
  15. package/dist/components/command/src/utils/helpers.js +4 -4
  16. package/dist/components/comments/src/comment-item/comment-item.js +2 -2
  17. package/dist/components/comments/src/comment-item/components/comment-item-reactions.js +2 -2
  18. package/dist/components/conditions/src/hooks/use-drag-and-drop.js +3 -3
  19. package/dist/components/context-input/src/components/copy-button.js +2 -2
  20. package/dist/components/context-input/src/components/mention.js +2 -2
  21. package/dist/components/context-input/src/components/slate-editor.js +3 -3
  22. package/dist/components/context-input/src/context-input.js +5 -5
  23. package/dist/components/context-menu/dist/index.d.ts +2 -1
  24. package/dist/components/context-menu/src/context-menu.d.ts +2 -1
  25. package/dist/components/context-menu/src/context-menu.js +14 -13
  26. package/dist/components/dialog/dist/index.js +2 -2
  27. package/dist/components/dialog/src/dialog.js +2 -2
  28. package/dist/components/dropdown/dist/index.d.ts +2 -1
  29. package/dist/components/dropdown/dist/index.js +8 -7
  30. package/dist/components/dropdown/src/dropdown.d.ts +2 -1
  31. package/dist/components/dropdown/src/dropdown.js +8 -7
  32. package/dist/components/index.d.ts +1 -0
  33. package/dist/components/md-input/src/components/toolbar/toolbar.js +2 -2
  34. package/dist/components/md-input/src/md-input.js +3 -3
  35. package/dist/components/menus/dist/index.d.ts +6 -1
  36. package/dist/components/menus/dist/index.js +26 -2
  37. package/dist/components/menus/src/components/index.d.ts +1 -0
  38. package/dist/components/menus/src/components/menu-empty.d.ts +4 -0
  39. package/dist/components/menus/src/components/menu-empty.js +20 -0
  40. package/dist/components/menus/src/index.d.ts +1 -1
  41. package/dist/components/menus/src/menus.js +2 -2
  42. package/dist/components/menus/src/tv.d.ts +25 -0
  43. package/dist/components/menus/src/tv.js +11 -0
  44. package/dist/components/multi-select/dist/index.d.ts +2 -1
  45. package/dist/components/multi-select/dist/index.js +15 -8
  46. package/dist/components/multi-select/src/multi-select.d.ts +2 -1
  47. package/dist/components/multi-select/src/multi-select.js +8 -4
  48. package/dist/components/multi-select/src/utils/extract-options.d.ts +16 -2
  49. package/dist/components/multi-select/src/utils/extract-options.js +8 -5
  50. package/dist/components/otp-input/dist/index.d.ts +30 -0
  51. package/dist/components/otp-input/src/index.d.ts +2 -0
  52. package/dist/components/otp-input/src/otp-input.d.ts +27 -0
  53. package/dist/components/otp-input/src/otp-input.js +115 -0
  54. package/dist/components/otp-input/src/otp-input.module.css +15 -0
  55. package/dist/components/otp-input/src/otp-input.module.css.js +8 -0
  56. package/dist/components/otp-input/src/tv.d.ts +121 -0
  57. package/dist/components/otp-input/src/tv.js +150 -0
  58. package/dist/components/otp-input/tsup.config.d.ts +2 -0
  59. package/dist/components/panel/src/components/panel-sortable.js +3 -3
  60. package/dist/components/rich-input/src/hooks/use-editor-config.js +3 -3
  61. package/dist/components/rich-input/src/utils/custom-options.js +15 -15
  62. package/dist/components/select/dist/index.d.ts +2 -1
  63. package/dist/components/select/dist/index.js +15 -8
  64. package/dist/components/select/src/select.d.ts +2 -1
  65. package/dist/components/select/src/select.js +15 -8
  66. package/dist/components/slot/dist/index.d.ts +10 -10
  67. package/dist/components/slot/dist/index.js +7 -15
  68. package/dist/components/slot/src/slot.d.ts +12 -12
  69. package/dist/components/slot/src/slot.js +10 -18
  70. package/dist/components/textarea/dist/index.js +14 -14
  71. package/dist/components/textarea/src/components/autosize/hooks.js +5 -5
  72. package/dist/components/textarea/src/components/autosize/index.js +10 -10
  73. package/dist/components/tree-list/src/tree-list.js +3 -3
  74. package/dist/components/virtualized-grid/src/error-boundary.js +2 -2
  75. package/dist/index.js +4 -0
  76. package/dist/node_modules/.pnpm/input-otp@1.4.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-otp/dist/index.js +200 -0
  77. package/package.json +1 -1
@@ -0,0 +1,115 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { OTPInput as Lt } from "../../../node_modules/.pnpm/input-otp@1.4.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-otp/dist/index.js";
3
+ import { useMemo, createContext, useContext } from "react";
4
+ import { otpInputTv } from "./tv.js";
5
+ import css from "./otp-input.module.css.js";
6
+ import { tcx } from "../../../shared/utils/tcx/tcx.js";
7
+ const OTPInputCtx = createContext({
8
+ styles: otpInputTv({}),
9
+ slotProps: [],
10
+ variant: "default",
11
+ disabled: false,
12
+ isInvalid: false
13
+ });
14
+ function OTPInputRoot({
15
+ className,
16
+ inputClassName,
17
+ variant = "default",
18
+ disabled = false,
19
+ isInvalid = false,
20
+ children,
21
+ ...props
22
+ }) {
23
+ const tv = useMemo(
24
+ () => otpInputTv({ variant, disabled, isInvalid }),
25
+ [variant, disabled, isInvalid]
26
+ );
27
+ return /* @__PURE__ */ jsx(
28
+ Lt,
29
+ {
30
+ className: tv.input({ className: inputClassName }),
31
+ containerClassName: tv.base({ className }),
32
+ spellCheck: false,
33
+ autoComplete: "off",
34
+ "data-disabled": disabled || void 0,
35
+ "data-invalid": isInvalid || void 0,
36
+ "data-slot": "otp-input",
37
+ disabled,
38
+ render: ({ slots: slotProps }) => /* @__PURE__ */ jsx(OTPInputCtx.Provider, { value: { styles: tv, slotProps, variant, disabled, isInvalid }, children }),
39
+ ...props
40
+ }
41
+ );
42
+ }
43
+ function OTPInputGroup({ className, ...props }) {
44
+ var _a;
45
+ const { styles } = useContext(OTPInputCtx);
46
+ return /* @__PURE__ */ jsx(
47
+ "div",
48
+ {
49
+ className: (_a = styles == null ? void 0 : styles.group) == null ? void 0 : _a.call(styles, { className }),
50
+ "data-slot": "otp-input-group",
51
+ ...props
52
+ }
53
+ );
54
+ }
55
+ function OTPInputSlot({ className, index, ...props }) {
56
+ var _a, _b, _c, _d;
57
+ const { styles, slotProps, variant, disabled, isInvalid } = useContext(OTPInputCtx);
58
+ const { char, hasFakeCaret, isActive } = (slotProps == null ? void 0 : slotProps[index]) ?? {};
59
+ const slotStyles = otpInputTv({
60
+ variant,
61
+ selected: isActive,
62
+ disabled,
63
+ isInvalid
64
+ });
65
+ return /* @__PURE__ */ jsxs(
66
+ "div",
67
+ {
68
+ ...props,
69
+ className: tcx((_a = styles == null ? void 0 : styles.slot) == null ? void 0 : _a.call(styles, { className }), (_b = slotStyles == null ? void 0 : slotStyles.slot) == null ? void 0 : _b.call(slotStyles)),
70
+ "data-active": isActive || void 0,
71
+ "data-disabled": disabled || void 0,
72
+ "data-filled": !!char || void 0,
73
+ "data-invalid": isInvalid || void 0,
74
+ "data-slot": "otp-input-slot",
75
+ children: [
76
+ char ? /* @__PURE__ */ jsx(
77
+ "div",
78
+ {
79
+ className: (_c = styles == null ? void 0 : styles.slotValue) == null ? void 0 : _c.call(styles),
80
+ "data-slot": "otp-input-slot-value",
81
+ children: char
82
+ }
83
+ ) : null,
84
+ hasFakeCaret && isActive ? /* @__PURE__ */ jsx(
85
+ "div",
86
+ {
87
+ className: tcx((_d = styles == null ? void 0 : styles.caret) == null ? void 0 : _d.call(styles), css.caret),
88
+ "data-slot": "otp-input-caret"
89
+ }
90
+ ) : null
91
+ ]
92
+ }
93
+ );
94
+ }
95
+ function OTPInputSeparator({ className, children, ...props }) {
96
+ var _a;
97
+ const { styles } = useContext(OTPInputCtx);
98
+ return /* @__PURE__ */ jsx(
99
+ "div",
100
+ {
101
+ className: (_a = styles == null ? void 0 : styles.separator) == null ? void 0 : _a.call(styles, { className }),
102
+ "data-slot": "otp-input-separator",
103
+ ...props,
104
+ children: children ?? /* @__PURE__ */ jsx("span", { children: "-" })
105
+ }
106
+ );
107
+ }
108
+ const OtpInput = Object.assign(OTPInputRoot, {
109
+ Group: OTPInputGroup,
110
+ Slot: OTPInputSlot,
111
+ Separator: OTPInputSeparator
112
+ });
113
+ export {
114
+ OtpInput
115
+ };
@@ -0,0 +1,15 @@
1
+ ._caret_7qdip_1 {
2
+ animation: _caret-blink_7qdip_1 1s ease-out infinite;
3
+ }
4
+
5
+ @keyframes _caret-blink_7qdip_1 {
6
+ 0%,
7
+ 70%,
8
+ 100% {
9
+ opacity: 1;
10
+ }
11
+ 20%,
12
+ 50% {
13
+ opacity: 0;
14
+ }
15
+ }
@@ -0,0 +1,8 @@
1
+ import './otp-input.module.css';const caret = "_caret_7qdip_1";
2
+ const css = {
3
+ caret
4
+ };
5
+ export {
6
+ caret,
7
+ css as default
8
+ };
@@ -0,0 +1,121 @@
1
+ export declare const otpInputTv: import('tailwind-variants').TVReturnType<{
2
+ variant: {
3
+ default: {
4
+ slot: string;
5
+ slotValue: string;
6
+ caret: string;
7
+ };
8
+ light: {
9
+ slot: string;
10
+ slotValue: string;
11
+ caret: string;
12
+ };
13
+ dark: {
14
+ slot: string;
15
+ slotValue: string;
16
+ caret: string;
17
+ };
18
+ };
19
+ selected: {
20
+ true: {};
21
+ false: {};
22
+ };
23
+ disabled: {
24
+ true: {
25
+ slot: string;
26
+ };
27
+ false: {};
28
+ };
29
+ isInvalid: {
30
+ true: {};
31
+ false: {};
32
+ };
33
+ }, {
34
+ base: string;
35
+ input: string;
36
+ group: string;
37
+ slot: string[];
38
+ slotValue: string;
39
+ caret: string;
40
+ separator: string;
41
+ }, undefined, {
42
+ variant: {
43
+ default: {
44
+ slot: string;
45
+ slotValue: string;
46
+ caret: string;
47
+ };
48
+ light: {
49
+ slot: string;
50
+ slotValue: string;
51
+ caret: string;
52
+ };
53
+ dark: {
54
+ slot: string;
55
+ slotValue: string;
56
+ caret: string;
57
+ };
58
+ };
59
+ selected: {
60
+ true: {};
61
+ false: {};
62
+ };
63
+ disabled: {
64
+ true: {
65
+ slot: string;
66
+ };
67
+ false: {};
68
+ };
69
+ isInvalid: {
70
+ true: {};
71
+ false: {};
72
+ };
73
+ }, {
74
+ base: string;
75
+ input: string;
76
+ group: string;
77
+ slot: string[];
78
+ slotValue: string;
79
+ caret: string;
80
+ separator: string;
81
+ }, import('tailwind-variants').TVReturnType<{
82
+ variant: {
83
+ default: {
84
+ slot: string;
85
+ slotValue: string;
86
+ caret: string;
87
+ };
88
+ light: {
89
+ slot: string;
90
+ slotValue: string;
91
+ caret: string;
92
+ };
93
+ dark: {
94
+ slot: string;
95
+ slotValue: string;
96
+ caret: string;
97
+ };
98
+ };
99
+ selected: {
100
+ true: {};
101
+ false: {};
102
+ };
103
+ disabled: {
104
+ true: {
105
+ slot: string;
106
+ };
107
+ false: {};
108
+ };
109
+ isInvalid: {
110
+ true: {};
111
+ false: {};
112
+ };
113
+ }, {
114
+ base: string;
115
+ input: string;
116
+ group: string;
117
+ slot: string[];
118
+ slotValue: string;
119
+ caret: string;
120
+ separator: string;
121
+ }, undefined, unknown, unknown, undefined>>;
@@ -0,0 +1,150 @@
1
+ import { tcv } from "../../../shared/utils/tcx/tcx.js";
2
+ const otpInputTv = tcv({
3
+ slots: {
4
+ base: "relative flex items-center gap-2",
5
+ input: "!absolute inset-0 w-full h-full opacity-0 cursor-text",
6
+ group: "flex items-center gap-1.5",
7
+ slot: [
8
+ "relative flex items-center justify-center",
9
+ "h-8 w-8",
10
+ "rounded-md",
11
+ "text-body-large",
12
+ "border border-solid border-transparent"
13
+ ],
14
+ slotValue: "",
15
+ caret: "absolute inset-y-2 left-1/2 w-px -translate-x-1/2",
16
+ separator: "text-secondary-foreground mx-1"
17
+ },
18
+ variants: {
19
+ variant: {
20
+ default: {
21
+ slot: "bg-secondary-background",
22
+ slotValue: "text-default-foreground",
23
+ caret: "bg-default-foreground"
24
+ },
25
+ light: {
26
+ slot: "bg-gray-100",
27
+ slotValue: "text-gray-900",
28
+ caret: "bg-gray-900"
29
+ },
30
+ dark: {
31
+ slot: "bg-gray-700",
32
+ slotValue: "text-white",
33
+ caret: "bg-white"
34
+ }
35
+ },
36
+ selected: {
37
+ true: {},
38
+ false: {}
39
+ },
40
+ disabled: {
41
+ true: {
42
+ slot: "cursor-not-allowed"
43
+ },
44
+ false: {}
45
+ },
46
+ isInvalid: {
47
+ true: {},
48
+ false: {}
49
+ }
50
+ },
51
+ compoundVariants: [
52
+ {
53
+ variant: "default",
54
+ selected: true,
55
+ disabled: false,
56
+ class: {
57
+ slot: "bg-default-background border-selected-boundary"
58
+ }
59
+ },
60
+ {
61
+ variant: "default",
62
+ selected: false,
63
+ disabled: false,
64
+ class: {
65
+ slot: "hover:border-default-boundary"
66
+ }
67
+ },
68
+ {
69
+ variant: "light",
70
+ selected: false,
71
+ disabled: false,
72
+ class: {
73
+ slot: "hover:border-gray-200"
74
+ }
75
+ },
76
+ {
77
+ variant: "dark",
78
+ selected: false,
79
+ disabled: false,
80
+ class: {
81
+ slot: "hover:border-gray-600"
82
+ }
83
+ },
84
+ {
85
+ variant: ["default", "light", "dark"],
86
+ selected: true,
87
+ disabled: false,
88
+ class: {
89
+ slot: "border-selected-boundary"
90
+ }
91
+ },
92
+ {
93
+ variant: "default",
94
+ disabled: true,
95
+ class: {
96
+ slot: "bg-secondary-background",
97
+ slotValue: "text-disabled-foreground"
98
+ }
99
+ },
100
+ {
101
+ variant: "light",
102
+ disabled: true,
103
+ class: {
104
+ slot: "bg-gray-100",
105
+ slotValue: "text-black/30"
106
+ }
107
+ },
108
+ {
109
+ variant: "dark",
110
+ disabled: true,
111
+ class: {
112
+ slot: "bg-gray-700",
113
+ slotValue: "text-white/40"
114
+ }
115
+ },
116
+ {
117
+ variant: "default",
118
+ isInvalid: true,
119
+ disabled: false,
120
+ class: {
121
+ slot: "border-danger-boundary"
122
+ }
123
+ },
124
+ {
125
+ variant: "light",
126
+ isInvalid: true,
127
+ disabled: false,
128
+ class: {
129
+ slot: "border-danger-boundary"
130
+ }
131
+ },
132
+ {
133
+ variant: "dark",
134
+ isInvalid: true,
135
+ disabled: false,
136
+ class: {
137
+ slot: "border-danger-boundary"
138
+ }
139
+ }
140
+ ],
141
+ defaultVariants: {
142
+ variant: "default",
143
+ selected: false,
144
+ disabled: false,
145
+ isInvalid: false
146
+ }
147
+ });
148
+ export {
149
+ otpInputTv
150
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('tsup').Options | import('tsup').Options[] | ((overrideOptions: import('tsup').Options) => import('tsup').Options | import('tsup').Options[] | Promise<import('tsup').Options | import('tsup').Options[]>);
2
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import React, { forwardRef, useRef, useCallback, useEffect, useMemo, memo } from "react";
2
+ import React__default, { forwardRef, useRef, useCallback, useEffect, useMemo, memo } from "react";
3
3
  import { usePanelDragDrop } from "../hooks/use-panel-drag-drop.js";
4
4
  import { SortablePaneContext, SortableRowDataContext, useSortableRowItem, useSortablePane } from "../context/sortable-context.js";
5
5
  import { tcx } from "../../../../shared/utils/tcx/tcx.js";
@@ -93,8 +93,8 @@ const PanelSortable = forwardRef(function PanelSortable2(props, ref) {
93
93
  SortableRowDataContext.Provider,
94
94
  {
95
95
  value: { item },
96
- children: /* @__PURE__ */ jsx(RowContainer, { children: React.Children.map(props.children, (child) => {
97
- if (React.isValidElement(child)) {
96
+ children: /* @__PURE__ */ jsx(RowContainer, { children: React__default.Children.map(props.children, (child) => {
97
+ if (React__default.isValidElement(child)) {
98
98
  return child;
99
99
  }
100
100
  return null;
@@ -1,4 +1,4 @@
1
- import React, { useMemo, useCallback } from "react";
1
+ import React__default, { useMemo, useCallback } from "react";
2
2
  import { createEditor } from "slate";
3
3
  import { withHistory } from "slate-history";
4
4
  import { withReact } from "slate-react";
@@ -16,10 +16,10 @@ const useEditorConfig = (props) => {
16
16
  disableTabFocus
17
17
  });
18
18
  const renderElement = useCallback((props2) => {
19
- return React.createElement(ElementRender, props2);
19
+ return React__default.createElement(ElementRender, props2);
20
20
  }, []);
21
21
  const renderLeaf = useCallback((props2) => {
22
- return React.createElement(LeafRender, props2);
22
+ return React__default.createElement(LeafRender, props2);
23
23
  }, []);
24
24
  return {
25
25
  editor,
@@ -1,63 +1,63 @@
1
1
  import { ParagraphPilcrow, ParagraphQuote, ParagraphCode, ParagraphHeading1, ParagraphHeading2, ParagraphHeading3, ParagraphListOrdered, ParagraphList, ParagraphListTodo, ParagraphBold, ParagraphItalic, ParagraphUnderline, ParagraphStrikethrough } from "@choiceform/icons-react";
2
- import React from "react";
2
+ import React__default from "react";
3
3
  const charactersOptions = [
4
4
  {
5
5
  format: "bold",
6
- icon: React.createElement(ParagraphBold)
6
+ icon: React__default.createElement(ParagraphBold)
7
7
  },
8
8
  {
9
9
  format: "italic",
10
- icon: React.createElement(ParagraphItalic)
10
+ icon: React__default.createElement(ParagraphItalic)
11
11
  },
12
12
  {
13
13
  format: "underlined",
14
- icon: React.createElement(ParagraphUnderline)
14
+ icon: React__default.createElement(ParagraphUnderline)
15
15
  },
16
16
  {
17
17
  format: "strikethrough",
18
- icon: React.createElement(ParagraphStrikethrough)
18
+ icon: React__default.createElement(ParagraphStrikethrough)
19
19
  },
20
20
  {
21
21
  format: "code",
22
- icon: React.createElement(ParagraphCode)
22
+ icon: React__default.createElement(ParagraphCode)
23
23
  }
24
24
  ];
25
25
  const paragraphOptions = [
26
26
  {
27
27
  format: "paragraph",
28
- icon: React.createElement(ParagraphPilcrow)
28
+ icon: React__default.createElement(ParagraphPilcrow)
29
29
  },
30
30
  {
31
31
  format: "block_quote",
32
- icon: React.createElement(ParagraphQuote)
32
+ icon: React__default.createElement(ParagraphQuote)
33
33
  },
34
34
  {
35
35
  format: "code",
36
- icon: React.createElement(ParagraphCode)
36
+ icon: React__default.createElement(ParagraphCode)
37
37
  },
38
38
  {
39
39
  format: "h1",
40
- icon: React.createElement(ParagraphHeading1)
40
+ icon: React__default.createElement(ParagraphHeading1)
41
41
  },
42
42
  {
43
43
  format: "h2",
44
- icon: React.createElement(ParagraphHeading2)
44
+ icon: React__default.createElement(ParagraphHeading2)
45
45
  },
46
46
  {
47
47
  format: "h3",
48
- icon: React.createElement(ParagraphHeading3)
48
+ icon: React__default.createElement(ParagraphHeading3)
49
49
  },
50
50
  {
51
51
  format: "numbered_list",
52
- icon: React.createElement(ParagraphListOrdered)
52
+ icon: React__default.createElement(ParagraphListOrdered)
53
53
  },
54
54
  {
55
55
  format: "bulleted_list",
56
- icon: React.createElement(ParagraphList)
56
+ icon: React__default.createElement(ParagraphList)
57
57
  },
58
58
  {
59
59
  format: "check_list",
60
- icon: React.createElement(ParagraphListTodo)
60
+ icon: React__default.createElement(ParagraphListTodo)
61
61
  }
62
62
  ];
63
63
  export {
@@ -1,4 +1,4 @@
1
- import { MenuContextContent, MenuDivider, MenuContextItem, MenuContextLabel, MenuTrigger, MenuValue } from '../../menus/src';
1
+ import { MenuContextContent, MenuDivider, MenuEmpty, MenuContextItem, MenuContextLabel, MenuTrigger, MenuValue } from '../../menus/src';
2
2
  import { FloatingFocusManagerProps } from '@floating-ui/react';
3
3
  import { default as React } from 'react';
4
4
  interface SelectProps {
@@ -22,6 +22,7 @@ interface SelectProps {
22
22
  interface SelectComponentType extends React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLButtonElement>> {
23
23
  Content: typeof MenuContextContent;
24
24
  Divider: typeof MenuDivider;
25
+ Empty: typeof MenuEmpty;
25
26
  Item: typeof MenuContextItem;
26
27
  Label: typeof MenuContextLabel;
27
28
  Trigger: typeof MenuTrigger;
@@ -1,7 +1,7 @@
1
1
  import { Slot } from "../../slot/dist/index.js";
2
- import { MenuValue, MenuContextContent, MenuContextLabel, MenuDivider, MenuTrigger, MenuContextItem, useMenuScroll, MenuContext, MenuScrollArrow } from "../../menus/dist/index.js";
2
+ import { MenuValue, MenuTrigger, MenuContextLabel, MenuContextItem, MenuEmpty, MenuDivider, MenuContextContent, useMenuScroll, MenuContext, MenuScrollArrow } from "../../menus/dist/index.js";
3
3
  import { useFloatingParentNodeId, FloatingTree, useFloatingNodeId, useFloating, offset, shift, flip, size, inner, autoUpdate, useClick, useDismiss, useRole, useInnerOffset, useListNavigation, useTypeahead, useInteractions, FloatingNode, FloatingPortal, FloatingOverlay, FloatingFocusManager, FloatingList } from "@floating-ui/react";
4
- import React, { memo, useMemo, Children, isValidElement, useRef, useState, useId, useEffect, cloneElement } from "react";
4
+ import React__default, { memo, useMemo, Children, isValidElement, useRef, useState, useId, useEffect, cloneElement } from "react";
5
5
  import { useEventCallback } from "usehooks-ts";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { tcx } from "../../../shared/utils/tcx/tcx.js";
@@ -45,9 +45,9 @@ var SelectComponent = memo(function SelectComponent2(props) {
45
45
  const result = [];
46
46
  children2.forEach((child) => {
47
47
  if (!isValidElement(child)) return;
48
- if (child.type === MenuContextItem || child.type === MenuDivider || child.type === MenuContextLabel) {
48
+ if (child.type === MenuContextItem || child.type === MenuDivider || child.type === MenuContextLabel || child.type === MenuEmpty) {
49
49
  result.push(child);
50
- } else if (child.type === React.Fragment && child.props.children) {
50
+ } else if (child.type === React__default.Fragment && child.props.children) {
51
51
  const fragmentChildren = Children.toArray(child.props.children);
52
52
  result.push(...extractSelectItems(fragmentChildren));
53
53
  }
@@ -67,6 +67,9 @@ var SelectComponent = memo(function SelectComponent2(props) {
67
67
  if (child.type === MenuContextLabel) {
68
68
  return { label: true, children: child.props.children };
69
69
  }
70
+ if (child.type === MenuEmpty) {
71
+ return { empty: true, children: child.props.children, element: child };
72
+ }
70
73
  const {
71
74
  value: itemValue,
72
75
  children: itemChildren,
@@ -82,7 +85,7 @@ var SelectComponent = memo(function SelectComponent2(props) {
82
85
  });
83
86
  }, [itemElements]);
84
87
  const selectableOptions = useMemo(() => {
85
- return options.filter((option) => !option.divider && !option.label);
88
+ return options.filter((option) => !option.divider && !option.label && !option.empty);
86
89
  }, [options]);
87
90
  const listRef = useRef([]);
88
91
  const listContentRef = useRef([]);
@@ -287,6 +290,9 @@ var SelectComponent = memo(function SelectComponent2(props) {
287
290
  if (option.label) {
288
291
  return /* @__PURE__ */ jsx(MenuContextLabel, { children: option.children }, `label-${index}`);
289
292
  }
293
+ if (option.empty) {
294
+ return /* @__PURE__ */ jsx(MenuEmpty, { children: option.children }, `empty-${index}`);
295
+ }
290
296
  const currentSelectableIndex = selectableIndex;
291
297
  selectableIndex++;
292
298
  const isSelected = currentSelectedIndex === currentSelectableIndex;
@@ -467,11 +473,12 @@ var BaseSelect = memo(function Select(props) {
467
473
  return /* @__PURE__ */ jsx(SelectComponent, { ...props, children });
468
474
  });
469
475
  var Select2 = Object.assign(BaseSelect, {
470
- Item: MenuContextItem,
471
- Trigger: MenuTrigger,
476
+ Content: MenuContextContent,
472
477
  Divider: MenuDivider,
478
+ Empty: MenuEmpty,
479
+ Item: MenuContextItem,
473
480
  Label: MenuContextLabel,
474
- Content: MenuContextContent,
481
+ Trigger: MenuTrigger,
475
482
  Value: MenuValue
476
483
  });
477
484
  Select2.displayName = "Select";
@@ -1,4 +1,4 @@
1
- import { MenuContextContent, MenuContextItem, MenuContextLabel, MenuDivider, MenuTrigger, MenuValue } from '../../menus/src';
1
+ import { MenuContextContent, MenuContextItem, MenuContextLabel, MenuDivider, MenuEmpty, MenuTrigger, MenuValue } from '../../menus/src';
2
2
  import { FloatingFocusManagerProps } from '@floating-ui/react';
3
3
  import { default as React } from 'react';
4
4
  export interface SelectProps {
@@ -22,6 +22,7 @@ export interface SelectProps {
22
22
  interface SelectComponentType extends React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLButtonElement>> {
23
23
  Content: typeof MenuContextContent;
24
24
  Divider: typeof MenuDivider;
25
+ Empty: typeof MenuEmpty;
25
26
  Item: typeof MenuContextItem;
26
27
  Label: typeof MenuContextLabel;
27
28
  Trigger: typeof MenuTrigger;