blessing-ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +137 -125
- package/dist/blessing-ui.css +38 -2
- package/dist/components/BlessAnnotator.css +1 -0
- package/dist/components/BlessAnnotator.js +6 -0
- package/dist/components/BlessAnnotator.vue.d.ts +71 -0
- package/dist/components/BlessAnnotator.vue_vue_type_script_setup_true_lang.js +264 -0
- package/dist/components/BlessAttachment.vue.d.ts +4 -1
- package/dist/components/BlessAttachment.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/BlessCalendar.vue.d.ts +4 -0
- package/dist/components/BlessCalendar.vue_vue_type_script_setup_true_lang.js +65 -60
- package/dist/components/BlessCarousel.vue.d.ts +3 -0
- package/dist/components/BlessCarousel.vue_vue_type_script_setup_true_lang.js +10 -9
- package/dist/components/BlessCoachmark.css +1 -0
- package/dist/components/BlessCoachmark.js +6 -0
- package/dist/components/BlessCoachmark.vue.d.ts +40 -0
- package/dist/components/BlessCoachmark.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/components/BlessCodeBlock.vue.d.ts +10 -0
- package/dist/components/BlessCodeBlock.vue_vue_type_script_setup_true_lang.js +39 -33
- package/dist/components/BlessCombobox.vue.d.ts +2 -0
- package/dist/components/BlessCombobox.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/BlessCommand.css +1 -1
- package/dist/components/BlessCommand.vue.d.ts +26 -0
- package/dist/components/BlessCommand.vue_vue_type_script_setup_true_lang.js +137 -70
- package/dist/components/BlessConfetti.css +1 -0
- package/dist/components/BlessConfetti.js +6 -0
- package/dist/components/BlessConfetti.vue.d.ts +40 -0
- package/dist/components/BlessConfetti.vue_vue_type_script_setup_true_lang.js +77 -0
- package/dist/components/BlessCropper.vue.d.ts +16 -0
- package/dist/components/BlessCropper.vue_vue_type_script_setup_true_lang.js +47 -39
- package/dist/components/BlessDataTable.vue.d.ts +6 -0
- package/dist/components/BlessDataTable.vue_vue_type_script_setup_true_lang.js +56 -42
- package/dist/components/BlessDataView.vue.d.ts +7 -0
- package/dist/components/BlessDataView.vue_vue_type_script_setup_true_lang.js +38 -31
- package/dist/components/BlessDatePicker.vue.d.ts +3 -0
- package/dist/components/BlessDatePicker.vue_vue_type_script_setup_true_lang.js +46 -45
- package/dist/components/BlessDock.css +1 -0
- package/dist/components/BlessDock.js +6 -0
- package/dist/components/BlessDock.vue.d.ts +55 -0
- package/dist/components/BlessDock.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/BlessEditor.vue.d.ts +2 -0
- package/dist/components/BlessEditor.vue_vue_type_script_setup_true_lang.js +23 -22
- package/dist/components/BlessFileInput.vue.d.ts +2 -0
- package/dist/components/BlessFileInput.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/BlessFormula.css +1 -0
- package/dist/components/BlessFormula.js +6 -0
- package/dist/components/BlessFormula.vue.d.ts +53 -0
- package/dist/components/BlessFormula.vue_vue_type_script_setup_true_lang.js +111 -0
- package/dist/components/BlessGantt.vue.d.ts +12 -0
- package/dist/components/BlessGantt.vue_vue_type_script_setup_true_lang.js +74 -68
- package/dist/components/BlessInfiniteCanvas.css +1 -0
- package/dist/components/BlessInfiniteCanvas.js +6 -0
- package/dist/components/BlessInfiniteCanvas.vue.d.ts +91 -0
- package/dist/components/BlessInfiniteCanvas.vue_vue_type_script_setup_true_lang.js +232 -0
- package/dist/components/BlessInputNumber.vue.d.ts +5 -0
- package/dist/components/BlessInputNumber.vue_vue_type_script_setup_true_lang.js +39 -34
- package/dist/components/BlessKanban.vue.d.ts +12 -0
- package/dist/components/BlessKanban.vue_vue_type_script_setup_true_lang.js +127 -97
- package/dist/components/BlessLoadingBar.vue.d.ts +2 -0
- package/dist/components/BlessLoadingBar.vue_vue_type_script_setup_true_lang.js +8 -3
- package/dist/components/BlessMarquee.vue.d.ts +4 -0
- package/dist/components/BlessMarquee.vue_vue_type_script_setup_true_lang.js +32 -27
- package/dist/components/BlessNodeGraph.css +1 -0
- package/dist/components/BlessNodeGraph.js +6 -0
- package/dist/components/BlessNodeGraph.vue.d.ts +110 -0
- package/dist/components/BlessNodeGraph.vue_vue_type_script_setup_true_lang.js +321 -0
- package/dist/components/BlessOnboardingChecklist.css +1 -0
- package/dist/components/BlessOnboardingChecklist.js +6 -0
- package/dist/components/BlessOnboardingChecklist.vue.d.ts +72 -0
- package/dist/components/BlessOnboardingChecklist.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/components/BlessOrderList.vue.d.ts +5 -0
- package/dist/components/BlessOrderList.vue_vue_type_script_setup_true_lang.js +62 -56
- package/dist/components/BlessPagination.vue.d.ts +2 -0
- package/dist/components/BlessPagination.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BlessPickList.vue.d.ts +5 -0
- package/dist/components/BlessPickList.vue_vue_type_script_setup_true_lang.js +55 -49
- package/dist/components/BlessRangeCalendar.css +1 -0
- package/dist/components/BlessRangeCalendar.js +6 -0
- package/dist/components/BlessRangeCalendar.vue.d.ts +51 -0
- package/dist/components/BlessRangeCalendar.vue_vue_type_script_setup_true_lang.js +217 -0
- package/dist/components/BlessScheduler.css +1 -0
- package/dist/components/BlessScheduler.js +6 -0
- package/dist/components/BlessScheduler.vue.d.ts +95 -0
- package/dist/components/BlessScheduler.vue_vue_type_script_setup_true_lang.js +347 -0
- package/dist/components/BlessShortcutRecorder.vue.d.ts +10 -0
- package/dist/components/BlessShortcutRecorder.vue_vue_type_script_setup_true_lang.js +50 -40
- package/dist/components/BlessSignaturePad.vue.d.ts +1 -1
- package/dist/components/BlessSliderCaptcha.vue.d.ts +5 -0
- package/dist/components/BlessSliderCaptcha.vue_vue_type_script_setup_true_lang.js +89 -84
- package/dist/components/BlessSortable.css +1 -1
- package/dist/components/BlessSortable.vue.d.ts +19 -1
- package/dist/components/BlessSortable.vue_vue_type_script_setup_true_lang.js +103 -55
- package/dist/components/BlessSparkline.css +1 -0
- package/dist/components/BlessSparkline.js +6 -0
- package/dist/components/BlessSparkline.vue.d.ts +28 -0
- package/dist/components/BlessSparkline.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/components/BlessSteps.vue.d.ts +2 -0
- package/dist/components/BlessSteps.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/components/BlessSwipeDeck.vue.d.ts +1 -1
- package/dist/components/BlessSwipeDeck.vue_vue_type_script_setup_true_lang.js +2 -1
- package/dist/components/BlessTimer.vue.d.ts +18 -0
- package/dist/components/BlessTimer.vue_vue_type_script_setup_true_lang.js +52 -43
- package/dist/components/BlessTour.vue.d.ts +1 -0
- package/dist/components/BlessTour.vue_vue_type_script_setup_true_lang.js +48 -42
- package/dist/components/BlessTreemap.css +1 -0
- package/dist/components/BlessTreemap.js +6 -0
- package/dist/components/BlessTreemap.vue.d.ts +46 -0
- package/dist/components/BlessTreemap.vue_vue_type_script_setup_true_lang.js +137 -0
- package/dist/components/BlessUploader.vue.d.ts +11 -0
- package/dist/components/BlessUploader.vue_vue_type_script_setup_true_lang.js +80 -69
- package/dist/composables/annotate.d.ts +35 -0
- package/dist/composables/annotate.js +33 -0
- package/dist/composables/canvasView.d.ts +21 -0
- package/dist/composables/canvasView.js +23 -0
- package/dist/composables/confetti.d.ts +32 -0
- package/dist/composables/confetti.js +23 -0
- package/dist/composables/dayBlocks.d.ts +11 -0
- package/dist/composables/dayBlocks.js +26 -0
- package/dist/composables/formula.d.ts +28 -0
- package/dist/composables/formula.js +161 -0
- package/dist/composables/graph.d.ts +19 -0
- package/dist/composables/graph.js +16 -0
- package/dist/composables/schedule.d.ts +27 -0
- package/dist/composables/schedule.js +54 -0
- package/dist/composables/treemap.d.ts +23 -0
- package/dist/composables/treemap.js +77 -0
- package/dist/composables/useAutoScroll.d.ts +15 -0
- package/dist/composables/useAutoScroll.js +32 -0
- package/dist/composables/useSortable.d.ts +42 -2
- package/dist/composables/useSortable.js +87 -14
- package/dist/index.d.ts +25 -1
- package/dist/index.js +78 -63
- package/package.json +4 -2
|
@@ -1,165 +1,195 @@
|
|
|
1
1
|
import { logicalKey as e } from "../composables/rtl.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useAutoScroll as t } from "../composables/useAutoScroll.js";
|
|
3
|
+
import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, mergeModels as l, nextTick as u, normalizeClass as d, onBeforeUnmount as f, openBlock as p, ref as m, renderList as h, renderSlot as g, toDisplayString as _, useId as v, useModel as y } from "vue";
|
|
3
4
|
//#region src/components/BlessKanban.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
5
|
+
var b = ["aria-label"], x = ["data-kanban-col", "aria-label"], S = { class: "bless-kanban__head" }, C = { class: "bless-kanban__title" }, w = { class: "bless-kanban__count" }, T = [
|
|
5
6
|
"data-grip",
|
|
6
7
|
"aria-label",
|
|
8
|
+
"aria-roledescription",
|
|
7
9
|
"aria-pressed",
|
|
8
10
|
"onPointerdown",
|
|
9
11
|
"onKeydown"
|
|
10
|
-
],
|
|
12
|
+
], E = { class: "bless-kanban__body" }, D = {
|
|
11
13
|
class: "bless-kanban__live",
|
|
12
14
|
"aria-live": "polite"
|
|
13
|
-
},
|
|
15
|
+
}, O = /*@__PURE__*/ c({
|
|
14
16
|
name: "BlessKanban",
|
|
15
17
|
__name: "BlessKanban",
|
|
16
|
-
props: /*@__PURE__*/
|
|
18
|
+
props: /*@__PURE__*/ l({
|
|
17
19
|
rowKey: { type: Function },
|
|
18
|
-
label: {}
|
|
20
|
+
label: {},
|
|
21
|
+
labels: {}
|
|
19
22
|
}, {
|
|
20
23
|
modelValue: { default: () => [] },
|
|
21
24
|
modelModifiers: {}
|
|
22
25
|
}),
|
|
23
|
-
emits: /*@__PURE__*/
|
|
24
|
-
setup(
|
|
25
|
-
let
|
|
26
|
+
emits: /*@__PURE__*/ l(["move"], ["update:modelValue"]),
|
|
27
|
+
setup(c, { emit: l }) {
|
|
28
|
+
let O = c, k = r(() => ({
|
|
29
|
+
card: (e, t) => `Move card ${e} of ${t}`,
|
|
30
|
+
moved: (e, t, n) => `Moved to ${e}, position ${t} of ${n}`,
|
|
31
|
+
position: (e, t, n) => `${e}, position ${t} of ${n}`,
|
|
32
|
+
dropped: (e, t) => `Dropped in ${e}, position ${t}`,
|
|
33
|
+
full: (e) => `${e} is full`,
|
|
34
|
+
grabbed: "Grabbed. Up and down move it in the column, left and right to another column, Space drops it, Escape cancels.",
|
|
35
|
+
cancelled: "Cancelled, order restored",
|
|
36
|
+
hint: "Press Space to grab a card. Up and down move it in its column, left and right to another column. Space drops it, Escape cancels.",
|
|
37
|
+
roleDescription: "sortable card",
|
|
38
|
+
...O.labels
|
|
39
|
+
})), A = y(c, "modelValue"), j = l, M = m(), N = m(""), P = `${v()}-hint`, F = m(null), I = m(null), L = m(null), R = [], z = {
|
|
26
40
|
col: 0,
|
|
27
41
|
index: 0
|
|
28
|
-
},
|
|
29
|
-
let n =
|
|
42
|
+
}, B = (e, t) => {
|
|
43
|
+
let n = A.value[e];
|
|
30
44
|
return e !== t && n.limit != null && n.items.length >= n.limit;
|
|
31
45
|
};
|
|
32
|
-
function
|
|
33
|
-
let i =
|
|
46
|
+
function V(e, t, n, r) {
|
|
47
|
+
let i = A.value.map((e) => ({
|
|
34
48
|
...e,
|
|
35
49
|
items: e.items.slice()
|
|
36
50
|
})), [a] = i[e].items.splice(t, 1);
|
|
37
|
-
i[n].items.splice(r, 0, a),
|
|
38
|
-
column:
|
|
51
|
+
i[n].items.splice(r, 0, a), A.value = i, j("move", a, {
|
|
52
|
+
column: A.value[e].id,
|
|
39
53
|
index: t
|
|
40
54
|
}, {
|
|
41
|
-
column:
|
|
55
|
+
column: A.value[n].id,
|
|
42
56
|
index: r
|
|
43
57
|
});
|
|
44
58
|
}
|
|
45
|
-
function
|
|
59
|
+
function H(e, t) {
|
|
46
60
|
for (let n of document.elementsFromPoint(e, t)) {
|
|
47
61
|
let e = n.closest?.("[data-kanban-col]");
|
|
48
|
-
if (e &&
|
|
62
|
+
if (e && M.value?.contains(e)) return e;
|
|
49
63
|
}
|
|
50
64
|
return null;
|
|
51
65
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
let U = {
|
|
67
|
+
x: 0,
|
|
68
|
+
y: 0
|
|
69
|
+
}, W = t(() => M.value, () => K(U.x, U.y));
|
|
70
|
+
f(W.stop);
|
|
71
|
+
function G(e) {
|
|
72
|
+
U = {
|
|
73
|
+
x: e.clientX,
|
|
74
|
+
y: e.clientY
|
|
75
|
+
}, W.point(e.clientX, e.clientY), K(e.clientX, e.clientY);
|
|
76
|
+
}
|
|
77
|
+
function K(e, t) {
|
|
78
|
+
if (!F.value) return;
|
|
79
|
+
let n = H(e, t);
|
|
80
|
+
if (!n) return void (I.value = null);
|
|
81
|
+
let r = Number(n.dataset.kanbanCol);
|
|
82
|
+
if (B(r, F.value.col)) return void (I.value = null);
|
|
83
|
+
let i = Array.from(n.querySelectorAll("[data-kanban-card]")).filter((e) => {
|
|
84
|
+
let n = e.getBoundingClientRect();
|
|
85
|
+
return n.top + n.height / 2 < t;
|
|
61
86
|
}).length;
|
|
62
|
-
|
|
63
|
-
col:
|
|
64
|
-
index:
|
|
87
|
+
I.value = {
|
|
88
|
+
col: r,
|
|
89
|
+
index: i
|
|
65
90
|
};
|
|
66
91
|
}
|
|
67
|
-
function
|
|
68
|
-
n.button || (n.currentTarget.setPointerCapture?.(n.pointerId),
|
|
92
|
+
function q(e, t, n) {
|
|
93
|
+
n.button || (n.currentTarget.setPointerCapture?.(n.pointerId), F.value = {
|
|
69
94
|
col: e,
|
|
70
95
|
index: t
|
|
71
|
-
},
|
|
96
|
+
}, I.value = {
|
|
72
97
|
col: e,
|
|
73
98
|
index: t
|
|
74
|
-
}
|
|
99
|
+
}, U = {
|
|
100
|
+
x: n.clientX,
|
|
101
|
+
y: n.clientY
|
|
102
|
+
}, W.point(n.clientX, n.clientY), W.start());
|
|
75
103
|
}
|
|
76
|
-
function
|
|
77
|
-
let e =
|
|
78
|
-
if (
|
|
104
|
+
function J() {
|
|
105
|
+
let e = F.value, t = I.value;
|
|
106
|
+
if (W.stop(), F.value = I.value = null, !e || !t) return;
|
|
79
107
|
let n = t.col === e.col && t.index > e.index ? t.index - 1 : t.index;
|
|
80
|
-
(t.col !== e.col || n !== e.index) && (
|
|
108
|
+
(t.col !== e.col || n !== e.index) && (V(e.col, e.index, t.col, n), N.value = k.value.moved(A.value[t.col].title, n + 1, A.value[t.col].items.length));
|
|
81
109
|
}
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
|
|
110
|
+
let Y = () => {
|
|
111
|
+
W.stop(), F.value = I.value = null;
|
|
112
|
+
}, X = (e, t) => u(() => M.value?.querySelector(`[data-grip="${e}:${t}"]`)?.focus());
|
|
113
|
+
function Z(e, t, n, r) {
|
|
114
|
+
let i = A.value.length;
|
|
85
115
|
if (n < 0 || n >= i) return;
|
|
86
|
-
if (
|
|
87
|
-
|
|
116
|
+
if (B(n, e)) {
|
|
117
|
+
N.value = k.value.full(A.value[n].title);
|
|
88
118
|
return;
|
|
89
119
|
}
|
|
90
|
-
let a =
|
|
91
|
-
r = Math.min(Math.max(r, 0), a), (n !== e || r !== t) && (
|
|
120
|
+
let a = A.value[n].items.length - +(n === e);
|
|
121
|
+
r = Math.min(Math.max(r, 0), a), (n !== e || r !== t) && (V(e, t, n, r), L.value = {
|
|
92
122
|
col: n,
|
|
93
123
|
index: r
|
|
94
|
-
},
|
|
124
|
+
}, N.value = k.value.position(A.value[n].title, r + 1, A.value[n].items.length), X(n, r));
|
|
95
125
|
}
|
|
96
|
-
function
|
|
97
|
-
let i = e(r), a =
|
|
98
|
-
r.key === " " || r.key === "Enter" ? (r.preventDefault(), a ? (
|
|
126
|
+
function Q(t, n, r) {
|
|
127
|
+
let i = e(r), a = L.value;
|
|
128
|
+
r.key === " " || r.key === "Enter" ? (r.preventDefault(), a ? (L.value = null, N.value = k.value.dropped(A.value[t].title, n + 1)) : (L.value = {
|
|
99
129
|
col: t,
|
|
100
130
|
index: n
|
|
101
|
-
},
|
|
131
|
+
}, z = {
|
|
102
132
|
col: t,
|
|
103
133
|
index: n
|
|
104
|
-
},
|
|
134
|
+
}, R = A.value.map((e) => ({
|
|
105
135
|
...e,
|
|
106
136
|
items: e.items.slice()
|
|
107
|
-
})),
|
|
137
|
+
})), N.value = k.value.grabbed)) : r.key === "Escape" && a ? (r.preventDefault(), A.value = R, L.value = null, N.value = k.value.cancelled, X(z.col, z.index)) : a && (i === "ArrowUp" ? (r.preventDefault(), Z(t, n, t, n - 1)) : i === "ArrowDown" ? (r.preventDefault(), Z(t, n, t, n + 1)) : i === "ArrowLeft" ? (r.preventDefault(), Z(t, n, t - 1, n)) : i === "ArrowRight" && (r.preventDefault(), Z(t, n, t + 1, n)));
|
|
108
138
|
}
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
}),
|
|
112
|
-
let n =
|
|
113
|
-
return !n || n.col !== e || !
|
|
114
|
-
},
|
|
115
|
-
return (e,
|
|
139
|
+
let ee = () => requestAnimationFrame(() => {
|
|
140
|
+
L.value && !M.value?.contains(document.activeElement) && (L.value = null);
|
|
141
|
+
}), $ = (e, t) => {
|
|
142
|
+
let n = I.value;
|
|
143
|
+
return !n || n.col !== e || !F.value ? null : n.index === t ? "before" : null;
|
|
144
|
+
}, te = (e) => I.value?.col === e && F.value && I.value.index >= A.value[e].items.length;
|
|
145
|
+
return (e, t) => (p(), a("div", {
|
|
116
146
|
ref_key: "root",
|
|
117
|
-
ref:
|
|
147
|
+
ref: M,
|
|
118
148
|
class: "bless-kanban",
|
|
119
149
|
role: "group",
|
|
120
|
-
"aria-label":
|
|
150
|
+
"aria-label": c.label ?? "Board"
|
|
121
151
|
}, [
|
|
122
|
-
(
|
|
123
|
-
key:
|
|
124
|
-
class:
|
|
125
|
-
"data-kanban-col":
|
|
126
|
-
"aria-label":
|
|
127
|
-
}, [
|
|
128
|
-
class:
|
|
152
|
+
(p(!0), a(n, null, h(A.value, (r, l) => (p(), a("section", {
|
|
153
|
+
key: r.id,
|
|
154
|
+
class: d(["bless-kanban__col", { "bless-kanban__col--full": r.limit != null && r.items.length >= r.limit }]),
|
|
155
|
+
"data-kanban-col": l,
|
|
156
|
+
"aria-label": r.title
|
|
157
|
+
}, [o("header", S, [g(e.$slots, "header", { column: r }, () => [o("h3", C, _(r.title), 1)]), o("span", w, [s(_(r.items.length), 1), r.limit == null ? i("", !0) : (p(), a(n, { key: 0 }, [s(" / " + _(r.limit), 1)], 64))])]), o("ul", {
|
|
158
|
+
class: d(["bless-kanban__list", { "bless-kanban__list--end": te(l) }]),
|
|
129
159
|
role: "list"
|
|
130
|
-
}, [(
|
|
131
|
-
key:
|
|
160
|
+
}, [(p(!0), a(n, null, h(r.items, (n, i) => (p(), a("li", {
|
|
161
|
+
key: c.rowKey ? c.rowKey(n) : i,
|
|
132
162
|
"data-kanban-card": "",
|
|
133
|
-
class:
|
|
134
|
-
"bless-kanban__card--drag":
|
|
135
|
-
"bless-kanban__card--held":
|
|
136
|
-
},
|
|
137
|
-
}, [
|
|
163
|
+
class: d(["bless-kanban__card", [{
|
|
164
|
+
"bless-kanban__card--drag": F.value?.col === l && F.value.index === i,
|
|
165
|
+
"bless-kanban__card--held": L.value?.col === l && L.value.index === i
|
|
166
|
+
}, $(l, i) && `bless-kanban__card--${$(l, i)}`]])
|
|
167
|
+
}, [o("button", {
|
|
138
168
|
type: "button",
|
|
139
169
|
class: "bless-kanban__grip",
|
|
140
|
-
"data-grip": `${
|
|
141
|
-
"aria-label":
|
|
142
|
-
"aria-roledescription":
|
|
143
|
-
"aria-pressed":
|
|
144
|
-
"aria-describedby":
|
|
145
|
-
onPointerdown: (e) =>
|
|
146
|
-
onPointermove:
|
|
147
|
-
onPointerup:
|
|
148
|
-
onPointercancel:
|
|
149
|
-
onKeydown: (e) =>
|
|
150
|
-
onBlur:
|
|
151
|
-
}, [...
|
|
152
|
-
item:
|
|
153
|
-
column:
|
|
154
|
-
index:
|
|
155
|
-
}, () => [
|
|
156
|
-
|
|
157
|
-
id:
|
|
170
|
+
"data-grip": `${l}:${i}`,
|
|
171
|
+
"aria-label": k.value.card(i + 1, r.title),
|
|
172
|
+
"aria-roledescription": k.value.roleDescription,
|
|
173
|
+
"aria-pressed": L.value?.col === l && L.value.index === i,
|
|
174
|
+
"aria-describedby": P,
|
|
175
|
+
onPointerdown: (e) => q(l, i, e),
|
|
176
|
+
onPointermove: G,
|
|
177
|
+
onPointerup: J,
|
|
178
|
+
onPointercancel: Y,
|
|
179
|
+
onKeydown: (e) => Q(l, i, e),
|
|
180
|
+
onBlur: ee
|
|
181
|
+
}, [...t[0] ||= [o("span", { "aria-hidden": "true" }, "⋮⋮", -1)]], 40, T), o("div", E, [g(e.$slots, "card", {
|
|
182
|
+
item: n,
|
|
183
|
+
column: r,
|
|
184
|
+
index: i
|
|
185
|
+
}, () => [s(_(n), 1)])])], 2))), 128))], 2)], 10, x))), 128)),
|
|
186
|
+
o("span", {
|
|
187
|
+
id: P,
|
|
158
188
|
hidden: ""
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
], 8,
|
|
189
|
+
}, _(k.value.hint), 1),
|
|
190
|
+
o("span", D, _(N.value), 1)
|
|
191
|
+
], 8, b));
|
|
162
192
|
}
|
|
163
193
|
});
|
|
164
194
|
//#endregion
|
|
165
|
-
export {
|
|
195
|
+
export { O as default };
|
|
@@ -2,9 +2,11 @@ type __VLS_Props = {
|
|
|
2
2
|
height?: string;
|
|
3
3
|
position?: "top" | "bottom";
|
|
4
4
|
color?: "accent" | "text";
|
|
5
|
+
label?: string;
|
|
5
6
|
};
|
|
6
7
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
8
|
color: "accent" | "text";
|
|
9
|
+
label: string;
|
|
8
10
|
position: "top" | "bottom";
|
|
9
11
|
height: string;
|
|
10
12
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { loadingBarState as e, useLoadingBar as t } from "../composables/useLoadingBar.js";
|
|
2
2
|
import { createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, openBlock as s, unref as c } from "vue";
|
|
3
3
|
//#region src/components/BlessLoadingBar.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var l = [
|
|
4
|
+
var l = [
|
|
5
|
+
"aria-valuenow",
|
|
6
|
+
"aria-label",
|
|
7
|
+
"aria-hidden"
|
|
8
|
+
], u = /*@__PURE__*/ i({
|
|
5
9
|
name: "BlessLoadingBar",
|
|
6
10
|
__name: "BlessLoadingBar",
|
|
7
11
|
props: {
|
|
8
12
|
height: { default: "3px" },
|
|
9
13
|
position: { default: "top" },
|
|
10
|
-
color: { default: "accent" }
|
|
14
|
+
color: { default: "accent" },
|
|
15
|
+
label: { default: "Loading" }
|
|
11
16
|
},
|
|
12
17
|
setup(i) {
|
|
13
18
|
return t(), (t, u) => (s(), n("div", {
|
|
@@ -24,7 +29,7 @@ var l = ["aria-valuenow", "aria-hidden"], u = /*@__PURE__*/ i({
|
|
|
24
29
|
"aria-valuenow": c(e).active ? Math.round(c(e).progress) : void 0,
|
|
25
30
|
"aria-valuemin": "0",
|
|
26
31
|
"aria-valuemax": "100",
|
|
27
|
-
"aria-label":
|
|
32
|
+
"aria-label": i.label,
|
|
28
33
|
"aria-hidden": c(e).active ? void 0 : "true"
|
|
29
34
|
}, [...u[0] ||= [r("span", { class: "bless-loadingbar__bar" }, null, -1)]], 14, l));
|
|
30
35
|
}
|
|
@@ -8,6 +8,10 @@ type __VLS_Props = {
|
|
|
8
8
|
/** show the Pause button (needed when it moves for more than five seconds, WCAG 2.2.2) */
|
|
9
9
|
controls?: boolean;
|
|
10
10
|
label?: string;
|
|
11
|
+
labels?: Partial<{
|
|
12
|
+
play: string;
|
|
13
|
+
pause: string;
|
|
14
|
+
}>;
|
|
11
15
|
};
|
|
12
16
|
type __VLS_ModelProps = {
|
|
13
17
|
/** true while paused by the button */
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { reducedMotion as e } from "../composables/useMedia.js";
|
|
2
|
-
import {
|
|
2
|
+
import { computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, mergeModels as o, normalizeClass as s, normalizeStyle as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderSlot as p, toDisplayString as m, useModel as h } from "vue";
|
|
3
3
|
//#region src/components/BlessMarquee.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var g = ["aria-label"], _ = { class: "bless-marquee__viewport" }, v = { class: "bless-marquee__track" }, y = {
|
|
5
5
|
class: "bless-marquee__run",
|
|
6
6
|
"aria-hidden": "true",
|
|
7
7
|
inert: ""
|
|
8
|
-
},
|
|
8
|
+
}, b = ["aria-pressed"], x = /*@__PURE__*/ a({
|
|
9
9
|
name: "BlessMarquee",
|
|
10
10
|
__name: "BlessMarquee",
|
|
11
|
-
props: /*@__PURE__*/
|
|
11
|
+
props: /*@__PURE__*/ o({
|
|
12
12
|
speed: { default: 40 },
|
|
13
13
|
reverse: { type: Boolean },
|
|
14
14
|
pauseOnHover: {
|
|
@@ -19,7 +19,8 @@ var h = ["aria-label"], g = { class: "bless-marquee__viewport" }, _ = { class: "
|
|
|
19
19
|
type: Boolean,
|
|
20
20
|
default: !0
|
|
21
21
|
},
|
|
22
|
-
label: { default: "Scrolling items" }
|
|
22
|
+
label: { default: "Scrolling items" },
|
|
23
|
+
labels: {}
|
|
23
24
|
}, {
|
|
24
25
|
paused: {
|
|
25
26
|
type: Boolean,
|
|
@@ -28,37 +29,41 @@ var h = ["aria-label"], g = { class: "bless-marquee__viewport" }, _ = { class: "
|
|
|
28
29
|
pausedModifiers: {}
|
|
29
30
|
}),
|
|
30
31
|
emits: ["update:paused"],
|
|
31
|
-
setup(
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
setup(a) {
|
|
33
|
+
let o = a, x = t(() => ({
|
|
34
|
+
play: "Play",
|
|
35
|
+
pause: "Pause",
|
|
36
|
+
...o.labels
|
|
37
|
+
})), S = h(a, "paused"), C = f(), w = f(!1), T = f(20), E;
|
|
38
|
+
function D() {
|
|
39
|
+
let e = C.value?.scrollWidth ?? 0;
|
|
40
|
+
T.value = e && o.speed > 0 ? e / o.speed : 20;
|
|
36
41
|
}
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
}),
|
|
40
|
-
class:
|
|
41
|
-
"bless-marquee--paused":
|
|
42
|
-
"bless-marquee--hover":
|
|
43
|
-
"bless-marquee--still":
|
|
44
|
-
"bless-marquee--reverse":
|
|
42
|
+
return u(() => {
|
|
43
|
+
w.value = e(), D(), typeof ResizeObserver < "u" && C.value && (E = new ResizeObserver(D), E.observe(C.value));
|
|
44
|
+
}), l(() => E?.disconnect()), (e, t) => (d(), r("div", {
|
|
45
|
+
class: s(["bless-marquee", {
|
|
46
|
+
"bless-marquee--paused": S.value,
|
|
47
|
+
"bless-marquee--hover": a.pauseOnHover,
|
|
48
|
+
"bless-marquee--still": w.value,
|
|
49
|
+
"bless-marquee--reverse": a.reverse
|
|
45
50
|
}]),
|
|
46
51
|
role: "group",
|
|
47
52
|
"aria-roledescription": "marquee",
|
|
48
|
-
"aria-label":
|
|
49
|
-
style:
|
|
50
|
-
}, [
|
|
53
|
+
"aria-label": a.label,
|
|
54
|
+
style: c({ "--bless-marquee-time": `${T.value}s` })
|
|
55
|
+
}, [i("div", _, [i("div", v, [i("div", {
|
|
51
56
|
ref_key: "run",
|
|
52
|
-
ref:
|
|
57
|
+
ref: C,
|
|
53
58
|
class: "bless-marquee__run"
|
|
54
|
-
}, [
|
|
59
|
+
}, [p(e.$slots, "default")], 512), i("div", y, [p(e.$slots, "default")])])]), a.controls && !w.value ? (d(), r("button", {
|
|
55
60
|
key: 0,
|
|
56
61
|
type: "button",
|
|
57
62
|
class: "bless-marquee__btn",
|
|
58
|
-
"aria-pressed":
|
|
59
|
-
onClick:
|
|
60
|
-
},
|
|
63
|
+
"aria-pressed": S.value,
|
|
64
|
+
onClick: t[0] ||= (e) => S.value = !S.value
|
|
65
|
+
}, m(S.value ? x.value.play : x.value.pause), 9, b)) : n("", !0)], 14, g));
|
|
61
66
|
}
|
|
62
67
|
});
|
|
63
68
|
//#endregion
|
|
64
|
-
export {
|
|
69
|
+
export { x as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.bless-graph{flex-direction:column;width:100%;display:flex;position:relative}.bless-graph>.bless-canvas{flex:1}.bless-graph__edges{pointer-events:none;width:1px;height:1px;position:absolute;top:0;left:0;overflow:visible}.bless-graph__edge{fill:none;stroke:var(--bless-color-text-muted);stroke-width:2px}.bless-graph__edge--sel{stroke:var(--bless-color-accent);stroke-width:3px}.bless-graph__edge--preview{stroke:var(--bless-color-accent);stroke-dasharray:6 4}.bless-graph__arrow{fill:var(--bless-color-text-muted)}.bless-graph__edge-hit{fill:none;stroke:#0000;stroke-width:14px;pointer-events:stroke;cursor:pointer}.bless-graph__node{box-sizing:border-box;padding:0 var(--bless-space-3);background:var(--bless-color-bg);border:var(--bless-border-width) solid var(--bless-color-border);cursor:grab;touch-action:none;justify-content:center;align-items:center;display:flex;position:absolute}.bless-graph__node:focus-visible{outline:2px solid var(--bless-color-accent);outline-offset:2px}.bless-graph__node--sel{border-color:var(--bless-color-accent)}.bless-graph__node--target{outline:2px dashed var(--bless-color-accent);outline-offset:2px}.bless-graph__node--drag{cursor:grabbing}.bless-graph__label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.bless-graph__port{background:var(--bless-color-surface);border:var(--bless-border-width) solid var(--bless-color-text-muted);width:12px;height:12px;margin-top:-6px;position:absolute;top:50%}.bless-graph__port--in{left:-7px}.bless-graph__port--out{cursor:crosshair;touch-action:none;right:-7px}.bless-graph__port--out:hover{border-color:var(--bless-color-accent)}.bless-graph__live{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { CanvasView } from './BlessInfiniteCanvas.vue';
|
|
2
|
+
import { GraphEdge as Edge } from '../composables/graph';
|
|
3
|
+
export interface BlessGraphNode {
|
|
4
|
+
id: string;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export type { GraphEdge as BlessGraphEdge } from '../composables/graph';
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
13
|
+
/** size used for ports and links; put content that fits it in the `#node` slot */
|
|
14
|
+
nodeWidth?: number;
|
|
15
|
+
nodeHeight?: number;
|
|
16
|
+
/** snap dragged nodes to this grid, px; 0 is free */
|
|
17
|
+
snap?: number;
|
|
18
|
+
/** refuse a link that would close a loop */
|
|
19
|
+
acyclic?: boolean;
|
|
20
|
+
/** off: nodes can be selected and the view moved, nothing is dragged, linked or removed */
|
|
21
|
+
editable?: boolean;
|
|
22
|
+
grid?: boolean;
|
|
23
|
+
controls?: boolean;
|
|
24
|
+
minZoom?: number;
|
|
25
|
+
maxZoom?: number;
|
|
26
|
+
label?: string;
|
|
27
|
+
labels?: Partial<{
|
|
28
|
+
node: (label: string, to: string[], from: string[]) => string;
|
|
29
|
+
linkFrom: (from: string) => string;
|
|
30
|
+
linkTo: (from: string, to: string, exists: boolean) => string;
|
|
31
|
+
linked: (from: string, to: string) => string;
|
|
32
|
+
unlinked: (from: string, to: string) => string;
|
|
33
|
+
refused: (from: string, to: string, why: "self" | "exists" | "cycle") => string;
|
|
34
|
+
cancelled: string;
|
|
35
|
+
removed: (label: string) => string;
|
|
36
|
+
hint: string;
|
|
37
|
+
}>;
|
|
38
|
+
} & {
|
|
39
|
+
nodes?: BlessGraphNode[];
|
|
40
|
+
edges?: Edge[];
|
|
41
|
+
selected?: string | null;
|
|
42
|
+
view?: CanvasView;
|
|
43
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
44
|
+
disconnect: (edge: Edge) => any;
|
|
45
|
+
remove: (id: string) => any;
|
|
46
|
+
"update:selected": (value: string | null) => any;
|
|
47
|
+
move: (id: string, x: number, y: number) => any;
|
|
48
|
+
"update:view": (value: CanvasView) => any;
|
|
49
|
+
"update:nodes": (value: BlessGraphNode[]) => any;
|
|
50
|
+
"update:edges": (value: Edge[]) => any;
|
|
51
|
+
connect: (edge: Edge) => any;
|
|
52
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
53
|
+
/** size used for ports and links; put content that fits it in the `#node` slot */
|
|
54
|
+
nodeWidth?: number;
|
|
55
|
+
nodeHeight?: number;
|
|
56
|
+
/** snap dragged nodes to this grid, px; 0 is free */
|
|
57
|
+
snap?: number;
|
|
58
|
+
/** refuse a link that would close a loop */
|
|
59
|
+
acyclic?: boolean;
|
|
60
|
+
/** off: nodes can be selected and the view moved, nothing is dragged, linked or removed */
|
|
61
|
+
editable?: boolean;
|
|
62
|
+
grid?: boolean;
|
|
63
|
+
controls?: boolean;
|
|
64
|
+
minZoom?: number;
|
|
65
|
+
maxZoom?: number;
|
|
66
|
+
label?: string;
|
|
67
|
+
labels?: Partial<{
|
|
68
|
+
node: (label: string, to: string[], from: string[]) => string;
|
|
69
|
+
linkFrom: (from: string) => string;
|
|
70
|
+
linkTo: (from: string, to: string, exists: boolean) => string;
|
|
71
|
+
linked: (from: string, to: string) => string;
|
|
72
|
+
unlinked: (from: string, to: string) => string;
|
|
73
|
+
refused: (from: string, to: string, why: "self" | "exists" | "cycle") => string;
|
|
74
|
+
cancelled: string;
|
|
75
|
+
removed: (label: string) => string;
|
|
76
|
+
hint: string;
|
|
77
|
+
}>;
|
|
78
|
+
} & {
|
|
79
|
+
nodes?: BlessGraphNode[];
|
|
80
|
+
edges?: Edge[];
|
|
81
|
+
selected?: string | null;
|
|
82
|
+
view?: CanvasView;
|
|
83
|
+
}> & Readonly<{
|
|
84
|
+
onDisconnect?: ((edge: Edge) => any) | undefined;
|
|
85
|
+
onRemove?: ((id: string) => any) | undefined;
|
|
86
|
+
"onUpdate:selected"?: ((value: string | null) => any) | undefined;
|
|
87
|
+
onMove?: ((id: string, x: number, y: number) => any) | undefined;
|
|
88
|
+
"onUpdate:view"?: ((value: CanvasView) => any) | undefined;
|
|
89
|
+
"onUpdate:nodes"?: ((value: BlessGraphNode[]) => any) | undefined;
|
|
90
|
+
"onUpdate:edges"?: ((value: Edge[]) => any) | undefined;
|
|
91
|
+
onConnect?: ((edge: Edge) => any) | undefined;
|
|
92
|
+
}>, {
|
|
93
|
+
label: string;
|
|
94
|
+
grid: boolean;
|
|
95
|
+
controls: boolean;
|
|
96
|
+
editable: boolean;
|
|
97
|
+
nodeWidth: number;
|
|
98
|
+
nodeHeight: number;
|
|
99
|
+
snap: number;
|
|
100
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
101
|
+
node?: (props: {
|
|
102
|
+
node: BlessGraphNode;
|
|
103
|
+
selected: boolean;
|
|
104
|
+
}) => any;
|
|
105
|
+
}>;
|
|
106
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
107
|
+
new (): {
|
|
108
|
+
$slots: S;
|
|
109
|
+
};
|
|
110
|
+
};
|