@gridui/collection 1.1.5 → 1.1.6
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
CHANGED
|
@@ -30,3 +30,5 @@ Selected items and links with an active `aria-current` use a persistent neutral
|
|
|
30
30
|
surface through hover. Disabled buttons retain native disabled behavior.
|
|
31
31
|
Links keep navigation, download, target, and ref behavior and have no disabled
|
|
32
32
|
button API. Keep independent trailing actions in `CollectionItem.actions`.
|
|
33
|
+
|
|
34
|
+
[Component reference](docs/reference/README.md) contains focused API pages for each public component.
|
package/docs/catalog.json
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/collection",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.6",
|
|
5
5
|
"category": "core",
|
|
6
6
|
"description": "GridUI React collection",
|
|
7
7
|
"usage": "`CollectionItemButton` and `CollectionItemLink` accept `layout=\"cell\"` and `selected`. A cell fills its structural region, uses square corners and 16/24 spacing, and stacks title, description, and metadata with consistent row gaps. Grid or the containing list owns the surrounding seams. The default `standard` layout retains trailing metadata.",
|
|
8
8
|
"documentation": [
|
|
9
9
|
"README.md",
|
|
10
|
-
"docs/collection.md"
|
|
10
|
+
"docs/collection.md",
|
|
11
|
+
"docs/reference/README.md",
|
|
12
|
+
"docs/reference/collection-item-button.md",
|
|
13
|
+
"docs/reference/collection-item-link.md",
|
|
14
|
+
"docs/reference/collection-item.md"
|
|
11
15
|
],
|
|
12
16
|
"exports": [
|
|
13
17
|
{
|
|
@@ -46,6 +50,8 @@
|
|
|
46
50
|
"@gridui/collection/styles.css"
|
|
47
51
|
],
|
|
48
52
|
"examples": [
|
|
53
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/collection/stories/collection-cells.mdx",
|
|
54
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/collection/stories/list-actions.mdx",
|
|
49
55
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/collection/stories/collection.stories.tsx"
|
|
50
56
|
]
|
|
51
57
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# CollectionItemButton
|
|
3
|
+
|
|
4
|
+
Compose CollectionItemButton with CollectionItem inside the same @gridui/collection component family.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/collection`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { CollectionItemButton } from "@gridui/collection";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/collection/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/collection/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/collection/stories/collection.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<HTMLButtonElement, Element>): void`` · Optional
|
|
25
|
+
|
|
26
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
27
|
+
|
|
28
|
+
### onBlur
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLButtonElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onChange
|
|
35
|
+
|
|
36
|
+
``(event: ChangeEvent<HTMLButtonElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onSubmit
|
|
41
|
+
|
|
42
|
+
``(event: SubmitEvent<HTMLButtonElement>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onClick
|
|
47
|
+
|
|
48
|
+
``(event: MouseEvent<HTMLButtonElement, MouseEvent>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### type
|
|
53
|
+
|
|
54
|
+
``"button" | "submit" | "reset" | undefined`` · Optional
|
|
55
|
+
|
|
56
|
+
Default: ``"button"``
|
|
57
|
+
|
|
58
|
+
### title
|
|
59
|
+
|
|
60
|
+
``ReactNode`` · Required
|
|
61
|
+
|
|
62
|
+
### description
|
|
63
|
+
|
|
64
|
+
``ReactNode`` · Optional
|
|
65
|
+
|
|
66
|
+
### icon
|
|
67
|
+
|
|
68
|
+
``ReactNode`` · Optional
|
|
69
|
+
|
|
70
|
+
### metadata
|
|
71
|
+
|
|
72
|
+
``ReactNode`` · Optional
|
|
73
|
+
|
|
74
|
+
### layout
|
|
75
|
+
|
|
76
|
+
``"cell" | "standard" | undefined`` · Optional
|
|
77
|
+
|
|
78
|
+
Default: ``"standard"``
|
|
79
|
+
|
|
80
|
+
Layout within the containing region.
|
|
81
|
+
|
|
82
|
+
### selected
|
|
83
|
+
|
|
84
|
+
``boolean | undefined`` · Optional
|
|
85
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# CollectionItemLink
|
|
3
|
+
|
|
4
|
+
Compose CollectionItemLink with CollectionItem inside the same @gridui/collection component family.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/collection`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { CollectionItemLink } from "@gridui/collection";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/collection/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/collection/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/collection/stories/collection.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<HTMLAnchorElement, Element>): void`` · Optional
|
|
25
|
+
|
|
26
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
27
|
+
|
|
28
|
+
### onBlur
|
|
29
|
+
|
|
30
|
+
``(event: FocusEvent<HTMLAnchorElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onChange
|
|
35
|
+
|
|
36
|
+
``(event: ChangeEvent<HTMLAnchorElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onSubmit
|
|
41
|
+
|
|
42
|
+
``(event: SubmitEvent<HTMLAnchorElement>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onClick
|
|
47
|
+
|
|
48
|
+
``(event: MouseEvent<HTMLAnchorElement, MouseEvent>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### href
|
|
53
|
+
|
|
54
|
+
``string`` · Required
|
|
55
|
+
|
|
56
|
+
### title
|
|
57
|
+
|
|
58
|
+
``ReactNode`` · Required
|
|
59
|
+
|
|
60
|
+
### description
|
|
61
|
+
|
|
62
|
+
``ReactNode`` · Optional
|
|
63
|
+
|
|
64
|
+
### icon
|
|
65
|
+
|
|
66
|
+
``ReactNode`` · Optional
|
|
67
|
+
|
|
68
|
+
### metadata
|
|
69
|
+
|
|
70
|
+
``ReactNode`` · Optional
|
|
71
|
+
|
|
72
|
+
### layout
|
|
73
|
+
|
|
74
|
+
``"cell" | "standard" | undefined`` · Optional
|
|
75
|
+
|
|
76
|
+
Default: ``"standard"``
|
|
77
|
+
|
|
78
|
+
Layout within the containing region.
|
|
79
|
+
|
|
80
|
+
### selected
|
|
81
|
+
|
|
82
|
+
``boolean | undefined`` · Optional
|
|
83
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
|
|
2
|
+
# CollectionItem
|
|
3
|
+
|
|
4
|
+
Combines a primary action or link with independent trailing actions in one row. Use it for selectable records that also offer actions such as pinning or removing.
|
|
5
|
+
|
|
6
|
+
Import from ``@gridui/collection`` and load Theme before this family's stylesheet.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { CollectionItem } from "@gridui/collection";
|
|
10
|
+
import "@gridui/theme/styles.css";
|
|
11
|
+
import "@gridui/collection/styles.css";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/collection/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/collection/stories/collection.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<HTMLLIElement, Element>): void`` · Optional
|
|
31
|
+
|
|
32
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
33
|
+
|
|
34
|
+
### onBlur
|
|
35
|
+
|
|
36
|
+
``(event: FocusEvent<HTMLLIElement, Element>): void`` · Optional
|
|
37
|
+
|
|
38
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
39
|
+
|
|
40
|
+
### onChange
|
|
41
|
+
|
|
42
|
+
``(event: ChangeEvent<HTMLLIElement, Element>): void`` · Optional
|
|
43
|
+
|
|
44
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
45
|
+
|
|
46
|
+
### onSubmit
|
|
47
|
+
|
|
48
|
+
``(event: SubmitEvent<HTMLLIElement>): void`` · Optional
|
|
49
|
+
|
|
50
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
51
|
+
|
|
52
|
+
### onClick
|
|
53
|
+
|
|
54
|
+
``(event: MouseEvent<HTMLLIElement, MouseEvent>): void`` · Optional
|
|
55
|
+
|
|
56
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
57
|
+
|
|
58
|
+
### actions
|
|
59
|
+
|
|
60
|
+
``ReactNode`` · Optional
|
|
61
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/collection",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "GridUI React collection",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"react-dom": "^19.2.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@gridui/style-utils": "^
|
|
30
|
+
"@gridui/style-utils": "^4.0.0",
|
|
31
31
|
"@gridui/theme": "^2.5.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@gridui-internal/configuration": "0.0.0-internal",
|
|
35
|
-
"@gridui/button": "4.
|
|
35
|
+
"@gridui/button": "4.1.0",
|
|
36
36
|
"@jest/globals": "30.5.2",
|
|
37
37
|
"@storybook/react-vite": "10.6.6",
|
|
38
38
|
"@types/jest": "30.0.0",
|