@flood-md/agent 0.2.10 → 0.2.11
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.
- package/DESIGN.md +8 -5
- package/README.md +1 -1
- package/SKILL.md +11 -0
- package/dist/catalog.json +1875 -295
- package/dist/materials/component-app-shell.md +47 -0
- package/dist/materials/component-app-top-bar.md +36 -0
- package/dist/materials/component-autocomplete.md +54 -0
- package/dist/materials/component-bulk-action-bar.md +52 -0
- package/dist/materials/component-button.md +1 -0
- package/dist/materials/component-card.md +2 -2
- package/dist/materials/component-collapsible.md +1 -0
- package/dist/materials/component-collection-toolbar.md +68 -0
- package/dist/materials/component-collection-view-switcher.md +49 -0
- package/dist/materials/component-combobox.md +10 -0
- package/dist/materials/component-command-palette.md +53 -0
- package/dist/materials/component-copy-button.md +1 -0
- package/dist/materials/component-data-table.md +14 -2
- package/dist/materials/component-date-picker.md +1 -0
- package/dist/materials/component-date-range-picker.md +1 -0
- package/dist/materials/component-date-time-picker.md +2 -0
- package/dist/materials/component-date-time-range-picker.md +4 -0
- package/dist/materials/component-drawer.md +1 -0
- package/dist/materials/component-figure.md +1 -1
- package/dist/materials/component-filter-condition.md +53 -0
- package/dist/materials/component-filter-group.md +55 -0
- package/dist/materials/component-icon-button.md +2 -0
- package/dist/materials/component-menubar.md +41 -0
- package/dist/materials/component-multi-select.md +10 -0
- package/dist/materials/component-navigation-group.md +51 -0
- package/dist/materials/component-navigation-item.md +59 -0
- package/dist/materials/component-navigation-tree.md +8 -0
- package/dist/materials/component-overflow-actions.md +47 -0
- package/dist/materials/component-page-header.md +40 -0
- package/dist/materials/component-popover.md +2 -1
- package/dist/materials/component-radio-card.md +2 -2
- package/dist/materials/component-segmented-control.md +6 -4
- package/dist/materials/component-sidebar.md +64 -0
- package/dist/materials/component-tabs.md +2 -0
- package/dist/materials/component-text.md +2 -2
- package/dist/materials/component-toggle.md +1 -0
- package/dist/materials/component-toolbar.md +4 -0
- package/dist/materials/component-tooltip.md +1 -1
- package/dist/materials/guide-agent-knowledge.md +13 -6
- package/dist/materials/guide-agents.md +8 -1
- package/dist/materials/guide-foundations.md +45 -2
- package/dist/materials/guide-installation.md +6 -6
- package/dist/materials/guide-interface-content.md +1 -1
- package/dist/materials/guide-introduction.md +4 -2
- package/dist/materials/guide-layout.md +39 -10
- package/dist/materials/guide-motion.md +69 -0
- package/dist/materials/guide-skills.md +9 -0
- package/dist/materials/recipe-collection-views.md +648 -0
- package/dist/materials/recipe-command-palette.md +31 -52
- package/dist/materials/recipe-filter-bar.md +12 -3
- package/dist/materials/recipe-grouped-form.md +5 -0
- package/dist/materials/recipe-navigation-workspace.md +222 -0
- package/dist/materials/recipe-record-management.md +296 -0
- package/dist/materials/recipe-record-workspace.md +207 -0
- package/dist/materials/recipe-settings-workspace.md +232 -0
- package/dist/materials/token-sys.color.context.base.action-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.base.action-hover.json +41 -0
- package/dist/materials/token-sys.color.context.base.action-pressed.json +41 -0
- package/dist/materials/token-sys.color.context.base.action-rest.json +41 -0
- package/dist/materials/token-sys.color.context.base.avatar-background.json +41 -0
- package/dist/materials/token-sys.color.context.base.border-decorative.json +41 -0
- package/dist/materials/token-sys.color.context.base.divider-decorative.json +41 -0
- package/dist/materials/token-sys.color.context.base.field-background.json +41 -0
- package/dist/materials/token-sys.color.context.base.field-border.json +41 -0
- package/dist/materials/token-sys.color.context.base.field-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.base.field-readonly.json +41 -0
- package/dist/materials/token-sys.color.context.base.indicator-track.json +41 -0
- package/dist/materials/token-sys.color.context.base.loading-placeholder.json +41 -0
- package/dist/materials/token-sys.color.context.base.muted-background.json +41 -0
- package/dist/materials/token-sys.color.context.base.on-surface-action-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.base.on-surface-action-hover.json +41 -0
- package/dist/materials/token-sys.color.context.base.on-surface-action-pressed.json +41 -0
- package/dist/materials/token-sys.color.context.base.on-surface-action-rest.json +41 -0
- package/dist/materials/token-sys.color.context.base.selection-background.json +41 -0
- package/dist/materials/token-sys.color.context.base.supporting-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.action-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.filled.action-hover.json +41 -0
- package/dist/materials/token-sys.color.context.filled.action-pressed.json +41 -0
- package/dist/materials/token-sys.color.context.filled.action-rest.json +41 -0
- package/dist/materials/token-sys.color.context.filled.avatar-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.border-decorative.json +41 -0
- package/dist/materials/token-sys.color.context.filled.divider-decorative.json +41 -0
- package/dist/materials/token-sys.color.context.filled.field-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.field-border.json +41 -0
- package/dist/materials/token-sys.color.context.filled.field-disabled.json +41 -0
- package/dist/materials/token-sys.color.context.filled.field-readonly.json +41 -0
- package/dist/materials/token-sys.color.context.filled.indicator-track.json +41 -0
- package/dist/materials/token-sys.color.context.filled.loading-placeholder.json +41 -0
- package/dist/materials/token-sys.color.context.filled.muted-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.selection-background.json +41 -0
- package/dist/materials/token-sys.color.context.filled.supporting-background.json +41 -0
- package/dist/materials/token-sys.color.field.readonly.json +41 -0
- package/dist/materials/token-sys.color.surface.avatar.json +41 -0
- package/dist/materials/token-sys.color.surface.current.json +41 -0
- package/dist/materials/token-sys.color.surface.muted.json +41 -0
- package/dist/materials/token-sys.color.surface.supporting.json +41 -0
- package/dist/materials/token-sys.motion.distance-panel.json +36 -0
- package/dist/materials/token-sys.motion.distance-small.json +36 -0
- package/dist/materials/token-sys.motion.duration-enter.json +36 -0
- package/dist/materials/token-sys.motion.duration-exit.json +36 -0
- package/dist/materials/token-sys.motion.duration-layer.json +36 -0
- package/dist/materials/token-sys.motion.duration-loop.json +36 -0
- package/dist/materials/token-sys.motion.duration-press.json +36 -0
- package/dist/materials/token-sys.motion.easing-enter.json +38 -0
- package/dist/materials/token-sys.motion.easing-exit.json +38 -0
- package/knowledge.json +115 -2
- package/manifest.json +11 -1
- package/package.json +9 -3
- package/references/component-families.md +146 -0
- package/references/composition.md +4 -4
- package/references/customization.md +14 -0
- package/references/flood-composition/SKILL.md +4 -0
- package/references/flood-data-display/SKILL.md +117 -0
- package/references/flood-feedback/SKILL.md +25 -0
- package/references/flood-forms/SKILL.md +31 -0
- package/references/flood-foundations/SKILL.md +36 -0
- package/references/flood-hierarchy/SKILL.md +23 -7
- package/references/flood-interface-content/SKILL.md +26 -5
- package/references/flood-motion/SKILL.md +44 -0
- package/references/flood-navigation/SKILL.md +195 -0
- package/references/flood-overlays/SKILL.md +35 -0
- package/references/flood-records/SKILL.md +42 -2
- package/references/flood-spacing/SKILL.md +38 -0
- package/references/flood-verification/SKILL.md +20 -0
- package/references/interface-content-examples.md +4 -0
- package/references/rendered-review.md +5 -0
- package/references/spacing.md +30 -0
- package/rules.json +94 -8
- package/workflows.json +28 -3
|
@@ -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="
|
|
21
|
-
<RadioCard name="plan" value="team" label="Team" description="
|
|
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>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SegmentedControl
|
|
2
2
|
|
|
3
|
-
A compact single-value choice with native radio semantics
|
|
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="
|
|
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
|
-
-
|
|
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
|
|
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,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` |
|
|
@@ -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">
|
|
20
|
-
<Text as="p" size="compact">
|
|
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` | `—` |
|
|
@@ -31,6 +31,8 @@ export function Example() {
|
|
|
31
31
|
- Arrows move focus without activation; Home/End jump to the ends. Disabled and hidden actions are skipped. One Tab entry is established after hydration; before JavaScript native child tab order remains.
|
|
32
32
|
- Horizontal arrows follow writing direction. Vertical arrows move between actions; open a vertical toolbar Menu with Enter/Space. Horizontal menus retain ArrowUp/Down opening.
|
|
33
33
|
- loop defaults to true. Native div props/ref target the toolbar; preserve a meaningful label. Available in 0.2.4.
|
|
34
|
+
- shape defaults to rounded; pill uses the action radius and a horizontal single scrollable rail.
|
|
35
|
+
- variant="plain" removes the material and outer inset for grouping peer controls; contained remains the default. Keyboard ownership is unchanged.
|
|
34
36
|
|
|
35
37
|
## API reference
|
|
36
38
|
|
|
@@ -39,4 +41,6 @@ export function Example() {
|
|
|
39
41
|
| `label` | `string` | `Required` |
|
|
40
42
|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` |
|
|
41
43
|
| `loop` | `boolean` | `true` |
|
|
44
|
+
| `shape` | `"rounded" \| "pill"` | `—` |
|
|
45
|
+
| `variant` | `"contained" \| "plain"` | `—` |
|
|
42
46
|
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "role">` | `Forwarded` |
|
|
@@ -32,7 +32,7 @@ export function Example() {
|
|
|
32
32
|
| Prop | Values | Default |
|
|
33
33
|
| --- | --- | --- |
|
|
34
34
|
| `content` | `string` | `Required` |
|
|
35
|
-
| `trigger` | `(props:
|
|
35
|
+
| `trigger` | `(props: TooltipTriggerProps) => ReactNode` | `Required` |
|
|
36
36
|
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"top"` |
|
|
37
37
|
| `align` | `"start" \| "center" \| "end"` | `"center"` |
|
|
38
38
|
| `delay` | `number` | `300` |
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Agent knowledge
|
|
2
2
|
|
|
3
|
-
Flood 0.2.
|
|
3
|
+
Flood 0.2.11 includes a versioned read-only catalog and reader. Use the CLI matching
|
|
4
4
|
the project's flood.json; source availability does not prove npm publication.
|
|
5
5
|
The same package sources build the website, CLI results and agent instructions.
|
|
6
6
|
|
|
7
7
|
## Discover, then read
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npx @flood-md/cli@0.2.
|
|
11
|
-
npx @flood-md/cli@0.2.
|
|
12
|
-
npx @flood-md/cli@0.2.
|
|
13
|
-
npx @flood-md/cli@0.2.
|
|
14
|
-
npx @flood-md/cli@0.2.
|
|
10
|
+
npx @flood-md/cli@0.2.11 info --json
|
|
11
|
+
npx @flood-md/cli@0.2.11 catalog --kind workflow --group foundations
|
|
12
|
+
npx @flood-md/cli@0.2.11 catalog --kind component --search table
|
|
13
|
+
npx @flood-md/cli@0.2.11 read recipe:table-bulk-actions
|
|
14
|
+
npx @flood-md/cli@0.2.11 read component:data-table
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
These commands return JSON and do not install dependencies, edit files, execute
|
|
@@ -19,6 +19,13 @@ skill text or contact a Flood server. The package runner may fetch the CLI if
|
|
|
19
19
|
it is not installed locally; keep its version deliberate. Existing project and
|
|
20
20
|
agent instructions remain authoritative.
|
|
21
21
|
|
|
22
|
+
For a screen that filters one table between two views, start with
|
|
23
|
+
`read component:segmented-control` and follow its link to `workflow:records`.
|
|
24
|
+
If the screen switches between independent panels, read `component:tabs`.
|
|
25
|
+
Before delivery, open the list and a selected record together, then use
|
|
26
|
+
`workflow:interface-content` and `reference:interface-content-examples` to
|
|
27
|
+
decide which labels, counts and status messages the user needs in each view.
|
|
28
|
+
|
|
22
29
|
info reports actual installed package versions, the configured guide version,
|
|
23
30
|
framework detection, catalog identity and capability declarations. A version
|
|
24
31
|
mismatch prevents catalog/read from serving an ambiguous guide train. A
|
|
@@ -14,7 +14,7 @@ sources. The website index is generated from the same bundle metadata rather
|
|
|
14
14
|
than a second handwritten skill catalog. Source additions do not update an
|
|
15
15
|
already installed package; use the guide set matching your installation.
|
|
16
16
|
|
|
17
|
-
Version 0.2.
|
|
17
|
+
Version 0.2.11 adds [versioned knowledge discovery](agent-knowledge.md):
|
|
18
18
|
info reports installation context, catalog discovers compact metadata, and read
|
|
19
19
|
loads a selected contract or workflow. The catalog includes typed recipes and
|
|
20
20
|
semantic token records. Unknown capabilities and version mismatches are explicit;
|
|
@@ -41,6 +41,13 @@ a Badge/Progress/Dialog implementation just to make one layout fit.
|
|
|
41
41
|
|
|
42
42
|
## Files and responsibilities
|
|
43
43
|
|
|
44
|
+
For reusable components, the composition skill also routes to
|
|
45
|
+
[component families](../packages/agent/references/component-families.md): choose
|
|
46
|
+
the closest existing anatomy and compare sizing, shape, nested insets and states
|
|
47
|
+
in the same scene. Flood's repository instructions require that same guide for
|
|
48
|
+
its own authors. Installed projects receive it through the matching manifest and
|
|
49
|
+
knowledge catalog; existing customized guides are not silently overwritten.
|
|
50
|
+
|
|
44
51
|
| Project file | For whom / when | Prerequisite | Source of truth | What to check |
|
|
45
52
|
| --- | --- | --- | --- | --- |
|
|
46
53
|
| flood.json | Developer / agent, setup or upgrade | Existing React project | Exact installed release, framework and paths | Matching CLI doctor |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Foundations tokens · 0.2.
|
|
1
|
+
# Foundations tokens · 0.2.11 candidate
|
|
2
2
|
|
|
3
|
-
This guide describes the **0.2.
|
|
3
|
+
This guide describes the **0.2.11 candidate** foundation exports. Keep Flood packages at
|
|
4
4
|
matching exact versions. Existing 0.1.1 installs use their earlier token contract.
|
|
5
5
|
|
|
6
6
|
Foundations separates fixed reference values (`ref`) from semantic roles (`sys`).
|
|
@@ -84,6 +84,49 @@ prepend `--flood-`. The generated typed lookup is the complete contract.
|
|
|
84
84
|
| `motion` | `duration-fast`, `duration-normal`, `duration-reduced`, `easing` |
|
|
85
85
|
| `layer` | `base`, `sticky`, `popover`, `modal`, `toast` |
|
|
86
86
|
|
|
87
|
+
### Material and nested control context
|
|
88
|
+
|
|
89
|
+
Absolute `color.surface.canvas/default/raised/overlay/floating` roles describe
|
|
90
|
+
materials. A component that draws a material establishes the context for its
|
|
91
|
+
children: Surface, Dialog/Drawer, anchored popups and selection menus, Toast,
|
|
92
|
+
Toolbar/BulkActionBar, standalone Calendar and other shared material owners.
|
|
93
|
+
Stack, Inline, Grid and other transparent layout wrappers inherit that context.
|
|
94
|
+
Nesting a default Surface inside an overlay returns to the default material;
|
|
95
|
+
DOM depth does not increment elevation.
|
|
96
|
+
|
|
97
|
+
Neutral actions, fields, read-only/disabled fills, choices, selection, supporting
|
|
98
|
+
chips/keycaps, skeletons and progress tracks consume inherited semantic roles.
|
|
99
|
+
On filled materials, `color.context.filled.*` supplies translucent neutral state
|
|
100
|
+
overlays: secondary actions use white 5% / 8% / 12% at rest / hover / press,
|
|
101
|
+
fields use 5%, and quiet borders use 8%. This keeps a secondary action secondary
|
|
102
|
+
on both a card and a floating panel. The canvas retains its established defaults.
|
|
103
|
+
Primary actions, content, focus and semantic feedback colors remain independent.
|
|
104
|
+
|
|
105
|
+
`color.surface.current` supplies the opaque material base for tinted feedback;
|
|
106
|
+
`surface.supporting`, `surface.muted`, `surface.avatar` and `field.readonly`
|
|
107
|
+
separate contextual fills from the absolute canvas color. Do not repurpose canvas
|
|
108
|
+
to recolor controls: it also supplies contrasting content and document/media wells.
|
|
109
|
+
|
|
110
|
+
Automatic owners require no extra Button/Input props. For an application-owned
|
|
111
|
+
material boundary, `data-flood-surface="base|filled|floating"` selects the neutral
|
|
112
|
+
control context. The attribute does not paint a background or implement a popup.
|
|
113
|
+
Choose the actual material and override `color.surface.current` on that same
|
|
114
|
+
scope if it differs from Flood's material. A transparent wrapper should not
|
|
115
|
+
declare another material context.
|
|
116
|
+
|
|
117
|
+
Customize contextual recipes using `--flood-sys-color-context-filled-*` and
|
|
118
|
+
`--flood-sys-color-context-base-*` at the root. A direct consumer role override
|
|
119
|
+
on the material owner can refine one scope; a canvas-only field override does
|
|
120
|
+
not silently replace all elevated recipes. Review both contexts when opting into
|
|
121
|
+
strong boundaries. The generated manifest is the complete list of roles.
|
|
122
|
+
|
|
123
|
+
Floating panels use an opaque fallback, with glass enabled only where supported.
|
|
124
|
+
`prefers-reduced-transparency: reduce` and `data-flood-transparency="reduced"`
|
|
125
|
+
on a FloodRoot or an owning subtree request opaque panels without backdrop blur.
|
|
126
|
+
Forced colors retain system backgrounds, boundaries and selection indicators.
|
|
127
|
+
Translucency is a visual recipe, not an accessibility guarantee: inspect the
|
|
128
|
+
composited background, content contrast and focus in the actual host.
|
|
129
|
+
|
|
87
130
|
### Inter typography
|
|
88
131
|
|
|
89
132
|
Size equivalents assume a 16px root for illustration. Flood does not set the
|