@keyfunc/keybricks-ds 1.0.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/DEPLOY.md +204 -0
- package/DESIGN.md +269 -0
- package/INTEGRATION.md +417 -0
- package/SKILL.md +32 -0
- package/_adherence.oxlintrc.json +1469 -0
- package/_scripts/build-index.mjs +80 -0
- package/_scripts/build-tokens.mjs +135 -0
- package/assets/icons/icon-index.js +1 -0
- package/assets/icons/icon-index.json +1 -0
- package/assets/icons/unicons-index.js +1 -0
- package/assets/icons/unicons-index.json +1 -0
- package/assets/keybricks-logo.png +0 -0
- package/components/_cards/accordion.card.html +32 -0
- package/components/_cards/action-chip.card.html +22 -0
- package/components/_cards/activity.card.html +34 -0
- package/components/_cards/alert.card.html +32 -0
- package/components/_cards/app-chrome.card.html +36 -0
- package/components/_cards/banner.card.html +21 -0
- package/components/_cards/brand-visual.card.html +43 -0
- package/components/_cards/breadcrumb.card.html +23 -0
- package/components/_cards/button-1-base.card.html +39 -0
- package/components/_cards/button-2-states.card.html +56 -0
- package/components/_cards/button-3-sizes-icons.card.html +32 -0
- package/components/_cards/button-4-group.card.html +47 -0
- package/components/_cards/canvas-zoom-controls.card.html +19 -0
- package/components/_cards/cards-indicators.card.html +59 -0
- package/components/_cards/charts-1-sparkline.card.html +55 -0
- package/components/_cards/charts-10-gauge.card.html +31 -0
- package/components/_cards/charts-11-funnel.card.html +28 -0
- package/components/_cards/charts-12-treemap.card.html +23 -0
- package/components/_cards/charts-14-radar.card.html +31 -0
- package/components/_cards/charts-15-distribution.card.html +32 -0
- package/components/_cards/charts-16-pareto.card.html +25 -0
- package/components/_cards/charts-17-candlestick.card.html +34 -0
- package/components/_cards/charts-18-sankey.card.html +29 -0
- package/components/_cards/charts-19-chord.card.html +31 -0
- package/components/_cards/charts-2-line.card.html +46 -0
- package/components/_cards/charts-20-sunburst.card.html +38 -0
- package/components/_cards/charts-21-worldmap.card.html +33 -0
- package/components/_cards/charts-22-gantt.card.html +37 -0
- package/components/_cards/charts-23-bar3d.card.html +26 -0
- package/components/_cards/charts-24-pie3d.card.html +32 -0
- package/components/_cards/charts-25-surface3d.card.html +24 -0
- package/components/_cards/charts-26-scatter3d.card.html +24 -0
- package/components/_cards/charts-27-ribbon3d.card.html +23 -0
- package/components/_cards/charts-3-bar.card.html +71 -0
- package/components/_cards/charts-4-barlist.card.html +30 -0
- package/components/_cards/charts-5-donut.card.html +35 -0
- package/components/_cards/charts-6-scatter.card.html +26 -0
- package/components/_cards/charts-7-heatmap.card.html +28 -0
- package/components/_cards/charts-8-waterfall.card.html +25 -0
- package/components/_cards/charts-9-bullet.card.html +31 -0
- package/components/_cards/charts-99-fullpage.card.html +194 -0
- package/components/_cards/checkbox.card.html +34 -0
- package/components/_cards/codeblock.card.html +19 -0
- package/components/_cards/combobox.card.html +25 -0
- package/components/_cards/context-menu.card.html +21 -0
- package/components/_cards/datatable.card.html +48 -0
- package/components/_cards/date-picker.card.html +31 -0
- package/components/_cards/diffvalue.card.html +21 -0
- package/components/_cards/divider.card.html +24 -0
- package/components/_cards/drawer.card.html +30 -0
- package/components/_cards/dropdown-menu.card.html +38 -0
- package/components/_cards/dropzone.card.html +22 -0
- package/components/_cards/empty-state.card.html +29 -0
- package/components/_cards/filter-bar.card.html +34 -0
- package/components/_cards/icon-button.card.html +27 -0
- package/components/_cards/icons-1-core.card.html +49 -0
- package/components/_cards/icons-2-feather.card.html +39 -0
- package/components/_cards/icons-3-unicons.card.html +44 -0
- package/components/_cards/input.card.html +25 -0
- package/components/_cards/kbd.card.html +20 -0
- package/components/_cards/keyvalue.card.html +23 -0
- package/components/_cards/listrow.card.html +30 -0
- package/components/_cards/loading.card.html +33 -0
- package/components/_cards/log-viewer.card.html +23 -0
- package/components/_cards/modal.card.html +35 -0
- package/components/_cards/multi-select.card.html +26 -0
- package/components/_cards/number-stepper.card.html +24 -0
- package/components/_cards/pagination.card.html +25 -0
- package/components/_cards/people.card.html +46 -0
- package/components/_cards/pipeline-node.card.html +76 -0
- package/components/_cards/pipeline-palette.card.html +54 -0
- package/components/_cards/search.card.html +23 -0
- package/components/_cards/select.card.html +23 -0
- package/components/_cards/slider.card.html +25 -0
- package/components/_cards/smart-table.card.html +37 -0
- package/components/_cards/spreadsheet.card.html +31 -0
- package/components/_cards/stepper.card.html +25 -0
- package/components/_cards/tabs.card.html +25 -0
- package/components/_cards/tag.card.html +26 -0
- package/components/_cards/textarea.card.html +27 -0
- package/components/_cards/timeline.card.html +32 -0
- package/components/_cards/toast.card.html +33 -0
- package/components/_cards/toggles.card.html +68 -0
- package/components/_cards/tooltip.card.html +22 -0
- package/components/_cards/tree.card.html +150 -0
- package/components/_shared/frame-theme.js +16 -0
- package/components/_shared/src-brand.js +1 -0
- package/components/_shared/src-buttons.js +1 -0
- package/components/_shared/src-charts.js +1 -0
- package/components/_shared/src-data.js +1 -0
- package/components/_shared/src-display.js +1 -0
- package/components/_shared/src-feedback.js +1 -0
- package/components/_shared/src-forms.js +1 -0
- package/components/_shared/src-icons.js +1 -0
- package/components/_shared/src-navigation.js +1 -0
- package/components/_shared/src-pipeline.js +1 -0
- package/components/_shared/src-tabs.js +1 -0
- package/components/_shared/svg-download.js +19 -0
- package/components/_shared/view-source.js +185 -0
- package/components/_vue/index.mjs +114 -0
- package/components/brand/BrandVisual.d.ts +17 -0
- package/components/brand/BrandVisual.jsx +29 -0
- package/components/brand/BrandVisual.vue +34 -0
- package/components/brand/_dir.card.html +13 -0
- package/components/brand/brandMotifs.js +210 -0
- package/components/buttons/ActionChip.d.ts +10 -0
- package/components/buttons/ActionChip.jsx +20 -0
- package/components/buttons/ActionChip.vue +18 -0
- package/components/buttons/Button.d.ts +40 -0
- package/components/buttons/Button.jsx +101 -0
- package/components/buttons/Button.vue +87 -0
- package/components/buttons/IconButton.d.ts +26 -0
- package/components/buttons/IconButton.jsx +28 -0
- package/components/buttons/IconButton.vue +21 -0
- package/components/buttons/_dir.card.html +13 -0
- package/components/buttons/buttons.prompt.md +19 -0
- package/components/charts/Bar3D.d.ts +15 -0
- package/components/charts/Bar3D.jsx +93 -0
- package/components/charts/Bar3D.vue +79 -0
- package/components/charts/BarChart.d.ts +23 -0
- package/components/charts/BarChart.jsx +135 -0
- package/components/charts/BarChart.vue +139 -0
- package/components/charts/BarList.d.ts +13 -0
- package/components/charts/BarList.jsx +31 -0
- package/components/charts/BarList.vue +25 -0
- package/components/charts/BoxPlot.d.ts +18 -0
- package/components/charts/BoxPlot.jsx +62 -0
- package/components/charts/BoxPlot.vue +58 -0
- package/components/charts/BulletChart.d.ts +12 -0
- package/components/charts/BulletChart.jsx +41 -0
- package/components/charts/BulletChart.vue +33 -0
- package/components/charts/CandlestickChart.d.ts +15 -0
- package/components/charts/CandlestickChart.jsx +63 -0
- package/components/charts/CandlestickChart.vue +62 -0
- package/components/charts/ChartKit.d.ts +8 -0
- package/components/charts/ChartKit.jsx +76 -0
- package/components/charts/ChartKit.vue +47 -0
- package/components/charts/ChordChart.d.ts +13 -0
- package/components/charts/ChordChart.jsx +55 -0
- package/components/charts/ChordChart.vue +54 -0
- package/components/charts/DonutChart.d.ts +15 -0
- package/components/charts/DonutChart.jsx +73 -0
- package/components/charts/DonutChart.vue +61 -0
- package/components/charts/FunnelChart.d.ts +11 -0
- package/components/charts/FunnelChart.jsx +37 -0
- package/components/charts/FunnelChart.vue +29 -0
- package/components/charts/GanttChart.d.ts +20 -0
- package/components/charts/GanttChart.jsx +80 -0
- package/components/charts/GanttChart.vue +60 -0
- package/components/charts/GaugeChart.d.ts +13 -0
- package/components/charts/GaugeChart.jsx +33 -0
- package/components/charts/GaugeChart.vue +29 -0
- package/components/charts/HeatmapChart.d.ts +13 -0
- package/components/charts/HeatmapChart.jsx +62 -0
- package/components/charts/HeatmapChart.vue +38 -0
- package/components/charts/Histogram.d.ts +16 -0
- package/components/charts/Histogram.jsx +56 -0
- package/components/charts/Histogram.vue +53 -0
- package/components/charts/LineChart.d.ts +17 -0
- package/components/charts/LineChart.jsx +84 -0
- package/components/charts/LineChart.vue +86 -0
- package/components/charts/ParetoChart.d.ts +13 -0
- package/components/charts/ParetoChart.jsx +54 -0
- package/components/charts/ParetoChart.vue +55 -0
- package/components/charts/Pie3D.d.ts +17 -0
- package/components/charts/Pie3D.jsx +145 -0
- package/components/charts/Pie3D.vue +115 -0
- package/components/charts/RadarChart.d.ts +14 -0
- package/components/charts/RadarChart.jsx +79 -0
- package/components/charts/RadarChart.vue +73 -0
- package/components/charts/Ribbon3D.d.ts +13 -0
- package/components/charts/Ribbon3D.jsx +89 -0
- package/components/charts/Ribbon3D.vue +79 -0
- package/components/charts/SankeyChart.d.ts +15 -0
- package/components/charts/SankeyChart.jsx +59 -0
- package/components/charts/SankeyChart.vue +53 -0
- package/components/charts/Scatter3D.d.ts +12 -0
- package/components/charts/Scatter3D.jsx +69 -0
- package/components/charts/Scatter3D.vue +59 -0
- package/components/charts/ScatterChart.d.ts +12 -0
- package/components/charts/ScatterChart.jsx +53 -0
- package/components/charts/ScatterChart.vue +57 -0
- package/components/charts/Sparkline.d.ts +19 -0
- package/components/charts/Sparkline.jsx +63 -0
- package/components/charts/Sparkline.vue +54 -0
- package/components/charts/SunburstChart.d.ts +12 -0
- package/components/charts/SunburstChart.jsx +61 -0
- package/components/charts/SunburstChart.vue +60 -0
- package/components/charts/Surface3D.d.ts +13 -0
- package/components/charts/Surface3D.jsx +70 -0
- package/components/charts/Surface3D.vue +63 -0
- package/components/charts/TreemapChart.d.ts +11 -0
- package/components/charts/TreemapChart.jsx +35 -0
- package/components/charts/TreemapChart.vue +27 -0
- package/components/charts/WaterfallChart.d.ts +11 -0
- package/components/charts/WaterfallChart.jsx +59 -0
- package/components/charts/WaterfallChart.vue +46 -0
- package/components/charts/WorldMap.d.ts +21 -0
- package/components/charts/WorldMap.jsx +107 -0
- package/components/charts/WorldMap.vue +73 -0
- package/components/charts/_dir.card.html +7 -0
- package/components/charts/chart-3d.js +84 -0
- package/components/charts/chart-geometry.js +223 -0
- package/components/charts/charts.prompt.md +24 -0
- package/components/data/CodeBlock.d.ts +9 -0
- package/components/data/CodeBlock.jsx +19 -0
- package/components/data/CodeBlock.vue +22 -0
- package/components/data/DataTable.d.ts +28 -0
- package/components/data/DataTable.jsx +32 -0
- package/components/data/DataTable.vue +25 -0
- package/components/data/DiffValue.d.ts +11 -0
- package/components/data/DiffValue.jsx +15 -0
- package/components/data/DiffValue.vue +13 -0
- package/components/data/FilterBar.d.ts +16 -0
- package/components/data/FilterBar.jsx +22 -0
- package/components/data/FilterBar.vue +23 -0
- package/components/data/KeyValue.d.ts +16 -0
- package/components/data/KeyValue.jsx +25 -0
- package/components/data/KeyValue.vue +26 -0
- package/components/data/ListRow.d.ts +14 -0
- package/components/data/ListRow.jsx +25 -0
- package/components/data/ListRow.vue +25 -0
- package/components/data/Pagination.d.ts +12 -0
- package/components/data/Pagination.jsx +27 -0
- package/components/data/Pagination.vue +24 -0
- package/components/data/SmartTable.d.ts +30 -0
- package/components/data/SmartTable.jsx +73 -0
- package/components/data/SmartTable.vue +74 -0
- package/components/data/Spreadsheet.d.ts +33 -0
- package/components/data/Spreadsheet.jsx +110 -0
- package/components/data/Spreadsheet.vue +95 -0
- package/components/data/_dir.card.html +13 -0
- package/components/data/data.prompt.md +33 -0
- package/components/display/Avatar.d.ts +21 -0
- package/components/display/Avatar.jsx +31 -0
- package/components/display/Avatar.vue +34 -0
- package/components/display/Badge.d.ts +27 -0
- package/components/display/Badge.jsx +40 -0
- package/components/display/Badge.vue +47 -0
- package/components/display/Card.d.ts +27 -0
- package/components/display/Card.jsx +27 -0
- package/components/display/Card.vue +28 -0
- package/components/display/Divider.d.ts +8 -0
- package/components/display/Divider.jsx +14 -0
- package/components/display/Divider.vue +13 -0
- package/components/display/Kbd.d.ts +7 -0
- package/components/display/Kbd.jsx +12 -0
- package/components/display/Kbd.vue +9 -0
- package/components/display/ProgressBar.d.ts +42 -0
- package/components/display/ProgressBar.jsx +70 -0
- package/components/display/ProgressBar.vue +69 -0
- package/components/display/Tag.d.ts +9 -0
- package/components/display/Tag.jsx +15 -0
- package/components/display/Tag.vue +15 -0
- package/components/display/_dir.card.html +13 -0
- package/components/display/display.prompt.md +30 -0
- package/components/feedback/Accordion.d.ts +13 -0
- package/components/feedback/Accordion.jsx +21 -0
- package/components/feedback/Accordion.vue +22 -0
- package/components/feedback/ActivityItem.d.ts +25 -0
- package/components/feedback/ActivityItem.jsx +39 -0
- package/components/feedback/ActivityItem.vue +46 -0
- package/components/feedback/Alert.d.ts +36 -0
- package/components/feedback/Alert.jsx +48 -0
- package/components/feedback/Alert.vue +59 -0
- package/components/feedback/Banner.d.ts +15 -0
- package/components/feedback/Banner.jsx +25 -0
- package/components/feedback/Banner.vue +25 -0
- package/components/feedback/ContextMenu.d.ts +8 -0
- package/components/feedback/ContextMenu.jsx +18 -0
- package/components/feedback/ContextMenu.vue +19 -0
- package/components/feedback/Drawer.d.ts +18 -0
- package/components/feedback/Drawer.jsx +26 -0
- package/components/feedback/Drawer.vue +24 -0
- package/components/feedback/Menu.d.ts +10 -0
- package/components/feedback/Menu.jsx +24 -0
- package/components/feedback/Menu.vue +21 -0
- package/components/feedback/Modal.d.ts +38 -0
- package/components/feedback/Modal.jsx +69 -0
- package/components/feedback/Modal.vue +65 -0
- package/components/feedback/Stepper.d.ts +9 -0
- package/components/feedback/Stepper.jsx +24 -0
- package/components/feedback/Stepper.vue +18 -0
- package/components/feedback/Timeline.d.ts +15 -0
- package/components/feedback/Timeline.jsx +27 -0
- package/components/feedback/Timeline.vue +21 -0
- package/components/feedback/_dir.card.html +13 -0
- package/components/feedback/feedback.prompt.md +35 -0
- package/components/forms/Checkbox.d.ts +13 -0
- package/components/forms/Checkbox.jsx +17 -0
- package/components/forms/Checkbox.vue +18 -0
- package/components/forms/Combobox.d.ts +13 -0
- package/components/forms/Combobox.jsx +34 -0
- package/components/forms/Combobox.vue +35 -0
- package/components/forms/DatePicker.d.ts +12 -0
- package/components/forms/DatePicker.jsx +48 -0
- package/components/forms/DatePicker.vue +46 -0
- package/components/forms/Dropzone.d.ts +20 -0
- package/components/forms/Dropzone.jsx +36 -0
- package/components/forms/Dropzone.vue +28 -0
- package/components/forms/Field.d.ts +13 -0
- package/components/forms/Field.jsx +13 -0
- package/components/forms/Field.vue +12 -0
- package/components/forms/Input.d.ts +18 -0
- package/components/forms/Input.jsx +35 -0
- package/components/forms/Input.vue +38 -0
- package/components/forms/MultiSelect.d.ts +14 -0
- package/components/forms/MultiSelect.jsx +33 -0
- package/components/forms/MultiSelect.vue +36 -0
- package/components/forms/NumberStepper.d.ts +13 -0
- package/components/forms/NumberStepper.jsx +15 -0
- package/components/forms/NumberStepper.vue +17 -0
- package/components/forms/Radio.vue +16 -0
- package/components/forms/RadioGroup.vue +11 -0
- package/components/forms/SearchInput.d.ts +12 -0
- package/components/forms/SearchInput.jsx +17 -0
- package/components/forms/SearchInput.vue +14 -0
- package/components/forms/Select.d.ts +14 -0
- package/components/forms/Select.jsx +17 -0
- package/components/forms/Select.vue +16 -0
- package/components/forms/Slider.d.ts +15 -0
- package/components/forms/Slider.jsx +21 -0
- package/components/forms/Slider.vue +23 -0
- package/components/forms/Switch.d.ts +31 -0
- package/components/forms/Switch.jsx +40 -0
- package/components/forms/Switch.vue +16 -0
- package/components/forms/_dir.card.html +13 -0
- package/components/forms/forms.prompt.md +23 -0
- package/components/icons/Icon.d.ts +19 -0
- package/components/icons/Icon.jsx +93 -0
- package/components/icons/Icon.prompt.md +8 -0
- package/components/icons/Icon.vue +12 -0
- package/components/icons/Unicon.d.ts +12 -0
- package/components/icons/Unicon.jsx +16 -0
- package/components/icons/Unicon.vue +15 -0
- package/components/icons/_dir.card.html +13 -0
- package/components/icons/feather-paths.js +2 -0
- package/components/icons/icon-paths.js +73 -0
- package/components/index.d.ts +87 -0
- package/components/index.js +110 -0
- package/components/navigation/Breadcrumb.d.ts +24 -0
- package/components/navigation/Breadcrumb.jsx +120 -0
- package/components/navigation/Breadcrumb.vue +94 -0
- package/components/navigation/DocTree.d.ts +18 -0
- package/components/navigation/DocTree.jsx +37 -0
- package/components/navigation/DocTree.vue +25 -0
- package/components/navigation/Sidebar.d.ts +29 -0
- package/components/navigation/Sidebar.jsx +75 -0
- package/components/navigation/Sidebar.vue +54 -0
- package/components/navigation/TopBar.d.ts +27 -0
- package/components/navigation/TopBar.jsx +44 -0
- package/components/navigation/TopBar.vue +51 -0
- package/components/navigation/Tree.d.ts +83 -0
- package/components/navigation/Tree.jsx +347 -0
- package/components/navigation/Tree.vue +258 -0
- package/components/navigation/_dir.card.html +13 -0
- package/components/navigation/navigation.prompt.md +22 -0
- package/components/pipeline/ConfigPanel.d.ts +18 -0
- package/components/pipeline/ConfigPanel.jsx +30 -0
- package/components/pipeline/ConfigPanel.vue +32 -0
- package/components/pipeline/DataPreview.d.ts +14 -0
- package/components/pipeline/DataPreview.jsx +24 -0
- package/components/pipeline/DataPreview.vue +21 -0
- package/components/pipeline/NodeCard.d.ts +47 -0
- package/components/pipeline/NodeCard.jsx +97 -0
- package/components/pipeline/NodeCard.vue +75 -0
- package/components/pipeline/PaletteItem.vue +15 -0
- package/components/pipeline/PaletteListItem.vue +15 -0
- package/components/pipeline/PalettePanel.d.ts +20 -0
- package/components/pipeline/PalettePanel.jsx +74 -0
- package/components/pipeline/PalettePanel.vue +45 -0
- package/components/pipeline/PipelineCanvas.d.ts +25 -0
- package/components/pipeline/PipelineCanvas.jsx +94 -0
- package/components/pipeline/PipelineCanvas.vue +73 -0
- package/components/pipeline/ZoomControls.d.ts +9 -0
- package/components/pipeline/ZoomControls.jsx +15 -0
- package/components/pipeline/ZoomControls.vue +15 -0
- package/components/pipeline/_dir.card.html +13 -0
- package/components/pipeline/pipeline.prompt.md +22 -0
- package/components/tabs/SegmentedControl.d.ts +11 -0
- package/components/tabs/SegmentedControl.jsx +21 -0
- package/components/tabs/SegmentedControl.vue +15 -0
- package/components/tabs/Tabs.d.ts +13 -0
- package/components/tabs/Tabs.jsx +52 -0
- package/components/tabs/Tabs.vue +39 -0
- package/components/tabs/ViewToggle.d.ts +8 -0
- package/components/tabs/ViewToggle.jsx +12 -0
- package/components/tabs/ViewToggle.vue +12 -0
- package/components/tabs/_dir.card.html +13 -0
- package/components/tabs/tabs.prompt.md +14 -0
- package/package.json +76 -0
- package/readme.md +150 -0
- package/styles.css +10 -0
- package/tokens/alpha.css +27 -0
- package/tokens/charts.css +55 -0
- package/tokens/colors-extended.css +40 -0
- package/tokens/colors.css +39 -0
- package/tokens/dark.css +96 -0
- package/tokens/fonts.css +4 -0
- package/tokens/interaction.css +48 -0
- package/tokens/layout.css +30 -0
- package/tokens/motion.css +22 -0
- package/tokens/tokens.d.ts +680 -0
- package/tokens/tokens.js +1018 -0
- package/tokens/tokens.json +2928 -0
- package/tokens/typography.css +22 -0
package/INTEGRATION.md
ADDED
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
# Keybricks Design System — Integration Guide
|
|
2
|
+
|
|
3
|
+
Everything a product team needs to render Keybricks UI in their own app. Three steps to
|
|
4
|
+
first paint; the rest of this file is reference.
|
|
5
|
+
|
|
6
|
+
**Two frameworks, one design.** Every component ships as both `<Name>.jsx` (React) and
|
|
7
|
+
`<Name>.vue` (Vue 3), reading the same CSS custom properties. A Button rendered by React
|
|
8
|
+
and a Button rendered by Vue are pixel-identical, because neither one owns its colors —
|
|
9
|
+
`styles.css` does.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Point npm at the GitLab Package Registry (once per machine, or commit an .npmrc)
|
|
17
|
+
npm config set @keyfunc:registry "https://gitlab.epm2demo.cn/api/v4/packages/npm/"
|
|
18
|
+
|
|
19
|
+
npm install @keyfunc/keybricks-ds
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
A project-local `.npmrc` is usually better than per-machine config — commit this next to
|
|
23
|
+
`package.json` so CI and new hires need no setup:
|
|
24
|
+
|
|
25
|
+
```ini
|
|
26
|
+
@keyfunc:registry=https://gitlab.epm2demo.cn/api/v4/packages/npm/
|
|
27
|
+
//gitlab.epm2demo.cn/api/v4/packages/npm/:_authToken=${GITLAB_TOKEN}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Not using a registry yet? A git dependency works with no publishing at all — the package
|
|
31
|
+
has no build step, so npm can use the checkout as-is:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
"@keyfunc/keybricks-ds": "git+ssh://git@gitlab.epm2demo.cn/Felix/keybricks-ds.git#v1.0.0"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Source-only package.** `.jsx` and `.vue` files are published as authored, so your
|
|
38
|
+
bundler compiles them. Vite (React) needs the package excluded from `optimizeDeps` and
|
|
39
|
+
included in the React plugin; Next.js needs `transpilePackages`. Both snippets, plus the
|
|
40
|
+
release and Pages setup, are in `DEPLOY.md`.
|
|
41
|
+
|
|
42
|
+
## 2. Load the stylesheet — once, at your app's entry point
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
import '@keyfunc/keybricks-ds/styles.css'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This one line brings in the fonts, the color ramps, the type scale, spacing, radii,
|
|
49
|
+
shadows, motion, the global press/focus layer, and the dark theme. **Nothing renders
|
|
50
|
+
correctly without it** — components reference `var(--action-primary)`, not hex codes.
|
|
51
|
+
|
|
52
|
+
Dark mode follows the OS automatically. To let users override it:
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
document.documentElement.dataset.theme = 'dark' // or 'light', or remove the attribute for auto
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 3. Use a component
|
|
59
|
+
|
|
60
|
+
**React**
|
|
61
|
+
|
|
62
|
+
```jsx
|
|
63
|
+
import { Button, Field, Input } from '@keyfunc/keybricks-ds'
|
|
64
|
+
|
|
65
|
+
export function LoginForm() {
|
|
66
|
+
return (
|
|
67
|
+
<form>
|
|
68
|
+
<Field label="Work email" required>
|
|
69
|
+
<Input type="email" placeholder="you@company.com" />
|
|
70
|
+
</Field>
|
|
71
|
+
<Button variant="primary" size="md">Sign in</Button>
|
|
72
|
+
</form>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Vue 3**
|
|
78
|
+
|
|
79
|
+
```vue
|
|
80
|
+
<script setup>
|
|
81
|
+
import Button from '@keyfunc/keybricks-ds/components/buttons/Button.vue'
|
|
82
|
+
import Field from '@keyfunc/keybricks-ds/components/forms/Field.vue'
|
|
83
|
+
import Input from '@keyfunc/keybricks-ds/components/forms/Input.vue'
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<template>
|
|
87
|
+
<form>
|
|
88
|
+
<Field label="Work email" required>
|
|
89
|
+
<Input type="email" placeholder="you@company.com" />
|
|
90
|
+
</Field>
|
|
91
|
+
<Button variant="primary" size="md">Sign in</Button>
|
|
92
|
+
</form>
|
|
93
|
+
</template>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
That is the whole integration. Everything below is reference material.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## What you can and cannot change
|
|
101
|
+
|
|
102
|
+
Props are the knobs the design system deliberately exposes. **`variant`, `size`, `icon`,
|
|
103
|
+
`disabled`, `loading` are yours to set.** The height, radius, exact blue, hover step, press
|
|
104
|
+
step, focus ring and dark-mode behavior are not — they live inside the component so that
|
|
105
|
+
every Button in every product looks like the same Button.
|
|
106
|
+
|
|
107
|
+
```jsx
|
|
108
|
+
<Button variant="primary" size="lg" icon="download">Export</Button> // ✅ intended
|
|
109
|
+
<Button style={{ background: '#0055ff', borderRadius: 2 }}>Export</Button> // ❌ breaks the system
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Need something the props don't cover? That is a design-system request, not a local
|
|
113
|
+
override — file an issue. Local overrides are how design systems die: six months on,
|
|
114
|
+
nobody knows which blue is correct.
|
|
115
|
+
|
|
116
|
+
**When you do need a one-off**, compose with tokens rather than raw values, so the piece
|
|
117
|
+
still flips correctly in dark mode:
|
|
118
|
+
|
|
119
|
+
```jsx
|
|
120
|
+
<div style={{ background: 'var(--bg-inset)', border: '1px solid var(--border-card)',
|
|
121
|
+
borderRadius: 'var(--radius-lg)', padding: 'var(--space-4)' }}>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Component index (118 components)
|
|
125
|
+
Import path is `@keyfunc/keybricks-ds/components/<group>/<Name>.jsx` (React) or `.vue` (Vue 3).
|
|
126
|
+
Every component has a sibling `.d.ts` with its full props contract, and each group has a
|
|
127
|
+
`.prompt.md` with usage notes.
|
|
128
|
+
|
|
129
|
+
### `brand/` — brand expression
|
|
130
|
+
| Component | What it's for |
|
|
131
|
+
| --- | --- |
|
|
132
|
+
| `BrandVisual` | Generative brand artwork for heroes, section headers and card headers. Seven motifs (`orbit`, `entropy`, `focal`, `manifold`, `tesseract`, `meridian`, `ledger`), each authored on one 1200×400 canvas and cropped to fill any box. Always dark — it does not follow the theme. Pass `children` to overlay headings. |
|
|
133
|
+
|
|
134
|
+
### `buttons/` — actions
|
|
135
|
+
| Component | What it's for |
|
|
136
|
+
| --- | --- |
|
|
137
|
+
| `Button` | The primary action element. 8 variants (primary, dark, outline, ghost, primary-soft, danger, danger-soft, text) × 3 sizes, with icon, loading and disabled states. |
|
|
138
|
+
| `IconButton` | Square glyph-only button for toolbars and headers. 4 sizes, danger and muted tones, toggle-on `active` state. |
|
|
139
|
+
| `ButtonGroup` | Joins buttons into a segmented control or split button — handles the shared borders and corner radii. |
|
|
140
|
+
| `ActionChip` | Compact pill action, used in toolbars and empty states. |
|
|
141
|
+
|
|
142
|
+
### `forms/` — data entry
|
|
143
|
+
| Component | What it's for |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| `Field` | Label + required marker + hint + error wrapper. Wrap every input in one. |
|
|
146
|
+
| `Input` | Single-line text input. Sizes, prefix/suffix, error and read-only states. |
|
|
147
|
+
| `Textarea` | Multi-line input with optional character counter and auto-resize. |
|
|
148
|
+
| `Select` | Native-feeling dropdown for a known list of options. |
|
|
149
|
+
| `Combobox` | Type-to-filter single select, with keyboard nav and a no-results row. |
|
|
150
|
+
| `MultiSelect` | Checkbox dropdown; picks render as removable tags with `+n` overflow. |
|
|
151
|
+
| `SearchInput` | Search field with a leading glyph and a clear button. |
|
|
152
|
+
| `Checkbox` | Two sizes, plus an indeterminate state for parent rows. |
|
|
153
|
+
| `Radio` / `RadioGroup` | Single choice from a small set; the group handles layout and keyboard arrows. |
|
|
154
|
+
| `Switch` | Immediate on/off toggle (no Save button). Two sizes. |
|
|
155
|
+
| `NumberStepper` | Numeric input with − / + buttons and min/max clamping. |
|
|
156
|
+
| `Slider` | Range input with a filled track, drag value bubble and optional min/max labels. |
|
|
157
|
+
| `DatePicker` | Text field plus a month-grid popover. Values are `YYYY-MM-DD` strings. |
|
|
158
|
+
| `Dropzone` | File drop target with hover, drag-over, uploaded and error states. |
|
|
159
|
+
|
|
160
|
+
### `data/` — tables and structured values
|
|
161
|
+
| Component | What it's for |
|
|
162
|
+
| --- | --- |
|
|
163
|
+
| `DataTable` | The standard table: sortable headers, per-column render functions, alignment, selection. |
|
|
164
|
+
| `SmartTable` | Notion/Airtable-style table — typed field columns, inline editing, row hover actions. |
|
|
165
|
+
| `Spreadsheet` | Excel-style grid: formula bar, frozen headers, range selection, `=SUM()` evaluation, sheet tabs. |
|
|
166
|
+
| `FilterBar` | List-report filter bar with variant title, wrapping filter fields, and Adapt Filters / Go. |
|
|
167
|
+
| `ListRow` | One row of a list view — icon, title, meta, trailing actions. |
|
|
168
|
+
| `Pagination` | Page controls with a row-range label and first/last disabled states. |
|
|
169
|
+
| `KeyValue` / `KeyValueList` | Label-and-value pairs for detail panels and summaries. |
|
|
170
|
+
| `DiffValue` | Before → after comparison, used in migration and confirmation steps. |
|
|
171
|
+
| `CodeBlock` | Monospace block with optional line numbers and a copy button. |
|
|
172
|
+
|
|
173
|
+
### `navigation/` — getting around
|
|
174
|
+
| Component | What it's for |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| `Sidebar` | The app's primary nav: collapsible sections, active state, footer items. `KEYBRICKS_NAV` is the product's real nav tree. |
|
|
177
|
+
| `TopBar` | Global header — search, notifications, theme toggle, avatar. |
|
|
178
|
+
| `PageHeading` | Page title with optional subtitle and right-aligned actions. |
|
|
179
|
+
| `PageToolbar` | Secondary bar under the heading: filters, view toggles, bulk actions. |
|
|
180
|
+
| `Breadcrumb` | Path trail; collapses to an ellipsis dropdown past `maxItems`. |
|
|
181
|
+
| `Tree` | Generic nested tree: cascading checkboxes with indeterminate parents (`checkStrictly` opts out), disabled nodes vs. locked checkboxes, `showLine` guides, async `loadData`, search highlight, drag to move into a folder, full keyboard nav. |
|
|
182
|
+
| `DocTree` | Document-oriented tree with file-type glyph hues. |
|
|
183
|
+
| `ThemeToggle` | Light/dark/auto switch. `applyStoredTheme()` restores the choice on load. |
|
|
184
|
+
|
|
185
|
+
### `tabs/` — switching views
|
|
186
|
+
| Component | What it's for |
|
|
187
|
+
| --- | --- |
|
|
188
|
+
| `Tabs` | Page-level underline tabs. |
|
|
189
|
+
| `PanelTabs` | Compact tabs inside a detail panel or drawer. |
|
|
190
|
+
| `PillTabs` | Filter/status tabs as pills. |
|
|
191
|
+
| `SegmentedControl` | Mutually exclusive options in one control; two sizes, optional icons. |
|
|
192
|
+
| `ViewToggle` | List/grid icon toggle. |
|
|
193
|
+
|
|
194
|
+
### `feedback/` — status, overlays, progress
|
|
195
|
+
| Component | What it's for |
|
|
196
|
+
| --- | --- |
|
|
197
|
+
| `Alert` | In-card message, 4 tones, with or without body copy. |
|
|
198
|
+
| `Banner` | Page-level notification strip with an inline action link. |
|
|
199
|
+
| `Toast` / `ToastStack` | Transient confirmations. The stack handles positioning and queueing. |
|
|
200
|
+
| `Modal` | Centered dialog over a scrim, with footer actions. |
|
|
201
|
+
| `Drawer` | Right slide-out detail or settings panel. |
|
|
202
|
+
| `Tooltip` | Hover hint on any element. |
|
|
203
|
+
| `Menu` / `ContextMenu` | Dropdown and right-click menus, with separators and destructive items. |
|
|
204
|
+
| `Accordion` | Collapsible sections for long forms and settings. |
|
|
205
|
+
| `Stepper` | Multi-step flow header — done, current, upcoming. |
|
|
206
|
+
| `Timeline` | Vertical activity feed with toned icon nodes. |
|
|
207
|
+
| `ActivityItem` / `DotActivity` | Activity rows: full row with action, or compact status dot line. |
|
|
208
|
+
| `LogViewer` | Monospace run log with info/warn/error line colors. |
|
|
209
|
+
| `EmptyState` | First-run, no-results and error states with an optional action. |
|
|
210
|
+
| `Skeleton` / `Spinner` | Loading placeholders and the inline busy indicator. |
|
|
211
|
+
|
|
212
|
+
### `display/` — presenting values
|
|
213
|
+
| Component | What it's for |
|
|
214
|
+
| --- | --- |
|
|
215
|
+
| `Card` | The standard surface. Default and dense padding, optional no-pad for tables. |
|
|
216
|
+
| `StatCard` | Headline metric with label, delta and optional sparkline. |
|
|
217
|
+
| `Badge` / `StatusBadge` | Status pills, and the bare colored dot. |
|
|
218
|
+
| `Tag` | Label chip, optionally removable. |
|
|
219
|
+
| `Avatar` / `AvatarGroup` | User image or initials; the group handles overlap and `+n`. |
|
|
220
|
+
| `ProgressBar` | Determinate progress with optional label. |
|
|
221
|
+
| `AreaChart` / `Donut` / `MiniBars` | The three chart primitives the product uses. |
|
|
222
|
+
| `IconTile` | Rounded tinted tile behind a glyph — used in lists and node palettes. |
|
|
223
|
+
| `Kbd` | Keyboard shortcut hint. |
|
|
224
|
+
| `Divider` | Hairline separator, optionally with a centered label. |
|
|
225
|
+
|
|
226
|
+
### `icons/` — iconography
|
|
227
|
+
| Component | What it's for |
|
|
228
|
+
| --- | --- |
|
|
229
|
+
| `Icon` | 362 stroke glyphs (the product's own set plus all of Feather). `<Icon name="download" size={16} />` |
|
|
230
|
+
| `Unicon` | 1,206 additional Unicons line glyphs, loaded from CDN. Use when `Icon` has no match. |
|
|
231
|
+
|
|
232
|
+
### `pipeline/` — the data-pipeline editor
|
|
233
|
+
Product-specific composites: `PipelineCanvas`, `NodeCard`, `Port`, `PortLabel`,
|
|
234
|
+
`PalettePanel`, `PaletteItem`, `PaletteListItem`, `ConfigPanel`, `DataPreview`,
|
|
235
|
+
`ZoomControls`, and `PIPELINE_CATALOG` (the real node inventory). Use these only when
|
|
236
|
+
building the pipeline surface itself.
|
|
237
|
+
|
|
238
|
+
### `charts/` — the charting module
|
|
239
|
+
Twelve chart types on one geometry core, sized for three tiers: sm tile (`Sparkline`, or any chart with `axes={false}`), md interactive (hover tooltip, legend mute — the defaults), lg full-page (see the Full-Page Analytics card).
|
|
240
|
+
|
|
241
|
+
| Component | What it's for |
|
|
242
|
+
| --- | --- |
|
|
243
|
+
| `Sparkline` | Micro line/area/bars in stat tiles, table cells, list rows. `tone="auto"` colors by direction. |
|
|
244
|
+
| `LineChart` | Trends over time; `area`, `stacked`, dashed `target` guide. |
|
|
245
|
+
| `BarChart` | Grouped / stacked / diverging (variance ±) bars; `overlay` adds a combo line on a right axis. |
|
|
246
|
+
| `BarList` | Horizontal labeled bars — top-N, budget consumption. |
|
|
247
|
+
| `DonutChart` | Composition with a KPI center; `pie` fills the middle. Cap ~6 segments. |
|
|
248
|
+
| `ScatterChart` | Scatter / bubble with nearest-point tooltip. |
|
|
249
|
+
| `HeatmapChart` | Matrix density; `scale="diverging"` for signed variance. |
|
|
250
|
+
| `WaterfallChart` | Finance bridge — signed deltas, re-baselining totals, running-sum connectors. |
|
|
251
|
+
| `BulletChart` | Actual vs. target rows with a target tick. |
|
|
252
|
+
| `GaugeChart` | Semi-circular KPI, flat arc, threshold `bands`. |
|
|
253
|
+
| `FunnelChart` | Stage counts with step conversion %. |
|
|
254
|
+
| `TreemapChart` | Squarified composition for 15+ items. |
|
|
255
|
+
| `RadarChart` | Profile comparison across 3–10 shared measures. |
|
|
256
|
+
| `Histogram` | Distribution of one measure; raw values auto-bucketed. |
|
|
257
|
+
| `BoxPlot` | Spread and Tukey outliers per group; `summarize()` exported. |
|
|
258
|
+
| `ParetoChart` | Sorted bars + cumulative % line and the 80% guide. |
|
|
259
|
+
| `CandlestickChart` | OHLC K-line with volume band and moving average. |
|
|
260
|
+
| `SankeyChart` | Directional flow; columns derived from the graph. |
|
|
261
|
+
| `ChordChart` | Circular Sankey for cyclical many-to-many flows. |
|
|
262
|
+
| `SunburstChart` | Hierarchy as rings; click to zoom a branch. |
|
|
263
|
+
| `WorldMap` | Country choropleth on real Natural Earth geometry (needs the pinned d3 + topojson tags). |
|
|
264
|
+
| `GanttChart` | Task timeline with weekends, progress and a today marker. |
|
|
265
|
+
| `Surface3D` | 3D surface z = f(x,y), heat-shaded, drag to orbit. |
|
|
266
|
+
| `Scatter3D` | 3D scatter in an orientation cube, drag to orbit. |
|
|
267
|
+
| `Bar3D` | 3D cuboid bars, grouped or stacked, drag to orbit. |
|
|
268
|
+
| `Pie3D` | Extruded/stepped pie & donut; drag spins in place, hover lifts a slice. |
|
|
269
|
+
| `Ribbon3D` | Series as extruded depth bands (the classic 3D area). |
|
|
270
|
+
|
|
271
|
+
Series colors walk `--series-1…10`; signed values always use `--chart-pos`/`--chart-neg`; plot furniture reads `--chart-grid/-axis/-label/-guide/-track` (all theme-aware, from `tokens/charts.css`). Shared legend/tooltip live in `ChartKit`.
|
|
272
|
+
|
|
273
|
+
Every chart answers a hover at every size — a tile-tier chart drops axes and legend, never the tooltip. `LineChart` and `Sparkline` take `curve="linear" | "smooth" | "step"`; stacked areas fill to the baseline so their gradients overlap, and stacked bars round only the topmost segment so joins stay flush. `WorldMap` requires these exact tags on the page (it reads them off `window` and fetches the pinned topology itself):
|
|
274
|
+
|
|
275
|
+
```html
|
|
276
|
+
<script src="https://unpkg.com/d3@7.9.0/dist/d3.min.js" integrity="sha384-CjloA8y00+1SDAUkjs099PVfnY2KmDC2BZnws9kh8D/lX1s46w6EPhpXdqMfjK6i" crossorigin="anonymous"></script>
|
|
277
|
+
<script src="https://unpkg.com/topojson-client@3.1.0/dist/topojson-client.min.js" integrity="sha384-Ukv1p/xTma6P4/2bY5KzWBw+ydSpXmhCMtyciIQVDJ1RmOxtCYNMF1uXT9T63H67" crossorigin="anonymous"></script>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Ports carry three tones — grey at rest, `--action-primary` on hover and while a wire is
|
|
281
|
+
being dragged (`outputTone="active"`), and a crosshair drop target (`inputTones[i]="target"`).
|
|
282
|
+
Pass `onConnect` to `PipelineCanvas` to enable wiring: holding an output port drags a dashed
|
|
283
|
+
bezier, the canvas hit-tests the pointer against input-port geometry within `snapRadius`
|
|
284
|
+
(30px), and the drop reports `{from, to, toPort}`. `DataPreview` is only the bottom drawer
|
|
285
|
+
chrome (title, Debug Mode, collapse) around the shared dense `DataTable` — reach for
|
|
286
|
+
`DataTable` directly unless you need that drawer.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Design tokens
|
|
291
|
+
|
|
292
|
+
Reference tokens, never raw values. The full list is in the Design System tab's Colors
|
|
293
|
+
cards; the ones you will reach for daily:
|
|
294
|
+
|
|
295
|
+
| Need | Token |
|
|
296
|
+
| --- | --- |
|
|
297
|
+
| Page background | `--bg-app` |
|
|
298
|
+
| Card / panel background | `--bg-surface` |
|
|
299
|
+
| Nested well, table header | `--bg-inset` |
|
|
300
|
+
| Row hover | `--bg-hover` |
|
|
301
|
+
| Body text | `--text-body` |
|
|
302
|
+
| Headings | `--text-heading` |
|
|
303
|
+
| Meta, labels | `--text-secondary` |
|
|
304
|
+
| Placeholder, disabled | `--text-muted` |
|
|
305
|
+
| Card hairline | `--border-card` |
|
|
306
|
+
| Input / button edge | `--border-control` |
|
|
307
|
+
| Primary action | `--action-primary` |
|
|
308
|
+
| Text on any saturated fill | `--on-accent` |
|
|
309
|
+
| Success / warning / danger / info | `--success` `--warning` `--danger` `--info-fg` (each with `-bg` and `-text` companions) |
|
|
310
|
+
|
|
311
|
+
Three rules that keep a UI consistent:
|
|
312
|
+
|
|
313
|
+
1. **Never hard-code a hex value.** It won't flip for dark mode and it won't survive a retheme.
|
|
314
|
+
2. **Never use a palette step directly** (`--neutral-500`, `--blue-600`) — use the semantic
|
|
315
|
+
role (`--text-secondary`, `--action-primary`). Palette steps don't change between themes;
|
|
316
|
+
roles do.
|
|
317
|
+
3. **White (`--on-accent`) is the only text color allowed on a saturated fill**, in both
|
|
318
|
+
themes. This is why the dark-mode primary button keeps white text.
|
|
319
|
+
|
|
320
|
+
### Tokens outside CSS
|
|
321
|
+
|
|
322
|
+
The CSS files are the source of truth. Two generated views ship alongside them for code
|
|
323
|
+
that cannot read a stylesheet — canvas, PDF export, native, Figma round-trips:
|
|
324
|
+
|
|
325
|
+
```js
|
|
326
|
+
import { cssVar, light, dark } from '@keyfunc/keybricks-ds/tokens'
|
|
327
|
+
|
|
328
|
+
cssVar.actionPrimary // "var(--action-primary)" ← use this in component styles
|
|
329
|
+
light.actionPrimary // "#155dfc"
|
|
330
|
+
dark.actionPrimary // "#1f6feb"
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
```js
|
|
334
|
+
import tokens from '@keyfunc/keybricks-ds/tokens.json'
|
|
335
|
+
// { "--action-primary": { group: "colors",
|
|
336
|
+
// light: { raw: "var(--blue-600)", value: "#155dfc" },
|
|
337
|
+
// dark: { raw: "#1f6feb", value: "#1f6feb" } }, … }
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
`cssVar` is the one to reach for in app code — it keeps theming live. The flattened
|
|
341
|
+
`light`/`dark` maps are snapshots: correct at build time, but they do not follow a runtime
|
|
342
|
+
theme switch. Never paste a literal from them into a stylesheet.
|
|
343
|
+
|
|
344
|
+
Both files are regenerated by `node _scripts/build-tokens.mjs`; CI fails if they drift from
|
|
345
|
+
the CSS.
|
|
346
|
+
|
|
347
|
+
## Dark mode
|
|
348
|
+
|
|
349
|
+
Automatic via `prefers-color-scheme`, and overridable with `data-theme` on `<html>`.
|
|
350
|
+
If you build custom UI beside Keybricks components, reference the same semantic tokens and
|
|
351
|
+
it will flip for free. Two things to watch:
|
|
352
|
+
|
|
353
|
+
- A solid light tint (`#ECFDF5`) glows on a dark surface. That's why feedback tints become
|
|
354
|
+
10–14% alpha washes in dark mode — another reason to use `--success-bg` rather than a hex.
|
|
355
|
+
- Surfaces get **lighter** as they nest in light mode and **brighter** in dark mode
|
|
356
|
+
(`--bg-app` → `--bg-surface` → `--bg-raised`). Use the roles in that order and depth reads
|
|
357
|
+
correctly in both.
|
|
358
|
+
|
|
359
|
+
## Interaction states — you get these for free
|
|
360
|
+
|
|
361
|
+
`tokens/interaction.css` delivers press and keyboard focus globally: `:active` adds
|
|
362
|
+
`filter: var(--press-filter)` (which darkens in light mode and brightens in dark), and
|
|
363
|
+
`:focus-visible` draws a 2px `--focus-border` outline. It applies to `button`, `a`, `label`,
|
|
364
|
+
and anything with `role="button"`, `menuitem`, `option`, `tab`, `switch`, `treeitem` etc.
|
|
365
|
+
|
|
366
|
+
**If you build a custom clickable element, give it a role and a `tabIndex`** and it inherits
|
|
367
|
+
both states:
|
|
368
|
+
|
|
369
|
+
```jsx
|
|
370
|
+
<div role="button" tabIndex={0} onClick={...}> // ✅ gets press + focus
|
|
371
|
+
<div onClick={...}> // ❌ inert, and unreachable by keyboard
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Button and IconButton carry `data-press="own"` because their press colors are explicit
|
|
375
|
+
tokens rather than a filter.
|
|
376
|
+
|
|
377
|
+
## Versioning
|
|
378
|
+
|
|
379
|
+
Semver, tagged in GitLab. Patch = fixes; minor = new components, new props, and token
|
|
380
|
+
*value* changes; major = a breaking prop change or a token *rename or removal*, always with
|
|
381
|
+
a migration note in the release. Token renames are major because your own code references
|
|
382
|
+
`var(--name)` directly.
|
|
383
|
+
|
|
384
|
+
Pin a minor range and update deliberately:
|
|
385
|
+
|
|
386
|
+
```json
|
|
387
|
+
"@keyfunc/keybricks-ds": "~1.0.0"
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Release mechanics, the CI pipeline and the Pages site are documented in `DEPLOY.md`.
|
|
391
|
+
|
|
392
|
+
## Templates
|
|
393
|
+
|
|
394
|
+
A template is a ready-made screen you copy into a new project as a starting point, rather than a
|
|
395
|
+
component you import. Each lives in `templates/<slug>/`.
|
|
396
|
+
|
|
397
|
+
| Template | What you get |
|
|
398
|
+
| --- | --- |
|
|
399
|
+
| `templates/web-app/` | The full app shell: sidebar with the real nav model, top bar, page heading, stat tiles and a data table. |
|
|
400
|
+
|
|
401
|
+
Copy the folder, then edit one line — the `base` in `ds-base.js` — to point at wherever the design
|
|
402
|
+
system sits relative to the copied page.
|
|
403
|
+
|
|
404
|
+
## Getting help
|
|
405
|
+
|
|
406
|
+
- **Documentation site** — the GitLab Pages build: `index.html` for the browsable system
|
|
407
|
+
(every card live, EN / 中文 / 日本語, light and dark, View Code per component) and
|
|
408
|
+
`gallery.html` for the filterable thumbnail grid.
|
|
409
|
+
- **Props contract** — the `.d.ts` next to each component.
|
|
410
|
+
- **Usage notes** — the `.prompt.md` in each component group.
|
|
411
|
+
- **Rules for AI coding agents** — `DESIGN.md`, published as
|
|
412
|
+
`@keyfunc/keybricks-ds/DESIGN.md`. Point your agent at it before it writes any markup.
|
|
413
|
+
- **Lint preset** — `@keyfunc/keybricks-ds/lint` fails CI on raw hex values and palette-step
|
|
414
|
+
references in your own components.
|
|
415
|
+
- **Design rationale** — `readme.md` (content and visual foundations, iconography, tone).
|
|
416
|
+
- **Something missing or wrong?** File an issue on the design-system project rather than
|
|
417
|
+
patching locally.
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: keybricks-design
|
|
3
|
+
description: Use this skill to generate well-branded interfaces and assets for Keybricks (EPM/finance data platform), either for production or throwaway prototypes/mocks/etc. Contains essential design guidelines, colors, type, fonts, assets, and UI kit components for prototyping.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Read the README.md file within this skill, and explore the other available files. This skill's documentation is bilingual (English / 中文)。
|
|
8
|
+
|
|
9
|
+
Key facts / 关键信息: Keybricks is a near-monochrome, hairline-bordered, 13px-Inter enterprise UI with one action blue (#155dfc, dark mode #1f6feb), five node-category hues, and a signature node-pipeline editor.
|
|
10
|
+
(Keybricks 是一个近乎单色、细边框、以 13px Inter 为主的企业级界面,仅有一个强调蓝(浅色 #155dfc / 深色 #1f6feb)、五种节点分类色,以及标志性的数据管道编辑器。)
|
|
11
|
+
Tokens live in `tokens/*.css` (linked via `styles.css`, includes `tokens/dark.css` for dark mode and `tokens/motion.css` for motion); React components in `components/<group>/` (each with a `.d.ts` contract and `.prompt.md` usage note); full-screen recreations in `ui_kits/keybricks-app/`.
|
|
12
|
+
(设计令牌位于 `tokens/*.css`(经 `styles.css` 汇总,含深色模式 `tokens/dark.css` 与动效 `tokens/motion.css`);React 组件位于 `components/<分组>/`(各附 `.d.ts` 类型定义与 `.prompt.md` 用法说明);完整界面复刻位于 `ui_kits/keybricks-app/`。)
|
|
13
|
+
|
|
14
|
+
If creating visual artifacts (slides, mocks, throwaway prototypes, etc), copy assets out and create static HTML files for the user to view. If working on production code, you can copy assets and read the rules here to become an expert in designing with this brand.
|
|
15
|
+
|
|
16
|
+
If the user invokes this skill without any other guidance, ask them what they want to build or design, ask some questions, and act as an expert designer who outputs HTML artifacts _or_ production code, depending on the need.
|
|
17
|
+
|
|
18
|
+
Rules of thumb / 要点速览:
|
|
19
|
+
- Inter 13px/400 is the default; 500 for nav/headings/labels; 600 for node & panel titles; 300 only for big numerals. Menlo for codes, data cells, logs.
|
|
20
|
+
(Inter 13px/常规 为默认;500 用于导航/标题/标签;600 用于节点与面板标题;300 仅用于大号数字。代码/数据/日志用 Menlo。)
|
|
21
|
+
- Backgrounds: app #fafafa, surfaces white, hairline borders rgba(229,229,229,.6); shadows only on canvas nodes.
|
|
22
|
+
(背景:应用层 #fafafa,卡片层白色,细边框;仅画布节点有阴影。)
|
|
23
|
+
- One blue CTA per view; ghost text buttons beside it. Color only for meaning (category hues, status).
|
|
24
|
+
(每个界面只有一个蓝色主按钮,旁边配文字按钮;颜色只用于表达含义。)
|
|
25
|
+
- Icons: Lucide stroke set via the Icon component — never emoji, never hand-drawn SVG.
|
|
26
|
+
(图标统一用 Icon 组件封装的 Lucide 线性图标集——禁止 emoji,禁止手绘 SVG。)
|
|
27
|
+
- Radii: 4 controls · 8 buttons/inputs · 10 cards · 14/16 tiles & nodes · full circles.
|
|
28
|
+
(圆角:4px 控件、8px 按钮/输入框、10px 卡片、14/16px 图标块与节点、端口/胶囊全圆角。)
|
|
29
|
+
- Copy: Title Case labels, imperative verb-first buttons ("Run Test", "Mark as New"), terse technical vocabulary.
|
|
30
|
+
(文案:标签用词首大写,按钮用祈使动词开头,术语简洁精确。)
|
|
31
|
+
- Dark mode: set `<html data-theme="dark">`. Style only via semantic tokens (`--bg-surface`, `--text-body`, `--border-card`, `--track`, `--soft-bg`, `--info-bg`, `--on-accent`, `--ring-surface`) — never raw `--neutral-*`/`--blue-*` — and both themes work automatically.
|
|
32
|
+
(深色模式:在 `<html>` 加 `data-theme="dark"`。组件只使用语义层变量,禁止直接用基础色变量,两套主题即可自动生效。)
|