@keyfunc/keybricks-ds 1.0.3 → 2.1.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 +4 -4
- package/DESIGN.md +154 -53
- package/INTEGRATION.md +176 -36
- package/SKILL.md +6 -4
- package/_adherence.oxlintrc.json +183 -72
- package/_scripts/build-index.mjs +9 -0
- 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 +8 -3
- package/components/_cards/activity.card.html +2 -2
- package/components/_cards/alert.card.html +2 -2
- package/components/_cards/app-chrome.card.html +4 -4
- package/components/_cards/banner.card.html +1 -1
- package/components/_cards/breadcrumb.card.html +2 -2
- package/components/_cards/button-1-base.card.html +2 -2
- package/components/_cards/button-2-states.card.html +14 -14
- package/components/_cards/button-3-sizes-icons.card.html +1 -1
- package/components/_cards/button-4-group.card.html +5 -5
- 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 +2 -2
- package/components/_cards/charts-10-gauge.card.html +4 -4
- package/components/_cards/charts-11-funnel.card.html +2 -2
- package/components/_cards/charts-12-treemap.card.html +2 -2
- package/components/_cards/charts-14-radar.card.html +1 -1
- package/components/_cards/charts-15-distribution.card.html +1 -1
- package/components/_cards/charts-16-pareto.card.html +2 -2
- package/components/_cards/charts-17-candlestick.card.html +2 -2
- package/components/_cards/charts-18-sankey.card.html +2 -2
- package/components/_cards/charts-19-chord.card.html +2 -2
- package/components/_cards/charts-2-line.card.html +2 -2
- package/components/_cards/charts-20-sunburst.card.html +2 -2
- package/components/_cards/charts-21-worldmap.card.html +2 -2
- package/components/_cards/charts-22-gantt.card.html +2 -2
- package/components/_cards/charts-23-bar3d.card.html +2 -2
- package/components/_cards/charts-24-pie3d.card.html +2 -2
- package/components/_cards/charts-25-surface3d.card.html +2 -2
- package/components/_cards/charts-26-scatter3d.card.html +2 -2
- package/components/_cards/charts-27-ribbon3d.card.html +2 -2
- package/components/_cards/charts-3-bar.card.html +2 -2
- package/components/_cards/charts-4-barlist.card.html +2 -2
- package/components/_cards/charts-5-donut.card.html +3 -3
- package/components/_cards/charts-6-scatter.card.html +2 -2
- package/components/_cards/charts-7-heatmap.card.html +2 -2
- package/components/_cards/charts-8-waterfall.card.html +2 -2
- package/components/_cards/charts-9-bullet.card.html +2 -2
- package/components/_cards/charts-99-fullpage.card.html +5 -5
- package/components/_cards/checkbox.card.html +4 -4
- package/components/_cards/codeblock.card.html +1 -1
- package/components/_cards/combobox.card.html +3 -2
- package/components/_cards/context-menu.card.html +3 -2
- package/components/_cards/date-picker.card.html +5 -2
- package/components/_cards/diffvalue.card.html +2 -2
- package/components/_cards/divider.card.html +3 -3
- package/components/_cards/drawer.card.html +2 -2
- package/components/_cards/dropdown-menu.card.html +6 -6
- package/components/_cards/dropzone.card.html +1 -1
- package/components/_cards/empty-state.card.html +5 -5
- package/components/_cards/filter-bar.card.html +5 -5
- package/components/_cards/icon-button.card.html +2 -2
- package/components/_cards/icons-1-core.card.html +2 -2
- package/components/_cards/icons-2-feather.card.html +3 -3
- package/components/_cards/icons-3-unicons.card.html +3 -3
- 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 +2 -2
- package/components/_cards/log-viewer.card.html +2 -2
- package/components/_cards/modal.card.html +9 -9
- package/components/_cards/multi-select.card.html +3 -2
- package/components/_cards/number-stepper.card.html +3 -2
- package/components/_cards/pagination.card.html +3 -2
- package/components/_cards/people.card.html +3 -3
- package/components/_cards/pipeline-node.card.html +2 -2
- package/components/_cards/pipeline-palette.card.html +4 -4
- package/components/_cards/radio.card.html +46 -0
- package/components/_cards/search.card.html +5 -2
- package/components/_cards/segmented-control.card.html +39 -0
- package/components/_cards/select.card.html +4 -4
- package/components/_cards/slider.card.html +1 -1
- package/components/_cards/smart-table.card.html +1 -1
- package/components/_cards/spreadsheet.card.html +2 -2
- package/components/_cards/stepper.card.html +2 -2
- package/components/_cards/table.card.html +103 -0
- package/components/_cards/tabs.card.html +3 -2
- package/components/_cards/tag.card.html +5 -2
- package/components/_cards/textarea.card.html +2 -2
- package/components/_cards/timeline.card.html +1 -1
- package/components/_cards/toast.card.html +4 -4
- package/components/_cards/toggles.card.html +45 -56
- package/components/_cards/tooltip.card.html +5 -5
- package/components/_cards/tree.card.html +2 -2
- 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-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 +9 -4
- package/components/_vue/index.mjs +9 -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 +9 -7
- package/components/buttons/IconButton.vue +10 -8
- package/components/buttons/buttons.prompt.md +6 -5
- package/components/charts/Bar3D.jsx +2 -2
- package/components/charts/Bar3D.vue +2 -2
- package/components/charts/BarChart.jsx +4 -4
- package/components/charts/BarChart.vue +4 -4
- package/components/charts/BarList.jsx +1 -1
- package/components/charts/BarList.vue +1 -1
- package/components/charts/BoxPlot.jsx +1 -1
- package/components/charts/BoxPlot.vue +2 -2
- package/components/charts/BulletChart.jsx +1 -1
- package/components/charts/BulletChart.vue +1 -1
- package/components/charts/CandlestickChart.jsx +2 -2
- package/components/charts/CandlestickChart.vue +3 -3
- package/components/charts/ChartKit.jsx +5 -5
- 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 +2 -2
- package/components/charts/GanttChart.jsx +2 -2
- package/components/charts/GanttChart.vue +2 -2
- 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 +3 -3
- package/components/charts/LineChart.jsx +1 -1
- package/components/charts/LineChart.vue +3 -3
- package/components/charts/ParetoChart.jsx +3 -3
- package/components/charts/ParetoChart.vue +4 -4
- package/components/charts/PlotGrid.vue +18 -0
- package/components/charts/RadarChart.jsx +1 -1
- package/components/charts/RadarChart.vue +1 -1
- package/components/charts/Ribbon3D.jsx +2 -2
- package/components/charts/Ribbon3D.vue +2 -2
- package/components/charts/SankeyChart.jsx +2 -2
- package/components/charts/SankeyChart.vue +2 -2
- package/components/charts/Scatter3D.jsx +1 -1
- package/components/charts/Scatter3D.vue +1 -1
- package/components/charts/ScatterChart.jsx +3 -3
- package/components/charts/ScatterChart.vue +4 -4
- 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 +1 -1
- package/components/charts/Surface3D.jsx +2 -2
- package/components/charts/Surface3D.vue +2 -2
- package/components/charts/TreemapChart.jsx +2 -2
- package/components/charts/TreemapChart.vue +2 -2
- package/components/charts/WaterfallChart.jsx +2 -2
- package/components/charts/WaterfallChart.vue +3 -3
- package/components/charts/WorldMap.jsx +2 -2
- package/components/charts/WorldMap.vue +2 -2
- 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.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.jsx +3 -3
- package/components/data/KeyValue.vue +3 -3
- 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 +25 -22
- package/components/data/Spreadsheet.d.ts +2 -0
- package/components/data/Spreadsheet.jsx +12 -11
- package/components/data/Spreadsheet.vue +14 -13
- package/components/data/Table.d.ts +47 -0
- package/components/data/Table.jsx +85 -0
- package/components/data/Table.vue +63 -0
- package/components/data/data.prompt.md +3 -3
- package/components/display/Avatar.vue +3 -2
- package/components/display/AvatarGroup.vue +3 -2
- 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 +2 -1
- package/components/display/Kbd.vue +1 -1
- 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 +5 -5
- 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 +1 -1
- 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 +7 -7
- 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 +30 -0
- package/components/forms/Radio.jsx +65 -0
- package/components/forms/Radio.vue +17 -9
- package/components/forms/RadioGroup.vue +22 -4
- 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 +32 -24
- package/components/forms/Switch.jsx +85 -35
- package/components/forms/Switch.vue +57 -11
- package/components/forms/Textarea.vue +4 -4
- package/components/forms/forms.prompt.md +4 -1
- package/components/forms/input-base.js +2 -1
- package/components/index.d.ts +2 -2
- package/components/index.js +5 -5
- package/components/navigation/Breadcrumb.jsx +3 -3
- package/components/navigation/Breadcrumb.vue +4 -4
- 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 +1 -1
- package/components/navigation/Sidebar.vue +3 -3
- 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 +5 -5
- 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 +11 -4
- package/components/tabs/SegmentedControl.jsx +25 -10
- package/components/tabs/SegmentedControl.vue +19 -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 +4 -2
- package/keybricks.css +4 -0
- package/package.json +6 -3
- package/readme.md +90 -123
- package/readme.zh-CN.md +120 -0
- package/tokens/charts.css +20 -17
- package/tokens/colors.css +2 -2
- package/tokens/dark.css +2 -2
- package/tokens/hover.css +32 -0
- package/tokens/interaction.css +3 -1
- package/tokens/layout.css +29 -7
- package/tokens/tokens.d.ts +36 -0
- package/tokens/tokens.js +143 -89
- package/tokens/tokens.json +240 -106
- package/tokens/typography.css +27 -14
- 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.1.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 36px 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,68 +128,105 @@ 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> <!-- 24px controls · 12px text · 32px 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> <!-- 36px controls · 14px text · 44px 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
183
|
Shared non-component values live in plain modules: `forms/input-base.js` (`inputBase`),
|
|
137
|
-
`pipeline/pipeline-catalog.js` (`PIPELINE_CATALOG`), `icons/icon-paths.js`.
|
|
184
|
+
`pipeline/pipeline-catalog.js` (`PIPELINE_CATALOG`), `pipeline/port-skin.js` (`portSkin`), `px.js` (`px`), `icons/icon-paths.js`.
|
|
138
185
|
|
|
139
186
|
```js
|
|
140
187
|
// React
|
|
141
188
|
import { Input, Textarea } from '@keyfunc/keybricks-ds/components/forms/Input.jsx'
|
|
189
|
+
import { Radio, RadioGroup } from '@keyfunc/keybricks-ds/components/forms/Radio.jsx' // no longer inside Switch.jsx
|
|
142
190
|
// Vue
|
|
143
191
|
import Input from '@keyfunc/keybricks-ds/components/forms/Input.vue'
|
|
144
192
|
import Textarea from '@keyfunc/keybricks-ds/components/forms/Textarea.vue'
|
|
145
193
|
```
|
|
146
194
|
|
|
147
|
-
### `brand/` — brand expression
|
|
148
|
-
| Component | What it's for |
|
|
149
|
-
| --- | --- |
|
|
150
|
-
| `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. |
|
|
151
|
-
|
|
152
195
|
### `buttons/` — actions
|
|
153
196
|
| Component | What it's for |
|
|
154
197
|
| --- | --- |
|
|
155
|
-
| `Button` | The primary action element. 8 variants (primary, dark, outline, ghost, primary-soft, danger, danger-soft, text)
|
|
156
|
-
| `IconButton` | Square glyph-only button for toolbars and headers.
|
|
198
|
+
| `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). |
|
|
199
|
+
| `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. |
|
|
157
200
|
| `ButtonGroup` | Joins buttons into a segmented control or split button — handles the shared borders and corner radii. |
|
|
158
201
|
| `ActionChip` | Compact pill action, used in toolbars and empty states. |
|
|
159
202
|
|
|
160
203
|
### `forms/` — data entry
|
|
161
204
|
| Component | What it's for |
|
|
162
205
|
| --- | --- |
|
|
163
|
-
| `Field` | Label + required marker + hint + error wrapper. Wrap every input in one. |
|
|
164
|
-
| `Input` | Single-line text input.
|
|
206
|
+
| `Field` | Label + required marker + hint + error wrapper. Wrap every input in one. `inline` puts the label beside the control for toolbars and filter bars. |
|
|
207
|
+
| `Input` | Single-line text input. Prefix/suffix, error and read-only states; height and text from the size tier. |
|
|
165
208
|
| `Textarea` | Multi-line input with optional character counter and auto-resize. |
|
|
166
209
|
| `Select` | Native-feeling dropdown for a known list of options. |
|
|
167
210
|
| `Combobox` | Type-to-filter single select, with keyboard nav and a no-results row. |
|
|
168
211
|
| `MultiSelect` | Checkbox dropdown; picks render as removable tags with `+n` overflow. |
|
|
169
212
|
| `SearchInput` | Search field with a leading glyph and a clear button. |
|
|
170
|
-
| `Checkbox` |
|
|
171
|
-
| `Radio` / `RadioGroup` | Single choice from a
|
|
172
|
-
| `Switch` | Immediate on/off
|
|
213
|
+
| `Checkbox` | A 14 / 16 / 16px box by tier, plus an indeterminate state for parent rows. |
|
|
214
|
+
| `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`. |
|
|
215
|
+
| `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`. |
|
|
173
216
|
| `NumberStepper` | Numeric input with − / + buttons and min/max clamping. |
|
|
174
217
|
| `Slider` | Range input with a filled track, drag value bubble and optional min/max labels. |
|
|
175
|
-
| `DatePicker` | Text field plus a month-grid popover. Values are `YYYY-MM-DD` strings. |
|
|
218
|
+
| `DatePicker` | Text field plus a month-grid popover. Values are `YYYY-MM-DD` strings; `locale` localises the month title, weekday initials and field text. |
|
|
176
219
|
| `Dropzone` | File drop target with hover, drag-over, uploaded and error states. |
|
|
177
220
|
|
|
178
221
|
### `data/` — tables and structured values
|
|
179
222
|
| Component | What it's for |
|
|
180
223
|
| --- | --- |
|
|
181
|
-
| `
|
|
224
|
+
| `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. |
|
|
182
225
|
| `SmartTable` | Notion/Airtable-style table — typed field columns, inline editing, row hover actions. |
|
|
183
226
|
| `Spreadsheet` | Excel-style grid: formula bar, frozen headers, range selection, `=SUM()` evaluation, sheet tabs. |
|
|
184
227
|
| `FilterBar` | List-report filter bar with variant title, wrapping filter fields, and Adapt Filters / Go. |
|
|
185
228
|
| `ListRow` | One row of a list view — icon, title, meta, trailing actions. |
|
|
186
|
-
| `Pagination` | Page controls with a row-range label and first/last disabled states. |
|
|
229
|
+
| `Pagination` | Page controls with a row-range label and first/last disabled states; `format` localises the label. |
|
|
187
230
|
| `KeyValue` / `KeyValueList` | Label-and-value pairs for detail panels and summaries. |
|
|
188
231
|
| `DiffValue` | Before → after comparison, used in migration and confirmation steps. |
|
|
189
232
|
| `CodeBlock` | Monospace block with optional line numbers and a copy button. |
|
|
@@ -206,7 +249,7 @@ import Textarea from '@keyfunc/keybricks-ds/components/forms/Textarea.vue'
|
|
|
206
249
|
| `Tabs` | Page-level underline tabs. |
|
|
207
250
|
| `PanelTabs` | Compact tabs inside a detail panel or drawer. |
|
|
208
251
|
| `PillTabs` | Filter/status tabs as pills. |
|
|
209
|
-
| `SegmentedControl` |
|
|
252
|
+
| `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. |
|
|
210
253
|
| `ViewToggle` | List/grid icon toggle. |
|
|
211
254
|
|
|
212
255
|
### `feedback/` — status, overlays, progress
|
|
@@ -300,8 +343,8 @@ being dragged (`outputTone="active"`), and a crosshair drop target (`inputTones[
|
|
|
300
343
|
Pass `onConnect` to `PipelineCanvas` to enable wiring: holding an output port drags a dashed
|
|
301
344
|
bezier, the canvas hit-tests the pointer against input-port geometry within `snapRadius`
|
|
302
345
|
(30px), and the drop reports `{from, to, toPort}`. `DataPreview` is only the bottom drawer
|
|
303
|
-
chrome (title, Debug Mode, collapse) around the shared
|
|
304
|
-
`
|
|
346
|
+
chrome (title, Debug Mode, collapse) around the shared `Table` at the sm tier — reach for
|
|
347
|
+
`Table` directly unless you need that drawer.
|
|
305
348
|
|
|
306
349
|
---
|
|
307
350
|
|
|
@@ -314,7 +357,8 @@ cards; the ones you will reach for daily:
|
|
|
314
357
|
| --- | --- |
|
|
315
358
|
| Page background | `--bg-app` |
|
|
316
359
|
| Card / panel background | `--bg-surface` |
|
|
317
|
-
| Nested well
|
|
360
|
+
| Nested well | `--bg-inset` |
|
|
361
|
+
| Table header row | `--bg-table-header` |
|
|
318
362
|
| Row hover | `--bg-hover` |
|
|
319
363
|
| Body text | `--text-body` |
|
|
320
364
|
| Headings | `--text-heading` |
|
|
@@ -325,6 +369,9 @@ cards; the ones you will reach for daily:
|
|
|
325
369
|
| Primary action | `--action-primary` |
|
|
326
370
|
| Text on any saturated fill | `--on-accent` |
|
|
327
371
|
| Success / warning / danger / info | `--success` `--warning` `--danger` `--info-fg` (each with `-bg` and `-text` companions) |
|
|
372
|
+
| Control height / text / padding | `--control-h` `--control-text` `--control-px` — set by the region's `data-size` |
|
|
373
|
+
| Row height, gaps | `--bar-h` `--control-gap` (inside a group) `--group-gap` (between groups) `--edge-pad` |
|
|
374
|
+
| UI text | `--text-xs` 12 · `--text-base` 14 · `--text-md` 16 · `--text-lg` 20 (each with `--leading-*` and `--tracking-*`) |
|
|
328
375
|
|
|
329
376
|
Three rules that keep a UI consistent:
|
|
330
377
|
|
|
@@ -399,7 +446,8 @@ it will flip for free. Two things to watch:
|
|
|
399
446
|
|
|
400
447
|
## Interaction states — you get these for free
|
|
401
448
|
|
|
402
|
-
`tokens/interaction.css` delivers press and keyboard focus globally
|
|
449
|
+
`tokens/interaction.css` delivers press and keyboard focus globally, and `tokens/hover.css` the hover
|
|
450
|
+
step for controls whose colours are inline (both arrive through the `styles.css` import) — `:active` adds
|
|
403
451
|
`filter: var(--press-filter)` (which darkens in light mode and brightens in dark), and
|
|
404
452
|
`:focus-visible` draws a 2px `--focus-border` outline. It applies to `button`, `a`, `label`,
|
|
405
453
|
and anything with `role="button"`, `menuitem`, `option`, `tab`, `switch`, `treeitem` etc.
|
|
@@ -415,6 +463,20 @@ both states:
|
|
|
415
463
|
Button and IconButton carry `data-press="own"` because their press colors are explicit
|
|
416
464
|
tokens rather than a filter.
|
|
417
465
|
|
|
466
|
+
Hover for your own controls uses the same hooks the components use. Each sets a custom
|
|
467
|
+
property on hover that your inline style reads, so focus, error and selected colours you write
|
|
468
|
+
as plain values always win:
|
|
469
|
+
|
|
470
|
+
| Attribute | Read this in your style | Hover result |
|
|
471
|
+
| --- | --- | --- |
|
|
472
|
+
| `data-field` | `border: 1px solid var(--field-border, var(--border-control))` | border → `--border-strong` |
|
|
473
|
+
| `data-wash` | `background: var(--wash, transparent)` | surface → `--bg-hover` |
|
|
474
|
+
| `data-ink` | `color: var(--ink, var(--text-secondary))` | ink → `--text-heading` |
|
|
475
|
+
| `data-row` | `background: var(--row-wash, transparent)` | row → `--bg-inset` |
|
|
476
|
+
| `data-link` | `text-decoration-line: var(--link-line, none)` | underline appears |
|
|
477
|
+
|
|
478
|
+
Leave the attribute off while the control is disabled, selected or open.
|
|
479
|
+
|
|
418
480
|
## Versioning
|
|
419
481
|
|
|
420
482
|
Semver, tagged in GitLab. Patch = fixes; minor = new components, new props, and token
|
|
@@ -425,9 +487,87 @@ a migration note in the release. Token renames are major because your own code r
|
|
|
425
487
|
Pin a minor range and update deliberately:
|
|
426
488
|
|
|
427
489
|
```json
|
|
428
|
-
"@keyfunc/keybricks-ds": "~1.
|
|
490
|
+
"@keyfunc/keybricks-ds": "~2.1.1"
|
|
429
491
|
```
|
|
430
492
|
|
|
493
|
+
### Migrating from 1.x to 2.0
|
|
494
|
+
|
|
495
|
+
2.0 is a visual major: no component was removed and no token was removed, but values moved.
|
|
496
|
+
|
|
497
|
+
- **The 14px scale.** `--text-base` is 14px (was 13), `--text-xs` 12 (was 11), `--text-md` 16,
|
|
498
|
+
`--text-lg` 20, `--text-xl` 24; line-heights are whole numbers on a 4px rhythm. `--text-sm` is
|
|
499
|
+
now an alias of `--text-xs` (12px) — replace it with `--text-xs` when you touch the code.
|
|
500
|
+
`--text-2xs` (11px) is for chart tick labels only.
|
|
501
|
+
- **Controls are 32px by default, not 36.** `--h-input` and `--h-button` now both resolve to
|
|
502
|
+
`--control-h`; `--h-button-sm` is 24 (was 30). Anything you sized to sit beside an input
|
|
503
|
+
should read `var(--control-h)` instead of a literal.
|
|
504
|
+
- **Size tiers replace per-control sizing.** `size` props still work on every component, but set
|
|
505
|
+
`data-size` on the region instead. `xs` on `IconButton` and `dense` on `Table` / `DataPreview`
|
|
506
|
+
are aliases of `sm`; nothing renders below 24px any more.
|
|
507
|
+
- **Tables.** Header cells are the same size as body cells, weight 600, sentence case, no
|
|
508
|
+
letter-spacing; mono columns match the row's size. Rows are 40px at md (were 51.5) and 32px at sm.
|
|
509
|
+
- **Chrome.** `--h-nav-item` 36 (was 35.5), `--h-subnav-item` 32 (was 31.5), `--h-tree-item` 32
|
|
510
|
+
(was 30).
|
|
511
|
+
- **CJK.** Under `lang="zh" | "ja" | "ko"`, `--weight-medium` resolves to 600 and every
|
|
512
|
+
`--tracking-*` to 0. If your app sets `lang` on `<html>` already, nothing to do.
|
|
513
|
+
- **Tokens outside CSS.** `tokens.json` / `tokens.js` / `tokens.d.ts` gained the tier tokens
|
|
514
|
+
(`--control-*`, `--bar-h`, `--group-gap`, …) — 352 light tokens in all (2.0.2 adds `--danger-soft-hover`).
|
|
515
|
+
|
|
516
|
+
### 2.1.1
|
|
517
|
+
|
|
518
|
+
- **Chart series palette replaced** (`--series-1…8`, light and dark). One lightness band, a chroma
|
|
519
|
+
floor, no green or red in the sequence (those stay on `--chart-pos` / `--chart-neg` and status):
|
|
520
|
+
blue `#3b82f6` · orange `#e16c10` · teal `#079a94` · violet `#8254c4` · gold `#b98705` ·
|
|
521
|
+
magenta `#bc378d` · olive `#7a8d30` · sky `#2f99c0`; dark values are tuned for `#161616`.
|
|
522
|
+
`--series-9` is now a grey (was danger red); `--series-10` is unchanged. Every adjacent pair
|
|
523
|
+
passes ΔE ≥ 8 under colour-vision-deficiency simulation and ≥ 3:1 on the surface. Charts that
|
|
524
|
+
read `--series-*` pick the new colours up automatically; nothing to change in app code.
|
|
525
|
+
`CandlestickChart`'s moving-average line is now `--chart-total` (was `--series-8`), in line with
|
|
526
|
+
every other overlay line; status bands in demos read `--warning`, never a series slot.
|
|
527
|
+
- **Hover hooks moved to `tokens/hover.css`.** The npm path `@keyfunc/keybricks-ds/styles.css`
|
|
528
|
+
now resolves to `keybricks.css`, which imports the token sheet and the hooks together, so the
|
|
529
|
+
one-line import is unchanged. Only apps that link the raw files must add `tokens/hover.css`.
|
|
530
|
+
- **CJK scope** is `[lang|="zh"]` / `[lang|="ja"]` / `[lang|="ko"]` instead of `:lang()` — same
|
|
531
|
+
result when `lang` is set on `<html>` or a region. (A nested region that switches *back* to a
|
|
532
|
+
Latin language no longer regains letter-spacing; set the tracking locally if you need that.)
|
|
533
|
+
|
|
534
|
+
### 2.1.0
|
|
535
|
+
|
|
536
|
+
- **`BrandVisual` is removed**, with its seven generated motifs, its card and its lint rules. The
|
|
537
|
+
artwork was retired; a new brand visual language will ship separately when it is ready.
|
|
538
|
+
Nothing else in the system used it. If your code imports `BrandVisual`, keep it pinned to
|
|
539
|
+
`~2.0.3` until the import is gone. 117 components remain.
|
|
540
|
+
|
|
541
|
+
### 2.0.3
|
|
542
|
+
|
|
543
|
+
- Housekeeping, no component or token changes. Removed files nothing used: the empty
|
|
544
|
+
`Canvas.dc.html` and the root `support.js` only it loaded; the frozen pre-2.0 export
|
|
545
|
+
`Keybricks App.html` and its source `ui_kits/keybricks-app/standalone-src.html` (the live UI kit
|
|
546
|
+
is `ui_kits/keybricks-app/index.html`); the eleven `components/*/_dir.card.html` placeholder cards
|
|
547
|
+
that the site never showed; and `github.md`, whose icon-source notes now live in `readme.md`.
|
|
548
|
+
|
|
549
|
+
### 2.0.2
|
|
550
|
+
|
|
551
|
+
- Hover on every pointer target. Field boxes (`Input`, `Textarea`, `Select`, `Combobox`,
|
|
552
|
+
`MultiSelect`, `DatePicker`, `SearchInput`, `NumberStepper`) darken their border; stepper
|
|
553
|
+
− / +, pagination items, pill tabs, spreadsheet tools, accordion and palette headers, sidebar
|
|
554
|
+
sections and doc-tree items take the `--bg-hover` wash; inactive tabs, segments, legend items
|
|
555
|
+
and clear / copy buttons darken their ink; table body rows take `--bg-inset`; checkbox rings,
|
|
556
|
+
switch tracks and slider thumbs respond too. The hooks are documented under *Interaction states*.
|
|
557
|
+
- `NodeCard` subtitle icon is 12px and sits on the cap height of its 12px label.
|
|
558
|
+
- `BrandVisual` (React) passes camelCase SVG props — no more console warnings.
|
|
559
|
+
- The icon index had `calendar` twice; the Feather Library card now counts 317 icons.
|
|
560
|
+
|
|
561
|
+
### 2.0.1
|
|
562
|
+
|
|
563
|
+
- Card and section headers: secondary actions are `ghost` at the region's tier, never a smaller
|
|
564
|
+
button; the rule is in `DESIGN.md` → *Button emphasis*.
|
|
565
|
+
- Icons beside multi-line text (`Alert`, `Banner`, `Toast`, `NodeCard` subtitle) centre on the first
|
|
566
|
+
line; overlay close buttons (`Modal`, `Drawer`) centre on the title line at every tier.
|
|
567
|
+
- `Banner` and `Toast` dismiss buttons are the sm tier (24px). `Breadcrumb`'s overflow toggle is a
|
|
568
|
+
24px hit target. Palette tile labels are 12px.
|
|
569
|
+
- Every control card on the site shows its sm / md / lg tiers; demo content is English throughout.
|
|
570
|
+
|
|
431
571
|
Release mechanics, the CI pipeline and the Pages site are documented in `DEPLOY.md`.
|
|
432
572
|
|
|
433
573
|
## Templates
|
package/SKILL.md
CHANGED
|
@@ -6,8 +6,8 @@ user-invocable: true
|
|
|
6
6
|
|
|
7
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 是一个近乎单色、细边框、以
|
|
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
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
12
|
(设计令牌位于 `tokens/*.css`(经 `styles.css` 汇总,含深色模式 `tokens/dark.css` 与动效 `tokens/motion.css`);React 组件位于 `components/<分组>/`(各附 `.d.ts` 类型定义与 `.prompt.md` 用法说明);完整界面复刻位于 `ui_kits/keybricks-app/`。)
|
|
13
13
|
|
|
@@ -16,8 +16,10 @@ If creating visual artifacts (slides, mocks, throwaway prototypes, etc), copy as
|
|
|
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 for codes, data cells, logs — at the row's own size. In Chinese/Japanese/Korean, 500 becomes 600 and tracking is 0.
|
|
20
|
+
(Inter 14px/常规 为默认;500 用于导航/标题/标签;600 用于节点与面板标题及表头;300 仅用于大号数字。代码/数据/日志用 Menlo,与所在行同字号。中/日/韩文中 500 改为 600,字距为 0。)
|
|
21
|
+
- One size tier per region: `data-size="sm" | "md" | "lg"` = 24 / 32 / 36px controls. 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"` 对应 24 / 32 / 36px 控件。设在工具栏、表单、表格或对话框上,控件自动继承。同一行不混用高度或字号;可交互元素不小于 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).
|