@gridui/resizable 1.0.2 → 1.0.3
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 +2 -0
- package/docs/catalog.json +5 -2
- package/docs/reference/README.md +4 -0
- package/docs/reference/resizable.md +107 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -27,3 +27,5 @@ Use `size`/`onSizeChange` for controlled state, or `defaultSize` for local state
|
|
|
27
27
|
The separator has a required `label`, a range, and relationships to both regions. Use the orientation's arrow keys to resize, Shift+Arrow for ten steps, or Home/End for the bounds. Horizontal arrows and drag movement respect inherited RTL; vertical movement does not reverse. Pointer capture continues the drag outside the handle. Escape, pointer cancellation, window blur, or an orientation change requests restoration of the pre-drag size. During a drag, Escape is consumed before an enclosing dialog can dismiss; the next Escape retains the dialog's normal behavior. Touch handles use a larger target. The separator does not submit or reset form state.
|
|
28
28
|
|
|
29
29
|
See [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-layout/resizable/.changeset/history).
|
|
30
|
+
|
|
31
|
+
[Component reference](docs/reference/README.md) contains focused API pages for each public component.
|
package/docs/catalog.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/resizable",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"category": "layout",
|
|
6
6
|
"description": "GridUI React resizable",
|
|
7
7
|
"usage": "Two independently scrolling regions separated by a keyboard and pointer resizer. Resizable owns its separator; surrounding Grid regions continue to own outer seams.",
|
|
8
8
|
"documentation": [
|
|
9
|
-
"README.md"
|
|
9
|
+
"README.md",
|
|
10
|
+
"docs/reference/README.md",
|
|
11
|
+
"docs/reference/resizable.md"
|
|
10
12
|
],
|
|
11
13
|
"exports": [
|
|
12
14
|
{
|
|
@@ -26,6 +28,7 @@
|
|
|
26
28
|
"@gridui/resizable/styles.css"
|
|
27
29
|
],
|
|
28
30
|
"examples": [
|
|
31
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/resizable/stories/regions.mdx",
|
|
29
32
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/resizable/stories/resizable.stories.tsx"
|
|
30
33
|
]
|
|
31
34
|
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# Resizable
|
|
3
|
+
|
|
4
|
+
Divides content into two panels with a movable separator. Use it when users need to adjust how much space each panel receives.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/resizable`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { Resizable } from "@gridui/resizable";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/resizable/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/resizable/README.md) for shared behavior and stylesheet dependencies.
|
|
15
|
+
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/resizable/stories/resizable.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
|
+
### onFocus
|
|
23
|
+
|
|
24
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
25
|
+
|
|
26
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
27
|
+
|
|
28
|
+
### onBlur
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onSubmit
|
|
35
|
+
|
|
36
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onClick
|
|
41
|
+
|
|
42
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### first
|
|
47
|
+
|
|
48
|
+
``ReactNode`` · Required
|
|
49
|
+
|
|
50
|
+
### second
|
|
51
|
+
|
|
52
|
+
``ReactNode`` · Required
|
|
53
|
+
|
|
54
|
+
### label
|
|
55
|
+
|
|
56
|
+
``string`` · Required
|
|
57
|
+
|
|
58
|
+
### orientation
|
|
59
|
+
|
|
60
|
+
``"vertical" | "horizontal" | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
Default: ``"horizontal"``
|
|
63
|
+
|
|
64
|
+
### size
|
|
65
|
+
|
|
66
|
+
``number | undefined`` · Optional
|
|
67
|
+
|
|
68
|
+
Component size preset.
|
|
69
|
+
|
|
70
|
+
### defaultSize
|
|
71
|
+
|
|
72
|
+
``number | undefined`` · Optional
|
|
73
|
+
|
|
74
|
+
Default: ``50``
|
|
75
|
+
|
|
76
|
+
### minSize
|
|
77
|
+
|
|
78
|
+
``number | undefined`` · Optional
|
|
79
|
+
|
|
80
|
+
Default: ``10``
|
|
81
|
+
|
|
82
|
+
### maxSize
|
|
83
|
+
|
|
84
|
+
``number | undefined`` · Optional
|
|
85
|
+
|
|
86
|
+
Default: ``90``
|
|
87
|
+
|
|
88
|
+
### step
|
|
89
|
+
|
|
90
|
+
``number | undefined`` · Optional
|
|
91
|
+
|
|
92
|
+
Default: ``1``
|
|
93
|
+
|
|
94
|
+
### disabled
|
|
95
|
+
|
|
96
|
+
``boolean | undefined`` · Optional
|
|
97
|
+
|
|
98
|
+
Default: ``false``
|
|
99
|
+
|
|
100
|
+
Prevents interaction when enabled.
|
|
101
|
+
|
|
102
|
+
### onSizeChange
|
|
103
|
+
|
|
104
|
+
``(size: number): void`` · Optional
|
|
105
|
+
|
|
106
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
107
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/resizable",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "GridUI React resizable",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@gridui/interaction": "^1.2.1",
|
|
31
31
|
"@gridui/overlay": "^2.0.0",
|
|
32
|
-
"@gridui/style-utils": "^
|
|
32
|
+
"@gridui/style-utils": "^4.0.0",
|
|
33
33
|
"@gridui/theme": "^2.5.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|