numori-ui 0.5.0 → 0.7.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 +85 -0
- package/README.md +11 -3
- package/dist/components/Avatar.js +71 -19
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/ChipsInput.js +423 -0
- package/dist/components/ChipsInput.js.map +1 -0
- package/dist/components/Drawer.js +236 -0
- package/dist/components/Drawer.js.map +1 -0
- package/dist/components/Dropdown.js +4 -2
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/Modal.js +61 -4
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/Prompt.js +11 -6
- package/dist/components/Prompt.js.map +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/Select.js.map +1 -1
- package/dist/components/Skeleton.js +122 -0
- package/dist/components/Skeleton.js.map +1 -0
- package/dist/components/SplitPane.js +264 -0
- package/dist/components/SplitPane.js.map +1 -0
- package/dist/components/Toast.js +62 -16
- package/dist/components/Toast.js.map +1 -1
- package/dist/components/Tree.js +417 -0
- package/dist/components/Tree.js.map +1 -0
- package/dist/components/VirtualList.js +292 -0
- package/dist/components/VirtualList.js.map +1 -0
- package/dist/components/index.js +93 -82
- package/dist/components/index.js.map +1 -1
- package/dist/icons/mdi.js +3 -0
- package/dist/icons/mdi.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +49 -43
- package/dist/index.js.map +1 -1
- package/dist/internal/focusTrap.js +163 -0
- package/dist/internal/focusTrap.js.map +1 -0
- package/dist/manifest.js +7 -1
- package/dist/manifest.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Avatar.vue +69 -18
- package/src/components/ChipsInput.vue +387 -0
- package/src/components/Drawer.vue +213 -0
- package/src/components/Dropdown.vue +4 -1
- package/src/components/Modal.vue +51 -3
- package/src/components/Prompt.vue +14 -3
- package/src/components/Select.vue +1 -1
- package/src/components/Skeleton.vue +91 -0
- package/src/components/SplitPane.vue +264 -0
- package/src/components/Toast.vue +57 -13
- package/src/components/Tree.vue +428 -0
- package/src/components/VirtualList.vue +250 -0
- package/src/components/index.js +18 -1
- package/src/icons/mdi.js +3 -0
- package/src/internal/focusTrap.js +185 -0
- package/src/manifest.js +6 -0
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import _sfc_main$1 from "../icons/Icon.js";
|
|
2
|
+
import { MENU_PANEL_CLASS } from "../internal/menu.js";
|
|
3
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, normalizeClass, onBeforeUnmount, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, vModelText, vShow, watch, withDirectives, withModifiers } from "vue";
|
|
4
|
+
//#region src/components/ChipsInput.vue
|
|
5
|
+
var _hoisted_1 = ["title"];
|
|
6
|
+
var _hoisted_2 = { class: "truncate" };
|
|
7
|
+
var _hoisted_3 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "sr-only"
|
|
10
|
+
};
|
|
11
|
+
var _hoisted_4 = ["aria-label", "onClick"];
|
|
12
|
+
var _hoisted_5 = [
|
|
13
|
+
"id",
|
|
14
|
+
"inputmode",
|
|
15
|
+
"placeholder",
|
|
16
|
+
"disabled",
|
|
17
|
+
"aria-label",
|
|
18
|
+
"aria-expanded",
|
|
19
|
+
"aria-activedescendant"
|
|
20
|
+
];
|
|
21
|
+
var _hoisted_6 = ["aria-label"];
|
|
22
|
+
var _hoisted_7 = [
|
|
23
|
+
"id",
|
|
24
|
+
"aria-selected",
|
|
25
|
+
"onMousedown",
|
|
26
|
+
"onMouseenter"
|
|
27
|
+
];
|
|
28
|
+
var _hoisted_8 = { class: "truncate font-medium" };
|
|
29
|
+
var _hoisted_9 = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "truncate text-xs text-gray-500 dark:text-gray-400"
|
|
32
|
+
};
|
|
33
|
+
var _sfc_main = {
|
|
34
|
+
__name: "ChipsInput",
|
|
35
|
+
props: {
|
|
36
|
+
/**
|
|
37
|
+
* The chips.
|
|
38
|
+
* @type {Array<string | object>}
|
|
39
|
+
* @default []
|
|
40
|
+
*/
|
|
41
|
+
modelValue: {
|
|
42
|
+
type: Array,
|
|
43
|
+
default: () => []
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Turn typed text into a chip, or null to reject it.
|
|
47
|
+
* @type {(text: string) => string | object | null}
|
|
48
|
+
* @default trimmed text
|
|
49
|
+
*/
|
|
50
|
+
parse: {
|
|
51
|
+
type: Function,
|
|
52
|
+
default: (text) => text.trim() || null
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* Whether a chip is valid. Invalid chips are kept and marked.
|
|
56
|
+
* @type {(chip: string | object) => boolean}
|
|
57
|
+
* @default () => true
|
|
58
|
+
*/
|
|
59
|
+
validate: {
|
|
60
|
+
type: Function,
|
|
61
|
+
default: () => true
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Suggestions for the current text (may return a promise).
|
|
65
|
+
* @type {(text: string) => Array | Promise<Array>}
|
|
66
|
+
* @default null
|
|
67
|
+
*/
|
|
68
|
+
suggest: {
|
|
69
|
+
type: Function,
|
|
70
|
+
default: null
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* Label for a chip or suggestion.
|
|
74
|
+
* @type {(chip: string | object) => string}
|
|
75
|
+
*/
|
|
76
|
+
chipLabel: {
|
|
77
|
+
type: Function,
|
|
78
|
+
default: (chip) => String(chip)
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* Secondary text for a suggestion (and a chip's tooltip).
|
|
82
|
+
* @type {(chip: string | object) => string}
|
|
83
|
+
*/
|
|
84
|
+
chipDetail: {
|
|
85
|
+
type: Function,
|
|
86
|
+
default: () => ""
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* Identity of a chip, for de-duplication and keys.
|
|
90
|
+
* @type {(chip: string | object) => string}
|
|
91
|
+
*/
|
|
92
|
+
chipKey: {
|
|
93
|
+
type: Function,
|
|
94
|
+
default: (chip) => String(chip).toLowerCase()
|
|
95
|
+
},
|
|
96
|
+
/**
|
|
97
|
+
* Characters that finish a chip as you type.
|
|
98
|
+
* @type {string[]}
|
|
99
|
+
* @default [',', ';']
|
|
100
|
+
*/
|
|
101
|
+
separators: {
|
|
102
|
+
type: Array,
|
|
103
|
+
default: () => [",", ";"]
|
|
104
|
+
},
|
|
105
|
+
/**
|
|
106
|
+
* Accessible name of the field.
|
|
107
|
+
* @type {string}
|
|
108
|
+
* @default ''
|
|
109
|
+
*/
|
|
110
|
+
label: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: ""
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* Shown while there are no chips.
|
|
116
|
+
* @type {string}
|
|
117
|
+
* @default ''
|
|
118
|
+
*/
|
|
119
|
+
placeholder: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: ""
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* Virtual keyboard hint.
|
|
125
|
+
* @type {string}
|
|
126
|
+
* @default 'text'
|
|
127
|
+
*/
|
|
128
|
+
inputmode: {
|
|
129
|
+
type: String,
|
|
130
|
+
default: "text"
|
|
131
|
+
},
|
|
132
|
+
/**
|
|
133
|
+
* Accessible name of each chip's remove button; `{chip}` is replaced.
|
|
134
|
+
* @type {string}
|
|
135
|
+
* @default 'Remove {chip}'
|
|
136
|
+
*/
|
|
137
|
+
removeLabel: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: "Remove {chip}"
|
|
140
|
+
},
|
|
141
|
+
/**
|
|
142
|
+
* Read after an invalid chip.
|
|
143
|
+
* @type {string}
|
|
144
|
+
* @default 'invalid'
|
|
145
|
+
*/
|
|
146
|
+
invalidLabel: {
|
|
147
|
+
type: String,
|
|
148
|
+
default: "invalid"
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* The id of the text field, so a `<label for>` (or UiFormField) can name it.
|
|
152
|
+
* @type {string}
|
|
153
|
+
* @default ''
|
|
154
|
+
*/
|
|
155
|
+
id: {
|
|
156
|
+
type: String,
|
|
157
|
+
default: ""
|
|
158
|
+
},
|
|
159
|
+
/**
|
|
160
|
+
* Disable the field.
|
|
161
|
+
* @type {boolean}
|
|
162
|
+
* @default false
|
|
163
|
+
*/
|
|
164
|
+
disabled: {
|
|
165
|
+
type: Boolean,
|
|
166
|
+
default: false
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
emits: [
|
|
170
|
+
"update:modelValue",
|
|
171
|
+
"add",
|
|
172
|
+
"remove"
|
|
173
|
+
],
|
|
174
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
175
|
+
/**
|
|
176
|
+
* UiChipsInput — a text field that turns what you type into chips: email
|
|
177
|
+
* recipients, tags, labels.
|
|
178
|
+
*
|
|
179
|
+
* Typing a separator (comma, semicolon or Enter by default), Tab, or leaving
|
|
180
|
+
* the field turns the text into a chip; pasting a list ("Ana <ana@x.com>,
|
|
181
|
+
* ben@y.com") makes one chip per entry. Backspace in an empty field removes
|
|
182
|
+
* the last chip. Chips that fail `validate` stay, marked as invalid, so a typo
|
|
183
|
+
* is visible rather than silently dropped.
|
|
184
|
+
*
|
|
185
|
+
* Suggestions follow the WAI-ARIA combobox pattern: give `suggest` a
|
|
186
|
+
* function that receives the current text and returns (or resolves to) a
|
|
187
|
+
* list; Up and Down move through it, Enter or Tab picks, Escape closes it.
|
|
188
|
+
* Results from an older query are ignored if a newer one has started.
|
|
189
|
+
*
|
|
190
|
+
* Chips can be strings or objects. For objects, supply `chipLabel` (and
|
|
191
|
+
* optionally `chipDetail` and `chipKey`) and `parse`, which turns typed text
|
|
192
|
+
* into a chip (or null to reject it).
|
|
193
|
+
*
|
|
194
|
+
* @example Recipients
|
|
195
|
+
* <UiChipsInput
|
|
196
|
+
* v-model="to"
|
|
197
|
+
* label="To"
|
|
198
|
+
* :parse="parseAddress"
|
|
199
|
+
* :validate="(c) => /@/.test(c.address)"
|
|
200
|
+
* :suggest="findContacts"
|
|
201
|
+
* :chip-label="(c) => c.name || c.address"
|
|
202
|
+
* :chip-detail="(c) => c.address"
|
|
203
|
+
* :chip-key="(c) => c.address"
|
|
204
|
+
* />
|
|
205
|
+
*
|
|
206
|
+
* @example Plain tags
|
|
207
|
+
* <UiChipsInput v-model="tags" label="Tags" placeholder="Add a tag" />
|
|
208
|
+
*
|
|
209
|
+
* @emits {Array} update:modelValue — The chips changed.
|
|
210
|
+
* @emits {object} add — A chip was added.
|
|
211
|
+
* @emits {object} remove — A chip was removed.
|
|
212
|
+
*
|
|
213
|
+
* @slot suggestion — One suggestion row. Scope: `{ item, active }`.
|
|
214
|
+
*/
|
|
215
|
+
const props = __props;
|
|
216
|
+
const emit = __emit;
|
|
217
|
+
const baseId = useId();
|
|
218
|
+
const inputId = computed(() => props.id || `${baseId}-input`);
|
|
219
|
+
const listId = `${baseId}-list`;
|
|
220
|
+
const rootRef = ref(null);
|
|
221
|
+
const inputRef = ref(null);
|
|
222
|
+
const text = ref("");
|
|
223
|
+
const focused = ref(false);
|
|
224
|
+
const suggestions = ref([]);
|
|
225
|
+
const active = ref(-1);
|
|
226
|
+
const open = computed(() => focused.value && suggestions.value.length > 0);
|
|
227
|
+
const labelOf = (chip) => props.chipLabel(chip);
|
|
228
|
+
const detailOf = (chip) => props.chipDetail(chip);
|
|
229
|
+
const keyOf = (chip, index) => props.chipKey(chip) ?? index;
|
|
230
|
+
const isValid = (chip) => props.validate(chip);
|
|
231
|
+
const titleOf = (chip) => detailOf(chip) || labelOf(chip);
|
|
232
|
+
function add(entries) {
|
|
233
|
+
const existing = new Set(props.modelValue.map((c) => props.chipKey(c)));
|
|
234
|
+
const added = [];
|
|
235
|
+
for (const entry of entries) {
|
|
236
|
+
const chip = typeof entry === "string" ? props.parse(entry) : entry;
|
|
237
|
+
if (chip === null || chip === void 0 || chip === "") continue;
|
|
238
|
+
const key = props.chipKey(chip);
|
|
239
|
+
if (existing.has(key)) continue;
|
|
240
|
+
existing.add(key);
|
|
241
|
+
added.push(chip);
|
|
242
|
+
}
|
|
243
|
+
if (!added.length) return;
|
|
244
|
+
emit("update:modelValue", [...props.modelValue, ...added]);
|
|
245
|
+
for (const chip of added) emit("add", chip);
|
|
246
|
+
}
|
|
247
|
+
function remove(index) {
|
|
248
|
+
const chip = props.modelValue[index];
|
|
249
|
+
const next = props.modelValue.slice();
|
|
250
|
+
next.splice(index, 1);
|
|
251
|
+
emit("update:modelValue", next);
|
|
252
|
+
emit("remove", chip);
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Split a pasted or typed list on separators, but not inside quotes or angle
|
|
256
|
+
* brackets, so `"Smith, Ana" <ana@x.com>` stays one entry.
|
|
257
|
+
*/
|
|
258
|
+
function splitList(value) {
|
|
259
|
+
const parts = [];
|
|
260
|
+
let current = "";
|
|
261
|
+
let quoted = false;
|
|
262
|
+
let angled = false;
|
|
263
|
+
for (const char of value) {
|
|
264
|
+
if (char === "\"") quoted = !quoted;
|
|
265
|
+
else if (char === "<") angled = true;
|
|
266
|
+
else if (char === ">") angled = false;
|
|
267
|
+
if (!quoted && !angled && (props.separators.includes(char) || char === "\n")) {
|
|
268
|
+
parts.push(current);
|
|
269
|
+
current = "";
|
|
270
|
+
} else current += char;
|
|
271
|
+
}
|
|
272
|
+
parts.push(current);
|
|
273
|
+
return parts.map((p) => p.trim()).filter(Boolean);
|
|
274
|
+
}
|
|
275
|
+
function commitText() {
|
|
276
|
+
if (!text.value.trim()) return false;
|
|
277
|
+
add(splitList(text.value));
|
|
278
|
+
text.value = "";
|
|
279
|
+
suggestions.value = [];
|
|
280
|
+
return true;
|
|
281
|
+
}
|
|
282
|
+
function choose(item) {
|
|
283
|
+
add([item]);
|
|
284
|
+
text.value = "";
|
|
285
|
+
suggestions.value = [];
|
|
286
|
+
active.value = -1;
|
|
287
|
+
inputRef.value?.focus();
|
|
288
|
+
}
|
|
289
|
+
let generation = 0;
|
|
290
|
+
let debounce = null;
|
|
291
|
+
watch(text, (value) => {
|
|
292
|
+
if (value && props.separators.includes(value.at(-1))) {
|
|
293
|
+
const before = value.slice(0, -1);
|
|
294
|
+
if (splitList(before).length) {
|
|
295
|
+
text.value = before;
|
|
296
|
+
commitText();
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
clearTimeout(debounce);
|
|
301
|
+
if (!props.suggest || !value.trim()) {
|
|
302
|
+
suggestions.value = [];
|
|
303
|
+
active.value = -1;
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
const mine = ++generation;
|
|
307
|
+
debounce = setTimeout(async () => {
|
|
308
|
+
const result = await props.suggest(value.trim());
|
|
309
|
+
if (mine !== generation) return;
|
|
310
|
+
const taken = new Set(props.modelValue.map((c) => props.chipKey(c)));
|
|
311
|
+
suggestions.value = (result ?? []).filter((item) => !taken.has(props.chipKey(item)));
|
|
312
|
+
active.value = suggestions.value.length ? 0 : -1;
|
|
313
|
+
}, 120);
|
|
314
|
+
});
|
|
315
|
+
onBeforeUnmount(() => clearTimeout(debounce));
|
|
316
|
+
function onKeydown(event) {
|
|
317
|
+
if (event.key === "ArrowDown" && suggestions.value.length) {
|
|
318
|
+
event.preventDefault();
|
|
319
|
+
active.value = (active.value + 1) % suggestions.value.length;
|
|
320
|
+
} else if (event.key === "ArrowUp" && suggestions.value.length) {
|
|
321
|
+
event.preventDefault();
|
|
322
|
+
active.value = (active.value - 1 + suggestions.value.length) % suggestions.value.length;
|
|
323
|
+
} else if (event.key === "Enter" || event.key === "Tab" && text.value.trim()) {
|
|
324
|
+
if (open.value && active.value >= 0) {
|
|
325
|
+
event.preventDefault();
|
|
326
|
+
choose(suggestions.value[active.value]);
|
|
327
|
+
} else if (commitText()) event.preventDefault();
|
|
328
|
+
} else if (event.key === "Escape" && open.value) {
|
|
329
|
+
event.preventDefault();
|
|
330
|
+
suggestions.value = [];
|
|
331
|
+
} else if (event.key === "Backspace" && !text.value && props.modelValue.length) remove(props.modelValue.length - 1);
|
|
332
|
+
}
|
|
333
|
+
function onPaste(event) {
|
|
334
|
+
const parts = splitList(event.clipboardData?.getData("text") ?? "");
|
|
335
|
+
if (parts.length > 1) {
|
|
336
|
+
event.preventDefault();
|
|
337
|
+
add(parts);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function onBlur(event) {
|
|
341
|
+
if (rootRef.value?.contains(event.relatedTarget)) return;
|
|
342
|
+
focused.value = false;
|
|
343
|
+
commitText();
|
|
344
|
+
suggestions.value = [];
|
|
345
|
+
}
|
|
346
|
+
__expose({ focus: () => inputRef.value?.focus() });
|
|
347
|
+
return (_ctx, _cache) => {
|
|
348
|
+
return openBlock(), createElementBlock("div", {
|
|
349
|
+
ref_key: "rootRef",
|
|
350
|
+
ref: rootRef,
|
|
351
|
+
class: "relative"
|
|
352
|
+
}, [createElementVNode("div", {
|
|
353
|
+
class: normalizeClass(["flex min-h-10 w-full flex-wrap items-center gap-1.5 rounded-lg border bg-white px-2 py-1.5 transition-colors dark:bg-gray-800", [focused.value ? "border-primary-500 ring-2 ring-primary-500/30" : "border-gray-300 dark:border-gray-600", __props.disabled ? "pointer-events-none opacity-60" : "cursor-text"]]),
|
|
354
|
+
onClick: _cache[2] || (_cache[2] = ($event) => inputRef.value?.focus())
|
|
355
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (chip, index) => {
|
|
356
|
+
return openBlock(), createElementBlock("span", {
|
|
357
|
+
key: keyOf(chip, index),
|
|
358
|
+
class: normalizeClass(["inline-flex max-w-full items-center gap-1 rounded-md py-0.5 pr-1 pl-2 text-sm", isValid(chip) ? "bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-100" : "bg-error-50 text-error-700 ring-1 ring-error-300 dark:bg-error-500/15 dark:text-error-200 dark:ring-error-500/40"]),
|
|
359
|
+
title: titleOf(chip)
|
|
360
|
+
}, [
|
|
361
|
+
createElementVNode("span", _hoisted_2, toDisplayString(labelOf(chip)), 1),
|
|
362
|
+
!isValid(chip) ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.invalidLabel), 1)) : createCommentVNode("", true),
|
|
363
|
+
!__props.disabled ? (openBlock(), createElementBlock("button", {
|
|
364
|
+
key: 1,
|
|
365
|
+
type: "button",
|
|
366
|
+
tabindex: "-1",
|
|
367
|
+
class: "inline-flex size-5 shrink-0 items-center justify-center rounded text-current opacity-60 hover:bg-gray-200 hover:opacity-100 dark:hover:bg-gray-600",
|
|
368
|
+
"aria-label": __props.removeLabel.replace("{chip}", labelOf(chip)),
|
|
369
|
+
onClick: withModifiers(($event) => remove(index), ["stop"])
|
|
370
|
+
}, [createVNode(_sfc_main$1, {
|
|
371
|
+
name: "mdi:close",
|
|
372
|
+
class: "size-3.5"
|
|
373
|
+
})], 8, _hoisted_4)) : createCommentVNode("", true)
|
|
374
|
+
], 10, _hoisted_1);
|
|
375
|
+
}), 128)), withDirectives(createElementVNode("input", {
|
|
376
|
+
id: inputId.value,
|
|
377
|
+
ref_key: "inputRef",
|
|
378
|
+
ref: inputRef,
|
|
379
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => text.value = $event),
|
|
380
|
+
type: "text",
|
|
381
|
+
role: "combobox",
|
|
382
|
+
autocomplete: "off",
|
|
383
|
+
autocapitalize: "off",
|
|
384
|
+
spellcheck: "false",
|
|
385
|
+
inputmode: __props.inputmode,
|
|
386
|
+
placeholder: __props.modelValue.length ? "" : __props.placeholder,
|
|
387
|
+
disabled: __props.disabled,
|
|
388
|
+
"aria-label": __props.label || void 0,
|
|
389
|
+
"aria-expanded": open.value ? "true" : "false",
|
|
390
|
+
"aria-controls": listId,
|
|
391
|
+
"aria-activedescendant": open.value && active.value >= 0 ? `${listId}-${active.value}` : void 0,
|
|
392
|
+
"aria-autocomplete": "list",
|
|
393
|
+
class: "min-w-24 flex-1 bg-transparent px-1 py-0.5 text-sm text-gray-900 outline-none placeholder:text-gray-400 dark:text-gray-100",
|
|
394
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => focused.value = true),
|
|
395
|
+
onBlur,
|
|
396
|
+
onKeydown,
|
|
397
|
+
onPaste
|
|
398
|
+
}, null, 40, _hoisted_5), [[vModelText, text.value]])], 2), withDirectives(createElementVNode("ul", {
|
|
399
|
+
id: listId,
|
|
400
|
+
role: "listbox",
|
|
401
|
+
"aria-label": __props.label || void 0,
|
|
402
|
+
class: normalizeClass(["absolute inset-x-0 top-full z-50 mt-1 max-h-64 overflow-y-auto py-1", unref(MENU_PANEL_CLASS)])
|
|
403
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(suggestions.value, (item, index) => {
|
|
404
|
+
return openBlock(), createElementBlock("li", {
|
|
405
|
+
id: `${listId}-${index}`,
|
|
406
|
+
key: keyOf(item, index),
|
|
407
|
+
role: "option",
|
|
408
|
+
"aria-selected": index === active.value ? "true" : "false",
|
|
409
|
+
class: normalizeClass(["flex cursor-pointer flex-col px-3 py-1.5 text-sm", index === active.value ? "bg-primary-50 text-primary-800 dark:bg-primary-400/15 dark:text-primary-100" : "text-gray-700 dark:text-gray-200"]),
|
|
410
|
+
onMousedown: withModifiers(($event) => choose(item), ["prevent"]),
|
|
411
|
+
onMouseenter: ($event) => active.value = index
|
|
412
|
+
}, [renderSlot(_ctx.$slots, "suggestion", {
|
|
413
|
+
item,
|
|
414
|
+
active: index === active.value
|
|
415
|
+
}, () => [createElementVNode("span", _hoisted_8, toDisplayString(labelOf(item)), 1), detailOf(item) ? (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString(detailOf(item)), 1)) : createCommentVNode("", true)])], 42, _hoisted_7);
|
|
416
|
+
}), 128))], 10, _hoisted_6), [[vShow, open.value]])], 512);
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
//#endregion
|
|
421
|
+
export { _sfc_main as default };
|
|
422
|
+
|
|
423
|
+
//# sourceMappingURL=ChipsInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChipsInput.js","names":[],"sources":["../../src/components/ChipsInput.vue"],"sourcesContent":["<template>\n <div ref=\"rootRef\" class=\"relative\">\n <div\n class=\"flex min-h-10 w-full flex-wrap items-center gap-1.5 rounded-lg border bg-white px-2 py-1.5 transition-colors dark:bg-gray-800\"\n :class=\"[\n focused\n ? 'border-primary-500 ring-2 ring-primary-500/30'\n : 'border-gray-300 dark:border-gray-600',\n disabled ? 'pointer-events-none opacity-60' : 'cursor-text',\n ]\"\n @click=\"inputRef?.focus()\"\n >\n <span\n v-for=\"(chip, index) in modelValue\"\n :key=\"keyOf(chip, index)\"\n class=\"inline-flex max-w-full items-center gap-1 rounded-md py-0.5 pr-1 pl-2 text-sm\"\n :class=\"\n isValid(chip)\n ? 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-100'\n : 'bg-error-50 text-error-700 ring-1 ring-error-300 dark:bg-error-500/15 dark:text-error-200 dark:ring-error-500/40'\n \"\n :title=\"titleOf(chip)\"\n >\n <span class=\"truncate\">{{ labelOf(chip) }}</span>\n <span v-if=\"!isValid(chip)\" class=\"sr-only\">{{ invalidLabel }}</span>\n <button\n v-if=\"!disabled\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"inline-flex size-5 shrink-0 items-center justify-center rounded text-current opacity-60 hover:bg-gray-200 hover:opacity-100 dark:hover:bg-gray-600\"\n :aria-label=\"removeLabel.replace('{chip}', labelOf(chip))\"\n @click.stop=\"remove(index)\"\n >\n <UiIcon name=\"mdi:close\" class=\"size-3.5\" />\n </button>\n </span>\n <input\n :id=\"inputId\"\n ref=\"inputRef\"\n v-model=\"text\"\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n :inputmode=\"inputmode\"\n :placeholder=\"modelValue.length ? '' : placeholder\"\n :disabled=\"disabled\"\n :aria-label=\"label || undefined\"\n :aria-expanded=\"open ? 'true' : 'false'\"\n :aria-controls=\"listId\"\n :aria-activedescendant=\"open && active >= 0 ? `${listId}-${active}` : undefined\"\n aria-autocomplete=\"list\"\n class=\"min-w-24 flex-1 bg-transparent px-1 py-0.5 text-sm text-gray-900 outline-none placeholder:text-gray-400 dark:text-gray-100\"\n @focus=\"focused = true\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n @paste=\"onPaste\"\n />\n </div>\n\n <ul\n v-show=\"open\"\n :id=\"listId\"\n role=\"listbox\"\n :aria-label=\"label || undefined\"\n class=\"absolute inset-x-0 top-full z-50 mt-1 max-h-64 overflow-y-auto py-1\"\n :class=\"MENU_PANEL_CLASS\"\n >\n <li\n v-for=\"(item, index) in suggestions\"\n :id=\"`${listId}-${index}`\"\n :key=\"keyOf(item, index)\"\n role=\"option\"\n :aria-selected=\"index === active ? 'true' : 'false'\"\n class=\"flex cursor-pointer flex-col px-3 py-1.5 text-sm\"\n :class=\"\n index === active\n ? 'bg-primary-50 text-primary-800 dark:bg-primary-400/15 dark:text-primary-100'\n : 'text-gray-700 dark:text-gray-200'\n \"\n @mousedown.prevent=\"choose(item)\"\n @mouseenter=\"active = index\"\n >\n <slot name=\"suggestion\" :item=\"item\" :active=\"index === active\">\n <span class=\"truncate font-medium\">{{ labelOf(item) }}</span>\n <span v-if=\"detailOf(item)\" class=\"truncate text-xs text-gray-500 dark:text-gray-400\">{{\n detailOf(item)\n }}</span>\n </slot>\n </li>\n </ul>\n </div>\n</template>\n\n<script setup>\n/**\n * UiChipsInput — a text field that turns what you type into chips: email\n * recipients, tags, labels.\n *\n * Typing a separator (comma, semicolon or Enter by default), Tab, or leaving\n * the field turns the text into a chip; pasting a list (\"Ana <ana@x.com>,\n * ben@y.com\") makes one chip per entry. Backspace in an empty field removes\n * the last chip. Chips that fail `validate` stay, marked as invalid, so a typo\n * is visible rather than silently dropped.\n *\n * Suggestions follow the WAI-ARIA combobox pattern: give `suggest` a\n * function that receives the current text and returns (or resolves to) a\n * list; Up and Down move through it, Enter or Tab picks, Escape closes it.\n * Results from an older query are ignored if a newer one has started.\n *\n * Chips can be strings or objects. For objects, supply `chipLabel` (and\n * optionally `chipDetail` and `chipKey`) and `parse`, which turns typed text\n * into a chip (or null to reject it).\n *\n * @example Recipients\n * <UiChipsInput\n * v-model=\"to\"\n * label=\"To\"\n * :parse=\"parseAddress\"\n * :validate=\"(c) => /@/.test(c.address)\"\n * :suggest=\"findContacts\"\n * :chip-label=\"(c) => c.name || c.address\"\n * :chip-detail=\"(c) => c.address\"\n * :chip-key=\"(c) => c.address\"\n * />\n *\n * @example Plain tags\n * <UiChipsInput v-model=\"tags\" label=\"Tags\" placeholder=\"Add a tag\" />\n *\n * @emits {Array} update:modelValue — The chips changed.\n * @emits {object} add — A chip was added.\n * @emits {object} remove — A chip was removed.\n *\n * @slot suggestion — One suggestion row. Scope: `{ item, active }`.\n */\nimport { computed, onBeforeUnmount, ref, useId, watch } from 'vue'\nimport UiIcon from '../icons/Icon.vue'\nimport { MENU_PANEL_CLASS } from '../internal/menu.js'\n\nconst props = defineProps({\n /**\n * The chips.\n * @type {Array<string | object>}\n * @default []\n */\n modelValue: { type: Array, default: () => [] },\n /**\n * Turn typed text into a chip, or null to reject it.\n * @type {(text: string) => string | object | null}\n * @default trimmed text\n */\n parse: { type: Function, default: (text) => text.trim() || null },\n /**\n * Whether a chip is valid. Invalid chips are kept and marked.\n * @type {(chip: string | object) => boolean}\n * @default () => true\n */\n validate: { type: Function, default: () => true },\n /**\n * Suggestions for the current text (may return a promise).\n * @type {(text: string) => Array | Promise<Array>}\n * @default null\n */\n suggest: { type: Function, default: null },\n /**\n * Label for a chip or suggestion.\n * @type {(chip: string | object) => string}\n */\n chipLabel: { type: Function, default: (chip) => String(chip) },\n /**\n * Secondary text for a suggestion (and a chip's tooltip).\n * @type {(chip: string | object) => string}\n */\n chipDetail: { type: Function, default: () => '' },\n /**\n * Identity of a chip, for de-duplication and keys.\n * @type {(chip: string | object) => string}\n */\n chipKey: { type: Function, default: (chip) => String(chip).toLowerCase() },\n /**\n * Characters that finish a chip as you type.\n * @type {string[]}\n * @default [',', ';']\n */\n separators: { type: Array, default: () => [',', ';'] },\n /**\n * Accessible name of the field.\n * @type {string}\n * @default ''\n */\n label: { type: String, default: '' },\n /**\n * Shown while there are no chips.\n * @type {string}\n * @default ''\n */\n placeholder: { type: String, default: '' },\n /**\n * Virtual keyboard hint.\n * @type {string}\n * @default 'text'\n */\n inputmode: { type: String, default: 'text' },\n /**\n * Accessible name of each chip's remove button; `{chip}` is replaced.\n * @type {string}\n * @default 'Remove {chip}'\n */\n removeLabel: { type: String, default: 'Remove {chip}' },\n /**\n * Read after an invalid chip.\n * @type {string}\n * @default 'invalid'\n */\n invalidLabel: { type: String, default: 'invalid' },\n /**\n * The id of the text field, so a `<label for>` (or UiFormField) can name it.\n * @type {string}\n * @default ''\n */\n id: { type: String, default: '' },\n /**\n * Disable the field.\n * @type {boolean}\n * @default false\n */\n disabled: { type: Boolean, default: false },\n})\n\nconst emit = defineEmits(['update:modelValue', 'add', 'remove'])\n\nconst baseId = useId()\nconst inputId = computed(() => props.id || `${baseId}-input`)\nconst listId = `${baseId}-list`\nconst rootRef = ref(null)\nconst inputRef = ref(null)\nconst text = ref('')\nconst focused = ref(false)\nconst suggestions = ref([])\nconst active = ref(-1)\nconst open = computed(() => focused.value && suggestions.value.length > 0)\n\nconst labelOf = (chip) => props.chipLabel(chip)\nconst detailOf = (chip) => props.chipDetail(chip)\nconst keyOf = (chip, index) => props.chipKey(chip) ?? index\nconst isValid = (chip) => props.validate(chip)\nconst titleOf = (chip) => detailOf(chip) || labelOf(chip)\n\n// ── Adding and removing ──\nfunction add(entries) {\n const existing = new Set(props.modelValue.map((c) => props.chipKey(c)))\n const added = []\n for (const entry of entries) {\n const chip = typeof entry === 'string' ? props.parse(entry) : entry\n if (chip === null || chip === undefined || chip === '') continue\n const key = props.chipKey(chip)\n if (existing.has(key)) continue\n existing.add(key)\n added.push(chip)\n }\n if (!added.length) return\n emit('update:modelValue', [...props.modelValue, ...added])\n for (const chip of added) emit('add', chip)\n}\n\nfunction remove(index) {\n const chip = props.modelValue[index]\n const next = props.modelValue.slice()\n next.splice(index, 1)\n emit('update:modelValue', next)\n emit('remove', chip)\n}\n\n/**\n * Split a pasted or typed list on separators, but not inside quotes or angle\n * brackets, so `\"Smith, Ana\" <ana@x.com>` stays one entry.\n */\nfunction splitList(value) {\n const parts = []\n let current = ''\n let quoted = false\n let angled = false\n for (const char of value) {\n if (char === '\"') quoted = !quoted\n else if (char === '<') angled = true\n else if (char === '>') angled = false\n if (!quoted && !angled && (props.separators.includes(char) || char === '\\n')) {\n parts.push(current)\n current = ''\n } else {\n current += char\n }\n }\n parts.push(current)\n return parts.map((p) => p.trim()).filter(Boolean)\n}\n\nfunction commitText() {\n if (!text.value.trim()) return false\n add(splitList(text.value))\n text.value = ''\n suggestions.value = []\n return true\n}\n\nfunction choose(item) {\n add([item])\n text.value = ''\n suggestions.value = []\n active.value = -1\n inputRef.value?.focus()\n}\n\n// ── Suggestions ──\nlet generation = 0\nlet debounce = null\nwatch(text, (value) => {\n // A separator typed at the end finishes the chip.\n if (value && props.separators.includes(value.at(-1))) {\n const before = value.slice(0, -1)\n if (splitList(before).length) {\n text.value = before\n commitText()\n return\n }\n }\n clearTimeout(debounce)\n if (!props.suggest || !value.trim()) {\n suggestions.value = []\n active.value = -1\n return\n }\n const mine = ++generation\n debounce = setTimeout(async () => {\n const result = await props.suggest(value.trim())\n if (mine !== generation) return\n const taken = new Set(props.modelValue.map((c) => props.chipKey(c)))\n suggestions.value = (result ?? []).filter((item) => !taken.has(props.chipKey(item)))\n active.value = suggestions.value.length ? 0 : -1\n }, 120)\n})\nonBeforeUnmount(() => clearTimeout(debounce))\n\n// ── Keyboard ──\nfunction onKeydown(event) {\n if (event.key === 'ArrowDown' && suggestions.value.length) {\n event.preventDefault()\n active.value = (active.value + 1) % suggestions.value.length\n } else if (event.key === 'ArrowUp' && suggestions.value.length) {\n event.preventDefault()\n active.value = (active.value - 1 + suggestions.value.length) % suggestions.value.length\n } else if (event.key === 'Enter' || (event.key === 'Tab' && text.value.trim())) {\n if (open.value && active.value >= 0) {\n event.preventDefault()\n choose(suggestions.value[active.value])\n } else if (commitText()) {\n event.preventDefault()\n }\n } else if (event.key === 'Escape' && open.value) {\n // Claim the key so an enclosing dialog stays open.\n event.preventDefault()\n suggestions.value = []\n } else if (event.key === 'Backspace' && !text.value && props.modelValue.length) {\n remove(props.modelValue.length - 1)\n }\n}\n\nfunction onPaste(event) {\n const pasted = event.clipboardData?.getData('text') ?? ''\n const parts = splitList(pasted)\n if (parts.length > 1) {\n event.preventDefault()\n add(parts)\n }\n}\n\nfunction onBlur(event) {\n // A click inside the suggestion list is not leaving the field.\n if (rootRef.value?.contains(event.relatedTarget)) return\n focused.value = false\n commitText()\n suggestions.value = []\n}\n\ndefineExpose({ focus: () => inputRef.value?.focus() })\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4IA,MAAM,QAAQ;EA0Fd,MAAM,OAAO;EAEb,MAAM,SAAS,MAAM;EACrB,MAAM,UAAU,eAAe,MAAM,MAAM,GAAG,OAAO,OAAO;EAC5D,MAAM,SAAS,GAAG,OAAO;EACzB,MAAM,UAAU,IAAI,IAAI;EACxB,MAAM,WAAW,IAAI,IAAI;EACzB,MAAM,OAAO,IAAI,EAAE;EACnB,MAAM,UAAU,IAAI,KAAK;EACzB,MAAM,cAAc,IAAI,CAAC,CAAC;EAC1B,MAAM,SAAS,IAAI,EAAE;EACrB,MAAM,OAAO,eAAe,QAAQ,SAAS,YAAY,MAAM,SAAS,CAAC;EAEzE,MAAM,WAAW,SAAS,MAAM,UAAU,IAAI;EAC9C,MAAM,YAAY,SAAS,MAAM,WAA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