@septkit/ui 0.0.17 → 0.0.19
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/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/dropdown/combobox.vue_vue_type_script_setup_true_lang.js +67 -63
- package/dist/explorer/explorer.js +7 -0
- package/dist/explorer/explorer.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/explorer/index.js +1 -0
- package/dist/external/.pnpm/@vueuse_core@14.2.1_vue@3.5.32_typescript@5.8.3_/node_modules/@vueuse/core/dist/index.js +32 -26
- package/dist/external/.pnpm/lucide-vue-next@1.0.0_vue@3.5.32_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-right.js +8 -0
- package/dist/external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxPortal.js +33 -0
- package/dist/external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/RovingFocus/RovingFocusGroup.js +119 -0
- package/dist/external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/RovingFocus/RovingFocusItem.js +94 -0
- package/dist/external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/RovingFocus/utils.js +17 -6
- package/dist/external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Teleport/Teleport.js +40 -0
- package/dist/external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Tree/TreeItem.js +136 -0
- package/dist/external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Tree/TreeRoot.js +199 -0
- package/dist/external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Tree/utils.js +6 -0
- package/dist/external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/shared/useSelectionBehavior.js +40 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +3 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
|
@@ -5,15 +5,16 @@ import { ComboboxEmpty_default as r } from "../external/.pnpm/reka-ui@2.9.6_vue@
|
|
|
5
5
|
import { ComboboxInput_default as i } from "../external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxInput.js";
|
|
6
6
|
import { ComboboxItem_default as a } from "../external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxItem.js";
|
|
7
7
|
import { ComboboxItemIndicator_default as o } from "../external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxItemIndicator.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { ComboboxPortal_default as s } from "../external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxPortal.js";
|
|
9
|
+
import { ComboboxTrigger_default as c } from "../external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxTrigger.js";
|
|
10
|
+
import { ComboboxViewport_default as l } from "../external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxViewport.js";
|
|
11
|
+
import { Check as u } from "../external/.pnpm/lucide-vue-next@1.0.0_vue@3.5.32_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/check.js";
|
|
12
|
+
import { ChevronDown as d } from "../external/.pnpm/lucide-vue-next@1.0.0_vue@3.5.32_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-down.js";
|
|
13
|
+
import { Fragment as f, computed as p, createBlock as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, mergeModels as b, normalizeClass as x, openBlock as S, renderList as C, renderSlot as w, toDisplayString as T, unref as E, useModel as D, withCtx as O } from "vue";
|
|
13
14
|
//#region lib/dropdown/combobox.vue?vue&type=script&setup=true&lang.ts
|
|
14
|
-
var
|
|
15
|
+
var k = { class: "text-xs" }, A = /* @__PURE__ */ y({
|
|
15
16
|
__name: "combobox",
|
|
16
|
-
props: /* @__PURE__ */
|
|
17
|
+
props: /* @__PURE__ */ b({
|
|
17
18
|
options: {},
|
|
18
19
|
displayValue: {},
|
|
19
20
|
placeholder: {},
|
|
@@ -27,70 +28,73 @@ var O = { class: "text-xs" }, k = /* @__PURE__ */ v({
|
|
|
27
28
|
modelModifiers: {}
|
|
28
29
|
}),
|
|
29
30
|
emits: ["update:modelValue"],
|
|
30
|
-
setup(
|
|
31
|
-
let
|
|
32
|
-
"input-neutral":
|
|
33
|
-
"input-primary":
|
|
34
|
-
"input-secondary":
|
|
35
|
-
"input-accent":
|
|
36
|
-
"input-info":
|
|
37
|
-
"input-success":
|
|
38
|
-
"input-warning":
|
|
39
|
-
"input-error":
|
|
40
|
-
"input-ghost":
|
|
41
|
-
"input-bordered":
|
|
42
|
-
"input-soft":
|
|
43
|
-
"input-dash":
|
|
44
|
-
"input-xs":
|
|
45
|
-
"input-sm":
|
|
46
|
-
"input-md":
|
|
47
|
-
"input-lg":
|
|
48
|
-
"input-xl":
|
|
31
|
+
setup(y) {
|
|
32
|
+
let b = y, A = D(y, "modelValue"), j = p(() => ({
|
|
33
|
+
"input-neutral": b.color === "neutral",
|
|
34
|
+
"input-primary": b.color === "primary",
|
|
35
|
+
"input-secondary": b.color === "secondary",
|
|
36
|
+
"input-accent": b.color === "accent",
|
|
37
|
+
"input-info": b.color === "info",
|
|
38
|
+
"input-success": b.color === "success",
|
|
39
|
+
"input-warning": b.color === "warning",
|
|
40
|
+
"input-error": b.color === "error",
|
|
41
|
+
"input-ghost": b.variant === "ghost",
|
|
42
|
+
"input-bordered": b.variant === "bordered",
|
|
43
|
+
"input-soft": b.variant === "soft",
|
|
44
|
+
"input-dash": b.variant === "dash",
|
|
45
|
+
"input-xs": b.size === "xs",
|
|
46
|
+
"input-sm": b.size === "sm",
|
|
47
|
+
"input-md": b.size === "md",
|
|
48
|
+
"input-lg": b.size === "lg",
|
|
49
|
+
"input-xl": b.size === "xl"
|
|
49
50
|
}));
|
|
50
|
-
function
|
|
51
|
-
return e.filter((e) =>
|
|
51
|
+
function M(e, t) {
|
|
52
|
+
return e.filter((e) => b.displayValue(e).toLowerCase().includes(t.toLowerCase()));
|
|
52
53
|
}
|
|
53
|
-
return (
|
|
54
|
+
return (p, b) => (S(), m(E(e), {
|
|
54
55
|
class: "dropdown w-full",
|
|
55
|
-
modelValue:
|
|
56
|
-
"onUpdate:modelValue":
|
|
57
|
-
"filter-function":
|
|
58
|
-
disabled:
|
|
56
|
+
modelValue: A.value,
|
|
57
|
+
"onUpdate:modelValue": b[0] ||= (e) => A.value = e,
|
|
58
|
+
"filter-function": M,
|
|
59
|
+
disabled: y.disabled
|
|
59
60
|
}, {
|
|
60
|
-
default:
|
|
61
|
-
default:
|
|
61
|
+
default: O(() => [v(E(t), { class: x(["input w-full flex items-center gap-2", j.value]) }, {
|
|
62
|
+
default: O(() => [v(E(i), {
|
|
62
63
|
class: "input-ghost outline-none w-full",
|
|
63
|
-
placeholder:
|
|
64
|
-
"display-value": (e) =>
|
|
65
|
-
}, null, 8, ["placeholder", "display-value"]),
|
|
66
|
-
default:
|
|
64
|
+
placeholder: y.placeholder ?? "Search...",
|
|
65
|
+
"display-value": (e) => y.displayValue(e)
|
|
66
|
+
}, null, 8, ["placeholder", "display-value"]), v(E(c), null, {
|
|
67
|
+
default: O(() => [v(E(d), { class: "h-4 w-4 text-base-content/60 cursor-pointer" })]),
|
|
67
68
|
_: 1
|
|
68
69
|
})]),
|
|
69
70
|
_: 1
|
|
70
|
-
}, 8, ["class"]),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
default:
|
|
81
|
-
default:
|
|
82
|
-
|
|
83
|
-
}), (x(!0), m(d, null, S(v.options, (e) => (x(), p(T(a), {
|
|
84
|
-
key: v.displayValue(e),
|
|
85
|
-
value: e,
|
|
86
|
-
class: "cursor-pointer text-xs leading-none w-full flex items-center gap-2 rounded px-2 h-7 pl-7 relative select-none data-disabled:opacity-40 data-disabled:pointer-events-none data-highlighted:outline-none data-highlighted:bg-primary data-highlighted:text-primary-content"
|
|
87
|
-
}, {
|
|
88
|
-
default: D(() => [_(T(o), { class: "absolute left-0 w-6.25 inline-flex items-center justify-center" }, {
|
|
89
|
-
default: D(() => [_(T(l), { class: "h-3 w-3" })]),
|
|
71
|
+
}, 8, ["class"]), v(E(s), null, {
|
|
72
|
+
default: O(() => [v(E(n), {
|
|
73
|
+
position: "popper",
|
|
74
|
+
"side-offset": 4,
|
|
75
|
+
class: "bg-base-100 rounded-box shadow-md z-50 overflow-hidden",
|
|
76
|
+
style: {
|
|
77
|
+
width: "var(--reka-popper-anchor-width)",
|
|
78
|
+
minWidth: "12rem"
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
default: O(() => [v(E(l), { class: "max-h-52 overflow-y-auto p-1" }, {
|
|
82
|
+
default: O(() => [v(E(r), { class: "text-base-content/60 text-xs text-center py-2" }, {
|
|
83
|
+
default: O(() => [_(T(y.emptyText ?? "No results found"), 1)]),
|
|
90
84
|
_: 1
|
|
91
|
-
}),
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
}), (S(!0), h(f, null, C(y.options, (e) => (S(), m(E(a), {
|
|
86
|
+
key: y.displayValue(e),
|
|
87
|
+
value: e,
|
|
88
|
+
class: "cursor-pointer text-xs leading-none w-full flex items-center gap-2 rounded px-2 h-7 pl-7 relative select-none data-disabled:opacity-40 data-disabled:pointer-events-none data-highlighted:outline-none data-highlighted:bg-primary data-highlighted:text-primary-content"
|
|
89
|
+
}, {
|
|
90
|
+
default: O(() => [v(E(o), { class: "absolute left-0 w-6.25 inline-flex items-center justify-center" }, {
|
|
91
|
+
default: O(() => [v(E(u), { class: "h-3 w-3" })]),
|
|
92
|
+
_: 1
|
|
93
|
+
}), w(p.$slots, "default", { item: e }, () => [g("span", k, T(y.displayValue(e)), 1)])]),
|
|
94
|
+
_: 2
|
|
95
|
+
}, 1032, ["value"]))), 128))]),
|
|
96
|
+
_: 3
|
|
97
|
+
})]),
|
|
94
98
|
_: 3
|
|
95
99
|
})]),
|
|
96
100
|
_: 3
|
|
@@ -100,4 +104,4 @@ var O = { class: "text-xs" }, k = /* @__PURE__ */ v({
|
|
|
100
104
|
}
|
|
101
105
|
});
|
|
102
106
|
//#endregion
|
|
103
|
-
export {
|
|
107
|
+
export { A as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "./explorer.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
//#region lib/explorer/explorer.vue
|
|
5
|
+
var n = /* @__PURE__ */ t(e, [["__scopeId", "data-v-9456afe0"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { TreeRoot_default as e } from "../external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Tree/TreeRoot.js";
|
|
2
|
+
import { TreeItem_default as t } from "../external/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Tree/TreeItem.js";
|
|
3
|
+
import { ChevronRight as n } from "../external/.pnpm/lucide-vue-next@1.0.0_vue@3.5.32_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-right.js";
|
|
4
|
+
import { ELEMENT_TO_COLOR as r, ELEMENT_TO_ICON as i } from "../icons/element-icon-mapper.js";
|
|
5
|
+
import "../icons/index.js";
|
|
6
|
+
import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, mergeProps as d, normalizeClass as f, normalizeStyle as p, openBlock as m, renderList as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, withCtx as y, withModifiers as b } from "vue";
|
|
7
|
+
//#region lib/explorer/explorer.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var x = ["onClick"], S = { class: "flex flex-1 items-center" }, C = ["aria-label", "data-tip"], w = { class: "pl-2" }, T = /* @__PURE__ */ u({
|
|
9
|
+
__name: "explorer",
|
|
10
|
+
props: {
|
|
11
|
+
items: {},
|
|
12
|
+
defaultExpandedItems: { default: () => [] },
|
|
13
|
+
ariaLabel: { default: "SCL Tree" }
|
|
14
|
+
},
|
|
15
|
+
emits: ["select"],
|
|
16
|
+
setup(u, { emit: T }) {
|
|
17
|
+
let E = u, D = T;
|
|
18
|
+
return (u, T) => (m(), o(v(e), {
|
|
19
|
+
class: "explorer-tree list-none select-none w-full text-stone-700 text-sm font-medium",
|
|
20
|
+
items: E.items,
|
|
21
|
+
"get-key": (e) => e.id,
|
|
22
|
+
"default-expanded": E.defaultExpandedItems,
|
|
23
|
+
"aria-label": E.ariaLabel
|
|
24
|
+
}, {
|
|
25
|
+
default: y(({ flattenItems: e }) => [(m(!0), c(a, null, h(e, (e) => (m(), o(v(t), d({ key: e.value.id }, { ref_for: !0 }, e.bind, {
|
|
26
|
+
class: ["explorer-tree__item py-1 my-0.5 rounded outline-none", e.value.selectable === !1 ? "" : "explorer-tree__item--selectable"],
|
|
27
|
+
onSelect: (t) => {
|
|
28
|
+
t.detail.originalEvent.type === "click" || e.value.selectable === !1 ? t.preventDefault() : D("select", e.value);
|
|
29
|
+
},
|
|
30
|
+
onToggle: T[0] ||= (e) => {
|
|
31
|
+
e.detail.originalEvent.type === "click" && e.preventDefault();
|
|
32
|
+
}
|
|
33
|
+
}), {
|
|
34
|
+
default: y(({ handleSelect: t, handleToggle: a }) => [l("div", {
|
|
35
|
+
class: f(["flex items-center", e.value.selectable !== !1 || e.hasChildren ? "cursor-pointer" : "cursor-default"]),
|
|
36
|
+
style: p({ "padding-left": e.level === 1 ? "0rem" : `${e.level - 1.5}rem` }),
|
|
37
|
+
onClick: () => {
|
|
38
|
+
e.value.selectable === !1 ? e.hasChildren && a() : (t(), D("select", e.value));
|
|
39
|
+
}
|
|
40
|
+
}, [e.hasChildren ? (m(), o(v(n), {
|
|
41
|
+
key: 0,
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
class: "explorer-tree__chevron shrink-0",
|
|
44
|
+
size: 16,
|
|
45
|
+
onClick: b((e) => a(), ["stop"])
|
|
46
|
+
}, null, 8, ["onClick"])) : (m(), o(v(n), {
|
|
47
|
+
key: 1,
|
|
48
|
+
"aria-hidden": "true",
|
|
49
|
+
class: "shrink-0 invisible",
|
|
50
|
+
size: 16
|
|
51
|
+
})), l("div", S, [e.value.tag ? (m(), c("div", {
|
|
52
|
+
key: 0,
|
|
53
|
+
role: "img",
|
|
54
|
+
"aria-label": e.value.tag,
|
|
55
|
+
class: f(["explorer-tree__item-tag tooltip flex items-center justify-center rounded-full p-1", v(r)[e.value.tag]?.background]),
|
|
56
|
+
"data-tip": e.value.tag
|
|
57
|
+
}, [v(i)[e.value.tag] ? (m(), o(g(v(i)[e.value.tag]), {
|
|
58
|
+
key: 0,
|
|
59
|
+
class: f(["explorer-tree__item-icon h-4 w-4", v(r)[e.value.tag]?.text])
|
|
60
|
+
}, null, 8, ["class"])) : s("", !0)], 10, C)) : s("", !0), l("span", w, _(e.value.name), 1)])], 14, x)]),
|
|
61
|
+
_: 2
|
|
62
|
+
}, 1040, ["class", "onSelect"]))), 128))]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, [
|
|
65
|
+
"items",
|
|
66
|
+
"get-key",
|
|
67
|
+
"default-expanded",
|
|
68
|
+
"aria-label"
|
|
69
|
+
]));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
//#endregion
|
|
73
|
+
export { T as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./explorer.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { isClient as e, isDef as t, isObject as n, toArray as r, watchImmediate as i } from "../../../../../@vueuse_shared@14.2.1_vue@3.5.32_typescript@5.8.3_/node_modules/@vueuse/shared/dist/index.js";
|
|
2
|
-
import { computed as a, getCurrentInstance as o, nextTick as s,
|
|
2
|
+
import { computed as a, getCurrentInstance as o, nextTick as s, onMounted as c, ref as l, shallowRef as u, toValue as d, unref as f, watch as p } from "vue";
|
|
3
3
|
//#region node_modules/.pnpm/@vueuse+core@14.2.1_vue@3.5.32_typescript@5.8.3_/node_modules/@vueuse/core/dist/index.js
|
|
4
|
-
var
|
|
4
|
+
var m = e ? window : void 0;
|
|
5
5
|
e && window.document, e && window.navigator, e && window.location;
|
|
6
|
-
function
|
|
7
|
-
let t =
|
|
6
|
+
function h(e) {
|
|
7
|
+
let t = d(e);
|
|
8
8
|
return t?.$el ?? t;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function g(...e) {
|
|
11
11
|
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), o = a(() => {
|
|
12
|
-
let t = r(
|
|
12
|
+
let t = r(d(e[0])).filter((e) => e != null);
|
|
13
13
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
14
14
|
});
|
|
15
15
|
return i(() => [
|
|
16
|
-
o.value?.map((e) =>
|
|
17
|
-
r(
|
|
18
|
-
r(
|
|
19
|
-
|
|
16
|
+
o.value?.map((e) => h(e)) ?? [m].filter((e) => e != null),
|
|
17
|
+
r(d(o.value ? e[1] : e[0])),
|
|
18
|
+
r(f(o.value ? e[2] : e[1])),
|
|
19
|
+
d(o.value ? e[3] : e[2])
|
|
20
20
|
], ([e, r, i, a], o, s) => {
|
|
21
21
|
if (!e?.length || !r?.length || !i?.length) return;
|
|
22
22
|
let c = n(a) ? { ...a } : a, l = e.flatMap((e) => r.flatMap((n) => i.map((r) => t(e, n, r, c))));
|
|
@@ -25,32 +25,38 @@ function m(...e) {
|
|
|
25
25
|
});
|
|
26
26
|
}, { flush: "post" });
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function _() {
|
|
29
|
+
let e = u(!1), t = o();
|
|
30
|
+
return t && c(() => {
|
|
31
|
+
e.value = !0;
|
|
32
|
+
}, t), e;
|
|
33
|
+
}
|
|
34
|
+
function v(e) {
|
|
29
35
|
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
30
36
|
}
|
|
31
|
-
function
|
|
37
|
+
function y(...e) {
|
|
32
38
|
let t, n, r = {};
|
|
33
39
|
e.length === 3 ? (t = e[0], n = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], r = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
|
|
34
|
-
let { target: i =
|
|
35
|
-
return
|
|
36
|
-
e.repeat &&
|
|
40
|
+
let { target: i = m, eventName: a = "keydown", passive: o = !1, dedupe: s = !1 } = r, c = v(t);
|
|
41
|
+
return g(i, a, (e) => {
|
|
42
|
+
e.repeat && d(s) || c(e) && n(e);
|
|
37
43
|
}, o);
|
|
38
44
|
}
|
|
39
|
-
function
|
|
45
|
+
function b(e) {
|
|
40
46
|
return JSON.parse(JSON.stringify(e));
|
|
41
47
|
}
|
|
42
|
-
function
|
|
43
|
-
var
|
|
44
|
-
let { clone:
|
|
48
|
+
function x(e, n, r, i = {}) {
|
|
49
|
+
var c, u;
|
|
50
|
+
let { clone: d = !1, passive: f = !1, eventName: m, deep: h = !1, defaultValue: g, shouldEmit: _ } = i, v = o(), y = r || v?.emit || (v == null || (c = v.$emit) == null ? void 0 : c.bind(v)) || (v == null || (u = v.proxy) == null || (u = u.$emit) == null ? void 0 : u.bind(v?.proxy)), x = m;
|
|
45
51
|
n ||= "modelValue", x ||= `update:${n.toString()}`;
|
|
46
|
-
let S = (e) =>
|
|
47
|
-
|
|
52
|
+
let S = (e) => d ? typeof d == "function" ? d(e) : b(e) : e, C = () => t(e[n]) ? S(e[n]) : g, w = (e) => {
|
|
53
|
+
_ ? _(e) && y(x, e) : y(x, e);
|
|
48
54
|
};
|
|
49
|
-
if (
|
|
50
|
-
let t =
|
|
51
|
-
return
|
|
55
|
+
if (f) {
|
|
56
|
+
let t = l(C()), r = !1;
|
|
57
|
+
return p(() => e[n], (e) => {
|
|
52
58
|
r || (r = !0, t.value = S(e), s(() => r = !1));
|
|
53
|
-
}),
|
|
59
|
+
}), p(t, (t) => {
|
|
54
60
|
!r && (t !== e[n] || h) && w(t);
|
|
55
61
|
}, { deep: h }), t;
|
|
56
62
|
} else return a({
|
|
@@ -63,4 +69,4 @@ function v(e, n, r, i = {}) {
|
|
|
63
69
|
});
|
|
64
70
|
}
|
|
65
71
|
//#endregion
|
|
66
|
-
export {
|
|
72
|
+
export { m as defaultWindow, y as onKeyStroke, h as unrefElement, g as useEventListener, _ as useMounted, x as useVModel };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createLucideIcon as e } from "../createLucideIcon.js";
|
|
2
|
+
//#region node_modules/.pnpm/lucide-vue-next@1.0.0_vue@3.5.32_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-right.js
|
|
3
|
+
var t = e("chevron-right", [["path", {
|
|
4
|
+
d: "m9 18 6-6-6-6",
|
|
5
|
+
key: "mthhwq"
|
|
6
|
+
}]]);
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as ChevronRight };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Teleport_default as e } from "../Teleport/Teleport.js";
|
|
2
|
+
import { createBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, unref as s, withCtx as c } from "vue";
|
|
3
|
+
//#region node_modules/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/Combobox/ComboboxPortal.js
|
|
4
|
+
var l = /* @__PURE__ */ n({
|
|
5
|
+
__name: "ComboboxPortal",
|
|
6
|
+
props: {
|
|
7
|
+
to: {
|
|
8
|
+
type: null,
|
|
9
|
+
required: !1
|
|
10
|
+
},
|
|
11
|
+
disabled: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
required: !1
|
|
14
|
+
},
|
|
15
|
+
defer: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
required: !1
|
|
18
|
+
},
|
|
19
|
+
forceMount: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
required: !1
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(n) {
|
|
25
|
+
let l = n;
|
|
26
|
+
return (n, u) => (a(), t(s(e), i(r(l)), {
|
|
27
|
+
default: c(() => [o(n.$slots, "default")]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 16));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
//#endregion
|
|
33
|
+
export { l as ComboboxPortal_default };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { createContext as e } from "../shared/createContext.js";
|
|
2
|
+
import { useVModel as t } from "../../../../../@vueuse_core@14.2.1_vue@3.5.32_typescript@5.8.3_/node_modules/@vueuse/core/dist/index.js";
|
|
3
|
+
import { useDirection as n } from "../shared/useDirection.js";
|
|
4
|
+
import { Primitive as r } from "../Primitive/Primitive.js";
|
|
5
|
+
import { useCollection as i } from "../Collection/Collection.js";
|
|
6
|
+
import { ENTRY_FOCUS as a, EVENT_OPTIONS as o, focusFirst as s } from "./utils.js";
|
|
7
|
+
import { createBlock as c, createVNode as l, defineComponent as u, openBlock as d, ref as f, renderSlot as p, toRefs as m, unref as h, withCtx as g } from "vue";
|
|
8
|
+
//#region node_modules/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/RovingFocus/RovingFocusGroup.js
|
|
9
|
+
var [_, v] = /* @__PURE__ */ e("RovingFocusGroup"), y = /* @__PURE__ */ u({
|
|
10
|
+
__name: "RovingFocusGroup",
|
|
11
|
+
props: {
|
|
12
|
+
orientation: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: !1,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
dir: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: !1
|
|
20
|
+
},
|
|
21
|
+
loop: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
required: !1,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
currentTabStopId: {
|
|
27
|
+
type: [String, null],
|
|
28
|
+
required: !1
|
|
29
|
+
},
|
|
30
|
+
defaultCurrentTabStopId: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: !1
|
|
33
|
+
},
|
|
34
|
+
preventScrollOnEntryFocus: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
required: !1,
|
|
37
|
+
default: !1
|
|
38
|
+
},
|
|
39
|
+
asChild: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
required: !1
|
|
42
|
+
},
|
|
43
|
+
as: {
|
|
44
|
+
type: null,
|
|
45
|
+
required: !1
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
emits: ["entryFocus", "update:currentTabStopId"],
|
|
49
|
+
setup(e, { expose: u, emit: _ }) {
|
|
50
|
+
let y = e, b = _, { loop: x, orientation: S, dir: C } = m(y), w = n(C), T = t(y, "currentTabStopId", b, {
|
|
51
|
+
defaultValue: y.defaultCurrentTabStopId,
|
|
52
|
+
passive: y.currentTabStopId === void 0
|
|
53
|
+
}), E = f(!1), D = f(!1), O = f(0), { getItems: k, CollectionSlot: A } = i({ isProvider: !0 });
|
|
54
|
+
function j(e) {
|
|
55
|
+
let t = !D.value;
|
|
56
|
+
if (e.currentTarget && e.target === e.currentTarget && t && !E.value) {
|
|
57
|
+
let t = new CustomEvent(a, o);
|
|
58
|
+
if (e.currentTarget.dispatchEvent(t), b("entryFocus", t), !t.defaultPrevented) {
|
|
59
|
+
let e = k().map((e) => e.ref).filter((e) => e.dataset.disabled !== "");
|
|
60
|
+
s([
|
|
61
|
+
e.find((e) => e.getAttribute("data-active") === ""),
|
|
62
|
+
e.find((e) => e.getAttribute("data-highlighted") === ""),
|
|
63
|
+
e.find((e) => e.id === T.value),
|
|
64
|
+
...e
|
|
65
|
+
].filter(Boolean), y.preventScrollOnEntryFocus);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
D.value = !1;
|
|
69
|
+
}
|
|
70
|
+
function M() {
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
D.value = !1;
|
|
73
|
+
}, 1);
|
|
74
|
+
}
|
|
75
|
+
return u({ getItems: k }), v({
|
|
76
|
+
loop: x,
|
|
77
|
+
dir: w,
|
|
78
|
+
orientation: S,
|
|
79
|
+
currentTabStopId: T,
|
|
80
|
+
onItemFocus: (e) => {
|
|
81
|
+
T.value = e;
|
|
82
|
+
},
|
|
83
|
+
onItemShiftTab: () => {
|
|
84
|
+
E.value = !0;
|
|
85
|
+
},
|
|
86
|
+
onFocusableItemAdd: () => {
|
|
87
|
+
O.value++;
|
|
88
|
+
},
|
|
89
|
+
onFocusableItemRemove: () => {
|
|
90
|
+
O.value--;
|
|
91
|
+
}
|
|
92
|
+
}), (e, t) => (d(), c(h(A), null, {
|
|
93
|
+
default: g(() => [l(h(r), {
|
|
94
|
+
tabindex: E.value || O.value === 0 ? -1 : 0,
|
|
95
|
+
"data-orientation": h(S),
|
|
96
|
+
as: e.as,
|
|
97
|
+
"as-child": e.asChild,
|
|
98
|
+
dir: h(w),
|
|
99
|
+
style: { outline: "none" },
|
|
100
|
+
onMousedown: t[0] ||= (e) => D.value = !0,
|
|
101
|
+
onMouseup: M,
|
|
102
|
+
onFocus: j,
|
|
103
|
+
onBlur: t[1] ||= (e) => E.value = !1
|
|
104
|
+
}, {
|
|
105
|
+
default: g(() => [p(e.$slots, "default")]),
|
|
106
|
+
_: 3
|
|
107
|
+
}, 8, [
|
|
108
|
+
"tabindex",
|
|
109
|
+
"data-orientation",
|
|
110
|
+
"as",
|
|
111
|
+
"as-child",
|
|
112
|
+
"dir"
|
|
113
|
+
])]),
|
|
114
|
+
_: 3
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
//#endregion
|
|
119
|
+
export { y as RovingFocusGroup_default, _ as injectRovingFocusGroupContext };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { useId as e } from "../shared/useId.js";
|
|
2
|
+
import { Primitive as t } from "../Primitive/Primitive.js";
|
|
3
|
+
import { useCollection as n } from "../Collection/Collection.js";
|
|
4
|
+
import { focusFirst as r, getFocusIntent as i, wrapArray as a } from "./utils.js";
|
|
5
|
+
import { injectRovingFocusGroupContext as o } from "./RovingFocusGroup.js";
|
|
6
|
+
import { computed as s, createBlock as c, createVNode as l, defineComponent as u, nextTick as d, onMounted as f, onUnmounted as p, openBlock as m, renderSlot as h, unref as g, withCtx as _ } from "vue";
|
|
7
|
+
//#region node_modules/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/RovingFocus/RovingFocusItem.js
|
|
8
|
+
var v = /* @__PURE__ */ u({
|
|
9
|
+
__name: "RovingFocusItem",
|
|
10
|
+
props: {
|
|
11
|
+
tabStopId: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: !1
|
|
14
|
+
},
|
|
15
|
+
focusable: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
required: !1,
|
|
18
|
+
default: !0
|
|
19
|
+
},
|
|
20
|
+
active: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
required: !1
|
|
23
|
+
},
|
|
24
|
+
allowShiftKey: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
required: !1
|
|
27
|
+
},
|
|
28
|
+
asChild: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
required: !1
|
|
31
|
+
},
|
|
32
|
+
as: {
|
|
33
|
+
type: null,
|
|
34
|
+
required: !1,
|
|
35
|
+
default: "span"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
setup(u) {
|
|
39
|
+
let v = u, y = o(), b = e(), x = s(() => v.tabStopId || b), S = s(() => y.currentTabStopId.value === x.value), { getItems: C, CollectionItem: w } = n();
|
|
40
|
+
f(() => {
|
|
41
|
+
v.focusable && y.onFocusableItemAdd();
|
|
42
|
+
}), p(() => {
|
|
43
|
+
v.focusable && y.onFocusableItemRemove();
|
|
44
|
+
});
|
|
45
|
+
function T(e) {
|
|
46
|
+
if (e.key === "Tab" && e.shiftKey) {
|
|
47
|
+
y.onItemShiftTab();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (e.target !== e.currentTarget) return;
|
|
51
|
+
let t = i(e, y.orientation.value, y.dir.value);
|
|
52
|
+
if (t !== void 0) {
|
|
53
|
+
if (e.metaKey || e.ctrlKey || e.altKey || !v.allowShiftKey && e.shiftKey) return;
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
let n = [...C().map((e) => e.ref).filter((e) => e.dataset.disabled !== "")];
|
|
56
|
+
if (t === "last") n.reverse();
|
|
57
|
+
else if (t === "prev" || t === "next") {
|
|
58
|
+
t === "prev" && n.reverse();
|
|
59
|
+
let r = n.indexOf(e.currentTarget);
|
|
60
|
+
n = y.loop.value ? a(n, r + 1) : n.slice(r + 1);
|
|
61
|
+
}
|
|
62
|
+
d(() => r(n));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return (e, n) => (m(), c(g(w), null, {
|
|
66
|
+
default: _(() => [l(g(t), {
|
|
67
|
+
tabindex: S.value ? 0 : -1,
|
|
68
|
+
"data-orientation": g(y).orientation.value,
|
|
69
|
+
"data-active": e.active ? "" : void 0,
|
|
70
|
+
"data-disabled": e.focusable ? void 0 : "",
|
|
71
|
+
as: e.as,
|
|
72
|
+
"as-child": e.asChild,
|
|
73
|
+
onMousedown: n[0] ||= (t) => {
|
|
74
|
+
e.focusable ? g(y).onItemFocus(x.value) : t.preventDefault();
|
|
75
|
+
},
|
|
76
|
+
onFocus: n[1] ||= (e) => g(y).onItemFocus(x.value),
|
|
77
|
+
onKeydown: T
|
|
78
|
+
}, {
|
|
79
|
+
default: _(() => [h(e.$slots, "default")]),
|
|
80
|
+
_: 3
|
|
81
|
+
}, 8, [
|
|
82
|
+
"tabindex",
|
|
83
|
+
"data-orientation",
|
|
84
|
+
"data-active",
|
|
85
|
+
"data-disabled",
|
|
86
|
+
"as",
|
|
87
|
+
"as-child"
|
|
88
|
+
])]),
|
|
89
|
+
_: 3
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
//#endregion
|
|
94
|
+
export { v as RovingFocusItem_default };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { getActiveElement as e } from "../shared/getActiveElement.js";
|
|
1
2
|
//#region node_modules/.pnpm/reka-ui@2.9.6_vue@3.5.32_typescript@5.8.3_/node_modules/reka-ui/dist/RovingFocus/utils.js
|
|
2
|
-
var
|
|
3
|
+
var t = "rovingFocusGroup.onEntryFocus", n = {
|
|
4
|
+
bubbles: !1,
|
|
5
|
+
cancelable: !0
|
|
6
|
+
}, r = {
|
|
3
7
|
ArrowLeft: "prev",
|
|
4
8
|
ArrowUp: "prev",
|
|
5
9
|
ArrowRight: "next",
|
|
@@ -9,12 +13,19 @@ var e = {
|
|
|
9
13
|
PageDown: "last",
|
|
10
14
|
End: "last"
|
|
11
15
|
};
|
|
12
|
-
function
|
|
16
|
+
function i(e, t) {
|
|
13
17
|
return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
|
|
14
18
|
}
|
|
15
|
-
function
|
|
16
|
-
let a =
|
|
17
|
-
if (!(
|
|
19
|
+
function a(e, t, n) {
|
|
20
|
+
let a = i(e.key, n);
|
|
21
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a))) return r[a];
|
|
22
|
+
}
|
|
23
|
+
function o(t, n = !1) {
|
|
24
|
+
let r = e();
|
|
25
|
+
for (let i of t) if (i === r || (i.focus({ preventScroll: n }), e() !== r)) return;
|
|
26
|
+
}
|
|
27
|
+
function s(e, t) {
|
|
28
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
18
29
|
}
|
|
19
30
|
//#endregion
|
|
20
|
-
export { n as getFocusIntent };
|
|
31
|
+
export { t as ENTRY_FOCUS, n as EVENT_OPTIONS, r as MAP_KEY_TO_FOCUS_INTENT, o as focusFirst, a as getFocusIntent, s as wrapArray };
|