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.
Files changed (133) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +137 -125
  3. package/dist/blessing-ui.css +38 -2
  4. package/dist/components/BlessAnnotator.css +1 -0
  5. package/dist/components/BlessAnnotator.js +6 -0
  6. package/dist/components/BlessAnnotator.vue.d.ts +71 -0
  7. package/dist/components/BlessAnnotator.vue_vue_type_script_setup_true_lang.js +264 -0
  8. package/dist/components/BlessAttachment.vue.d.ts +4 -1
  9. package/dist/components/BlessAttachment.vue_vue_type_script_setup_true_lang.js +3 -2
  10. package/dist/components/BlessCalendar.vue.d.ts +4 -0
  11. package/dist/components/BlessCalendar.vue_vue_type_script_setup_true_lang.js +65 -60
  12. package/dist/components/BlessCarousel.vue.d.ts +3 -0
  13. package/dist/components/BlessCarousel.vue_vue_type_script_setup_true_lang.js +10 -9
  14. package/dist/components/BlessCoachmark.css +1 -0
  15. package/dist/components/BlessCoachmark.js +6 -0
  16. package/dist/components/BlessCoachmark.vue.d.ts +40 -0
  17. package/dist/components/BlessCoachmark.vue_vue_type_script_setup_true_lang.js +74 -0
  18. package/dist/components/BlessCodeBlock.vue.d.ts +10 -0
  19. package/dist/components/BlessCodeBlock.vue_vue_type_script_setup_true_lang.js +39 -33
  20. package/dist/components/BlessCombobox.vue.d.ts +2 -0
  21. package/dist/components/BlessCombobox.vue_vue_type_script_setup_true_lang.js +3 -2
  22. package/dist/components/BlessCommand.css +1 -1
  23. package/dist/components/BlessCommand.vue.d.ts +26 -0
  24. package/dist/components/BlessCommand.vue_vue_type_script_setup_true_lang.js +137 -70
  25. package/dist/components/BlessConfetti.css +1 -0
  26. package/dist/components/BlessConfetti.js +6 -0
  27. package/dist/components/BlessConfetti.vue.d.ts +40 -0
  28. package/dist/components/BlessConfetti.vue_vue_type_script_setup_true_lang.js +77 -0
  29. package/dist/components/BlessCropper.vue.d.ts +16 -0
  30. package/dist/components/BlessCropper.vue_vue_type_script_setup_true_lang.js +47 -39
  31. package/dist/components/BlessDataTable.vue.d.ts +6 -0
  32. package/dist/components/BlessDataTable.vue_vue_type_script_setup_true_lang.js +56 -42
  33. package/dist/components/BlessDataView.vue.d.ts +7 -0
  34. package/dist/components/BlessDataView.vue_vue_type_script_setup_true_lang.js +38 -31
  35. package/dist/components/BlessDatePicker.vue.d.ts +3 -0
  36. package/dist/components/BlessDatePicker.vue_vue_type_script_setup_true_lang.js +46 -45
  37. package/dist/components/BlessDock.css +1 -0
  38. package/dist/components/BlessDock.js +6 -0
  39. package/dist/components/BlessDock.vue.d.ts +55 -0
  40. package/dist/components/BlessDock.vue_vue_type_script_setup_true_lang.js +100 -0
  41. package/dist/components/BlessEditor.vue.d.ts +2 -0
  42. package/dist/components/BlessEditor.vue_vue_type_script_setup_true_lang.js +23 -22
  43. package/dist/components/BlessFileInput.vue.d.ts +2 -0
  44. package/dist/components/BlessFileInput.vue_vue_type_script_setup_true_lang.js +3 -2
  45. package/dist/components/BlessFormula.css +1 -0
  46. package/dist/components/BlessFormula.js +6 -0
  47. package/dist/components/BlessFormula.vue.d.ts +53 -0
  48. package/dist/components/BlessFormula.vue_vue_type_script_setup_true_lang.js +111 -0
  49. package/dist/components/BlessGantt.vue.d.ts +12 -0
  50. package/dist/components/BlessGantt.vue_vue_type_script_setup_true_lang.js +74 -68
  51. package/dist/components/BlessInfiniteCanvas.css +1 -0
  52. package/dist/components/BlessInfiniteCanvas.js +6 -0
  53. package/dist/components/BlessInfiniteCanvas.vue.d.ts +91 -0
  54. package/dist/components/BlessInfiniteCanvas.vue_vue_type_script_setup_true_lang.js +232 -0
  55. package/dist/components/BlessInputNumber.vue.d.ts +5 -0
  56. package/dist/components/BlessInputNumber.vue_vue_type_script_setup_true_lang.js +39 -34
  57. package/dist/components/BlessKanban.vue.d.ts +12 -0
  58. package/dist/components/BlessKanban.vue_vue_type_script_setup_true_lang.js +127 -97
  59. package/dist/components/BlessLoadingBar.vue.d.ts +2 -0
  60. package/dist/components/BlessLoadingBar.vue_vue_type_script_setup_true_lang.js +8 -3
  61. package/dist/components/BlessMarquee.vue.d.ts +4 -0
  62. package/dist/components/BlessMarquee.vue_vue_type_script_setup_true_lang.js +32 -27
  63. package/dist/components/BlessNodeGraph.css +1 -0
  64. package/dist/components/BlessNodeGraph.js +6 -0
  65. package/dist/components/BlessNodeGraph.vue.d.ts +110 -0
  66. package/dist/components/BlessNodeGraph.vue_vue_type_script_setup_true_lang.js +321 -0
  67. package/dist/components/BlessOnboardingChecklist.css +1 -0
  68. package/dist/components/BlessOnboardingChecklist.js +6 -0
  69. package/dist/components/BlessOnboardingChecklist.vue.d.ts +72 -0
  70. package/dist/components/BlessOnboardingChecklist.vue_vue_type_script_setup_true_lang.js +157 -0
  71. package/dist/components/BlessOrderList.vue.d.ts +5 -0
  72. package/dist/components/BlessOrderList.vue_vue_type_script_setup_true_lang.js +62 -56
  73. package/dist/components/BlessPagination.vue.d.ts +2 -0
  74. package/dist/components/BlessPagination.vue_vue_type_script_setup_true_lang.js +2 -1
  75. package/dist/components/BlessPickList.vue.d.ts +5 -0
  76. package/dist/components/BlessPickList.vue_vue_type_script_setup_true_lang.js +55 -49
  77. package/dist/components/BlessRangeCalendar.css +1 -0
  78. package/dist/components/BlessRangeCalendar.js +6 -0
  79. package/dist/components/BlessRangeCalendar.vue.d.ts +51 -0
  80. package/dist/components/BlessRangeCalendar.vue_vue_type_script_setup_true_lang.js +217 -0
  81. package/dist/components/BlessScheduler.css +1 -0
  82. package/dist/components/BlessScheduler.js +6 -0
  83. package/dist/components/BlessScheduler.vue.d.ts +95 -0
  84. package/dist/components/BlessScheduler.vue_vue_type_script_setup_true_lang.js +347 -0
  85. package/dist/components/BlessShortcutRecorder.vue.d.ts +10 -0
  86. package/dist/components/BlessShortcutRecorder.vue_vue_type_script_setup_true_lang.js +50 -40
  87. package/dist/components/BlessSignaturePad.vue.d.ts +1 -1
  88. package/dist/components/BlessSliderCaptcha.vue.d.ts +5 -0
  89. package/dist/components/BlessSliderCaptcha.vue_vue_type_script_setup_true_lang.js +89 -84
  90. package/dist/components/BlessSortable.css +1 -1
  91. package/dist/components/BlessSortable.vue.d.ts +19 -1
  92. package/dist/components/BlessSortable.vue_vue_type_script_setup_true_lang.js +103 -55
  93. package/dist/components/BlessSparkline.css +1 -0
  94. package/dist/components/BlessSparkline.js +6 -0
  95. package/dist/components/BlessSparkline.vue.d.ts +28 -0
  96. package/dist/components/BlessSparkline.vue_vue_type_script_setup_true_lang.js +107 -0
  97. package/dist/components/BlessSteps.vue.d.ts +2 -0
  98. package/dist/components/BlessSteps.vue_vue_type_script_setup_true_lang.js +3 -2
  99. package/dist/components/BlessSwipeDeck.vue.d.ts +1 -1
  100. package/dist/components/BlessSwipeDeck.vue_vue_type_script_setup_true_lang.js +2 -1
  101. package/dist/components/BlessTimer.vue.d.ts +18 -0
  102. package/dist/components/BlessTimer.vue_vue_type_script_setup_true_lang.js +52 -43
  103. package/dist/components/BlessTour.vue.d.ts +1 -0
  104. package/dist/components/BlessTour.vue_vue_type_script_setup_true_lang.js +48 -42
  105. package/dist/components/BlessTreemap.css +1 -0
  106. package/dist/components/BlessTreemap.js +6 -0
  107. package/dist/components/BlessTreemap.vue.d.ts +46 -0
  108. package/dist/components/BlessTreemap.vue_vue_type_script_setup_true_lang.js +137 -0
  109. package/dist/components/BlessUploader.vue.d.ts +11 -0
  110. package/dist/components/BlessUploader.vue_vue_type_script_setup_true_lang.js +80 -69
  111. package/dist/composables/annotate.d.ts +35 -0
  112. package/dist/composables/annotate.js +33 -0
  113. package/dist/composables/canvasView.d.ts +21 -0
  114. package/dist/composables/canvasView.js +23 -0
  115. package/dist/composables/confetti.d.ts +32 -0
  116. package/dist/composables/confetti.js +23 -0
  117. package/dist/composables/dayBlocks.d.ts +11 -0
  118. package/dist/composables/dayBlocks.js +26 -0
  119. package/dist/composables/formula.d.ts +28 -0
  120. package/dist/composables/formula.js +161 -0
  121. package/dist/composables/graph.d.ts +19 -0
  122. package/dist/composables/graph.js +16 -0
  123. package/dist/composables/schedule.d.ts +27 -0
  124. package/dist/composables/schedule.js +54 -0
  125. package/dist/composables/treemap.d.ts +23 -0
  126. package/dist/composables/treemap.js +77 -0
  127. package/dist/composables/useAutoScroll.d.ts +15 -0
  128. package/dist/composables/useAutoScroll.js +32 -0
  129. package/dist/composables/useSortable.d.ts +42 -2
  130. package/dist/composables/useSortable.js +87 -14
  131. package/dist/index.d.ts +25 -1
  132. package/dist/index.js +78 -63
  133. package/package.json +4 -2
@@ -0,0 +1,232 @@
1
+ import e from "./BlessButton.js";
2
+ import { clampZoom as t, fitRect as n, toWorld as r, zoomAt as i } from "../composables/canvasView.js";
3
+ import { computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, normalizeClass as p, normalizeStyle as m, openBlock as h, provide as g, ref as _, renderSlot as v, toDisplayString as y, useId as b, useModel as x, withCtx as S, withModifiers as C } from "vue";
4
+ //#region src/components/BlessInfiniteCanvas.vue?vue&type=script&setup=true&lang.ts
5
+ var w = ["aria-label"], T = {
6
+ class: "bless-canvas__live",
7
+ "aria-live": "polite"
8
+ }, E = Symbol("blessCanvas"), D = /*@__PURE__*/ d({
9
+ name: "BlessInfiniteCanvas",
10
+ __name: "BlessInfiniteCanvas",
11
+ props: /*@__PURE__*/ f({
12
+ minZoom: { default: .25 },
13
+ maxZoom: { default: 4 },
14
+ grid: {
15
+ type: Boolean,
16
+ default: !0
17
+ },
18
+ controls: {
19
+ type: Boolean,
20
+ default: !0
21
+ },
22
+ wheelZoom: { type: Boolean },
23
+ label: { default: "Canvas" },
24
+ labels: {}
25
+ }, {
26
+ view: { default: () => ({
27
+ x: 0,
28
+ y: 0,
29
+ zoom: 1
30
+ }) },
31
+ viewModifiers: {}
32
+ }),
33
+ emits: ["update:view"],
34
+ setup(d, { expose: f }) {
35
+ let D = d, O = x(d, "view"), k = a(() => ({
36
+ zoomIn: "Zoom in",
37
+ zoomOut: "Zoom out",
38
+ reset: "Reset view",
39
+ zoom: (e) => `Zoom ${e}%`,
40
+ hint: "Arrow keys pan, plus and minus zoom, 0 resets.",
41
+ ...D.labels
42
+ })), A = _(), j = _(""), M = `${b()}-hint`, N = a(() => Math.round(O.value.zoom * 100)), P = (e, t) => {
43
+ let n = A.value?.getBoundingClientRect();
44
+ return {
45
+ x: e - (n?.left ?? 0),
46
+ y: t - (n?.top ?? 0)
47
+ };
48
+ }, F = (e, t) => {
49
+ let n = P(e, t);
50
+ return r(O.value, n.x, n.y);
51
+ };
52
+ g(E, {
53
+ view: O,
54
+ toWorld: F
55
+ });
56
+ function I(e, t = !1) {
57
+ O.value = e, t && (j.value = k.value.zoom(Math.round(e.zoom * 100)));
58
+ }
59
+ function L(e, t) {
60
+ let n = A.value?.getBoundingClientRect(), r = t ?? {
61
+ x: (n?.width ?? 0) / 2,
62
+ y: (n?.height ?? 0) / 2
63
+ };
64
+ I(i(O.value, e, r.x, r.y, D.minZoom, D.maxZoom), !0);
65
+ }
66
+ let R = () => I({
67
+ x: 0,
68
+ y: 0,
69
+ zoom: 1
70
+ }, !0);
71
+ function z(e, t = 32) {
72
+ let r = A.value?.getBoundingClientRect();
73
+ r && I(n(e, r.width, r.height, D.minZoom, D.maxZoom, t), !0);
74
+ }
75
+ function B(e, t) {
76
+ let n = A.value?.getBoundingClientRect();
77
+ n && I({
78
+ zoom: O.value.zoom,
79
+ x: n.width / 2 - e * O.value.zoom,
80
+ y: n.height / 2 - t * O.value.zoom
81
+ });
82
+ }
83
+ f({
84
+ zoomBy: L,
85
+ reset: R,
86
+ fit: z,
87
+ centerOn: B,
88
+ toWorld: F
89
+ });
90
+ let V = /* @__PURE__ */ new Map(), H = 0, U = _(!1);
91
+ function W(e) {
92
+ (e.target === A.value || e.target.closest?.("[data-canvas-bg]") || e.button === 1) && (e.button > 1 || (A.value?.setPointerCapture?.(e.pointerId), V.set(e.pointerId, {
93
+ x: e.clientX,
94
+ y: e.clientY
95
+ }), H = V.size === 2 ? G() : 0, U.value = !0, e.button === 1 && e.preventDefault()));
96
+ }
97
+ let G = () => {
98
+ let [e, t] = [...V.values()];
99
+ return Math.hypot(e.x - t.x, e.y - t.y);
100
+ };
101
+ function K(e) {
102
+ let t = V.get(e.pointerId);
103
+ if (!t) return;
104
+ let n = {
105
+ x: e.clientX,
106
+ y: e.clientY
107
+ };
108
+ if (V.set(e.pointerId, n), V.size === 2) {
109
+ let e = G(), [r, a] = [...V.values()], o = P((r.x + a.x) / 2, (r.y + a.y) / 2), s = H ? i(O.value, e / H, o.x, o.y, D.minZoom, D.maxZoom) : O.value;
110
+ H = e, I({
111
+ ...s,
112
+ x: s.x + (n.x - t.x) / 2,
113
+ y: s.y + (n.y - t.y) / 2
114
+ });
115
+ } else I({
116
+ ...O.value,
117
+ x: O.value.x + n.x - t.x,
118
+ y: O.value.y + n.y - t.y
119
+ });
120
+ }
121
+ function q(e) {
122
+ V.delete(e.pointerId), H = 0, V.size || (U.value = !1);
123
+ }
124
+ function J(e) {
125
+ e.preventDefault(), e.ctrlKey || e.metaKey || D.wheelZoom ? L(Math.exp(-e.deltaY * (e.ctrlKey ? .01 : .0015)), P(e.clientX, e.clientY)) : I({
126
+ ...O.value,
127
+ x: O.value.x - e.deltaX,
128
+ y: O.value.y - e.deltaY
129
+ });
130
+ }
131
+ function Y(e) {
132
+ if (e.target !== A.value) return;
133
+ let t = e.shiftKey ? 160 : 40, n = e.key;
134
+ if (n === "ArrowLeft") I({
135
+ ...O.value,
136
+ x: O.value.x + t
137
+ });
138
+ else if (n === "ArrowRight") I({
139
+ ...O.value,
140
+ x: O.value.x - t
141
+ });
142
+ else if (n === "ArrowUp") I({
143
+ ...O.value,
144
+ y: O.value.y + t
145
+ });
146
+ else if (n === "ArrowDown") I({
147
+ ...O.value,
148
+ y: O.value.y - t
149
+ });
150
+ else if (n === "+" || n === "=") L(1.25);
151
+ else if (n === "-" || n === "_") L(.8);
152
+ else if (n === "0" || n === "Home") R();
153
+ else return;
154
+ e.preventDefault();
155
+ }
156
+ let X = a(() => ({ transform: `translate(${O.value.x}px, ${O.value.y}px) scale(${t(O.value.zoom, D.minZoom, D.maxZoom)})` })), Z = a(() => {
157
+ let e = 24 * O.value.zoom;
158
+ return {
159
+ backgroundSize: `${e}px ${e}px`,
160
+ backgroundPosition: `${O.value.x}px ${O.value.y}px`
161
+ };
162
+ });
163
+ return (t, n) => (h(), s("div", {
164
+ ref_key: "root",
165
+ ref: A,
166
+ class: p(["bless-canvas", {
167
+ "bless-canvas--grid": d.grid,
168
+ "bless-canvas--pan": U.value
169
+ }]),
170
+ style: m(d.grid ? Z.value : void 0),
171
+ role: "group",
172
+ "aria-roledescription": "canvas",
173
+ "aria-label": d.label,
174
+ "aria-describedby": M,
175
+ tabindex: "0",
176
+ onPointerdown: W,
177
+ onPointermove: K,
178
+ onPointerup: q,
179
+ onPointercancel: q,
180
+ onWheel: J,
181
+ onKeydown: Y
182
+ }, [
183
+ c("div", {
184
+ class: "bless-canvas__layer",
185
+ style: m(X.value)
186
+ }, [v(t.$slots, "default", {
187
+ view: O.value,
188
+ zoom: O.value.zoom
189
+ })], 4),
190
+ d.controls ? (h(), s("div", {
191
+ key: 0,
192
+ class: "bless-canvas__controls",
193
+ onPointerdown: n[2] ||= C(() => {}, ["stop"])
194
+ }, [
195
+ u(e, {
196
+ size: "sm",
197
+ variant: "outline",
198
+ "aria-label": k.value.zoomOut,
199
+ onClick: n[0] ||= (e) => L(.8)
200
+ }, {
201
+ default: S(() => [...n[3] ||= [l("−", -1)]]),
202
+ _: 1
203
+ }, 8, ["aria-label"]),
204
+ u(e, {
205
+ size: "sm",
206
+ variant: "outline",
207
+ "aria-label": k.value.reset,
208
+ onClick: R
209
+ }, {
210
+ default: S(() => [l(y(N.value) + "%", 1)]),
211
+ _: 1
212
+ }, 8, ["aria-label"]),
213
+ u(e, {
214
+ size: "sm",
215
+ variant: "outline",
216
+ "aria-label": k.value.zoomIn,
217
+ onClick: n[1] ||= (e) => L(1.25)
218
+ }, {
219
+ default: S(() => [...n[4] ||= [l("+", -1)]]),
220
+ _: 1
221
+ }, 8, ["aria-label"])
222
+ ], 32)) : o("", !0),
223
+ c("span", {
224
+ id: M,
225
+ hidden: ""
226
+ }, y(k.value.hint), 1),
227
+ c("span", T, y(j.value), 1)
228
+ ], 46, w));
229
+ }
230
+ });
231
+ //#endregion
232
+ export { E as blessCanvasKey, D as default };
@@ -16,6 +16,11 @@ type __VLS_Props = {
16
16
  disabled?: boolean;
17
17
  invalid?: boolean;
18
18
  label?: string;
19
+ /** names of the − and + buttons */
20
+ labels?: Partial<{
21
+ decrease: string;
22
+ increase: string;
23
+ }>;
19
24
  };
20
25
  type __VLS_ModelProps = {
21
26
  modelValue?: number | null;
@@ -1,7 +1,7 @@
1
1
  import { joinIds as e, useFieldId as t, useFieldState as n } from "../composables/useFieldId.js";
2
2
  import { computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, toDisplayString as p, unref as m, useModel as h } from "vue";
3
3
  //#region src/components/BlessInputNumber.vue?vue&type=script&setup=true&lang.ts
4
- var g = ["disabled"], _ = {
4
+ var g = ["aria-label", "disabled"], _ = {
5
5
  key: 1,
6
6
  class: "bless-number__affix"
7
7
  }, v = [
@@ -18,7 +18,7 @@ var g = ["disabled"], _ = {
18
18
  ], y = ["name", "value"], b = {
19
19
  key: 3,
20
20
  class: "bless-number__affix"
21
- }, x = ["disabled"], S = /*@__PURE__*/ s({
21
+ }, x = ["aria-label", "disabled"], S = /*@__PURE__*/ s({
22
22
  name: "BlessInputNumber",
23
23
  inheritAttrs: !1,
24
24
  __name: "BlessInputNumber",
@@ -39,91 +39,96 @@ var g = ["disabled"], _ = {
39
39
  size: { default: "md" },
40
40
  disabled: { type: Boolean },
41
41
  invalid: { type: Boolean },
42
- label: {}
42
+ label: {},
43
+ labels: {}
43
44
  }, {
44
45
  modelValue: { default: null },
45
46
  modelModifiers: {}
46
47
  }),
47
48
  emits: ["update:modelValue"],
48
49
  setup(s) {
49
- let c = s, S = h(s, "modelValue"), C = t(c), w = n(), T = f(!1), E = r(() => new Intl.NumberFormat(c.locale, c.format)), D = r(() => new Intl.NumberFormat(c.locale).formatToParts(1.1).find((e) => e.type === "decimal")?.value ?? "."), O = r(() => S.value == null ? "" : T.value || !c.format ? String(S.value).replace(".", D.value) : E.value.format(S.value)), k = r(() => S.value == null ? void 0 : [
50
+ let c = s, S = r(() => ({
51
+ decrease: "Decrease",
52
+ increase: "Increase",
53
+ ...c.labels
54
+ })), C = h(s, "modelValue"), w = t(c), T = n(), E = f(!1), D = r(() => new Intl.NumberFormat(c.locale, c.format)), O = r(() => new Intl.NumberFormat(c.locale).formatToParts(1.1).find((e) => e.type === "decimal")?.value ?? "."), k = r(() => C.value == null ? "" : E.value || !c.format ? String(C.value).replace(".", O.value) : D.value.format(C.value)), A = r(() => C.value == null ? void 0 : [
50
55
  c.prefix,
51
- c.format ? E.value.format(S.value) : S.value,
56
+ c.format ? D.value.format(C.value) : C.value,
52
57
  c.suffix
53
- ].filter((e) => e != null && e !== "").join(" ")), A = r(() => (String(c.step).split(".")[1] ?? "").length);
54
- function j(e) {
55
- let t = c.min ?? 0, n = Number((t + Math.round((e - t) / c.step) * c.step).toFixed(A.value));
58
+ ].filter((e) => e != null && e !== "").join(" ")), j = r(() => (String(c.step).split(".")[1] ?? "").length);
59
+ function M(e) {
60
+ let t = c.min ?? 0, n = Number((t + Math.round((e - t) / c.step) * c.step).toFixed(j.value));
56
61
  return Math.min(c.max ?? Infinity, Math.max(c.min ?? -Infinity, n));
57
62
  }
58
- function M(e) {
63
+ function N(e) {
59
64
  let t = e.target.value;
60
- D.value !== "." && (t = t.replaceAll(".", "").replace(D.value, ".")), t = t.replace(/[^\d.-]/g, ""), S.value = t === "" || t === "-" ? null : Number(t);
65
+ O.value !== "." && (t = t.replaceAll(".", "").replace(O.value, ".")), t = t.replace(/[^\d.-]/g, ""), C.value = t === "" || t === "-" ? null : Number(t);
61
66
  }
62
- function N() {
63
- T.value = !1, S.value != null && (S.value = j(S.value));
67
+ function P() {
68
+ E.value = !1, C.value != null && (C.value = M(C.value));
64
69
  }
65
- let P = (e) => S.value = j((S.value ?? c.min ?? 0) + e * c.step);
66
- function F(e) {
70
+ let F = (e) => C.value = M((C.value ?? c.min ?? 0) + e * c.step);
71
+ function I(e) {
67
72
  let t = {
68
73
  ArrowUp: 1,
69
74
  ArrowDown: -1,
70
75
  PageUp: 10,
71
76
  PageDown: -10
72
77
  }[e.key], n = e.key === "Home" ? c.min : e.key === "End" ? c.max : void 0;
73
- if (t) P(t);
74
- else if (n != null) S.value = n;
78
+ if (t) F(t);
79
+ else if (n != null) C.value = n;
75
80
  else return;
76
81
  e.preventDefault();
77
82
  }
78
83
  return (t, n) => (d(), a("div", { class: u(["bless-number bless-lean--field", [`bless-number--${s.size}`, {
79
84
  "bless-number--disabled": s.disabled,
80
- "bless-number--invalid": s.invalid || m(w).invalid.value
85
+ "bless-number--invalid": s.invalid || m(T).invalid.value
81
86
  }]]) }, [
82
87
  s.buttons ? (d(), a("button", {
83
88
  key: 0,
84
89
  type: "button",
85
90
  class: "bless-number__btn",
86
- "aria-label": "Decrease",
87
- disabled: s.disabled || s.min != null && (S.value ?? 0) <= s.min,
91
+ "aria-label": S.value.decrease,
92
+ disabled: s.disabled || s.min != null && (C.value ?? 0) <= s.min,
88
93
  tabindex: "-1",
89
- onClick: n[0] ||= (e) => P(-1)
94
+ onClick: n[0] ||= (e) => F(-1)
90
95
  }, " − ", 8, g)) : i("", !0),
91
96
  s.prefix ? (d(), a("span", _, p(s.prefix), 1)) : i("", !0),
92
97
  o("input", l(t.$attrs, {
93
- id: m(C)(),
98
+ id: m(w)(),
94
99
  type: "text",
95
100
  inputmode: "decimal",
96
101
  class: "bless-number__control",
97
- value: O.value,
102
+ value: k.value,
98
103
  disabled: s.disabled,
99
104
  "aria-label": s.label,
100
- "aria-invalid": s.invalid || m(w).invalid.value || void 0,
101
- "aria-describedby": m(e)(m(w).describedby.value, t.$attrs["aria-describedby"]),
105
+ "aria-invalid": s.invalid || m(T).invalid.value || void 0,
106
+ "aria-describedby": m(e)(m(T).describedby.value, t.$attrs["aria-describedby"]),
102
107
  role: "spinbutton",
103
- "aria-valuenow": S.value ?? void 0,
104
- "aria-valuetext": k.value,
108
+ "aria-valuenow": C.value ?? void 0,
109
+ "aria-valuetext": A.value,
105
110
  "aria-valuemin": s.min,
106
111
  "aria-valuemax": s.max,
107
- onFocus: n[1] ||= (e) => T.value = !0,
108
- onBlur: N,
109
- onInput: M,
110
- onKeydown: F
112
+ onFocus: n[1] ||= (e) => E.value = !0,
113
+ onBlur: P,
114
+ onInput: N,
115
+ onKeydown: I
111
116
  }), null, 16, v),
112
117
  s.name ? (d(), a("input", {
113
118
  key: 2,
114
119
  type: "hidden",
115
120
  name: s.name,
116
- value: S.value ?? ""
121
+ value: C.value ?? ""
117
122
  }, null, 8, y)) : i("", !0),
118
123
  s.suffix ? (d(), a("span", b, p(s.suffix), 1)) : i("", !0),
119
124
  s.buttons ? (d(), a("button", {
120
125
  key: 4,
121
126
  type: "button",
122
127
  class: "bless-number__btn",
123
- "aria-label": "Increase",
124
- disabled: s.disabled || s.max != null && (S.value ?? 0) >= s.max,
128
+ "aria-label": S.value.increase,
129
+ disabled: s.disabled || s.max != null && (C.value ?? 0) >= s.max,
125
130
  tabindex: "-1",
126
- onClick: n[2] ||= (e) => P(1)
131
+ onClick: n[2] ||= (e) => F(1)
127
132
  }, " + ", 8, x)) : i("", !0)
128
133
  ], 2));
129
134
  }
@@ -11,6 +11,18 @@ declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
11
11
  props: import('vue').PublicProps & __VLS_PrettifyLocal<({
12
12
  rowKey?: (item: T) => string | number;
13
13
  label?: string;
14
+ /** screen-reader wording; each message that carries names or numbers is a function of them */
15
+ labels?: Partial<{
16
+ card: (index: number, column: string) => string;
17
+ moved: (column: string, position: number, total: number) => string;
18
+ position: (column: string, position: number, total: number) => string;
19
+ dropped: (column: string, position: number) => string;
20
+ full: (column: string) => string;
21
+ grabbed: string;
22
+ cancelled: string;
23
+ hint: string;
24
+ roleDescription: string;
25
+ }>;
14
26
  } & {
15
27
  modelValue?: BlessKanbanColumn<T>[];
16
28
  }) & {