@gridui/grid 2.3.6 → 3.0.0
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 +3 -1
- package/dist/grid/grid.d.ts +1 -1
- package/dist/grid/style.d.ts +2 -2
- package/dist/index.js +23 -6
- package/dist/index.js.map +2 -2
- package/dist/shared/chrome.d.ts +1 -0
- package/dist/styles.css +81 -1
- package/docs/README.md +8 -387
- package/docs/catalog.json +34 -2
- package/docs/guides/dashboard-frame.md +91 -0
- package/docs/guides/grid.md +126 -0
- package/docs/guides/page-frame.md +137 -0
- package/docs/guides/split.md +49 -0
- package/docs/reference/README.md +21 -0
- package/docs/reference/container.md +63 -0
- package/docs/reference/dashboard-frame.md +99 -0
- package/docs/reference/frame-boundary.md +61 -0
- package/docs/reference/frame-footer.md +96 -0
- package/docs/reference/frame-header.md +84 -0
- package/docs/reference/frame-rail-group.md +68 -0
- package/docs/reference/frame-rail.md +61 -0
- package/docs/reference/frame-region-row.md +67 -0
- package/docs/reference/frame-region.md +67 -0
- package/docs/reference/frame-section.md +97 -0
- package/docs/reference/frame-sections.md +55 -0
- package/docs/reference/frame-texture.md +23 -0
- package/docs/reference/grid-item.md +79 -0
- package/docs/reference/grid.md +91 -0
- package/docs/reference/page-frame.md +89 -0
- package/docs/reference/row.md +93 -0
- package/docs/reference/split.md +75 -0
- package/docs/reference/stack.md +75 -0
- package/package.json +2 -2
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# Grid
|
|
3
|
+
|
|
4
|
+
Arranges content in responsive rows and columns with shared boundary rules. Use it when neighboring regions need aligned tracks and seams.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/grid`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { Grid } from "@gridui/grid";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/grid/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/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/grid/stories/grid.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 | (ReactNode & ReactElement<unknown, string | JSXElementConstructor<any>>)`` · Optional
|
|
25
|
+
|
|
26
|
+
Content rendered inside the component.
|
|
27
|
+
|
|
28
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### columns
|
|
59
|
+
|
|
60
|
+
``"auto" | Responsive<GridColumns> | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
Default: ``1``
|
|
63
|
+
|
|
64
|
+
### minItemWidth
|
|
65
|
+
|
|
66
|
+
``Responsive<string | number> | undefined`` · Optional
|
|
67
|
+
|
|
68
|
+
### frame
|
|
69
|
+
|
|
70
|
+
``"none" | "all" | "internal" | undefined`` · Optional
|
|
71
|
+
|
|
72
|
+
Default: ``"none"``
|
|
73
|
+
|
|
74
|
+
### gap
|
|
75
|
+
|
|
76
|
+
``Responsive<Space> | undefined`` · Optional
|
|
77
|
+
|
|
78
|
+
Default: ``16``
|
|
79
|
+
|
|
80
|
+
### asChild
|
|
81
|
+
|
|
82
|
+
``boolean | undefined`` · Optional
|
|
83
|
+
|
|
84
|
+
Default: ``false``
|
|
85
|
+
|
|
86
|
+
### fillLastRow
|
|
87
|
+
|
|
88
|
+
``boolean | undefined`` · Optional
|
|
89
|
+
|
|
90
|
+
Default: ``false``
|
|
91
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# PageFrame
|
|
3
|
+
|
|
4
|
+
Defines the outer frame for a page and its structural regions. Use it as the basis for layouts that share aligned content and rails.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/grid`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { PageFrame } from "@gridui/grid";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/grid/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/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/grid/stories/page-frame.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
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### rail
|
|
59
|
+
|
|
60
|
+
``ReactNode`` · Optional
|
|
61
|
+
|
|
62
|
+
### railWidth
|
|
63
|
+
|
|
64
|
+
``Responsive<Space> | undefined`` · Optional
|
|
65
|
+
|
|
66
|
+
### width
|
|
67
|
+
|
|
68
|
+
``ContainerWidth | undefined`` · Optional
|
|
69
|
+
|
|
70
|
+
Default: ``"standard"``
|
|
71
|
+
|
|
72
|
+
### header
|
|
73
|
+
|
|
74
|
+
``ReactNode`` · Optional
|
|
75
|
+
|
|
76
|
+
### footer
|
|
77
|
+
|
|
78
|
+
``ReactNode`` · Optional
|
|
79
|
+
|
|
80
|
+
### railScope
|
|
81
|
+
|
|
82
|
+
``"main" | "page" | undefined`` · Optional
|
|
83
|
+
|
|
84
|
+
Default: ``"page"``
|
|
85
|
+
|
|
86
|
+
### mainGutterStart
|
|
87
|
+
|
|
88
|
+
``Responsive<Space> | undefined`` · Optional
|
|
89
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# Row
|
|
3
|
+
|
|
4
|
+
Arranges related content horizontally with consistent alignment and spacing. Use it for compact groups of controls or information.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/grid`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { Row } from "@gridui/grid";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/grid/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/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/grid/stories/row.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
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### gap
|
|
59
|
+
|
|
60
|
+
``Space | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
Default: ``16``
|
|
63
|
+
|
|
64
|
+
### rowGap
|
|
65
|
+
|
|
66
|
+
``Space | undefined`` · Optional
|
|
67
|
+
|
|
68
|
+
Default: ``gap``
|
|
69
|
+
|
|
70
|
+
### align
|
|
71
|
+
|
|
72
|
+
``"center" | "end" | "stretch" | "baseline" | undefined`` · Optional
|
|
73
|
+
|
|
74
|
+
Default: ``"stretch"``
|
|
75
|
+
|
|
76
|
+
### justify
|
|
77
|
+
|
|
78
|
+
``"start" | "between" | undefined`` · Optional
|
|
79
|
+
|
|
80
|
+
Default: ``"start"``
|
|
81
|
+
|
|
82
|
+
### wrap
|
|
83
|
+
|
|
84
|
+
``boolean | undefined`` · Optional
|
|
85
|
+
|
|
86
|
+
Default: ``true``
|
|
87
|
+
|
|
88
|
+
### inline
|
|
89
|
+
|
|
90
|
+
``boolean | undefined`` · Optional
|
|
91
|
+
|
|
92
|
+
Default: ``false``
|
|
93
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# Split
|
|
3
|
+
|
|
4
|
+
Separates a linear sequence of regions. Use responsive direction and seams when a sidebar and content stack on narrow screens.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/grid`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { Split } from "@gridui/grid";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/grid/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/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/grid/stories/split.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
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### direction
|
|
59
|
+
|
|
60
|
+
``Responsive<SplitDirection> | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
Default: ``"row"``
|
|
63
|
+
|
|
64
|
+
### order
|
|
65
|
+
|
|
66
|
+
``"logical" | "physical" | undefined`` · Optional
|
|
67
|
+
|
|
68
|
+
Default: ``"logical"``
|
|
69
|
+
|
|
70
|
+
### seam
|
|
71
|
+
|
|
72
|
+
``Responsive<"line" | "none"> | undefined`` · Optional
|
|
73
|
+
|
|
74
|
+
Default: ``"line"``
|
|
75
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# Stack
|
|
3
|
+
|
|
4
|
+
Combines containers, rows, and stacks to arrange page content. It shows how the layout primitives work together without owning application behavior.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/grid`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { Stack } from "@gridui/grid";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/grid/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/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/grid/stories/primitives.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
|
+
### onFocus
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLDivElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLDivElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLDivElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLDivElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### gap
|
|
59
|
+
|
|
60
|
+
``Responsive<Space> | undefined`` · Optional
|
|
61
|
+
|
|
62
|
+
Default: ``16``
|
|
63
|
+
|
|
64
|
+
### width
|
|
65
|
+
|
|
66
|
+
``"full" | undefined`` · Optional
|
|
67
|
+
|
|
68
|
+
### maxWidth
|
|
69
|
+
|
|
70
|
+
``Property.MaxWidth<string | number> | undefined`` · Optional
|
|
71
|
+
|
|
72
|
+
### paddingStart
|
|
73
|
+
|
|
74
|
+
``Space | undefined`` · Optional
|
|
75
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/grid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "GridUI React grid",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@gridui/style-utils": "^
|
|
26
|
+
"@gridui/style-utils": "^4.0.0",
|
|
27
27
|
"@gridui/theme": "^2.5.3",
|
|
28
28
|
"@radix-ui/react-slot": "1.5.0",
|
|
29
29
|
"class-variance-authority": "0.7.1"
|