@oneb/ui-vue 0.3.23 → 0.3.25
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/dist/OneHelpMenu-79b2d83f.cjs +1 -0
- package/dist/{OneHelpMenu-a9131cb1.js → OneHelpMenu-df4e18a9.js} +1 -1
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +83 -83
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/periodPicker/index.cjs +1 -1
- package/dist/periodPicker/index.js +1 -1
- package/package.json +4 -3
- package/dist/OneHelpMenu-7f53fa30.cjs +0 -1
- package/dist/floating-ui.dom-2121a4fd.cjs +0 -1
- package/dist/floating-ui.dom-4509432e.js +0 -941
package/dist/dropdown/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as he, e as ye, _ as we, r as ge, f as ke } from "../OneHelpMenu-
|
|
2
|
-
import { O as
|
|
3
|
-
import { defineComponent as X, ref as C, watch as ce, onBeforeUnmount as be, provide as xe, computed as I, openBlock as o, createElementBlock as
|
|
4
|
-
import {
|
|
1
|
+
import { d as he, e as ye, _ as we, r as ge, f as ke } from "../OneHelpMenu-df4e18a9.js";
|
|
2
|
+
import { O as lo, a as so, c as no, b as ro } from "../OneHelpMenu-df4e18a9.js";
|
|
3
|
+
import { defineComponent as X, ref as C, watch as ce, onBeforeUnmount as be, provide as xe, computed as I, openBlock as o, createElementBlock as s, createElementVNode as t, renderSlot as V, normalizeProps as F, guardReactiveProps as P, createBlock as U, Teleport as Ce, createCommentVNode as m, withDirectives as q, normalizeClass as w, toDisplayString as u, vShow as _e, withCtx as z, createVNode as H, unref as y, normalizeStyle as J, Fragment as M, renderList as L, onMounted as $e, onUnmounted as Me, vModelText as se, mergeProps as R, createTextVNode as ne, nextTick as T } from "vue";
|
|
4
|
+
import { computePosition as re, offset as ae, shift as ie, autoUpdate as Ve } from "@floating-ui/dom";
|
|
5
5
|
import { flip as ue } from "@floating-ui/vue";
|
|
6
6
|
import { _ as Ke } from "../_plugin-vue_export-helper-dad06003.js";
|
|
7
7
|
import { _ as de } from "../OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
|
|
@@ -59,7 +59,7 @@ const Ie = ["data-opened"], Be = {
|
|
|
59
59
|
"py-1 shadow-lg ring-black ring-opacity-5 focus:outline-none",
|
|
60
60
|
"overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
|
|
61
61
|
]);
|
|
62
|
-
return (p, i) => (o(),
|
|
62
|
+
return (p, i) => (o(), s("div", {
|
|
63
63
|
class: "relative inline-block",
|
|
64
64
|
"data-opened": c.value
|
|
65
65
|
}, [
|
|
@@ -70,7 +70,7 @@ const Ie = ["data-opened"], Be = {
|
|
|
70
70
|
V(p.$slots, "button", F(P({ onToggle: _, isExpanded: c.value })))
|
|
71
71
|
], 512),
|
|
72
72
|
(o(), U(Ce, { to: "body" }, [
|
|
73
|
-
c.value ? (o(),
|
|
73
|
+
c.value ? (o(), s("div", {
|
|
74
74
|
key: 0,
|
|
75
75
|
class: "fixed top-0 left-0 w-screen h-screen z-[9999]",
|
|
76
76
|
onClick: _
|
|
@@ -84,7 +84,7 @@ const Ie = ["data-opened"], Be = {
|
|
|
84
84
|
tabindex: "-1",
|
|
85
85
|
style: { display: "none" }
|
|
86
86
|
}, [
|
|
87
|
-
p.title ? (o(),
|
|
87
|
+
p.title ? (o(), s("div", Be, u(p.title), 1)) : m("", !0),
|
|
88
88
|
V(p.$slots, "menu", F(P({ onToggle: _ })))
|
|
89
89
|
], 2), [
|
|
90
90
|
[_e, c.value]
|
|
@@ -94,7 +94,7 @@ const Ie = ["data-opened"], Be = {
|
|
|
94
94
|
}
|
|
95
95
|
}), Se = {}, De = { class: "border-t border-secondary-stroke my-1" };
|
|
96
96
|
function ze(S, g) {
|
|
97
|
-
return o(),
|
|
97
|
+
return o(), s("div", De);
|
|
98
98
|
}
|
|
99
99
|
const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { class: "grid" }, Fe = { class: "font-semibold px-3" }, Pe = { class: "rounded-lg m-3 border" }, Ue = {
|
|
100
100
|
class: "space-x-2 flex items-center px-3 py-2",
|
|
@@ -155,8 +155,8 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
155
155
|
t("div", He, [
|
|
156
156
|
t("div", Te, u(d.appsTitle), 1),
|
|
157
157
|
t("div", null, [
|
|
158
|
-
d.apps && d.apps.length ? (o(),
|
|
159
|
-
(o(!0),
|
|
158
|
+
d.apps && d.apps.length ? (o(), s("div", qe, [
|
|
159
|
+
(o(!0), s(M, null, L(f.value, (O) => (o(), s("div", {
|
|
160
160
|
key: O.id,
|
|
161
161
|
onClick: (W) => h(O),
|
|
162
162
|
class: "flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"
|
|
@@ -173,7 +173,7 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
173
173
|
])
|
|
174
174
|
], 8, Je))), 128))
|
|
175
175
|
])) : m("", !0),
|
|
176
|
-
d.apps && d.apps.length > pe ? (o(),
|
|
176
|
+
d.apps && d.apps.length > pe ? (o(), s("button", {
|
|
177
177
|
key: 1,
|
|
178
178
|
onClick: x,
|
|
179
179
|
class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"
|
|
@@ -191,7 +191,7 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
191
191
|
}, ot = {
|
|
192
192
|
key: 1,
|
|
193
193
|
class: "px-3 py-2"
|
|
194
|
-
},
|
|
194
|
+
}, lt = { class: "relative" }, st = ["placeholder"], nt = {
|
|
195
195
|
key: 2,
|
|
196
196
|
class: "border-b border-gray-100"
|
|
197
197
|
}, rt = ["onClick"], at = {
|
|
@@ -300,8 +300,8 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
300
300
|
let h = null;
|
|
301
301
|
$e(() => {
|
|
302
302
|
h = window.matchMedia("(max-width: 767px)"), x.value = h.matches;
|
|
303
|
-
const e = (
|
|
304
|
-
x.value =
|
|
303
|
+
const e = (l) => {
|
|
304
|
+
x.value = l.matches;
|
|
305
305
|
};
|
|
306
306
|
h.addEventListener("change", e), Me(() => {
|
|
307
307
|
h == null || h.removeEventListener("change", e);
|
|
@@ -312,24 +312,24 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
312
312
|
var e;
|
|
313
313
|
(e = _.value) == null || e.focus();
|
|
314
314
|
});
|
|
315
|
-
}, p = C(""), i = C(-1), A = C(null), O = C(null), W = C({}), N = (e,
|
|
316
|
-
e && (W.value[
|
|
315
|
+
}, p = C(""), i = C(-1), A = C(null), O = C(null), W = C({}), N = (e, l) => {
|
|
316
|
+
e && (W.value[l] = e);
|
|
317
317
|
}, D = I(() => n.allowEmpty ? 1 : 0), B = I(() => {
|
|
318
318
|
if (!p.value.trim())
|
|
319
319
|
return n.items;
|
|
320
320
|
const e = p.value.toLowerCase();
|
|
321
321
|
return n.items.filter(
|
|
322
|
-
(
|
|
322
|
+
(l) => String(l[n.labelKey] ?? "").toLowerCase().includes(e)
|
|
323
323
|
);
|
|
324
324
|
}), Y = I(() => {
|
|
325
325
|
if (!n.groupKey)
|
|
326
326
|
return [];
|
|
327
|
-
const e = [],
|
|
327
|
+
const e = [], l = /* @__PURE__ */ new Map();
|
|
328
328
|
let a = D.value;
|
|
329
329
|
for (const r of B.value) {
|
|
330
330
|
const b = String(r[n.groupKey] ?? "");
|
|
331
|
-
let v =
|
|
332
|
-
v || (v = { label: b, entries: [] },
|
|
331
|
+
let v = l.get(b);
|
|
332
|
+
v || (v = { label: b, entries: [] }, l.set(b, v), e.push(v)), v.entries.push({ item: r, flatIndex: a }), a++;
|
|
333
333
|
}
|
|
334
334
|
return e;
|
|
335
335
|
}), $ = I(() => n.multiple ? (n.modelValue ?? []).length > 0 : n.modelValue !== null && n.modelValue !== void 0), E = I(() => {
|
|
@@ -338,7 +338,7 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
338
338
|
return e.length === 0 ? n.placeholder : e.length === 1 ? e[0][n.labelKey] ?? n.placeholder : `${e[0][n.labelKey]} +${e.length - 1}`;
|
|
339
339
|
}
|
|
340
340
|
return n.modelValue === null || n.modelValue === void 0 ? n.placeholder : n.modelValue[n.labelKey] ?? n.placeholder;
|
|
341
|
-
}), k = (e) => n.modelValue ? n.multiple ? n.modelValue.some((a) => a[n.valueKey] === e[n.valueKey]) : n.modelValue[n.valueKey] === e[n.valueKey] : !1, Z = I(() => B.value.length + D.value), j = (e,
|
|
341
|
+
}), k = (e) => n.modelValue ? n.multiple ? n.modelValue.some((a) => a[n.valueKey] === e[n.valueKey]) : n.modelValue[n.valueKey] === e[n.valueKey] : !1, Z = I(() => B.value.length + D.value), j = (e, l) => {
|
|
342
342
|
if (n.multiple) {
|
|
343
343
|
const a = (n.modelValue ?? []).slice();
|
|
344
344
|
if (e === null) {
|
|
@@ -349,7 +349,7 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
349
349
|
r >= 0 ? a.splice(r, 1) : a.push(e), f("update:modelValue", a);
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
|
-
f("update:modelValue", e),
|
|
352
|
+
f("update:modelValue", e), l();
|
|
353
353
|
}, Q = () => {
|
|
354
354
|
f("update:modelValue", [...n.items]);
|
|
355
355
|
}, ee = () => {
|
|
@@ -365,36 +365,36 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
365
365
|
p.value = "", i.value = -1;
|
|
366
366
|
}, oe = () => {
|
|
367
367
|
i.value = 0, f("search", p.value);
|
|
368
|
-
},
|
|
368
|
+
}, le = () => {
|
|
369
369
|
T(() => {
|
|
370
370
|
const e = W.value[i.value];
|
|
371
371
|
e && e.scrollIntoView({ block: "nearest" });
|
|
372
372
|
});
|
|
373
|
-
}, fe = (e,
|
|
373
|
+
}, fe = (e, l) => {
|
|
374
374
|
switch (e.key) {
|
|
375
375
|
case "ArrowDown":
|
|
376
|
-
e.preventDefault(), i.value < Z.value - 1 ? i.value++ : i.value = 0,
|
|
376
|
+
e.preventDefault(), i.value < Z.value - 1 ? i.value++ : i.value = 0, le();
|
|
377
377
|
break;
|
|
378
378
|
case "ArrowUp":
|
|
379
|
-
e.preventDefault(), i.value > 0 ? i.value-- : i.value = Z.value - 1,
|
|
379
|
+
e.preventDefault(), i.value > 0 ? i.value-- : i.value = Z.value - 1, le();
|
|
380
380
|
break;
|
|
381
381
|
case "Enter":
|
|
382
382
|
if (e.preventDefault(), i.value >= 0)
|
|
383
383
|
if (n.allowEmpty && i.value === 0)
|
|
384
|
-
j(null,
|
|
384
|
+
j(null, l);
|
|
385
385
|
else {
|
|
386
386
|
const a = i.value - D.value, r = B.value[a];
|
|
387
|
-
r && j(r,
|
|
387
|
+
r && j(r, l);
|
|
388
388
|
}
|
|
389
389
|
break;
|
|
390
390
|
case "Escape":
|
|
391
|
-
e.preventDefault(),
|
|
391
|
+
e.preventDefault(), l();
|
|
392
392
|
break;
|
|
393
393
|
}
|
|
394
394
|
};
|
|
395
395
|
return ce(p, () => {
|
|
396
396
|
i.value = 0;
|
|
397
|
-
}), (e,
|
|
397
|
+
}), (e, l) => x.value ? (o(), s(M, { key: 1 }, [
|
|
398
398
|
V(e.$slots, "button", F(P({ onToggle: K, isExpanded: y(d).isOpened.value, selectedLabel: E.value })), () => [
|
|
399
399
|
t("button", {
|
|
400
400
|
class: w(["inline-flex items-center justify-between gap-2 text-sm transition-colors", [
|
|
@@ -406,7 +406,7 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
406
406
|
t("span", {
|
|
407
407
|
class: w(["truncate", e.view === "pill" ? "" : $.value ? "text-gray-900" : "text-gray-500"])
|
|
408
408
|
}, u(E.value), 3),
|
|
409
|
-
|
|
409
|
+
l[12] || (l[12] = t("svg", {
|
|
410
410
|
xmlns: "http://www.w3.org/2000/svg",
|
|
411
411
|
fill: "none",
|
|
412
412
|
viewBox: "0 0 24 24",
|
|
@@ -432,9 +432,9 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
432
432
|
}, {
|
|
433
433
|
default: z(() => [
|
|
434
434
|
t("div", gt, [
|
|
435
|
-
e.searchable ? (o(),
|
|
435
|
+
e.searchable ? (o(), s("div", kt, [
|
|
436
436
|
t("div", bt, [
|
|
437
|
-
|
|
437
|
+
l[13] || (l[13] = t("svg", {
|
|
438
438
|
xmlns: "http://www.w3.org/2000/svg",
|
|
439
439
|
fill: "none",
|
|
440
440
|
viewBox: "0 0 24 24",
|
|
@@ -451,22 +451,22 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
451
451
|
q(t("input", {
|
|
452
452
|
ref_key: "mobileSearchInputRef",
|
|
453
453
|
ref: _,
|
|
454
|
-
"onUpdate:modelValue":
|
|
454
|
+
"onUpdate:modelValue": l[2] || (l[2] = (a) => p.value = a),
|
|
455
455
|
type: "text",
|
|
456
456
|
placeholder: e.searchPlaceholder,
|
|
457
457
|
class: "w-full rounded-md border border-gray-300 py-2 pl-8 pr-3 text-sm outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",
|
|
458
458
|
onInput: oe
|
|
459
459
|
}, null, 40, xt), [
|
|
460
|
-
[
|
|
460
|
+
[se, p.value]
|
|
461
461
|
])
|
|
462
462
|
])
|
|
463
463
|
])) : m("", !0),
|
|
464
|
-
e.createLabel ? (o(),
|
|
464
|
+
e.createLabel ? (o(), s("div", Ct, [
|
|
465
465
|
t("button", {
|
|
466
466
|
class: "w-full flex items-center justify-center gap-2 py-2 text-sm text-blue-700 hover:text-blue-500",
|
|
467
|
-
onClick:
|
|
467
|
+
onClick: l[3] || (l[3] = (a) => te(() => y(d).close()))
|
|
468
468
|
}, [
|
|
469
|
-
|
|
469
|
+
l[14] || (l[14] = t("svg", {
|
|
470
470
|
xmlns: "http://www.w3.org/2000/svg",
|
|
471
471
|
fill: "none",
|
|
472
472
|
viewBox: "0 0 24 24",
|
|
@@ -483,28 +483,28 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
483
483
|
t("span", null, u(e.createLabel), 1)
|
|
484
484
|
])
|
|
485
485
|
])) : m("", !0),
|
|
486
|
-
e.multiple ? (o(),
|
|
486
|
+
e.multiple ? (o(), s("div", _t, [
|
|
487
487
|
t("button", {
|
|
488
488
|
class: "text-sm text-blue-600 hover:text-blue-800 transition-colors",
|
|
489
489
|
onClick: Q
|
|
490
490
|
}, u(y(c)("ui.dropdown.selectAll")), 1),
|
|
491
|
-
$.value ? (o(),
|
|
491
|
+
$.value ? (o(), s("button", {
|
|
492
492
|
key: 0,
|
|
493
493
|
class: "text-sm text-gray-500 hover:text-gray-700 transition-colors",
|
|
494
494
|
onClick: ee
|
|
495
495
|
}, u(y(c)("ui.dropdown.clear")), 1)) : m("", !0)
|
|
496
496
|
])) : m("", !0),
|
|
497
|
-
e.isLoading ? (o(),
|
|
497
|
+
e.isLoading ? (o(), s("div", $t, [...l[15] || (l[15] = [
|
|
498
498
|
t("div", { class: "animate-spin w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full" }, null, -1)
|
|
499
|
-
])])) : (o(),
|
|
500
|
-
e.allowEmpty ? (o(),
|
|
499
|
+
])])) : (o(), s("div", Mt, [
|
|
500
|
+
e.allowEmpty ? (o(), s("button", {
|
|
501
501
|
key: 0,
|
|
502
502
|
class: w(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors", $.value ? "" : "bg-gray-50 font-medium"]),
|
|
503
503
|
role: "option",
|
|
504
504
|
"aria-selected": !$.value,
|
|
505
|
-
onClick:
|
|
505
|
+
onClick: l[4] || (l[4] = (a) => j(null, () => y(d).close()))
|
|
506
506
|
}, [
|
|
507
|
-
$.value ? (o(),
|
|
507
|
+
$.value ? (o(), s("span", At)) : (o(), s("svg", Kt, [...l[16] || (l[16] = [
|
|
508
508
|
t("path", {
|
|
509
509
|
"stroke-linecap": "round",
|
|
510
510
|
"stroke-linejoin": "round",
|
|
@@ -513,47 +513,47 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
513
513
|
])])),
|
|
514
514
|
t("span", null, u(e.emptyLabel ?? e.placeholder), 1)
|
|
515
515
|
], 10, Vt)) : m("", !0),
|
|
516
|
-
e.groupKey ? (o(!0),
|
|
516
|
+
e.groupKey ? (o(!0), s(M, { key: 1 }, L(Y.value, (a) => (o(), s(M, {
|
|
517
517
|
key: a.label
|
|
518
518
|
}, [
|
|
519
|
-
a.label ? (o(),
|
|
520
|
-
(o(!0),
|
|
519
|
+
a.label ? (o(), s("div", Ot, u(a.label), 1)) : m("", !0),
|
|
520
|
+
(o(!0), s(M, null, L(a.entries, (r) => (o(), s("button", {
|
|
521
521
|
key: r.item[e.valueKey],
|
|
522
522
|
class: w(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words", k(r.item) ? "bg-gray-50 font-medium" : ""]),
|
|
523
523
|
role: "option",
|
|
524
524
|
"aria-selected": k(r.item),
|
|
525
525
|
onClick: (b) => j(r.item, () => y(d).close())
|
|
526
526
|
}, [
|
|
527
|
-
k(r.item) ? (o(),
|
|
527
|
+
k(r.item) ? (o(), s("svg", It, [...l[17] || (l[17] = [
|
|
528
528
|
t("path", {
|
|
529
529
|
"stroke-linecap": "round",
|
|
530
530
|
"stroke-linejoin": "round",
|
|
531
531
|
d: "M4.5 12.75l6 6 9-13.5"
|
|
532
532
|
}, null, -1)
|
|
533
|
-
])])) : (o(),
|
|
533
|
+
])])) : (o(), s("span", Bt)),
|
|
534
534
|
V(e.$slots, "item", R({ ref_for: !0 }, { item: r.item }), () => [
|
|
535
535
|
t("span", null, u(r.item[e.labelKey]), 1)
|
|
536
536
|
])
|
|
537
537
|
], 10, jt))), 128))
|
|
538
|
-
], 64))), 128)) : (o(!0),
|
|
538
|
+
], 64))), 128)) : (o(!0), s(M, { key: 2 }, L(B.value, (a) => (o(), s("button", {
|
|
539
539
|
key: a[e.valueKey],
|
|
540
540
|
class: w(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words", k(a) ? "bg-gray-50 font-medium" : ""]),
|
|
541
541
|
role: "option",
|
|
542
542
|
"aria-selected": k(a),
|
|
543
543
|
onClick: (r) => j(a, () => y(d).close())
|
|
544
544
|
}, [
|
|
545
|
-
k(a) ? (o(),
|
|
545
|
+
k(a) ? (o(), s("svg", St, [...l[18] || (l[18] = [
|
|
546
546
|
t("path", {
|
|
547
547
|
"stroke-linecap": "round",
|
|
548
548
|
"stroke-linejoin": "round",
|
|
549
549
|
d: "M4.5 12.75l6 6 9-13.5"
|
|
550
550
|
}, null, -1)
|
|
551
|
-
])])) : (o(),
|
|
551
|
+
])])) : (o(), s("span", Dt)),
|
|
552
552
|
V(e.$slots, "item", R({ ref_for: !0 }, { item: a }), () => [
|
|
553
553
|
t("span", null, u(a[e.labelKey]), 1)
|
|
554
554
|
])
|
|
555
555
|
], 10, Lt))), 128)),
|
|
556
|
-
B.value.length === 0 && !e.allowEmpty ? (o(),
|
|
556
|
+
B.value.length === 0 && !e.allowEmpty ? (o(), s("div", zt, [
|
|
557
557
|
V(e.$slots, "empty", {}, () => [
|
|
558
558
|
ne(u(y(c)("ui.dropdown.nothingFound")), 1)
|
|
559
559
|
])
|
|
@@ -582,14 +582,14 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
582
582
|
t("span", {
|
|
583
583
|
class: w(["truncate", e.view === "pill" ? "" : $.value ? "text-gray-900" : "text-gray-500"])
|
|
584
584
|
}, u(E.value), 3),
|
|
585
|
-
(o(),
|
|
585
|
+
(o(), s("svg", {
|
|
586
586
|
xmlns: "http://www.w3.org/2000/svg",
|
|
587
587
|
fill: "none",
|
|
588
588
|
viewBox: "0 0 24 24",
|
|
589
589
|
"stroke-width": "1.5",
|
|
590
590
|
stroke: "currentColor",
|
|
591
591
|
class: w(["w-4 h-4 text-gray-400 transition-transform shrink-0", r ? "rotate-180" : ""])
|
|
592
|
-
}, [...
|
|
592
|
+
}, [...l[5] || (l[5] = [
|
|
593
593
|
t("path", {
|
|
594
594
|
"stroke-linecap": "round",
|
|
595
595
|
"stroke-linejoin": "round",
|
|
@@ -604,10 +604,10 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
604
604
|
class: "min-w-[240px] w-full",
|
|
605
605
|
onKeydown: (r) => fe(r, a)
|
|
606
606
|
}, [
|
|
607
|
-
e.title ? (o(),
|
|
608
|
-
e.searchable ? (o(),
|
|
609
|
-
t("div",
|
|
610
|
-
|
|
607
|
+
e.title ? (o(), s("div", tt, u(e.title), 1)) : m("", !0),
|
|
608
|
+
e.searchable ? (o(), s("div", ot, [
|
|
609
|
+
t("div", lt, [
|
|
610
|
+
l[6] || (l[6] = t("svg", {
|
|
611
611
|
xmlns: "http://www.w3.org/2000/svg",
|
|
612
612
|
fill: "none",
|
|
613
613
|
viewBox: "0 0 24 24",
|
|
@@ -624,22 +624,22 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
624
624
|
q(t("input", {
|
|
625
625
|
ref_key: "searchInputRef",
|
|
626
626
|
ref: A,
|
|
627
|
-
"onUpdate:modelValue":
|
|
627
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => p.value = r),
|
|
628
628
|
type: "text",
|
|
629
629
|
placeholder: e.searchPlaceholder,
|
|
630
630
|
class: "w-full rounded-md border border-gray-300 py-1.5 pl-8 pr-3 text-sm outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",
|
|
631
631
|
onInput: oe
|
|
632
|
-
}, null, 40,
|
|
633
|
-
[
|
|
632
|
+
}, null, 40, st), [
|
|
633
|
+
[se, p.value]
|
|
634
634
|
])
|
|
635
635
|
])
|
|
636
636
|
])) : m("", !0),
|
|
637
|
-
e.createLabel ? (o(),
|
|
637
|
+
e.createLabel ? (o(), s("div", nt, [
|
|
638
638
|
t("button", {
|
|
639
639
|
class: "flex items-center gap-2 w-full px-3 py-2 text-sm text-blue-700 hover:bg-gray-50 transition-colors",
|
|
640
640
|
onClick: (r) => te(a)
|
|
641
641
|
}, [
|
|
642
|
-
|
|
642
|
+
l[7] || (l[7] = t("svg", {
|
|
643
643
|
xmlns: "http://www.w3.org/2000/svg",
|
|
644
644
|
fill: "none",
|
|
645
645
|
viewBox: "0 0 24 24",
|
|
@@ -656,18 +656,18 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
656
656
|
t("span", null, u(e.createLabel), 1)
|
|
657
657
|
], 8, rt)
|
|
658
658
|
])) : m("", !0),
|
|
659
|
-
e.multiple ? (o(),
|
|
659
|
+
e.multiple ? (o(), s("div", at, [
|
|
660
660
|
t("button", {
|
|
661
661
|
class: "text-xs text-blue-600 hover:text-blue-800 transition-colors",
|
|
662
662
|
onClick: Q
|
|
663
663
|
}, u(y(c)("ui.dropdown.selectAll")), 1),
|
|
664
|
-
$.value ? (o(),
|
|
664
|
+
$.value ? (o(), s("button", {
|
|
665
665
|
key: 0,
|
|
666
666
|
class: "text-xs text-gray-500 hover:text-gray-700 transition-colors",
|
|
667
667
|
onClick: ee
|
|
668
668
|
}, u(y(c)("ui.dropdown.clear")), 1)) : m("", !0)
|
|
669
669
|
])) : m("", !0),
|
|
670
|
-
e.isLoading ? (o(),
|
|
670
|
+
e.isLoading ? (o(), s("div", it, [...l[8] || (l[8] = [
|
|
671
671
|
t("svg", {
|
|
672
672
|
class: "animate-spin h-5 w-5 text-gray-400",
|
|
673
673
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -688,14 +688,14 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
688
688
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
689
689
|
})
|
|
690
690
|
], -1)
|
|
691
|
-
])])) : (o(),
|
|
691
|
+
])])) : (o(), s("div", {
|
|
692
692
|
key: 5,
|
|
693
693
|
ref_key: "listRef",
|
|
694
694
|
ref: O,
|
|
695
695
|
class: "max-h-[300px] overflow-y-auto",
|
|
696
696
|
role: "listbox"
|
|
697
697
|
}, [
|
|
698
|
-
e.allowEmpty ? (o(),
|
|
698
|
+
e.allowEmpty ? (o(), s("button", {
|
|
699
699
|
key: 0,
|
|
700
700
|
ref: (r) => N(r, 0),
|
|
701
701
|
class: w(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors", [
|
|
@@ -705,9 +705,9 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
705
705
|
role: "option",
|
|
706
706
|
"aria-selected": !$.value,
|
|
707
707
|
onClick: (r) => j(null, a),
|
|
708
|
-
onMouseenter:
|
|
708
|
+
onMouseenter: l[1] || (l[1] = (r) => i.value = 0)
|
|
709
709
|
}, [
|
|
710
|
-
$.value ? (o(),
|
|
710
|
+
$.value ? (o(), s("span", pt)) : (o(), s("svg", dt, [...l[9] || (l[9] = [
|
|
711
711
|
t("path", {
|
|
712
712
|
"stroke-linecap": "round",
|
|
713
713
|
"stroke-linejoin": "round",
|
|
@@ -716,14 +716,14 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
716
716
|
])])),
|
|
717
717
|
t("span", null, u(e.emptyLabel ?? e.placeholder), 1)
|
|
718
718
|
], 42, ut)) : m("", !0),
|
|
719
|
-
e.groupKey ? (o(!0),
|
|
719
|
+
e.groupKey ? (o(!0), s(M, { key: 1 }, L(Y.value, (r, b) => (o(), s(M, {
|
|
720
720
|
key: r.label
|
|
721
721
|
}, [
|
|
722
|
-
r.label ? (o(),
|
|
722
|
+
r.label ? (o(), s("div", {
|
|
723
723
|
key: 0,
|
|
724
724
|
class: w(["px-3 pt-2 pb-1 text-xs font-semibold text-gray-500 uppercase tracking-wide", b > 0 ? "border-t border-gray-100 mt-1" : ""])
|
|
725
725
|
}, u(r.label), 3)) : m("", !0),
|
|
726
|
-
(o(!0),
|
|
726
|
+
(o(!0), s(M, null, L(r.entries, (v) => (o(), s("button", {
|
|
727
727
|
key: v.item[e.valueKey],
|
|
728
728
|
ref_for: !0,
|
|
729
729
|
ref: (G) => N(G, v.flatIndex),
|
|
@@ -736,18 +736,18 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
736
736
|
onClick: (G) => j(v.item, a),
|
|
737
737
|
onMouseenter: (G) => i.value = v.flatIndex
|
|
738
738
|
}, [
|
|
739
|
-
k(v.item) ? (o(),
|
|
739
|
+
k(v.item) ? (o(), s("svg", vt, [...l[10] || (l[10] = [
|
|
740
740
|
t("path", {
|
|
741
741
|
"stroke-linecap": "round",
|
|
742
742
|
"stroke-linejoin": "round",
|
|
743
743
|
d: "M4.5 12.75l6 6 9-13.5"
|
|
744
744
|
}, null, -1)
|
|
745
|
-
])])) : (o(),
|
|
745
|
+
])])) : (o(), s("span", mt)),
|
|
746
746
|
V(e.$slots, "item", R({ ref_for: !0 }, { item: v.item }), () => [
|
|
747
747
|
t("span", null, u(v.item[e.labelKey]), 1)
|
|
748
748
|
])
|
|
749
749
|
], 42, ct))), 128))
|
|
750
|
-
], 64))), 128)) : (o(!0),
|
|
750
|
+
], 64))), 128)) : (o(!0), s(M, { key: 2 }, L(B.value, (r, b) => (o(), s("button", {
|
|
751
751
|
key: r[e.valueKey],
|
|
752
752
|
ref_for: !0,
|
|
753
753
|
ref: (v) => N(v, D.value + b),
|
|
@@ -760,18 +760,18 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
760
760
|
onClick: (v) => j(r, a),
|
|
761
761
|
onMouseenter: (v) => i.value = D.value + b
|
|
762
762
|
}, [
|
|
763
|
-
k(r) ? (o(),
|
|
763
|
+
k(r) ? (o(), s("svg", ht, [...l[11] || (l[11] = [
|
|
764
764
|
t("path", {
|
|
765
765
|
"stroke-linecap": "round",
|
|
766
766
|
"stroke-linejoin": "round",
|
|
767
767
|
d: "M4.5 12.75l6 6 9-13.5"
|
|
768
768
|
}, null, -1)
|
|
769
|
-
])])) : (o(),
|
|
769
|
+
])])) : (o(), s("span", yt)),
|
|
770
770
|
V(e.$slots, "item", R({ ref_for: !0 }, { item: r }), () => [
|
|
771
771
|
t("span", null, u(r[e.labelKey]), 1)
|
|
772
772
|
])
|
|
773
773
|
], 42, ft))), 128)),
|
|
774
|
-
B.value.length === 0 && !e.allowEmpty ? (o(),
|
|
774
|
+
B.value.length === 0 && !e.allowEmpty ? (o(), s("div", wt, [
|
|
775
775
|
V(e.$slots, "empty", {}, () => [
|
|
776
776
|
ne(u(y(c)("ui.dropdown.nothingFound")), 1)
|
|
777
777
|
])
|
|
@@ -784,12 +784,12 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
|
|
|
784
784
|
}
|
|
785
785
|
});
|
|
786
786
|
export {
|
|
787
|
-
|
|
787
|
+
lo as OneBrowserMenu,
|
|
788
788
|
Qt as OneBrowserMenuGrid,
|
|
789
789
|
we as OneDropdown,
|
|
790
790
|
Le as OneDropdownAuto,
|
|
791
791
|
Zt as OneDropdownDivider,
|
|
792
|
-
|
|
792
|
+
so as OneDropdownItem,
|
|
793
793
|
eo as OneDropdownSelect,
|
|
794
794
|
no as OneHelpMenu,
|
|
795
795
|
ro as OneUserMenu
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./i18n/index.cjs"),c=require("./button/index.cjs"),q=require("./buttonGroup/index.cjs"),t=require("./card/index.cjs"),p=require("./checkbox/index.cjs"),b=require("./collapse/index.cjs"),M=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),P=require("./common/index.cjs");require("./OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs");const D=require("./SpinnerIcon-ccb6f3fc.cjs"),r=require("./OneHelpMenu-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./i18n/index.cjs"),c=require("./button/index.cjs"),q=require("./buttonGroup/index.cjs"),t=require("./card/index.cjs"),p=require("./checkbox/index.cjs"),b=require("./collapse/index.cjs"),M=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),P=require("./common/index.cjs");require("./OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs");const D=require("./SpinnerIcon-ccb6f3fc.cjs"),r=require("./OneHelpMenu-79b2d83f.cjs"),i=require("./dropdown/index.cjs"),d=require("./entityPicker/index.cjs"),_=require("./errorsPage/index.cjs"),n=require("./form/index.cjs"),m=require("./indicators/index.cjs"),I=require("./infobox/index.cjs"),y=require("./label/index.cjs"),a=require("./layout/index.cjs"),l=require("./useModal-98810f6a.cjs"),O=require("./modal/index.cjs"),k=require("./radio/index.cjs"),A=require("./skeleton/index.cjs"),w=require("./switch/index.cjs"),u=require("./toast/index.cjs"),e=require("./periodPicker/index.cjs"),s=require("./dataTable/index.cjs"),E=require("dayjs");require("vue");require("./_plugin-vue_export-helper-f246444f.cjs");require("vue-markdown-render");require("./SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs");require("@floating-ui/dom");require("@floating-ui/vue");require("./XMarkIcon-f94baa4c.cjs");require("./ChevronDownIcon-6889ac87.cjs");require("./ChevronRightIcon-7a2f0c20.cjs");require("./NoSymbolIcon-5d326416.cjs");require("v-calendar");require("./CheckIcon-09b84cf5.cjs");require("dayjs/plugin/advancedFormat");require("dayjs/plugin/isoWeek");require("dayjs/plugin/quarterOfYear");require("dayjs/plugin/utc");require("dayjs/plugin/customParseFormat");exports.OnebI18n=o.OnebI18n;exports.OnebI18nKey=o.OnebI18nKey;exports.defaultTranslations=o.defaultTranslations;exports.useOnebI18n=o.useOnebI18n;exports.OneButton=c.OneButton;exports.OneButtonGroup=q.OneButtonGroup;exports.OneCard=t.OneCard;exports.OneCardBody=t.OneCardBody;exports.OneCardFooter=t.OneCardFooter;exports.OneCardHeader=t.OneCardHeader;exports.OneCheckbox=p.OneCheckbox;exports.OneCollapse=b.OneCollapse;exports.OneAvatar=M._sfc_main;exports.OneMarkdown=P.OneMarkdown;exports.OneSpinnerIcon=D.SpinnerIcon;exports.OneBrowserMenu=r.OneBrowserMenu;exports.OneDropdown=r._sfc_main;exports.OneDropdownItem=r._sfc_main$1;exports.OneHelpMenu=r.OneHelpMenu;exports.OneUserMenu=r._sfc_main$2;exports.OneBrowserMenuGrid=i.OneBrowserMenuGrid;exports.OneDropdownAuto=i.OneDropdownAuto;exports.OneDropdownDivider=i.OneDropdownDivider;exports.OneDropdownSelect=i.OneDropdownSelect;exports.OneEntityPicker=d.OneEntityPicker;exports.defaultEntityPickerTranslations=d.defaultEntityPickerTranslations;exports.OneErrorPage=_.OneErrorPage;exports.OneForm=n.OneForm;exports.OneFormFeedback=n.OneFormFeedback;exports.OneFormField=n.OneFormField;exports.OneFormInput=n.OneFormInput;exports.OneFormLabel=n.OneFormLabel;exports.OneIndicators=m.OneIndicators;exports.OneInfobox=I.OneInfobox;exports.OneLabel=y.OneLabel;exports.OneIslandLayout=a.OneIslandLayout;exports.OneMainLayout=a.OneMainLayout;exports.OneSidebar=a.OneSidebar;exports.OneModal=l.OneModal;exports.useModal=l.useModal;exports.OneModalBody=O.OneModalBody;exports.OneModalFooter=O.OneModalFooter;exports.OneModalHeader=O.OneModalHeader;exports.OneRadio=k.OneRadio;exports.OneSkeleton=A.OneSkeleton;exports.OneSwitch=w.OneSwitch;exports.OneToast=u.OneToast;exports.toastProps=u.toastProps;exports.useToast=u.useToast;exports.DATE_KIND=e.DATE_KIND;exports.MANUAL_DATE_KEY=e.MANUAL_DATE_KEY;exports.MANUAL_RANGE_KEY=e.MANUAL_RANGE_KEY;exports.OnePeriodPicker=e.OnePeriodPicker;exports.OnePeriodPickerFastModal=e.OnePeriodPickerFastModal;exports.PERIOD_KIND=e.PERIOD_KIND;exports.RANGE_KIND=e.RANGE_KIND;exports.buildPreset=e.buildPreset;exports.buildRollingOptions=e.buildRollingOptions;exports.createShortcutPresets=e.createShortcutPresets;exports.determineKind=e.determineKind;exports.formatDateShort=e.formatDateShort;exports.formatPeriod=e.formatPeriod;exports.getOptionGranularity=e.getOptionGranularity;exports.isOptionAllowed=e.isOptionAllowed;exports.parseManualDate=e.parseManualDate;exports.periodPickerSizeConfig=e.periodPickerSizeConfig;exports.toUnixOrNull=e.toUnixOrNull;exports.OneColumn=s.OneColumn;exports.OneDataTable=s.OneDataTable;exports.OneDataTablePaginator=s.OneDataTablePaginator;exports.dayjs=E;
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { _ as R } from "./OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd
|
|
|
8
8
|
import { OneMarkdown as U } from "./common/index.js";
|
|
9
9
|
import "./OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js";
|
|
10
10
|
import { S as v } from "./SpinnerIcon-74648c98.js";
|
|
11
|
-
import { O as j, _ as z, a as q, c as J, b as Q } from "./OneHelpMenu-
|
|
11
|
+
import { O as j, _ as z, a as q, c as J, b as Q } from "./OneHelpMenu-df4e18a9.js";
|
|
12
12
|
import { OneBrowserMenuGrid as W, OneDropdownAuto as X, OneDropdownDivider as Z, OneDropdownSelect as $ } from "./dropdown/index.js";
|
|
13
13
|
import { OneEntityPicker as eo, defaultEntityPickerTranslations as ro } from "./entityPicker/index.js";
|
|
14
14
|
import { OneErrorPage as no } from "./errorsPage/index.js";
|
|
@@ -30,7 +30,7 @@ import "vue";
|
|
|
30
30
|
import "./_plugin-vue_export-helper-dad06003.js";
|
|
31
31
|
import "vue-markdown-render";
|
|
32
32
|
import "./SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js";
|
|
33
|
-
import "
|
|
33
|
+
import "@floating-ui/dom";
|
|
34
34
|
import "@floating-ui/vue";
|
|
35
35
|
import "./XMarkIcon-51ef0691.js";
|
|
36
36
|
import "./ChevronDownIcon-6805ce6c.js";
|