@keyfunc/keybricks-ds 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DEPLOY.md +204 -0
- package/DESIGN.md +269 -0
- package/INTEGRATION.md +417 -0
- package/SKILL.md +32 -0
- package/_adherence.oxlintrc.json +1469 -0
- package/_scripts/build-index.mjs +80 -0
- package/_scripts/build-tokens.mjs +135 -0
- package/assets/icons/icon-index.js +1 -0
- package/assets/icons/icon-index.json +1 -0
- package/assets/icons/unicons-index.js +1 -0
- package/assets/icons/unicons-index.json +1 -0
- package/assets/keybricks-logo.png +0 -0
- package/components/_cards/accordion.card.html +32 -0
- package/components/_cards/action-chip.card.html +22 -0
- package/components/_cards/activity.card.html +34 -0
- package/components/_cards/alert.card.html +32 -0
- package/components/_cards/app-chrome.card.html +36 -0
- package/components/_cards/banner.card.html +21 -0
- package/components/_cards/brand-visual.card.html +43 -0
- package/components/_cards/breadcrumb.card.html +23 -0
- package/components/_cards/button-1-base.card.html +39 -0
- package/components/_cards/button-2-states.card.html +56 -0
- package/components/_cards/button-3-sizes-icons.card.html +32 -0
- package/components/_cards/button-4-group.card.html +47 -0
- package/components/_cards/canvas-zoom-controls.card.html +19 -0
- package/components/_cards/cards-indicators.card.html +59 -0
- package/components/_cards/charts-1-sparkline.card.html +55 -0
- package/components/_cards/charts-10-gauge.card.html +31 -0
- package/components/_cards/charts-11-funnel.card.html +28 -0
- package/components/_cards/charts-12-treemap.card.html +23 -0
- package/components/_cards/charts-14-radar.card.html +31 -0
- package/components/_cards/charts-15-distribution.card.html +32 -0
- package/components/_cards/charts-16-pareto.card.html +25 -0
- package/components/_cards/charts-17-candlestick.card.html +34 -0
- package/components/_cards/charts-18-sankey.card.html +29 -0
- package/components/_cards/charts-19-chord.card.html +31 -0
- package/components/_cards/charts-2-line.card.html +46 -0
- package/components/_cards/charts-20-sunburst.card.html +38 -0
- package/components/_cards/charts-21-worldmap.card.html +33 -0
- package/components/_cards/charts-22-gantt.card.html +37 -0
- package/components/_cards/charts-23-bar3d.card.html +26 -0
- package/components/_cards/charts-24-pie3d.card.html +32 -0
- package/components/_cards/charts-25-surface3d.card.html +24 -0
- package/components/_cards/charts-26-scatter3d.card.html +24 -0
- package/components/_cards/charts-27-ribbon3d.card.html +23 -0
- package/components/_cards/charts-3-bar.card.html +71 -0
- package/components/_cards/charts-4-barlist.card.html +30 -0
- package/components/_cards/charts-5-donut.card.html +35 -0
- package/components/_cards/charts-6-scatter.card.html +26 -0
- package/components/_cards/charts-7-heatmap.card.html +28 -0
- package/components/_cards/charts-8-waterfall.card.html +25 -0
- package/components/_cards/charts-9-bullet.card.html +31 -0
- package/components/_cards/charts-99-fullpage.card.html +194 -0
- package/components/_cards/checkbox.card.html +34 -0
- package/components/_cards/codeblock.card.html +19 -0
- package/components/_cards/combobox.card.html +25 -0
- package/components/_cards/context-menu.card.html +21 -0
- package/components/_cards/datatable.card.html +48 -0
- package/components/_cards/date-picker.card.html +31 -0
- package/components/_cards/diffvalue.card.html +21 -0
- package/components/_cards/divider.card.html +24 -0
- package/components/_cards/drawer.card.html +30 -0
- package/components/_cards/dropdown-menu.card.html +38 -0
- package/components/_cards/dropzone.card.html +22 -0
- package/components/_cards/empty-state.card.html +29 -0
- package/components/_cards/filter-bar.card.html +34 -0
- package/components/_cards/icon-button.card.html +27 -0
- package/components/_cards/icons-1-core.card.html +49 -0
- package/components/_cards/icons-2-feather.card.html +39 -0
- package/components/_cards/icons-3-unicons.card.html +44 -0
- package/components/_cards/input.card.html +25 -0
- package/components/_cards/kbd.card.html +20 -0
- package/components/_cards/keyvalue.card.html +23 -0
- package/components/_cards/listrow.card.html +30 -0
- package/components/_cards/loading.card.html +33 -0
- package/components/_cards/log-viewer.card.html +23 -0
- package/components/_cards/modal.card.html +35 -0
- package/components/_cards/multi-select.card.html +26 -0
- package/components/_cards/number-stepper.card.html +24 -0
- package/components/_cards/pagination.card.html +25 -0
- package/components/_cards/people.card.html +46 -0
- package/components/_cards/pipeline-node.card.html +76 -0
- package/components/_cards/pipeline-palette.card.html +54 -0
- package/components/_cards/search.card.html +23 -0
- package/components/_cards/select.card.html +23 -0
- package/components/_cards/slider.card.html +25 -0
- package/components/_cards/smart-table.card.html +37 -0
- package/components/_cards/spreadsheet.card.html +31 -0
- package/components/_cards/stepper.card.html +25 -0
- package/components/_cards/tabs.card.html +25 -0
- package/components/_cards/tag.card.html +26 -0
- package/components/_cards/textarea.card.html +27 -0
- package/components/_cards/timeline.card.html +32 -0
- package/components/_cards/toast.card.html +33 -0
- package/components/_cards/toggles.card.html +68 -0
- package/components/_cards/tooltip.card.html +22 -0
- package/components/_cards/tree.card.html +150 -0
- package/components/_shared/frame-theme.js +16 -0
- package/components/_shared/src-brand.js +1 -0
- package/components/_shared/src-buttons.js +1 -0
- package/components/_shared/src-charts.js +1 -0
- package/components/_shared/src-data.js +1 -0
- package/components/_shared/src-display.js +1 -0
- package/components/_shared/src-feedback.js +1 -0
- package/components/_shared/src-forms.js +1 -0
- package/components/_shared/src-icons.js +1 -0
- package/components/_shared/src-navigation.js +1 -0
- package/components/_shared/src-pipeline.js +1 -0
- package/components/_shared/src-tabs.js +1 -0
- package/components/_shared/svg-download.js +19 -0
- package/components/_shared/view-source.js +185 -0
- package/components/_vue/index.mjs +114 -0
- package/components/brand/BrandVisual.d.ts +17 -0
- package/components/brand/BrandVisual.jsx +29 -0
- package/components/brand/BrandVisual.vue +34 -0
- package/components/brand/_dir.card.html +13 -0
- package/components/brand/brandMotifs.js +210 -0
- package/components/buttons/ActionChip.d.ts +10 -0
- package/components/buttons/ActionChip.jsx +20 -0
- package/components/buttons/ActionChip.vue +18 -0
- package/components/buttons/Button.d.ts +40 -0
- package/components/buttons/Button.jsx +101 -0
- package/components/buttons/Button.vue +87 -0
- package/components/buttons/IconButton.d.ts +26 -0
- package/components/buttons/IconButton.jsx +28 -0
- package/components/buttons/IconButton.vue +21 -0
- package/components/buttons/_dir.card.html +13 -0
- package/components/buttons/buttons.prompt.md +19 -0
- package/components/charts/Bar3D.d.ts +15 -0
- package/components/charts/Bar3D.jsx +93 -0
- package/components/charts/Bar3D.vue +79 -0
- package/components/charts/BarChart.d.ts +23 -0
- package/components/charts/BarChart.jsx +135 -0
- package/components/charts/BarChart.vue +139 -0
- package/components/charts/BarList.d.ts +13 -0
- package/components/charts/BarList.jsx +31 -0
- package/components/charts/BarList.vue +25 -0
- package/components/charts/BoxPlot.d.ts +18 -0
- package/components/charts/BoxPlot.jsx +62 -0
- package/components/charts/BoxPlot.vue +58 -0
- package/components/charts/BulletChart.d.ts +12 -0
- package/components/charts/BulletChart.jsx +41 -0
- package/components/charts/BulletChart.vue +33 -0
- package/components/charts/CandlestickChart.d.ts +15 -0
- package/components/charts/CandlestickChart.jsx +63 -0
- package/components/charts/CandlestickChart.vue +62 -0
- package/components/charts/ChartKit.d.ts +8 -0
- package/components/charts/ChartKit.jsx +76 -0
- package/components/charts/ChartKit.vue +47 -0
- package/components/charts/ChordChart.d.ts +13 -0
- package/components/charts/ChordChart.jsx +55 -0
- package/components/charts/ChordChart.vue +54 -0
- package/components/charts/DonutChart.d.ts +15 -0
- package/components/charts/DonutChart.jsx +73 -0
- package/components/charts/DonutChart.vue +61 -0
- package/components/charts/FunnelChart.d.ts +11 -0
- package/components/charts/FunnelChart.jsx +37 -0
- package/components/charts/FunnelChart.vue +29 -0
- package/components/charts/GanttChart.d.ts +20 -0
- package/components/charts/GanttChart.jsx +80 -0
- package/components/charts/GanttChart.vue +60 -0
- package/components/charts/GaugeChart.d.ts +13 -0
- package/components/charts/GaugeChart.jsx +33 -0
- package/components/charts/GaugeChart.vue +29 -0
- package/components/charts/HeatmapChart.d.ts +13 -0
- package/components/charts/HeatmapChart.jsx +62 -0
- package/components/charts/HeatmapChart.vue +38 -0
- package/components/charts/Histogram.d.ts +16 -0
- package/components/charts/Histogram.jsx +56 -0
- package/components/charts/Histogram.vue +53 -0
- package/components/charts/LineChart.d.ts +17 -0
- package/components/charts/LineChart.jsx +84 -0
- package/components/charts/LineChart.vue +86 -0
- package/components/charts/ParetoChart.d.ts +13 -0
- package/components/charts/ParetoChart.jsx +54 -0
- package/components/charts/ParetoChart.vue +55 -0
- package/components/charts/Pie3D.d.ts +17 -0
- package/components/charts/Pie3D.jsx +145 -0
- package/components/charts/Pie3D.vue +115 -0
- package/components/charts/RadarChart.d.ts +14 -0
- package/components/charts/RadarChart.jsx +79 -0
- package/components/charts/RadarChart.vue +73 -0
- package/components/charts/Ribbon3D.d.ts +13 -0
- package/components/charts/Ribbon3D.jsx +89 -0
- package/components/charts/Ribbon3D.vue +79 -0
- package/components/charts/SankeyChart.d.ts +15 -0
- package/components/charts/SankeyChart.jsx +59 -0
- package/components/charts/SankeyChart.vue +53 -0
- package/components/charts/Scatter3D.d.ts +12 -0
- package/components/charts/Scatter3D.jsx +69 -0
- package/components/charts/Scatter3D.vue +59 -0
- package/components/charts/ScatterChart.d.ts +12 -0
- package/components/charts/ScatterChart.jsx +53 -0
- package/components/charts/ScatterChart.vue +57 -0
- package/components/charts/Sparkline.d.ts +19 -0
- package/components/charts/Sparkline.jsx +63 -0
- package/components/charts/Sparkline.vue +54 -0
- package/components/charts/SunburstChart.d.ts +12 -0
- package/components/charts/SunburstChart.jsx +61 -0
- package/components/charts/SunburstChart.vue +60 -0
- package/components/charts/Surface3D.d.ts +13 -0
- package/components/charts/Surface3D.jsx +70 -0
- package/components/charts/Surface3D.vue +63 -0
- package/components/charts/TreemapChart.d.ts +11 -0
- package/components/charts/TreemapChart.jsx +35 -0
- package/components/charts/TreemapChart.vue +27 -0
- package/components/charts/WaterfallChart.d.ts +11 -0
- package/components/charts/WaterfallChart.jsx +59 -0
- package/components/charts/WaterfallChart.vue +46 -0
- package/components/charts/WorldMap.d.ts +21 -0
- package/components/charts/WorldMap.jsx +107 -0
- package/components/charts/WorldMap.vue +73 -0
- package/components/charts/_dir.card.html +7 -0
- package/components/charts/chart-3d.js +84 -0
- package/components/charts/chart-geometry.js +223 -0
- package/components/charts/charts.prompt.md +24 -0
- package/components/data/CodeBlock.d.ts +9 -0
- package/components/data/CodeBlock.jsx +19 -0
- package/components/data/CodeBlock.vue +22 -0
- package/components/data/DataTable.d.ts +28 -0
- package/components/data/DataTable.jsx +32 -0
- package/components/data/DataTable.vue +25 -0
- package/components/data/DiffValue.d.ts +11 -0
- package/components/data/DiffValue.jsx +15 -0
- package/components/data/DiffValue.vue +13 -0
- package/components/data/FilterBar.d.ts +16 -0
- package/components/data/FilterBar.jsx +22 -0
- package/components/data/FilterBar.vue +23 -0
- package/components/data/KeyValue.d.ts +16 -0
- package/components/data/KeyValue.jsx +25 -0
- package/components/data/KeyValue.vue +26 -0
- package/components/data/ListRow.d.ts +14 -0
- package/components/data/ListRow.jsx +25 -0
- package/components/data/ListRow.vue +25 -0
- package/components/data/Pagination.d.ts +12 -0
- package/components/data/Pagination.jsx +27 -0
- package/components/data/Pagination.vue +24 -0
- package/components/data/SmartTable.d.ts +30 -0
- package/components/data/SmartTable.jsx +73 -0
- package/components/data/SmartTable.vue +74 -0
- package/components/data/Spreadsheet.d.ts +33 -0
- package/components/data/Spreadsheet.jsx +110 -0
- package/components/data/Spreadsheet.vue +95 -0
- package/components/data/_dir.card.html +13 -0
- package/components/data/data.prompt.md +33 -0
- package/components/display/Avatar.d.ts +21 -0
- package/components/display/Avatar.jsx +31 -0
- package/components/display/Avatar.vue +34 -0
- package/components/display/Badge.d.ts +27 -0
- package/components/display/Badge.jsx +40 -0
- package/components/display/Badge.vue +47 -0
- package/components/display/Card.d.ts +27 -0
- package/components/display/Card.jsx +27 -0
- package/components/display/Card.vue +28 -0
- package/components/display/Divider.d.ts +8 -0
- package/components/display/Divider.jsx +14 -0
- package/components/display/Divider.vue +13 -0
- package/components/display/Kbd.d.ts +7 -0
- package/components/display/Kbd.jsx +12 -0
- package/components/display/Kbd.vue +9 -0
- package/components/display/ProgressBar.d.ts +42 -0
- package/components/display/ProgressBar.jsx +70 -0
- package/components/display/ProgressBar.vue +69 -0
- package/components/display/Tag.d.ts +9 -0
- package/components/display/Tag.jsx +15 -0
- package/components/display/Tag.vue +15 -0
- package/components/display/_dir.card.html +13 -0
- package/components/display/display.prompt.md +30 -0
- package/components/feedback/Accordion.d.ts +13 -0
- package/components/feedback/Accordion.jsx +21 -0
- package/components/feedback/Accordion.vue +22 -0
- package/components/feedback/ActivityItem.d.ts +25 -0
- package/components/feedback/ActivityItem.jsx +39 -0
- package/components/feedback/ActivityItem.vue +46 -0
- package/components/feedback/Alert.d.ts +36 -0
- package/components/feedback/Alert.jsx +48 -0
- package/components/feedback/Alert.vue +59 -0
- package/components/feedback/Banner.d.ts +15 -0
- package/components/feedback/Banner.jsx +25 -0
- package/components/feedback/Banner.vue +25 -0
- package/components/feedback/ContextMenu.d.ts +8 -0
- package/components/feedback/ContextMenu.jsx +18 -0
- package/components/feedback/ContextMenu.vue +19 -0
- package/components/feedback/Drawer.d.ts +18 -0
- package/components/feedback/Drawer.jsx +26 -0
- package/components/feedback/Drawer.vue +24 -0
- package/components/feedback/Menu.d.ts +10 -0
- package/components/feedback/Menu.jsx +24 -0
- package/components/feedback/Menu.vue +21 -0
- package/components/feedback/Modal.d.ts +38 -0
- package/components/feedback/Modal.jsx +69 -0
- package/components/feedback/Modal.vue +65 -0
- package/components/feedback/Stepper.d.ts +9 -0
- package/components/feedback/Stepper.jsx +24 -0
- package/components/feedback/Stepper.vue +18 -0
- package/components/feedback/Timeline.d.ts +15 -0
- package/components/feedback/Timeline.jsx +27 -0
- package/components/feedback/Timeline.vue +21 -0
- package/components/feedback/_dir.card.html +13 -0
- package/components/feedback/feedback.prompt.md +35 -0
- package/components/forms/Checkbox.d.ts +13 -0
- package/components/forms/Checkbox.jsx +17 -0
- package/components/forms/Checkbox.vue +18 -0
- package/components/forms/Combobox.d.ts +13 -0
- package/components/forms/Combobox.jsx +34 -0
- package/components/forms/Combobox.vue +35 -0
- package/components/forms/DatePicker.d.ts +12 -0
- package/components/forms/DatePicker.jsx +48 -0
- package/components/forms/DatePicker.vue +46 -0
- package/components/forms/Dropzone.d.ts +20 -0
- package/components/forms/Dropzone.jsx +36 -0
- package/components/forms/Dropzone.vue +28 -0
- package/components/forms/Field.d.ts +13 -0
- package/components/forms/Field.jsx +13 -0
- package/components/forms/Field.vue +12 -0
- package/components/forms/Input.d.ts +18 -0
- package/components/forms/Input.jsx +35 -0
- package/components/forms/Input.vue +38 -0
- package/components/forms/MultiSelect.d.ts +14 -0
- package/components/forms/MultiSelect.jsx +33 -0
- package/components/forms/MultiSelect.vue +36 -0
- package/components/forms/NumberStepper.d.ts +13 -0
- package/components/forms/NumberStepper.jsx +15 -0
- package/components/forms/NumberStepper.vue +17 -0
- package/components/forms/Radio.vue +16 -0
- package/components/forms/RadioGroup.vue +11 -0
- package/components/forms/SearchInput.d.ts +12 -0
- package/components/forms/SearchInput.jsx +17 -0
- package/components/forms/SearchInput.vue +14 -0
- package/components/forms/Select.d.ts +14 -0
- package/components/forms/Select.jsx +17 -0
- package/components/forms/Select.vue +16 -0
- package/components/forms/Slider.d.ts +15 -0
- package/components/forms/Slider.jsx +21 -0
- package/components/forms/Slider.vue +23 -0
- package/components/forms/Switch.d.ts +31 -0
- package/components/forms/Switch.jsx +40 -0
- package/components/forms/Switch.vue +16 -0
- package/components/forms/_dir.card.html +13 -0
- package/components/forms/forms.prompt.md +23 -0
- package/components/icons/Icon.d.ts +19 -0
- package/components/icons/Icon.jsx +93 -0
- package/components/icons/Icon.prompt.md +8 -0
- package/components/icons/Icon.vue +12 -0
- package/components/icons/Unicon.d.ts +12 -0
- package/components/icons/Unicon.jsx +16 -0
- package/components/icons/Unicon.vue +15 -0
- package/components/icons/_dir.card.html +13 -0
- package/components/icons/feather-paths.js +2 -0
- package/components/icons/icon-paths.js +73 -0
- package/components/index.d.ts +87 -0
- package/components/index.js +110 -0
- package/components/navigation/Breadcrumb.d.ts +24 -0
- package/components/navigation/Breadcrumb.jsx +120 -0
- package/components/navigation/Breadcrumb.vue +94 -0
- package/components/navigation/DocTree.d.ts +18 -0
- package/components/navigation/DocTree.jsx +37 -0
- package/components/navigation/DocTree.vue +25 -0
- package/components/navigation/Sidebar.d.ts +29 -0
- package/components/navigation/Sidebar.jsx +75 -0
- package/components/navigation/Sidebar.vue +54 -0
- package/components/navigation/TopBar.d.ts +27 -0
- package/components/navigation/TopBar.jsx +44 -0
- package/components/navigation/TopBar.vue +51 -0
- package/components/navigation/Tree.d.ts +83 -0
- package/components/navigation/Tree.jsx +347 -0
- package/components/navigation/Tree.vue +258 -0
- package/components/navigation/_dir.card.html +13 -0
- package/components/navigation/navigation.prompt.md +22 -0
- package/components/pipeline/ConfigPanel.d.ts +18 -0
- package/components/pipeline/ConfigPanel.jsx +30 -0
- package/components/pipeline/ConfigPanel.vue +32 -0
- package/components/pipeline/DataPreview.d.ts +14 -0
- package/components/pipeline/DataPreview.jsx +24 -0
- package/components/pipeline/DataPreview.vue +21 -0
- package/components/pipeline/NodeCard.d.ts +47 -0
- package/components/pipeline/NodeCard.jsx +97 -0
- package/components/pipeline/NodeCard.vue +75 -0
- package/components/pipeline/PaletteItem.vue +15 -0
- package/components/pipeline/PaletteListItem.vue +15 -0
- package/components/pipeline/PalettePanel.d.ts +20 -0
- package/components/pipeline/PalettePanel.jsx +74 -0
- package/components/pipeline/PalettePanel.vue +45 -0
- package/components/pipeline/PipelineCanvas.d.ts +25 -0
- package/components/pipeline/PipelineCanvas.jsx +94 -0
- package/components/pipeline/PipelineCanvas.vue +73 -0
- package/components/pipeline/ZoomControls.d.ts +9 -0
- package/components/pipeline/ZoomControls.jsx +15 -0
- package/components/pipeline/ZoomControls.vue +15 -0
- package/components/pipeline/_dir.card.html +13 -0
- package/components/pipeline/pipeline.prompt.md +22 -0
- package/components/tabs/SegmentedControl.d.ts +11 -0
- package/components/tabs/SegmentedControl.jsx +21 -0
- package/components/tabs/SegmentedControl.vue +15 -0
- package/components/tabs/Tabs.d.ts +13 -0
- package/components/tabs/Tabs.jsx +52 -0
- package/components/tabs/Tabs.vue +39 -0
- package/components/tabs/ViewToggle.d.ts +8 -0
- package/components/tabs/ViewToggle.jsx +12 -0
- package/components/tabs/ViewToggle.vue +12 -0
- package/components/tabs/_dir.card.html +13 -0
- package/components/tabs/tabs.prompt.md +14 -0
- package/package.json +76 -0
- package/readme.md +150 -0
- package/styles.css +10 -0
- package/tokens/alpha.css +27 -0
- package/tokens/charts.css +55 -0
- package/tokens/colors-extended.css +40 -0
- package/tokens/colors.css +39 -0
- package/tokens/dark.css +96 -0
- package/tokens/fonts.css +4 -0
- package/tokens/interaction.css +48 -0
- package/tokens/layout.css +30 -0
- package/tokens/motion.css +22 -0
- package/tokens/tokens.d.ts +680 -0
- package/tokens/tokens.js +1018 -0
- package/tokens/tokens.json +2928 -0
- package/tokens/typography.css +22 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
/** Underline tabs on a hairline baseline (Import/Export). Active = blue text + 2px blue underline. */
|
|
4
|
+
export function Tabs({ tabs = [], active, onChange, style }) {
|
|
5
|
+
return (
|
|
6
|
+
<div style={{ display: "flex", gap: 4, borderBottom: "1px solid var(--border-control)", ...style }}>
|
|
7
|
+
{tabs.map((t) => {
|
|
8
|
+
const is = t === active;
|
|
9
|
+
return (
|
|
10
|
+
<button key={t} type="button" onClick={() => onChange && onChange(t)}
|
|
11
|
+
style={{ background: "transparent", border: "none", cursor: "pointer", padding: "9px 16px", marginBottom: -1, borderBottom: is ? "2px solid var(--action-primary)" : "2px solid transparent", fontFamily: "var(--font-sans)", fontWeight: "var(--weight-medium)", fontSize: "var(--text-base)", lineHeight: "var(--leading-base)", letterSpacing: "var(--tracking-base)", color: is ? "var(--action-primary)" : "var(--text-body)" }}>
|
|
12
|
+
{t}
|
|
13
|
+
</button>
|
|
14
|
+
);
|
|
15
|
+
})}
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Compact panel tabs (Node Info · Calc Rules · Output Fields · SQL Preview), 12px. */
|
|
21
|
+
export function PanelTabs({ tabs = [], active, onChange, style }) {
|
|
22
|
+
return (
|
|
23
|
+
<div style={{ display: "flex", borderBottom: "1px solid var(--border-subtle)", ...style }}>
|
|
24
|
+
{tabs.map((t) => {
|
|
25
|
+
const is = t === active;
|
|
26
|
+
return (
|
|
27
|
+
<button key={t} type="button" onClick={() => onChange && onChange(t)}
|
|
28
|
+
style={{ background: "transparent", border: "none", cursor: "pointer", padding: "8px 12px", marginBottom: -1, borderBottom: is ? "2px solid var(--action-primary)" : "2px solid transparent", fontFamily: "var(--font-sans)", fontSize: "var(--text-sm)", lineHeight: "var(--leading-sm)", color: is ? "var(--action-primary)" : "var(--text-secondary)" }}>
|
|
29
|
+
{t}
|
|
30
|
+
</button>
|
|
31
|
+
);
|
|
32
|
+
})}
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Text pill filter tabs (For Review · To be Submitted · For Approval). Active = #f5f5f5 pill. */
|
|
38
|
+
export function PillTabs({ tabs = [], active, onChange, style }) {
|
|
39
|
+
return (
|
|
40
|
+
<div style={{ display: "flex", gap: 8, ...style }}>
|
|
41
|
+
{tabs.map((t) => {
|
|
42
|
+
const is = t === active;
|
|
43
|
+
return (
|
|
44
|
+
<button key={t} type="button" onClick={() => onChange && onChange(t)}
|
|
45
|
+
style={{ background: is ? "var(--bg-active)" : "transparent", border: "none", cursor: "pointer", height: 28, padding: "0 11px", borderRadius: "var(--radius-md)", fontFamily: "var(--font-sans)", fontWeight: "var(--weight-medium)", fontSize: "var(--text-sm)", lineHeight: "var(--leading-sm)", color: is ? "var(--text-heading)" : "var(--text-secondary)" }}>
|
|
46
|
+
{t}
|
|
47
|
+
</button>
|
|
48
|
+
);
|
|
49
|
+
})}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
// Underline tabs on a hairline baseline (Import/Export). Active = blue text + 2px blue underline.
|
|
3
|
+
defineProps({ tabs: { type: Array, default: () => [] }, active: String, style: Object })
|
|
4
|
+
const emit = defineEmits(['change'])
|
|
5
|
+
</script>
|
|
6
|
+
<template>
|
|
7
|
+
<div :style="{ display: 'flex', gap: 4, borderBottom: '1px solid var(--border-control)', ...style }">
|
|
8
|
+
<button v-for="t in tabs" :key="t" type="button" @click="emit('change', t)"
|
|
9
|
+
:style="{ background: 'transparent', border: 'none', cursor: 'pointer', padding: '9px 16px', marginBottom: -1, borderBottom: t === active ? '2px solid var(--action-primary)' : '2px solid transparent', fontFamily: 'var(--font-sans)', fontWeight: 'var(--weight-medium)', fontSize: 'var(--text-base)', lineHeight: 'var(--leading-base)', letterSpacing: 'var(--tracking-base)', color: t === active ? 'var(--action-primary)' : 'var(--text-body)' }">{{ t }}</button>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<!-- PanelTabs — compact panel tabs (Node Info · Calc Rules · Output Fields · SQL Preview), 12px. -->
|
|
14
|
+
<!--
|
|
15
|
+
<script setup name="PanelTabs">
|
|
16
|
+
defineProps({ tabs: { type: Array, default: () => [] }, active: String, style: Object })
|
|
17
|
+
const emit = defineEmits(['change'])
|
|
18
|
+
</script>
|
|
19
|
+
<template>
|
|
20
|
+
<div :style="{ display: 'flex', borderBottom: '1px solid var(--border-subtle)', ...style }">
|
|
21
|
+
<button v-for="t in tabs" :key="t" type="button" @click="emit('change', t)"
|
|
22
|
+
:style="{ background: 'transparent', border: 'none', cursor: 'pointer', padding: '8px 12px', marginBottom: -1, borderBottom: t === active ? '2px solid var(--action-primary)' : '2px solid transparent', fontFamily: 'var(--font-sans)', fontSize: 'var(--text-sm)', lineHeight: 'var(--leading-sm)', color: t === active ? 'var(--action-primary)' : 'var(--text-secondary)' }">{{ t }}</button>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
-->
|
|
26
|
+
|
|
27
|
+
<!-- PillTabs — text pill filter tabs (For Review · To be Submitted · For Approval). Active = filled pill. -->
|
|
28
|
+
<!--
|
|
29
|
+
<script setup name="PillTabs">
|
|
30
|
+
defineProps({ tabs: { type: Array, default: () => [] }, active: String, style: Object })
|
|
31
|
+
const emit = defineEmits(['change'])
|
|
32
|
+
</script>
|
|
33
|
+
<template>
|
|
34
|
+
<div :style="{ display: 'flex', gap: 8, ...style }">
|
|
35
|
+
<button v-for="t in tabs" :key="t" type="button" @click="emit('change', t)"
|
|
36
|
+
:style="{ background: t === active ? 'var(--bg-active)' : 'transparent', border: 'none', cursor: 'pointer', height: 28, padding: '0 11px', borderRadius: 'var(--radius-md)', fontFamily: 'var(--font-sans)', fontWeight: 'var(--weight-medium)', fontSize: 'var(--text-sm)', lineHeight: 'var(--leading-sm)', color: t === active ? 'var(--text-heading)' : 'var(--text-secondary)' }">{{ t }}</button>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
-->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** list/grid segmented icon toggle (26px, r4, active #f5f5f5). */
|
|
3
|
+
export interface ViewToggleProps {
|
|
4
|
+
value?: "list" | "grid";
|
|
5
|
+
onChange?: (v: "list" | "grid") => void;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
export declare function ViewToggle(props: ViewToggleProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconButton } from "../buttons/IconButton.jsx";
|
|
3
|
+
|
|
4
|
+
/** Two-state list/grid icon toggle (palette header). */
|
|
5
|
+
export function ViewToggle({ value = "grid", onChange, style }) {
|
|
6
|
+
return (
|
|
7
|
+
<div style={{ display: "inline-flex", gap: 2, ...style }}>
|
|
8
|
+
<IconButton icon="list" size="sm" active={value === "list"} onClick={() => onChange && onChange("list")} label="List view" />
|
|
9
|
+
<IconButton icon="layout-grid" size="sm" active={value === "grid"} onClick={() => onChange && onChange("grid")} label="Grid view" />
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import IconButton from '../buttons/IconButton.vue'
|
|
3
|
+
// Two-state list/grid icon toggle (palette header).
|
|
4
|
+
defineProps({ modelValue: { type: String, default: 'grid' }, style: Object })
|
|
5
|
+
const emit = defineEmits(['update:modelValue'])
|
|
6
|
+
</script>
|
|
7
|
+
<template>
|
|
8
|
+
<div :style="{ display: 'inline-flex', gap: 2, ...style }">
|
|
9
|
+
<IconButton icon="list" size="sm" :active="modelValue === 'list'" label="List view" @click="emit('update:modelValue', 'list')" />
|
|
10
|
+
<IconButton icon="layout-grid" size="sm" :active="modelValue === 'grid'" label="Grid view" @click="emit('update:modelValue', 'grid')" />
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- @dsCard group="Directory Index" viewport="700x60" name="Tabs dir" subtitle="Full card: Components → Tabs & Toggles" -->
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html><head><meta charset="utf-8"><link rel="stylesheet" href="../../styles.css">
|
|
4
|
+
<script src="https://unpkg.com/react@18.3.1/umd/react.development.js" integrity="sha384-hD6/rw4ppMLGNu3tX5cjIb+uRZ7UkRJ6BPkLpg4hAu/6onKUg4lLsHAs9EBPT82L" crossorigin="anonymous"></script>
|
|
5
|
+
<script src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.development.js" integrity="sha384-u6aeetuaXnQ38mYT8rp6sbXaQe3NL9t+IBXmnYxwkUI2Hw4bsp2Wvmx4yRQF1uAm" crossorigin="anonymous"></script>
|
|
6
|
+
<script src="https://unpkg.com/@babel/standalone@7.29.0/babel.min.js" integrity="sha384-m08KidiNqLdpJqLq95G/LEi8Qvjl/xUYll3QILypMoQ65QorJ9Lvtp2RXYGBFj1y" crossorigin="anonymous"></script>
|
|
7
|
+
<script src="../../_ds_bundle.js"></script>
|
|
8
|
+
<style>body{margin:0;background:var(--bg-surface);padding:16px;font-family:var(--font-sans)}</style></head>
|
|
9
|
+
<body><div id="root"></div>
|
|
10
|
+
<script type="text/babel">
|
|
11
|
+
const { PillTabs } = window.KeybricksDesignSystem_71231a;
|
|
12
|
+
ReactDOM.createRoot(document.getElementById("root")).render(<PillTabs tabs={["For Review","To be Submitted"]} active={"For Review"}/>);
|
|
13
|
+
</script></body></html>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Tab systems: `Tabs` (13px underline — page level), `PanelTabs` (12px underline — config panel), `PillTabs` (pill filters), `ViewToggle` (list/grid icons).
|
|
2
|
+
|
|
3
|
+
```jsx
|
|
4
|
+
<Tabs tabs={["Import","Export"]} active={tab} onChange={setTab}/>
|
|
5
|
+
<PanelTabs tabs={["Node Info","Calc Rules","Output Fields","SQL Preview"]} active={t} onChange={setT}/>
|
|
6
|
+
<PillTabs tabs={["For Review","To be Submitted","For Approval"]} active={p} onChange={setP}/>
|
|
7
|
+
<ViewToggle value={view} onChange={setView}/>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
`SegmentedControl` (addition) for view/range switches:
|
|
11
|
+
|
|
12
|
+
```jsx
|
|
13
|
+
<SegmentedControl options={[{label:"List",icon:"list"},{label:"Grid",icon:"layout-grid"}]} value={v} onChange={setV}/>
|
|
14
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@keyfunc/keybricks-ds",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Keybricks design system — 334 design tokens and 118 UI components in React and Vue 3, source-only.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"*.css"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./components/index.d.ts",
|
|
13
|
+
"default": "./components/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./vue": "./components/_vue/index.mjs",
|
|
16
|
+
"./styles.css": "./styles.css",
|
|
17
|
+
"./tokens": {
|
|
18
|
+
"types": "./tokens/tokens.d.ts",
|
|
19
|
+
"default": "./tokens/tokens.js"
|
|
20
|
+
},
|
|
21
|
+
"./tokens.json": "./tokens/tokens.json",
|
|
22
|
+
"./tokens/*": "./tokens/*",
|
|
23
|
+
"./components/*": "./components/*",
|
|
24
|
+
"./assets/*": "./assets/*",
|
|
25
|
+
"./lint": "./_adherence.oxlintrc.json",
|
|
26
|
+
"./DESIGN.md": "./DESIGN.md"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"components",
|
|
30
|
+
"tokens",
|
|
31
|
+
"assets",
|
|
32
|
+
"_scripts",
|
|
33
|
+
"styles.css",
|
|
34
|
+
"readme.md",
|
|
35
|
+
"DESIGN.md",
|
|
36
|
+
"INTEGRATION.md",
|
|
37
|
+
"DEPLOY.md",
|
|
38
|
+
"SKILL.md",
|
|
39
|
+
"_adherence.oxlintrc.json"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build:tokens": "node _scripts/build-tokens.mjs",
|
|
43
|
+
"build:index": "node _scripts/build-index.mjs",
|
|
44
|
+
"build": "npm run build:tokens && npm run build:index",
|
|
45
|
+
"check": "node _scripts/build-tokens.mjs --check && node _scripts/build-index.mjs --check",
|
|
46
|
+
"prepack": "node _scripts/build-index.mjs --vue"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"design-system",
|
|
50
|
+
"design-tokens",
|
|
51
|
+
"react",
|
|
52
|
+
"vue",
|
|
53
|
+
"ui-components",
|
|
54
|
+
"epm"
|
|
55
|
+
],
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=18"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"react": ">=18",
|
|
61
|
+
"react-dom": ">=18",
|
|
62
|
+
"vue": ">=3.3"
|
|
63
|
+
},
|
|
64
|
+
"peerDependenciesMeta": {
|
|
65
|
+
"react": { "optional": true },
|
|
66
|
+
"react-dom": { "optional": true },
|
|
67
|
+
"vue": { "optional": true }
|
|
68
|
+
},
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "restricted"
|
|
71
|
+
},
|
|
72
|
+
"repository": {
|
|
73
|
+
"type": "git",
|
|
74
|
+
"url": "git+ssh://git@gitlab.epm2demo.cn/Felix/keybricks-ds.git"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Keybricks Design System
|
|
2
|
+
|
|
3
|
+
Keybricks is an enterprise performance-management (EPM) platform for finance teams: documents & reporting, business intelligence, data integration, reconciliation, consolidation, and a management suite (modeling, workflow, security, system migration, business logic, tasks, validation rules, control center). Its signature surface is a node-based **data-pipeline editor** ("adapters" like *Oracle Adapter*) where users wire Data Source → Join → Transformation → Merge → Output nodes on a dotted canvas.
|
|
4
|
+
(Keybricks 是面向财务团队的企业绩效管理(EPM)平台:文档与报表、商业智能、数据集成、对账、合并报表,以及管理套件(建模、工作流、权限、系统迁移、业务逻辑、任务管理、校验规则、控制中心)。其标志性界面是基于节点的**数据管道编辑器**(如「Oracle Adapter」),用户在点状网格画布上依次连接数据源 → 关联 → 转换 → 合并 → 输出节点。)
|
|
5
|
+
|
|
6
|
+
## Products represented / 产品范围
|
|
7
|
+
One product: the Keybricks web app (desktop, 1512×~860 design size). Key surfaces: Home dashboard · Documents · Pipeline editor · System Migration wizard.
|
|
8
|
+
(单一产品:Keybricks 网页应用(桌面端,设计尺寸约 1512×860)。核心界面:首页仪表盘、文档中心、管道编辑器、系统迁移向导。)
|
|
9
|
+
|
|
10
|
+
## CONTENT FUNDAMENTALS / 内容规范
|
|
11
|
+
- **Voice / 语气**: terse, technical, verb-first. Buttons are imperative: "Run Test", "Submit", "Save Settings", "Continue to Confirmation", "Mark as New", "Skip Selected".
|
|
12
|
+
(简洁、技术化、动词开头。按钮用祈使句:「Run Test」「Submit」「Save Settings」「Continue to Confirmation」「Mark as New」「Skip Selected」。)
|
|
13
|
+
- **Casing / 大小写**: Title Case for nav, headings, buttons, table headers ("Import History", "Custom Parameters"); sentence case for helper copy ("Import and manage configuration migrations across systems", "Click to upload or drag and drop", "JSON files only").
|
|
14
|
+
(导航、标题、按钮、表头用词首大写(Title Case);辅助说明文字用句首大写(sentence case)。)
|
|
15
|
+
- **Person / 人称**: no "I/we/you" — labels are objective and system-centric. Personal touch is limited to the dashboard greeting "Good evening, Felix" + full date "Monday, April 21, 2026".
|
|
16
|
+
(不使用「我/我们/你」——文案客观、以系统为中心。唯一的人性化表达是仪表盘问候语「Good evening, Felix」及完整日期。)
|
|
17
|
+
- **Terminology / 术语**: domain-precise EPM/ETL vocabulary — Detail Sheet, Dimension, Model, Association Match, Multi-Condition Judge, Group Calculation, Concat Merge, Reconciliation, Consolidation. Config codes render in mono ALL_CAPS_SNAKE ("FIN_CURRENCY_DEFAULT").
|
|
18
|
+
(精确的 EPM/ETL 领域术语;配置代码用等宽字体全大写下划线格式,如「FIN_CURRENCY_DEFAULT」。)
|
|
19
|
+
- **Numbers & meta / 数字与元信息**: counts as "1 document", "2 items", relative time "2 hours ago", log lines "[14:30] Task started: Import".
|
|
20
|
+
(计数如「1 document」「2 items」;相对时间如「2 hours ago」;日志行如「[14:30] Task started: Import」。)
|
|
21
|
+
- **Status language / 状态文案**: "• Editing" dot-prefixed state chip; steps named as nouns ("Upload & Parse", "Comparison", "Confirmation", "Execution", "Results").
|
|
22
|
+
(状态用圆点前缀,如「• Editing」;步骤用名词命名,如「Upload & Parse」「Comparison」「Confirmation」「Execution」「Results」。)
|
|
23
|
+
- **Emoji**: never. Icons carry all decoration.
|
|
24
|
+
(从不使用 emoji,所有装饰性表达交给图标。)
|
|
25
|
+
- **Localization note / 本地化说明**: content is bilingual-tolerant — a document named 财务分析 sits beside English names; UI chrome stays English.
|
|
26
|
+
(内容本身容忍中英混排——如「财务分析」这样的文档名可与英文文档名并列;界面框架文案本身保持英文。)
|
|
27
|
+
|
|
28
|
+
## VISUAL FOUNDATIONS / 视觉基础
|
|
29
|
+
- **Color / 色彩**: near-monochrome neutral UI (neutral ramp #FAFAFA→#0A0A0A) with ONE action blue (#155DFC). Color is reserved for meaning: node-category hues (source green #009966, join blue #155DFC, transform orange #FF6900, merge purple #9810FA, output teal #009689, each with a 100-tint tile bg), feedback (success #00BC7D, danger #FB2C36, warning #FFB900), charts (#3B82F6). Backgrounds: app #FAFAFA, surfaces white. No gradients except chart-area fills (blue → transparent).
|
|
30
|
+
The system is organized in **three tiers**, and only the middle one is public API:
|
|
31
|
+
1. **Palette** — `--<hue>-<step>` on a fixed 50→950 lightness scale (neutral + blue extracted from the source file; red/orange/amber/emerald/teal/cyan/purple/pink generated in OKLCH on one shared lightness/chroma curve so every family reads as part of the same system rather than a public library's defaults — steps other tokens point to byte-for-byte, like `--danger`/`--warning`/`--success`/`--cat-*`, are pinned to those exact source-verified values; cyan and pink have no source anchor, so their hue angles were chosen to complete an evenly spaced wheel alongside the anchored hues and the brand blue), plus the transparency ramps `--neutral-alpha-*` (2→80%, black in light / white in dark) and `--brand-alpha-*` (8→32%). Identical in both themes; referenced only by tier 2.
|
|
32
|
+
2. **Semantic role** — `--bg-*`, `--text-*`, `--border-*`, `--action-*`, `--overlay-*`, and the feedback families `--success/warning/danger/info` with `-bg`/`-text` pairs. Named by job, flips for dark mode. **Components and consuming designs reference these and nothing else.**
|
|
33
|
+
3. **Component** — `--cat-*`, `--tooltip-bg`, `--dropzone-border-hover`: one part of one component, added only when no tier-2 role fits.
|
|
34
|
+
Rules that don't bend: step 400 and lighter never carry body text on white (they are surfaces, borders, disabled glyphs); `--on-accent` (#FFFFFF) is the only foreground allowed on a saturated fill, in **both** themes; label hues are mechanical (light = 100-step bg + 700-step text, dark = 950-step bg + 300-step text) so a new category needs no judgement; hue means *category*, the four feedback roles mean *severity*. Contrast targets: 4.5:1 body text, 3:1 for 18px+/bold and for UI boundaries. Three Colors cards carry the values: Palette (every ramp), Schemes (sets that work together), Transparency (the alpha scale).
|
|
35
|
+
(近乎单色的中性界面(neutral 色阶 #FAFAFA→#0A0A0A),仅有一个强调蓝 #155DFC。色彩只用于表达含义:节点分类色相、状态色、图表色。背景:应用层 #FAFAFA,卡片层白色。除图表区域渐变填充外不使用渐变。
|
|
36
|
+
体系分为**三层**,其中只有中间一层对外开放:① **调色板层** `--<色相>-<档位>`,统一 50→950 明度阶(neutral 与 blue 提取自源文件;red/orange/amber/emerald/teal/cyan/purple/pink 用 OKLCH 在同一条明度/彩度曲线上生成,让每个色系读起来像同一套体系,而非某个公共库的默认值——凡是其他 token 需要逐字节对应的档位(如 `--danger`/`--warning`/`--success`/`--cat-*`)都锁定为源文件验证过的原值;cyan 与 pink 没有源文件锚点,其色相角度经过挑选,与已锚定的色相及品牌蓝共同组成一个分布均匀的色轮),另含透明度阶 `--neutral-alpha-*`(2→80%,浅色模式为黑、深色模式为白)与 `--brand-alpha-*`(8→32%);两套主题取值相同,仅供第二层引用。② **语义角色层** `--bg-*`、`--text-*`、`--border-*`、`--action-*`、`--overlay-*`,以及 `--success/warning/danger/info` 四组反馈色(含 `-bg`/`-text` 配对);按用途命名,负责深色模式的切换,**组件与业务设计只允许引用这一层**。③ **组件层** `--cat-*`、`--tooltip-bg` 等,仅在第二层确实无对应角色时新增。
|
|
37
|
+
不可打破的规则:400 及更浅的档位不得在白底上承载正文(它们是表面色、边框色、禁用态图标色);饱和填充之上的前景色只能用 `--on-accent`(#FFFFFF),**两套主题皆是**;标签色相是机械规则(浅色 = 100 档底 + 700 档字,深色 = 950 档底 + 300 档字),新增分类无需主观判断;色相表达**分类**,四组反馈色表达**严重程度**。对比度目标:正文 4.5:1,18px+/加粗及界面边界 3:1。Colors 分组下三张卡片给出全部色值:Palette(完整色阶)、Schemes(可直接套用的配色组合)、Transparency(透明度阶)。)
|
|
38
|
+
- **Type / 字体**: Inter only (300 stat numerals, 400 body, 500 UI-medium, 600 titles) at small sizes — 13px is the default UI size; 10–15px covers almost everything; 20/24px only for the greeting + stat numbers (weight 300). Negative tracking on ≥13px (-.076 to -.449px), positive on ≤11px. Menlo for data/code/logs.
|
|
39
|
+
(全局仅用 Inter;13px 为默认界面字号,10–15px 覆盖绝大多数场景,20/24px 仅用于问候语和统计数字(细体 300)。≥13px 用负字距,≤11px 用正字距。数据/代码/日志用 Menlo。)
|
|
40
|
+
- **Spacing / 间距**: 4-px family in practice (2/4/6/8/10/12/16/24/32); page padding 24×32; card padding 21 (dense 17); section gap 24. Fractional heights (35.5, 31.5, 61.5, 19.5 line-heights) come from line-height math — keep them.
|
|
41
|
+
(实际以 4px 为基础的间距族;页面内边距 24×32;卡片内边距 21(密集型 17);区块间距 24。带小数的高度值来自行高计算,需保留,不要取整。)
|
|
42
|
+
- **Radii / 圆角**: 4 small controls · 8 buttons/inputs/nav/chips · 10 cards/search/dropzone · 14 palette tiles · 16 canvas nodes · full circles for ports/steps/pills.
|
|
43
|
+
(4px 用于小型控件;8px 用于按钮/输入框/导航/标签;10px 用于卡片/搜索框/上传区;14px 用于组件面板图标块;16px 用于画布节点;端口/步骤圆点/胶囊用全圆角。)
|
|
44
|
+
- **Borders / 边框**: hairline everywhere — cards rgba(229,229,229,.6); controls #e5e5e5; row separators #f5f5f5; checkbox #d1d5db 1.5px; ports #d4d4d4 2px; dropzone dashed #d4d4d4 2px.
|
|
45
|
+
(全局使用发丝级细边框。)
|
|
46
|
+
- **Shadows / 阴影**: nearly flat. Canvas nodes only: `0 1px 3px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1)`; selection = blue-400 border + 2px blue-100 ring; badges get a 2px white ring. Everything else relies on borders.
|
|
47
|
+
(几乎全平面化设计。仅画布节点有轻阴影;选中态为蓝色边框+浅蓝光环;徽标带 2px 白色描边。其余元素依赖边框区分层次。)
|
|
48
|
+
- **Backgrounds/imagery / 背景与图像**: no photography, no illustration. The pipeline canvas is #fafafa with a subtle dot/curve grid; chart areas use soft blue gradient fills. Only bitmap: the cube logo.
|
|
49
|
+
(不使用摄影图或插画。管道画布为浅灰底配点状网格;图表区域用柔和蓝色渐变填充。唯一位图资源是立方体 Logo。)
|
|
50
|
+
- **States / 交互状态**: every interactive element carries five states beyond rest. **Hover** moves the fill one step (`--bg-hover` wash on ghost items, `--action-primary-hover` on solid buttons, `--soft-hover` on tinted ones). **Press** moves it a second step: Button and IconButton use explicit tokens (`--action-primary-active`, `--action-dark-active`, `--bg-press`, `--soft-active`, `--danger-active`, `--danger-soft-active`) and opt out of the global layer with `data-press="own"`; every other control — nav rows, tree items, menu items, chips, tabs, list rows, option rows, palette tiles — gets press from the one global rule in `tokens/interaction.css` (`filter: var(--press-filter)` on `:active`, which multiplies whatever wash hover is already showing, and brightens rather than darkens in dark mode). No scale transforms, no shadow shifts; text-only buttons drop to 70% opacity instead. **Keyboard focus** is also global: a 2px `--focus-border` outline at 2px offset on `:focus-visible` only, so a mouse click never draws it. **Selected/active** is persistent, not transient: active nav = `--bg-active` pill + heading-weight text; selected node = blue border + ring. **Disabled** is 55% opacity (50% on icon buttons) with the default cursor.
|
|
51
|
+
(每个可交互元素在静默态之外都有五种状态:悬停加深一档;按下再加深一档——Button 与 IconButton 使用专门的 `--*-active` / `--bg-press` token 并以 `data-press="own"` 退出全局层,其余所有控件(导航行、树节点、菜单项、标签页、列表行、选项行、面板磁贴等)由 `tokens/interaction.css` 中的单条全局规则提供按压态(`:active` 时叠加 `filter: var(--press-filter)`,在悬停底色之上再加深一档,深色模式下方向为提亮);不做缩放或阴影变化,纯文字按钮改为降至 70% 透明度。键盘聚焦同样是全局的:仅在 `:focus-visible` 时绘制 2px `--focus-border` 描边(偏移 2px),鼠标点击不显示。选中态是持续态而非瞬时态;禁用态约 55% 透明度(图标按钮 50%)并使用默认光标。)
|
|
52
|
+
- **Motion / 动效**: kept minimal by design (see Motion section below) — 120–160ms ease-out on hover/selection, nothing bouncy or far-traveling.
|
|
53
|
+
(动效克制(详见下方“动效”一节)——悬停/选中约 120–160ms 缓出,无弹跳、无大位移。)
|
|
54
|
+
- **Layout chrome / 布局框架**: left sidebar 240px (collapsible to a 64px icon rail), 56px top bar (search left, bell + black "AI Assistant" pill right), optional 240px secondary panel (Documents tree, pipeline palette), 400px right config panel, 250px bottom data-preview drawer.
|
|
55
|
+
(左侧边栏 240px(可收起为 64px 图标栏);顶栏 56px(左搜索,右铃铛+黑色「AI Assistant」胶囊);可选二级面板 240px;右侧配置面板 400px;底部数据预览抽屉 250px。)
|
|
56
|
+
- **Cards / 卡片**: white, radius 10, hairline border, 21px padding, 13px/500 title — never elevated.
|
|
57
|
+
(白底、10px 圆角、细边框、21px 内边距、13px/中等字重标题——不使用投影堆叠层级。)
|
|
58
|
+
- **Density / 密度**: high; tables 29–51px rows; mono 11px for data cells.
|
|
59
|
+
(高密度界面;表格行高 29–51px;数据单元格用 11px 等宽字体。)
|
|
60
|
+
|
|
61
|
+
## ICONOGRAPHY / 图标系统
|
|
62
|
+
- The product's icons are the **Lucide** stroke set (16/14px at 1.33px effective stroke, `currentColor`). We ship `components/icons/Icon.jsx`, embedding the exact Lucide path data for every glyph the product uses. Usage: `<Icon name="search" size={16}/>`.
|
|
63
|
+
(产品图标采用 **Lucide** 线性图标集(16/14px,约 1.33px 描边,随文字颜色变化)。已封装为 `components/icons/Icon.jsx`,内含产品实际用到的全部图形路径。用法:`<Icon name="search" size={16}/>`。)
|
|
64
|
+
- Icon color follows text color (#525252 default chrome, #a1a1a1 muted, category hue inside tinted tiles).
|
|
65
|
+
(图标颜色跟随文字色:默认 #525252,弱化态 #a1a1a1,分类色块内为对应分类色。)
|
|
66
|
+
- Tinted icon tiles are a signature motif: 40×40 r14 (palette), 48×48 r16 (nodes), 32×32 r8 hairline-bordered (list rows) — 100-tint bg + 600-hue glyph.
|
|
67
|
+
(彩色图标块是标志性视觉元素:40×40/r14(组件面板)、48×48/r16(节点)、32×32/r8 细边框(列表行)——浅色底 + 深色分类图标。)
|
|
68
|
+
- Emoji/unicode-as-icon: never.
|
|
69
|
+
(从不用 emoji 或 unicode 符号充当图标。)
|
|
70
|
+
- **Extended icon libraries / 扩展图标库**: all 287 Feather icons (same 24-grid stroke-2 dialect) are merged into `Icon` via `components/icons/feather-paths.js` — core names win on overlap. Unicons line style (1,206 glyphs) renders through `components/icons/Unicon.jsx` from the official Unicons CDN webfont — a substitution: the SVG set is not vendored locally, so `Unicon` needs network access. Keyword indexes for search: `assets/icons/icon-index.json` (core + Feather) and `assets/icons/unicons-index.json`; browse both in the two Icon Gallery cards (every icon carries keywords).
|
|
71
|
+
(扩展图标库:287 个 Feather 图标(与核心集同为 24 网格描边风格)已全部并入 `Icon` 组件,重名时以核心集为准;Unicons 线性风格 1,206 个图标通过 `Unicon` 组件从 Unicons 官方 CDN 字体渲染(替代方案:SVG 未本地化,需联网)。两份关键词索引位于 `assets/icons/`,可在两张 Icon Gallery 卡片中按关键词搜索,每个图标均附关键词。)
|
|
72
|
+
- Badges: 13–20px circles (error red, warning amber, pending gray, debug red) with 2px white ring, overlapping the parent's corner.
|
|
73
|
+
(徽标为 13–20px 圆形,叠加在父元素角上,带 2px 白色描边。)
|
|
74
|
+
|
|
75
|
+
## Tokens & fonts / 设计令牌与字体
|
|
76
|
+
- `tokens/colors.css`(基础色 + 语义别名)、`tokens/colors-extended.css`(九条 50–950 强调色阶 + 语义标签色对)、`tokens/alpha.css`(透明度阶与叠加层)、`tokens/typography.css`、`tokens/layout.css`(圆角/阴影/布局尺寸/层级)、`tokens/motion.css`、`tokens/interaction.css`(全局按压态与键盘聚焦层)、`tokens/fonts.css`、`tokens/dark.css`。
|
|
77
|
+
|
|
78
|
+
## Dark mode / 深色模式
|
|
79
|
+
- Apply with `<html data-theme="dark">`; every component reads semantic aliases only, so nothing else changes. Toggle it live in the UI kit from the top bar or the sidebar's **Dark Mode** item (persisted to `localStorage("kb-theme")`). `applyStoredTheme()` restores it at app start.
|
|
80
|
+
(在 `<html>` 上加 `data-theme="dark"` 即可全局切换;所有组件只读取语义别名,无需改动组件本身。可在 UI kit 顶栏或侧边栏「Dark Mode」项实时切换,并持久化到 `localStorage("kb-theme")`;应用启动时调用 `applyStoredTheme()` 恢复。)
|
|
81
|
+
- **Primary blue in dark / 深色模式主色**: on the #0a0a0a canvas the light-theme blue reads murky, and a brighter #2b7fff cannot carry white 13px type (3.8:1, below AA). Dark mode therefore uses **`#1f6feb`** — 4.3:1 against the canvas, 4.6:1 for its white label, both passing AA, in the same hue family (~214°) one step lower in luminance. The light theme keeps `#155dfc`.
|
|
82
|
+
(在 #0a0a0a 画布上,浅色主题的品牌蓝显得沉闷,而更亮的 #2b7fff 无法承载 13px 白色文字(对比度 3.8:1,未达 AA)。因此深色模式使用 **`#1f6feb`**:与画布对比 4.3:1、白色文字对比 4.6:1,均达 AA 标准,色相与浅色主题同属约 214°,亮度低一档。浅色主题仍为 `#155dfc`。)
|
|
83
|
+
- Other shifts / 其他差异: four surface steps (#0a0a0a app / #161616 surface / #1d1d1d raised / #1f1f1f inset); borders `rgba(255,255,255,.09)`; the dark "AI Assistant" pill inverts to light-on-dark (`--action-dark-fg`); category and status tints become low-alpha washes of the same hues; tooltips invert; shadows deepen rather than glow.
|
|
84
|
+
(四级表面层次;边框为半透明白;深色「AI Assistant」胶囊反转为浅底深字;分类色与状态色为同色相的低透明度色块;提示气泡反色;阴影加深而非发光。)
|
|
85
|
+
- **Foreground on filled surfaces / 填充色上的前景色**: text and icons sitting on a saturated fill use `--on-accent`, which stays white in both themes; the neutral "AI Assistant" pill uses `--action-dark-fg`, which inverts with the theme. Never use `--text-inverse` for this — it is the inverse of body text and flips to near-black on dark backgrounds.
|
|
86
|
+
(位于饱和色填充之上的文字与图标使用 `--on-accent`,在两套主题下恒为白色;中性色的「AI Assistant」胶囊使用 `--action-dark-fg`,随主题反转。此场景不得使用 `--text-inverse`,它是正文颜色的反色,在深色背景上会变为近黑色。)
|
|
87
|
+
- **Status / 规范成熟度**: the dark palette is an original derivation of the light one, validated for contrast rather than copied from a dark-theme design. Confirm it against your intended dark spec before production use.
|
|
88
|
+
(深色调色板基于浅色体系推导而来,已做对比度验证,但并非直接来自现成的深色设计稿。正式用于生产前,建议与团队预期的深色规范核对。)
|
|
89
|
+
- Authoring rule / 开发规范: never reference `--neutral-*` / `--blue-*` directly in a component. Use the semantic layer (`--bg-surface`, `--bg-raised`, `--text-body`, `--border-card`, `--track`, `--soft-bg`, `--info-bg`, `--on-accent`, `--port-border`, `--dropzone-border`, `--ring-surface`, `--tooltip-bg`, …) so both themes work for free.
|
|
90
|
+
(组件中禁止直接引用 `--neutral-*`/`--blue-*` 等基础色变量,一律使用语义层变量,这样浅色/深色两套主题自动生效,无需额外适配。)
|
|
91
|
+
|
|
92
|
+
## Motion / 动效
|
|
93
|
+
- `tokens/motion.css` defines a restrained scale: 80/120/160/240/360ms with `--ease-out cubic-bezier(.2,.8,.3,1)`. Recipes: `--t-hover`(悬停/按压通用)、`kb-rise`(菜单、弹窗)、`kb-toast-in`、`kb-pulse`(骨架屏)、`kb-spin`(加载中)。`prefers-reduced-motion` 全局生效。动效克制:不弹跳,位移不超过 8px。
|
|
94
|
+
- **Font caveat / 字体说明**: Inter is loaded from Google Fonts. Menlo has no webfont — the mono stack falls back to ui-monospace/SF Mono/Consolas on non-mac platforms.
|
|
95
|
+
(Inter 通过 Google Fonts 加载;Menlo 无网页字体可用,非 Mac 平台会回退到 ui-monospace/SF Mono/Consolas,如需精确还原请提供正版字体文件。)
|
|
96
|
+
|
|
97
|
+
## Index / 目录索引
|
|
98
|
+
|
|
99
|
+
**For developers integrating this system / 开发团队接入入口**
|
|
100
|
+
- `DESIGN.md` — the rules file for AI coding agents: absolute token values, interaction states, an explicit “do not” list, and voice. Point Claude Code / Cursor / Copilot at this before they generate UI.(给 AI 编程代理读的规则文件:绝对数值、交互状态、明确的禁止事项、文案语气。让 AI 写 UI 前先读它。)
|
|
101
|
+
- `INTEGRATION.md` — the integration guide: three steps to first paint, the full 118-component index with import paths, token reference, dark mode, interaction states, versioning.(接入指南:三步跑通、全部组件清单与引入路径、token 速查、深色模式、交互状态、版本策略。)
|
|
102
|
+
- `DEPLOY.md` — running the system on GitLab: what ships in the package and what stays on Pages, the entry points, the release flow, and the bundler config each consumer needs.(在 GitLab 上运行本系统:包里发什么、Pages 上留什么、入口点、发布流程、消费方需要的构建配置。)
|
|
103
|
+
- `index.html` · `gallery.html` — the documentation site: the browsable system and the filterable thumbnail grid, both deployed to GitLab Pages by CI.(文档站:可浏览的系统主页与可筛选缩略图网格,由 CI 部署到 GitLab Pages。)
|
|
104
|
+
- `package.json` · `.gitlab-ci.yml` · `_scripts/` — makes the system an installable package: a version tag publishes to the GitLab Package Registry, the default branch redeploys the docs site, and `npm run check` fails the pipeline if the generated tokens or barrels drift from source.(使设计系统成为可 `npm install` 的包:打 tag 发包,主分支重部文档站,`npm run check` 在生成产物与源码不一致时让流水线失败。)
|
|
105
|
+
|
|
106
|
+
- `styles.css` — 全局 CSS 入口(汇总所有 tokens)。
|
|
107
|
+
- `assets/` — keybricks-logo.png。
|
|
108
|
+
- `guidelines/` — 基础规范展示卡片(Design System 标签页)。
|
|
109
|
+
- `ui_kits/keybricks-app/` — 交互式产品复刻:首页、文档、管道编辑器、系统迁移。
|
|
110
|
+
- `SKILL.md` — Agent 技能入口文件。
|
|
111
|
+
|
|
112
|
+
## Components / 组件清单
|
|
113
|
+
- `components/icons/` — Icon(+ ICON_PATHS 图形数据 + feather-paths.js 全量 Feather 回退)、Unicon(Unicons CDN 字体)。
|
|
114
|
+
- `components/buttons/` — Button、IconButton、ActionChip。
|
|
115
|
+
- `components/forms/` — Field、Input、Textarea、Select、SearchInput、Checkbox、NumberStepper、Dropzone、Switch、Radio、RadioGroup、Combobox、MultiSelect、DatePicker、Slider。
|
|
116
|
+
- `components/tabs/` — Tabs、PanelTabs、PillTabs、ViewToggle、SegmentedControl。
|
|
117
|
+
- `components/display/` — Card、StatCard、Badge、StatusBadge、IconTile、ProgressBar、Donut、AreaChart、MiniBars、Avatar、AvatarGroup、Tag、Divider、Kbd。
|
|
118
|
+
- `components/feedback/` — Stepper、ContextMenu、ActivityItem、DotActivity、LogViewer、Tooltip、Modal、Toast、ToastStack、Alert、EmptyState、Skeleton、Spinner、Menu、Accordion、Banner、Drawer、Timeline。
|
|
119
|
+
- `components/data/` — DataTable、ListRow、Pagination、KeyValue、KeyValueList、DiffValue、CodeBlock、Spreadsheet、SmartTable、FilterBar。
|
|
120
|
+
- `components/navigation/` — Sidebar(+ KEYBRICKS_NAV)、TopBar、PageToolbar、PageHeading、DocTree、Breadcrumb、Tree、ThemeToggle(+ applyStoredTheme)。
|
|
121
|
+
- `components/pipeline/` — NodeCard、Port、PortLabel、PaletteItem、PaletteListItem、PalettePanel(+ PIPELINE_CATALOG)、PipelineCanvas、DataPreview、ConfigPanel、ZoomControls。
|
|
122
|
+
- `components/brand/` — BrandVisual(品牌视觉:7 个生成式母题,统一 1200×400 画布,可裁切填充任意尺寸;恒为深色,不随主题变化)。
|
|
123
|
+
- `components/charts/` — 图表模块(27 种):Sparkline、LineChart、BarChart、BarList、DonutChart、ScatterChart、HeatmapChart、WaterfallChart、BulletChart、GaugeChart、FunnelChart、TreemapChart、RadarChart、Histogram、BoxPlot、ParetoChart、CandlestickChart、SankeyChart、ChordChart、SunburstChart、WorldMap、GanttChart,以及 3D 系列 Surface3D、Scatter3D、Bar3D、Pie3D、Ribbon3D(SVG 画家算法渲染,拖拽旋转;+ ChartKit 共享图例/提示,`tokens/charts.css` 序列色与绘图配件)。三个尺寸层级:统计卡内微型、卡片内交互中型、整页分析大型;每种图表在任何尺寸都保留悬停读数。WorldMap 使用真实 Natural Earth 地理数据,需页面加载固定版本的 d3 与 topojson。
|
|
124
|
+
|
|
125
|
+
## Intentional additions / 主动补充的内容
|
|
126
|
+
These extend the original inventory — each is a standard need this product clearly has, built only from the extracted foundations (no new colors, radii, or type sizes):
|
|
127
|
+
(以下为在原始素材基础上主动补充的内容——均为该产品明显需要、但原始设计未直接给出的标准能力,且仅使用已提取的基础规范搭建,不引入新的颜色/圆角/字号:)
|
|
128
|
+
- `Icon` — 图标封装组件。
|
|
129
|
+
- `Switch`、`Radio`/`RadioGroup` — 设置项开关与单选场景。
|
|
130
|
+
- `SegmentedControl` — 视图/范围切换(对已有 `ViewToggle` 的泛化)。
|
|
131
|
+
- `Tooltip`、`Modal`、`Toast`/`ToastStack` — 确认与通知场景。
|
|
132
|
+
- `Alert`、`EmptyState`、`Skeleton`、`Spinner` — 空状态/加载态/报错态。
|
|
133
|
+
- `Breadcrumb` — 面包屑导航(导航层级可达三级,如 Management → System Migration → Import)。
|
|
134
|
+
- `Pagination` — 表格分页。
|
|
135
|
+
- `Avatar`/`AvatarGroup` — 头像组件;无真实头像图时以着色首字母代替,传入 `src` 即可使用真实图片。
|
|
136
|
+
- `ThemeToggle` + `applyStoredTheme` — 驱动深色模式。
|
|
137
|
+
- `KeyValue`/`KeyValueList`、`DiffValue` — 归纳配置摘要与迁移确认步骤中反复出现的「标签/值」与「变更前→变更后」写法。
|
|
138
|
+
- **Enterprise pack / 企业级扩展包**(参考 IBM Carbon、SAP Fiori、Salesforce Lightning、Workday Canvas 的通用清单补充;仅使用既有 token):
|
|
139
|
+
- `Spreadsheet` — Excel 式电子表格:公式栏(名称框 + fx)、字母/数字冻结表头、点击 + Shift 点击范围选择、双击编辑、`=SUM()/AVERAGE()` 等公式实时计算、工作表标签、Sum/Avg/Count 状态栏。
|
|
140
|
+
- `SmartTable` — Notion/Airtable/Coda 式智能表格(database grid):带类型图标的字段头(text/number/select/multiSelect/date/person/checkbox/url/progress)、主题自适应的彩色选项胶囊(`--hue-*`)、行悬停 + 展开按钮、双击内联编辑、“+ New” 加行与加字段列、列尾 COUNT/SUM/AVG 聚合、视图工具栏(Hide fields/Filter/Group/Sort/搜索)。
|
|
141
|
+
- `FilterBar` — Fiori 风格列表报表筛选栏(变体名 + 展开/收起 + Adapt Filters (n) + Go)。
|
|
142
|
+
- `Combobox` — 输入即筛选的单选下拉;`MultiSelect` — 多选下拉(标签 + "+n" 溢出 + 一键清空)。
|
|
143
|
+
- `DatePicker` — 日历弹层日期选择;`Slider` — 滑杆(拖动气泡 + 最值标签)。
|
|
144
|
+
- `Drawer` — 右侧滑出详情面板;`Banner` — 页面级通知条(区别于卡片内 Alert 与浮动 Toast);`Timeline` — 垂直活动时间线;`Tree` — 通用嵌套树(级联勾选、异步加载、搜索高亮、拖入文件夹、键盘导航)。
|
|
145
|
+
- `Tag`、`Divider`、`Kbd` — 归纳筛选标签、分隔线、快捷键提示等在界面中反复手写的小元素。
|
|
146
|
+
- `Menu`(挂载于触发元素下方的下拉菜单,区别于按点击位置弹出的 `ContextMenu`)、`Accordion`(通用可折叠区块,区别于专用于工作流文档的 `ListRow`)。
|
|
147
|
+
- `CodeBlock` — 带复制按钮的等宽代码块,用于 SQL Preview 与导出 JSON 预览。
|
|
148
|
+
- `ZoomControls` — 管道画布的缩放控件;源文件隐含平移/缩放交互,但未给出对应控件。
|
|
149
|
+
- `StatCard`/`Donut`/`ProgressBar`/`AreaChart`/`MiniBars` 内置的图表小工具,免去引入图表库。
|
|
150
|
+
- Token 补充:`tokens/motion.css`、层级(z-index)体系。
|
package/styles.css
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@import './tokens/fonts.css';
|
|
2
|
+
@import './tokens/colors.css';
|
|
3
|
+
@import './tokens/colors-extended.css';
|
|
4
|
+
@import './tokens/alpha.css';
|
|
5
|
+
@import './tokens/typography.css';
|
|
6
|
+
@import './tokens/layout.css';
|
|
7
|
+
@import './tokens/motion.css';
|
|
8
|
+
@import './tokens/charts.css';
|
|
9
|
+
@import './tokens/interaction.css';
|
|
10
|
+
@import './tokens/dark.css';
|
package/tokens/alpha.css
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* ── Alpha (transparency) tokens ──
|
|
2
|
+
Mature systems publish transparency as its own named ramp rather than letting
|
|
3
|
+
components invent rgba() values (Spectrum "transparent white/black", Atlassian
|
|
4
|
+
"color.blanket", SLDS overlay hooks). Two families:
|
|
5
|
+
|
|
6
|
+
--neutral-alpha-* black in light, white in dark — washes, scrims, dividers
|
|
7
|
+
--brand-alpha-* the action blue — selection tints, focus rings
|
|
8
|
+
|
|
9
|
+
The number IS the opacity percentage, so --neutral-alpha-8 is 8%.
|
|
10
|
+
Use an alpha wash (not a solid step) whenever the layer underneath must stay
|
|
11
|
+
visible: rows over striped tables, chips over colored cards, scrims over the app.
|
|
12
|
+
Use a solid neutral step when the surface is opaque and predictable — solids
|
|
13
|
+
render faster and never stack into muddy double-tints. */
|
|
14
|
+
:root{
|
|
15
|
+
--neutral-alpha-2:rgba(10,10,10,.02);--neutral-alpha-4:rgba(10,10,10,.04);--neutral-alpha-8:rgba(10,10,10,.08);--neutral-alpha-12:rgba(10,10,10,.12);--neutral-alpha-16:rgba(10,10,10,.16);--neutral-alpha-24:rgba(10,10,10,.24);--neutral-alpha-32:rgba(10,10,10,.32);--neutral-alpha-48:rgba(10,10,10,.48);--neutral-alpha-64:rgba(10,10,10,.64);--neutral-alpha-80:rgba(10,10,10,.8);
|
|
16
|
+
--brand-alpha-8:rgba(21,93,252,.08);--brand-alpha-12:rgba(21,93,252,.12);--brand-alpha-16:rgba(21,93,252,.16);--brand-alpha-24:rgba(21,93,252,.24);--brand-alpha-32:rgba(21,93,252,.32);
|
|
17
|
+
/* Semantic overlays built from the ramps above */
|
|
18
|
+
--overlay-hover:var(--neutral-alpha-4);--overlay-press:var(--neutral-alpha-8);--overlay-selected:var(--brand-alpha-8);--overlay-drag:var(--brand-alpha-12);
|
|
19
|
+
}
|
|
20
|
+
[data-theme="dark"]{
|
|
21
|
+
--neutral-alpha-2:rgba(255,255,255,.02);--neutral-alpha-4:rgba(255,255,255,.04);--neutral-alpha-8:rgba(255,255,255,.08);--neutral-alpha-12:rgba(255,255,255,.12);--neutral-alpha-16:rgba(255,255,255,.16);--neutral-alpha-24:rgba(255,255,255,.24);--neutral-alpha-32:rgba(255,255,255,.32);--neutral-alpha-48:rgba(255,255,255,.48);--neutral-alpha-64:rgba(255,255,255,.64);--neutral-alpha-80:rgba(255,255,255,.8);
|
|
22
|
+
--brand-alpha-8:rgba(43,127,255,.1);--brand-alpha-12:rgba(43,127,255,.14);--brand-alpha-16:rgba(43,127,255,.2);--brand-alpha-24:rgba(43,127,255,.28);--brand-alpha-32:rgba(43,127,255,.36);
|
|
23
|
+
}
|
|
24
|
+
@media (prefers-color-scheme: dark){:root{
|
|
25
|
+
--neutral-alpha-2:rgba(255,255,255,.02);--neutral-alpha-4:rgba(255,255,255,.04);--neutral-alpha-8:rgba(255,255,255,.08);--neutral-alpha-12:rgba(255,255,255,.12);--neutral-alpha-16:rgba(255,255,255,.16);--neutral-alpha-24:rgba(255,255,255,.24);--neutral-alpha-32:rgba(255,255,255,.32);--neutral-alpha-48:rgba(255,255,255,.48);--neutral-alpha-64:rgba(255,255,255,.64);--neutral-alpha-80:rgba(255,255,255,.8);
|
|
26
|
+
--brand-alpha-8:rgba(43,127,255,.1);--brand-alpha-12:rgba(43,127,255,.14);--brand-alpha-16:rgba(43,127,255,.2);--brand-alpha-24:rgba(43,127,255,.28);--brand-alpha-32:rgba(43,127,255,.36);
|
|
27
|
+
}}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* Keybricks chart tokens — series palette + plot furniture.
|
|
2
|
+
Series are theme-aware: saturated mid steps on white, 300-step tints on #0a0a0a.
|
|
3
|
+
Components reference ONLY --series-* / --chart-* here, never raw ramps. */
|
|
4
|
+
:root{
|
|
5
|
+
--series-1:var(--chart-blue);
|
|
6
|
+
--series-2:var(--teal-600);
|
|
7
|
+
--series-3:var(--purple-600);
|
|
8
|
+
--series-4:var(--orange-500);
|
|
9
|
+
--series-5:var(--emerald-600);
|
|
10
|
+
--series-6:var(--pink-600);
|
|
11
|
+
--series-7:var(--cyan-600);
|
|
12
|
+
--series-8:var(--amber-400);
|
|
13
|
+
--series-9:var(--red-500);
|
|
14
|
+
--series-10:var(--neutral-400);
|
|
15
|
+
--chart-grid:var(--neutral-100);
|
|
16
|
+
--chart-axis:var(--neutral-300);
|
|
17
|
+
--chart-label:var(--neutral-500);
|
|
18
|
+
--chart-pos:var(--emerald-600);
|
|
19
|
+
--chart-neg:var(--red-600);
|
|
20
|
+
--chart-total:var(--neutral-700);
|
|
21
|
+
--chart-track:var(--neutral-100);
|
|
22
|
+
--chart-guide:var(--neutral-400);
|
|
23
|
+
--chart-area-alpha:.14; /* @kind other */
|
|
24
|
+
--chart-heat-1:var(--blue-50);--chart-heat-2:var(--blue-100);--chart-heat-3:var(--blue-300);--chart-heat-4:var(--blue-500);--chart-heat-5:var(--blue-700);
|
|
25
|
+
--chart-heat-ink:#fff;
|
|
26
|
+
}
|
|
27
|
+
[data-theme="dark"]{
|
|
28
|
+
--series-1:#51a2ff;
|
|
29
|
+
--series-2:var(--teal-300);
|
|
30
|
+
--series-3:var(--purple-300);
|
|
31
|
+
--series-4:var(--orange-300);
|
|
32
|
+
--series-5:var(--emerald-300);
|
|
33
|
+
--series-6:var(--pink-300);
|
|
34
|
+
--series-7:var(--cyan-300);
|
|
35
|
+
--series-8:var(--amber-300);
|
|
36
|
+
--series-9:var(--red-300);
|
|
37
|
+
--series-10:var(--neutral-500);
|
|
38
|
+
--chart-grid:#1f1f1f;
|
|
39
|
+
--chart-axis:#3f3f3f;
|
|
40
|
+
--chart-label:#8f8f8f;
|
|
41
|
+
--chart-pos:var(--emerald-400);
|
|
42
|
+
--chart-neg:var(--red-400);
|
|
43
|
+
--chart-total:var(--neutral-300);
|
|
44
|
+
--chart-track:#1f1f1f;
|
|
45
|
+
--chart-guide:#525252;
|
|
46
|
+
--chart-area-alpha:.22; /* @kind other */
|
|
47
|
+
--chart-heat-1:#162456;--chart-heat-2:#193cb8;--chart-heat-3:#1447e6;--chart-heat-4:#51a2ff;--chart-heat-5:#bedbff;
|
|
48
|
+
--chart-heat-ink:#0a0a0a;
|
|
49
|
+
}
|
|
50
|
+
@media (prefers-color-scheme: dark){:root{
|
|
51
|
+
--series-1:#51a2ff;--series-2:var(--teal-300);--series-3:var(--purple-300);--series-4:var(--orange-300);--series-5:var(--emerald-300);--series-6:var(--pink-300);--series-7:var(--cyan-300);--series-8:var(--amber-300);--series-9:var(--red-300);--series-10:var(--neutral-500);
|
|
52
|
+
--chart-grid:#1f1f1f;--chart-axis:#3f3f3f;--chart-label:#8f8f8f;--chart-pos:var(--emerald-400);--chart-neg:var(--red-400);--chart-total:var(--neutral-300);--chart-track:#1f1f1f;--chart-guide:#525252;--chart-area-alpha:.22; /* @kind other */
|
|
53
|
+
--chart-heat-1:#162456;--chart-heat-2:#193cb8;--chart-heat-3:#1447e6;--chart-heat-4:#51a2ff;--chart-heat-5:#bedbff;
|
|
54
|
+
--chart-heat-ink:#0a0a0a;
|
|
55
|
+
}}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* Extended color ramps — OKLCH-generated for perceptual consistency across hues (same
|
|
2
|
+
lightness/chroma curve shape everywhere) instead of picked off a public library. Steps
|
|
3
|
+
that other tokens point to byte-for-byte (--danger, --warning, --success*, --cat-*) are
|
|
4
|
+
pinned to those exact source-verified values; every other step is derived around them.
|
|
5
|
+
cyan/pink have no source anchor — their hue angles (213°/344°) were chosen to complete
|
|
6
|
+
an evenly spaced wheel alongside the anchored hues and the brand blue (~264°). */
|
|
7
|
+
:root{
|
|
8
|
+
/* Blue — completes the partial ramp in colors.css */
|
|
9
|
+
--blue-200:#bedbff;--blue-300:#8ec5ff;--blue-800:#193cb8;--blue-900:#1c398e;--blue-950:#162456;
|
|
10
|
+
/* Red */
|
|
11
|
+
--red-50:#fff4f2;--red-100:#ffe6e3;--red-200:#ffcdc7;--red-300:#ffa79f;--red-400:#ff756d;--red-500:#fb2c36;--red-600:#dd0022;--red-700:#b8001a;--red-800:#950013;--red-900:#71000c;--red-950:#520006;
|
|
12
|
+
/* Orange */
|
|
13
|
+
--orange-50:#fff4ef;--orange-100:#ffe7dd;--orange-200:#ffd3c0;--orange-300:#ffb798;--orange-400:#ff9362;--orange-500:#ff6900;--orange-600:#d55600;--orange-700:#ac4400;--orange-800:#853300;--orange-900:#612300;--orange-950:#461700;
|
|
14
|
+
/* Amber */
|
|
15
|
+
--amber-50:#fff6e7;--amber-100:#ffefd3;--amber-200:#ffe5b7;--amber-300:#ffd280;--amber-400:#ffb900;--amber-500:#d69a00;--amber-600:#ae7d00;--amber-700:#886100;--amber-800:#674800;--amber-900:#4c3400;--amber-950:#362400;
|
|
16
|
+
/* Emerald (the file's "green") */
|
|
17
|
+
--emerald-50:#eefaf3;--emerald-100:#d8f5e5;--emerald-200:#b5ecce;--emerald-300:#8adeb3;--emerald-400:#5bcc97;--emerald-500:#00bc7d;--emerald-600:#009966;--emerald-700:#007d52;--emerald-800:#00603e;--emerald-900:#00462c;--emerald-950:#00311d;
|
|
18
|
+
/* Teal */
|
|
19
|
+
--teal-50:#eff9f8;--teal-100:#dbf3ef;--teal-200:#b9e8e0;--teal-300:#90d7cc;--teal-400:#67c2b6;--teal-500:#3dac9f;--teal-600:#009689;--teal-700:#007a6f;--teal-800:#005e56;--teal-900:#00443e;--teal-950:#002f2a;
|
|
20
|
+
/* Cyan */
|
|
21
|
+
--cyan-50:#eafafe;--cyan-100:#d1f4fc;--cyan-200:#a4eaf9;--cyan-300:#57daf3;--cyan-400:#4abed5;--cyan-500:#3fa3b7;--cyan-600:#338999;--cyan-700:#286f7d;--cyan-800:#1e5762;--cyan-900:#144049;--cyan-950:#0b2d33;
|
|
22
|
+
/* Purple */
|
|
23
|
+
--purple-50:#f8f5ff;--purple-100:#f1e8ff;--purple-200:#e4d3ff;--purple-300:#d2b3ff;--purple-400:#bd8bff;--purple-500:#ab5dff;--purple-600:#9810fa;--purple-700:#7e00d2;--purple-800:#6500a9;--purple-900:#4c0182;--purple-950:#35085b;
|
|
24
|
+
/* Pink */
|
|
25
|
+
--pink-50:#fff3f9;--pink-100:#ffe4f3;--pink-200:#ffcae8;--pink-300:#ffa4da;--pink-400:#f779c8;--pink-500:#e355b2;--pink-600:#cb329a;--pink-700:#aa1e7f;--pink-800:#871364;--pink-900:#640e4a;--pink-950:#460c33;
|
|
26
|
+
/* ── Semantic hue pairs for pills/tags/select options (theme-aware; components use ONLY these) ── */
|
|
27
|
+
--hue-gray-bg:var(--neutral-100);--hue-gray-fg:var(--neutral-600);
|
|
28
|
+
--hue-blue-bg:var(--blue-100);--hue-blue-fg:var(--blue-700);
|
|
29
|
+
--hue-green-bg:var(--emerald-100);--hue-green-fg:var(--emerald-700);
|
|
30
|
+
--hue-orange-bg:var(--orange-100);--hue-orange-fg:var(--orange-700);
|
|
31
|
+
--hue-amber-bg:var(--amber-100);--hue-amber-fg:var(--amber-800);
|
|
32
|
+
--hue-teal-bg:var(--teal-100);--hue-teal-fg:var(--teal-700);
|
|
33
|
+
--hue-cyan-bg:var(--cyan-100);--hue-cyan-fg:var(--cyan-700);
|
|
34
|
+
--hue-purple-bg:var(--purple-100);--hue-purple-fg:var(--purple-700);
|
|
35
|
+
--hue-pink-bg:var(--pink-100);--hue-pink-fg:var(--pink-700);
|
|
36
|
+
--hue-red-bg:var(--red-100);--hue-red-fg:var(--red-700);
|
|
37
|
+
}
|
|
38
|
+
/* Dark theme: deep-tint bg + 300-step fg keeps pills readable on #0a0a0a */
|
|
39
|
+
[data-theme="dark"]{--hue-gray-bg:#262626;--hue-gray-fg:#a1a1a1;--hue-blue-bg:#162456;--hue-blue-fg:#8ec5ff;--hue-green-bg:#00311d;--hue-green-fg:#8adeb3;--hue-orange-bg:#461700;--hue-orange-fg:#ffb798;--hue-amber-bg:#362400;--hue-amber-fg:#ffd280;--hue-teal-bg:#002f2a;--hue-teal-fg:#90d7cc;--hue-cyan-bg:#0b2d33;--hue-cyan-fg:#57daf3;--hue-purple-bg:#35085b;--hue-purple-fg:#d2b3ff;--hue-pink-bg:#460c33;--hue-pink-fg:#ffa4da;--hue-red-bg:#520006;--hue-red-fg:#ffa79f}
|
|
40
|
+
@media (prefers-color-scheme: dark){:root{--hue-gray-bg:#262626;--hue-gray-fg:#a1a1a1;--hue-blue-bg:#162456;--hue-blue-fg:#8ec5ff;--hue-green-bg:#00311d;--hue-green-fg:#8adeb3;--hue-orange-bg:#461700;--hue-orange-fg:#ffb798;--hue-amber-bg:#362400;--hue-amber-fg:#ffd280;--hue-teal-bg:#002f2a;--hue-teal-fg:#90d7cc;--hue-cyan-bg:#0b2d33;--hue-cyan-fg:#57daf3;--hue-purple-bg:#35085b;--hue-purple-fg:#d2b3ff;--hue-pink-bg:#460c33;--hue-pink-fg:#ffa4da;--hue-red-bg:#520006;--hue-red-fg:#ffa79f}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* Keybricks color tokens — light values extracted verbatim from Keyfunc UI v8.fig.
|
|
2
|
+
Dark theme lives in tokens/dark.css and re-points the semantic layer only. */
|
|
3
|
+
:root{
|
|
4
|
+
/* Neutral scale (Tailwind-v4 neutral) */
|
|
5
|
+
--neutral-0:#ffffff;--neutral-50:#fafafa;--neutral-100:#f5f5f5;--neutral-200:#e5e5e5;--neutral-300:#d4d4d4;--neutral-400:#a1a1a1;--neutral-500:#737373;--neutral-600:#525252;--neutral-700:#404040;--neutral-800:#262626;--neutral-900:#171717;--neutral-950:#0a0a0a;
|
|
6
|
+
/* Primary blue */
|
|
7
|
+
--blue-50:#eff6ff;--blue-100:#dbeafe;--blue-400:#51a2ff;--blue-500:#2b7fff;--blue-600:#155dfc;--blue-700:#1447e6;
|
|
8
|
+
/* Chart & canvas accents */
|
|
9
|
+
--chart-blue:#3b82f6;--edge:#cbd5e1;--checkbox-border:#d1d5db;
|
|
10
|
+
/* Node-category hues */
|
|
11
|
+
--cat-source:#009966;--cat-source-bg:#d0fae5;
|
|
12
|
+
--cat-join:#155dfc;--cat-join-bg:#dbeafe;
|
|
13
|
+
--cat-transform:#ff6900;--cat-transform-bg:#ffedd4;
|
|
14
|
+
--cat-merge:#9810fa;--cat-merge-bg:#f3e8ff;
|
|
15
|
+
--cat-output:#009689;--cat-output-bg:#cbfbf1;
|
|
16
|
+
--purple-500:#ad46ff;
|
|
17
|
+
/* Status */
|
|
18
|
+
--success:#00bc7d;--success-strong:#009966;--success-bg:#ecfdf5;--success-text:#007a55;
|
|
19
|
+
--danger:#fb2c36;--danger-bg:#fef2f2;--danger-text:#c10007;
|
|
20
|
+
--warning:#ffb900;--warning-bg:#fff7ed;--warning-text:#ca3500;
|
|
21
|
+
/* ── Semantic aliases: the ONLY layer components may reference ── */
|
|
22
|
+
--bg-app:var(--neutral-50);--bg-surface:var(--neutral-0);--bg-raised:var(--neutral-0);--bg-inset:var(--neutral-50);--bg-hover:var(--neutral-100);--bg-active:var(--neutral-100);--bg-scrim:rgba(10,10,10,.32);
|
|
23
|
+
--text-primary:var(--neutral-950);--text-heading:var(--neutral-900);--text-strong:var(--neutral-700);--text-body:var(--neutral-600);--text-secondary:var(--neutral-500);--text-muted:var(--neutral-400);--text-inverse:#ffffff;
|
|
24
|
+
/* Foreground ON a saturated fill — always light, in BOTH themes */
|
|
25
|
+
--on-accent:#ffffff;
|
|
26
|
+
/* Foreground on the neutral "dark pill" (AI Assistant), which inverts in dark */
|
|
27
|
+
--action-dark-fg:#ffffff;
|
|
28
|
+
--border-card:rgba(229,229,229,.6);--border-control:var(--neutral-200);--border-subtle:var(--neutral-100);--border-strong:var(--neutral-300);
|
|
29
|
+
--action-primary:var(--blue-600);--action-primary-hover:var(--blue-700);--action-primary-active:#1039c4;--action-dark:var(--neutral-900);--action-dark-hover:var(--neutral-800);--action-dark-active:var(--neutral-950);
|
|
30
|
+
/* Press (active) fills — one step past the hover value in each family */
|
|
31
|
+
--bg-press:var(--neutral-200);--soft-active:var(--blue-200);--danger-active:var(--red-800);--danger-soft-active:var(--red-200);
|
|
32
|
+
--focus-ring:var(--blue-100);--focus-border:var(--blue-500);--selected-border:var(--blue-400);
|
|
33
|
+
--soft-bg:var(--blue-50);--soft-border:var(--blue-500);--soft-hover:var(--blue-100);
|
|
34
|
+
--info-bg:var(--blue-50);--info-fg:var(--blue-600);
|
|
35
|
+
--track:var(--neutral-200);--dot-neutral:var(--neutral-400);--skeleton:var(--neutral-200);
|
|
36
|
+
--port-border:var(--neutral-300);--dropzone-border:var(--neutral-300);--dropzone-border-hover:var(--neutral-400);
|
|
37
|
+
--tooltip-bg:var(--neutral-900);--tooltip-fg:#ffffff;
|
|
38
|
+
--link:var(--blue-600);--link-hover:var(--blue-700);
|
|
39
|
+
}
|