@gridui/collection 1.2.0 → 1.3.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 CHANGED
@@ -3,10 +3,20 @@
3
3
  Core family. Public API: `CollectionItem`, `CollectionItemButton`, `CollectionItemButtonProps`, `CollectionItemLink`, `CollectionItemLinkProps`, `CollectionItemProps`.
4
4
 
5
5
  Import components from `@gridui/collection` and load `@gridui/collection/styles.css` after Theme.
6
- Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
6
+ Applications own routes, labels, state persistence, and branding.
7
7
 
8
8
  See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/collection/.changeset/history).
9
9
 
10
+ ## Styles
11
+
12
+ Load Theme once. Use `@gridui/collection/styled` for automatic component CSS in
13
+ CSS-aware bundlers, or keep the CSS-free root import and load `@gridui/collection/styles.css`.
14
+ Both entries expose the same root API. The standalone stylesheet includes component
15
+ dependency styles; Theme/reset remain separate. See the
16
+ [integration guide](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/integration.md)
17
+ for static HTML loading, SSR limits, and avoiding duplicate CSS.
18
+
19
+
10
20
  ## Selected cells
11
21
 
12
22
  `CollectionItemButton` and `CollectionItemLink` accept `layout="cell"` and
package/dist/styled.js ADDED
@@ -0,0 +1,2 @@
1
+ import "./styles.local.css";
2
+ export * from "./index.js";
package/dist/styles.css CHANGED
@@ -38,7 +38,7 @@
38
38
  cursor: not-allowed;
39
39
  }
40
40
  .gridui-collection-action[data-selected="true"], .gridui-collection-action[aria-current]:not([aria-current="false"], [aria-current=""]) {
41
- background: var(--gridui-brand-tint);
41
+ background: var(--gridui-selection-background);
42
42
  }
43
43
  .gridui-collection-icon {
44
44
  display: inline-flex;
@@ -0,0 +1,103 @@
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
+ @layer theme, base, components, utilities;
3
+ @layer utilities;
4
+ @layer components {
5
+ .gridui-collection-item {
6
+ display: grid;
7
+ grid-template-columns: minmax(0, 1fr) fit-content(40%);
8
+ align-items: stretch;
9
+ gap: 0;
10
+ list-style: none;
11
+ min-width: 0;
12
+ border-bottom: 1px solid var(--gridui-border);
13
+ }
14
+ .gridui-collection-primary {
15
+ display: flex;
16
+ min-width: 0;
17
+ }
18
+ .gridui-collection-action {
19
+ box-sizing: border-box;
20
+ display: flex;
21
+ align-items: center;
22
+ gap: var(--gridui-space-12);
23
+ width: 100%;
24
+ min-width: 0;
25
+ min-height: var(--gridui-control-min-height-large);
26
+ padding: var(--gridui-space-12);
27
+ border: 0;
28
+ border-radius: var(--gridui-control-radius);
29
+ background: transparent;
30
+ color: inherit;
31
+ font: inherit;
32
+ text-align: start;
33
+ text-decoration: none;
34
+ cursor: pointer;
35
+ }
36
+ .gridui-collection-action:disabled {
37
+ opacity: .5;
38
+ cursor: not-allowed;
39
+ }
40
+ .gridui-collection-action[data-selected="true"], .gridui-collection-action[aria-current]:not([aria-current="false"], [aria-current=""]) {
41
+ background: var(--gridui-selection-background);
42
+ }
43
+ .gridui-collection-icon {
44
+ display: inline-flex;
45
+ flex: none;
46
+ }
47
+ .gridui-collection-copy {
48
+ display: flex;
49
+ flex-direction: column;
50
+ flex: 1;
51
+ min-width: 0;
52
+ overflow-wrap: anywhere;
53
+ }
54
+ .gridui-collection-title {
55
+ font-weight: 500;
56
+ }
57
+ .gridui-collection-description, .gridui-collection-metadata {
58
+ color: var(--gridui-muted);
59
+ font-size: .875em;
60
+ overflow-wrap: anywhere;
61
+ }
62
+ .gridui-collection-metadata {
63
+ max-width: 35%;
64
+ }
65
+ .gridui-collection-action[data-layout="cell"] {
66
+ align-items: flex-start;
67
+ height: 100%;
68
+ min-height: var(--gridui-control-min-height);
69
+ padding: var(--gridui-space-16) var(--gridui-space-24);
70
+ border-radius: 0;
71
+ }
72
+ .gridui-collection-action[data-layout="cell"] .gridui-collection-copy {
73
+ gap: var(--gridui-space-8);
74
+ }
75
+ .gridui-collection-action[data-layout="cell"] .gridui-collection-metadata {
76
+ max-width: none;
77
+ }
78
+ .gridui-collection-primary > .gridui-collection-action {
79
+ height: auto;
80
+ border-radius: 0;
81
+ }
82
+ .gridui-collection-actions {
83
+ display: flex;
84
+ align-items: center;
85
+ flex-wrap: wrap;
86
+ gap: var(--gridui-space-4);
87
+ min-width: 0;
88
+ }
89
+ .gridui-collection-item[data-layout="cell"] > .gridui-collection-actions {
90
+ display: grid;
91
+ grid-auto-flow: column;
92
+ grid-auto-columns: minmax(0, 1fr);
93
+ align-items: stretch;
94
+ gap: 0;
95
+ border-inline-start: 1px solid var(--gridui-border);
96
+ }
97
+ .gridui-collection-item[data-layout="cell"] > .gridui-collection-actions > * {
98
+ width: 100%;
99
+ height: auto;
100
+ min-width: 0;
101
+ border-radius: 0;
102
+ }
103
+ }
package/docs/catalog.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/collection",
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
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.",
@@ -49,6 +49,7 @@
49
49
  "@gridui/theme/styles.css",
50
50
  "@gridui/collection/styles.css"
51
51
  ],
52
+ "styledImport": "@gridui/collection/styled",
52
53
  "examples": [
53
54
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/collection/stories/collection-cells.mdx",
54
55
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/collection/stories/getting-started.mdx",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/collection",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "GridUI React collection",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -10,14 +10,19 @@
10
10
  "README.md"
11
11
  ],
12
12
  "sideEffects": [
13
- "**/*.css"
13
+ "**/*.css",
14
+ "./dist/styled.js"
14
15
  ],
15
16
  "exports": {
16
17
  ".": {
17
18
  "types": "./dist/index.d.ts",
18
19
  "import": "./dist/index.js"
19
20
  },
20
- "./styles.css": "./dist/styles.css"
21
+ "./styles.css": "./dist/styles.css",
22
+ "./styled": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/styled.js"
25
+ }
21
26
  },
22
27
  "publishConfig": {
23
28
  "access": "public"
@@ -28,19 +33,19 @@
28
33
  },
29
34
  "dependencies": {
30
35
  "@gridui/style-utils": "^4.0.0",
31
- "@gridui/theme": "^2.5.4"
36
+ "@gridui/theme": "^4.0.0"
32
37
  },
33
38
  "devDependencies": {
34
39
  "@gridui-internal/configuration": "0.0.0-internal",
35
- "@gridui/button": "5.0.0",
40
+ "@gridui/button": "5.2.0",
36
41
  "@jest/globals": "30.5.2",
37
- "@storybook/react-vite": "10.6.6",
42
+ "@storybook/react-vite": "10.6.7",
38
43
  "@types/jest": "30.0.0",
39
44
  "@types/node": "26.6.6",
40
45
  "@types/react": "19.3.0",
41
46
  "@types/react-dom": "19.3.0",
42
47
  "jest": "30.5.2",
43
- "lucide-react": "1.70.0",
48
+ "lucide-react": "1.72.0",
44
49
  "react": "19.3.1",
45
50
  "react-dom": "19.3.1",
46
51
  "typescript": "6.0.3"