rei-kit 2.8.0 → 2.9.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/README.md +4 -4
- package/dist/{SettingsRow-BXFn8tCk.js → BaseButton-RN2an975.js} +5 -66
- package/dist/BaseButton-RN2an975.js.map +1 -0
- package/dist/BaseSkeleton-BWTNXVwP.js +171 -0
- package/dist/BaseSkeleton-BWTNXVwP.js.map +1 -0
- package/dist/{GoogleButton-DVro7xZH.js → GoogleButton-DS08ayQ-.js} +4 -37
- package/dist/GoogleButton-DS08ayQ-.js.map +1 -0
- package/dist/SettingsRow-Ct1p2C9Q.js +65 -0
- package/dist/SettingsRow-Ct1p2C9Q.js.map +1 -0
- package/dist/app.js +4 -3
- package/dist/app.js.map +1 -1
- package/dist/components/BaseChip.vue.d.ts +4 -0
- package/dist/index.js +192 -313
- package/dist/index.js.map +1 -1
- package/dist/{inert-TJG_g0d6.js → inert-BRQcZwpX.js} +36 -2
- package/dist/inert-BRQcZwpX.js.map +1 -0
- package/dist/pwa.js +2 -1
- package/dist/pwa.js.map +1 -1
- package/dist/styles.css +238 -82
- package/dist/web/BaseSplitter.vue.d.ts +47 -0
- package/dist/web/BaseToolbar.vue.d.ts +30 -0
- package/dist/web/BaseTree.vue.d.ts +42 -0
- package/dist/web/TransferList.vue.d.ts +35 -0
- package/dist/web/index.d.ts +9 -0
- package/dist/web.js +521 -77
- package/dist/web.js.map +1 -1
- package/package.json +2 -2
- package/dist/BaseSkeleton-B-oo7JKE.js +0 -43
- package/dist/BaseSkeleton-B-oo7JKE.js.map +0 -1
- package/dist/GoogleButton-DVro7xZH.js.map +0 -1
- package/dist/SettingsRow-BXFn8tCk.js.map +0 -1
- package/dist/inert-TJG_g0d6.js.map +0 -1
package/dist/web.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as ensureSheetRoot, n as useBoundValue, t as inertOutside } from "./inert-BRQcZwpX.js";
|
|
2
2
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { t as BaseButton_default } from "./BaseButton-RN2an975.js";
|
|
4
|
+
import { n as BaseListbox_default, t as BaseSkeleton_default } from "./BaseSkeleton-BWTNXVwP.js";
|
|
5
|
+
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useId, useModel, useTemplateRef, vModelText, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
6
|
+
import { ArrowDown, ArrowUp, ChevronLeft, ChevronRight, ChevronsUpDown, Search } from "lucide-vue-next";
|
|
6
7
|
import { RouterLink } from "vue-router";
|
|
7
8
|
//#region src/web/BaseAccordion.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var _hoisted_1$
|
|
9
|
-
var _hoisted_2$
|
|
9
|
+
var _hoisted_1$13 = { class: "rk-accordion" };
|
|
10
|
+
var _hoisted_2$12 = [
|
|
10
11
|
"aria-expanded",
|
|
11
12
|
"aria-controls",
|
|
12
13
|
"onClick"
|
|
13
14
|
];
|
|
14
|
-
var _hoisted_3$
|
|
15
|
-
var _hoisted_4$
|
|
15
|
+
var _hoisted_3$10 = { class: "rk-accordion-title" };
|
|
16
|
+
var _hoisted_4$8 = {
|
|
16
17
|
class: "rk-accordion-mark",
|
|
17
18
|
"aria-hidden": "true"
|
|
18
19
|
};
|
|
19
|
-
var _hoisted_5$
|
|
20
|
-
var _hoisted_6$
|
|
20
|
+
var _hoisted_5$6 = ["id"];
|
|
21
|
+
var _hoisted_6$5 = { class: "rk-accordion-clip" };
|
|
21
22
|
//#endregion
|
|
22
23
|
//#region src/web/BaseAccordion.vue
|
|
23
24
|
var BaseAccordion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -39,7 +40,7 @@ var BaseAccordion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
39
40
|
else open.value = __props.multiple ? [...open.value, key] : [key];
|
|
40
41
|
}
|
|
41
42
|
return (_ctx, _cache) => {
|
|
42
|
-
return openBlock(), createElementBlock("ul", _hoisted_1$
|
|
43
|
+
return openBlock(), createElementBlock("ul", _hoisted_1$13, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
43
44
|
return openBlock(), createElementBlock("li", {
|
|
44
45
|
key: item.key,
|
|
45
46
|
class: "rk-accordion-item"
|
|
@@ -50,32 +51,32 @@ var BaseAccordion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
50
51
|
"aria-expanded": isOpen(item.key),
|
|
51
52
|
"aria-controls": `${unref(uid)}-${item.key}`,
|
|
52
53
|
onClick: ($event) => toggle(item.key)
|
|
53
|
-
}, [createElementVNode("span", _hoisted_3$
|
|
54
|
+
}, [createElementVNode("span", _hoisted_3$10, [renderSlot(_ctx.$slots, "title", {
|
|
54
55
|
item,
|
|
55
56
|
open: isOpen(item.key)
|
|
56
|
-
}, () => [createTextVNode(toDisplayString(item.title), 1)], true)]), createElementVNode("span", _hoisted_4$
|
|
57
|
+
}, () => [createTextVNode(toDisplayString(item.title), 1)], true)]), createElementVNode("span", _hoisted_4$8, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "rk-accordion-bar" }, null, -1)), createElementVNode("span", { class: normalizeClass(["rk-accordion-bar rk-accordion-bar-turn", { "is-open": isOpen(item.key) }]) }, null, 2)])], 8, _hoisted_2$12)]),
|
|
57
58
|
_: 2
|
|
58
59
|
}, 1024)), createElementVNode("div", {
|
|
59
60
|
id: `${unref(uid)}-${item.key}`,
|
|
60
61
|
class: normalizeClass(["rk-accordion-panel", { "is-open": isOpen(item.key) }])
|
|
61
|
-
}, [createElementVNode("div", _hoisted_6$
|
|
62
|
+
}, [createElementVNode("div", _hoisted_6$5, [createElementVNode("div", { class: normalizeClass(["rk-accordion-body", { "is-open": isOpen(item.key) }]) }, [renderSlot(_ctx.$slots, "default", {
|
|
62
63
|
item,
|
|
63
64
|
open: isOpen(item.key)
|
|
64
|
-
}, void 0, true)], 2)])], 10, _hoisted_5$
|
|
65
|
+
}, void 0, true)], 2)])], 10, _hoisted_5$6)]);
|
|
65
66
|
}), 128))]);
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
}), [["__scopeId", "data-v-03e2e1d0"]]);
|
|
69
70
|
//#endregion
|
|
70
71
|
//#region src/web/BaseBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
71
|
-
var _hoisted_1$
|
|
72
|
-
var _hoisted_2$
|
|
73
|
-
var _hoisted_3$
|
|
72
|
+
var _hoisted_1$12 = ["aria-label"];
|
|
73
|
+
var _hoisted_2$11 = { class: "rk-crumbs" };
|
|
74
|
+
var _hoisted_3$9 = {
|
|
74
75
|
key: 1,
|
|
75
76
|
class: "rk-crumb-current",
|
|
76
77
|
"aria-current": "page"
|
|
77
78
|
};
|
|
78
|
-
var _hoisted_4$
|
|
79
|
+
var _hoisted_4$7 = {
|
|
79
80
|
key: 2,
|
|
80
81
|
class: "rk-crumb-sep",
|
|
81
82
|
"aria-hidden": "true"
|
|
@@ -90,7 +91,7 @@ var BaseBreadcrumb_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
90
91
|
},
|
|
91
92
|
setup(__props) {
|
|
92
93
|
return (_ctx, _cache) => {
|
|
93
|
-
return openBlock(), createElementBlock("nav", { "aria-label": __props.label || void 0 }, [createElementVNode("ol", _hoisted_2$
|
|
94
|
+
return openBlock(), createElementBlock("nav", { "aria-label": __props.label || void 0 }, [createElementVNode("ol", _hoisted_2$11, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
94
95
|
return openBlock(), createElementBlock("li", {
|
|
95
96
|
key: item.label,
|
|
96
97
|
class: "rk-crumb"
|
|
@@ -101,22 +102,22 @@ var BaseBreadcrumb_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
101
102
|
}, {
|
|
102
103
|
default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1)]),
|
|
103
104
|
_: 2
|
|
104
|
-
}, 1032, ["to"])) : (openBlock(), createElementBlock("span", _hoisted_3$
|
|
105
|
-
}), 128))])], 8, _hoisted_1$
|
|
105
|
+
}, 1032, ["to"])) : (openBlock(), createElementBlock("span", _hoisted_3$9, toDisplayString(item.label), 1)), index < __props.items.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$7, "/")) : createCommentVNode("", true)]);
|
|
106
|
+
}), 128))])], 8, _hoisted_1$12);
|
|
106
107
|
};
|
|
107
108
|
}
|
|
108
109
|
}), [["__scopeId", "data-v-dcc01b03"]]);
|
|
109
110
|
//#endregion
|
|
110
111
|
//#region src/web/BaseDisclosure.vue?vue&type=script&setup=true&lang.ts
|
|
111
|
-
var _hoisted_1$
|
|
112
|
-
var _hoisted_2$
|
|
113
|
-
var _hoisted_3$
|
|
114
|
-
var _hoisted_4$
|
|
112
|
+
var _hoisted_1$11 = { class: "rk-disclosure" };
|
|
113
|
+
var _hoisted_2$10 = ["aria-expanded", "aria-controls"];
|
|
114
|
+
var _hoisted_3$8 = { class: "rk-disclosure-title" };
|
|
115
|
+
var _hoisted_4$6 = {
|
|
115
116
|
class: "rk-disclosure-mark",
|
|
116
117
|
"aria-hidden": "true"
|
|
117
118
|
};
|
|
118
|
-
var _hoisted_5$
|
|
119
|
-
var _hoisted_6$
|
|
119
|
+
var _hoisted_5$5 = ["id"];
|
|
120
|
+
var _hoisted_6$4 = { class: "rk-disclosure-clip" };
|
|
120
121
|
//#endregion
|
|
121
122
|
//#region src/web/BaseDisclosure.vue
|
|
122
123
|
var BaseDisclosure_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -136,30 +137,30 @@ var BaseDisclosure_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
136
137
|
const open = useModel(__props, "modelValue");
|
|
137
138
|
const id = useId();
|
|
138
139
|
return (_ctx, _cache) => {
|
|
139
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
140
|
+
return openBlock(), createElementBlock("div", _hoisted_1$11, [(openBlock(), createBlock(resolveDynamicComponent(`h${__props.headingLevel}`), null, {
|
|
140
141
|
default: withCtx(() => [createElementVNode("button", {
|
|
141
142
|
type: "button",
|
|
142
143
|
class: "rk-disclosure-control",
|
|
143
144
|
"aria-expanded": open.value,
|
|
144
145
|
"aria-controls": unref(id),
|
|
145
146
|
onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
|
|
146
|
-
}, [createElementVNode("span", _hoisted_3$
|
|
147
|
+
}, [createElementVNode("span", _hoisted_3$8, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)], true)]), createElementVNode("span", _hoisted_4$6, [_cache[1] || (_cache[1] = createElementVNode("span", { class: "rk-disclosure-bar" }, null, -1)), createElementVNode("span", { class: normalizeClass(["rk-disclosure-bar rk-disclosure-turn", { "is-open": open.value }]) }, null, 2)])], 8, _hoisted_2$10)]),
|
|
147
148
|
_: 3
|
|
148
149
|
})), createElementVNode("div", {
|
|
149
150
|
id: unref(id),
|
|
150
151
|
class: normalizeClass(["rk-disclosure-panel", { "is-open": open.value }])
|
|
151
|
-
}, [createElementVNode("div", _hoisted_6$
|
|
152
|
+
}, [createElementVNode("div", _hoisted_6$4, [createElementVNode("div", { class: normalizeClass(["rk-disclosure-body", { "is-open": open.value }]) }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 2)])], 10, _hoisted_5$5)]);
|
|
152
153
|
};
|
|
153
154
|
}
|
|
154
155
|
}), [["__scopeId", "data-v-ad5c09f5"]]);
|
|
155
156
|
//#endregion
|
|
156
157
|
//#region src/web/BaseModal.vue?vue&type=script&setup=true&lang.ts
|
|
157
|
-
var _hoisted_1$
|
|
158
|
-
var _hoisted_2$
|
|
159
|
-
var _hoisted_3$
|
|
160
|
-
var _hoisted_4$
|
|
161
|
-
var _hoisted_5$
|
|
162
|
-
var _hoisted_6$
|
|
158
|
+
var _hoisted_1$10 = ["role", "aria-label"];
|
|
159
|
+
var _hoisted_2$9 = { class: "rk-modal-head" };
|
|
160
|
+
var _hoisted_3$7 = { class: "rk-modal-title" };
|
|
161
|
+
var _hoisted_4$5 = ["aria-label"];
|
|
162
|
+
var _hoisted_5$4 = { class: "rk-modal-body" };
|
|
163
|
+
var _hoisted_6$3 = {
|
|
163
164
|
key: 0,
|
|
164
165
|
class: "rk-modal-actions"
|
|
165
166
|
};
|
|
@@ -191,7 +192,7 @@ var _hoisted_6$2 = {
|
|
|
191
192
|
* why this listens for a press on the backdrop itself rather than any click
|
|
192
193
|
* that reaches it.
|
|
193
194
|
*/
|
|
194
|
-
var FOCUSABLE = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
195
|
+
var FOCUSABLE$1 = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
195
196
|
//#endregion
|
|
196
197
|
//#region src/web/BaseModal.vue
|
|
197
198
|
var BaseModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -221,7 +222,7 @@ var BaseModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
221
222
|
let releaseInert = null;
|
|
222
223
|
function focusable() {
|
|
223
224
|
if (!panel.value) return [];
|
|
224
|
-
return Array.from(panel.value.querySelectorAll(FOCUSABLE));
|
|
225
|
+
return Array.from(panel.value.querySelectorAll(FOCUSABLE$1));
|
|
225
226
|
}
|
|
226
227
|
function onKeydown(event) {
|
|
227
228
|
if (event.key === "Escape" && __props.dismissible) {
|
|
@@ -278,7 +279,7 @@ var BaseModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
278
279
|
"aria-label": __props.title,
|
|
279
280
|
tabindex: "-1"
|
|
280
281
|
}, [
|
|
281
|
-
createElementVNode("div", _hoisted_2$
|
|
282
|
+
createElementVNode("div", _hoisted_2$9, [createElementVNode("h2", _hoisted_3$7, toDisplayString(__props.title), 1), __props.dismissible ? (openBlock(), createElementBlock("button", {
|
|
282
283
|
key: 0,
|
|
283
284
|
type: "button",
|
|
284
285
|
class: "rk-modal-close",
|
|
@@ -292,10 +293,10 @@ var BaseModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
292
293
|
}, [createElementVNode("path", {
|
|
293
294
|
d: "M18 6 6 18M6 6l12 12",
|
|
294
295
|
"stroke-linecap": "round"
|
|
295
|
-
})], -1)])], 8, _hoisted_4$
|
|
296
|
-
createElementVNode("div", _hoisted_5$
|
|
297
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
298
|
-
], 8, _hoisted_1$
|
|
296
|
+
})], -1)])], 8, _hoisted_4$5)) : createCommentVNode("", true)]),
|
|
297
|
+
createElementVNode("div", _hoisted_5$4, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
|
|
298
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_6$3, [renderSlot(_ctx.$slots, "actions", {}, void 0, true)])) : createCommentVNode("", true)
|
|
299
|
+
], 8, _hoisted_1$10)], 32)) : createCommentVNode("", true)]),
|
|
299
300
|
_: 3
|
|
300
301
|
})]);
|
|
301
302
|
};
|
|
@@ -303,15 +304,15 @@ var BaseModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
303
304
|
}), [["__scopeId", "data-v-61956691"]]);
|
|
304
305
|
//#endregion
|
|
305
306
|
//#region src/web/BasePagination.vue?vue&type=script&setup=true&lang.ts
|
|
306
|
-
var _hoisted_1$
|
|
307
|
-
var _hoisted_2$
|
|
308
|
-
var _hoisted_3$
|
|
307
|
+
var _hoisted_1$9 = ["aria-label"];
|
|
308
|
+
var _hoisted_2$8 = ["disabled", "aria-label"];
|
|
309
|
+
var _hoisted_3$6 = {
|
|
309
310
|
key: 0,
|
|
310
311
|
class: "rk-pager-gap",
|
|
311
312
|
"aria-hidden": "true"
|
|
312
313
|
};
|
|
313
|
-
var _hoisted_4$
|
|
314
|
-
var _hoisted_5$
|
|
314
|
+
var _hoisted_4$4 = ["aria-current", "onClick"];
|
|
315
|
+
var _hoisted_5$3 = ["disabled", "aria-label"];
|
|
315
316
|
/**
|
|
316
317
|
* Moving between pages of a list.
|
|
317
318
|
*
|
|
@@ -374,15 +375,15 @@ var BasePagination_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
374
375
|
disabled: __props.page <= 1,
|
|
375
376
|
"aria-label": __props.previousLabel,
|
|
376
377
|
onClick: _cache[0] || (_cache[0] = ($event) => go(__props.page - 1))
|
|
377
|
-
}, " ‹ ", 8, _hoisted_2$
|
|
378
|
+
}, " ‹ ", 8, _hoisted_2$8),
|
|
378
379
|
(openBlock(true), createElementBlock(Fragment, null, renderList(slots.value, (slot, index) => {
|
|
379
|
-
return openBlock(), createElementBlock(Fragment, { key: `${slot}-${index}` }, [slot === "gap" ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
380
|
+
return openBlock(), createElementBlock(Fragment, { key: `${slot}-${index}` }, [slot === "gap" ? (openBlock(), createElementBlock("span", _hoisted_3$6, "…")) : (openBlock(), createElementBlock("button", {
|
|
380
381
|
key: 1,
|
|
381
382
|
type: "button",
|
|
382
383
|
class: normalizeClass(["rk-pager-page", { "is-active": slot === __props.page }]),
|
|
383
384
|
"aria-current": slot === __props.page ? "page" : void 0,
|
|
384
385
|
onClick: ($event) => go(slot)
|
|
385
|
-
}, toDisplayString(slot), 11, _hoisted_4$
|
|
386
|
+
}, toDisplayString(slot), 11, _hoisted_4$4))], 64);
|
|
386
387
|
}), 128)),
|
|
387
388
|
createElementVNode("button", {
|
|
388
389
|
type: "button",
|
|
@@ -390,27 +391,27 @@ var BasePagination_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
390
391
|
disabled: __props.page >= __props.pages,
|
|
391
392
|
"aria-label": __props.nextLabel,
|
|
392
393
|
onClick: _cache[1] || (_cache[1] = ($event) => go(__props.page + 1))
|
|
393
|
-
}, " › ", 8, _hoisted_5$
|
|
394
|
-
], 8, _hoisted_1$
|
|
394
|
+
}, " › ", 8, _hoisted_5$3)
|
|
395
|
+
], 8, _hoisted_1$9);
|
|
395
396
|
};
|
|
396
397
|
}
|
|
397
398
|
}), [["__scopeId", "data-v-29950578"]]);
|
|
398
399
|
//#endregion
|
|
399
400
|
//#region src/web/CommandMenu.vue?vue&type=script&setup=true&lang.ts
|
|
400
|
-
var _hoisted_1$
|
|
401
|
-
var _hoisted_2$
|
|
402
|
-
var _hoisted_3$
|
|
401
|
+
var _hoisted_1$8 = ["aria-label"];
|
|
402
|
+
var _hoisted_2$7 = { class: "rk-command-field" };
|
|
403
|
+
var _hoisted_3$5 = [
|
|
403
404
|
"placeholder",
|
|
404
405
|
"aria-label",
|
|
405
406
|
"aria-controls",
|
|
406
407
|
"aria-activedescendant"
|
|
407
408
|
];
|
|
408
|
-
var _hoisted_4$
|
|
409
|
-
var _hoisted_5$
|
|
409
|
+
var _hoisted_4$3 = ["id", "aria-label"];
|
|
410
|
+
var _hoisted_5$2 = {
|
|
410
411
|
key: 0,
|
|
411
412
|
class: "rk-command-group"
|
|
412
413
|
};
|
|
413
|
-
var _hoisted_6$
|
|
414
|
+
var _hoisted_6$2 = [
|
|
414
415
|
"id",
|
|
415
416
|
"aria-selected",
|
|
416
417
|
"onClick",
|
|
@@ -539,7 +540,7 @@ var CommandMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
539
540
|
role: "dialog",
|
|
540
541
|
"aria-modal": "true",
|
|
541
542
|
"aria-label": __props.label
|
|
542
|
-
}, [createElementVNode("div", _hoisted_2$
|
|
543
|
+
}, [createElementVNode("div", _hoisted_2$7, [createVNode(unref(Search), {
|
|
543
544
|
class: "text-ink-soft size-4 shrink-0",
|
|
544
545
|
"aria-hidden": "true"
|
|
545
546
|
}), withDirectives(createElementVNode("input", {
|
|
@@ -555,13 +556,13 @@ var CommandMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
555
556
|
"aria-expanded": true,
|
|
556
557
|
"aria-controls": unref(id),
|
|
557
558
|
"aria-activedescendant": flat.value.length ? `${unref(id)}-${active.value}` : void 0
|
|
558
|
-
}, null, 8, _hoisted_3$
|
|
559
|
+
}, null, 8, _hoisted_3$5), [[vModelText, query.value]])]), createElementVNode("div", {
|
|
559
560
|
id: unref(id),
|
|
560
561
|
class: "rk-command-list",
|
|
561
562
|
role: "listbox",
|
|
562
563
|
"aria-label": __props.label
|
|
563
564
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(matches.value, (group) => {
|
|
564
|
-
return openBlock(), createElementBlock(Fragment, { key: group.label ?? "items" }, [group.label ? (openBlock(), createElementBlock("p", _hoisted_5$
|
|
565
|
+
return openBlock(), createElementBlock(Fragment, { key: group.label ?? "items" }, [group.label ? (openBlock(), createElementBlock("p", _hoisted_5$2, toDisplayString(group.label), 1)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(group.items, (item) => {
|
|
565
566
|
return openBlock(), createElementBlock("div", {
|
|
566
567
|
id: `${unref(id)}-${indexOf(item)}`,
|
|
567
568
|
key: item.id,
|
|
@@ -578,9 +579,9 @@ var CommandMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
578
579
|
})) : createCommentVNode("", true),
|
|
579
580
|
createElementVNode("span", _hoisted_7$1, toDisplayString(item.label), 1),
|
|
580
581
|
item.hint ? (openBlock(), createElementBlock("span", _hoisted_8$1, toDisplayString(item.hint), 1)) : createCommentVNode("", true)
|
|
581
|
-
], 42, _hoisted_6$
|
|
582
|
+
], 42, _hoisted_6$2);
|
|
582
583
|
}), 128))], 64);
|
|
583
|
-
}), 128)), flat.value.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_9$1, toDisplayString(__props.emptyLabel), 1)) : createCommentVNode("", true)], 8, _hoisted_4$
|
|
584
|
+
}), 128)), flat.value.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_9$1, toDisplayString(__props.emptyLabel), 1)) : createCommentVNode("", true)], 8, _hoisted_4$3)], 8, _hoisted_1$8)], 32)) : createCommentVNode("", true)]),
|
|
584
585
|
_: 1
|
|
585
586
|
})], 8, ["to"]);
|
|
586
587
|
};
|
|
@@ -588,20 +589,20 @@ var CommandMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
588
589
|
}), [["__scopeId", "data-v-cce1dd03"]]);
|
|
589
590
|
//#endregion
|
|
590
591
|
//#region src/web/DataTable.vue?vue&type=script&setup=true&lang.ts
|
|
591
|
-
var _hoisted_1$
|
|
592
|
-
var _hoisted_2$
|
|
592
|
+
var _hoisted_1$7 = ["aria-label"];
|
|
593
|
+
var _hoisted_2$6 = {
|
|
593
594
|
key: 0,
|
|
594
595
|
scope: "col",
|
|
595
596
|
class: "rk-data-pick"
|
|
596
597
|
};
|
|
597
|
-
var _hoisted_3$
|
|
598
|
+
var _hoisted_3$4 = [
|
|
598
599
|
"checked",
|
|
599
600
|
"indeterminate",
|
|
600
601
|
"aria-label"
|
|
601
602
|
];
|
|
602
|
-
var _hoisted_4 = ["aria-sort"];
|
|
603
|
-
var _hoisted_5 = ["onClick"];
|
|
604
|
-
var _hoisted_6 = {
|
|
603
|
+
var _hoisted_4$2 = ["aria-sort"];
|
|
604
|
+
var _hoisted_5$1 = ["onClick"];
|
|
605
|
+
var _hoisted_6$1 = {
|
|
605
606
|
key: 0,
|
|
606
607
|
"aria-busy": "true"
|
|
607
608
|
};
|
|
@@ -713,14 +714,14 @@ var DataTable_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
713
714
|
"aria-label": __props.caption
|
|
714
715
|
}, [createElementVNode("table", { class: normalizeClass(["rk-data", { "is-sticky": __props.stickyHeader }]) }, [
|
|
715
716
|
createElementVNode("caption", { class: normalizeClass(__props.captionHidden ? "rk-data-caption-hidden" : "rk-data-caption") }, toDisplayString(__props.caption), 3),
|
|
716
|
-
createElementVNode("thead", null, [createElementVNode("tr", null, [selectable.value ? (openBlock(), createElementBlock("th", _hoisted_2$
|
|
717
|
+
createElementVNode("thead", null, [createElementVNode("tr", null, [selectable.value ? (openBlock(), createElementBlock("th", _hoisted_2$6, [createElementVNode("input", {
|
|
717
718
|
type: "checkbox",
|
|
718
719
|
class: "rk-data-box focus-ring",
|
|
719
720
|
checked: allChosen.value,
|
|
720
721
|
indeterminate: someChosen.value,
|
|
721
722
|
"aria-label": __props.selectAllLabel,
|
|
722
723
|
onChange: toggleAll
|
|
723
|
-
}, null, 40, _hoisted_3$
|
|
724
|
+
}, null, 40, _hoisted_3$4)])) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
724
725
|
return openBlock(), createElementBlock("th", {
|
|
725
726
|
key: column.key,
|
|
726
727
|
scope: "col",
|
|
@@ -743,9 +744,9 @@ var DataTable_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
743
744
|
key: 2,
|
|
744
745
|
class: "size-3.5 opacity-40",
|
|
745
746
|
"aria-hidden": "true"
|
|
746
|
-
}))], 8, _hoisted_5)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(column.label), 1)], 64))], 10, _hoisted_4);
|
|
747
|
+
}))], 8, _hoisted_5$1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(column.label), 1)], 64))], 10, _hoisted_4$2);
|
|
747
748
|
}), 128))])]),
|
|
748
|
-
__props.loading ? (openBlock(), createElementBlock("tbody", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.loadingRows, (row) => {
|
|
749
|
+
__props.loading ? (openBlock(), createElementBlock("tbody", _hoisted_6$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.loadingRows, (row) => {
|
|
749
750
|
return openBlock(), createElementBlock("tr", { key: row }, [selectable.value ? (openBlock(), createElementBlock("td", _hoisted_7)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.columns, (column) => {
|
|
750
751
|
return openBlock(), createElementBlock("td", { key: column.key }, [createVNode(BaseSkeleton_default, {
|
|
751
752
|
shape: "text",
|
|
@@ -776,11 +777,454 @@ var DataTable_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
776
777
|
colspan: columnCount.value,
|
|
777
778
|
class: "rk-data-empty"
|
|
778
779
|
}, [renderSlot(_ctx.$slots, "empty", {}, void 0, true)], 8, _hoisted_12)])]))
|
|
779
|
-
], 2)], 8, _hoisted_1$
|
|
780
|
+
], 2)], 8, _hoisted_1$7);
|
|
780
781
|
};
|
|
781
782
|
}
|
|
782
783
|
}), [["__scopeId", "data-v-5920cac0"]]);
|
|
783
784
|
//#endregion
|
|
785
|
+
//#region src/web/BaseSplitter.vue?vue&type=script&setup=true&lang.ts
|
|
786
|
+
var _hoisted_1$6 = { class: "rk-split-pane is-start" };
|
|
787
|
+
var _hoisted_2$5 = [
|
|
788
|
+
"aria-label",
|
|
789
|
+
"aria-orientation",
|
|
790
|
+
"aria-valuenow",
|
|
791
|
+
"aria-valuemin",
|
|
792
|
+
"aria-valuemax"
|
|
793
|
+
];
|
|
794
|
+
var _hoisted_3$3 = { class: "rk-split-pane is-end" };
|
|
795
|
+
//#endregion
|
|
796
|
+
//#region src/web/BaseSplitter.vue
|
|
797
|
+
var BaseSplitter_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
798
|
+
__name: "BaseSplitter",
|
|
799
|
+
props: /*@__PURE__*/ mergeModels({
|
|
800
|
+
label: {},
|
|
801
|
+
orientation: { default: "horizontal" },
|
|
802
|
+
min: { default: 15 },
|
|
803
|
+
max: { default: 85 },
|
|
804
|
+
step: { default: 2 }
|
|
805
|
+
}, {
|
|
806
|
+
"modelValue": { default: 50 },
|
|
807
|
+
"modelModifiers": {}
|
|
808
|
+
}),
|
|
809
|
+
emits: ["update:modelValue"],
|
|
810
|
+
setup(__props) {
|
|
811
|
+
/** Where the split sits, as a percentage of the whole. `v-model`. */
|
|
812
|
+
const split = useModel(__props, "modelValue");
|
|
813
|
+
const root = useTemplateRef("root");
|
|
814
|
+
const dragging = ref(false);
|
|
815
|
+
const startedAt = split.value;
|
|
816
|
+
const clamp = (value) => Math.min(__props.max, Math.max(__props.min, value));
|
|
817
|
+
const horizontal = computed(() => __props.orientation === "horizontal");
|
|
818
|
+
function moveTo(point) {
|
|
819
|
+
const box = root.value?.getBoundingClientRect();
|
|
820
|
+
if (!box) return;
|
|
821
|
+
const ratio = horizontal.value ? (point - box.left) / box.width : (point - box.top) / box.height;
|
|
822
|
+
split.value = clamp(Math.round(ratio * 100));
|
|
823
|
+
}
|
|
824
|
+
function onPointerDown(event) {
|
|
825
|
+
dragging.value = true;
|
|
826
|
+
event.target.setPointerCapture(event.pointerId);
|
|
827
|
+
}
|
|
828
|
+
function onPointerMove(event) {
|
|
829
|
+
if (!dragging.value) return;
|
|
830
|
+
event.preventDefault();
|
|
831
|
+
moveTo(horizontal.value ? event.clientX : event.clientY);
|
|
832
|
+
}
|
|
833
|
+
function onPointerUp(event) {
|
|
834
|
+
dragging.value = false;
|
|
835
|
+
event.target.releasePointerCapture?.(event.pointerId);
|
|
836
|
+
}
|
|
837
|
+
function onKeydown(event) {
|
|
838
|
+
const back = horizontal.value ? "ArrowLeft" : "ArrowUp";
|
|
839
|
+
const forward = horizontal.value ? "ArrowRight" : "ArrowDown";
|
|
840
|
+
const next = {
|
|
841
|
+
[back]: split.value - __props.step,
|
|
842
|
+
[forward]: split.value + __props.step,
|
|
843
|
+
Home: __props.min,
|
|
844
|
+
End: __props.max,
|
|
845
|
+
Enter: startedAt
|
|
846
|
+
}[event.key];
|
|
847
|
+
if (next === void 0) return;
|
|
848
|
+
event.preventDefault();
|
|
849
|
+
split.value = clamp(next);
|
|
850
|
+
}
|
|
851
|
+
onBeforeUnmount(() => dragging.value = false);
|
|
852
|
+
return (_ctx, _cache) => {
|
|
853
|
+
return openBlock(), createElementBlock("div", {
|
|
854
|
+
ref_key: "root",
|
|
855
|
+
ref: root,
|
|
856
|
+
class: normalizeClass(["rk-split", [`is-${__props.orientation}`, { "is-dragging": dragging.value }]]),
|
|
857
|
+
style: normalizeStyle({ "--rk-split": `${split.value}%` })
|
|
858
|
+
}, [
|
|
859
|
+
createElementVNode("div", _hoisted_1$6, [renderSlot(_ctx.$slots, "start", {}, void 0, true)]),
|
|
860
|
+
createElementVNode("div", {
|
|
861
|
+
class: "rk-split-handle focus-ring",
|
|
862
|
+
role: "separator",
|
|
863
|
+
tabindex: "0",
|
|
864
|
+
"aria-label": __props.label,
|
|
865
|
+
"aria-orientation": __props.orientation === "horizontal" ? "vertical" : "horizontal",
|
|
866
|
+
"aria-valuenow": split.value,
|
|
867
|
+
"aria-valuemin": __props.min,
|
|
868
|
+
"aria-valuemax": __props.max,
|
|
869
|
+
onPointerdown: onPointerDown,
|
|
870
|
+
onPointermove: onPointerMove,
|
|
871
|
+
onPointerup: onPointerUp,
|
|
872
|
+
onPointercancel: onPointerUp,
|
|
873
|
+
onKeydown
|
|
874
|
+
}, [..._cache[0] || (_cache[0] = [createElementVNode("span", {
|
|
875
|
+
class: "rk-split-grip",
|
|
876
|
+
"aria-hidden": "true"
|
|
877
|
+
}, null, -1)])], 40, _hoisted_2$5),
|
|
878
|
+
createElementVNode("div", _hoisted_3$3, [renderSlot(_ctx.$slots, "end", {}, void 0, true)])
|
|
879
|
+
], 6);
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
}), [["__scopeId", "data-v-159a4f08"]]);
|
|
883
|
+
//#endregion
|
|
884
|
+
//#region src/web/BaseToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
885
|
+
var _hoisted_1$5 = ["aria-label", "aria-orientation"];
|
|
886
|
+
/**
|
|
887
|
+
* A row of controls that belong together: a formatting bar, a row of view
|
|
888
|
+
* switches, the actions over a table.
|
|
889
|
+
*
|
|
890
|
+
* One Tab stop for the lot. The arrows move between the controls inside it,
|
|
891
|
+
* Home and End jump to the ends — the toolbar pattern, and the reason to
|
|
892
|
+
* use it is arithmetic: twelve buttons in the tab order cost twelve presses
|
|
893
|
+
* to get past on the way to the thing under them.
|
|
894
|
+
*
|
|
895
|
+
* The controls are yours: anything focusable inside is picked up, so a
|
|
896
|
+
* toolbar can mix the kit's buttons, a `ToggleGroup` and a separator
|
|
897
|
+
* without declaring any of them as data.
|
|
898
|
+
*/
|
|
899
|
+
var FOCUSABLE = "button:not([disabled]), a[href], input:not([disabled]), select, textarea";
|
|
900
|
+
//#endregion
|
|
901
|
+
//#region src/web/BaseToolbar.vue
|
|
902
|
+
var BaseToolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
903
|
+
__name: "BaseToolbar",
|
|
904
|
+
props: {
|
|
905
|
+
label: {},
|
|
906
|
+
orientation: { default: "horizontal" }
|
|
907
|
+
},
|
|
908
|
+
setup(__props) {
|
|
909
|
+
const root = useTemplateRef("root");
|
|
910
|
+
const at = ref(0);
|
|
911
|
+
function controls() {
|
|
912
|
+
return Array.from(root.value?.querySelectorAll(FOCUSABLE) ?? []);
|
|
913
|
+
}
|
|
914
|
+
function applyRoving() {
|
|
915
|
+
const list = controls();
|
|
916
|
+
at.value = Math.min(at.value, Math.max(0, list.length - 1));
|
|
917
|
+
list.forEach((control, index) => {
|
|
918
|
+
control.tabIndex = index === at.value ? 0 : -1;
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
function focusAt(index) {
|
|
922
|
+
const list = controls();
|
|
923
|
+
if (list.length === 0) return;
|
|
924
|
+
at.value = (index + list.length) % list.length;
|
|
925
|
+
applyRoving();
|
|
926
|
+
list[at.value]?.focus();
|
|
927
|
+
}
|
|
928
|
+
function onKeydown(event) {
|
|
929
|
+
const back = __props.orientation === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
930
|
+
const forward = __props.orientation === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
931
|
+
const list = controls();
|
|
932
|
+
const current = list.indexOf(document.activeElement);
|
|
933
|
+
if (event.key === back) {
|
|
934
|
+
event.preventDefault();
|
|
935
|
+
focusAt(current - 1);
|
|
936
|
+
} else if (event.key === forward) {
|
|
937
|
+
event.preventDefault();
|
|
938
|
+
focusAt(current + 1);
|
|
939
|
+
} else if (event.key === "Home") {
|
|
940
|
+
event.preventDefault();
|
|
941
|
+
focusAt(0);
|
|
942
|
+
} else if (event.key === "End") {
|
|
943
|
+
event.preventDefault();
|
|
944
|
+
focusAt(list.length - 1);
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
function onFocusin(event) {
|
|
948
|
+
const index = controls().indexOf(event.target);
|
|
949
|
+
if (index >= 0) {
|
|
950
|
+
at.value = index;
|
|
951
|
+
applyRoving();
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
onMounted(applyRoving);
|
|
955
|
+
return (_ctx, _cache) => {
|
|
956
|
+
return openBlock(), createElementBlock("div", {
|
|
957
|
+
ref_key: "root",
|
|
958
|
+
ref: root,
|
|
959
|
+
class: normalizeClass(["rk-toolbar", `is-${__props.orientation}`]),
|
|
960
|
+
role: "toolbar",
|
|
961
|
+
"aria-label": __props.label,
|
|
962
|
+
"aria-orientation": __props.orientation,
|
|
963
|
+
onKeydown,
|
|
964
|
+
onFocusin
|
|
965
|
+
}, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 42, _hoisted_1$5);
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
}), [["__scopeId", "data-v-a65164b7"]]);
|
|
969
|
+
//#endregion
|
|
970
|
+
//#region src/web/BaseTree.vue?vue&type=script&setup=true&lang.ts
|
|
971
|
+
var _hoisted_1$4 = ["aria-label", "aria-multiselectable"];
|
|
972
|
+
var _hoisted_2$4 = [
|
|
973
|
+
"aria-level",
|
|
974
|
+
"aria-setsize",
|
|
975
|
+
"aria-posinset",
|
|
976
|
+
"aria-expanded",
|
|
977
|
+
"aria-selected",
|
|
978
|
+
"aria-disabled",
|
|
979
|
+
"onClick"
|
|
980
|
+
];
|
|
981
|
+
var _hoisted_3$2 = {
|
|
982
|
+
key: 1,
|
|
983
|
+
class: "rk-tree-twist-space",
|
|
984
|
+
"aria-hidden": "true"
|
|
985
|
+
};
|
|
986
|
+
var _hoisted_4$1 = { class: "truncate" };
|
|
987
|
+
//#endregion
|
|
988
|
+
//#region src/web/BaseTree.vue
|
|
989
|
+
var BaseTree_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
990
|
+
__name: "BaseTree",
|
|
991
|
+
props: /*@__PURE__*/ mergeModels({
|
|
992
|
+
modelValue: { default: () => void 0 },
|
|
993
|
+
nodes: {},
|
|
994
|
+
label: {},
|
|
995
|
+
mode: { default: "single" }
|
|
996
|
+
}, {
|
|
997
|
+
"expanded": { default: () => [] },
|
|
998
|
+
"expandedModifiers": {}
|
|
999
|
+
}),
|
|
1000
|
+
emits: /*@__PURE__*/ mergeModels(["update:modelValue"], ["update:expanded"]),
|
|
1001
|
+
setup(__props, { emit: __emit }) {
|
|
1002
|
+
const emit = __emit;
|
|
1003
|
+
const model = useBoundValue(() => __props.modelValue, (value) => emit("update:modelValue", value));
|
|
1004
|
+
/** Which branches are open. */
|
|
1005
|
+
const expanded = useModel(__props, "expanded");
|
|
1006
|
+
const rows = computed(() => {
|
|
1007
|
+
const out = [];
|
|
1008
|
+
const walk = (list, level, parent) => {
|
|
1009
|
+
list.forEach((node, index) => {
|
|
1010
|
+
out.push({
|
|
1011
|
+
node,
|
|
1012
|
+
level,
|
|
1013
|
+
position: index + 1,
|
|
1014
|
+
size: list.length,
|
|
1015
|
+
parent
|
|
1016
|
+
});
|
|
1017
|
+
if (node.children?.length && expanded.value.includes(node.key)) walk(node.children, level + 1, node.key);
|
|
1018
|
+
});
|
|
1019
|
+
};
|
|
1020
|
+
walk(__props.nodes, 1, null);
|
|
1021
|
+
return out;
|
|
1022
|
+
});
|
|
1023
|
+
const active = ref(0);
|
|
1024
|
+
const chosen = computed(() => {
|
|
1025
|
+
const value = model.value;
|
|
1026
|
+
if (Array.isArray(value)) return new Set(value);
|
|
1027
|
+
return new Set(value === void 0 ? [] : [value]);
|
|
1028
|
+
});
|
|
1029
|
+
const isOpen = (node) => expanded.value.includes(node.key);
|
|
1030
|
+
const hasChildren = (node) => Boolean(node.children?.length);
|
|
1031
|
+
function setOpen(node, open) {
|
|
1032
|
+
if (!hasChildren(node)) return;
|
|
1033
|
+
expanded.value = open ? [...expanded.value, node.key] : expanded.value.filter((key) => key !== node.key);
|
|
1034
|
+
}
|
|
1035
|
+
function choose(node) {
|
|
1036
|
+
if (node.disabled) return;
|
|
1037
|
+
if (__props.mode === "multiple") {
|
|
1038
|
+
const next = new Set(chosen.value);
|
|
1039
|
+
if (next.has(node.key)) next.delete(node.key);
|
|
1040
|
+
else next.add(node.key);
|
|
1041
|
+
model.value = [...next];
|
|
1042
|
+
return;
|
|
1043
|
+
}
|
|
1044
|
+
model.value = node.key;
|
|
1045
|
+
}
|
|
1046
|
+
function moveTo(index) {
|
|
1047
|
+
active.value = Math.max(0, Math.min(rows.value.length - 1, index));
|
|
1048
|
+
}
|
|
1049
|
+
function onKeydown(event) {
|
|
1050
|
+
const row = rows.value[active.value];
|
|
1051
|
+
if (!row) return;
|
|
1052
|
+
switch (event.key) {
|
|
1053
|
+
case "ArrowDown":
|
|
1054
|
+
event.preventDefault();
|
|
1055
|
+
moveTo(active.value + 1);
|
|
1056
|
+
break;
|
|
1057
|
+
case "ArrowUp":
|
|
1058
|
+
event.preventDefault();
|
|
1059
|
+
moveTo(active.value - 1);
|
|
1060
|
+
break;
|
|
1061
|
+
case "ArrowRight":
|
|
1062
|
+
event.preventDefault();
|
|
1063
|
+
if (hasChildren(row.node) && !isOpen(row.node)) setOpen(row.node, true);
|
|
1064
|
+
else if (hasChildren(row.node)) moveTo(active.value + 1);
|
|
1065
|
+
break;
|
|
1066
|
+
case "ArrowLeft": {
|
|
1067
|
+
event.preventDefault();
|
|
1068
|
+
if (hasChildren(row.node) && isOpen(row.node)) {
|
|
1069
|
+
setOpen(row.node, false);
|
|
1070
|
+
break;
|
|
1071
|
+
}
|
|
1072
|
+
const parent = rows.value.findIndex((one) => one.node.key === row.parent);
|
|
1073
|
+
if (parent >= 0) moveTo(parent);
|
|
1074
|
+
break;
|
|
1075
|
+
}
|
|
1076
|
+
case "Home":
|
|
1077
|
+
event.preventDefault();
|
|
1078
|
+
moveTo(0);
|
|
1079
|
+
break;
|
|
1080
|
+
case "End":
|
|
1081
|
+
event.preventDefault();
|
|
1082
|
+
moveTo(rows.value.length - 1);
|
|
1083
|
+
break;
|
|
1084
|
+
case "Enter":
|
|
1085
|
+
case " ":
|
|
1086
|
+
event.preventDefault();
|
|
1087
|
+
choose(row.node);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
function onClick(index, row) {
|
|
1091
|
+
active.value = index;
|
|
1092
|
+
if (hasChildren(row.node)) setOpen(row.node, !isOpen(row.node));
|
|
1093
|
+
else choose(row.node);
|
|
1094
|
+
}
|
|
1095
|
+
return (_ctx, _cache) => {
|
|
1096
|
+
return openBlock(), createElementBlock("ul", {
|
|
1097
|
+
class: "rk-tree",
|
|
1098
|
+
role: "tree",
|
|
1099
|
+
"aria-label": __props.label,
|
|
1100
|
+
"aria-multiselectable": __props.mode === "multiple" ? true : void 0,
|
|
1101
|
+
tabindex: "0",
|
|
1102
|
+
onKeydown
|
|
1103
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (row, index) => {
|
|
1104
|
+
return openBlock(), createElementBlock("li", {
|
|
1105
|
+
key: row.node.key,
|
|
1106
|
+
class: normalizeClass(["rk-tree-row", {
|
|
1107
|
+
"is-active": index === active.value,
|
|
1108
|
+
"is-chosen": chosen.value.has(row.node.key),
|
|
1109
|
+
"is-disabled": row.node.disabled
|
|
1110
|
+
}]),
|
|
1111
|
+
role: "treeitem",
|
|
1112
|
+
"aria-level": row.level,
|
|
1113
|
+
"aria-setsize": row.size,
|
|
1114
|
+
"aria-posinset": row.position,
|
|
1115
|
+
"aria-expanded": row.node.children?.length ? isOpen(row.node) : void 0,
|
|
1116
|
+
"aria-selected": chosen.value.has(row.node.key),
|
|
1117
|
+
"aria-disabled": row.node.disabled,
|
|
1118
|
+
style: normalizeStyle({ "--rk-tree-level": row.level }),
|
|
1119
|
+
onClick: ($event) => onClick(index, row)
|
|
1120
|
+
}, [
|
|
1121
|
+
row.node.children?.length ? (openBlock(), createBlock(unref(ChevronRight), {
|
|
1122
|
+
key: 0,
|
|
1123
|
+
class: normalizeClass(["rk-tree-twist", { "is-open": isOpen(row.node) }]),
|
|
1124
|
+
"aria-hidden": "true"
|
|
1125
|
+
}, null, 8, ["class"])) : (openBlock(), createElementBlock("span", _hoisted_3$2)),
|
|
1126
|
+
row.node.icon ? (openBlock(), createBlock(resolveDynamicComponent(row.node.icon), {
|
|
1127
|
+
key: 2,
|
|
1128
|
+
class: "size-4 shrink-0",
|
|
1129
|
+
"aria-hidden": "true"
|
|
1130
|
+
})) : createCommentVNode("", true),
|
|
1131
|
+
createElementVNode("span", _hoisted_4$1, toDisplayString(row.node.label), 1)
|
|
1132
|
+
], 14, _hoisted_2$4);
|
|
1133
|
+
}), 128))], 40, _hoisted_1$4);
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
}), [["__scopeId", "data-v-1ba675c5"]]);
|
|
1137
|
+
//#endregion
|
|
1138
|
+
//#region src/web/TransferList.vue?vue&type=script&setup=true&lang.ts
|
|
1139
|
+
var _hoisted_1$3 = { class: "rk-transfer" };
|
|
1140
|
+
var _hoisted_2$3 = { class: "rk-transfer-side" };
|
|
1141
|
+
var _hoisted_3$1 = { class: "rk-transfer-title" };
|
|
1142
|
+
var _hoisted_4 = { class: "rk-transfer-middle" };
|
|
1143
|
+
var _hoisted_5 = { class: "rk-transfer-side" };
|
|
1144
|
+
var _hoisted_6 = { class: "rk-transfer-title" };
|
|
1145
|
+
//#endregion
|
|
1146
|
+
//#region src/web/TransferList.vue
|
|
1147
|
+
var TransferList_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
1148
|
+
__name: "TransferList",
|
|
1149
|
+
props: /*@__PURE__*/ mergeModels({
|
|
1150
|
+
options: {},
|
|
1151
|
+
availableLabel: {},
|
|
1152
|
+
chosenLabel: {},
|
|
1153
|
+
addLabel: {},
|
|
1154
|
+
removeLabel: {},
|
|
1155
|
+
height: { default: "14rem" }
|
|
1156
|
+
}, {
|
|
1157
|
+
"modelValue": { default: () => [] },
|
|
1158
|
+
"modelModifiers": {}
|
|
1159
|
+
}),
|
|
1160
|
+
emits: ["update:modelValue"],
|
|
1161
|
+
setup(__props) {
|
|
1162
|
+
/** What has been moved across, in the order it was moved. `v-model`. */
|
|
1163
|
+
const model = useModel(__props, "modelValue");
|
|
1164
|
+
const markedAvailable = ref([]);
|
|
1165
|
+
const markedChosen = ref([]);
|
|
1166
|
+
const available = computed(() => __props.options.filter((option) => !model.value.includes(option.value)));
|
|
1167
|
+
const chosen = computed(() => model.value.map((value) => __props.options.find((option) => option.value === value)).filter((option) => option !== void 0));
|
|
1168
|
+
function add() {
|
|
1169
|
+
model.value = [...model.value, ...markedAvailable.value];
|
|
1170
|
+
markedAvailable.value = [];
|
|
1171
|
+
}
|
|
1172
|
+
function remove() {
|
|
1173
|
+
model.value = model.value.filter((value) => !markedChosen.value.includes(value));
|
|
1174
|
+
markedChosen.value = [];
|
|
1175
|
+
}
|
|
1176
|
+
return (_ctx, _cache) => {
|
|
1177
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
1178
|
+
createElementVNode("div", _hoisted_2$3, [createElementVNode("p", _hoisted_3$1, toDisplayString(__props.availableLabel), 1), createVNode(BaseListbox_default, {
|
|
1179
|
+
modelValue: markedAvailable.value,
|
|
1180
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => markedAvailable.value = $event),
|
|
1181
|
+
mode: "multiple",
|
|
1182
|
+
options: available.value,
|
|
1183
|
+
label: __props.availableLabel,
|
|
1184
|
+
height: __props.height
|
|
1185
|
+
}, null, 8, [
|
|
1186
|
+
"modelValue",
|
|
1187
|
+
"options",
|
|
1188
|
+
"label",
|
|
1189
|
+
"height"
|
|
1190
|
+
])]),
|
|
1191
|
+
createElementVNode("div", _hoisted_4, [createVNode(BaseButton_default, {
|
|
1192
|
+
icon: "",
|
|
1193
|
+
variant: "secondary",
|
|
1194
|
+
"aria-label": __props.addLabel,
|
|
1195
|
+
disabled: markedAvailable.value.length === 0,
|
|
1196
|
+
onClick: add
|
|
1197
|
+
}, {
|
|
1198
|
+
default: withCtx(() => [createVNode(unref(ChevronRight), { class: "size-4" })]),
|
|
1199
|
+
_: 1
|
|
1200
|
+
}, 8, ["aria-label", "disabled"]), createVNode(BaseButton_default, {
|
|
1201
|
+
icon: "",
|
|
1202
|
+
variant: "secondary",
|
|
1203
|
+
"aria-label": __props.removeLabel,
|
|
1204
|
+
disabled: markedChosen.value.length === 0,
|
|
1205
|
+
onClick: remove
|
|
1206
|
+
}, {
|
|
1207
|
+
default: withCtx(() => [createVNode(unref(ChevronLeft), { class: "size-4" })]),
|
|
1208
|
+
_: 1
|
|
1209
|
+
}, 8, ["aria-label", "disabled"])]),
|
|
1210
|
+
createElementVNode("div", _hoisted_5, [createElementVNode("p", _hoisted_6, toDisplayString(__props.chosenLabel), 1), createVNode(BaseListbox_default, {
|
|
1211
|
+
modelValue: markedChosen.value,
|
|
1212
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => markedChosen.value = $event),
|
|
1213
|
+
mode: "multiple",
|
|
1214
|
+
options: chosen.value,
|
|
1215
|
+
label: __props.chosenLabel,
|
|
1216
|
+
height: __props.height
|
|
1217
|
+
}, null, 8, [
|
|
1218
|
+
"modelValue",
|
|
1219
|
+
"options",
|
|
1220
|
+
"label",
|
|
1221
|
+
"height"
|
|
1222
|
+
])])
|
|
1223
|
+
]);
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
}), [["__scopeId", "data-v-1d75b0da"]]);
|
|
1227
|
+
//#endregion
|
|
784
1228
|
//#region src/web/BaseTabs.vue?vue&type=script&setup=true&lang.ts
|
|
785
1229
|
var _hoisted_1$2 = ["aria-label"];
|
|
786
1230
|
var _hoisted_2$2 = [
|
|
@@ -926,6 +1370,6 @@ var NavLinks_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
926
1370
|
}
|
|
927
1371
|
}), [["__scopeId", "data-v-52e5d553"]]);
|
|
928
1372
|
//#endregion
|
|
929
|
-
export { BaseAccordion_default as BaseAccordion, BaseBreadcrumb_default as BaseBreadcrumb, BaseDisclosure_default as BaseDisclosure, BaseModal_default as BaseModal, BasePagination_default as BasePagination, BaseTabs_default as BaseTabs, BaseTooltip_default as BaseTooltip, CommandMenu_default as CommandMenu, DataTable_default as DataTable, NavLinks_default as NavLinks };
|
|
1373
|
+
export { BaseAccordion_default as BaseAccordion, BaseBreadcrumb_default as BaseBreadcrumb, BaseDisclosure_default as BaseDisclosure, BaseModal_default as BaseModal, BasePagination_default as BasePagination, BaseSplitter_default as BaseSplitter, BaseTabs_default as BaseTabs, BaseToolbar_default as BaseToolbar, BaseTooltip_default as BaseTooltip, BaseTree_default as BaseTree, CommandMenu_default as CommandMenu, DataTable_default as DataTable, NavLinks_default as NavLinks, TransferList_default as TransferList };
|
|
930
1374
|
|
|
931
1375
|
//# sourceMappingURL=web.js.map
|