@misoto22/design 0.7.0 → 0.9.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 +87 -0
- package/CLAUDE.md +1 -0
- package/README.md +50 -5
- package/bin/misoto22-design.mjs +59 -13
- package/dist/agent/Accordion.md +24 -1
- package/dist/agent/Alert.md +23 -1
- package/dist/agent/AppShell.md +30 -2
- package/dist/agent/ArchitectureFigure.md +25 -2
- package/dist/agent/AreaChart.md +27 -2
- package/dist/agent/Article.md +26 -3
- package/dist/agent/AspectRatio.md +57 -0
- package/dist/agent/Avatar.md +25 -5
- package/dist/agent/Badge.md +22 -1
- package/dist/agent/BarChart.md +29 -2
- package/dist/agent/BarList.md +27 -1
- package/dist/agent/BigNumber.md +26 -2
- package/dist/agent/BoxPlot.md +24 -1
- package/dist/agent/Breadcrumb.md +24 -2
- package/dist/agent/BulletChart.md +23 -1
- package/dist/agent/Button.md +25 -1
- package/dist/agent/Calendar.md +37 -3
- package/dist/agent/Card.md +24 -2
- package/dist/agent/Checkbox.md +23 -2
- package/dist/agent/Code.md +50 -0
- package/dist/agent/CodeBlock.md +74 -0
- package/dist/agent/Collapsible.md +22 -1
- package/dist/agent/ColorPicker.md +75 -0
- package/dist/agent/Combobox.md +29 -3
- package/dist/agent/Command.md +25 -2
- package/dist/agent/ComposedChart.md +26 -2
- package/dist/agent/ContextMenu.md +37 -4
- package/dist/agent/DataflowFigure.md +22 -1
- package/dist/agent/DatePicker.md +34 -6
- package/dist/agent/DescriptionList.md +68 -0
- package/dist/agent/Diagram.md +27 -3
- package/dist/agent/DiagramCanvas.md +24 -1
- package/dist/agent/DiagramExportMenu.md +29 -3
- package/dist/agent/DiagramInspector.md +23 -1
- package/dist/agent/DiagramLegend.md +22 -1
- package/dist/agent/DiagramMinimap.md +24 -4
- package/dist/agent/DiagramToolbar.md +23 -1
- package/dist/agent/Dialog.md +26 -3
- package/dist/agent/DropdownMenu.md +45 -6
- package/dist/agent/EmptyState.md +26 -1
- package/dist/agent/ErrorState.md +27 -2
- package/dist/agent/Facet.md +25 -1
- package/dist/agent/Field.md +45 -4
- package/dist/agent/FigureBand.md +24 -1
- package/dist/agent/FloatingIconButton.md +23 -1
- package/dist/agent/FunnelChart.md +23 -1
- package/dist/agent/Heading.md +64 -0
- package/dist/agent/Heatmap.md +25 -1
- package/dist/agent/Histogram.md +26 -2
- package/dist/agent/Input.md +22 -1
- package/dist/agent/Kbd.md +19 -1
- package/dist/agent/LifecycleFigure.md +22 -1
- package/dist/agent/LineChart.md +26 -2
- package/dist/agent/LinkArrow.md +20 -1
- package/dist/agent/Markdown.md +68 -0
- package/dist/agent/NativeSelect.md +23 -2
- package/dist/agent/NavItem.md +21 -1
- package/dist/agent/NumberField.md +72 -0
- package/dist/agent/Pagination.md +28 -2
- package/dist/agent/PieChart.md +26 -2
- package/dist/agent/Popover.md +23 -1
- package/dist/agent/Progress.md +27 -3
- package/dist/agent/RadarChart.md +26 -2
- package/dist/agent/RadialChart.md +26 -3
- package/dist/agent/RadioGroup.md +23 -2
- package/dist/agent/SankeyChart.md +25 -2
- package/dist/agent/ScatterChart.md +27 -2
- package/dist/agent/ScrollArea.md +24 -3
- package/dist/agent/SearchableMenu.md +23 -1
- package/dist/agent/Select.md +29 -3
- package/dist/agent/Separator.md +28 -4
- package/dist/agent/SequenceFigure.md +23 -1
- package/dist/agent/Sheet.md +25 -2
- package/dist/agent/Sidebar.md +193 -0
- package/dist/agent/Skeleton.md +24 -2
- package/dist/agent/Slider.md +31 -4
- package/dist/agent/Sparkline.md +23 -1
- package/dist/agent/Spinner.md +24 -2
- package/dist/agent/StatusDot.md +20 -1
- package/dist/agent/StatusPill.md +28 -2
- package/dist/agent/Steps.md +24 -1
- package/dist/agent/Switch.md +21 -1
- package/dist/agent/Table.md +28 -3
- package/dist/agent/Tabs.md +24 -2
- package/dist/agent/Tag.md +40 -9
- package/dist/agent/Text.md +65 -0
- package/dist/agent/Textarea.md +20 -1
- package/dist/agent/Timestamp.md +64 -0
- package/dist/agent/Toast.md +26 -2
- package/dist/agent/ToggleGroup.md +24 -2
- package/dist/agent/Toolbar.md +71 -0
- package/dist/agent/Tooltip.md +23 -1
- package/dist/agent/TreemapChart.md +24 -1
- package/dist/agent/WaterfallChart.md +24 -1
- package/dist/agent/WorkflowFigure.md +24 -2
- package/dist/agent/catalog.json +5915 -699
- package/dist/agent/index.md +20 -8
- package/dist/article.css +16 -4
- package/dist/charts/AreaChart/AreaChart.d.ts +9 -2
- package/dist/charts/AreaChart/AreaChart.js +12 -13
- package/dist/charts/AreaChart/AreaChart.js.map +1 -1
- package/dist/charts/BarChart/BarChart.d.ts +14 -3
- package/dist/charts/BarChart/BarChart.js +20 -12
- package/dist/charts/BarChart/BarChart.js.map +1 -1
- package/dist/charts/BarList/BarList.d.ts +9 -1
- package/dist/charts/BarList/BarList.js +9 -1
- package/dist/charts/BarList/BarList.js.map +1 -1
- package/dist/charts/BigNumber/BigNumber.d.ts +19 -3
- package/dist/charts/BigNumber/BigNumber.js +25 -5
- package/dist/charts/BigNumber/BigNumber.js.map +1 -1
- package/dist/charts/BoxPlot/BoxPlot.js +4 -2
- package/dist/charts/BoxPlot/BoxPlot.js.map +1 -1
- package/dist/charts/BulletChart/BulletChart.js +44 -9
- package/dist/charts/BulletChart/BulletChart.js.map +1 -1
- package/dist/charts/ComposedChart/ComposedChart.d.ts +9 -2
- package/dist/charts/ComposedChart/ComposedChart.js +10 -10
- package/dist/charts/ComposedChart/ComposedChart.js.map +1 -1
- package/dist/charts/FunnelChart/FunnelChart.d.ts +7 -2
- package/dist/charts/FunnelChart/FunnelChart.js +6 -16
- package/dist/charts/FunnelChart/FunnelChart.js.map +1 -1
- package/dist/charts/Heatmap/Heatmap.d.ts +17 -3
- package/dist/charts/Heatmap/Heatmap.js +20 -11
- package/dist/charts/Heatmap/Heatmap.js.map +1 -1
- package/dist/charts/Histogram/Histogram.d.ts +24 -1
- package/dist/charts/Histogram/Histogram.js +43 -11
- package/dist/charts/Histogram/Histogram.js.map +1 -1
- package/dist/charts/LineChart/LineChart.d.ts +9 -2
- package/dist/charts/LineChart/LineChart.js +11 -12
- package/dist/charts/LineChart/LineChart.js.map +1 -1
- package/dist/charts/PieChart/PieChart.d.ts +15 -3
- package/dist/charts/PieChart/PieChart.js +14 -6
- package/dist/charts/PieChart/PieChart.js.map +1 -1
- package/dist/charts/RadarChart/RadarChart.d.ts +15 -3
- package/dist/charts/RadarChart/RadarChart.js +15 -11
- package/dist/charts/RadarChart/RadarChart.js.map +1 -1
- package/dist/charts/RadialChart/RadialChart.d.ts +22 -4
- package/dist/charts/RadialChart/RadialChart.js +28 -6
- package/dist/charts/RadialChart/RadialChart.js.map +1 -1
- package/dist/charts/SankeyChart/SankeyChart.d.ts +16 -4
- package/dist/charts/SankeyChart/SankeyChart.js +14 -6
- package/dist/charts/SankeyChart/SankeyChart.js.map +1 -1
- package/dist/charts/ScatterChart/ScatterChart.d.ts +24 -3
- package/dist/charts/ScatterChart/ScatterChart.js +21 -15
- package/dist/charts/ScatterChart/ScatterChart.js.map +1 -1
- package/dist/charts/Sparkline/Sparkline.js +5 -3
- package/dist/charts/Sparkline/Sparkline.js.map +1 -1
- package/dist/charts/TreemapChart/TreemapChart.d.ts +7 -2
- package/dist/charts/TreemapChart/TreemapChart.js +20 -11
- package/dist/charts/TreemapChart/TreemapChart.js.map +1 -1
- package/dist/charts/WaterfallChart/WaterfallChart.js +4 -2
- package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -1
- package/dist/charts/lib/export.d.ts +1 -0
- package/dist/charts/lib/figure.d.ts +21 -1
- package/dist/charts/lib/figure.js +5 -2
- package/dist/charts/lib/figure.js.map +1 -1
- 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/toolbar.d.ts +1 -0
- package/dist/components/Accordion/Accordion.js +8 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/AppShell/AppShell.d.ts +6 -0
- package/dist/components/AppShell/AppShell.js +34 -4
- package/dist/components/AppShell/AppShell.js.map +1 -1
- package/dist/components/Article/Article.d.ts +11 -4
- package/dist/components/Article/Article.js +13 -0
- package/dist/components/Article/Article.js.map +1 -1
- 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 +12 -3
- package/dist/components/Avatar/Avatar.js +6 -1
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +6 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +15 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.js +14 -0
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Calendar/Calendar.d.ts +29 -3
- package/dist/components/Calendar/Calendar.js +60 -12
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Card/Card.d.ts +6 -0
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +5 -2
- package/dist/components/Checkbox/Checkbox.js +12 -2
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- 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 +141 -0
- package/dist/components/CodeBlock/CodeBlock.js +123 -0
- package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
- package/dist/components/Collapsible/Collapsible.js +10 -2
- package/dist/components/Collapsible/Collapsible.js.map +1 -1
- 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 +15 -1
- package/dist/components/Combobox/Combobox.js +25 -5
- package/dist/components/Combobox/Combobox.js.map +1 -1
- package/dist/components/Command/Command.d.ts +4 -2
- package/dist/components/Command/Command.js +14 -2
- package/dist/components/Command/Command.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +30 -5
- package/dist/components/ContextMenu/ContextMenu.js +33 -3
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +36 -4
- package/dist/components/DatePicker/DatePicker.js +55 -12
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- 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 +8 -3
- package/dist/components/Diagram/Diagram.js +82 -10
- package/dist/components/Diagram/Diagram.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +18 -3
- package/dist/components/Dialog/Dialog.js +21 -3
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +49 -11
- package/dist/components/DropdownMenu/DropdownMenu.js +33 -3
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +25 -1
- package/dist/components/EmptyState/EmptyState.js +3 -1
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/ErrorState/ErrorState.d.ts +22 -1
- package/dist/components/ErrorState/ErrorState.js +12 -3
- package/dist/components/ErrorState/ErrorState.js.map +1 -1
- package/dist/components/Field/Field.d.ts +70 -3
- package/dist/components/Field/Field.js +53 -12
- package/dist/components/Field/Field.js.map +1 -1
- 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/FloatingIconButton/FloatingIconButton.js +2 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.js.map +1 -1
- 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/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/NativeSelect/NativeSelect.d.ts +6 -0
- package/dist/components/NativeSelect/NativeSelect.js +2 -3
- package/dist/components/NativeSelect/NativeSelect.js.map +1 -1
- package/dist/components/NavItem/NavItem.js +1 -1
- package/dist/components/NavItem/NavItem.js.map +1 -1
- 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/Pagination/Pagination.d.ts +24 -1
- package/dist/components/Pagination/Pagination.js +6 -3
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Progress/Progress.d.ts +17 -5
- package/dist/components/Progress/Progress.js +18 -6
- package/dist/components/Progress/Progress.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +6 -0
- package/dist/components/RadioGroup/RadioGroup.js +11 -1
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/ScrollArea/ScrollArea.d.ts +15 -0
- package/dist/components/ScrollArea/ScrollArea.js +2 -2
- package/dist/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/components/SearchableMenu/SearchableMenu.d.ts +11 -2
- package/dist/components/SearchableMenu/SearchableMenu.js +24 -2
- package/dist/components/SearchableMenu/SearchableMenu.js.map +1 -1
- package/dist/components/Select/Select.d.ts +18 -2
- package/dist/components/Select/Select.js +21 -4
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Separator/Separator.d.ts +21 -3
- package/dist/components/Separator/Separator.js +9 -1
- package/dist/components/Separator/Separator.js.map +1 -1
- package/dist/components/Sheet/Sheet.d.ts +3 -0
- package/dist/components/Sheet/Sheet.js +12 -3
- package/dist/components/Sheet/Sheet.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +349 -0
- package/dist/components/Sidebar/Sidebar.js +455 -0
- package/dist/components/Sidebar/Sidebar.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +8 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Slider/Slider.d.ts +42 -3
- package/dist/components/Slider/Slider.js +121 -30
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +8 -0
- package/dist/components/Spinner/Spinner.js +3 -2
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/StatusPill/StatusPill.d.ts +5 -0
- package/dist/components/StatusPill/StatusPill.js +6 -0
- package/dist/components/StatusPill/StatusPill.js.map +1 -1
- package/dist/components/Table/Table.d.ts +20 -0
- package/dist/components/Table/Table.js +3 -1
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Tabs/Tabs.js +7 -1
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +68 -9
- package/dist/components/Tag/Tag.js +50 -10
- package/dist/components/Tag/Tag.js.map +1 -1
- 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/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 +9 -1
- package/dist/components/Toast/Toast.js +27 -4
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +6 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +11 -1
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
- 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/diagrams/ArchitectureFigure/ArchitectureFigure.d.ts +6 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js +48 -8
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js.map +1 -1
- package/dist/diagrams/DataflowFigure/DataflowFigure.js +21 -2
- package/dist/diagrams/DataflowFigure/DataflowFigure.js.map +1 -1
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.d.ts +14 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.js +14 -7
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.js.map +1 -1
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.d.ts +38 -4
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js +14 -16
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js.map +1 -1
- package/dist/diagrams/DiagramInspector/DiagramInspector.js +2 -2
- package/dist/diagrams/DiagramInspector/DiagramInspector.js.map +1 -1
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.d.ts +23 -7
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.js +45 -18
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.js.map +1 -1
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.js +44 -12
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.js.map +1 -1
- package/dist/diagrams/SequenceFigure/SequenceFigure.js +35 -5
- package/dist/diagrams/SequenceFigure/SequenceFigure.js.map +1 -1
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.d.ts +3 -1
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.js +76 -28
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.js.map +1 -1
- package/dist/diagrams/index.d.ts +1 -0
- package/dist/diagrams/index.js +10 -0
- package/dist/diagrams/index.js.map +1 -1
- 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 +48 -7
- package/dist/diagrams/lib/frame.js +17 -2
- package/dist/diagrams/lib/frame.js.map +1 -1
- package/dist/diagrams/lib/route.d.ts +22 -1
- package/dist/diagrams/lib/route.js +24 -1
- package/dist/diagrams/lib/route.js.map +1 -1
- package/dist/diagrams/lib/wires.js +9 -5
- package/dist/diagrams/lib/wires.js.map +1 -1
- package/dist/diagrams/spec.d.ts +64 -12
- package/dist/index.d.ts +19 -4
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/keyframes.css +57 -3
- 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/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 +14 -4
- package/dist/lib/overlay-container.js.map +1 -1
- 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 +17 -6
- package/dist/styles.css +1 -1
- package/dist/themes.css +8 -0
- package/dist/tokens.css +86 -5
- package/dist/tokens.d.ts +4 -1
- package/dist/tokens.js +56 -36
- package/dist/tokens.json +56 -36
- package/llms.txt +35 -0
- package/package.json +5 -2
- package/skills/misoto22-design/evals/evals.json +84 -0
- package/skills/misoto22-design/rules/a11y.md +55 -3
- package/skills/misoto22-design/rules/forms.md +8 -1
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
4
|
+
import { NavItemProps } from '../NavItem/NavItem.js';
|
|
5
|
+
|
|
6
|
+
/** What happens to the rail when it is closed. See {@link SidebarProviderProps.collapsible}. */
|
|
7
|
+
type SidebarCollapsible = 'icon' | 'offcanvas' | 'none';
|
|
8
|
+
/** Which edge of the layout the rail is on. Logical, so it follows `dir`. */
|
|
9
|
+
type SidebarSide = 'start' | 'end';
|
|
10
|
+
/** How the rail meets the page. See {@link SidebarProviderProps.variant}. */
|
|
11
|
+
type SidebarVariant = 'flush' | 'inset' | 'floating';
|
|
12
|
+
/** Where the rail stops being a column. See {@link SidebarProviderProps.breakpoint}. */
|
|
13
|
+
type SidebarBreakpoint = 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
interface SidebarState {
|
|
15
|
+
/** Whether the rail is showing — the docked column, or the open drawer. */
|
|
16
|
+
open: boolean;
|
|
17
|
+
setOpen: (open: boolean) => void;
|
|
18
|
+
toggle: () => void;
|
|
19
|
+
collapsible: SidebarCollapsible;
|
|
20
|
+
/** True only in the state where labels are hidden and rows are icons. */
|
|
21
|
+
iconOnly: boolean;
|
|
22
|
+
side: SidebarSide;
|
|
23
|
+
variant: SidebarVariant;
|
|
24
|
+
/**
|
|
25
|
+
* True while the viewport is under the provider's breakpoint, where the rail
|
|
26
|
+
* is a drawer over the page rather than a column beside it.
|
|
27
|
+
*/
|
|
28
|
+
mobile: boolean;
|
|
29
|
+
/** The drawer covers its positioned ancestor rather than the window. */
|
|
30
|
+
contained: boolean;
|
|
31
|
+
/** The step below which the rail is a drawer, or `null` for never. */
|
|
32
|
+
breakpoint: SidebarBreakpoint | null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The rail's own state, for anything that has to answer to it.
|
|
36
|
+
*
|
|
37
|
+
* A page beside the rail needs it to reserve the right width; a control inside
|
|
38
|
+
* needs to know whether its label is being drawn.
|
|
39
|
+
*
|
|
40
|
+
* This one THROWS outside a provider, and the parts above do not, and the
|
|
41
|
+
* difference is who made the mistake. A part rendered on its own is somebody
|
|
42
|
+
* writing `<Sidebar>` to see what it looks like; a call to this hook is code
|
|
43
|
+
* asking for state that nothing is keeping, and returning a plausible default
|
|
44
|
+
* there is a layout that is wrong in one state and right in the other with
|
|
45
|
+
* nothing to say which.
|
|
46
|
+
*/
|
|
47
|
+
declare function useSidebar(): SidebarState;
|
|
48
|
+
interface SidebarProviderProps {
|
|
49
|
+
/** Controlled open state. Leave off to let the provider own it. */
|
|
50
|
+
open?: boolean;
|
|
51
|
+
defaultOpen?: boolean;
|
|
52
|
+
onOpenChange?: (open: boolean) => void;
|
|
53
|
+
/** What closing does to the rail. See {@link SidebarProps.collapsible}. */
|
|
54
|
+
collapsible?: SidebarCollapsible;
|
|
55
|
+
/**
|
|
56
|
+
* The keyboard shortcut that toggles the rail, as a single letter.
|
|
57
|
+
*
|
|
58
|
+
* `b`, with the platform's own modifier, because that is what every editor
|
|
59
|
+
* and every application shell already uses for the same thing. Pass `null`
|
|
60
|
+
* to bind nothing — an app that already owns that chord should not have it
|
|
61
|
+
* taken twice, and a rail that cannot be closed does not need a shortcut for
|
|
62
|
+
* closing it.
|
|
63
|
+
*/
|
|
64
|
+
shortcut?: string | null;
|
|
65
|
+
/** Which edge the rail is on. Logical: `end` is the right in LTR, the left in RTL. */
|
|
66
|
+
side?: SidebarSide;
|
|
67
|
+
/**
|
|
68
|
+
* How the rail meets the page.
|
|
69
|
+
*
|
|
70
|
+
* `flush` is a column with a hairline down its inner edge — the rail and the
|
|
71
|
+
* page are one surface divided by a line. `floating` lifts the rail off that
|
|
72
|
+
* surface as its own bordered panel with the page ground showing around it.
|
|
73
|
+
* `inset` is the same gesture the other way up: the rail sits on the page
|
|
74
|
+
* ground and `SidebarInset` draws the CONTENT as the panel.
|
|
75
|
+
*
|
|
76
|
+
* `floating` and `inset` both need a ground to sit on — put `bg-(--stone)` on
|
|
77
|
+
* the element holding the provider, or they are a panel on the same colour as
|
|
78
|
+
* the thing behind it.
|
|
79
|
+
*/
|
|
80
|
+
variant?: SidebarVariant;
|
|
81
|
+
/**
|
|
82
|
+
* The step below which the rail becomes a drawer over the page.
|
|
83
|
+
*
|
|
84
|
+
* A rail is a column when there is a column's worth of room and an overlay
|
|
85
|
+
* when there is not; below this the rail is `fixed`, covers the page from its
|
|
86
|
+
* own edge, and closes onto a scrim. `null` pins it as a column at every
|
|
87
|
+
* width, for a layout that is never narrow — an embedded console, a preview
|
|
88
|
+
* frame.
|
|
89
|
+
*
|
|
90
|
+
* Named, not a number: the switch is a media query in the stylesheet, and a
|
|
91
|
+
* class built from a runtime number is a class the compiler never emitted. It
|
|
92
|
+
* also puts the rail on the same four steps as the page around it.
|
|
93
|
+
*/
|
|
94
|
+
breakpoint?: SidebarBreakpoint | null;
|
|
95
|
+
/**
|
|
96
|
+
* A `localStorage` key under which the DOCKED state is remembered.
|
|
97
|
+
*
|
|
98
|
+
* A reader who put the rail away did not mean "until the next page". Only the
|
|
99
|
+
* docked state is kept: an open drawer is a thing a reader did to this screen,
|
|
100
|
+
* and restoring it on the next visit is a page that opens with its navigation
|
|
101
|
+
* over the top of itself.
|
|
102
|
+
*
|
|
103
|
+
* Read after mount, never during render — a value from storage in the first
|
|
104
|
+
* pass is a hydration mismatch, and the markup the server sent is the one the
|
|
105
|
+
* client has to agree with.
|
|
106
|
+
*/
|
|
107
|
+
persist?: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* The drawer covers its nearest positioned ancestor rather than the window.
|
|
110
|
+
*
|
|
111
|
+
* For a rail inside a bounded frame — a device preview, an embedded console,
|
|
112
|
+
* an example on a documentation page. `fixed` resolves against the viewport
|
|
113
|
+
* wherever the markup sits, so without this the drawer inside a 400px preview
|
|
114
|
+
* opens across the whole page it is previewed on. Give the frame `relative`.
|
|
115
|
+
*/
|
|
116
|
+
contained?: boolean;
|
|
117
|
+
children: ReactNode;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Holds whether the rail is open, and binds the shortcut that changes it.
|
|
121
|
+
*
|
|
122
|
+
* Separate from `Sidebar` itself because the answer is needed on BOTH sides of
|
|
123
|
+
* the layout: the rail draws itself from it, and the content beside the rail
|
|
124
|
+
* reserves width from it. A state that lived inside the rail could only ever
|
|
125
|
+
* be read downwards.
|
|
126
|
+
*/
|
|
127
|
+
declare function SidebarProvider({ open: controlled, defaultOpen, onOpenChange, collapsible, shortcut, side, variant, breakpoint, persist, contained, children, }: SidebarProviderProps): react.JSX.Element;
|
|
128
|
+
interface SidebarProps extends Omit<ComponentProps<'nav'>, 'children'> {
|
|
129
|
+
/**
|
|
130
|
+
* Names the landmark. Required: a page with two navigations in it announces
|
|
131
|
+
* two things called "navigation" unless each of them says which it is.
|
|
132
|
+
*/
|
|
133
|
+
label: string;
|
|
134
|
+
/**
|
|
135
|
+
* What the scrim behind the open drawer announces.
|
|
136
|
+
*
|
|
137
|
+
* It is a button — tapping beside a drawer closes it, and that has to be a
|
|
138
|
+
* control a keyboard and a screen reader can reach, not a decorated `<div>`.
|
|
139
|
+
*/
|
|
140
|
+
scrimLabel?: string;
|
|
141
|
+
children: ReactNode;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* A navigation rail down the side of an application.
|
|
145
|
+
*
|
|
146
|
+
* A `<nav>`, not an `<aside>`. The element decides the landmark, and a rail of
|
|
147
|
+
* links announced as "complementary" is not the one a screen reader user jumps
|
|
148
|
+
* to when they go looking for the navigation.
|
|
149
|
+
*
|
|
150
|
+
* Composed rather than configured: a rail is a header, a scrolling middle and a
|
|
151
|
+
* footer, and every product wants different things in all three. What this owns
|
|
152
|
+
* is the part that is the same everywhere — the width, the edge, the scroll
|
|
153
|
+
* behaviour, and what happens when it closes.
|
|
154
|
+
*
|
|
155
|
+
* **Closing has three shapes**, and `collapsible` on the provider picks one.
|
|
156
|
+
* `icon` keeps the rail and drops the labels, which is right when the rows are
|
|
157
|
+
* a fixed set a reader learns the shape of. `offcanvas` takes the whole rail
|
|
158
|
+
* away, which is right when the rows are a long index nobody memorises.
|
|
159
|
+
* `none` is a rail that does not close.
|
|
160
|
+
*
|
|
161
|
+
* The trigger belongs INSIDE the rail — `SidebarHeader` places it — rather than
|
|
162
|
+
* out in an application's masthead. A control that hides a thing should live on
|
|
163
|
+
* the thing: in the masthead it is one more anonymous icon in a row of them,
|
|
164
|
+
* and nothing connects it to the column it operates.
|
|
165
|
+
*
|
|
166
|
+
* **Under the provider's `breakpoint` it is a drawer**, not a column: `fixed`
|
|
167
|
+
* against its own edge, over a scrim, and `inert` while closed. Merely
|
|
168
|
+
* translating it off-screen is not closed — it keeps focus and it is still read
|
|
169
|
+
* aloud, so a shut drawer puts its whole index between the reader and the page
|
|
170
|
+
* they were on. The scrim is a real button, because tapping beside a drawer is
|
|
171
|
+
* how a drawer is closed and that gesture has to exist for a keyboard too.
|
|
172
|
+
*
|
|
173
|
+
* `fixed` resolves against the viewport unless an ancestor has a `transform`,
|
|
174
|
+
* `filter` or `perspective`, which makes that ancestor the containing block
|
|
175
|
+
* instead. Do not put one on an element wrapping the provider, or the drawer
|
|
176
|
+
* opens inside it.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* <SidebarProvider>
|
|
180
|
+
* <Sidebar label="Documentation">
|
|
181
|
+
* <SidebarHeader>Acme</SidebarHeader>
|
|
182
|
+
* <SidebarContent>
|
|
183
|
+
* <SidebarGroup label="Guide" count={2}>
|
|
184
|
+
* <SidebarItem href="/start" icon={Home}>Getting started</SidebarItem>
|
|
185
|
+
* </SidebarGroup>
|
|
186
|
+
* </SidebarContent>
|
|
187
|
+
* </Sidebar>
|
|
188
|
+
* </SidebarProvider>
|
|
189
|
+
*/
|
|
190
|
+
declare function Sidebar({ label, scrimLabel, className, children, ...rest }: SidebarProps): react.JSX.Element;
|
|
191
|
+
/**
|
|
192
|
+
* The page beside the rail.
|
|
193
|
+
*
|
|
194
|
+
* Every layout built on this component was writing the same
|
|
195
|
+
* `flex min-w-0 flex-1 flex-col` by hand, and `min-w-0` is the half everybody
|
|
196
|
+
* forgets: a flex child's floor is its content, so one wide table inside pushes
|
|
197
|
+
* the whole page past the viewport and takes the rail's width with it.
|
|
198
|
+
*
|
|
199
|
+
* It is also the other half of `variant="inset"`. There the rail is the ground
|
|
200
|
+
* and this is the panel — a bordered `--paper` surface with the ground showing
|
|
201
|
+
* around it — which is why the variant lives on the provider rather than on
|
|
202
|
+
* either piece: one setting, two components, and no way to set half of it.
|
|
203
|
+
*
|
|
204
|
+
* A `<div>`, not a `<main>`. What goes in here is usually a masthead AND the
|
|
205
|
+
* page under it, and only one of those is the main landmark.
|
|
206
|
+
*/
|
|
207
|
+
declare function SidebarInset({ className, children, ...rest }: ComponentProps<'div'>): react.JSX.Element;
|
|
208
|
+
/**
|
|
209
|
+
* The block at the top of the rail: a brand, a workspace, a switcher.
|
|
210
|
+
*
|
|
211
|
+
* It is also where `SidebarTrigger` belongs, and the layout assumes one:
|
|
212
|
+
* anything passed as `children` takes the space and the trigger sits at the
|
|
213
|
+
* inline end of the row.
|
|
214
|
+
*/
|
|
215
|
+
declare function SidebarHeader({ className, children, ...rest }: ComponentProps<'div'>): react.JSX.Element;
|
|
216
|
+
/** The scrolling middle. Everything that is a list of places goes here. */
|
|
217
|
+
declare function SidebarContent({ className, children, ...rest }: ComponentProps<'div'>): react.JSX.Element;
|
|
218
|
+
/**
|
|
219
|
+
* The block at the bottom: the utilities, the account, the thing a rail ends on.
|
|
220
|
+
*
|
|
221
|
+
* A separate landmark from the content above it because it is a separate kind
|
|
222
|
+
* of thing — a reader scanning the index does not want Trash and Help in it.
|
|
223
|
+
*/
|
|
224
|
+
declare function SidebarFooter({ className, children, ...rest }: ComponentProps<'div'>): react.JSX.Element;
|
|
225
|
+
/** A rule between blocks of rows, inset to the rail's own padding. */
|
|
226
|
+
declare function SidebarSeparator({ className, ...rest }: ComponentProps<'hr'>): react.JSX.Element;
|
|
227
|
+
interface SidebarTriggerProps extends ComponentProps<'button'> {
|
|
228
|
+
/** What the button announces. Both states, because it says both things. */
|
|
229
|
+
labels?: {
|
|
230
|
+
open: string;
|
|
231
|
+
close: string;
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* The control that opens and closes the rail.
|
|
236
|
+
*
|
|
237
|
+
* Its accessible name changes with what it will DO, and `aria-expanded` reports
|
|
238
|
+
* what is true now — a button permanently called "Toggle sidebar" tells a
|
|
239
|
+
* screen reader user nothing about which way it will go.
|
|
240
|
+
*/
|
|
241
|
+
declare function SidebarTrigger({ labels, className, onClick, ...rest }: SidebarTriggerProps): react.JSX.Element;
|
|
242
|
+
interface SidebarGroupProps {
|
|
243
|
+
/** The heading over the rows. */
|
|
244
|
+
label: string;
|
|
245
|
+
/** How many rows are inside, printed on the far side of the heading. */
|
|
246
|
+
count?: number;
|
|
247
|
+
/**
|
|
248
|
+
* A mark that belongs to the GROUP — "Beta", "3 new".
|
|
249
|
+
*
|
|
250
|
+
* Beside the label, not out at the end with the count: it qualifies the
|
|
251
|
+
* words, and a qualifier that has drifted to the other side of the row reads
|
|
252
|
+
* as a second, unrelated fact.
|
|
253
|
+
*/
|
|
254
|
+
badge?: ReactNode;
|
|
255
|
+
/**
|
|
256
|
+
* A control on the heading row — a menu, an "add" button.
|
|
257
|
+
*
|
|
258
|
+
* Sits between the label and the count, and is NOT rendered inside the
|
|
259
|
+
* heading's own button: a control nested in a control is one the keyboard
|
|
260
|
+
* reaches by pressing the thing it is inside.
|
|
261
|
+
*/
|
|
262
|
+
action?: ReactNode;
|
|
263
|
+
/** Whether the group folds at all. A group of two rows usually should not. */
|
|
264
|
+
collapsible?: boolean;
|
|
265
|
+
defaultOpen?: boolean;
|
|
266
|
+
children: ReactNode;
|
|
267
|
+
className?: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* A labelled block of rows, optionally foldable.
|
|
271
|
+
*
|
|
272
|
+
* The heading is the same SIZE as the rows beneath it and outranks them by
|
|
273
|
+
* weight and by ink. Both halves of that are corrections. Smaller, it inverted
|
|
274
|
+
* the hierarchy it exists to express — a group read as a footnote over a list
|
|
275
|
+
* rather than as a title over its own contents. In the MONO face, which is
|
|
276
|
+
* where it went next, ten of them stacked in a column read as a terminal
|
|
277
|
+
* listing: mono is this system's voice for code, metadata and figures, and a
|
|
278
|
+
* navigation heading is none of those. Rank belongs to weight and to a step up
|
|
279
|
+
* the ink ladder, which are the two signals that can outrank a row without
|
|
280
|
+
* changing what kind of thing it is.
|
|
281
|
+
*
|
|
282
|
+
* An open group draws a hairline down its rows. Fifty rows under seven headings
|
|
283
|
+
* have nothing in them saying which heading any given row belongs to — only the
|
|
284
|
+
* distance to the last one, which is gone the moment the list is scrolled.
|
|
285
|
+
*
|
|
286
|
+
* The whole block hides when the rail is collapsed to icons: a heading with no
|
|
287
|
+
* room for its own word is two or three letters and a number, and the rows are
|
|
288
|
+
* still there underneath as icons.
|
|
289
|
+
*/
|
|
290
|
+
declare function SidebarGroup({ label, count, badge, action, collapsible, defaultOpen, children, className, }: SidebarGroupProps): react.JSX.Element;
|
|
291
|
+
interface SidebarBranchProps {
|
|
292
|
+
/** The row's own words, and the name of the group it opens. */
|
|
293
|
+
label: string;
|
|
294
|
+
/** Drawn at the start of the row, and the whole of the row when collapsed. */
|
|
295
|
+
icon?: LucideIcon;
|
|
296
|
+
/** A count or a state at the end of the row. */
|
|
297
|
+
trailing?: ReactNode;
|
|
298
|
+
defaultOpen?: boolean;
|
|
299
|
+
open?: boolean;
|
|
300
|
+
onOpenChange?: (open: boolean) => void;
|
|
301
|
+
children: ReactNode;
|
|
302
|
+
className?: string;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* A row that opens onto more rows.
|
|
306
|
+
*
|
|
307
|
+
* The thing a rail is for and the thing a flat list of groups cannot do: a
|
|
308
|
+
* workspace with projects in it, a folder with documents in it, a service with
|
|
309
|
+
* its environments. `SidebarGroup` is a HEADING over a set — it is not itself a
|
|
310
|
+
* place, and it has no icon and no state. This is a place that contains places,
|
|
311
|
+
* so it is a row like any other and it carries the same icon, trailing slot and
|
|
312
|
+
* hover as its children.
|
|
313
|
+
*
|
|
314
|
+
* The children sit behind the same hairline a group draws, one indent further
|
|
315
|
+
* in, so nesting reads as depth rather than as two unrelated lists. Two levels
|
|
316
|
+
* is what the indent has room for at this width; a third is a tree, and a tree
|
|
317
|
+
* in a 16rem column is a horizontal scrollbar with an outline in it.
|
|
318
|
+
*
|
|
319
|
+
* Collapsed to icons the row becomes its icon and the children are not drawn —
|
|
320
|
+
* there is nowhere for an indent to go, and a nested icon under an unnested one
|
|
321
|
+
* is two glyphs with no visible relationship.
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* <SidebarBranch label="Acme HQ" icon={Building} defaultOpen>
|
|
325
|
+
* <SidebarItem href="/hq" icon={Home}>Home</SidebarItem>
|
|
326
|
+
* <SidebarItem href="/hq/tasks" icon={CheckSquare}>My tasks</SidebarItem>
|
|
327
|
+
* </SidebarBranch>
|
|
328
|
+
*/
|
|
329
|
+
declare function SidebarBranch({ label, icon: Icon, trailing, defaultOpen, open: controlled, onOpenChange, children, className, }: SidebarBranchProps): react.JSX.Element;
|
|
330
|
+
interface SidebarItemProps extends NavItemProps {
|
|
331
|
+
/** A count or a state on the far side of the row. Hidden with the label. */
|
|
332
|
+
trailing?: ReactNode;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* One row.
|
|
336
|
+
*
|
|
337
|
+
* `NavItem` with the two things a RAIL adds: a trailing slot, and an answer for
|
|
338
|
+
* the state where there is no room for words. Collapsed to icons the label is
|
|
339
|
+
* removed from the layout rather than hidden with CSS — a `sr-only` label still
|
|
340
|
+
* occupies the flex row's gap — and moves into a tooltip, because an icon on
|
|
341
|
+
* its own is a guess for everyone and unusable for a screen reader.
|
|
342
|
+
*
|
|
343
|
+
* A row with no `icon` keeps its label collapsed, since hiding it would leave a
|
|
344
|
+
* blank row: the icon is what makes the collapsed state legible, and a rail
|
|
345
|
+
* that collapses needs one on every row.
|
|
346
|
+
*/
|
|
347
|
+
declare function SidebarItem({ trailing, children, className, onClick, ...rest }: SidebarItemProps): react.JSX.Element;
|
|
348
|
+
|
|
349
|
+
export { Sidebar, SidebarBranch, type SidebarBranchProps, type SidebarBreakpoint, type SidebarCollapsible, SidebarContent, SidebarFooter, SidebarGroup, type SidebarGroupProps, SidebarHeader, SidebarInset, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarSeparator, type SidebarSide, SidebarTrigger, type SidebarTriggerProps, type SidebarVariant, useSidebar };
|