@xleddyl/443-components-vue 0.16.14 → 0.16.16

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 (59) hide show
  1. package/CATALOG.md +155 -144
  2. package/README.md +4 -0
  3. package/dist/components/core/index.d.ts +1 -0
  4. package/dist/components/core/index.mjs +1 -0
  5. package/dist/components/core/palette.d.ts +4 -0
  6. package/dist/components/core/palette.mjs +22 -0
  7. package/dist/components/core/types.d.ts +1 -0
  8. package/dist/components/data/Badge.vue +8 -1
  9. package/dist/components/data/Badge.vue.d.ts +2 -2
  10. package/dist/components/data/FilterPill.vue +8 -0
  11. package/dist/components/data/FilterPill.vue.d.ts +2 -2
  12. package/dist/components/data/FilterPills.vue +1 -0
  13. package/dist/components/data/RecordList.vue +55 -0
  14. package/dist/components/data/RecordList.vue.d.ts +237 -0
  15. package/dist/components/data/Tag.vue +3 -1
  16. package/dist/components/data/Tag.vue.d.ts +2 -2
  17. package/dist/components/data/index.d.ts +1 -0
  18. package/dist/components/data/index.mjs +1 -0
  19. package/dist/components/data/types.d.ts +11 -1
  20. package/dist/components/forms/Combobox.vue +31 -3
  21. package/dist/components/forms/Combobox.vue.d.ts +2 -0
  22. package/dist/components/forms/types.d.ts +2 -0
  23. package/dist/components/overlays/CommandButton.vue +21 -0
  24. package/dist/components/overlays/CommandButton.vue.d.ts +249 -0
  25. package/dist/components/overlays/CommandPalette.vue +13 -2
  26. package/dist/components/overlays/index.d.ts +2 -0
  27. package/dist/components/overlays/index.mjs +2 -0
  28. package/dist/components/overlays/types.d.ts +4 -0
  29. package/dist/components/templates/DashboardLayout.vue +22 -6
  30. package/dist/components/templates/DashboardLayout.vue.d.ts +1 -0
  31. package/dist/components/templates/FormDrawer.vue +59 -9
  32. package/dist/components/templates/FormDrawer.vue.d.ts +3 -1
  33. package/dist/components/templates/types.d.ts +4 -0
  34. package/dist/composables/layout.d.ts +1 -0
  35. package/dist/composables/layout.mjs +1 -0
  36. package/dist/composables/templates.d.ts +1 -0
  37. package/dist/composables/templates.mjs +1 -0
  38. package/dist/composables/useConfirm.d.ts +4 -1
  39. package/dist/composables/useConfirm.mjs +16 -2
  40. package/dist/composables/usePageCommands.d.ts +6 -0
  41. package/dist/composables/usePageCommands.mjs +9 -0
  42. package/dist/composables/useRouteRecord.d.ts +24 -0
  43. package/dist/composables/useRouteRecord.mjs +55 -0
  44. package/dist/grid/cells/BadgeCell.vue +27 -15
  45. package/dist/grid/data-grid.css +4 -0
  46. package/dist/grid/types.d.ts +5 -2
  47. package/dist/locale/de.mjs +1 -0
  48. package/dist/locale/en.mjs +1 -0
  49. package/dist/locale/it.mjs +1 -0
  50. package/dist/locale/types.d.ts +1 -0
  51. package/dist/styles/data/badge.css +5 -0
  52. package/dist/styles/data/filter-pills.css +8 -0
  53. package/dist/styles/data/record-list.css +57 -0
  54. package/dist/styles/data/tag.css +5 -0
  55. package/dist/styles/data.css +1 -0
  56. package/dist/styles/forms/combobox.css +27 -0
  57. package/dist/styles/tokens.css +12 -0
  58. package/dist/styles/utilities.css +55 -0
  59. package/package.json +1 -1
package/README.md CHANGED
@@ -576,6 +576,10 @@ const confirmDiscard = () => !dirty.value || confirm({ title: 'Discard changes?'
576
576
 
577
577
  ### Deep links
578
578
 
579
+ `useRouteRecord(key, options?)` is the record version of `useRouteState`. `#family/fam_1` opens a record and `#family/new` the create form (`newId`). Options: `find(id)` (gives `current`), `loaded` (while false, `loading` is true, so the drawer opens at once with its skeleton; when true and `find` gives nothing, the entry is removed), `canCreate`, `linkedKeys` (entries removed together with the record, such as a tab or a sub record). It returns `param`, `id`, `isNew`, `current`, `loading`, `open` (for `v-model:open`), `openRecord(id | null, linked?)`, `close()` and `replaceId(id, linked?)` (after a create). All the entries change in one navigation.
580
+
581
+ `usePageCommands(() => CommandItem[])` adds commands while the component is mounted. `DashboardLayout` shows the matching ones first, in the group "This page" (`searchPageLabel`), with every `search` mode. Return an empty list when a command does not apply. `CommandButton` renders a command as a `Button`, so a page header button and the palette share one definition.
582
+
579
583
  `useRouteState(key, options?)` binds a ref to one query parameter (or one hash entry) of the current URL, so any Drawer or Modal can be opened from a link, survives a reload and closes with the browser back button. It reads the router through `$router` (vue-router or Nuxt, no import of either); without a router it is a plain ref.
580
584
 
581
585
  ```ts
@@ -11,4 +11,5 @@ export { default as Root } from './Root.vue';
11
11
  export { default as Spinner } from './Spinner.vue';
12
12
  export { default as Textarea } from './Textarea.vue';
13
13
  export { default as VisuallyHidden } from './VisuallyHidden.vue';
14
+ export { PALETTE_COLORS, paletteClass, paletteColor } from './palette';
14
15
  export type * from './types';
@@ -11,3 +11,4 @@ export { default as Root } from "./Root.vue";
11
11
  export { default as Spinner } from "./Spinner.vue";
12
12
  export { default as Textarea } from "./Textarea.vue";
13
13
  export { default as VisuallyHidden } from "./VisuallyHidden.vue";
14
+ export { PALETTE_COLORS, paletteClass, paletteColor } from "./palette.mjs";
@@ -0,0 +1,4 @@
1
+ import type { PaletteColor } from './types';
2
+ export declare const PALETTE_COLORS: readonly ["blue", "green", "amber", "violet", "pink", "teal", "orange", "cyan", "indigo", "lime", "red", "slate"];
3
+ export declare function paletteColor(key: string): PaletteColor;
4
+ export declare function paletteClass(color: PaletteColor | undefined): string | undefined;
@@ -0,0 +1,22 @@
1
+ export const PALETTE_COLORS = [
2
+ "blue",
3
+ "green",
4
+ "amber",
5
+ "violet",
6
+ "pink",
7
+ "teal",
8
+ "orange",
9
+ "cyan",
10
+ "indigo",
11
+ "lime",
12
+ "red",
13
+ "slate"
14
+ ];
15
+ export function paletteColor(key) {
16
+ let hash = 0;
17
+ for (const char of key) hash = hash * 31 + char.codePointAt(0) >>> 0;
18
+ return PALETTE_COLORS[hash % PALETTE_COLORS.length];
19
+ }
20
+ export function paletteClass(color) {
21
+ return color ? `k-palette-${color}` : void 0;
22
+ }
@@ -1,5 +1,6 @@
1
1
  export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
2
2
  export type Tone = 'neutral' | 'accent' | 'info' | 'success' | 'warning' | 'danger';
3
+ export type PaletteColor = 'blue' | 'green' | 'amber' | 'violet' | 'pink' | 'teal' | 'orange' | 'cyan' | 'indigo' | 'lime' | 'red' | 'slate';
3
4
  export type ButtonVariant = 'solid' | 'soft' | 'subtle' | 'outline' | 'ghost' | 'link';
4
5
  export type FieldSize = 'sm' | 'md' | 'lg';
5
6
  export type LinkTarget = string | Record<string, unknown>;
@@ -1,7 +1,12 @@
1
1
  <template>
2
2
  <span
3
3
  class="k-badge"
4
- :class="[`k-badge-${tone}`, `k-badge-${variant}`, `k-badge-${size}`, { 'has-dot': dot }]"
4
+ :class="[
5
+ color ? ['k-badge-palette', paletteClass(color)] : `k-badge-${tone}`,
6
+ `k-badge-${variant}`,
7
+ `k-badge-${size}`,
8
+ { 'has-dot': dot }
9
+ ]"
5
10
  >
6
11
  <span v-if="dot" class="k-badge-dot" :class="{ 'is-pulse': pulse }" aria-hidden="true" />
7
12
  <Icon v-else-if="icon" :name="icon" />
@@ -11,9 +16,11 @@
11
16
 
12
17
  <script setup>
13
18
  import Icon from "../core/Icon.vue";
19
+ import { paletteClass } from "../core/palette";
14
20
  defineProps({
15
21
  label: { type: [String, Number], required: false },
16
22
  tone: { type: String, required: false, default: "neutral" },
23
+ color: { type: String, required: false },
17
24
  variant: { type: String, required: false, default: "soft" },
18
25
  size: { type: String, required: false, default: "md" },
19
26
  dot: { type: Boolean, required: false },
@@ -8,6 +8,7 @@ type __VLS_Slots = {} & {
8
8
  declare const __VLS_base: import("vue").DefineComponent<{
9
9
  label?: string | number;
10
10
  tone?: Tone;
11
+ color?: string | undefined;
11
12
  variant?: BadgeVariant;
12
13
  size?: BadgeSize;
13
14
  dot?: boolean;
@@ -45,7 +46,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
45
46
  autocapitalize?: string | undefined | undefined;
46
47
  autocorrect?: string | undefined | undefined;
47
48
  autosave?: string | undefined | undefined;
48
- color?: string | undefined | undefined;
49
49
  itemprop?: string | undefined | undefined;
50
50
  itemscope?: (boolean | "true" | "false") | undefined;
51
51
  itemtype?: string | undefined | undefined;
@@ -208,6 +208,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
208
208
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
209
209
  label?: string | number;
210
210
  tone?: Tone;
211
+ color?: string | undefined;
211
212
  variant?: BadgeVariant;
212
213
  size?: BadgeSize;
213
214
  dot?: boolean;
@@ -245,7 +246,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
245
246
  autocapitalize?: string | undefined | undefined;
246
247
  autocorrect?: string | undefined | undefined;
247
248
  autosave?: string | undefined | undefined;
248
- color?: string | undefined | undefined;
249
249
  itemprop?: string | undefined | undefined;
250
250
  itemscope?: (boolean | "true" | "false") | undefined;
251
251
  itemtype?: string | undefined | undefined;
@@ -10,6 +10,12 @@
10
10
  ><Icon name="check"
11
11
  /></span>
12
12
  <Icon v-if="icon" :name="icon" class="k-filter-pill-icon" />
13
+ <span
14
+ v-else-if="color"
15
+ class="k-filter-pill-dot"
16
+ :class="paletteClass(color)"
17
+ aria-hidden="true"
18
+ />
13
19
  <span class="k-filter-pill-label"
14
20
  ><slot>{{ label }}</slot></span
15
21
  >
@@ -21,10 +27,12 @@
21
27
 
22
28
  <script setup>
23
29
  import Icon from "../core/Icon.vue";
30
+ import { paletteClass } from "../core/palette";
24
31
  defineProps({
25
32
  label: { type: String, required: false },
26
33
  valueLabel: { type: String, required: false },
27
34
  icon: { type: null, required: false },
35
+ color: { type: String, required: false },
28
36
  count: { type: Number, required: false },
29
37
  active: { type: Boolean, required: false },
30
38
  pressed: { type: Boolean, required: false, default: void 0 },
@@ -7,6 +7,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
7
7
  label?: string;
8
8
  valueLabel?: string;
9
9
  icon?: IconName;
10
+ color?: string | undefined;
10
11
  count?: number;
11
12
  active?: boolean;
12
13
  pressed?: boolean;
@@ -57,7 +58,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
57
58
  autocapitalize?: string | undefined | undefined;
58
59
  autocorrect?: string | undefined | undefined;
59
60
  autosave?: string | undefined | undefined;
60
- color?: string | undefined | undefined;
61
61
  itemprop?: string | undefined | undefined;
62
62
  itemscope?: (boolean | "true" | "false") | undefined;
63
63
  itemtype?: string | undefined | undefined;
@@ -221,6 +221,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
221
221
  label?: string;
222
222
  valueLabel?: string;
223
223
  icon?: IconName;
224
+ color?: string | undefined;
224
225
  count?: number;
225
226
  active?: boolean;
226
227
  pressed?: boolean;
@@ -271,7 +272,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
271
272
  autocapitalize?: string | undefined | undefined;
272
273
  autocorrect?: string | undefined | undefined;
273
274
  autosave?: string | undefined | undefined;
274
- color?: string | undefined | undefined;
275
275
  itemprop?: string | undefined | undefined;
276
276
  itemscope?: (boolean | "true" | "false") | undefined;
277
277
  itemtype?: string | undefined | undefined;
@@ -141,6 +141,7 @@ function renderPill(value) {
141
141
  label: option.label,
142
142
  valueLabel: option.valueLabel,
143
143
  icon: option.icon,
144
+ color: option.color,
144
145
  count: option.count,
145
146
  size: props.size,
146
147
  disabled: Boolean(props.disabled || option.disabled)
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <SkeletonList v-if="loading" :rows="skeletonRows" :lines="2" :avatar="avatar" :action="action" />
3
+
4
+ <ul v-else-if="items.length" class="k-record-list" :aria-label="label">
5
+ <li v-for="item in items" :key="item.id" class="k-record-list-item">
6
+ <slot name="leading" :item="item" />
7
+ <div class="k-record-list-text">
8
+ <span class="k-record-list-title-row">
9
+ <span class="k-record-list-title">{{ item.title }}</span>
10
+ <Badge
11
+ v-if="item.badge"
12
+ :label="item.badge.label"
13
+ :tone="item.badge.tone ?? 'neutral'"
14
+ size="sm"
15
+ />
16
+ </span>
17
+ <span v-if="item.description" class="k-record-list-description">
18
+ {{ item.description }}
19
+ </span>
20
+ </div>
21
+ <slot name="action" :item="item" />
22
+ </li>
23
+ </ul>
24
+
25
+ <slot v-else name="empty">
26
+ <EmptyState
27
+ :icon="emptyIcon"
28
+ :title="emptyText ?? t('common.empty')"
29
+ :description="emptyDescription"
30
+ size="sm"
31
+ variant="plain"
32
+ :level="3"
33
+ />
34
+ </slot>
35
+ </template>
36
+
37
+ <script setup>
38
+ import { useLocale } from "../../composables/useLocale";
39
+ import EmptyState from "../feedback/EmptyState.vue";
40
+ import SkeletonList from "../feedback/SkeletonList.vue";
41
+ import Badge from "./Badge.vue";
42
+ defineProps({
43
+ items: { type: Array, required: true },
44
+ loading: { type: Boolean, required: false },
45
+ avatar: { type: Boolean, required: false },
46
+ action: { type: Boolean, required: false, default: true },
47
+ label: { type: String, required: false },
48
+ skeletonRows: { type: Number, required: false, default: 3 },
49
+ emptyText: { type: String, required: false },
50
+ emptyDescription: { type: String, required: false },
51
+ emptyIcon: { type: null, required: false }
52
+ });
53
+ defineSlots();
54
+ const { t } = useLocale();
55
+ </script>
@@ -0,0 +1,237 @@
1
+ import type { IconName } from '../../composables/useIcons';
2
+ import type { RecordListItem } from './types';
3
+ declare const __VLS_export: <Item extends RecordListItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<{
5
+ items: Item[];
6
+ loading?: boolean;
7
+ avatar?: boolean;
8
+ action?: boolean;
9
+ label?: string;
10
+ skeletonRows?: number;
11
+ emptyText?: string;
12
+ emptyDescription?: string;
13
+ emptyIcon?: IconName;
14
+ } & Partial<{
15
+ readonly rows?: number | undefined;
16
+ readonly lines?: 1 | 2 | undefined;
17
+ readonly avatar?: boolean | undefined;
18
+ readonly action?: boolean | undefined;
19
+ readonly label?: string | undefined;
20
+ readonly animation?: import("../feedback/types.ts").SkeletonAnimation | undefined;
21
+ readonly innerHTML?: string | undefined | undefined;
22
+ readonly class?: import("vue").ClassValue;
23
+ readonly style?: import("vue").StyleValue;
24
+ readonly accesskey?: string | undefined | undefined;
25
+ readonly contenteditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
26
+ readonly contextmenu?: string | undefined | undefined;
27
+ readonly dir?: string | undefined | undefined;
28
+ readonly draggable?: (boolean | "true" | "false") | undefined;
29
+ readonly enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
30
+ readonly enterKeyHint?: "search" | "done" | "previous" | "next" | "enter" | "go" | "send" | undefined;
31
+ readonly hidden?: "" | "hidden" | (boolean | "true" | "false") | "until-found" | undefined;
32
+ readonly id?: string | undefined | undefined;
33
+ readonly inert?: (boolean | "true" | "false") | undefined;
34
+ readonly lang?: string | undefined | undefined;
35
+ readonly placeholder?: string | undefined | undefined;
36
+ readonly spellcheck?: (boolean | "true" | "false") | undefined;
37
+ readonly tabindex?: (string | number) | undefined;
38
+ readonly title?: string | undefined | undefined;
39
+ readonly translate?: "yes" | "no" | undefined | undefined;
40
+ readonly radiogroup?: string | undefined | undefined;
41
+ readonly role?: string | undefined | undefined;
42
+ readonly about?: string | undefined | undefined;
43
+ readonly datatype?: string | undefined | undefined;
44
+ readonly inlist?: any;
45
+ readonly prefix?: string | undefined | undefined;
46
+ readonly property?: string | undefined | undefined;
47
+ readonly resource?: string | undefined | undefined;
48
+ readonly typeof?: string | undefined | undefined;
49
+ readonly vocab?: string | undefined | undefined;
50
+ readonly autocapitalize?: string | undefined | undefined;
51
+ readonly autocorrect?: string | undefined | undefined;
52
+ readonly autosave?: string | undefined | undefined;
53
+ readonly color?: string | undefined | undefined;
54
+ readonly itemprop?: string | undefined | undefined;
55
+ readonly itemscope?: (boolean | "true" | "false") | undefined;
56
+ readonly itemtype?: string | undefined | undefined;
57
+ readonly itemid?: string | undefined | undefined;
58
+ readonly itemref?: string | undefined | undefined;
59
+ readonly results?: (string | number) | undefined;
60
+ readonly security?: string | undefined | undefined;
61
+ readonly unselectable?: "on" | "off" | undefined | undefined;
62
+ readonly inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
63
+ readonly is?: string | undefined | undefined;
64
+ readonly exportparts?: string | undefined;
65
+ readonly part?: string | undefined;
66
+ readonly popover?: (import("../../index.ts").PopoverMode | "" | boolean) | undefined;
67
+ readonly 'aria-activedescendant'?: string | undefined | undefined;
68
+ readonly 'aria-atomic'?: (boolean | "true" | "false") | undefined;
69
+ readonly 'aria-autocomplete'?: "none" | "inline" | "list" | "both" | undefined | undefined;
70
+ readonly 'aria-busy'?: (boolean | "true" | "false") | undefined;
71
+ readonly 'aria-checked'?: (boolean | "true" | "false") | "mixed" | undefined;
72
+ readonly 'aria-colcount'?: (string | number) | undefined;
73
+ readonly 'aria-colindex'?: (string | number) | undefined;
74
+ readonly 'aria-colspan'?: (string | number) | undefined;
75
+ readonly 'aria-controls'?: string | undefined | undefined;
76
+ readonly 'aria-current'?: "page" | "time" | (boolean | "true" | "false") | "step" | "location" | "date" | undefined;
77
+ readonly 'aria-describedby'?: string | undefined | undefined;
78
+ readonly 'aria-details'?: string | undefined | undefined;
79
+ readonly 'aria-disabled'?: (boolean | "true" | "false") | undefined;
80
+ readonly 'aria-dropeffect'?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
81
+ readonly 'aria-errormessage'?: string | undefined | undefined;
82
+ readonly 'aria-expanded'?: (boolean | "true" | "false") | undefined;
83
+ readonly 'aria-flowto'?: string | undefined | undefined;
84
+ readonly 'aria-grabbed'?: (boolean | "true" | "false") | undefined;
85
+ readonly 'aria-haspopup'?: "grid" | "tree" | "dialog" | "menu" | (boolean | "true" | "false") | "listbox" | undefined;
86
+ readonly 'aria-hidden'?: (boolean | "true" | "false") | undefined;
87
+ readonly 'aria-invalid'?: (boolean | "true" | "false") | "grammar" | "spelling" | undefined;
88
+ readonly 'aria-keyshortcuts'?: string | undefined | undefined;
89
+ readonly 'aria-label'?: string | undefined | undefined;
90
+ readonly 'aria-labelledby'?: string | undefined | undefined;
91
+ readonly 'aria-level'?: (string | number) | undefined;
92
+ readonly 'aria-live'?: "off" | "assertive" | "polite" | undefined | undefined;
93
+ readonly 'aria-modal'?: (boolean | "true" | "false") | undefined;
94
+ readonly 'aria-multiline'?: (boolean | "true" | "false") | undefined;
95
+ readonly 'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
96
+ readonly 'aria-orientation'?: "horizontal" | "vertical" | undefined | undefined;
97
+ readonly 'aria-owns'?: string | undefined | undefined;
98
+ readonly 'aria-placeholder'?: string | undefined | undefined;
99
+ readonly 'aria-posinset'?: (string | number) | undefined;
100
+ readonly 'aria-pressed'?: (boolean | "true" | "false") | "mixed" | undefined;
101
+ readonly 'aria-readonly'?: (boolean | "true" | "false") | undefined;
102
+ readonly 'aria-relevant'?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
103
+ readonly 'aria-required'?: (boolean | "true" | "false") | undefined;
104
+ readonly 'aria-roledescription'?: string | undefined | undefined;
105
+ readonly 'aria-rowcount'?: (string | number) | undefined;
106
+ readonly 'aria-rowindex'?: (string | number) | undefined;
107
+ readonly 'aria-rowspan'?: (string | number) | undefined;
108
+ readonly 'aria-selected'?: (boolean | "true" | "false") | undefined;
109
+ readonly 'aria-setsize'?: (string | number) | undefined;
110
+ readonly 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
111
+ readonly 'aria-valuemax'?: (string | number) | undefined;
112
+ readonly 'aria-valuemin'?: (string | number) | undefined;
113
+ readonly 'aria-valuenow'?: (string | number) | undefined;
114
+ readonly 'aria-valuetext'?: string | undefined | undefined;
115
+ readonly onCopy?: ((payload: ClipboardEvent) => void) | undefined;
116
+ readonly onCut?: ((payload: ClipboardEvent) => void) | undefined;
117
+ readonly onPaste?: ((payload: ClipboardEvent) => void) | undefined;
118
+ readonly onCompositionend?: ((payload: CompositionEvent) => void) | undefined;
119
+ readonly onCompositionstart?: ((payload: CompositionEvent) => void) | undefined;
120
+ readonly onCompositionupdate?: ((payload: CompositionEvent) => void) | undefined;
121
+ readonly onDrag?: ((payload: DragEvent) => void) | undefined;
122
+ readonly onDragend?: ((payload: DragEvent) => void) | undefined;
123
+ readonly onDragenter?: ((payload: DragEvent) => void) | undefined;
124
+ readonly onDragexit?: ((payload: DragEvent) => void) | undefined;
125
+ readonly onDragleave?: ((payload: DragEvent) => void) | undefined;
126
+ readonly onDragover?: ((payload: DragEvent) => void) | undefined;
127
+ readonly onDragstart?: ((payload: DragEvent) => void) | undefined;
128
+ readonly onDrop?: ((payload: DragEvent) => void) | undefined;
129
+ readonly onFocus?: ((payload: FocusEvent) => void) | undefined;
130
+ readonly onFocusin?: ((payload: FocusEvent) => void) | undefined;
131
+ readonly onFocusout?: ((payload: FocusEvent) => void) | undefined;
132
+ readonly onBlur?: ((payload: FocusEvent) => void) | undefined;
133
+ readonly onChange?: ((payload: Event) => void) | undefined;
134
+ readonly onBeforeinput?: ((payload: InputEvent) => void) | undefined;
135
+ readonly onFormdata?: ((payload: FormDataEvent) => void) | undefined;
136
+ readonly onInput?: ((payload: InputEvent) => void) | undefined;
137
+ readonly onReset?: ((payload: Event) => void) | undefined;
138
+ readonly onSubmit?: ((payload: SubmitEvent) => void) | undefined;
139
+ readonly onInvalid?: ((payload: Event) => void) | undefined;
140
+ readonly onFullscreenchange?: ((payload: Event) => void) | undefined;
141
+ readonly onFullscreenerror?: ((payload: Event) => void) | undefined;
142
+ readonly onLoad?: ((payload: Event) => void) | undefined;
143
+ readonly onError?: ((payload: Event) => void) | undefined;
144
+ readonly onKeydown?: ((payload: KeyboardEvent) => void) | undefined;
145
+ readonly onKeypress?: ((payload: KeyboardEvent) => void) | undefined;
146
+ readonly onKeyup?: ((payload: KeyboardEvent) => void) | undefined;
147
+ readonly onDblclick?: ((payload: MouseEvent) => void) | undefined;
148
+ readonly onMousedown?: ((payload: MouseEvent) => void) | undefined;
149
+ readonly onMouseenter?: ((payload: MouseEvent) => void) | undefined;
150
+ readonly onMouseleave?: ((payload: MouseEvent) => void) | undefined;
151
+ readonly onMousemove?: ((payload: MouseEvent) => void) | undefined;
152
+ readonly onMouseout?: ((payload: MouseEvent) => void) | undefined;
153
+ readonly onMouseover?: ((payload: MouseEvent) => void) | undefined;
154
+ readonly onMouseup?: ((payload: MouseEvent) => void) | undefined;
155
+ readonly onAbort?: ((payload: UIEvent) => void) | undefined;
156
+ readonly onCanplay?: ((payload: Event) => void) | undefined;
157
+ readonly onCanplaythrough?: ((payload: Event) => void) | undefined;
158
+ readonly onDurationchange?: ((payload: Event) => void) | undefined;
159
+ readonly onEmptied?: ((payload: Event) => void) | undefined;
160
+ readonly onEncrypted?: ((payload: MediaEncryptedEvent) => void) | undefined;
161
+ readonly onEnded?: ((payload: Event) => void) | undefined;
162
+ readonly onLoadeddata?: ((payload: Event) => void) | undefined;
163
+ readonly onLoadedmetadata?: ((payload: Event) => void) | undefined;
164
+ readonly onLoadstart?: ((payload: Event) => void) | undefined;
165
+ readonly onPause?: ((payload: Event) => void) | undefined;
166
+ readonly onPlay?: ((payload: Event) => void) | undefined;
167
+ readonly onPlaying?: ((payload: Event) => void) | undefined;
168
+ readonly onProgress?: ((payload: ProgressEvent<EventTarget>) => void) | undefined;
169
+ readonly onRatechange?: ((payload: Event) => void) | undefined;
170
+ readonly onSeeked?: ((payload: Event) => void) | undefined;
171
+ readonly onSeeking?: ((payload: Event) => void) | undefined;
172
+ readonly onStalled?: ((payload: Event) => void) | undefined;
173
+ readonly onSuspend?: ((payload: Event) => void) | undefined;
174
+ readonly onTimeupdate?: ((payload: Event) => void) | undefined;
175
+ readonly onVolumechange?: ((payload: Event) => void) | undefined;
176
+ readonly onWaiting?: ((payload: Event) => void) | undefined;
177
+ readonly onSelect?: ((payload: Event) => void) | undefined;
178
+ readonly onScroll?: ((payload: Event) => void) | undefined;
179
+ readonly onScrollend?: ((payload: Event) => void) | undefined;
180
+ readonly onTouchcancel?: ((payload: TouchEvent) => void) | undefined;
181
+ readonly onTouchend?: ((payload: TouchEvent) => void) | undefined;
182
+ readonly onTouchmove?: ((payload: TouchEvent) => void) | undefined;
183
+ readonly onTouchstart?: ((payload: TouchEvent) => void) | undefined;
184
+ readonly onAuxclick?: ((payload: PointerEvent) => void) | undefined;
185
+ readonly onClick?: ((payload: PointerEvent) => void) | undefined;
186
+ readonly onContextmenu?: ((payload: PointerEvent) => void) | undefined;
187
+ readonly onGotpointercapture?: ((payload: PointerEvent) => void) | undefined;
188
+ readonly onLostpointercapture?: ((payload: PointerEvent) => void) | undefined;
189
+ readonly onPointerdown?: ((payload: PointerEvent) => void) | undefined;
190
+ readonly onPointermove?: ((payload: PointerEvent) => void) | undefined;
191
+ readonly onPointerup?: ((payload: PointerEvent) => void) | undefined;
192
+ readonly onPointercancel?: ((payload: PointerEvent) => void) | undefined;
193
+ readonly onPointerenter?: ((payload: PointerEvent) => void) | undefined;
194
+ readonly onPointerleave?: ((payload: PointerEvent) => void) | undefined;
195
+ readonly onPointerover?: ((payload: PointerEvent) => void) | undefined;
196
+ readonly onPointerout?: ((payload: PointerEvent) => void) | undefined;
197
+ readonly onBeforetoggle?: ((payload: ToggleEvent) => void) | undefined;
198
+ readonly onToggle?: ((payload: ToggleEvent) => void) | undefined;
199
+ readonly onWheel?: ((payload: WheelEvent) => void) | undefined;
200
+ readonly onAnimationcancel?: ((payload: AnimationEvent) => void) | undefined;
201
+ readonly onAnimationstart?: ((payload: AnimationEvent) => void) | undefined;
202
+ readonly onAnimationend?: ((payload: AnimationEvent) => void) | undefined;
203
+ readonly onAnimationiteration?: ((payload: AnimationEvent) => void) | undefined;
204
+ readonly onSecuritypolicyviolation?: ((payload: SecurityPolicyViolationEvent) => void) | undefined;
205
+ readonly onTransitioncancel?: ((payload: TransitionEvent) => void) | undefined;
206
+ readonly onTransitionend?: ((payload: TransitionEvent) => void) | undefined;
207
+ readonly onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
208
+ readonly onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
209
+ readonly key?: PropertyKey | undefined;
210
+ readonly ref?: import("vue").VNodeRef | undefined;
211
+ readonly ref_for?: boolean | undefined | undefined;
212
+ readonly ref_key?: string | undefined | undefined;
213
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").HTMLAttributes & import("vue").ReservedProps>> & (typeof globalThis extends {
214
+ __VLS_PROPS_FALLBACK: infer P;
215
+ } ? P : {});
216
+ expose: (exposed: {}) => void;
217
+ attrs: any;
218
+ slots: {
219
+ leading?(props: {
220
+ item: Item;
221
+ }): unknown;
222
+ action?(props: {
223
+ item: Item;
224
+ }): unknown;
225
+ empty?(): unknown;
226
+ };
227
+ emit: {};
228
+ }>) => import("vue").VNode & {
229
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
230
+ };
231
+ declare const _default: typeof __VLS_export;
232
+ export default _default;
233
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
234
+ [K in keyof T]: T[K];
235
+ } : {
236
+ [K in keyof T as K]: T[K];
237
+ }) & {};
@@ -3,7 +3,7 @@
3
3
  ref="root"
4
4
  class="k-tag"
5
5
  :class="[
6
- `k-tag-${tone}`,
6
+ color ? ['k-tag-palette', paletteClass(color)] : `k-tag-${tone}`,
7
7
  `k-tag-${size}`,
8
8
  { 'is-removable': removable, 'is-disabled': disabled }
9
9
  ]"
@@ -34,9 +34,11 @@ import { hasFocusWithin, neighborFocusTarget } from "../../internal/core/focus";
34
34
  import { useLocale } from "../../composables/useLocale";
35
35
  import { formatLocaleMessage } from "../../locale";
36
36
  import Icon from "../core/Icon.vue";
37
+ import { paletteClass } from "../core/palette";
37
38
  const props = defineProps({
38
39
  label: { type: String, required: false },
39
40
  tone: { type: String, required: false, default: "neutral" },
41
+ color: { type: String, required: false },
40
42
  size: { type: String, required: false, default: "md" },
41
43
  icon: { type: null, required: false },
42
44
  removable: { type: Boolean, required: false },
@@ -8,6 +8,7 @@ type __VLS_Slots = {} & {
8
8
  declare const __VLS_base: import("vue").DefineComponent<{
9
9
  label?: string;
10
10
  tone?: Tone;
11
+ color?: string | undefined;
11
12
  size?: BadgeSize;
12
13
  icon?: IconName;
13
14
  removable?: boolean;
@@ -122,7 +123,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
122
123
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
123
124
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
124
125
  innerHTML?: string | undefined | undefined;
125
- color?: string | undefined | undefined;
126
126
  id?: string | undefined | undefined;
127
127
  lang?: string | undefined | undefined;
128
128
  tabindex?: (string | number) | undefined;
@@ -211,6 +211,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
211
211
  }, string, import("vue").PublicProps, Readonly<{
212
212
  label?: string;
213
213
  tone?: Tone;
214
+ color?: string | undefined;
214
215
  size?: BadgeSize;
215
216
  icon?: IconName;
216
217
  removable?: boolean;
@@ -325,7 +326,6 @@ declare const __VLS_base: import("vue").DefineComponent<{
325
326
  onTransitionrun?: ((payload: TransitionEvent) => void) | undefined;
326
327
  onTransitionstart?: ((payload: TransitionEvent) => void) | undefined;
327
328
  innerHTML?: string | undefined | undefined;
328
- color?: string | undefined | undefined;
329
329
  id?: string | undefined | undefined;
330
330
  lang?: string | undefined | undefined;
331
331
  tabindex?: (string | number) | undefined;
@@ -10,6 +10,7 @@ export { default as Stat } from './Stat.vue';
10
10
  export { default as Table } from './Table.vue';
11
11
  export { default as Tag } from './Tag.vue';
12
12
  export { default as TagList } from './TagList.vue';
13
+ export { default as RecordList } from './RecordList.vue';
13
14
  export { default as Timeline } from './Timeline.vue';
14
15
  export { default as Tree } from './Tree.vue';
15
16
  export type * from './types';
@@ -10,6 +10,7 @@ export { default as Stat } from "./Stat.vue";
10
10
  export { default as Table } from "./Table.vue";
11
11
  export { default as Tag } from "./Tag.vue";
12
12
  export { default as TagList } from "./TagList.vue";
13
+ export { default as RecordList } from "./RecordList.vue";
13
14
  export { default as Timeline } from "./Timeline.vue";
14
15
  export { default as Tree } from "./Tree.vue";
15
16
  export { applyTreeMove } from "../../internal/data/tree.mjs";
@@ -1,4 +1,4 @@
1
- import type { Tone } from '../core/types';
1
+ import type { PaletteColor, Tone } from '../core/types';
2
2
  import type { IconName } from '../../composables/useIcons';
3
3
  import type { MenuItems } from '../overlays/types';
4
4
  export type BadgeVariant = 'soft' | 'solid' | 'outline';
@@ -87,6 +87,7 @@ export interface FilterPillOption<T extends FilterPillValue = FilterPillValue> {
87
87
  valueLabel?: string;
88
88
  count?: number;
89
89
  icon?: string;
90
+ color?: PaletteColor;
90
91
  disabled?: boolean;
91
92
  menu?: MenuItems;
92
93
  menuLabel?: string;
@@ -110,3 +111,12 @@ export interface TagListDrop {
110
111
  event: DragEvent;
111
112
  }
112
113
  export type TagListAccept = string | string[] | ((event: DragEvent) => boolean);
114
+ export interface RecordListItem {
115
+ id: string | number;
116
+ title: string;
117
+ description?: string;
118
+ badge?: {
119
+ label: string;
120
+ tone?: Tone;
121
+ };
122
+ }