Skip to content

Commit 602940a

Browse files
committed
feat: add menubar primitive package
1 parent b3070e4 commit 602940a

9 files changed

Lines changed: 995 additions & 0 deletions

File tree

packages/menubar/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# @fictjs/menubar
2+
3+
Menubar primitives for Fict UI primitives, modeled after
4+
`@radix-ui/react-menubar`.
5+
6+
Exports `createMenubarScope`, `Menubar`, `MenubarMenu`, `MenubarTrigger`,
7+
`MenubarPortal`, `MenubarContent`, `MenubarGroup`, `MenubarLabel`,
8+
`MenubarItem`, `MenubarCheckboxItem`, `MenubarRadioGroup`,
9+
`MenubarRadioItem`, `MenubarItemIndicator`, `MenubarSeparator`,
10+
`MenubarArrow`, `MenubarSub`, `MenubarSubTrigger`, `MenubarSubContent`, and
11+
the matching aliases.

packages/menubar/package.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"name": "@fictjs/menubar",
3+
"version": "0.1.0",
4+
"description": "Menubar 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+
"menubar",
33+
"ui-primitives"
34+
],
35+
"repository": {
36+
"type": "git",
37+
"url": "git+https://github.com/fictjs/ui-primitives.git",
38+
"directory": "packages/menubar"
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/direction": "workspace:*",
55+
"@fictjs/id": "workspace:*",
56+
"@fictjs/menu": "workspace:*",
57+
"@fictjs/primitive": "workspace:*",
58+
"@fictjs/use-controllable-state": "workspace:*"
59+
},
60+
"peerDependencies": {
61+
"@fictjs/runtime": ">=0.17.0"
62+
},
63+
"devDependencies": {
64+
"@fictjs/runtime": "catalog:",
65+
"jsdom": "catalog:"
66+
}
67+
}

packages/menubar/src/index.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
export {
2+
createMenubarScope,
3+
Menubar,
4+
MenubarMenu,
5+
MenubarTrigger,
6+
MenubarPortal,
7+
MenubarContent,
8+
MenubarGroup,
9+
MenubarLabel,
10+
MenubarItem,
11+
MenubarCheckboxItem,
12+
MenubarRadioGroup,
13+
MenubarRadioItem,
14+
MenubarItemIndicator,
15+
MenubarSeparator,
16+
MenubarArrow,
17+
MenubarSub,
18+
MenubarSubTrigger,
19+
MenubarSubContent,
20+
Root,
21+
Menu,
22+
Trigger,
23+
Portal,
24+
Content,
25+
Group,
26+
Label,
27+
Item,
28+
CheckboxItem,
29+
RadioGroup,
30+
RadioItem,
31+
ItemIndicator,
32+
Separator,
33+
Arrow,
34+
Sub,
35+
SubTrigger,
36+
SubContent,
37+
} from './menubar.js'
38+
39+
export type {
40+
MenubarProps,
41+
MenubarMenuProps,
42+
MenubarTriggerProps,
43+
MenubarPortalProps,
44+
MenubarContentProps,
45+
MenubarGroupProps,
46+
MenubarLabelProps,
47+
MenubarItemProps,
48+
MenubarCheckboxItemProps,
49+
MenubarRadioGroupProps,
50+
MenubarRadioItemProps,
51+
MenubarItemIndicatorProps,
52+
MenubarSeparatorProps,
53+
MenubarArrowProps,
54+
MenubarSubProps,
55+
MenubarSubTriggerProps,
56+
MenubarSubContentProps,
57+
} from './menubar.js'

0 commit comments

Comments
 (0)