Skip to content

Commit 40ab39a

Browse files
committed
feat: add select primitive package
1 parent 676e0c5 commit 40ab39a

9 files changed

Lines changed: 920 additions & 0 deletions

File tree

packages/select/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# @fictjs/select
2+
3+
Select primitives for Fict UI primitives, modeled after
4+
`@radix-ui/react-select`.
5+
6+
Exports `createSelectScope`, `Select`, `SelectTrigger`, `SelectValue`,
7+
`SelectIcon`, `SelectPortal`, `SelectContent`, `SelectViewport`,
8+
`SelectGroup`, `SelectLabel`, `SelectItem`, `SelectItemText`,
9+
`SelectItemIndicator`, `SelectScrollUpButton`, `SelectScrollDownButton`,
10+
`SelectSeparator`, `SelectArrow`, and the matching aliases.

packages/select/package.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"name": "@fictjs/select",
3+
"version": "0.1.0",
4+
"description": "Select primitives for Fict UI primitives.",
5+
"license": "MIT",
6+
"type": "module",
7+
"sideEffects": false,
8+
"main": "./dist/index.cjs",
9+
"module": "./dist/index.js",
10+
"types": "./dist/index.d.ts",
11+
"exports": {
12+
".": {
13+
"types": "./dist/index.d.ts",
14+
"import": "./dist/index.js",
15+
"require": "./dist/index.cjs"
16+
}
17+
},
18+
"files": [
19+
"dist",
20+
"README.md"
21+
],
22+
"engines": {
23+
"node": ">=22.13.0"
24+
},
25+
"publishConfig": {
26+
"access": "public",
27+
"provenance": true
28+
},
29+
"keywords": [
30+
"fict",
31+
"radix",
32+
"select",
33+
"ui-primitives"
34+
],
35+
"repository": {
36+
"type": "git",
37+
"url": "git+https://github.com/fictjs/ui-primitives.git",
38+
"directory": "packages/select"
39+
},
40+
"scripts": {
41+
"build": "tsup",
42+
"clean": "rimraf coverage dist",
43+
"dev": "tsup --watch",
44+
"lint": "eslint . --max-warnings=0",
45+
"lint:fix": "eslint . --fix",
46+
"test": "vitest run --config ./vitest.config.ts",
47+
"test:coverage": "vitest run --config ./vitest.config.ts --coverage",
48+
"test:watch": "vitest --config ./vitest.config.ts",
49+
"typecheck": "tsc --noEmit -p tsconfig.json"
50+
},
51+
"dependencies": {
52+
"@fictjs/context": "workspace:*",
53+
"@fictjs/core-primitive": "workspace:*",
54+
"@fictjs/id": "workspace:*",
55+
"@fictjs/menu": "workspace:*",
56+
"@fictjs/primitive": "workspace:*",
57+
"@fictjs/use-controllable-state": "workspace:*",
58+
"@fictjs/use-layout-effect": "workspace:*"
59+
},
60+
"peerDependencies": {
61+
"@fictjs/runtime": ">=0.17.0"
62+
},
63+
"devDependencies": {
64+
"@fictjs/runtime": "catalog:",
65+
"jsdom": "catalog:"
66+
}
67+
}

packages/select/src/index.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
export {
2+
createSelectScope,
3+
Select,
4+
SelectTrigger,
5+
SelectValue,
6+
SelectIcon,
7+
SelectPortal,
8+
SelectContent,
9+
SelectViewport,
10+
SelectGroup,
11+
SelectLabel,
12+
SelectItem,
13+
SelectItemText,
14+
SelectItemIndicator,
15+
SelectScrollUpButton,
16+
SelectScrollDownButton,
17+
SelectSeparator,
18+
SelectArrow,
19+
Root,
20+
Trigger,
21+
Value,
22+
Icon,
23+
Portal,
24+
Content,
25+
Viewport,
26+
Group,
27+
Label,
28+
Item,
29+
ItemText,
30+
ItemIndicator,
31+
ScrollUpButton,
32+
ScrollDownButton,
33+
Separator,
34+
Arrow,
35+
} from './select.js'
36+
37+
export type {
38+
SelectProps,
39+
SelectTriggerProps,
40+
SelectValueProps,
41+
SelectIconProps,
42+
SelectPortalProps,
43+
SelectContentProps,
44+
SelectViewportProps,
45+
SelectGroupProps,
46+
SelectLabelProps,
47+
SelectItemProps,
48+
SelectItemTextProps,
49+
SelectItemIndicatorProps,
50+
SelectScrollUpButtonProps,
51+
SelectScrollDownButtonProps,
52+
SelectSeparatorProps,
53+
SelectArrowProps,
54+
} from './select.js'

0 commit comments

Comments
 (0)