@xleddyl/443-components-vue 0.16.33 → 0.16.35
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/CATALOG.md +1 -1
- package/README.md +1 -1
- package/dist/components/overlays/CommandPalette.vue +10 -0
- package/dist/components/overlays/types.d.ts +7 -1
- package/dist/grid/DataGrid.vue +1 -7
- package/dist/grid/data-grid.css +5 -1
- package/dist/locale/de.mjs +0 -1
- package/dist/locale/en.mjs +0 -1
- package/dist/locale/it.mjs +0 -1
- package/dist/locale/types.d.ts +0 -1
- package/dist/styles/overlays/command.css +4 -0
- package/package.json +1 -1
package/CATALOG.md
CHANGED
|
@@ -201,7 +201,7 @@ Mount `OverlayHost` once for the imperative hooks (see [Composables](#composable
|
|
|
201
201
|
| `Popover` | Floating panel with any content (a form, filters) opened by its trigger. Use `DropdownMenu` for a list of actions. | Model: `v-model:open`. Props: `placement`, `offset`, `arrow`, `label`, `initialFocus`. Slots: default (the trigger), `content`. | `overlays/popover.vue` |
|
|
202
202
|
| `HoverCard` | Rich preview on hover or focus (user card, link preview). Use `Tooltip` for plain text. | Model: `v-model:open`. Props: `placement`, `openDelay`, `closeDelay`, `arrow`, `disabled`. Slots: default (trigger), `content`. | `overlays/hover-card.vue` |
|
|
203
203
|
| `Tooltip` | Short text on hover or focus. Optional shortcut. | Props: `text`, `placement`, `openDelay`, `closeDelay`, `arrow`, `shortcut`, `disabled`. Slots: default (trigger), `content`. | `overlays/tooltip.vue` |
|
|
204
|
-
| `CommandPalette` | Search and command dialog (Cmd+K) with groups, recent items, async search and typed item data. Groups take `icon` (default item icon) and `more` (a last "show all" item). Matching (`matchesSearch`, exported) finds every word in any order, without case or accents. | Models: `v-model:open`, `v-model:query`. Props: `groups` (items with `id`, `label`, `description`, `icon`, `shortcut`, `keywords`, `to`, `data`, `onSelect`), `search(query, signal)`, `shortcut`, `trigger`, `recentKey`, `emptyText`, `notice`. Slots: `item`, `empty`, `group-label`, `after-results`. Events: `select`, `open`, `close`.
|
|
204
|
+
| `CommandPalette` | Search and command dialog (Cmd+K) with groups, recent items, async search and typed item data. Groups take `icon` (default item icon) and `more` (a last "show all" item). Matching (`matchesSearch`, exported) finds every word in any order, without case or accents. | Models: `v-model:open`, `v-model:query`. Props: `groups` (items with `id`, `label`, `description`, `icon`, `badge`, `shortcut`, `keywords`, `to`, `data`, `onSelect`), `search(query, signal)`, `shortcut`, `trigger`, `recentKey`, `emptyText`, `notice`. Slots: `item`, `empty`, `group-label`, `after-results`. Events: `select`, `open`, `close`. | `overlays/command-palette.vue` |
|
|
205
205
|
| `CommandButton` | A `Button` made from a `CommandItem`: label, icon, `to`, `href`, `disabled` and `onSelect` come from the command. | Props: `command`, `label`, `icon`, and every `Button` prop (size, variant, tone). | `overlays/command-palette.vue` |
|
|
206
206
|
|
|
207
207
|
## Data
|
package/README.md
CHANGED
|
@@ -620,7 +620,7 @@ const archived = useRouteState('archived', {
|
|
|
620
620
|
- Pages that set `definePageMeta({ key: (route) => route.fullPath })` remount on every query change; keep the default page key for pages with deep links.
|
|
621
621
|
- To leave the page from inside an overlay, navigate (a link or `router.push`): the new route has no parameter, so the overlay closes. Do not set the ref to `undefined` and navigate in the same tick: the later navigation cancels the earlier one.
|
|
622
622
|
|
|
623
|
-
`CommandPalette`: items take typed `data` (`CommandItem<T>`, `CommandGroup<T>`), which reaches the `#item` slot and the `select` event typed; `emptyText` also takes `(query) => string`. Groups take a `description` (shown after the label), the `#group-label` slot (`{ group, label, description, recent }`) replaces the label, and `notice` or the `#after-results` slot (`{ query, count }`) adds a line under the results, for example "Showing the first results".
|
|
623
|
+
`CommandPalette`: an item takes a `badge` (a label, or `{ label, tone, color }`), shown before its shortcut. Recent items do not keep the badge, because it can change. Items take typed `data` (`CommandItem<T>`, `CommandGroup<T>`), which reaches the `#item` slot and the `select` event typed; `emptyText` also takes `(query) => string`. Groups take a `description` (shown after the label), the `#group-label` slot (`{ group, label, description, recent }`) replaces the label, and `notice` or the `#after-results` slot (`{ query, count }`) adds a line under the results, for example "Showing the first results".
|
|
624
624
|
|
|
625
625
|
- `Brand`: `logo` takes an image URL, trusted inline SVG markup (`'<svg ...>'`) or a component; the `#logo` slot replaces the boxed mark; `show-name` keeps the name visible next to a logo.
|
|
626
626
|
- `Card`: `selected` gives a pressed look (`aria-pressed` on `as="button"`, `aria-selected` with `role="option"` and similar roles); `:animated="false"` turns off the entrance animation.
|
|
@@ -113,6 +113,12 @@
|
|
|
113
113
|
{{ entry.item.description }}
|
|
114
114
|
</span>
|
|
115
115
|
</span>
|
|
116
|
+
<Badge
|
|
117
|
+
v-if="entry.item.badge"
|
|
118
|
+
v-bind="badgeProps(entry.item.badge)"
|
|
119
|
+
size="sm"
|
|
120
|
+
class="k-command-option-badge"
|
|
121
|
+
/>
|
|
116
122
|
<span
|
|
117
123
|
v-if="entry.item.shortcut"
|
|
118
124
|
class="k-command-option-shortcut"
|
|
@@ -157,6 +163,7 @@ import { useRouterLike } from "../../internal/layout/route";
|
|
|
157
163
|
import { ButtonElement } from "../../internal/core/ButtonElement";
|
|
158
164
|
import LiveRegion from "../../internal/core/LiveRegion.vue";
|
|
159
165
|
import Icon from "../core/Icon.vue";
|
|
166
|
+
import Badge from "../data/Badge.vue";
|
|
160
167
|
import Kbd from "../core/Kbd.vue";
|
|
161
168
|
import Spinner from "../core/Spinner.vue";
|
|
162
169
|
import { provideFieldBoundary } from "../../composables/useFieldBoundary";
|
|
@@ -321,6 +328,9 @@ watch(active, (index) => {
|
|
|
321
328
|
if (option && bodyRef.value?.contains(option)) option.scrollIntoView({ block: "nearest" });
|
|
322
329
|
});
|
|
323
330
|
});
|
|
331
|
+
function badgeProps(badge) {
|
|
332
|
+
return typeof badge === "string" ? { label: badge } : badge;
|
|
333
|
+
}
|
|
324
334
|
function readRecent() {
|
|
325
335
|
if (!props.recentKey) return;
|
|
326
336
|
const stored = readStorageJson(props.recentKey);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LinkTarget, PaletteColor } from '../core/types';
|
|
1
|
+
import type { LinkTarget, PaletteColor, Tone } from '../core/types';
|
|
2
2
|
import type { IconName } from '../../composables/useIcons';
|
|
3
3
|
import type { AnchorTarget, Placement, Side, VirtualAnchor } from '../../internal/floating/position';
|
|
4
4
|
export type { AnchorTarget as OverlayAnchorTarget, Placement as OverlayPlacement, Side as OverlaySide, VirtualAnchor as OverlayVirtualAnchor, };
|
|
@@ -62,11 +62,17 @@ export interface MenuSeparator {
|
|
|
62
62
|
export type MenuItem = MenuActionItem | MenuCheckboxItem | MenuRadioItem;
|
|
63
63
|
export type MenuEntry = MenuItem | MenuLabel | MenuSeparator;
|
|
64
64
|
export type MenuItems = MenuEntry[] | MenuEntry[][];
|
|
65
|
+
export interface CommandItemBadge {
|
|
66
|
+
label: string;
|
|
67
|
+
tone?: Tone;
|
|
68
|
+
color?: PaletteColor;
|
|
69
|
+
}
|
|
65
70
|
export interface CommandItem<T = unknown> {
|
|
66
71
|
id: string;
|
|
67
72
|
label: string;
|
|
68
73
|
description?: string;
|
|
69
74
|
icon?: IconName;
|
|
75
|
+
badge?: string | CommandItemBadge;
|
|
70
76
|
shortcut?: string;
|
|
71
77
|
keywords?: string[];
|
|
72
78
|
to?: LinkTarget;
|
package/dist/grid/DataGrid.vue
CHANGED
|
@@ -108,13 +108,7 @@
|
|
|
108
108
|
:next-label="text.nextPage"
|
|
109
109
|
@update:page="goToPage"
|
|
110
110
|
@update:page-size="(size) => pageSize = size"
|
|
111
|
-
|
|
112
|
-
<template #summary="{ start, end, total }">
|
|
113
|
-
<span class="k-tabular">{{
|
|
114
|
-
formatLocaleMessage(locale.code, text.pageStatus, { from: start, to: end, total })
|
|
115
|
-
}}</span>
|
|
116
|
-
</template>
|
|
117
|
-
</Pagination>
|
|
111
|
+
/>
|
|
118
112
|
</div>
|
|
119
113
|
</div>
|
|
120
114
|
</template>
|
package/dist/grid/data-grid.css
CHANGED
package/dist/locale/de.mjs
CHANGED
|
@@ -92,7 +92,6 @@ export const de = {
|
|
|
92
92
|
rowsPerPage: "Zeilen pro Seite",
|
|
93
93
|
previousPage: "Vorherige Seite",
|
|
94
94
|
nextPage: "N\xE4chste Seite",
|
|
95
|
-
pageStatus: "{from}-{to} von {total}",
|
|
96
95
|
selected: "{count} ausgew\xE4hlt",
|
|
97
96
|
copied: "In die Zwischenablage kopiert",
|
|
98
97
|
yes: "Ja",
|
package/dist/locale/en.mjs
CHANGED
package/dist/locale/it.mjs
CHANGED
|
@@ -92,7 +92,6 @@ export const it = {
|
|
|
92
92
|
rowsPerPage: "Righe per pagina",
|
|
93
93
|
previousPage: "Pagina precedente",
|
|
94
94
|
nextPage: "Pagina successiva",
|
|
95
|
-
pageStatus: "{from}-{to} di {total}",
|
|
96
95
|
selected: "{count} selezionato | {count} selezionati",
|
|
97
96
|
copied: "Copiato negli appunti",
|
|
98
97
|
yes: "S\xEC",
|
package/dist/locale/types.d.ts
CHANGED
package/package.json
CHANGED