klun-ui 0.4.1 → 0.6.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/CHANGELOG.md CHANGED
@@ -5,7 +5,298 @@ All notable changes to **klun-ui** are documented here. The format follows
5
5
  [Semantic Versioning](https://semver.org/) (pre-1.0: minor/patch bumps may carry
6
6
  small breaking changes).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.6.0] — 2026-10-06
9
+
10
+ KDS 设计标准升级。**含破坏性变更**——完整迁移指引见 `docs/design-standards/MIGRATION.md`。
11
+
12
+ ### Breaking
13
+ - **移除 `FormInstance.registerRules`** —— 请改用 `<FormItem rules={…} />`。
14
+ 依据:源码中已标 `@deprecated`,且**已登记消费者零使用**。
15
+ - **移除 `DrawerProps.side`** —— 请改用 `placement`(支持 `top`/`right`/`bottom`/`left`,比 `side` 更宽)。
16
+ - **覆盖层 `align` 默认值由物理改为逻辑**(`Popover`/`Dropdown`/`SelectMenu`/`DatePicker`/
17
+ `DateRangePicker`/`DateTimePicker`):默认 `"start"`。**LTR 行为不变**,RTL 下改为贴内联起始边(修复锚错边)。
18
+ 需要原有物理行为时显式传 `align="left"` / `align="right"`。
19
+
20
+ ### Added
21
+ - **按下态反馈**:Button / IconButton / CopyButton 新增 `translateY(1px)`。
22
+ - **RTL 逻辑属性**:RangeSlider 镜像、Tree 层级缩进、Notification 关闭按钮、Chip 内边距、
23
+ CodeViewer 浮动按钮、覆盖层对齐。
24
+ - **密度跟随**:`Result`/`EmptyState`/`Collapse`/`Accordion`/`Sidebar`/`Chip`/`Message`/`Banner`/
25
+ `Notification`/`Timeline`/`CodeViewer`/`DiffViewer`/`Kanban`/`RichEditor` 在 `density="compact"` 下
26
+ 跟随缩放(此前保持桌面留白)。
27
+ - **长文案健壮性**:`Alert`/`Banner`/`Notification`/`Message`/`Tabs`/`StepIndicator`/`Timeline`/
28
+ `ChartLegend`/`DiffViewer` 在超长文本下折行或可滚动(此前溢出或被静默裁掉)。
29
+ - **代码块横向滚动**:`CodeViewer` / `DiffViewer` 的长行可横向滚动查看,不再被裁掉。
30
+
31
+ ### Fixed
32
+ - **`CodeViewer` / `LogViewer` 的 `--dark` 变体在暗色主题下白底白字**(对比度 **1.0**,代码不可见)。
33
+ 根因:背景用了会随主题翻转的 `--klun-bg-strong-950`,而文字是写死的白色。
34
+ 改用主题恒定的 `--klun-static-static-black`(**浅色下同值,浅色观感不变**)。
35
+ - **焦点环**由「2px 白 + 2px 主色」收窄为单层 2px,且补上 `RichEditor` 编辑区缺失的焦点样式。
36
+ - **`prefers-reduced-motion`**:5 个文件 6 个动画补齐降级。
37
+ - 约 35 个组件的次要文字加深,达到对比度要求。
38
+ - 暗色皮肤覆写此前**未真正生效**,已修复。
39
+
40
+ ### Changed
41
+ - **控件尺寸**:默认档 32/36/40/48、紧凑档 28/32/36/40;圆角 6/6/8/10;正文 14/20。
42
+ - **`kk` 皮肤**控制高度由「全部 32px」改为**五档** 20/24/28/32/36(默认档仍 32px,常规观感不变)。
43
+
44
+ ### Known issues(**已知未修,待设计决策**)
45
+ - **按钮文字对比度**:12 种样式(3 变体 × 4 外观)里 **8 种**在多数主题组合下低于 4.5:1
46
+ (`neutral` 四种全部达标)。
47
+ - **Badge 强调色对比度**:`filled` 外观 **5/6 色相**不达标,`orange-filled`/`yellow-filled` **全组合不达标**。
48
+ 根因:`filled` 对所有色相统一用白字,而黄/橙是浅色相(对照 `lighter` 外观**已按色相**配深色文字)。
49
+ 修法需**加深强调色**或**按色相配文字色**,两者都改变品牌观感,故本版未改。
50
+ - 读屏实际朗读、真机触摸、forced-colors、200% 文字与 320px 重排**未验证**。
51
+
52
+ ## [0.5.0] — 2026-09-29
53
+
54
+ ### Added
55
+ - **`kk` theme** (`src/styles/tokens/kk-theme.css`, ships with `styles.css`) — the
56
+ admin-console skin, activated with `data-mode="kk"` or `<ConfigProvider accent="kk">`.
57
+ It carries a `--kk-*` palette (light + dark) that re-points the klun semantic
58
+ tokens (so Button / Input / Switch / Modal / Cascader… render in the console
59
+ style on their own) plus the shared console blocks — `.kk-page`, `.kk-aside`,
60
+ `.kk-node`, `.kk-toolbar`, `.kk-btn`, `.kk-table` (+ `--grid` form table),
61
+ `.kk-check`, `.kk-switch`, `.kk-pager`, `.kk-move`, form rows… — so a console
62
+ page ships markup instead of its own stylesheet. The SCUI console pages
63
+ (用户管理 / 菜单管理 / 字典管理) now carry **no page CSS at all** and the shell
64
+ sets `data-mode="kk"` on its root, so the klun components they embed
65
+ (`IconPicker`, `Modal`, `Cascader`, `Popconfirm`) pick up the console palette too.
66
+ The console **shell frame** moved in as well (`:where([data-mode="kk"]) .scui*`
67
+ blocks — 65px rail, 210px panel, 50px topbar, 35px tag bar, drawer, with the
68
+ `--scui-*` palette), so `ScuiShell` ships no CSS either. `:where()` keeps every
69
+ selector at the specificity it had inline, and the root itself is matched with
70
+ `.scui:where([data-mode="kk"])` (the attribute sits on that element, not an
71
+ ancestor — a plain descendant selector silently skips the root).
72
+ **kk is square (直角)**: every *corner* radius token collapses to 0 (only real
73
+ circles — avatars, switch knobs, round icon buttons — keep their 50%), and klun
74
+ components embedded in a console page are skinned to the same standard: 32px
75
+ control height, square corners, Element Plus colours (buttons: `primary` filled
76
+ blue, `neutral`/`stroke` white + `#dcdfe6` border; dialogs: 16px padding, no
77
+ divider above the buttons), and the Cascader fills its field, is 32px tall and
78
+ keeps its dropdown left-aligned with 108px columns, so even a two-column panel
79
+ stays inside the narrowest console dialog. The console's element resets sit in
80
+ `:where()` end-to-end (zero specificity) — at (0,2,0) they used to beat a
81
+ component's own rules, e.g. wiping the Cascader trigger's inner padding.
82
+ Row actions are one icon family (Element Plus `Edit` / `Plus` / `Delete` SVGs,
83
+ exported from the SCUI pages as `IconEdit` / `IconPlus` / `IconDelete` — no
84
+ Remix font icons mixed in) and carry no frame: `.kk-iconbtn` defaults to a
85
+ transparent border, so a row's 编辑/删除 reads as two bare icons, while the
86
+ `--plain` / `--primary` / `--danger` variants opt back in with their own border
87
+ (previously the base left the border colour unset, which painted it
88
+ `currentColor` — a dark box around every action).
89
+ One **6px scrollbar for every scrolling console block** (`--kk-scrollbar` /
90
+ `--kk-scrollbar-hover`, Element Plus' translucent grey: reads on light and
91
+ dark, rails keep their own light thumb) instead of the browser's fat default,
92
+ plus the two form controls a console page was missing: `.kk-textarea` and the
93
+ disabled state of `.kk-input` (`--kk-hover` fill, weak text).
94
+ - `ScuiDictPage` — SCUI's 配置 → 字典管理 page: 300px dictionary-type tree
95
+ (filter, hover 编辑/删除, 字典分类 button) + the item table (selection, drag
96
+ handle column, 名称 / 键值 / 是否有效 switch / 操作) with a pager. Both sides are
97
+ editable (dialogs via `Modal` + `Cascader`, `Popconfirm` for row delete) and
98
+ both sides reorder by drag (dnd-kit, siblings-only for the tree). It is the
99
+ first console page with **no page CSS at all** — everything comes from the `kk`
100
+ theme.
101
+ - `ScuiDeptPage` (`src/templates/scui/DeptPage.tsx`) — SCUI's 配置 → 部门管理
102
+ page, 左树右明细: a 300px organisation tree (keyword filter, expand/collapse,
103
+ sibling drag sorting, footer 新增子部门 / 删除 acting on the selection) and the
104
+ 明细 pane on the right — 部门名称 / 部门编码 / 上级部门 (read-only, the hierarchy
105
+ comes from 新增子部门) / 负责人 / 联系电话 / 状态 switch / 备注 / 创建时间, saved with
106
+ 保存 and reverted with 重置. Deleting a branch warns about its children first.
107
+ Ships `SCUI_DEPTS` (3 levels) and the same demo data shape as the other pages.
108
+ - `ScuiRolePage` (`src/templates/scui/RolePage.tsx`) — SCUI's 配置 → 角色管理
109
+ page, 左角色列表 + 右权限树: the 300px list holds 名称/标识 (keyword filter, hover
110
+ 编辑, footer + 新增角色 / 🗑 删除 with a warning about the granted permissions),
111
+ the right pane is the selected role's 菜单权限树 built from the console's own
112
+ navigation (`SCUI_PERM_TREE`, 78 nodes, 3 levels, expanded by default).
113
+ **改动即保存** — a click writes into the role, no 保存 button. A node counts as
114
+ granted only when its whole branch is (`aria-checked="mixed"` + the new
115
+ `.kk-check.is-half` dash while partial), so clicking a half-granted group grants
116
+ or clears its entire branch; the toolbar carries 全选 / 清空 and the
117
+ `已授权 N 项` count.
118
+ - `ScuiWorkflowPage` (`src/templates/scui/WorkflowPage.tsx`) — SCUI's 组件 →
119
+ 工作流设计器 page: a **1:1 port** of the live demo's `vab/workflow` canvas (the
120
+ vue-admin-beautiful "workflow-design" component). The original class names and
121
+ values live in `kk-theme.css` under `.sc-workflow-design` (12px content font,
122
+ 220×72 cards, 4px radius, `0 2px 5px rgba(0,0,0,.1)`, 24px title bars in
123
+ `#576a95` 发起人 / `#ff943e` 审批人 / `#3296fa` 抄送人, 2px `#cacaca` connectors,
124
+ `#cccccc` branch rules with cover lines masking their ends, `54.5px 0` canvas
125
+ padding, 10px `#dbdcdc` end dot) — verified by measuring live and port with the
126
+ same selectors: every value matches (the last 1px on the condition card is line
127
+ box rounding). Interaction: every card is followed by a round + whose popup
128
+ (270px, right of the button) appends 审批节点 / 抄送节点 / 条件分支 — a column's +
129
+ sits between its condition card and the branch's steps, exactly like the live
130
+ one; ✕ deletes a node or a 条件 (hover); ▸/◂ swap the 优先级 columns. Clicking a
131
+ card opens its config drawer: steps edit 节点名称 / 负责人, 条件 opens the 600px
132
+ **条件设置** drawer — editable title (pencil), 条件关系 且/或, and the
133
+ 描述 / 条件字段 / 运算符 / 值 / 移除 table with 暂无数据, + 增加条件 and 保存 / 取 消
134
+ (the drawer works on a copy, so 取消 really drops the edits; the else branch
135
+ keeps 其他条件进入此流程 and offers no rows). 导出 JSON still dumps the tree.
136
+ The 条件字段 list is **data-driven** (`WF_FIELDS`: label + kind + options) and the
137
+ rest of the row follows it — 请假天数 offers the six comparison operators and a
138
+ number input, 请假类型 the four text ones (`= != 包含 不包含`) and a dropdown of its
139
+ own options — so changing the field rewrites the operator list and the value
140
+ control, the way the live form does.
141
+ - 审批 / 抄送 nodes carry the live demo's **人员设置**: 审批人员类型 (指定成员 / 主管 /
142
+ 角色 / 发起人自选 / 发起人自己 / 连续多级主管), a + 选择人员 button growing 人员 chips
143
+ (× removes one), ☐ 超时自动审批 and 多人审批时审批方式 (按顺序依次审批 / 会签 / 或签).
144
+ The type actually takes effect: 指定成员 opens the 640px 人员选择 dialog (部门导航
145
+ filters the member list, 请输入成员姓名 searches it, 已选 (N) collects the picks),
146
+ 角色 opens the 460px 角色选择 dialog, and the kinds that need no picker (主管 /
147
+ 发起人自选 / 发起人自己 / 连续多级主管) hide the row and write the type onto the card.
148
+ 保存 joins the picked names into the card's second line.
149
+ - A **`Fixed`** note for the same page: an empty 条件 column renders a **single** + now
150
+ (its own, between the condition card and the — empty — step chain) instead of
151
+ stacking the chain's fallback + under it, so a fresh 条件 shows one unbroken 单线; the
152
+ **汇聚点** + the live demo puts under a 条件组 (inside `.branch-box-wrap`, after
153
+ `.branch-box`) is back too — both shapes were measured against the live page with the
154
+ same selectors (`branch-box-wrap` children = `branch-box, add-node-btn-box`).
155
+ - **工作流设计器拆成模块组** (`src/templates/scui/workflow/`): `model.ts` (节点/条件类型、
156
+ 演示数据、`opsFor` / `summaryOf` / `scopeLabel` / `edit` 等纯函数), `WorkflowGlyphs.tsx`
157
+ (原版 SVG), `WfMemberPicker.tsx` 与 `WfScopePicker.tsx` (两张选择弹窗) — `WorkflowPage.tsx`
158
+ 只留画布与两个抽屉(1386 → 919 行),并 `export *` 保持原来的导入路径与公开面不变。
159
+ - `src/templates/scui/tree.ts` — the tree helpers (path lookup, insert/update/
160
+ remove, filter, flatten, `collectIds`) shared by the 菜单管理 / 字典管理 / 部门管理
161
+ trees — a keyword filter passes `collectIds(...)` as the open list, so matches
162
+ inside collapsed branches show up instead of staying hidden (the 菜单管理 tree
163
+ now does the same).
164
+ - `IconPicker` (`src/components/forms/`) — generic icon picker: a 38×32 icon-only
165
+ trigger (like SCUI's 菜单图标 field) opening a 520px dialog with category tabs,
166
+ an auto-filling grid, live search across every group, a 清除 action and Esc/✕ to
167
+ bail out. Picking commits straight away — no OK button.
168
+ Ships `ICON_GROUPS` (100 Remix line icons in 5 categories); `groups` + `renderIcon`
169
+ swap in any other icon set. Built on `Modal` and the `--klun-*` tokens, so it
170
+ follows the host page's light/dark palette (`data-theme="dark"`); the SCUI shell
171
+ root now carries that attribute for the components it embeds.
172
+ - **SCUI shell template** (`src/templates/scui/` → `Templates/SCUI` in Storybook) —
173
+ a 1:1 port of the [SCUI](https://github.com/scui-plus/scui) admin layout:
174
+ 65px dark icon rail (`#222B45`, SCUI's own SVG glyphs incl. the brand "S" mark),
175
+ 210px secondary menu panel with collapse, 50px breadcrumb topbar with action
176
+ icons + notification badge + user chip, 35px multi-view tag bar (closable tabs,
177
+ the home tab stays), `#F6F8F9` content slot, and the floating 布局设置 drawer
178
+ (dark mode, accent presets, language). Dimensions/colours follow the live demo
179
+ instead of the klun-ui theme.
180
+ - SCUI's **real menu tree** (`menuData.ts`, generated from the live demo): nested
181
+ sub-menus (组件/模板/其他), SCUI's own icon paths (30, deduplicated) and the
182
+ entries it leaves bare — so the panel matches the original item for item. The
183
+ submenu arrow is Element Plus' `ArrowDown` SVG at 12px (rotating 180° while
184
+ open), exactly what the live demo renders — it used to be a 24×18 Remix font
185
+ chevron pointing right.
186
+ - `ScuiUsersPage` — SCUI's 配置 → 用户管理 CRUD page: department tree with filter,
187
+ selection toolbar (新增 / 删除 / 分配角色 / 密码重置 + search), user table
188
+ (ID / 头像 / 登录账号 / 姓名 / 所属角色 / 加入时间 / 操作) and the pager. The shell
189
+ gained `initialView` + `renderView` so tabs can mount real pages.
190
+ - Selected-state wash in the SCUI shell: the current secondary-menu item and the
191
+ current department-tree node both get the light-blue highlight (`#ECF5FF`,
192
+ dark mode uses the themed hover colour).
193
+ - `ScuiMenuPage` — SCUI's 配置 → 菜单管理 page: the 300px menu tree (checkbox,
194
+ 18px indents, **hovering a row reveals its 新增 button**), the 菜单表单
195
+ (显示名称 / 上级菜单 / 类型 / 别名 / 菜单图标 / 路由地址 / 重定向 / 菜单高亮 /
196
+ 视图 / 颜色 / 是否隐藏 / 整页路由 / 标签) and the 接口权限 table — its 50px first
197
+ column is centred (same centre line as the header's +) and shows the row number,
198
+ which swaps in place for a plain-danger circle delete button while the row is
199
+ hovered or focused. Dark mode covered like the other SCUI pages.
200
+ - The 菜单管理 tree is **drag-to-reorder** (dnd-kit, same engine as `Table` /
201
+ `Kanban`): grab a row to sort it among its siblings — pointer or keyboard
202
+ (space / arrows). Nodes carry stable ids, so the open/checked/selected state
203
+ survives reorders, and a drag toward another branch never reparents.
204
+ - Dark mode follows the live demo's Element Plus dark palette — rail `#141414`,
205
+ panel/topbar/tag bar `#1D1E1F` with `#414243` borders, content `#141414`,
206
+ menu/breadcrumb text `#D0D0D0`/`#CFD3DA`, hover wash `#0C1F32`, table borders
207
+ `#363637` — and the ported 用户管理 page carries its own dark overrides.
208
+ - **klun-web console, ported page by page** (`src/templates/scui/` → story
209
+ `Templates/SCUI → Console — 全站(所有页面)`). The whole admin console is rebuilt
210
+ in the SCUI language on **one entry point**: `KLUN_PAGES` maps a view key
211
+ (`<group>/<label>`) to a page element and `KlunConsoleShell` renders it through
212
+ the SCUI shell with klun-web's own 7-group menu, so a new page is one line in
213
+ the registry — the shell, the menu and the stylesheet stay untouched.
214
+ Each page is self-contained demo data shaped like klun-web's `lib/api/klun.ts` types —
215
+ CRUD pages really mutate (注册/同步集群, 封锁节点, 伸缩副本, 添加解析, 签发证书…),
216
+ read-only pages (网络/存储/配置) show live-looking state.
217
+ - **The port now covers every klun-web menu entry** — 31/31 entries plus klun-ui's own
218
+ 字典管理 · 工作流设计器: 控制台/概览 · 收件箱, 运维/资产管理 · 审计日志 · 会话审计,
219
+ 服务与监控/应用清单 · 域名探活 · 接口监控 · 告警 · 告警规则, 容器管理/集群 · 节点 ·
220
+ 命名空间 · 工作负载 · 网络 · 存储 · 配置 · 诊断, 云服务/Cloudflare 账号 · DNS 解析 ·
221
+ 站点设置 · 证书 · Google 账号 · 云盘, 团队/用户管理 · 角色管理 · 部门管理,
222
+ 系统/版本发布 · 配置中心 · 设置 · 菜单管理 · 字典管理 · 工作流设计器.
223
+ The system pages keep their real behaviour: 版本发布 knows the "latest" rule (highest
224
+ `active` version per app), warns before disabling/revoking and shows a version's
225
+ artifacts with their sha256; 配置中心 never echoes secret values (it shows
226
+ 「已配置(不回显)」 and treats an empty secret value as "keep the stored one"); 设置
227
+ renders appearance changes on a real preview element (`data-theme` / `data-density` /
228
+ `data-radius` on the preview card) and walks through MFA enrolment, recovery-code
229
+ rotation and per-device session revocation; 收件箱 marks a message read when its detail
230
+ opens, and can send to everyone or to picked members.
231
+ - The remaining non-menu klun-web screens (登录 / 403 / 404 / CLI 授权 / 终端) are not
232
+ ported — they sit outside the console's navigation.
233
+ - **Shared console pieces** instead of per-page styling: `ScuiPage` (the five-slot
234
+ skeleton — head / stat cards / toolbar / body / pager, each slot opt-in) with
235
+ `ScuiStat` + `ScuiPager`, `containerModel.tsx` (the cross-cluster dataset, a
236
+ `ScuiScopeBar` cluster+namespace scope bar with `hideNamespace` for cluster-scoped
237
+ resources, and `ScuiFailedBanner` for "some clusters could not be read" with the
238
+ real error text), `cloudModel.tsx` (Cloudflare + Google dataset, a `ScuiCloudBar`
239
+ account/zone scope bar, `formatSize`, `driveIcon`) and `consoleFormat.ts`. New `kk`
240
+ blocks back them: `.kk-scope(--field/--refresh/--hint)`, `.kk-banner`, `.kk-summary`,
241
+ `.kk-message`, `.kk-textarea--mono`, `.kk-tip--block`.
242
+ - The Cloudflare / Google flows keep their real shape: the account pages open the
243
+ authorization window and only write the account back once it returns; 站点设置 renders
244
+ the editor that matches each setting's value type (switch / number / enum / string /
245
+ read-only JSON) and tracks unsaved drafts; 证书 issues Origin CA certificates whose
246
+ private key is shown exactly once; 云盘 keeps a breadcrumb path stack and can search
247
+ across folders.
248
+ - Two console fixes found by porting: `.kk-node-do` (the row action group) is
249
+ hidden until its `.kk-node` row is hovered — right for tree rows, invisible for
250
+ table rows, so `.kk-table .kk-node-do` is now always shown; and Remix font icons
251
+ inherit the row's `line-height` (56px menu rows) which draws the glyph below the
252
+ baseline — every `i.ri-*` inside `[data-mode="kk"]` is normalised to
253
+ `line-height: 1` + inline-flex centring.
254
+ - **`Sidebar`** — two-level navigation ported 1:1 from the “Minimalist sidebar”
255
+ Figma Make community file: a 64px icon rail (brand slot, nav items, foot items,
256
+ avatar) beside a 320px detail panel that collapses to the rail width with the
257
+ original soft-spring animation (500ms, `cubic-bezier(0.25, 1.1, 0.4, 1)`;
258
+ override `--klun-sidebar-ease` for the stock klun curve). Data-driven
259
+ (`navItems` / `footNavItems` / `sections`, icons as `ReactNode`), controlled or
260
+ uncontrolled rail selection and collapse, expandable rows, optional search.
261
+ Geometry matches the source (40px rows, 16px shell / 8px row radii, 36px nested
262
+ indent); colours ride the klun semantic tokens, so it re-themes in light/dark —
263
+ dark lands on the original near-black surfaces. The story ships the full
264
+ eight-section demo data set from the community file.
265
+ - **Multica UI migration** — ten components ported from the Multica UI
266
+ (`packages/ui`) into the klun class + token architecture, dependency-free:
267
+ `ActorAvatar` (member / agent / squad / system + `emoji:` avatars),
268
+ `ReactionBar` (+ `groupReactions`), `EmojiPicker` / `QuickEmojiPicker` (built-in
269
+ trimmed emoji-mart dataset, grouped and searchable), `ShimmerText`,
270
+ `UnicodeSpinner` (18 braille/unicode frame sets), `BorderBeam`,
271
+ `NumberFlow` (+ currency / compact / capped variants — a rolling-digit
272
+ implementation, no `@number-flow` dependency), `DotSphere` (canvas),
273
+ `ListGrid` (subgrid list with sortable headers) and `CapabilityBanner`.
274
+ Colours ride the klun tokens (light/dark); geometry, copy and animations
275
+ follow the originals (border beam tinted to the theme accent).
276
+ - **Multica UI migration, part two** — six more components ported from the Multica
277
+ UI, again dependency-free: `Toggle` (pressed button, default / outline, three
278
+ sizes), `HoverCard` (hover/focus popover with open+close delays, four sides,
279
+ controlled or not, click-through inside the panel), `InputGroup` (+ `Input` /
280
+ `Addon` / `Text` / `Button` — inline or block affixes, click-to-focus, four
281
+ button sizes), `Field` (+ `FieldGroup` / `FieldContent` / `FieldLabel` /
282
+ `FieldTitle` / `FieldDescription` / `FieldError` — vertical or horizontal
283
+ forms, `invalid` sets `role="alert"` errors in red), `Item` (+ `ItemGroup` /
284
+ `ItemSeparator` / `ItemMedia` / `ItemContent` / `ItemTitle` / `ItemDescription` /
285
+ `ItemActions` / `ItemHeader` / `ItemFooter` — list rows with icon or image
286
+ media) and `Stepper` (+ `StepperNav` / `StepperItem` / `StepperTrigger` /
287
+ `StepperIndicator` / `StepperSeparator` / `StepperTitle` / `StepperDescription` /
288
+ `StepperPanel` / `StepperContent` — tab-style steps, horizontal or vertical,
289
+ completed / loading states, arrow-key navigation).
290
+ - **Multica UI migration, part three — from `packages/views`** — the product
291
+ layer of the Multica repo was swept for library-grade pieces; two made the
292
+ cut (the rest are page logic tied to their router / data layer):
293
+ `ActivityHeatmap` (zero-dependency GitHub-style calendar heatmap on a plain
294
+ `date -> value` map — quartile colour ramp riding the theme accent, month /
295
+ weekday labels via `Intl`, plus pure `buildHeatmapGrid()` / `summarizeHeatmap()`
296
+ helpers for custom insights panels) and `NavigationProgress` (2px
297
+ indeterminate top progress bar for route transitions — `active`-driven,
298
+ `position: fixed | absolute`, sweep mounted only while visible,
299
+ `prefers-reduced-motion` aware).
9
300
 
10
301
  ## [0.4.1] — 2026-09-17
11
302
 
package/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # klun-ui
2
2
 
3
+ ## Klun Design Standard
4
+
5
+ KDS `1.0.0-draft.1` is a proposed design, component, interaction and quality standard. It does not mean the current library already complies; adoption and implementation require the documented review and migration process.
6
+
7
+ The standard lives in the repository at `docs/design-standards/` (start with `README.md`, full text in `COMPLETE.md`, upgrade work packages in `UPGRADE-PLAN.md`). It is **not** included in the published npm tarball — `package.json` `files` ships only `dist`, `README.md`, `CHANGELOG.md` and `LICENSE`. Whether the KDS should be published (and how, given `docs/design-standards/references/` contains large HTML snapshots) is tracked as U23 in the upgrade plan.
8
+
3
9
  [![npm version](https://img.shields.io/npm/v/klun-ui)](https://www.npmjs.com/package/klun-ui)
4
10
  [![license](https://img.shields.io/npm/l/klun-ui)](./LICENSE)
5
11
  [![types included](https://img.shields.io/npm/types/klun-ui)](https://www.npmjs.com/package/klun-ui)
@@ -96,12 +102,12 @@ For extra-fine control, the button family adds a `size="tiny"` tier (28px, icon-
96
102
 
97
103
  | Group | Components |
98
104
  |---|---|
99
- | **Buttons** | Button (kinds: default / fancy / compact / link), ButtonGroup, CopyButton |
100
- | **Forms** | AutoComplete, Cascader, CharacterCounter, Checkbox, CheckboxGroup, CheckboxCard, ColorDot, ColorPicker, ColorSlider, CompactSelect, CompactSelectForInput, CounterInput, CronEditor, DatePicker, DateRangePicker, DateTimePicker, DigitInput, FileUpload, Form (+ FormItem, FormList, useForm), Hint, ImageUpload, InlineInput, InlineSelect, Input, Label, PasswordStrength, Radio, RadioCard, RangeSlider, RichEditor, RichEditorToolbar, Select, SelectMenu, Slider, Switch, Textarea, TimePicker |
101
- | **Data display** | Avatar, AvatarGroup, Badge, BulkActionBar (+ BulkAction), Carousel, ChartLegend, ChartTooltip, Chip, CodeViewer (+ LogViewer), ContentLabel, CrossRefBadge, Descriptions, DiffViewer, Kbd, Kanban, KeyIcon, List (+ ListItem), Markdown, Money, Rating, RelativeTime (+ ExpiryCountdown), StatCard, Statistic, StatusBadge, StatusDot (+ LiveDot), Table, Tag, Timeline, Tooltip, Tree, VirtualTable |
102
- | **Feedback** | Alert, Banner, CircularProgress, EmptyState, GaugeBar, Message (useMessage), Notification (useNotification), ProgressBar, Result, SegmentedProgress, Skeleton, Spinner, Toast, Toaster (+ toast) |
103
- | **Navigation** | Breadcrumb, Divider, HorizontalFilter, Menu, PageHeader, Pagination, SegmentedControl, StepIndicator, Tabs, Wizard |
104
- | **Overlays** | CommandMenu, Confirm, ContextMenu, Drawer, Dropdown, ImageViewer, Modal, Popconfirm, Popover |
105
+ | **Buttons** | Button (kinds: default / fancy / compact / link), ButtonGroup, CopyButton, Toggle |
106
+ | **Forms** | AutoComplete, Cascader, CharacterCounter, Checkbox, CheckboxGroup, CheckboxCard, ColorDot, ColorPicker, ColorSlider, CompactSelect, CompactSelectForInput, CounterInput, CronEditor, DatePicker, DateRangePicker, DateTimePicker, DigitInput, EmojiPicker, Field (+ FieldGroup / FieldContent / FieldLabel / FieldTitle / FieldDescription / FieldError), FileUpload, Form (+ FormItem, FormList, useForm), Hint, ImageUpload, InlineInput, InlineSelect, Input, InputGroup (+ Input / Addon / Text / Button), Label, PasswordStrength, QuickEmojiPicker, Radio, RadioCard, RangeSlider, RichEditor, RichEditorToolbar, Select, SelectMenu, Slider, Switch, Textarea, TimePicker |
107
+ | **Data display** | ActivityHeatmap, ActorAvatar, Avatar, AvatarGroup, Badge, BulkActionBar (+ BulkAction), Carousel, ChartLegend, ChartTooltip, Chip, CodeViewer (+ LogViewer), ContentLabel, CrossRefBadge, Descriptions, DiffViewer, Item (+ ItemGroup / ItemSeparator / ItemMedia / ItemContent / ItemTitle / ItemDescription / ItemActions), Kbd, Kanban, KeyIcon, List (+ ListItem), ListGrid, Markdown, Money, NumberFlow (+ Currency / Compact / Capped), Rating, ReactionBar, RelativeTime (+ ExpiryCountdown), ShimmerText, StatCard, Statistic, StatusBadge, StatusDot (+ LiveDot), Table, Tag, Timeline, Tooltip, Tree, VirtualTable |
108
+ | **Feedback** | Alert, Banner, BorderBeam, CapabilityBanner, CircularProgress, DotSphere, EmptyState, GaugeBar, Message (useMessage), NavigationProgress, Notification (useNotification), ProgressBar, Result, SegmentedProgress, Skeleton, Spinner, Toast, Toaster (+ toast), UnicodeSpinner |
109
+ | **Navigation** | Breadcrumb, Divider, HorizontalFilter, Menu, PageHeader, Pagination, SegmentedControl, Sidebar, StepIndicator, Stepper (+ StepperNav / StepperItem / StepperTrigger / StepperIndicator / StepperSeparator / StepperPanel / StepperContent), Tabs, Wizard |
110
+ | **Overlays** | CommandMenu, Confirm, ContextMenu, Drawer, Dropdown, HoverCard (+ HoverCardTrigger / HoverCardContent), ImageViewer, Modal, Popconfirm, Popover |
105
111
  | **Disclosure** | Accordion, Collapse |
106
112
  | **Layout** | Card, Flex, Grid (Row / Col / useBreakpoint), Layout (+ Header / Content / Footer / Sider), Masonry, Space, Splitter (+ SplitterPanel) |
107
113
  | **Config** | ConfigProvider (theme / accent / radius / size / locale / dir), 17 locale dictionaries, Format utils |