@misoto22/folio 0.0.0 → 0.17.0
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/AGENTS.md +88 -0
- package/CLAUDE.md +1 -0
- package/LICENSE +21 -0
- package/README.md +208 -2
- package/bin/folio-design.mjs +277 -0
- package/bin/migrate-legacy.mjs +81 -0
- package/dist/agent/Accordion.md +65 -0
- package/dist/agent/Actions.md +49 -0
- package/dist/agent/Alert.md +65 -0
- package/dist/agent/AppShell.md +69 -0
- package/dist/agent/ArchitectureFigure.md +72 -0
- package/dist/agent/AreaChart.md +94 -0
- package/dist/agent/Article.md +65 -0
- package/dist/agent/AspectRatio.md +58 -0
- package/dist/agent/Avatar.md +53 -0
- package/dist/agent/Badge.md +62 -0
- package/dist/agent/BarChart.md +93 -0
- package/dist/agent/BarList.md +67 -0
- package/dist/agent/BigNumber.md +70 -0
- package/dist/agent/BoxPlot.md +82 -0
- package/dist/agent/Breadcrumb.md +55 -0
- package/dist/agent/BulletChart.md +71 -0
- package/dist/agent/Button.md +81 -0
- package/dist/agent/Calendar.md +77 -0
- package/dist/agent/CalendarHeatmap.md +75 -0
- package/dist/agent/Card.md +72 -0
- package/dist/agent/Checkbox.md +57 -0
- package/dist/agent/Code.md +51 -0
- package/dist/agent/CodeBlock.md +77 -0
- package/dist/agent/Collapsible.md +68 -0
- package/dist/agent/Collection.md +169 -0
- package/dist/agent/ColorPicker.md +76 -0
- package/dist/agent/Combobox.md +77 -0
- package/dist/agent/Command.md +122 -0
- package/dist/agent/ComposedChart.md +82 -0
- package/dist/agent/Contact.md +90 -0
- package/dist/agent/Content.md +70 -0
- package/dist/agent/ContextMenu.md +93 -0
- package/dist/agent/Conversation.md +247 -0
- package/dist/agent/DataflowFigure.md +49 -0
- package/dist/agent/DatePicker.md +104 -0
- package/dist/agent/DescriptionList.md +69 -0
- package/dist/agent/Diagram.md +71 -0
- package/dist/agent/DiagramCanvas.md +71 -0
- package/dist/agent/DiagramExportMenu.md +65 -0
- package/dist/agent/DiagramInspector.md +73 -0
- package/dist/agent/DiagramLegend.md +56 -0
- package/dist/agent/DiagramMinimap.md +69 -0
- package/dist/agent/DiagramToolbar.md +70 -0
- package/dist/agent/Dialog.md +76 -0
- package/dist/agent/DropdownMenu.md +110 -0
- package/dist/agent/EmptyState.md +63 -0
- package/dist/agent/ErrorState.md +67 -0
- package/dist/agent/Evidence.md +165 -0
- package/dist/agent/Facet.md +107 -0
- package/dist/agent/Field.md +79 -0
- package/dist/agent/FigureBand.md +49 -0
- package/dist/agent/FloatingIconButton.md +61 -0
- package/dist/agent/FunnelChart.md +75 -0
- package/dist/agent/Heading.md +65 -0
- package/dist/agent/Heatmap.md +78 -0
- package/dist/agent/Histogram.md +88 -0
- package/dist/agent/Input.md +52 -0
- package/dist/agent/Kbd.md +48 -0
- package/dist/agent/LifecycleFigure.md +50 -0
- package/dist/agent/LineChart.md +85 -0
- package/dist/agent/LinkArrow.md +49 -0
- package/dist/agent/Markdown.md +69 -0
- package/dist/agent/Media.md +261 -0
- package/dist/agent/Metric.md +70 -0
- package/dist/agent/Metrics.md +114 -0
- package/dist/agent/Music.md +86 -0
- package/dist/agent/NativeSelect.md +62 -0
- package/dist/agent/NavItem.md +56 -0
- package/dist/agent/NumberField.md +73 -0
- package/dist/agent/PageHeader.md +69 -0
- package/dist/agent/Pagination.md +70 -0
- package/dist/agent/PieChart.md +80 -0
- package/dist/agent/Popover.md +80 -0
- package/dist/agent/Portfolio.md +93 -0
- package/dist/agent/PortfolioIndex.md +34 -0
- package/dist/agent/Progress.md +58 -0
- package/dist/agent/RadarChart.md +79 -0
- package/dist/agent/RadialChart.md +81 -0
- package/dist/agent/RadioGroup.md +66 -0
- package/dist/agent/Reading.md +233 -0
- package/dist/agent/Recovery.md +72 -0
- package/dist/agent/SankeyChart.md +85 -0
- package/dist/agent/ScatterChart.md +80 -0
- package/dist/agent/ScrollArea.md +62 -0
- package/dist/agent/SearchPalette.md +51 -0
- package/dist/agent/SearchableMenu.md +69 -0
- package/dist/agent/Select.md +102 -0
- package/dist/agent/Separator.md +60 -0
- package/dist/agent/SequenceFigure.md +51 -0
- package/dist/agent/Sheet.md +82 -0
- package/dist/agent/Sidebar.md +194 -0
- package/dist/agent/SiteNavigation.md +62 -0
- package/dist/agent/SiteShell.md +67 -0
- package/dist/agent/Skeleton.md +96 -0
- package/dist/agent/Slider.md +67 -0
- package/dist/agent/Sparkline.md +68 -0
- package/dist/agent/Spinner.md +62 -0
- package/dist/agent/StatusDot.md +56 -0
- package/dist/agent/StatusPill.md +55 -0
- package/dist/agent/Steps.md +68 -0
- package/dist/agent/Switch.md +50 -0
- package/dist/agent/Table.md +111 -0
- package/dist/agent/Tabs.md +71 -0
- package/dist/agent/Tag.md +67 -0
- package/dist/agent/Text.md +66 -0
- package/dist/agent/Textarea.md +46 -0
- package/dist/agent/Timeline.md +114 -0
- package/dist/agent/Timestamp.md +65 -0
- package/dist/agent/Toast.md +51 -0
- package/dist/agent/ToggleGroup.md +67 -0
- package/dist/agent/Toolbar.md +72 -0
- package/dist/agent/Tooltip.md +74 -0
- package/dist/agent/TreemapChart.md +76 -0
- package/dist/agent/WaterfallChart.md +86 -0
- package/dist/agent/Workbench.md +142 -0
- package/dist/agent/WorkflowFigure.md +51 -0
- package/dist/agent/catalog.json +8055 -0
- package/dist/agent/index.md +185 -0
- package/dist/article.css +407 -0
- package/dist/charts/AreaChart/AreaChart.d.ts +198 -0
- package/dist/charts/AreaChart/AreaChart.js +479 -0
- package/dist/charts/AreaChart/AreaChart.js.map +1 -0
- package/dist/charts/BarChart/BarChart.d.ts +190 -0
- package/dist/charts/BarChart/BarChart.js +599 -0
- package/dist/charts/BarChart/BarChart.js.map +1 -0
- package/dist/charts/BarList/BarList.d.ts +65 -0
- package/dist/charts/BarList/BarList.js +79 -0
- package/dist/charts/BarList/BarList.js.map +1 -0
- package/dist/charts/BigNumber/BigNumber.d.ts +72 -0
- package/dist/charts/BigNumber/BigNumber.js +51 -0
- package/dist/charts/BigNumber/BigNumber.js.map +1 -0
- package/dist/charts/BoxPlot/BoxPlot.d.ts +177 -0
- package/dist/charts/BoxPlot/BoxPlot.js +497 -0
- package/dist/charts/BoxPlot/BoxPlot.js.map +1 -0
- package/dist/charts/BulletChart/BulletChart.d.ts +100 -0
- package/dist/charts/BulletChart/BulletChart.js +197 -0
- package/dist/charts/BulletChart/BulletChart.js.map +1 -0
- package/dist/charts/CalendarHeatmap/CalendarHeatmap.d.ts +106 -0
- package/dist/charts/CalendarHeatmap/CalendarHeatmap.js +103 -0
- package/dist/charts/CalendarHeatmap/CalendarHeatmap.js.map +1 -0
- package/dist/charts/ComposedChart/ComposedChart.d.ts +178 -0
- package/dist/charts/ComposedChart/ComposedChart.js +667 -0
- package/dist/charts/ComposedChart/ComposedChart.js.map +1 -0
- package/dist/charts/Facet/Facet.d.ts +240 -0
- package/dist/charts/Facet/Facet.js +133 -0
- package/dist/charts/Facet/Facet.js.map +1 -0
- package/dist/charts/Facet/panels.d.ts +187 -0
- package/dist/charts/Facet/panels.js +203 -0
- package/dist/charts/Facet/panels.js.map +1 -0
- package/dist/charts/FunnelChart/FunnelChart.d.ts +106 -0
- package/dist/charts/FunnelChart/FunnelChart.js +137 -0
- package/dist/charts/FunnelChart/FunnelChart.js.map +1 -0
- package/dist/charts/Heatmap/Heatmap.d.ts +101 -0
- package/dist/charts/Heatmap/Heatmap.js +125 -0
- package/dist/charts/Heatmap/Heatmap.js.map +1 -0
- package/dist/charts/Histogram/Histogram.d.ts +188 -0
- package/dist/charts/Histogram/Histogram.js +382 -0
- package/dist/charts/Histogram/Histogram.js.map +1 -0
- package/dist/charts/LineChart/LineChart.d.ts +174 -0
- package/dist/charts/LineChart/LineChart.js +485 -0
- package/dist/charts/LineChart/LineChart.js.map +1 -0
- package/dist/charts/PieChart/PieChart.d.ts +140 -0
- package/dist/charts/PieChart/PieChart.js +317 -0
- package/dist/charts/PieChart/PieChart.js.map +1 -0
- package/dist/charts/RadarChart/RadarChart.d.ts +135 -0
- package/dist/charts/RadarChart/RadarChart.js +303 -0
- package/dist/charts/RadarChart/RadarChart.js.map +1 -0
- package/dist/charts/RadialChart/RadialChart.d.ts +142 -0
- package/dist/charts/RadialChart/RadialChart.js +279 -0
- package/dist/charts/RadialChart/RadialChart.js.map +1 -0
- package/dist/charts/SankeyChart/SankeyChart.d.ts +149 -0
- package/dist/charts/SankeyChart/SankeyChart.js +509 -0
- package/dist/charts/SankeyChart/SankeyChart.js.map +1 -0
- package/dist/charts/ScatterChart/ScatterChart.d.ts +149 -0
- package/dist/charts/ScatterChart/ScatterChart.js +275 -0
- package/dist/charts/ScatterChart/ScatterChart.js.map +1 -0
- package/dist/charts/Sparkline/Sparkline.d.ts +53 -0
- package/dist/charts/Sparkline/Sparkline.js +95 -0
- package/dist/charts/Sparkline/Sparkline.js.map +1 -0
- package/dist/charts/TreemapChart/TreemapChart.d.ts +98 -0
- package/dist/charts/TreemapChart/TreemapChart.js +127 -0
- package/dist/charts/TreemapChart/TreemapChart.js.map +1 -0
- package/dist/charts/WaterfallChart/WaterfallChart.d.ts +164 -0
- package/dist/charts/WaterfallChart/WaterfallChart.js +321 -0
- package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -0
- package/dist/charts/index.d.ts +43 -0
- package/dist/charts/index.js +130 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/charts/lib/annotations.d.ts +103 -0
- package/dist/charts/lib/annotations.js +99 -0
- package/dist/charts/lib/annotations.js.map +1 -0
- package/dist/charts/lib/axis.d.ts +18 -0
- package/dist/charts/lib/axis.js +21 -0
- package/dist/charts/lib/axis.js.map +1 -0
- package/dist/charts/lib/background.d.ts +33 -0
- package/dist/charts/lib/background.js +173 -0
- package/dist/charts/lib/background.js.map +1 -0
- package/dist/charts/lib/brush.d.ts +94 -0
- package/dist/charts/lib/brush.js +535 -0
- package/dist/charts/lib/brush.js.map +1 -0
- package/dist/charts/lib/chart.d.ts +94 -0
- package/dist/charts/lib/chart.js +149 -0
- package/dist/charts/lib/chart.js.map +1 -0
- package/dist/charts/lib/dot.d.ts +29 -0
- package/dist/charts/lib/dot.js +78 -0
- package/dist/charts/lib/dot.js.map +1 -0
- package/dist/charts/lib/empty.d.ts +31 -0
- package/dist/charts/lib/empty.js +24 -0
- package/dist/charts/lib/empty.js.map +1 -0
- package/dist/charts/lib/export.d.ts +94 -0
- package/dist/charts/lib/export.js +62 -0
- package/dist/charts/lib/export.js.map +1 -0
- package/dist/charts/lib/figure.d.ts +81 -0
- package/dist/charts/lib/figure.js +62 -0
- package/dist/charts/lib/figure.js.map +1 -0
- package/dist/charts/lib/format.d.ts +46 -0
- package/dist/charts/lib/format.js +56 -0
- package/dist/charts/lib/format.js.map +1 -0
- package/dist/charts/lib/legend.d.ts +45 -0
- package/dist/charts/lib/legend.js +117 -0
- package/dist/charts/lib/legend.js.map +1 -0
- package/dist/charts/lib/loading.d.ts +48 -0
- package/dist/charts/lib/loading.js +105 -0
- package/dist/charts/lib/loading.js.map +1 -0
- package/dist/charts/lib/paint.d.ts +154 -0
- package/dist/charts/lib/paint.js +551 -0
- package/dist/charts/lib/paint.js.map +1 -0
- package/dist/charts/lib/scale.d.ts +23 -0
- package/dist/charts/lib/scale.js +13 -0
- package/dist/charts/lib/scale.js.map +1 -0
- package/dist/charts/lib/selection.d.ts +20 -0
- package/dist/charts/lib/selection.js +18 -0
- package/dist/charts/lib/selection.js.map +1 -0
- package/dist/charts/lib/sonify-control.d.ts +163 -0
- package/dist/charts/lib/sonify-control.js +172 -0
- package/dist/charts/lib/sonify-control.js.map +1 -0
- package/dist/charts/lib/sonify.d.ts +248 -0
- package/dist/charts/lib/sonify.js +262 -0
- package/dist/charts/lib/sonify.js.map +1 -0
- package/dist/charts/lib/toolbar.d.ts +144 -0
- package/dist/charts/lib/toolbar.js +156 -0
- package/dist/charts/lib/toolbar.js.map +1 -0
- package/dist/charts/lib/tooltip.d.ts +59 -0
- package/dist/charts/lib/tooltip.js +135 -0
- package/dist/charts/lib/tooltip.js.map +1 -0
- package/dist/charts/lib/values.d.ts +56 -0
- package/dist/charts/lib/values.js +71 -0
- package/dist/charts/lib/values.js.map +1 -0
- package/dist/charts/lib/zoom.d.ts +139 -0
- package/dist/charts/lib/zoom.js +314 -0
- package/dist/charts/lib/zoom.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts +34 -0
- package/dist/components/Accordion/Accordion.js +43 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Alert/Alert.d.ts +32 -0
- package/dist/components/Alert/Alert.js +49 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/AppShell/AppShell.d.ts +58 -0
- package/dist/components/AppShell/AppShell.js +126 -0
- package/dist/components/AppShell/AppShell.js.map +1 -0
- package/dist/components/Article/Article.d.ts +58 -0
- package/dist/components/Article/Article.js +34 -0
- package/dist/components/Article/Article.js.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +46 -0
- package/dist/components/AspectRatio/AspectRatio.js +33 -0
- package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +38 -0
- package/dist/components/Avatar/Avatar.js +44 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +30 -0
- package/dist/components/Badge/Badge.js +29 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +37 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +46 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/Button/Button.d.ts +70 -0
- package/dist/components/Button/Button.js +95 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Calendar/Calendar.d.ts +54 -0
- package/dist/components/Calendar/Calendar.js +369 -0
- package/dist/components/Calendar/Calendar.js.map +1 -0
- package/dist/components/Card/Card.d.ts +55 -0
- package/dist/components/Card/Card.js +64 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +26 -0
- package/dist/components/Checkbox/Checkbox.js +34 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Code/Code.d.ts +30 -0
- package/dist/components/Code/Code.js +21 -0
- package/dist/components/Code/Code.js.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +145 -0
- package/dist/components/CodeBlock/CodeBlock.js +114 -0
- package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
- package/dist/components/Collapsible/Collapsible.d.ts +45 -0
- package/dist/components/Collapsible/Collapsible.js +60 -0
- package/dist/components/Collapsible/Collapsible.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +67 -0
- package/dist/components/ColorPicker/ColorPicker.js +334 -0
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +77 -0
- package/dist/components/Combobox/Combobox.js +170 -0
- package/dist/components/Combobox/Combobox.js.map +1 -0
- package/dist/components/Command/Command.d.ts +125 -0
- package/dist/components/Command/Command.js +204 -0
- package/dist/components/Command/Command.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +63 -0
- package/dist/components/ContextMenu/ContextMenu.js +109 -0
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +130 -0
- package/dist/components/DatePicker/DatePicker.js +257 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +73 -0
- package/dist/components/DescriptionList/DescriptionList.js +35 -0
- package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
- package/dist/components/Diagram/Diagram.d.ts +86 -0
- package/dist/components/Diagram/Diagram.js +211 -0
- package/dist/components/Diagram/Diagram.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +63 -0
- package/dist/components/Dialog/Dialog.js +90 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +87 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +120 -0
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +55 -0
- package/dist/components/EmptyState/EmptyState.js +32 -0
- package/dist/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/ErrorState/ErrorState.d.ts +55 -0
- package/dist/components/ErrorState/ErrorState.js +41 -0
- package/dist/components/ErrorState/ErrorState.js.map +1 -0
- package/dist/components/Field/Field.d.ts +111 -0
- package/dist/components/Field/Field.js +95 -0
- package/dist/components/Field/Field.js.map +1 -0
- package/dist/components/Field/field-control.d.ts +31 -0
- package/dist/components/Field/field-control.js +12 -0
- package/dist/components/Field/field-control.js.map +1 -0
- package/dist/components/FigureBand/FigureBand.d.ts +31 -0
- package/dist/components/FigureBand/FigureBand.js +51 -0
- package/dist/components/FigureBand/FigureBand.js.map +1 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.d.ts +29 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.js +34 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.js.map +1 -0
- package/dist/components/Heading/Heading.d.ts +62 -0
- package/dist/components/Heading/Heading.js +44 -0
- package/dist/components/Heading/Heading.js.map +1 -0
- package/dist/components/Input/Input.d.ts +22 -0
- package/dist/components/Input/Input.js +21 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Kbd/Kbd.d.ts +27 -0
- package/dist/components/Kbd/Kbd.js +21 -0
- package/dist/components/Kbd/Kbd.js.map +1 -0
- package/dist/components/LinkArrow/LinkArrow.d.ts +24 -0
- package/dist/components/LinkArrow/LinkArrow.js +24 -0
- package/dist/components/LinkArrow/LinkArrow.js.map +1 -0
- package/dist/components/Markdown/Markdown.d.ts +139 -0
- package/dist/components/Markdown/Markdown.js +135 -0
- package/dist/components/Markdown/Markdown.js.map +1 -0
- package/dist/components/Markdown/inline.d.ts +29 -0
- package/dist/components/Markdown/inline.js +74 -0
- package/dist/components/Markdown/inline.js.map +1 -0
- package/dist/components/Markdown/nodes.d.ts +65 -0
- package/dist/components/Markdown/nodes.js +1 -0
- package/dist/components/Markdown/nodes.js.map +1 -0
- package/dist/components/Markdown/parse.d.ts +24 -0
- package/dist/components/Markdown/parse.js +110 -0
- package/dist/components/Markdown/parse.js.map +1 -0
- package/dist/components/Markdown/slug.d.ts +15 -0
- package/dist/components/Markdown/slug.js +7 -0
- package/dist/components/Markdown/slug.js.map +1 -0
- package/dist/components/Metric/Metric.d.ts +61 -0
- package/dist/components/Metric/Metric.js +51 -0
- package/dist/components/Metric/Metric.js.map +1 -0
- package/dist/components/NativeSelect/NativeSelect.d.ts +33 -0
- package/dist/components/NativeSelect/NativeSelect.js +44 -0
- package/dist/components/NativeSelect/NativeSelect.js.map +1 -0
- package/dist/components/NavItem/NavItem.d.ts +39 -0
- package/dist/components/NavItem/NavItem.js +31 -0
- package/dist/components/NavItem/NavItem.js.map +1 -0
- package/dist/components/NumberField/NumberField.d.ts +69 -0
- package/dist/components/NumberField/NumberField.js +162 -0
- package/dist/components/NumberField/NumberField.js.map +1 -0
- package/dist/components/PageHeader/PageHeader.d.ts +92 -0
- package/dist/components/PageHeader/PageHeader.js +37 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +67 -0
- package/dist/components/Pagination/Pagination.js +112 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +39 -0
- package/dist/components/Popover/Popover.js +57 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Progress/Progress.d.ts +43 -0
- package/dist/components/Progress/Progress.js +57 -0
- package/dist/components/Progress/Progress.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +49 -0
- package/dist/components/RadioGroup/RadioGroup.js +53 -0
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +46 -0
- package/dist/components/ScrollArea/ScrollArea.js +54 -0
- package/dist/components/ScrollArea/ScrollArea.js.map +1 -0
- package/dist/components/SearchableMenu/SearchableMenu.d.ts +68 -0
- package/dist/components/SearchableMenu/SearchableMenu.js +101 -0
- package/dist/components/SearchableMenu/SearchableMenu.js.map +1 -0
- package/dist/components/Select/Select.d.ts +87 -0
- package/dist/components/Select/Select.js +130 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Separator/Separator.d.ts +48 -0
- package/dist/components/Separator/Separator.js +43 -0
- package/dist/components/Separator/Separator.js.map +1 -0
- package/dist/components/Sheet/Sheet.d.ts +43 -0
- package/dist/components/Sheet/Sheet.js +79 -0
- package/dist/components/Sheet/Sheet.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +357 -0
- package/dist/components/Sidebar/Sidebar.js +447 -0
- package/dist/components/Sidebar/Sidebar.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +70 -0
- package/dist/components/Skeleton/Skeleton.js +44 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Slider/Slider.d.ts +74 -0
- package/dist/components/Slider/Slider.js +143 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Spinner/Spinner.d.ts +58 -0
- package/dist/components/Spinner/Spinner.js +49 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/StatusDot/StatusDot.d.ts +29 -0
- package/dist/components/StatusDot/StatusDot.js +44 -0
- package/dist/components/StatusDot/StatusDot.js.map +1 -0
- package/dist/components/StatusPill/StatusPill.d.ts +30 -0
- package/dist/components/StatusPill/StatusPill.js +37 -0
- package/dist/components/StatusPill/StatusPill.js.map +1 -0
- package/dist/components/Steps/Steps.d.ts +65 -0
- package/dist/components/Steps/Steps.js +25 -0
- package/dist/components/Steps/Steps.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +23 -0
- package/dist/components/Switch/Switch.js +23 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Table/Table.d.ts +116 -0
- package/dist/components/Table/Table.js +137 -0
- package/dist/components/Table/Table.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +37 -0
- package/dist/components/Tabs/Tabs.js +205 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tag/Tag.d.ts +87 -0
- package/dist/components/Tag/Tag.js +62 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Text/Text.d.ts +62 -0
- package/dist/components/Text/Text.js +30 -0
- package/dist/components/Text/Text.js.map +1 -0
- package/dist/components/Textarea/Textarea.d.ts +20 -0
- package/dist/components/Textarea/Textarea.js +32 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Timestamp/Timestamp.d.ts +59 -0
- package/dist/components/Timestamp/Timestamp.js +56 -0
- package/dist/components/Timestamp/Timestamp.js.map +1 -0
- package/dist/components/Toast/Toast.d.ts +32 -0
- package/dist/components/Toast/Toast.js +64 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +46 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +88 -0
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -0
- package/dist/components/Toolbar/Toolbar.d.ts +55 -0
- package/dist/components/Toolbar/Toolbar.js +43 -0
- package/dist/components/Toolbar/Toolbar.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +43 -0
- package/dist/components/Tooltip/Tooltip.js +40 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.d.ts +55 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js +175 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js.map +1 -0
- package/dist/diagrams/DataflowFigure/DataflowFigure.d.ts +28 -0
- package/dist/diagrams/DataflowFigure/DataflowFigure.js +148 -0
- package/dist/diagrams/DataflowFigure/DataflowFigure.js.map +1 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.d.ts +78 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.js +229 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.js.map +1 -0
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.d.ts +106 -0
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js +123 -0
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js.map +1 -0
- package/dist/diagrams/DiagramInspector/DiagramInspector.d.ts +70 -0
- package/dist/diagrams/DiagramInspector/DiagramInspector.js +94 -0
- package/dist/diagrams/DiagramInspector/DiagramInspector.js.map +1 -0
- package/dist/diagrams/DiagramLegend/DiagramLegend.d.ts +42 -0
- package/dist/diagrams/DiagramLegend/DiagramLegend.js +35 -0
- package/dist/diagrams/DiagramLegend/DiagramLegend.js.map +1 -0
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.d.ts +77 -0
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.js +106 -0
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.js.map +1 -0
- package/dist/diagrams/DiagramToolbar/DiagramToolbar.d.ts +48 -0
- package/dist/diagrams/DiagramToolbar/DiagramToolbar.js +53 -0
- package/dist/diagrams/DiagramToolbar/DiagramToolbar.js.map +1 -0
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.d.ts +31 -0
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.js +234 -0
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.js.map +1 -0
- package/dist/diagrams/SequenceFigure/SequenceFigure.d.ts +38 -0
- package/dist/diagrams/SequenceFigure/SequenceFigure.js +261 -0
- package/dist/diagrams/SequenceFigure/SequenceFigure.js.map +1 -0
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.d.ts +36 -0
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.js +259 -0
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.js.map +1 -0
- package/dist/diagrams/index.d.ts +17 -0
- package/dist/diagrams/index.js +29 -0
- package/dist/diagrams/index.js.map +1 -0
- package/dist/diagrams/lib/dev.d.ts +61 -0
- package/dist/diagrams/lib/dev.js +96 -0
- package/dist/diagrams/lib/dev.js.map +1 -0
- package/dist/diagrams/lib/frame.d.ts +138 -0
- package/dist/diagrams/lib/frame.js +131 -0
- package/dist/diagrams/lib/frame.js.map +1 -0
- package/dist/diagrams/lib/geometry.d.ts +114 -0
- package/dist/diagrams/lib/geometry.js +113 -0
- package/dist/diagrams/lib/geometry.js.map +1 -0
- package/dist/diagrams/lib/legend.d.ts +32 -0
- package/dist/diagrams/lib/legend.js +84 -0
- package/dist/diagrams/lib/legend.js.map +1 -0
- package/dist/diagrams/lib/marks.d.ts +207 -0
- package/dist/diagrams/lib/marks.js +480 -0
- package/dist/diagrams/lib/marks.js.map +1 -0
- package/dist/diagrams/lib/route.d.ts +106 -0
- package/dist/diagrams/lib/route.js +201 -0
- package/dist/diagrams/lib/route.js.map +1 -0
- package/dist/diagrams/lib/wires.d.ts +59 -0
- package/dist/diagrams/lib/wires.js +94 -0
- package/dist/diagrams/lib/wires.js.map +1 -0
- package/dist/diagrams/spec.d.ts +405 -0
- package/dist/diagrams/spec.js +1 -0
- package/dist/diagrams/spec.js.map +1 -0
- package/dist/fonts/hanken-grotesk-300.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-400.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-500.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-600.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-700.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-400.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-500.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-600.woff2 +0 -0
- package/dist/fonts/newsreader-300.woff2 +0 -0
- package/dist/fonts/newsreader-400.woff2 +0 -0
- package/dist/fonts/newsreader-500.woff2 +0 -0
- package/dist/fonts/newsreader-600.woff2 +0 -0
- package/dist/fonts.css +96 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/keyframes.css +300 -0
- package/dist/lib/cn.d.ts +21 -0
- package/dist/lib/cn.js +9 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/color.d.ts +80 -0
- package/dist/lib/color.js +189 -0
- package/dist/lib/color.js.map +1 -0
- package/dist/lib/control.d.ts +32 -0
- package/dist/lib/control.js +14 -0
- package/dist/lib/control.js.map +1 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.js +11 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/numeric.d.ts +35 -0
- package/dist/lib/numeric.js +29 -0
- package/dist/lib/numeric.js.map +1 -0
- package/dist/lib/overlay-container.d.ts +48 -0
- package/dist/lib/overlay-container.js +15 -0
- package/dist/lib/overlay-container.js.map +1 -0
- package/dist/lib/slot-content.d.ts +8 -0
- package/dist/lib/slot-content.js +17 -0
- package/dist/lib/slot-content.js.map +1 -0
- package/dist/lib/step-rail.d.ts +45 -0
- package/dist/lib/step-rail.js +47 -0
- package/dist/lib/step-rail.js.map +1 -0
- package/dist/lib/svg-export.d.ts +138 -0
- package/dist/lib/svg-export.js +198 -0
- package/dist/lib/svg-export.js.map +1 -0
- package/dist/lib/useClipboardCopy.d.ts +30 -0
- package/dist/lib/useClipboardCopy.js +37 -0
- package/dist/lib/useClipboardCopy.js.map +1 -0
- package/dist/lib/useSelectionIndicator.d.ts +29 -0
- package/dist/lib/useSelectionIndicator.js +49 -0
- package/dist/lib/useSelectionIndicator.js.map +1 -0
- package/dist/lib/warn.d.ts +73 -0
- package/dist/lib/warn.js +38 -0
- package/dist/lib/warn.js.map +1 -0
- package/dist/semantic.css +200 -0
- package/dist/styles.css +98 -0
- package/dist/themes.css +607 -0
- package/dist/tokens/brand.d.ts +47 -0
- package/dist/tokens/brand.js +38 -0
- package/dist/tokens/brand.js.map +1 -0
- package/dist/tokens.css +666 -0
- package/dist/tokens.d.ts +205 -0
- package/dist/tokens.js +1056 -0
- package/dist/tokens.json +1055 -0
- package/dist/website/Actions/Actions.d.ts +34 -0
- package/dist/website/Actions/Actions.js +29 -0
- package/dist/website/Actions/Actions.js.map +1 -0
- package/dist/website/Collection/Collection.d.ts +128 -0
- package/dist/website/Collection/Collection.js +162 -0
- package/dist/website/Collection/Collection.js.map +1 -0
- package/dist/website/Contact/Contact.d.ts +87 -0
- package/dist/website/Contact/Contact.js +94 -0
- package/dist/website/Contact/Contact.js.map +1 -0
- package/dist/website/Content/CodePanel.d.ts +27 -0
- package/dist/website/Content/CodePanel.js +30 -0
- package/dist/website/Content/CodePanel.js.map +1 -0
- package/dist/website/Content/Content.d.ts +29 -0
- package/dist/website/Content/Content.js +38 -0
- package/dist/website/Content/Content.js.map +1 -0
- package/dist/website/Conversation/Conversation.d.ts +193 -0
- package/dist/website/Conversation/Conversation.js +252 -0
- package/dist/website/Conversation/Conversation.js.map +1 -0
- package/dist/website/Evidence/Evidence.d.ts +116 -0
- package/dist/website/Evidence/Evidence.js +142 -0
- package/dist/website/Evidence/Evidence.js.map +1 -0
- package/dist/website/Media/Media.d.ts +173 -0
- package/dist/website/Media/Media.js +225 -0
- package/dist/website/Media/Media.js.map +1 -0
- package/dist/website/Media/MediaLightbox.d.ts +18 -0
- package/dist/website/Media/MediaLightbox.js +38 -0
- package/dist/website/Media/MediaLightbox.js.map +1 -0
- package/dist/website/Metrics/Metrics.d.ts +74 -0
- package/dist/website/Metrics/Metrics.js +96 -0
- package/dist/website/Metrics/Metrics.js.map +1 -0
- package/dist/website/Music/Music.d.ts +60 -0
- package/dist/website/Music/Music.js +80 -0
- package/dist/website/Music/Music.js.map +1 -0
- package/dist/website/Portfolio/FrameLayout.d.ts +9 -0
- package/dist/website/Portfolio/FrameLayout.js +42 -0
- package/dist/website/Portfolio/FrameLayout.js.map +1 -0
- package/dist/website/Portfolio/Portfolio.d.ts +49 -0
- package/dist/website/Portfolio/Portfolio.js +66 -0
- package/dist/website/Portfolio/Portfolio.js.map +1 -0
- package/dist/website/Portfolio/QuestionCard.d.ts +22 -0
- package/dist/website/Portfolio/QuestionCard.js +33 -0
- package/dist/website/Portfolio/QuestionCard.js.map +1 -0
- package/dist/website/PortfolioIndex/PortfolioIndex.d.ts +21 -0
- package/dist/website/PortfolioIndex/PortfolioIndex.js +31 -0
- package/dist/website/PortfolioIndex/PortfolioIndex.js.map +1 -0
- package/dist/website/Reading/Reading.d.ts +203 -0
- package/dist/website/Reading/Reading.js +357 -0
- package/dist/website/Reading/Reading.js.map +1 -0
- package/dist/website/Recovery/Recovery.d.ts +39 -0
- package/dist/website/Recovery/Recovery.js +96 -0
- package/dist/website/Recovery/Recovery.js.map +1 -0
- package/dist/website/SearchPalette/SearchPalette.d.ts +59 -0
- package/dist/website/SearchPalette/SearchPalette.js +120 -0
- package/dist/website/SearchPalette/SearchPalette.js.map +1 -0
- package/dist/website/SiteNavigation/SiteNavigation.d.ts +46 -0
- package/dist/website/SiteNavigation/SiteNavigation.js +101 -0
- package/dist/website/SiteNavigation/SiteNavigation.js.map +1 -0
- package/dist/website/SiteShell/SiteShell.d.ts +45 -0
- package/dist/website/SiteShell/SiteShell.js +46 -0
- package/dist/website/SiteShell/SiteShell.js.map +1 -0
- package/dist/website/Timeline/Timeline.d.ts +80 -0
- package/dist/website/Timeline/Timeline.js +99 -0
- package/dist/website/Timeline/Timeline.js.map +1 -0
- package/dist/website/Workbench/Chronology.d.ts +32 -0
- package/dist/website/Workbench/Chronology.js +32 -0
- package/dist/website/Workbench/Chronology.js.map +1 -0
- package/dist/website/Workbench/ContactRow.d.ts +13 -0
- package/dist/website/Workbench/ContactRow.js +11 -0
- package/dist/website/Workbench/ContactRow.js.map +1 -0
- package/dist/website/Workbench/PhotoMosaic.d.ts +13 -0
- package/dist/website/Workbench/PhotoMosaic.js +15 -0
- package/dist/website/Workbench/PhotoMosaic.js.map +1 -0
- package/dist/website/Workbench/Reveal.d.ts +19 -0
- package/dist/website/Workbench/Reveal.js +29 -0
- package/dist/website/Workbench/Reveal.js.map +1 -0
- package/dist/website/Workbench/ToolStrip.d.ts +18 -0
- package/dist/website/Workbench/ToolStrip.js +15 -0
- package/dist/website/Workbench/ToolStrip.js.map +1 -0
- package/dist/website/Workbench/Workbench.d.ts +23 -0
- package/dist/website/Workbench/Workbench.js +22 -0
- package/dist/website/Workbench/Workbench.js.map +1 -0
- package/dist/website/Workbench/WorkbenchCard.d.ts +29 -0
- package/dist/website/Workbench/WorkbenchCard.js +21 -0
- package/dist/website/Workbench/WorkbenchCard.js.map +1 -0
- package/dist/website/Workbench/WorkbenchEntries.d.ts +22 -0
- package/dist/website/Workbench/WorkbenchEntries.js +24 -0
- package/dist/website/Workbench/WorkbenchEntries.js.map +1 -0
- package/dist/website/Workbench/WorkbenchFigure.d.ts +20 -0
- package/dist/website/Workbench/WorkbenchFigure.js +15 -0
- package/dist/website/Workbench/WorkbenchFigure.js.map +1 -0
- package/dist/website/Workbench/WorkbenchHero.d.ts +24 -0
- package/dist/website/Workbench/WorkbenchHero.js +24 -0
- package/dist/website/Workbench/WorkbenchHero.js.map +1 -0
- package/dist/website/Workbench/theme.d.ts +22 -0
- package/dist/website/Workbench/theme.js +12 -0
- package/dist/website/Workbench/theme.js.map +1 -0
- package/dist/website/index.d.ts +38 -0
- package/dist/website/index.js +32 -0
- package/dist/website/index.js.map +1 -0
- package/dist/website-actions.css +6 -0
- package/dist/website-base.css +46 -0
- package/dist/website-collection.css +89 -0
- package/dist/website-contact.css +29 -0
- package/dist/website-content.css +20 -0
- package/dist/website-controls.css +91 -0
- package/dist/website-conversation.css +115 -0
- package/dist/website-evidence.css +56 -0
- package/dist/website-media.css +227 -0
- package/dist/website-metrics.css +15 -0
- package/dist/website-music.css +27 -0
- package/dist/website-portfolio.css +94 -0
- package/dist/website-reading.css +159 -0
- package/dist/website-recovery.css +28 -0
- package/dist/website-search.css +26 -0
- package/dist/website-shell.css +89 -0
- package/dist/website-timeline.css +43 -0
- package/dist/website-workbench.css +162 -0
- package/dist/website.css +26 -0
- package/llms.txt +35 -0
- package/package.json +163 -5
- package/skills/folio-design/SKILL.md +228 -0
- package/skills/folio-design/evals/claims.json +95 -0
- package/skills/folio-design/evals/evals.json +84 -0
- package/skills/folio-design/rules/a11y.md +167 -0
- package/skills/folio-design/rules/composition.md +108 -0
- package/skills/folio-design/rules/forms.md +135 -0
- package/skills/folio-design/rules/naming.md +155 -0
- package/skills/folio-design/rules/tokens.md +135 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: folio-design
|
|
3
|
+
description: Builds UI with @misoto22/folio — a monochrome design system of CSS tokens and 83 accessible React primitives, charts and diagrams included. Use when a project imports '@misoto22/folio', '@misoto22/folio/charts' '@misoto22/folio/diagrams' or '@misoto22/folio/website', sets data-mode / data-surface / data-radius / data-density, or uses cn(), CONTROL_BASE, or isInvalid. Also applies when adding a component, theming, plotting data, drawing an architecture, workflow, sequence, data-flow or lifecycle diagram, or fixing a form, table, dialog, or toast in such a project.
|
|
4
|
+
allowed-tools: Bash(npx @misoto22/folio *), Bash(pnpm exec folio-design *), Bash(bunx @misoto22/folio *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# @misoto22/folio
|
|
8
|
+
|
|
9
|
+
CSS tokens plus React 19 primitives. Components ship compiled — you import them,
|
|
10
|
+
you do not copy them into the project.
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
import { Button, Field, Input } from '@misoto22/folio'
|
|
14
|
+
import '@misoto22/folio/styles.css'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Four entry points
|
|
18
|
+
|
|
19
|
+
The root entry has no dependencies a consumer has to install. Two groups live
|
|
20
|
+
behind their own specifier instead, each for weight the root should not carry:
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { AreaChart, BarList, BigNumber } from '@misoto22/folio/charts'
|
|
24
|
+
import { ArchitectureFigure, DiagramCanvas } from '@misoto22/folio/diagrams'
|
|
25
|
+
import { SiteShell, Portfolio, CollectionIntro, SearchPalette } from '@misoto22/folio/website'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Charts need a rendering engine and an animation runtime that nothing else in
|
|
29
|
+
the package does:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pnpm add recharts motion # optional peers, only for the charts entry
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
That separation is the reason an app that renders a Badge never resolves
|
|
36
|
+
`recharts` — so importing a chart from the root specifier does not render a
|
|
37
|
+
blank component, it throws. `docs <Component>` prints the right line for each
|
|
38
|
+
one; the `Import:` header is derived from the tree the component lives in, not
|
|
39
|
+
written by hand.
|
|
40
|
+
|
|
41
|
+
Some of the charts need no engine at all — `Heatmap` is a `<table>`,
|
|
42
|
+
`Sparkline` is one `<path>`, `BarList`, `BigNumber` and `BulletChart` are plain
|
|
43
|
+
HTML — but they ship from the charts entry all the same, so the boundary stays
|
|
44
|
+
one line rather than a list to memorise.
|
|
45
|
+
|
|
46
|
+
Diagrams need no peer at all; they carry an orthogonal routing engine instead,
|
|
47
|
+
which has no business in a bundle that renders a Badge. Reach for that entry
|
|
48
|
+
when the task is to DRAW a system rather than to build a screen:
|
|
49
|
+
`ArchitectureFigure` for what talks to what, `WorkflowFigure` for a process in
|
|
50
|
+
lanes, `SequenceFigure` for a call chain over time, `DataflowFigure` for a
|
|
51
|
+
pipeline, `LifecycleFigure` for a state machine. Each takes a typed JSON
|
|
52
|
+
specification and renders on a server. `Diagram` is a different thing and stays
|
|
53
|
+
on the root: a nesting CSS diagram for an article, not an SVG figure with
|
|
54
|
+
routed edges.
|
|
55
|
+
|
|
56
|
+
One more, for surfaces that cannot read a custom property — an OpenGraph card, a
|
|
57
|
+
`theme-color`, a canvas:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { TOKENS } from '@misoto22/folio/tokens'
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Never for styling a component. A literal in a stylesheet is a value that stops
|
|
64
|
+
following the theme, and every one of these mirrors a token that does.
|
|
65
|
+
|
|
66
|
+
## What this project has installed
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
!`npx @misoto22/folio docs --installed`
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
That is the version resolved in this project and every component it ships. Get
|
|
73
|
+
one component's full contract — every prop with its type and default, its
|
|
74
|
+
exported unions, its keyboard map, its accessibility promises, its examples —
|
|
75
|
+
with:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npx @misoto22/folio docs Button
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Run that before writing against a component you have not used in this session.
|
|
82
|
+
The median component is ~500 tokens and the largest is ~1,300, against far more
|
|
83
|
+
for all eighty-three. It is generated from the installed source, so it cannot be
|
|
84
|
+
out of date the way the website can — and each file names the specifier it
|
|
85
|
+
ships from on its `Import:` line, which is the half that matters below.
|
|
86
|
+
|
|
87
|
+
It also resolves parts and types, not just components: `docs CardBody`,
|
|
88
|
+
`docs TH` and `docs ButtonVariant` all land on the right file. When an import
|
|
89
|
+
fails, ask it about the identifier you tried.
|
|
90
|
+
|
|
91
|
+
## The one thing to internalise
|
|
92
|
+
|
|
93
|
+
**This is not shadcn/ui, and the names differ where it matters most.** A model
|
|
94
|
+
writing from habit produces imports that do not exist. The full table is in
|
|
95
|
+
[naming.md](./rules/naming.md); these four are the ones that come up every time:
|
|
96
|
+
|
|
97
|
+
| Habit | Here |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| `CardContent` | **`CardBody`** |
|
|
100
|
+
| `TableHeader` / `TableBody` / `TableRow` / `TableHead` / `TableCell` | **`THead` / `TBody` / `TR` / `TH` / `TD`** |
|
|
101
|
+
| `<DialogTitle>` as a child | **`<DialogContent title="…">`** — a prop, not a child |
|
|
102
|
+
| `<AlertTitle>` / `<AlertDescription>` | **`<Alert tone title="…">`** — props, not children |
|
|
103
|
+
|
|
104
|
+
## Critical rules
|
|
105
|
+
|
|
106
|
+
Always enforced. Each links to a file with Incorrect/Correct pairs — read it when
|
|
107
|
+
you are about to do that thing, not before.
|
|
108
|
+
|
|
109
|
+
### Colour and theming → [tokens.md](./rules/tokens.md)
|
|
110
|
+
|
|
111
|
+
- **Never write a raw colour.** No `bg-neutral-900`, no `text-gray-500`, no hex.
|
|
112
|
+
Read the semantic layer: `bg-(--background)`, `text-(--foreground-muted)`,
|
|
113
|
+
`border-(--border-color)`.
|
|
114
|
+
- **Never write a `dark:` variant.** Dark mode is a value swap behind
|
|
115
|
+
`data-mode="dark"`; a `dark:` override fights it and wins in only one theme.
|
|
116
|
+
- **Theme with the `data-*` axes**, set on any element, not just `:root`.
|
|
117
|
+
`data-mode`, `data-accent`, `data-surface`, `data-radius`, `data-rules`,
|
|
118
|
+
`data-type`, `data-motion`, `data-density`, `data-table-density`,
|
|
119
|
+
`data-chart-palette`. `npx @misoto22/folio docs --installed` prints the
|
|
120
|
+
current list; it is read out of the stylesheets rather than kept by hand here.
|
|
121
|
+
- **Durations and radii come from tokens.** `duration-(--duration-fast)`,
|
|
122
|
+
`rounded-(--radius)` — not `duration-150`, not `rounded-lg`.
|
|
123
|
+
- **No blurred shadow.** `--shadow*` resolves to `none` on purpose. Depth is a
|
|
124
|
+
hairline, a change of ground, or `--lift`.
|
|
125
|
+
|
|
126
|
+
### Composition → [composition.md](./rules/composition.md)
|
|
127
|
+
|
|
128
|
+
- **`className` adjusts layout, never appearance.** Margin, width, grid
|
|
129
|
+
placement — yes. Colour, border, radius, font — no; that is what the props and
|
|
130
|
+
the axes are for.
|
|
131
|
+
- **Use `cn()` for conditional classes.** It is exported. Plain template
|
|
132
|
+
literals emit both sides of a Tailwind conflict and let stylesheet order pick
|
|
133
|
+
the winner.
|
|
134
|
+
- **Card uses the full set.** `Card` → `CardHeader` / `CardTitle` / `CardBody` /
|
|
135
|
+
`CardFooter`. Do not dump everything into one div.
|
|
136
|
+
- **`Select` is one component, not a compound.** It takes `label`, `placeholder`
|
|
137
|
+
and `SelectItem` children. There is no `SelectTrigger` or `SelectValue`.
|
|
138
|
+
- **Logical properties, always.** `ps-` / `pe-` / `start-` / `end-` /
|
|
139
|
+
`text-start`. The package is RTL-correct and a physical property breaks it.
|
|
140
|
+
|
|
141
|
+
### Forms → [forms.md](./rules/forms.md)
|
|
142
|
+
|
|
143
|
+
- **A labelled control is a `Field`.** `<Field label hint error required>` wraps
|
|
144
|
+
one control and wires `aria-describedby`, `aria-required` and `aria-invalid`
|
|
145
|
+
onto it. Never hand-roll `<label>` + input + error div.
|
|
146
|
+
- **Errors go in `Field`'s `error` prop.** It replaces `hint` — they are one
|
|
147
|
+
slot, not two stacked messages — and it sets `aria-invalid` on the control for
|
|
148
|
+
you, so do not also pass `invalid`.
|
|
149
|
+
- **Outside a `Field`, invalid state is `invalid` or `aria-invalid`** on the
|
|
150
|
+
control. Never a red border class.
|
|
151
|
+
- **One control per `Field`.** The wiring clones a single element child; a
|
|
152
|
+
wrapper div around two controls silently wires nothing.
|
|
153
|
+
- **Build custom controls on `CONTROL_BASE` + `CONTROL_BORDER`** and read the
|
|
154
|
+
state with `isInvalid()`. All three are exported.
|
|
155
|
+
|
|
156
|
+
### Accessibility → [a11y.md](./rules/a11y.md)
|
|
157
|
+
|
|
158
|
+
- **Four props are required by the type because forgetting them ships an
|
|
159
|
+
unusable control**: `Table.caption`, `Progress.label`, `Avatar.alt`,
|
|
160
|
+
`FloatingIconButton.label`. `Select.label` and `Badge.children` too.
|
|
161
|
+
- **`<Button iconOnly>` needs `aria-label`.** There is no text to read.
|
|
162
|
+
- **Decoration is `aria-hidden`.** A status dot beside the word "Available"
|
|
163
|
+
repeats it.
|
|
164
|
+
- **Colour is never the only carrier** of a status. Every tone is doubled by an
|
|
165
|
+
icon or by the words.
|
|
166
|
+
|
|
167
|
+
### Imports
|
|
168
|
+
|
|
169
|
+
- **`toast` comes from `@misoto22/folio`, not from `sonner`.** Render `<Toaster />`
|
|
170
|
+
once at the app root.
|
|
171
|
+
- **Styles are a separate import.** `@misoto22/folio/styles.css` for the whole
|
|
172
|
+
compiled sheet, or `tokens.css` + `semantic.css` + `keyframes.css` when the app
|
|
173
|
+
compiles its own Tailwind. Compositions from `@misoto22/folio/website` also
|
|
174
|
+
need `website.css`, plus `website-base.css` when the whole page is a website.
|
|
175
|
+
|
|
176
|
+
## Key patterns
|
|
177
|
+
|
|
178
|
+
```tsx
|
|
179
|
+
// A labelled, validated field. Field does the ARIA wiring, including
|
|
180
|
+
// aria-invalid — do not also pass `invalid` on the control.
|
|
181
|
+
<Field label="Email" required error={errors.email}>
|
|
182
|
+
<Input type="email" />
|
|
183
|
+
</Field>
|
|
184
|
+
|
|
185
|
+
// A select. One component; label is required.
|
|
186
|
+
<Select label="Region" placeholder="Choose one">
|
|
187
|
+
<SelectItem value="au">Australia</SelectItem>
|
|
188
|
+
</Select>
|
|
189
|
+
|
|
190
|
+
// A dialog. The title is a prop, and it is not optional for a screen reader.
|
|
191
|
+
<Dialog>
|
|
192
|
+
<DialogTrigger asChild><Button>Open</Button></DialogTrigger>
|
|
193
|
+
<DialogContent title="Delete project" description="This cannot be undone.">
|
|
194
|
+
<Button variant="danger">Delete</Button>
|
|
195
|
+
</DialogContent>
|
|
196
|
+
</Dialog>
|
|
197
|
+
|
|
198
|
+
// A table. caption is required; it is what a screen reader announces.
|
|
199
|
+
<Table caption="Open invoices" borders="rows">
|
|
200
|
+
<THead><TR><TH>Client</TH><TH align="end">Amount</TH></TR></THead>
|
|
201
|
+
<TBody><TR><TD>Acme</TD><TD align="end">$1,200</TD></TR></TBody>
|
|
202
|
+
</Table>
|
|
203
|
+
|
|
204
|
+
// Colour: semantic tokens, no raw values, no dark: variant.
|
|
205
|
+
<div className="bg-(--card-background) text-(--foreground-muted)"> // correct
|
|
206
|
+
<div className="bg-white text-gray-500 dark:bg-neutral-900"> // wrong
|
|
207
|
+
|
|
208
|
+
// Theming: an axis on any element themes the subtree below it.
|
|
209
|
+
<section data-surface="warm" data-radius="round">…</section>
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Variants, in full
|
|
213
|
+
|
|
214
|
+
Short enough to inline; everything else comes from `docs <Component>`.
|
|
215
|
+
|
|
216
|
+
Every union is exported under the name in brackets, so a wrapper can take one
|
|
217
|
+
without retyping it.
|
|
218
|
+
|
|
219
|
+
- `Button` — `variant` [`ButtonVariant`]: `primary` `secondary` `ghost` `danger` · `size` [`ButtonSize`]: `sm` `md` `lg` · also `href`, `asChild`, `loading`, `iconOnly`, `keycap`
|
|
220
|
+
- `Badge` — `tone` [`BadgeTone`]: `neutral` `success` `warning` `danger` `outline`
|
|
221
|
+
- `Alert` — `tone` [`AlertTone`]: `info` `success` `warning` `danger`
|
|
222
|
+
- `Card` — `variant`: `outline` `plate` `flat`
|
|
223
|
+
- `Table` — `borders` [`TableBorders`]: `rows` `grid` `bordered` `bordered-grid` `none` · `density`: `comfortable` `compact`
|
|
224
|
+
- `TH` / `TD` — `align` [`TableAlign`]: `start` `center` `end`
|
|
225
|
+
|
|
226
|
+
For metadata and Node build scripts, `import { BRAND } from '@misoto22/folio/brand'`
|
|
227
|
+
loads the canonical color mirror without React. This is a data-only subpath,
|
|
228
|
+
separate from the four React entry points above.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Every identifier the skill tells an agent to write, paired with the habit it replaces. `skill.test.ts` asserts that each `use` is really exported, that each `avoid` really is not, and that both still appear in the rules — so a rename in the package, or a rule quietly deleted from the prose, fails the build instead of teaching the next agent something that stopped being true.",
|
|
3
|
+
"naming": [
|
|
4
|
+
{ "use": "CardBody", "avoid": "CardContent" },
|
|
5
|
+
{ "use": "THead", "avoid": "TableHeader" },
|
|
6
|
+
{ "use": "TBody", "avoid": "TableBody" },
|
|
7
|
+
{ "use": "TR", "avoid": "TableRow" },
|
|
8
|
+
{ "use": "TH", "avoid": "TableHead" },
|
|
9
|
+
{ "use": "TD", "avoid": "TableCell" },
|
|
10
|
+
{ "use": "DialogContent", "avoid": "DialogTitle" },
|
|
11
|
+
{ "use": "DialogContent", "avoid": "DialogHeader" },
|
|
12
|
+
{ "use": "SheetContent", "avoid": "SheetTitle" },
|
|
13
|
+
{ "use": "Tooltip", "avoid": "TooltipTrigger" },
|
|
14
|
+
{ "use": "Tooltip", "avoid": "TooltipContent" },
|
|
15
|
+
{ "use": "Alert", "avoid": "AlertTitle" },
|
|
16
|
+
{ "use": "Alert", "avoid": "AlertDescription" },
|
|
17
|
+
{ "use": "AccordionItem", "avoid": "AccordionTrigger" },
|
|
18
|
+
{ "use": "AccordionItem", "avoid": "AccordionContent" },
|
|
19
|
+
{ "use": "Select", "avoid": "SelectTrigger" },
|
|
20
|
+
{ "use": "Select", "avoid": "SelectValue" },
|
|
21
|
+
{ "use": "Select", "avoid": "SelectContent" }
|
|
22
|
+
],
|
|
23
|
+
"$comment2": "Identifiers the skill names as real and reachable, without pairing them against a habit. Same guarantee: named in the prose, exported by the package.",
|
|
24
|
+
"exported": [
|
|
25
|
+
"cn",
|
|
26
|
+
"toast",
|
|
27
|
+
"Toaster",
|
|
28
|
+
"CONTROL_BASE",
|
|
29
|
+
"CONTROL_BORDER",
|
|
30
|
+
"isInvalid",
|
|
31
|
+
"Field",
|
|
32
|
+
"Input",
|
|
33
|
+
"Textarea",
|
|
34
|
+
"NativeSelect",
|
|
35
|
+
"Combobox",
|
|
36
|
+
"Checkbox",
|
|
37
|
+
"Switch",
|
|
38
|
+
"RadioGroup",
|
|
39
|
+
"RadioGroupItem",
|
|
40
|
+
"ToggleGroup",
|
|
41
|
+
"ToggleGroupItem",
|
|
42
|
+
"Slider",
|
|
43
|
+
"DatePicker",
|
|
44
|
+
"DateRangePicker",
|
|
45
|
+
"Card",
|
|
46
|
+
"CardHeader",
|
|
47
|
+
"CardTitle",
|
|
48
|
+
"CardFooter",
|
|
49
|
+
"Table",
|
|
50
|
+
"EmptyState",
|
|
51
|
+
"ErrorState",
|
|
52
|
+
"Separator",
|
|
53
|
+
"Skeleton",
|
|
54
|
+
"SkeletonLine",
|
|
55
|
+
"SkeletonText",
|
|
56
|
+
"SkeletonPage",
|
|
57
|
+
"Badge",
|
|
58
|
+
"StatusPill",
|
|
59
|
+
"Kbd",
|
|
60
|
+
"Breadcrumb",
|
|
61
|
+
"AppShell",
|
|
62
|
+
"Steps",
|
|
63
|
+
"Article",
|
|
64
|
+
"SelectItem",
|
|
65
|
+
"TooltipProvider",
|
|
66
|
+
"DialogTrigger",
|
|
67
|
+
"ButtonVariant",
|
|
68
|
+
"ButtonSize",
|
|
69
|
+
"BadgeTone",
|
|
70
|
+
"AlertTone",
|
|
71
|
+
"TableAlign",
|
|
72
|
+
"TableBorders"
|
|
73
|
+
],
|
|
74
|
+
"$comment3": "Required-by-the-type props the a11y rule promises. `skill.test.ts` checks each against the extracted source, so a prop that stops being required stops being advertised as required.",
|
|
75
|
+
"requiredProps": [
|
|
76
|
+
{ "component": "Table", "part": "Table", "prop": "caption" },
|
|
77
|
+
{ "component": "Progress", "part": "Progress", "prop": "label" },
|
|
78
|
+
{ "component": "Avatar", "part": "Avatar", "prop": "alt" },
|
|
79
|
+
{ "component": "Avatar", "part": "Avatar", "prop": "fallback" },
|
|
80
|
+
{ "component": "FloatingIconButton", "part": "FloatingIconButton", "prop": "label" },
|
|
81
|
+
{ "component": "FloatingIconButton", "part": "FloatingIconButton", "prop": "position" },
|
|
82
|
+
{ "component": "Select", "part": "Select", "prop": "label" },
|
|
83
|
+
{ "component": "Combobox", "part": "Combobox", "prop": "label" },
|
|
84
|
+
{ "component": "Combobox", "part": "Combobox", "prop": "options" },
|
|
85
|
+
{ "component": "Sheet", "part": "SheetContent", "prop": "title" },
|
|
86
|
+
{ "component": "Accordion", "part": "AccordionItem", "prop": "title" },
|
|
87
|
+
{ "component": "EmptyState", "part": "EmptyState", "prop": "title" },
|
|
88
|
+
{ "component": "Badge", "part": "Badge", "prop": "children" }
|
|
89
|
+
],
|
|
90
|
+
"$comment4": "Props the skill describes as OPTIONAL where a reader would assume otherwise. Guarded in the same direction: if one becomes required, the prose that says it is not has to change with it.",
|
|
91
|
+
"optionalProps": [
|
|
92
|
+
{ "component": "Dialog", "part": "DialogContent", "prop": "title" },
|
|
93
|
+
{ "component": "Alert", "part": "Alert", "prop": "title" }
|
|
94
|
+
]
|
|
95
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Prompts a real agent runs against this skill, and what its output has to show. This is the half `claims.json` cannot reach: that file proves the rules match the package, which is necessary and does not prove an agent given the rules writes correct code. Each `must_use` identifier is checked for existence by `skill.test.ts`, so an eval cannot quietly start expecting something the package no longer exports.",
|
|
3
|
+
"skill_name": "folio-design",
|
|
4
|
+
"evals": [
|
|
5
|
+
{
|
|
6
|
+
"id": 1,
|
|
7
|
+
"prompt": "Using @misoto22/folio, build a settings form with fields for full name and email address, and show a validation error under email when it is invalid.",
|
|
8
|
+
"expected_output": "A React component using one Field per control, the error prop rather than a red border, and gap-* on the form.",
|
|
9
|
+
"must_use": ["Field", "Input", "Button"],
|
|
10
|
+
"must_not_contain": ["space-y-", "border-red", "text-red-", "<label", "aria-describedby="],
|
|
11
|
+
"expectations": [
|
|
12
|
+
"Wraps each control in its own Field with a label, not a hand-rolled <label> plus input plus error div",
|
|
13
|
+
"Puts the validation message in Field's error prop, which sets aria-invalid on the control for it",
|
|
14
|
+
"Does not also pass invalid on the Input inside a Field with an error — that is redundant",
|
|
15
|
+
"Never a wrapper div between Field and its control, which would wire the div instead",
|
|
16
|
+
"Lays the form out with flex and gap-*, not space-y-*"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": 2,
|
|
21
|
+
"prompt": "Using @misoto22/folio, add a confirmation dialog for deleting a project. It needs a heading, an explanation, and Cancel and Delete buttons.",
|
|
22
|
+
"expected_output": "A Dialog whose title and description are props on DialogContent, with a danger-variant Delete button.",
|
|
23
|
+
"must_use": ["Dialog", "DialogTrigger", "DialogContent", "Button"],
|
|
24
|
+
"must_not_contain": ["DialogTitle", "DialogHeader", "DialogDescription", "DialogFooter"],
|
|
25
|
+
"expectations": [
|
|
26
|
+
"Passes title and description as props on DialogContent — there is no DialogTitle or DialogHeader export here",
|
|
27
|
+
"Uses variant=\"danger\" for the destructive action",
|
|
28
|
+
"Wraps the trigger with asChild rather than nesting a button inside a button",
|
|
29
|
+
"Sets no z-index: the overlay handles its own stacking"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": 3,
|
|
34
|
+
"prompt": "Using @misoto22/folio, render a table of open invoices with client, due date and amount, with the amount column right-aligned.",
|
|
35
|
+
"expected_output": "A Table with a real caption and the short part names, amount aligned with the align prop.",
|
|
36
|
+
"must_use": ["Table", "THead", "TBody", "TR", "TH", "TD"],
|
|
37
|
+
"must_not_contain": ["TableHeader", "TableBody", "TableRow", "TableHead", "TableCell", "text-right"],
|
|
38
|
+
"expectations": [
|
|
39
|
+
"Uses THead / TBody / TR / TH / TD — the shadcn/ui names are not exported here",
|
|
40
|
+
"Gives caption a real sentence saying what the table lists, not an empty string and not the word \"Table\"",
|
|
41
|
+
"Right-aligns with align=\"end\" on TH and TD, not a text-right class, so the table stays RTL-correct"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": 4,
|
|
46
|
+
"prompt": "Using @misoto22/folio, build a dashboard row of four stat cards. Each shows a title, a big number, a change badge, and a loading state.",
|
|
47
|
+
"expected_output": "Full Card composition, Skeleton for loading, Badge for the change, semantic tokens throughout.",
|
|
48
|
+
"must_use": ["Card", "CardHeader", "CardTitle", "CardBody", "Badge", "Skeleton"],
|
|
49
|
+
"must_not_contain": ["CardContent", "animate-pulse", "bg-green-", "text-red-", "dark:"],
|
|
50
|
+
"expectations": [
|
|
51
|
+
"Uses CardBody, not CardContent",
|
|
52
|
+
"Composes CardHeader and CardTitle rather than putting everything in one block",
|
|
53
|
+
"Uses Skeleton for the loading placeholder, not a custom animate-pulse div",
|
|
54
|
+
"Uses Badge for the change rather than a styled span",
|
|
55
|
+
"Writes no raw colour and no dark: variant — semantic tokens resolve in both modes"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": 5,
|
|
60
|
+
"prompt": "Using @misoto22/folio, add a small area chart of monthly revenue above the stat cards.",
|
|
61
|
+
"expected_output": "A chart imported from the charts entry point, with the peers named.",
|
|
62
|
+
"must_use": ["AreaChart"],
|
|
63
|
+
"must_not_contain": ["from '@misoto22/folio'\nimport { AreaChart"],
|
|
64
|
+
"expectations": [
|
|
65
|
+
"Imports the chart from '@misoto22/folio/charts', not from the root specifier — the root does not export it and the import throws",
|
|
66
|
+
"Mentions that recharts and motion are peer dependencies the project needs installed",
|
|
67
|
+
"Does not reach for recharts directly to build the chart by hand"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": 6,
|
|
72
|
+
"prompt": "Using @misoto22/folio, add an icon-only button that copies the current URL, and a toast confirming it.",
|
|
73
|
+
"expected_output": "An iconOnly Button with an accessible name, and toast imported from this package.",
|
|
74
|
+
"must_use": ["Button", "toast", "Toaster"],
|
|
75
|
+
"must_not_contain": ["from 'sonner'"],
|
|
76
|
+
"expectations": [
|
|
77
|
+
"Gives the iconOnly Button an aria-label naming the action — without one it is announced as \"button\" and nothing else",
|
|
78
|
+
"Imports toast from '@misoto22/folio', not from sonner",
|
|
79
|
+
"Renders Toaster once at the app root rather than beside the button",
|
|
80
|
+
"Puts no sizing class on the icon"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Accessibility
|
|
2
|
+
|
|
3
|
+
The package keeps these promises so a call site does not have to. What is left
|
|
4
|
+
is the handful of things only the call site knows — and every one of them is a
|
|
5
|
+
prop that is easy to leave off and impossible to notice afterwards.
|
|
6
|
+
|
|
7
|
+
## Props the type makes required, and why
|
|
8
|
+
|
|
9
|
+
These are required in TypeScript because forgetting them ships a control that
|
|
10
|
+
cannot be used without sight. Do not satisfy the type with a placeholder.
|
|
11
|
+
|
|
12
|
+
| Prop | What it is |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| `Table.caption` | What the table is a table *of*. Announced before the rows. |
|
|
15
|
+
| `Progress.label` | What is progressing. `aria-valuetext` has nothing else to say. |
|
|
16
|
+
| `Avatar.alt` + `Avatar.fallback` | Who it is, and the initials shown when the image fails. |
|
|
17
|
+
| `FloatingIconButton.label` | There is no text in the button at all. |
|
|
18
|
+
| `Select.label` | The trigger is a button; this is its accessible name. |
|
|
19
|
+
| `Combobox.label` | Same. |
|
|
20
|
+
| `SheetContent.title` | A panel with no name drops a screen reader into an unnamed region. |
|
|
21
|
+
| `AccordionItem.title` | The heading that is also the trigger. |
|
|
22
|
+
| `EmptyState.title` | The state's own name. |
|
|
23
|
+
| `Alert.title` | Optional, but an alert with no title is a coloured paragraph. |
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
// Incorrect — the type is satisfied and the table is still anonymous
|
|
27
|
+
<Table caption="">
|
|
28
|
+
|
|
29
|
+
// Incorrect — the caption is not a label for the reader, it is the reader's only orientation
|
|
30
|
+
<Table caption="Table">
|
|
31
|
+
|
|
32
|
+
// Correct
|
|
33
|
+
<Table caption="Invoices awaiting payment">
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use `showCaption={false}` when the design has no room for a visible caption. The
|
|
37
|
+
caption still reaches assistive tech.
|
|
38
|
+
|
|
39
|
+
## An icon-only control needs a name
|
|
40
|
+
|
|
41
|
+
Development warns on both failures in this section rather than leaving them to
|
|
42
|
+
review: `BUTTON_ICON_ONLY_UNNAMED` when an `iconOnly` Button has neither
|
|
43
|
+
`aria-label` nor `aria-labelledby`, and `REQUIRED_NAME_BLANK` when a name that
|
|
44
|
+
is required for accessibility is an empty string. Each names the field and the
|
|
45
|
+
fix, so a failed render tells you what to change.
|
|
46
|
+
|
|
47
|
+
They are two of nineteen. The whole set, so a code you meet in a console is
|
|
48
|
+
findable:
|
|
49
|
+
|
|
50
|
+
| Code | Fires when |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `ARTICLE_HTML_AND_CHILDREN` | `Article` is given both `html` and `children`. |
|
|
53
|
+
| `BREADCRUMB_CRUMB_NOT_LINKED` | A crumb before the last carries no `href`. |
|
|
54
|
+
| `BUTTON_ICON_ONLY_UNNAMED` | An icon-only `Button` has no accessible name. |
|
|
55
|
+
| `DIALOG_TITLE_MISSING` | `DialogContent` has no `title`. |
|
|
56
|
+
| `FIELD_CONTROL_NOT_LABELLABLE` | A `Field`'s child is a host element that cannot take a label. |
|
|
57
|
+
| `FIELD_CONTROL_NOT_WIRED` | A `Field`'s child is not a single element, so nothing was wired. |
|
|
58
|
+
| `REQUIRED_NAME_BLANK` | A name required for accessibility is an empty string. |
|
|
59
|
+
| `SEARCHABLE_MENU_LABEL_UNREADABLE` | A `SearchableMenu` action's label has no text and no `keywords`, so typing can never find it. |
|
|
60
|
+
|
|
61
|
+
`Diagram` checks the spec it was handed, because a figure that ignores an edge
|
|
62
|
+
still renders beautifully:
|
|
63
|
+
|
|
64
|
+
| Code | Fires when |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `DIAGRAM_ACCENT_ON_CONTAINER` | `accent` on a node with children, drawn as a band with no fill to take. |
|
|
67
|
+
| `DIAGRAM_DIRECTION_ON_LEAF` | `direction` on a node with no children. |
|
|
68
|
+
| `DIAGRAM_DUPLICATE_ID` | Two nodes carry the same `id`. |
|
|
69
|
+
| `DIAGRAM_EDGE_NOT_ADJACENT` | An edge names two nodes that are never consecutive siblings. |
|
|
70
|
+
| `DIAGRAM_EDGE_UNKNOWN_NODE` | An edge names an `id` no node carries. |
|
|
71
|
+
|
|
72
|
+
And the figures in `@misoto22/folio/diagrams` check theirs:
|
|
73
|
+
|
|
74
|
+
| Code | Fires when |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| `DIAGRAM_CELL_COLLISION` | Two nodes land at the same coordinate, so one plate is drawn on top of the other. |
|
|
77
|
+
| `DIAGRAM_EDGE_DANGLING` | A relationship names an id the specification does not declare, so it is left out of the picture and the summary. |
|
|
78
|
+
| `DIAGRAM_LANE_UNKNOWN` | A node names a lane no lane in the specification declares; it falls back to the first. |
|
|
79
|
+
| `DIAGRAM_REF_UNKNOWN` | A field references an id no node in the specification declares. |
|
|
80
|
+
| `DIAGRAM_SPEC_MUTATED` | The same spec object arrives with different contents; the model is memoised on identity, so the figure still draws the first. |
|
|
81
|
+
| `DIAGRAM_STAGE_OUT_OF_RANGE` | A node's `stage` falls past the last declared stage, so it is drawn in a column the axis does not label. |
|
|
82
|
+
|
|
83
|
+
All of them are development-only — every call site is behind
|
|
84
|
+
`process.env.NODE_ENV`, so nothing here reaches a production bundle — and each
|
|
85
|
+
prints once per problem, the field that caused it, and an imperative fix.
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
// Incorrect — reads as "button"
|
|
89
|
+
<Button iconOnly><TrashIcon /></Button>
|
|
90
|
+
|
|
91
|
+
// Correct
|
|
92
|
+
<Button iconOnly aria-label="Delete invoice"><TrashIcon /></Button>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The same applies to any `Button` whose children are only an icon, whether or not
|
|
96
|
+
`iconOnly` is set. `FloatingIconButton` cannot get this wrong — its `label` is
|
|
97
|
+
required.
|
|
98
|
+
|
|
99
|
+
## Decoration is `aria-hidden`
|
|
100
|
+
|
|
101
|
+
An icon that repeats the words beside it is noise; an arrow inside a link is
|
|
102
|
+
read out as "north east arrow".
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
// Incorrect
|
|
106
|
+
<StatusPill tone="success"><CheckIcon /> Available</StatusPill>
|
|
107
|
+
|
|
108
|
+
// Correct
|
|
109
|
+
<StatusPill tone="success"><CheckIcon aria-hidden="true" /> Available</StatusPill>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Colour is never the only carrier
|
|
113
|
+
|
|
114
|
+
Every status tone in the system is doubled by an icon, by the words, or by both.
|
|
115
|
+
Keep that when you compose.
|
|
116
|
+
|
|
117
|
+
```tsx
|
|
118
|
+
// Incorrect — the only difference between these two rows is a hue
|
|
119
|
+
<TD><span className="text-(--danger)">●</span></TD>
|
|
120
|
+
|
|
121
|
+
// Correct
|
|
122
|
+
<TD><StatusPill tone="danger">Overdue</StatusPill></TD>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Do not re-implement a pattern Radix already owns
|
|
126
|
+
|
|
127
|
+
Focus traps, roving tabindex, typeahead, portal placement and scroll locking are
|
|
128
|
+
where a hand-rolled component quietly becomes unusable with a keyboard. `Dialog`,
|
|
129
|
+
`Sheet`, `Popover`, `DropdownMenu`, `ContextMenu`, `Tabs`, `Accordion`,
|
|
130
|
+
`RadioGroup`, `ToggleGroup`, `Select`, `Slider` and `Tooltip` already wrap it.
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
// Incorrect
|
|
134
|
+
<div role="dialog" className="fixed inset-0 …" onKeyDown={handleEscape}>
|
|
135
|
+
|
|
136
|
+
// Correct
|
|
137
|
+
<Dialog><DialogContent title="…">…</DialogContent></Dialog>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Motion is gated
|
|
141
|
+
|
|
142
|
+
Anything animated is behind `motion-safe` and carries `data-folio-animated`. Do
|
|
143
|
+
both when you animate something yourself — but know what each one buys. The
|
|
144
|
+
GUARANTEE is a universal rule in `keyframes.css`: under
|
|
145
|
+
`prefers-reduced-motion: reduce`, `animation-duration` and `transition-duration`
|
|
146
|
+
are clamped to 0.01ms on `*`, so your animation is covered whether or not you
|
|
147
|
+
remember the attribute. `data-folio-animated` goes further, removing the
|
|
148
|
+
animation outright rather than running an instant frame of it — read it as the
|
|
149
|
+
component asserting its motion is decorative, not as the thing that does the
|
|
150
|
+
cancelling.
|
|
151
|
+
|
|
152
|
+
```tsx
|
|
153
|
+
// Correct — the package's keyframes are all prefixed `folio-`
|
|
154
|
+
<div data-folio-animated className="motion-safe:animate-[folio-fade-in_200ms_var(--ease-out-expo)]">
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`data-motion="still"` on any ancestor stops motion in that subtree.
|
|
158
|
+
|
|
159
|
+
## The keyboard contract is documented per component
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
npx @misoto22/folio docs Combobox
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
prints the key-by-key contract. It is the part that quietly regresses — a
|
|
166
|
+
wrapper that swallows a key looks identical until someone tries it — so check it
|
|
167
|
+
before you wrap one of these in your own handler.
|