@jonmilner/ui 0.23.4 → 0.23.5

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.
@@ -1,2 +1,2 @@
1
1
  @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
- @layer components.sidebar{._1mbot450{inline-size:var(--container-sidebar);border-inline-end:var(--space-1) solid var(--color-border)}._1mbot450[data-rail]{inline-size:var(--container-rail);container:_1n4s23v1/inline-size}._1mbot451{padding-block:var(--space-16);padding-inline:var(--space-12)}._1mbot452{flex-shrink:0;margin-inline-start:auto}._1mbot453{scale:var(--dir) 1}._1mbot454{padding-block-end:var(--space-12);padding-inline:var(--space-12)}._1mbot455{padding-block:var(--space-12);padding-inline:var(--space-12);border-block-start:var(--space-1) solid var(--color-border)}@container _1n4s23v0 (inline-size>=48em){._1mbot450{min-block-size:100dvh}}@container _1n4s23v0 (inline-size<48em){._1mbot450{border-inline-end:none;border-block-end:var(--space-1) solid var(--color-border)}._1mbot450,._1mbot450[data-rail]{inline-size:auto;container:none}}@container _1n4s23v1 (inline-size>=0){._1mbot451{flex-direction:column;padding-inline-start:var(--space-8);padding-inline-end:calc(var(--space-8) - var(--space-1))}._1mbot452{margin-inline-start:0}._1mbot454{padding-inline-start:var(--space-8);padding-inline-end:calc(var(--space-8) - var(--space-1))}._1mbot455{flex-direction:column;padding-inline-start:var(--space-8);padding-inline-end:calc(var(--space-8) - var(--space-1))}}}
2
+ @layer components.sidebar{._1mbot450{inline-size:var(--container-sidebar);border-inline-end:var(--space-1) solid var(--color-border)}._1mbot450[data-rail]{inline-size:var(--container-rail);container:_1n4s23v1/inline-size}._1mbot451{padding-block:var(--space-16);padding-inline:var(--space-12)}._1mbot452{flex-shrink:0;margin-inline-start:auto}._1mbot453{scale:var(--dir) 1}._1mbot454{padding-block-end:var(--space-12);padding-inline:var(--space-12)}._1mbot455{padding-block:var(--space-12);padding-inline:var(--space-12);border-block-start:var(--space-1) solid var(--color-border)}@container _1n4s23v0 (inline-size>=48em){._1mbot450{min-block-size:calc(100dvh - var(--_1n4s23v2,0px))}}@container _1n4s23v0 (inline-size<48em){._1mbot450{border-inline-end:none;border-block-end:var(--space-1) solid var(--color-border)}._1mbot450,._1mbot450[data-rail]{inline-size:auto;container:none}}@container _1n4s23v1 (inline-size>=0){._1mbot451{flex-direction:column;padding-inline-start:var(--space-8);padding-inline-end:calc(var(--space-8) - var(--space-1))}._1mbot452{margin-inline-start:0}._1mbot454{padding-inline-start:var(--space-8);padding-inline-end:calc(var(--space-8) - var(--space-1))}._1mbot455{flex-direction:column;padding-inline-start:var(--space-8);padding-inline-end:calc(var(--space-8) - var(--space-1))}}}
@@ -1,2 +1,2 @@
1
1
  @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
- @layer components.sidebar-layout{._9xiruj0{container:_1n4s23v0/inline-size}._9xiruj1{flex-basis:100%}._9xiruj2{flex-basis:0;min-inline-size:0}@container _1n4s23v0 (inline-size>=48em){._9xiruj1{flex-shrink:0;flex-basis:auto;align-self:start;max-block-size:100dvh;position:sticky;inset-block-start:0;overflow-y:auto}}@container _1n4s23v0 (inline-size<48em){._9xiruj2{flex-basis:100%}}}
2
+ @layer components.sidebar-layout{._9xiruj1{flex-basis:100%}._9xiruj2{container:_1n4s23v0/inline-size}._9xiruj3{--_9xiruj0:var(--size-lg)}._9xiruj4{--_9xiruj0:var(--size-xl)}._9xiruj5{flex-basis:100%}._9xiruj6{flex-basis:0;min-inline-size:0}:where(._9xiruj1)+._9xiruj6{flex-basis:100%}@container _1n4s23v0 (inline-size<48em){:where(._9xiruj1)~._9xiruj5{--_1n4s23v2:0px}._9xiruj6{flex-basis:100%}:where(._9xiruj1)~._9xiruj6{--_1n4s23v2:0px}}@container _1n4s23v0 (inline-size>=48em){._9xiruj1{z-index:var(--z-index-sticky);block-size:var(--_9xiruj0);position:sticky;inset-block-start:0;overflow-y:auto}._9xiruj5{max-block-size:calc(100dvh - var(--_1n4s23v2,0px));flex-shrink:0;flex-basis:auto;align-self:start;position:sticky;inset-block-start:var(--_1n4s23v2,0px);overflow-y:auto}:where(._9xiruj1)~._9xiruj5,:where(._9xiruj1)~._9xiruj6{--_1n4s23v2:var(--_9xiruj0)}}}
@@ -0,0 +1 @@
1
+ export declare const headerSize: Record<"lg" | "xl", string>;
@@ -5,5 +5,8 @@ import "./SidebarLayout.css";
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  // src/SidebarLayout/SidebarLayout.css.ts
8
- var e = "_9xiruj0", t = "_9xiruj1", n = "_9xiruj2";
9
- export { n as main, e as root, t as sidebar };
8
+ var e = "_9xiruj1", t = "_9xiruj2", n = {
9
+ lg: "_9xiruj3",
10
+ xl: "_9xiruj4"
11
+ }, r = "_9xiruj5", i = "_9xiruj6";
12
+ export { e as header, n as headerSize, i as main, t as root, r as sidebar };
@@ -1,13 +1,20 @@
1
1
  import { StyleProps } from "../Box/base.mjs";
2
2
  import { PolymorphicProps } from "../types.mjs";
3
+ import { headerSize as headerSize$1 } from "./SidebarLayout.css.mjs";
3
4
  import { ElementType } from "react";
4
- export type SidebarLayoutProps<T extends ElementType = "div"> = PolymorphicProps<T, StyleProps>;
5
+ export type SidebarLayoutProps<T extends ElementType = "div"> = PolymorphicProps<T, StyleProps & {
6
+ /** The header's block size when the layout is wide, and the sidebar's sticky offset below it. */
7
+ headerSize?: keyof typeof headerSize$1;
8
+ }>;
9
+ export type SidebarLayoutHeaderProps<T extends ElementType = "div"> = PolymorphicProps<T, StyleProps>;
5
10
  export type SidebarLayoutSidebarProps<T extends ElementType = "div"> = PolymorphicProps<T, StyleProps>;
6
11
  export type SidebarLayoutMainProps<T extends ElementType = "div"> = PolymorphicProps<T, StyleProps>;
7
- declare function SidebarLayoutRoot<T extends ElementType = "div">({ display, flexWrap, gap, inlineSize, className, ...props }: SidebarLayoutProps<T>): import("react").JSX.Element;
12
+ declare function SidebarLayoutRoot<T extends ElementType = "div">({ display, flexWrap, gap, inlineSize, headerSize, className, ...props }: SidebarLayoutProps<T>): import("react").JSX.Element;
13
+ declare function SidebarLayoutHeader<T extends ElementType = "div">({ className, ...props }: SidebarLayoutHeaderProps<T>): import("react").JSX.Element;
8
14
  declare function SidebarLayoutSidebar<T extends ElementType = "div">({ inlineSize, className, ...props }: SidebarLayoutSidebarProps<T>): import("react").JSX.Element;
9
15
  declare function SidebarLayoutMain<T extends ElementType = "div">({ flexGrow, className, ...props }: SidebarLayoutMainProps<T>): import("react").JSX.Element;
10
16
  export declare const SidebarLayout: typeof SidebarLayoutRoot & {
17
+ Header: typeof SidebarLayoutHeader;
11
18
  Sidebar: typeof SidebarLayoutSidebar;
12
19
  Main: typeof SidebarLayoutMain;
13
20
  };
@@ -1,34 +1,41 @@
1
1
  import { Box as e } from "../Box/base.mjs";
2
2
  import { join as t } from "../styles/join.mjs";
3
- import { main as n, root as r, sidebar as i } from "./SidebarLayout.css.mjs";
4
- import { jsx as a } from "react/jsx-runtime";
3
+ import { header as n, headerSize as r, main as i, root as a, sidebar as o } from "./SidebarLayout.css.mjs";
4
+ import { jsx as s } from "react/jsx-runtime";
5
5
  // src/SidebarLayout/index.tsx
6
- function o({ display: n = "flex", flexWrap: i = "wrap", gap: o = "24", inlineSize: s = "full", className: c, ...l }) {
7
- return /* @__PURE__ */ a(e, {
6
+ function c({ display: n = "flex", flexWrap: i = "wrap", gap: o = "24", inlineSize: c = "full", headerSize: l = "lg", className: u, ...d }) {
7
+ return /* @__PURE__ */ s(e, {
8
8
  display: n,
9
9
  flexWrap: i,
10
10
  gap: o,
11
- inlineSize: s,
12
- ...l,
13
- className: t(r, c)
11
+ inlineSize: c,
12
+ ...d,
13
+ className: t(a, r[l], u)
14
14
  });
15
15
  }
16
- function s({ inlineSize: n = "sidebar", className: r, ...o }) {
17
- return /* @__PURE__ */ a(e, {
16
+ function l({ className: r, ...i }) {
17
+ return /* @__PURE__ */ s(e, {
18
+ ...i,
19
+ className: t(n, r)
20
+ });
21
+ }
22
+ function u({ inlineSize: n = "sidebar", className: r, ...i }) {
23
+ return /* @__PURE__ */ s(e, {
18
24
  inlineSize: n,
19
- ...o,
20
- className: t(i, r)
25
+ ...i,
26
+ className: t(o, r)
21
27
  });
22
28
  }
23
- function c({ flexGrow: r = 1, className: i, ...o }) {
24
- return /* @__PURE__ */ a(e, {
25
- flexGrow: r,
26
- ...o,
27
- className: t(n, i)
29
+ function d({ flexGrow: n = 1, className: r, ...a }) {
30
+ return /* @__PURE__ */ s(e, {
31
+ flexGrow: n,
32
+ ...a,
33
+ className: t(i, r)
28
34
  });
29
35
  }
30
- var l = Object.assign(o, {
31
- Sidebar: s,
32
- Main: c
36
+ var f = Object.assign(c, {
37
+ Header: l,
38
+ Sidebar: u,
39
+ Main: d
33
40
  });
34
- export { l as SidebarLayout };
41
+ export { f as SidebarLayout };
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- A page's navigation or secondary column beside its main content. `SidebarLayout` is a wrapping flex row; `SidebarLayout.Sidebar` keeps a fixed width (`inlineSize="sidebar"`, 15rem) at the inline start and `SidebarLayout.Main` takes the rest. When the layout itself is narrower than 48em, the sidebar stacks above main at full width. It reads its own width through a container query, not the viewport's, so it stacks inside a narrow slot on a wide screen too. When wide, the sidebar is sticky: it stays in view while the page scrolls, capped at the viewport's height, and scrolls on its own when its content is taller. All three parts are `Box`es and take style props, except the few the layout fixes (see Rules).
5
+ A page's navigation or secondary column beside its main content. `SidebarLayout` is a wrapping flex row; `SidebarLayout.Sidebar` keeps a fixed width (`inlineSize="sidebar"`, 15rem) at the inline start and `SidebarLayout.Main` takes the rest. When the layout itself is narrower than 48em, the sidebar stacks above main at full width. It reads its own width through a container query, not the viewport's, so it stacks inside a narrow slot on a wide screen too. When wide, the sidebar is sticky: it stays in view while the page scrolls, capped at the viewport's height, and scrolls on its own when its content is taller. An optional `SidebarLayout.Header` spans the full width above both: wide, it pins to the top of the viewport and the sidebar sticks below it; stacked, it scrolls away with the page. Every part is a `Box` and takes style props, except the few the layout fixes (see Rules).
6
6
 
7
7
  ## When to use
8
8
 
@@ -19,11 +19,13 @@ A page's navigation or secondary column beside its main content. `SidebarLayout`
19
19
 
20
20
  ## Rules
21
21
 
22
- - Put `SidebarLayout.Sidebar` first and `SidebarLayout.Main` second, as direct children. The sidebar's inline-start place and its place above main when stacked both come from that source order.
22
+ - Put `SidebarLayout.Sidebar` first and `SidebarLayout.Main` second, as direct children. The sidebar's inline-start place and its place above main when stacked both come from that source order. A `SidebarLayout.Header`, when there is one, comes before both.
23
23
  - The root is full width by default (`inlineSize="full"`). It measures its own inline size (inline-size containment), so it never sizes itself to its content: without that default a shrink-to-fit parent, such as a Stack with `alignItems="start"`, would collapse it to nothing. Override it with another width, never `"auto"` or `"fit"`. The parent must give it a definite width too: in a grid `auto` or `max-content` track, an inline-block, a float or a fit-content popup the full width resolves to nothing and the layout collapses.
24
24
  - `gap` defaults to `"24"`, between the columns when wide and between the rows when stacked. Override it like any style prop: `gap="16"`.
25
25
  - The sidebar's width is `inlineSize`; `"sidebar"` is the default. Pass another container width or size token to change it, well under 48em: the stacking width does not follow the sidebar's, so a `"prose"` sidebar leaves main a sliver just above it. A sidebar that holds its own width-owning content (a collapsible rail) sets `inlineSize="auto"`.
26
- - The stacking width (48em), the sticky offset (0) and the viewport-height cap are fixed: they live in the component's stylesheet, so style props do not change them. When wide, the sidebar's `flexShrink`, `alignSelf`, `position`, `maxBlockSize` and `overflow` are fixed the same way, and main's `minInlineSize` always is. A page with a sticky header above the layout puts the header inside `SidebarLayout.Main`, or waits for a sticky offset this layout does not have yet.
26
+ - The stacking width (48em), the sticky offset (0, or the header's height) and the viewport-height cap (less the header's height) are fixed: they live in the component's stylesheet, so style props do not change them. When wide, the sidebar's `flexShrink`, `alignSelf`, `position`, `maxBlockSize` and `overflow` are fixed the same way, and main's `minInlineSize` always is.
27
+ - A header across the page, such as a status banner, is `SidebarLayout.Header`, never a sticky element of your own above the layout or an override of the sidebar's offset. When wide its height is fixed at the root's `headerSize`, `"lg"` (48px, the default) or `"xl"` (56px), and the sidebar sticks below it at that offset, its height cap less the same amount, as does a `Sidebar`'s viewport-high minimum. Nothing is measured, so the server's first paint is the final layout. Content taller than that scrolls inside the header instead of covering the sidebar: keep it to one line at wide widths, or pick `headerSize="xl"`. Being a scroll container, it clips what is drawn past its edges: keep its controls at least 4px inside them for the focus ring (a 40px `med` control in the 48px header just fits), and open menus and popovers in a portal, as the library's do. Stacked, the header takes its content's height and scrolls away with the page. A layout with a header is the page's shell and ends where the page does: content after it pushes the sticky sidebar up under the header as the layout scrolls out, hiding its top links. A layout nested in main keeps the offset, so its sidebar sticks below the outer header too; only the outer layout has a header.
28
+ - `gap` also separates the header from the row below it; an app shell sets `gap="0"`.
27
29
  - When wide, the sidebar is only as tall as its content, up to the viewport's height, so it can stick. The sticky offset and the cap assume the page itself scrolls: inside a scrolling pane shorter than the viewport, the sidebar's bottom stays out of reach until the pane scrolls to its end.
28
30
  - Main has a zero minimum width, so wide content (a table, a code block) scrolls or wraps inside it instead of pushing the row wider than the page.
29
31
  - When wide, the sidebar is a scroll container, which clips anything drawn past its edges. The focus ring draws 4px outside its element, so a sidebar of links gets `padding="8"` or more.
@@ -64,6 +66,19 @@ A page's navigation or secondary column beside its main content. `SidebarLayout`
64
66
  </SidebarLayout>
65
67
  ```
66
68
 
69
+ ```tsx
70
+ // An app shell: a status banner above both columns, pinned when wide.
71
+ <SidebarLayout gap="0">
72
+ <SidebarLayout.Header as="header" display="flex" alignItems="center" paddingInline="16">
73
+ <Body>Last synced 2 minutes ago</Body>
74
+ </SidebarLayout.Header>
75
+ <SidebarLayout.Sidebar as="nav" aria-label="Sections">
76
+ …
77
+ </SidebarLayout.Sidebar>
78
+ <SidebarLayout.Main as="main">…</SidebarLayout.Main>
79
+ </SidebarLayout>
80
+ ```
81
+
67
82
  ## Don't
68
83
 
69
84
  ```tsx
@@ -75,6 +90,18 @@ A page's navigation or secondary column beside its main content. `SidebarLayout`
75
90
  </SidebarLayout>
76
91
  ```
77
92
 
93
+ ```tsx
94
+ // A sticky banner above the layout, with the sidebar's offset overridden to match its measured
95
+ // height: the override fights the layout's own rules, and the page jumps when the height settles.
96
+ <>
97
+ <Banner style={{ position: "sticky", top: 0 }} />
98
+ <SidebarLayout>
99
+ <SidebarLayout.Sidebar className={offsetByBanner}>…</SidebarLayout.Sidebar>
100
+ <SidebarLayout.Main>…</SidebarLayout.Main>
101
+ </SidebarLayout>
102
+ </>
103
+ ```
104
+
78
105
  ```tsx
79
106
  // A hand-rolled sidebar: a column-to-row Stack switches on the viewport, not the slot it sits in,
80
107
  // and the sidebar neither keeps its width nor stays in view.
@@ -89,7 +116,7 @@ A page's navigation or secondary column beside its main content. `SidebarLayout`
89
116
  ## Accessibility
90
117
 
91
118
  - SidebarLayout adds no role or ARIA. Pick each part's element with `as`: `nav` with an `aria-label` for navigation, `aside` with an `aria-label` for secondary content, and `main` for the page's main content (once per page).
92
- - The sidebar comes first in reading and focus order, before main, in both layouts. A long sidebar of links pairs with a skip link to main.
119
+ - The sidebar comes first in reading and focus order, before main, in both layouts; a header comes before both. A pinned header never covers the sidebar: the sidebar sticks below it, so no focused link in it hides under it. Main's content does scroll under it: a page with a pinned header sets `scroll-padding-block-start` on its scroller (the root element) to the header's size, so a link focused or jumped to in main is not hidden below the header. Give the header `as="header"` for a `banner` landmark only when it is the page's own header, outside any `main`, `aside` or `nav`. A long sidebar of links pairs with a skip link to main.
93
120
  - Layout uses logical properties only, so in a right-to-left page the sidebar sits on the right.
94
121
  - When the sidebar is taller than the viewport it scrolls on its own; keyboard users reach its last links by tabbing, which scrolls them into view. A sidebar with nothing focusable in it (a read-only outline) gets `tabIndex={0}`, so keyboard users can scroll it in browsers that never focus a scroller.
95
122
  - Stacking keeps the page usable at 400% zoom: at 320 CSS pixels the layout is well under 48em, so main gets the full width.
@@ -100,6 +127,15 @@ Generated from the TypeScript types.
100
127
 
101
128
  ### SidebarLayout
102
129
 
130
+ | Prop | Type | Required | Description |
131
+ | --- | --- | --- | --- |
132
+ | `as` | `ElementType` | no | |
133
+ | `headerSize` | `"lg" \| "xl"` | no | The header's block size when the layout is wide, and the sidebar's sticky offset below it. |
134
+
135
+ Also accepts every `<div>` attribute (change the element with `as`) and the style props (see `manifest.json` `styleProps`).
136
+
137
+ ### SidebarLayout.Header
138
+
103
139
  | Prop | Type | Required | Description |
104
140
  | --- | --- | --- | --- |
105
141
  | `as` | `ElementType` | no | |
@@ -45,7 +45,7 @@
45
45
  - [SearchField](SearchField.md): A form field for a search query: an `<input type="search">` (role `searchbox`) with a search icon at its inline start and, while it holds a value, a clear button at its inline end. Escape empties a field that has a value, and the clear button empties it and puts focus back in the input, so a keyboard user never loses their place (ADR 0087). Built on Base UI's `Input` (ADR 0003); it composes `Field` for its label, description and error (ADR 0026). Three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124); the clear button is 24px, or 32px in `lg`.
46
46
  - [Select](Select.md): A form field for picking one value from a list too long to show as radios, with no typing. A trigger drawn as a field opens a listbox of options; the selected option shows a check mark, and the trigger shows its label on one line, truncated. Built on Base UI's `Select` in single mode (ADR 0003), which owns the keyboard and focus: Enter, Space and the arrow keys open it, arrow keys, Home and End move through the options, typing jumps to a match, Enter picks, Esc and an outside click close it, and focus returns to the trigger. It shares MultiSelect's trigger, popup and option rows (ADR 0134) and composes `Field` for its label, description and error (ADR 0026).
47
47
  - [Sidebar](Sidebar.md): An app's sidebar: a named `aside` on the `bgPanel` surface, with a header row, the navigation, and a footer for app-wide controls, that collapses to a narrow icon rail. Open, it is the `sidebar` width (15rem); collapsed (`collapsed`), it is the `rail` width (3.5rem) and a `NavList` inside it shows each row's icon or avatar alone, its label and count kept for assistive tech. The app owns the collapsed state: pass `onCollapsedChange` and a toggle `IconButton` appears in the header. Place it in `SidebarLayout.Sidebar`, which then follows its width (ADR 0151).
48
- - [SidebarLayout](SidebarLayout.md): A page's navigation or secondary column beside its main content. `SidebarLayout` is a wrapping flex row; `SidebarLayout.Sidebar` keeps a fixed width (`inlineSize="sidebar"`, 15rem) at the inline start and `SidebarLayout.Main` takes the rest. When the layout itself is narrower than 48em, the sidebar stacks above main at full width. It reads its own width through a container query, not the viewport's, so it stacks inside a narrow slot on a wide screen too. When wide, the sidebar is sticky: it stays in view while the page scrolls, capped at the viewport's height, and scrolls on its own when its content is taller. All three parts are `Box`es and take style props, except the few the layout fixes (see Rules).
48
+ - [SidebarLayout](SidebarLayout.md): A page's navigation or secondary column beside its main content. `SidebarLayout` is a wrapping flex row; `SidebarLayout.Sidebar` keeps a fixed width (`inlineSize="sidebar"`, 15rem) at the inline start and `SidebarLayout.Main` takes the rest. When the layout itself is narrower than 48em, the sidebar stacks above main at full width. It reads its own width through a container query, not the viewport's, so it stacks inside a narrow slot on a wide screen too. When wide, the sidebar is sticky: it stays in view while the page scrolls, capped at the viewport's height, and scrolls on its own when its content is taller. An optional `SidebarLayout.Header` spans the full width above both: wide, it pins to the top of the viewport and the sidebar sticks below it; stacked, it scrolls away with the page. Every part is a `Box` and takes style props, except the few the layout fixes (see Rules).
49
49
  - [Stack](Stack.md): A vertical column of children with even space between them. `Stack` is a `Flex` (a `Box` with `display="flex"`) with `flexDirection="column"` as a default style prop, spaced by a required `gap`. Children render as they are: no wrapper per child.
50
50
  - [Switch](Switch.md): Turns one setting on or off, and the change applies the moment it flips. Built on Base UI `Switch` (ADR 0003, 0137): a `span` with `role="switch"` and `aria-checked`, plus a hidden checkbox input that submits with a form. The span is a 24 px target with the shared focus ring around a pill track: off is an outlined track with the thumb at the start, on a filled `accent` track with the thumb at the end. It composes `Field` for its label, description and error (ADR 0026), with the label after the switch.
51
51
  - [Table](Table.md): Records in rows that share named columns, so a reader can scan and compare them: transactions, members, invoices. A native `table` with parts for each element (`Table.Head`, `Table.Body`, `Table.Foot`, `Table.Row`, `Table.HeaderCell`, `Table.Cell`, `Table.ColumnGroup`, `Table.Column`), and `Table.ScrollArea` for a table wider than its container. It has no `grid` role and no roving focus: a link, `Checkbox` or `Menu` in a cell keeps the page's tab order, and a screen reader's table commands work as on any table.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "./manifest.schema.json",
3
3
  "package": "@jonmilner/ui",
4
- "version": "0.23.4",
4
+ "version": "0.23.5",
5
5
  "components": [
6
6
  {
7
7
  "name": "Alert",
@@ -3152,10 +3152,32 @@
3152
3152
  "name": "as",
3153
3153
  "type": "ElementType",
3154
3154
  "required": false
3155
+ },
3156
+ {
3157
+ "name": "headerSize",
3158
+ "type": "\"lg\" | \"xl\"",
3159
+ "required": false,
3160
+ "values": [
3161
+ "lg",
3162
+ "xl"
3163
+ ],
3164
+ "description": "The header's block size when the layout is wide, and the sidebar's sticky offset below it."
3155
3165
  }
3156
3166
  ],
3157
3167
  "element": "div",
3158
3168
  "parts": [
3169
+ {
3170
+ "name": "SidebarLayout.Header",
3171
+ "styleProps": true,
3172
+ "props": [
3173
+ {
3174
+ "name": "as",
3175
+ "type": "ElementType",
3176
+ "required": false
3177
+ }
3178
+ ],
3179
+ "element": "div"
3180
+ },
3159
3181
  {
3160
3182
  "name": "SidebarLayout.Main",
3161
3183
  "styleProps": true,
package/dist/index.d.mts CHANGED
@@ -36,7 +36,7 @@ import { PopoverCloseProps, PopoverTriggerProps } from "./Popover/client.mjs";
36
36
  import { SearchField, SearchFieldProps } from "./SearchField/index.mjs";
37
37
  import { Select, SelectOption, SelectProps } from "./Select/index.mjs";
38
38
  import { Sidebar, SidebarProps } from "./Sidebar/index.mjs";
39
- import { SidebarLayout, SidebarLayoutMainProps, SidebarLayoutProps, SidebarLayoutSidebarProps } from "./SidebarLayout/index.mjs";
39
+ import { SidebarLayout, SidebarLayoutHeaderProps, SidebarLayoutMainProps, SidebarLayoutProps, SidebarLayoutSidebarProps } from "./SidebarLayout/index.mjs";
40
40
  import { Stack, StackProps } from "./Stack/index.mjs";
41
41
  import { Switch, SwitchProps } from "./Switch/index.mjs";
42
42
  import { Table, TableBodyProps, TableCellProps, TableColumnGroupProps, TableColumnProps, TableFootProps, TableHeadProps, TableHeaderCellProps, TableProps, TableRowProps, TableScrollAreaProps, TableSortDirection } from "./Table/index.mjs";
@@ -53,4 +53,4 @@ import { ThemeProvider, ThemeProviderProps } from "./theme/ThemeProvider.mjs";
53
53
  import { Toast } from "./Toast/index.mjs";
54
54
  import { Tooltip, TooltipProps, TooltipProviderProps } from "./Tooltip/index.mjs";
55
55
  import { VisuallyHidden, VisuallyHiddenProps } from "./VisuallyHidden/index.mjs";
56
- export { Alert, AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Body, type BodyProps, type BodySize, Box, type BoxProps, Button, type ButtonProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, type ClickableProps, Code, type CodeBlockProps, type CodeInlineProps, type CodeProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Combobox, type ComboboxOption, type ComboboxProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Flex, type FlexProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Label, type LabelProps, type LabelSize, Markdown, type MarkdownComponents, type MarkdownNode, type MarkdownProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuSubmenuRootProps, type MenuSubmenuTriggerProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavList, type NavListGroupProps, type NavListItemOwnProps, type NavListItemProps, type NavListProps, NumberField, type NumberFieldInputProps, type NumberFieldProps, Popover, type PopoverCloseProps, type PopoverPopupProps, type PopoverProps, type PopoverTriggerProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarLayout, type SidebarLayoutMainProps, type SidebarLayoutProps, type SidebarLayoutSidebarProps, type SidebarProps, Stack, type StackProps, type StyleProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, type TableScrollAreaProps, type TableSortDirection, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPopupProps, type TooltipProps, type TooltipProviderProps, type TooltipTriggerProps, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
56
+ export { Alert, AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Body, type BodyProps, type BodySize, Box, type BoxProps, Button, type ButtonProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, type ClickableProps, Code, type CodeBlockProps, type CodeInlineProps, type CodeProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Combobox, type ComboboxOption, type ComboboxProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Flex, type FlexProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Label, type LabelProps, type LabelSize, Markdown, type MarkdownComponents, type MarkdownNode, type MarkdownProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuSubmenuRootProps, type MenuSubmenuTriggerProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavList, type NavListGroupProps, type NavListItemOwnProps, type NavListItemProps, type NavListProps, NumberField, type NumberFieldInputProps, type NumberFieldProps, Popover, type PopoverCloseProps, type PopoverPopupProps, type PopoverProps, type PopoverTriggerProps, RadioGroup, type RadioGroupOption, type RadioGroupProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarLayout, type SidebarLayoutHeaderProps, type SidebarLayoutMainProps, type SidebarLayoutProps, type SidebarLayoutSidebarProps, type SidebarProps, Stack, type StackProps, type StyleProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, type TableScrollAreaProps, type TableSortDirection, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, Tooltip, type TooltipPopupProps, type TooltipProps, type TooltipProviderProps, type TooltipTriggerProps, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonmilner/ui",
3
- "version": "0.23.4",
3
+ "version": "0.23.5",
4
4
  "bin": {
5
5
  "ui-doctor": "./dist/cli/ui-doctor.mjs"
6
6
  },