@gridui/grid 2.3.5 → 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.
Files changed (50) hide show
  1. package/README.md +3 -1
  2. package/dist/container/container.d.ts +2 -2
  3. package/dist/container/style.d.ts +1 -1
  4. package/dist/frame-boundary/boundary-options.d.ts +12 -0
  5. package/dist/frame-boundary/frame-boundary.d.ts +2 -5
  6. package/dist/frame-footer/frame-footer.d.ts +2 -7
  7. package/dist/frame-rail-group/frame-rail-group.d.ts +4 -6
  8. package/dist/frame-region/frame-region.d.ts +3 -3
  9. package/dist/frame-region-row/frame-region-row.d.ts +3 -3
  10. package/dist/frame-section/frame-section.d.ts +2 -7
  11. package/dist/grid/grid.d.ts +1 -1
  12. package/dist/grid/style.d.ts +2 -2
  13. package/dist/grid-item/grid-item.d.ts +2 -3
  14. package/dist/index.d.ts +2 -1
  15. package/dist/index.js +54 -37
  16. package/dist/index.js.map +2 -2
  17. package/dist/page-frame/page-frame.d.ts +4 -4
  18. package/dist/page-frame/style.d.ts +1 -1
  19. package/dist/shared/chrome.d.ts +1 -0
  20. package/dist/shared/decoration.d.ts +1 -1
  21. package/dist/shared/frame-rail-options.d.ts +12 -0
  22. package/dist/shared/frame-surface-options.d.ts +13 -0
  23. package/dist/shared/types.d.ts +4 -0
  24. package/dist/styles.css +143 -63
  25. package/docs/README.md +8 -387
  26. package/docs/catalog.json +38 -3
  27. package/docs/guides/dashboard-frame.md +91 -0
  28. package/docs/guides/grid.md +126 -0
  29. package/docs/guides/page-frame.md +137 -0
  30. package/docs/guides/split.md +49 -0
  31. package/docs/reference/README.md +21 -0
  32. package/docs/reference/container.md +63 -0
  33. package/docs/reference/dashboard-frame.md +99 -0
  34. package/docs/reference/frame-boundary.md +61 -0
  35. package/docs/reference/frame-footer.md +96 -0
  36. package/docs/reference/frame-header.md +84 -0
  37. package/docs/reference/frame-rail-group.md +68 -0
  38. package/docs/reference/frame-rail.md +61 -0
  39. package/docs/reference/frame-region-row.md +67 -0
  40. package/docs/reference/frame-region.md +67 -0
  41. package/docs/reference/frame-section.md +97 -0
  42. package/docs/reference/frame-sections.md +55 -0
  43. package/docs/reference/frame-texture.md +23 -0
  44. package/docs/reference/grid-item.md +79 -0
  45. package/docs/reference/grid.md +91 -0
  46. package/docs/reference/page-frame.md +89 -0
  47. package/docs/reference/row.md +93 -0
  48. package/docs/reference/split.md +75 -0
  49. package/docs/reference/stack.md +75 -0
  50. package/package.json +2 -2
package/docs/README.md CHANGED
@@ -1,402 +1,23 @@
1
- # Grid contract
1
+ # Grid guides
2
2
 
3
- See the [shared UI index](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/README.md) for
4
- cross-package ownership, style organization, and verification.
3
+ [Public API reference](reference/README.md) lists the signatures of every exported component.
5
4
 
6
5
  ## Grid foundation
7
6
 
8
- Theme's `src/tokens.css`, loaded through `@gridui/theme/styles.css`, owns spacing, content widths, and semantic
9
- colors. Spacing values are `0 / 4 / 8 / 16 / 24 / 32 / 48 / 64`, expressed in rem
10
- except zero. The page gutter is 16 at the base breakpoint and 24 from 40rem.
11
- Sites may override tokens at their root; components do not add external margins.
12
-
13
- `@gridui/grid` exports grid primitives and page frame components;
14
- its `styles.css` is a separate explicit export. Follow the shared
15
- [stylesheet integration order](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/integration.md). Geometry
16
- uses owned component CSS alongside generated utility classes. Class composition
17
- uses clsx and tailwind-merge;
18
- container width and grid framing use typed CVA variants.
19
-
20
- - `Container` defines `full-start`, `content-start`, `content-end`, and
21
- `full-end` lines. Direct children align to content by default; a direct child
22
- with `data-width="full"` spans the whole container. Its `width` selects
23
- `narrow` (48rem), `standard` (72rem), or `wide` (90rem).
24
- - `Grid` owns columns and gap. Supported column counts are 1, 2, 3, 4, 6, and
25
- 12. A nonempty track array combines `"1fr"` and `"auto"` tracks, for example
26
- `["1fr", "1fr", "1fr", "1fr", "auto"]` for four equal fields and an
27
- automatic-width action. Counts and track arrays support the same responsive
28
- breakpoints. The default is one column with gap 16. `frame="cells"` creates shared
29
- cell boundaries, sets gap to zero, and disallows a gap prop. Its direct
30
- children must be `GridItem` components. `frame="internal"` also disallows
31
- a gap prop but draws internal seams with a 1px gap and the grid's border-color
32
- background. Its `GridItem` children have an opaque `--gridui-background` surface;
33
- consumer background styles can override it. It does not clip content or
34
- interaction outlines and needs no selectors that assume item order or spans.
35
- Hovered items paint above ordinary neighbors. Items with visible focus on
36
- themselves or a descendant paint above hovered items; retained pointer focus
37
- alone does not raise an item. This priority uses the existing local content
38
- and interaction layers, independently of selection state. Frame surfaces
39
- containing an active internal grid paint above frame boundaries. Keep rows filled, using
40
- spans where appropriate: unoccupied cells expose the grid's border-color
41
- background. Menus continue to use portals for viewport positioning.
42
- Optional `fillLastRow` expands the final item in each incomplete row, including
43
- a row preceding a full-width item. It plans spans for every breakpoint from
44
- rendered direct `GridItem` children, excluding null children. It requires
45
- direct items with valid spans; wrappers whose rendered spans are unknown are
46
- rejected. No browser measurement or business item-count calculation is needed.
47
- Explicit item style overrides still take precedence.
48
- - `Grid columns="auto"` selects adaptive, unframed tracks. Required `minItemWidth`
49
- accepts a positive number in pixels or a CSS length such as `"14rem"`, including
50
- responsive values. The template uses `auto-fit` and caps its minimum at 100%
51
- of the available space, so a narrow container never needs a wider track.
52
- Gap retains its usual responsive behavior. Fixed/adaptive planning modes cannot
53
- be mixed at breakpoints; change the adaptive minimum width instead.
54
- Adaptive columns do not support `frame="cells"`, `frame="internal"`, or
55
- `fillLastRow`: their track count is resolved by CSS, without measuring in JS.
56
- - `Grid asChild` merges its geometry, classes, styles, native props, handlers,
57
- and refs onto one prop-forwarding child through Radix Slot. Use native `ul` or
58
- `ol` roots with `GridItem asChild` and `li` children to retain list semantics.
59
- Place host-specific attributes and refs on the child. Child styles take
60
- precedence; child handlers run before Grid handlers. This does not introduce
61
- cancellation or routing behavior. `asChild` cannot be combined with
62
- `fillLastRow`, whose span planner requires direct React GridItem children.
63
- Unsupported combinations fail at the type boundary and throw for JS callers.
64
- - `GridItem asChild` applies its geometry, native props, and merged refs to its
65
- single child through Radix Slot. This supports interactive cells such as
66
- SortableItem without adding a DOM layer. Keep GridItem as the direct React
67
- child when using `fillLastRow`; the child must forward props and refs to its
68
- root element. Grid does not own or import the child's interaction behavior.
69
- - `GridItem` owns its column span and internal padding. Span defaults to 1,
70
- padding to 0. `span="full"` spans the explicitly defined columns. Numeric
71
- spans must not exceed the parent column count at any breakpoint, or CSS
72
- Grid will create implicit columns.
73
- - `Stack` owns vertical gap (default 16), without adding external margins
74
- or changing the margins of children. Consumers own text resets.
75
-
76
- Responsive props accept a scalar or `{ base, md?, lg? }`. `md` starts at
77
- 40rem and `lg` at 64rem. Missing values inherit from the preceding breakpoint.
78
- Import the shared `Space`, `Responsive<T>`, `resolveResponsive`, `spaceValue`,
79
- and `spacingVariables` from `@gridui/style-utils/responsive`. Grid exports its
80
- geometry types (`Columns`, `GridColumns`, `GridTrack`, and `Span`) and components.
81
- Columns, spans, gap, and padding are resolved through CSS, with no viewport
82
- JavaScript. Grid and GridItem render divs by default; use their `asChild` prop
83
- when retaining a semantic host. Other primitives follow their documented native
84
- hosts. Components forward native props, styles, and refs.
85
-
86
- ```tsx
87
- <Container>
88
- <div data-width="full" className="site-rule" />
89
- <Grid columns={{ base: 1, md: 4 }} frame="cells">
90
- <GridItem span={{ base: 1, md: 3 }} padding={{ base: 16, md: 24 }}>
91
- <Stack gap={16}>...</Stack>
92
- </GridItem>
93
- <GridItem padding={16}>...</GridItem>
94
- </Grid>
95
- </Container>
96
- ```
97
-
98
-
99
- ### Adaptive native lists
100
-
101
- ```tsx
102
- <Grid asChild columns="auto" minItemWidth="14rem" gap={16}>
103
- <ul aria-label="Resources" className="m-0 list-none p-0">
104
- {resources.map((resource) => (
105
- <GridItem key={resource.href} asChild padding={16}>
106
- <li><a href={resource.href}>{resource.label}</a></li>
107
- </GridItem>
108
- ))}
109
- </ul>
110
- </Grid>
111
- ```
112
-
113
- The server output already contains the native list and CSS track plan. No
114
- hydration or viewport measurement is needed. `auto-fit` collapses unused tracks;
115
- this is distinct from filling the last row of a fixed-column plan. Adaptive
116
- items normally use the default span of one. Explicit numeric spans must fit the
117
- number of tracks available in their container or CSS can create implicit tracks.
118
- The application owns list markers/margins, labels, links, and data.
7
+ Read [Grid and responsive tracks](guides/grid.md).
119
8
 
120
9
  ## Linear regions
121
10
 
122
- Import `Split`, `SplitProps`, and `SplitDirection` from `@gridui/grid`.
123
- Split renders one div and lays out its direct children as a single flex sequence.
124
- It does not wrap the sequence or add wrappers around individual children.
125
- Use direct child region elements such as `section`, `nav`, or `div`; place
126
- buttons, inputs, tables, and other components with functional borders inside
127
- those regions. Split owns region edge styles and must not be applied directly
128
- to those components' bordered roots.
129
-
130
- | Prop | Values | Default |
131
- | --- | --- | --- |
132
- | `direction` | `row`, `column`, `row-reverse`, `column-reverse`, or responsive values | `row` |
133
- | `seam` | `line`, `none`, or responsive values | `line` |
134
-
135
- Both use `{ base, md?, lg? }` with 40rem and 64rem breakpoints and preceding-value
136
- fallback. A line is one logical edge between visible sibling regions, without
137
- an outer frame. Reversed directions move the seam to the corresponding edge;
138
- they change visual order, not DOM, reading, or keyboard order. Regions with the
139
- native `hidden` attribute do not contribute seams. CSS-only responsive hiding
140
- is not detectable by sibling selectors: when only one region remains visible,
141
- set the owning Split to `seam={{ base: "none", lg: "line" }}` (using the same
142
- breakpoint as visibility). Keep the DOM order meaningful.
143
-
144
- ```tsx
145
- import { Split } from "@gridui/grid";
146
-
147
- <Split
148
- direction={{ base: "column", md: "row" }}
149
- seam={{ base: "none", md: "line" }}
150
- >
151
- <section aria-label="Overview">...</section>
152
- <section aria-label="Details">...</section>
153
- </Split>
154
- ```
155
-
156
- Children control their content size and flex sizing; Split does not assign equal
157
- widths. Use Grid/GridItem for two-dimensional tracks or wrapping rows. A parent
158
- frame supplies outer edges. Layout compositions choose these primitives instead
159
- of drawing duplicate seams.
11
+ Read [Split and linear regions](guides/split.md).
160
12
 
161
13
  ## Page frames
162
14
 
163
- Named areas such as `filters`, `results`, or `methodology` belong in site CSS,
164
- where their responsive order can be defined. The shared package owns geometry
165
- and never imports or names business regions. The page shell is shared rather
166
- than implemented in website CSS:
167
-
168
- - `PageFrame` takes optional `header` and `footer` slots, a content width, and any number
169
- of sections as children. It renders one main landmark and a flexible framed
170
- filler inside main before the footer. Main fills the remaining page height.
171
- Short pages fill at least 100svh without stretching
172
- content sections. On longer pages the filler shrinks to zero.
173
- - `FrameHeader` and `FrameFooter` render native landmarks with a full-width
174
- boundary and an aligned inner region. Their padding defaults to 16 at base
175
- and 24 at md/lg; `padding` accepts the same responsive values as GridItem.
176
- Chrome children wrap instead of overflowing narrow screens. `FrameHeader`
177
- defaults to `justify="between"`; use `justify="start"` for an adjacent brand
178
- and navigation row. `FrameFooter` defaults to `contentLayout="flex"`; use
179
- `contentLayout="block"` when its children own their internal layout.
180
- Its `signatureAppearance="cropped"` selects the cropped signature treatment
181
- through a public prop; the default is `standard`.
182
- - `FrameSection` renders a semantic section, full-width leading boundary, and
183
- aligned vertical edges. Compose it with `Grid frame="internal"` so the
184
- section owns the outer borders and the grid owns internal seams.
185
- `paddingInline` and `paddingBlock` accept responsive spacing tokens and default
186
- to zero. They pad the inner content surface without moving its leading boundary
187
- or inline edges. Use these props instead of targeting private frame elements.
188
- - `FrameSections` groups sections from a dynamic React view and forwards native
189
- div props. It inherits page tracks without adding a landmark. The shared
190
- stylesheet supports React section groups. Framework host elements require an
191
- application-owned adapter; see the [Astro migration example](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/framework-adapters.md).
192
-
193
- Keep inline-size containment, including `container-type: inline-size`, off roots
194
- that propagate the frame's column subgrid. Applying it to `FrameSections` or a
195
- `FrameSection` breaks inherited track sizing. Put query containers on
196
- application-owned content wrappers inside the section instead; tune Grid tracks
197
- with the public responsive props. See
198
- [narrative pages and artwork](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/narrative-pages.md#keep-query-containers-inside-the-frame)
199
- for a complete composition and the corresponding browser fixture.
200
-
201
- `FrameRail` supplies the narrow surface and forwards native div props, including
202
- accessible labels or `aria-hidden` for decorative content. Its default
203
- `placement="start"` keeps content at the top. Callers own text direction and
204
- control layout; the shared rail does not force vertical text.
205
- `placement="sticky-bottom"` places content at the natural bottom and uses CSS
206
- sticky with a viewport-bottom inset and safe-area allowance. The control stays
207
- inside its group's bounds. The rail does not clip focus outlines or create a
208
- scroll container.
209
-
210
- `FrameRailGroup` scopes a rail to consecutive children. Multiple sibling groups
211
- describe disjoint ranges without adding landmarks, querying positions, or
212
- measuring heights. Each group defines gutter, rail, and content columns once.
213
- The rail track is a normal-flow grid item beside the content column, spanning
214
- the group's body row. The body uses column subgrid so sections inherit the same
215
- tracks, including full-width boundaries that cross the rail and both gutters.
216
- Boundary layers paint above the rail surface; controls retain native focus.
217
-
218
- `PageFrame` accepts the same `rail` and `railWidth` props. Its default
219
- `railScope="page"` covers header through footer. `railScope="main"` covers main's
220
- content and filler, excluding header and footer. Page rows allocate natural
221
- header/footer heights and remaining space to main. Main separates natural-height
222
- sections from a flexible filler, which collapses to zero on long pages.
223
- No viewport/chrome measurements are needed. A main without a rail does not add a
224
- second rail group. Choose a page or main rail, or local section groups; do not
225
- nest rail-bearing groups. Group width comes from the surrounding frame, falling
226
- back to the standard content width.
227
-
228
- `railWidth` accepts responsive spacing tokens and defaults to `{ base: 0, md: 32 }`.
229
- Zero hides the rail, including its contents, and reserves no space. Missing
230
- breakpoints inherit. The rail column sits inside the existing content boundary,
231
- reducing content width while retaining outer gutters, right alignment, full-width
232
- bands, and exterior marks. Column subgrid is part of the modern CSS baseline for
233
- the frame. No hydration or measurement is required. FrameRail owns surface and
234
- placement; the group owns width and range.
235
- `--gridui-page-gutter-start` optionally overrides only the start gutter; the end
236
- gutter continues to use `--gridui-page-gutter`. Sites can make small-screen rails
237
- flush with the viewport without changing header/footer gutters.
238
-
239
- ```tsx
240
- <PageFrame header={header} footer={footer}>
241
- <FrameRailGroup
242
- rail={<FrameRail><span className="site-vertical-label">Research</span></FrameRail>}
243
- railWidth={{ base: 0, md: 24, lg: 32 }}
244
- >
245
- <FrameSection>Overview</FrameSection>
246
- <FrameSection>Resources</FrameSection>
247
- </FrameRailGroup>
248
- <FrameSection>Outside the rail range</FrameSection>
249
- </PageFrame>
250
- ```
251
-
252
- `FrameBoundary` is a public primitive from `@gridui/grid`. It accepts `boundary`
253
- (default `line`), native div props and a ref; it has no children. Its CVA variants
254
- own only appearance and normal-flow height. Parent layouts choose its width and
255
- Grid span. It is inert, hidden from assistive technology and pointer-transparent.
256
- Landing sections and Sidebar regions use this same renderer; no package-private
257
- imports or duplicate line implementations are needed.
258
-
259
- Standalone and nested boundaries use the current palette's border color.
260
- Only a section or footer's direct leading boundary applies the adjacent-region
261
- seam color. This keeps section transitions from recoloring internal dividers.
262
-
263
- Each section and footer own their leading boundary through FrameBoundary. A line
264
- uses one top rule; a band adds its tint and bottom rule in normal flow. A stripe
265
- uses the same band height and rules with a repeating brand-colored diagonal pattern.
266
- Space reserves `--gridui-boundary-space-size` (2.5rem) without a rule or fill; none
267
- renders no boundary and reserves no space. These choices do not change content
268
- padding or inline edges. Stripe and space default to no decoration. The header
269
- has no trailing rule. The filler paints a top rule only when it has visible
270
- height, so a collapsed filler contributes no extra seam. No negative margin,
271
- rail-bottom correction, or last-section selector is needed. Vertical edges stay
272
- with each content surface. Websites own copy, semantic heading levels, and
273
- responsive column/span choices. The frame owns alignment, chrome padding,
274
- boundaries, and footer placement.
275
-
276
- `src/shared/page.css` owns page rows, subgrid propagation, and remaining height.
277
- `src/shared/rail.css` owns rail tracks, surfaces, and sticky placement. Boundary,
278
- decoration, and texture keep their own styles. The public stylesheet imports
279
- these owners; sites do not depend on private paths.
280
-
281
- ```tsx
282
- <PageFrame
283
- header={<FrameHeader>Site name</FrameHeader>}
284
- footer={<FrameFooter>Source notes</FrameFooter>}
285
- >
286
- <FrameSection aria-label="Overview">
287
- <Grid columns={{ base: 1, md: 2 }} frame="internal">
288
- <GridItem padding={{ base: 16, md: 24 }}>...</GridItem>
289
- <GridItem padding={{ base: 16, md: 24 }}>...</GridItem>
290
- </Grid>
291
- </FrameSection>
292
- </PageFrame>
293
- ```
294
-
295
- SSR tests cover breakpoint inheritance, prop forwarding, framed gaps, and
296
- class overrides. Browser checks must confirm actual alignment and reflow;
297
- serialized styles alone do not prove the grid works.
298
-
299
- ## Segmented filter bars
300
-
301
- Keep framed filter cells stretched to the same row height so seams remain
302
- continuous. Bottom-align their contents with `flex flex-col justify-end` on
303
- `GridItem`; do not bottom-align the grid items themselves. Fields keep their
304
- full available width. This aligns controls and action rows when labels wrap.
305
- Use equal fractional tracks for fields and an automatic track for actions,
306
- stacking or spanning the action cell at smaller breakpoints.
307
-
308
- Within a table cell, pair primary content and a trailing action with a full-width
309
- flex row, centered cross-axis alignment, `justify-between`, and a spacing-token
310
- gap. Keep icon actions non-shrinking and retain the cell's existing padding.
15
+ Read [Page frames](guides/page-frame.md).
311
16
 
312
17
  ## Dashboard frames
313
18
 
314
- `DashboardFrame` is a full-height, full-width page host with inline gutters and
315
- structural edges. Unlike `PageFrame`, it renders no `main`; the composed workspace
316
- owns that landmark. Give its parent a definite height. Four independent CVA
317
- variants configure its logical start and end gutters:
318
-
319
- | Prop | Applies to | Default |
320
- | --- | --- | --- |
321
- | `startSize` | Start gutter from 40rem | `medium` |
322
- | `endSize` | End gutter from 40rem | `medium` |
323
- | `compactStartSize` | Start gutter below 40rem | `small` |
324
- | `compactEndSize` | End gutter below 40rem | `small` |
325
-
326
- Every option accepts `none`, `small`, `medium`, or `large`. `none` is exactly 0px;
327
- the other options use spacing tokens 8, 16, and 24. Start/end mean left/right in LTR and right/left in RTL. Configure both
328
- wide-screen options for symmetric gutters; compact defaults remain independent.
329
- The breakpoint is viewport-based, like the other Grid frame styles. Nonzero size
330
- options retain at least the theme hover/focus outline extent, even when spacing
331
- tokens are reduced. `none` bypasses that minimum and disables ornaments on that
332
- edge; the structural border remains. `DashboardFrameSize` exports the common size
333
- type.
19
+ Read [Dashboard frames](guides/dashboard-frame.md).
334
20
 
335
- ### Composed frame regions
336
-
337
- `FrameRegion` declares which physical frame edge a composition touches through
338
- `edge="left" | "right" | "both" | "none"` (default `none`). It does not change
339
- its host's layout. Use `asChild` to retain a semantic element. Grid resolves the
340
- adjacent gutter and structural-border distances; consumers do not calculate
341
- negative offsets or read frame capacity variables. Nested regions start with no
342
- outer-frame capacity unless a new `DashboardFrame` establishes it.
343
-
344
- `FrameRegionRow` is a grid canvas within that region. It extends through the
345
- selected outer gutter and owns these public grid lines:
346
-
347
- | Lines | Purpose |
348
- | --- | --- |
349
- | `frame-left / frame-right` (or `1 / -1`) | Entire canvas, including the gutter |
350
- | `surface-left / surface-right` | Original composition surface |
351
- | `content-left / content-right` | Default child content column |
352
- | `accessory-left / surface-right` | Intrinsic column at the physical right edge |
353
-
354
- `contentInset` accepts a CSS length or pixel number (default 0). It reserves a
355
- right content inset before the accessory column and any left inset that the
356
- outer gutter cannot supply. An accessory such as a scrollbar sizes its column
357
- intrinsically. Row text keeps its inherited direction; physical line names and
358
- accessory placement stay stable in RTL. Rows support `asChild`, including a
359
- scroll-area root, and nested CSS subgrids can reuse these lines.
360
-
361
- `FrameBoundary extent="frame"` spans the full row. Its default `"content"`
362
- uses the content column. These are normal-flow grid spans, not translated
363
- pseudo-elements. Sidebar composes these primitives for fixed and scrolling
364
- boundaries and uses an unframed region for its Drawer and main content.
365
-
366
- `Split order="physical"` keeps row/row-reverse ordering and seams at the same
367
- physical edges in RTL; its default `"logical"` follows writing direction.
368
- Column ordering is unaffected. Sidebar uses physical ordering because its
369
- `side="left" | "right"` API describes physical positions.
370
-
371
- `decoration` accepts `none` (default), `nodes`, `marks`, `corners`, or `ticks`
372
- and supplies the default for both edges. `startDecoration` and `endDecoration`
373
- accept the same styles and override only their logical edge; an explicit `none`
374
- hides that edge's ornament without changing its gutter width or structural border.
375
- Omitted overrides inherit `decoration`. Start/end follow the same LTR/RTL mapping
376
- as the size options. Both sides still hide their ornaments below 40rem.
377
- Dashboard and Landing frames use the same package-local single-edge decoration
378
- renderer and styles. Each ornament paints only its own edge; zero-width gutters
379
- produce a zero-width ornament. Dashboard constrains their outsets to its gutter width and viewport
380
- height, including small, asymmetric gutters; it hides ornaments below 40rem while preserving
381
- outline clearance. Decorations are inert and never intercept pointer events.
382
-
383
- It owns no navigation, collapse state, scroll region, or application header.
384
-
385
- ```tsx
386
- <DashboardFrame
387
- startSize="large"
388
- endSize="small"
389
- compactStartSize="small"
390
- compactEndSize="medium"
391
- decoration="ticks"
392
- endDecoration="corners"
393
- >
394
- <SidebarLayout>
395
- <Sidebar>{navigation}</Sidebar>
396
- <SidebarMain>{content}</SidebarMain>
397
- </SidebarLayout>
398
- </DashboardFrame>
399
- ```
21
+ ## Segmented filter bars
400
22
 
401
- Import `DashboardFrame` from `@gridui/grid`; Sidebar components belong to
402
- `@gridui/sidebar`. Sidebar and main scroll independently inside the fixed frame.
23
+ Read [segmented filter bars](guides/grid.md#segmented-filter-bars).
package/docs/catalog.json CHANGED
@@ -1,13 +1,36 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/grid",
4
- "version": "2.3.5",
4
+ "version": "3.0.0",
5
5
  "category": "layout",
6
6
  "description": "GridUI React grid",
7
7
  "usage": "`@gridui/grid` owns Container, Grid, GridItem, Split, Stack, Row, PageFrame, FrameSections, FrameSection, frame chrome, rails, textures, FrameRegion/FrameRegionRow for composed edge geometry, and the public FrameBoundary primitive for structural boundaries. It does not know website routes or domain state. Load its explicit `styles.css` export after Theme and before styles of composed families. Theme supplies token values; `@gridui/style-utils/responsive` supplies the React-free spacing and breakpoint-value calculations.",
8
8
  "documentation": [
9
9
  "README.md",
10
- "docs/README.md"
10
+ "docs/README.md",
11
+ "docs/guides/dashboard-frame.md",
12
+ "docs/guides/grid.md",
13
+ "docs/guides/page-frame.md",
14
+ "docs/guides/split.md",
15
+ "docs/reference/README.md",
16
+ "docs/reference/container.md",
17
+ "docs/reference/dashboard-frame.md",
18
+ "docs/reference/frame-boundary.md",
19
+ "docs/reference/frame-footer.md",
20
+ "docs/reference/frame-header.md",
21
+ "docs/reference/frame-rail-group.md",
22
+ "docs/reference/frame-rail.md",
23
+ "docs/reference/frame-region-row.md",
24
+ "docs/reference/frame-region.md",
25
+ "docs/reference/frame-section.md",
26
+ "docs/reference/frame-sections.md",
27
+ "docs/reference/frame-texture.md",
28
+ "docs/reference/grid-item.md",
29
+ "docs/reference/grid.md",
30
+ "docs/reference/page-frame.md",
31
+ "docs/reference/row.md",
32
+ "docs/reference/split.md",
33
+ "docs/reference/stack.md"
11
34
  ],
12
35
  "exports": [
13
36
  {
@@ -246,9 +269,21 @@
246
269
  "@gridui/grid/styles.css"
247
270
  ],
248
271
  "examples": [
272
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/adaptive-lists.mdx",
273
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/boundaries-textures.mdx",
274
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/flow-layouts.mdx",
275
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/framed-cells.mdx",
276
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/linear-regions.mdx",
277
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/page-frames.mdx",
278
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/rails.mdx",
279
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/responsive-grids.mdx",
280
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/container.stories.tsx",
249
281
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/frame-section.stories.tsx",
250
282
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/grid.stories.tsx",
251
283
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/page-frame.stories.tsx",
252
- "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/primitives.stories.tsx"
284
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/primitives.stories.tsx",
285
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/row.stories.tsx",
286
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/split.stories.tsx",
287
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-layout/grid/stories/stack.stories.tsx"
253
288
  ]
254
289
  }
@@ -0,0 +1,91 @@
1
+ # Dashboard frames
2
+
3
+ `DashboardFrame` is a full-height, full-width page host with inline gutters and
4
+ structural edges. Unlike `PageFrame`, it renders no `main`; the composed workspace
5
+ owns that landmark. Give its parent a definite height. Four independent CVA
6
+ variants configure its logical start and end gutters:
7
+
8
+ | Prop | Applies to | Default |
9
+ | --- | --- | --- |
10
+ | `startSize` | Start gutter from 40rem | `medium` |
11
+ | `endSize` | End gutter from 40rem | `medium` |
12
+ | `compactStartSize` | Start gutter below 40rem | `small` |
13
+ | `compactEndSize` | End gutter below 40rem | `small` |
14
+
15
+ Every option accepts `none`, `small`, `medium`, or `large`. `none` is exactly 0px;
16
+ the other options use spacing tokens 8, 16, and 24. Start/end mean left/right in LTR and right/left in RTL. Configure both
17
+ wide-screen options for symmetric gutters; compact defaults remain independent.
18
+ The breakpoint is viewport-based, like the other Grid frame styles. Nonzero size
19
+ options retain at least the theme hover/focus outline extent, even when spacing
20
+ tokens are reduced. `none` bypasses that minimum and disables ornaments on that
21
+ edge; the structural border remains. `DashboardFrameSize` exports the common size
22
+ type.
23
+
24
+ ## Composed frame regions
25
+
26
+ `FrameRegion` declares which physical frame edge a composition touches through
27
+ `edge="left" | "right" | "both" | "none"` (default `none`). It does not change
28
+ its host's layout. Use `asChild` to retain a semantic element. Grid resolves the
29
+ adjacent gutter and structural-border distances; consumers do not calculate
30
+ negative offsets or read frame capacity variables. Nested regions start with no
31
+ outer-frame capacity unless a new `DashboardFrame` establishes it.
32
+
33
+ `FrameRegionRow` is a grid canvas within that region. It extends through the
34
+ selected outer gutter and owns these public grid lines:
35
+
36
+ | Lines | Purpose |
37
+ | --- | --- |
38
+ | `frame-left / frame-right` (or `1 / -1`) | Entire canvas, including the gutter |
39
+ | `surface-left / surface-right` | Original composition surface |
40
+ | `content-left / content-right` | Default child content column |
41
+ | `accessory-left / surface-right` | Intrinsic column at the physical right edge |
42
+
43
+ `contentInset` accepts a CSS length or pixel number (default 0). It reserves a
44
+ right content inset before the accessory column and any left inset that the
45
+ outer gutter cannot supply. An accessory such as a scrollbar sizes its column
46
+ intrinsically. Row text keeps its inherited direction; physical line names and
47
+ accessory placement stay stable in RTL. Rows support `asChild`, including a
48
+ scroll-area root, and nested CSS subgrids can reuse these lines.
49
+
50
+ `FrameBoundary extent="frame"` spans the full row. Its default `"content"`
51
+ uses the content column. These are normal-flow grid spans, not translated
52
+ pseudo-elements. Sidebar composes these primitives for fixed and scrolling
53
+ boundaries and uses an unframed region for its Drawer and main content.
54
+
55
+ `Split order="physical"` keeps row/row-reverse ordering and seams at the same
56
+ physical edges in RTL; its default `"logical"` follows writing direction.
57
+ Column ordering is unaffected. Sidebar uses physical ordering because its
58
+ `side="left" | "right"` API describes physical positions.
59
+
60
+ `decoration` accepts `none` (default), `nodes`, `marks`, `corners`, or `ticks`
61
+ and supplies the default for both edges. `startDecoration` and `endDecoration`
62
+ accept the same styles and override only their logical edge; an explicit `none`
63
+ hides that edge's ornament without changing its gutter width or structural border.
64
+ Omitted overrides inherit `decoration`. Start/end follow the same LTR/RTL mapping
65
+ as the size options. Both sides still hide their ornaments below 40rem.
66
+ Dashboard and Landing frames use the same package-local single-edge decoration
67
+ renderer and styles. Each ornament paints only its own edge; zero-width gutters
68
+ produce a zero-width ornament. Dashboard constrains their outsets to its gutter width and viewport
69
+ height, including small, asymmetric gutters; it hides ornaments below 40rem while preserving
70
+ outline clearance. Decorations are inert and never intercept pointer events.
71
+
72
+ It owns no navigation, collapse state, scroll region, or application header.
73
+
74
+ ```tsx
75
+ <DashboardFrame
76
+ startSize="large"
77
+ endSize="small"
78
+ compactStartSize="small"
79
+ compactEndSize="medium"
80
+ decoration="ticks"
81
+ endDecoration="corners"
82
+ >
83
+ <SidebarLayout>
84
+ <Sidebar>{navigation}</Sidebar>
85
+ <SidebarMain>{content}</SidebarMain>
86
+ </SidebarLayout>
87
+ </DashboardFrame>
88
+ ```
89
+
90
+ Import `DashboardFrame` from `@gridui/grid`; Sidebar components belong to
91
+ `@gridui/sidebar`. Sidebar and main scroll independently inside the fixed frame.