@flood-md/agent 0.2.9 → 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 +35 -4
- package/SKILL.md +31 -0
- 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 +41 -1
- package/package.json +7 -1
- package/references/flood-composition/SKILL.md +30 -0
- package/references/flood-data-display/SKILL.md +32 -0
- package/references/flood-feedback/SKILL.md +24 -3
- package/references/flood-forms/SKILL.md +51 -2
- package/references/flood-foundations/SKILL.md +7 -0
- package/references/flood-hierarchy/SKILL.md +87 -0
- package/references/flood-interface-content/SKILL.md +142 -0
- package/references/flood-overlays/SKILL.md +7 -0
- package/references/flood-records/SKILL.md +108 -0
- package/references/flood-spacing/SKILL.md +16 -0
- package/references/flood-verification/SKILL.md +52 -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 +152 -2
- package/workflows.json +146 -10
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# TagInput
|
|
2
|
+
|
|
3
|
+
Free-form text tokens with keyboard entry, removal and named form values.
|
|
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, TagInput } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<TagInput label="Topics" defaultValue={["Design", "React"]} name="topics" placeholder="Add a topic…" />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Use TagInput for values the user may create. Use MultiSelect for a fixed option collection.
|
|
27
|
+
- Enter and configured delimiters commit trimmed, unique tags. Pasting separated text adds multiple tags. IME composition is preserved.
|
|
28
|
+
- Each committed tag submits one entry under name. required applies to committed tags; a draft is not a submitted token. Form reset preserves controlled ownership.
|
|
29
|
+
- Backspace on an empty draft removes the last token. Read only preserves copying and form values; disabled omits submission and removal. Introduced in 0.2.7.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
|
|
36
|
+
| `invalid` | `boolean` | `—` |
|
|
37
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
|
|
38
|
+
| `label` | `string` | `Required` |
|
|
39
|
+
| `hideLabel` | `boolean` | `false` |
|
|
40
|
+
| `value` | `readonly string[]` | `—` |
|
|
41
|
+
| `defaultValue` | `readonly string[]` | `—` |
|
|
42
|
+
| `onValueChange` | `(value: string[]) => void` | `—` |
|
|
43
|
+
| `delimiters` | `readonly string[]` | `—` |
|
|
44
|
+
| `removeLabel` | `string` | `"Remove"` |
|
|
45
|
+
| `requiredMessage` | `string` | `"Add at least one tag."` |
|
|
46
|
+
| `Native HTML props` | `Omit<InputHTMLAttributes<HTMLInputElement>, "type" \| "value" \| "defaultValue" \| "onChange" \| "children" \| "size">` | `Forwarded` |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Tag
|
|
2
|
+
|
|
3
|
+
A compact label with an optional icon and a named removal action.
|
|
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, Tag } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Tag onRemove={() => { /* Update the host collection. */ }}>Design</Tag>
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Tag is a label, not a status Badge or a selection toggle. The host owns removal; onRemove never hides the element automatically. Use ordinary noninteractive label content.
|
|
27
|
+
- Plain text gets a default Remove label. Rich content needs explicit removeLabel. disabled prevents removal; size and decorative icon are independent. removeButtonProps customizes the nested native action while Tag owns type, name, disabled and removal.
|
|
28
|
+
- Standalone removal is an ordinary Tab stop. MultiSelect supplies its composite keyboard model. Geometry uses relative Flood sizing; long labels wrap and touch targets remain distinct. Available in 0.2.5.
|
|
29
|
+
|
|
30
|
+
## API reference
|
|
31
|
+
|
|
32
|
+
| Prop | Values | Default |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` |
|
|
35
|
+
| `icon` | `ReactNode` | `—` |
|
|
36
|
+
| `disabled` | `boolean` | `false` |
|
|
37
|
+
| `onRemove` | `() => void` | `—` |
|
|
38
|
+
| `removeLabel` | `string` | `—` |
|
|
39
|
+
| `removeButtonProps` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" \| "type" \| "disabled" \| "onClick" \| "aria-label">` | `—` |
|
|
40
|
+
| `Native HTML props` | `HTMLAttributes<HTMLSpanElement>` | `Forwarded` |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Text
|
|
2
|
+
|
|
3
|
+
Role-based interface text, from introductory copy to small supporting details.
|
|
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, Stack, Text } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Stack gap="3">
|
|
19
|
+
<Text as="p" size="lead">A calm foundation for your next idea.</Text>
|
|
20
|
+
<Text as="p" size="compact">Use the space to make it yours.</Text>
|
|
21
|
+
</Stack>
|
|
22
|
+
</FloodRoot>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Design notes
|
|
28
|
+
|
|
29
|
+
- Use as="p" for paragraphs. The label size does not create a form association.
|
|
30
|
+
- Subtle is a supplementary tone; evaluate small required instructions against the actual background and font size.
|
|
31
|
+
|
|
32
|
+
## API reference
|
|
33
|
+
|
|
34
|
+
| Prop | Values | Default |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `as` | `"span" \| "p" \| "div"` | `"span"` |
|
|
37
|
+
| `size` | `"lead" \| "body" \| "compact" \| "label" \| "helper"` | `"body"` |
|
|
38
|
+
| `tone` | `"default" \| "subtle" \| "error" \| "success" \| "warning" \| "info"` | `"default"` |
|
|
39
|
+
| `Native HTML props` | `HTMLAttributes<HTMLElement>` | `Forwarded` |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Textarea
|
|
2
|
+
|
|
3
|
+
Native multiline input for notes and longer 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, Field, Textarea } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Field label="Project note" hint="Keep it short and useful.">
|
|
19
|
+
{(control) => <Textarea {...control} rows={3} maxLength={500} />}
|
|
20
|
+
</Field>
|
|
21
|
+
</FloodRoot>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Design notes
|
|
27
|
+
|
|
28
|
+
- Rows, maxLength, value/defaultValue and form props remain native.
|
|
29
|
+
- The default has no resize grip. Long text scrolls inside the field; a host can opt into native resizing with style={{ resize: "vertical" }}.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
|
|
36
|
+
| `invalid` | `boolean` | `—` |
|
|
37
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
|
|
38
|
+
| `Native HTML props` | `TextareaHTMLAttributes<HTMLTextAreaElement>` | `Forwarded` |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# TimeField
|
|
2
|
+
|
|
3
|
+
Segmented 24-hour time entry with canonical values, bounds and a seconds-based step.
|
|
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, TimeField } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<TimeField label="Start time" name="startTime" defaultValue="09:30" step={300} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Use HH:mm with minute precision or HH:mm:ss with second precision. Values have no date or timezone.
|
|
27
|
+
- step is expressed in seconds and anchored to min or midnight; minute precision requires a multiple of 60. Overnight ranges are not inferred.
|
|
28
|
+
- In editable fields, incomplete, invalid, out-of-range, step-mismatched and refused controlled drafts block native submission. Readonly preserves accepted canonical time outside bounds/step alignment; it never accepts a partial or refused draft. Disabled values are excluded.
|
|
29
|
+
- Click the control background to focus a missing or remembered segment. Keyboard steps, Home/End, paste and IME preserve host cancellation. Translate segmentLabels and messages. Introduced in 0.2.7.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `label` | `string` | `Required` |
|
|
36
|
+
| `end` | `ReactNode` | `—` |
|
|
37
|
+
| `hideLabel` | `boolean` | `—` |
|
|
38
|
+
| `value` | `string` | `—` |
|
|
39
|
+
| `defaultValue` | `string` | `—` |
|
|
40
|
+
| `onValueChange` | `(value: string) => void` | `—` |
|
|
41
|
+
| `precision` | `"minute" \| "second"` | `"minute"` |
|
|
42
|
+
| `min` | `string` | `—` |
|
|
43
|
+
| `max` | `string` | `—` |
|
|
44
|
+
| `step` | `number` | `—` |
|
|
45
|
+
| `required` | `boolean` | `—` |
|
|
46
|
+
| `readOnly` | `boolean` | `—` |
|
|
47
|
+
| `disabled` | `boolean` | `—` |
|
|
48
|
+
| `name` | `string` | `—` |
|
|
49
|
+
| `form` | `string` | `—` |
|
|
50
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
|
|
51
|
+
| `invalid` | `boolean` | `—` |
|
|
52
|
+
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
|
|
53
|
+
| `description` | `string` | `—` |
|
|
54
|
+
| `segmentLabels` | `Partial<Record<"hour" \| "minute" \| "second", string>>` | `—` |
|
|
55
|
+
| `messages` | `{ required?: string; invalid?: string; outOfRange?: string; stepMismatch?: string }` | `—` |
|
|
56
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" \| "onChange" \| "children">` | `Forwarded` |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# TimePicker
|
|
2
|
+
|
|
3
|
+
A segmented time field with an anchored, keyboard-accessible list of clock times.
|
|
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, TimePicker } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<TimePicker label="Start time" name="time" defaultValue="09:30" min="08:00" max="18:00" interval={1800} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Interval and step use seconds; the list contains at most 1000 entries.
|
|
27
|
+
- Manual entry remains available; this is wall-clock time without timezone conversion.
|
|
28
|
+
- One flat list, with selected-time visibility and a trailing action aligned with DatePicker.
|
|
29
|
+
|
|
30
|
+
## API reference
|
|
31
|
+
|
|
32
|
+
| Prop | Values | Default |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `label` | `string` | `Required` |
|
|
35
|
+
| `hideLabel` | `boolean` | `—` |
|
|
36
|
+
| `value` | `string` | `—` |
|
|
37
|
+
| `defaultValue` | `string` | `—` |
|
|
38
|
+
| `onValueChange` | `(value: string) => void` | `—` |
|
|
39
|
+
| `precision` | `"minute" \| "second"` | `—` |
|
|
40
|
+
| `min` | `string` | `—` |
|
|
41
|
+
| `max` | `string` | `—` |
|
|
42
|
+
| `step` | `number` | `—` |
|
|
43
|
+
| `required` | `boolean` | `—` |
|
|
44
|
+
| `readOnly` | `boolean` | `—` |
|
|
45
|
+
| `disabled` | `boolean` | `—` |
|
|
46
|
+
| `name` | `string` | `—` |
|
|
47
|
+
| `form` | `string` | `—` |
|
|
48
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
|
|
49
|
+
| `invalid` | `boolean` | `—` |
|
|
50
|
+
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
|
|
51
|
+
| `description` | `string` | `—` |
|
|
52
|
+
| `segmentLabels` | `Partial<Record<"hour" \| "minute" \| "second", string>>` | `—` |
|
|
53
|
+
| `messages` | `{ required?: string; invalid?: string; outOfRange?: string; stepMismatch?: string }` | `—` |
|
|
54
|
+
| `interval` | `number` | `—` |
|
|
55
|
+
| `open` | `boolean` | `—` |
|
|
56
|
+
| `defaultOpen` | `boolean` | `—` |
|
|
57
|
+
| `onOpenChange` | `(open: boolean) => void` | `—` |
|
|
58
|
+
| `panelLabel` | `string` | `—` |
|
|
59
|
+
| `openTimeLabel` | `string` | `—` |
|
|
60
|
+
| `Native HTML props` | `Omit<Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" \| "onChange" \| "children">, "end">` | `Forwarded` |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Timeline
|
|
2
|
+
|
|
3
|
+
An ordered sequence of events with state, context and optional time labels.
|
|
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, Timeline } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Timeline label="Project activity" items={[{id:"created",title:"Project created",state:"complete"},{id:"review",title:"Design review",state:"current"},{id:"release",title:"Release",state:"upcoming"}]} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- The native ordered list is read in the supplied order; the component does not sort or group events. IDs/titles are nonempty, IDs are unique and at most one event may be current.
|
|
27
|
+
- Each state has a visually hidden text equivalent; localize stateLabels. timeLabel is user-facing text and dateTime, when supplied, is the machine-readable time. Both are host-owned.
|
|
28
|
+
- Markers and optional artwork are decorative. This is an event display, not a wizard or navigation control. Long descriptions and times wrap without changing marker alignment.
|
|
29
|
+
- Compatible addition in 0.2.5. Uses existing Flood semantic tokens and relative geometry.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `label` | `string` | `Required` |
|
|
36
|
+
| `items` | `readonly TimelineItem[]` | `Required` |
|
|
37
|
+
| `stateLabels` | `{complete?: string; current?: string; upcoming?: string}` | `—` |
|
|
38
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLOListElement>, "children">` | `Forwarded` |
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# ToastRegion
|
|
2
|
+
|
|
3
|
+
A host-controlled notification queue with timed, pausable messages 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, ToastRegion } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<ToastRegion items={[{id:"saved",title:"Changes saved",status:"success",duration:0}]} onDismiss={id => { /* Remove the item from host state. */ }} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- The host owns items and removes them onDismiss. IDs must be unique/nonempty. limit controls visible items; queued timers start only when visible. Ordinary messages default to five seconds; error/action messages persist unless duration is explicit. duration=0 persists.
|
|
27
|
+
- Timers pause on hover, focus and hidden documents. F8 focuses the first visible region without interrupting initial task focus; hotkey=false disables it. Use a single main region per document. Localize label/closeLabel and message/action text. Error messages announce as alerts; others use polite status.
|
|
28
|
+
- placement is logical start/end. inline embeds the region in a host container; fixed mode uses ordinary document stacking, so place a contextual region inside a modal if needed. Action callbacks do not dismiss automatically. No global notification store or promise API. Available in 0.2.5.
|
|
29
|
+
|
|
30
|
+
## API reference
|
|
31
|
+
|
|
32
|
+
| Prop | Values | Default |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `items` | `readonly ToastItem[]` | `Required` |
|
|
35
|
+
| `onDismiss` | `(id: string) => void` | `Required` |
|
|
36
|
+
| `label` | `string` | `"Notifications"` |
|
|
37
|
+
| `closeLabel` | `string` | `"Dismiss notification"` |
|
|
38
|
+
| `placement` | `"top-start" \| "top-end" \| "bottom-start" \| "bottom-end"` | `"bottom-end"` |
|
|
39
|
+
| `limit` | `number` | `3` |
|
|
40
|
+
| `inline` | `boolean` | `false` |
|
|
41
|
+
| `hotkey` | `boolean` | `true` |
|
|
42
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role">` | `Forwarded` |
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# ToggleGroup
|
|
2
|
+
|
|
3
|
+
Optional single or multiple selections exposed as pressed buttons.
|
|
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, ToggleGroup } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<ToggleGroup label="Text formatting" defaultValue={["bold"]} options={[{value: "bold", label: "Bold"}, {value: "italic", label: "Italic"}]} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Tab reaches each enabled action. Arrows/Home/End move focus without selecting. Single selection can be cleared.
|
|
27
|
+
- Use RadioGroup for form choices and tabs for switching panels. ToggleGroup does not submit form values.
|
|
28
|
+
|
|
29
|
+
## API reference
|
|
30
|
+
|
|
31
|
+
| Prop | Values | Default |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `label` | `string` | `Required` |
|
|
34
|
+
| `options` | `readonly ToggleOption[]` | `Required` |
|
|
35
|
+
| `selectionMode` | `"single" \| "multiple"` | `"multiple"` |
|
|
36
|
+
| `value` | `readonly string[]` | `—` |
|
|
37
|
+
| `defaultValue` | `readonly string[]` | `[]` |
|
|
38
|
+
| `onValueChange` | `(value: string[]) => void` | `—` |
|
|
39
|
+
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` |
|
|
40
|
+
| `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` |
|
|
41
|
+
| `variant` | `"solid" \| "subtle" \| "outline" \| "ghost"` | `"subtle"` |
|
|
42
|
+
| `disabled` | `boolean` | `false` |
|
|
43
|
+
| `iconOnly` | `boolean` | `false` |
|
|
44
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "role" \| "children" \| "defaultValue" \| "onChange">` | `Forwarded` |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Toggle
|
|
2
|
+
|
|
3
|
+
A native button with a persistent pressed state.
|
|
4
|
+
|
|
5
|
+
Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.
|
|
6
|
+
|
|
7
|
+
## Example
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
"use client";
|
|
11
|
+
|
|
12
|
+
import { FloodRoot, Toggle } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Toggle defaultPressed>Bold</Toggle>
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Keep the accessible name stable; Enter/Space toggle pressed. Supports controlled pressed/onPressedChange or defaultPressed.
|
|
27
|
+
|
|
28
|
+
## API reference
|
|
29
|
+
|
|
30
|
+
| Prop | Values | Default |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| `variant` | `"solid" \| "subtle" \| "outline" \| "ghost"` | `"subtle"` |
|
|
33
|
+
| `size` | `"2xs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` |
|
|
34
|
+
| `loading` | `boolean` | `—` |
|
|
35
|
+
| `pressed` | `boolean` | `—` |
|
|
36
|
+
| `defaultPressed` | `boolean` | `false` |
|
|
37
|
+
| `onPressedChange` | `(pressed: boolean) => void` | `—` |
|
|
38
|
+
| `iconOnly` | `boolean` | `false` |
|
|
39
|
+
| `Native HTML props` | `Omit<ButtonHTMLAttributes<HTMLButtonElement>, "aria-pressed" \| "type" \| "role" \| "defaultValue">` | `Forwarded` |
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Toolbar
|
|
2
|
+
|
|
3
|
+
A compact action panel with one Tab entry and directional keyboard 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, Toolbar, Button, Toggle } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Toolbar label="Editor actions">
|
|
19
|
+
<Button variant="ghost">Undo</Button>
|
|
20
|
+
<Toggle variant="ghost">Bold</Toggle>
|
|
21
|
+
<Button variant="ghost">Share</Button>
|
|
22
|
+
</Toolbar>
|
|
23
|
+
</FloodRoot>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Design notes
|
|
29
|
+
|
|
30
|
+
- Use Button, IconButton, Toggle, native buttons/links and Menu triggers. Keep inputs, Select, Tabs and ToggleGroup outside this action-only toolbar.
|
|
31
|
+
- Arrows move focus without activation; Home/End jump to the ends. Disabled and hidden actions are skipped. One Tab entry is established after hydration; before JavaScript native child tab order remains.
|
|
32
|
+
- Horizontal arrows follow writing direction. Vertical arrows move between actions; open a vertical toolbar Menu with Enter/Space. Horizontal menus retain ArrowUp/Down opening.
|
|
33
|
+
- loop defaults to true. Native div props/ref target the toolbar; preserve a meaningful label. Available in 0.2.4.
|
|
34
|
+
|
|
35
|
+
## API reference
|
|
36
|
+
|
|
37
|
+
| Prop | Values | Default |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `label` | `string` | `Required` |
|
|
40
|
+
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` |
|
|
41
|
+
| `loop` | `boolean` | `true` |
|
|
42
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "role">` | `Forwarded` |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Tooltip
|
|
2
|
+
|
|
3
|
+
Brief text help on hover or focus, with collision-aware placement.
|
|
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, Tooltip, Button } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Tooltip content="Additional context" trigger={trigger => <Button {...trigger}>Hover or focus</Button>} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Requires native Popover API.
|
|
27
|
+
- Forward trigger props and ref to one actual button. Tooltip is text-only; interactive content belongs in Popover.
|
|
28
|
+
- Escape dismisses. Hover can move onto the tooltip; focus stays on the trigger. Do not use it as the only accessible name or essential instruction.
|
|
29
|
+
|
|
30
|
+
## API reference
|
|
31
|
+
|
|
32
|
+
| Prop | Values | Default |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `content` | `string` | `Required` |
|
|
35
|
+
| `trigger` | `(props: OverlayTriggerProps) => ReactNode` | `Required` |
|
|
36
|
+
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"top"` |
|
|
37
|
+
| `align` | `"start" \| "center" \| "end"` | `"center"` |
|
|
38
|
+
| `delay` | `number` | `300` |
|
|
39
|
+
| `disabled` | `boolean` | `false` |
|
|
40
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "content" \| "title" \| "role">` | `Forwarded` |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# TreeSelect
|
|
2
|
+
|
|
3
|
+
Single selection from a hierarchical collection inside a popup.
|
|
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, TreeSelect } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<TreeSelect label="Destination" name="destination" items={[{value:"design",label:"Design",selectable:false,children:[{value:"foundations",label:"Foundations"},{value:"components",label:"Components"}]}]} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- This first version selects one item; Tree provides standalone multiple selection.
|
|
27
|
+
- Values are globally unique and expansion remains independent of selection.
|
|
28
|
+
|
|
29
|
+
## API reference
|
|
30
|
+
|
|
31
|
+
| Prop | Values | Default |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `label` | `string` | `Required` |
|
|
34
|
+
| `hideLabel` | `boolean` | `—` |
|
|
35
|
+
| `items` | `readonly TreeItem[]` | `Required` |
|
|
36
|
+
| `value` | `string` | `—` |
|
|
37
|
+
| `defaultValue` | `string` | `—` |
|
|
38
|
+
| `onValueChange` | `(value: string) => void` | `—` |
|
|
39
|
+
| `placeholder` | `string` | `—` |
|
|
40
|
+
| `name` | `string` | `—` |
|
|
41
|
+
| `form` | `string` | `—` |
|
|
42
|
+
| `required` | `boolean` | `—` |
|
|
43
|
+
| `disabled` | `boolean` | `—` |
|
|
44
|
+
| `readOnly` | `boolean` | `—` |
|
|
45
|
+
| `invalid` | `boolean` | `—` |
|
|
46
|
+
| `status` | `"error" \| "warning" \| "success" \| "info"` | `—` |
|
|
47
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
|
|
48
|
+
| `open` | `boolean` | `—` |
|
|
49
|
+
| `defaultOpen` | `boolean` | `—` |
|
|
50
|
+
| `onOpenChange` | `(open: boolean) => void` | `—` |
|
|
51
|
+
| `expandedValues` | `readonly string[]` | `—` |
|
|
52
|
+
| `defaultExpandedValues` | `readonly string[]` | `—` |
|
|
53
|
+
| `onExpandedValuesChange` | `(values: string[]) => void` | `—` |
|
|
54
|
+
| `emptyMessage` | `string` | `—` |
|
|
55
|
+
| `invalidSelectionMessage` | `string` | `—` |
|
|
56
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "onChange" \| "defaultValue">` | `Forwarded` |
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Tree
|
|
2
|
+
|
|
3
|
+
A selectable application hierarchy with independent expansion and keyboard focus.
|
|
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, Tree } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Tree label="Project files" items={[{value:"source",label:"Source",children:[{value:"button",label:"Button.tsx"}]}]} />
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Tree uses tree/treeitem/group semantics, logical arrows, Home/End and typeahead. Moving focus does not select an item. Enter/Space explicitly selects; multiple selection does not cascade.
|
|
27
|
+
- Items have globally unique values. Expansion uses expandedValues/defaultExpandedValues/onExpandedValuesChange; selection uses value/defaultValue/onValueChange. Controlled refusal preserves the host state.
|
|
28
|
+
- Read-only allows browsing without selecting. Disabled items remain discoverable but cannot select or expand. hasChildren/loading represent host-owned deferred branches; no fetching or virtualization is built in.
|
|
29
|
+
- Application selection writes no form values. Use NavigationTree for ordinary native links. Introduced in 0.2.7.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `label` | `string` | `Required` |
|
|
36
|
+
| `hideLabel` | `boolean` | `—` |
|
|
37
|
+
| `items` | `readonly TreeItem[]` | `Required` |
|
|
38
|
+
| `value` | `string \| readonly string[]` | `—` |
|
|
39
|
+
| `defaultValue` | `string \| readonly string[]` | `—` |
|
|
40
|
+
| `onValueChange` | `(value: string \| string[]) => void` | `—` |
|
|
41
|
+
| `multiple` | `boolean` | `—` |
|
|
42
|
+
| `expandedValues` | `readonly string[]` | `—` |
|
|
43
|
+
| `defaultExpandedValues` | `readonly string[]` | `—` |
|
|
44
|
+
| `onExpandedValuesChange` | `(values: string[]) => void` | `—` |
|
|
45
|
+
| `disabled` | `boolean` | `—` |
|
|
46
|
+
| `readOnly` | `boolean` | `—` |
|
|
47
|
+
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `—` |
|
|
48
|
+
| `emptyMessage` | `string` | `—` |
|
|
49
|
+
| `loadingMessage` | `string` | `—` |
|
|
50
|
+
| `unloadedMessage` | `string` | `—` |
|
|
51
|
+
| `readOnlyMessage` | `string` | `—` |
|
|
52
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "onSelect" \| "defaultValue" \| "onChange">` | `Forwarded` |
|