@choice-ui/react 1.8.7 → 1.8.8
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/components/button/dist/index.js +7 -0
- package/dist/components/colors/src/color-image-paint/color-image-paint.js +3 -3
- package/dist/components/dropdown/dist/index.d.ts +6 -0
- package/dist/components/dropdown/dist/index.js +12 -8
- package/dist/components/emoji-picker/dist/index.d.ts +29 -1
- package/dist/components/emoji-picker/dist/index.js +144 -42
- package/dist/components/form/src/adapters/range-adapter.js +2 -2
- package/dist/components/icon-button/dist/index.d.ts +1 -1
- package/dist/components/icon-button/dist/index.js +39 -0
- package/dist/components/menus/dist/index.d.ts +5 -0
- package/dist/components/menus/dist/index.js +18 -1
- package/dist/components/range/dist/index.d.ts +276 -20
- package/dist/components/range/dist/index.js +1030 -602
- package/dist/components/range/src/components/connects.d.ts +26 -0
- package/dist/components/range/src/components/connects.js +192 -0
- package/dist/components/range/src/components/dot.d.ts +8 -0
- package/dist/components/range/src/components/dot.js +148 -0
- package/dist/components/range/src/components/thumb.d.ts +14 -0
- package/dist/components/range/src/components/thumb.js +159 -0
- package/dist/components/range/src/context/index.d.ts +4 -0
- package/dist/components/range/src/context/range-context.d.ts +35 -0
- package/dist/components/range/src/context/range-context.js +13 -0
- package/dist/components/range/src/context/range-tuple-context.d.ts +42 -0
- package/dist/components/range/src/context/range-tuple-context.js +15 -0
- package/dist/components/range/src/index.d.ts +4 -2
- package/dist/components/range/src/range-tuple.d.ts +17 -9
- package/dist/components/range/src/range-tuple.js +375 -441
- package/dist/components/range/src/range.d.ts +17 -9
- package/dist/components/range/src/range.js +164 -154
- package/dist/components/range/src/tv.d.ts +15 -3
- package/dist/components/range/src/tv.js +10 -7
- package/dist/components/textarea/dist/index.js +3 -1
- package/dist/components/tooltip/dist/index.d.ts +2 -0
- package/dist/components/tooltip/dist/index.js +23 -5
- package/dist/components/virtual-select/dist/index.d.ts +48 -0
- package/dist/index.js +6 -0
- package/package.json +20 -32
|
@@ -0,0 +1,48 @@
|
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -225,6 +225,8 @@ import { Radio } from "./components/radio/src/radio.js";
|
|
|
225
225
|
import { RadioGroup } from "./components/radio/src/radio-group.js";
|
|
226
226
|
import { Range } from "./components/range/src/range.js";
|
|
227
227
|
import { RangeTuple } from "./components/range/src/range-tuple.js";
|
|
228
|
+
import { RangeContext, useRangeContext } from "./components/range/src/context/range-context.js";
|
|
229
|
+
import { RangeTupleContext, useRangeTupleContext } from "./components/range/src/context/range-tuple-context.js";
|
|
228
230
|
import { RichInput } from "./components/rich-input/src/rich-input-base.js";
|
|
229
231
|
import { slateToMarkdown } from "./components/rich-input/src/utils/slate-to-markdown.js";
|
|
230
232
|
import { ScrollArea } from "./components/scroll-area/src/scroll-area.js";
|
|
@@ -460,7 +462,9 @@ export {
|
|
|
460
462
|
RadioGroupAdapter,
|
|
461
463
|
Range,
|
|
462
464
|
RangeAdapter,
|
|
465
|
+
RangeContext,
|
|
463
466
|
RangeTuple,
|
|
467
|
+
RangeTupleContext,
|
|
464
468
|
RegexInput,
|
|
465
469
|
ResizeHandle,
|
|
466
470
|
RichInput,
|
|
@@ -763,6 +767,8 @@ export {
|
|
|
763
767
|
usePanelContext,
|
|
764
768
|
usePress,
|
|
765
769
|
usePressMove,
|
|
770
|
+
useRangeContext,
|
|
771
|
+
useRangeTupleContext,
|
|
766
772
|
useRenderData,
|
|
767
773
|
useScrollPerformanceMonitor,
|
|
768
774
|
useScrollStateAndVisibility,
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@choice-ui/react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.8",
|
|
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": "./
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"README.md",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
-
"types": "./
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
18
|
"import": "./dist/index.js"
|
|
19
19
|
},
|
|
20
20
|
"./styles/*": "./dist/styles/*",
|
|
@@ -22,36 +22,10 @@
|
|
|
22
22
|
"./llms.txt": "./dist/llms.txt"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
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/"
|
|
25
|
+
"access": "public"
|
|
51
26
|
},
|
|
52
27
|
"dependencies": {
|
|
53
28
|
"@choiceform/icons-react": "^1.3.8",
|
|
54
|
-
"@choice-ui/design-tokens": "workspace:*",
|
|
55
29
|
"classnames": "^2.5.1",
|
|
56
30
|
"tailwind-merge": "^3.3.1",
|
|
57
31
|
"tailwind-variants": "^3.1.0",
|
|
@@ -85,7 +59,8 @@
|
|
|
85
59
|
"remark-breaks": "^4.0.0",
|
|
86
60
|
"remark-math": "^6.0.0",
|
|
87
61
|
"harden-react-markdown": "^1.0.4",
|
|
88
|
-
"shiki": "^3.9.2"
|
|
62
|
+
"shiki": "^3.9.2",
|
|
63
|
+
"@choice-ui/design-tokens": "0.2.16"
|
|
89
64
|
},
|
|
90
65
|
"devDependencies": {
|
|
91
66
|
"@babel/core": "^7.27.1",
|
|
@@ -136,5 +111,18 @@
|
|
|
136
111
|
"peerDependencies": {
|
|
137
112
|
"react": ">=18.0.0",
|
|
138
113
|
"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/"
|
|
139
127
|
}
|
|
140
|
-
}
|
|
128
|
+
}
|