bitboss-ui 0.1.2 → 0.1.4

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 (284) hide show
  1. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +1 -0
  2. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +151 -0
  3. package/dist/components/BbPopover/BbPopover.vue.d.ts +96 -0
  4. package/dist/components/BbRatio/BbRatio.vue.d.ts +12 -0
  5. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +1 -1
  6. package/dist/index.d.ts +4 -0
  7. package/dist/index.js +104 -98
  8. package/dist/index.js.map +1 -1
  9. package/dist/index10.js +123 -95
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index100.js +43 -3
  12. package/dist/index100.js.map +1 -1
  13. package/dist/index101.js +2 -2
  14. package/dist/index102.js +2 -2
  15. package/dist/index103.js +2 -2
  16. package/dist/index104.js +2 -2
  17. package/dist/index105.js +2 -2
  18. package/dist/index106.js +2 -2
  19. package/dist/index107.js +2 -2
  20. package/dist/index108.js +2 -2
  21. package/dist/index109.js +2 -2
  22. package/dist/index110.js +2 -2
  23. package/dist/index111.js +2 -2
  24. package/dist/index112.js +2 -2
  25. package/dist/index113.js +2 -2
  26. package/dist/index114.js +2 -2
  27. package/dist/index115.js +2 -2
  28. package/dist/index116.js +2 -2
  29. package/dist/index117.js +2 -2
  30. package/dist/index118.js +2 -2
  31. package/dist/index119.js +3 -2
  32. package/dist/index119.js.map +1 -1
  33. package/dist/index12.js +4 -4
  34. package/dist/index120.js +2 -2
  35. package/dist/index121.js +3 -2
  36. package/dist/index121.js.map +1 -1
  37. package/dist/index123.js +2 -2
  38. package/dist/index124.js +2 -3
  39. package/dist/index124.js.map +1 -1
  40. package/dist/index125.js +2 -2
  41. package/dist/index126.js +2 -3
  42. package/dist/index126.js.map +1 -1
  43. package/dist/index127.js +2 -2
  44. package/dist/index128.js +2 -2
  45. package/dist/index129.js +3 -2
  46. package/dist/index129.js.map +1 -1
  47. package/dist/index130.js +2 -2
  48. package/dist/index131.js +2 -2
  49. package/dist/index132.js +2 -2
  50. package/dist/index133.js +2 -2
  51. package/dist/index134.js +2 -3
  52. package/dist/index134.js.map +1 -1
  53. package/dist/index135.js +2 -2
  54. package/dist/index136.js +2 -2
  55. package/dist/index137.js +2 -2
  56. package/dist/index138.js +2 -2
  57. package/dist/index139.js +2 -2
  58. package/dist/index14.js +6 -6
  59. package/dist/index140.js +3 -2
  60. package/dist/index140.js.map +1 -1
  61. package/dist/index141.js +2 -2
  62. package/dist/index142.js +3 -2
  63. package/dist/index142.js.map +1 -1
  64. package/dist/index145.js +2 -2
  65. package/dist/index146.js +2 -3
  66. package/dist/index146.js.map +1 -1
  67. package/dist/index147.js +2 -2
  68. package/dist/index148.js +2 -3
  69. package/dist/index148.js.map +1 -1
  70. package/dist/index149.js +2 -2
  71. package/dist/index150.js +2 -2
  72. package/dist/index151.js +3 -2
  73. package/dist/index151.js.map +1 -1
  74. package/dist/index152.js +3 -4
  75. package/dist/index152.js.map +1 -1
  76. package/dist/index153.js +3 -8
  77. package/dist/index153.js.map +1 -1
  78. package/dist/index154.js +3 -2
  79. package/dist/index154.js.map +1 -1
  80. package/dist/index155.js +3 -2
  81. package/dist/index155.js.map +1 -1
  82. package/dist/index156.js +3 -5
  83. package/dist/index156.js.map +1 -1
  84. package/dist/index157.js +348 -17
  85. package/dist/index157.js.map +1 -1
  86. package/dist/index158.js +131 -17
  87. package/dist/index158.js.map +1 -1
  88. package/dist/index159.js +5 -29
  89. package/dist/index159.js.map +1 -1
  90. package/dist/index16.js +1 -1
  91. package/dist/index160.js +19 -2
  92. package/dist/index160.js.map +1 -1
  93. package/dist/index162.js +2 -2
  94. package/dist/index162.js.map +1 -1
  95. package/dist/index163.js +184 -14
  96. package/dist/index163.js.map +1 -1
  97. package/dist/index164.js +2 -13
  98. package/dist/index164.js.map +1 -1
  99. package/dist/index165.js +23 -2
  100. package/dist/index165.js.map +1 -1
  101. package/dist/index166.js +328 -3
  102. package/dist/index166.js.map +1 -1
  103. package/dist/index167.js +16 -2
  104. package/dist/index167.js.map +1 -1
  105. package/dist/index168.js +12 -5
  106. package/dist/index168.js.map +1 -1
  107. package/dist/index169.js +2 -350
  108. package/dist/index169.js.map +1 -1
  109. package/dist/index170.js +2 -134
  110. package/dist/index170.js.map +1 -1
  111. package/dist/index171.js +2 -186
  112. package/dist/index171.js.map +1 -1
  113. package/dist/index172.js +4 -23
  114. package/dist/index172.js.map +1 -1
  115. package/dist/index173.js +8 -328
  116. package/dist/index173.js.map +1 -1
  117. package/dist/index174.js +20 -2
  118. package/dist/index174.js.map +1 -1
  119. package/dist/index175.js +29 -21
  120. package/dist/index175.js.map +1 -1
  121. package/dist/index176.js +2 -3
  122. package/dist/index176.js.map +1 -1
  123. package/dist/index177.js +3 -3
  124. package/dist/index177.js.map +1 -1
  125. package/dist/index178.js +6 -38
  126. package/dist/index178.js.map +1 -1
  127. package/dist/index179.js +2 -28
  128. package/dist/index179.js.map +1 -1
  129. package/dist/index18.js +2 -2
  130. package/dist/index180.js +2 -13
  131. package/dist/index180.js.map +1 -1
  132. package/dist/index181.js +20 -8
  133. package/dist/index181.js.map +1 -1
  134. package/dist/index182.js +3 -96
  135. package/dist/index182.js.map +1 -1
  136. package/dist/index183.js +3 -4
  137. package/dist/index183.js.map +1 -1
  138. package/dist/index184.js +38 -295
  139. package/dist/index184.js.map +1 -1
  140. package/dist/index185.js +9 -6
  141. package/dist/index185.js.map +1 -1
  142. package/dist/index186.js +96 -2
  143. package/dist/index186.js.map +1 -1
  144. package/dist/index187.js +28 -2
  145. package/dist/index187.js.map +1 -1
  146. package/dist/index188.js +13 -2
  147. package/dist/index188.js.map +1 -1
  148. package/dist/index189.js +6 -2
  149. package/dist/index189.js.map +1 -1
  150. package/dist/index190.js +2 -235
  151. package/dist/index190.js.map +1 -1
  152. package/dist/index191.js +294 -88
  153. package/dist/index191.js.map +1 -1
  154. package/dist/index192.js +2 -2
  155. package/dist/index193.js +2 -117
  156. package/dist/index193.js.map +1 -1
  157. package/dist/index194.js +111 -100
  158. package/dist/index194.js.map +1 -1
  159. package/dist/index195.js +105 -78
  160. package/dist/index195.js.map +1 -1
  161. package/dist/index196.js +4 -224
  162. package/dist/index196.js.map +1 -1
  163. package/dist/index197.js +226 -249
  164. package/dist/index197.js.map +1 -1
  165. package/dist/index198.js +2 -38
  166. package/dist/index198.js.map +1 -1
  167. package/dist/index199.js +2 -2
  168. package/dist/index199.js.map +1 -1
  169. package/dist/index20.js +4 -4
  170. package/dist/index200.js +89 -2
  171. package/dist/index200.js.map +1 -1
  172. package/dist/index201.js +79 -2
  173. package/dist/index201.js.map +1 -1
  174. package/dist/index202.js +49 -8
  175. package/dist/index202.js.map +1 -1
  176. package/dist/index203.js +223 -5
  177. package/dist/index203.js.map +1 -1
  178. package/dist/index204.js +261 -0
  179. package/dist/index204.js.map +1 -0
  180. package/dist/index205.js +41 -0
  181. package/dist/index205.js.map +1 -0
  182. package/dist/index206.js +5 -0
  183. package/dist/index206.js.map +1 -0
  184. package/dist/index207.js +5 -0
  185. package/dist/index207.js.map +1 -0
  186. package/dist/index208.js +12 -0
  187. package/dist/index208.js.map +1 -0
  188. package/dist/index209.js +9 -0
  189. package/dist/index209.js.map +1 -0
  190. package/dist/index210.js +5 -0
  191. package/dist/index210.js.map +1 -0
  192. package/dist/index211.js +14 -0
  193. package/dist/index211.js.map +1 -0
  194. package/dist/index212.js +434 -0
  195. package/dist/index212.js.map +1 -0
  196. package/dist/index213.js +12 -0
  197. package/dist/index213.js.map +1 -0
  198. package/dist/index214.js +203 -0
  199. package/dist/index214.js.map +1 -0
  200. package/dist/index22.js +14 -14
  201. package/dist/index24.js +4 -4
  202. package/dist/index26.js +2 -2
  203. package/dist/index28.js +4 -4
  204. package/dist/index34.js +2 -2
  205. package/dist/index36.js +50 -37
  206. package/dist/index36.js.map +1 -1
  207. package/dist/index38.js +39 -39
  208. package/dist/index38.js.map +1 -1
  209. package/dist/index4.js +2 -2
  210. package/dist/index40.js +36 -82
  211. package/dist/index40.js.map +1 -1
  212. package/dist/index42.js +44 -57
  213. package/dist/index42.js.map +1 -1
  214. package/dist/index44.js +98 -79
  215. package/dist/index44.js.map +1 -1
  216. package/dist/index46.js +79 -81
  217. package/dist/index46.js.map +1 -1
  218. package/dist/index48.js +80 -40
  219. package/dist/index48.js.map +1 -1
  220. package/dist/index50.js +40 -283
  221. package/dist/index50.js.map +1 -1
  222. package/dist/index52.js +279 -95
  223. package/dist/index52.js.map +1 -1
  224. package/dist/index54.js +98 -212
  225. package/dist/index54.js.map +1 -1
  226. package/dist/index56.js +213 -44
  227. package/dist/index56.js.map +1 -1
  228. package/dist/index58.js +45 -40
  229. package/dist/index58.js.map +1 -1
  230. package/dist/index59.js +2 -96
  231. package/dist/index59.js.map +1 -1
  232. package/dist/index6.js +4 -4
  233. package/dist/index60.js +44 -2
  234. package/dist/index60.js.map +1 -1
  235. package/dist/index61.js +89 -211
  236. package/dist/index61.js.map +1 -1
  237. package/dist/index63.js +210 -130
  238. package/dist/index63.js.map +1 -1
  239. package/dist/index65.js +134 -18
  240. package/dist/index65.js.map +1 -1
  241. package/dist/index67.js +145 -74
  242. package/dist/index67.js.map +1 -1
  243. package/dist/index69.js +18 -98
  244. package/dist/index69.js.map +1 -1
  245. package/dist/index71.js +77 -17
  246. package/dist/index71.js.map +1 -1
  247. package/dist/index73.js +48 -66
  248. package/dist/index73.js.map +1 -1
  249. package/dist/index75.js +21 -78
  250. package/dist/index75.js.map +1 -1
  251. package/dist/index77.js +77 -46
  252. package/dist/index77.js.map +1 -1
  253. package/dist/index79.js +44 -61
  254. package/dist/index79.js.map +1 -1
  255. package/dist/index8.js +188 -181
  256. package/dist/index8.js.map +1 -1
  257. package/dist/index81.js +82 -106
  258. package/dist/index81.js.map +1 -1
  259. package/dist/index83.js +88 -370
  260. package/dist/index83.js.map +1 -1
  261. package/dist/index85.js +106 -74
  262. package/dist/index85.js.map +1 -1
  263. package/dist/index87.js +371 -68
  264. package/dist/index87.js.map +1 -1
  265. package/dist/index89.js +75 -111
  266. package/dist/index89.js.map +1 -1
  267. package/dist/index91.js +76 -87
  268. package/dist/index91.js.map +1 -1
  269. package/dist/index93.js +111 -32
  270. package/dist/index93.js.map +1 -1
  271. package/dist/index94.js +2 -37
  272. package/dist/index94.js.map +1 -1
  273. package/dist/index95.js +87 -42
  274. package/dist/index95.js.map +1 -1
  275. package/dist/index96.js +2 -43
  276. package/dist/index96.js.map +1 -1
  277. package/dist/index97.js +38 -3
  278. package/dist/index97.js.map +1 -1
  279. package/dist/index98.js +37 -3
  280. package/dist/index98.js.map +1 -1
  281. package/dist/index99.js +47 -3
  282. package/dist/index99.js.map +1 -1
  283. package/dist/style.css +1 -1
  284. package/package.json +1 -1
package/dist/index8.js CHANGED
@@ -1,12 +1,15 @@
1
- import { defineComponent as se, ref as v, computed as f, watch as oe, openBlock as i, createElementBlock as u, mergeProps as ne, createElementVNode as n, createTextVNode as re, toDisplayString as h, unref as p, withDirectives as k, createVNode as g, Transition as V, withCtx as w, vShow as O, Fragment as S, renderList as M, normalizeClass as A, renderSlot as N, nextTick as de } from "vue";
2
- import { groupBy as z } from "./index153.js";
3
- import { isNil as ie } from "./index154.js";
4
- import { last as R } from "./index155.js";
5
- import c from "./index156.js";
6
- import ue from "./index157.js";
7
- import ce from "./index158.js";
8
- import be from "./index159.js";
9
- const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /* @__PURE__ */ n("span", null, null, -1), fe = { class: "bb-base-date-picker__selected-day-label" }, ye = { class: "bb-base-date-picker__weekday" }, _e = { class: "bb-base-date-picker__monthday" }, ve = ["disabled"], ke = { class: "bb-base-date-picker__small-month-selector" }, ge = ["disabled"], Ve = /* @__PURE__ */ n("svg", {
1
+ import { defineComponent as ne, ref as v, computed as f, watch as re, openBlock as i, createElementBlock as u, mergeProps as de, createElementVNode as n, createTextVNode as ie, toDisplayString as p, unref as h, withDirectives as N, createVNode as k, Transition as g, withCtx as V, vShow as L, createCommentVNode as D, normalizeClass as M, Fragment as w, renderList as O, renderSlot as z, nextTick as ue } from "vue";
2
+ import { groupBy as R } from "./index173.js";
3
+ import { isNil as ce } from "./index169.js";
4
+ import { last as W } from "./index162.js";
5
+ import c from "./index159.js";
6
+ import be from "./index160.js";
7
+ import me from "./index174.js";
8
+ import pe from "./index175.js";
9
+ const he = { class: "bb-base-date-picker__header" }, fe = ["disabled"], ye = /* @__PURE__ */ n("span", null, null, -1), _e = {
10
+ class: "bb-base-date-picker__selected-day-label",
11
+ "aria-live": "polite"
12
+ }, ve = { class: "bb-base-date-picker__weekday" }, ke = { class: "bb-base-date-picker__monthday" }, ge = ["disabled"], Ve = { class: "bb-base-date-picker__small-month-selector" }, we = ["disabled"], Oe = /* @__PURE__ */ n("svg", {
10
13
  viewBox: "0 0 24 24",
11
14
  xmlns: "http://www.w3.org/2000/svg"
12
15
  }, [
@@ -14,19 +17,19 @@ const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /*
14
17
  d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
15
18
  fill: "currentColor"
16
19
  })
17
- ], -1), we = /* @__PURE__ */ n("span", null, "Vai indietro di un mese", -1), Oe = [
18
- Ve,
19
- we
20
- ], Se = ["disabled"], Me = ["disabled"], Ce = {
20
+ ], -1), Se = /* @__PURE__ */ n("span", null, "Vai indietro di un mese", -1), Me = [
21
+ Oe,
22
+ Se
23
+ ], Ce = ["disabled"], De = ["disabled"], xe = {
21
24
  viewBox: "0 0 24 24",
22
25
  xmlns: "http://www.w3.org/2000/svg",
23
26
  style: { transform: "rotate(180deg)" }
24
- }, xe = /* @__PURE__ */ n("path", {
27
+ }, Ae = /* @__PURE__ */ n("path", {
25
28
  d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
26
29
  fill: "currentColor"
27
- }, null, -1), Ae = [
28
- xe
29
- ], De = /* @__PURE__ */ n("span", null, "Vai avanti di un mese", -1), Ye = { class: "bb-base-date-picker__small-year-selector" }, Be = ["disabled"], Ie = /* @__PURE__ */ n("svg", {
30
+ }, null, -1), Ye = [
31
+ Ae
32
+ ], Be = /* @__PURE__ */ n("span", null, "Vai avanti di un mese", -1), Ie = { class: "bb-base-date-picker__small-year-selector" }, Ee = ["disabled"], Te = /* @__PURE__ */ n("svg", {
30
33
  viewBox: "0 0 24 24",
31
34
  xmlns: "http://www.w3.org/2000/svg"
32
35
  }, [
@@ -34,18 +37,25 @@ const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /*
34
37
  d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
35
38
  fill: "currentColor"
36
39
  })
37
- ], -1), Ee = [
38
- Ie
39
- ], Te = ["disabled"], Le = ["disabled"], Ne = {
40
+ ], -1), Ne = /* @__PURE__ */ n("span", null, "Vai indietro di un anno", -1), Le = [
41
+ Te,
42
+ Ne
43
+ ], ze = ["disabled"], Re = ["disabled"], We = {
40
44
  viewBox: "0 0 24 24",
41
45
  xmlns: "http://www.w3.org/2000/svg",
42
46
  style: { transform: "rotate(180deg)" }
43
- }, ze = /* @__PURE__ */ n("path", {
47
+ }, $e = /* @__PURE__ */ n("path", {
44
48
  d: "M13.939 4.939 6.879 12l7.06 7.061 2.122-2.122L11.121 12l4.94-4.939z",
45
49
  fill: "currentColor"
46
- }, null, -1), Re = [
47
- ze
48
- ], We = { style: { height: "32px" } }, $e = { class: "bb-base-date-picker-calendar" }, Fe = { class: "bb-base-date-picker-header-container" }, Pe = ["disabled", "id"], He = { class: "bb-base-date-picker__month-selector" }, je = ["onClick", "disabled"], qe = ["onClick", "disabled"], tt = /* @__PURE__ */ se({
50
+ }, null, -1), Fe = [
51
+ $e
52
+ ], Pe = /* @__PURE__ */ n("span", null, "Vai avanti di un anno", -1), He = {
53
+ key: 0,
54
+ style: { height: "32px" }
55
+ }, je = { class: "bb-base-date-picker-calendar" }, qe = { class: "bb-base-date-picker-header-container" }, Ue = ["disabled", "id"], Ge = {
56
+ key: 0,
57
+ class: "bb-base-date-picker__month-selector"
58
+ }, Je = ["onClick", "disabled"], Ke = ["onClick", "disabled"], st = /* @__PURE__ */ ne({
49
59
  __name: "BaseDatePicker",
50
60
  props: {
51
61
  disabled: { type: Boolean },
@@ -57,89 +67,87 @@ const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /*
57
67
  width: { default: 290 }
58
68
  },
59
69
  emits: ["update:modelValue"],
60
- setup(W, { expose: $, emit: b }) {
61
- const t = W;
62
- if (c.extend(be), c.extend(ce), c.locale(ue), c.updateLocale("it", {
70
+ setup($, { expose: F, emit: m }) {
71
+ const t = $;
72
+ if (c.extend(pe), c.extend(me), c.locale(be), c.updateLocale("it", {
63
73
  weekStart: t.firstDayOfWeek
64
74
  }), t.multiple && t.range)
65
75
  throw new Error("Date picker cannot be both multiple and range");
66
- const D = v(null);
67
- $({ calendar: D });
68
- const m = v("day"), Y = v(null);
69
- let x = v(c());
70
- Array.isArray(t.modelValue) ? t.modelValue.length && (x.value = c(R(t.modelValue))) : t.modelValue && (x.value = c(t.modelValue));
71
- let o = v(x.value.clone());
72
- const F = f(() => new Array(7).fill("").map((e, a) => c().day((a + t.firstDayOfWeek) % 7)).map((e) => {
73
- const a = C.value.selected(e);
76
+ const x = v(null), b = v("day"), A = v(null);
77
+ let C = v(c());
78
+ Array.isArray(t.modelValue) ? t.modelValue.length && (C.value = c(W(t.modelValue))) : t.modelValue && (C.value = c(t.modelValue));
79
+ let s = v(C.value.clone());
80
+ const P = f(() => new Array(7).fill("").map((e, a) => c().day((a + t.firstDayOfWeek) % 7)).map((e) => {
81
+ const a = S.value.selected(e);
74
82
  return {
75
83
  label: e.format("dd").slice(0, 1).toUpperCase(),
76
84
  id: e.toISOString(),
77
85
  original: e,
78
86
  selected: a
79
87
  };
80
- })), B = f(() => {
81
- let e = o.value.clone().startOf("month"), a = e.clone().startOf("week"), r = o.value.clone().endOf("month").clone().endOf("week"), l = [];
88
+ })), Y = f(() => {
89
+ let e = s.value.clone().startOf("month"), a = e.clone().startOf("week"), r = s.value.clone().endOf("month").clone().endOf("week"), l = [];
82
90
  const y = e.month();
83
91
  for (let d = a; d.isBefore(r); d = d.add(1, "day"))
84
92
  l.push(d.clone());
85
93
  return l.map((d) => {
86
- const _ = d.toISOString(), E = !!C.value.selected(d), T = !!(C.value.isFirstOfRange(d) && t.range), L = !!(C.value.isLastOfRange(d) && t.range), ae = !!(E && !T && !L && t.range), le = d.month() === y;
94
+ const _ = d.toISOString(), I = !!S.value.selected(d), E = !!(S.value.isFirstOfRange(d) && t.range), T = !!(S.value.isLastOfRange(d) && t.range), oe = !!(I && !E && !T && t.range), se = d.month() === y;
87
95
  return {
88
96
  id: _,
89
97
  buttonId: "date_" + _,
90
98
  slotName: _,
91
99
  label: d.get("D").toString(),
92
100
  original: d,
93
- selected: E,
94
- first: T,
95
- last: L,
96
- middle: ae,
97
- highlighted: le
101
+ selected: I,
102
+ first: E,
103
+ last: T,
104
+ middle: oe,
105
+ highlighted: se
98
106
  };
99
107
  });
100
- }), P = f(() => z(B.value, (e) => e.id)), H = f(() => z(
101
- B.value,
108
+ }), H = f(() => R(Y.value, (e) => e.id)), j = f(() => R(
109
+ Y.value,
102
110
  (a) => a.original.week().toString()
103
- )), C = f(() => {
104
- let e = 1 / 0, a = -1 / 0, s = {};
111
+ )), S = f(() => {
112
+ let e = 1 / 0, a = -1 / 0, o = {};
105
113
  return t.modelValue && [].concat(t.modelValue).map((l) => c(l).startOf("day")).map((l) => l.valueOf()).forEach((l, y) => {
106
- l < e && (e = l), l > a && (a = l), s[l] = y;
114
+ l < e && (e = l), l > a && (a = l), o[l] = y;
107
115
  }), {
108
116
  min: e,
109
117
  max: a,
110
- index: (r) => s[r.valueOf()],
111
- selected: (r) => !ie(s[r.valueOf()]),
118
+ index: (r) => o[r.valueOf()],
119
+ selected: (r) => !ce(o[r.valueOf()]),
112
120
  isFirstOfRange: (r) => r.valueOf() === e,
113
121
  isLastOfRange: (r) => r.valueOf() === a
114
122
  };
115
- }), j = (e) => {
123
+ }), q = (e) => {
116
124
  if (e.target instanceof HTMLButtonElement) {
117
- const [, a] = e.target.id.split("_"), s = P.value[a][0];
118
- q(s);
125
+ const [, a] = e.target.id.split("_"), o = H.value[a][0];
126
+ U(o);
119
127
  }
120
- }, q = (e) => {
128
+ }, U = (e) => {
121
129
  if (!t.readonly)
122
130
  if (t.range)
123
131
  if (t.modelValue && Array.isArray(t.modelValue))
124
132
  if (t.modelValue.length !== 1)
125
- b("update:modelValue", [e.original.toISOString()]);
133
+ m("update:modelValue", [e.original.toISOString()]);
126
134
  else if (t.modelValue.length) {
127
- let [a, s] = [c(t.modelValue[0]), e.original].sort(
135
+ let [a, o] = [c(t.modelValue[0]), e.original].sort(
128
136
  (d, _) => d.valueOf > _.valueOf ? 1 : d.valueOf() < _.valueOf() ? -1 : 0
129
137
  );
130
- s = s.add(1, "day");
138
+ o = o.add(1, "day");
131
139
  const r = c(a);
132
140
  let l = [];
133
- for (let d = r; d.isBefore(s); d = d.add(1, "day"))
141
+ for (let d = r; d.isBefore(o); d = d.add(1, "day"))
134
142
  l.push(d.clone());
135
143
  const y = l.map((d) => d.toISOString());
136
- b("update:modelValue", y);
144
+ m("update:modelValue", y);
137
145
  } else {
138
146
  const a = [
139
147
  ...t.modelValue,
140
148
  e.original.toISOString()
141
149
  ];
142
- b("update:modelValue", a);
150
+ m("update:modelValue", a);
143
151
  }
144
152
  else
145
153
  throw new Error(
@@ -148,69 +156,69 @@ const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /*
148
156
  else if (t.multiple)
149
157
  if (t.modelValue && Array.isArray(t.modelValue))
150
158
  if (!e.selected)
151
- b("update:modelValue", [
159
+ m("update:modelValue", [
152
160
  ...t.modelValue,
153
161
  e.original.toISOString()
154
162
  ]);
155
163
  else {
156
- const a = e.original.toISOString(), s = t.modelValue.filter((r) => r !== a);
157
- b("update:modelValue", s);
164
+ const a = e.original.toISOString(), o = t.modelValue.filter((r) => r !== a);
165
+ m("update:modelValue", o);
158
166
  }
159
167
  else
160
168
  throw new Error(
161
169
  "datepicker is set to multiple but modelValue is not an array."
162
170
  );
163
171
  else
164
- e.selected ? b("update:modelValue", null) : b("update:modelValue", e.original.toISOString());
165
- }, U = f(() => {
166
- const e = o.value.month();
167
- return new Array(12).fill(o.value.clone().startOf("year")).map((a, s) => a.add(s, "month")).map((a) => ({
172
+ e.selected ? m("update:modelValue", null) : m("update:modelValue", e.original.toISOString());
173
+ }, G = f(() => {
174
+ const e = s.value.month();
175
+ return new Array(12).fill(s.value.clone().startOf("year")).map((a, o) => a.add(o, "month")).map((a) => ({
168
176
  text: a.format("MMMM"),
169
177
  key: a.unix(),
170
178
  selected: a.month() === e,
171
- handler: () => K(a)
179
+ handler: () => Q(a)
172
180
  }));
173
- }), G = () => {
174
- o.value = o.value.subtract(1, "month");
175
- }, J = () => {
176
- o.value = o.value.add(1, "month");
177
- }, K = (e) => {
178
- const a = e.get("month"), s = o.value.set("month", a);
179
- t.modelValue && !Array.isArray(t.modelValue) ? b("update:modelValue", s.toISOString()) : o.value = s, m.value = "day";
180
- }, I = async () => {
181
+ }), J = () => {
182
+ s.value = s.value.subtract(1, "month");
183
+ }, K = () => {
184
+ s.value = s.value.add(1, "month");
185
+ }, Q = (e) => {
186
+ const a = e.get("month"), o = s.value.set("month", a);
187
+ t.modelValue && !Array.isArray(t.modelValue) ? m("update:modelValue", o.toISOString()) : s.value = o, b.value = "day";
188
+ }, B = async () => {
181
189
  var a;
182
- m.value = "year", await de();
183
- const e = (a = Y.value) == null ? void 0 : a.querySelector(
190
+ b.value = "year", await ue();
191
+ const e = (a = A.value) == null ? void 0 : a.querySelector(
184
192
  ".bb-base-date-picker__year-selector-year--selected"
185
193
  );
186
194
  e && e.scrollIntoView({ block: "center", inline: "center" });
187
- }, Q = f(() => {
188
- const e = o.value.year(), a = new Array(100).fill(o.value.clone()).map(
195
+ }, X = () => b.value = "day", Z = f(() => {
196
+ const e = s.value.year(), a = new Array(100).fill(s.value.clone()).map(
189
197
  (r, l, y) => r.year(e - y.length + l)
190
- ), s = new Array(100).fill(o.value.clone()).map((r, l) => r.year(e + l + 1));
191
- return a.concat(o.value.clone()).concat(s).map((r) => ({
198
+ ), o = new Array(100).fill(s.value.clone()).map((r, l) => r.year(e + l + 1));
199
+ return a.concat(s.value.clone()).concat(o).map((r) => ({
192
200
  text: r.format("YYYY"),
193
201
  key: r.unix(),
194
202
  selected: r.year() === e,
195
- handler: () => ee(r)
203
+ handler: () => ae(r)
196
204
  }));
197
- }), X = () => {
198
- const e = o.value.subtract(1, "year");
199
- t.modelValue && !Array.isArray(t.modelValue) ? b("update:modelValue", e.toISOString()) : o.value = e;
200
- }, Z = () => {
201
- const e = o.value.add(1, "year");
202
- t.modelValue && !Array.isArray(t.modelValue) ? b("update:modelValue", e.toISOString()) : o.value = e;
203
- }, ee = (e) => {
204
- const a = e.get("year"), s = o.value.set("year", a);
205
- t.modelValue && !Array.isArray(t.modelValue) ? b("update:modelValue", s.toISOString()) : o.value = s, m.value = "month";
205
+ }), ee = () => {
206
+ const e = s.value.subtract(1, "year");
207
+ t.modelValue && !Array.isArray(t.modelValue) ? m("update:modelValue", e.toISOString()) : s.value = e;
208
+ }, te = () => {
209
+ const e = s.value.add(1, "year");
210
+ t.modelValue && !Array.isArray(t.modelValue) ? m("update:modelValue", e.toISOString()) : s.value = e;
211
+ }, ae = (e) => {
212
+ const a = e.get("year"), o = s.value.set("year", a);
213
+ t.modelValue && !Array.isArray(t.modelValue) ? m("update:modelValue", o.toISOString()) : s.value = o, b.value = "month";
206
214
  };
207
- oe(
215
+ re(
208
216
  () => t.modelValue,
209
217
  () => {
210
- t.modelValue ? Array.isArray(t.modelValue) ? t.modelValue.length ? o.value = c(R(t.modelValue)) : o.value = c() : o.value = c(t.modelValue) : o.value = c();
218
+ t.modelValue ? Array.isArray(t.modelValue) ? t.modelValue.length ? s.value = c(W(t.modelValue)) : s.value = c() : s.value = c(t.modelValue) : s.value = c();
211
219
  }
212
220
  );
213
- const te = f(() => {
221
+ const le = f(() => {
214
222
  const e = {
215
223
  "bb-base-date-picker": !0,
216
224
  "bb-base-date-picker--readonly": t.readonly,
@@ -224,127 +232,129 @@ const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /*
224
232
  }
225
233
  };
226
234
  });
227
- return (e, a) => (i(), u("div", ne(te.value, {
235
+ return F({ calendar: x, setSelectionModeToDay: X }), (e, a) => (i(), u("div", de(le.value, {
228
236
  ref_key: "calendar",
229
- ref: D
237
+ ref: x
230
238
  }), [
231
- n("div", me, [
239
+ n("div", he, [
232
240
  n("div", null, [
233
241
  n("button", {
234
242
  disabled: e.disabled,
235
- onClick: I,
243
+ onClick: B,
236
244
  class: "bb-base-date-picker__year-button",
237
- type: "button"
245
+ type: "button",
246
+ "aria-live": "polite"
238
247
  }, [
239
- re(h(p(o).format("YYYY")) + " ", 1),
240
- pe
241
- ], 8, he)
248
+ ie(p(h(s).format("YYYY")) + " ", 1),
249
+ ye
250
+ ], 8, fe)
242
251
  ]),
243
- n("div", fe, [
244
- n("span", ye, h(p(o).format("ddd")) + ", ", 1),
245
- n("span", _e, h(p(o).format("DD")), 1),
252
+ n("div", _e, [
253
+ n("span", ve, p(h(s).format("ddd")) + ", ", 1),
254
+ n("span", ke, p(h(s).format("DD")), 1),
246
255
  n("button", {
247
256
  disabled: e.disabled,
248
- onClick: a[0] || (a[0] = (s) => m.value = "month"),
257
+ onClick: a[0] || (a[0] = (o) => b.value = "month"),
249
258
  class: "bb-base-date-picker__month-button",
250
259
  type: "button"
251
- }, h(p(o).format("MMMM")), 9, ve)
260
+ }, p(h(s).format("MMMM")), 9, ge)
252
261
  ])
253
262
  ]),
254
- k(n("div", ke, [
263
+ N(n("div", Ve, [
255
264
  n("button", {
256
265
  disabled: e.disabled,
257
- onClick: G,
266
+ onClick: J,
258
267
  class: "bb-base-date-picker__previous-month-button",
259
268
  type: "button"
260
- }, Oe, 8, ge),
261
- g(V, {
269
+ }, Me, 8, we),
270
+ k(g, {
262
271
  name: "fade",
263
272
  mode: "out-in"
264
273
  }, {
265
- default: w(() => [
274
+ default: V(() => [
266
275
  (i(), u("button", {
267
276
  disabled: e.disabled,
268
- key: p(o).month(),
269
- onClick: a[1] || (a[1] = (s) => m.value = "month"),
277
+ key: h(s).month(),
278
+ onClick: a[1] || (a[1] = (o) => b.value = "month"),
270
279
  class: "bb-base-date-picker__current-month-button",
271
- type: "button"
272
- }, h(p(o).format("MMMM")), 9, Se))
280
+ type: "button",
281
+ "aria-live": "polite"
282
+ }, p(h(s).format("MMMM")), 9, Ce))
273
283
  ]),
274
284
  _: 1
275
285
  }),
276
286
  n("button", {
277
287
  disabled: e.disabled,
278
- onClick: J,
288
+ onClick: K,
279
289
  class: "bb-base-date-picker__next-month-button",
280
290
  type: "button"
281
291
  }, [
282
- (i(), u("svg", Ce, Ae)),
283
- De
284
- ], 8, Me)
292
+ (i(), u("svg", xe, Ye)),
293
+ Be
294
+ ], 8, De)
285
295
  ], 512), [
286
- [O, m.value === "day"]
296
+ [L, b.value === "day"]
287
297
  ]),
288
- k(n("div", Ye, [
298
+ N(n("div", Ie, [
289
299
  n("button", {
290
300
  disabled: e.disabled,
291
- onClick: X,
301
+ onClick: ee,
292
302
  class: "bb-base-date-picker__previous-year-button",
293
303
  type: "button"
294
- }, Ee, 8, Be),
295
- g(V, {
304
+ }, Le, 8, Ee),
305
+ k(g, {
296
306
  name: "fade",
297
307
  mode: "out-in"
298
308
  }, {
299
- default: w(() => [
309
+ default: V(() => [
300
310
  (i(), u("button", {
301
311
  disabled: e.disabled,
302
- key: p(o).year(),
303
- onClick: I,
312
+ key: h(s).year(),
313
+ onClick: B,
304
314
  class: "bb-base-date-picker__current-year-button",
305
- type: "button"
306
- }, h(p(o).format("YYYY")), 9, Te))
315
+ type: "button",
316
+ "aria-live": "polite"
317
+ }, p(h(s).format("YYYY")), 9, ze))
307
318
  ]),
308
319
  _: 1
309
320
  }),
310
321
  n("button", {
311
322
  disabled: e.disabled,
312
- onClick: Z,
323
+ onClick: te,
313
324
  class: "bb-base-date-picker__next-year-button",
314
325
  type: "button"
315
326
  }, [
316
- (i(), u("svg", Ne, Re))
317
- ], 8, Le)
327
+ (i(), u("svg", We, Fe)),
328
+ Pe
329
+ ], 8, Re)
318
330
  ], 512), [
319
- [O, m.value === "month"]
320
- ]),
321
- k(n("div", We, null, 512), [
322
- [O, m.value === "year"]
331
+ [L, b.value === "month"]
323
332
  ]),
324
- n("div", $e, [
325
- g(V, {
333
+ b.value === "year" ? (i(), u("div", He)) : D("", !0),
334
+ n("div", je, [
335
+ k(g, {
326
336
  name: "fade",
327
337
  mode: "out-in"
328
338
  }, {
329
- default: w(() => [
339
+ default: V(() => [
330
340
  (i(), u("div", {
331
- key: p(o).month(),
332
- class: "bb-base-date-picker-month"
341
+ key: h(s).month(),
342
+ class: M(["bb-base-date-picker-month", { invisible: b.value !== "day" }])
333
343
  }, [
334
- n("div", Fe, [
335
- (i(!0), u(S, null, M(F.value, (s) => (i(), u("div", {
336
- key: s.id,
344
+ n("div", qe, [
345
+ (i(!0), u(w, null, O(P.value, (o) => (i(), u("div", {
346
+ key: o.id,
337
347
  class: "bb-base-date-picker-header"
338
- }, h(s.label), 1))), 128))
348
+ }, p(o.label), 1))), 128))
339
349
  ]),
340
350
  n("div", null, [
341
- (i(!0), u(S, null, M(H.value, (s, r) => (i(), u("div", {
351
+ (i(!0), u(w, null, O(j.value, (o, r) => (i(), u("div", {
342
352
  key: r,
343
353
  class: "bb-base-date-picker-week"
344
354
  }, [
345
- (i(!0), u(S, null, M(s, (l) => (i(), u("div", {
355
+ (i(!0), u(w, null, O(o, (l) => (i(), u("div", {
346
356
  key: l.id,
347
- class: A({
357
+ class: M({
348
358
  "bb-base-date-picker-date": !0,
349
359
  "bb-base-date-picker-date--selected": l.selected,
350
360
  "bb-base-date-picker-date--first": l.first,
@@ -356,11 +366,11 @@ const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /*
356
366
  n("button", {
357
367
  disabled: e.disabled,
358
368
  id: l.buttonId,
359
- onClick: j,
369
+ onClick: q,
360
370
  class: "bb-base-date-picker-date__button",
361
371
  type: "button"
362
- }, h(l.label), 9, Pe),
363
- N(e.$slots, "day", {
372
+ }, p(l.label), 9, Ue),
373
+ z(e.$slots, "day", {
364
374
  first: l.first,
365
375
  highlighted: l.highlighted,
366
376
  item: l.original,
@@ -369,7 +379,7 @@ const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /*
369
379
  middle: l.middle,
370
380
  selected: l.selected
371
381
  }),
372
- N(e.$slots, l.slotName, {
382
+ z(e.$slots, l.slotName, {
373
383
  first: l.first,
374
384
  highlighted: l.highlighted,
375
385
  item: l.original,
@@ -381,48 +391,45 @@ const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /*
381
391
  ], 2))), 128))
382
392
  ]))), 128))
383
393
  ])
384
- ]))
394
+ ], 2))
385
395
  ]),
386
396
  _: 3
387
397
  }),
388
- g(V, { name: "fade" }, {
389
- default: w(() => [
390
- k(n("div", He, [
391
- (i(!0), u(S, null, M(U.value, (s) => (i(), u("button", {
392
- key: s.key,
393
- class: A({
398
+ k(g, { name: "fade" }, {
399
+ default: V(() => [
400
+ b.value === "month" ? (i(), u("div", Ge, [
401
+ (i(!0), u(w, null, O(G.value, (o) => (i(), u("button", {
402
+ key: o.key,
403
+ class: M({
394
404
  "bb-base-date-picker__month-selector-month": !0,
395
- "bb-base-date-picker__month-selector-month--selected": s.selected
405
+ "bb-base-date-picker__month-selector-month--selected": o.selected
396
406
  }),
397
- onClick: s.handler,
407
+ onClick: o.handler,
398
408
  disabled: e.disabled,
399
409
  type: "button"
400
- }, h(s.text), 11, je))), 128))
401
- ], 512), [
402
- [O, m.value === "month"]
403
- ])
410
+ }, p(o.text), 11, Je))), 128))
411
+ ])) : D("", !0)
404
412
  ]),
405
413
  _: 1
406
414
  }),
407
- g(V, { name: "fade" }, {
408
- default: w(() => [
409
- k(n("div", {
415
+ k(g, { name: "fade" }, {
416
+ default: V(() => [
417
+ b.value === "year" ? (i(), u("div", {
418
+ key: 0,
410
419
  class: "bb-base-date-picker__year-selector",
411
420
  ref_key: "yearSelector",
412
- ref: Y
421
+ ref: A
413
422
  }, [
414
- (i(!0), u(S, null, M(Q.value, (s) => (i(), u("button", {
415
- key: s.key,
416
- class: A({
423
+ (i(!0), u(w, null, O(Z.value, (o) => (i(), u("button", {
424
+ key: o.key,
425
+ class: M({
417
426
  "bb-base-date-picker__year-selector-year": !0,
418
- "bb-base-date-picker__year-selector-year--selected": s.selected
427
+ "bb-base-date-picker__year-selector-year--selected": o.selected
419
428
  }),
420
- onClick: s.handler,
429
+ onClick: o.handler,
421
430
  disabled: e.disabled
422
- }, h(s.text), 11, qe))), 128))
423
- ], 512), [
424
- [O, m.value === "year"]
425
- ])
431
+ }, p(o.text), 11, Ke))), 128))
432
+ ], 512)) : D("", !0)
426
433
  ]),
427
434
  _: 1
428
435
  })
@@ -431,6 +438,6 @@ const me = { class: "bb-base-date-picker__header" }, he = ["disabled"], pe = /*
431
438
  }
432
439
  });
433
440
  export {
434
- tt as default
441
+ st as default
435
442
  };
436
443
  //# sourceMappingURL=index8.js.map