@flood-md/agent 0.2.8 → 0.2.10
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 +26 -4
- package/README.md +40 -1
- package/SKILL.md +46 -4
- package/dist/catalog.json +7136 -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-aspect-ratio.md +36 -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-button-group.md +39 -0
- package/dist/materials/component-button.md +43 -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 +40 -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 +50 -0
- package/dist/materials/component-command-list.md +48 -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 +42 -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 +58 -0
- package/dist/materials/component-date-field.md +57 -0
- package/dist/materials/component-date-picker.md +66 -0
- package/dist/materials/component-date-range-field.md +62 -0
- package/dist/materials/component-date-range-picker.md +72 -0
- package/dist/materials/component-date-time-picker.md +60 -0
- package/dist/materials/component-date-time-range-picker.md +66 -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 +50 -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-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 +41 -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-meter.md +43 -0
- package/dist/materials/component-metric.md +39 -0
- package/dist/materials/component-multi-select.md +52 -0
- package/dist/materials/component-navigation-list.md +38 -0
- package/dist/materials/component-navigation-tree.md +43 -0
- package/dist/materials/component-number-input.md +47 -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 +47 -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 +51 -0
- package/dist/materials/component-select.md +45 -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 +43 -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 +39 -0
- package/dist/materials/component-toolbar.md +42 -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 +88 -0
- package/dist/materials/guide-agents.md +96 -0
- package/dist/materials/guide-faq.md +84 -0
- package/dist/materials/guide-foundations.md +232 -0
- package/dist/materials/guide-installation.md +79 -0
- package/dist/materials/guide-interface-content.md +76 -0
- package/dist/materials/guide-introduction.md +40 -0
- package/dist/materials/guide-layout.md +193 -0
- package/dist/materials/guide-privacy.md +23 -0
- package/dist/materials/guide-project-ui.md +127 -0
- package/dist/materials/guide-skills.md +108 -0
- package/dist/materials/guide-theming.md +73 -0
- package/dist/materials/recipe-command-palette.md +66 -0
- package/dist/materials/recipe-filter-bar.md +59 -0
- package/dist/materials/recipe-form-submission.md +39 -0
- package/dist/materials/recipe-grouped-form.md +66 -0
- package/dist/materials/recipe-select-all.md +31 -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.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.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.canvas.json +39 -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.overlay.json +39 -0
- package/dist/materials/token-sys.color.surface.raised.json +39 -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.duration-fast.json +34 -0
- package/dist/materials/token-sys.motion.duration-normal.json +34 -0
- package/dist/materials/token-sys.motion.duration-reduced.json +34 -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 +409 -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 +91 -1
- package/package.json +9 -1
- package/references/flood-accessibility/SKILL.md +40 -0
- package/references/flood-composition/SKILL.md +30 -0
- package/references/flood-data-display/SKILL.md +69 -0
- package/references/flood-feedback/SKILL.md +58 -0
- package/references/flood-forms/SKILL.md +94 -0
- package/references/flood-foundations/SKILL.md +44 -0
- package/references/flood-hierarchy/SKILL.md +87 -0
- package/references/flood-interface-content/SKILL.md +142 -0
- package/references/flood-navigation/SKILL.md +35 -0
- package/references/flood-overlays/SKILL.md +52 -0
- package/references/flood-records/SKILL.md +108 -0
- package/references/flood-spacing/SKILL.md +62 -0
- package/references/flood-verification/SKILL.md +99 -0
- package/references/interface-content-examples.md +47 -0
- package/references/knowledge.md +49 -0
- package/references/record-decisions.md +25 -0
- package/references/rendered-review.md +97 -0
- package/references/routing.md +1 -0
- package/rules.json +454 -2
- package/workflows.json +152 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# InlineCode
|
|
2
|
+
|
|
3
|
+
A small monospace code fragment that participates in running text.
|
|
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, Text, InlineCode } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Text as="p">Import <InlineCode>@/ui/button</InlineCode> in your project.</Text>
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Native code semantics, bundled monospace stack and a quiet inline surface. Content is text; no HTML parsing or syntax highlighting is performed.
|
|
27
|
+
- wrap defaults to true for long identifiers. wrap=false preserves the fragment on one line and the host must manage overflow. Use CodeSnippet for blocks of code and Kbd for keyboard input.
|
|
28
|
+
- Compatible addition in 0.2.5. Uses existing Flood semantic tokens and relative geometry.
|
|
29
|
+
|
|
30
|
+
## API reference
|
|
31
|
+
|
|
32
|
+
| Prop | Values | Default |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
35
|
+
| `wrap` | `boolean` | `true` |
|
|
36
|
+
| `Native HTML props` | `HTMLAttributes<HTMLElement>` | `Forwarded` |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Inline
|
|
2
|
+
|
|
3
|
+
A wrapping horizontal group for related content and actions.
|
|
4
|
+
|
|
5
|
+
Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
"use client";
|
|
11
|
+
|
|
12
|
+
import { FloodRoot, Inline, Button } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Inline gap="2" align="center">
|
|
19
|
+
<Button>Save changes</Button>
|
|
20
|
+
<Button variant="subtle">Cancel</Button>
|
|
21
|
+
</Inline>
|
|
22
|
+
</FloodRoot>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Design notes
|
|
28
|
+
|
|
29
|
+
- Inline wraps when its children need more space.
|
|
30
|
+
- Use the same control size for neighboring actions of the same level.
|
|
31
|
+
- Rows center items by default. Use gap="4" between independent choices; gap="2" remains available for tightly related content.
|
|
32
|
+
|
|
33
|
+
## API reference
|
|
34
|
+
|
|
35
|
+
| Prop | Values | Default |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `gap` | `"0" \| "1" \| "2" \| "3" \| "4" \| "6" \| "8" \| "12"` | `"2"` |
|
|
38
|
+
| `align` | `"start" \| "center" \| "end" \| "baseline"` | `"center"` |
|
|
39
|
+
| `Native HTML props` | `HTMLAttributes<HTMLDivElement>` | `Forwarded` |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# InputGroup
|
|
2
|
+
|
|
3
|
+
One native text input with logical start/end content inside a shared perimeter.
|
|
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, InputGroup, Field } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Field label="Website">
|
|
19
|
+
{control => <InputGroup {...control} start="https://" placeholder="example.com" />}
|
|
20
|
+
</Field>
|
|
21
|
+
</FloodRoot>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Design notes
|
|
27
|
+
|
|
28
|
+
- Ref, id, name, value, events and ARIA attributes target the real input. className/style customize the outer layout wrapper.
|
|
29
|
+
- start/end are logical content slots. Adornments do not become the submitted value or an accessible label; use Field or Label and explain prefixes when needed.
|
|
30
|
+
- The input has one shared field perimeter and accent focus. Interactive adornments keep their own focus indication and accessible names.
|
|
31
|
+
- disabled/readOnly affect the input; host-owned addon actions need their own disabled policy. Use compatible action sizes. Text-like input types are supported; Textarea/Select are separate constructs.
|
|
32
|
+
|
|
33
|
+
## API reference
|
|
34
|
+
|
|
35
|
+
| Prop | Values | Default |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
|
|
38
|
+
| `invalid` | `boolean` | `—` |
|
|
39
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
|
|
40
|
+
| `type` | `"text" \| "email" \| "password" \| "search" \| "tel" \| "url" \| "number"` | `—` |
|
|
41
|
+
| `start` | `ReactNode` | `—` |
|
|
42
|
+
| `end` | `ReactNode` | `—` |
|
|
43
|
+
| `Native HTML props` | `Omit<InputHTMLAttributes<HTMLInputElement>, "children" \| "type">` | `Forwarded` |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Input
|
|
2
|
+
|
|
3
|
+
A native input with semantic styling and independent visual sizing.
|
|
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, Input } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Field label="Workspace name">
|
|
19
|
+
{(control) => <Input {...control} defaultValue="My project" />}
|
|
20
|
+
</Field>
|
|
21
|
+
</FloodRoot>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Design notes
|
|
27
|
+
|
|
28
|
+
- Use Field or a native associated label; placeholder text is not a label.
|
|
29
|
+
- controlSize changes appearance. The native numeric size attribute keeps its HTML meaning.
|
|
30
|
+
- Default outlines use the quiet field.border role. field.boundary is a stronger opt-in; preserve the independent focus indicator when customizing colors.
|
|
31
|
+
|
|
32
|
+
## API reference
|
|
33
|
+
|
|
34
|
+
| Prop | Values | Default |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
|
|
37
|
+
| `invalid` | `boolean` | `—` |
|
|
38
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
|
|
39
|
+
| `Native HTML props` | `InputHTMLAttributes<HTMLInputElement>` | `Forwarded` |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Kbd
|
|
2
|
+
|
|
3
|
+
A quiet native keyboard-input label for keys and shortcut hints.
|
|
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, Kbd } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Kbd>Ctrl</Kbd> + <Kbd>K</Kbd>
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Native kbd markup, not a button or a shortcut handler. The application implements and documents actual bindings.
|
|
27
|
+
- Sizes sm/md/lg use relative keycap tokens. Native props/ref target the kbd element. Available in 0.2.4.
|
|
28
|
+
|
|
29
|
+
## API reference
|
|
30
|
+
|
|
31
|
+
| Prop | Values | Default |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"sm"` |
|
|
34
|
+
| `Native HTML props` | `HTMLAttributes<HTMLElement>` | `Forwarded` |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Label
|
|
2
|
+
|
|
3
|
+
A native label that connects a visible name to a control.
|
|
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, Label, Stack, Input } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Stack gap="2">
|
|
19
|
+
<Label htmlFor="project-label">Project name</Label>
|
|
20
|
+
<Input id="project-label" defaultValue="My project" />
|
|
21
|
+
</Stack>
|
|
22
|
+
</FloodRoot>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Design notes
|
|
28
|
+
|
|
29
|
+
- htmlFor connects the label to a matching control ID; implicit nested controls also retain native behavior.
|
|
30
|
+
- required adds a decorative marker only. Set required on the actual control as well. Field already composes Label.
|
|
31
|
+
|
|
32
|
+
## API reference
|
|
33
|
+
|
|
34
|
+
| Prop | Values | Default |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `required` | `boolean` | `—` |
|
|
37
|
+
| `Native HTML props` | `LabelHTMLAttributes<HTMLLabelElement>` | `Forwarded` |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Link
|
|
2
|
+
|
|
3
|
+
A native anchor for navigation.
|
|
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, Link } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Link href="/docs/installation">Install Flood</Link>
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Use a button for state-changing actions and a link for navigation.
|
|
27
|
+
- Link forwards native anchor attributes. Its optional solid/subtle/outline/ghost variants share Flood Button geometry; text is the unchanged default. No asChild API.
|
|
28
|
+
|
|
29
|
+
## API reference
|
|
30
|
+
|
|
31
|
+
| Prop | Values | Default |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `variant` | `"text" \| "solid" \| "subtle" \| "outline" \| "ghost"` | `"text"` |
|
|
34
|
+
| `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` |
|
|
35
|
+
| `Native HTML props` | `AnchorHTMLAttributes<HTMLAnchorElement>` | `Forwarded` |
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# ListBox
|
|
2
|
+
|
|
3
|
+
A named single or multiple selection list with native validation and semantic feedback.
|
|
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, ListBox } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<ListBox label="Framework" name="framework" defaultValue="react" options={[{value:"react",label:"React"},{value:"vue",label:"Vue"},{value:"svelte",label:"Svelte"}]} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Use a scalar value/defaultValue in single mode and an array in multiple mode. onValueChange returns the matching shape. Stable, unique nonempty option IDs are submitted as repeated hidden native form fields when name is supplied. Uncontrolled reset restores the initial selection.
|
|
27
|
+
- The list owns one Tab stop and aria-activedescendant. Arrows/Home/End move through enabled options; single selection follows navigation. Space/Enter selects or toggles. Typing searches option-label prefixes. Disabled options cannot be selected; readOnly retains navigation and copying without changing the value.
|
|
28
|
+
- Provide a clear label or use hideLabel with the accessible label preserved. Use disabled on the composite to remove its Tab stop. The list is not virtualized and does not fetch options. Available in 0.2.5.
|
|
29
|
+
- required validates accepted selection; readonly bypasses validation and disabled excludes form values.
|
|
30
|
+
- description/message and status share the field feedback contract. validationMessage is a host-owned blocking constraint.
|
|
31
|
+
|
|
32
|
+
## API reference
|
|
33
|
+
|
|
34
|
+
| Prop | Values | Default |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `label` | `string` | `Required` |
|
|
37
|
+
| `hideLabel` | `boolean` | `false` |
|
|
38
|
+
| `required` | `boolean` | `—` |
|
|
39
|
+
| `requiredMessage` | `string` | `—` |
|
|
40
|
+
| `validationMessage` | `string` | `—` |
|
|
41
|
+
| `description` | `string` | `—` |
|
|
42
|
+
| `message` | `string` | `—` |
|
|
43
|
+
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
|
|
44
|
+
| `invalid` | `boolean` | `—` |
|
|
45
|
+
| `options` | `readonly ComboboxOption[]` | `Required` |
|
|
46
|
+
| `value` | `string \| readonly string[]` | `—` |
|
|
47
|
+
| `defaultValue` | `string \| readonly string[]` | `—` |
|
|
48
|
+
| `onValueChange` | `(value: string \| string[]) => void` | `—` |
|
|
49
|
+
| `multiple` | `boolean` | `false` |
|
|
50
|
+
| `selectionBehavior` | `"automatic" \| "manual"` | `—` |
|
|
51
|
+
| `appearance` | `"surface" \| "plain"` | `—` |
|
|
52
|
+
| `disabled` | `boolean` | `false` |
|
|
53
|
+
| `readOnly` | `boolean` | `false` |
|
|
54
|
+
| `name` | `string` | `—` |
|
|
55
|
+
| `form` | `string` | `—` |
|
|
56
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
|
|
57
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role" \| "defaultValue" \| "onChange">` | `Forwarded` |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# List
|
|
2
|
+
|
|
3
|
+
Native ordered or unordered content with token spacing and optional markers.
|
|
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, List } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<List><li>Install the matching packages.</li><li>Import the stylesheet.</li><li>Compose with Flood.</li></List>
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Supply native li children. ordered chooses ol; start/reversed apply only to ordered lists. start must be a safe integer.
|
|
27
|
+
- Hiding markers retains an explicit list role for browser/assistive-technology consistency. Content may include links or controls without changing its content-list semantics.
|
|
28
|
+
- This is not ListBox, a selection model or a keyboard-navigation engine.
|
|
29
|
+
- Available in 0.2.4; use matching installed declarations.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `ordered` | `boolean` | `false` |
|
|
36
|
+
| `start` | `number` | `—` |
|
|
37
|
+
| `reversed` | `boolean` | `—` |
|
|
38
|
+
| `marker` | `boolean` | `true` |
|
|
39
|
+
| `gap` | `"0" \| "1" \| "2" \| "3" \| "4" \| "6" \| "8" \| "12"` | `"2"` |
|
|
40
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLUListElement \| HTMLOListElement>, "role">` | `Forwarded` |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Menu
|
|
2
|
+
|
|
3
|
+
An action and preference menu with keyboard navigation and controlled checkbox/radio items.
|
|
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, Menu, Button } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Menu label="Project actions"
|
|
19
|
+
trigger={props => <Button {...props}>Project actions</Button>}
|
|
20
|
+
items={[{id:"rename",label:"Rename…"},{id:"divider",type:"separator"},{id:"delete",label:"Delete project",tone:"danger"}]}
|
|
21
|
+
onAction={id => console.log(id)}
|
|
22
|
+
/>
|
|
23
|
+
</FloodRoot>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Design notes
|
|
29
|
+
|
|
30
|
+
- Forward all supplied trigger props and ref to one native button or Flood Button/IconButton. Label names the menu; action labels remain visible.
|
|
31
|
+
- Enter/Space and ArrowDown open at the first item; ArrowUp opens at the last. Inside use arrows, Home/End and label-prefix typeahead.
|
|
32
|
+
- Disabled items stay keyboard-focusable with aria-disabled but cannot activate. Separators are noninteractive; action IDs must be unique and nonempty. At least one action is required.
|
|
33
|
+
- Escape closes and restores trigger focus. Tab moves to the next control after the trigger; Shift+Tab returns to the trigger. Outside interaction dismisses without stealing deliberately moved focus.
|
|
34
|
+
- Shortcut text is a visual hint, not an implemented key binding. No href or asynchronous task manager is included. Nested items use type="submenu" and a nonempty items array. Checkbox/radio items are controlled preferences, available in 0.2.7.
|
|
35
|
+
- Controlled open needs host updates; onAction requests closure before calling the host. Modern native Popover API required. Native div props/ref target the popup. Available in 0.2.4.
|
|
36
|
+
- Checkbox items take checked (boolean or mixed) and onCheckedChange. Radio items take a nonempty group label, checked and onCheckedChange; the host keeps one selected item per group. Keep each radio group contiguous. Preference items stay open by default; closeOnSelect opts into dismissal. They do not call onAction or submit form values.
|
|
37
|
+
- Submenus open by logical arrow, click/tap or cancellable mouse hover intent. Escape closes one level; Tab leaves the entire tree through the root trigger. IDs are unique across the tree and nested keyboard searches stay inside their own menu.
|
|
38
|
+
|
|
39
|
+
## API reference
|
|
40
|
+
|
|
41
|
+
| Prop | Values | Default |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| `label` | `string` | `Required` |
|
|
44
|
+
| `trigger` | `(props: OverlayTriggerProps) => ReactNode` | `Required` |
|
|
45
|
+
| `items` | `readonly MenuItem[]` | `Required` |
|
|
46
|
+
| `onAction` | `(id: string) => void` | `—` |
|
|
47
|
+
| `open` | `boolean` | `—` |
|
|
48
|
+
| `defaultOpen` | `boolean` | `false` |
|
|
49
|
+
| `onOpenChange` | `(open: boolean) => void` | `—` |
|
|
50
|
+
| `disabled` | `boolean` | `false` |
|
|
51
|
+
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"bottom"` |
|
|
52
|
+
| `align` | `"start" \| "center" \| "end"` | `"start"` |
|
|
53
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"sm"` |
|
|
54
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role">` | `Forwarded` |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Meter
|
|
2
|
+
|
|
3
|
+
A measured value within a meaningful, finite range.
|
|
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, Meter } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Meter label="Storage used" value={75} valueText="75 of 100 GB" />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Use Meter for storage, battery or other bounded measurements; use Progress for task completion.
|
|
27
|
+
- Value is required. Min defaults to 0 and max to 100; require min < max and min <= value <= max. Invalid values throw.
|
|
28
|
+
- Use valueText for meaningful units; hideLabel keeps the accessible name. Tone is host-owned and does not calculate warning thresholds.
|
|
29
|
+
- Native div props, className/style and ref target the wrapper. Available in 0.2.4.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `label` | `string` | `Required` |
|
|
36
|
+
| `max` | `number` | `100` |
|
|
37
|
+
| `valueText` | `string` | `—` |
|
|
38
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
39
|
+
| `tone` | `"neutral" \| "accent" \| "error" \| "warning" \| "success" \| "info"` | `"neutral"` |
|
|
40
|
+
| `hideLabel` | `boolean` | `false` |
|
|
41
|
+
| `value` | `number` | `Required` |
|
|
42
|
+
| `min` | `number` | `0` |
|
|
43
|
+
| `Native HTML props` | `Omit<Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role">, "value">` | `Forwarded` |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Metric
|
|
2
|
+
|
|
3
|
+
A labeled value with optional contextual trend and supporting text.
|
|
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, Metric } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Metric label="Monthly revenue" value="$24,580" trend={{direction:"up",label:"12.8% higher",tone:"success"}} hint="Compared with the previous month." />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Native definition-list semantics associate the label with its value, trend and hint. Values may be rich content; the host owns currency, number and locale formatting.
|
|
27
|
+
- Trend direction and semantic tone are independent: a decreasing failure rate can be good. Its label must communicate the change without relying on the decorative arrow or color. No automatic percentage calculation is performed.
|
|
28
|
+
- Compatible addition in 0.2.5. Uses existing Flood semantic tokens and relative geometry.
|
|
29
|
+
|
|
30
|
+
## API reference
|
|
31
|
+
|
|
32
|
+
| Prop | Values | Default |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `label` | `string` | `Required` |
|
|
35
|
+
| `value` | `ReactNode` | `Required` |
|
|
36
|
+
| `hint` | `ReactNode` | `—` |
|
|
37
|
+
| `trend` | `MetricTrend` | `—` |
|
|
38
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
39
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDListElement>, "children">` | `Forwarded` |
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# MultiSelect
|
|
2
|
+
|
|
3
|
+
Search a collection, choose multiple values and manage them as removable tags.
|
|
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, MultiSelect } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Field label="Frameworks">
|
|
19
|
+
{control => <MultiSelect {...control} name="frameworks" options={[{value:"react",label:"React"},{value:"vue",label:"Vue"},{value:"svelte",label:"Svelte"}]} defaultValue={["react"]} placeholder="Search frameworks" />}
|
|
20
|
+
</Field>
|
|
21
|
+
</FloodRoot>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Design notes
|
|
27
|
+
|
|
28
|
+
- value/defaultValue are arrays of unique nonempty option IDs; onValueChange returns a new array. Native forms submit repeated entries with the same name, never typed query text. Uncontrolled reset restores initial values.
|
|
29
|
+
- The shared Combobox search/layer model keeps focus in the input. Enter toggles the active option and the list stays open. Backspace in an empty input removes the last editable tag; a logical backward arrow at the start enters tag actions. Tag arrows, Delete/Backspace, Enter and Escape support keyboard editing.
|
|
30
|
+
- Disabled selected options cannot be individually removed or cleared globally. Read-only permits copying but blocks selection and removal. Required means at least one valid selected ID. Translate removeItemLabel and the shared action/empty/validation messages.
|
|
31
|
+
- No freeform values, remote fetching, virtualization or arbitrary tag selection engine is supplied. Available in 0.2.5.
|
|
32
|
+
- Only the disclosure chevron is shown by default. Set clearable to opt into the extra clear-selection action; individual MultiSelect tags retain their removal buttons.
|
|
33
|
+
|
|
34
|
+
## API reference
|
|
35
|
+
|
|
36
|
+
| Prop | Values | Default |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
|
|
39
|
+
| `invalid` | `boolean` | `—` |
|
|
40
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
|
|
41
|
+
| `options` | `readonly ComboboxOption[]` | `Required` |
|
|
42
|
+
| `clearable` | `boolean` | `false` |
|
|
43
|
+
| `emptyMessage` | `string` | `"No results found."` |
|
|
44
|
+
| `listLabel` | `string` | `"Options"` |
|
|
45
|
+
| `toggleLabel` | `string` | `"Show options"` |
|
|
46
|
+
| `clearLabel` | `string` | `"Clear selection"` |
|
|
47
|
+
| `invalidSelectionMessage` | `string` | `"Select at least one option."` |
|
|
48
|
+
| `value` | `readonly string[]` | `—` |
|
|
49
|
+
| `defaultValue` | `readonly string[]` | `[]` |
|
|
50
|
+
| `onValueChange` | `(value: string[]) => void` | `—` |
|
|
51
|
+
| `removeItemLabel` | `string` | `"Remove"` |
|
|
52
|
+
| `Native HTML props` | `Omit<Omit<InputHTMLAttributes<HTMLInputElement>, "type" \| "value" \| "defaultValue" \| "onChange" \| "children">, "value" \| "defaultValue" \| "onValueChange">` | `Forwarded` |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# NavigationList
|
|
2
|
+
|
|
3
|
+
A grouped list of native navigation links with a clear current destination.
|
|
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, NavigationList } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<NavigationList label="Project navigation" currentValue="overview" items={[{value:"overview",label:"Overview",href:"/overview",group:"Workspace"},{value:"activity",label:"Activity",href:"/activity",group:"Workspace"},{value:"settings",label:"Settings",href:"/settings",group:"Manage"}]} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- NavigationList renders nav, lists and native anchors; it is not an ARIA menu or tablist. The host supplies unique stable item values, destinations and currentValue. Browser modifier/target navigation is preserved through item.linkProps.
|
|
27
|
+
- Optional group names label contiguous item groups. Icons are decorative IconSlot content; descriptions remain associated link text. Size controls compact row density while coarse pointer targets remain usable. No routing engine, URL inference or disabled navigation simulation is supplied.
|
|
28
|
+
- Original compatible addition in the unpublished 0.2.5 source candidate.
|
|
29
|
+
|
|
30
|
+
## API reference
|
|
31
|
+
|
|
32
|
+
| Prop | Values | Default |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `label` | `string` | `Required` |
|
|
35
|
+
| `items` | `readonly NavigationListItem[]` | `Required` |
|
|
36
|
+
| `currentValue` | `string` | `—` |
|
|
37
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
38
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLElement>, "children" \| "role" \| "aria-label">` | `Forwarded` |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# NavigationTree
|
|
2
|
+
|
|
3
|
+
Nested native navigation links with separate disclosure 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, NavigationTree } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<NavigationTree label="Documentation" defaultExpandedValues={["start"]} items={[{value:"start",label:"Getting started",children:[{value:"installation",label:"Installation",href:"/docs/installation"}]}]} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Native nav, lists and anchors preserve ordinary Tab order and browser modifier navigation. This component does not use ARIA tree/menu/tab roles.
|
|
27
|
+
- A branch may have both href and children: its native link navigates while a separate disclosure button expands. currentValue marks the matching destination; ancestors are expanded explicitly by the host.
|
|
28
|
+
- Expansion is controlled or uncontrolled through expandedValues/defaultExpandedValues/onExpandedValuesChange. Translate disclosure names with expandLabel; content can render host-owned loading or empty branch content.
|
|
29
|
+
- Item values must be globally unique and children acyclic. Disabled destinations have no active href; parent disability does not propagate to children. Introduced in 0.2.7.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `label` | `string` | `Required` |
|
|
36
|
+
| `items` | `readonly NavigationTreeItem[]` | `Required` |
|
|
37
|
+
| `currentValue` | `string` | `—` |
|
|
38
|
+
| `expandedValues` | `readonly string[]` | `—` |
|
|
39
|
+
| `defaultExpandedValues` | `readonly string[]` | `—` |
|
|
40
|
+
| `onExpandedValuesChange` | `(values: string[]) => void` | `—` |
|
|
41
|
+
| `expandLabel` | `(item: NavigationTreeItem, expanded: boolean) => string` | `—` |
|
|
42
|
+
| `size` | `"sm" \| "md" \| "lg"` | `—` |
|
|
43
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLElement>, "children" \| "onChange">` | `Forwarded` |
|