@moldable-ai/ui 0.2.29 → 0.2.32

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 (215) hide show
  1. package/dist/catalog/component-catalog.d.ts +9 -2
  2. package/dist/catalog/component-catalog.d.ts.map +1 -1
  3. package/dist/catalog/component-catalog.js +11 -7
  4. package/dist/catalog/core-control-stories.d.ts.map +1 -1
  5. package/dist/catalog/core-control-stories.js +1 -1
  6. package/dist/catalog/core-foundation-stories.d.ts.map +1 -1
  7. package/dist/catalog/core-foundation-stories.js +5 -5
  8. package/dist/components/app-error-boundary.d.ts +1 -1
  9. package/dist/components/chat/chat-image-lightbox.d.ts +8 -0
  10. package/dist/components/chat/chat-image-lightbox.d.ts.map +1 -1
  11. package/dist/components/chat/chat-image-lightbox.js +24 -2
  12. package/dist/components/chat/chat-input.d.ts +3 -2
  13. package/dist/components/chat/chat-input.d.ts.map +1 -1
  14. package/dist/components/chat/chat-input.js +3 -3
  15. package/dist/components/chat/chat-message.d.ts.map +1 -1
  16. package/dist/components/chat/chat-message.js +3 -1
  17. package/dist/components/chat/chat-panel.d.ts +3 -1
  18. package/dist/components/chat/chat-panel.d.ts.map +1 -1
  19. package/dist/components/chat/chat-panel.js +53 -39
  20. package/dist/components/chat/conversation-history.d.ts +4 -2
  21. package/dist/components/chat/conversation-history.d.ts.map +1 -1
  22. package/dist/components/chat/conversation-history.js +20 -15
  23. package/dist/components/ui/alert.d.ts +1 -1
  24. package/dist/components/ui/app-frame.d.ts +20 -1
  25. package/dist/components/ui/app-frame.d.ts.map +1 -1
  26. package/dist/components/ui/app-frame.js +37 -7
  27. package/dist/components/ui/badge.d.ts +1 -1
  28. package/dist/components/ui/badge.js +1 -1
  29. package/dist/components/ui/button.d.ts +5 -3
  30. package/dist/components/ui/button.d.ts.map +1 -1
  31. package/dist/components/ui/button.js +39 -11
  32. package/dist/components/ui/card.d.ts +12 -2
  33. package/dist/components/ui/card.d.ts.map +1 -1
  34. package/dist/components/ui/card.js +3 -2
  35. package/dist/components/ui/checkbox.d.ts +4 -1
  36. package/dist/components/ui/checkbox.d.ts.map +1 -1
  37. package/dist/components/ui/checkbox.js +4 -4
  38. package/dist/components/ui/context-menu.d.ts.map +1 -1
  39. package/dist/components/ui/context-menu.js +7 -6
  40. package/dist/components/ui/date-field.d.ts +1 -1
  41. package/dist/components/ui/dropdown-menu.d.ts +1 -0
  42. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  43. package/dist/components/ui/dropdown-menu.js +9 -8
  44. package/dist/components/ui/icon-button.d.ts +1 -1
  45. package/dist/components/ui/icon-button.d.ts.map +1 -1
  46. package/dist/components/ui/icon-button.js +1 -0
  47. package/dist/components/ui/input.d.ts +6 -2
  48. package/dist/components/ui/input.d.ts.map +1 -1
  49. package/dist/components/ui/input.js +2 -2
  50. package/dist/components/ui/material.d.ts +8 -3
  51. package/dist/components/ui/material.d.ts.map +1 -1
  52. package/dist/components/ui/material.js +2 -2
  53. package/dist/components/ui/menu-items.d.ts +2 -1
  54. package/dist/components/ui/menu-items.d.ts.map +1 -1
  55. package/dist/components/ui/menu-items.js +3 -2
  56. package/dist/components/ui/message-scroller-controller.d.ts +15 -17
  57. package/dist/components/ui/message-scroller-controller.d.ts.map +1 -1
  58. package/dist/components/ui/message-scroller-controller.js +106 -91
  59. package/dist/components/ui/message-scroller-primitive.d.ts +2 -0
  60. package/dist/components/ui/message-scroller-primitive.d.ts.map +1 -1
  61. package/dist/components/ui/message-scroller-primitive.js +2 -0
  62. package/dist/components/ui/message-scroller.d.ts.map +1 -1
  63. package/dist/components/ui/message-scroller.js +2 -2
  64. package/dist/components/ui/number-input.d.ts +1 -1
  65. package/dist/components/ui/popover.js +1 -1
  66. package/dist/components/ui/search-field.d.ts +4 -2
  67. package/dist/components/ui/search-field.d.ts.map +1 -1
  68. package/dist/components/ui/search-field.js +16 -6
  69. package/dist/components/ui/segmented-control.d.ts +3 -1
  70. package/dist/components/ui/segmented-control.d.ts.map +1 -1
  71. package/dist/components/ui/segmented-control.js +23 -17
  72. package/dist/components/ui/select.js +2 -2
  73. package/dist/components/ui/sidebar.d.ts +10 -4
  74. package/dist/components/ui/sidebar.d.ts.map +1 -1
  75. package/dist/components/ui/sidebar.js +74 -17
  76. package/dist/components/ui/status.d.ts +1 -1
  77. package/dist/components/ui/status.js +1 -1
  78. package/dist/components/ui/switch.d.ts +3 -1
  79. package/dist/components/ui/switch.d.ts.map +1 -1
  80. package/dist/components/ui/switch.js +3 -2
  81. package/dist/components/ui/toolbar-controls.d.ts +13 -3
  82. package/dist/components/ui/toolbar-controls.d.ts.map +1 -1
  83. package/dist/components/ui/toolbar-controls.js +35 -10
  84. package/dist/components/ui/toolbar.d.ts +5 -4
  85. package/dist/components/ui/toolbar.d.ts.map +1 -1
  86. package/dist/components/ui/toolbar.js +3 -3
  87. package/dist/index.d.ts +2 -1
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +3 -1
  90. package/dist/lib/frame-lifecycle.d.ts +1 -0
  91. package/dist/lib/frame-lifecycle.d.ts.map +1 -1
  92. package/dist/lib/frame-lifecycle.js +7 -0
  93. package/dist/lib/theme.d.ts +39 -5
  94. package/dist/lib/theme.d.ts.map +1 -1
  95. package/dist/lib/theme.js +105 -17
  96. package/dist/tokens/contracts.d.ts +79 -0
  97. package/dist/tokens/contracts.d.ts.map +1 -0
  98. package/dist/tokens/contracts.js +57 -0
  99. package/dist/tokens/index.d.ts +2 -0
  100. package/dist/tokens/index.d.ts.map +1 -0
  101. package/dist/tokens/index.js +1 -0
  102. package/docs/README.md +2 -0
  103. package/docs/adaptive-materials.md +14 -9
  104. package/docs/design-tokens.md +10 -6
  105. package/docs/foundations.md +3 -3
  106. package/docs/macos-design-audit.md +144 -0
  107. package/docs/native-integration.md +4 -4
  108. package/docs/platform-architecture.md +189 -0
  109. package/docs/standalone-app-windows.md +37 -0
  110. package/docs/visual-regression.md +6 -8
  111. package/package.json +13 -1
  112. package/src/components/ui/accordion.md +46 -0
  113. package/src/components/ui/alert.md +12 -4
  114. package/src/components/ui/app-frame.md +8 -5
  115. package/src/components/ui/aspect-ratio.md +37 -0
  116. package/src/components/ui/avatar.md +48 -0
  117. package/src/components/ui/breadcrumb.md +52 -0
  118. package/src/components/ui/button-group.md +43 -0
  119. package/src/components/ui/button.md +21 -4
  120. package/src/components/ui/calendar.md +42 -0
  121. package/src/components/ui/card.md +43 -0
  122. package/src/components/ui/carousel.md +47 -0
  123. package/src/components/ui/chart.md +52 -0
  124. package/src/components/ui/checkbox.md +36 -0
  125. package/src/components/ui/collapsible.md +2 -3
  126. package/src/components/ui/color-well.md +14 -4
  127. package/src/components/ui/combobox.md +3 -3
  128. package/src/components/ui/confirm-dialog.md +5 -4
  129. package/src/components/ui/context-menu.md +3 -2
  130. package/src/components/ui/date-field.md +6 -1
  131. package/src/components/ui/date-picker.md +6 -3
  132. package/src/components/ui/dialog.md +14 -12
  133. package/src/components/ui/drawer.md +58 -0
  134. package/src/components/ui/dropdown-menu.md +16 -14
  135. package/src/components/ui/error-boundary-view.md +1 -1
  136. package/src/components/ui/field.md +2 -1
  137. package/src/components/ui/form.md +71 -0
  138. package/src/components/ui/grid.md +4 -3
  139. package/src/components/ui/icon-button.md +4 -1
  140. package/src/components/ui/input-group.md +49 -0
  141. package/src/components/ui/input-otp.md +56 -0
  142. package/src/components/ui/input.md +40 -0
  143. package/src/components/ui/inspector.md +47 -7
  144. package/src/components/ui/item.md +5 -3
  145. package/src/components/ui/kbd.md +30 -0
  146. package/src/components/ui/label.md +29 -0
  147. package/src/components/ui/list.md +2 -2
  148. package/src/components/ui/material.md +25 -12
  149. package/src/components/ui/menu-items.md +62 -0
  150. package/src/components/ui/menubar.md +58 -0
  151. package/src/components/ui/message-scroller-primitive.md +70 -0
  152. package/src/components/ui/message-scroller.md +89 -0
  153. package/src/components/ui/navigation-button-group.md +4 -3
  154. package/src/components/ui/navigation-menu.md +52 -0
  155. package/src/components/ui/number-input.md +8 -0
  156. package/src/components/ui/pagination.md +51 -0
  157. package/src/components/ui/panel.md +6 -0
  158. package/src/components/ui/popover.md +10 -7
  159. package/src/components/ui/progress.md +31 -0
  160. package/src/components/ui/radio-group.md +36 -0
  161. package/src/components/ui/resizable.md +2 -1
  162. package/src/components/ui/scroll-area.md +3 -1
  163. package/src/components/ui/search-field.md +6 -1
  164. package/src/components/ui/segmented-control.md +6 -1
  165. package/src/components/ui/separator.md +35 -0
  166. package/src/components/ui/sidebar.md +29 -6
  167. package/src/components/ui/skeleton.md +36 -0
  168. package/src/components/ui/slider.md +58 -0
  169. package/src/components/ui/spinner.md +41 -0
  170. package/src/components/ui/split-view.md +8 -4
  171. package/src/components/ui/switch.md +44 -0
  172. package/src/components/ui/table.md +7 -7
  173. package/src/components/ui/tabs.md +3 -1
  174. package/src/components/ui/textarea.md +41 -0
  175. package/src/components/ui/toggle-group.md +2 -2
  176. package/src/components/ui/toggle.md +9 -9
  177. package/src/components/ui/toolbar-controls.md +24 -12
  178. package/src/components/ui/toolbar.md +6 -6
  179. package/src/styles/index.css +298 -117
  180. package/src/tokens/contracts.ts +131 -0
  181. package/src/tokens/index.css +6 -0
  182. package/src/tokens/index.ts +23 -0
  183. package/src/tokens/macos-26/README.md +37 -0
  184. package/src/tokens/macos-26/aliases.css +53 -0
  185. package/src/tokens/macos-26/compatibility.css +7 -0
  186. package/src/tokens/macos-26/index.css +3 -0
  187. package/src/tokens/macos-26/source/provenance.generated.json +28 -0
  188. package/src/tokens/macos-26/source/sidebar.generated.css +29 -0
  189. package/src/tokens/macos-26/source.css +7 -0
  190. package/src/tokens/macos-26/web-adaptations.json +25 -0
  191. package/src/tokens/macos-26/web-adaptations.md +15 -0
  192. package/src/tokens/macos-27/accessibility.css +11 -0
  193. package/src/tokens/macos-27/aliases.css +304 -0
  194. package/src/tokens/macos-27/compatibility.css +212 -0
  195. package/src/tokens/macos-27/index.css +15 -0
  196. package/src/tokens/macos-27/recipes.css +23 -0
  197. package/src/tokens/macos-27/source/chrome.generated.css +338 -0
  198. package/src/tokens/macos-27/source/colors.generated.css +140 -0
  199. package/src/tokens/macos-27/source/context.generated.css +18 -0
  200. package/src/tokens/macos-27/source/controls.generated.css +764 -0
  201. package/src/tokens/macos-27/source/effects.generated.css +68 -0
  202. package/src/tokens/macos-27/source/kit.generated.css +50 -0
  203. package/src/tokens/macos-27/source/overlays-status.generated.css +931 -0
  204. package/src/tokens/macos-27/source/paint-styles.generated.css +81 -0
  205. package/src/tokens/macos-27/source/provenance.generated.json +62 -0
  206. package/src/tokens/macos-27/source/sizes.generated.css +385 -0
  207. package/src/tokens/macos-27/source/source.generated.json +554 -0
  208. package/src/tokens/macos-27/source/text-styles.generated.css +116 -0
  209. package/src/tokens/macos-27/source.css +17 -0
  210. package/src/tokens/macos-27/web-adaptations.css +98 -0
  211. package/src/tokens/macos-27/web-adaptations.json +163 -0
  212. package/src/tokens/macos-27/web-adaptations.md +117 -0
  213. package/src/tokens/moldable/brand.css +165 -0
  214. package/src/tokens/moldable/index.css +1 -0
  215. package/src/tokens/platform-contract.test.ts +294 -0
@@ -0,0 +1,44 @@
1
+ # Switch
2
+
3
+ ## Purpose
4
+
5
+ `Switch` changes a boolean setting that takes effect as soon as it is toggled.
6
+ Use it for preferences such as notifications, syncing, or visibility.
7
+
8
+ ## Usage
9
+
10
+ ```tsx
11
+ import { Label, Switch } from '@moldable-ai/ui'
12
+
13
+ ;<div className="flex items-center justify-between gap-3">
14
+ <Label htmlFor="sync-changes">Sync changes</Label>
15
+ <Switch
16
+ id="sync-changes"
17
+ checked={syncChanges}
18
+ onCheckedChange={setSyncChanges}
19
+ />
20
+ </div>
21
+ ```
22
+
23
+ ## API
24
+
25
+ - Accepts Radix Switch root props, including `checked`, `defaultChecked`,
26
+ `onCheckedChange`, `disabled`, `required`, `name`, and `value`.
27
+ - `size` is `default` or `sm` and defaults to `default`.
28
+ - `controlSize` accepts the shared `ControlSize` values (`mini`, `small`,
29
+ `medium`, `large`, or `xl`) and overrides the size-derived token setting.
30
+ - Without `controlSize`, `size="sm"` resolves to `small`; the default resolves
31
+ to `medium`.
32
+ - Supports checked, unchecked, active, focus-visible, and disabled states.
33
+ - Exports `Switch`.
34
+
35
+ ## Guidance
36
+
37
+ - Pair the switch with a visible `Label` using `htmlFor` and `id`, or provide an
38
+ `aria-label` when no visible label is possible.
39
+ - Use controlled state when the value is persisted or shared with another
40
+ surface.
41
+ - Write labels for the setting itself, such as “Sync changes,” rather than
42
+ “Enable” or “On.”
43
+ - Use a checkbox for selections submitted as a group and a button for one-shot
44
+ actions.
@@ -28,10 +28,10 @@ Structured, comparable data with shared density and row-selection behavior.
28
28
  Use `compact` for inspector-like datasets, `default` for general work, and
29
29
  `comfortable` where scanning matters more than density.
30
30
 
31
- When a row is selectable, selection is controlled by the caller and can be
32
- toggled with pointer, Enter, or Space. Independent buttons, links, form
33
- controls, and editable descendants keep their own pointer and keyboard
34
- behavior without toggling the containing row. Call `event.preventDefault()` in
35
- a row event handler only when an app needs to cancel the built-in row response.
36
- For rich grid navigation, column sorting, or cell editing, use a dedicated data
37
- grid rather than layering those interactions onto a basic table.
31
+ Pass `selected` and `onSelectionChange` together for a selectable row; either
32
+ prop alone marks the row as selectable. Selection is controlled by the caller
33
+ and toggles with pointer, Enter, or Space. Independent buttons, links, form
34
+ controls, and editable descendants keep their own behavior without toggling
35
+ the row. Call `event.preventDefault()` in a row event handler only when an app
36
+ needs to cancel the built-in response. For rich grid navigation, column
37
+ sorting, or cell editing, use a dedicated data grid.
@@ -36,7 +36,9 @@ Use the `line` variant in dense app chrome where a filled segmented control woul
36
36
 
37
37
  ## API summary
38
38
 
39
- - `Tabs`: Radix Tabs root; supports controlled `value`/`onValueChange`, `defaultValue`, `orientation`, activation direction, and other root props. Orientation defaults to `horizontal`.
39
+ - `Tabs`: Radix Tabs root; supports controlled `value`/`onValueChange`,
40
+ `defaultValue`, `orientation`, text direction, activation mode, and other root
41
+ props. Orientation defaults to `horizontal`.
40
42
  - `TabsList`: `variant="default"` or `"line"`. Defaults to `default`.
41
43
  - `TabsTrigger`: requires a `value` matching a content panel; supports `disabled`.
42
44
  - `TabsContent`: requires a matching `value`.
@@ -0,0 +1,41 @@
1
+ # Textarea
2
+
3
+ ## Purpose
4
+
5
+ `Textarea` is a native multiline text field for notes, descriptions, comments,
6
+ and other freeform input.
7
+
8
+ ## Usage
9
+
10
+ ```tsx
11
+ import { Label, Textarea } from '@moldable-ai/ui'
12
+
13
+ ;<div className="grid gap-2">
14
+ <Label htmlFor="description">Description</Label>
15
+ <Textarea
16
+ id="description"
17
+ name="description"
18
+ placeholder="Describe this project"
19
+ maxLength={500}
20
+ />
21
+ </div>
22
+ ```
23
+
24
+ ## API
25
+
26
+ - Accepts native `textarea` props, event handlers, and `className`.
27
+ - Supports controlled `value`/`onChange` and uncontrolled `defaultValue`.
28
+ - Uses content-based field sizing with a minimum height of `4rem`.
29
+ - Includes placeholder, focus-visible, disabled, and `aria-invalid` styling.
30
+ - Exports `Textarea`.
31
+
32
+ ## Guidance
33
+
34
+ - Always provide a visible label; use `aria-describedby` for help or validation
35
+ text.
36
+ - Set `aria-invalid="true"` only when an error is present, and associate the
37
+ error message with the field.
38
+ - Add `maxLength` and a visible character count when input length is constrained.
39
+ - Preserve the native keyboard, selection, form, and resize behavior.
40
+ - Use `Input` for a single line and a rich-text editor only when formatting is
41
+ genuinely required.
@@ -51,8 +51,8 @@ Multiple selection:
51
51
 
52
52
  - `ToggleGroup`: Radix Toggle Group root. `type="single"` uses a string value; `type="multiple"` uses a string array.
53
53
  - Supports controlled `value`/`onValueChange` and uncontrolled `defaultValue`.
54
- - `variant`: `default` or `outline`, shared with each item.
55
- - `size`: `default`, `sm`, or `lg`, shared with each item.
54
+ - `variant`: `default`, `outline`, or `filled`, shared with each item.
55
+ - `size`: `xs`, `sm`, `default`, or `lg`, shared with each item.
56
56
  - `spacing`: numeric Tailwind spacing multiplier; defaults to `0`. At zero, items join into one segmented shape.
57
57
  - `ToggleGroupItem`: requires `value`; may override `variant` or `size` when the group does not supply them.
58
58
  - Both parts accept corresponding Radix primitive props and `className`.
@@ -9,8 +9,8 @@ Use `Button` for a one-shot command and `Switch` for a settings-style boolean th
9
9
  ## Usage patterns
10
10
 
11
11
  ```tsx
12
- import { WrapText } from 'lucide-react'
13
- import { Toggle } from '@moldable-ai/ui'
12
+ import { Pin, WrapText } from 'lucide-react'
13
+ import { Toggle, ToggleButton } from '@moldable-ai/ui'
14
14
 
15
15
  ;<Toggle
16
16
  pressed={wrap}
@@ -24,18 +24,18 @@ import { Toggle } from '@moldable-ai/ui'
24
24
  </Toggle>
25
25
  ```
26
26
 
27
- For an icon-only toolbar control:
27
+ For an icon-only toolbar control, use the typed `ToggleButton` facade:
28
28
 
29
29
  ```tsx
30
- <Toggle
30
+ <ToggleButton
31
+ iconOnly
31
32
  defaultPressed
32
33
  variant="outline"
33
34
  size="sm"
34
- className="cursor-pointer px-0"
35
35
  aria-label="Pin inspector"
36
36
  >
37
37
  <Pin />
38
- </Toggle>
38
+ </ToggleButton>
39
39
  ```
40
40
 
41
41
  Pair icon-only use with a tooltip.
@@ -45,8 +45,8 @@ Pair icon-only use with a tooltip.
45
45
  - Built on Radix Toggle and accepts its root props.
46
46
  - `pressed` and `onPressedChange`: controlled state.
47
47
  - `defaultPressed`: uncontrolled initial state.
48
- - `variant`: `default` or `outline`.
49
- - `size`: `default`, `sm`, or `lg`.
48
+ - `variant`: `default`, `outline`, or `filled`.
49
+ - `size`: `xs`, `sm`, `default`, or `lg`.
50
50
  - Supports native button accessibility props such as `aria-label` and `disabled`.
51
51
  - `toggleVariants` is exported and shared by `ToggleGroup`.
52
52
 
@@ -54,7 +54,7 @@ Pair icon-only use with a tooltip.
54
54
 
55
55
  - Use controlled state when the preference affects another pane or persisted setting.
56
56
  - Make the pressed state legible through shape or icon treatment as well as color.
57
- - Add `cursor-pointer`, an accessible name, and a tooltip for icon-only toggles.
57
+ - Give icon-only toggles an accessible name and a tooltip.
58
58
  - Keep toolbar toggles compact and aligned with adjacent controls.
59
59
  - Use a specific icon tied to the state.
60
60
 
@@ -6,11 +6,14 @@ keeping app toolbars visually consistent.
6
6
 
7
7
  ```tsx
8
8
  <Toolbar position="top">
9
- <ToolbarSidebarToggle
10
- expanded={sidebarOpen}
11
- onExpandedChange={setSidebarOpen}
12
- />
13
- <ToolbarBackButton onClick={goBack} />
9
+ <ToolbarControlGroup aria-label="Navigation">
10
+ <ToolbarSidebarToggle
11
+ expanded={sidebarOpen}
12
+ onExpandedChange={setSidebarOpen}
13
+ />
14
+ <ToolbarControlSeparator />
15
+ <ToolbarBackButton onClick={goBack} />
16
+ </ToolbarControlGroup>
14
17
  <ToolbarTitleField value={title} onChange={rename} />
15
18
  <ToolbarActions>
16
19
  <ToolbarControlGroup aria-label="History">
@@ -29,30 +32,37 @@ keeping app toolbars visually consistent.
29
32
  ]}
30
33
  onSelectItem={handleMoreAction}
31
34
  />
32
- <ToolbarButton variant="default">Present</ToolbarButton>
35
+ <ToolbarButton variant="prominent">Present</ToolbarButton>
33
36
  </ToolbarActions>
34
37
  </Toolbar>
35
38
  ```
36
39
 
37
40
  ## Components
38
41
 
39
- - `ToolbarButton` — text or mixed-content action. Defaults to 36px native
40
- chrome; use `variant="default"` for the one primary action.
42
+ - `ToolbarButton` — text or mixed-content action. Standalone chrome is a real
43
+ adaptive material surface: `material="regular"` by default and
44
+ `material="thick"` for `variant="prominent"`. Set `material="none"` or
45
+ `appearance="quiet"` to remove it.
41
46
  - `ToolbarIconButton` — required accessible label and optional tooltip.
42
47
  - `ToolbarBackButton` — single chevron Back affordance for root-to-detail
43
48
  navigation.
44
49
  - `ToolbarSidebarToggle` — controlled sidebar visibility button with accurate
45
50
  pressed state and dynamic label.
46
51
  - `ToolbarOverflowMenu` — an ellipsis button backed by Moldable's declarative
47
- menu API, including the native host menu when available.
52
+ portable menu API. Set `nativeMenu` to opt into the native host menu.
48
53
  - `ToolbarControlGroup` — a shared surface for closely related actions such as
49
- Undo/Redo. Children automatically become compact quiet controls.
54
+ Undo/Redo. It defaults to `size="xl"`, supports `size="medium"`, and makes
55
+ children compact quiet controls.
50
56
  - `ToolbarControlSeparator` — divider within a related action group.
51
57
  - `ToolbarTitleField` — an accessible, inline-editable contextual title.
52
58
 
53
59
  `ToolbarButton` and `ToolbarIconButton` accept `appearance="quiet"` when a
54
- standalone action should not have raised chrome. The default `chrome`
55
- appearance uses the `toolbar` Button variant and these semantic tokens:
60
+ standalone action should not have raised chrome. `ToolbarButton` uses the
61
+ shared adaptive `Material` layer; `ToolbarIconButton` uses the compact toolbar
62
+ control treatment. `ToolbarControlGroup` also accepts `appearance="quiet"`
63
+ when related controls should not share a raised surface. Grouped buttons do
64
+ not add a nested material layer. Raised compact controls use these semantic
65
+ tokens:
56
66
 
57
67
  - `--toolbar-control-background`
58
68
  - `--toolbar-control-hover`
@@ -66,6 +76,8 @@ transparency.
66
76
  ## Composition rules
67
77
 
68
78
  - Keep the current document or view title leading and the primary action last.
79
+ - Use fully rounded standalone controls and shared pill surfaces for related
80
+ controls. Avoid drawing a separate rounded rectangle around every icon.
69
81
  - Prefer icon-only secondary controls and a text-only primary action.
70
82
  - Put only genuinely related commands in `ToolbarControlGroup`.
71
83
  - Move low-frequency commands such as history, duplicate, export, and delete
@@ -12,9 +12,9 @@ embedded view.
12
12
  <ToolbarDescription>Local workspace</ToolbarDescription>
13
13
  </ToolbarContent>
14
14
  <ToolbarActions>
15
- <Button size="icon-sm" aria-label="New note">
15
+ <ToolbarIconButton label="New note" tooltip>
16
16
  <Plus />
17
- </Button>
17
+ </ToolbarIconButton>
18
18
  </ToolbarActions>
19
19
  </Toolbar>
20
20
  ```
@@ -28,10 +28,10 @@ when there is no useful view context; the remaining toolbar still provides a
28
28
  drag surface and a safe home for right-aligned actions.
29
29
 
30
30
  The `inset` prop defaults to `auto`. Use `none` for a top toolbar that is not
31
- window chrome, `windowControls` to force the standard control lane, or
32
- `windowControlsAndButton` when another leading control sits beside the native
33
- traffic lights. Set `draggable={false}` only for top toolbars that are nested
34
- inside app content.
31
+ window chrome, `windowControls` to explicitly declare the standard control
32
+ lane, or `windowControlsAndButton` when another leading control sits beside
33
+ the native traffic lights. Set `draggable={false}` only for top toolbars that
34
+ are nested inside app content.
35
35
 
36
36
  The default toolbar uses `material="regular"`. The `plain` and `panel` variants
37
37
  default to `material="none"`; pass a material explicitly only when the toolbar