blessing-ui 0.1.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 +69 -0
- package/README.md +139 -105
- package/dist/blessing-ui.css +97 -1
- 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.css +1 -0
- package/dist/components/BlessCodeBlock.js +6 -0
- package/dist/components/BlessCodeBlock.vue.d.ts +72 -0
- package/dist/components/BlessCodeBlock.vue_vue_type_script_setup_true_lang.js +140 -0
- 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/BlessCountUp.css +1 -0
- package/dist/components/BlessCountUp.js +6 -0
- package/dist/components/BlessCountUp.vue.d.ts +18 -0
- package/dist/components/BlessCountUp.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/components/BlessCropper.css +1 -0
- package/dist/components/BlessCropper.js +6 -0
- package/dist/components/BlessCropper.vue.d.ts +70 -0
- package/dist/components/BlessCropper.vue_vue_type_script_setup_true_lang.js +220 -0
- 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/BlessDiff.css +1 -0
- package/dist/components/BlessDiff.js +6 -0
- package/dist/components/BlessDiff.vue.d.ts +22 -0
- package/dist/components/BlessDiff.vue_vue_type_script_setup_true_lang.js +148 -0
- 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.css +1 -0
- package/dist/components/BlessGantt.js +6 -0
- package/dist/components/BlessGantt.vue.d.ts +81 -0
- package/dist/components/BlessGantt.vue_vue_type_script_setup_true_lang.js +276 -0
- package/dist/components/BlessGauge.css +1 -0
- package/dist/components/BlessGauge.js +6 -0
- package/dist/components/BlessGauge.vue.d.ts +36 -0
- package/dist/components/BlessGauge.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/BlessHeatmapCalendar.css +1 -0
- package/dist/components/BlessHeatmapCalendar.js +6 -0
- package/dist/components/BlessHeatmapCalendar.vue.d.ts +38 -0
- package/dist/components/BlessHeatmapCalendar.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/BlessHotspots.css +1 -0
- package/dist/components/BlessHotspots.js +6 -0
- package/dist/components/BlessHotspots.vue.d.ts +49 -0
- package/dist/components/BlessHotspots.vue_vue_type_script_setup_true_lang.js +127 -0
- 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.css +1 -0
- package/dist/components/BlessKanban.js +6 -0
- package/dist/components/BlessKanban.vue.d.ts +67 -0
- package/dist/components/BlessKanban.vue_vue_type_script_setup_true_lang.js +195 -0
- 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/BlessLoupe.css +1 -0
- package/dist/components/BlessLoupe.js +6 -0
- package/dist/components/BlessLoupe.vue.d.ts +16 -0
- package/dist/components/BlessLoupe.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/BlessMarquee.css +1 -0
- package/dist/components/BlessMarquee.js +6 -0
- package/dist/components/BlessMarquee.vue.d.ts +44 -0
- package/dist/components/BlessMarquee.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/BlessMasonry.css +1 -0
- package/dist/components/BlessMasonry.js +6 -0
- package/dist/components/BlessMasonry.vue.d.ts +33 -0
- package/dist/components/BlessMasonry.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/BlessMention.css +1 -0
- package/dist/components/BlessMention.js +6 -0
- package/dist/components/BlessMention.vue.d.ts +32 -0
- package/dist/components/BlessMention.vue_vue_type_script_setup_true_lang.js +116 -0
- 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/BlessRadialMenu.css +1 -0
- package/dist/components/BlessRadialMenu.js +6 -0
- package/dist/components/BlessRadialMenu.vue.d.ts +45 -0
- package/dist/components/BlessRadialMenu.vue_vue_type_script_setup_true_lang.js +146 -0
- 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.css +1 -0
- package/dist/components/BlessShortcutRecorder.js +6 -0
- package/dist/components/BlessShortcutRecorder.vue.d.ts +39 -0
- package/dist/components/BlessShortcutRecorder.vue_vue_type_script_setup_true_lang.js +126 -0
- package/dist/components/BlessSignaturePad.vue.d.ts +1 -1
- package/dist/components/BlessSliderCaptcha.css +1 -0
- package/dist/components/BlessSliderCaptcha.js +6 -0
- package/dist/components/BlessSliderCaptcha.vue.d.ts +38 -0
- package/dist/components/BlessSliderCaptcha.vue_vue_type_script_setup_true_lang.js +146 -0
- package/dist/components/BlessSortable.css +1 -0
- package/dist/components/BlessSortable.js +6 -0
- package/dist/components/BlessSortable.vue.d.ts +51 -0
- package/dist/components/BlessSortable.vue_vue_type_script_setup_true_lang.js +135 -0
- 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/BlessSplitView.css +1 -0
- package/dist/components/BlessSplitView.js +6 -0
- package/dist/components/BlessSplitView.vue.d.ts +61 -0
- package/dist/components/BlessSplitView.vue_vue_type_script_setup_true_lang.js +92 -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.css +1 -0
- package/dist/components/BlessSwipeDeck.js +6 -0
- package/dist/components/BlessSwipeDeck.vue.d.ts +46 -0
- package/dist/components/BlessSwipeDeck.vue_vue_type_script_setup_true_lang.js +200 -0
- package/dist/components/BlessTimer.css +1 -0
- package/dist/components/BlessTimer.js +6 -0
- package/dist/components/BlessTimer.vue.d.ts +74 -0
- package/dist/components/BlessTimer.vue_vue_type_script_setup_true_lang.js +139 -0
- 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/cropBox.d.ts +22 -0
- package/dist/composables/cropBox.js +39 -0
- package/dist/composables/dayBlocks.d.ts +11 -0
- package/dist/composables/dayBlocks.js +26 -0
- package/dist/composables/diffLines.d.ts +10 -0
- package/dist/composables/diffLines.js +55 -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/radial.d.ts +15 -0
- package/dist/composables/radial.js +22 -0
- package/dist/composables/schedule.d.ts +27 -0
- package/dist/composables/schedule.js +54 -0
- package/dist/composables/shortcut.d.ts +12 -0
- package/dist/composables/shortcut.js +35 -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 +58 -0
- package/dist/composables/useSortable.js +107 -0
- package/dist/index.d.ts +62 -1
- package/dist/index.js +93 -53
- package/package.json +22 -18
|
@@ -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-radial__area{-webkit-touch-callout:none}.bless-radial{inset:unset;font-family:var(--bless-font-sans);color:var(--bless-color-text);touch-action:none;-webkit-user-select:none;user-select:none;background:0 0;border:0;margin:0;padding:0;position:fixed;overflow:visible}.bless-radial::backdrop{background:0 0}.bless-radial__core{max-width:64px;padding:var(--bless-space-1);text-align:center;font-size:var(--bless-text-xs);pointer-events:none;line-height:1.2;position:absolute;inset:50% auto auto 50%;translate:-50% -50%}.bless-radial__item{border:var(--bless-border-width) solid var(--bless-color-text);background:var(--bless-color-bg);width:44px;height:44px;color:inherit;font:inherit;font-size:var(--bless-text-md);box-shadow:var(--bless-shadow-plate);cursor:pointer;place-items:center;padding:0;display:grid;position:absolute;translate:-50% -50%}.bless-radial__item--on{background:var(--bless-color-accent);border-color:var(--bless-color-accent);color:var(--bless-color-on-accent)}.bless-radial__item[aria-disabled=true]{opacity:.4;cursor:not-allowed}.bless-radial__item:focus-visible{outline:2px solid var(--bless-color-accent);outline-offset:2px}@media (prefers-reduced-motion:no-preference){.bless-radial:popover-open .bless-radial__item{animation:bless-radial-in var(--bless-duration-base) var(--bless-ease-out)}}@keyframes bless-radial-in{0%{opacity:0;scale:.6}}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface BlessRadialItem {
|
|
2
|
+
id: string | number;
|
|
3
|
+
label: string;
|
|
4
|
+
/** a character or emoji for the button; `#item` replaces it */
|
|
5
|
+
icon?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
declare const __VLS_export: <T extends BlessRadialItem = BlessRadialItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
11
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<({
|
|
12
|
+
items: T[];
|
|
13
|
+
/** distance from the centre to the buttons, in px */
|
|
14
|
+
radius?: number;
|
|
15
|
+
/** how long a touch has to stay down to open it, in ms */
|
|
16
|
+
holdMs?: number;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
label?: string;
|
|
19
|
+
} & {
|
|
20
|
+
open?: boolean;
|
|
21
|
+
}) & {
|
|
22
|
+
onSelect?: ((item: T) => any) | undefined;
|
|
23
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
24
|
+
}> & (typeof globalThis extends {
|
|
25
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
26
|
+
} ? P : {});
|
|
27
|
+
expose: (exposed: {}) => void;
|
|
28
|
+
attrs: any;
|
|
29
|
+
slots: {
|
|
30
|
+
default?: (props: {}) => any;
|
|
31
|
+
} & {
|
|
32
|
+
item?: (props: {
|
|
33
|
+
item: T;
|
|
34
|
+
index: number;
|
|
35
|
+
}) => any;
|
|
36
|
+
};
|
|
37
|
+
emit: ((evt: "select", item: T) => void) & ((event: "update:open", value: boolean) => void);
|
|
38
|
+
}>) => import('vue').VNode & {
|
|
39
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
40
|
+
};
|
|
41
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
42
|
+
[K in keyof T]: T[K];
|
|
43
|
+
} : {
|
|
44
|
+
[K in keyof T as K]: T[K];
|
|
45
|
+
}) & {};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { logicalKey as e } from "../composables/rtl.js";
|
|
2
|
+
import { keepInside as t, polar as n, sectorAt as r } from "../composables/radial.js";
|
|
3
|
+
import { Fragment as i, computed as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, defineComponent as l, mergeModels as u, mergeProps as d, nextTick as f, normalizeClass as p, normalizeStyle as m, onBeforeUnmount as h, openBlock as g, ref as _, renderList as v, renderSlot as y, toDisplayString as b, unref as x, useId as S, useModel as C, watch as w, withModifiers as T } from "vue";
|
|
4
|
+
//#region src/components/BlessRadialMenu.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var E = ["id", "aria-label"], ee = {
|
|
6
|
+
class: "bless-radial__core",
|
|
7
|
+
"aria-hidden": "true"
|
|
8
|
+
}, te = [
|
|
9
|
+
"aria-label",
|
|
10
|
+
"aria-disabled",
|
|
11
|
+
"tabindex",
|
|
12
|
+
"onClick",
|
|
13
|
+
"onPointerenter"
|
|
14
|
+
], D = /*@__PURE__*/ l({
|
|
15
|
+
name: "BlessRadialMenu",
|
|
16
|
+
inheritAttrs: !1,
|
|
17
|
+
__name: "BlessRadialMenu",
|
|
18
|
+
props: /*@__PURE__*/ u({
|
|
19
|
+
items: {},
|
|
20
|
+
radius: { default: 84 },
|
|
21
|
+
holdMs: { default: 450 },
|
|
22
|
+
disabled: { type: Boolean },
|
|
23
|
+
label: { default: "Actions" }
|
|
24
|
+
}, {
|
|
25
|
+
open: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
openModifiers: {}
|
|
30
|
+
}),
|
|
31
|
+
emits: /*@__PURE__*/ u(["select"], ["update:open"]),
|
|
32
|
+
setup(l, { emit: u }) {
|
|
33
|
+
let D = l, O = C(l, "open"), k = u, A = S(), j = _(), M = _(), N = _({
|
|
34
|
+
x: 0,
|
|
35
|
+
y: 0
|
|
36
|
+
}), P = _(null), F = !1, I, L = null, R = a(() => D.radius + 22), z = a(() => D.items.map((e, t) => n(t, D.items.length, D.radius))), B = a(() => D.items.map((e, t) => e.disabled ? -1 : t).filter((e) => e >= 0));
|
|
37
|
+
function V(e, n, r = !1) {
|
|
38
|
+
!D.disabled && D.items.length && (N.value = t(e, n, R.value, window.innerWidth, window.innerHeight), P.value = null, F = r, O.value = !0);
|
|
39
|
+
}
|
|
40
|
+
function H(e = !0) {
|
|
41
|
+
F = !1, O.value && (O.value = !1, e && (j.value?.querySelector("[tabindex],button,a,input") ?? j.value)?.focus?.());
|
|
42
|
+
}
|
|
43
|
+
function U(e) {
|
|
44
|
+
let t = D.items[e];
|
|
45
|
+
t && !t.disabled && (k("select", t), H());
|
|
46
|
+
}
|
|
47
|
+
function W(e) {
|
|
48
|
+
D.disabled || (e.preventDefault(), clearTimeout(I), O.value || V(e.clientX, e.clientY));
|
|
49
|
+
}
|
|
50
|
+
function G(e) {
|
|
51
|
+
D.disabled || e.pointerType === "mouse" || (L = {
|
|
52
|
+
x: e.clientX,
|
|
53
|
+
y: e.clientY
|
|
54
|
+
}, clearTimeout(I), I = setTimeout(() => {
|
|
55
|
+
L && V(L.x, L.y, !0);
|
|
56
|
+
}, D.holdMs));
|
|
57
|
+
}
|
|
58
|
+
function K(e) {
|
|
59
|
+
L && !O.value && Math.hypot(e.clientX - L.x, e.clientY - L.y) > 8 && (clearTimeout(I), L = null);
|
|
60
|
+
}
|
|
61
|
+
function q() {
|
|
62
|
+
clearTimeout(I), L = null;
|
|
63
|
+
}
|
|
64
|
+
function J(e) {
|
|
65
|
+
if (e.key === "ContextMenu" || e.shiftKey && e.key === "F10") {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
let t = e.target.getBoundingClientRect();
|
|
68
|
+
V(t.left + t.width / 2, t.top + t.height / 2);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function Y(e) {
|
|
72
|
+
if (!O.value) return;
|
|
73
|
+
let t = r(e.clientX - N.value.x, e.clientY - N.value.y, D.items.length);
|
|
74
|
+
F && (P.value = t !== null && !D.items[t]?.disabled ? t : null);
|
|
75
|
+
}
|
|
76
|
+
function X() {
|
|
77
|
+
O.value && F && (F = !1, L = null, P.value !== null && U(P.value));
|
|
78
|
+
}
|
|
79
|
+
function Z(t) {
|
|
80
|
+
let n = e(t), r = B.value;
|
|
81
|
+
if (!r.length) return;
|
|
82
|
+
let i = P.value === null ? -1 : r.indexOf(P.value);
|
|
83
|
+
n === "ArrowRight" || n === "ArrowDown" ? (t.preventDefault(), Q(r[(i + 1) % r.length])) : n === "ArrowLeft" || n === "ArrowUp" ? (t.preventDefault(), Q(r[(i - 1 + r.length) % r.length])) : t.key === "Home" ? (t.preventDefault(), Q(r[0])) : t.key === "End" ? (t.preventDefault(), Q(r.at(-1))) : t.key === "Escape" ? (t.preventDefault(), t.stopPropagation(), H()) : t.key === "Tab" && H(!1);
|
|
84
|
+
}
|
|
85
|
+
function Q(e) {
|
|
86
|
+
P.value = e, f(() => M.value?.querySelectorAll("[role=\"menuitem\"]")[e]?.focus());
|
|
87
|
+
}
|
|
88
|
+
w(O, async (e) => {
|
|
89
|
+
await f();
|
|
90
|
+
let t = M.value;
|
|
91
|
+
t && typeof t.showPopover == "function" && (e ? (t.matches(":popover-open") || t.showPopover(), window.addEventListener("pointermove", Y), window.addEventListener("pointerup", X), window.addEventListener("pointercancel", X), window.addEventListener("pointerdown", $, !0), F || Q(B.value[0] ?? 0)) : (t.matches(":popover-open") && t.hidePopover(), window.removeEventListener("pointermove", Y), window.removeEventListener("pointerup", X), window.removeEventListener("pointercancel", X), window.removeEventListener("pointerdown", $, !0)));
|
|
92
|
+
});
|
|
93
|
+
function $(e) {
|
|
94
|
+
!M.value?.contains(e.target) && !F && H(!1);
|
|
95
|
+
}
|
|
96
|
+
return h(() => {
|
|
97
|
+
clearTimeout(I), window.removeEventListener("pointermove", Y), window.removeEventListener("pointerup", X), window.removeEventListener("pointercancel", X), window.removeEventListener("pointerdown", $, !0);
|
|
98
|
+
}), (e, t) => (g(), o(i, null, [s("div", d({
|
|
99
|
+
ref_key: "area",
|
|
100
|
+
ref: j,
|
|
101
|
+
class: "bless-radial__area"
|
|
102
|
+
}, e.$attrs, {
|
|
103
|
+
onContextmenu: W,
|
|
104
|
+
onPointerdown: G,
|
|
105
|
+
onPointermove: K,
|
|
106
|
+
onPointerup: q,
|
|
107
|
+
onPointercancel: q,
|
|
108
|
+
onKeydown: J
|
|
109
|
+
}), [y(e.$slots, "default")], 16), s("div", {
|
|
110
|
+
id: x(A),
|
|
111
|
+
ref_key: "panel",
|
|
112
|
+
ref: M,
|
|
113
|
+
popover: "manual",
|
|
114
|
+
class: "bless-radial",
|
|
115
|
+
role: "menu",
|
|
116
|
+
"aria-label": l.label,
|
|
117
|
+
style: m({
|
|
118
|
+
left: `${N.value.x - R.value}px`,
|
|
119
|
+
top: `${N.value.y - R.value}px`,
|
|
120
|
+
width: `${R.value * 2}px`,
|
|
121
|
+
height: `${R.value * 2}px`
|
|
122
|
+
}),
|
|
123
|
+
onKeydown: Z,
|
|
124
|
+
onContextmenu: t[0] ||= T(() => {}, ["prevent"])
|
|
125
|
+
}, [s("span", ee, b(P.value === null ? "" : l.items[P.value]?.label), 1), (g(!0), o(i, null, v(l.items, (t, n) => (g(), o("button", {
|
|
126
|
+
key: t.id,
|
|
127
|
+
type: "button",
|
|
128
|
+
role: "menuitem",
|
|
129
|
+
class: p(["bless-radial__item", { "bless-radial__item--on": P.value === n }]),
|
|
130
|
+
style: m({
|
|
131
|
+
left: `calc(50% + ${z.value[n].x}px)`,
|
|
132
|
+
top: `calc(50% + ${z.value[n].y}px)`
|
|
133
|
+
}),
|
|
134
|
+
"aria-label": t.label,
|
|
135
|
+
"aria-disabled": t.disabled || void 0,
|
|
136
|
+
tabindex: P.value === n ? 0 : -1,
|
|
137
|
+
onClick: (e) => U(n),
|
|
138
|
+
onPointerenter: (e) => !t.disabled && !x(F) && (P.value = n)
|
|
139
|
+
}, [y(e.$slots, "item", {
|
|
140
|
+
item: t,
|
|
141
|
+
index: n
|
|
142
|
+
}, () => [c(b(t.icon ?? t.label.slice(0, 1)), 1)])], 46, te))), 128))], 44, E)], 64));
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
//#endregion
|
|
146
|
+
export { D 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}
|