@misoto22/folio 0.0.0 → 0.16.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/WorkflowFigure.md +51 -0
- package/dist/agent/catalog.json +8006 -0
- package/dist/agent/index.md +182 -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 +193 -0
- package/dist/styles.css +98 -0
- package/dist/themes.css +514 -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 +652 -0
- package/dist/tokens.d.ts +198 -0
- package/dist/tokens.js +1020 -0
- package/dist/tokens.json +1019 -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/index.d.ts +27 -0
- package/dist/website/index.js +21 -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 +17 -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.css +25 -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 +133 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export * from "./lib/overlay-container.js";
|
|
2
|
+
import { BRAND } from "./tokens/brand.js";
|
|
3
|
+
import { cn } from "./lib/cn.js";
|
|
4
|
+
import { CONTROL_BASE, CONTROL_BORDER, isInvalid } from "./lib/control.js";
|
|
5
|
+
import { useSelectionIndicator } from "./lib/useSelectionIndicator.js";
|
|
6
|
+
export * from "./components/Button/Button.js";
|
|
7
|
+
export * from "./components/FloatingIconButton/FloatingIconButton.js";
|
|
8
|
+
export * from "./components/Text/Text.js";
|
|
9
|
+
export * from "./components/Heading/Heading.js";
|
|
10
|
+
export * from "./components/Code/Code.js";
|
|
11
|
+
export * from "./components/CodeBlock/CodeBlock.js";
|
|
12
|
+
export * from "./components/Markdown/Markdown.js";
|
|
13
|
+
export * from "./components/Badge/Badge.js";
|
|
14
|
+
export * from "./components/Tag/Tag.js";
|
|
15
|
+
export * from "./components/Kbd/Kbd.js";
|
|
16
|
+
export * from "./components/Avatar/Avatar.js";
|
|
17
|
+
export * from "./components/StatusDot/StatusDot.js";
|
|
18
|
+
export * from "./components/Metric/Metric.js";
|
|
19
|
+
export * from "./components/StatusPill/StatusPill.js";
|
|
20
|
+
export * from "./components/LinkArrow/LinkArrow.js";
|
|
21
|
+
export * from "./components/Separator/Separator.js";
|
|
22
|
+
export * from "./components/Timestamp/Timestamp.js";
|
|
23
|
+
export * from "./components/FigureBand/FigureBand.js";
|
|
24
|
+
export * from "./components/Spinner/Spinner.js";
|
|
25
|
+
export * from "./components/Skeleton/Skeleton.js";
|
|
26
|
+
export * from "./components/Progress/Progress.js";
|
|
27
|
+
export * from "./components/Alert/Alert.js";
|
|
28
|
+
export * from "./components/EmptyState/EmptyState.js";
|
|
29
|
+
export * from "./components/ErrorState/ErrorState.js";
|
|
30
|
+
export * from "./components/Toast/Toast.js";
|
|
31
|
+
export * from "./components/Field/Field.js";
|
|
32
|
+
export * from "./components/ColorPicker/ColorPicker.js";
|
|
33
|
+
export * from "./components/Combobox/Combobox.js";
|
|
34
|
+
export * from "./components/DatePicker/DatePicker.js";
|
|
35
|
+
export * from "./components/NumberField/NumberField.js";
|
|
36
|
+
export * from "./components/Slider/Slider.js";
|
|
37
|
+
export * from "./components/ToggleGroup/ToggleGroup.js";
|
|
38
|
+
export * from "./components/Input/Input.js";
|
|
39
|
+
export * from "./components/Textarea/Textarea.js";
|
|
40
|
+
export * from "./components/Select/Select.js";
|
|
41
|
+
export * from "./components/NativeSelect/NativeSelect.js";
|
|
42
|
+
export * from "./components/Checkbox/Checkbox.js";
|
|
43
|
+
export * from "./components/RadioGroup/RadioGroup.js";
|
|
44
|
+
export * from "./components/Switch/Switch.js";
|
|
45
|
+
export * from "./components/Dialog/Dialog.js";
|
|
46
|
+
export * from "./components/DropdownMenu/DropdownMenu.js";
|
|
47
|
+
export * from "./components/Tooltip/Tooltip.js";
|
|
48
|
+
export * from "./components/Popover/Popover.js";
|
|
49
|
+
export * from "./components/Sheet/Sheet.js";
|
|
50
|
+
export * from "./components/ContextMenu/ContextMenu.js";
|
|
51
|
+
export * from "./components/Command/Command.js";
|
|
52
|
+
export * from "./components/SearchableMenu/SearchableMenu.js";
|
|
53
|
+
export * from "./components/Tabs/Tabs.js";
|
|
54
|
+
export * from "./components/Accordion/Accordion.js";
|
|
55
|
+
export * from "./components/Collapsible/Collapsible.js";
|
|
56
|
+
export * from "./components/Breadcrumb/Breadcrumb.js";
|
|
57
|
+
export * from "./components/Pagination/Pagination.js";
|
|
58
|
+
export * from "./components/NavItem/NavItem.js";
|
|
59
|
+
export * from "./components/Sidebar/Sidebar.js";
|
|
60
|
+
export * from "./components/Card/Card.js";
|
|
61
|
+
export * from "./components/Table/Table.js";
|
|
62
|
+
export * from "./components/DescriptionList/DescriptionList.js";
|
|
63
|
+
export * from "./components/Toolbar/Toolbar.js";
|
|
64
|
+
export * from "./components/AspectRatio/AspectRatio.js";
|
|
65
|
+
export * from "./components/Calendar/Calendar.js";
|
|
66
|
+
export * from "./components/ScrollArea/ScrollArea.js";
|
|
67
|
+
export * from "./components/AppShell/AppShell.js";
|
|
68
|
+
export * from "./components/PageHeader/PageHeader.js";
|
|
69
|
+
export * from "./components/Article/Article.js";
|
|
70
|
+
export * from "./components/Diagram/Diagram.js";
|
|
71
|
+
export * from "./components/Steps/Steps.js";
|
|
72
|
+
export {
|
|
73
|
+
BRAND,
|
|
74
|
+
CONTROL_BASE,
|
|
75
|
+
CONTROL_BORDER,
|
|
76
|
+
cn,
|
|
77
|
+
isInvalid,
|
|
78
|
+
useSelectionIndicator
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @misoto22/folio — public entry.\n *\n * Components export from here; the look ships separately as CSS:\n *\n * import '@misoto22/folio/styles.css' // compiled Tailwind + tokens + fonts\n *\n * or, for an app that already compiles Tailwind itself, the portable layers on\n * their own:\n *\n * import '@misoto22/folio/tokens.css' // primitives, plus data-mode and data-density\n * import '@misoto22/folio/semantic.css' // roles\n * import '@misoto22/folio/themes.css' // the other six theming axes\n * import '@misoto22/folio/keyframes.css' // motion\n *\n * All four, or the theming attributes are attributes that do nothing: every\n * axis but `data-mode` and `data-density` is declared only in `themes.css`, and\n * an app that skips it writes `data-radius=\"sharp\"` and gets no error, no\n * warning and no corner.\n *\n * Everything below is a consumer contract. Adding an export is cheap; changing\n * or removing one is a breaking change (DESIGN-API-001).\n */\n\n// ─── Utilities ───\nexport * from './lib/overlay-container'\n\n// ─── Tokens ───\nexport { BRAND } from './tokens/brand'\nexport type { BrandColor } from './tokens/brand'\n\n// ─── Utilities ───\nexport { cn } from './lib/cn'\nexport { CONTROL_BASE, CONTROL_BORDER, isInvalid } from './lib/control'\nexport { useSelectionIndicator } from './lib/useSelectionIndicator'\nexport type { IndicatorStyle } from './lib/useSelectionIndicator'\n\n// ─── Actions ───\nexport * from './components/Button/Button'\nexport * from './components/FloatingIconButton/FloatingIconButton'\n\n// ─── Display ───\nexport * from './components/Text/Text'\nexport * from './components/Heading/Heading'\nexport * from './components/Code/Code'\nexport * from './components/CodeBlock/CodeBlock'\nexport * from './components/Markdown/Markdown'\nexport * from './components/Badge/Badge'\nexport * from './components/Tag/Tag'\nexport * from './components/Kbd/Kbd'\nexport * from './components/Avatar/Avatar'\nexport * from './components/StatusDot/StatusDot'\nexport * from './components/Metric/Metric'\nexport * from './components/StatusPill/StatusPill'\nexport * from './components/LinkArrow/LinkArrow'\nexport * from './components/Separator/Separator'\nexport * from './components/Timestamp/Timestamp'\nexport * from './components/FigureBand/FigureBand'\n\n// ─── Feedback ───\nexport * from './components/Spinner/Spinner'\nexport * from './components/Skeleton/Skeleton'\nexport * from './components/Progress/Progress'\nexport * from './components/Alert/Alert'\nexport * from './components/EmptyState/EmptyState'\nexport * from './components/ErrorState/ErrorState'\nexport * from './components/Toast/Toast'\n\n// ─── Forms ───\nexport * from './components/Field/Field'\nexport * from './components/ColorPicker/ColorPicker'\nexport * from './components/Combobox/Combobox'\nexport * from './components/DatePicker/DatePicker'\nexport * from './components/NumberField/NumberField'\nexport * from './components/Slider/Slider'\nexport * from './components/ToggleGroup/ToggleGroup'\nexport * from './components/Input/Input'\nexport * from './components/Textarea/Textarea'\nexport * from './components/Select/Select'\nexport * from './components/NativeSelect/NativeSelect'\nexport * from './components/Checkbox/Checkbox'\nexport * from './components/RadioGroup/RadioGroup'\nexport * from './components/Switch/Switch'\n\n// ─── Overlays ───\nexport * from './components/Dialog/Dialog'\nexport * from './components/DropdownMenu/DropdownMenu'\nexport * from './components/Tooltip/Tooltip'\nexport * from './components/Popover/Popover'\nexport * from './components/Sheet/Sheet'\nexport * from './components/ContextMenu/ContextMenu'\nexport * from './components/Command/Command'\nexport * from './components/SearchableMenu/SearchableMenu'\n\n// ─── Navigation ───\nexport * from './components/Tabs/Tabs'\nexport * from './components/Accordion/Accordion'\nexport * from './components/Collapsible/Collapsible'\nexport * from './components/Breadcrumb/Breadcrumb'\nexport * from './components/Pagination/Pagination'\nexport * from './components/NavItem/NavItem'\nexport * from './components/Sidebar/Sidebar'\n\n// ─── Surfaces / layout ───\nexport * from './components/Card/Card'\nexport * from './components/Table/Table'\nexport * from './components/DescriptionList/DescriptionList'\nexport * from './components/Toolbar/Toolbar'\nexport * from './components/AspectRatio/AspectRatio'\nexport * from './components/Calendar/Calendar'\nexport * from './components/ScrollArea/ScrollArea'\nexport * from './components/AppShell/AppShell'\nexport * from './components/PageHeader/PageHeader'\nexport * from './components/Article/Article'\nexport * from './components/Diagram/Diagram'\nexport * from './components/Steps/Steps'\n"],"mappings":"AAyBA,cAAc;AAGd,SAAS,aAAa;AAItB,SAAS,UAAU;AACnB,SAAS,cAAc,gBAAgB,iBAAiB;AACxD,SAAS,6BAA6B;AAItC,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
MOTION — the system's named animations
|
|
3
|
+
--------------------------------------------------------------------------
|
|
4
|
+
Portable, like tokens.css: plain CSS, no Tailwind. Every component that
|
|
5
|
+
animates reaches for one of these rather than declaring its own, so the
|
|
6
|
+
whole system arrives and leaves on the same curve.
|
|
7
|
+
|
|
8
|
+
Durations are NOT baked in here — a keyframe says what moves, a call site
|
|
9
|
+
says how fast, using --fast / --mid / --slow. Reduced motion is honoured in
|
|
10
|
+
one place, at the bottom.
|
|
11
|
+
========================================================================== */
|
|
12
|
+
|
|
13
|
+
.folio-tabs-list { position: relative; isolation: isolate; }
|
|
14
|
+
.folio-tabs-list[data-swipe] { touch-action: pan-y; user-select: none; }
|
|
15
|
+
.folio-tabs-list[data-dragging] { cursor: grabbing; }
|
|
16
|
+
.folio-tabs-list[data-orientation=horizontal][data-measured]::before { content: ''; position: absolute; z-index: 0; pointer-events: none; left: 0; top: calc(var(--tab-y) + var(--tab-height) - 2px); width: var(--tab-width); height: 2px; background: var(--accent); transform: translateX(calc(var(--tab-x) + var(--tab-drag-x, 0px))); transition: transform var(--duration-base) var(--ease-out-expo), width var(--duration-base) var(--ease-out-expo); }
|
|
17
|
+
.folio-tabs-list [role=tab] { position: relative; z-index: 1; }
|
|
18
|
+
/* Keep the focus treatment inside the scrolling strip so no outline is clipped. */
|
|
19
|
+
.folio-tabs-list [role=tab]:focus { outline: none; }
|
|
20
|
+
.folio-tabs-list [role=tab]:focus-visible { outline: none; background-color: var(--paper-2); box-shadow: inset 0 0 0 1px var(--rule-2); border-radius: 4px; }
|
|
21
|
+
.folio-tabs-list[data-orientation=horizontal][data-measured] [role=tab][data-state=active] { border-bottom-color: transparent; }
|
|
22
|
+
.folio-tabs-list[data-dragging]::before { transition-duration: 0ms; }
|
|
23
|
+
.folio-tabs-panel[data-state=active] { animation: folio-tab-in var(--duration-base) var(--ease-out-expo); }
|
|
24
|
+
.folio-tabs-panel[hidden] { display: none; }
|
|
25
|
+
@keyframes folio-tab-in { from { opacity: 0; transform: translateX(var(--tab-enter-x, 0px)); } to { opacity: 1; transform: translateX(0); } }
|
|
26
|
+
/* Recharts clears the browser's SVG outline. Keep a chart's keyboard cursor as
|
|
27
|
+
visible as every other control, without asking hosts to add a local rule. In
|
|
28
|
+
the base layer, beside the one `:focus-visible` indicator it restores. */
|
|
29
|
+
@layer base {
|
|
30
|
+
[data-slot='chart'] svg.recharts-surface[tabindex]:focus-visible {
|
|
31
|
+
outline: var(--focus-w) solid var(--focus);
|
|
32
|
+
outline-offset: var(--focus-off);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
.folio-sheet { translate: none; --sheet-x: 0%; --sheet-y: 0%; }
|
|
36
|
+
.folio-sheet[data-side=top] { --sheet-y: -100%; }
|
|
37
|
+
.folio-sheet[data-side=bottom] { --sheet-y: 100%; }
|
|
38
|
+
.folio-sheet[data-side=start] { --sheet-x: -100%; }
|
|
39
|
+
.folio-sheet[data-side=end] { --sheet-x: 100%; }
|
|
40
|
+
.folio-sheet[data-side=start]:dir(rtl) { --sheet-x: 100%; }
|
|
41
|
+
.folio-sheet[data-side=end]:dir(rtl) { --sheet-x: -100%; }
|
|
42
|
+
.folio-sheet[data-state=open] { animation: folio-sheet-in var(--duration-base) var(--ease-out-expo); }
|
|
43
|
+
.folio-sheet[data-state=closed] { animation: folio-sheet-out var(--duration-fast) var(--ease); }
|
|
44
|
+
@keyframes folio-sheet-in { from { transform: translate(var(--sheet-x), var(--sheet-y)); } to { transform: translate(0, 0); } }
|
|
45
|
+
@keyframes folio-sheet-out { from { transform: translate(0, 0); } to { transform: translate(var(--sheet-x), var(--sheet-y)); } }
|
|
46
|
+
|
|
47
|
+
/* A surface arriving in place — a panel, a menu, a tab's contents. Short and
|
|
48
|
+
small: the page did not change, only part of it. */
|
|
49
|
+
@keyframes folio-panel-in {
|
|
50
|
+
from {
|
|
51
|
+
opacity: 0;
|
|
52
|
+
transform: translateY(4px);
|
|
53
|
+
}
|
|
54
|
+
to {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
transform: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* An ANCHORED panel arriving, growing from wherever its trigger is.
|
|
61
|
+
Radix puts that point on the wrapper as --radix-popper-transform-origin; the
|
|
62
|
+
call site passes it down. Origin is what makes this read as an animation
|
|
63
|
+
rather than as a flicker: four pixels of travel over 130ms is technically
|
|
64
|
+
motion and perceptually nothing, which is what "the menu has no animation"
|
|
65
|
+
turned out to mean. */
|
|
66
|
+
@keyframes folio-pop-in {
|
|
67
|
+
from {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
transform: scale(0.96) translateY(-2px);
|
|
70
|
+
}
|
|
71
|
+
to {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
transform: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* And leaving. A panel that vanishes on the frame the pointer lands elsewhere
|
|
78
|
+
reads as a bug in the page rather than as a thing that closed. */
|
|
79
|
+
@keyframes folio-pop-out {
|
|
80
|
+
from {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
transform: none;
|
|
83
|
+
}
|
|
84
|
+
to {
|
|
85
|
+
opacity: 0;
|
|
86
|
+
transform: scale(0.97) translateY(-2px);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* A page arriving. Longer travel than a panel, because more of the view is
|
|
91
|
+
being replaced. */
|
|
92
|
+
@keyframes folio-route-in {
|
|
93
|
+
from {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
transform: translateY(12px);
|
|
96
|
+
}
|
|
97
|
+
to {
|
|
98
|
+
opacity: 1;
|
|
99
|
+
transform: none;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* An overlay's ground. No travel — a scrim does not slide, it appears. */
|
|
104
|
+
@keyframes folio-fade-in {
|
|
105
|
+
from {
|
|
106
|
+
opacity: 0;
|
|
107
|
+
}
|
|
108
|
+
to {
|
|
109
|
+
opacity: 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes folio-fade-out {
|
|
114
|
+
from {
|
|
115
|
+
opacity: 1;
|
|
116
|
+
}
|
|
117
|
+
to {
|
|
118
|
+
opacity: 0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* A toast entering from the edge it is docked to. */
|
|
123
|
+
@keyframes folio-slide-in-right {
|
|
124
|
+
from {
|
|
125
|
+
opacity: 0;
|
|
126
|
+
transform: translateX(12px);
|
|
127
|
+
}
|
|
128
|
+
to {
|
|
129
|
+
opacity: 1;
|
|
130
|
+
transform: none;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* The system's "working" pulse — a dimming, not a shimmer. A skeleton that
|
|
135
|
+
shimmers implies a light source the White Reset does not have. */
|
|
136
|
+
@keyframes folio-pulse {
|
|
137
|
+
0% {
|
|
138
|
+
opacity: 0.6;
|
|
139
|
+
}
|
|
140
|
+
50% {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
}
|
|
143
|
+
100% {
|
|
144
|
+
opacity: 0.6;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* The determinate/indeterminate bar's sweep. Travels 1.6× its own width so the
|
|
149
|
+
bar clears the track completely at each end. */
|
|
150
|
+
@keyframes folio-sweep {
|
|
151
|
+
0% {
|
|
152
|
+
transform: translateX(-100%);
|
|
153
|
+
}
|
|
154
|
+
100% {
|
|
155
|
+
transform: translateX(400%);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* The spinner. A rotation, and only a rotation — the arc that makes it read as
|
|
160
|
+
a spinner is drawn by the component's own conic gradient, not animated. */
|
|
161
|
+
@keyframes folio-spin {
|
|
162
|
+
to {
|
|
163
|
+
transform: rotate(360deg);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* The three-dot "thinking" run, staggered by delay at the call site. */
|
|
168
|
+
@keyframes folio-bounce-dot {
|
|
169
|
+
0%,
|
|
170
|
+
80%,
|
|
171
|
+
100% {
|
|
172
|
+
opacity: 0.25;
|
|
173
|
+
transform: translateY(0);
|
|
174
|
+
}
|
|
175
|
+
40% {
|
|
176
|
+
opacity: 1;
|
|
177
|
+
transform: translateY(-3px);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* A live indicator's halo. Grows and dissolves; never loops a hard edge. */
|
|
182
|
+
@keyframes folio-halo {
|
|
183
|
+
0% {
|
|
184
|
+
transform: scale(1);
|
|
185
|
+
opacity: 0.55;
|
|
186
|
+
}
|
|
187
|
+
70% {
|
|
188
|
+
transform: scale(2.6);
|
|
189
|
+
opacity: 0;
|
|
190
|
+
}
|
|
191
|
+
100% {
|
|
192
|
+
opacity: 0;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* A disclosure panel opening and closing. Radix measures the panel and
|
|
197
|
+
publishes its height as --radix-accordion-content-height, so the panel
|
|
198
|
+
animates to its REAL height rather than to a guessed max-height — which is
|
|
199
|
+
what makes a long answer open at the same speed as a short one instead of
|
|
200
|
+
sitting still for half the duration. */
|
|
201
|
+
@keyframes folio-accordion-down {
|
|
202
|
+
from {
|
|
203
|
+
height: 0;
|
|
204
|
+
}
|
|
205
|
+
to {
|
|
206
|
+
height: var(--radix-accordion-content-height);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@keyframes folio-accordion-up {
|
|
211
|
+
from {
|
|
212
|
+
height: var(--radix-accordion-content-height);
|
|
213
|
+
}
|
|
214
|
+
to {
|
|
215
|
+
height: 0;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* The same idea for a lone disclosure. Radix publishes the measured height as
|
|
220
|
+
--radix-collapsible-content-height. */
|
|
221
|
+
@keyframes folio-collapsible-down {
|
|
222
|
+
from {
|
|
223
|
+
height: 0;
|
|
224
|
+
}
|
|
225
|
+
to {
|
|
226
|
+
height: var(--radix-collapsible-content-height);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@keyframes folio-collapsible-up {
|
|
231
|
+
from {
|
|
232
|
+
height: var(--radix-collapsible-content-height);
|
|
233
|
+
}
|
|
234
|
+
to {
|
|
235
|
+
height: 0;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* ─── Reduced motion ───
|
|
240
|
+
Two rules, and the argument behind them matters more than the CSS does.
|
|
241
|
+
|
|
242
|
+
This began as one opt-in rule: a surface that animated carried
|
|
243
|
+
`data-folio-animated`, and that attribute was what got cancelled. It was
|
|
244
|
+
forgotten four times — Accordion's panel, CollapsibleSection's panel,
|
|
245
|
+
SheetContent's slide, AppShell's drawer — by four authors across four
|
|
246
|
+
components. A mechanism four people independently fail to remember is not
|
|
247
|
+
being failed by its authors; it is failing them. The other half of the old
|
|
248
|
+
selector, `[class*='folio-anim']`, matched nothing whatsoever: Tailwind emits
|
|
249
|
+
`animate-[folio-collapsible-down_…]`, which contains no `folio-anim`, so half
|
|
250
|
+
the kill switch had never once fired and nothing anywhere said so.
|
|
251
|
+
|
|
252
|
+
So the GUARANTEE is now the universal rule below, deliberately the well-worn
|
|
253
|
+
one. It cannot be forgotten because there is nothing to remember: a new
|
|
254
|
+
component is covered before its author has heard of this file. It also
|
|
255
|
+
reaches `transition-duration`, which the old rule never did — and a panel
|
|
256
|
+
that slides is usually written as a transition, not a keyframe, which is how
|
|
257
|
+
two of the four escaped.
|
|
258
|
+
|
|
259
|
+
The cost, stated plainly: this is a `*` rule in a stylesheet consumers
|
|
260
|
+
import, so it reaches their components too. That is intended. It fires only
|
|
261
|
+
when the reader has asked their operating system for less motion, and this
|
|
262
|
+
package already asserts base styles on `*` (see index.css). A caller with
|
|
263
|
+
motion they consider essential can still keep it — `!important` on `*` is
|
|
264
|
+
the weakest `!important` there is, so any class-level
|
|
265
|
+
`animation-duration: … !important` outranks it. What changes is the default:
|
|
266
|
+
keeping motion under this preference becomes something you write down and
|
|
267
|
+
defend, instead of something you get by forgetting. That inversion is the
|
|
268
|
+
whole point of the change.
|
|
269
|
+
|
|
270
|
+
0.01ms rather than `none`, because JavaScript listens. Radix unmounts a
|
|
271
|
+
closing panel on `animationend`; consumer code may await `transitionend`. A
|
|
272
|
+
near-zero duration still fires both, where `none` fires neither. It is the
|
|
273
|
+
reset's least obvious detail and the reason it is written this way wherever
|
|
274
|
+
it appears.
|
|
275
|
+
|
|
276
|
+
`[data-folio-animated]` stays, and is no longer load-bearing. It is a
|
|
277
|
+
component asserting that its motion is decorative, and it goes further than
|
|
278
|
+
the floor above by removing the animation outright rather than running an
|
|
279
|
+
instant frame of it. Read it as documentation with teeth. Do NOT read it as
|
|
280
|
+
the thing that makes reduced motion work — believing that was the mistake
|
|
281
|
+
this replaced. `src/__tests__/reduced-motion.test.tsx` holds both ends: it
|
|
282
|
+
fails if this block stops being universal, if it stops naming transitions,
|
|
283
|
+
if it grows another selector that matches nothing, or if a component reaches
|
|
284
|
+
for a keyframe here without making the assertion. */
|
|
285
|
+
@media (prefers-reduced-motion: reduce) {
|
|
286
|
+
*,
|
|
287
|
+
::before,
|
|
288
|
+
::after {
|
|
289
|
+
animation-delay: 0ms !important;
|
|
290
|
+
animation-duration: 0.01ms !important;
|
|
291
|
+
animation-iteration-count: 1 !important;
|
|
292
|
+
transition-delay: 0ms !important;
|
|
293
|
+
transition-duration: 0.01ms !important;
|
|
294
|
+
scroll-behavior: auto !important;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
[data-folio-animated] {
|
|
298
|
+
animation: none !important;
|
|
299
|
+
}
|
|
300
|
+
}
|
package/dist/lib/cn.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Join class names, and let the LAST one win.
|
|
5
|
+
*
|
|
6
|
+
* Every component in this package ends its class list with the caller's
|
|
7
|
+
* `className`, which is the only way an override is expressible. With plain
|
|
8
|
+
* `clsx` that override does not actually override: `clsx('px-6', 'px-2')` emits
|
|
9
|
+
* both, and which one applies is decided by the order Tailwind happened to emit
|
|
10
|
+
* the two utilities into the stylesheet — not by the call site. A caller
|
|
11
|
+
* tightening a button's padding therefore worked or did not depending on a
|
|
12
|
+
* detail neither side can see.
|
|
13
|
+
*
|
|
14
|
+
* `twMerge` resolves conflicts by utility GROUP, so `px-2` replaces `px-6`,
|
|
15
|
+
* `text-(--ink-2)` replaces `text-(--ink)`, and unrelated classes are left
|
|
16
|
+
* alone. Use this everywhere a caller's `className` is merged; `clsx` alone is
|
|
17
|
+
* still right for building a conditional list that no caller extends.
|
|
18
|
+
*/
|
|
19
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
20
|
+
|
|
21
|
+
export { cn };
|
package/dist/lib/cn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/cn.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\n/**\n * Join class names, and let the LAST one win.\n *\n * Every component in this package ends its class list with the caller's\n * `className`, which is the only way an override is expressible. With plain\n * `clsx` that override does not actually override: `clsx('px-6', 'px-2')` emits\n * both, and which one applies is decided by the order Tailwind happened to emit\n * the two utilities into the stylesheet — not by the call site. A caller\n * tightening a button's padding therefore worked or did not depending on a\n * detail neither side can see.\n *\n * `twMerge` resolves conflicts by utility GROUP, so `px-2` replaces `px-6`,\n * `text-(--ink-2)` replaces `text-(--ink)`, and unrelated classes are left\n * alone. Use this everywhere a caller's `className` is merged; `clsx` alone is\n * still right for building a conditional list that no caller extends.\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs))\n}\n"],"mappings":"AAAA,SAAS,YAA6B;AACtC,SAAS,eAAe;AAkBjB,SAAS,MAAM,QAA8B;AAClD,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;","names":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS colour maths, with no dependency and no DOM.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from DialKit (https://github.com/joshpuckett/dialkit), MIT licensed:
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Josh Puckett
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
9
|
+
* copy of this software and associated documentation files (the "Software"),
|
|
10
|
+
* to deal in the Software without restriction, including without limitation
|
|
11
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
12
|
+
* and/or sell copies of the Software, and to permit persons to whom the
|
|
13
|
+
* Software is furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in
|
|
16
|
+
* all copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* The working space is OKLCH, and that is the substantive choice here rather
|
|
19
|
+
* than an implementation detail. A picker built on HSV hands a reader two
|
|
20
|
+
* colours at the same "lightness" where one of them is visibly darker, because
|
|
21
|
+
* HSV's lightness is a property of the numbers rather than of the eye. Every
|
|
22
|
+
* decision in `ColorPicker` — where the handle sits, what the hue strip looks
|
|
23
|
+
* like at this lightness, which colours are reachable at all — depends on a
|
|
24
|
+
* space that is perceptually uniform, and OKLCH is the one CSS ships.
|
|
25
|
+
*
|
|
26
|
+
* The matrices are the CSS Color 4 reference implementation's, D65.
|
|
27
|
+
* https://www.w3.org/TR/css-color-4/#color-conversion-code
|
|
28
|
+
*/
|
|
29
|
+
/** A colour in OKLCH: lightness 0–1, chroma, hue in degrees, alpha 0–1. */
|
|
30
|
+
interface Color {
|
|
31
|
+
l: number;
|
|
32
|
+
c: number;
|
|
33
|
+
h: number;
|
|
34
|
+
a: number;
|
|
35
|
+
}
|
|
36
|
+
/** The notations this module reads and writes. */
|
|
37
|
+
type ColorFormat = 'hex' | 'oklch' | 'p3';
|
|
38
|
+
/** The two RGB gamuts a colour can be fitted to. */
|
|
39
|
+
type ColorSpace = 'srgb' | 'p3';
|
|
40
|
+
type Triple = [number, number, number];
|
|
41
|
+
declare const clamp: (n: number, min?: number, max?: number) => number;
|
|
42
|
+
declare const wrapHue: (h: number) => number;
|
|
43
|
+
/** Gamma-encoded RGB in 0–1 to OKLCH. */
|
|
44
|
+
declare function rgbToColor(rgb: Triple, a?: number, space?: ColorSpace): Color;
|
|
45
|
+
/** OKLCH to gamma-encoded RGB in 0–1. May fall outside it — see `fitGamut`. */
|
|
46
|
+
declare function colorToRgb(color: Color, space?: ColorSpace): Triple;
|
|
47
|
+
declare function inGamut(color: Color, space?: ColorSpace): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Brings a colour inside a gamut by giving up CHROMA, and nothing else.
|
|
50
|
+
*
|
|
51
|
+
* The naive fix is to clip each channel at 0 and 1, which changes the hue and
|
|
52
|
+
* the lightness together — a vivid blue clipped that way comes back purple and
|
|
53
|
+
* darker. Bisecting on chroma keeps both, so what a reader loses is only the
|
|
54
|
+
* saturation the display could never have shown them.
|
|
55
|
+
*/
|
|
56
|
+
declare function fitGamut(color: Color, space?: ColorSpace): Color;
|
|
57
|
+
/** The most chroma a gamut holds at this lightness and hue — the plane's edge. */
|
|
58
|
+
declare function maxChroma(l: number, h: number, space?: ColorSpace): number;
|
|
59
|
+
/** Which notation a string is written in. Anything unrecognised reads as hex. */
|
|
60
|
+
declare function colorFormat(value: string): ColorFormat;
|
|
61
|
+
/**
|
|
62
|
+
* A colour as a CSS string.
|
|
63
|
+
*
|
|
64
|
+
* Hex and Display P3 are bounded output spaces, so the colour is fitted on the
|
|
65
|
+
* way out; OKLCH is not, and writing an out-of-gamut OKLCH is legitimate — the
|
|
66
|
+
* browser fits it to whatever the display actually has.
|
|
67
|
+
*/
|
|
68
|
+
declare function formatColor(color: Color, format: ColorFormat): string;
|
|
69
|
+
/**
|
|
70
|
+
* An absolute CSS colour as OKLCH, or `null` when the string is not one.
|
|
71
|
+
*
|
|
72
|
+
* Hex, `rgb()`, `hsl()`, `oklch()` and `color(display-p3 …)`, in both the
|
|
73
|
+
* comma and the space syntax. Named colours are deliberately absent: resolving
|
|
74
|
+
* them needs a table of a hundred and forty-eight entries or a DOM, and a
|
|
75
|
+
* picker that accepts "rebeccapurple" but not "papayawhip" is worse than one
|
|
76
|
+
* that accepts neither.
|
|
77
|
+
*/
|
|
78
|
+
declare function parseColor(value: string): Color | null;
|
|
79
|
+
|
|
80
|
+
export { type Color, type ColorFormat, type ColorSpace, clamp, colorFormat, colorToRgb, fitGamut, formatColor, inGamut, maxChroma, parseColor, rgbToColor, wrapHue };
|