@gridui/dropdown-menu 1.2.0 → 2.0.1
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/README.md +25 -6
- package/dist/context-menu/context-menu.d.ts +2 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +24 -43
- package/dist/index.js.map +4 -4
- package/dist/styles.css +12 -69
- package/docs/catalog.json +14 -18
- package/docs/context-menu.md +12 -2
- package/docs/reference/README.md +11 -0
- package/docs/reference/context-menu.md +179 -0
- package/docs/reference/dropdown-menu-content.md +165 -0
- package/docs/reference/dropdown-menu-item.md +77 -0
- package/docs/reference/dropdown-menu-label.md +61 -0
- package/docs/reference/dropdown-menu-radio-group.md +73 -0
- package/docs/reference/dropdown-menu-radio-item.md +83 -0
- package/docs/reference/dropdown-menu-trigger.md +61 -0
- package/docs/reference/dropdown-menu.md +53 -0
- package/package.json +4 -4
- package/dist/dropdown-menu-label/style.d.ts +0 -7
- package/dist/dropdown-menu-radio-item/style.d.ts +0 -7
- package/dist/shared/style.d.ts +0 -7
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# DropdownMenu
|
|
3
|
+
|
|
4
|
+
Opens a menu of actions or choices from a trigger. Use Select for choosing a form value and Popover for arbitrary interactive content.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/dropdown-menu`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { DropdownMenu } from "@gridui/dropdown-menu";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/dropdown-menu/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/dropdown-menu/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/dropdown-menu/stories/dropdown-menu.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
|
+
|
|
18
|
+
## API
|
|
19
|
+
|
|
20
|
+
The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
|
|
21
|
+
|
|
22
|
+
### children
|
|
23
|
+
|
|
24
|
+
``ReactNode`` · Optional
|
|
25
|
+
|
|
26
|
+
Content rendered inside the component.
|
|
27
|
+
|
|
28
|
+
### dir
|
|
29
|
+
|
|
30
|
+
``("ltr" | "rtl") | undefined`` · Optional
|
|
31
|
+
|
|
32
|
+
### open
|
|
33
|
+
|
|
34
|
+
``boolean | undefined`` · Optional
|
|
35
|
+
|
|
36
|
+
Controlled visibility. Pair with onOpenChange.
|
|
37
|
+
|
|
38
|
+
### defaultOpen
|
|
39
|
+
|
|
40
|
+
``boolean | undefined`` · Optional
|
|
41
|
+
|
|
42
|
+
Initial uncontrolled visibility. Reset the story after changing it.
|
|
43
|
+
|
|
44
|
+
### onOpenChange
|
|
45
|
+
|
|
46
|
+
``(open: boolean): void`` · Optional
|
|
47
|
+
|
|
48
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
49
|
+
|
|
50
|
+
### modal
|
|
51
|
+
|
|
52
|
+
``boolean | undefined`` · Optional
|
|
53
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/dropdown-menu",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "GridUI React dropdown menu",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"react-dom": "^19.2.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@gridui/overlay": "^
|
|
31
|
-
"@gridui/style-utils": "^
|
|
30
|
+
"@gridui/overlay": "^2.0.0",
|
|
31
|
+
"@gridui/style-utils": "^4.0.0",
|
|
32
32
|
"@gridui/theme": "^2.5.3",
|
|
33
33
|
"@radix-ui/react-dropdown-menu": "2.2.1",
|
|
34
34
|
"class-variance-authority": "0.7.1",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@gridui-internal/configuration": "0.0.0-internal",
|
|
39
|
-
"@gridui/button": "
|
|
39
|
+
"@gridui/button": "4.1.0",
|
|
40
40
|
"@jest/globals": "30.5.2",
|
|
41
41
|
"@storybook/react-vite": "10.6.6",
|
|
42
42
|
"@types/jest": "30.0.0",
|