@sableui/react 0.3.0 → 0.3.2

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 (37) hide show
  1. package/AGENTS.md +5 -1
  2. package/CHANGELOG.md +52 -0
  3. package/README.md +5 -1
  4. package/bin/sable.mjs +6 -2
  5. package/dist/{_contract-o3tUc8Ig.d.ts → _contract-BlKMR4eX.d.ts} +6 -1
  6. package/dist/blocks/index.js +2 -2
  7. package/dist/{chunk-CKNM7KSB.js → chunk-CCUDFLU3.js} +23 -6
  8. package/dist/{chunk-6LCIBMMG.js → chunk-D2ETQBHV.js} +1 -1
  9. package/dist/{chunk-K6LII3OE.js → chunk-FBSL2LZQ.js} +27 -23
  10. package/dist/{chunk-X276MF2W.js → chunk-OQACYT2D.js} +2 -0
  11. package/dist/index.d.ts +7 -7
  12. package/dist/index.js +8 -8
  13. package/dist/ios/styles.css +8 -0
  14. package/dist/patterns/index.js +2 -2
  15. package/dist/presets/index.d.ts +1 -1
  16. package/dist/presets/index.js +11 -2
  17. package/dist/styles.css +9 -0
  18. package/dist/{theme-provider-BE-KqUG-.d.ts → theme-provider-CuYYxF0o.d.ts} +1 -1
  19. package/dist/themes/atelier/index.d.ts +1 -1
  20. package/dist/themes/base/index.d.ts +1 -1
  21. package/dist/themes/ember/index.d.ts +1 -1
  22. package/dist/themes/index.d.ts +2 -2
  23. package/dist/themes/meridian/index.d.ts +1 -1
  24. package/dist/themes/poppy/index.d.ts +1 -1
  25. package/dist/themes/prism/index.d.ts +1 -1
  26. package/dist/themes/verdant/index.d.ts +1 -1
  27. package/llms/components/button.md +15 -3
  28. package/llms/components/input.md +1 -1
  29. package/llms/components/scrub-field.md +1 -1
  30. package/llms/components/select.md +1 -1
  31. package/llms/reference/token-intent.md +5 -1
  32. package/llms/tasks/getting-started.md +4 -0
  33. package/llms-full.txt +27 -7
  34. package/package.json +1 -1
  35. package/registry.json +2446 -8
  36. package/scripts/agent-setup.mjs +34 -7
  37. package/scripts/grade.mjs +33 -7
@@ -1,4 +1,4 @@
1
- import { SEMANTIC_TOKENS, WORKSPACE_SURFACE_TOKENS, DERIVED_EDGE_TOKENS, RADIUS_TOKENS, MOTION_TOKENS, TYPE_SCALE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_OVERLINE_TOKENS, DENSITY_TOKENS, LAYERING_TOKENS, TYPE_UI_TOKENS } from '../chunk-X276MF2W.js';
1
+ import { SEMANTIC_TOKENS, WORKSPACE_SURFACE_TOKENS, DERIVED_EDGE_TOKENS, RADIUS_TOKENS, MOTION_TOKENS, TYPE_SCALE_TOKENS, TYPE_REFINEMENT_TOKENS, TYPE_OVERLINE_TOKENS, DENSITY_TOKENS, LAYERING_TOKENS, TYPE_UI_TOKENS } from '../chunk-OQACYT2D.js';
2
2
 
3
3
  // src/presets/index.ts
4
4
  var PRESET_TOKEN_NAMES = [.../* @__PURE__ */ new Set([
@@ -23,7 +23,16 @@ var PRESET_TOKEN_NAMES = [.../* @__PURE__ */ new Set([
23
23
  "theme-shadow",
24
24
  "theme-shadow-md",
25
25
  "theme-shadow-lg",
26
- "theme-shadow-xl"
26
+ "theme-shadow-xl",
27
+ // Chart series colours: optional — a preset without them inherits Base's validated set.
28
+ "chart-1",
29
+ "chart-2",
30
+ "chart-3",
31
+ "chart-4",
32
+ "chart-5",
33
+ "chart-6",
34
+ "chart-7",
35
+ "chart-8"
27
36
  ])];
28
37
  var tokenNames = new Set(PRESET_TOKEN_NAMES);
29
38
  var record = (value) => !!value && typeof value === "object" && !Array.isArray(value);
package/dist/styles.css CHANGED
@@ -133,6 +133,8 @@
133
133
  --color-panel: var(--panel);
134
134
  --color-panel-foreground: var(--panel-foreground);
135
135
  --color-panel-raised: var(--panel-raised);
136
+ --color-panel-field: var(--panel-field);
137
+ --color-panel-field-hover: var(--panel-field-hover);
136
138
  --color-hairline: var(--hairline);
137
139
  --color-hairline-strong: var(--hairline-strong);
138
140
  }
@@ -319,6 +321,13 @@
319
321
  --panel-foreground: var(--theme-panel-foreground, var(--foreground));
320
322
  --panel-raised: var(--theme-panel-raised, color-mix(in oklch, var(--background) 94%, var(--foreground)));
321
323
 
324
+ /* A compact control docked in a panel: the xs field rung and a field-style
325
+ button. Inset to the canvas tone at rest, a panel step under the pointer.
326
+ Named so a panel control states its role instead of borrowing the work
327
+ surface's token and a fixed hover. */
328
+ --panel-field: var(--theme-panel-field, var(--canvas));
329
+ --panel-field-hover: var(--theme-panel-field-hover, var(--panel-raised));
330
+
322
331
  /* The structural edge. Alpha-based so it holds over any surface beneath it. */
323
332
  --hairline: var(--theme-hairline, color-mix(in oklch, transparent 93%, var(--foreground)));
324
333
  --hairline-strong: var(--theme-hairline-strong, color-mix(in oklch, transparent 86%, var(--foreground)));
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { T as ThemeManifest } from './_contract-o3tUc8Ig.js';
3
+ import { T as ThemeManifest } from './_contract-BlKMR4eX.js';
4
4
 
5
5
  declare const SABLE_THEME_ATTRIBUTE: "data-sable-theme";
6
6
  declare const DEFAULT_THEME_ID: string;
@@ -1,4 +1,4 @@
1
- import { T as ThemeManifest } from '../../_contract-o3tUc8Ig.js';
1
+ import { T as ThemeManifest } from '../../_contract-BlKMR4eX.js';
2
2
 
3
3
  /**
4
4
  * Mono Editorial — a Sable theme. Concrete token values live in
@@ -1,4 +1,4 @@
1
- import { T as ThemeManifest } from '../../_contract-o3tUc8Ig.js';
1
+ import { T as ThemeManifest } from '../../_contract-BlKMR4eX.js';
2
2
 
3
3
  /**
4
4
  * Base — the default Sable theme. Concrete token values live in
@@ -1,4 +1,4 @@
1
- import { T as ThemeManifest } from '../../_contract-o3tUc8Ig.js';
1
+ import { T as ThemeManifest } from '../../_contract-BlKMR4eX.js';
2
2
 
3
3
  /**
4
4
  * Ember — a Sable theme. Concrete token values live in
@@ -1,4 +1,4 @@
1
- export { A as AnyThemeId, D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, T as ThemeId, h as applySableColorMode, i as applySableTheme, j as buildThemeManifestById, k as defaultThemeId, l as featuredThemeManifests, m as getThemeManifest, n as isKnownThemeId, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from '../theme-provider-BE-KqUG-.js';
1
+ export { A as AnyThemeId, D as DEFAULT_THEME_ID, S as SABLE_COLOR_STORAGE_KEY, a as SABLE_THEME_ATTRIBUTE, b as SABLE_THEME_STORAGE_KEY, c as SableColorMode, d as SableThemeContextValue, e as SableThemePreference, f as SableThemeProvider, g as SableThemeProviderProps, T as ThemeId, h as applySableColorMode, i as applySableTheme, j as buildThemeManifestById, k as defaultThemeId, l as featuredThemeManifests, m as getThemeManifest, n as isKnownThemeId, o as isThemeId, t as themeIds, p as themeManifestById, q as themeManifests, u as useSableTheme } from '../theme-provider-CuYYxF0o.js';
2
2
  export { atelierTheme } from './atelier/index.js';
3
3
  export { baseTheme } from './base/index.js';
4
4
  export { default as emberTheme } from './ember/index.js';
@@ -7,4 +7,4 @@ export { default as poppyTheme } from './poppy/index.js';
7
7
  export { default as prismTheme } from './prism/index.js';
8
8
  export { default as verdantTheme } from './verdant/index.js';
9
9
  import 'react';
10
- import '../_contract-o3tUc8Ig.js';
10
+ import '../_contract-BlKMR4eX.js';
@@ -1,4 +1,4 @@
1
- import { T as ThemeManifest } from '../../_contract-o3tUc8Ig.js';
1
+ import { T as ThemeManifest } from '../../_contract-BlKMR4eX.js';
2
2
 
3
3
  /**
4
4
  * Meridian — a Sable theme. Concrete token values live in
@@ -1,4 +1,4 @@
1
- import { T as ThemeManifest } from '../../_contract-o3tUc8Ig.js';
1
+ import { T as ThemeManifest } from '../../_contract-BlKMR4eX.js';
2
2
 
3
3
  /** Original Sable preset; no third-party artwork or reference-site code. */
4
4
  declare const poppyTheme: ThemeManifest;
@@ -1,4 +1,4 @@
1
- import { T as ThemeManifest } from '../../_contract-o3tUc8Ig.js';
1
+ import { T as ThemeManifest } from '../../_contract-BlKMR4eX.js';
2
2
 
3
3
  /** Original Sable preset; no third-party artwork or reference-site code. */
4
4
  declare const prismTheme: ThemeManifest;
@@ -1,4 +1,4 @@
1
- import { T as ThemeManifest } from '../../_contract-o3tUc8Ig.js';
1
+ import { T as ThemeManifest } from '../../_contract-BlKMR4eX.js';
2
2
 
3
3
  /**
4
4
  * Verdant — a Sable theme. Concrete token values live in
@@ -35,7 +35,7 @@ Use Button when the user commits an action, submits a form, opens UI, or confirm
35
35
 
36
36
  | Name | Type | Default | Description |
37
37
  | --- | --- | --- | --- |
38
- | variant | "primary" \| "secondary" \| "ghost" \| "outline" \| "destructive" \| "link" \| "floating" \| "on-color" \| "on-color-outline" \| "on-color-ghost" | "primary" | Visual emphasis tier. One primary per screen. The on-color tiers are for buttons ON a coloured fill: they paint with the inherited text colour (the fill's ink) — on-color is solid (ink background, fill-coloured label via the optional --on-color-fill var, else black/white), on-color-outline and on-color-ghost are transparent with an ink label. Never use them on page or card surfaces. floating is for a control that sits OVER content (carousel arrows, a marquee pause, a jump-to-latest over a conversation): its own edge, lift and translucent popover fill, so it reads on arbitrary content beneath. |
38
+ | variant | "primary" \| "secondary" \| "ghost" \| "outline" \| "destructive" \| "link" \| "floating" \| "field" \| "on-color" \| "on-color-outline" \| "on-color-ghost" | "primary" | Visual emphasis tier. One primary per screen. The on-color tiers are for buttons ON a coloured fill: they paint with the inherited text colour (the fill's ink) — on-color is solid (ink background, fill-coloured label via the optional --on-color-fill var, else black/white), on-color-outline and on-color-ghost are transparent with an ink label. Never use them on page or card surfaces. floating is for a control that sits OVER content (carousel arrows, a marquee pause, a jump-to-latest over a conversation): its own edge, lift and translucent popover fill, so it reads on arbitrary content beneath. field is for a button docked in a workspace panel among xs fields: the inset panel-field fill and the field's corner, so a picker trigger or an add action reads as one of the row's controls; pair it with size xs or icon-xs. |
39
39
  | size | "xs" \| "sm" \| "md" \| "cta" \| "icon" \| "icon-sm" \| "icon-xs" | "md" | Reads the density ladder, so every value differs by register: page 28/32/40/44, workspace 24/28/32/36. xs and icon-xs were added in 0.31.0 for the workspace control floor and are the sizes tool chrome wants; md is the default everywhere. icon/icon-sm/icon-xs are square. |
40
40
  | render | ReactElement \| (props, state) => ReactElement | — | Compose with another element/component through the Base UI render prop. |
41
41
  | loading | boolean | false | Disable the button and show a leading Spinner while an action is in flight. Sets aria-busy; a native button is disabled, a render element (e.g. an <a>) gets aria-disabled. |
@@ -46,12 +46,12 @@ Use Button when the user commits an action, submits a form, opens UI, or confirm
46
46
 
47
47
  ## Variants
48
48
 
49
- - **variant**: primary, secondary, ghost, outline, destructive, link, floating, on-color, on-color-outline, on-color-ghost
49
+ - **variant**: primary, secondary, ghost, outline, destructive, link, floating, field, on-color, on-color-outline, on-color-ghost
50
50
  - **size**: xs, sm, md, cta, icon, icon-sm, icon-xs
51
51
 
52
52
  ## Tokens used
53
53
 
54
- `primary`, `primary-foreground`, `secondary`, `secondary-foreground`, `accent`, `accent-foreground`, `input`, `destructive`, `destructive-foreground`, `ring`
54
+ `primary`, `primary-foreground`, `secondary`, `secondary-foreground`, `accent`, `accent-foreground`, `input`, `destructive`, `destructive-foreground`, `ring`, `panel-field`, `panel-field-hover`, `panel-foreground`
55
55
 
56
56
  ## Motion
57
57
 
@@ -182,6 +182,18 @@ import { Button, Icon, NotificationBadge } from "@sableui/react"
182
182
  <Button size="icon" variant="ghost" aria-label="Notifications" badge={<NotificationBadge dot />}><Icon name="bell" /></Button>
183
183
  ```
184
184
 
185
+ ### Field button in a panel row
186
+
187
+ ```tsx
188
+ import { Button, Icon, PanelSection, PropertyRow } from "@sableui/react"
189
+
190
+ <PanelSection title="Text">
191
+ <PropertyRow label="Font">
192
+ <Button variant="field" size="xs" className="w-full justify-between" iconEnd={<Icon name="chevron-down" />}>Figtree</Button>
193
+ </PropertyRow>
194
+ </PanelSection>
195
+ ```
196
+
185
197
  ### On a coloured band
186
198
 
187
199
  ```tsx
@@ -33,7 +33,7 @@ Use Input for short freeform text, search, email, password, file, and native inp
33
33
 
34
34
  | Name | Type | Default | Description |
35
35
  | --- | --- | --- | --- |
36
- | size | "md" \| "xs" | "md" | md is the form field. xs is the dense inset field of a tool panel (an inset canvas fill, no outline, tight padding) — the same ladder as Select and Combobox. Use it instead of overriding the height with className. |
36
+ | size | "md" \| "xs" | "md" | md is the form field. xs is the dense inset field of a tool panel (an inset panel-field fill, no outline, tight padding) — the same ladder as Select and Combobox. Use it instead of overriding the height with className. |
37
37
  | type | string | "text" | Native input type (text, email, password, search, number, file, …). type="file" themes the native selector button via file: token utilities. |
38
38
  | disabled | boolean | false | Dims the control and blocks pointer interaction. |
39
39
  | aria-invalid | boolean | — | Surfaces the destructive border + ring. Base UI form fields set this automatically. |
@@ -40,7 +40,7 @@ Use ScrubField for numeric properties in tool chrome — an inspector, a propert
40
40
 
41
41
  ## Tokens used
42
42
 
43
- `foreground`, `muted-foreground`, `ring`, `canvas`, `panel-raised`
43
+ `foreground`, `muted-foreground`, `ring`, `panel-field`, `panel-field-hover`
44
44
 
45
45
  ## Accessibility
46
46
 
@@ -33,7 +33,7 @@ Use Select when users choose one value from a known, finite set. Use Combobox fo
33
33
 
34
34
  | Name | Type | Description |
35
35
  | --- | --- | --- |
36
- | SelectTrigger | Base UI Trigger props + placeholder?: ReactNode + size?: "md" \| "xs" + className | The button. Composes Trigger + Value + a chevron Icon that flips on open (data-[popup-open]). `size="xs"` is the property-grid rung — height, padding, radius AND surface move together, which is why it is a prop and not a className: the xs trigger is an inset `bg-canvas` field with no border, matching ScrubField on the same row. A consumer overriding only the height gets an md-register 8px radius on a 24px box and a raised card sitting among inset fields; one inspector panel had eleven of those, and both tells are visible at a glance. |
36
+ | SelectTrigger | Base UI Trigger props + placeholder?: ReactNode + size?: "md" \| "xs" + className | The button. Composes Trigger + Value + a chevron Icon that flips on open (data-[popup-open]). `size="xs"` is the property-grid rung — height, padding, radius AND surface move together, which is why it is a prop and not a className: the xs trigger is an inset `bg-panel-field` field with no border, matching ScrubField on the same row. A consumer overriding only the height gets an md-register 8px radius on a 24px box and a raised card sitting among inset fields; one inspector panel had eleven of those, and both tells are visible at a glance. |
37
37
  | SelectContent | Base UI Popup props + side, align, sideOffset + className | Portal + Positioner + Popup + List. side="bottom", align="start", sideOffset=6 by default; matches trigger width. |
38
38
  | SelectItem | { value: string; disabled?: boolean; label?: string } + className | An option. Composes Item + ItemText + a check ItemIndicator for the selected row. String children double as the item's `label`, so the closed trigger shows the display text — pass `label` explicitly only when children are richer than a string. |
39
39
  | SelectGroup | Base UI Group props + className | Optional grouping of related options. |
@@ -306,7 +306,7 @@ Which token to reach for, and what it is most often confused with. Generated fro
306
306
  - **`type-mono-sm-tracking`** — The monospace family: mono-xl through mono-sm, plus mono-caption. *Use for:* Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.
307
307
  - **Not** the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page.
308
308
 
309
- ### derived (8)
309
+ ### derived (10)
310
310
 
311
311
  - **`canvas`** — The WORK surface — the artboard, the document being edited. *Use for:* Behind the thing the tool operates on. `WorkspaceCanvas` uses it.
312
312
  - **Not** `background`. The thing being edited is not the page behind the UI, and collapsing the two makes the document indistinguishable from its chrome.
@@ -318,6 +318,10 @@ Which token to reach for, and what it is most often confused with. Generated fro
318
318
  - **Not** `foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.
319
319
  - **`panel-raised`** — One step up from `panel`: a selected row, a hover fill, a nested well. *Use for:* Tree row selection, hovered panel rows, and the light square of a checkerboard.
320
320
  - **Not** `accent`. In a workspace the tonal band is only a few units wide; `accent` is a page-register step and reads as a shout in chrome.
321
+ - **`panel-field`** — The inset fill of a compact control docked in a panel. *Use for:* The `size="xs"` field rung (Input, SelectTrigger, ScrubField share it) and `<Button variant="field">`. A panel control of your own that should sit among those fields.
322
+ - **Not** `canvas`. It resolves to the canvas tone by default, but `canvas` names the work surface; a field that borrows it says the wrong thing and stops following a theme that tunes its fields.
323
+ - **`panel-field-hover`** — The hover step of a `panel-field` control. *Use for:* `hover:bg-panel-field-hover` on anything filled with `panel-field`.
324
+ - **Not** `hover:bg-panel-raised`. A fixed surface token as a hover is what the surface-hover lint rejects; this one is defined against the panel field it steps from.
321
325
  - **`hairline`** — The 1px structural line that carries all separation in tool chrome. *Use for:* Between panel sections, under a toolbar, above a status bar.
322
326
  - **Not** a bigger tonal step. This is one of the two rules the workspace register deliberately reverses: on a page prefer space or tone over a line, in chrome the hairline *is* the structure.
323
327
  - **`hairline-strong`** — A hairline that must be seen — an input edge, a swatch ring. *Use for:* Bounding a control whose fill is arbitrary (a colour swatch) or user content.
@@ -48,6 +48,10 @@ pnpm exec sable doctor
48
48
  After installing Sable, run `pnpm exec sable setup --agent` in the target
49
49
  project. It installs discoverable entry files in `.agents/skills/sable` for
50
50
  Codex/Cursor and `.claude/skills/sable` for Claude Code; `--target` selects a host.
51
+ In a monorepo where Sable belongs to one workspace package, run setup in that
52
+ package with `--root` naming the repository root (for example
53
+ `pnpm --filter web exec sable setup --agent --root ../..`); the entries go
54
+ there and resolve Sable through the package.
51
55
  Each entry resolves `skills/sable/SKILL.md` from the installed package, so package
52
56
  upgrades also update the workflow. Other agents can read that file directly.
53
57
  Use `$sable build <idea>`, `inspire <references>`, `audit <target>`, or
package/llms-full.txt CHANGED
@@ -1759,6 +1759,10 @@ pnpm exec sable doctor
1759
1759
  After installing Sable, run `pnpm exec sable setup --agent` in the target
1760
1760
  project. It installs discoverable entry files in `.agents/skills/sable` for
1761
1761
  Codex/Cursor and `.claude/skills/sable` for Claude Code; `--target` selects a host.
1762
+ In a monorepo where Sable belongs to one workspace package, run setup in that
1763
+ package with `--root` naming the repository root (for example
1764
+ `pnpm --filter web exec sable setup --agent --root ../..`); the entries go
1765
+ there and resolve Sable through the package.
1762
1766
  Each entry resolves `skills/sable/SKILL.md` from the installed package, so package
1763
1767
  upgrades also update the workflow. Other agents can read that file directly.
1764
1768
  Use `$sable build <idea>`, `inspire <references>`, `audit <target>`, or
@@ -10885,7 +10889,7 @@ Use Button when the user commits an action, submits a form, opens UI, or confirm
10885
10889
 
10886
10890
  | Name | Type | Default | Description |
10887
10891
  | --- | --- | --- | --- |
10888
- | variant | "primary" \| "secondary" \| "ghost" \| "outline" \| "destructive" \| "link" \| "floating" \| "on-color" \| "on-color-outline" \| "on-color-ghost" | "primary" | Visual emphasis tier. One primary per screen. The on-color tiers are for buttons ON a coloured fill: they paint with the inherited text colour (the fill's ink) — on-color is solid (ink background, fill-coloured label via the optional --on-color-fill var, else black/white), on-color-outline and on-color-ghost are transparent with an ink label. Never use them on page or card surfaces. floating is for a control that sits OVER content (carousel arrows, a marquee pause, a jump-to-latest over a conversation): its own edge, lift and translucent popover fill, so it reads on arbitrary content beneath. |
10892
+ | variant | "primary" \| "secondary" \| "ghost" \| "outline" \| "destructive" \| "link" \| "floating" \| "field" \| "on-color" \| "on-color-outline" \| "on-color-ghost" | "primary" | Visual emphasis tier. One primary per screen. The on-color tiers are for buttons ON a coloured fill: they paint with the inherited text colour (the fill's ink) — on-color is solid (ink background, fill-coloured label via the optional --on-color-fill var, else black/white), on-color-outline and on-color-ghost are transparent with an ink label. Never use them on page or card surfaces. floating is for a control that sits OVER content (carousel arrows, a marquee pause, a jump-to-latest over a conversation): its own edge, lift and translucent popover fill, so it reads on arbitrary content beneath. field is for a button docked in a workspace panel among xs fields: the inset panel-field fill and the field's corner, so a picker trigger or an add action reads as one of the row's controls; pair it with size xs or icon-xs. |
10889
10893
  | size | "xs" \| "sm" \| "md" \| "cta" \| "icon" \| "icon-sm" \| "icon-xs" | "md" | Reads the density ladder, so every value differs by register: page 28/32/40/44, workspace 24/28/32/36. xs and icon-xs were added in 0.31.0 for the workspace control floor and are the sizes tool chrome wants; md is the default everywhere. icon/icon-sm/icon-xs are square. |
10890
10894
  | render | ReactElement \| (props, state) => ReactElement | — | Compose with another element/component through the Base UI render prop. |
10891
10895
  | loading | boolean | false | Disable the button and show a leading Spinner while an action is in flight. Sets aria-busy; a native button is disabled, a render element (e.g. an <a>) gets aria-disabled. |
@@ -10896,12 +10900,12 @@ Use Button when the user commits an action, submits a form, opens UI, or confirm
10896
10900
 
10897
10901
  ## Variants
10898
10902
 
10899
- - **variant**: primary, secondary, ghost, outline, destructive, link, floating, on-color, on-color-outline, on-color-ghost
10903
+ - **variant**: primary, secondary, ghost, outline, destructive, link, floating, field, on-color, on-color-outline, on-color-ghost
10900
10904
  - **size**: xs, sm, md, cta, icon, icon-sm, icon-xs
10901
10905
 
10902
10906
  ## Tokens used
10903
10907
 
10904
- `primary`, `primary-foreground`, `secondary`, `secondary-foreground`, `accent`, `accent-foreground`, `input`, `destructive`, `destructive-foreground`, `ring`
10908
+ `primary`, `primary-foreground`, `secondary`, `secondary-foreground`, `accent`, `accent-foreground`, `input`, `destructive`, `destructive-foreground`, `ring`, `panel-field`, `panel-field-hover`, `panel-foreground`
10905
10909
 
10906
10910
  ## Motion
10907
10911
 
@@ -11032,6 +11036,18 @@ import { Button, Icon, NotificationBadge } from "@sableui/react"
11032
11036
  <Button size="icon" variant="ghost" aria-label="Notifications" badge={<NotificationBadge dot />}><Icon name="bell" /></Button>
11033
11037
  ```
11034
11038
 
11039
+ ### Field button in a panel row
11040
+
11041
+ ```tsx
11042
+ import { Button, Icon, PanelSection, PropertyRow } from "@sableui/react"
11043
+
11044
+ <PanelSection title="Text">
11045
+ <PropertyRow label="Font">
11046
+ <Button variant="field" size="xs" className="w-full justify-between" iconEnd={<Icon name="chevron-down" />}>Figtree</Button>
11047
+ </PropertyRow>
11048
+ </PanelSection>
11049
+ ```
11050
+
11035
11051
  ### On a coloured band
11036
11052
 
11037
11053
  ```tsx
@@ -13721,7 +13737,7 @@ Use Input for short freeform text, search, email, password, file, and native inp
13721
13737
 
13722
13738
  | Name | Type | Default | Description |
13723
13739
  | --- | --- | --- | --- |
13724
- | size | "md" \| "xs" | "md" | md is the form field. xs is the dense inset field of a tool panel (an inset canvas fill, no outline, tight padding) — the same ladder as Select and Combobox. Use it instead of overriding the height with className. |
13740
+ | size | "md" \| "xs" | "md" | md is the form field. xs is the dense inset field of a tool panel (an inset panel-field fill, no outline, tight padding) — the same ladder as Select and Combobox. Use it instead of overriding the height with className. |
13725
13741
  | type | string | "text" | Native input type (text, email, password, search, number, file, …). type="file" themes the native selector button via file: token utilities. |
13726
13742
  | disabled | boolean | false | Dims the control and blocks pointer interaction. |
13727
13743
  | aria-invalid | boolean | — | Surfaces the destructive border + ring. Base UI form fields set this automatically. |
@@ -16706,7 +16722,7 @@ Use ScrubField for numeric properties in tool chrome — an inspector, a propert
16706
16722
 
16707
16723
  ## Tokens used
16708
16724
 
16709
- `foreground`, `muted-foreground`, `ring`, `canvas`, `panel-raised`
16725
+ `foreground`, `muted-foreground`, `ring`, `panel-field`, `panel-field-hover`
16710
16726
 
16711
16727
  ## Accessibility
16712
16728
 
@@ -16991,7 +17007,7 @@ Use Select when users choose one value from a known, finite set. Use Combobox fo
16991
17007
 
16992
17008
  | Name | Type | Description |
16993
17009
  | --- | --- | --- |
16994
- | SelectTrigger | Base UI Trigger props + placeholder?: ReactNode + size?: "md" \| "xs" + className | The button. Composes Trigger + Value + a chevron Icon that flips on open (data-[popup-open]). `size="xs"` is the property-grid rung — height, padding, radius AND surface move together, which is why it is a prop and not a className: the xs trigger is an inset `bg-canvas` field with no border, matching ScrubField on the same row. A consumer overriding only the height gets an md-register 8px radius on a 24px box and a raised card sitting among inset fields; one inspector panel had eleven of those, and both tells are visible at a glance. |
17010
+ | SelectTrigger | Base UI Trigger props + placeholder?: ReactNode + size?: "md" \| "xs" + className | The button. Composes Trigger + Value + a chevron Icon that flips on open (data-[popup-open]). `size="xs"` is the property-grid rung — height, padding, radius AND surface move together, which is why it is a prop and not a className: the xs trigger is an inset `bg-panel-field` field with no border, matching ScrubField on the same row. A consumer overriding only the height gets an md-register 8px radius on a 24px box and a raised card sitting among inset fields; one inspector panel had eleven of those, and both tells are visible at a glance. |
16995
17011
  | SelectContent | Base UI Popup props + side, align, sideOffset + className | Portal + Positioner + Popup + List. side="bottom", align="start", sideOffset=6 by default; matches trigger width. |
16996
17012
  | SelectItem | { value: string; disabled?: boolean; label?: string } + className | An option. Composes Item + ItemText + a check ItemIndicator for the selected row. String children double as the item's `label`, so the closed trigger shows the display text — pass `label` explicitly only when children are richer than a string. |
16997
17013
  | SelectGroup | Base UI Group props + className | Optional grouping of related options. |
@@ -20275,7 +20291,7 @@ Which token to reach for, and what it is most often confused with. Generated fro
20275
20291
  - **`type-mono-sm-tracking`** — The monospace family: mono-xl through mono-sm, plus mono-caption. *Use for:* Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.
20276
20292
  - **Not** the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page.
20277
20293
 
20278
- ### derived (8)
20294
+ ### derived (10)
20279
20295
 
20280
20296
  - **`canvas`** — The WORK surface — the artboard, the document being edited. *Use for:* Behind the thing the tool operates on. `WorkspaceCanvas` uses it.
20281
20297
  - **Not** `background`. The thing being edited is not the page behind the UI, and collapsing the two makes the document indistinguishable from its chrome.
@@ -20287,6 +20303,10 @@ Which token to reach for, and what it is most often confused with. Generated fro
20287
20303
  - **Not** `foreground`. That is the ink for `background` only; on any other surface it is a contrast gamble that happens to pass in the default theme and fails in another.
20288
20304
  - **`panel-raised`** — One step up from `panel`: a selected row, a hover fill, a nested well. *Use for:* Tree row selection, hovered panel rows, and the light square of a checkerboard.
20289
20305
  - **Not** `accent`. In a workspace the tonal band is only a few units wide; `accent` is a page-register step and reads as a shout in chrome.
20306
+ - **`panel-field`** — The inset fill of a compact control docked in a panel. *Use for:* The `size="xs"` field rung (Input, SelectTrigger, ScrubField share it) and `<Button variant="field">`. A panel control of your own that should sit among those fields.
20307
+ - **Not** `canvas`. It resolves to the canvas tone by default, but `canvas` names the work surface; a field that borrows it says the wrong thing and stops following a theme that tunes its fields.
20308
+ - **`panel-field-hover`** — The hover step of a `panel-field` control. *Use for:* `hover:bg-panel-field-hover` on anything filled with `panel-field`.
20309
+ - **Not** `hover:bg-panel-raised`. A fixed surface token as a hover is what the surface-hover lint rejects; this one is defined against the panel field it steps from.
20290
20310
  - **`hairline`** — The 1px structural line that carries all separation in tool chrome. *Use for:* Between panel sections, under a toolbar, above a status bar.
20291
20311
  - **Not** a bigger tonal step. This is one of the two rules the workspace register deliberately reverses: on a page prefer space or tone over a line, in chrome the hairline *is* the structure.
20292
20312
  - **`hairline-strong`** — A hairline that must be seen — an input edge, a swatch ring. *Use for:* Bounding a control whose fill is arbitrary (a colour swatch) or user content.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sableui/react",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Sable: themeable React components, layout patterns, and tools for coding agents.",
5
5
  "type": "module",
6
6
  "sideEffects": [