@kungal/ui-core 2.57.0 → 2.58.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 +25 -0
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/locale/en.cjs +3 -1
- package/dist/locale/en.cjs.map +1 -1
- package/dist/locale/en.d.cts +1 -1
- package/dist/locale/en.d.ts +1 -1
- package/dist/locale/en.js +3 -1
- package/dist/locale/en.js.map +1 -1
- package/dist/{types-BRxje_HR.d.cts → types-BpQaxyFb.d.cts} +3 -1
- package/dist/{types-BRxje_HR.d.ts → types-BpQaxyFb.d.ts} +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @kungal/ui-core
|
|
2
2
|
|
|
3
|
+
## 2.58.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 81b3b71: New `KunCommandSearch`: a search field that stays in the top bar and opens KunCommandPalette's results in a panel under it. This is the top-bar search of Slack, Teams, GitHub, Jira and Steam. The kungal desktop app asked for it, and it was faking one with KunAutocomplete.
|
|
8
|
+
|
|
9
|
+
- **Same content as the palette.** It takes the same `items` (flat or `KunCommandGroup[]`), `v-model:query`, `loading` and `highlight`, and renders the same rows: icon, section, label, description, match highlight, and the `#item` slot. Like the palette it does no searching: you compute `items` from the query and own the debounce.
|
|
10
|
+
- **Opens on focus.** With an empty field it shows whatever `items` you pass, so recent searches go there. It opens nothing when there is nothing to show (no rows and no `#empty` slot), and `aria-expanded` follows what is on screen. Clearing the field keeps it open.
|
|
11
|
+
- **Enter goes to the search page.** Unlike the palette, nothing is highlighted until an arrow key moves onto a row. Enter after typing emits `@submit(query)`; Enter on a highlighted row, or a click, emits `@select(item)`. The arrow keys cycle through "nothing highlighted", as a browser's address bar does. Every documented desktop app we checked behaves this way; none picks the first suggestion on Enter.
|
|
12
|
+
- **Escape:** the first press closes the panel and keeps the text, the second clears the text. Tab, a click outside, selecting and submitting all close it. Focus never leaves the field: the panel is a listbox driven by `aria-activedescendant`, its options are out of the tab order, and there is no dialog, backdrop, scroll lock or focus trap.
|
|
13
|
+
- **Size:** the panel is left-aligned 4px under the field, as wide as the field but at least 360px, capped to the viewport. Its height is the smaller of `maxHeight` (default 420) and the room below. `loading` turns the field's search icon into a spinner. Rows already on screen stay until new ones arrive, so the list does not blink on every keystroke.
|
|
14
|
+
- **Shortcut:** ⌘K / Ctrl+K focuses the field. A field that is not on screen, or sits behind a modal, ignores the shortcut and leaves it to a KunCommandPalette on the same page. That is the narrow-screen recipe: show the field from `md` up and the palette's icon button below it with breakpoint classes, both fed the same `query` and `items`. The component never switches layout from JavaScript, so the server renders the right one at every width.
|
|
15
|
+
|
|
16
|
+
**Changes to KunCommandPalette**, all additive:
|
|
17
|
+
|
|
18
|
+
- `KunCommandItem.removable` adds a remove button to a row (recent searches, say). Shift+Delete removes the highlighted row; both emit the new `@remove`, you drop the item from `items`, and the highlight stays on the row that takes its place.
|
|
19
|
+
- A labelled group is now `role="group"`, named by its heading. A group with no items is no longer rendered: it used to leave an orphan heading.
|
|
20
|
+
- The palette's ⌘K ignores a keystroke another handler already consumed, which is how a visible KunCommandSearch takes it first.
|
|
21
|
+
|
|
22
|
+
**KunModal and KunDrawer** no longer close on an Escape that a field inside them already used. A KunCommandSearch clearing its text and a KunChatComposer cancelling its reply bar each took the modal down on the same press.
|
|
23
|
+
|
|
24
|
+
Locale: `commandPalette.remove` and `commandPalette.clear` (zh-CN and en), shared by both components.
|
|
25
|
+
|
|
26
|
+
## 2.57.1
|
|
27
|
+
|
|
3
28
|
## 2.57.0
|
|
4
29
|
|
|
5
30
|
## 2.56.2
|
package/dist/index.cjs
CHANGED