@boobooking/dashboard-ui-components 0.15.1 → 0.16.1

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/dist/index.js CHANGED
@@ -1,14 +1,13 @@
1
1
  import { Fragment as e, Transition as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, effectScope as c, mergeProps as l, normalizeClass as u, openBlock as d, renderList as f, renderSlot as p, resolveComponent as m, shallowReactive as h, toDisplayString as g, useId as _, vModelText as v, vShow as y, watch as ee, withCtx as b, withDirectives as x, withKeys as te, withModifiers as S } from "vue";
2
2
  import ne from "imask";
3
3
  //#region src/i18n.js
4
- var C = ["ru", "en"];
5
- function w(e) {
6
- return C.includes(e);
4
+ var re = ["ru", "en"];
5
+ function C(e) {
6
+ return re.includes(e);
7
7
  }
8
- var re = {
8
+ var ie = {
9
9
  ru: {
10
10
  cancel: "Отмена",
11
- download: "Скачать",
12
11
  openMenu: "Открыть меню",
13
12
  previousMonth: "Предыдущий месяц",
14
13
  nextMonth: "Следующий месяц",
@@ -52,11 +51,13 @@ var re = {
52
51
  resultsOf: "из",
53
52
  resultsAfter: "",
54
53
  back: "Назад",
55
- close: "Закрыть"
54
+ close: "Закрыть",
55
+ clear: "Очистить",
56
+ showText: "Показать текст",
57
+ fullText: "Полный текст"
56
58
  },
57
59
  en: {
58
60
  cancel: "Cancel",
59
- download: "Download",
60
61
  openMenu: "Open menu",
61
62
  previousMonth: "Previous month",
62
63
  nextMonth: "Next month",
@@ -100,20 +101,23 @@ var re = {
100
101
  resultsOf: "of",
101
102
  resultsAfter: "results",
102
103
  back: "Back",
103
- close: "Close"
104
+ close: "Close",
105
+ clear: "Clear",
106
+ showText: "Show text",
107
+ fullText: "Full text"
104
108
  }
105
109
  };
106
110
  //#endregion
107
111
  //#region src/windows.js
108
- function T(e, t) {
112
+ function w(e, t) {
109
113
  if (e == null || e === "") return null;
110
114
  let n = new URL(String(e), t);
111
115
  return n.pathname + n.search;
112
116
  }
113
- function ie(e) {
117
+ function ae(e) {
114
118
  return e === null ? null : e.split("?")[0];
115
119
  }
116
- function ae() {
120
+ function oe() {
117
121
  return {
118
122
  windows: [],
119
123
  cards: /* @__PURE__ */ new Map(),
@@ -127,36 +131,36 @@ function ae() {
127
131
  nextId: 1
128
132
  };
129
133
  }
130
- function E(e, t) {
134
+ function T(e, t) {
131
135
  return e.windows.includes(t);
132
136
  }
133
- function oe(e) {
137
+ function se(e) {
134
138
  return e.returnAddress ?? e.fallbackAddress;
135
139
  }
136
- function se(e) {
140
+ function ce(e) {
137
141
  let t = null;
138
142
  for (let n of e.cards.values()) t = n.window;
139
143
  return t;
140
144
  }
141
- function D(e, t) {
145
+ function le(e, t) {
142
146
  let n = t;
143
- for (; n !== null && !E(e, n);) n = n.parent;
147
+ for (; n !== null && !T(e, n);) n = n.parent;
144
148
  return n;
145
149
  }
146
- function ce(e, t) {
150
+ function ue(e, t) {
147
151
  return e.transition = {
148
152
  number: e.transition.number + 1,
149
153
  fromAddress: e.shown,
150
- fromWindow: se(e),
154
+ fromWindow: ce(e),
151
155
  assigned: /* @__PURE__ */ new Map()
152
156
  }, e.shown = t, e.transition.number;
153
157
  }
154
- function le(e, t, n) {
158
+ function de(e, t, n) {
155
159
  let r = e.transition, i = r.assigned.get(t);
156
- if (i !== void 0 && E(e, i)) return i;
160
+ if (i !== void 0 && T(e, i)) return i;
157
161
  let a = r.fromWindow, o = r.fromAddress;
158
- a !== null && !E(e, a) && (a = D(e, a), o = null), a !== null && oe(a) === e.shown && (e.windows.splice(e.windows.indexOf(a)), a = a.parent === null ? null : D(e, a.parent), o = null);
159
- for (let n = a; n !== null; n = n.parent) if (n.key === t && E(e, n)) return e.windows.splice(e.windows.indexOf(n) + 1), n;
162
+ a !== null && !T(e, a) && (a = le(e, a), o = null), a !== null && se(a) === e.shown && (e.windows.splice(e.windows.indexOf(a)), a = a.parent === null ? null : le(e, a.parent), o = null);
163
+ for (let n = a; n !== null; n = n.parent) if (n.key === t && T(e, n)) return e.windows.splice(e.windows.indexOf(n) + 1), n;
160
164
  a === null ? e.windows = [] : e.windows.splice(e.windows.indexOf(a) + 1);
161
165
  let s = {
162
166
  id: e.nextId,
@@ -167,18 +171,18 @@ function le(e, t, n) {
167
171
  };
168
172
  return e.nextId += 1, e.windows.push(s), s;
169
173
  }
170
- function O(e, t, n, r) {
171
- let i = le(e, n, r);
174
+ function E(e, t, n, r) {
175
+ let i = de(e, n, r);
172
176
  return i.fallbackAddress = r, e.transition.assigned.set(n, i), e.cards.delete(t), e.cards.set(t, {
173
177
  key: n,
174
178
  window: i,
175
179
  processed: e.transition.number
176
180
  }), i;
177
181
  }
178
- function ue(e, t, n, r) {
182
+ function fe(e, t, n, r) {
179
183
  let i = e.cards.get(t);
180
184
  return i === void 0 ? {
181
- window: O(e, t, n, r),
185
+ window: E(e, t, n, r),
182
186
  rejected: !1,
183
187
  key: n
184
188
  } : i.key === n ? (i.processed = e.transition.number, {
@@ -190,37 +194,37 @@ function ue(e, t, n, r) {
190
194
  rejected: !0,
191
195
  key: i.key
192
196
  } : (e.cards.delete(t), {
193
- window: O(e, t, n, r),
197
+ window: E(e, t, n, r),
194
198
  rejected: !1,
195
199
  key: n
196
200
  });
197
201
  }
198
- function de(e, t) {
202
+ function pe(e, t) {
199
203
  e.cards.delete(t);
200
204
  }
201
- function fe(e, t, n) {
205
+ function me(e, t, n) {
202
206
  let r = e.cards.get(t);
203
207
  r !== void 0 && (r.window.fallbackAddress = n);
204
208
  }
205
209
  //#endregion
206
210
  //#region src/plugin.js
207
- var k = Symbol("dashboardUi"), pe = Object.freeze({
211
+ var D = Symbol("dashboardUi"), he = Object.freeze({
208
212
  lang: "ru",
209
213
  navigate: null,
210
214
  windows: null
211
- }), A = { uiSettings: {
212
- from: k,
213
- default: () => pe
215
+ }), ge = { uiSettings: {
216
+ from: D,
217
+ default: () => he
214
218
  } };
215
- function me(e, t) {
216
- let n = ae(), r = h({
219
+ function _e(e, t) {
220
+ let n = oe(), r = h({
217
221
  number: 0,
218
222
  address: null
219
223
  }), i = c(!0);
220
224
  return i.run(() => {
221
225
  ee(t, (e) => {
222
- let t = T(e, window.location.origin);
223
- t !== null && t !== r.address && (r.number = ce(n, t), r.address = t);
226
+ let t = w(e, window.location.origin);
227
+ t !== null && t !== r.address && (r.number = ue(n, t), r.address = t);
224
228
  }, {
225
229
  flush: "sync",
226
230
  immediate: !0
@@ -230,24 +234,104 @@ function me(e, t) {
230
234
  page: r
231
235
  };
232
236
  }
233
- var he = { install(e, t) {
237
+ var ve = { install(e, t) {
234
238
  let n = t ?? {}, r = Object.hasOwn(n, "lang") ? n.lang : "ru";
235
- if (!w(r)) throw Error(`dashboardUi: неизвестный lang «${r}», допустимы: ${C.join(", ")}`);
239
+ if (!C(r)) throw Error(`dashboardUi: неизвестный lang «${r}», допустимы: ${re.join(", ")}`);
236
240
  let i = Object.hasOwn(n, "navigate"), a = i ? n.navigate : null;
237
241
  if (i && typeof a != "function") throw Error("dashboardUi: navigate должен быть функцией (href) => …");
238
242
  let o = Object.hasOwn(n, "currentUrl"), s = o ? n.currentUrl : null;
239
243
  if (o && typeof s != "function") throw Error("dashboardUi: currentUrl должен быть функцией () => адрес страницы");
240
- let c = s !== null && typeof window < "u" ? me(e, s) : null;
241
- e.provide(k, Object.freeze({
244
+ let c = s !== null && typeof window < "u" ? _e(e, s) : null;
245
+ e.provide(D, Object.freeze({
242
246
  lang: r,
243
247
  navigate: a,
244
248
  windows: c
245
249
  }));
246
- } }, j = (e, t) => {
250
+ } }, ye = 4e4;
251
+ function be(e) {
252
+ if (typeof e != "string") return null;
253
+ let t = /filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e);
254
+ if (t !== null) try {
255
+ return decodeURIComponent(t[1].trim());
256
+ } catch {}
257
+ let n = /filename\s*=\s*"([^"]+)"/i.exec(e);
258
+ if (n !== null) return n[1];
259
+ let r = /filename\s*=\s*([^;"\s]+)/i.exec(e);
260
+ return r === null ? null : r[1];
261
+ }
262
+ function xe(e) {
263
+ try {
264
+ let t = new URL(e, window.location.href).pathname.split("/").filter((e) => e !== "");
265
+ return t.length === 0 ? null : decodeURIComponent(t[t.length - 1]);
266
+ } catch {
267
+ return null;
268
+ }
269
+ }
270
+ async function Se(e) {
271
+ let t = await fetch(e, { credentials: "same-origin" });
272
+ if (t.redirected) throw Error(`downloadFile: сервер перенаправил запрос ${e}`);
273
+ if (!t.ok) throw Error(`downloadFile: ответ ${t.status} на ${e}`);
274
+ let n = be(t.headers.get("Content-Disposition")) ?? xe(e) ?? "download", r = URL.createObjectURL(await t.blob()), i = document.createElement("a");
275
+ i.href = r, i.download = n, i.style.display = "none", document.body.appendChild(i), i.click(), i.remove(), setTimeout(() => URL.revokeObjectURL(r), ye);
276
+ }
277
+ //#endregion
278
+ //#region src/colors.js
279
+ var Ce = {
280
+ gray: {
281
+ pill: "bb:bg-gray-100 bb:text-gray-800",
282
+ pillHover: "bb:hover:text-gray-600",
283
+ button: "bb:bg-gray-100 bb:border-gray-300 bb:text-gray-800 bb:hover:bg-gray-200",
284
+ menuItem: "bb:text-gray-800 bb:focus:bg-gray-100",
285
+ mark: "bb:text-gray-500"
286
+ },
287
+ green: {
288
+ pill: "bb:bg-green-100 bb:text-green-800",
289
+ pillHover: "bb:hover:text-green-600",
290
+ button: "bb:bg-green-100 bb:border-green-300 bb:text-green-800 bb:hover:bg-green-200",
291
+ menuItem: "bb:text-green-800 bb:focus:bg-green-100",
292
+ mark: "bb:text-green-500"
293
+ },
294
+ yellow: {
295
+ pill: "bb:bg-yellow-100 bb:text-yellow-800",
296
+ pillHover: "bb:hover:text-yellow-600",
297
+ button: "bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200",
298
+ menuItem: "bb:text-yellow-800 bb:focus:bg-yellow-100",
299
+ mark: "bb:text-yellow-500"
300
+ },
301
+ red: {
302
+ pill: "bb:bg-red-100 bb:text-red-800",
303
+ pillHover: "bb:hover:text-red-600",
304
+ button: "bb:bg-red-100 bb:border-red-300 bb:text-red-800 bb:hover:bg-red-200",
305
+ menuItem: "bb:text-red-800 bb:focus:bg-red-100",
306
+ mark: "bb:text-red-500"
307
+ },
308
+ indigo: {
309
+ pill: "bb:bg-indigo-100 bb:text-indigo-800",
310
+ pillHover: "bb:hover:text-indigo-600",
311
+ button: "bb:bg-indigo-100 bb:border-indigo-300 bb:text-indigo-800 bb:hover:bg-indigo-200",
312
+ menuItem: "bb:text-indigo-800 bb:focus:bg-indigo-100",
313
+ mark: "bb:text-indigo-500"
314
+ },
315
+ purple: {
316
+ pill: "bb:bg-purple-100 bb:text-purple-800",
317
+ pillHover: "bb:hover:text-purple-600",
318
+ button: "bb:bg-purple-100 bb:border-purple-300 bb:text-purple-800 bb:hover:bg-purple-200",
319
+ menuItem: "bb:text-purple-800 bb:focus:bg-purple-100",
320
+ mark: "bb:text-purple-500"
321
+ }
322
+ }, we = Object.keys(Ce);
323
+ function O(e) {
324
+ return we.includes(e);
325
+ }
326
+ function Te(e, t) {
327
+ return O(e) ? Ce[e][t] ?? "" : "";
328
+ }
329
+ var k = { methods: { colorClass: Te } }, A = (e, t) => {
247
330
  let n = e.__vccOpts || e;
248
331
  for (let [e, r] of t) n[e] = r;
249
332
  return n;
250
- }, ge = {
333
+ }, Ee = {
334
+ mixins: [k],
251
335
  props: {
252
336
  withPulse: {
253
337
  type: Boolean,
@@ -256,24 +340,12 @@ var he = { install(e, t) {
256
340
  color: {
257
341
  type: String,
258
342
  required: !0,
259
- validator: (e) => ["red", "green"].indexOf(e) !== -1
260
- }
261
- },
262
- computed: {
263
- isRed() {
264
- return this.color === "red";
265
- },
266
- isGreen() {
267
- return this.color === "green";
343
+ validator: O
268
344
  }
269
345
  }
270
346
  };
271
- function _e(e, t, n, r, o, s) {
272
- return d(), i("div", { class: u(["bb-dashboard-ui bb:flex bb:h-full bb:items-center bb:leading-none bb:text-4xl", {
273
- "bb:text-red-500": s.isRed,
274
- "bb:text-green-500": s.isGreen,
275
- "bb:animate-pulse": n.withPulse
276
- }]) }, [...t[0] ||= [a("svg", {
347
+ function De(e, t, n, r, o, s) {
348
+ return d(), i("div", { class: u(["bb-dashboard-ui bb:flex bb:h-full bb:items-center bb:leading-none bb:text-4xl", [e.colorClass(n.color, "mark"), { "bb:animate-pulse": n.withPulse }]]) }, [...t[0] ||= [a("svg", {
277
349
  class: "bb:fill-current bb:w-2 bb:h-2",
278
350
  viewBox: "0 0 120 120"
279
351
  }, [a("circle", {
@@ -282,8 +354,8 @@ function _e(e, t, n, r, o, s) {
282
354
  r: "45"
283
355
  })], -1)]], 2);
284
356
  }
285
- var ve = /*#__PURE__*/ j(ge, [["render", _e]]), ye = {
286
- components: { Dot: ve },
357
+ var Oe = /*#__PURE__*/ A(Ee, [["render", De]]), ke = {
358
+ components: { Dot: Oe },
287
359
  props: {
288
360
  text: {
289
361
  type: String,
@@ -298,14 +370,14 @@ var ve = /*#__PURE__*/ j(ge, [["render", _e]]), ye = {
298
370
  default: !1
299
371
  }
300
372
  }
301
- }, be = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, xe = ["textContent"];
302
- function Se(e, t, n, r, o, c) {
373
+ }, Ae = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, je = ["textContent"];
374
+ function Me(e, t, n, r, o, c) {
303
375
  let l = m("dot");
304
- return d(), i("div", be, [
376
+ return d(), i("div", Ae, [
305
377
  a("div", {
306
378
  class: "bb:flex bb:flex-1 bb:h-full bb:items-center bb:text-xs bb:text-gray-500 bb:whitespace-nowrap bb:truncate bb:leading-tight bb:select-none",
307
379
  textContent: g(n.text)
308
- }, null, 8, xe),
380
+ }, null, 8, je),
309
381
  x(s(l, {
310
382
  color: "red",
311
383
  "with-pulse": !0,
@@ -317,27 +389,85 @@ function Se(e, t, n, r, o, c) {
317
389
  }, null, 512), [[y, n.isRequired]])
318
390
  ]);
319
391
  }
320
- var M = /*#__PURE__*/ j(ye, [["render", Se]]), Ce = {}, we = {
321
- type: "button",
322
- tabindex: "-1",
323
- class: "bb:absolute bb:right-0 bb:top-0 bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-300 bb:hover:text-gray-400 bb:focus:outline-hidden"
392
+ var j = /*#__PURE__*/ A(ke, [["render", Me]]), M = {
393
+ inject: ge,
394
+ props: { lang: {
395
+ type: String,
396
+ default: null,
397
+ validator: (e) => e === null || C(e)
398
+ } },
399
+ computed: {
400
+ resolvedLang() {
401
+ return C(this.lang) ? this.lang : this.uiSettings.lang;
402
+ },
403
+ texts() {
404
+ return ie[this.resolvedLang];
405
+ }
406
+ }
407
+ }, Ne = [
408
+ { transform: "scale(1)" },
409
+ { transform: "scale(0.8)" },
410
+ { transform: "scale(1)" }
411
+ ], Pe = 150, Fe = {
412
+ created() {
413
+ this.isPressing = !1, this.isUnmounted = !1;
414
+ },
415
+ beforeUnmount() {
416
+ this.isUnmounted = !0;
417
+ },
418
+ methods: { press() {
419
+ this.isPressing || (this.isPressing = !0, Ie(this.$el).then(() => {
420
+ this.isPressing = !1, this.isUnmounted || this.$emit("clicked");
421
+ }));
422
+ } }
324
423
  };
325
- function Te(e, t, n, r, o, s) {
326
- return d(), i("button", we, [...t[0] ||= [a("svg", {
327
- class: "bb:w-6 bb:h-6 bb:stroke-current",
424
+ function Ie(e) {
425
+ if (typeof e.animate != "function" || Le()) return Promise.resolve();
426
+ let t = () => {};
427
+ return e.animate(Ne, {
428
+ duration: Pe,
429
+ easing: "ease-out"
430
+ }).finished.then(t, t);
431
+ }
432
+ function Le() {
433
+ return typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
434
+ }
435
+ //#endregion
436
+ //#region src/components/CrossButton.vue
437
+ var Re = {
438
+ mixins: [M, Fe],
439
+ props: { size: {
440
+ type: String,
441
+ required: !0,
442
+ validator: (e) => ["small", "large"].includes(e)
443
+ } },
444
+ emits: ["clicked"]
445
+ }, ze = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
446
+ function Be(e, t, n, r, s, c) {
447
+ return d(), i("button", {
448
+ type: "button",
449
+ tabindex: "-1",
450
+ class: "bb-dashboard-ui bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-400 bb:focus:outline-hidden bb:hover:text-gray-500",
451
+ onClick: t[0] ||= S((...t) => e.press && e.press(...t), ["prevent"])
452
+ }, [a("span", ze, [p(e.$slots, "default", {}, () => [o(g(e.texts.clear), 1)])]), (d(), i("svg", {
453
+ class: u(["bb:stroke-current bb:pointer-events-none bb:cursor-default", {
454
+ "bb:w-6 bb:h-6": n.size === "small",
455
+ "bb:w-8 bb:h-8": n.size === "large"
456
+ }]),
328
457
  fill: "none",
329
- viewBox: "0 0 24 24"
330
- }, [a("path", {
458
+ viewBox: "0 0 24 24",
459
+ "aria-hidden": "true"
460
+ }, [...t[1] ||= [a("path", {
331
461
  "stroke-linecap": "round",
332
462
  "stroke-linejoin": "round",
333
463
  "stroke-width": "2",
334
464
  d: "M6 18L18 6M6 6l12 12"
335
- })], -1)]]);
465
+ }, null, -1)]], 2))]);
336
466
  }
337
- var N = /*#__PURE__*/ j(Ce, [["render", Te]]), Ee = 10;
338
- function De(e) {
467
+ var N = /*#__PURE__*/ A(Re, [["render", Be]]), Ve = 10;
468
+ function He(e) {
339
469
  let t = e.replace(/\D/g, "");
340
- return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0, Ee);
470
+ return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0, Ve);
341
471
  }
342
472
  function P(e) {
343
473
  return e === "" ? "" : `7${e}`;
@@ -348,10 +478,10 @@ function F(e) {
348
478
  }
349
479
  //#endregion
350
480
  //#region src/components/RussianMobileFilter.vue
351
- var Oe = 400, ke = 3, Ae = {
481
+ var Ue = 400, We = 3, Ge = {
352
482
  components: {
353
- ElementHeader: M,
354
- Eraser: N
483
+ ElementHeader: j,
484
+ CrossButton: N
355
485
  },
356
486
  emits: ["update:modelValue", "changed"],
357
487
  props: {
@@ -421,7 +551,7 @@ var Oe = 400, ke = 3, Ae = {
421
551
  this.isUnmounted || (this.setLazy(!0), this.digits === "" && this.writeToMask(""), this.commit());
422
552
  },
423
553
  onPaste(e) {
424
- this.applyUserDigits(De(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
554
+ this.applyUserDigits(He(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
425
555
  },
426
556
  clear() {
427
557
  this.applyUserDigits(""), this.commit();
@@ -431,16 +561,16 @@ var Oe = 400, ke = 3, Ae = {
431
561
  this.commit();
432
562
  return;
433
563
  }
434
- this.digits.length < ke || (this.debounceTimer = setTimeout(() => this.commit(), Oe));
564
+ this.digits.length < We || (this.debounceTimer = setTimeout(() => this.commit(), Ue));
435
565
  },
436
566
  commit() {
437
567
  clearTimeout(this.debounceTimer), this.digits !== this.lastCommitted && (this.lastCommitted = this.digits, this.$emit("changed"));
438
568
  }
439
569
  }
440
- }, je = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Me = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Ne = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Pe = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
441
- function Fe(e, t, n, r, o, c) {
442
- let l = m("element-header"), u = m("eraser");
443
- return d(), i("div", je, [a("div", Me, [s(l, {
570
+ }, Ke = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, qe = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Je = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Ye = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
571
+ function Xe(e, t, n, r, o, c) {
572
+ let l = m("element-header"), u = m("cross-button");
573
+ return d(), i("div", Ke, [a("div", qe, [s(l, {
444
574
  text: n.header,
445
575
  "is-required": n.isRequired,
446
576
  "is-loading": n.isLoading
@@ -448,7 +578,7 @@ function Fe(e, t, n, r, o, c) {
448
578
  "text",
449
579
  "is-required",
450
580
  "is-loading"
451
- ]), a("div", Ne, [a("label", Pe, [a("input", {
581
+ ]), a("div", Je, [a("label", Ye, [a("input", {
452
582
  ref: "input",
453
583
  type: "tel",
454
584
  inputmode: "tel",
@@ -459,15 +589,16 @@ function Fe(e, t, n, r, o, c) {
459
589
  onKeydown: t[2] ||= te((...e) => c.commit && c.commit(...e), ["enter"]),
460
590
  onPaste: t[3] ||= S((...e) => c.onPaste && c.onPaste(...e), ["prevent"])
461
591
  }, null, 544), x(s(u, {
592
+ size: "small",
462
593
  onMousedown: t[4] ||= S(() => {}, ["prevent"]),
463
- onClick: c.clear,
464
- class: "bb:pr-2 bb:h-full"
465
- }, null, 8, ["onClick"]), [[y, o.digits.length > 0]])])])])]);
594
+ onClicked: c.clear,
595
+ class: "bb:absolute bb:right-0 bb:top-0 bb:pr-2 bb:h-full"
596
+ }, null, 8, ["onClicked"]), [[y, o.digits.length > 0]])])])])]);
466
597
  }
467
- var Ie = /*#__PURE__*/ j(Ae, [["render", Fe]]), Le = {
598
+ var Ze = /*#__PURE__*/ A(Ge, [["render", Xe]]), Qe = {
468
599
  components: {
469
- ElementHeader: M,
470
- Eraser: N
600
+ ElementHeader: j,
601
+ CrossButton: N
471
602
  },
472
603
  emits: ["update:modelValue", "changed"],
473
604
  props: {
@@ -505,10 +636,10 @@ var Ie = /*#__PURE__*/ j(Ae, [["render", Fe]]), Le = {
505
636
  this.$emit("update:modelValue", this.search), this.$emit("changed");
506
637
  }
507
638
  }
508
- }, Re = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, ze = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Be = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Ve = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
509
- function He(e, t, n, r, o, c) {
510
- let l = m("element-header"), u = m("eraser");
511
- return d(), i("div", Re, [a("div", ze, [s(l, {
639
+ }, $e = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, et = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, tt = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, nt = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
640
+ function rt(e, t, n, r, o, c) {
641
+ let l = m("element-header"), u = m("cross-button");
642
+ return d(), i("div", $e, [a("div", et, [s(l, {
512
643
  text: n.header,
513
644
  "is-required": n.isRequired,
514
645
  "is-loading": n.isLoading
@@ -516,7 +647,7 @@ function He(e, t, n, r, o, c) {
516
647
  "text",
517
648
  "is-required",
518
649
  "is-loading"
519
- ]), a("div", Be, [a("label", Ve, [x(a("input", {
650
+ ]), a("div", tt, [a("label", nt, [x(a("input", {
520
651
  class: "bb:flex bb:w-full bb:h-full bb:px-3 bb:py-2 bb:cursor-pointer bb:truncate bb:focus:outline-hidden bb:border-none",
521
652
  "onUpdate:modelValue": t[0] ||= (e) => o.search = e,
522
653
  onInput: t[1] ||= (...e) => c.startSearch && c.startSearch(...e)
@@ -526,18 +657,19 @@ function He(e, t, n, r, o, c) {
526
657
  void 0,
527
658
  { trim: !0 }
528
659
  ]]), x(s(u, {
529
- onClick: c.clearInput,
530
- class: "bb:pr-2 bb:h-full"
531
- }, null, 8, ["onClick"]), [[y, c.inputNeedsEraser]])])])])]);
660
+ size: "small",
661
+ onClicked: c.clearInput,
662
+ class: "bb:absolute bb:right-0 bb:top-0 bb:pr-2 bb:h-full"
663
+ }, null, 8, ["onClicked"]), [[y, c.inputNeedsEraser]])])])])]);
532
664
  }
533
- var Ue = /*#__PURE__*/ j(Le, [["render", He]]), I = 4, L = 8;
534
- function We(e) {
665
+ var it = /*#__PURE__*/ A(Qe, [["render", rt]]), I = 4, L = 8;
666
+ function R(e) {
535
667
  return typeof e?.showPopover == "function";
536
668
  }
537
- function R(e) {
538
- return We(e) && e.matches(":popover-open");
669
+ function z(e) {
670
+ return R(e) && e.matches(":popover-open");
539
671
  }
540
- function z(e, t, { maxWidth: n = null, align: r = "end", fitsBelow: i = !0, fitsRight: a = !0 } = {}) {
672
+ function B(e, t, { maxWidth: n = null, align: r = "end", fitsBelow: i = !0, fitsRight: a = !0 } = {}) {
541
673
  let o = e.getBoundingClientRect(), s = document.documentElement.clientWidth, c = document.documentElement.clientHeight, l = Math.max(L, o.left), u = Math.max(L, s - o.right), d = Math.max(0, s - l - L), f = Math.max(0, s - u - L), p = r === "start" && (a || d >= f), m = Math.max(0, c - o.bottom - I - L), h = Math.max(0, o.top - I - L), g = i || m >= h, _ = "";
542
674
  if (r === "start") {
543
675
  let e = p ? d : f;
@@ -552,15 +684,15 @@ function z(e, t, { maxWidth: n = null, align: r = "end", fitsBelow: i = !0, fits
552
684
  maxWidth: _
553
685
  });
554
686
  }
555
- function Ge(e, t, n = {}) {
687
+ function at(e, t, n = {}) {
556
688
  let r = t.scrollHeight <= t.clientHeight + 1, i = t.scrollWidth <= t.clientWidth + 1;
557
- r && i || z(e, t, {
689
+ r && i || B(e, t, {
558
690
  ...n,
559
691
  fitsBelow: r,
560
692
  fitsRight: i
561
693
  });
562
694
  }
563
- function Ke(e, t) {
695
+ function ot(e, t) {
564
696
  let n = (n) => {
565
697
  e.contains(n.target) || t();
566
698
  };
@@ -573,17 +705,17 @@ function Ke(e, t) {
573
705
  }
574
706
  //#endregion
575
707
  //#region src/menuFocus.js
576
- var B = "a[href], button";
577
- function qe(e, t = () => null) {
708
+ var V = "a[href], button";
709
+ function st(e, t = () => null) {
578
710
  let n = (n) => {
579
711
  if (n.key !== "ArrowDown" && n.key !== "ArrowUp") return;
580
- let r = [...e.querySelectorAll(B)];
712
+ let r = [...e.querySelectorAll(V)];
581
713
  if (r.length === 0) return;
582
714
  n.preventDefault();
583
715
  let i = n.key === "ArrowDown" ? 1 : -1, a = r.indexOf(document.activeElement);
584
716
  a === -1 && (a = r.indexOf(t())), r[a === -1 ? i === 1 ? 0 : r.length - 1 : (a + i + r.length) % r.length].focus();
585
717
  }, r = (e) => {
586
- let t = e.target.closest(B);
718
+ let t = e.target.closest(V);
587
719
  t !== null && t.focus({ preventScroll: !0 });
588
720
  };
589
721
  return document.addEventListener("keydown", n, !0), e.addEventListener("mousemove", r), () => {
@@ -592,8 +724,8 @@ function qe(e, t = () => null) {
592
724
  }
593
725
  //#endregion
594
726
  //#region src/components/PopoverPanel.vue
595
- var Je = {
596
- emits: ["update:modelValue"],
727
+ var ct = {
728
+ emits: ["update:modelValue", "toggle"],
597
729
  props: {
598
730
  modelValue: {
599
731
  type: Boolean,
@@ -632,6 +764,14 @@ var Je = {
632
764
  type: String,
633
765
  default: null
634
766
  },
767
+ panelLabel: {
768
+ type: String,
769
+ default: null
770
+ },
771
+ panelFocusable: {
772
+ type: Boolean,
773
+ default: !1
774
+ },
635
775
  returnFocus: {
636
776
  type: Boolean,
637
777
  default: !1
@@ -657,12 +797,12 @@ var Je = {
657
797
  this.applyPanelState();
658
798
  return;
659
799
  }
660
- this.stopListening(), this.panelIsOpen && (this.panelIsOpen = !1, this.$emit("update:modelValue", !1));
800
+ this.stopListening(), this.reportPanelShown(!1), this.panelIsOpen && (this.panelIsOpen = !1, this.$emit("update:modelValue", !1));
661
801
  }
662
802
  }
663
803
  },
664
804
  created() {
665
- this.stopClosing = null, this.stopArrows = null, this.focusWasInside = !1;
805
+ this.stopClosing = null, this.stopArrows = null, this.focusWasInside = !1, this.panelShown = !1;
666
806
  },
667
807
  mounted() {
668
808
  this.applyPanelState();
@@ -673,11 +813,14 @@ var Je = {
673
813
  methods: {
674
814
  applyPanelState() {
675
815
  let e = this.$refs.panel;
676
- We(e) && e.isConnected && (this.panelIsOpen && !R(e) && e.showPopover(), !this.panelIsOpen && R(e) && e.hidePopover());
816
+ R(e) && e.isConnected && (this.panelIsOpen && !z(e) && e.showPopover(), !this.panelIsOpen && z(e) && e.hidePopover());
677
817
  },
678
818
  close() {
679
819
  let e = this.$refs.panel;
680
- R(e) && e.hidePopover();
820
+ z(e) && e.hidePopover();
821
+ },
822
+ reportPanelShown(e) {
823
+ this.panelShown !== e && (this.panelShown = e, this.$emit("toggle", e));
681
824
  },
682
825
  onClick() {
683
826
  this.closeOnClick && this.close();
@@ -688,9 +831,9 @@ var Je = {
688
831
  maxWidth: this.maxWidth,
689
832
  align: this.align
690
833
  };
691
- z(e, this.$refs.panel, t), requestAnimationFrame(() => {
834
+ B(e, this.$refs.panel, t), requestAnimationFrame(() => {
692
835
  let n = this.$refs.panel;
693
- R(n) && Ge(e, n, t);
836
+ z(n) && at(e, n, t);
694
837
  });
695
838
  return;
696
839
  }
@@ -699,8 +842,8 @@ var Je = {
699
842
  },
700
843
  onToggle() {
701
844
  this.stopListening();
702
- let e = this.$refs.panel, t = R(e);
703
- t && (this.stopClosing = Ke(e, this.close), this.arrows && (this.stopArrows = qe(e, this.findSelected))), t || this.restoreFocus(e), t !== this.panelIsOpen && (this.panelIsOpen = t, this.$emit("update:modelValue", t));
845
+ let e = this.$refs.panel, t = z(e);
846
+ t && (this.stopClosing = ot(e, this.close), this.arrows && (this.stopArrows = st(e, this.findSelected))), t || this.restoreFocus(e), this.reportPanelShown(t), t !== this.panelIsOpen && (this.panelIsOpen = t, this.$emit("update:modelValue", t));
704
847
  },
705
848
  restoreFocus(e) {
706
849
  let t = this.focusWasInside;
@@ -712,17 +855,19 @@ var Je = {
712
855
  this.stopClosing !== null && (this.stopClosing(), this.stopClosing = null), this.stopArrows !== null && (this.stopArrows(), this.stopArrows = null);
713
856
  }
714
857
  }
715
- }, Ye = {
858
+ }, lt = {
716
859
  key: 0,
717
860
  class: "bb:relative"
718
- }, Xe = [
861
+ }, ut = [
719
862
  "id",
720
863
  "role",
721
864
  "aria-orientation",
722
- "aria-labelledby"
865
+ "aria-labelledby",
866
+ "aria-label",
867
+ "tabindex"
723
868
  ];
724
- function Ze(e, t, n, o, s, c) {
725
- return n.hasContent ? (d(), i("span", Ye, [p(e.$slots, "trigger", {
869
+ function dt(e, t, n, o, s, c) {
870
+ return n.hasContent ? (d(), i("span", lt, [p(e.$slots, "trigger", {
726
871
  id: o.buttonId,
727
872
  popovertarget: o.panelId
728
873
  }), a("div", {
@@ -732,47 +877,85 @@ function Ze(e, t, n, o, s, c) {
732
877
  class: u(["bb:m-0 bb:inset-auto", n.panelClass]),
733
878
  role: n.panelRole,
734
879
  "aria-orientation": n.panelRole === "menu" ? "vertical" : null,
735
- "aria-labelledby": o.buttonId,
880
+ "aria-labelledby": n.panelLabel === null ? o.buttonId : null,
881
+ "aria-label": n.panelLabel,
882
+ tabindex: n.panelFocusable ? 0 : null,
736
883
  onBeforetoggle: t[0] ||= (...e) => c.onBeforeToggle && c.onBeforeToggle(...e),
737
884
  onToggle: t[1] ||= (...e) => c.onToggle && c.onToggle(...e),
738
885
  onClick: t[2] ||= (...e) => c.onClick && c.onClick(...e)
739
- }, [p(e.$slots, "default")], 42, Xe)])) : r("", !0);
886
+ }, [p(e.$slots, "default")], 42, ut)])) : r("", !0);
740
887
  }
741
- var V = /*#__PURE__*/ j(Je, [["render", Ze]]);
888
+ var H = /*#__PURE__*/ A(ct, [["render", dt]]);
742
889
  //#endregion
743
890
  //#region src/date.js
744
- function H(e) {
891
+ function U(e) {
745
892
  return `${String(e.getDate()).padStart(2, "0")}.${String(e.getMonth() + 1).padStart(2, "0")}.${String(e.getFullYear()).padStart(4, "0")}`;
746
893
  }
747
- function U(e) {
894
+ function W(e) {
748
895
  let t = /^(\d{1,2})\.(\d{1,2})\.(\d{4})$/.exec(e);
749
896
  if (t === null) return null;
750
897
  let [, n, r, i] = t.map(Number), a = /* @__PURE__ */ new Date(0);
751
898
  return a.setFullYear(i, r - 1, n), a.setHours(0, 0, 0, 0), a.getDate() !== n || a.getMonth() !== r - 1 || a.getFullYear() !== i ? null : a;
752
899
  }
753
900
  //#endregion
754
- //#region src/lang.js
755
- var W = {
756
- inject: A,
757
- props: { lang: {
758
- type: String,
759
- default: null,
760
- validator: (e) => e === null || w(e)
761
- } },
762
- computed: {
763
- resolvedLang() {
764
- return w(this.lang) ? this.lang : this.uiSettings.lang;
765
- },
766
- texts() {
767
- return re[this.resolvedLang];
768
- }
769
- }
770
- }, Qe = {
901
+ //#region src/dayFocus.js
902
+ var G = ".pika-button.pika-day", ft = ".pika-button, .pika-prev, .pika-next";
903
+ function pt(e, t = () => null) {
904
+ let n = (n) => {
905
+ if (n.detail !== 0) return;
906
+ let r = n.target.closest(ft);
907
+ r !== null && e.contains(r) && setTimeout(() => {
908
+ let n = document.activeElement === r;
909
+ if (r.dispatchEvent(new MouseEvent("mousedown", {
910
+ bubbles: !0,
911
+ cancelable: !0
912
+ })), !n || r.isConnected) return;
913
+ let i = ["pika-prev", "pika-next"].find((e) => r.classList.contains(e));
914
+ i === void 0 ? t()?.focus({ preventScroll: !0 }) : e.querySelector(`.${i}`)?.focus();
915
+ }, 0);
916
+ };
917
+ return e.addEventListener("click", n), () => e.removeEventListener("click", n);
918
+ }
919
+ var mt = {
920
+ ArrowLeft: -1,
921
+ ArrowRight: 1,
922
+ ArrowUp: -7,
923
+ ArrowDown: 7
924
+ };
925
+ function ht(e, t) {
926
+ let n = (n) => {
927
+ let r = mt[n.key];
928
+ if (r === void 0 || gt(document.activeElement)) return;
929
+ n.preventDefault();
930
+ let i = document.activeElement?.closest(G) ?? null, a = i !== null && e.contains(i) ? vt(_t(i), r) : t.getDate() ?? yt();
931
+ K(e, a) === null && t.gotoDate(a), K(e, a)?.focus();
932
+ };
933
+ return document.addEventListener("keydown", n, !0), () => document.removeEventListener("keydown", n, !0);
934
+ }
935
+ function gt(e) {
936
+ return e !== null && e.matches("input, select, textarea, [contenteditable]");
937
+ }
938
+ function _t(e) {
939
+ return new Date(e.dataset.pikaYear, e.dataset.pikaMonth, e.dataset.pikaDay);
940
+ }
941
+ function vt(e, t) {
942
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t);
943
+ }
944
+ function yt() {
945
+ let e = /* @__PURE__ */ new Date();
946
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate());
947
+ }
948
+ function K(e, t) {
949
+ return e.querySelector(`${G}[data-pika-year="${t.getFullYear()}"][data-pika-month="${t.getMonth()}"][data-pika-day="${t.getDate()}"]`);
950
+ }
951
+ //#endregion
952
+ //#region src/components/PickDay.vue
953
+ var bt = {
771
954
  components: {
772
- PopoverPanel: V,
773
- Eraser: N
955
+ PopoverPanel: H,
956
+ CrossButton: N
774
957
  },
775
- mixins: [W],
958
+ mixins: [M],
776
959
  emits: ["update:modelValue", "changed"],
777
960
  props: {
778
961
  modelValue: {
@@ -789,7 +972,7 @@ var W = {
789
972
  }
790
973
  },
791
974
  created() {
792
- this.picker = null, this.isUnmounted = !1;
975
+ this.picker = null, this.isUnmounted = !1, this.stopPickOnClick = null, this.stopDayFocus = null;
793
976
  },
794
977
  async mounted() {
795
978
  let { default: e } = await import("pikaday");
@@ -799,8 +982,8 @@ var W = {
799
982
  keyboardInput: !1,
800
983
  bound: !1,
801
984
  firstDay: 1,
802
- parse: (e) => U(e),
803
- toString: (e) => H(e),
985
+ parse: (e) => W(e),
986
+ toString: (e) => U(e),
804
987
  i18n: {
805
988
  previousMonth: this.texts.previousMonth,
806
989
  nextMonth: this.texts.nextMonth,
@@ -809,12 +992,12 @@ var W = {
809
992
  weekdaysShort: this.texts.weekdaysShort
810
993
  },
811
994
  onSelect: (e) => {
812
- this.popupIsOpen = !1, this.$emit("update:modelValue", H(e)), this.$emit("changed");
995
+ this.popupIsOpen = !1, this.$emit("update:modelValue", U(e)), this.$emit("changed");
813
996
  }
814
- }));
997
+ }), this.stopPickOnClick = pt(this.$refs.container, () => this.$refs.trigger), this.syncDayFocus());
815
998
  },
816
999
  beforeUnmount() {
817
- this.isUnmounted = !0, this.picker?.destroy();
1000
+ this.isUnmounted = !0, this.stopPickOnClick?.(), this.stopDayFocus?.(), this.picker?.destroy();
818
1001
  },
819
1002
  data() {
820
1003
  return {
@@ -822,14 +1005,22 @@ var W = {
822
1005
  dayValue: this.modelValue ?? ""
823
1006
  };
824
1007
  },
825
- watch: { modelValue(e) {
826
- let t = e ?? "";
827
- this.dayValue = t, this.syncPicker(t);
828
- } },
1008
+ watch: {
1009
+ popupIsOpen() {
1010
+ this.syncDayFocus();
1011
+ },
1012
+ modelValue(e) {
1013
+ let t = e ?? "";
1014
+ this.dayValue = t, this.syncPicker(t);
1015
+ }
1016
+ },
829
1017
  methods: {
1018
+ syncDayFocus() {
1019
+ this.stopDayFocus?.(), this.stopDayFocus = null, this.popupIsOpen && this.picker !== null && (this.stopDayFocus = ht(this.$refs.container, this.picker));
1020
+ },
830
1021
  syncPicker(e) {
831
1022
  if (this.picker === null) return;
832
- let t = U(e);
1023
+ let t = W(e);
833
1024
  if (t === null) {
834
1025
  this.picker.clear();
835
1026
  return;
@@ -844,25 +1035,29 @@ var W = {
844
1035
  hasValue() {
845
1036
  return (this.modelValue ?? "").length > 0;
846
1037
  },
1038
+ triggerLabel() {
1039
+ return [this.placeholderText, this.dayValue].filter((e) => e !== "").join(" ");
1040
+ },
847
1041
  needsEraser() {
848
1042
  return !this.withEraser || this.popupIsOpen ? !1 : this.hasValue;
849
1043
  }
850
1044
  }
851
- }, $e = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, et = { class: "bb:relative bb:flex bb:h-full" }, tt = ["id", "popovertarget"], nt = { class: "bb:min-w-24 bb:w-full bb:h-full bb:pointer-events-none" }, rt = [
1045
+ }, xt = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, St = { class: "bb:relative bb:flex bb:h-full" }, Ct = ["id", "popovertarget"], wt = ["textContent"], Tt = { class: "bb:flex bb:w-full bb:items-center bb:leading-none bb:min-w-24 bb:pointer-events-none" }, Et = [
852
1046
  "disabled",
853
1047
  "value",
854
1048
  "placeholder"
855
- ], it = {
1049
+ ], Dt = {
856
1050
  ref: "container",
857
1051
  class: "bb:flex"
858
1052
  };
859
- function at(e, t, o, c, l, u) {
860
- let f = m("popover-panel"), p = m("eraser");
861
- return d(), i("div", $e, [a("div", et, [s(f, {
1053
+ function Ot(e, t, o, c, l, u) {
1054
+ let f = m("popover-panel"), p = m("cross-button");
1055
+ return d(), i("div", xt, [a("div", St, [s(f, {
862
1056
  class: "bb:flex bb:w-full",
863
1057
  modelValue: l.popupIsOpen,
864
1058
  "onUpdate:modelValue": t[0] ||= (e) => l.popupIsOpen = e,
865
1059
  align: "start",
1060
+ "return-focus": "",
866
1061
  "panel-class": "bb:bg-white bb:border bb:border-gray-200 bb:rounded-md bb:shadow-lg"
867
1062
  }, {
868
1063
  trigger: b((e) => [a("button", {
@@ -870,31 +1065,36 @@ function at(e, t, o, c, l, u) {
870
1065
  type: "button",
871
1066
  id: e.id,
872
1067
  popovertarget: e.popovertarget,
873
- class: "bb:flex bb:w-full bb:items-center bb:cursor-pointer bb:leading-none bb:focus:outline-hidden"
874
- }, [a("label", nt, [a("input", {
1068
+ class: "bb:absolute bb:inset-0 bb:cursor-pointer bb:focus:outline-hidden"
1069
+ }, [a("span", {
1070
+ class: "bb:sr-only bb:pointer-events-none bb:cursor-default",
1071
+ textContent: g(u.triggerLabel)
1072
+ }, null, 8, wt)], 8, Ct), a("label", Tt, [a("input", {
875
1073
  disabled: l.popupIsOpen,
876
1074
  ref: "field",
877
1075
  type: "text",
878
1076
  value: l.dayValue,
879
1077
  placeholder: o.placeholderText,
880
1078
  class: "bb:w-full bb:h-full bb:py-2 bb:pr-3 bb:leading-none bb:border bb:border-transparent bb:whitespace-nowrap bb:bg-transparent bb:placeholder:text-sm bb:placeholder-gray-300 bb:cursor-pointer bb:focus:outline-hidden"
881
- }, null, 8, rt)])], 8, tt)]),
882
- default: b(() => [a("div", it, null, 512)]),
1079
+ }, null, 8, Et)])]),
1080
+ default: b(() => [a("div", Dt, null, 512)]),
883
1081
  _: 1
884
1082
  }, 8, ["modelValue"]), u.needsEraser ? (d(), n(p, {
885
1083
  key: 0,
886
- onClick: u.clearPicker,
887
- class: "bb:z-10 bb:h-full bb:pr-2"
888
- }, null, 8, ["onClick"])) : r("", !0)])]);
1084
+ size: "small",
1085
+ onClicked: u.clearPicker,
1086
+ class: "bb:absolute bb:right-0 bb:top-0 bb:z-10 bb:h-full bb:pr-2",
1087
+ lang: e.resolvedLang
1088
+ }, null, 8, ["onClicked", "lang"])) : r("", !0)])]);
889
1089
  }
890
1090
  //#endregion
891
1091
  //#region src/components/SelectDateInterval.vue
892
- var ot = {
1092
+ var kt = {
893
1093
  components: {
894
- ElementHeader: M,
895
- PickDay: /* @__PURE__ */ j(Qe, [["render", at]])
1094
+ ElementHeader: j,
1095
+ PickDay: /* @__PURE__ */ A(bt, [["render", Ot]])
896
1096
  },
897
- mixins: [W],
1097
+ mixins: [M],
898
1098
  emits: [
899
1099
  "update:dateFrom",
900
1100
  "update:dateTo",
@@ -942,10 +1142,10 @@ var ot = {
942
1142
  this.$emit("update:dateTo", e), this.dateTo !== e && this.$emit("changed");
943
1143
  }
944
1144
  }
945
- }, st = { class: "bb-dashboard-ui bb:flex" }, ct = { class: "bb:flex bb:border bb:border-white" }, lt = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, ut = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
946
- function dt(e, t, n, r, o, c) {
1145
+ }, At = { class: "bb-dashboard-ui bb:flex" }, jt = { class: "bb:flex bb:border bb:border-white" }, Mt = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, Nt = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
1146
+ function Pt(e, t, n, r, o, c) {
947
1147
  let l = m("element-header"), u = m("pick-day");
948
- return d(), i("div", st, [a("div", ct, [a("div", lt, [s(l, {
1148
+ return d(), i("div", At, [a("div", jt, [a("div", Mt, [s(l, {
949
1149
  text: n.header,
950
1150
  "is-required": n.isRequired,
951
1151
  "is-loading": n.isLoading
@@ -953,7 +1153,7 @@ function dt(e, t, n, r, o, c) {
953
1153
  "text",
954
1154
  "is-required",
955
1155
  "is-loading"
956
- ]), a("div", ut, [s(u, {
1156
+ ]), a("div", Nt, [s(u, {
957
1157
  modelValue: o.userDateFrom,
958
1158
  "onUpdate:modelValue": t[0] ||= (e) => o.userDateFrom = e,
959
1159
  class: "bb:flex-1 bb:min-w-36 bb:pl-3",
@@ -975,10 +1175,10 @@ function dt(e, t, n, r, o, c) {
975
1175
  "lang"
976
1176
  ])])])])]);
977
1177
  }
978
- var ft = /*#__PURE__*/ j(ot, [["render", dt]]), pt = {
1178
+ var Ft = /*#__PURE__*/ A(kt, [["render", Pt]]), It = {
979
1179
  components: {
980
- PopoverPanel: V,
981
- Eraser: N
1180
+ PopoverPanel: H,
1181
+ CrossButton: N
982
1182
  },
983
1183
  emits: ["update:isOpen", "erased"],
984
1184
  props: {
@@ -1002,10 +1202,10 @@ var ft = /*#__PURE__*/ j(ot, [["render", dt]]), pt = {
1002
1202
  computed: { needsEraser() {
1003
1203
  return !this.isOpen && this.hasValue;
1004
1204
  } }
1005
- }, mt = { class: "bb:flex bb:flex-col bb:grow bb:bg-white" }, ht = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, gt = ["id", "popovertarget"], _t = ["textContent"];
1006
- function vt(e, t, o, c, l, u) {
1007
- let f = m("popover-panel"), h = m("eraser");
1008
- return d(), i("div", mt, [a("div", ht, [s(f, {
1205
+ }, Lt = { class: "bb:flex bb:flex-col bb:grow bb:bg-white" }, Rt = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, zt = ["id", "popovertarget"], Bt = ["textContent"];
1206
+ function Vt(e, t, o, c, l, u) {
1207
+ let f = m("popover-panel"), h = m("cross-button");
1208
+ return d(), i("div", Lt, [a("div", Rt, [s(f, {
1009
1209
  class: "bb:flex bb:w-full bb:h-full",
1010
1210
  "model-value": o.isOpen,
1011
1211
  align: "start",
@@ -1021,18 +1221,19 @@ function vt(e, t, o, c, l, u) {
1021
1221
  popovertarget: e.popovertarget,
1022
1222
  class: "bb:flex bb:w-full bb:h-full bb:items-center bb:focus:outline-hidden bb:cursor-pointer"
1023
1223
  }, [a("span", {
1024
- class: "bb:flex bb:w-full bb:h-full bb:pl-3 bb:pr-12 bb:py-2 bb:items-center bb:whitespace-nowrap bb:leading-none",
1224
+ class: "bb:flex bb:w-full bb:h-full bb:pl-3 bb:pr-12 bb:py-2 bb:items-center bb:whitespace-nowrap bb:leading-none bb:pointer-events-none bb:cursor-default",
1025
1225
  textContent: g(o.title)
1026
- }, null, 8, _t)], 8, gt)]),
1226
+ }, null, 8, Bt)], 8, zt)]),
1027
1227
  default: b(() => [p(e.$slots, "default")]),
1028
1228
  _: 3
1029
1229
  }, 8, ["model-value", "find-selected"]), u.needsEraser ? (d(), n(h, {
1030
1230
  key: 0,
1031
- onClick: t[1] ||= (t) => e.$emit("erased"),
1032
- class: "bb:pr-2 bb:h-full"
1231
+ size: "small",
1232
+ onClicked: t[1] ||= (t) => e.$emit("erased"),
1233
+ class: "bb:absolute bb:right-0 bb:top-0 bb:pr-2 bb:h-full"
1033
1234
  })) : r("", !0)])]);
1034
1235
  }
1035
- var yt = /*#__PURE__*/ j(pt, [["render", vt]]), bt = {
1236
+ var Ht = /*#__PURE__*/ A(It, [["render", Vt]]), Ut = {
1036
1237
  props: {
1037
1238
  isChecked: {
1038
1239
  type: Boolean,
@@ -1044,31 +1245,32 @@ var yt = /*#__PURE__*/ j(pt, [["render", vt]]), bt = {
1044
1245
  methods: { toggle() {
1045
1246
  this.$emit("clicked");
1046
1247
  } }
1047
- }, xt = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center" }, St = {
1248
+ }, Wt = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center bb:pointer-events-none bb:cursor-default" }, Gt = {
1048
1249
  class: "bb:w-5 bb:h-5 bb:fill-current bb:text-green-300",
1049
- viewBox: "0 0 20 20"
1050
- }, Ct = ["textContent"];
1051
- function wt(e, t, n, r, o, s) {
1250
+ viewBox: "0 0 20 20",
1251
+ "aria-hidden": "true"
1252
+ }, Kt = ["textContent"];
1253
+ function qt(e, t, n, r, o, s) {
1052
1254
  return d(), i("button", {
1053
1255
  type: "button",
1054
1256
  onClick: t[0] ||= S((...e) => s.toggle && s.toggle(...e), ["prevent"]),
1055
1257
  class: "bb:flex bb:w-full bb:bg-white bb:cursor-pointer bb:focus:outline-hidden bb:focus:bg-indigo-100"
1056
- }, [a("span", xt, [x((d(), i("svg", St, [...t[1] ||= [a("path", {
1258
+ }, [a("span", Wt, [x((d(), i("svg", Gt, [...t[1] ||= [a("path", {
1057
1259
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
1058
1260
  "clip-rule": "evenodd",
1059
1261
  "fill-rule": "evenodd"
1060
1262
  }, null, -1)]], 512)), [[y, n.isChecked]])]), a("span", {
1061
- class: "bb:flex bb:h-9 bb:justify-center bb:items-center bb:pr-6 bb:whitespace-nowrap bb:select-none",
1263
+ class: "bb:flex bb:h-9 bb:justify-center bb:items-center bb:pr-6 bb:whitespace-nowrap bb:select-none bb:pointer-events-none bb:cursor-default",
1062
1264
  textContent: g(n.name)
1063
- }, null, 8, Ct)]);
1265
+ }, null, 8, Kt)]);
1064
1266
  }
1065
1267
  //#endregion
1066
1268
  //#region src/components/SelectSingle.vue
1067
- var Tt = {
1269
+ var Jt = {
1068
1270
  components: {
1069
- ElementHeader: M,
1070
- DropdownButton: yt,
1071
- ListElement: /* @__PURE__ */ j(bt, [["render", wt]])
1271
+ ElementHeader: j,
1272
+ DropdownButton: Ht,
1273
+ ListElement: /* @__PURE__ */ A(Ut, [["render", qt]])
1072
1274
  },
1073
1275
  emits: ["update:modelValue", "changed"],
1074
1276
  props: {
@@ -1128,13 +1330,13 @@ var Tt = {
1128
1330
  return e === -1 ? null : this.$refs.list.querySelectorAll("button")[e];
1129
1331
  }
1130
1332
  }
1131
- }, Et = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Dt = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Ot = {
1333
+ }, Yt = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Xt = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Zt = {
1132
1334
  ref: "list",
1133
1335
  class: "bb:flex bb:flex-col bb:py-1 bb:divide-y bb:divide-gray-200 bb:divide-dashed"
1134
1336
  };
1135
- function kt(t, o, c, l, u, p) {
1337
+ function Qt(t, o, c, l, u, p) {
1136
1338
  let h = m("element-header"), g = m("list-element"), _ = m("dropdown-button");
1137
- return d(), i("div", Et, [a("div", Dt, [s(h, {
1339
+ return d(), i("div", Yt, [a("div", Xt, [s(h, {
1138
1340
  text: c.header,
1139
1341
  "is-required": c.isRequired,
1140
1342
  "is-loading": c.isLoading
@@ -1151,7 +1353,7 @@ function kt(t, o, c, l, u, p) {
1151
1353
  "find-selected": p.activeItemElement,
1152
1354
  onErased: p.clear
1153
1355
  }, {
1154
- default: b(() => [a("div", Ot, [(d(!0), i(e, null, f(p.itemList, (e) => (d(), n(g, {
1356
+ default: b(() => [a("div", Zt, [(d(!0), i(e, null, f(p.itemList, (e) => (d(), n(g, {
1155
1357
  name: e.name,
1156
1358
  key: e.id,
1157
1359
  "is-checked": e.id === c.modelValue,
@@ -1170,7 +1372,8 @@ function kt(t, o, c, l, u, p) {
1170
1372
  "onErased"
1171
1373
  ])) : r("", !0)])]);
1172
1374
  }
1173
- var At = /*#__PURE__*/ j(Tt, [["render", kt]]), jt = {
1375
+ var $t = /*#__PURE__*/ A(Jt, [["render", Qt]]), en = {
1376
+ mixins: [k],
1174
1377
  props: {
1175
1378
  text: {
1176
1379
  type: String,
@@ -1179,51 +1382,17 @@ var At = /*#__PURE__*/ j(Tt, [["render", kt]]), jt = {
1179
1382
  color: {
1180
1383
  type: String,
1181
1384
  required: !0,
1182
- validator: (e) => [
1183
- "green",
1184
- "indigo",
1185
- "gray",
1186
- "blue",
1187
- "red",
1188
- "yellow"
1189
- ].indexOf(e) !== -1
1190
- }
1191
- },
1192
- computed: {
1193
- isGreen() {
1194
- return this.color === "green";
1195
- },
1196
- isIndigo() {
1197
- return this.color === "indigo";
1198
- },
1199
- isGray() {
1200
- return this.color === "gray";
1201
- },
1202
- isBlue() {
1203
- return this.color === "blue";
1204
- },
1205
- isRed() {
1206
- return this.color === "red";
1207
- },
1208
- isYellow() {
1209
- return this.color === "yellow";
1385
+ validator: O
1210
1386
  }
1211
1387
  }
1212
- }, Mt = ["textContent"];
1213
- function Nt(e, t, n, r, a, o) {
1388
+ }, tn = ["textContent"];
1389
+ function nn(e, t, n, r, a, o) {
1214
1390
  return d(), i("span", {
1215
- class: u(["bb-dashboard-ui bb:inline-flex bb:items-center bb:px-3 bb:py-2 bb:rounded-full bb:text-xs bb:font-medium bb:leading-none bb:select-none bb:whitespace-nowrap", {
1216
- "bb:bg-green-50 bb:text-gray-700": o.isGreen,
1217
- "bb:bg-indigo-100 bb:text-gray-700": o.isIndigo,
1218
- "bb:bg-gray-200 bb:text-gray-700": o.isGray,
1219
- "bb:bg-blue-100 bb:text-blue-800": o.isBlue,
1220
- "bb:bg-red-100 bb:text-red-800": o.isRed,
1221
- "bb:bg-yellow-100 bb:text-yellow-800": o.isYellow
1222
- }]),
1391
+ class: u(["bb-dashboard-ui bb:inline-flex bb:items-center bb:px-3 bb:py-2 bb:rounded-full bb:text-xs bb:font-medium bb:leading-none bb:select-none bb:whitespace-nowrap", e.colorClass(n.color, "pill")]),
1223
1392
  textContent: g(n.text)
1224
- }, null, 10, Mt);
1393
+ }, null, 10, tn);
1225
1394
  }
1226
- var G = /*#__PURE__*/ j(jt, [["render", Nt]]), Pt = {
1395
+ var q = /*#__PURE__*/ A(en, [["render", nn]]), rn = {
1227
1396
  props: {
1228
1397
  messages: {
1229
1398
  type: [Object, Array],
@@ -1243,12 +1412,12 @@ var G = /*#__PURE__*/ j(jt, [["render", Nt]]), Pt = {
1243
1412
  return this.type === "dangerous";
1244
1413
  }
1245
1414
  }
1246
- }, Ft = { class: "bb:flex" }, It = { class: "bb:shrink-0" }, Lt = { class: "bb:ml-3" }, Rt = ["textContent"];
1247
- function zt(t, n, o, s, c, l) {
1415
+ }, an = { class: "bb:flex" }, on = { class: "bb:shrink-0" }, sn = { class: "bb:ml-3" }, cn = ["textContent"];
1416
+ function ln(t, n, o, s, c, l) {
1248
1417
  return l.hasErrors ? (d(), i("div", {
1249
1418
  key: 0,
1250
1419
  class: u(["bb-dashboard-ui bb:border-l-4 bb:p-4", l.isDangerous ? "bb:bg-red-50 bb:border-red-400" : "bb:bg-yellow-50 bb:border-yellow-400"])
1251
- }, [a("div", Ft, [a("div", It, [(d(), i("svg", {
1420
+ }, [a("div", an, [a("div", on, [(d(), i("svg", {
1252
1421
  class: u(["bb:h-5 bb:w-5", l.isDangerous ? "bb:text-red-400" : "bb:text-yellow-400"]),
1253
1422
  viewBox: "0 0 20 20",
1254
1423
  fill: "currentColor"
@@ -1256,55 +1425,146 @@ function zt(t, n, o, s, c, l) {
1256
1425
  "fill-rule": "evenodd",
1257
1426
  d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
1258
1427
  "clip-rule": "evenodd"
1259
- }, null, -1)]], 2))]), a("div", Lt, [(d(!0), i(e, null, f(o.messages, (e, t) => (d(), i("p", {
1428
+ }, null, -1)]], 2))]), a("div", sn, [(d(!0), i(e, null, f(o.messages, (e, t) => (d(), i("p", {
1260
1429
  class: u(["bb:text-sm bb:leading-5", l.isDangerous ? "bb:text-red-700" : "bb:text-yellow-700"]),
1261
1430
  key: t,
1262
1431
  textContent: g(e)
1263
- }, null, 10, Rt))), 128))])])], 2)) : r("", !0);
1432
+ }, null, 10, cn))), 128))])])], 2)) : r("", !0);
1264
1433
  }
1265
- var Bt = /*#__PURE__*/ j(Pt, [["render", zt]]), Vt = {}, Ht = {
1434
+ var un = /*#__PURE__*/ A(rn, [["render", ln]]), dn = {}, fn = {
1435
+ class: "bb:w-4 bb:h-4",
1436
+ fill: "none",
1437
+ stroke: "currentColor",
1438
+ "stroke-width": "2",
1439
+ "stroke-linecap": "round",
1440
+ viewBox: "0 0 24 24",
1441
+ xmlns: "http://www.w3.org/2000/svg",
1442
+ "aria-hidden": "true"
1443
+ };
1444
+ function pn(e, t, n, r, o, s) {
1445
+ return d(), i("svg", fn, [...t[0] ||= [
1446
+ a("circle", {
1447
+ cx: "12",
1448
+ cy: "12",
1449
+ r: "9"
1450
+ }, null, -1),
1451
+ a("line", {
1452
+ class: "bb:origin-center bb:animate-[spin_12s_linear_infinite] bb:motion-reduce:animate-none",
1453
+ x1: "12",
1454
+ y1: "12",
1455
+ x2: "15",
1456
+ y2: "12"
1457
+ }, null, -1),
1458
+ a("line", {
1459
+ class: "bb:origin-center bb:animate-spin bb:motion-reduce:animate-none",
1460
+ x1: "12",
1461
+ y1: "12",
1462
+ x2: "12",
1463
+ y2: "6.5"
1464
+ }, null, -1)
1465
+ ]]);
1466
+ }
1467
+ var mn = /*#__PURE__*/ A(dn, [["render", pn]]), hn = {}, gn = {
1266
1468
  class: "bb:w-4 bb:h-4",
1267
1469
  fill: "none",
1268
1470
  stroke: "currentColor",
1269
1471
  viewBox: "0 0 24 24",
1270
- xmlns: "http://www.w3.org/2000/svg"
1472
+ xmlns: "http://www.w3.org/2000/svg",
1473
+ "aria-hidden": "true"
1271
1474
  };
1272
- function Ut(e, t, n, r, o, s) {
1273
- return d(), i("svg", Ht, [...t[0] ||= [a("path", {
1475
+ function _n(e, t, n, r, o, s) {
1476
+ return d(), i("svg", gn, [...t[0] ||= [a("path", {
1274
1477
  "stroke-linecap": "round",
1275
1478
  "stroke-linejoin": "round",
1276
1479
  "stroke-width": "2",
1277
1480
  d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
1278
1481
  }, null, -1)]]);
1279
1482
  }
1280
- //#endregion
1281
- //#region src/components/DownloadLink.vue
1282
- var Wt = {
1283
- components: { "download-icon": /* @__PURE__ */ j(Vt, [["render", Ut]]) },
1284
- mixins: [W],
1483
+ var vn = /*#__PURE__*/ A(hn, [["render", _n]]), yn = {}, bn = {
1484
+ class: "bb:w-4 bb:h-4",
1485
+ fill: "none",
1486
+ stroke: "currentColor",
1487
+ viewBox: "0 0 24 24",
1488
+ xmlns: "http://www.w3.org/2000/svg",
1489
+ "aria-hidden": "true"
1490
+ };
1491
+ function xn(e, t, n, r, o, s) {
1492
+ return d(), i("svg", bn, [...t[0] ||= [a("path", {
1493
+ "stroke-linecap": "round",
1494
+ "stroke-linejoin": "round",
1495
+ "stroke-width": "2",
1496
+ d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
1497
+ }, null, -1)]]);
1498
+ }
1499
+ var Sn = /*#__PURE__*/ A(yn, [["render", xn]]), Cn = ["download", "refresh"], wn = {
1500
+ components: {
1501
+ "clock-icon": mn,
1502
+ "download-icon": vn,
1503
+ "refresh-icon": Sn
1504
+ },
1505
+ mixins: [k],
1506
+ emits: ["click"],
1285
1507
  props: {
1286
- url: {
1508
+ title: {
1287
1509
  type: String,
1288
1510
  required: !0
1289
1511
  },
1290
- title: {
1512
+ icon: {
1513
+ type: String,
1514
+ required: !0,
1515
+ validator: (e) => Cn.includes(e)
1516
+ },
1517
+ color: {
1518
+ type: String,
1519
+ default: "purple",
1520
+ validator: O
1521
+ },
1522
+ isLoading: {
1523
+ type: Boolean,
1524
+ default: !1
1525
+ },
1526
+ loadingText: {
1291
1527
  type: String,
1292
1528
  default: null
1293
1529
  }
1294
1530
  },
1295
1531
  computed: { label() {
1296
- return this.title ?? this.texts.download;
1532
+ let e = this.isLoading && typeof this.loadingText == "string" && this.loadingText !== "" ? this.loadingText : this.title;
1533
+ return typeof e == "string" ? e : "";
1297
1534
  } }
1298
- }, Gt = ["href", "title"], Kt = { class: "bb:ml-1" };
1299
- function qt(e, t, n, r, o, c) {
1300
- let l = m("download-icon");
1301
- return d(), i("a", {
1302
- href: n.url,
1303
- title: c.label,
1304
- class: "bb-dashboard-ui bb:inline-flex bb:items-center bb:px-3 bb:py-1.5 bb:rounded-full bb:text-xs bb:font-medium bb:leading-none bb:select-none bb:bg-purple-100 bb:text-purple-800 bb:hover:text-purple-600"
1305
- }, [s(l), a("span", Kt, g(c.label), 1)], 8, Gt);
1306
- }
1307
- var Jt = /*#__PURE__*/ j(Wt, [["render", qt]]), Yt = { props: {
1535
+ }, Tn = [
1536
+ "title",
1537
+ "disabled",
1538
+ "aria-busy"
1539
+ ], En = ["textContent"];
1540
+ function Dn(e, t, o, s, c, l) {
1541
+ let f = m("clock-icon"), p = m("download-icon"), h = m("refresh-icon");
1542
+ return d(), i("button", {
1543
+ type: "button",
1544
+ class: u(["bb-dashboard-ui bb:inline-flex bb:items-center bb:px-3 bb:py-1.5 bb:rounded-full bb:text-xs bb:font-medium bb:leading-none bb:select-none bb:whitespace-nowrap", [
1545
+ e.colorClass(o.color, "pill"),
1546
+ o.isLoading ? "bb:opacity-60 bb:cursor-not-allowed" : "bb:cursor-pointer",
1547
+ o.isLoading ? "" : e.colorClass(o.color, "pillHover")
1548
+ ]]),
1549
+ title: l.label,
1550
+ disabled: o.isLoading,
1551
+ "aria-busy": o.isLoading ? "true" : null,
1552
+ onClick: t[0] ||= (t) => e.$emit("click")
1553
+ }, [o.isLoading ? (d(), n(f, {
1554
+ key: 0,
1555
+ class: "bb:pointer-events-none bb:cursor-default"
1556
+ })) : o.icon === "download" ? (d(), n(p, {
1557
+ key: 1,
1558
+ class: "bb:pointer-events-none bb:cursor-default"
1559
+ })) : o.icon === "refresh" ? (d(), n(h, {
1560
+ key: 2,
1561
+ class: "bb:pointer-events-none bb:cursor-default"
1562
+ })) : r("", !0), a("span", {
1563
+ class: "bb:ml-1 bb:pointer-events-none bb:cursor-default",
1564
+ textContent: g(l.label)
1565
+ }, null, 8, En)], 10, Tn);
1566
+ }
1567
+ var On = /*#__PURE__*/ A(wn, [["render", Dn]]), kn = { props: {
1308
1568
  isOpen: {
1309
1569
  type: Boolean,
1310
1570
  default: !1
@@ -1313,9 +1573,9 @@ var Jt = /*#__PURE__*/ j(Wt, [["render", qt]]), Yt = { props: {
1313
1573
  type: String,
1314
1574
  required: !0
1315
1575
  }
1316
- } }, Xt = { class: "bb:flex bb:items-end bb:justify-center bb:min-h-screen bb:pt-4 bb:px-4 bb:pb-20 bb:text-center bb:sm:block bb:sm:p-0" }, Zt = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, Qt = ["aria-labelledby"];
1317
- function $t(e, n, r, o, c, l) {
1318
- return d(), i("div", { class: u(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div", Xt, [
1576
+ } }, An = { class: "bb:flex bb:items-end bb:justify-center bb:min-h-screen bb:pt-4 bb:px-4 bb:pb-20 bb:text-center bb:sm:block bb:sm:p-0" }, jn = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, Mn = ["aria-labelledby"];
1577
+ function Nn(e, n, r, o, c, l) {
1578
+ return d(), i("div", { class: u(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div", An, [
1319
1579
  s(t, {
1320
1580
  "enter-active-class": "bb:ease-out bb:duration-300",
1321
1581
  "enter-from-class": "bb:opacity-0",
@@ -1324,7 +1584,7 @@ function $t(e, n, r, o, c, l) {
1324
1584
  "leave-from-class": "bb:opacity-100",
1325
1585
  "leave-to-class": "bb:opacity-0"
1326
1586
  }, {
1327
- default: b(() => [x(a("div", Zt, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[y, r.isOpen]])]),
1587
+ default: b(() => [x(a("div", jn, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[y, r.isOpen]])]),
1328
1588
  _: 1
1329
1589
  }),
1330
1590
  n[1] ||= a("span", { class: "bb:hidden bb:sm:inline-block bb:sm:align-middle bb:sm:h-screen" }, null, -1),
@@ -1341,12 +1601,12 @@ function $t(e, n, r, o, c, l) {
1341
1601
  role: "dialog",
1342
1602
  "aria-modal": "true",
1343
1603
  "aria-labelledby": r.headingId
1344
- }, [p(e.$slots, "default")], 8, Qt), [[y, r.isOpen]])]),
1604
+ }, [p(e.$slots, "default")], 8, Mn), [[y, r.isOpen]])]),
1345
1605
  _: 3
1346
1606
  })
1347
1607
  ])], 2);
1348
1608
  }
1349
- var en = /*#__PURE__*/ j(Yt, [["render", $t]]), tn = {}, nn = {
1609
+ var Pn = /*#__PURE__*/ A(kn, [["render", Nn]]), Fn = {}, In = {
1350
1610
  class: "bb:h-7 bb:w-7 bb:text-red-600",
1351
1611
  xmlns: "http://www.w3.org/2000/svg",
1352
1612
  fill: "none",
@@ -1354,35 +1614,35 @@ var en = /*#__PURE__*/ j(Yt, [["render", $t]]), tn = {}, nn = {
1354
1614
  stroke: "currentColor",
1355
1615
  "aria-hidden": "true"
1356
1616
  };
1357
- function rn(e, t, n, r, o, s) {
1358
- return d(), i("svg", nn, [...t[0] ||= [a("path", {
1617
+ function Ln(e, t, n, r, o, s) {
1618
+ return d(), i("svg", In, [...t[0] ||= [a("path", {
1359
1619
  "stroke-linecap": "round",
1360
1620
  "stroke-linejoin": "round",
1361
1621
  "stroke-width": "2",
1362
1622
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
1363
1623
  }, null, -1)]]);
1364
1624
  }
1365
- var K = /*#__PURE__*/ j(tn, [["render", rn]]), an = {}, on = {
1625
+ var J = /*#__PURE__*/ A(Fn, [["render", Ln]]), Rn = {}, zn = {
1366
1626
  class: "bb:h-7 bb:w-7 bb:text-yellow-400",
1367
1627
  xmlns: "http://www.w3.org/2000/svg",
1368
1628
  viewBox: "0 0 20 20",
1369
1629
  fill: "currentColor",
1370
1630
  "aria-hidden": "true"
1371
1631
  };
1372
- function sn(e, t, n, r, o, s) {
1373
- return d(), i("svg", on, [...t[0] ||= [a("path", {
1632
+ function Bn(e, t, n, r, o, s) {
1633
+ return d(), i("svg", zn, [...t[0] ||= [a("path", {
1374
1634
  "fill-rule": "evenodd",
1375
1635
  d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
1376
1636
  "clip-rule": "evenodd"
1377
1637
  }, null, -1)]]);
1378
1638
  }
1379
- var q = /*#__PURE__*/ j(an, [["render", sn]]), cn = {
1639
+ var Y = /*#__PURE__*/ A(Rn, [["render", Bn]]), Vn = {
1380
1640
  components: {
1381
- Modal: en,
1382
- Dangerous: K,
1383
- Warning: q
1641
+ Modal: Pn,
1642
+ Dangerous: J,
1643
+ Warning: Y
1384
1644
  },
1385
- mixins: [W],
1645
+ mixins: [M],
1386
1646
  emits: ["actionConfirmed", "actionCanceled"],
1387
1647
  props: {
1388
1648
  isOpen: {
@@ -1422,20 +1682,20 @@ var q = /*#__PURE__*/ j(an, [["render", sn]]), cn = {
1422
1682
  return this.type === "warning";
1423
1683
  }
1424
1684
  }
1425
- }, ln = { class: "bb:flex bb:bg-white bb:rounded-t-lg bb:px-4 bb:pt-5 bb:pb-4 bb:sm:p-6 bb:sm:pb-4" }, un = { class: "bb:sm:flex bb:sm:items-start" }, dn = { class: "bb:mt-3 bb:text-center bb:sm:mt-0 bb:sm:ml-4 bb:sm:text-left" }, fn = ["id"], pn = { class: "bb:mt-2" }, mn = { class: "bb:text-sm bb:text-gray-500" }, hn = { class: "bb:bg-gray-50 bb:rounded-b-lg bb:px-4 bb:py-3 bb:sm:px-6 bb:sm:flex bb:sm:flex-row-reverse" };
1426
- function gn(e, t, i, o, s, c) {
1685
+ }, Hn = { class: "bb:flex bb:bg-white bb:rounded-t-lg bb:px-4 bb:pt-5 bb:pb-4 bb:sm:p-6 bb:sm:pb-4" }, Un = { class: "bb:sm:flex bb:sm:items-start" }, Wn = { class: "bb:mt-3 bb:text-center bb:sm:mt-0 bb:sm:ml-4 bb:sm:text-left" }, Gn = ["id"], Kn = { class: "bb:mt-2" }, qn = { class: "bb:text-sm bb:text-gray-500" }, Jn = { class: "bb:bg-gray-50 bb:rounded-b-lg bb:px-4 bb:py-3 bb:sm:px-6 bb:sm:flex bb:sm:flex-row-reverse" };
1686
+ function Yn(e, t, i, o, s, c) {
1427
1687
  let l = m("warning"), f = m("dangerous"), p = m("modal");
1428
1688
  return d(), n(p, {
1429
1689
  "is-open": i.isOpen,
1430
1690
  "heading-id": o.headingId
1431
1691
  }, {
1432
- default: b(() => [a("div", ln, [a("div", un, [a("div", { class: u(["bb:mx-auto bb:shrink-0 bb:flex bb:items-center bb:justify-center bb:h-12 bb:w-12 bb:rounded-full bb:sm:mx-0 bb:sm:h-10 bb:sm:w-10", {
1692
+ default: b(() => [a("div", Hn, [a("div", Un, [a("div", { class: u(["bb:mx-auto bb:shrink-0 bb:flex bb:items-center bb:justify-center bb:h-12 bb:w-12 bb:rounded-full bb:sm:mx-0 bb:sm:h-10 bb:sm:w-10", {
1433
1693
  "bb:bg-red-100": c.isDangerous,
1434
1694
  "bb:bg-yellow-100": c.isWarning
1435
- }]) }, [c.isWarning ? (d(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (d(), n(f, { key: 1 })) : r("", !0)], 2), a("div", dn, [a("h3", {
1695
+ }]) }, [c.isWarning ? (d(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (d(), n(f, { key: 1 })) : r("", !0)], 2), a("div", Wn, [a("h3", {
1436
1696
  class: "bb:text-lg bb:leading-6 bb:font-medium bb:text-gray-900",
1437
1697
  id: o.headingId
1438
- }, g(i.confirmationHeading), 9, fn), a("div", pn, [a("p", mn, g(i.confirmationText), 1)])])])]), a("div", hn, [a("button", {
1698
+ }, g(i.confirmationHeading), 9, Gn), a("div", Kn, [a("p", qn, g(i.confirmationText), 1)])])])]), a("div", Jn, [a("button", {
1439
1699
  type: "button",
1440
1700
  class: u(["bb:w-full bb:inline-flex bb:justify-center bb:rounded-md bb:border bb:border-transparent bb:shadow-xs bb:px-4 bb:py-2 bb:text-base bb:font-medium bb:text-white bb:focus:outline-hidden bb:focus:ring-2 bb:focus:ring-offset-2 bb:sm:ml-3 bb:sm:w-auto bb:sm:text-sm", {
1441
1701
  "bb:bg-red-600 bb:hover:bg-red-700 bb:focus:ring-red-500": c.isDangerous,
@@ -1450,50 +1710,38 @@ function gn(e, t, i, o, s, c) {
1450
1710
  _: 1
1451
1711
  }, 8, ["is-open", "heading-id"]);
1452
1712
  }
1453
- var _n = /*#__PURE__*/ j(cn, [["render", gn]]), J = ["yellow", "red"];
1454
- function Y(e) {
1455
- if (typeof e != "object" || !e || typeof e.label != "string" || e.label === "" || e.color !== void 0 && !J.includes(e.color) || e.danger !== void 0) return !1;
1713
+ var Xn = /*#__PURE__*/ A(Vn, [["render", Yn]]);
1714
+ //#endregion
1715
+ //#region src/menuItems.js
1716
+ function Zn(e) {
1717
+ if (typeof e != "object" || !e || typeof e.label != "string" || e.label === "" || e.color !== void 0 && !O(e.color)) return !1;
1456
1718
  let t = typeof e.href == "string" && e.href !== "" && e.onSelect === void 0, n = typeof e.onSelect == "function" && e.href === void 0;
1457
1719
  return t || n;
1458
1720
  }
1459
- function X(e) {
1721
+ function Qn(e) {
1460
1722
  return Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e) : [];
1461
1723
  }
1462
- function Z(e) {
1724
+ function $n(e) {
1463
1725
  return typeof e.href == "string" && e.href !== "";
1464
1726
  }
1465
- function Q(e) {
1466
- return e.danger === void 0 && J.includes(e.color) ? e.color : null;
1467
- }
1468
- function vn(e) {
1469
- return {
1470
- data() {
1471
- return { dangerWarned: !1 };
1472
- },
1473
- watch: { actions: {
1474
- immediate: !0,
1475
- deep: !0,
1476
- handler(t) {
1477
- process.env.NODE_ENV === "production" || this.dangerWarned || X(t).some((e) => e.danger !== void 0) && (this.dangerWarned = !0, console.warn(`[dashboard-ui-components] ${e}: поле danger убрано, красный пункт — color: 'red'`));
1478
- }
1479
- } }
1480
- };
1727
+ function er(e) {
1728
+ return O(e.color) ? e.color : null;
1481
1729
  }
1482
1730
  //#endregion
1483
1731
  //#region src/navigation.js
1484
- function yn(e) {
1732
+ function tr(e) {
1485
1733
  let t = e.currentTarget?.target ?? "";
1486
1734
  return !(e.defaultPrevented || e.target?.isContentEditable === !0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || t !== "" && t !== "_self" || e.button !== 0);
1487
1735
  }
1488
- var $ = {
1489
- inject: A,
1736
+ var X = {
1737
+ inject: ge,
1490
1738
  methods: { followLink(e, t) {
1491
1739
  let n = this.uiSettings.navigate;
1492
- n !== null && yn(e) && (e.preventDefault(), n(t));
1740
+ n !== null && tr(e) && (e.preventDefault(), n(t));
1493
1741
  } }
1494
- }, bn = {
1495
- components: { PopoverPanel: V },
1496
- mixins: [$],
1742
+ }, nr = {
1743
+ components: { PopoverPanel: H },
1744
+ mixins: [X, k],
1497
1745
  emits: ["update:modelValue"],
1498
1746
  props: {
1499
1747
  actions: { default: () => [] },
@@ -1504,7 +1752,7 @@ var $ = {
1504
1752
  },
1505
1753
  computed: {
1506
1754
  actionItems() {
1507
- return X(this.actions);
1755
+ return Qn(this.actions);
1508
1756
  },
1509
1757
  hasActions() {
1510
1758
  return this.actionItems.length > 0;
@@ -1512,21 +1760,21 @@ var $ = {
1512
1760
  },
1513
1761
  methods: {
1514
1762
  color(e) {
1515
- return Q(e);
1763
+ return er(e);
1516
1764
  },
1517
1765
  isLink(e) {
1518
- return Z(e);
1766
+ return $n(e);
1519
1767
  },
1520
1768
  select(e) {
1521
1769
  if (typeof e.onSelect == "function") return e.onSelect();
1522
1770
  }
1523
1771
  }
1524
- }, xn = [
1772
+ }, rr = [
1525
1773
  "href",
1526
1774
  "onClick",
1527
1775
  "textContent"
1528
- ], Sn = ["onClick", "textContent"];
1529
- function Cn(t, r, a, o, s, c) {
1776
+ ], ir = ["onClick", "textContent"];
1777
+ function ar(t, r, a, o, s, c) {
1530
1778
  let l = m("popover-panel");
1531
1779
  return d(), n(l, {
1532
1780
  "model-value": a.modelValue,
@@ -1547,41 +1795,33 @@ function Cn(t, r, a, o, s, c) {
1547
1795
  key: 0,
1548
1796
  href: n.href,
1549
1797
  role: "menuitem",
1550
- class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", {
1551
- "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900": c.color(n) === null,
1552
- "bb:text-yellow-800 bb:focus:bg-yellow-100": c.color(n) === "yellow",
1553
- "bb:text-red-700 bb:focus:bg-red-50": c.color(n) === "red"
1554
- }]),
1798
+ class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", c.color(n) === null ? "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900" : t.colorClass(c.color(n), "menuItem")]),
1555
1799
  onClick: (e) => t.followLink(e, n.href),
1556
1800
  textContent: g(n.label)
1557
- }, null, 10, xn)) : (d(), i("button", {
1801
+ }, null, 10, rr)) : (d(), i("button", {
1558
1802
  key: 1,
1559
1803
  type: "button",
1560
1804
  role: "menuitem",
1561
- class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", {
1562
- "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900": c.color(n) === null,
1563
- "bb:text-yellow-800 bb:focus:bg-yellow-100": c.color(n) === "yellow",
1564
- "bb:text-red-700 bb:focus:bg-red-50": c.color(n) === "red"
1565
- }]),
1805
+ class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", c.color(n) === null ? "bb:text-gray-700 bb:focus:bg-gray-100 bb:focus:text-gray-900" : t.colorClass(c.color(n), "menuItem")]),
1566
1806
  onClick: (e) => c.select(n),
1567
1807
  textContent: g(n.label)
1568
- }, null, 10, Sn))], 64))), 128))]),
1808
+ }, null, 10, ir))], 64))), 128))]),
1569
1809
  _: 3
1570
1810
  }, 8, ["model-value", "has-content"]);
1571
1811
  }
1572
- var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
1573
- components: { PopoverMenu: wn },
1812
+ var or = /*#__PURE__*/ A(nr, [["render", ar]]), sr = {
1813
+ components: { PopoverMenu: or },
1574
1814
  mixins: [
1575
- W,
1576
- $,
1577
- vn("DropdownButtonWithAction")
1815
+ M,
1816
+ X,
1817
+ k
1578
1818
  ],
1579
1819
  emits: ["update:modelValue"],
1580
1820
  props: {
1581
1821
  actions: {
1582
1822
  type: Array,
1583
1823
  default: () => [],
1584
- validator: (e) => e.every(Y)
1824
+ validator: (e) => e.every(Zn)
1585
1825
  },
1586
1826
  modelValue: {
1587
1827
  type: Boolean,
@@ -1593,7 +1833,7 @@ var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
1593
1833
  },
1594
1834
  computed: {
1595
1835
  items() {
1596
- return X(this.actions);
1836
+ return Qn(this.actions);
1597
1837
  },
1598
1838
  hasActions() {
1599
1839
  return this.items.length > 0;
@@ -1602,7 +1842,7 @@ var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
1602
1842
  return this.items[0];
1603
1843
  },
1604
1844
  mainColor() {
1605
- return this.hasActions ? Q(this.mainAction) : null;
1845
+ return this.hasActions ? er(this.mainAction) : null;
1606
1846
  },
1607
1847
  menuActions() {
1608
1848
  return this.items.slice(1);
@@ -1622,12 +1862,9 @@ var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
1622
1862
  }
1623
1863
  }
1624
1864
  },
1625
- created() {
1626
- process.env.NODE_ENV !== "production" && this.$slots.actions && console.warn("[dashboard-ui-components] DropdownButtonWithAction: слот actions убран, пункты меню передаются пропом actions"), process.env.NODE_ENV !== "production" && this.$slots.button && console.warn("[dashboard-ui-components] DropdownButtonWithAction: слот button убран, основная кнопка — первый пункт actions");
1627
- },
1628
1865
  methods: {
1629
1866
  isLink(e) {
1630
- return Z(e);
1867
+ return $n(e);
1631
1868
  },
1632
1869
  select(e) {
1633
1870
  if (typeof e.onSelect == "function") return e.onSelect();
@@ -1636,37 +1873,31 @@ var wn = /*#__PURE__*/ j(bn, [["render", Cn]]), Tn = {
1636
1873
  this.menuIsOpen = e, this.$emit("update:modelValue", e);
1637
1874
  }
1638
1875
  }
1639
- }, En = {
1876
+ }, cr = {
1640
1877
  key: 0,
1641
1878
  class: "bb-dashboard-ui bb:relative bb:inline-flex bb:shadow-xs bb:rounded-md"
1642
- }, Dn = ["href", "textContent"], On = ["textContent"], kn = ["id", "popovertarget"], An = { class: "bb:sr-only" };
1643
- function jn(e, t, n, o, c, l) {
1879
+ }, lr = ["href", "textContent"], ur = ["textContent"], dr = ["id", "popovertarget"], fr = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
1880
+ function pr(e, t, n, o, c, l) {
1644
1881
  let f = m("popover-menu");
1645
- return l.hasActions ? (d(), i("span", En, [l.isLink(l.mainAction) ? (d(), i("a", {
1882
+ return l.hasActions ? (d(), i("span", cr, [l.isLink(l.mainAction) ? (d(), i("a", {
1646
1883
  key: 0,
1647
1884
  href: l.mainAction.href,
1648
- class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", {
1885
+ class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", [{
1649
1886
  "bb:rounded-l-md": l.hasMenu,
1650
- "bb:rounded-md": !l.hasMenu,
1651
- "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50": l.mainColor === null,
1652
- "bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200": l.mainColor === "yellow",
1653
- "bb:bg-red-50 bb:border-red-300 bb:text-red-700 bb:hover:bg-red-100": l.mainColor === "red"
1654
- }]),
1887
+ "bb:rounded-md": !l.hasMenu
1888
+ }, l.mainColor === null ? "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50" : e.colorClass(l.mainColor, "button")]]),
1655
1889
  onClick: t[0] ||= (t) => e.followLink(t, l.mainAction.href),
1656
1890
  textContent: g(l.mainAction.label)
1657
- }, null, 10, Dn)) : (d(), i("button", {
1891
+ }, null, 10, lr)) : (d(), i("button", {
1658
1892
  key: 1,
1659
1893
  type: "button",
1660
- class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", {
1894
+ class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", [{
1661
1895
  "bb:rounded-l-md": l.hasMenu,
1662
- "bb:rounded-md": !l.hasMenu,
1663
- "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50": l.mainColor === null,
1664
- "bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200": l.mainColor === "yellow",
1665
- "bb:bg-red-50 bb:border-red-300 bb:text-red-700 bb:hover:bg-red-100": l.mainColor === "red"
1666
- }]),
1896
+ "bb:rounded-md": !l.hasMenu
1897
+ }, l.mainColor === null ? "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50" : e.colorClass(l.mainColor, "button")]]),
1667
1898
  onClick: t[1] ||= (e) => l.select(l.mainAction),
1668
1899
  textContent: g(l.mainAction.label)
1669
- }, null, 10, On)), s(f, {
1900
+ }, null, 10, ur)), s(f, {
1670
1901
  class: "bb:-ml-px bb:flex",
1671
1902
  actions: l.menuActions,
1672
1903
  "model-value": n.modelValue,
@@ -1676,13 +1907,9 @@ function jn(e, t, n, o, c, l) {
1676
1907
  type: "button",
1677
1908
  id: n.id,
1678
1909
  popovertarget: n.popovertarget,
1679
- class: u(["bb:relative bb:inline-flex bb:items-center bb:px-2 bb:py-2 bb:rounded-r-md bb:border bb:text-sm bb:font-medium bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", {
1680
- "bb:bg-white bb:border-gray-300 bb:text-gray-500 bb:hover:bg-gray-50": l.mainColor === null,
1681
- "bb:bg-yellow-100 bb:border-yellow-300 bb:text-yellow-800 bb:hover:bg-yellow-200": l.mainColor === "yellow",
1682
- "bb:bg-red-50 bb:border-red-300 bb:text-red-700 bb:hover:bg-red-100": l.mainColor === "red"
1683
- }])
1684
- }, [a("span", An, g(e.texts.openMenu), 1), t[2] ||= a("svg", {
1685
- class: "bb:h-5 bb:w-5",
1910
+ class: u(["bb:relative bb:inline-flex bb:items-center bb:px-2 bb:py-2 bb:rounded-r-md bb:border bb:text-sm bb:font-medium bb:focus:z-10 bb:focus:outline-hidden bb:focus:ring-1 bb:focus:ring-indigo-500 bb:focus:border-indigo-500", l.mainColor === null ? "bb:bg-white bb:border-gray-300 bb:text-gray-500 bb:hover:bg-gray-50" : e.colorClass(l.mainColor, "button")])
1911
+ }, [a("span", fr, g(e.texts.openMenu), 1), t[2] ||= a("svg", {
1912
+ class: "bb:h-5 bb:w-5 bb:pointer-events-none bb:cursor-default",
1686
1913
  xmlns: "http://www.w3.org/2000/svg",
1687
1914
  viewBox: "0 0 20 20",
1688
1915
  fill: "currentColor",
@@ -1691,7 +1918,7 @@ function jn(e, t, n, o, c, l) {
1691
1918
  "fill-rule": "evenodd",
1692
1919
  d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
1693
1920
  "clip-rule": "evenodd"
1694
- })], -1)], 10, kn)]),
1921
+ })], -1)], 10, dr)]),
1695
1922
  _: 1
1696
1923
  }, 8, [
1697
1924
  "actions",
@@ -1699,16 +1926,16 @@ function jn(e, t, n, o, c, l) {
1699
1926
  "onUpdate:modelValue"
1700
1927
  ])])) : r("", !0);
1701
1928
  }
1702
- var Mn = /*#__PURE__*/ j(Tn, [["render", jn]]), Nn = {
1703
- components: { PopoverMenu: wn },
1704
- mixins: [W, vn("HamburgerMenu")],
1929
+ var mr = /*#__PURE__*/ A(sr, [["render", pr]]), hr = {
1930
+ components: { PopoverMenu: or },
1931
+ mixins: [M],
1705
1932
  props: { actions: {
1706
1933
  type: Array,
1707
1934
  default: () => [],
1708
- validator: (e) => e.every(Y)
1935
+ validator: (e) => e.every(Zn)
1709
1936
  } }
1710
- }, Pn = ["id", "popovertarget"], Fn = { class: "bb:sr-only" };
1711
- function In(e, t, r, i, o, s) {
1937
+ }, gr = ["id", "popovertarget"], _r = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
1938
+ function vr(e, t, r, i, o, s) {
1712
1939
  let c = m("popover-menu");
1713
1940
  return d(), n(c, {
1714
1941
  class: "bb-dashboard-ui bb:inline-flex",
@@ -1719,8 +1946,8 @@ function In(e, t, r, i, o, s) {
1719
1946
  id: n.id,
1720
1947
  popovertarget: n.popovertarget,
1721
1948
  class: "bb:relative bb:inline-flex bb:items-center bb:justify-center bb:p-2 bb:rounded-md bb:text-gray-400 bb:hover:text-gray-500 bb:hover:bg-gray-100 bb:focus:outline-hidden bb:focus:bg-gray-100 bb:focus:text-gray-500 bb:transition bb:duration-150 bb:ease-in-out"
1722
- }, [a("span", Fn, g(e.texts.openMenu), 1), t[0] ||= a("svg", {
1723
- class: "bb:h-6 bb:w-6",
1949
+ }, [a("span", _r, g(e.texts.openMenu), 1), t[0] ||= a("svg", {
1950
+ class: "bb:h-6 bb:w-6 bb:pointer-events-none bb:cursor-default",
1724
1951
  fill: "none",
1725
1952
  viewBox: "0 0 24 24",
1726
1953
  stroke: "currentColor",
@@ -1730,48 +1957,48 @@ function In(e, t, r, i, o, s) {
1730
1957
  "stroke-linejoin": "round",
1731
1958
  "stroke-width": "2",
1732
1959
  d: "M4 6h16M4 12h16M4 18h16"
1733
- })], -1)], 8, Pn)]),
1960
+ })], -1)], 8, gr)]),
1734
1961
  _: 1
1735
1962
  }, 8, ["actions"]);
1736
1963
  }
1737
- var Ln = /*#__PURE__*/ j(Nn, [["render", In]]), Rn = {}, zn = {
1964
+ var yr = /*#__PURE__*/ A(hr, [["render", vr]]), br = {}, xr = {
1738
1965
  xmlns: "http://www.w3.org/2000/svg",
1739
1966
  viewBox: "0 0 20 20",
1740
1967
  fill: "currentColor",
1741
1968
  "aria-hidden": "true"
1742
1969
  };
1743
- function Bn(e, t, n, r, o, s) {
1744
- return d(), i("svg", zn, [...t[0] ||= [a("path", {
1970
+ function Sr(e, t, n, r, o, s) {
1971
+ return d(), i("svg", xr, [...t[0] ||= [a("path", {
1745
1972
  "fill-rule": "evenodd",
1746
1973
  "clip-rule": "evenodd",
1747
1974
  d: "M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z"
1748
1975
  }, null, -1)]]);
1749
1976
  }
1750
- var Vn = /*#__PURE__*/ j(Rn, [["render", Bn]]), Hn = {}, Un = {
1977
+ var Cr = /*#__PURE__*/ A(br, [["render", Sr]]), wr = {}, Tr = {
1751
1978
  xmlns: "http://www.w3.org/2000/svg",
1752
1979
  viewBox: "0 0 20 20",
1753
1980
  fill: "currentColor",
1754
1981
  "aria-hidden": "true"
1755
1982
  };
1756
- function Wn(e, t, n, r, o, s) {
1757
- return d(), i("svg", Un, [...t[0] ||= [a("path", {
1983
+ function Er(e, t, n, r, o, s) {
1984
+ return d(), i("svg", Tr, [...t[0] ||= [a("path", {
1758
1985
  "fill-rule": "evenodd",
1759
1986
  "clip-rule": "evenodd",
1760
1987
  d: "M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
1761
1988
  }, null, -1)]]);
1762
1989
  }
1763
- var Gn = /*#__PURE__*/ j(Hn, [["render", Wn]]);
1990
+ var Dr = /*#__PURE__*/ A(wr, [["render", Er]]);
1764
1991
  //#endregion
1765
1992
  //#region src/components/Pagination.vue
1766
- function Kn(e) {
1993
+ function Or(e) {
1767
1994
  return typeof e == "string" && e !== "" ? e : null;
1768
1995
  }
1769
- var qn = {
1996
+ var kr = {
1770
1997
  components: {
1771
- ArrowNarrowLeft: Vn,
1772
- ArrowNarrowRight: Gn
1998
+ ArrowNarrowLeft: Cr,
1999
+ ArrowNarrowRight: Dr
1773
2000
  },
1774
- mixins: [W, $],
2001
+ mixins: [M, X],
1775
2002
  props: {
1776
2003
  links: {
1777
2004
  type: Object,
@@ -1799,49 +2026,49 @@ var qn = {
1799
2026
  return typeof this.from == "number" && typeof this.to == "number";
1800
2027
  },
1801
2028
  previousPageUrl() {
1802
- return Kn(this.links?.prev);
2029
+ return Or(this.links?.prev);
1803
2030
  },
1804
2031
  nextPageUrl() {
1805
- return Kn(this.links?.next);
2032
+ return Or(this.links?.next);
1806
2033
  }
1807
2034
  }
1808
- }, Jn = {
2035
+ }, Ar = {
1809
2036
  key: 0,
1810
2037
  class: "bb-dashboard-ui bb:px-4 bb:flex bb:items-center bb:justify-between bb:sm:px-0"
1811
- }, Yn = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, Xn = ["href"], Zn = {
2038
+ }, jr = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, Mr = ["href"], Nr = {
1812
2039
  key: 0,
1813
2040
  class: "bb:hidden bb:md:-mt-px bb:md:flex bb:text-gray-400 bb:text-sm bb:leading-5"
1814
- }, Qn = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, $n = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, er = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, tr = ["href"];
1815
- function nr(e, t, n, c, l, u) {
2041
+ }, Pr = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Fr = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Ir = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, Lr = ["href"];
2042
+ function Rr(e, t, n, c, l, u) {
1816
2043
  let f = m("arrow-narrow-left"), p = m("arrow-narrow-right");
1817
- return u.hasResults ? (d(), i("nav", Jn, [
1818
- a("div", Yn, [u.previousPageUrl === null ? r("", !0) : (d(), i("a", {
2044
+ return u.hasResults ? (d(), i("nav", Ar, [
2045
+ a("div", jr, [u.previousPageUrl === null ? r("", !0) : (d(), i("a", {
1819
2046
  key: 0,
1820
2047
  href: u.previousPageUrl,
1821
2048
  class: "bb:border-t-2 bb:border-transparent bb:pt-4 bb:pr-1 bb:inline-flex bb:items-center bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:text-gray-700 bb:hover:border-indigo-700",
1822
2049
  onClick: t[0] ||= (t) => e.followLink(t, u.previousPageUrl)
1823
- }, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400" }), o(" " + g(e.texts.previousPage), 1)], 8, Xn))]),
1824
- u.hasRange ? (d(), i("div", Zn, [
2050
+ }, [s(f, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400 bb:pointer-events-none bb:cursor-default" }), o(" " + g(e.texts.previousPage), 1)], 8, Mr))]),
2051
+ u.hasRange ? (d(), i("div", Nr, [
1825
2052
  o(g(e.texts.resultsBefore) + " ", 1),
1826
- a("span", Qn, g(u.from) + " - " + g(u.to), 1),
2053
+ a("span", Pr, g(u.from) + " - " + g(u.to), 1),
1827
2054
  o(" " + g(e.texts.resultsOf) + " ", 1),
1828
- a("span", $n, g(u.total), 1),
2055
+ a("span", Fr, g(u.total), 1),
1829
2056
  o(" " + g(e.texts.resultsAfter), 1)
1830
2057
  ])) : r("", !0),
1831
- a("div", er, [u.nextPageUrl === null ? r("", !0) : (d(), i("a", {
2058
+ a("div", Ir, [u.nextPageUrl === null ? r("", !0) : (d(), i("a", {
1832
2059
  key: 0,
1833
2060
  href: u.nextPageUrl,
1834
2061
  class: "bb:border-t-2 bb:border-transparent bb:pt-4 bb:pl-1 bb:inline-flex bb:items-center bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:text-gray-700 bb:hover:border-indigo-700",
1835
2062
  onClick: t[1] ||= (t) => e.followLink(t, u.nextPageUrl)
1836
- }, [o(g(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400" })], 8, tr))])
2063
+ }, [o(g(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400 bb:pointer-events-none bb:cursor-default" })], 8, Lr))])
1837
2064
  ])) : r("", !0);
1838
2065
  }
1839
- var rr = /*#__PURE__*/ j(qn, [["render", nr]]), ir = [
2066
+ var zr = /*#__PURE__*/ A(kr, [["render", Rr]]), Br = [
1840
2067
  "left",
1841
2068
  "center",
1842
2069
  "right"
1843
- ], ar = ["red", "green"];
1844
- function or(e) {
2070
+ ];
2071
+ function Vr(e) {
1845
2072
  if (typeof e != "object" || !e || typeof e.key != "string" || e.key === "") return null;
1846
2073
  let t = e.key;
1847
2074
  return {
@@ -1850,21 +2077,21 @@ function or(e) {
1850
2077
  value: typeof e.value == "function" ? e.value : (e) => e?.[t],
1851
2078
  secondary: typeof e.secondary == "function" ? e.secondary : null,
1852
2079
  muted: e.muted === !0,
1853
- align: ir.includes(e.align) ? e.align : "left",
2080
+ align: Br.includes(e.align) ? e.align : "left",
1854
2081
  wrap: e.wrap === !0,
1855
2082
  narrow: e.narrow === !0,
1856
2083
  visible: e.visible !== !1
1857
2084
  };
1858
2085
  }
1859
- function sr(e) {
2086
+ function Z(e) {
1860
2087
  return typeof e == "string" && e !== "" ? e : null;
1861
2088
  }
1862
- var cr = {
2089
+ var Hr = {
1863
2090
  components: {
1864
- Pagination: rr,
1865
- SmallBadge: G
2091
+ Pagination: zr,
2092
+ InfoPill: q
1866
2093
  },
1867
- mixins: [W],
2094
+ mixins: [M, k],
1868
2095
  props: {
1869
2096
  rows: {
1870
2097
  type: Array,
@@ -1899,7 +2126,7 @@ var cr = {
1899
2126
  default: "page",
1900
2127
  validator: (e) => ["page", "card"].indexOf(e) !== -1
1901
2128
  },
1902
- rowColor: {
2129
+ rowStripe: {
1903
2130
  type: Function,
1904
2131
  default: null
1905
2132
  }
@@ -1909,7 +2136,10 @@ var cr = {
1909
2136
  return Array.isArray(this.rows) ? this.rows : [];
1910
2137
  },
1911
2138
  visibleColumns() {
1912
- return (Array.isArray(this.columns) ? this.columns : []).map(or).filter((e) => e !== null && e.visible);
2139
+ return (Array.isArray(this.columns) ? this.columns : []).map(Vr).filter((e) => e !== null && e.visible);
2140
+ },
2141
+ rowStripes() {
2142
+ return this.normalizedRows.map((e) => this.stripeOf(e));
1913
2143
  },
1914
2144
  isCard() {
1915
2145
  return this.variant === "card";
@@ -1925,10 +2155,10 @@ var cr = {
1925
2155
  },
1926
2156
  badgeText() {
1927
2157
  if (this.hasRecords) {
1928
- let e = sr(this.foundText);
2158
+ let e = Z(this.foundText);
1929
2159
  return e === null ? null : `${e}: ${this.recordCount}`;
1930
2160
  }
1931
- return sr(this.emptyText);
2161
+ return Z(this.emptyText);
1932
2162
  }
1933
2163
  },
1934
2164
  methods: {
@@ -1945,19 +2175,19 @@ var cr = {
1945
2175
  else typeof this.rowKey == "string" && (n = e?.[this.rowKey]);
1946
2176
  return n ?? `row-${t}`;
1947
2177
  },
1948
- colorOf(e) {
1949
- if (typeof this.rowColor != "function") return null;
1950
- let t = this.rowColor(e);
1951
- return ar.includes(t) ? t : null;
2178
+ stripeOf(e) {
2179
+ if (typeof this.rowStripe != "function") return null;
2180
+ let t = this.rowStripe(e);
2181
+ return O(t) ? t : null;
1952
2182
  },
1953
2183
  textOf(e, t) {
1954
2184
  let n = e(t);
1955
2185
  return n == null ? "" : String(n);
1956
2186
  }
1957
2187
  }
1958
- }, lr = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, ur = { class: "bb:bg-gray-50" }, dr = ["textContent"], fr = { class: "bb:divide-y bb:divide-gray-200" }, pr = ["textContent"], mr = ["textContent"];
1959
- function hr(t, o, s, c, l, h) {
1960
- let _ = m("small-badge"), v = m("pagination");
2188
+ }, Ur = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, Wr = { class: "bb:bg-gray-50" }, Gr = ["textContent"], Kr = { class: "bb:divide-y bb:divide-gray-200" }, qr = ["textContent"], Jr = ["textContent"];
2189
+ function Yr(t, o, s, c, l, h) {
2190
+ let _ = m("info-pill"), v = m("pagination");
1961
2191
  return d(), i("div", null, [
1962
2192
  h.hasBadgeRow() ? (d(), i("div", {
1963
2193
  key: 0,
@@ -1970,7 +2200,7 @@ function hr(t, o, s, c, l, h) {
1970
2200
  h.normalizedRows.length > 0 ? (d(), i("div", {
1971
2201
  key: 1,
1972
2202
  class: u(h.isCard && h.hasBadgeRow() ? "bb:mt-4" : "")
1973
- }, [a("div", { class: u(["bb:overflow-x-auto", h.isCard ? "bb:border-t bb:border-gray-200" : "bb:shadow-sm bb:border-b bb:border-gray-200 bb:sm:rounded-lg"]) }, [a("table", lr, [a("thead", null, [a("tr", ur, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("th", {
2203
+ }, [a("div", { class: u(["bb:overflow-x-auto", h.isCard ? "bb:border-t bb:border-gray-200" : "bb:shadow-sm bb:border-b bb:border-gray-200 bb:sm:rounded-lg"]) }, [a("table", Ur, [a("thead", null, [a("tr", Wr, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("th", {
1974
2204
  key: e.key,
1975
2205
  scope: "col",
1976
2206
  class: u(["bb:px-6 bb:py-3 bb:text-xs bb:leading-4 bb:font-medium bb:text-gray-500 bb:uppercase bb:tracking-wider bb:whitespace-nowrap", [{
@@ -1979,14 +2209,10 @@ function hr(t, o, s, c, l, h) {
1979
2209
  "bb:text-right": e.align === "right"
1980
2210
  }, { "bb:w-px": e.narrow }]]),
1981
2211
  textContent: g(e.label)
1982
- }, null, 10, dr))), 128))])]), a("tbody", fr, [(d(!0), i(e, null, f(h.normalizedRows, (n, o) => (d(), i("tr", {
2212
+ }, null, 10, Gr))), 128))])]), a("tbody", Kr, [(d(!0), i(e, null, f(h.normalizedRows, (n, o) => (d(), i("tr", {
1983
2213
  key: h.keyOf(n, o),
1984
- class: u({
1985
- "bb:bg-white bb:even:bg-gray-50": h.colorOf(n) === null,
1986
- "bb:bg-red-50": h.colorOf(n) === "red",
1987
- "bb:bg-green-50": h.colorOf(n) === "green"
1988
- })
1989
- }, [(d(!0), i(e, null, f(h.visibleColumns, (e) => (d(), i("td", {
2214
+ class: "bb:bg-white bb:even:bg-gray-50"
2215
+ }, [(d(!0), i(e, null, f(h.visibleColumns, (e, s) => (d(), i("td", {
1990
2216
  key: e.key,
1991
2217
  class: u(["bb:px-6 bb:py-4 bb:align-top bb:relative bb:text-sm bb:leading-5", [
1992
2218
  { "bb:whitespace-nowrap": !e.wrap },
@@ -1997,17 +2223,21 @@ function hr(t, o, s, c, l, h) {
1997
2223
  },
1998
2224
  { "bb:w-px": e.narrow }
1999
2225
  ]])
2000
- }, [p(t.$slots, `cell-${e.key}`, {
2226
+ }, [s === 0 && h.rowStripes[o] !== null ? (d(), i("span", {
2227
+ key: 0,
2228
+ class: u(["bb:absolute bb:left-0 bb:inset-y-0 bb:w-1 bb:bg-current", t.colorClass(h.rowStripes[o], "mark")]),
2229
+ "aria-hidden": "true"
2230
+ }, null, 2)) : r("", !0), p(t.$slots, `cell-${e.key}`, {
2001
2231
  row: n,
2002
2232
  index: o
2003
2233
  }, () => [a("div", {
2004
2234
  class: u(["bb:font-medium", e.muted ? "bb:text-gray-400" : "bb:text-gray-900"]),
2005
2235
  textContent: g(h.textOf(e.value, n))
2006
- }, null, 10, pr), e.secondary !== null && h.textOf(e.secondary, n) !== "" ? (d(), i("div", {
2236
+ }, null, 10, qr), e.secondary !== null && h.textOf(e.secondary, n) !== "" ? (d(), i("div", {
2007
2237
  key: 0,
2008
2238
  class: "bb:text-gray-400",
2009
2239
  textContent: g(h.textOf(e.secondary, n))
2010
- }, null, 8, mr)) : r("", !0)])], 2))), 128))], 2))), 128))])])], 2)], 2)) : r("", !0),
2240
+ }, null, 8, Jr)) : r("", !0)])], 2))), 128))]))), 128))])])], 2)], 2)) : r("", !0),
2011
2241
  h.hasMeta ? (d(), n(v, {
2012
2242
  key: 2,
2013
2243
  meta: s.meta,
@@ -2022,8 +2252,8 @@ function hr(t, o, s, c, l, h) {
2022
2252
  ])) : r("", !0)
2023
2253
  ]);
2024
2254
  }
2025
- var gr = /*#__PURE__*/ j(cr, [["render", hr]]), _r = {
2026
- mixins: [$],
2255
+ var Xr = /*#__PURE__*/ A(Hr, [["render", Yr]]), Zr = {
2256
+ mixins: [X],
2027
2257
  props: {
2028
2258
  url: {
2029
2259
  type: String,
@@ -2038,46 +2268,28 @@ var gr = /*#__PURE__*/ j(cr, [["render", hr]]), _r = {
2038
2268
  default: !1
2039
2269
  }
2040
2270
  }
2041
- }, vr = ["href", "textContent"];
2042
- function yr(e, t, n, r, a, o) {
2271
+ }, Qr = ["href", "textContent"];
2272
+ function $r(e, t, n, r, a, o) {
2043
2273
  return d(), i("a", {
2044
2274
  href: n.url,
2045
2275
  class: u([n.isActive ? "bb:border-indigo-400 bb:text-gray-600 bb:focus:border-indigo-700" : "bb:border-transparent bb:text-gray-500 bb:hover:text-gray-600 bb:hover:border-gray-300 bb:focus:text-gray-700 bb:focus:border-gray-300", "bb-dashboard-ui bb:inline-flex bb:items-center bb:px-1 bb:pt-1 bb:border-b-2 bb:text-sm bb:font-medium bb:leading-5 bb:focus:outline-hidden bb:transition bb:duration-150 bb:ease-in-out"]),
2046
2276
  onClick: t[0] ||= (t) => e.followLink(t, n.url),
2047
2277
  textContent: g(n.name)
2048
- }, null, 10, vr);
2278
+ }, null, 10, Qr);
2049
2279
  }
2050
- var br = /*#__PURE__*/ j(_r, [["render", yr]]), xr = { emits: ["clicked"] };
2051
- function Sr(e, t, n, r, o, s) {
2052
- return d(), i("button", {
2053
- type: "button",
2054
- tabindex: "-1",
2055
- class: "bb-dashboard-ui bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-400 bb:focus:outline-hidden bb:hover:text-gray-600",
2056
- onClick: t[0] ||= S((t) => e.$emit("clicked"), ["prevent"])
2057
- }, [...t[1] ||= [a("svg", {
2058
- class: "bb:w-full bb:h-full bb:stroke-current",
2059
- fill: "none",
2060
- viewBox: "0 0 24 24"
2061
- }, [a("path", {
2062
- "stroke-linecap": "round",
2063
- "stroke-linejoin": "round",
2064
- "stroke-width": "2",
2065
- d: "M6 18L18 6M6 6l12 12"
2066
- })], -1)]]);
2067
- }
2068
- var Cr = /*#__PURE__*/ j(xr, [["render", Sr]]), wr = [
2280
+ var ei = /*#__PURE__*/ A(Zr, [["render", $r]]), ti = [
2069
2281
  "xl",
2070
2282
  "4xl",
2071
2283
  "7xl"
2072
- ], Tr = {
2073
- components: { Closer: Cr },
2074
- mixins: [W],
2284
+ ], ni = {
2285
+ components: { CrossButton: N },
2286
+ mixins: [M],
2075
2287
  inheritAttrs: !1,
2076
2288
  props: {
2077
2289
  width: {
2078
2290
  type: String,
2079
2291
  default: "xl",
2080
- validator: (e) => wr.includes(e)
2292
+ validator: (e) => ti.includes(e)
2081
2293
  },
2082
2294
  fallbackUrl: {
2083
2295
  type: String,
@@ -2093,13 +2305,13 @@ var Cr = /*#__PURE__*/ j(xr, [["render", Sr]]), wr = [
2093
2305
  },
2094
2306
  computed: {
2095
2307
  resolvedWidth() {
2096
- return wr.includes(this.width) ? this.width : "xl";
2308
+ return ti.includes(this.width) ? this.width : "xl";
2097
2309
  },
2098
2310
  windows() {
2099
2311
  return this.uiSettings.windows;
2100
2312
  },
2101
2313
  resolvedKey() {
2102
- return this.windowKey !== null && this.windowKey !== "" ? this.windowKey : this.windows === null ? null : ie(this.windows.page.address);
2314
+ return this.windowKey !== null && this.windowKey !== "" ? this.windowKey : this.windows === null ? null : ae(this.windows.page.address);
2103
2315
  },
2104
2316
  target() {
2105
2317
  return this.returnAddress === null ? this.fallbackUrl === null || this.fallbackUrl === "" ? null : this.fallbackUrl : this.returnAddress;
@@ -2109,23 +2321,23 @@ var Cr = /*#__PURE__*/ j(xr, [["render", Sr]]), wr = [
2109
2321
  }
2110
2322
  },
2111
2323
  watch: { fallbackUrl() {
2112
- this.windows !== null && fe(this.windows.state, this, this.fallbackAddress());
2324
+ this.windows !== null && me(this.windows.state, this, this.fallbackAddress());
2113
2325
  } },
2114
2326
  mounted() {
2115
- this.windows !== null && (this.returnAddress = O(this.windows.state, this, this.resolvedKey, this.fallbackAddress()).returnAddress, this.$watch(() => [this.windows.page.number, this.resolvedKey], () => this.syncWindow(), { flush: "post" }));
2327
+ this.windows !== null && (this.returnAddress = E(this.windows.state, this, this.resolvedKey, this.fallbackAddress()).returnAddress, this.$watch(() => [this.windows.page.number, this.resolvedKey], () => this.syncWindow(), { flush: "post" }));
2116
2328
  },
2117
2329
  beforeUnmount() {
2118
- this.windows !== null && de(this.windows.state, this);
2330
+ this.windows !== null && pe(this.windows.state, this);
2119
2331
  },
2120
2332
  methods: {
2121
2333
  fallbackAddress() {
2122
- return T(this.fallbackUrl, window.location.origin);
2334
+ return w(this.fallbackUrl, window.location.origin);
2123
2335
  },
2124
2336
  forwardedAttrs() {
2125
2337
  return Object.fromEntries(Object.entries(this.$attrs).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-")));
2126
2338
  },
2127
2339
  syncWindow() {
2128
- let e = ue(this.windows.state, this, this.resolvedKey, this.fallbackAddress());
2340
+ let e = fe(this.windows.state, this, this.resolvedKey, this.fallbackAddress());
2129
2341
  e.rejected && console.warn(`PageCard: ключ окна сменился на «${this.resolvedKey}» без смены страницы — карточка остаётся в окне «${e.key}»`), this.returnAddress = e.window.returnAddress;
2130
2342
  },
2131
2343
  close() {
@@ -2140,40 +2352,39 @@ var Cr = /*#__PURE__*/ j(xr, [["render", Sr]]), wr = [
2140
2352
  }
2141
2353
  }
2142
2354
  };
2143
- function Er(e, t, a, o, s, c) {
2144
- let f = m("closer");
2355
+ function ri(e, t, a, s, c, f) {
2356
+ let h = m("cross-button");
2145
2357
  return d(), i("div", l({
2146
2358
  class: ["bb:box-border bb:relative bb:my-6 bb:mx-auto bb:bg-white bb:shadow-xl bb:sm:rounded-lg", [
2147
2359
  {
2148
- "bb:sm:max-w-xl": c.resolvedWidth === "xl",
2149
- "bb:sm:max-w-4xl": c.resolvedWidth === "4xl",
2150
- "bb:sm:max-w-7xl": c.resolvedWidth === "7xl"
2360
+ "bb:sm:max-w-xl": f.resolvedWidth === "xl",
2361
+ "bb:sm:max-w-4xl": f.resolvedWidth === "4xl",
2362
+ "bb:sm:max-w-7xl": f.resolvedWidth === "7xl"
2151
2363
  },
2152
- c.canClose ? {
2153
- "bb:[--bb-closer-space:3.5rem] bb:md:[--bb-closer-space:0px]": c.resolvedWidth === "xl",
2154
- "bb:[--bb-closer-space:3.5rem] bb:lg:[--bb-closer-space:0px]": c.resolvedWidth === "4xl",
2155
- "bb:[--bb-closer-space:3.5rem] bb:2xl:[--bb-closer-space:0px]": c.resolvedWidth === "7xl"
2364
+ f.canClose ? {
2365
+ "bb:[--bb-closer-space:3.5rem] bb:md:[--bb-closer-space:0px]": f.resolvedWidth === "xl",
2366
+ "bb:[--bb-closer-space:3.5rem] bb:lg:[--bb-closer-space:0px]": f.resolvedWidth === "4xl",
2367
+ "bb:[--bb-closer-space:3.5rem] bb:2xl:[--bb-closer-space:0px]": f.resolvedWidth === "7xl"
2156
2368
  } : "bb:[--bb-closer-space:0px]",
2157
2369
  e.$attrs.class
2158
2370
  ]],
2159
2371
  style: e.$attrs.style
2160
- }, { ...c.forwardedAttrs() }), [p(e.$slots, "default", { close: c.close }), c.canClose ? (d(), n(f, {
2372
+ }, { ...f.forwardedAttrs() }), [p(e.$slots, "default", { close: f.close }), f.canClose ? (d(), n(h, {
2161
2373
  key: 0,
2374
+ size: "large",
2162
2375
  class: u(["bb:absolute bb:top-0 bb:right-0 bb:mt-4 bb:mr-4 bb:w-8 bb:h-8 bb:sm:mt-6 bb:rounded-md bb:focus-visible:ring-2 bb:focus-visible:ring-indigo-500", {
2163
- "bb:md:right-auto bb:md:left-full bb:md:mr-0 bb:md:ml-4": c.resolvedWidth === "xl",
2164
- "bb:lg:right-auto bb:lg:left-full bb:lg:mr-0 bb:lg:ml-4": c.resolvedWidth === "4xl",
2165
- "bb:2xl:right-auto bb:2xl:left-full bb:2xl:mr-0 bb:2xl:ml-4": c.resolvedWidth === "7xl"
2376
+ "bb:md:right-auto bb:md:left-full bb:md:mr-0 bb:md:ml-4": f.resolvedWidth === "xl",
2377
+ "bb:lg:right-auto bb:lg:left-full bb:lg:mr-0 bb:lg:ml-4": f.resolvedWidth === "4xl",
2378
+ "bb:2xl:right-auto bb:2xl:left-full bb:2xl:mr-0 bb:2xl:ml-4": f.resolvedWidth === "7xl"
2166
2379
  }]),
2167
2380
  tabindex: "0",
2168
- "aria-label": e.texts.back,
2169
- onClicked: c.close
2170
- }, null, 8, [
2171
- "class",
2172
- "aria-label",
2173
- "onClicked"
2174
- ])) : r("", !0)], 16);
2381
+ onClicked: f.close
2382
+ }, {
2383
+ default: b(() => [o(g(e.texts.back), 1)]),
2384
+ _: 1
2385
+ }, 8, ["class", "onClicked"])) : r("", !0)], 16);
2175
2386
  }
2176
- var Dr = /*#__PURE__*/ j(Tr, [["render", Er]]), Or = {}, kr = {
2387
+ var ii = /*#__PURE__*/ A(ni, [["render", ri]]), ai = {}, oi = {
2177
2388
  class: "bb:h-7 bb:w-7 bb:text-green-600",
2178
2389
  xmlns: "http://www.w3.org/2000/svg",
2179
2390
  fill: "none",
@@ -2182,22 +2393,22 @@ var Dr = /*#__PURE__*/ j(Tr, [["render", Er]]), Or = {}, kr = {
2182
2393
  stroke: "currentColor",
2183
2394
  "aria-hidden": "true"
2184
2395
  };
2185
- function Ar(e, t, n, r, o, s) {
2186
- return d(), i("svg", kr, [...t[0] ||= [a("path", {
2396
+ function si(e, t, n, r, o, s) {
2397
+ return d(), i("svg", oi, [...t[0] ||= [a("path", {
2187
2398
  "stroke-linecap": "round",
2188
2399
  "stroke-linejoin": "round",
2189
2400
  d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
2190
2401
  }, null, -1)]]);
2191
2402
  }
2192
- var jr = /*#__PURE__*/ j(Or, [["render", Ar]]), Mr = {}, Nr = {
2403
+ var ci = /*#__PURE__*/ A(ai, [["render", si]]), li = {}, ui = {
2193
2404
  class: "bb:h-5 bb:w-5",
2194
2405
  xmlns: "http://www.w3.org/2000/svg",
2195
2406
  viewBox: "0 0 20 20",
2196
2407
  fill: "currentColor",
2197
2408
  "aria-hidden": "true"
2198
2409
  };
2199
- function Pr(e, t, n, r, o, s) {
2200
- return d(), i("svg", Nr, [...t[0] ||= [a("path", {
2410
+ function di(e, t, n, r, o, s) {
2411
+ return d(), i("svg", ui, [...t[0] ||= [a("path", {
2201
2412
  "fill-rule": "evenodd",
2202
2413
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
2203
2414
  "clip-rule": "evenodd"
@@ -2205,14 +2416,14 @@ function Pr(e, t, n, r, o, s) {
2205
2416
  }
2206
2417
  //#endregion
2207
2418
  //#region src/components/NotificationMessage.vue
2208
- var Fr = {
2419
+ var fi = {
2209
2420
  components: {
2210
- Check: jr,
2211
- Close: /* @__PURE__ */ j(Mr, [["render", Pr]]),
2212
- Dangerous: K,
2213
- Warning: q
2421
+ Check: ci,
2422
+ Close: /* @__PURE__ */ A(li, [["render", di]]),
2423
+ Dangerous: J,
2424
+ Warning: Y
2214
2425
  },
2215
- mixins: [W],
2426
+ mixins: [M],
2216
2427
  emits: ["update:modelValue"],
2217
2428
  props: {
2218
2429
  modelValue: {
@@ -2250,8 +2461,8 @@ var Fr = {
2250
2461
  return this.type === "confirmation";
2251
2462
  }
2252
2463
  }
2253
- }, Ir = ["role"], Lr = { class: "bb:p-4" }, Rr = { class: "bb:flex bb:items-start" }, zr = { class: "bb:shrink-0" }, Br = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, Vr = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, Hr = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, Ur = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, Wr = { class: "bb:sr-only" };
2254
- function Gr(e, t, o, c, l, f) {
2464
+ }, pi = ["role"], mi = { class: "bb:p-4" }, hi = { class: "bb:flex bb:items-start" }, gi = { class: "bb:shrink-0" }, _i = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, vi = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, yi = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, bi = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, xi = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
2465
+ function Si(e, t, o, c, l, f) {
2255
2466
  let p = m("warning"), h = m("dangerous"), _ = m("check"), v = m("close");
2256
2467
  return d(), i("div", {
2257
2468
  class: "bb-dashboard-ui bb:fixed bb:inset-0 bb:flex bb:items-end bb:justify-center bb:px-4 bb:py-6 bb:pointer-events-none bb:sm:p-6 bb:sm:items-start bb:sm:justify-end",
@@ -2263,14 +2474,14 @@ function Gr(e, t, o, c, l, f) {
2263
2474
  "bb:bg-yellow-50": f.isWarning,
2264
2475
  "bb:bg-gray-50": f.isConfirmation
2265
2476
  }])
2266
- }, [a("div", Lr, [a("div", Rr, [
2267
- a("div", zr, [
2477
+ }, [a("div", mi, [a("div", hi, [
2478
+ a("div", gi, [
2268
2479
  f.isWarning ? (d(), n(p, { key: 0 })) : r("", !0),
2269
2480
  f.isDangerous ? (d(), n(h, { key: 1 })) : r("", !0),
2270
2481
  f.isConfirmation ? (d(), n(_, { key: 2 })) : r("", !0)
2271
2482
  ]),
2272
- a("div", Br, [a("p", Vr, g(o.notificationHeading), 1), a("p", Hr, g(f.text), 1)]),
2273
- a("div", Ur, [a("button", {
2483
+ a("div", _i, [a("p", vi, g(o.notificationHeading), 1), a("p", yi, g(f.text), 1)]),
2484
+ a("div", bi, [a("button", {
2274
2485
  type: "button",
2275
2486
  class: u(["bb:rounded-md bb:inline-flex bb:text-gray-400 bb:hover:text-gray-500 bb:focus:outline-hidden bb:focus:ring-2 bb:focus:ring-offset-2 bb:focus:ring-indigo-500", {
2276
2487
  "bb:bg-red-50": f.isDangerous,
@@ -2278,9 +2489,108 @@ function Gr(e, t, o, c, l, f) {
2278
2489
  "bb:bg-gray-50": f.isConfirmation
2279
2490
  }]),
2280
2491
  onClick: t[0] ||= S((t) => e.$emit("update:modelValue", ""), ["prevent"])
2281
- }, [a("span", Wr, g(e.texts.close), 1), s(v)], 2)])
2282
- ])])], 2)) : r("", !0)], 8, Ir);
2492
+ }, [a("span", xi, g(e.texts.close), 1), s(v, { class: "bb:pointer-events-none bb:cursor-default" })], 2)])
2493
+ ])])], 2)) : r("", !0)], 8, pi);
2494
+ }
2495
+ var Ci = /*#__PURE__*/ A(fi, [["render", Si]]), wi = {}, Ti = {
2496
+ class: "bb:h-5 bb:w-5",
2497
+ xmlns: "http://www.w3.org/2000/svg",
2498
+ fill: "none",
2499
+ viewBox: "0 0 24 24",
2500
+ stroke: "currentColor",
2501
+ "stroke-width": "2",
2502
+ "aria-hidden": "true"
2503
+ };
2504
+ function Ei(e, t, n, r, o, s) {
2505
+ return d(), i("svg", Ti, [...t[0] ||= [a("path", {
2506
+ "stroke-linecap": "round",
2507
+ "stroke-linejoin": "round",
2508
+ d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
2509
+ }, null, -1), a("path", {
2510
+ "stroke-linecap": "round",
2511
+ "stroke-linejoin": "round",
2512
+ d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
2513
+ }, null, -1)]]);
2514
+ }
2515
+ var Di = /*#__PURE__*/ A(wi, [["render", Ei]]), Q = 0, $ = null, Oi = {
2516
+ components: {
2517
+ PopoverPanel: H,
2518
+ Eye: Di
2519
+ },
2520
+ mixins: [M],
2521
+ emits: ["update:modelValue"],
2522
+ props: {
2523
+ text: {
2524
+ type: String,
2525
+ required: !0
2526
+ },
2527
+ modelValue: {
2528
+ type: Boolean,
2529
+ default: !1
2530
+ }
2531
+ },
2532
+ data() {
2533
+ return { holdsPageSelectionLock: !1 };
2534
+ },
2535
+ computed: {
2536
+ normalizedText() {
2537
+ return typeof this.text == "string" ? this.text : "";
2538
+ },
2539
+ isEmpty() {
2540
+ return this.normalizedText === "";
2541
+ }
2542
+ },
2543
+ beforeUnmount() {
2544
+ this.unlockPageSelection();
2545
+ },
2546
+ methods: {
2547
+ onPanelToggle(e) {
2548
+ e ? this.lockPageSelection() : this.unlockPageSelection();
2549
+ },
2550
+ lockPageSelection() {
2551
+ if (!this.holdsPageSelectionLock && (this.holdsPageSelectionLock = !0, Q += 1, Q === 1)) {
2552
+ let e = document.documentElement.style;
2553
+ $ = {
2554
+ userSelect: e.userSelect,
2555
+ webkitUserSelect: e.webkitUserSelect
2556
+ }, e.userSelect = "none", e.webkitUserSelect = "none";
2557
+ }
2558
+ },
2559
+ unlockPageSelection() {
2560
+ this.holdsPageSelectionLock && (this.holdsPageSelectionLock = !1, --Q, Q === 0 && (Object.assign(document.documentElement.style, $), $ = null));
2561
+ }
2562
+ }
2563
+ }, ki = ["id", "popovertarget"], Ai = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
2564
+ function ji(e, t, r, i, c, l) {
2565
+ let u = m("eye"), f = m("popover-panel");
2566
+ return d(), n(f, {
2567
+ class: "bb-dashboard-ui bb:inline-flex",
2568
+ "has-content": !l.isEmpty,
2569
+ "model-value": r.modelValue,
2570
+ align: "end",
2571
+ "max-width": 384,
2572
+ "panel-role": "region",
2573
+ "panel-label": e.texts.fullText,
2574
+ "panel-focusable": "",
2575
+ "panel-class": "bb:p-3 bb:rounded-md bb:border bb:border-gray-200 bb:bg-white bb:shadow-lg bb:text-left bb:text-sm bb:leading-5 bb:text-gray-700 bb:whitespace-normal bb:break-words bb:overscroll-contain bb:select-text bb:focus:outline-hidden bb:focus-visible:ring-2 bb:focus-visible:ring-indigo-500",
2576
+ "onUpdate:modelValue": t[0] ||= (t) => e.$emit("update:modelValue", t),
2577
+ onToggle: l.onPanelToggle
2578
+ }, {
2579
+ trigger: b((t) => [a("button", {
2580
+ type: "button",
2581
+ id: t.id,
2582
+ popovertarget: t.popovertarget,
2583
+ class: "bb:relative bb:text-gray-400 bb:hover:text-gray-600 bb:rounded-md bb:focus:outline-hidden bb:focus-visible:ring-2 bb:focus-visible:ring-indigo-500"
2584
+ }, [a("span", Ai, g(e.texts.showText), 1), s(u, { class: "bb:pointer-events-none bb:cursor-default" })], 8, ki)]),
2585
+ default: b(() => [o(g(l.normalizedText), 1)]),
2586
+ _: 1
2587
+ }, 8, [
2588
+ "has-content",
2589
+ "model-value",
2590
+ "panel-label",
2591
+ "onToggle"
2592
+ ]);
2283
2593
  }
2284
- var Kr = /*#__PURE__*/ j(Fr, [["render", Gr]]);
2594
+ var Mi = /*#__PURE__*/ A(Oi, [["render", ji]]);
2285
2595
  //#endregion
2286
- export { _n as ConfirmationModal, gr as DataTable, ve as Dot, Jt as DownloadLink, Mn as DropdownButtonWithAction, Bt as ErrorMessages, Ln as HamburgerMenu, br as NavigationMenuElement, Kr as NotificationMessage, Dr as PageCard, Ie as RussianMobileFilter, Ue as Search, ft as SelectDateInterval, At as SelectSingle, G as SmallBadge, he as dashboardUi };
2596
+ export { On as ActionPill, Xn as ConfirmationModal, Xr as DataTable, Oe as Dot, mr as DropdownButtonWithAction, un as ErrorMessages, yr as HamburgerMenu, q as InfoPill, ei as NavigationMenuElement, Ci as NotificationMessage, ii as PageCard, Ze as RussianMobileFilter, it as Search, Ft as SelectDateInterval, $t as SelectSingle, Mi as TextPopover, ve as dashboardUi, Se as downloadFile };