@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.
Files changed (133) 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 +1875 -295
  5. package/dist/materials/component-app-shell.md +47 -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 +68 -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 +14 -2
  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-figure.md +1 -1
  24. package/dist/materials/component-filter-condition.md +53 -0
  25. package/dist/materials/component-filter-group.md +55 -0
  26. package/dist/materials/component-icon-button.md +2 -0
  27. package/dist/materials/component-menubar.md +41 -0
  28. package/dist/materials/component-multi-select.md +10 -0
  29. package/dist/materials/component-navigation-group.md +51 -0
  30. package/dist/materials/component-navigation-item.md +59 -0
  31. package/dist/materials/component-navigation-tree.md +8 -0
  32. package/dist/materials/component-overflow-actions.md +47 -0
  33. package/dist/materials/component-page-header.md +40 -0
  34. package/dist/materials/component-popover.md +2 -1
  35. package/dist/materials/component-radio-card.md +2 -2
  36. package/dist/materials/component-segmented-control.md +6 -4
  37. package/dist/materials/component-sidebar.md +64 -0
  38. package/dist/materials/component-tabs.md +2 -0
  39. package/dist/materials/component-text.md +2 -2
  40. package/dist/materials/component-toggle.md +1 -0
  41. package/dist/materials/component-toolbar.md +4 -0
  42. package/dist/materials/component-tooltip.md +1 -1
  43. package/dist/materials/guide-agent-knowledge.md +13 -6
  44. package/dist/materials/guide-agents.md +8 -1
  45. package/dist/materials/guide-foundations.md +45 -2
  46. package/dist/materials/guide-installation.md +6 -6
  47. package/dist/materials/guide-interface-content.md +1 -1
  48. package/dist/materials/guide-introduction.md +4 -2
  49. package/dist/materials/guide-layout.md +39 -10
  50. package/dist/materials/guide-motion.md +69 -0
  51. package/dist/materials/guide-skills.md +9 -0
  52. package/dist/materials/recipe-collection-views.md +648 -0
  53. package/dist/materials/recipe-command-palette.md +31 -52
  54. package/dist/materials/recipe-filter-bar.md +12 -3
  55. package/dist/materials/recipe-grouped-form.md +5 -0
  56. package/dist/materials/recipe-navigation-workspace.md +222 -0
  57. package/dist/materials/recipe-record-management.md +296 -0
  58. package/dist/materials/recipe-record-workspace.md +207 -0
  59. package/dist/materials/recipe-settings-workspace.md +232 -0
  60. package/dist/materials/token-sys.color.context.base.action-disabled.json +41 -0
  61. package/dist/materials/token-sys.color.context.base.action-hover.json +41 -0
  62. package/dist/materials/token-sys.color.context.base.action-pressed.json +41 -0
  63. package/dist/materials/token-sys.color.context.base.action-rest.json +41 -0
  64. package/dist/materials/token-sys.color.context.base.avatar-background.json +41 -0
  65. package/dist/materials/token-sys.color.context.base.border-decorative.json +41 -0
  66. package/dist/materials/token-sys.color.context.base.divider-decorative.json +41 -0
  67. package/dist/materials/token-sys.color.context.base.field-background.json +41 -0
  68. package/dist/materials/token-sys.color.context.base.field-border.json +41 -0
  69. package/dist/materials/token-sys.color.context.base.field-disabled.json +41 -0
  70. package/dist/materials/token-sys.color.context.base.field-readonly.json +41 -0
  71. package/dist/materials/token-sys.color.context.base.indicator-track.json +41 -0
  72. package/dist/materials/token-sys.color.context.base.loading-placeholder.json +41 -0
  73. package/dist/materials/token-sys.color.context.base.muted-background.json +41 -0
  74. package/dist/materials/token-sys.color.context.base.on-surface-action-disabled.json +41 -0
  75. package/dist/materials/token-sys.color.context.base.on-surface-action-hover.json +41 -0
  76. package/dist/materials/token-sys.color.context.base.on-surface-action-pressed.json +41 -0
  77. package/dist/materials/token-sys.color.context.base.on-surface-action-rest.json +41 -0
  78. package/dist/materials/token-sys.color.context.base.selection-background.json +41 -0
  79. package/dist/materials/token-sys.color.context.base.supporting-background.json +41 -0
  80. package/dist/materials/token-sys.color.context.filled.action-disabled.json +41 -0
  81. package/dist/materials/token-sys.color.context.filled.action-hover.json +41 -0
  82. package/dist/materials/token-sys.color.context.filled.action-pressed.json +41 -0
  83. package/dist/materials/token-sys.color.context.filled.action-rest.json +41 -0
  84. package/dist/materials/token-sys.color.context.filled.avatar-background.json +41 -0
  85. package/dist/materials/token-sys.color.context.filled.border-decorative.json +41 -0
  86. package/dist/materials/token-sys.color.context.filled.divider-decorative.json +41 -0
  87. package/dist/materials/token-sys.color.context.filled.field-background.json +41 -0
  88. package/dist/materials/token-sys.color.context.filled.field-border.json +41 -0
  89. package/dist/materials/token-sys.color.context.filled.field-disabled.json +41 -0
  90. package/dist/materials/token-sys.color.context.filled.field-readonly.json +41 -0
  91. package/dist/materials/token-sys.color.context.filled.indicator-track.json +41 -0
  92. package/dist/materials/token-sys.color.context.filled.loading-placeholder.json +41 -0
  93. package/dist/materials/token-sys.color.context.filled.muted-background.json +41 -0
  94. package/dist/materials/token-sys.color.context.filled.selection-background.json +41 -0
  95. package/dist/materials/token-sys.color.context.filled.supporting-background.json +41 -0
  96. package/dist/materials/token-sys.color.field.readonly.json +41 -0
  97. package/dist/materials/token-sys.color.surface.avatar.json +41 -0
  98. package/dist/materials/token-sys.color.surface.current.json +41 -0
  99. package/dist/materials/token-sys.color.surface.muted.json +41 -0
  100. package/dist/materials/token-sys.color.surface.supporting.json +41 -0
  101. package/dist/materials/token-sys.motion.distance-panel.json +36 -0
  102. package/dist/materials/token-sys.motion.distance-small.json +36 -0
  103. package/dist/materials/token-sys.motion.duration-enter.json +36 -0
  104. package/dist/materials/token-sys.motion.duration-exit.json +36 -0
  105. package/dist/materials/token-sys.motion.duration-layer.json +36 -0
  106. package/dist/materials/token-sys.motion.duration-loop.json +36 -0
  107. package/dist/materials/token-sys.motion.duration-press.json +36 -0
  108. package/dist/materials/token-sys.motion.easing-enter.json +38 -0
  109. package/dist/materials/token-sys.motion.easing-exit.json +38 -0
  110. package/knowledge.json +115 -2
  111. package/manifest.json +11 -1
  112. package/package.json +9 -3
  113. package/references/component-families.md +146 -0
  114. package/references/composition.md +4 -4
  115. package/references/customization.md +14 -0
  116. package/references/flood-composition/SKILL.md +4 -0
  117. package/references/flood-data-display/SKILL.md +117 -0
  118. package/references/flood-feedback/SKILL.md +25 -0
  119. package/references/flood-forms/SKILL.md +31 -0
  120. package/references/flood-foundations/SKILL.md +36 -0
  121. package/references/flood-hierarchy/SKILL.md +23 -7
  122. package/references/flood-interface-content/SKILL.md +26 -5
  123. package/references/flood-motion/SKILL.md +44 -0
  124. package/references/flood-navigation/SKILL.md +195 -0
  125. package/references/flood-overlays/SKILL.md +35 -0
  126. package/references/flood-records/SKILL.md +42 -2
  127. package/references/flood-spacing/SKILL.md +38 -0
  128. package/references/flood-verification/SKILL.md +20 -0
  129. package/references/interface-content-examples.md +4 -0
  130. package/references/rendered-review.md +5 -0
  131. package/references/spacing.md +30 -0
  132. package/rules.json +94 -8
  133. package/workflows.json +28 -3
@@ -0,0 +1,47 @@
1
+ # AppShell
2
+
3
+ A workspace layout with optional navigation, top bar and footer, plus a keyboard skip target.
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, AppShell, AppTopBar, PageHeader, Text } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <AppShell topBar={<AppTopBar start={<Text>Workspace</Text>} />}><PageHeader title="Projects" /></AppShell>
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Content scrolling keeps navigation, top bar and footer outside the work scrollport. Use scroll="page" for a document that scrolls as a whole.
27
+ - Supply Sidebar for docked navigation. Set navigationDrawer with a shell-width threshold and Drawer content to swap automatically. Share accepted route and branch state between the two presentations.
28
+ - Use mainAs="section" only when embedding a shell inside an existing main landmark.
29
+
30
+ ## API reference
31
+
32
+ | Prop | Values | Default |
33
+ | --- | --- | --- |
34
+ | `navigation` | `ReactNode` | `—` |
35
+ | `navigationSide` | `"start" \| "end"` | `"start"` |
36
+ | `navigationDrawer` | `AppShellNavigationDrawer` | `—` |
37
+ | `topBar` | `ReactNode \| (navigationTrigger: ReactNode) => ReactNode` | `—` |
38
+ | `footer` | `ReactNode` | `—` |
39
+ | `scroll` | `"content" \| "page"` | `"content"` |
40
+ | `mainId` | `string` | `—` |
41
+ | `mainAs` | `"main" \| "section"` | `"main"` |
42
+ | `mainLabel` | `string` | `—` |
43
+ | `mainRef` | `Ref<HTMLElement>` | `—` |
44
+ | `scrollLabel` | `string` | `—` |
45
+ | `scrollOrientation` | `ScrollAreaProps["orientation"]` | `—` |
46
+ | `skipLabel` | `string` | `—` |
47
+ | `Native HTML props` | `HTMLAttributes<HTMLDivElement>` | `Forwarded` |
@@ -0,0 +1,36 @@
1
+ # AppTopBar
2
+
3
+ Application context and global actions in two independent, wrapping slots.
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, AppTopBar, Text, Button } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <AppTopBar start={<Text>Workspace</Text>} end={<Button size="sm">Search</Button>} />
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Use in AppShell or in a host-owned layout. Use PageHeader for the current page's title and actions.
27
+ - The start and end groups wrap on narrow hosts without changing keyboard order. Use bordered only where the toolbar needs a visible boundary.
28
+
29
+ ## API reference
30
+
31
+ | Prop | Values | Default |
32
+ | --- | --- | --- |
33
+ | `start` | `ReactNode` | `—` |
34
+ | `end` | `ReactNode` | `—` |
35
+ | `bordered` | `boolean` | `false` |
36
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLElement>, "children">` | `Forwarded` |
@@ -0,0 +1,54 @@
1
+ # Autocomplete
2
+
3
+ A free text field with optional suggestions; accepts values outside the list.
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, Field, Autocomplete } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <Field label="Team">{control => <Autocomplete {...control} name="team" options={[{value:"design",label:"Design",group:"Product"},{value:"engineering",label:"Engineering",group:"Product"},{value:"operations",label:"Operations",group:"Business"}]} />}</Field>
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - The submitted value is text, not an option ID. Use Combobox for fixed choices.
27
+ - Manual suggestions use controlled value and optionsQuery; stale results cannot be chosen. Network ownership remains with the host.
28
+
29
+ ## API reference
30
+
31
+ | Prop | Values | Default |
32
+ | --- | --- | --- |
33
+ | `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
34
+ | `invalid` | `boolean` | `—` |
35
+ | `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
36
+ | `options` | `readonly ComboboxOption[]` | `Required` |
37
+ | `clearable` | `boolean` | `—` |
38
+ | `emptyMessage` | `string` | `—` |
39
+ | `listLabel` | `string` | `—` |
40
+ | `toggleLabel` | `string` | `—` |
41
+ | `clearLabel` | `string` | `—` |
42
+ | `invalidSelectionMessage` | `string` | `—` |
43
+ | `filtering` | `"local" \| "manual"` | `—` |
44
+ | `optionsQuery` | `string` | `—` |
45
+ | `loadState` | `"ready" \| "loading" \| "error"` | `—` |
46
+ | `loadingMessage` | `string` | `—` |
47
+ | `errorMessage` | `string` | `—` |
48
+ | `onRetry` | `() => void` | `—` |
49
+ | `retryLabel` | `string` | `—` |
50
+ | `value` | `string` | `—` |
51
+ | `defaultValue` | `string` | `""` |
52
+ | `onValueChange` | `(value: string) => void` | `—` |
53
+ | `onOptionSelect` | `(option: ComboboxOption) => void` | `—` |
54
+ | `Native HTML props` | `Omit<Omit<InputHTMLAttributes<HTMLInputElement>, "type" \| "value" \| "defaultValue" \| "onChange" \| "children">, "query" \| "onQueryChange" \| "selectedOptions" \| "value" \| "defaultValue" \| "onValueChange">` | `Forwarded` |
@@ -0,0 +1,52 @@
1
+ # BulkActionBar
2
+
3
+ A single-row selection command capsule with adaptive overflow.
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, BulkActionBar } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <BulkActionBar label="Selected projects" selectionCount={2}
19
+ items={[{id:"archive",label:"Archive",priority:10},{id:"pause",label:"Pause"},{id:"activate",label:"Set active"}]}
20
+ onAction={(id) => console.log(id)} onClear={() => console.log("clear")} />
21
+ </FloodRoot>
22
+ );
23
+ }
24
+ ```
25
+
26
+ ## Design notes
27
+
28
+ - The default is a pill-shaped single row with at most two visible commands. maxVisibleActions accepts 1, 2 or 3; available space can reduce that number further.
29
+ - Lower-priority commands move to More. selectionLabel, clearLabel and moreLabel support localized content; selectionCount=0 renders nothing.
30
+ - pending disables commands and clearing. The host owns selected IDs, accepted updates, confirmation and focus after removal.
31
+ - The component is inline by default. A floating host supplies bounded viewport positioning, safe-area spacing and scroll clearance. Use a stable width so adaptive measurement does not depend on the currently visible commands.
32
+ - counter accepts label (default), number or none. Visible counters reserve a stable width across digit changes; counterWidth adapts that reservation to a localized label. Numeric mode retains the complete accessible selectionLabel. Hidden mode removes the slot.
33
+
34
+ ## API reference
35
+
36
+ | Prop | Values | Default |
37
+ | --- | --- | --- |
38
+ | `label` | `string` | `Required` |
39
+ | `selectionCount` | `number` | `Required` |
40
+ | `selectionLabel` | `string` | `—` |
41
+ | `counter` | `"label" \| "number" \| "none"` | `—` |
42
+ | `counterWidth` | `CSSProperties["inlineSize"]` | `—` |
43
+ | `items` | `readonly OverflowAction[]` | `Required` |
44
+ | `onAction` | `(id: string) => void` | `—` |
45
+ | `onClear` | `() => void` | `Required` |
46
+ | `clearLabel` | `string` | `—` |
47
+ | `moreLabel` | `string` | `—` |
48
+ | `size` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
49
+ | `maxVisibleActions` | `1 \| 2 \| 3` | `—` |
50
+ | `disabled` | `boolean` | `—` |
51
+ | `pending` | `boolean` | `—` |
52
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "onAction">` | `Forwarded` |
@@ -37,6 +37,7 @@ export function Example() {
37
37
  | Prop | Values | Default |
38
38
  | --- | --- | --- |
39
39
  | `variant` | `"solid" \| "subtle" \| "outline" \| "ghost"` | `"solid"` |
40
+ | `tone` | `"default" \| "danger"` | `"default"` |
40
41
  | `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` |
41
42
  | `loading` | `boolean` | `false` |
42
43
  | `type` | `Inherited native HTML prop` | `"button"` |
@@ -15,9 +15,9 @@ import "@flood-md/react/styles.css";
15
15
  export function Example() {
16
16
  return (
17
17
  <FloodRoot>
18
- <Card title="Project details" description="Keep your team in sync."
18
+ <Card title="Project details" description="Release on 12 November"
19
19
  footer={<Button variant="subtle">Open project</Button>}>
20
- <Text as="p" size="compact">A calm place for the next idea.</Text>
20
+ <Text as="p" size="compact">Homepage and checkout</Text>
21
21
  </Card>
22
22
  </FloodRoot>
23
23
  );
@@ -31,6 +31,7 @@ export function Example() {
31
31
  | Prop | Values | Default |
32
32
  | --- | --- | --- |
33
33
  | `title` | `string` | `Required` |
34
+ | `headerAction` | `ReactNode` | `—` |
34
35
  | `open` | `boolean` | `—` |
35
36
  | `defaultOpen` | `boolean` | `false` |
36
37
  | `onOpenChange` | `(open: boolean) => void` | `—` |
@@ -0,0 +1,68 @@
1
+ # CollectionToolbar
2
+
3
+ Search, applied filter summaries and filter disclosure in one collection query row.
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, CollectionToolbar } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <CollectionToolbar label="Project collection" searchValue="" onSearchValueChange={(search) => console.log(search)}
19
+ searchLabel="Search projects" appliedFilters={[{id:"status",label:"Status: Active"}]}
20
+ onRemoveFilter={(id) => console.log(id)} onClear={() => console.log("clear")} />
21
+ </FloodRoot>
22
+ );
23
+ }
24
+ ```
25
+
26
+ ## Design notes
27
+
28
+ - Composes Fieldset, Field, SearchInput, Inline, Tag, Popover, Button and IconSlot. Uses normal Tab order rather than the action-only Toolbar roving model. No additional material, title or result count is invented.
29
+ - searchValue and accepted appliedFilters are host-owned. onSearchValueChange, onRemoveFilter and onClear request changes; callbacks do not imply acceptance. Summaries need meaningful labels and unique IDs.
30
+ - filterContent supplies the existing filter editor, including FilterGroup or a project-specific form. The host retains draft validation, Apply/Cancel, query evaluation, persistence and saved views. filtersOpen/onFiltersOpenChange optionally control the existing Popover; filterPanelRef and filterPanelClassName support real panel focus and sizing.
31
+ - Clear keeps its space immediately before the right-anchored Filters trigger while inactive. Removing a summary or clearing returns focus to Filters, or Search when no panel exists. Filter disclosure is omitted when no filterContent is supplied.
32
+ - quickFilters is an optional slot for at most two task-important properties; larger property sets belong inside filterContent. The host owns the threshold and slot behavior. Supply canClear when active state is not represented by searchValue/appliedFilters, such as controls in that slot.
33
+ - Search, accepted summaries and commands share a responsive row; long summaries can wrap without clipping and the filter action remains at the logical end. Saved-view selectors and save/rename actions stay outside this query row.
34
+ - controlSize defaults to sm; action/field sizes and chip typography follow the shared family. disabled applies to the complete fieldset, including native quick-filter controls and panel descendants. Labels and summaries remain host-localizable.
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
+ | `searchValue` | `string` | `Required` |
48
+ | `onSearchValueChange` | `(value: string) => void` | `Required` |
49
+ | `searchLabel` | `string` | `—` |
50
+ | `searchPlaceholder` | `string` | `—` |
51
+ | `clearSearchLabel` | `string` | `—` |
52
+ | `appliedFilters` | `readonly CollectionFilterSummary[]` | `—` |
53
+ | `onRemoveFilter` | `(id: string) => void` | `—` |
54
+ | `appliedFiltersLabel` | `string` | `—` |
55
+ | `summaryPrefix` | `ReactNode` | `—` |
56
+ | `quickFilters` | `ReactNode` | `—` |
57
+ | `filterContent` | `ReactNode` | `—` |
58
+ | `filtersLabel` | `string` | `—` |
59
+ | `filterTitle` | `string` | `—` |
60
+ | `filtersOpen` | `boolean` | `—` |
61
+ | `onFiltersOpenChange` | `(open: boolean) => void` | `—` |
62
+ | `filterPanelRef` | `Ref<HTMLDivElement>` | `—` |
63
+ | `filterPanelClassName` | `string` | `—` |
64
+ | `onClear` | `() => void` | `—` |
65
+ | `canClear` | `boolean` | `—` |
66
+ | `clearLabel` | `string` | `—` |
67
+ | `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
68
+ | `Native HTML props` | `Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, "children" \| "legend" \| "onChange">` | `Forwarded` |
@@ -0,0 +1,49 @@
1
+ # CollectionViewSwitcher
2
+
3
+ A controlled view selector with adaptive commands, separate from the active filter query.
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, CollectionViewSwitcher } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <CollectionViewSwitcher label="Project view" views={[{id:"all",name:"All projects"},{id:"active",name:"Active projects"}]} value="all" onValueChange={(id) => console.log(id)} actions={[{id:"create",label:"Save as new view"}]} onAction={(id) => console.log(id)} />
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Compose Field, Select, Button, IconSlot, Inline and OverflowActions. controlSize defaults to sm; no extra surface surrounds the selector and commands.
27
+ - value and onValueChange represent the accepted view ID. Commands request onAction(id); the component does not create, rename, delete, persist or execute queries. Keep application errors and confirmation in their existing host owners.
28
+ - The host supplies only applicable actions: save a new definition, update an editable changed definition, reset a dirty query, rename or delete an editable definition. A dirty working query does not silently modify the selected definition.
29
+ - One action uses Button directly. Multiple actions use priority-based OverflowActions with View actions disclosure at constrained widths. Source order remains meaningful; destructive actions belong last.
30
+ - label names the hidden Field label. actionsLabel and moreLabel localize command names; views supply localized names. selectRef exposes the Select focus target for host-owned dialogs. disabled blocks selection and commands; per-view and per-action disabled flags remain supported.
31
+ - Keep this row outside CollectionToolbar. Changing the selected view may reset the host query and selection, but saving or renaming a definition must not reset unrelated result selection.
32
+ - The command rail uses the shared plain Toolbar variant so its outer height matches the adjacent Select, without a second container around the actions.
33
+
34
+ ## API reference
35
+
36
+ | Prop | Values | Default |
37
+ | --- | --- | --- |
38
+ | `label` | `string` | `Required` |
39
+ | `views` | `readonly CollectionViewOption[]` | `Required` |
40
+ | `value` | `string` | `Required` |
41
+ | `onValueChange` | `(id:string)=>void` | `Required` |
42
+ | `actions` | `readonly OverflowAction[]` | `—` |
43
+ | `onAction` | `(id:string)=>void` | `—` |
44
+ | `actionsLabel` | `string` | `—` |
45
+ | `moreLabel` | `string` | `—` |
46
+ | `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
47
+ | `disabled` | `boolean` | `—` |
48
+ | `selectRef` | `Ref<HTMLSelectElement>` | `—` |
49
+ | `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "onChange">` | `Forwarded` |
@@ -47,4 +47,14 @@ export function Example() {
47
47
  | `toggleLabel` | `string` | `"Show options"` |
48
48
  | `clearLabel` | `string` | `"Clear selection"` |
49
49
  | `invalidSelectionMessage` | `string` | `"Select an option."` |
50
+ | `query` | `string` | `—` |
51
+ | `onQueryChange` | `(query: string) => void` | `—` |
52
+ | `filtering` | `"local" \| "manual"` | `—` |
53
+ | `optionsQuery` | `string` | `—` |
54
+ | `selectedOptions` | `readonly ComboboxOption[]` | `—` |
55
+ | `loadState` | `"ready" \| "loading" \| "error"` | `—` |
56
+ | `loadingMessage` | `string` | `—` |
57
+ | `errorMessage` | `string` | `—` |
58
+ | `onRetry` | `() => void` | `—` |
59
+ | `retryLabel` | `string` | `—` |
50
60
  | `Native HTML props` | `Omit<InputHTMLAttributes<HTMLInputElement>, "type" \| "value" \| "defaultValue" \| "onChange" \| "children">` | `Forwarded` |
@@ -0,0 +1,53 @@
1
+ # CommandPalette
2
+
3
+ A modal search surface for navigating pages or running commands.
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, CommandPalette, Button } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <CommandPalette title="Go to page" searchLabel="Search pages" trigger={props => <Button {...props}>Go to page</Button>} items={[{id:"projects",label:"All projects"}]} onAction={id => console.log(id)} />
19
+ </FloodRoot>
20
+ );
21
+ }
22
+ ```
23
+
24
+ ## Design notes
25
+
26
+ - Choose comfortable or compact density. Items can be grouped, described or disabled.
27
+ - Opening focuses search. Enter or click runs an enabled action and requests closure. Escape and the close button return focus to the trigger.
28
+ - Use controlled query and loading for asynchronous search. The application owns requests, navigation and any global shortcut.
29
+
30
+ ## API reference
31
+
32
+ | Prop | Values | Default |
33
+ | --- | --- | --- |
34
+ | `title` | `string` | `Required` |
35
+ | `trigger` | `(props: OverlayTriggerProps) => ReactNode` | `Required` |
36
+ | `open` | `boolean` | `—` |
37
+ | `defaultOpen` | `boolean` | `false` |
38
+ | `onOpenChange` | `(open: boolean) => void` | `—` |
39
+ | `disabled` | `boolean` | `—` |
40
+ | `closeLabel` | `string` | `—` |
41
+ | `closeOnOutsideClick` | `boolean` | `—` |
42
+ | `searchLabel` | `string` | `Required` |
43
+ | `items` | `readonly CommandListItem[]` | `Required` |
44
+ | `density` | `"comfortable" \| "compact"` | `"comfortable"` |
45
+ | `query` | `string` | `—` |
46
+ | `defaultQuery` | `string` | `—` |
47
+ | `onQueryChange` | `(query: string) => void` | `—` |
48
+ | `onAction` | `(id: string) => void` | `Required` |
49
+ | `loading` | `boolean` | `—` |
50
+ | `placeholder` | `string` | `—` |
51
+ | `emptyMessage` | `string` | `—` |
52
+ | `loadingMessage` | `string` | `—` |
53
+ | `Native HTML props` | `Omit<Omit<HTMLAttributes<HTMLDialogElement>, "children" \| "title" \| "role">, "children" \| "description" \| "initialFocusRef">` | `Forwarded` |
@@ -31,6 +31,7 @@ export function Example() {
31
31
  | Prop | Values | Default |
32
32
  | --- | --- | --- |
33
33
  | `variant` | `"solid" \| "subtle" \| "outline" \| "ghost"` | `"subtle"` |
34
+ | `tone` | `"default" \| "danger"` | `—` |
34
35
  | `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` |
35
36
  | `value` | `string` | `Required` |
36
37
  | `copyLabel` | `string` | `"Copy"` |
@@ -16,8 +16,8 @@ export function Example() {
16
16
  return (
17
17
  <FloodRoot>
18
18
  <DataTable caption="Projects" selectable pageSize={5}
19
- columns={[{id:"name",label:"Project",sortable:true},{id:"status",label:"Status"}]}
20
- rows={[{id:"design",label:"Design system",cells:{name:"Design system",status:"Active"}}]} />
19
+ columns={[{id:"name",label:"Project",sortable:true},{id:"status",label:"Status"},{id:"members",label:"Members",numeric:true}]}
20
+ rows={[{id:"design",label:"Design system",cells:{name:"Design system",status:"Active",members:12}}]} />
21
21
  </FloodRoot>
22
22
  );
23
23
  }
@@ -28,11 +28,19 @@ export function Example() {
28
28
  - Supply the complete client collection; remote/server pagination and virtualization are not part of this API.
29
29
  - Select all affects selectable rows on the current page and preserves selection on other pages.
30
30
  - Use sortValues for rich React cells; missing values sort last in both directions.
31
+ - Use showResults={false} to omit a redundant result range. Selection feedback and pagination remain, and the footer disappears when it has no other content.
32
+ - Set column.numeric for comparable amounts and quantities. Header and cells align to the logical end with tabular figures, while explicit align takes precedence. Keep numeric identifiers as text and provide raw sortValues for localized amounts.
33
+ - For in-place record details, supply row.primaryAction with the identity column, title, optional description and native button props. Pointer activation extends across the row, while keyboard focus lands on the title button. Secondary controls retain their own behavior.
34
+ - Use toolbar for the heading and filters that share the table surface. Set inset to roomy for a shared outer inset on toolbar, table cells and footer.
35
+ - emptyContent renders a host-composed EmptyState/actions only for ready with no visible rows, preserving headers. Loading/error retain their Spinner and Alert/retry owners. Omit it to keep labels.empty. Distinguish an empty collection from no matching results and restore focus when an empty-state action disappears.
31
36
 
32
37
  ## API reference
33
38
 
34
39
  | Prop | Values | Default |
35
40
  | --- | --- | --- |
41
+ | `toolbar` | `ReactNode` | `—` |
42
+ | `inset` | `"standard" \| "roomy"` | `—` |
43
+ | `emptyContent` | `ReactNode` | `—` |
36
44
  | `caption` | `string` | `Required` |
37
45
  | `hideCaption` | `boolean` | `—` |
38
46
  | `columns` | `readonly DataTableColumn[]` | `Required` |
@@ -52,6 +60,10 @@ export function Example() {
52
60
  | `defaultPage` | `number` | `—` |
53
61
  | `pageSize` | `number` | `—` |
54
62
  | `onPageChange` | `(page: number) => void` | `—` |
63
+ | `showResults` | `boolean` | `—` |
64
+ | `paginationMode` | `"client" \| "server"` | `—` |
65
+ | `totalRows` | `number` | `—` |
66
+ | `selectionScope` | `"page" \| "dataset"` | `—` |
55
67
  | `state` | `"ready" \| "loading" \| "error"` | `—` |
56
68
  | `onRetry` | `() => void` | `—` |
57
69
  | `labels` | `DataTableLabels` | `—` |
@@ -58,6 +58,7 @@ export function Example() {
58
58
  | `onOpenChange` | `(open: boolean) => void` | `—` |
59
59
  | `calendarLabel` | `string` | `—` |
60
60
  | `openCalendarLabel` | `string` | `—` |
61
+ | `viewLabels` | `CalendarProps["viewLabels"]` | `—` |
61
62
  | `locale` | `string` | `—` |
62
63
  | `weekStartsOn` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6` | `—` |
63
64
  | `today` | `string` | `—` |
@@ -63,6 +63,7 @@ export function Example() {
63
63
  | `onOpenChange` | `(open: boolean) => void` | `—` |
64
64
  | `calendarLabel` | `string` | `—` |
65
65
  | `openCalendarLabel` | `string` | `—` |
66
+ | `viewLabels` | `CalendarProps["viewLabels"]` | `—` |
66
67
  | `locale` | `string` | `—` |
67
68
  | `weekStartsOn` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6` | `—` |
68
69
  | `today` | `string` | `—` |
@@ -40,6 +40,8 @@ export function Example() {
40
40
  | `onValueChange` | `(value: DateTimeValue) => void` | `—` |
41
41
  | `dateLabel` | `string` | `—` |
42
42
  | `timeLabel` | `string` | `—` |
43
+ | `datePickerLabels` | `Pick<DatePickerProps, "calendarLabel" \| "openCalendarLabel" \| "previousMonthLabel" \| "nextMonthLabel" \| "viewLabels" \| "segmentLabels" \| "messages">` | `—` |
44
+ | `timePickerLabels` | `Pick<TimePickerProps, "panelLabel" \| "openTimeLabel" \| "segmentLabels" \| "messages">` | `—` |
43
45
  | `dateName` | `string` | `—` |
44
46
  | `timeName` | `string` | `—` |
45
47
  | `form` | `string` | `—` |
@@ -47,6 +47,10 @@ export function Example() {
47
47
  | `startTimeLabel` | `string` | `—` |
48
48
  | `endDateLabel` | `string` | `—` |
49
49
  | `endTimeLabel` | `string` | `—` |
50
+ | `startDatePickerLabels` | `DateTimePickerProps["datePickerLabels"]` | `—` |
51
+ | `endDatePickerLabels` | `DateTimePickerProps["datePickerLabels"]` | `—` |
52
+ | `startTimePickerLabels` | `DateTimePickerProps["timePickerLabels"]` | `—` |
53
+ | `endTimePickerLabels` | `DateTimePickerProps["timePickerLabels"]` | `—` |
50
54
  | `form` | `string` | `—` |
51
55
  | `required` | `boolean` | `—` |
52
56
  | `disabled` | `boolean` | `—` |
@@ -27,6 +27,7 @@ export function Example() {
27
27
 
28
28
  - Uses Flood native Dialog focus containment, scroll lock, background inertness, nested layers and return focus. Escape and the named close IconButton dismiss it; closeOnOutsideClick defaults to true. Controlled open/onOpenChange and initialFocusRef match Dialog.
29
29
  - side is logical start/end or physical top/bottom. size sets 20/26/34rem for sm/md/lg, capped to the viewport. Vertical drawers occupy the viewport height; horizontal drawers occupy its width. Entry motion respects reduced motion; closing is immediate.
30
+ - Choose width against a populated record. For longer messages and several controls, compare md and lg. Use the description slot for short context and compose independent body groups with Section or Fieldset. Keep persistent actions in footer.
30
31
  - The body scrolls with Flood ScrollArea while the header and optional footer remain visible when space allows. Responsive padding and full-width narrow descriptions preserve the reading area at enlarged text; if the chrome cannot fit, the whole panel can scroll rather than clipping the body. Footer actions are host-owned, without implicit save or close. No swipe/drag gesture or nested navigation engine is included. Available in 0.2.5.
31
32
 
32
33
  ## API reference
@@ -15,7 +15,7 @@ import "@flood-md/react/styles.css";
15
15
  export function Example() {
16
16
  return (
17
17
  <FloodRoot>
18
- <Figure caption="A calm foundation for the next idea."><Surface padding="6">Project preview</Surface></Figure>
18
+ <Figure caption="Homepage, desktop layout"><Surface padding="6">Project preview</Surface></Figure>
19
19
  </FloodRoot>
20
20
  );
21
21
  }
@@ -0,0 +1,53 @@
1
+ # FilterCondition
2
+
3
+ One controlled filter predicate composed from property, operator and value controls.
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, FilterCondition } from "@flood-md/react";
13
+ import "@flood-md/react/styles.css";
14
+
15
+ export function Example() {
16
+ return (
17
+ <FloodRoot>
18
+ <FilterCondition label="Condition 1"
19
+ properties={[{id:"status",label:"Status",options:[{value:"active",label:"Active"},{value:"paused",label:"Paused"}]}]}
20
+ value={{property:"status",operator:"is",values:["active"]}}
21
+ onValueChange={(condition) => console.log(condition)} />
22
+ </FloodRoot>
23
+ );
24
+ }
25
+ ```
26
+
27
+ ## Design notes
28
+
29
+ - Compose one finite-choice condition from Fieldset, Field, Grid, Select, MultiSelect and IconButton. sm is the default; all controls share controlSize.
30
+ - value and onValueChange are controlled. Changing the property proposes an empty values array; changing the operator preserves selected values. Empty values are an incomplete draft, never an instruction to match every record.
31
+ - The host owns query evaluation, duplicate-property policy, Apply/Cancel, validation and focus after removing the row. onRemove is optional; no removal slot is reserved when omitted.
32
+ - label names the condition group. hideLabel defaults to true; property/operator/value controls retain their accessible names. labels customizes control names, operator text, placeholder and removal text.
33
+ - A wide host uses one row with a wider value track. Container-based reflow follows the space available to this row, including inside a popup or drawer. No extra background or border is added.
34
+ - This version supports finite enumerated values and is/is-not predicates. Date, text, numeric operators, nested groups, remote fetching and query execution are not part of this component.
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` | `FilterConditionValue` | `Required` |
49
+ | `onValueChange` | `(value: FilterConditionValue) => void` | `Required` |
50
+ | `onRemove` | `() => void` | `—` |
51
+ | `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
52
+ | `labels` | `Partial<Record<"property" \| "operator" \| "values" \| "include" \| "exclude" \| "placeholder" \| "remove", string>>` | `—` |
53
+ | `Native HTML props` | `Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, "children" \| "legend" \| "onChange">` | `Forwarded` |
@@ -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` |