@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,52 @@
|
|
|
1
|
+
# UploadItem
|
|
2
|
+
|
|
3
|
+
A host-controlled upload row with explicit progress and applicable 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, UploadList, UploadItem } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<UploadList label="Uploads">
|
|
19
|
+
<UploadItem name="Brand guidelines.pdf" size={2400000} state="uploading" progress={45} />
|
|
20
|
+
</UploadList>
|
|
21
|
+
</FloodRoot>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Design notes
|
|
27
|
+
|
|
28
|
+
- Queued/uploading can expose cancel; error/cancelled can expose retry; settled rows can expose remove.
|
|
29
|
+
- Unknown progress is indeterminate. StatusIndicator and Progress remain distinct reused primitives; their row can wrap when the list container is constrained. No network or upload queue is built in.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `name` | `string` | `Required` |
|
|
36
|
+
| `size` | `number` | `—` |
|
|
37
|
+
| `mimeType` | `string` | `—` |
|
|
38
|
+
| `format` | `string \| null` | `—` |
|
|
39
|
+
| `thumbnail` | `ReactNode` | `—` |
|
|
40
|
+
| `href` | `string` | `—` |
|
|
41
|
+
| `download` | `boolean` | `—` |
|
|
42
|
+
| `onPreview` | `() => void` | `—` |
|
|
43
|
+
| `onRemove` | `() => void` | `—` |
|
|
44
|
+
| `disabled` | `boolean` | `—` |
|
|
45
|
+
| `labels` | `FileActionLabels` | `—` |
|
|
46
|
+
| `formatSize` | `(bytes: number) => string` | `—` |
|
|
47
|
+
| `state` | `"queued" \| "uploading" \| "success" \| "error" \| "cancelled"` | `Required` |
|
|
48
|
+
| `progress` | `number` | `—` |
|
|
49
|
+
| `error` | `string` | `—` |
|
|
50
|
+
| `onCancel` | `() => void` | `—` |
|
|
51
|
+
| `onRetry` | `() => void` | `—` |
|
|
52
|
+
| `Native HTML props` | `Omit<Omit<HTMLAttributes<HTMLLIElement>, "children" \| "title">, "description">` | `Forwarded` |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# UploadList
|
|
2
|
+
|
|
3
|
+
A named native list of host-controlled upload rows.
|
|
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, UploadList, UploadItem } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<UploadList label="Uploads">
|
|
19
|
+
<UploadItem name="Brand guidelines.pdf" state="uploading" progress={45} />
|
|
20
|
+
<UploadItem name="Logo.svg" state="success" />
|
|
21
|
+
<UploadItem name="Cover.png" state="error" error="Connection interrupted" />
|
|
22
|
+
</UploadList>
|
|
23
|
+
</FloodRoot>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Design notes
|
|
29
|
+
|
|
30
|
+
- Each row has its own state and stable host identity.
|
|
31
|
+
- Cancellation, retry and removal callbacks are intents for the application.
|
|
32
|
+
|
|
33
|
+
## API reference
|
|
34
|
+
|
|
35
|
+
| Prop | Values | Default |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `density` | `"compact" \| "comfortable"` | `—` |
|
|
38
|
+
| `dividers` | `boolean` | `—` |
|
|
39
|
+
| `label` | `string` | `Required` |
|
|
40
|
+
| `Native HTML props` | `Omit<HTMLAttributes<HTMLUListElement>, "role">` | `Forwarded` |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# VisuallyHidden
|
|
2
|
+
|
|
3
|
+
Nonvisual content with optional reveal when keyboard focus enters.
|
|
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, VisuallyHidden } from "@flood-md/react";
|
|
13
|
+
import "@flood-md/react/styles.css";
|
|
14
|
+
|
|
15
|
+
export function Example() {
|
|
16
|
+
return (
|
|
17
|
+
<FloodRoot>
|
|
18
|
+
<Text>Project updated.</Text><VisuallyHidden>Changes save automatically.</VisuallyHidden>
|
|
19
|
+
</FloodRoot>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Design notes
|
|
25
|
+
|
|
26
|
+
- Content remains in the accessibility tree. Default is for noninteractive text only.
|
|
27
|
+
- Use focusable for a skip link or another focusable descendant: the wrapper becomes visible while it contains focus. Supply visible focus styling on the actual control.
|
|
28
|
+
- This is not aria-hidden, display:none or a conditional unmount. as accepts span/div.
|
|
29
|
+
- Available in 0.2.4; use matching installed declarations.
|
|
30
|
+
|
|
31
|
+
## API reference
|
|
32
|
+
|
|
33
|
+
| Prop | Values | Default |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `as` | `"span" \| "div"` | `"span"` |
|
|
36
|
+
| `focusable` | `boolean` | `false` |
|
|
37
|
+
| `Native HTML props` | `HTMLAttributes<HTMLElement>` | `Forwarded` |
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Agent knowledge
|
|
2
|
+
|
|
3
|
+
Flood 0.2.10 adds a versioned read-only catalog and reader. Use the CLI matching
|
|
4
|
+
the project's flood.json; source availability does not prove npm publication.
|
|
5
|
+
The same package sources build the website, CLI results and agent instructions.
|
|
6
|
+
|
|
7
|
+
## Discover, then read
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx @flood-md/cli@0.2.10 info --json
|
|
11
|
+
npx @flood-md/cli@0.2.10 catalog --kind workflow --group foundations
|
|
12
|
+
npx @flood-md/cli@0.2.10 catalog --kind component --search table
|
|
13
|
+
npx @flood-md/cli@0.2.10 read recipe:table-bulk-actions
|
|
14
|
+
npx @flood-md/cli@0.2.10 read component:data-table
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
These commands return JSON and do not install dependencies, edit files, execute
|
|
18
|
+
skill text or contact a Flood server. The package runner may fetch the CLI if
|
|
19
|
+
it is not installed locally; keep its version deliberate. Existing project and
|
|
20
|
+
agent instructions remain authoritative.
|
|
21
|
+
|
|
22
|
+
info reports actual installed package versions, the configured guide version,
|
|
23
|
+
framework detection, catalog identity and capability declarations. A version
|
|
24
|
+
mismatch prevents catalog/read from serving an ambiguous guide train. A
|
|
25
|
+
bundle-only result describes the CLI's bundle; it is not proof that the host has
|
|
26
|
+
installed Flood or imported its stylesheet. doctor remains the installation check.
|
|
27
|
+
|
|
28
|
+
## Material types and groups
|
|
29
|
+
|
|
30
|
+
Stable IDs distinguish workflows, references, components, recipes, guides and
|
|
31
|
+
semantic token records. Groups organize Foundations, Composition, Interaction,
|
|
32
|
+
Data & feedback, Quality and existing Motion tokens. They are navigation labels;
|
|
33
|
+
one task can use several groups. Current capability gaps are explicit in info.
|
|
34
|
+
|
|
35
|
+
For example, page-transition workflows and additional foundation themes are not
|
|
36
|
+
supplied. Existing motion tokens do not create a PageTransition export. Scoped
|
|
37
|
+
brand overrides do not add a brand Button variant. Read reference:customization
|
|
38
|
+
and the actual token records before changing semantic roles.
|
|
39
|
+
|
|
40
|
+
## Bounded output and version identity
|
|
41
|
+
|
|
42
|
+
catalog accepts --kind, --group, --search, --limit and --cursor. Search matches
|
|
43
|
+
literal metadata case-insensitively; it is not model-based intent routing.
|
|
44
|
+
The default limit is 12, maximum 50, and each metadata page is capped at 16 KiB.
|
|
45
|
+
If truncated is true, follow nextCursor. A changed query or catalog invalidates
|
|
46
|
+
that cursor. This remains bounded as the number of components increases.
|
|
47
|
+
|
|
48
|
+
read accepts --offset and --length. Its default is 10,000 Unicode code points,
|
|
49
|
+
maximum 40,000; follow nextOffset to finish a selected instruction. Related links
|
|
50
|
+
are limited to 32 per read; use --links-offset with nextLinksOffset for more.
|
|
51
|
+
Required prerequisites are separate from optional links. A workflow applying to
|
|
52
|
+
many components does not require reading all of them.
|
|
53
|
+
|
|
54
|
+
The reader checks schema, relationships, package version and selected content
|
|
55
|
+
integrity. It reads only the selected body. The catalog is capped at 8 MiB and
|
|
56
|
+
each material at 1 MiB. Limits fail explicitly; they are not silent omissions.
|
|
57
|
+
The current protocol permits up to 16 semantic groups, 32 capability declarations,
|
|
58
|
+
16 direct prerequisites and 256 related links per material. Prerequisite depth
|
|
59
|
+
is limited to 32. Expanding these limits is a reviewed protocol decision, not a
|
|
60
|
+
reason to delete safeguards when the catalog grows.
|
|
61
|
+
|
|
62
|
+
## Customized project guides
|
|
63
|
+
|
|
64
|
+
For material copied by init, read defaults to the existing project guide. The
|
|
65
|
+
response identifies source=project, its hash and customized status. Other
|
|
66
|
+
materials come from the matching package. Missing or linked project guides fail
|
|
67
|
+
explicitly; they are not silently replaced by upstream instructions.
|
|
68
|
+
|
|
69
|
+
Use --source package to compare canonical upstream content. It never overwrites
|
|
70
|
+
customized files. flood/catalog.json is an installed snapshot, not executable
|
|
71
|
+
configuration or permission to redirect reads. Instructions cannot authorize
|
|
72
|
+
external actions that the user did not request.
|
|
73
|
+
|
|
74
|
+
## API and contribution checks
|
|
75
|
+
|
|
76
|
+
The Node API exports createKnowledgeReader and validateKnowledgeCatalog from
|
|
77
|
+
@flood-md/agent, with matching TypeScript declarations. It has info(), list(query)
|
|
78
|
+
and read(id, range) methods and performs no network operations. Pass an explicit
|
|
79
|
+
package root when reading an isolated package; otherwise it uses its own package.
|
|
80
|
+
|
|
81
|
+
Contributors edit canonical code, guides and knowledge.json annotations. Build
|
|
82
|
+
regenerates content and hashes; stale/unmapped workflows, unknown imports,
|
|
83
|
+
duplicate IDs, broken guidance links and prerequisite cycles stop compilation.
|
|
84
|
+
The compatibility fixture records established public IDs. Growth tests exercise
|
|
85
|
+
5,000 metadata entries, pagination, stale cursors, selected-content integrity and
|
|
86
|
+
host customization. Clean tarball and browser checks verify the consumer boundary.
|
|
87
|
+
None of these checks independently proves model routing accuracy, general
|
|
88
|
+
accessibility or visual quality.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Using Flood with an agent
|
|
2
|
+
|
|
3
|
+
Start with the host's instructions, package.json, flood.json and installed
|
|
4
|
+
flood/DESIGN.md. Use matching package/CLI versions and declarations. A newer
|
|
5
|
+
website example does not add APIs to an older installation.
|
|
6
|
+
|
|
7
|
+
Version 0.2.3 includes the expanded skill, rules and reference bundle, including
|
|
8
|
+
spacing guidance. Existing projects keep their installed files; compare new
|
|
9
|
+
guidance before updating customized instructions.
|
|
10
|
+
|
|
11
|
+
Version 0.2.9 adds ten specialized routed skills for stabilizing and
|
|
12
|
+
composing the dark base. See [Skills](skills.md) for their applicability and full
|
|
13
|
+
sources. The website index is generated from the same bundle metadata rather
|
|
14
|
+
than a second handwritten skill catalog. Source additions do not update an
|
|
15
|
+
already installed package; use the guide set matching your installation.
|
|
16
|
+
|
|
17
|
+
Version 0.2.10 adds [versioned knowledge discovery](agent-knowledge.md):
|
|
18
|
+
info reports installation context, catalog discovers compact metadata, and read
|
|
19
|
+
loads a selected contract or workflow. The catalog includes typed recipes and
|
|
20
|
+
semantic token records. Unknown capabilities and version mismatches are explicit;
|
|
21
|
+
copied host guides remain project-owned.
|
|
22
|
+
|
|
23
|
+
For discovery, give an agent [flood.md/llms.txt](https://flood.md/llms.txt).
|
|
24
|
+
It identifies deployed status and entry points. Follow [installation](installation.md);
|
|
25
|
+
preview the matching CLI's init with --dry-run before applying it within the user's
|
|
26
|
+
scope. The CLI does not install an agent runtime or require a hosted Flood service.
|
|
27
|
+
|
|
28
|
+
## Compose from primitives
|
|
29
|
+
|
|
30
|
+
Flood includes the [Flood composition skill](../packages/agent/references/flood-composition/SKILL.md).
|
|
31
|
+
The main Flood skill routes component, website and playground work to it. The
|
|
32
|
+
manifest installs the full skill under
|
|
33
|
+
`.agents/skills/flood-ui/references/flood-composition/SKILL.md`; it is loaded by
|
|
34
|
+
that router rather than relying on independent discovery of nested skills.
|
|
35
|
+
Existing installations must compare and merge new guidance deliberately.
|
|
36
|
+
|
|
37
|
+
Reuse the existing library component; fix the relationship in its proper owner.
|
|
38
|
+
If a reusable primitive is missing, build or extend it before the composition.
|
|
39
|
+
Do not replace StatusIndicator with custom text, hide its anatomy, or duplicate
|
|
40
|
+
a Badge/Progress/Dialog implementation just to make one layout fit.
|
|
41
|
+
|
|
42
|
+
## Files and responsibilities
|
|
43
|
+
|
|
44
|
+
| Project file | For whom / when | Prerequisite | Source of truth | What to check |
|
|
45
|
+
| --- | --- | --- | --- | --- |
|
|
46
|
+
| flood.json | Developer / agent, setup or upgrade | Existing React project | Exact installed release, framework and paths | Matching CLI doctor |
|
|
47
|
+
| flood/DESIGN.md | Designer / developer / agent, every composition | Installed declarations | Version-matched UI contracts | Supported props and rendered states |
|
|
48
|
+
| .agents/skills/flood-ui/SKILL.md | Skill-aware client, Flood UI work | Project context | Short task router | Load only the relevant reference |
|
|
49
|
+
| references/routing.md in the skill folder | Human / agent, resolve ownership | Matching guide set | Responsibility and source matrix | Correct source and prerequisites |
|
|
50
|
+
| references/composition.md in the skill folder | Screen/form author | User content and installed APIs | Composition workflow | Intrinsic actions, responsive forms, close choice labels |
|
|
51
|
+
| references/spacing.md in the skill folder | Designer / developer / agent | Installed tokens and rendered host | Spacing and density decisions | Visible gaps, row pitch, wrapping and nonoverlapping touch targets |
|
|
52
|
+
| references/accessibility.md in the skill folder | Control author / reviewer | Runnable host | Interaction and perception | Names, keyboard, focus, forms and contrast context |
|
|
53
|
+
| references/customization.md in the skill folder | Theme author | Installed token manifest | Semantic override workflow | Resolved roles and affected states/surfaces |
|
|
54
|
+
| references/verification.md in the skill folder | Developer / reviewer, completion | Host checks | Evidence requirements | Commands, manual results and gaps |
|
|
55
|
+
| flood/rules.json | Human / agent / project tooling | Same bundle | Rule IDs, conditions, sources and checks | Evidence for each applicable rule |
|
|
56
|
+
| flood/manifest.json | Installer / reviewer | Matching package | Explicit source → project-path mapping | Complete files; existing files preserved |
|
|
57
|
+
| workflows.json in the skill folder | Agent / reviewer, task selection | Same installed bundle | Workflow applicability | Read relevant skills; applicability is not behavioral proof |
|
|
58
|
+
|
|
59
|
+
Manifest `entry` and rule `guide` paths are package-source paths. Resolve them
|
|
60
|
+
through `manifest.files`: each source maps to a target relative to the host
|
|
61
|
+
project root. `installedEntry` names the installed skill directly. Manifest
|
|
62
|
+
version and DESIGN header are checked by doctor alongside package alignment;
|
|
63
|
+
customized guide contents are preserved and must be merged deliberately.
|
|
64
|
+
|
|
65
|
+
The package publishes DESIGN.md, SKILL.md, rules.json, manifest.json and
|
|
66
|
+
references/*.md. The website exposes the same sources under /agent/.
|
|
67
|
+
The [routing reference](../packages/agent/references/routing.md) connects each
|
|
68
|
+
question with its governing source and verification method.
|
|
69
|
+
|
|
70
|
+
## Use only the context needed
|
|
71
|
+
|
|
72
|
+
For a settings form, read DESIGN.md and SKILL.md, then composition/accessibility.
|
|
73
|
+
Consult installed declarations for actual Field/Select props and read only those
|
|
74
|
+
component pages. Before completion use verification. For a color-only change,
|
|
75
|
+
load customization and the relevant token roles; unrelated guides stay unloaded.
|
|
76
|
+
|
|
77
|
+
Clients supporting the skill-folder convention can discover it. Others can read
|
|
78
|
+
it explicitly or link it from existing instructions. The installer preserves
|
|
79
|
+
AGENTS.md; it does not configure clients or guarantee automatic discovery.
|
|
80
|
+
|
|
81
|
+
The rules index is data, not an executable policy engine. It cannot make an agent
|
|
82
|
+
obey guidance or certify accessibility. Host checks and Flood's repository
|
|
83
|
+
verification supply evidence. Doctor checks package alignment and expected regular
|
|
84
|
+
files; it does not parse CSS imports or assess visual quality/completed user flows.
|
|
85
|
+
|
|
86
|
+
## Safe installation and upgrades
|
|
87
|
+
|
|
88
|
+
Init refuses existing owned files and linked destinations before npm runs, then
|
|
89
|
+
rechecks after installation. During upgrades compare new package sources with
|
|
90
|
+
installed copies, merge deliberately and retain host requirements. Do not delete
|
|
91
|
+
customized guides merely to make init succeed.
|
|
92
|
+
|
|
93
|
+
Import @flood-md/react/styles.css once and compose new dark interfaces in
|
|
94
|
+
FloodRoot. See [layout](layout.md), [components](components.md) and
|
|
95
|
+
[customization](theming.md). Flood guidance governs UI use; it grants no authority
|
|
96
|
+
to publish, delete data, transmit source or bypass the user's instructions.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Frequently asked questions
|
|
2
|
+
|
|
3
|
+
## Does Flood use shadcn, Radix, Base UI or Tailwind?
|
|
4
|
+
|
|
5
|
+
No. Flood's controls, CSS tokens and CLI are authored in this repository. React
|
|
6
|
+
and browser-native form elements provide the underlying platform APIs.
|
|
7
|
+
|
|
8
|
+
## Does it support Next.js?
|
|
9
|
+
|
|
10
|
+
Yes. Import the global stylesheet in app/layout.tsx. Flood's React entry preserves
|
|
11
|
+
its use-client boundary. Compose callbacks, state and Field's function child in
|
|
12
|
+
your own client component. The integration fixture tests React 19 and Next.js App
|
|
13
|
+
Router. Clean-package checks also exercise React 18.3 and 19 server rendering;
|
|
14
|
+
the full interactive Next.js fixture uses React 19.
|
|
15
|
+
|
|
16
|
+
## Is this the same installation model as shadcn?
|
|
17
|
+
|
|
18
|
+
Flood currently installs versioned npm dependencies. It does not copy editable
|
|
19
|
+
component source into your application or provide a source-file merge engine.
|
|
20
|
+
Customize semantic tokens and component props; use source changes in a fork when
|
|
21
|
+
you need behavior outside the public API.
|
|
22
|
+
|
|
23
|
+
## Why is there no add button command?
|
|
24
|
+
|
|
25
|
+
The base set ships together in @flood-md/react: ten foundation primitives and
|
|
26
|
+
eight native controls. Import the components you need; see the
|
|
27
|
+
[base component set](base-components.md). The CLI provides init, init --dry-run
|
|
28
|
+
and doctor.
|
|
29
|
+
|
|
30
|
+
## Which package managers work?
|
|
31
|
+
|
|
32
|
+
The installer uses npm. Other package managers can install the library manually,
|
|
33
|
+
but their integration is not currently covered by the installer tests.
|
|
34
|
+
|
|
35
|
+
## The controls look unstyled. What should I check?
|
|
36
|
+
|
|
37
|
+
Import @flood-md/react/styles.css once at the app root. Doctor checks package
|
|
38
|
+
versions and instruction files, not the application's stylesheet imports.
|
|
39
|
+
Wrap a new interface in FloodRoot to select the neutral dark foundations profile.
|
|
40
|
+
Outside that scope, controls retain the legacy theme. Check project CSS overrides
|
|
41
|
+
if the import and wrapper are already present.
|
|
42
|
+
|
|
43
|
+
## Can I rerun init or use it as an updater?
|
|
44
|
+
|
|
45
|
+
Init refuses existing flood.json or owned instruction files. It does not overwrite
|
|
46
|
+
project instructions. Follow the [upgrade guide](installation.md) and
|
|
47
|
+
review customized instructions when moving to a new release.
|
|
48
|
+
|
|
49
|
+
## Does making the website source public grant server access?
|
|
50
|
+
|
|
51
|
+
No. Source visibility does not grant GitHub write access, hosting credentials or
|
|
52
|
+
server execution. Browser-delivered HTML, JavaScript and CSS are visible to users
|
|
53
|
+
regardless of repository visibility. This does not make a website immune to bugs:
|
|
54
|
+
deployment permissions, dependencies and server behavior still need review.
|
|
55
|
+
Credentials belong in service secret stores, never in a public or private Git repo.
|
|
56
|
+
|
|
57
|
+
## Does Flood require an account or send my project to a service?
|
|
58
|
+
|
|
59
|
+
No Flood account, backend or telemetry is required. The installer contacts npm to
|
|
60
|
+
download packages. Components run inside your application and do not send project
|
|
61
|
+
contents to Flood.
|
|
62
|
+
|
|
63
|
+
## Where do I report problems?
|
|
64
|
+
|
|
65
|
+
Use [GitHub issues](https://github.com/tillwithered/flood.md/issues) for reproducible
|
|
66
|
+
bugs and API requests. For vulnerabilities, follow [SECURITY.md](../SECURITY.md)
|
|
67
|
+
and avoid posting exploit details or credentials in a public issue.
|
|
68
|
+
|
|
69
|
+
## Which fonts and icons does Flood use?
|
|
70
|
+
|
|
71
|
+
Flood's component implementations are original. Fonts and icon artwork have their
|
|
72
|
+
own authors and licenses:
|
|
73
|
+
|
|
74
|
+
| Asset | Where it is used | License |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| [Inter](https://github.com/rsms/inter) | Locally bundled variable font in the React stylesheet | [SIL Open Font License 1.1](/licenses/inter.txt) |
|
|
77
|
+
| [Lucide](https://github.com/lucide-icons/lucide) | Website icons and documentation examples | [ISC, with included Feather-derived MIT notices](/licenses/lucide.txt) |
|
|
78
|
+
| [GitHub Primer Octicons](https://github.com/primer/octicons) | GitHub link mark on the website | [MIT](/licenses/github-mark.txt) |
|
|
79
|
+
|
|
80
|
+
The React component package does not depend on an icon pack. IconSlot and
|
|
81
|
+
IconButton accept SVG artwork from the host. Examples importing `lucide-react`
|
|
82
|
+
require that optional dependency in your project; you may substitute your own
|
|
83
|
+
icons. Preserve the corresponding license notices when redistributing assets.
|
|
84
|
+
The full Inter font provenance and license accompany the installed package.
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Foundations tokens · 0.2.5
|
|
2
|
+
|
|
3
|
+
This guide describes the **0.2.5** foundation exports. Keep Flood packages at
|
|
4
|
+
matching exact versions. Existing 0.1.1 installs use their earlier token contract.
|
|
5
|
+
|
|
6
|
+
Foundations separates fixed reference values (`ref`) from semantic roles (`sys`).
|
|
7
|
+
The compiler also supports component aliases (`comp`) and isolated experiments
|
|
8
|
+
(`exp`); no component-specific tokens are shipped in this first profile.
|
|
9
|
+
|
|
10
|
+
The 0.2.3 neutral dark profile has 168 public semantic roles. Five roles added
|
|
11
|
+
since 0.2.2 define scrollbar size, inset, minimum
|
|
12
|
+
thumb length and thumb/rest-hover colors. Geometry uses rem; the viewport stays
|
|
13
|
+
natively scrollable and overlay tracks reserve no layout gutter. Version 0.2.2 adds
|
|
14
|
+
`sys.type.display.*` (5.5rem size, 1.12 line height, 500 weight, -.04em tracking)
|
|
15
|
+
for marketing headings, `sys.type.lead.*` (1.375rem, 1.45, 400, -.01em) for
|
|
16
|
+
supporting marketing copy, and `sys.font.mono` for code. Existing product typography
|
|
17
|
+
retains its metrics. Responsive page composition remains the host's responsibility.
|
|
18
|
+
|
|
19
|
+
## Use the neutral dark profile
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import "@flood-md/tokens/foundations.css";
|
|
23
|
+
|
|
24
|
+
<section data-flood-foundations="neutral" data-flood-theme="dark">
|
|
25
|
+
<p className="example">Content</p>
|
|
26
|
+
</section>;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```css
|
|
30
|
+
.example {
|
|
31
|
+
color: var(--flood-sys-color-content-default);
|
|
32
|
+
background: var(--flood-sys-color-surface-canvas);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Both attributes belong on the same scope element. This opt-in token stylesheet
|
|
37
|
+
defines tokens and `color-scheme`; React components adopt these roles inside
|
|
38
|
+
`FloodRoot` when the React stylesheet is imported. It does not enable an
|
|
39
|
+
incomplete light theme. The preset and theme are
|
|
40
|
+
separate dimensions. Only `neutral` + `dark` is currently supplied.
|
|
41
|
+
|
|
42
|
+
## Inspect names and decisions
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { tokenNames, type TokenName } from "@flood-md/tokens/foundations";
|
|
46
|
+
|
|
47
|
+
const role: TokenName = "sys.color.content.default";
|
|
48
|
+
const cssVariable = tokenNames[role]; // --flood-sys-color-content-default
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`foundations.manifest.json` describes public roles, types, status, usage limits,
|
|
52
|
+
resolved values, aliases and dependencies for each supplied context. Internal
|
|
53
|
+
reference tokens are absent from the TypeScript lookup and are not listed as
|
|
54
|
+
public manifest entries; alias/dependency metadata can still name their IDs.
|
|
55
|
+
`neutral.dark.tokens.json` is a resolved diagnostic DTCG document including the
|
|
56
|
+
internal reference graph's values. Internal names are not customization promises.
|
|
57
|
+
|
|
58
|
+
The dark profile covers surfaces, content, filled primary/subtle actions,
|
|
59
|
+
contextual ghost actions, field and feedback colors, focus, typography, spacing,
|
|
60
|
+
radii, control sizing, motion and local stacking levels. Subtle content is for
|
|
61
|
+
short supplementary metadata, not a universal small-body-text color or an
|
|
62
|
+
automatic APCA pass. Required small helper text uses `sys.color.content.helper`.
|
|
63
|
+
|
|
64
|
+
### Role families
|
|
65
|
+
|
|
66
|
+
All IDs below have the `sys.` prefix; CSS names replace dots with hyphens and
|
|
67
|
+
prepend `--flood-`. The generated typed lookup is the complete contract.
|
|
68
|
+
|
|
69
|
+
| Family | Roles |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| `font` | `sans` (Inter, Arial, sans-serif), `mono` |
|
|
72
|
+
| `type` | `display`, `lead`, `large`, `page`, `section`, `body`, `compact`, `label`, `helper`, `control`; each has `size`, `line-height`, `weight`, `tracking` |
|
|
73
|
+
| `space` | `0`, `1`, `2`, `3`, `4`, `6`, `8`, `12`; one step = .25rem |
|
|
74
|
+
| `radius` | `field` 1rem, `block` 1.5rem, `surface` 2rem, `action` pill, `indicator` .375rem |
|
|
75
|
+
| `control` | `2xs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`; each has `height`, `text-size`, `line-height`, `padding-inline`, `icon-size`, `gap` |
|
|
76
|
+
| `size` | `touch`, `choice`, `switch-width`, `switch-height`, `switch-thumb`, `indicator.sm/md/lg`, `keycap.sm/md/lg`, `container.sm/md/lg`, `grid.min-item` |
|
|
77
|
+
| `color.action` | `primary`, `subtle`, `on-surface`, `ghost`; each has `rest`, `hover`, `pressed`, `content`, `disabled`, `disabled-content`; destructive action content has its own `danger.content` |
|
|
78
|
+
| `color.field` | `background`, `border`, `boundary`, `content`, `placeholder`, `disabled`, `disabled-content` |
|
|
79
|
+
| `color.feedback` | `error`, `success`, `warning`, `info` |
|
|
80
|
+
| `color.selection` | `background`, `content` |
|
|
81
|
+
| `focus`, `stroke` | Focus width/offset and decorative stroke width; independent of field validation |
|
|
82
|
+
| `scrollbar` | `size`, `inset`, `min-thumb`; thumb colors live under color.scrollbar |
|
|
83
|
+
| `color` | Surface/content, decorative border/divider, accent, focus, loading placeholder, indicator track/fill/accent and scrollbar rest/hover |
|
|
84
|
+
| `motion` | `duration-fast`, `duration-normal`, `duration-reduced`, `easing` |
|
|
85
|
+
| `layer` | `base`, `sticky`, `popover`, `modal`, `toast` |
|
|
86
|
+
|
|
87
|
+
### Inter typography
|
|
88
|
+
|
|
89
|
+
Size equivalents assume a 16px root for illustration. Flood does not set the
|
|
90
|
+
host's root font size. Sizes use rem, line heights use ratios and tracking uses
|
|
91
|
+
em. Font weights are 400/500. The React stylesheet bundles the Inter variable
|
|
92
|
+
normal/italic fonts and their SIL Open Font License; it loads locally from the installed package.
|
|
93
|
+
The token-only stylesheet does not load fonts: token-only consumers supply
|
|
94
|
+
their own font setup with Latin/Cyrillic coverage as needed. Fallback metrics
|
|
95
|
+
can differ.
|
|
96
|
+
|
|
97
|
+
| Role | Size / line height | Weight | Tracking |
|
|
98
|
+
| --- | --- | --- | --- |
|
|
99
|
+
| display | 88 / 98.56 | 500 | -.04em |
|
|
100
|
+
| lead | 22 / 31.9 | 400 | -.01em |
|
|
101
|
+
| large | 32 / 40 | 500 | -.02em |
|
|
102
|
+
| page | 24 / 32 | 500 | -.02em |
|
|
103
|
+
| section | 20 / 28 | 500 | -.015em |
|
|
104
|
+
| body | 16 / 24 | 400 | -.01em |
|
|
105
|
+
| compact | 14 / 20 | 400 | -.01em |
|
|
106
|
+
| label | 13 / 18 | 400 | -.01em |
|
|
107
|
+
| helper | 12 / 18 | 400 | -.01em |
|
|
108
|
+
| control | 14 / 20 | 500 | -.005em |
|
|
109
|
+
|
|
110
|
+
Control heights are 24/28/32/40/44/48/56px equivalents. Their icon sizes are
|
|
111
|
+
14/16/16/20/20/24/24px equivalents. These are minimum visual heights, not fixed
|
|
112
|
+
clipping boxes. Touch target size, neighboring targets, long translations and
|
|
113
|
+
increased text spacing require separate checks. Small controls are not ordinary
|
|
114
|
+
text-field defaults.
|
|
115
|
+
|
|
116
|
+
### Boundaries, focus and motion
|
|
117
|
+
|
|
118
|
+
Version 0.2.3 uses the quiet `color.field.border` (#383838), matching the
|
|
119
|
+
container-outline tone, for ordinary Input, Textarea, Select, unchecked choices,
|
|
120
|
+
Switch and outline Button borders. It is one uniform perimeter, with no extra
|
|
121
|
+
bottom edge or inset contour. The stronger `color.field.boundary` (#8a8a8a)
|
|
122
|
+
remains available for an explicit contrast requirement; it is not the default.
|
|
123
|
+
|
|
124
|
+
The quiet outline and field fill do not reach 3:1 against neighboring dark
|
|
125
|
+
surfaces. This visual profile therefore does not establish WCAG 1.4.11 compliance
|
|
126
|
+
for controls whose recognition depends on those signals. Preserve labels and
|
|
127
|
+
evaluate the complete host composition; use a stronger role when required.
|
|
128
|
+
Text contrast and APCA guidance remain separate from outline styling.
|
|
129
|
+
|
|
130
|
+
A host can opt into stronger fields without overriding the independent focus role:
|
|
131
|
+
|
|
132
|
+
```css
|
|
133
|
+
/* Import after the Flood stylesheet; apply this attribute to FloodRoot. */
|
|
134
|
+
.flood-root[data-control-contrast="strong"] {
|
|
135
|
+
--flood-sys-color-field-border: var(--flood-sys-color-field-boundary);
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Error, selected and focus
|
|
140
|
+
states need semantic markup and a visible cue beyond color where applicable.
|
|
141
|
+
|
|
142
|
+
Focus uses `focus.width` 2px and `focus.offset` 0px. `color.focus.ring` currently
|
|
143
|
+
uses provisional pink #ff5ca8; it is configurable and is not a finalized brand
|
|
144
|
+
palette. It must remain visible when error or selected styles are present.
|
|
145
|
+
Color-pair tests cover supplied dark surfaces; these are not a whole-component
|
|
146
|
+
WCAG or APCA conformance claim. Validate text role, size and weight together.
|
|
147
|
+
|
|
148
|
+
For example, APCA `apca-w3` 0.1.9 gives white text on canvas Lc −106.77,
|
|
149
|
+
helper #ededed on canvas Lc −95.00 (overlay: −91.00), and subtle #b2b2b2 on
|
|
150
|
+
overlay Lc −55.54. These values do not certify the 12px/400 helper recipe:
|
|
151
|
+
that version's font lookup recommends approximately 15.5px at weight 400 for
|
|
152
|
+
Lc 95. Small helper text is a compact supporting role; provide readable main
|
|
153
|
+
instructions and validate the actual content, device and enlargement behavior.
|
|
154
|
+
Do not use subtle text or feedback accent colors for small required instructions
|
|
155
|
+
merely because a WCAG color-pair calculation passes.
|
|
156
|
+
|
|
157
|
+
Motion values are an initial interaction recipe: 100ms fast, 160ms normal,
|
|
158
|
+
0ms reduced, with state easing. Consumers must apply the reduced value under
|
|
159
|
+
`prefers-reduced-motion: reduce` and avoid relying on motion to convey state.
|
|
160
|
+
Layer values express local order only; they do not implement portals, trapping
|
|
161
|
+
focus, dismissal, scroll locking or an overlay stack.
|
|
162
|
+
|
|
163
|
+
## Override and scope
|
|
164
|
+
|
|
165
|
+
Override a public `sys` variable on its scope element, using inline styles or a
|
|
166
|
+
stylesheet loaded afterward. Aliases remain CSS `var()` references. Nested
|
|
167
|
+
scopes repeat both attributes so dependent aliases resolve against the nested
|
|
168
|
+
values rather than inheriting already computed aliases from the parent.
|
|
169
|
+
|
|
170
|
+
Arbitrary descendant overrides without a new scope are not supported. Portal
|
|
171
|
+
containers must explicitly receive the same scope attributes and overrides.
|
|
172
|
+
Changing an internal `ref` value is useful for diagnostics but not a stable API.
|
|
173
|
+
|
|
174
|
+
## Source and compiler profile
|
|
175
|
+
|
|
176
|
+
Only `packages/tokens/src/tokens.json` authors values. Its versioned Flood
|
|
177
|
+
envelope contains `legacy`, `sets.shared`, `sets.palette`, `sets.theme` and
|
|
178
|
+
`presets`. This envelope is not itself a DTCG Format document. Sets contain
|
|
179
|
+
nested tokens with explicit `$type`, `$value`, `$description` and `md.flood`
|
|
180
|
+
metadata. Build artifacts are generated and must not be edited.
|
|
181
|
+
|
|
182
|
+
The first compiler profile supports sRGB color, nonnegative px/rem dimension,
|
|
183
|
+
signed em dimension (for tracking),
|
|
184
|
+
ms/s duration, finite number, numeric fontWeight, fontFamily and cubicBezier.
|
|
185
|
+
Aliases refer to whole tokens using `{sys.color.content.default}` syntax.
|
|
186
|
+
Composite types, JSON Pointer references, group inheritance, density modifiers,
|
|
187
|
+
other color spaces and the full DTCG Resolver API are not supported; unsupported
|
|
188
|
+
input fails instead of being silently coerced. This is not a full DTCG
|
|
189
|
+
implementation or a claim of accessibility conformance.
|
|
190
|
+
|
|
191
|
+
Build rejects missing/cyclic references, mismatched types, overlapping sets,
|
|
192
|
+
invalid names and CSS-name collisions, disallowed layer dependencies,
|
|
193
|
+
cross-component aliases, and stable-to-experimental dependencies. All supplied
|
|
194
|
+
contexts must expose the same public role/type contract. Palette/reference
|
|
195
|
+
values are fixed; themes choose roles instead of changing reference values.
|
|
196
|
+
|
|
197
|
+
## Compatibility
|
|
198
|
+
|
|
199
|
+
Existing `@flood-md/tokens` JSON and `tokens.css` retain their shared/light/dark
|
|
200
|
+
contract and `--flood-*` names. Existing React controls outside `FloodRoot` keep
|
|
201
|
+
using those tokens; old custom overrides continue to apply there. Inside
|
|
202
|
+
`FloodRoot`, the dark foundation roles control the component recipe. Legacy
|
|
203
|
+
overrides do not automatically override separately scoped foundation roles.
|
|
204
|
+
|
|
205
|
+
Version 0.2.2 adds these exports without replacing an existing npm version.
|
|
206
|
+
Publication must be verified separately; source version numbers are not proof.
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
Version 0.2.5 adds twenty-five semantic roles, bringing the dark profile
|
|
210
|
+
to 193 roles. Existing role values remain unchanged:
|
|
211
|
+
|
|
212
|
+
- sys.color.accent.content and sys.color.loading.placeholder separate accent text
|
|
213
|
+
and loading fills from focus and action states.
|
|
214
|
+
- sys.color.indicator.track/fill/accent and sys.size.indicator.sm/md/lg control
|
|
215
|
+
bounded indicators without borrowing control or focus roles.
|
|
216
|
+
- sys.color.action.danger.content styles destructive actions independently from
|
|
217
|
+
validation messages and keyboard focus.
|
|
218
|
+
|
|
219
|
+
- sys.size.keycap.sm/md/lg provide independent relative heights for keyboard hints.
|
|
220
|
+
|
|
221
|
+
- sys.size.container.sm/md/lg and sys.size.grid.min-item supply relative layout bounds.
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
The 0.2.5 separates floating surfaces from modal surfaces.
|
|
225
|
+
The floating material uses nine of those new semantic roles; previous token
|
|
226
|
+
values remain intact. surface.floating is the opaque fallback;
|
|
227
|
+
surface.floating-translucent, border.floating, selection.floating, shadow.floating
|
|
228
|
+
and effect.floating blur/saturation/shadow-offset/shadow-blur define the floating
|
|
229
|
+
material. Select, Combobox, MultiSelect, Menu, Popover and Tooltip share it; Dialog
|
|
230
|
+
and Drawer retain surface.overlay. Backdrop filtering is progressive enhancement;
|
|
231
|
+
reduced transparency uses the opaque fill and forced colors use system colors.
|
|
232
|
+
Keep text opaque and evaluate it against the actual composited background.
|