@flood-md/agent 0.2.9 → 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 +33 -8
- package/README.md +35 -4
- package/SKILL.md +42 -0
- package/dist/catalog.json +8716 -0
- package/dist/materials/component-accordion.md +42 -0
- package/dist/materials/component-alert-dialog.md +46 -0
- package/dist/materials/component-alert.md +41 -0
- package/dist/materials/component-app-shell.md +47 -0
- package/dist/materials/component-app-top-bar.md +36 -0
- package/dist/materials/component-aspect-ratio.md +36 -0
- package/dist/materials/component-autocomplete.md +54 -0
- package/dist/materials/component-avatar-group.md +39 -0
- package/dist/materials/component-avatar.md +40 -0
- package/dist/materials/component-badge.md +37 -0
- package/dist/materials/component-blockquote.md +35 -0
- package/dist/materials/component-breadcrumb.md +36 -0
- package/dist/materials/component-bulk-action-bar.md +52 -0
- package/dist/materials/component-button-group.md +39 -0
- package/dist/materials/component-button.md +44 -0
- package/dist/materials/component-calendar.md +59 -0
- package/dist/materials/component-card.md +46 -0
- package/dist/materials/component-center.md +39 -0
- package/dist/materials/component-character-count.md +42 -0
- package/dist/materials/component-check-card.md +39 -0
- package/dist/materials/component-checkbox-group.md +48 -0
- package/dist/materials/component-checkbox.md +37 -0
- package/dist/materials/component-code-snippet.md +37 -0
- package/dist/materials/component-collapsible.md +41 -0
- package/dist/materials/component-collection-toolbar.md +68 -0
- package/dist/materials/component-collection-view-switcher.md +49 -0
- package/dist/materials/component-color-picker.md +49 -0
- package/dist/materials/component-color-swatch.md +35 -0
- package/dist/materials/component-combobox.md +60 -0
- package/dist/materials/component-command-list.md +48 -0
- package/dist/materials/component-command-palette.md +53 -0
- package/dist/materials/component-container.md +36 -0
- package/dist/materials/component-context-menu.md +43 -0
- package/dist/materials/component-copy-button.md +43 -0
- package/dist/materials/component-data-list-item.md +40 -0
- package/dist/materials/component-data-list.md +38 -0
- package/dist/materials/component-data-table.md +70 -0
- package/dist/materials/component-date-field.md +57 -0
- package/dist/materials/component-date-picker.md +67 -0
- package/dist/materials/component-date-range-field.md +62 -0
- package/dist/materials/component-date-range-picker.md +73 -0
- package/dist/materials/component-date-time-picker.md +62 -0
- package/dist/materials/component-date-time-range-picker.md +70 -0
- package/dist/materials/component-description-list.md +42 -0
- package/dist/materials/component-dialog.md +45 -0
- package/dist/materials/component-divider.md +37 -0
- package/dist/materials/component-drawer.md +51 -0
- package/dist/materials/component-dropzone.md +45 -0
- package/dist/materials/component-editable.md +57 -0
- package/dist/materials/component-empty-state.md +41 -0
- package/dist/materials/component-error-summary.md +40 -0
- package/dist/materials/component-field.md +46 -0
- package/dist/materials/component-fieldset.md +46 -0
- package/dist/materials/component-figure.md +36 -0
- package/dist/materials/component-file-input.md +45 -0
- package/dist/materials/component-file-item.md +48 -0
- package/dist/materials/component-file-list.md +39 -0
- package/dist/materials/component-file-meta.md +36 -0
- package/dist/materials/component-filter-condition.md +53 -0
- package/dist/materials/component-filter-group.md +55 -0
- package/dist/materials/component-flood-root.md +33 -0
- package/dist/materials/component-grid.md +38 -0
- package/dist/materials/component-heading.md +38 -0
- package/dist/materials/component-hover-card.md +48 -0
- package/dist/materials/component-icon-button.md +43 -0
- package/dist/materials/component-icon-slot.md +37 -0
- package/dist/materials/component-image-preview.md +50 -0
- package/dist/materials/component-image.md +37 -0
- package/dist/materials/component-inline-code.md +36 -0
- package/dist/materials/component-inline.md +39 -0
- package/dist/materials/component-input-group.md +43 -0
- package/dist/materials/component-input.md +39 -0
- package/dist/materials/component-kbd.md +34 -0
- package/dist/materials/component-label.md +37 -0
- package/dist/materials/component-link.md +35 -0
- package/dist/materials/component-list-box.md +57 -0
- package/dist/materials/component-list.md +40 -0
- package/dist/materials/component-menu.md +54 -0
- package/dist/materials/component-menubar.md +41 -0
- package/dist/materials/component-meter.md +43 -0
- package/dist/materials/component-metric.md +39 -0
- package/dist/materials/component-multi-select.md +62 -0
- package/dist/materials/component-navigation-group.md +51 -0
- package/dist/materials/component-navigation-item.md +59 -0
- package/dist/materials/component-navigation-list.md +38 -0
- package/dist/materials/component-navigation-tree.md +51 -0
- package/dist/materials/component-number-input.md +47 -0
- package/dist/materials/component-overflow-actions.md +47 -0
- package/dist/materials/component-page-header.md +40 -0
- package/dist/materials/component-pagination.md +44 -0
- package/dist/materials/component-password-input.md +43 -0
- package/dist/materials/component-pin-input.md +45 -0
- package/dist/materials/component-popover.md +48 -0
- package/dist/materials/component-progress.md +42 -0
- package/dist/materials/component-radio-card.md +43 -0
- package/dist/materials/component-radio-group.md +49 -0
- package/dist/materials/component-radio.md +39 -0
- package/dist/materials/component-range-calendar.md +58 -0
- package/dist/materials/component-rating.md +46 -0
- package/dist/materials/component-resizable-panels.md +48 -0
- package/dist/materials/component-scroll-area.md +42 -0
- package/dist/materials/component-search-input.md +40 -0
- package/dist/materials/component-section.md +42 -0
- package/dist/materials/component-segmented-control.md +53 -0
- package/dist/materials/component-select.md +45 -0
- package/dist/materials/component-sidebar.md +64 -0
- package/dist/materials/component-skeleton.md +42 -0
- package/dist/materials/component-skip-link.md +37 -0
- package/dist/materials/component-slider.md +51 -0
- package/dist/materials/component-spinner.md +37 -0
- package/dist/materials/component-split.md +40 -0
- package/dist/materials/component-stack.md +37 -0
- package/dist/materials/component-status-indicator.md +38 -0
- package/dist/materials/component-steps.md +40 -0
- package/dist/materials/component-surface.md +37 -0
- package/dist/materials/component-switch.md +35 -0
- package/dist/materials/component-table.md +46 -0
- package/dist/materials/component-tabs.md +45 -0
- package/dist/materials/component-tag-input.md +46 -0
- package/dist/materials/component-tag.md +40 -0
- package/dist/materials/component-text.md +39 -0
- package/dist/materials/component-textarea.md +38 -0
- package/dist/materials/component-time-field.md +56 -0
- package/dist/materials/component-time-picker.md +60 -0
- package/dist/materials/component-timeline.md +38 -0
- package/dist/materials/component-toast-region.md +42 -0
- package/dist/materials/component-toggle-group.md +44 -0
- package/dist/materials/component-toggle.md +40 -0
- package/dist/materials/component-toolbar.md +46 -0
- package/dist/materials/component-tooltip.md +40 -0
- package/dist/materials/component-tree-select.md +56 -0
- package/dist/materials/component-tree.md +52 -0
- package/dist/materials/component-upload-item.md +52 -0
- package/dist/materials/component-upload-list.md +40 -0
- package/dist/materials/component-visually-hidden.md +37 -0
- package/dist/materials/guide-agent-knowledge.md +95 -0
- package/dist/materials/guide-agents.md +103 -0
- package/dist/materials/guide-faq.md +84 -0
- package/dist/materials/guide-foundations.md +275 -0
- package/dist/materials/guide-installation.md +79 -0
- package/dist/materials/guide-interface-content.md +76 -0
- package/dist/materials/guide-introduction.md +42 -0
- package/dist/materials/guide-layout.md +222 -0
- package/dist/materials/guide-motion.md +69 -0
- package/dist/materials/guide-privacy.md +23 -0
- package/dist/materials/guide-project-ui.md +127 -0
- package/dist/materials/guide-skills.md +117 -0
- package/dist/materials/guide-theming.md +73 -0
- package/dist/materials/recipe-collection-views.md +648 -0
- package/dist/materials/recipe-command-palette.md +45 -0
- package/dist/materials/recipe-filter-bar.md +68 -0
- package/dist/materials/recipe-form-submission.md +39 -0
- package/dist/materials/recipe-grouped-form.md +71 -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-select-all.md +31 -0
- package/dist/materials/recipe-settings-workspace.md +232 -0
- package/dist/materials/recipe-split-button.md +26 -0
- package/dist/materials/recipe-table-bulk-actions.md +88 -0
- package/dist/materials/recipe-workspace-review.md +134 -0
- package/dist/materials/token-sys.color.accent.content.json +41 -0
- package/dist/materials/token-sys.color.action.danger.content.json +42 -0
- package/dist/materials/token-sys.color.action.ghost.content.json +41 -0
- package/dist/materials/token-sys.color.action.ghost.disabled-content.json +41 -0
- package/dist/materials/token-sys.color.action.ghost.disabled.json +41 -0
- package/dist/materials/token-sys.color.action.ghost.hover.json +41 -0
- package/dist/materials/token-sys.color.action.ghost.pressed.json +41 -0
- package/dist/materials/token-sys.color.action.ghost.rest.json +41 -0
- package/dist/materials/token-sys.color.action.on-surface.content.json +39 -0
- package/dist/materials/token-sys.color.action.on-surface.disabled-content.json +39 -0
- package/dist/materials/token-sys.color.action.on-surface.disabled.json +39 -0
- package/dist/materials/token-sys.color.action.on-surface.hover.json +39 -0
- package/dist/materials/token-sys.color.action.on-surface.pressed.json +39 -0
- package/dist/materials/token-sys.color.action.on-surface.rest.json +39 -0
- package/dist/materials/token-sys.color.action.primary.content.json +39 -0
- package/dist/materials/token-sys.color.action.primary.disabled-content.json +39 -0
- package/dist/materials/token-sys.color.action.primary.disabled.json +39 -0
- package/dist/materials/token-sys.color.action.primary.hover.json +39 -0
- package/dist/materials/token-sys.color.action.primary.pressed.json +39 -0
- package/dist/materials/token-sys.color.action.primary.rest.json +39 -0
- package/dist/materials/token-sys.color.action.subtle.content.json +39 -0
- package/dist/materials/token-sys.color.action.subtle.disabled-content.json +39 -0
- package/dist/materials/token-sys.color.action.subtle.disabled.json +39 -0
- package/dist/materials/token-sys.color.action.subtle.hover.json +39 -0
- package/dist/materials/token-sys.color.action.subtle.pressed.json +39 -0
- package/dist/materials/token-sys.color.action.subtle.rest.json +39 -0
- package/dist/materials/token-sys.color.border.decorative.json +42 -0
- package/dist/materials/token-sys.color.border.default.json +39 -0
- package/dist/materials/token-sys.color.border.floating.json +39 -0
- package/dist/materials/token-sys.color.border.strong.json +39 -0
- package/dist/materials/token-sys.color.content.default.json +41 -0
- package/dist/materials/token-sys.color.content.helper.json +39 -0
- package/dist/materials/token-sys.color.content.subtle.json +43 -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.divider.decorative.json +41 -0
- package/dist/materials/token-sys.color.feedback.error.json +39 -0
- package/dist/materials/token-sys.color.feedback.info.json +39 -0
- package/dist/materials/token-sys.color.feedback.success.json +39 -0
- package/dist/materials/token-sys.color.feedback.warning.json +39 -0
- package/dist/materials/token-sys.color.field.background.json +39 -0
- package/dist/materials/token-sys.color.field.border.json +39 -0
- package/dist/materials/token-sys.color.field.boundary.json +39 -0
- package/dist/materials/token-sys.color.field.content.json +39 -0
- package/dist/materials/token-sys.color.field.disabled-content.json +39 -0
- package/dist/materials/token-sys.color.field.disabled.json +39 -0
- package/dist/materials/token-sys.color.field.placeholder.json +39 -0
- package/dist/materials/token-sys.color.field.readonly.json +41 -0
- package/dist/materials/token-sys.color.focus.ring.json +39 -0
- package/dist/materials/token-sys.color.indicator.accent.json +39 -0
- package/dist/materials/token-sys.color.indicator.fill.json +39 -0
- package/dist/materials/token-sys.color.indicator.track.json +39 -0
- package/dist/materials/token-sys.color.loading.placeholder.json +42 -0
- package/dist/materials/token-sys.color.scrollbar.thumb-hover.json +39 -0
- package/dist/materials/token-sys.color.scrollbar.thumb.json +39 -0
- package/dist/materials/token-sys.color.selection.background.json +39 -0
- package/dist/materials/token-sys.color.selection.content.json +39 -0
- package/dist/materials/token-sys.color.selection.floating.json +39 -0
- package/dist/materials/token-sys.color.shadow.floating.json +39 -0
- package/dist/materials/token-sys.color.surface.avatar.json +41 -0
- package/dist/materials/token-sys.color.surface.canvas.json +39 -0
- package/dist/materials/token-sys.color.surface.current.json +41 -0
- package/dist/materials/token-sys.color.surface.default.json +39 -0
- package/dist/materials/token-sys.color.surface.floating-translucent.json +39 -0
- package/dist/materials/token-sys.color.surface.floating.json +39 -0
- package/dist/materials/token-sys.color.surface.muted.json +41 -0
- package/dist/materials/token-sys.color.surface.overlay.json +39 -0
- package/dist/materials/token-sys.color.surface.raised.json +39 -0
- package/dist/materials/token-sys.color.surface.supporting.json +41 -0
- package/dist/materials/token-sys.control.2xl.gap.json +34 -0
- package/dist/materials/token-sys.control.2xl.height.json +34 -0
- package/dist/materials/token-sys.control.2xl.icon-size.json +34 -0
- package/dist/materials/token-sys.control.2xl.line-height.json +31 -0
- package/dist/materials/token-sys.control.2xl.padding-inline.json +34 -0
- package/dist/materials/token-sys.control.2xl.text-size.json +34 -0
- package/dist/materials/token-sys.control.2xs.gap.json +34 -0
- package/dist/materials/token-sys.control.2xs.height.json +34 -0
- package/dist/materials/token-sys.control.2xs.icon-size.json +34 -0
- package/dist/materials/token-sys.control.2xs.line-height.json +31 -0
- package/dist/materials/token-sys.control.2xs.padding-inline.json +34 -0
- package/dist/materials/token-sys.control.2xs.text-size.json +34 -0
- package/dist/materials/token-sys.control.lg.gap.json +34 -0
- package/dist/materials/token-sys.control.lg.height.json +34 -0
- package/dist/materials/token-sys.control.lg.icon-size.json +34 -0
- package/dist/materials/token-sys.control.lg.line-height.json +31 -0
- package/dist/materials/token-sys.control.lg.padding-inline.json +34 -0
- package/dist/materials/token-sys.control.lg.text-size.json +34 -0
- package/dist/materials/token-sys.control.md.gap.json +34 -0
- package/dist/materials/token-sys.control.md.height.json +34 -0
- package/dist/materials/token-sys.control.md.icon-size.json +34 -0
- package/dist/materials/token-sys.control.md.line-height.json +31 -0
- package/dist/materials/token-sys.control.md.padding-inline.json +34 -0
- package/dist/materials/token-sys.control.md.text-size.json +34 -0
- package/dist/materials/token-sys.control.sm.gap.json +34 -0
- package/dist/materials/token-sys.control.sm.height.json +34 -0
- package/dist/materials/token-sys.control.sm.icon-size.json +34 -0
- package/dist/materials/token-sys.control.sm.line-height.json +31 -0
- package/dist/materials/token-sys.control.sm.padding-inline.json +34 -0
- package/dist/materials/token-sys.control.sm.text-size.json +34 -0
- package/dist/materials/token-sys.control.xl.gap.json +34 -0
- package/dist/materials/token-sys.control.xl.height.json +34 -0
- package/dist/materials/token-sys.control.xl.icon-size.json +34 -0
- package/dist/materials/token-sys.control.xl.line-height.json +31 -0
- package/dist/materials/token-sys.control.xl.padding-inline.json +34 -0
- package/dist/materials/token-sys.control.xl.text-size.json +34 -0
- package/dist/materials/token-sys.control.xs.gap.json +34 -0
- package/dist/materials/token-sys.control.xs.height.json +34 -0
- package/dist/materials/token-sys.control.xs.icon-size.json +34 -0
- package/dist/materials/token-sys.control.xs.line-height.json +31 -0
- package/dist/materials/token-sys.control.xs.padding-inline.json +34 -0
- package/dist/materials/token-sys.control.xs.text-size.json +34 -0
- package/dist/materials/token-sys.effect.floating.blur.json +34 -0
- package/dist/materials/token-sys.effect.floating.saturation.json +31 -0
- package/dist/materials/token-sys.effect.floating.shadow-blur.json +34 -0
- package/dist/materials/token-sys.effect.floating.shadow-offset.json +34 -0
- package/dist/materials/token-sys.focus.offset.json +34 -0
- package/dist/materials/token-sys.focus.width.json +34 -0
- package/dist/materials/token-sys.font.mono.json +36 -0
- package/dist/materials/token-sys.font.sans.json +35 -0
- package/dist/materials/token-sys.layer.base.json +31 -0
- package/dist/materials/token-sys.layer.modal.json +31 -0
- package/dist/materials/token-sys.layer.popover.json +31 -0
- package/dist/materials/token-sys.layer.sticky.json +31 -0
- package/dist/materials/token-sys.layer.toast.json +31 -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-fast.json +34 -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-normal.json +34 -0
- package/dist/materials/token-sys.motion.duration-press.json +36 -0
- package/dist/materials/token-sys.motion.duration-reduced.json +34 -0
- package/dist/materials/token-sys.motion.easing-enter.json +38 -0
- package/dist/materials/token-sys.motion.easing-exit.json +38 -0
- package/dist/materials/token-sys.motion.easing.json +36 -0
- package/dist/materials/token-sys.radius.action.json +34 -0
- package/dist/materials/token-sys.radius.block.json +34 -0
- package/dist/materials/token-sys.radius.field.json +34 -0
- package/dist/materials/token-sys.radius.indicator.json +34 -0
- package/dist/materials/token-sys.radius.surface.json +34 -0
- package/dist/materials/token-sys.scrollbar.inset.json +34 -0
- package/dist/materials/token-sys.scrollbar.min-thumb.json +34 -0
- package/dist/materials/token-sys.scrollbar.size.json +34 -0
- package/dist/materials/token-sys.size.choice.json +34 -0
- package/dist/materials/token-sys.size.container.lg.json +37 -0
- package/dist/materials/token-sys.size.container.md.json +37 -0
- package/dist/materials/token-sys.size.container.sm.json +37 -0
- package/dist/materials/token-sys.size.grid.min-item.json +37 -0
- package/dist/materials/token-sys.size.indicator.lg.json +34 -0
- package/dist/materials/token-sys.size.indicator.md.json +34 -0
- package/dist/materials/token-sys.size.indicator.sm.json +34 -0
- package/dist/materials/token-sys.size.keycap.lg.json +34 -0
- package/dist/materials/token-sys.size.keycap.md.json +34 -0
- package/dist/materials/token-sys.size.keycap.sm.json +34 -0
- package/dist/materials/token-sys.size.switch-height.json +34 -0
- package/dist/materials/token-sys.size.switch-thumb.json +34 -0
- package/dist/materials/token-sys.size.switch-width.json +34 -0
- package/dist/materials/token-sys.size.touch.json +34 -0
- package/dist/materials/token-sys.space.0.json +34 -0
- package/dist/materials/token-sys.space.1.json +34 -0
- package/dist/materials/token-sys.space.12.json +34 -0
- package/dist/materials/token-sys.space.2.json +34 -0
- package/dist/materials/token-sys.space.3.json +34 -0
- package/dist/materials/token-sys.space.4.json +34 -0
- package/dist/materials/token-sys.space.6.json +34 -0
- package/dist/materials/token-sys.space.8.json +34 -0
- package/dist/materials/token-sys.stroke.width.json +34 -0
- package/dist/materials/token-sys.type.body.line-height.json +31 -0
- package/dist/materials/token-sys.type.body.size.json +34 -0
- package/dist/materials/token-sys.type.body.tracking.json +34 -0
- package/dist/materials/token-sys.type.body.weight.json +31 -0
- package/dist/materials/token-sys.type.compact.line-height.json +31 -0
- package/dist/materials/token-sys.type.compact.size.json +34 -0
- package/dist/materials/token-sys.type.compact.tracking.json +34 -0
- package/dist/materials/token-sys.type.compact.weight.json +31 -0
- package/dist/materials/token-sys.type.control.line-height.json +31 -0
- package/dist/materials/token-sys.type.control.size.json +34 -0
- package/dist/materials/token-sys.type.control.tracking.json +34 -0
- package/dist/materials/token-sys.type.control.weight.json +31 -0
- package/dist/materials/token-sys.type.dialog-title.line-height.json +33 -0
- package/dist/materials/token-sys.type.dialog-title.size.json +36 -0
- package/dist/materials/token-sys.type.dialog-title.tracking.json +36 -0
- package/dist/materials/token-sys.type.dialog-title.weight.json +33 -0
- package/dist/materials/token-sys.type.display.line-height.json +31 -0
- package/dist/materials/token-sys.type.display.size.json +34 -0
- package/dist/materials/token-sys.type.display.tracking.json +34 -0
- package/dist/materials/token-sys.type.display.weight.json +31 -0
- package/dist/materials/token-sys.type.field-label.line-height.json +33 -0
- package/dist/materials/token-sys.type.field-label.size.json +36 -0
- package/dist/materials/token-sys.type.field-label.tracking.json +36 -0
- package/dist/materials/token-sys.type.field-label.weight.json +33 -0
- package/dist/materials/token-sys.type.group-title.line-height.json +33 -0
- package/dist/materials/token-sys.type.group-title.size.json +36 -0
- package/dist/materials/token-sys.type.group-title.tracking.json +36 -0
- package/dist/materials/token-sys.type.group-title.weight.json +33 -0
- package/dist/materials/token-sys.type.helper.line-height.json +31 -0
- package/dist/materials/token-sys.type.helper.size.json +34 -0
- package/dist/materials/token-sys.type.helper.tracking.json +34 -0
- package/dist/materials/token-sys.type.helper.weight.json +31 -0
- package/dist/materials/token-sys.type.label.line-height.json +31 -0
- package/dist/materials/token-sys.type.label.size.json +34 -0
- package/dist/materials/token-sys.type.label.tracking.json +34 -0
- package/dist/materials/token-sys.type.label.weight.json +31 -0
- package/dist/materials/token-sys.type.large.line-height.json +31 -0
- package/dist/materials/token-sys.type.large.size.json +34 -0
- package/dist/materials/token-sys.type.large.tracking.json +34 -0
- package/dist/materials/token-sys.type.large.weight.json +31 -0
- package/dist/materials/token-sys.type.lead.line-height.json +31 -0
- package/dist/materials/token-sys.type.lead.size.json +34 -0
- package/dist/materials/token-sys.type.lead.tracking.json +34 -0
- package/dist/materials/token-sys.type.lead.weight.json +31 -0
- package/dist/materials/token-sys.type.page.line-height.json +31 -0
- package/dist/materials/token-sys.type.page.size.json +34 -0
- package/dist/materials/token-sys.type.page.tracking.json +34 -0
- package/dist/materials/token-sys.type.page.weight.json +31 -0
- package/dist/materials/token-sys.type.section.line-height.json +31 -0
- package/dist/materials/token-sys.type.section.size.json +34 -0
- package/dist/materials/token-sys.type.section.tracking.json +34 -0
- package/dist/materials/token-sys.type.section.weight.json +31 -0
- package/knowledge.json +522 -0
- package/lib/index.d.ts +33 -0
- package/lib/index.mjs +144 -0
- package/lib/inspect.d.ts +12 -0
- package/lib/inspect.mjs +187 -0
- package/manifest.json +51 -1
- package/package.json +13 -1
- 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 +34 -0
- package/references/flood-data-display/SKILL.md +149 -0
- package/references/flood-feedback/SKILL.md +49 -3
- package/references/flood-forms/SKILL.md +82 -2
- package/references/flood-foundations/SKILL.md +43 -0
- package/references/flood-hierarchy/SKILL.md +103 -0
- package/references/flood-interface-content/SKILL.md +163 -0
- package/references/flood-motion/SKILL.md +44 -0
- package/references/flood-navigation/SKILL.md +195 -0
- package/references/flood-overlays/SKILL.md +42 -0
- package/references/flood-records/SKILL.md +148 -0
- package/references/flood-spacing/SKILL.md +54 -0
- package/references/flood-verification/SKILL.md +72 -0
- package/references/interface-content-examples.md +51 -0
- package/references/knowledge.md +49 -0
- package/references/record-decisions.md +25 -0
- package/references/rendered-review.md +102 -0
- package/references/routing.md +1 -0
- package/references/spacing.md +30 -0
- package/rules.json +242 -6
- package/workflows.json +171 -10
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Command palette
|
|
2
|
+
|
|
3
|
+
Use CommandPalette for a workspace-wide page finder or a set of searchable
|
|
4
|
+
commands. It shares filtering and keyboard behavior with CommandList and uses
|
|
5
|
+
Dialog for modal focus and dismissal. CommandPalette is available in the
|
|
6
|
+
unreleased 0.2.11 candidate.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
"use client";
|
|
10
|
+
|
|
11
|
+
import { Button, CommandPalette, FloodRoot } from "@flood-md/react";
|
|
12
|
+
|
|
13
|
+
export function WorkspaceSearch({ onNavigate }: { onNavigate: (id: string) => void }) {
|
|
14
|
+
return (
|
|
15
|
+
<FloodRoot>
|
|
16
|
+
<CommandPalette
|
|
17
|
+
title="Go to page"
|
|
18
|
+
searchLabel="Search pages"
|
|
19
|
+
placeholder="Search pages…"
|
|
20
|
+
emptyMessage="No matching pages."
|
|
21
|
+
trigger={props => <Button {...props} variant="subtle">Go to page</Button>}
|
|
22
|
+
items={[
|
|
23
|
+
{ id: "projects", label: "All projects", group: "Projects" },
|
|
24
|
+
{ id: "assigned", label: "Assigned to me", group: "Projects", keywords: ["mine"] },
|
|
25
|
+
{ id: "inbox", label: "Inbox", group: "Workspace" },
|
|
26
|
+
]}
|
|
27
|
+
onAction={onNavigate}
|
|
28
|
+
/>
|
|
29
|
+
</FloodRoot>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Import the Flood stylesheet once. Keep the trigger inside the existing FloodRoot.
|
|
35
|
+
Translate the dialog title, search label, placeholder, close label and state
|
|
36
|
+
messages. The title and search label remain available to assistive technology.
|
|
37
|
+
Use comfortable density by default and compact density for denser workspaces.
|
|
38
|
+
|
|
39
|
+
Opening focuses the search input. Arrow keys move through available results.
|
|
40
|
+
Enter or click calls the host action and requests closure. Escape, the close
|
|
41
|
+
button and optional outside dismissal close without invoking an action. Use
|
|
42
|
+
open/onOpenChange when the host owns visibility. A local query starts from
|
|
43
|
+
defaultQuery on each opening. For a controlled query, the host owns persistence
|
|
44
|
+
and reset. Set loading while replacing results asynchronously. The application
|
|
45
|
+
owns requests, permissions, actions, routing and any global shortcut.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Filter bar
|
|
2
|
+
|
|
3
|
+
For staged conditions and persisted query definitions, see
|
|
4
|
+
[Collection views](collection-views.md) and its two working consumers.
|
|
5
|
+
|
|
6
|
+
Compose existing Field, SearchInput, Select and Button. Filtering belongs to the
|
|
7
|
+
host collection, not to DataTable. This recipe filters the full local data set
|
|
8
|
+
before handing it to the table and resets page and selection when filters change.
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
"use client";
|
|
12
|
+
import {useState} from "react";
|
|
13
|
+
import {Button, DataTable, Field, Inline, SearchInput, Select, Stack} from "@flood-md/react";
|
|
14
|
+
|
|
15
|
+
const projects = [
|
|
16
|
+
{id: "design", name: "Design system", status: "Active", members: 12},
|
|
17
|
+
{id: "website", name: "Website", status: "Active", members: 4},
|
|
18
|
+
{id: "research", name: "Research", status: "Draft", members: 2},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
export function ProjectTable() {
|
|
22
|
+
const [query, setQuery] = useState("");
|
|
23
|
+
const [status, setStatus] = useState("all");
|
|
24
|
+
const [page, setPage] = useState(1);
|
|
25
|
+
const [selected, setSelected] = useState<readonly string[]>([]);
|
|
26
|
+
function resetResults() { setPage(1); setSelected([]); }
|
|
27
|
+
const visible = projects.filter(project =>
|
|
28
|
+
project.name.toLowerCase().includes(query.trim().toLowerCase()) &&
|
|
29
|
+
(status === "all" || project.status === status));
|
|
30
|
+
|
|
31
|
+
return <Stack gap="4">
|
|
32
|
+
<Inline gap="3" align="end">
|
|
33
|
+
<Field label="Search projects">{props => <SearchInput {...props}
|
|
34
|
+
value={query} onChange={event => {setQuery(event.currentTarget.value); resetResults();}} />}</Field>
|
|
35
|
+
<Field label="Status">{props => <Select {...props} value={status}
|
|
36
|
+
onChange={event => {setStatus(event.currentTarget.value); resetResults();}}>
|
|
37
|
+
<option value="all">All statuses</option>
|
|
38
|
+
<option value="Active">Active</option>
|
|
39
|
+
<option value="Draft">Draft</option>
|
|
40
|
+
</Select>}</Field>
|
|
41
|
+
{(query || status !== "all") && <Button variant="subtle"
|
|
42
|
+
onClick={() => {setQuery(""); setStatus("all"); resetResults();}}>Clear filters</Button>}
|
|
43
|
+
</Inline>
|
|
44
|
+
<DataTable caption="Projects" selectable pageSize={5}
|
|
45
|
+
page={page} onPageChange={setPage} selectedIds={selected} onSelectionChange={setSelected}
|
|
46
|
+
columns={[{id:"name",label:"Project",sortable:true},
|
|
47
|
+
{id:"status",label:"Status"}, {id:"members",label:"Members",sortable:true,align:"end"}]}
|
|
48
|
+
rows={visible.map(project => ({id:project.id,label:project.name,cells:{
|
|
49
|
+
name:project.name,status:project.status,members:project.members}}))} />
|
|
50
|
+
</Stack>;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Place inside FloodRoot and import the shared stylesheet once. Keep visible labels
|
|
55
|
+
for filters, including when defaults are active. A clear action resets actual
|
|
56
|
+
values. Expose active filters as removable Tag components when the filter set
|
|
57
|
+
gets larger; do not add a duplicate generic FilterBar component just for layout.
|
|
58
|
+
|
|
59
|
+
For remote data, debounce or submit at the host boundary, cancel obsolete requests
|
|
60
|
+
and map loading/error states explicitly. Use DataTable paginationMode="server" for an individual server page with explicit
|
|
61
|
+
controlled page/sort and totalRows; do not interpret its select-page checkbox as
|
|
62
|
+
server-wide selection. Table + Pagination remains available for a host-owned
|
|
63
|
+
contract. Follow recipe:record-workspace for request generations and recovery.
|
|
64
|
+
|
|
65
|
+
When reviewing a dense toolbar, compare the filled edges and the text inside
|
|
66
|
+
each control. Shared edges and consistent heights can communicate grouping
|
|
67
|
+
even with small gaps. Judge the applied criteria and the filter trigger with
|
|
68
|
+
long values and at the width where the toolbar wraps.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Form submission
|
|
2
|
+
|
|
3
|
+
Keep validation, pending state and recovery explicit. Native validity runs
|
|
4
|
+
before submit. Application or server errors belong to the form and its fields.
|
|
5
|
+
|
|
6
|
+
```tsx
|
|
7
|
+
"use client";
|
|
8
|
+
import {useRef, useState} from "react";
|
|
9
|
+
import {Alert, Button, Field, Input, Stack} from "@flood-md/react";
|
|
10
|
+
|
|
11
|
+
export function ProjectForm({save}: {save: (data: FormData) => Promise<void>}) {
|
|
12
|
+
const locked = useRef(false);
|
|
13
|
+
const [pending, setPending] = useState(false);
|
|
14
|
+
const [error, setError] = useState("");
|
|
15
|
+
const [saved, setSaved] = useState(false);
|
|
16
|
+
return <form onSubmit={async event => {
|
|
17
|
+
event.preventDefault();
|
|
18
|
+
if (locked.current) return;
|
|
19
|
+
const data = new FormData(event.currentTarget);
|
|
20
|
+
locked.current = true;
|
|
21
|
+
setPending(true); setError(""); setSaved(false);
|
|
22
|
+
try { await save(data); setSaved(true); }
|
|
23
|
+
catch { setError("Could not save. Your changes are still here. Try again."); }
|
|
24
|
+
finally { locked.current = false; setPending(false); }
|
|
25
|
+
}} aria-busy={pending}>
|
|
26
|
+
<Stack gap="4">
|
|
27
|
+
<Field label="Project name">{props => <Input {...props} name="name" required readOnly={pending} />}</Field>
|
|
28
|
+
{error && <Alert tone="error" announcement="assertive">{error}</Alert>}
|
|
29
|
+
{saved && <Alert tone="success" announcement="polite">Project saved.</Alert>}
|
|
30
|
+
<Button type="submit" loading={pending}>Save project</Button>
|
|
31
|
+
</Stack>
|
|
32
|
+
</form>;
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Capture FormData before disabling any native fields. This example preserves user
|
|
37
|
+
input after failure. Map returned field errors to Field and optionally ErrorSummary;
|
|
38
|
+
never pretend the request succeeded. The host supplies persistence, cancellation,
|
|
39
|
+
authentication and navigation. Place inside FloodRoot and import its CSS once.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Grouped form
|
|
2
|
+
|
|
3
|
+
Use a shared outer grid for peer groups, with the same surface padding and field
|
|
4
|
+
spacing. Each group owns its title and reading order. Two short fields stack
|
|
5
|
+
inside each group; the next row reuses the same tracks instead of inventing a
|
|
6
|
+
new four-column or uneven grid. This recipe illustrates workspace preferences,
|
|
7
|
+
not an invoice-specific screen or a universal two-column requirement.
|
|
8
|
+
|
|
9
|
+
Choose the number of tracks from the task and declared viewport. A long-address
|
|
10
|
+
group may span the row; a short field does not need its own column. Keep related
|
|
11
|
+
fields together in DOM order, including when an optional field disappears.
|
|
12
|
+
Use Grid, Fieldset, Surface and Field rather than recreating their recipes.
|
|
13
|
+
|
|
14
|
+
Import the shared stylesheet once and render inside FloodRoot. onApply receives
|
|
15
|
+
native FormData in the host; this recipe implements no persistence or permissions.
|
|
16
|
+
Those limits belong here in documentation, not as repeated captions in the form.
|
|
17
|
+
|
|
18
|
+
## Source
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
"use client";
|
|
22
|
+
import type {FormEvent} from 'react';
|
|
23
|
+
import {Button,Field,Fieldset,Grid,Input,Select,Stack,Surface} from '@flood-md/react';
|
|
24
|
+
|
|
25
|
+
/** Shared outer tracks; groups retain their own reading order and field ownership. */
|
|
26
|
+
export function GroupedForm({showBillingEmail=true,onApply}:{showBillingEmail?:boolean;onApply?:(values:FormData)=>void}) {
|
|
27
|
+
function submit(event:FormEvent<HTMLFormElement>){event.preventDefault();onApply?.(new FormData(event.currentTarget));}
|
|
28
|
+
return <form aria-label="Workspace settings" onSubmit={submit}>
|
|
29
|
+
<Stack gap="8">
|
|
30
|
+
<Grid columns={2} gap="6">
|
|
31
|
+
<Surface padding="6"><Fieldset legendSize="section" legend="Identity"><Stack gap="6">
|
|
32
|
+
<Field label="Workspace name" required>{props=><Input {...props} name="workspace" required />}</Field>
|
|
33
|
+
<Field label="Reference">{props=><Input {...props} name="reference" />}</Field>
|
|
34
|
+
</Stack></Fieldset></Surface>
|
|
35
|
+
<Surface padding="6"><Fieldset legendSize="section" legend="Locale"><Stack gap="6">
|
|
36
|
+
<Field label="Language">{props=><Select {...props} name="language" defaultValue="en"><option value="en">English</option><option value="ru">Русский</option></Select>}</Field>
|
|
37
|
+
<Field label="Time zone">{props=><Select {...props} name="timezone" defaultValue="UTC"><option value="UTC">UTC</option><option value="Asia/Almaty">Almaty</option></Select>}</Field>
|
|
38
|
+
</Stack></Fieldset></Surface>
|
|
39
|
+
<Surface padding="6"><Fieldset legendSize="section" legend="Primary contact"><Stack gap="6">
|
|
40
|
+
<Field label="Contact name">{props=><Input {...props} name="contact" />}</Field>
|
|
41
|
+
<Field label="Contact email">{props=><Input {...props} name="contactEmail" type="email" />}</Field>
|
|
42
|
+
</Stack></Fieldset></Surface>
|
|
43
|
+
<Surface padding="6"><Fieldset legendSize="section" legend="Billing contact"><Stack gap="6">
|
|
44
|
+
<Field label="Billing name">{props=><Input {...props} name="billing" />}</Field>
|
|
45
|
+
{showBillingEmail&&<Field label="Billing email">{props=><Input {...props} name="billingEmail" type="email" />}</Field>}
|
|
46
|
+
</Stack></Fieldset></Surface>
|
|
47
|
+
</Grid>
|
|
48
|
+
<Button type="submit">Apply settings</Button>
|
|
49
|
+
</Stack>
|
|
50
|
+
</form>;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Review
|
|
55
|
+
|
|
56
|
+
Compare left/right edges and gutters in both rows, label/control associations,
|
|
57
|
+
native required submission and omitted optional content. Inspect long labels and
|
|
58
|
+
enlarged text at the host's declared widths. Do not judge a form by zero page
|
|
59
|
+
overflow alone. Read the [forms workflow](/agent/references/flood-forms/SKILL.md)
|
|
60
|
+
and [content workflow](/agent/references/flood-interface-content/SKILL.md) before
|
|
61
|
+
adapting it. A useful form does not need a helper paragraph under every title.
|
|
62
|
+
|
|
63
|
+
Independent sections use Fieldset legendSize="section" and keep one shared outer
|
|
64
|
+
Grid across peer groups. Field labels retain the compact inner gap; Stack owns
|
|
65
|
+
row separation. The hierarchy workflow explains why section titles and choice
|
|
66
|
+
captions are different roles.
|
|
67
|
+
|
|
68
|
+
Compare a short and a wrapped legend with the same fields. Check the visible
|
|
69
|
+
gap from the legend to its first field and from the previous group to the
|
|
70
|
+
legend. Use the [visible weight review](../layout.md#review-visible-weight)
|
|
71
|
+
before changing the shared grid or a group gap.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Navigation workspace
|
|
2
|
+
|
|
3
|
+
[Open the working workspace](/playground/navigation).
|
|
4
|
+
|
|
5
|
+
The workspace compares a standalone Sidebar with a GlobalRail + ContextBar
|
|
6
|
+
composition. Both use the same Sidebar and NavigationTree owners. GlobalRail and
|
|
7
|
+
ContextBar describe their responsibilities here; they are not additional package
|
|
8
|
+
exports. The example's project, inbox and file records live in memory.
|
|
9
|
+
Use the account menu in the footer to switch between Flood Studio and Flood Labs.
|
|
10
|
+
The navigation header shares the height of the workspace toolbar. The expanded
|
|
11
|
+
Sidebar puts the service mark at the start and the collapse control at the end.
|
|
12
|
+
On the compact rail, the toggle replaces the mark on hover or keyboard focus.
|
|
13
|
+
On touch, the toggle stays visible.
|
|
14
|
+
Labs adds nested project collections for testing long labels and scrolling.
|
|
15
|
+
The host remembers the last route and expanded branches per workspace during
|
|
16
|
+
the session. It validates a remembered route against the target workspace and
|
|
17
|
+
falls back to the project overview if that destination is unavailable.
|
|
18
|
+
The **Go to page** action uses CommandPalette. It searches the
|
|
19
|
+
current workspace and expands the selected destination's parent branches.
|
|
20
|
+
On navigation, the host moves focus to the destination heading.
|
|
21
|
+
|
|
22
|
+
## Choose the hierarchy
|
|
23
|
+
|
|
24
|
+
If the sidebar has one group whose title repeats the app or workspace context,
|
|
25
|
+
use `hideLabel` and keep the group's accessible name. When showing a group title,
|
|
26
|
+
align it with the labels of its destinations.
|
|
27
|
+
|
|
28
|
+
Use one Sidebar when the application has a small destination hierarchy. Separate
|
|
29
|
+
global and contextual navigation when switching domains changes the available
|
|
30
|
+
destinations. The global rail stays flat and stable; its active module is a
|
|
31
|
+
location, while the contextual destination is a page. An open ContextBar replaces
|
|
32
|
+
the need for a second copy of its destinations in a global flyout.
|
|
33
|
+
|
|
34
|
+
On narrow hosts, limit the expanded pane to a share of available width and keep
|
|
35
|
+
the working heading and primary controls reachable. The playground condenses
|
|
36
|
+
the toolbar and keeps wide table content in the table's own scroll area.
|
|
37
|
+
|
|
38
|
+
Keep module, route, expansion and context visibility independent. Anchor the
|
|
39
|
+
visibility control in the persistent rail header. When the context is hidden,
|
|
40
|
+
hover a rail module to preview its contextual links in a flyout that fills the
|
|
41
|
+
available rail height with top and bottom insets, even for short lists.
|
|
42
|
+
The preview preserves focus and stays open while the pointer crosses into the
|
|
43
|
+
panel. Click or use the keyboard to open it for interaction. Escape returns
|
|
44
|
+
focus to the module when it owned focus. Choosing a destination closes the flyout and keeps the
|
|
45
|
+
context docked or hidden as the user last set it. Browser Back restores the route.
|
|
46
|
+
Use real links and host routing. A modified click must remain a browser action
|
|
47
|
+
rather than changing the current tab's module through an unconditional handler.
|
|
48
|
+
|
|
49
|
+
## Compose the panes
|
|
50
|
+
|
|
51
|
+
| Region or behavior | Flood owner |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| Workspace landmarks, skip target and scroll boundary | AppShell, SkipLink and ScrollArea |
|
|
54
|
+
| Shared identity, breadcrumbs and global commands | AppTopBar, Breadcrumb, Button and CommandPalette |
|
|
55
|
+
| Current page title and page actions | PageHeader |
|
|
56
|
+
| Docked rail and grouped destinations | Sidebar, NavigationGroup and NavigationTree |
|
|
57
|
+
| Temporary navigation on a narrow host | Drawer with the same destination definitions |
|
|
58
|
+
| Account commands and identity | Menu, Avatar and Button |
|
|
59
|
+
|
|
60
|
+
Use AppShell's default content scrolling for a bounded workspace. Give an
|
|
61
|
+
embedded shell an explicit block size. Choose `scroll="page"` for natural
|
|
62
|
+
document scrolling. Place a persistent top bar and footer in the shell slots,
|
|
63
|
+
and PageHeader inside main. The shell has a skip target and owns the scroll
|
|
64
|
+
boundary; the host owns routes and persisted choices.
|
|
65
|
+
|
|
66
|
+
For a single Sidebar, opt into `navigationDrawer` with a width threshold in CSS
|
|
67
|
+
pixels and a `renderContent(close)` function. AppShell observes its own width.
|
|
68
|
+
The playground uses 480 px for the classic Sidebar profile. Pass a `topBar`
|
|
69
|
+
render function to place the named trigger with the existing toolbar controls.
|
|
70
|
+
The Rail + Context example keeps its separate pane visibility and hover flyout.
|
|
71
|
+
|
|
72
|
+
Share accepted route and branch state between Sidebar and Drawer. Close the
|
|
73
|
+
Drawer on an accepted destination and focus the destination heading. Escape
|
|
74
|
+
or explicit dismissal restores focus to the trigger. When a resize removes
|
|
75
|
+
the focused dock or Drawer, AppShell transfers focus to the new trigger or
|
|
76
|
+
the work region, respectively.
|
|
77
|
+
|
|
78
|
+
This host-owned layout uses Flood components. In the 0.2.11 source candidate,
|
|
79
|
+
NavigationItem owns the shared row, NavigationGroup owns related items and their
|
|
80
|
+
optional heading, and NavigationTree composes rows into a destination hierarchy.
|
|
81
|
+
Sidebar places these owners between its fixed header and footer. The caller
|
|
82
|
+
supplies icons, identity controls and accepted route state; keep layout CSS in the
|
|
83
|
+
host and import the matching Flood stylesheet once. These candidate APIs require
|
|
84
|
+
matching installed declarations and are not added to an older npm release by
|
|
85
|
+
reading this recipe.
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
"use client";
|
|
89
|
+
import type { ReactNode } from "react";
|
|
90
|
+
import { AppShell, AppTopBar, FloodRoot, Sidebar, type SidebarProps } from "@flood-md/react";
|
|
91
|
+
import "@flood-md/react/styles.css";
|
|
92
|
+
|
|
93
|
+
type Props = {
|
|
94
|
+
global: SidebarProps;
|
|
95
|
+
context: SidebarProps;
|
|
96
|
+
contextVisible: boolean;
|
|
97
|
+
header: ReactNode;
|
|
98
|
+
children: ReactNode;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export function NavigationWorkspace({
|
|
102
|
+
global, context, contextVisible, header, children,
|
|
103
|
+
}: Props) {
|
|
104
|
+
return (
|
|
105
|
+
<FloodRoot>
|
|
106
|
+
<AppShell
|
|
107
|
+
navigation={<>
|
|
108
|
+
<Sidebar {...global} collapsed collapsible={false} currentKind="location" />
|
|
109
|
+
{contextVisible && <Sidebar {...context} currentKind="page" />}
|
|
110
|
+
</>}
|
|
111
|
+
topBar={<AppTopBar start={header} />}
|
|
112
|
+
scrollOrientation="vertical"
|
|
113
|
+
>
|
|
114
|
+
{children}
|
|
115
|
+
</AppShell>
|
|
116
|
+
</FloodRoot>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
A bounded parent can supply the height instead of `100dvh`. Reserve remaining
|
|
122
|
+
height with flex/grid rather than subtracting an assumed toolbar height: labels
|
|
123
|
+
and tooling can wrap at enlarged text. Sidebar owns the middle navigation scroll
|
|
124
|
+
viewport; AppShell owns the main content viewport. Table overflow remains inside
|
|
125
|
+
the table's owner. Header and footer do not scroll with their navigation lists.
|
|
126
|
+
|
|
127
|
+
## Compose the row before the shell
|
|
128
|
+
|
|
129
|
+
Use NavigationItem for a destination, command or disclosure rather than a local
|
|
130
|
+
button-shaped row. A destination has an href and keeps native Link behavior. A
|
|
131
|
+
command has onAction and uses Button. A branch without a destination uses one
|
|
132
|
+
full-row disclosure target; a destination with children keeps the link and the
|
|
133
|
+
disclosure as separate sibling controls inside one coherent row surface. Clicking
|
|
134
|
+
the link must not also change the branch's expansion. A disclosure must not be
|
|
135
|
+
nested inside the link.
|
|
136
|
+
|
|
137
|
+
Current destination, ancestor of the current destination, accepted expansion and
|
|
138
|
+
keyboard focus are distinct states. The row owns its visual surface across the
|
|
139
|
+
label and disclosure; do not paint a shorter selected pill only behind the link
|
|
140
|
+
or add the trailing inset twice. Leading art, label and real trailing anatomy
|
|
141
|
+
share deliberate tracks. A supporting chevron can use a smaller IconButton
|
|
142
|
+
iconSize while retaining the normal control target.
|
|
143
|
+
|
|
144
|
+
NavigationTree remains the recursive owner: it composes NavigationItem, manages
|
|
145
|
+
the accepted expandedValues set and presents compact branches through Popover.
|
|
146
|
+
The popup can include a branch's own destination and its children. A standalone
|
|
147
|
+
compact NavigationItem does not create a hidden child hierarchy on its own.
|
|
148
|
+
|
|
149
|
+
## Configure groups and fixed regions
|
|
150
|
+
|
|
151
|
+
NavigationGroup can omit its label, hide a supplied visual label, add a meaningful
|
|
152
|
+
headingAction, show a separator or expose its own disclosure. Its expanded state
|
|
153
|
+
is independent of NavigationTree branch expansion and Sidebar width. A collapsible
|
|
154
|
+
group needs a nonempty label; hideLabel keeps the toggle's accessible name even
|
|
155
|
+
when the visual title is omitted. collapseDisabled affects that group disclosure,
|
|
156
|
+
not arbitrary child links or actions.
|
|
157
|
+
|
|
158
|
+
In compact presentation, group contents stay reachable and the group toggle is
|
|
159
|
+
hidden. This presentation does not overwrite the accepted expanded state: returning
|
|
160
|
+
to expanded navigation restores the group's prior choice. A supplied heading
|
|
161
|
+
action remains available on the compact axis rather than disappearing with text.
|
|
162
|
+
|
|
163
|
+
SidebarGroup exposes the group label, hideLabel, headingAction, separator and
|
|
164
|
+
collapsible/expanded configuration when Sidebar assembles the hierarchy. Start
|
|
165
|
+
these optional additions empty. Use a section title only when it distinguishes
|
|
166
|
+
related destinations; a title already provided by the pane need not be repeated.
|
|
167
|
+
Use branchGuides within a group when several levels of nesting need a visible
|
|
168
|
+
guide. Use trailingAction for an independent action alongside row metadata.
|
|
169
|
+
headerSeparator and footerSeparator are independent, opt-in Sidebar choices,
|
|
170
|
+
not mandatory lines around every fixed region.
|
|
171
|
+
|
|
172
|
+
Header and footer content must follow the same mode contract as the body. In
|
|
173
|
+
expanded navigation, identity and utility rows use the agreed icon/text tracks.
|
|
174
|
+
In compact navigation, measure the actual brand, toggle, destination and account
|
|
175
|
+
hit-area centers against the full rail center. A centered footer wrapper is not
|
|
176
|
+
proof that its Menu trigger or Avatar is centered. Adapt the identity content
|
|
177
|
+
deliberately while preserving its accessible name and useful recognition cue.
|
|
178
|
+
|
|
179
|
+
## Presentation and content
|
|
180
|
+
|
|
181
|
+
Sidebar's quiet recipe uses restrained inactive text and rectangular current
|
|
182
|
+
rows; standard retains stronger pill geometry. Compare these against the main
|
|
183
|
+
work area, not only in isolation. Preserve explicit icon sizes, shared inline
|
|
184
|
+
tracks and a common top anchor across adjacent panes. Omitting a collapse button
|
|
185
|
+
must not shorten one header and lift its entire navigation above the other.
|
|
186
|
+
|
|
187
|
+
Use `SidebarGroup.hideLabel` when the pane header already names the only group.
|
|
188
|
+
Its navigation landmark keeps its label. Add badges only for meaningful counts or
|
|
189
|
+
states, not to fill every destination. Account utilities and workspace settings
|
|
190
|
+
belong in deliberate fixed slots rather than a second contextual destination list.
|
|
191
|
+
|
|
192
|
+
## State and focus ownership
|
|
193
|
+
|
|
194
|
+
Keep search and filters in their applicable module. An inactive Projects filter
|
|
195
|
+
must not create a Clear filters action in Inbox, and clearing Inbox search must
|
|
196
|
+
not modify the accepted Projects query. Validate the entire route, including
|
|
197
|
+
extra or missing path segments, before deriving a title or current destination.
|
|
198
|
+
|
|
199
|
+
Preserve surviving focus. When a focused record, action or pane disappears and
|
|
200
|
+
focus falls to the document body, the host restores it to an intentional stable
|
|
201
|
+
destination, such as the main heading. Do not refocus the heading on every data
|
|
202
|
+
render or steal focus from another surviving control. A visibility toggle can
|
|
203
|
+
keep focus on itself before removing its pane. A dialog whose original trigger
|
|
204
|
+
disappeared needs the same explicit fallback when it closes.
|
|
205
|
+
|
|
206
|
+
## Verify the workspace
|
|
207
|
+
|
|
208
|
+
Check both layouts, module/page current semantics, hidden context through module
|
|
209
|
+
changes and Back, modified links, branch disclosure and independent scrolling.
|
|
210
|
+
Exercise both a full-row branch toggle and a destination-plus-disclosure row;
|
|
211
|
+
include a host refusing an expansion request. Configure group headings, actions,
|
|
212
|
+
separators and collapse independently, then switch compact mode without losing
|
|
213
|
+
the accepted group choice or destinations. Compare actual header/footer trigger
|
|
214
|
+
centers with body controls, including the account trigger, rather than inspecting
|
|
215
|
+
the middle list alone. Check current/hover/focus surfaces across the complete row.
|
|
216
|
+
Compare visible glyphs as well as their slots. If the same glyph reads off-axis
|
|
217
|
+
across several states, review its artwork before moving the shared hit area.
|
|
218
|
+
Exercise a filter in one module followed by search in another; remove the focused
|
|
219
|
+
row; close a dialog after its original row disappears. Review normal desktop,
|
|
220
|
+
short desktop windows, 1280 px with a 24 px root, RTL and forced colors. Visual
|
|
221
|
+
review and executed checks are separate evidence; the guidance itself is not a
|
|
222
|
+
pass certificate.
|