@flood-md/agent 0.2.10 → 0.2.12

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 (140) hide show
  1. package/DESIGN.md +8 -5
  2. package/README.md +1 -1
  3. package/SKILL.md +11 -0
  4. package/dist/catalog.json +1914 -278
  5. package/dist/materials/component-app-shell.md +49 -0
  6. package/dist/materials/component-app-top-bar.md +36 -0
  7. package/dist/materials/component-autocomplete.md +54 -0
  8. package/dist/materials/component-bulk-action-bar.md +52 -0
  9. package/dist/materials/component-button.md +1 -0
  10. package/dist/materials/component-card.md +2 -2
  11. package/dist/materials/component-collapsible.md +1 -0
  12. package/dist/materials/component-collection-toolbar.md +69 -0
  13. package/dist/materials/component-collection-view-switcher.md +49 -0
  14. package/dist/materials/component-combobox.md +10 -0
  15. package/dist/materials/component-command-palette.md +53 -0
  16. package/dist/materials/component-copy-button.md +1 -0
  17. package/dist/materials/component-data-table.md +34 -4
  18. package/dist/materials/component-date-picker.md +1 -0
  19. package/dist/materials/component-date-range-picker.md +1 -0
  20. package/dist/materials/component-date-time-picker.md +2 -0
  21. package/dist/materials/component-date-time-range-picker.md +4 -0
  22. package/dist/materials/component-drawer.md +1 -0
  23. package/dist/materials/component-editable.md +4 -0
  24. package/dist/materials/component-figure.md +1 -1
  25. package/dist/materials/component-filter-condition.md +53 -0
  26. package/dist/materials/component-filter-group.md +55 -0
  27. package/dist/materials/component-heading.md +1 -1
  28. package/dist/materials/component-icon-button.md +2 -0
  29. package/dist/materials/component-menubar.md +41 -0
  30. package/dist/materials/component-multi-select.md +10 -0
  31. package/dist/materials/component-navigation-group.md +51 -0
  32. package/dist/materials/component-navigation-item.md +59 -0
  33. package/dist/materials/component-navigation-tree.md +8 -0
  34. package/dist/materials/component-overflow-actions.md +47 -0
  35. package/dist/materials/component-page-header.md +40 -0
  36. package/dist/materials/component-popover.md +2 -1
  37. package/dist/materials/component-radio-card.md +2 -2
  38. package/dist/materials/component-section.md +1 -1
  39. package/dist/materials/component-segmented-control.md +6 -4
  40. package/dist/materials/component-sheet.md +49 -0
  41. package/dist/materials/component-sidebar.md +64 -0
  42. package/dist/materials/component-sparkline.md +41 -0
  43. package/dist/materials/component-table.md +2 -0
  44. package/dist/materials/component-tabs.md +2 -0
  45. package/dist/materials/component-text.md +2 -2
  46. package/dist/materials/component-toggle.md +1 -0
  47. package/dist/materials/component-toolbar.md +5 -0
  48. package/dist/materials/component-tooltip.md +1 -1
  49. package/dist/materials/guide-agent-knowledge.md +13 -6
  50. package/dist/materials/guide-agents.md +8 -1
  51. package/dist/materials/guide-foundations.md +45 -2
  52. package/dist/materials/guide-installation.md +6 -6
  53. package/dist/materials/guide-interface-content.md +1 -1
  54. package/dist/materials/guide-introduction.md +4 -2
  55. package/dist/materials/guide-layout.md +39 -10
  56. package/dist/materials/guide-motion.md +66 -0
  57. package/dist/materials/guide-skills.md +9 -0
  58. package/dist/materials/recipe-collection-views.md +670 -0
  59. package/dist/materials/recipe-command-palette.md +31 -52
  60. package/dist/materials/recipe-filter-bar.md +12 -3
  61. package/dist/materials/recipe-grouped-form.md +5 -0
  62. package/dist/materials/recipe-navigation-workspace.md +222 -0
  63. package/dist/materials/recipe-record-management.md +310 -0
  64. package/dist/materials/recipe-record-workspace.md +207 -0
  65. package/dist/materials/recipe-settings-workspace.md +232 -0
  66. package/dist/materials/token-sys.color.context.base.action-disabled.json +41 -0
  67. package/dist/materials/token-sys.color.context.base.action-hover.json +41 -0
  68. package/dist/materials/token-sys.color.context.base.action-pressed.json +41 -0
  69. package/dist/materials/token-sys.color.context.base.action-rest.json +41 -0
  70. package/dist/materials/token-sys.color.context.base.avatar-background.json +41 -0
  71. package/dist/materials/token-sys.color.context.base.border-decorative.json +41 -0
  72. package/dist/materials/token-sys.color.context.base.divider-decorative.json +41 -0
  73. package/dist/materials/token-sys.color.context.base.field-background.json +41 -0
  74. package/dist/materials/token-sys.color.context.base.field-border.json +41 -0
  75. package/dist/materials/token-sys.color.context.base.field-disabled.json +41 -0
  76. package/dist/materials/token-sys.color.context.base.field-readonly.json +41 -0
  77. package/dist/materials/token-sys.color.context.base.indicator-track.json +41 -0
  78. package/dist/materials/token-sys.color.context.base.loading-placeholder.json +41 -0
  79. package/dist/materials/token-sys.color.context.base.muted-background.json +41 -0
  80. package/dist/materials/token-sys.color.context.base.on-surface-action-disabled.json +41 -0
  81. package/dist/materials/token-sys.color.context.base.on-surface-action-hover.json +41 -0
  82. package/dist/materials/token-sys.color.context.base.on-surface-action-pressed.json +41 -0
  83. package/dist/materials/token-sys.color.context.base.on-surface-action-rest.json +41 -0
  84. package/dist/materials/token-sys.color.context.base.selection-background.json +41 -0
  85. package/dist/materials/token-sys.color.context.base.supporting-background.json +41 -0
  86. package/dist/materials/token-sys.color.context.filled.action-disabled.json +41 -0
  87. package/dist/materials/token-sys.color.context.filled.action-hover.json +41 -0
  88. package/dist/materials/token-sys.color.context.filled.action-pressed.json +41 -0
  89. package/dist/materials/token-sys.color.context.filled.action-rest.json +41 -0
  90. package/dist/materials/token-sys.color.context.filled.avatar-background.json +41 -0
  91. package/dist/materials/token-sys.color.context.filled.border-decorative.json +41 -0
  92. package/dist/materials/token-sys.color.context.filled.divider-decorative.json +41 -0
  93. package/dist/materials/token-sys.color.context.filled.field-background.json +41 -0
  94. package/dist/materials/token-sys.color.context.filled.field-border.json +41 -0
  95. package/dist/materials/token-sys.color.context.filled.field-disabled.json +41 -0
  96. package/dist/materials/token-sys.color.context.filled.field-readonly.json +41 -0
  97. package/dist/materials/token-sys.color.context.filled.indicator-track.json +41 -0
  98. package/dist/materials/token-sys.color.context.filled.loading-placeholder.json +41 -0
  99. package/dist/materials/token-sys.color.context.filled.muted-background.json +41 -0
  100. package/dist/materials/token-sys.color.context.filled.selection-background.json +41 -0
  101. package/dist/materials/token-sys.color.context.filled.supporting-background.json +41 -0
  102. package/dist/materials/token-sys.color.field.readonly.json +41 -0
  103. package/dist/materials/token-sys.color.surface.avatar.json +41 -0
  104. package/dist/materials/token-sys.color.surface.current.json +41 -0
  105. package/dist/materials/token-sys.color.surface.muted.json +41 -0
  106. package/dist/materials/token-sys.color.surface.supporting.json +41 -0
  107. package/dist/materials/token-sys.motion.distance-panel.json +36 -0
  108. package/dist/materials/token-sys.motion.distance-small.json +36 -0
  109. package/dist/materials/token-sys.motion.duration-enter.json +36 -0
  110. package/dist/materials/token-sys.motion.duration-exit.json +36 -0
  111. package/dist/materials/token-sys.motion.duration-layer.json +36 -0
  112. package/dist/materials/token-sys.motion.duration-loop.json +36 -0
  113. package/dist/materials/token-sys.motion.duration-press.json +36 -0
  114. package/dist/materials/token-sys.motion.easing-enter.json +38 -0
  115. package/dist/materials/token-sys.motion.easing-exit.json +38 -0
  116. package/knowledge.json +115 -2
  117. package/lib/inspect.mjs +11 -0
  118. package/manifest.json +11 -1
  119. package/package.json +9 -3
  120. package/references/component-families.md +150 -0
  121. package/references/composition.md +16 -4
  122. package/references/customization.md +14 -0
  123. package/references/flood-composition/SKILL.md +4 -0
  124. package/references/flood-data-display/SKILL.md +146 -0
  125. package/references/flood-feedback/SKILL.md +37 -0
  126. package/references/flood-forms/SKILL.md +31 -0
  127. package/references/flood-foundations/SKILL.md +36 -0
  128. package/references/flood-hierarchy/SKILL.md +27 -7
  129. package/references/flood-interface-content/SKILL.md +33 -5
  130. package/references/flood-motion/SKILL.md +47 -0
  131. package/references/flood-navigation/SKILL.md +195 -0
  132. package/references/flood-overlays/SKILL.md +41 -0
  133. package/references/flood-records/SKILL.md +65 -2
  134. package/references/flood-spacing/SKILL.md +45 -0
  135. package/references/flood-verification/SKILL.md +20 -0
  136. package/references/interface-content-examples.md +4 -0
  137. package/references/rendered-review.md +5 -0
  138. package/references/spacing.md +30 -0
  139. package/rules.json +98 -8
  140. package/workflows.json +28 -3
@@ -0,0 +1,55 @@
1
+ # FilterGroup
2
+
3
+ A flat controlled group of filter conditions with matching and row management.
4
+
5
+ Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
+
7
+ ## Example
8
+
9
+ ```tsx
10
+ "use client";
11
+
12
+ import { FloodRoot, FilterGroup } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <FilterGroup label="Project conditions"
19
+ properties={[{id:"status",label:"Status",options:[{value:"active",label:"Active"},{value:"paused",label:"Paused"}]}]}
20
+ value={{match:"all",conditions:[]}} onValueChange={(filters) => console.log(filters)} />
21
+ </FloodRoot>
22
+ );
23
+ }
24
+ ```
25
+
26
+ ## Design notes
27
+
28
+ - Composes FilterCondition, SegmentedControl, Fieldset, Stack, Inline, Button and IconSlot. The group adds no separate material or decorative nested container.
29
+ - value and onValueChange are controlled. Stable condition IDs survive row edits and removals; new rows propose an enabled available property and empty values. Empty values remain an incomplete draft.
30
+ - All/any is shown only with at least two conditions. Removing rows preserves the selected match value. An empty group offers Add condition; it does not invent an onboarding message.
31
+ - Duplicate properties are prevented for new choices by default. allowDuplicateProperties enables them; maxConditions optionally limits additions. Existing accepted rows are never silently deleted when constraints change. Add remains visible and disabled when no additions are available.
32
+ - Accepted additions focus the new property control. Accepted removal focuses a surviving neighbour or Add. Refused controlled proposals do not move focus or mutate accepted conditions; delayed acceptance must not steal focus from a different target.
33
+ - label names the group, hideLabel defaults to true, labels localizes group controls, and conditionLabels localizes each row. controlSize defaults to sm; disabled blocks all edits.
34
+ - The host owns Apply/Cancel, accepted query evaluation, persistence, validation and server semantics. This is a flat finite-choice editor, not a nested query engine.
35
+
36
+ ## API reference
37
+
38
+ | Prop | Values | Default |
39
+ | --- | --- | --- |
40
+ | `legendSize · 0.2.10` | `"label" \| "section"` | `—` |
41
+ | `hideLabel · 0.2.3` | `boolean` | `—` |
42
+ | `hint` | `ReactNode` | `—` |
43
+ | `error` | `ReactNode` | `—` |
44
+ | `message` | `ReactNode` | `—` |
45
+ | `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
46
+ | `label` | `string` | `Required` |
47
+ | `properties` | `readonly FilterConditionProperty[]` | `Required` |
48
+ | `value` | `FilterGroupValue` | `Required` |
49
+ | `onValueChange` | `(value: FilterGroupValue) => void` | `Required` |
50
+ | `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
51
+ | `allowDuplicateProperties` | `boolean` | `—` |
52
+ | `maxConditions` | `number` | `—` |
53
+ | `labels` | `Partial<Record<"match" \| "all" \| "any" \| "add" \| "condition", string>>` | `—` |
54
+ | `conditionLabels` | `FilterConditionProps["labels"]` | `—` |
55
+ | `Native HTML props` | `Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, "children" \| "legend" \| "onChange">` | `Forwarded` |
@@ -34,5 +34,5 @@ export function Example() {
34
34
  | Prop | Values | Default |
35
35
  | --- | --- | --- |
36
36
  | `level` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `2` |
37
- | `size` | `"display" \| "large" \| "page" \| "section"` | `"page"` |
37
+ | `size` | `"display" \| "large" \| "page" \| "section" \| "group"` | `"page"` |
38
38
  | `Native HTML props` | `HTMLAttributes<HTMLHeadingElement>` | `Forwarded` |
@@ -35,7 +35,9 @@ export function Example() {
35
35
  | Prop | Values | Default |
36
36
  | --- | --- | --- |
37
37
  | `variant` | `"solid" \| "subtle" \| "outline" \| "ghost"` | `"subtle"` |
38
+ | `tone` | `"default" \| "danger"` | `—` |
38
39
  | `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` |
39
40
  | `loading` | `boolean` | `—` |
40
41
  | `label` | `string` | `Required` |
42
+ | `iconSize` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `size` |
41
43
  | `Native HTML props` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-label">` | `Forwarded` |
@@ -0,0 +1,41 @@
1
+ # Menubar
2
+
3
+ Coordinated desktop application command menus with roving triggers and shared open state.
4
+
5
+ Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
+
7
+ ## Example
8
+
9
+ ```tsx
10
+ "use client";
11
+
12
+ import { FloodRoot, Menubar } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <Menubar label="Editor commands" menus={[{id:"file",label:"File",items:[{id:"new",label:"New document"},{id:"export",label:"Export"}]},{id:"edit",label:"Edit",items:[{id:"undo",label:"Undo"},{id:"redo",label:"Redo",disabled:true}]}]} />
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Arrow keys coordinate enabled menu triggers; child menus reuse Menu focus and dismissal.
27
+ - Use native links and NavigationList for destinations, not Menubar. Controlled openValue may refuse transitions.
28
+
29
+ ## API reference
30
+
31
+ | Prop | Values | Default |
32
+ | --- | --- | --- |
33
+ | `label` | `string` | `Required` |
34
+ | `menus` | `readonly MenubarMenu[]` | `Required` |
35
+ | `openValue` | `string \| null` | `—` |
36
+ | `defaultOpenValue` | `string \| null` | `—` |
37
+ | `onOpenValueChange` | `(id: string \| null) => void` | `—` |
38
+ | `onAction` | `(menuId: string, actionId: string) => void` | `—` |
39
+ | `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
40
+ | `disabled` | `boolean` | `—` |
41
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "onAction">` | `Forwarded` |
@@ -45,6 +45,16 @@ export function Example() {
45
45
  | `toggleLabel` | `string` | `"Show options"` |
46
46
  | `clearLabel` | `string` | `"Clear selection"` |
47
47
  | `invalidSelectionMessage` | `string` | `"Select at least one option."` |
48
+ | `query` | `string` | `—` |
49
+ | `onQueryChange` | `(query: string) => void` | `—` |
50
+ | `filtering` | `"local" \| "manual"` | `—` |
51
+ | `optionsQuery` | `string` | `—` |
52
+ | `selectedOptions` | `readonly ComboboxOption[]` | `—` |
53
+ | `loadState` | `"ready" \| "loading" \| "error"` | `—` |
54
+ | `loadingMessage` | `string` | `—` |
55
+ | `errorMessage` | `string` | `—` |
56
+ | `onRetry` | `() => void` | `—` |
57
+ | `retryLabel` | `string` | `—` |
48
58
  | `value` | `readonly string[]` | `—` |
49
59
  | `defaultValue` | `readonly string[]` | `[]` |
50
60
  | `onValueChange` | `(value: string[]) => void` | `—` |
@@ -0,0 +1,51 @@
1
+ # NavigationGroup
2
+
3
+ Related navigation with optional headings, section actions, separators and disclosure.
4
+
5
+ Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
+
7
+ ## Example
8
+
9
+ ```tsx
10
+ "use client";
11
+
12
+ import { FloodRoot, NavigationGroup, NavigationItem } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <NavigationGroup label="Projects">
19
+ <NavigationItem label="Design system" href="/projects/design" />
20
+ <NavigationItem label="Website" href="/projects/website" />
21
+ </NavigationGroup>
22
+ </FloodRoot>
23
+ );
24
+ }
25
+ ```
26
+
27
+ ## Design notes
28
+
29
+ - Groups related navigation without inventing routes or application-menu semantics. Compose actual NavigationItem destinations or NavigationTree children.
30
+ - label, hideLabel, headingAction and separator are independent optional presentation choices. Keep headings and separators only when they clarify real relationships.
31
+ - collapsible uses Flood Collapsible and independent expanded/defaultExpanded/onExpandedChange state; an unaccepted request does not hide accepted content.
32
+ - Compact mode keeps destinations reachable while removing redundant heading text; compare section actions and body rows on the same rail axis.
33
+ - Original compatible addition in the unpublished 0.2.11 source candidate.
34
+
35
+ ## API reference
36
+
37
+ | Prop | Values | Default |
38
+ | --- | --- | --- |
39
+ | `label` | `string` | `—` |
40
+ | `hideLabel` | `boolean` | `—` |
41
+ | `headingAction` | `ReactNode` | `—` |
42
+ | `separator` | `boolean` | `—` |
43
+ | `collapsible` | `boolean` | `—` |
44
+ | `expanded` | `boolean` | `—` |
45
+ | `defaultExpanded` | `boolean` | `—` |
46
+ | `onExpandedChange` | `(expanded: boolean) => void` | `—` |
47
+ | `compact` | `boolean` | `—` |
48
+ | `size` | `"sm" \| "md" \| "lg"` | `—` |
49
+ | `collapseDisabled` | `boolean` | `—` |
50
+ | `children` | `ReactNode` | `—` |
51
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "title" \| "onChange">` | `Forwarded` |
@@ -0,0 +1,59 @@
1
+ # NavigationItem
2
+
3
+ One shared navigation row for destinations, commands and independent disclosure.
4
+
5
+ Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
+
7
+ ## Example
8
+
9
+ ```tsx
10
+ "use client";
11
+
12
+ import { FloodRoot, NavigationItem } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <NavigationItem label="Projects" href="/projects" current />
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Uses Flood Link or Button; navigation links remain native anchors with host handlers. Commands and destination clicks do not silently toggle a branch.
27
+ - disclosure without a destination makes the complete row a disclosure button. href plus disclosure creates separate link and disclosure targets in one shared surface; expanded is controlled by the host.
28
+ - compact leaf rows retain names through Tooltip. Use NavigationTree for compact branches and link-plus-branch items so the full navigation remains reachable in a Popover.
29
+ - IconSlot owns leading artwork; IconButton keeps the disclosure target with smaller supporting artwork. trailing is noninteractive metadata, not a place to nest another button inside a link.
30
+ - trailingAction is an independent sibling control in expanded rows. It is visible alongside any trailing metadata. Use a named IconButton and apply its own disabled state.
31
+ - Original compatible addition in the unpublished 0.2.11 source candidate.
32
+
33
+ ## API reference
34
+
35
+ | Prop | Values | Default |
36
+ | --- | --- | --- |
37
+ | `label` | `string` | `Required` |
38
+ | `description` | `string` | `—` |
39
+ | `icon` | `ReactNode` | `—` |
40
+ | `reserveIcon` | `boolean` | `—` |
41
+ | `trailing` | `ReactNode` | `—` |
42
+ | `trailingAction` | `ReactNode` | `—` |
43
+ | `href` | `string` | `—` |
44
+ | `linkProps` | `Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' \| 'children' \| 'aria-current'>` | `—` |
45
+ | `onAction` | `()=>void` | `—` |
46
+ | `actionProps` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>` | `—` |
47
+ | `disclosure` | `NavigationItemDisclosure` | `—` |
48
+ | `current` | `boolean` | `—` |
49
+ | `currentKind` | `'page' \| 'location'` | `—` |
50
+ | `ancestorCurrent` | `boolean` | `—` |
51
+ | `disabled` | `boolean` | `—` |
52
+ | `size` | `'sm' \| 'md' \| 'lg'` | `—` |
53
+ | `compact` | `boolean` | `—` |
54
+ | `variant` | `'quiet' \| 'standard'` | `—` |
55
+ | `tooltip` | `boolean` | `—` |
56
+ | `tooltipSide` | `'left' \| 'right'` | `—` |
57
+ | `controlRef` | `Ref<HTMLElement>` | `—` |
58
+ | `disclosureRef` | `Ref<HTMLButtonElement>` | `—` |
59
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, 'children' \| 'onChange'>` | `Forwarded` |
@@ -27,6 +27,9 @@ export function Example() {
27
27
  - A branch may have both href and children: its native link navigates while a separate disclosure button expands. currentValue marks the matching destination; ancestors are expanded explicitly by the host.
28
28
  - Expansion is controlled or uncontrolled through expandedValues/defaultExpandedValues/onExpandedValuesChange. Translate disclosure names with expandLabel; content can render host-owned loading or empty branch content.
29
29
  - Item values must be globally unique and children acyclic. Disabled destinations have no active href; parent disability does not propagate to children. Introduced in 0.2.7.
30
+ - compact creates an icon rail with real leaf links and full Popover navigation for branches. flyoutSide controls placement; current descendant styling is separate from aria-current. trailing accepts metadata in expanded rows. Compact labels remain accessible and have native title hints.
31
+ - currentKind defaults to page. Use location when the active value identifies a broader global navigation context rather than the exact current page.
32
+ - Enable branchGuides for dense nested lists. Item trailingAction uses the shared NavigationItem slot in expanded rows and on destinations inside branch flyouts.
30
33
 
31
34
  ## API reference
32
35
 
@@ -35,9 +38,14 @@ export function Example() {
35
38
  | `label` | `string` | `Required` |
36
39
  | `items` | `readonly NavigationTreeItem[]` | `Required` |
37
40
  | `currentValue` | `string` | `—` |
41
+ | `currentKind` | `"page" \| "location"` | `—` |
38
42
  | `expandedValues` | `readonly string[]` | `—` |
39
43
  | `defaultExpandedValues` | `readonly string[]` | `—` |
40
44
  | `onExpandedValuesChange` | `(values: string[]) => void` | `—` |
41
45
  | `expandLabel` | `(item: NavigationTreeItem, expanded: boolean) => string` | `—` |
42
46
  | `size` | `"sm" \| "md" \| "lg"` | `—` |
47
+ | `variant` | `"quiet" \| "standard"` | `—` |
48
+ | `compact` | `boolean` | `—` |
49
+ | `flyoutSide` | `"left" \| "right"` | `—` |
50
+ | `branchGuides` | `boolean` | `—` |
43
51
  | `Native HTML props` | `Omit<HTMLAttributes<HTMLElement>, "children" \| "onChange">` | `Forwarded` |
@@ -0,0 +1,47 @@
1
+ # OverflowActions
2
+
3
+ A priority-based action row that moves commands into a More menu when space is limited.
4
+
5
+ Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
+
7
+ ## Example
8
+
9
+ ```tsx
10
+ "use client";
11
+
12
+ import { FloodRoot, OverflowActions } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <OverflowActions label="Document actions" shape="pill" items={[{id:"save",label:"Save",priority:10},{id:"duplicate",label:"Duplicate"},{id:"archive",label:"Archive"}]} />
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Compose commands rather than links. Higher priority remains visible longer; source order is preserved.
27
+ - Uses existing Toolbar, Button, IconSlot and Menu; hidden measurements are inert and excluded from the accessibility tree.
28
+ - shape defaults to pill; rounded restores the field-radius Toolbar shell. Available width excludes Toolbar padding.
29
+ - containerVariant="plain" delegates a surface-free rail to Toolbar, keeping peer control heights aligned; contained is the default. variant still styles the actions themselves.
30
+
31
+ ## API reference
32
+
33
+ | Prop | Values | Default |
34
+ | --- | --- | --- |
35
+ | `label` | `string` | `Required` |
36
+ | `items` | `readonly OverflowAction[]` | `Required` |
37
+ | `onAction` | `(id: string) => void` | `—` |
38
+ | `moreLabel` | `string` | `—` |
39
+ | `size` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
40
+ | `variant` | `ButtonProps["variant"]` | `—` |
41
+ | `shape` | `ToolbarProps["shape"]` | `—` |
42
+ | `containerVariant` | `ToolbarProps["variant"]` | `—` |
43
+ | `disabled` | `boolean` | `—` |
44
+ | `leading` | `ReactNode` | `—` |
45
+ | `trailing` | `ReactNode` | `—` |
46
+ | `maxVisibleActions` | `number` | `—` |
47
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "onAction">` | `Forwarded` |
@@ -0,0 +1,40 @@
1
+ # PageHeader
2
+
3
+ The main page heading with optional supporting text and page actions.
4
+
5
+ Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
+
7
+ ## Example
8
+
9
+ ```tsx
10
+ "use client";
11
+
12
+ import { FloodRoot, PageHeader, Button } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <PageHeader title="Projects" actions={<Button>New project</Button>} />
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Use inside main for the page's h1. An embedded preview can choose headingLevel={2}. Use Section for titled content within the page.
27
+ - Add a description only when it supplies context the title cannot. Keep filters in the collection toolbar.
28
+ - Actions wrap below the title when the header's own container narrows. The heading stays first in reading and keyboard order.
29
+
30
+ ## API reference
31
+
32
+ | Prop | Values | Default |
33
+ | --- | --- | --- |
34
+ | `title` | `string` | `Required` |
35
+ | `description` | `ReactNode` | `—` |
36
+ | `actions` | `ReactNode` | `—` |
37
+ | `headingId` | `string` | `—` |
38
+ | `headingLevel` | `1 \| 2` | `1` |
39
+ | `headingSize` | `"page" \| "large" \| "display"` | `"large"` |
40
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLElement>, "title" \| "children">` | `Forwarded` |
@@ -32,7 +32,7 @@ export function Example() {
32
32
  | Prop | Values | Default |
33
33
  | --- | --- | --- |
34
34
  | `title` | `string` | `Required` |
35
- | `chrome` | `"default" \| "minimal"` | `—` |
35
+ | `chrome` | `"default" \| "minimal" \| "title-only"` | `—` |
36
36
  | `trigger` | `(props: OverlayTriggerProps) => ReactNode` | `Required` |
37
37
  | `children` | `ReactNode` | `—` |
38
38
  | `open` | `boolean` | `—` |
@@ -44,4 +44,5 @@ export function Example() {
44
44
  | `closeLabel` | `string` | `"Close"` |
45
45
  | `initialFocusRef` | `RefObject<HTMLElement \| null>` | `—` |
46
46
  | `positionReference` | `RefObject<HTMLElement \| null>` | `—` |
47
+ | `focusOnOpen` | `boolean` | `—` |
47
48
  | `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "title" \| "role">` | `Forwarded` |
@@ -17,8 +17,8 @@ export function Example() {
17
17
  <FloodRoot>
18
18
  <Fieldset legend="Plan">
19
19
  <Stack gap="2">
20
- <RadioCard name="plan" value="starter" label="Starter" description="For your next idea." metadata="Free" defaultChecked />
21
- <RadioCard name="plan" value="team" label="Team" description="For working together." metadata="$12 / month" />
20
+ <RadioCard name="plan" value="starter" label="Starter" description="1 project, up to 3 members" metadata="Free" defaultChecked />
21
+ <RadioCard name="plan" value="team" label="Team" description="Unlimited projects, up to 25 members" metadata="$12 / month" />
22
22
  </Stack>
23
23
  </Fieldset>
24
24
  </FloodRoot>
@@ -38,5 +38,5 @@ export function Example() {
38
38
  | `description` | `ReactNode` | `—` |
39
39
  | `actions` | `ReactNode` | `—` |
40
40
  | `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` | `2` |
41
- | `headingSize` | `"display" \| "large" \| "page" \| "section"` | `"section"` |
41
+ | `headingSize` | `HeadingProps["size"]` | `"section"` |
42
42
  | `Native HTML props` | `Omit<HTMLAttributes<HTMLElement>, "title">` | `Forwarded` |
@@ -1,6 +1,6 @@
1
1
  # SegmentedControl
2
2
 
3
- A compact single-value choice with native radio semantics and a shared inset surface.
3
+ A compact single-value choice or collection view switcher with native radio semantics.
4
4
 
5
5
  Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
6
 
@@ -15,7 +15,7 @@ import "@flood-md/react/styles.css";
15
15
  export function Example() {
16
16
  return (
17
17
  <FloodRoot>
18
- <SegmentedControl label="Time range" name="period" defaultValue="day" options={[{value: "day", label: "Day"}, {value: "week", label: "Week"}, {value: "month", label: "Month"}]} />
18
+ <SegmentedControl label="Claims view" name="claims-view" defaultValue="pending" options={[{value: "pending", label: "Pending", count: 2}, {value: "reviewed", label: "Reviewed"}]} />
19
19
  </FloodRoot>
20
20
  );
21
21
  }
@@ -25,7 +25,9 @@ export function Example() {
25
25
 
26
26
  - Uses original RadioGroup behavior and native inputs.
27
27
  - Arrow keys move focus and select; Home/End select endpoints, skipping disabled segments. Selecting the current value does not clear it.
28
- - Native name/form/required, reset and controlled values are preserved. Use actual tabs for tab panels, ToggleGroup for optional pressed actions.
28
+ - Use SegmentedControl to switch a shared collection between mutually exclusive views. Use Tabs for associated content panels and ToggleGroup for optional pressed actions.
29
+ - An option count can communicate workload without a nested badge or a second control. Counts are read with visible labels, preserve zero, and are omitted in icon-only mode. Format localized counts before passing them.
30
+ - Native name/form/required, reset and controlled values are preserved.
29
31
 
30
32
  ## API reference
31
33
 
@@ -44,7 +46,7 @@ export function Example() {
44
46
  | `orientation` | `"vertical" \| "horizontal"` | `"horizontal"` |
45
47
  | `required` | `boolean` | `—` |
46
48
  | `label` | `string` | `Required` |
47
- | `options` | `readonly ToggleOption[]` | `Required` |
49
+ | `options` | `readonly SegmentedControlOption[]` | `Required` |
48
50
  | `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
49
51
  | `iconOnly` | `boolean` | `false` |
50
52
  | `fullWidth` | `boolean` | `false` |
@@ -0,0 +1,49 @@
1
+ # Sheet
2
+
3
+ A bottom-aligned modal for short tasks, navigation and touch-friendly choices.
4
+
5
+ Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
+
7
+ ## Example
8
+
9
+ ```tsx
10
+ "use client";
11
+
12
+ import { FloodRoot, Sheet, Button, Field, Input } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <Sheet title="Project settings" trigger={props => <Button {...props}>Open settings</Button>}>
19
+ <Field label="Project name">{control => <Input {...control} defaultValue="Flood" />}</Field>
20
+ </Sheet>
21
+ </FloodRoot>
22
+ );
23
+ }
24
+ ```
25
+
26
+ ## Design notes
27
+
28
+ - Sheet shares Drawer's modal semantics, dismissal, focus restoration, scrollable body and optional footer. Its scrollbar fits in the panel padding. Placement is always bottom.
29
+ - The panel grows with content up to its size limit. Keep actions that must remain visible in the footer and use ListBox for selectable options.
30
+ - Use a sheet for touch navigation or short choices that benefit from a wider target. Anchored popovers and selects remain useful on desktop. Available in 0.2.12.
31
+
32
+ ## API reference
33
+
34
+ | Prop | Values | Default |
35
+ | --- | --- | --- |
36
+ | `title` | `string` | `Required` |
37
+ | `description` | `string` | `—` |
38
+ | `trigger` | `(props: OverlayTriggerProps) => ReactNode` | `Required` |
39
+ | `children` | `ReactNode` | `—` |
40
+ | `open` | `boolean` | `—` |
41
+ | `defaultOpen` | `boolean` | `—` |
42
+ | `onOpenChange` | `(open: boolean) => void` | `—` |
43
+ | `disabled` | `boolean` | `—` |
44
+ | `closeLabel` | `string` | `—` |
45
+ | `closeOnOutsideClick` | `boolean` | `—` |
46
+ | `initialFocusRef` | `RefObject<HTMLElement \| null>` | `—` |
47
+ | `size` | `"sm" \| "md" \| "lg"` | `"md"` |
48
+ | `footer` | `ReactNode` | `—` |
49
+ | `Native HTML props` | `Omit<Omit<HTMLAttributes<HTMLDialogElement>, "children" \| "title" \| "role">, "side">` | `Forwarded` |
@@ -0,0 +1,64 @@
1
+ # Sidebar
2
+
3
+ A bounded workspace sidebar with grouped destinations, a compact rail and nested navigation flyouts.
4
+
5
+ Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
+
7
+ ## Example
8
+
9
+ ```tsx
10
+ "use client";
11
+
12
+ import { FloodRoot, Sidebar } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <div style={{height:"32rem"}}><Sidebar label="Workspace navigation" groups={[{id:"workspace",label:"Workspace",items:[{value:"overview",label:"Overview",href:"#overview"},{value:"projects",label:"Projects",children:[{value:"design",label:"Design system",href:"#design"}]}]}]} currentValue="overview" /></div>
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Composes NavigationTree, ScrollArea, IconButton, Stack and Text. Host controls height; header/footer remain fixed while the navigation body scrolls with reserved scrollbar clearance.
27
+ - collapsed/defaultCollapsed/onCollapsedChange control the full-width versus compact rail. Controlled refusals preserve accepted geometry. side supports logical start/end; width affects expanded mode only. collapsible=false omits the toggle.
28
+ - groups need unique IDs and globally unique item values. Destinations retain real links; expansion and currentValue are independent. Disabled items cannot navigate or open a branch.
29
+ - expandedValues/defaultExpandedValues/onExpandedValuesChange retain branch disclosure across width changes. In compact mode a top-level branch opens a Popover with full navigation; choosing a destination closes that flyout. No route is inferred or persisted.
30
+ - header/footer accept content or a ({collapsed}) render function. Adapt meaningful content using that state, rather than hiding arbitrary descendants with CSS. The host owns workspace/account menus and their actions.
31
+ - The inline headerLayout puts the expanded identity and toggle on one row. The stacked default keeps the toggle in its original place across states. Enable branchGuides per group for dense nesting.
32
+ - Item icons use IconSlot; trailing content can compose Badge or other meaningful metadata in expanded mode. Compact destinations retain accessible names and native title labels; missing icons have a neutral fallback glyph.
33
+ - No automatic mobile drawer, routing, resizing, keyboard shortcut or preference storage is added. Check the bounded host, enlarged text, RTL, final scroll item, real destinations and focus across collapse/flyout transitions.
34
+ - groups can hide a redundant visual label with hideLabel while preserving the navigation name. currentKind="location" marks a global module; page is the default contextual destination. The workspace playground composes Sidebar profiles into GlobalRail plus ContextBar without duplicate flyouts.
35
+ - variant defaults to quiet in the 0.2.11 candidate: muted inactive content, normal control weight and restrained rectangular selection through existing semantic roles. standard retains the stronger pill recipe. Both compose the same primitive anatomy and behavior; inspect them in the full-width navigation workspace.
36
+
37
+ ## API reference
38
+
39
+ | Prop | Values | Default |
40
+ | --- | --- | --- |
41
+ | `label` | `string` | `Required` |
42
+ | `groups` | `readonly SidebarGroup[]` | `Required` |
43
+ | `currentValue` | `string` | `—` |
44
+ | `currentKind` | `NavigationTreeProps["currentKind"]` | `—` |
45
+ | `collapsed` | `boolean` | `—` |
46
+ | `defaultCollapsed` | `boolean` | `—` |
47
+ | `onCollapsedChange` | `(collapsed:boolean)=>void` | `—` |
48
+ | `collapsible` | `boolean` | `—` |
49
+ | `collapseLabel` | `string` | `—` |
50
+ | `expandLabel` | `string` | `—` |
51
+ | `expandedValues` | `readonly string[]` | `—` |
52
+ | `defaultExpandedValues` | `readonly string[]` | `—` |
53
+ | `onExpandedValuesChange` | `(values:string[])=>void` | `—` |
54
+ | `expandItemLabel` | `NavigationTreeProps["expandLabel"]` | `—` |
55
+ | `size` | `"sm" \| "md" \| "lg"` | `—` |
56
+ | `variant` | `"quiet" \| "standard"` | `—` |
57
+ | `side` | `"start" \| "end"` | `—` |
58
+ | `width` | `CSSProperties["width"]` | `—` |
59
+ | `header` | `ReactNode \| (state:SidebarSlotState)=>ReactNode` | `—` |
60
+ | `headerLayout` | `"stacked" \| "inline"` | `—` |
61
+ | `footer` | `ReactNode \| (state:SidebarSlotState)=>ReactNode` | `—` |
62
+ | `footerSeparator` | `boolean` | `—` |
63
+ | `headerSeparator` | `boolean` | `—` |
64
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLElement>, "children" \| "onChange">` | `Forwarded` |
@@ -0,0 +1,41 @@
1
+ # Sparkline
2
+
3
+ A compact line or area chart for trends in a table cell, list or metric.
4
+
5
+ Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
6
+
7
+ ## Example
8
+
9
+ ```tsx
10
+ "use client";
11
+
12
+ import { FloodRoot, Sparkline } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <Sparkline label="Revenue rose from $8,000 to $12,000" values={[8000, 8200, null, 9500, 11000, 12000]} domain={[0, 15000]} />
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Give the graphic a label that communicates the metric and the trend. Set showLabel to make that label visible.
27
+ - Use a shared domain for comparing magnitudes across rows. Null and nonfinite samples leave gaps in both the stroke and area.
28
+ - The default area uses an accent stroke with a gradient below it. Choose variant line for stroke only and use semantic tones only when the data has a known interpretation.
29
+
30
+ ## API reference
31
+
32
+ | Prop | Values | Default |
33
+ | --- | --- | --- |
34
+ | `values` | `readonly (number \| null)[]` | `Required` |
35
+ | `label` | `string` | `Required` |
36
+ | `showLabel` | `boolean` | `false` |
37
+ | `domain` | `readonly [number, number]` | `—` |
38
+ | `size` | `"sm" \| "md"` | `"md"` |
39
+ | `tone` | `"neutral" \| "accent" \| "success" \| "warning" \| "error"` | `"accent"` |
40
+ | `variant` | `"line" \| "area"` | `"area"` |
41
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role" \| "aria-label" \| "aria-labelledby">` | `Forwarded` |
@@ -42,5 +42,7 @@ export function Example() {
42
42
  | `density` | `"compact" \| "comfortable"` | `"comfortable"` |
43
43
  | `striped` | `boolean` | `false` |
44
44
  | `scrollLabel` | `string` | `—` |
45
+ | `maxViewportHeight` | `CSSProperties["maxBlockSize"]` | `—` |
46
+ | `stickyHeader` | `boolean` | `false` |
45
47
  | `cellVerticalAlign` | `"top" \| "middle" \| "bottom"` | `"middle"` |
46
48
  | `Native HTML props` | `Omit<TableHTMLAttributes<HTMLTableElement>, "children">` | `Forwarded` |
@@ -23,6 +23,7 @@ export function Example() {
23
23
 
24
24
  ## Design notes
25
25
 
26
+ - Use variant="line" for page-level sections with an active marker beside the panel. The default contained variant joins tabs and content in one surface.
26
27
  - Arrow keys navigate enabled tabs; automatic activation is default, manual needs Enter/Space. Tab leaves the tablist. Horizontal direction follows RTL.
27
28
  - Inactive panels remain mounted but hidden. Keep form validation and persistent selection under host control. Invalid, missing or disabled selected values fall back to the first available item.
28
29
 
@@ -37,6 +38,7 @@ export function Example() {
37
38
  | `onValueChange` | `(value: string) => void` | `—` |
38
39
  | `activationMode` | `"automatic" \| "manual"` | `"automatic"` |
39
40
  | `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` |
41
+ | `variant` | `"contained" \| "line"` | `—` |
40
42
  | `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
41
43
  | `disabled` | `boolean` | `false` |
42
44
  | `iconOnly` | `boolean` | `false` |
@@ -16,8 +16,8 @@ export function Example() {
16
16
  return (
17
17
  <FloodRoot>
18
18
  <Stack gap="3">
19
- <Text as="p" size="lead">A calm foundation for your next idea.</Text>
20
- <Text as="p" size="compact">Use the space to make it yours.</Text>
19
+ <Text as="p" size="lead">Quarterly revenue</Text>
20
+ <Text as="p" size="compact">Revenue increased by 8% this quarter.</Text>
21
21
  </Stack>
22
22
  </FloodRoot>
23
23
  );
@@ -30,6 +30,7 @@ export function Example() {
30
30
  | Prop | Values | Default |
31
31
  | --- | --- | --- |
32
32
  | `variant` | `"solid" \| "subtle" \| "outline" \| "ghost"` | `"subtle"` |
33
+ | `tone` | `"default" \| "danger"` | `—` |
33
34
  | `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` |
34
35
  | `loading` | `boolean` | `—` |
35
36
  | `pressed` | `boolean` | `—` |