@kungal/ui-core 1.6.0 → 1.6.2

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +360 -0
  2. package/package.json +2 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,360 @@
1
+ # @kungal/ui-core
2
+
3
+ ## 1.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 05f2bee: chore: ship CHANGELOG.md in the published packages
8
+
9
+ `CHANGELOG.md` is now included in each package's npm tarball (added to `files`),
10
+ so downstream can read the per-version changes straight from the npm package
11
+ page — not only from the GitHub repo. (Releases also now appear on GitHub
12
+ Releases and the docs site's auto-generated /changelog page.)
13
+
14
+ ## 1.6.1
15
+
16
+ ## 1.6.0
17
+
18
+ ## 1.5.0
19
+
20
+ ### Minor Changes
21
+
22
+ - 13005ea: fix(vue): legible foreground on solid/filled color variants (esp. dark mode)
23
+
24
+ Solid fills painted white text on `bg-{color}`, which has two problems verified
25
+ by contrast measurement:
26
+
27
+ 1. The dark color scale is inverted, so a plain `bg-{color}` renders **pale** in
28
+ dark mode — white text dropped to ~1.0–2.5:1 (the `solid` Info `info` callout
29
+ was essentially invisible, white on near-white).
30
+ 2. The light hues (secondary / success / warning / info) are light in **both**
31
+ modes, so white text fails WCAG everywhere (~2:1), not just in dark mode.
32
+
33
+ New single source of truth in `@kungal/ui-core` — `kunSolidClasses`,
34
+ `kunSolidBgClasses`, `kunSolidFgClasses` — pairs each fill with a `dark:bg-*`
35
+ pin (stays saturated in dark mode) and a contrast-correct foreground: the dark
36
+ hues (default / primary / danger) keep white, the light hues take dark text.
37
+ Every solid foreground now clears WCAG AA in both modes (≈4.1–10.3:1).
38
+
39
+ Applied to: Button / Chip (shared variant matrix), Info (`solid` / `shadow` — the
40
+ reported bug; its title no longer overrides the box foreground), Badge, Progress
41
+ (on-bar label), Tab (`solid` / `pills`), DatePicker (selected day), CheckBox
42
+ (checked fill + check/dash mark), Switch (on-track).
43
+
44
+ Visible change: `secondary` / `success` / `warning` / `info` solid components now
45
+ use dark text instead of (illegible) white.
46
+
47
+ ## 1.4.2
48
+
49
+ ## 1.4.1
50
+
51
+ ## 1.4.0
52
+
53
+ ## 1.3.0
54
+
55
+ ## 1.2.0
56
+
57
+ ## 1.1.1
58
+
59
+ ## 1.1.0
60
+
61
+ ## 1.0.0
62
+
63
+ ### Major Changes
64
+
65
+ - ac0bd4e: 1.0.0 — first stable release.
66
+
67
+ The component set (57 Vue components) and the design-token system are stable and
68
+ documented. Over the 0.14 → 0.22 line every cross-cutting surface was routed
69
+ through a single source of truth: borders (`--color-kun-border` / `border-kun`),
70
+ focus rings (`kunFocusRingClasses`), corner radius (`rounded-kun-*` /
71
+ `--kun-radius-scale`), elevation (`--shadow-kun-*`), motion (`--kun-dur-*` +
72
+ `duration-kun-*` + `ease-kun-*`), and sizing (`kunControlSize` /
73
+ `kunSelectionSize` / `kunChipSize`).
74
+
75
+ Also fixes a registration gap surfaced while completing the docs: `KunAutocomplete`,
76
+ `KunNumberInput`, and `KunPinInput` (added in 0.14.0) were never added to the Nuxt
77
+ layer's auto-import list, so Nuxt consumers hit "Failed to resolve component". They
78
+ now auto-import like every other component (plain-Vue `app.use(KunUI)` already
79
+ registered them). Their docs pages, prop tables, and `llms.txt` entries are added.
80
+
81
+ ## 0.22.4
82
+
83
+ ## 0.22.3
84
+
85
+ ## 0.22.2
86
+
87
+ ### Patch Changes
88
+
89
+ - 957cb52: fix(core): `shadow` button variant now actually casts its colored glow
90
+
91
+ The `shadow` variant set a shadow _color_ (`shadow-{color}/40`) but never a shadow
92
+ _size_, so `--tw-shadow` stayed empty and the button rendered with `box-shadow:
93
+ none` — it looked identical to `solid`. Added `shadow-lg` to every entry so the
94
+ geometry exists and the tint applies: each shadow button now floats with a soft
95
+ diffuse glow in its own color (the button's `overflow-hidden` doesn't clip an
96
+ outset box-shadow, so it shows in both themes).
97
+
98
+ ## 0.22.1
99
+
100
+ ### Patch Changes
101
+
102
+ - be17775: fix(core): consistent dark-mode fill for solid / shadow buttons
103
+
104
+ Filled (`solid` / `shadow`) buttons keep white text in both themes, but the dark
105
+ color scale is inverted — `bg-{color}` (a `-500`/`-600` step) renders _light_ in
106
+ dark mode, so the fills came out pale and at wildly different levels: `info`
107
+ ≈ L88% (near-white, white text barely legible), `default` ≈ L65%, `secondary`
108
+ ≈ L72%, and `success` disagreed between the two variants (solid pinned
109
+ `dark:bg-success-300` ≈ L35% while shadow used the un-pinned `bg-success-600`
110
+ ≈ L66%).
111
+
112
+ Each color now pins a `dark:bg-{color}-{n}` so every solid/shadow button lands at
113
+ a consistent ~L44–55% in dark mode (info/success/default → ~L44–46, the rest
114
+ ~L47–55) — one saturated tier with legible white text. Light mode is unchanged.
115
+
116
+ ## 0.22.0
117
+
118
+ ## 0.21.0
119
+
120
+ ### Minor Changes
121
+
122
+ - 3e841f0: feat: align form labels / error text and unify the chip-tag size scale
123
+
124
+ The core size system was already consistent (form controls share
125
+ `kunControlSizeClasses`, checkbox/radio share `kunSelectionSizeClasses`). The
126
+ drift was in the peripheral bits:
127
+
128
+ - **Form labels** now identical everywhere: `KunTextarea` and `KunDatePicker`
129
+ labels gained the `text-default-700` tint, and `KunDatePicker` dropped its odd
130
+ `mb-2` for the standard `mb-1`.
131
+ - **Error messages** now identical: `KunTextarea` switched from `text-danger-600`
132
+ (and a `<div>`) to the standard `text-danger` `<p>`; `KunDatePicker` and
133
+ `KunRadioGroup` dropped `mt-2` for `mt-1`.
134
+ - **Chip / tag size**: new `kunChipSizeClasses` in `@kungal/ui-core` is the single
135
+ source for chip/tag pills. `KunChip` and the tags inside `KunTagInput` now share
136
+ it (and the pill `rounded-full` shape), so a tag looks identical to a standalone
137
+ `<KunChip>` of the same size instead of being a one-off smaller rounded-rect.
138
+
139
+ Tab keeps its intentionally-compact tab scale; Switch/Slider keep their
140
+ dimension-specific scales.
141
+
142
+ ## 0.20.0
143
+
144
+ ## 0.19.1
145
+
146
+ ## 0.19.0
147
+
148
+ ### Minor Changes
149
+
150
+ - d8e7e76: feat: KunTab `align` prop + one unified focus ring across every control
151
+
152
+ **KunTab `align`** — new `align?: 'start' | 'center' | 'end'` (default `'center'`)
153
+ controls how each tab's content sits inside its box. Mainly for vertical /
154
+ full-width tabs, where the box is wider than its label.
155
+
156
+ **Unified focus ring** — focus indication was a mess: `:focus` vs `:focus-within`
157
+ vs `:focus-visible`, ring widths `1`/`2`/`4`, opacities `/25`/`/40`/`/50`/full,
158
+ some controls dropped their border to fake a ring (a jarring jump), and Button /
159
+ CheckBox had **no** focus ring at all. Everything now routes through one recipe:
160
+
161
+ - New `kunFocusRingClasses` (direct controls) and `kunFocusRingWithinClasses`
162
+ (composite wrappers) in `@kungal/ui-core`. One recipe: keyboard-only
163
+ (`focus-visible`; text fields still show it on click), a flush **2px** ring in
164
+ the control's semantic color at **/50**, no border-transparent jump.
165
+ - Migrated Input, Textarea, Select, Autocomplete, NumberInput, DatePicker,
166
+ PinInput, TagInput, Pagination, RadioGroup, **Button** (offset ring, added) and
167
+ **CheckBox** (added) onto it. Composite widgets (NumberInput / TagInput) ring
168
+ the wrapper via `focus-within` and the inner `<input>` has no ring of its own,
169
+ so there's exactly one indicator.
170
+ - Invalid controls turn the ring **danger** (same mechanism, swapped color).
171
+ - **Deprecated:** `kunRingClasses` (mixed `:focus`/`:focus-within`, off-opacity).
172
+ Use `kunFocusRingClasses` / `kunFocusRingWithinClasses`.
173
+
174
+ No prop/API removals — purely additive plus a visual refinement of focus states.
175
+
176
+ ## 0.18.1
177
+
178
+ ## 0.18.0
179
+
180
+ ## 0.17.2
181
+
182
+ ## 0.17.1
183
+
184
+ ## 0.17.0
185
+
186
+ ## 0.16.0
187
+
188
+ ## 0.15.0
189
+
190
+ ## 0.14.0
191
+
192
+ ### Minor Changes
193
+
194
+ - cd404aa: 表单 / 输入控件第一批升级:对标 HeroUI / Mantine / Ant Design / PrimeVue / Naive,补齐 API 完备性、一致性与高级控件。
195
+
196
+ 新增组件
197
+
198
+ - **KunNumberInput** —— 数字步进输入:`min`/`max`/`step`/`precision` 钳制与四舍五入、−/+ 步进按钮(到边界自动禁用)、`ArrowUp/Down`·`PageUp/Down` 键盘、`role="spinbutton"` 无障碍、`name` 原生表单收集。
199
+ - **KunPinInput** —— OTP / 验证码分段输入:`length`、`type`(numeric/text)、`mask`、自动前进/退格回退、粘贴自动分发、方向键、`complete` 事件、`autocomplete="one-time-code"`。
200
+ - **KunAutocomplete** —— 组合框(combobox):文本输入 + 建议列表,客户端过滤或 `manualFilter` + `@search`(远程),`allowCustomValue`、`clearable`、键盘导航、`aria-autocomplete`。
201
+
202
+ 升级
203
+
204
+ - **KunSelect** —— 补齐键盘可达性(P0):方向键 / Enter / Space / Esc / Home / End / 首字母 type-ahead + `aria-activedescendant`,禁用项自动跳过;新增 `searchable`(列表内过滤)、`multiple`(可移除 chips)、`clearable`、`description`、`name`(隐藏域)、选项 `disabled`。
205
+ - **KunSlider** —— 默认 `min`/`max` 由 17–77 改为 **0–100**;修复 `reactive(props)` 拷贝导致改 prop 不更新的响应式缺陷;新增 `disabled`、`label`/`ariaLabel`、`error`/`description`、`color`、`marks`、值气泡 `showTooltip`、`showValue`、`formatValue`、`change` 事件。
206
+ - **KunCheckBox** —— 新增 `indeterminate`(三态,用于全选)+ `error`/`description`。
207
+ - **KunInput** —— 新增 `isClearable`、`revealPassword`(密码可见性切换)、`isInvalid` + `aria-invalid`/`aria-describedby`。
208
+ - **KunSwitch** —— 新增 `error`/`description`。
209
+
210
+ 统一
211
+
212
+ - 辅助文案统一为 `description`(对齐 HeroUI / React-Aria);`helperText`(Input/TagInput)与 `hint`(Textarea/FileInput/Upload)保留为 **已弃用别名**,仍可用,内部回退到 `description`。
213
+
214
+ Breaking(0.x minor)
215
+
216
+ - `KunSlider` 默认 `min`/`max` 改为 0–100(此前 17–77):依赖旧默认值的调用需显式传入。
217
+ - `KunSelect` 的 v-model 类型放宽为 `T | T[] | null`(支持 `multiple` 与清除);单选用法不受运行时影响,仅 TS 类型变宽。
218
+
219
+ 新增打包图标(构建期内联,运行时零请求):`lucide:minus`、`eye`、`eye-off`、`search`。
220
+
221
+ ## 0.13.0
222
+
223
+ ## 0.12.0
224
+
225
+ ## 0.11.0
226
+
227
+ ## 0.10.0
228
+
229
+ ## 0.9.0
230
+
231
+ ## 0.8.0
232
+
233
+ ### Minor Changes
234
+
235
+ - 7624924: Extend the unified size system to the non-text controls.
236
+
237
+ The first sizing pass only covered text controls (button/input/select/…). This
238
+ brings the selection + display controls onto the same coherent system, grounded
239
+ in how HeroUI / PrimeVue / Naive UI / Mantine / Ant size them.
240
+
241
+ - **New shared selection scale (`kunSelectionSizeClasses`, @kungal/ui-core)** —
242
+ KunCheckBox and KunRadioGroup now use **identical** box sizes (every major
243
+ library does this), so a checkbox and a radio of the same size match. Box px by
244
+ size: 12 / 14 / 16 / 20 / 24 — ≈ 0.5× the text-control height and ≈ 1.2–1.4× the
245
+ label font, so the box sits optically level with its label.
246
+ - **KunCheckBox gains a `size` prop** (`xs`–`xl`, default `md`). It was hardcoded
247
+ at 20px while its sibling KunRadioGroup scaled 12→24 — now they share one scale
248
+ (md box is 16px). The check glyph and label scale with it.
249
+ - **KunSwitch gains a `size` prop.** Track/thumb scale on clean steps (track
250
+ 28×16 → 64×32, thumb = track height − 4); `md` is the original switch size.
251
+ - **KunSlider gains a `size` prop.** Track 4→12px, thumb 14→28px; `md` unchanged.
252
+ - **KunChip** moved onto its proper compact sub-scale (≈ 0.7× the button height at
253
+ the same keyword — a tag is text + tight padding, not a tap target); its `md`/
254
+ `lg`/`xl` vertical padding is slightly tighter so chips no longer read as tall
255
+ as buttons.
256
+
257
+ Components sized by their content/padding rather than a height (KunTooltip,
258
+ KunDropdown/KunContextMenu menus, KunPopover, KunInfo) intentionally keep no
259
+ `size` prop — no surveyed library gives them one.
260
+
261
+ ## 0.7.0
262
+
263
+ ### Minor Changes
264
+
265
+ - 29a39a7: Unify form-control sizing on one shared scale, and fix the `lg`/`xl` button
266
+ proportions.
267
+
268
+ - **New `kunControlSizeClasses` (@kungal/ui-core)** — a single source of truth for
269
+ the per-size font + padding of every text-like form control. Padding-driven,
270
+ `md` (~38px) as the anchor, `px:py` a clean 2:1, horizontal padding growing
271
+ faster than vertical so a bigger control gets wider, not flatter.
272
+ - **KunButton `lg`/`xl` fixed** — `lg` was `px-6 py-2` (3:1) and `xl` was
273
+ `px-8 py-2.5` (3.2:1, a wide flat bar). They're now `px-5 py-2.5` and
274
+ `px-6 py-3` (both 2:1), so large buttons look proportional. `md` is unchanged.
275
+ - **One scale across controls** — KunButton, KunInput, KunSelect, KunDatePicker,
276
+ KunTextarea and KunTagInput all consume the shared scale, so a button, input,
277
+ select and date-picker of the same size line up at the same height in a row
278
+ (md = 38px).
279
+ - **KunSelect / KunDatePicker / KunTextarea gain a `size` prop** (`xs`–`xl`,
280
+ default `md`). Previously they had no size and were locked one notch tighter
281
+ than buttons (`px-3` / `p-3`); their default horizontal padding is now `px-4`,
282
+ matching KunButton/KunInput `md`.
283
+
284
+ Pill/compact display components (KunChip, KunBadge, KunAvatar) are intentionally
285
+ not part of this form-control scale and keep their compact sizing.
286
+
287
+ ## 0.6.2
288
+
289
+ ## 0.6.1
290
+
291
+ ## 0.6.0
292
+
293
+ ## 0.5.2
294
+
295
+ ## 0.5.1
296
+
297
+ ## 0.5.0
298
+
299
+ ## 0.4.1
300
+
301
+ ## 0.4.0
302
+
303
+ ## 0.3.4
304
+
305
+ ## 0.3.3
306
+
307
+ ## 0.3.2
308
+
309
+ ## 0.3.1
310
+
311
+ ## 0.3.0
312
+
313
+ ### Minor Changes
314
+
315
+ - 9b8cbae: Remove the `faded` variant.
316
+
317
+ `faded` (tinted fill + border) was visually almost indistinguishable from
318
+ `ghost`, so it's been dropped from `KunUIVariant`. This affects every variant
319
+ consumer — `KunButton`, `KunChip`, `KunDropdown` and `KunInfo`.
320
+
321
+ **Migration:** replace `variant="faded"` with `variant="flat"` (tinted fill, no
322
+ border) or `variant="bordered"` (visible colored border); `ghost` stays for the
323
+ outline look it overlapped with.
324
+
325
+ ## 0.2.5
326
+
327
+ ## 0.2.4
328
+
329
+ ### Patch Changes
330
+
331
+ - 0ec98f9: Fix invisible outline variants (`bordered` / `faded` / `ghost`) and the
332
+ off-center checkbox check.
333
+
334
+ - **Variant table**: entries set `border-{color}` but never a border _width_ —
335
+ which paints nothing in Tailwind v4, so `bordered` / `faded` / `ghost` showed
336
+ no border on KunButton, KunChip and KunDropdown. Every variant now carries an
337
+ explicit `border` width (transparent on `solid` / `light` / `flat` / `shadow`
338
+ so box sizes stay uniform when switching variants), so the outline variants
339
+ render again.
340
+ - **KunCheckBox**: the checkmark was a full-size (1em) icon nudged down by its
341
+ baseline offset, so it sat off-center and cramped the 20px box edge-to-edge.
342
+ It's now an explicitly-sized 14px check centered with flexbox.
343
+
344
+ ## 0.2.3
345
+
346
+ ## 0.2.2
347
+
348
+ ## 0.2.1
349
+
350
+ ## 0.2.0
351
+
352
+ ### Minor Changes
353
+
354
+ - 35358f2: Settle on the `@kungal/ui-*` package namespace; the four packages are versioned and released together.
355
+
356
+ ## 0.1.1
357
+
358
+ ### Patch Changes
359
+
360
+ - c532a02: Add npm `keywords` to every package for better discoverability on the npm registry.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-core",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "KunUI framework-agnostic core — design types, cn(), variant matrix, radius system, utils. No Vue/React.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -25,6 +25,7 @@
25
25
  },
26
26
  "sideEffects": false,
27
27
  "files": [
28
+ "CHANGELOG.md",
28
29
  "dist"
29
30
  ],
30
31
  "main": "./dist/index.cjs",