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,114 +1,120 @@
|
|
|
1
|
-
import { Fragment as e,
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeModels as s, normalizeClass as c, openBlock as l, ref as u, renderList as d, renderSlot as f, toDisplayString as p, useId as m, useModel as h, withModifiers as g } from "vue";
|
|
2
2
|
//#region src/components/BlessOrderList.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
3
|
+
var _ = ["aria-label"], v = [
|
|
4
4
|
"onDragstart",
|
|
5
5
|
"onDragover",
|
|
6
6
|
"onDragleave",
|
|
7
7
|
"onDrop",
|
|
8
8
|
"onKeydown"
|
|
9
|
-
],
|
|
9
|
+
], y = { class: "bless-order__body" }, b = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "bless-order__btns"
|
|
12
|
-
},
|
|
12
|
+
}, x = [
|
|
13
13
|
"aria-label",
|
|
14
14
|
"disabled",
|
|
15
15
|
"onClick"
|
|
16
|
-
],
|
|
16
|
+
], S = [
|
|
17
17
|
"aria-label",
|
|
18
18
|
"disabled",
|
|
19
19
|
"onClick"
|
|
20
|
-
],
|
|
20
|
+
], C = {
|
|
21
21
|
class: "bless-order__live",
|
|
22
22
|
"aria-live": "polite"
|
|
23
|
-
},
|
|
23
|
+
}, w = /*@__PURE__*/ o({
|
|
24
24
|
name: "BlessOrderList",
|
|
25
25
|
__name: "BlessOrderList",
|
|
26
|
-
props: /*@__PURE__*/
|
|
26
|
+
props: /*@__PURE__*/ s({
|
|
27
27
|
rowKey: {},
|
|
28
28
|
label: { default: "Reorder" },
|
|
29
29
|
buttons: {
|
|
30
30
|
type: Boolean,
|
|
31
31
|
default: !0
|
|
32
|
-
}
|
|
32
|
+
},
|
|
33
|
+
labels: {}
|
|
33
34
|
}, {
|
|
34
35
|
modelValue: { default: () => [] },
|
|
35
36
|
modelModifiers: {}
|
|
36
37
|
}),
|
|
37
|
-
emits: /*@__PURE__*/
|
|
38
|
-
setup(
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
emits: /*@__PURE__*/ s(["move"], ["update:modelValue"]),
|
|
39
|
+
setup(o, { emit: s }) {
|
|
40
|
+
let w = o, T = t(() => ({
|
|
41
|
+
up: (e) => `Move item ${e} up`,
|
|
42
|
+
down: (e) => `Move item ${e} down`,
|
|
43
|
+
moved: (e, t) => `Moved to position ${e} of ${t}`,
|
|
44
|
+
...w.labels
|
|
45
|
+
})), E = h(o, "modelValue"), D = s, O = u(null), k = u(null), A = u("");
|
|
46
|
+
function j(e, t) {
|
|
47
|
+
if (e === t || t < 0 || t >= E.value.length) return;
|
|
48
|
+
let n = E.value.slice(), [r] = n.splice(e, 1);
|
|
49
|
+
n.splice(t, 0, r), E.value = n, D("move", e, t), A.value = T.value.moved(t + 1, n.length);
|
|
44
50
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
51
|
+
function M(e) {
|
|
52
|
+
O.value != null && j(O.value, e), O.value = k.value = null;
|
|
47
53
|
}
|
|
48
|
-
function
|
|
49
|
-
t.altKey && (t.key === "ArrowUp" && (t.preventDefault(),
|
|
54
|
+
function N(e, t) {
|
|
55
|
+
t.altKey && (t.key === "ArrowUp" && (t.preventDefault(), j(e, e - 1), I(e - 1)), t.key === "ArrowDown" && (t.preventDefault(), j(e, e + 1), I(e + 1)));
|
|
50
56
|
}
|
|
51
|
-
let
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
let n =
|
|
57
|
+
let P = u(), F = `${m()}-hint`, I = (e) => requestAnimationFrame(() => P.value?.querySelectorAll(".bless-order__item")[e]?.focus());
|
|
58
|
+
function L(e, t) {
|
|
59
|
+
j(e, e + t), requestAnimationFrame(() => {
|
|
60
|
+
let n = P.value?.querySelectorAll(".bless-order__item")[e + t], r = n?.querySelector(t < 0 ? ".bless-order__up" : ".bless-order__down");
|
|
55
61
|
(r && !r.disabled ? r : n)?.focus();
|
|
56
62
|
});
|
|
57
63
|
}
|
|
58
|
-
return (
|
|
64
|
+
return (t, s) => (l(), r("div", {
|
|
59
65
|
ref_key: "root",
|
|
60
|
-
ref:
|
|
66
|
+
ref: P,
|
|
61
67
|
class: "bless-order"
|
|
62
68
|
}, [
|
|
63
|
-
|
|
69
|
+
i("ul", {
|
|
64
70
|
class: "bless-order__list",
|
|
65
71
|
role: "list",
|
|
66
|
-
"aria-label":
|
|
67
|
-
}, [(
|
|
68
|
-
key:
|
|
69
|
-
class:
|
|
70
|
-
"bless-order__item--drag":
|
|
71
|
-
"bless-order__item--over":
|
|
72
|
+
"aria-label": o.label
|
|
73
|
+
}, [(l(!0), r(e, null, d(E.value, (e, u) => (l(), r("li", {
|
|
74
|
+
key: o.rowKey ? o.rowKey(e, u) : u,
|
|
75
|
+
class: c(["bless-order__item", {
|
|
76
|
+
"bless-order__item--drag": O.value === u,
|
|
77
|
+
"bless-order__item--over": k.value === u
|
|
72
78
|
}]),
|
|
73
79
|
draggable: "true",
|
|
74
80
|
tabindex: "0",
|
|
75
|
-
"aria-describedby":
|
|
76
|
-
onDragstart: (e) =>
|
|
77
|
-
onDragover:
|
|
78
|
-
onDragleave: (e) =>
|
|
79
|
-
onDrop:
|
|
80
|
-
onDragend:
|
|
81
|
-
onKeydown: (e) =>
|
|
81
|
+
"aria-describedby": F,
|
|
82
|
+
onDragstart: (e) => O.value = u,
|
|
83
|
+
onDragover: g((e) => k.value = u, ["prevent"]),
|
|
84
|
+
onDragleave: (e) => k.value === u && (k.value = null),
|
|
85
|
+
onDrop: g((e) => M(u), ["prevent"]),
|
|
86
|
+
onDragend: s[0] ||= (e) => O.value = k.value = null,
|
|
87
|
+
onKeydown: (e) => N(u, e)
|
|
82
88
|
}, [
|
|
83
|
-
|
|
89
|
+
s[1] ||= i("span", {
|
|
84
90
|
class: "bless-order__grip",
|
|
85
91
|
"aria-hidden": "true"
|
|
86
92
|
}, "⋮⋮", -1),
|
|
87
|
-
|
|
93
|
+
i("span", y, [f(t.$slots, "default", {
|
|
88
94
|
item: e,
|
|
89
95
|
index: u
|
|
90
|
-
}, () => [
|
|
91
|
-
|
|
96
|
+
}, () => [a(p(e), 1)])]),
|
|
97
|
+
w.buttons ? (l(), r("span", b, [i("button", {
|
|
92
98
|
type: "button",
|
|
93
99
|
class: "bless-order__up",
|
|
94
|
-
"aria-label":
|
|
100
|
+
"aria-label": T.value.up(u + 1),
|
|
95
101
|
disabled: u === 0,
|
|
96
|
-
onClick: (e) =>
|
|
97
|
-
}, " ↑ ", 8,
|
|
102
|
+
onClick: (e) => L(u, -1)
|
|
103
|
+
}, " ↑ ", 8, x), i("button", {
|
|
98
104
|
type: "button",
|
|
99
105
|
class: "bless-order__down",
|
|
100
|
-
"aria-label":
|
|
101
|
-
disabled: u ===
|
|
102
|
-
onClick: (e) =>
|
|
103
|
-
}, " ↓ ", 8,
|
|
104
|
-
], 42,
|
|
105
|
-
|
|
106
|
-
id:
|
|
106
|
+
"aria-label": T.value.down(u + 1),
|
|
107
|
+
disabled: u === E.value.length - 1,
|
|
108
|
+
onClick: (e) => L(u, 1)
|
|
109
|
+
}, " ↓ ", 8, S)])) : n("", !0)
|
|
110
|
+
], 42, v))), 128))], 8, _),
|
|
111
|
+
i("span", {
|
|
112
|
+
id: F,
|
|
107
113
|
hidden: ""
|
|
108
114
|
}, "Alt plus arrow keys move it."),
|
|
109
|
-
|
|
115
|
+
i("span", C, p(A.value), 1)
|
|
110
116
|
], 512));
|
|
111
117
|
}
|
|
112
118
|
});
|
|
113
119
|
//#endregion
|
|
114
|
-
export {
|
|
120
|
+
export { w as default };
|
|
@@ -5,6 +5,8 @@ type __VLS_Props = {
|
|
|
5
5
|
label?: string;
|
|
6
6
|
prevLabel?: string;
|
|
7
7
|
nextLabel?: string;
|
|
8
|
+
/** name of a page link, from its number */
|
|
9
|
+
pageLabel?: (page: number) => string;
|
|
8
10
|
/** render <a href> using this fn instead of buttons */
|
|
9
11
|
href?: (page: number) => string;
|
|
10
12
|
};
|
|
@@ -18,6 +18,7 @@ var v = ["aria-label"], y = {
|
|
|
18
18
|
label: { default: "Pagination" },
|
|
19
19
|
prevLabel: { default: "Previous" },
|
|
20
20
|
nextLabel: { default: "Next" },
|
|
21
|
+
pageLabel: {},
|
|
21
22
|
href: {}
|
|
22
23
|
}, {
|
|
23
24
|
modelValue: { default: 1 },
|
|
@@ -63,7 +64,7 @@ var v = ["aria-label"], y = {
|
|
|
63
64
|
class: ["bless-pagination__btn", { "bless-pagination__btn--current": t === S.value }],
|
|
64
65
|
color: t === S.value ? "accent" : "none",
|
|
65
66
|
"aria-current": t === S.value ? "page" : void 0,
|
|
66
|
-
"aria-label": `Page ${t
|
|
67
|
+
"aria-label": (l.pageLabel ?? ((e) => `Page ${e}`))(t),
|
|
67
68
|
onClick: (e) => !l.href && w(t)
|
|
68
69
|
}), {
|
|
69
70
|
default: _(() => [s(m(t), 1)]),
|
|
@@ -4,6 +4,11 @@ declare const __VLS_export: <T extends string | number>(__VLS_props: NonNullable
|
|
|
4
4
|
sourceLabel?: string;
|
|
5
5
|
targetLabel?: string;
|
|
6
6
|
rows?: number;
|
|
7
|
+
labels?: Partial<{
|
|
8
|
+
moveSelected: (to: string) => string;
|
|
9
|
+
moveAll: (to: string) => string;
|
|
10
|
+
moved: (count: number, to: string) => string;
|
|
11
|
+
}>;
|
|
7
12
|
} & {
|
|
8
13
|
source?: BlessOption<T>[];
|
|
9
14
|
target?: BlessOption<T>[];
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import e from "./BlessButton.js";
|
|
2
2
|
import t from "./BlessListbox.js";
|
|
3
|
-
import {
|
|
3
|
+
import { computed as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, mergeModels as s, nextTick as c, openBlock as l, ref as u, toDisplayString as d, useModel as f, withCtx as p } from "vue";
|
|
4
4
|
//#region src/components/BlessPickList.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var m = { class: "bless-picklist__col" }, h = { class: "bless-picklist__title" }, g = { class: "bless-picklist__btns" }, _ = { class: "bless-picklist__col" }, v = { class: "bless-picklist__title" }, y = {
|
|
6
6
|
class: "bless-picklist__live",
|
|
7
7
|
"aria-live": "polite"
|
|
8
|
-
},
|
|
8
|
+
}, b = /*@__PURE__*/ o({
|
|
9
9
|
name: "BlessPickList",
|
|
10
10
|
__name: "BlessPickList",
|
|
11
|
-
props: /*@__PURE__*/
|
|
11
|
+
props: /*@__PURE__*/ s({
|
|
12
12
|
sourceLabel: { default: "Available" },
|
|
13
13
|
targetLabel: { default: "Selected" },
|
|
14
|
-
rows: { default: 6 }
|
|
14
|
+
rows: { default: 6 },
|
|
15
|
+
labels: {}
|
|
15
16
|
}, {
|
|
16
17
|
source: { default: () => [] },
|
|
17
18
|
sourceModifiers: {},
|
|
@@ -19,102 +20,107 @@ var p = { class: "bless-picklist__col" }, m = { class: "bless-picklist__title" }
|
|
|
19
20
|
targetModifiers: {}
|
|
20
21
|
}),
|
|
21
22
|
emits: ["update:source", "update:target"],
|
|
22
|
-
setup(
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
setup(o) {
|
|
24
|
+
let s = o, b = n(() => ({
|
|
25
|
+
moveSelected: (e) => `Move selected to ${e}`,
|
|
26
|
+
moveAll: (e) => `Move all to ${e}`,
|
|
27
|
+
moved: (e, t) => `Moved ${e} to ${t}`,
|
|
28
|
+
...s.labels
|
|
29
|
+
})), x = f(o, "source"), S = f(o, "target"), C = u([]), w = u([]), T = u(), E = u("");
|
|
30
|
+
function D(e, t) {
|
|
31
|
+
let [n, r] = e === "source" ? [x, S] : [S, x], i = n.value.filter((e) => t.includes(e.value));
|
|
32
|
+
n.value = n.value.filter((e) => !t.includes(e.value)), r.value = [...r.value, ...i], C.value = [], w.value = [];
|
|
33
|
+
let a = e === "source" ? s.targetLabel : s.sourceLabel;
|
|
34
|
+
E.value = b.value.moved(i.length, a), c(() => T.value?.querySelectorAll("[role=listbox]")[+(e === "source")]?.focus());
|
|
29
35
|
}
|
|
30
|
-
return (
|
|
36
|
+
return (n, s) => (l(), r("div", {
|
|
31
37
|
ref_key: "root",
|
|
32
|
-
ref:
|
|
38
|
+
ref: T,
|
|
33
39
|
class: "bless-picklist"
|
|
34
40
|
}, [
|
|
35
|
-
|
|
36
|
-
modelValue:
|
|
37
|
-
"onUpdate:modelValue": s[0] ||= (e) =>
|
|
38
|
-
options:
|
|
41
|
+
i("div", m, [i("span", h, d(o.sourceLabel) + " · " + d(x.value.length), 1), a(t, {
|
|
42
|
+
modelValue: C.value,
|
|
43
|
+
"onUpdate:modelValue": s[0] ||= (e) => C.value = e,
|
|
44
|
+
options: x.value,
|
|
39
45
|
multiple: "",
|
|
40
|
-
rows:
|
|
41
|
-
label:
|
|
46
|
+
rows: o.rows,
|
|
47
|
+
label: o.sourceLabel
|
|
42
48
|
}, null, 8, [
|
|
43
49
|
"modelValue",
|
|
44
50
|
"options",
|
|
45
51
|
"rows",
|
|
46
52
|
"label"
|
|
47
53
|
])]),
|
|
48
|
-
|
|
49
|
-
|
|
54
|
+
i("div", g, [
|
|
55
|
+
a(e, {
|
|
50
56
|
size: "sm",
|
|
51
57
|
variant: "outline",
|
|
52
|
-
disabled: !
|
|
53
|
-
"aria-label":
|
|
54
|
-
onClick: s[1] ||= (e) =>
|
|
58
|
+
disabled: !C.value.length,
|
|
59
|
+
"aria-label": b.value.moveSelected(o.targetLabel),
|
|
60
|
+
onClick: s[1] ||= (e) => D("source", C.value)
|
|
55
61
|
}, {
|
|
56
|
-
default:
|
|
62
|
+
default: p(() => [...s[6] ||= [i("span", {
|
|
57
63
|
class: "bless-picklist__arrow",
|
|
58
64
|
"aria-hidden": "true"
|
|
59
65
|
}, "›", -1)]]),
|
|
60
66
|
_: 1
|
|
61
67
|
}, 8, ["disabled", "aria-label"]),
|
|
62
|
-
|
|
68
|
+
a(e, {
|
|
63
69
|
size: "sm",
|
|
64
70
|
variant: "outline",
|
|
65
|
-
disabled: !
|
|
66
|
-
"aria-label":
|
|
67
|
-
onClick: s[2] ||= (e) =>
|
|
71
|
+
disabled: !x.value.length,
|
|
72
|
+
"aria-label": b.value.moveAll(o.targetLabel),
|
|
73
|
+
onClick: s[2] ||= (e) => D("source", x.value.map((e) => e.value))
|
|
68
74
|
}, {
|
|
69
|
-
default:
|
|
75
|
+
default: p(() => [...s[7] ||= [i("span", {
|
|
70
76
|
class: "bless-picklist__arrow",
|
|
71
77
|
"aria-hidden": "true"
|
|
72
78
|
}, "»", -1)]]),
|
|
73
79
|
_: 1
|
|
74
80
|
}, 8, ["disabled", "aria-label"]),
|
|
75
|
-
|
|
81
|
+
a(e, {
|
|
76
82
|
size: "sm",
|
|
77
83
|
variant: "outline",
|
|
78
|
-
disabled: !
|
|
79
|
-
"aria-label":
|
|
80
|
-
onClick: s[3] ||= (e) =>
|
|
84
|
+
disabled: !w.value.length,
|
|
85
|
+
"aria-label": b.value.moveSelected(o.sourceLabel),
|
|
86
|
+
onClick: s[3] ||= (e) => D("target", w.value)
|
|
81
87
|
}, {
|
|
82
|
-
default:
|
|
88
|
+
default: p(() => [...s[8] ||= [i("span", {
|
|
83
89
|
class: "bless-picklist__arrow",
|
|
84
90
|
"aria-hidden": "true"
|
|
85
91
|
}, "‹", -1)]]),
|
|
86
92
|
_: 1
|
|
87
93
|
}, 8, ["disabled", "aria-label"]),
|
|
88
|
-
|
|
94
|
+
a(e, {
|
|
89
95
|
size: "sm",
|
|
90
96
|
variant: "outline",
|
|
91
|
-
disabled: !
|
|
92
|
-
"aria-label":
|
|
93
|
-
onClick: s[4] ||= (e) =>
|
|
97
|
+
disabled: !S.value.length,
|
|
98
|
+
"aria-label": b.value.moveAll(o.sourceLabel),
|
|
99
|
+
onClick: s[4] ||= (e) => D("target", S.value.map((e) => e.value))
|
|
94
100
|
}, {
|
|
95
|
-
default:
|
|
101
|
+
default: p(() => [...s[9] ||= [i("span", {
|
|
96
102
|
class: "bless-picklist__arrow",
|
|
97
103
|
"aria-hidden": "true"
|
|
98
104
|
}, "«", -1)]]),
|
|
99
105
|
_: 1
|
|
100
106
|
}, 8, ["disabled", "aria-label"])
|
|
101
107
|
]),
|
|
102
|
-
|
|
103
|
-
modelValue:
|
|
104
|
-
"onUpdate:modelValue": s[5] ||= (e) =>
|
|
105
|
-
options:
|
|
108
|
+
i("div", _, [i("span", v, d(o.targetLabel) + " · " + d(S.value.length), 1), a(t, {
|
|
109
|
+
modelValue: w.value,
|
|
110
|
+
"onUpdate:modelValue": s[5] ||= (e) => w.value = e,
|
|
111
|
+
options: S.value,
|
|
106
112
|
multiple: "",
|
|
107
|
-
rows:
|
|
108
|
-
label:
|
|
113
|
+
rows: o.rows,
|
|
114
|
+
label: o.targetLabel
|
|
109
115
|
}, null, 8, [
|
|
110
116
|
"modelValue",
|
|
111
117
|
"options",
|
|
112
118
|
"rows",
|
|
113
119
|
"label"
|
|
114
120
|
])]),
|
|
115
|
-
|
|
121
|
+
i("span", y, d(E.value), 1)
|
|
116
122
|
], 512));
|
|
117
123
|
}
|
|
118
124
|
});
|
|
119
125
|
//#endregion
|
|
120
|
-
export {
|
|
126
|
+
export { b as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.bless-range{gap:var(--bless-space-2);width:max-content;max-width:100%;font-family:var(--bless-font-sans);font-size:var(--bless-text-sm);color:var(--bless-color-text);display:grid;position:relative}.bless-range__bar,.bless-range__foot{justify-content:space-between;align-items:center;gap:var(--bless-space-2);display:flex}.bless-range__title{text-transform:capitalize}.bless-range__grid{-webkit-user-select:none;user-select:none;gap:2px;display:grid}.bless-range__row{grid-template-columns:repeat(7,40px);gap:2px;display:grid}.bless-range__head{padding:var(--bless-space-1) 0;color:var(--bless-color-text-muted);font-size:var(--bless-text-xs);text-align:center}.bless-range__day{background:var(--bless-color-bg);border:var(--bless-border-width) solid var(--bless-color-border);height:40px;color:inherit;font:inherit;cursor:pointer;touch-action:none;padding:0}.bless-range__day[aria-disabled=true]{opacity:.4;cursor:not-allowed}.bless-range__day--today{font-weight:var(--bless-font-weight-bold,700);text-decoration:underline}.bless-range__day--on{background:var(--bless-color-accent);border-color:var(--bless-color-accent);color:var(--bless-color-on-accent)}.bless-range__day--set{border-color:var(--bless-color-accent);background:color-mix(in srgb, var(--bless-color-accent) 25%, var(--bless-color-bg));color:var(--bless-color-text)}.bless-range__day--clear{border-style:dashed;border-color:var(--bless-color-danger);background:var(--bless-color-bg);color:var(--bless-color-text)}.bless-range__day:focus-visible{outline:2px solid var(--bless-color-accent);outline-offset:2px;z-index:1}.bless-range__live{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { DayBlock } from '../composables/dayBlocks';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** 0 = Sunday, 1 = Monday */
|
|
4
|
+
weekStart?: 0 | 1;
|
|
5
|
+
locale?: string;
|
|
6
|
+
min?: string;
|
|
7
|
+
max?: string;
|
|
8
|
+
disabledDates?: (iso: string) => boolean;
|
|
9
|
+
/** month shown first (YYYY-MM); defaults to the first chosen day, else this month */
|
|
10
|
+
month?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
labels?: Partial<{
|
|
13
|
+
prev: string;
|
|
14
|
+
next: string;
|
|
15
|
+
clear: string;
|
|
16
|
+
summary: (days: number, blocks: number) => string;
|
|
17
|
+
selected: (day: string) => string;
|
|
18
|
+
cleared: (day: string) => string;
|
|
19
|
+
hint: string;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_ModelProps = {
|
|
23
|
+
/** every chosen day, as sorted `YYYY-MM-DD` */
|
|
24
|
+
modelValue?: string[];
|
|
25
|
+
};
|
|
26
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
27
|
+
declare var __VLS_17: {
|
|
28
|
+
blocks: DayBlock[];
|
|
29
|
+
};
|
|
30
|
+
type __VLS_Slots = {} & {
|
|
31
|
+
summary?: (props: typeof __VLS_17) => any;
|
|
32
|
+
};
|
|
33
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
34
|
+
change: (blocks: DayBlock[]) => any;
|
|
35
|
+
"update:modelValue": (value: string[]) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
37
|
+
onChange?: ((blocks: DayBlock[]) => any) | undefined;
|
|
38
|
+
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
label: string;
|
|
41
|
+
weekStart: 0 | 1;
|
|
42
|
+
locale: string;
|
|
43
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
44
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|