@choice-ui/react 1.8.9 → 1.9.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.
@@ -507,9 +507,7 @@ var TextareaTv = tcv({
507
507
  container: "bg-gray-700",
508
508
  textarea: "text-white placeholder:text-white/40"
509
509
  },
510
- reset: {
511
- container: "rounded-none border-0"
512
- }
510
+ reset: {}
513
511
  },
514
512
  resize: {
515
513
  auto: {},
@@ -10,7 +10,6 @@ interface TooltipProps {
10
10
  className?: string;
11
11
  content?: React.ReactNode;
12
12
  disabled?: boolean;
13
- interactive?: boolean;
14
13
  offset?: number;
15
14
  onOpenChange?: (open: boolean) => void;
16
15
  open?: boolean;
@@ -24,7 +23,6 @@ interface TooltipProps {
24
23
  withArrow?: boolean;
25
24
  }
26
25
  interface TooltipContentProps extends React.HTMLProps<HTMLDivElement> {
27
- interactive?: boolean;
28
26
  portalId?: string;
29
27
  variant?: "default" | "light";
30
28
  withArrow?: boolean;
@@ -128,15 +128,7 @@ var TooltipArrow = forwardRef(function TooltipArrow2({ className, variant = "def
128
128
  });
129
129
  var TooltipContent = forwardRef(
130
130
  function TooltipContent2(props, propRef) {
131
- const {
132
- className,
133
- withArrow = true,
134
- variant = "default",
135
- children,
136
- portalId,
137
- interactive = true,
138
- ...rest
139
- } = props;
131
+ const { className, withArrow = true, variant = "default", children, portalId, ...rest } = props;
140
132
  const state = useTooltipState();
141
133
  const ref = useMergeRefs([state.refs.setFloating, propRef]);
142
134
  const { isInstantPhase, currentId } = useDelayGroup(state.context, {
@@ -165,27 +157,19 @@ var TooltipContent = forwardRef(
165
157
  });
166
158
  const tv = useMemo(() => tooltipContentVariants({ variant }), [variant]);
167
159
  if (state.disabled || !isMounted) return null;
168
- const floatingProps = state.getFloatingProps(rest);
169
160
  return /* @__PURE__ */ jsx(FloatingPortal, { id: portalId, children: /* @__PURE__ */ jsx(
170
161
  "div",
171
162
  {
172
163
  ref,
173
- style: {
174
- ...state.floatingStyles,
175
- pointerEvents: interactive ? void 0 : "none"
176
- },
177
- ...floatingProps,
164
+ style: state.floatingStyles,
165
+ ...state.getFloatingProps(rest),
178
166
  className: "z-tooltip",
179
167
  children: /* @__PURE__ */ jsxs(
180
168
  "div",
181
169
  {
182
170
  className: tcx(tv.root({ className })),
183
171
  "data-state": state.open ? "open" : "closed",
184
- style: {
185
- ...styles,
186
- pointerEvents: interactive ? void 0 : "none",
187
- cursor: interactive ? void 0 : "default"
188
- },
172
+ style: styles,
189
173
  children: [
190
174
  children,
191
175
  withArrow && /* @__PURE__ */ jsx(TooltipArrow, { variant })
@@ -288,8 +272,7 @@ function TooltipRoot(props) {
288
272
  withArrow = true,
289
273
  variant = "default",
290
274
  offset: offset2 = 8,
291
- portalId = PORTAL_ROOT_ID,
292
- interactive = true
275
+ portalId = PORTAL_ROOT_ID
293
276
  } = props;
294
277
  const tooltip = useTooltip({
295
278
  placement,
@@ -308,7 +291,6 @@ function TooltipRoot(props) {
308
291
  variant,
309
292
  portalId,
310
293
  className,
311
- interactive,
312
294
  children: [
313
295
  content,
314
296
  shortcut && /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@choice-ui/react",
3
- "version": "1.8.9",
3
+ "version": "1.9.0",
4
4
  "description": "A desktop-first React UI component library built for professional desktop applications with comprehensive documentation",
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "source": "./app/index.ts",
8
8
  "main": "./dist/index.js",
9
- "types": "./dist/index.d.ts",
9
+ "types": "./app/index.ts",
10
10
  "files": [
11
11
  "dist",
12
12
  "README.md",
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "exports": {
16
16
  ".": {
17
- "types": "./dist/index.d.ts",
17
+ "types": "./app/index.ts",
18
18
  "import": "./dist/index.js"
19
19
  },
20
20
  "./styles/*": "./dist/styles/*",
@@ -22,10 +22,36 @@
22
22
  "./llms.txt": "./dist/llms.txt"
23
23
  },
24
24
  "publishConfig": {
25
- "access": "public"
25
+ "access": "public",
26
+ "types": "./dist/index.d.ts",
27
+ "main": "./dist/index.js",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.js"
32
+ },
33
+ "./styles/*": "./dist/styles/*",
34
+ "./tailwind.css": "./dist/tailwind.css",
35
+ "./llms.txt": "./dist/llms.txt"
36
+ }
37
+ },
38
+ "scripts": {
39
+ "build": "pnpm run clean && pnpm --filter @choice-ui/shared build && vite build",
40
+ "build:watch": "vite build --watch",
41
+ "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
42
+ "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
43
+ "lint:types": "tsc",
44
+ "clean": "rimraf dist",
45
+ "prepublishOnly": "pnpm run build",
46
+ "plop": "pnpm dlx plop",
47
+ "test": "jest",
48
+ "test:watch": "jest --watch",
49
+ "test:coverage": "jest --coverage",
50
+ "madge": "npx madge --circular --extensions ts app/"
26
51
  },
27
52
  "dependencies": {
28
53
  "@choiceform/icons-react": "^1.3.8",
54
+ "@choice-ui/design-tokens": "workspace:*",
29
55
  "classnames": "^2.5.1",
30
56
  "tailwind-merge": "^3.3.1",
31
57
  "tailwind-variants": "^3.1.0",
@@ -59,8 +85,7 @@
59
85
  "remark-breaks": "^4.0.0",
60
86
  "remark-math": "^6.0.0",
61
87
  "harden-react-markdown": "^1.0.4",
62
- "shiki": "^3.9.2",
63
- "@choice-ui/design-tokens": "0.2.16"
88
+ "shiki": "^3.9.2"
64
89
  },
65
90
  "devDependencies": {
66
91
  "@babel/core": "^7.27.1",
@@ -111,18 +136,5 @@
111
136
  "peerDependencies": {
112
137
  "react": ">=18.0.0",
113
138
  "react-dom": ">=18.0.0"
114
- },
115
- "scripts": {
116
- "build": "pnpm run clean && pnpm --filter @choice-ui/shared build && vite build",
117
- "build:watch": "vite build --watch",
118
- "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
119
- "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
120
- "lint:types": "tsc",
121
- "clean": "rimraf dist",
122
- "plop": "pnpm dlx plop",
123
- "test": "jest",
124
- "test:watch": "jest --watch",
125
- "test:coverage": "jest --coverage",
126
- "madge": "npx madge --circular --extensions ts app/"
127
139
  }
128
- }
140
+ }
@@ -1,48 +0,0 @@
1
- import { MenuContextContent, MenuDivider, MenuEmpty, MenuContextItem, MenuSearch, MenuTrigger, MenuValue } from '../../menus/src';
2
- import { FloatingFocusManagerProps } from '@floating-ui/react';
3
- import { default as React } from 'react';
4
- interface VirtualSelectOption<T = unknown> {
5
- value: string;
6
- label: string;
7
- disabled?: boolean;
8
- data?: T;
9
- }
10
- interface VirtualSelectProps<T = unknown> {
11
- className?: string;
12
- closeOnEscape?: boolean;
13
- disabled?: boolean;
14
- emptyText?: string;
15
- focusManagerProps?: Partial<FloatingFocusManagerProps>;
16
- matchTriggerWidth?: boolean;
17
- maxHeight?: number;
18
- onChange?: (value: string) => void;
19
- onOpenChange?: (open: boolean) => void;
20
- open?: boolean;
21
- options: VirtualSelectOption<T>[];
22
- overscan?: number;
23
- placeholder?: string;
24
- placement?: "bottom-start" | "bottom-end";
25
- portalId?: string;
26
- readOnly?: boolean;
27
- renderOption?: (option: VirtualSelectOption<T>, isSelected: boolean) => React.ReactNode;
28
- renderValue?: (option: VirtualSelectOption<T> | null) => React.ReactNode;
29
- root?: HTMLElement | null;
30
- searchPlaceholder?: string;
31
- size?: "default" | "large";
32
- value?: string | null;
33
- variant?: "default" | "light" | "reset";
34
- }
35
- interface VirtualSelectComponentType {
36
- <T = unknown>(props: VirtualSelectProps<T>): React.ReactElement | null;
37
- displayName?: string;
38
- Content: typeof MenuContextContent;
39
- Divider: typeof MenuDivider;
40
- Empty: typeof MenuEmpty;
41
- Item: typeof MenuContextItem;
42
- Search: typeof MenuSearch;
43
- Trigger: typeof MenuTrigger;
44
- Value: typeof MenuValue;
45
- }
46
- declare const VirtualSelect: VirtualSelectComponentType;
47
-
48
- export { VirtualSelect, type VirtualSelectOption, type VirtualSelectProps };