@keyfunc/keybricks-ds 1.0.4 → 2.3.1
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 +14 -5
- package/DESIGN.md +245 -59
- package/INTEGRATION.md +243 -49
- package/SKILL.md +13 -11
- package/_adherence.oxlintrc.json +183 -70
- package/_scripts/build-index.mjs +24 -4
- package/_scripts/build-tokens.mjs +5 -2
- package/assets/icons/icon-index.js +1 -1
- package/assets/icons/icon-index.json +1 -1
- package/components/_cards/accordion.card.html +2 -2
- package/components/_cards/action-chip.card.html +11 -9
- package/components/_cards/activity.card.html +3 -3
- package/components/_cards/alert.card.html +3 -3
- package/components/_cards/app-chrome.card.html +4 -4
- package/components/_cards/banner.card.html +1 -1
- package/components/_cards/breadcrumb.card.html +5 -5
- package/components/_cards/button-1-base.card.html +23 -26
- package/components/_cards/button-2-states.card.html +27 -25
- package/components/_cards/button-3-sizes-icons.card.html +20 -19
- package/components/_cards/button-4-group.card.html +14 -31
- package/components/_cards/canvas-zoom-controls.card.html +1 -1
- package/components/_cards/cards-indicators.card.html +2 -2
- package/components/_cards/charts-1-sparkline.card.html +5 -5
- package/components/_cards/charts-10-gauge.card.html +5 -5
- package/components/_cards/charts-11-funnel.card.html +3 -3
- package/components/_cards/charts-12-treemap.card.html +3 -3
- package/components/_cards/charts-14-radar.card.html +3 -3
- package/components/_cards/charts-15-distribution.card.html +2 -2
- package/components/_cards/charts-16-pareto.card.html +3 -3
- package/components/_cards/charts-17-candlestick.card.html +3 -3
- package/components/_cards/charts-18-sankey.card.html +3 -3
- package/components/_cards/charts-19-chord.card.html +3 -3
- package/components/_cards/charts-2-line.card.html +4 -4
- package/components/_cards/charts-20-sunburst.card.html +3 -3
- package/components/_cards/charts-21-worldmap.card.html +4 -4
- package/components/_cards/charts-22-gantt.card.html +3 -3
- package/components/_cards/charts-23-bar3d.card.html +3 -3
- package/components/_cards/charts-24-pie3d.card.html +3 -3
- package/components/_cards/charts-25-surface3d.card.html +3 -3
- package/components/_cards/charts-26-scatter3d.card.html +3 -3
- package/components/_cards/charts-27-ribbon3d.card.html +3 -3
- package/components/_cards/charts-3-bar.card.html +7 -7
- package/components/_cards/charts-4-barlist.card.html +3 -3
- package/components/_cards/charts-5-donut.card.html +4 -4
- package/components/_cards/charts-6-scatter.card.html +3 -3
- package/components/_cards/charts-7-heatmap.card.html +3 -3
- package/components/_cards/charts-8-waterfall.card.html +3 -3
- package/components/_cards/charts-9-bullet.card.html +3 -3
- package/components/_cards/charts-99-fullpage.card.html +5 -5
- package/components/_cards/checkbox.card.html +9 -6
- package/components/_cards/codeblock.card.html +2 -2
- package/components/_cards/combobox.card.html +6 -3
- package/components/_cards/context-menu.card.html +6 -3
- package/components/_cards/date-picker.card.html +10 -4
- package/components/_cards/diffvalue.card.html +3 -3
- package/components/_cards/divider.card.html +4 -4
- package/components/_cards/drawer.card.html +4 -4
- package/components/_cards/dropdown-menu.card.html +7 -7
- package/components/_cards/dropzone.card.html +5 -3
- package/components/_cards/empty-state.card.html +6 -6
- package/components/_cards/filter-bar.card.html +5 -5
- package/components/_cards/icon-button.card.html +14 -14
- package/components/_cards/icons-1-core.card.html +4 -4
- package/components/_cards/icons-2-feather.card.html +4 -4
- package/components/_cards/icons-3-unicons.card.html +4 -4
- package/components/_cards/input.card.html +5 -2
- package/components/_cards/kbd.card.html +2 -2
- package/components/_cards/keyvalue.card.html +2 -2
- package/components/_cards/listrow.card.html +2 -2
- package/components/_cards/loading.card.html +3 -3
- package/components/_cards/log-viewer.card.html +3 -3
- package/components/_cards/modal.card.html +9 -9
- package/components/_cards/multi-select.card.html +6 -3
- package/components/_cards/number-stepper.card.html +9 -5
- package/components/_cards/pagination.card.html +6 -3
- package/components/_cards/people.card.html +4 -4
- package/components/_cards/pipeline-node.card.html +8 -8
- package/components/_cards/pipeline-palette.card.html +5 -5
- package/components/_cards/radio.card.html +12 -7
- package/components/_cards/search.card.html +6 -3
- package/components/_cards/segmented-control.card.html +11 -10
- package/components/_cards/select.card.html +8 -4
- package/components/_cards/slider.card.html +2 -2
- package/components/_cards/smart-table.card.html +3 -3
- package/components/_cards/spreadsheet.card.html +3 -3
- package/components/_cards/stepper.card.html +3 -3
- package/components/_cards/table.card.html +165 -0
- package/components/_cards/tabs.card.html +6 -3
- package/components/_cards/tag.card.html +6 -3
- package/components/_cards/textarea.card.html +2 -2
- package/components/_cards/timeline.card.html +3 -3
- package/components/_cards/toast.card.html +10 -8
- package/components/_cards/toggles.card.html +15 -10
- package/components/_cards/tooltip.card.html +7 -7
- package/components/_cards/tree.card.html +3 -3
- package/components/_shared/card-kit.css +25 -0
- package/components/_shared/card-kit.js +50 -0
- package/components/_shared/src-buttons.js +1 -1
- package/components/_shared/src-charts.js +1 -1
- package/components/_shared/src-data.js +1 -1
- package/components/_shared/src-display.js +1 -1
- package/components/_shared/src-feedback.js +1 -1
- package/components/_shared/src-forms.js +1 -1
- package/components/_shared/src-icons.js +1 -1
- package/components/_shared/src-navigation.js +1 -1
- package/components/_shared/src-pipeline.js +1 -1
- package/components/_shared/src-tabs.js +1 -1
- package/components/_shared/view-source.js +3 -3
- package/components/_vue/index.mjs +16 -5
- package/components/buttons/ActionChip.d.ts +3 -1
- package/components/buttons/ActionChip.jsx +4 -4
- package/components/buttons/ActionChip.vue +4 -4
- package/components/buttons/Button.d.ts +5 -2
- package/components/buttons/Button.jsx +15 -18
- package/components/buttons/Button.vue +17 -18
- package/components/buttons/ButtonGroup.vue +1 -1
- package/components/buttons/IconButton.d.ts +2 -1
- package/components/buttons/IconButton.jsx +13 -9
- package/components/buttons/IconButton.vue +12 -9
- package/components/buttons/buttons.prompt.md +6 -5
- package/components/charts/Bar3D.jsx +2 -2
- package/components/charts/Bar3D.vue +3 -3
- package/components/charts/BarChart.jsx +4 -4
- package/components/charts/BarChart.vue +6 -6
- package/components/charts/BarList.jsx +4 -4
- package/components/charts/BarList.vue +4 -4
- package/components/charts/BoxPlot.jsx +1 -1
- package/components/charts/BoxPlot.vue +3 -3
- package/components/charts/BulletChart.jsx +6 -6
- package/components/charts/BulletChart.vue +6 -6
- package/components/charts/CandlestickChart.jsx +2 -2
- package/components/charts/CandlestickChart.vue +5 -5
- package/components/charts/ChartKit.jsx +8 -7
- package/components/charts/ChartLegend.vue +16 -0
- package/components/charts/ChartTooltip.vue +16 -0
- package/components/charts/ChordChart.jsx +2 -2
- package/components/charts/ChordChart.vue +3 -3
- package/components/charts/DonutChart.jsx +1 -1
- package/components/charts/DonutChart.vue +2 -2
- package/components/charts/FunnelChart.jsx +3 -3
- package/components/charts/FunnelChart.vue +4 -4
- package/components/charts/GanttChart.jsx +2 -2
- package/components/charts/GanttChart.vue +3 -3
- package/components/charts/GaugeChart.jsx +2 -2
- package/components/charts/GaugeChart.vue +2 -2
- package/components/charts/HeatmapChart.jsx +2 -2
- package/components/charts/HeatmapChart.vue +2 -2
- package/components/charts/Histogram.jsx +2 -2
- package/components/charts/Histogram.vue +4 -4
- package/components/charts/LineChart.jsx +1 -1
- package/components/charts/LineChart.vue +4 -4
- package/components/charts/ParetoChart.jsx +3 -3
- package/components/charts/ParetoChart.vue +5 -5
- package/components/charts/Pie3D.jsx +1 -1
- package/components/charts/Pie3D.vue +2 -2
- package/components/charts/PlotGrid.vue +18 -0
- package/components/charts/RadarChart.jsx +1 -1
- package/components/charts/RadarChart.vue +2 -2
- package/components/charts/Ribbon3D.jsx +2 -2
- package/components/charts/Ribbon3D.vue +3 -3
- package/components/charts/SankeyChart.jsx +2 -2
- package/components/charts/SankeyChart.vue +3 -3
- package/components/charts/Scatter3D.jsx +1 -1
- package/components/charts/Scatter3D.vue +2 -2
- package/components/charts/ScatterChart.jsx +3 -3
- package/components/charts/ScatterChart.vue +5 -5
- package/components/charts/Sparkline.jsx +1 -1
- package/components/charts/Sparkline.vue +1 -1
- package/components/charts/SunburstChart.jsx +1 -1
- package/components/charts/SunburstChart.vue +2 -2
- package/components/charts/Surface3D.jsx +2 -2
- package/components/charts/Surface3D.vue +3 -3
- package/components/charts/TreemapChart.jsx +2 -2
- package/components/charts/TreemapChart.vue +3 -3
- package/components/charts/WaterfallChart.jsx +2 -2
- package/components/charts/WaterfallChart.vue +6 -5
- package/components/charts/WorldMap.jsx +4 -4
- package/components/charts/WorldMap.vue +5 -5
- package/components/charts/XLabels.vue +11 -0
- package/components/data/CodeBlock.jsx +1 -1
- package/components/data/CodeBlock.vue +1 -1
- package/components/data/DiffValue.d.ts +1 -0
- package/components/data/DiffValue.jsx +1 -1
- package/components/data/DiffValue.vue +1 -1
- package/components/data/FilterBar.d.ts +2 -0
- package/components/data/FilterBar.jsx +10 -9
- package/components/data/FilterBar.vue +9 -8
- package/components/data/KeyValue.d.ts +1 -1
- package/components/data/KeyValue.jsx +4 -4
- package/components/data/KeyValue.vue +4 -4
- package/components/data/ListRow.jsx +2 -2
- package/components/data/ListRow.vue +2 -2
- package/components/data/Pagination.d.ts +5 -1
- package/components/data/Pagination.jsx +16 -12
- package/components/data/Pagination.vue +14 -9
- package/components/data/SmartTable.d.ts +4 -1
- package/components/data/SmartTable.jsx +16 -14
- package/components/data/SmartTable.vue +26 -23
- package/components/data/Spreadsheet.d.ts +2 -0
- package/components/data/Spreadsheet.jsx +16 -15
- package/components/data/Spreadsheet.vue +19 -18
- package/components/data/Table.d.ts +101 -0
- package/components/data/Table.jsx +223 -0
- package/components/data/Table.vue +153 -0
- package/components/data/data.prompt.md +3 -3
- package/components/display/Avatar.jsx +2 -2
- package/components/display/Avatar.vue +3 -2
- package/components/display/AvatarGroup.vue +3 -2
- package/components/display/Badge.d.ts +4 -1
- package/components/display/Badge.jsx +10 -5
- package/components/display/Badge.vue +1 -1
- package/components/display/Divider.vue +3 -3
- package/components/display/Donut.vue +3 -2
- package/components/display/IconTile.vue +10 -4
- package/components/display/Kbd.d.ts +1 -1
- package/components/display/Kbd.jsx +1 -1
- package/components/display/Kbd.vue +2 -2
- package/components/display/ProgressBar.jsx +1 -1
- package/components/display/ProgressBar.vue +1 -1
- package/components/display/StatCard.vue +1 -1
- package/components/display/Tag.d.ts +3 -1
- package/components/display/Tag.jsx +4 -4
- package/components/display/Tag.vue +4 -4
- package/components/feedback/Accordion.jsx +2 -2
- package/components/feedback/Accordion.vue +2 -2
- package/components/feedback/ActivityItem.d.ts +3 -1
- package/components/feedback/ActivityItem.jsx +6 -6
- package/components/feedback/ActivityItem.vue +5 -4
- package/components/feedback/Alert.jsx +4 -4
- package/components/feedback/Alert.vue +3 -3
- package/components/feedback/Banner.jsx +5 -5
- package/components/feedback/Banner.vue +5 -5
- package/components/feedback/ContextMenu.d.ts +3 -1
- package/components/feedback/ContextMenu.jsx +5 -5
- package/components/feedback/ContextMenu.vue +5 -5
- package/components/feedback/DotActivity.vue +3 -3
- package/components/feedback/Drawer.d.ts +2 -0
- package/components/feedback/Drawer.jsx +6 -6
- package/components/feedback/Drawer.vue +22 -15
- package/components/feedback/EmptyState.vue +2 -2
- package/components/feedback/LogViewer.vue +1 -1
- package/components/feedback/Modal.d.ts +2 -0
- package/components/feedback/Modal.jsx +12 -11
- package/components/feedback/Modal.vue +10 -8
- package/components/feedback/Skeleton.vue +2 -1
- package/components/feedback/Spinner.vue +2 -1
- package/components/feedback/Stepper.vue +1 -1
- package/components/feedback/Timeline.jsx +1 -1
- package/components/feedback/Timeline.vue +3 -3
- package/components/feedback/Toast.vue +4 -4
- package/components/feedback/ToastStack.vue +11 -0
- package/components/feedback/Tooltip.vue +19 -0
- package/components/feedback/feedback.prompt.md +4 -4
- package/components/forms/Checkbox.d.ts +3 -2
- package/components/forms/Checkbox.jsx +7 -7
- package/components/forms/Checkbox.vue +8 -8
- package/components/forms/Combobox.d.ts +2 -0
- package/components/forms/Combobox.jsx +12 -10
- package/components/forms/Combobox.vue +11 -10
- package/components/forms/DatePicker.d.ts +4 -0
- package/components/forms/DatePicker.jsx +16 -12
- package/components/forms/DatePicker.vue +15 -11
- package/components/forms/Dropzone.jsx +2 -2
- package/components/forms/Dropzone.vue +5 -5
- package/components/forms/Field.d.ts +5 -1
- package/components/forms/Field.jsx +4 -4
- package/components/forms/Field.vue +4 -4
- package/components/forms/Input.d.ts +5 -1
- package/components/forms/Input.jsx +8 -8
- package/components/forms/Input.vue +3 -3
- package/components/forms/MultiSelect.d.ts +2 -0
- package/components/forms/MultiSelect.jsx +13 -11
- package/components/forms/MultiSelect.vue +12 -11
- package/components/forms/NumberStepper.d.ts +3 -1
- package/components/forms/NumberStepper.jsx +7 -7
- package/components/forms/NumberStepper.vue +8 -7
- package/components/forms/Radio.d.ts +5 -3
- package/components/forms/Radio.jsx +13 -15
- package/components/forms/Radio.vue +9 -10
- package/components/forms/RadioGroup.vue +5 -5
- package/components/forms/SearchInput.d.ts +3 -1
- package/components/forms/SearchInput.jsx +6 -6
- package/components/forms/SearchInput.vue +7 -6
- package/components/forms/Select.d.ts +3 -2
- package/components/forms/Select.jsx +6 -7
- package/components/forms/Select.vue +6 -6
- package/components/forms/Slider.jsx +3 -3
- package/components/forms/Slider.vue +3 -3
- package/components/forms/Switch.d.ts +2 -2
- package/components/forms/Switch.jsx +20 -22
- package/components/forms/Switch.vue +22 -18
- package/components/forms/Textarea.vue +5 -5
- package/components/forms/forms.prompt.md +1 -1
- package/components/forms/input-base.js +2 -1
- package/components/icons/Icon.jsx +17 -1
- package/components/icons/Icon.prompt.md +2 -0
- package/components/icons/Icon.vue +1 -1
- package/components/icons/icon-paths.js +15 -0
- package/components/index.d.ts +1 -2
- package/components/index.js +4 -5
- package/components/navigation/Breadcrumb.jsx +6 -10
- package/components/navigation/Breadcrumb.vue +6 -12
- package/components/navigation/DocTree.jsx +3 -3
- package/components/navigation/DocTree.vue +3 -3
- package/components/navigation/PageHeading.vue +1 -1
- package/components/navigation/PageToolbar.vue +7 -6
- package/components/navigation/Sidebar.jsx +4 -23
- package/components/navigation/Sidebar.vue +5 -10
- package/components/navigation/ThemeToggle.vue +2 -1
- package/components/navigation/TopBar.d.ts +3 -1
- package/components/navigation/TopBar.jsx +6 -6
- package/components/navigation/Tree.jsx +5 -5
- package/components/navigation/Tree.vue +13 -8
- package/components/navigation/nav-model.js +23 -0
- package/components/navigation/theme-store.js +9 -0
- package/components/pipeline/ConfigPanel.d.ts +2 -0
- package/components/pipeline/ConfigPanel.jsx +9 -9
- package/components/pipeline/ConfigPanel.vue +9 -9
- package/components/pipeline/DataPreview.d.ts +3 -1
- package/components/pipeline/DataPreview.jsx +7 -7
- package/components/pipeline/DataPreview.vue +7 -7
- package/components/pipeline/NodeCard.jsx +3 -3
- package/components/pipeline/NodeCard.vue +3 -3
- package/components/pipeline/PaletteItem.vue +2 -2
- package/components/pipeline/PaletteListItem.vue +1 -1
- package/components/pipeline/PalettePanel.jsx +2 -2
- package/components/pipeline/PalettePanel.vue +1 -1
- package/components/pipeline/Port.vue +15 -0
- package/components/pipeline/PortLabel.vue +15 -0
- package/components/pipeline/ZoomControls.vue +1 -1
- package/components/pipeline/port-skin.js +13 -0
- package/components/px.js +4 -0
- package/components/tabs/PanelTabs.vue +5 -4
- package/components/tabs/PillTabs.vue +5 -4
- package/components/tabs/SegmentedControl.d.ts +2 -2
- package/components/tabs/SegmentedControl.jsx +7 -7
- package/components/tabs/SegmentedControl.vue +7 -7
- package/components/tabs/Tabs.d.ts +5 -3
- package/components/tabs/Tabs.jsx +15 -15
- package/components/tabs/Tabs.vue +5 -5
- package/components/tabs/ViewToggle.d.ts +3 -1
- package/components/tabs/ViewToggle.jsx +5 -5
- package/components/tabs/ViewToggle.vue +5 -5
- package/components/tabs/tabs.prompt.md +1 -1
- package/keybricks.css +4 -0
- package/package.json +6 -3
- package/readme.md +91 -122
- package/readme.zh-CN.md +121 -0
- package/tokens/alpha.css +3 -1
- package/tokens/charts.css +20 -17
- package/tokens/colors.css +3 -3
- package/tokens/dark.css +3 -3
- package/tokens/hover.css +32 -0
- package/tokens/interaction.css +3 -1
- package/tokens/layout.css +31 -7
- package/tokens/tokens.d.ts +58 -0
- package/tokens/tokens.js +179 -92
- package/tokens/tokens.json +327 -114
- package/tokens/typography.css +45 -15
- package/components/_cards/brand-visual.card.html +0 -43
- package/components/_cards/datatable.card.html +0 -48
- package/components/_shared/src-brand.js +0 -1
- package/components/brand/BrandVisual.d.ts +0 -17
- package/components/brand/BrandVisual.jsx +0 -29
- package/components/brand/BrandVisual.vue +0 -34
- package/components/brand/_dir.card.html +0 -13
- package/components/brand/brandMotifs.js +0 -210
- package/components/buttons/_dir.card.html +0 -13
- package/components/charts/ChartKit.vue +0 -47
- package/components/charts/_dir.card.html +0 -7
- package/components/data/DataTable.d.ts +0 -28
- package/components/data/DataTable.jsx +0 -32
- package/components/data/DataTable.vue +0 -25
- package/components/data/_dir.card.html +0 -13
- package/components/display/_dir.card.html +0 -13
- package/components/feedback/_dir.card.html +0 -13
- package/components/forms/_dir.card.html +0 -13
- package/components/icons/_dir.card.html +0 -13
- package/components/navigation/_dir.card.html +0 -13
- package/components/pipeline/_dir.card.html +0 -13
- package/components/tabs/_dir.card.html +0 -13
package/INTEGRATION.md
CHANGED
|
@@ -31,7 +31,7 @@ Not using a registry yet? A git dependency works with no publishing at all — t
|
|
|
31
31
|
has no build step, so npm can use the checkout as-is:
|
|
32
32
|
|
|
33
33
|
```json
|
|
34
|
-
"@keyfunc/keybricks-ds": "git+ssh://git@gitlab.epm2demo.cn/Felix/keybricks-ds.git#
|
|
34
|
+
"@keyfunc/keybricks-ds": "git+ssh://git@gitlab.epm2demo.cn/Felix/keybricks-ds.git#v2.3.1"
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
**Source-only package.** `.jsx` and `.vue` files are published as authored, so your
|
|
@@ -46,7 +46,10 @@ import '@keyfunc/keybricks-ds/styles.css'
|
|
|
46
46
|
```
|
|
47
47
|
|
|
48
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.
|
|
49
|
+
shadows, motion, the global press/focus layer, the hover hooks, and the dark theme.
|
|
50
|
+
(The npm path `styles.css` resolves to `keybricks.css`, which imports the token sheet
|
|
51
|
+
`styles.css` plus `tokens/hover.css`. If you link the files directly instead of importing
|
|
52
|
+
the package, load both `styles.css` and `tokens/hover.css`.) **Nothing renders
|
|
50
53
|
correctly without it** — components reference `var(--action-primary)`, not hex codes.
|
|
51
54
|
|
|
52
55
|
Dark mode follows the OS automatically. To let users override it:
|
|
@@ -64,11 +67,11 @@ import { Button, Field, Input } from '@keyfunc/keybricks-ds'
|
|
|
64
67
|
|
|
65
68
|
export function LoginForm() {
|
|
66
69
|
return (
|
|
67
|
-
<form>
|
|
70
|
+
<form data-size="lg">
|
|
68
71
|
<Field label="Work email" required>
|
|
69
72
|
<Input type="email" placeholder="you@company.com" />
|
|
70
73
|
</Field>
|
|
71
|
-
<Button variant="primary"
|
|
74
|
+
<Button variant="primary">Sign in</Button>
|
|
72
75
|
</form>
|
|
73
76
|
)
|
|
74
77
|
}
|
|
@@ -85,29 +88,32 @@ import Textarea from '@keyfunc/keybricks-ds/components/forms/Textarea.vue'
|
|
|
85
88
|
</script>
|
|
86
89
|
|
|
87
90
|
<template>
|
|
88
|
-
<form>
|
|
91
|
+
<form data-size="lg">
|
|
89
92
|
<Field label="Work email" required>
|
|
90
93
|
<Input type="email" placeholder="you@company.com" />
|
|
91
94
|
</Field>
|
|
92
|
-
<Button variant="primary"
|
|
95
|
+
<Button variant="primary">Sign in</Button>
|
|
93
96
|
</form>
|
|
94
97
|
</template>
|
|
95
98
|
```
|
|
96
99
|
|
|
97
|
-
That is the whole integration.
|
|
100
|
+
That is the whole integration. The `data-size="lg"` on the form is the size tier — every control
|
|
101
|
+
inside it is 40px tall; leave it off and they are the app default, 32px (see *Size tiers* below).
|
|
102
|
+
Everything below is reference material.
|
|
98
103
|
|
|
99
104
|
---
|
|
100
105
|
|
|
101
106
|
## What you can and cannot change
|
|
102
107
|
|
|
103
|
-
Props are the knobs the design system deliberately exposes. **`variant`, `
|
|
104
|
-
`
|
|
105
|
-
step, focus ring and dark-mode behavior are not — they live
|
|
106
|
-
every Button in every product looks like the same Button.
|
|
108
|
+
Props are the knobs the design system deliberately exposes. **`variant`, `icon`, `disabled`,
|
|
109
|
+
`loading` are yours to set — and the size tier of the region the control sits in.** The height,
|
|
110
|
+
radius, exact blue, hover step, press step, focus ring and dark-mode behavior are not — they live
|
|
111
|
+
inside the component so that every Button in every product looks like the same Button.
|
|
107
112
|
|
|
108
113
|
```jsx
|
|
109
|
-
<Button variant="primary"
|
|
114
|
+
<Button variant="primary" icon="download">Export</Button> // ✅ intended
|
|
110
115
|
<Button style={{ background: '#0055ff', borderRadius: 2 }}>Export</Button> // ❌ breaks the system
|
|
116
|
+
<Button style={{ height: 28, fontSize: 12 }}>Export</Button> // ❌ set data-size on the bar instead
|
|
111
117
|
```
|
|
112
118
|
|
|
113
119
|
Need something the props don't cover? That is a design-system request, not a local
|
|
@@ -122,19 +128,63 @@ still flips correctly in dark mode:
|
|
|
122
128
|
borderRadius: 'var(--radius-lg)', padding: 'var(--space-4)' }}>
|
|
123
129
|
```
|
|
124
130
|
|
|
125
|
-
##
|
|
131
|
+
## Size tiers
|
|
132
|
+
|
|
133
|
+
Every control reads its height, text size, icon size and padding from one set of CSS custom
|
|
134
|
+
properties — `--control-h`, `--control-text`, `--control-icon`, `--control-px`, `--control-gap`,
|
|
135
|
+
`--group-gap`, `--bar-h`, `--edge-pad`, `--cell-px`, `--check-size`, `--tag-h`, `--switch-w/h`.
|
|
136
|
+
A **region** sets them with one attribute:
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
<div data-size="sm">…</div> <!-- 28px controls · 12px text (13px CJK) · 36px rows — dense grids, pipeline nodes -->
|
|
140
|
+
<div data-size="md">…</div> <!-- 32px controls · 14px text · 40px rows — the app default (:root) -->
|
|
141
|
+
<div data-size="lg">…</div> <!-- 40px controls · 14px text · 48px rows — dialogs, short forms -->
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Put `data-size` on the toolbar, filter bar, form, table or panel and leave the controls' `size`
|
|
145
|
+
prop unset: they inherit, so nothing in one row can be a different height. Some components are
|
|
146
|
+
regions of their own: `Modal` is always `lg`; `SmartTable`, `Spreadsheet` and `DataPreview` are
|
|
147
|
+
`sm`; `Table`, `FilterBar`, `Drawer`, `ConfigPanel`, `PageToolbar` and `ContextMenu` take a
|
|
148
|
+
`size` prop and otherwise inherit.
|
|
149
|
+
|
|
150
|
+
Every sized component still accepts `size="sm" | "md" | "lg"` — it stamps `data-size` on that one
|
|
151
|
+
element. Use it for a control that stands alone (a single icon button in a card corner), not to
|
|
152
|
+
adjust one control inside a bar. Nothing interactive is smaller than 24px; the 1.x `xs` sizes and
|
|
153
|
+
the `dense` props are kept as aliases of `sm`.
|
|
154
|
+
|
|
155
|
+
New in 2.0 alongside the tiers: `Field` takes `inline` (label beside the control, for bars) and
|
|
156
|
+
`size`; `DatePicker` takes `locale` (BCP 47 — `"zh-CN"`, `"ja-JP"` — for the month grid and
|
|
157
|
+
field text); `Pagination` takes `format(from, to, total, page, pageCount)` to localise its
|
|
158
|
+
range label; `Table` takes `size` (`dense` remains as `size="sm"`).
|
|
159
|
+
|
|
160
|
+
Text, weight and tracking follow the tier through `--control-text` / `--control-leading` /
|
|
161
|
+
`--control-tracking`. Under `lang="zh" | "ja" | "ko"` on `<html>` or on a region, the medium
|
|
162
|
+
weight becomes 600 and all tracking is 0 — nothing to configure. `DESIGN.md` has the full token
|
|
163
|
+
table and the rules behind it.
|
|
164
|
+
|
|
165
|
+
## Component index (117 components)
|
|
126
166
|
Import path is `@keyfunc/keybricks-ds/components/<group>/<Name>.jsx` (React) or `.vue` (Vue 3).
|
|
127
167
|
Every component has a sibling `.d.ts` with its full props contract, and each group has a
|
|
128
168
|
`.prompt.md` with usage notes.
|
|
129
169
|
|
|
170
|
+
**Style units differ between the two trees.** React appends `px` to unitless numbers in a
|
|
171
|
+
style object; Vue's `:style` binding does not — `{ height: 30 }` is silently dropped by the
|
|
172
|
+
browser in Vue (only `0` survives, which is why it "sometimes works"). Every `.vue` file in
|
|
173
|
+
this package therefore writes lengths as strings (`'30px'`) or wraps numeric props in
|
|
174
|
+
`px()` from `components/px.js`. Do the same in your own Vue code. In React, the one trap is
|
|
175
|
+
`lineHeight`: a bare number is a multiplier, not pixels — use the `--leading-*` tokens.
|
|
176
|
+
|
|
130
177
|
**One difference between the two trees.** A `.jsx` file may export several related
|
|
131
178
|
components (`Input.jsx` exports `Input` and `Textarea`; `Badge.jsx` exports `Badge` and
|
|
132
179
|
`IconTile`). Vue single-file components hold exactly one component and `<script setup>`
|
|
133
180
|
cannot export values, so on the Vue side every such secondary is its own file with a default
|
|
134
|
-
export — `Textarea.vue`, `IconTile.vue`, `StatusBadge.vue`, `ButtonGroup.vue`, `StatCard.vue`, `Toast.vue`,
|
|
181
|
+
export — `Textarea.vue`, `IconTile.vue`, `StatusBadge.vue`, `Tooltip.vue`, `ToastStack.vue`, `Port.vue`, `PortLabel.vue`, `ChartLegend.vue`, `ChartTooltip.vue`, `PlotGrid.vue`, `XLabels.vue`, `ButtonGroup.vue`, `StatCard.vue`, `Toast.vue`,
|
|
135
182
|
`Spinner.vue`, `PageHeading.vue`, and so on — always named exactly as the React export.
|
|
136
|
-
Shared non-component values live in plain modules: `
|
|
137
|
-
`
|
|
183
|
+
Shared non-component values live in plain modules: `navigation/nav-model.js` (`KEYBRICKS_NAV`),
|
|
184
|
+
`navigation/theme-store.js` (`applyStoredTheme`), `pipeline/pipeline-catalog.js` (`PIPELINE_CATALOG`),
|
|
185
|
+
`icons/icon-paths.js`, `icons/feather-paths.js` — all five are also exported from
|
|
186
|
+
`@keyfunc/keybricks-ds/vue` — plus the internal helpers `forms/input-base.js` (`inputBase`),
|
|
187
|
+
`pipeline/port-skin.js` (`portSkin`) and `px.js` (`px`).
|
|
138
188
|
|
|
139
189
|
```js
|
|
140
190
|
// React
|
|
@@ -145,46 +195,41 @@ import Input from '@keyfunc/keybricks-ds/components/forms/Input.vue'
|
|
|
145
195
|
import Textarea from '@keyfunc/keybricks-ds/components/forms/Textarea.vue'
|
|
146
196
|
```
|
|
147
197
|
|
|
148
|
-
### `brand/` — brand expression
|
|
149
|
-
| Component | What it's for |
|
|
150
|
-
| --- | --- |
|
|
151
|
-
| `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. |
|
|
152
|
-
|
|
153
198
|
### `buttons/` — actions
|
|
154
199
|
| Component | What it's for |
|
|
155
200
|
| --- | --- |
|
|
156
|
-
| `Button` | The primary action element. 8 variants (primary, dark, outline, ghost, primary-soft, danger, danger-soft, text)
|
|
157
|
-
| `IconButton` | Square glyph-only button for toolbars and headers.
|
|
201
|
+
| `Button` | The primary action element. 8 variants (primary, dark, outline, ghost, primary-soft, danger, danger-soft, text), with icon, loading and disabled states. Height and text come from the region's size tier (24 · 32 · 36). |
|
|
202
|
+
| `IconButton` | Square glyph-only button for toolbars and headers. A square of the tier's control height (24 · 32 · 36), danger and muted tones, toggle-on `active` state. |
|
|
158
203
|
| `ButtonGroup` | Joins buttons into a segmented control or split button — handles the shared borders and corner radii. |
|
|
159
204
|
| `ActionChip` | Compact pill action, used in toolbars and empty states. |
|
|
160
205
|
|
|
161
206
|
### `forms/` — data entry
|
|
162
207
|
| Component | What it's for |
|
|
163
208
|
| --- | --- |
|
|
164
|
-
| `Field` | Label + required marker + hint + error wrapper. Wrap every input in one. |
|
|
165
|
-
| `Input` | Single-line text input.
|
|
209
|
+
| `Field` | Label + required marker + hint + error wrapper. Wrap every input in one. `inline` puts the label beside the control for toolbars and filter bars. |
|
|
210
|
+
| `Input` | Single-line text input. Prefix/suffix, error and read-only states; height and text from the size tier. |
|
|
166
211
|
| `Textarea` | Multi-line input with optional character counter and auto-resize. |
|
|
167
212
|
| `Select` | Native-feeling dropdown for a known list of options. |
|
|
168
213
|
| `Combobox` | Type-to-filter single select, with keyboard nav and a no-results row. |
|
|
169
214
|
| `MultiSelect` | Checkbox dropdown; picks render as removable tags with `+n` overflow. |
|
|
170
215
|
| `SearchInput` | Search field with a leading glyph and a clear button. |
|
|
171
|
-
| `Checkbox` |
|
|
216
|
+
| `Checkbox` | A 14 / 16 / 16px box by tier, plus an indeterminate state for parent rows. |
|
|
172
217
|
| `Radio` / `RadioGroup` | Single choice from 2–5 visible options (past five, use `Select`). `description` adds a muted second line; `row` lays out horizontally; `variant="cards"` renders bordered selectable cards for choices a user must weigh. Arrow keys move the selection. Vue: `v-model`. |
|
|
173
|
-
| `Switch` | Immediate on/off setting (no Save button).
|
|
218
|
+
| `Switch` | Immediate on/off setting (no Save button). Track 28×16 / 36×20 / 44×24 by tier; the lg tier is roomy enough for a knob glyph (`knobIcon` / `knobText`, one character). `insideOn`/`insideOff` for text in the pill, `labelOn`/`labelOff` for captions beside it (or `label` for a single settings caption). `tone="semantic"` is danger-off → success-on — reserve it for states with real consequence. `beforeChange(next)` returns a promise; the knob spins until it settles. Vue: `v-model:checked`. |
|
|
174
219
|
| `NumberStepper` | Numeric input with − / + buttons and min/max clamping. |
|
|
175
220
|
| `Slider` | Range input with a filled track, drag value bubble and optional min/max labels. |
|
|
176
|
-
| `DatePicker` | Text field plus a month-grid popover. Values are `YYYY-MM-DD` strings. |
|
|
221
|
+
| `DatePicker` | Text field plus a month-grid popover. Values are `YYYY-MM-DD` strings; `locale` localises the month title, weekday initials and field text. |
|
|
177
222
|
| `Dropzone` | File drop target with hover, drag-over, uploaded and error states. |
|
|
178
223
|
|
|
179
224
|
### `data/` — tables and structured values
|
|
180
225
|
| Component | What it's for |
|
|
181
226
|
| --- | --- |
|
|
182
|
-
| `
|
|
227
|
+
| `Table` | The standard table (renamed from `DataTable` in 1.0.6; the old name still works as a deprecated alias from the package entry until 3.0, but file imports must point at `data/Table.jsx` / `Table.vue`): sortable headers, per-column render functions, alignment, selection. It is a size region — rows are 32 / 40 / 44px and cells share the tier's text; `size="sm"` (or the 1.x `dense`) for preview grids. Put it in a rounded box with `bordered` (it draws its own frame), or `framed` when it sits flush inside a `Card pad={false}` — never wrap it in your own bordered div, the header rule doubles against the frame. `empty` (Vue: `#empty` slot) renders inside the table when there are no rows. `resizable` adds a short divider between header cells — hover darkens it, drag sets the width; pass `columnWidths` + `onColumnResize` to persist. |
|
|
183
228
|
| `SmartTable` | Notion/Airtable-style table — typed field columns, inline editing, row hover actions. |
|
|
184
229
|
| `Spreadsheet` | Excel-style grid: formula bar, frozen headers, range selection, `=SUM()` evaluation, sheet tabs. |
|
|
185
230
|
| `FilterBar` | List-report filter bar with variant title, wrapping filter fields, and Adapt Filters / Go. |
|
|
186
231
|
| `ListRow` | One row of a list view — icon, title, meta, trailing actions. |
|
|
187
|
-
| `Pagination` | Page controls with a row-range label and first/last disabled states. |
|
|
232
|
+
| `Pagination` | Page controls with a row-range label and first/last disabled states; `format` localises the label. |
|
|
188
233
|
| `KeyValue` / `KeyValueList` | Label-and-value pairs for detail panels and summaries. |
|
|
189
234
|
| `DiffValue` | Before → after comparison, used in migration and confirmation steps. |
|
|
190
235
|
| `CodeBlock` | Monospace block with optional line numbers and a copy button. |
|
|
@@ -207,7 +252,7 @@ import Textarea from '@keyfunc/keybricks-ds/components/forms/Textarea.vue'
|
|
|
207
252
|
| `Tabs` | Page-level underline tabs. |
|
|
208
253
|
| `PanelTabs` | Compact tabs inside a detail panel or drawer. |
|
|
209
254
|
| `PillTabs` | Filter/status tabs as pills. |
|
|
210
|
-
| `SegmentedControl` | Switches views of the same data, applies instantly — not a saved form value (`RadioGroup`) and not page navigation (`Tabs`).
|
|
255
|
+
| `SegmentedControl` | Switches views of the same data, applies instantly — not a saved form value (`RadioGroup`) and not page navigation (`Tabs`). Reads the size tier, `icon` per option, `iconOnly`, per-option or whole-control `disabled`, `fullWidth`. ← → keyboard. |
|
|
211
256
|
| `ViewToggle` | List/grid icon toggle. |
|
|
212
257
|
|
|
213
258
|
### `feedback/` — status, overlays, progress
|
|
@@ -245,7 +290,7 @@ import Textarea from '@keyfunc/keybricks-ds/components/forms/Textarea.vue'
|
|
|
245
290
|
### `icons/` — iconography
|
|
246
291
|
| Component | What it's for |
|
|
247
292
|
| --- | --- |
|
|
248
|
-
| `Icon` |
|
|
293
|
+
| `Icon` | 330 stroke glyphs: the 83-glyph core set plus all of Feather (on a shared name the core glyph wins). `<Icon name="download" size={16} />` |
|
|
249
294
|
| `Unicon` | 1,206 additional Unicons line glyphs, loaded from CDN. Use when `Icon` has no match. |
|
|
250
295
|
|
|
251
296
|
### `pipeline/` — the data-pipeline editor
|
|
@@ -301,8 +346,8 @@ being dragged (`outputTone="active"`), and a crosshair drop target (`inputTones[
|
|
|
301
346
|
Pass `onConnect` to `PipelineCanvas` to enable wiring: holding an output port drags a dashed
|
|
302
347
|
bezier, the canvas hit-tests the pointer against input-port geometry within `snapRadius`
|
|
303
348
|
(30px), and the drop reports `{from, to, toPort}`. `DataPreview` is only the bottom drawer
|
|
304
|
-
chrome (title, Debug Mode, collapse) around the shared
|
|
305
|
-
`
|
|
349
|
+
chrome (title, Debug Mode, collapse) around the shared `Table` at the sm tier — reach for
|
|
350
|
+
`Table` directly unless you need that drawer.
|
|
306
351
|
|
|
307
352
|
---
|
|
308
353
|
|
|
@@ -315,7 +360,8 @@ cards; the ones you will reach for daily:
|
|
|
315
360
|
| --- | --- |
|
|
316
361
|
| Page background | `--bg-app` |
|
|
317
362
|
| Card / panel background | `--bg-surface` |
|
|
318
|
-
| Nested well
|
|
363
|
+
| Nested well | `--bg-inset` |
|
|
364
|
+
| Table header row | `--bg-table-header` |
|
|
319
365
|
| Row hover | `--bg-hover` |
|
|
320
366
|
| Body text | `--text-body` |
|
|
321
367
|
| Headings | `--text-heading` |
|
|
@@ -326,6 +372,9 @@ cards; the ones you will reach for daily:
|
|
|
326
372
|
| Primary action | `--action-primary` |
|
|
327
373
|
| Text on any saturated fill | `--on-accent` |
|
|
328
374
|
| Success / warning / danger / info | `--success` `--warning` `--danger` `--info-fg` (each with `-bg` and `-text` companions) |
|
|
375
|
+
| Control height / text / padding | `--control-h` `--control-text` `--control-px` — set by the region's `data-size` |
|
|
376
|
+
| Row height, gaps | `--bar-h` `--control-gap` (inside a group) `--group-gap` (between groups) `--edge-pad` |
|
|
377
|
+
| UI text | `--text-xs` 12 · `--text-base` 14 · `--text-md` 16 · `--text-lg` 20 (each with `--leading-*` and `--tracking-*`) |
|
|
329
378
|
|
|
330
379
|
Three rules that keep a UI consistent:
|
|
331
380
|
|
|
@@ -400,7 +449,8 @@ it will flip for free. Two things to watch:
|
|
|
400
449
|
|
|
401
450
|
## Interaction states — you get these for free
|
|
402
451
|
|
|
403
|
-
`tokens/interaction.css` delivers press and keyboard focus globally
|
|
452
|
+
`tokens/interaction.css` delivers press and keyboard focus globally, and `tokens/hover.css` the hover
|
|
453
|
+
step for controls whose colours are inline (both arrive through the `styles.css` import) — `:active` adds
|
|
404
454
|
`filter: var(--press-filter)` (which darkens in light mode and brightens in dark), and
|
|
405
455
|
`:focus-visible` draws a 2px `--focus-border` outline. It applies to `button`, `a`, `label`,
|
|
406
456
|
and anything with `role="button"`, `menuitem`, `option`, `tab`, `switch`, `treeitem` etc.
|
|
@@ -416,6 +466,20 @@ both states:
|
|
|
416
466
|
Button and IconButton carry `data-press="own"` because their press colors are explicit
|
|
417
467
|
tokens rather than a filter.
|
|
418
468
|
|
|
469
|
+
Hover for your own controls uses the same hooks the components use. Each sets a custom
|
|
470
|
+
property on hover that your inline style reads, so focus, error and selected colours you write
|
|
471
|
+
as plain values always win:
|
|
472
|
+
|
|
473
|
+
| Attribute | Read this in your style | Hover result |
|
|
474
|
+
| --- | --- | --- |
|
|
475
|
+
| `data-field` | `border: 1px solid var(--field-border, var(--border-control))` | border → `--border-strong` |
|
|
476
|
+
| `data-wash` | `background: var(--wash, transparent)` | surface → `--bg-hover` |
|
|
477
|
+
| `data-ink` | `color: var(--ink, var(--text-secondary))` | ink → `--text-heading` |
|
|
478
|
+
| `data-row` | `background: var(--row-wash, transparent)` | row → `--bg-inset` |
|
|
479
|
+
| `data-link` | `text-decoration-line: var(--link-line, none)` | underline appears |
|
|
480
|
+
|
|
481
|
+
Leave the attribute off while the control is disabled, selected or open.
|
|
482
|
+
|
|
419
483
|
## Versioning
|
|
420
484
|
|
|
421
485
|
Semver, tagged in GitLab. Patch = fixes; minor = new components, new props, and token
|
|
@@ -426,22 +490,152 @@ a migration note in the release. Token renames are major because your own code r
|
|
|
426
490
|
Pin a minor range and update deliberately:
|
|
427
491
|
|
|
428
492
|
```json
|
|
429
|
-
"@keyfunc/keybricks-ds": "~
|
|
493
|
+
"@keyfunc/keybricks-ds": "~2.3.1"
|
|
430
494
|
```
|
|
431
495
|
|
|
432
|
-
|
|
496
|
+
### Migrating from 1.x to 2.0
|
|
497
|
+
|
|
498
|
+
2.0 is a visual major: no component was removed and no token was removed, but values moved.
|
|
499
|
+
|
|
500
|
+
- **The 14px scale.** `--text-base` is 14px (was 13), `--text-xs` 12 (was 11), `--text-md` 16,
|
|
501
|
+
`--text-lg` 20, `--text-xl` 24; line-heights are whole numbers on a 4px rhythm. `--text-sm` is
|
|
502
|
+
now an alias of `--text-xs` (12px) — replace it with `--text-xs` when you touch the code.
|
|
503
|
+
`--text-2xs` (11px) is for chart tick labels only.
|
|
504
|
+
- **Controls are 32px by default, not 36.** `--h-input` and `--h-button` now both resolve to
|
|
505
|
+
`--control-h`; `--h-button-sm` is 24 (was 30). Anything you sized to sit beside an input
|
|
506
|
+
should read `var(--control-h)` instead of a literal.
|
|
507
|
+
- **Size tiers replace per-control sizing.** `size` props still work on every component, but set
|
|
508
|
+
`data-size` on the region instead. `xs` on `IconButton` and `dense` on `Table` / `DataPreview`
|
|
509
|
+
are aliases of `sm`; nothing renders below 24px any more.
|
|
510
|
+
- **Tables.** Header cells are the same size as body cells, weight 600, sentence case, no
|
|
511
|
+
letter-spacing; mono columns match the row's size. Rows are 40px at md (were 51.5) and 32px at sm.
|
|
512
|
+
- **Chrome.** `--h-nav-item` 36 (was 35.5), `--h-subnav-item` 32 (was 31.5), `--h-tree-item` 32
|
|
513
|
+
(was 30).
|
|
514
|
+
- **CJK.** Under `lang="zh" | "ja" | "ko"`, `--weight-medium` resolves to 600 and every
|
|
515
|
+
`--tracking-*` to 0. If your app sets `lang` on `<html>` already, nothing to do.
|
|
516
|
+
- **Tokens outside CSS.** `tokens.json` / `tokens.js` / `tokens.d.ts` gained the tier tokens
|
|
517
|
+
(`--control-*`, `--bar-h`, `--group-gap`, …) — 352 light tokens in all (2.0.2 adds `--danger-soft-hover`).
|
|
518
|
+
|
|
519
|
+
### 2.3.1
|
|
520
|
+
|
|
521
|
+
- **`Table` row open, tree rows and labels.** `onRowOpen(row, index, event)` (Vue `@row-open`) makes the icon tile and title of a two-line cell open the row (hand cursor; Enter / Space on the title). `tree` with nested `children` (or `hasChildren` for lazy rows) indents the two-line column 24px per level with an expand arrow — `expandedKeys` / `defaultExpandedKeys` / `onExpandChange(row, expanded, keys)` (Vue `v-model:expandedKeys`, `@expand-change`), `rowKey` (default `id`); sorting reorders siblings only. `labels: { sortAsc, sortDesc, sortClear, more, expand, collapse }` translates every word the table draws (English by default). Indices reported by selection and callbacks are depth-first over all rows — unchanged for flat tables.
|
|
522
|
+
- Additive only: flat tables, existing props and indices behave exactly as in 2.3.0.
|
|
523
|
+
|
|
524
|
+
### 2.3.0
|
|
525
|
+
|
|
526
|
+
- **sm and lg size tiers.** sm controls are **28px** (was 24) with 36px rows and bars (was 32);
|
|
527
|
+
lg controls are **40px** (was 36) with 48px rows (was 44); md is unchanged. 24px sat at the
|
|
528
|
+
floor of the industry range and left the segmented control's segments 18px tall; 36 was only
|
|
529
|
+
4px above md, where Ant Design, Fluent 2, Primer and shadcn all step to 40. sm text stays 12px
|
|
530
|
+
for Latin. Layouts built on the tier tokens follow automatically; anything you sized by hand to
|
|
531
|
+
sit beside an sm or lg control should be re-checked.
|
|
532
|
+
- **CJK small sizes are one step larger.** Under `lang="zh" | "ja" | "ko"` (Simplified and
|
|
533
|
+
Traditional Chinese alike) `--text-xs` / `--text-sm` are 13px with 18px leading and
|
|
534
|
+
`--text-2xs` is 12px, so no CJK text renders below 12px. 14px and up are unchanged. In sm
|
|
535
|
+
regions the CJK medium weight is 400. Outside sm, CJK `--weight-medium` and `--weight-semibold` are both 500 (they were 600): at the same number, CJK glyphs read heavier than Latin, so 600 looked a step bolder than English and erased the difference between labels and headers. On Windows (no 500 face in YaHei / Meiryo / Malgun) both render Regular. Chart numerals use the new `--text-2xs-mono`
|
|
536
|
+
(11px in every language).
|
|
537
|
+
- `Table` selection: the checkbox now sits in the first column's leading space instead of a column of its own. Both sides of the checkbox now equal the edge padding (16px; 12px in sm), so the box sits evenly between the card edge and the first column's text and stays aligned with card titles and toolbars. Before, the gap was 40px and grew with the table width when columns declared widths (up to ~120px). If you styled the old selection cell (`td:first-child` holding only the checkbox), move that styling to the first data cell.
|
|
538
|
+
- **`Table` two-line name rows**: a `twoLine` column renders an `IconTile` (kind "row", tinted by `hue`; `neutral` = grey), a title over a description (each one line, truncated), an optional 14px mark (`"favorite"` = filled star in `--warning`) and a trailing sm `⋯` (`onRowMore(row, index, event)`, Vue `@row-more`). md rows are 58px (sm 50 · lg 68; CJK 54 · 60 · 70); the header keeps the bar height. New tier tokens `--title-cell-py`, `--title-cell-gap`, `--title-cell-tile`, `--title-cell-icon`, `--title-cell-tile-r`, `--title-cell-tile-gap`. `IconTile kind="row"` is now tinted when you pass `hue` (unchanged without it), adds `hue="neutral"` and an `iconStyle` prop.
|
|
539
|
+
- **`Table` sortable headers**: `sortable: true` on a column adds a muted sm sort button at the header cell's right end (in line with a two-line row's `⋯`) — on hover while unsorted (`arrow-up`), kept while sorted (`arrow-up` / `arrow-down`, label `--text-heading`, `aria-sort`). Click cycles ascending → descending → none; one column at a time; tooltips *Sort ascending* / *Sort descending* / *Clear sorting*. New props `sort`, `defaultSort`, `onSortChange` (Vue `v-model:sort`, `@sort-change`), `manualSort`; column `compare`. Selection indices keep referring to the original `rows` order.
|
|
540
|
+
- `IconButton` hover and press are now alpha overlays (`--overlay-hover`, `--overlay-press`) instead of the solid `--bg-hover` / `--bg-press`. On white they are the same colour as before; on a grey surface (table header, toolbar) the hover is now visible instead of matching the background. `--overlay-press` is 12% (was 8%, unused) and the dark theme gets its own overlay values (8% / 16%).
|
|
541
|
+
- **Fix — `Table` `code` columns:** only text and number values get the code chip; an element in the cell (a `Skeleton` while loading, a link) renders as is. Before, a loading row in a code column drew a chip around the skeleton and grew to about 50px.
|
|
542
|
+
- **Two AI glyphs join the core icon set**: `ai` (rounded frame, open at the top-right, with a large and a small four-point star) and `ai-sparkles` (a large and a small four-point star). Both are traced from the reference glyphs and redrawn to the core-set rules: stroke 2 with no fill, integer endpoints, at least 2px clear between separate elements. The core set is 83 glyphs; `Icon` resolves 330 names. Search terms: ai, assistant, copilot, agent, intelligent, generative, sparkles, magic.
|
|
543
|
+
- `Pagination`: page items and prev/next lose their border (GitHub Primer / Atlassian style). The current page takes the neutral selected fill (`--bg-active`, weight 600) instead of the action blue — it is a state, not an action; the others are plain until hovered. Size is unchanged — items stay control-height (32px at md).
|
|
544
|
+
- The monospace font is now for code only (`CodeBlock`, `LogViewer`, code in the docs). `Table`/`SmartTable` `mono` columns, `KeyValue` and `DiffValue` `mono`, `Spreadsheet` numbers and formula bar, `Kbd`, the `Input`/`Textarea` counter, the `Slider` value and every chart number now use `--font-sans` with tabular figures; `mono` columns also take the normal text colour. The `mono` props and the `--text-2xs-mono` token keep their names. Config codes get a new column option, `code: true`: a code chip — Menlo at the new `--text-code` / `--leading-code` (12/18px, 11/16px in sm, not bumped in CJK) on `--bg-inset` with a hairline border. Switch config-code columns from `mono` to `code`.
|
|
545
|
+
- `Table` column separators (the resize handles in the header) are one step darker: new token `--border-split` — `#D4D4D4` light, `#404040` dark (was `--border-control`, #E5E5E5 / #333333). Hover and drag still turn them blue.
|
|
546
|
+
- New tokens: `--text-2xs-mono` and `--text-glyph-min` (11px, 12px in CJK) — the floor for text that is sized from geometry: `Switch` inside/knob text and `Avatar` initials no longer drop to 9–10px. `--h-button-sm` is 28px.
|
|
547
|
+
- Removed the `ui_kits/keybricks-app` product recreation and the `templates/web-app` starter: the
|
|
548
|
+
production designs now live in their own projects. No component or token is affected.
|
|
549
|
+
- **Fix — React entry:** `applyStoredTheme` was documented but missing from
|
|
550
|
+
`@keyfunc/keybricks-ds` (the barrel generator skipped lower-case names). It is exported now.
|
|
551
|
+
- **Fix — Vue entry:** `KEYBRICKS_NAV` and `applyStoredTheme` existed for Vue only as comments.
|
|
552
|
+
They now live in `navigation/nav-model.js` and `navigation/theme-store.js`, which React re-exports
|
|
553
|
+
and `@keyfunc/keybricks-ds/vue` exports directly, along with `PIPELINE_CATALOG`, `VUE_ICON_PATHS`
|
|
554
|
+
and `FEATHER_PATHS` — one source for both frameworks.
|
|
555
|
+
- **Fixes — Vue matched to React** (found by a token-by-token and prop-by-prop audit of every
|
|
556
|
+
React/Vue pair): `Tree` keyboard focus ring uses `--focus-border` (was `--focus-ring`) and now
|
|
557
|
+
accepts `treeData`, `expandedKeys`, `selectedKeys`, `checkedKeys`; `Switch` accepts
|
|
558
|
+
`inlinePrompt`; `Timeline` title and meta carry their line-height and tracking (CJK meta now
|
|
559
|
+
gets its 18px leading); `Spreadsheet` column headers carry `--tracking-xs`; `SmartTable` URL
|
|
560
|
+
cells use `--link`; `FunnelChart` bands animate width; `WaterfallChart` shows the hover band.
|
|
561
|
+
`BulletChart` range bands use `--neutral-alpha-12` in both frameworks (theme-aware; was a
|
|
562
|
+
hard-coded black in Vue and an undefined token in React).
|
|
563
|
+
- Sidebar nav model (`KEYBRICKS_NAV`): Reconciliation uses the `reconciliation` icon and
|
|
564
|
+
Consolidation the `consolidation` icon; the Management › Reconciliation entry no longer reuses
|
|
565
|
+
`network`.
|
|
566
|
+
- Component cards share one specimen layout (label column, 12px sentence-case labels) and every
|
|
567
|
+
size-tier demo shows a Latin row and a CJK row.
|
|
568
|
+
|
|
569
|
+
### 2.2.0
|
|
570
|
+
|
|
571
|
+
- **Eleven Keybricks glyphs join the core icon set** — `<Icon name="journal" />` in React and
|
|
572
|
+
Vue alike. Modules: `reconciliation`, `consolidation`, `journal`, `event`, `view-tree`.
|
|
573
|
+
Actions: `drilldown`, `add-below`, `copy-data`, `task-execution`, `time-future`,
|
|
574
|
+
`time-restatement`. Each was checked against the core-set drawing rules, now written down in
|
|
575
|
+
the Iconography section of `readme.md`; six were redrawn to meet them (paths inside 2–22,
|
|
576
|
+
integer coordinates, 2px between separate elements, rx 1 on small rects, true circular
|
|
577
|
+
corners). The core set is now 81 glyphs; with Feather, `Icon` resolves 328 names.
|
|
578
|
+
- Two submitted glyphs were already in the library and were not duplicated: *hierarchy* is
|
|
579
|
+
`layers` and *change* is Feather's `repeat`. Both words now find them in the icon search.
|
|
580
|
+
- The docs gave the icon total as 362. That counted the 40 names Feather shares with the core
|
|
581
|
+
set twice; the number of distinct names is now 328.
|
|
582
|
+
|
|
583
|
+
### 2.1.1
|
|
584
|
+
|
|
585
|
+
- **Chart series palette replaced** (`--series-1…8`, light and dark). One lightness band, a chroma
|
|
586
|
+
floor, no green or red in the sequence (those stay on `--chart-pos` / `--chart-neg` and status):
|
|
587
|
+
blue `#3b82f6` · orange `#e16c10` · teal `#079a94` · violet `#8254c4` · gold `#b98705` ·
|
|
588
|
+
magenta `#bc378d` · olive `#7a8d30` · sky `#2f99c0`; dark values are tuned for `#161616`.
|
|
589
|
+
`--series-9` is now a grey (was danger red); `--series-10` is unchanged. Every adjacent pair
|
|
590
|
+
passes ΔE ≥ 8 under colour-vision-deficiency simulation and ≥ 3:1 on the surface. Charts that
|
|
591
|
+
read `--series-*` pick the new colours up automatically; nothing to change in app code.
|
|
592
|
+
`CandlestickChart`'s moving-average line is now `--chart-total` (was `--series-8`), in line with
|
|
593
|
+
every other overlay line; status bands in demos read `--warning`, never a series slot.
|
|
594
|
+
- **Hover hooks moved to `tokens/hover.css`.** The npm path `@keyfunc/keybricks-ds/styles.css`
|
|
595
|
+
now resolves to `keybricks.css`, which imports the token sheet and the hooks together, so the
|
|
596
|
+
one-line import is unchanged. Only apps that link the raw files must add `tokens/hover.css`.
|
|
597
|
+
- **CJK scope** is `[lang|="zh"]` / `[lang|="ja"]` / `[lang|="ko"]` instead of `:lang()` — same
|
|
598
|
+
result when `lang` is set on `<html>` or a region. (A nested region that switches *back* to a
|
|
599
|
+
Latin language no longer regains letter-spacing; set the tracking locally if you need that.)
|
|
600
|
+
|
|
601
|
+
### 2.1.0
|
|
602
|
+
|
|
603
|
+
- **`BrandVisual` is removed**, with its seven generated motifs, its card and its lint rules. The
|
|
604
|
+
artwork was retired; a new brand visual language will ship separately when it is ready.
|
|
605
|
+
Nothing else in the system used it. If your code imports `BrandVisual`, keep it pinned to
|
|
606
|
+
`~2.0.3` until the import is gone. 117 components remain.
|
|
607
|
+
|
|
608
|
+
### 2.0.3
|
|
609
|
+
|
|
610
|
+
- Housekeeping, no component or token changes. Removed files nothing used: the empty
|
|
611
|
+
`Canvas.dc.html` and the root `support.js` only it loaded; the frozen pre-2.0 export
|
|
612
|
+
`Keybricks App.html` and its source `ui_kits/keybricks-app/standalone-src.html` (the live UI kit
|
|
613
|
+
is `ui_kits/keybricks-app/index.html`); the eleven `components/*/_dir.card.html` placeholder cards
|
|
614
|
+
that the site never showed; and `github.md`, whose icon-source notes now live in `readme.md`.
|
|
615
|
+
|
|
616
|
+
### 2.0.2
|
|
617
|
+
|
|
618
|
+
- Hover on every pointer target. Field boxes (`Input`, `Textarea`, `Select`, `Combobox`,
|
|
619
|
+
`MultiSelect`, `DatePicker`, `SearchInput`, `NumberStepper`) darken their border; stepper
|
|
620
|
+
− / +, pagination items, pill tabs, spreadsheet tools, accordion and palette headers, sidebar
|
|
621
|
+
sections and doc-tree items take the `--bg-hover` wash; inactive tabs, segments, legend items
|
|
622
|
+
and clear / copy buttons darken their ink; table body rows take `--bg-inset`; checkbox rings,
|
|
623
|
+
switch tracks and slider thumbs respond too. The hooks are documented under *Interaction states*.
|
|
624
|
+
- `NodeCard` subtitle icon is 12px and sits on the cap height of its 12px label.
|
|
625
|
+
- `BrandVisual` (React) passes camelCase SVG props — no more console warnings.
|
|
626
|
+
- The icon index had `calendar` twice; the Feather Library card now counts 317 icons.
|
|
627
|
+
|
|
628
|
+
### 2.0.1
|
|
629
|
+
|
|
630
|
+
- Card and section headers: secondary actions are `ghost` at the region's tier, never a smaller
|
|
631
|
+
button; the rule is in `DESIGN.md` → *Button emphasis*.
|
|
632
|
+
- Icons beside multi-line text (`Alert`, `Banner`, `Toast`, `NodeCard` subtitle) centre on the first
|
|
633
|
+
line; overlay close buttons (`Modal`, `Drawer`) centre on the title line at every tier.
|
|
634
|
+
- `Banner` and `Toast` dismiss buttons are the sm tier (24px). `Breadcrumb`'s overflow toggle is a
|
|
635
|
+
24px hit target. Palette tile labels are 12px.
|
|
636
|
+
- Every control card on the site shows its sm / md / lg tiers; demo content is English throughout.
|
|
433
637
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
A template is a ready-made screen you copy into a new project as a starting point, rather than a
|
|
437
|
-
component you import. Each lives in `templates/<slug>/`.
|
|
438
|
-
|
|
439
|
-
| Template | What you get |
|
|
440
|
-
| --- | --- |
|
|
441
|
-
| `templates/web-app/` | The full app shell: sidebar with the real nav model, top bar, page heading, stat tiles and a data table. |
|
|
442
|
-
|
|
443
|
-
Copy the folder, then edit one line — the `base` in `ds-base.js` — to point at wherever the design
|
|
444
|
-
system sits relative to the copied page.
|
|
638
|
+
Release mechanics, the CI pipeline and the Pages site are documented in `DEPLOY.md`.
|
|
445
639
|
|
|
446
640
|
## Getting help
|
|
447
641
|
|
package/SKILL.md
CHANGED
|
@@ -4,28 +4,30 @@ description: Use this skill to generate well-branded interfaces and assets for K
|
|
|
4
4
|
user-invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Read the
|
|
7
|
+
Read the readme.md file within this skill, and explore the other available files. This skill's documentation is bilingual (English / 中文)。
|
|
8
8
|
|
|
9
|
-
Key facts / 关键信息: Keybricks is a near-monochrome, hairline-bordered,
|
|
10
|
-
(Keybricks 是一个近乎单色、细边框、以
|
|
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
|
|
12
|
-
(设计令牌位于 `tokens/*.css`(经 `styles.css` 汇总,含深色模式 `tokens/dark.css` 与动效 `tokens/motion.css`);React 组件位于 `components
|
|
9
|
+
Key facts / 关键信息: Keybricks is a near-monochrome, hairline-bordered, 14px-Inter enterprise UI with one action blue (#155dfc, dark mode #1f6feb), five node-category hues, and a signature node-pipeline editor.
|
|
10
|
+
(Keybricks 是一个近乎单色、细边框、以 14px 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 and Vue 3 components in `components/<group>/` (each React file with a `.d.ts` contract; each group with a `.prompt.md` usage note).
|
|
12
|
+
(设计令牌位于 `tokens/*.css`(经 `styles.css` 汇总,含深色模式 `tokens/dark.css` 与动效 `tokens/motion.css`);React 与 Vue 3 组件位于 `components/<分组>/`(React 文件附 `.d.ts` 类型定义,每个分组附 `.prompt.md` 用法说明)。)
|
|
13
13
|
|
|
14
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
15
|
|
|
16
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
17
|
|
|
18
18
|
Rules of thumb / 要点速览:
|
|
19
|
-
- Inter
|
|
20
|
-
(Inter
|
|
19
|
+
- Inter 14px/400 is the default; 500 for nav/headings/labels; 600 for node & panel titles and table headers; 300 only for big numerals. Menlo only for code — CodeBlock, LogViewer and config-code chips; amounts and IDs stay in Inter with tabular figures. In Chinese/Japanese/Korean, 500 and 600 both become 500, tracking is 0, and text below 14px is one step larger (12→13, 11→12).
|
|
20
|
+
(Inter 14px/常规 为默认;500 用于导航/标题/标签;600 用于节点与面板标题及表头;300 仅用于大号数字。Menlo 只用于代码——代码块、日志和配置代码标签;金额与编号仍用 Inter 等宽数字。中/日/韩文中 500 与 600 都改为 500(同字重下方块字更显粗),字距为 0,14px 以下的字号比英文大一档(12→13、11→12)。)
|
|
21
|
+
- One size tier per region: `data-size="sm" | "md" | "lg"` = 28 / 32 / 40px controls (rows and bars 36 / 40 / 48). Set it on the bar, form, table or dialog; controls inherit. Never mix heights or text sizes in one row; nothing interactive under 24px.
|
|
22
|
+
(每个区域只用一档尺寸:`data-size="sm" | "md" | "lg"` 对应 28 / 32 / 40px 控件(行与工具栏 36 / 40 / 48)。设在工具栏、表单、表格或对话框上,控件自动继承。同一行不混用高度或字号;可交互元素不小于 24px。)
|
|
21
23
|
- Backgrounds: app #fafafa, surfaces white, hairline borders rgba(229,229,229,.6); shadows only on canvas nodes.
|
|
22
24
|
(背景:应用层 #fafafa,卡片层白色,细边框;仅画布节点有阴影。)
|
|
23
25
|
- One blue CTA per view; ghost text buttons beside it. Color only for meaning (category hues, status).
|
|
24
26
|
(每个界面只有一个蓝色主按钮,旁边配文字按钮;颜色只用于表达含义。)
|
|
25
|
-
- Icons: Lucide stroke
|
|
26
|
-
(图标统一用 Icon
|
|
27
|
-
- Radii: 4
|
|
28
|
-
(圆角:4px
|
|
27
|
+
- Icons: the Icon component — Lucide stroke glyphs plus the Keybricks glyphs drawn to the same rules (`ai`, `ai-sparkles`, module icons) — never emoji, never ad-hoc SVG.
|
|
28
|
+
(图标统一用 Icon 组件:Lucide 线性图标,加上按同一规范绘制的 Keybricks 图标(`ai`、`ai-sparkles`、模块图标)——禁止 emoji,禁止临时手绘 SVG。)
|
|
29
|
+
- Radii: 4 checkboxes · 8 buttons/inputs/row icon tiles · 10 cards · 14/16 tiles & nodes · full circles.
|
|
30
|
+
(圆角:4px 复选框、8px 按钮/输入框/行内图标块、10px 卡片、14/16px 图标块与节点、端口/胶囊全圆角。)
|
|
29
31
|
- Copy: Title Case labels, imperative verb-first buttons ("Run Test", "Mark as New"), terse technical vocabulary.
|
|
30
32
|
(文案:标签用词首大写,按钮用祈使动词开头,术语简洁精确。)
|
|
31
33
|
- 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.
|