bitboss-ui 2.1.126 → 2.1.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/ai/BbButton.md +0 -10
  2. package/dist/ai/BbTable.md +635 -2
  3. package/dist/components/BaseButton/BaseButton.vue.d.ts +1 -1
  4. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +6 -6
  5. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +3 -3
  6. package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +6 -6
  7. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +4 -4
  8. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +6 -6
  9. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +1 -1
  10. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +8 -8
  11. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +6 -6
  12. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +3 -3
  13. package/dist/components/BaseRating/BaseRating.vue.d.ts +6 -6
  14. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +2 -2
  15. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +7 -7
  16. package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +6 -6
  17. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +3 -3
  18. package/dist/components/BaseTag/BaseTag.vue.d.ts +6 -6
  19. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +6 -6
  20. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +6 -6
  21. package/dist/components/BbButton/BbButton.vue.d.ts +1 -1
  22. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +7 -7
  23. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +3 -3
  24. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +6 -6
  25. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -2
  26. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -4
  27. package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -3
  28. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -3
  29. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +4 -4
  30. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +8 -8
  31. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +7 -7
  32. package/dist/components/BbPopover/BbPopover.vue.d.ts +4 -4
  33. package/dist/components/BbRadio/BbRadio.vue.d.ts +7 -7
  34. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +3 -3
  35. package/dist/components/BbRating/BbRating.vue.d.ts +6 -6
  36. package/dist/components/BbSelect/BbSelect.vue.d.ts +2 -2
  37. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +2 -2
  38. package/dist/components/BbSlider/BbSlider.vue.d.ts +6 -6
  39. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +7 -7
  40. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +3 -3
  41. package/dist/components/BbTable/types.d.ts +32 -0
  42. package/dist/components/BbTag/BbTag.vue.d.ts +6 -6
  43. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +6 -6
  44. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +6 -6
  45. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +3 -3
  46. package/dist/components/CommonPopover/CommonPopover.vue.d.ts +1 -1
  47. package/dist/components/Transitions/Slide.vue.d.ts +1 -1
  48. package/dist/composables/useTableWidthContext.d.ts +35 -0
  49. package/dist/directives/bbDropdown.d.ts +8 -2
  50. package/dist/directives/bbTooltip.d.ts +7 -2
  51. package/dist/index.css +1 -1
  52. package/dist/index.js +9 -9
  53. package/dist/index240.js +58 -61
  54. package/dist/index270.js +1 -1
  55. package/dist/index325.js +34 -41
  56. package/dist/index326.js +40 -447
  57. package/dist/index327.js +632 -0
  58. package/dist/index329.js +5 -154
  59. package/dist/index330.js +155 -0
  60. package/dist/index332.js +5 -141
  61. package/dist/index333.js +142 -0
  62. package/dist/index335.js +5 -154
  63. package/dist/index336.js +155 -0
  64. package/dist/index338.js +5 -57
  65. package/dist/index339.js +57 -4
  66. package/dist/index340.js +4 -19
  67. package/dist/index341.js +20 -0
  68. package/dist/index343.js +5 -141
  69. package/dist/index344.js +142 -0
  70. package/dist/index346.js +5 -3
  71. package/dist/index347.js +3 -108
  72. package/dist/index348.js +109 -0
  73. package/dist/index350.js +5 -54
  74. package/dist/index351.js +54 -23
  75. package/dist/index352.js +12 -11
  76. package/dist/index353.js +22 -838
  77. package/dist/index354.js +811 -446
  78. package/dist/index355.js +472 -50
  79. package/dist/index356.js +51 -6
  80. package/dist/index357.js +7 -0
  81. package/package.json +1 -1
  82. package/dist/index328.js +0 -6
  83. package/dist/index331.js +0 -6
  84. package/dist/index334.js +0 -6
  85. package/dist/index337.js +0 -6
  86. package/dist/index342.js +0 -6
  87. package/dist/index345.js +0 -6
  88. package/dist/index349.js +0 -6
package/dist/index240.js CHANGED
@@ -1,21 +1,20 @@
1
- import { useLogger as e } from "./index31.js";
2
- import t from "./index36.js";
3
- import { useLocale as n } from "./index42.js";
4
- import { extractDomContainer as r } from "./index45.js";
5
- import { isEqual as i } from "./index82.js";
6
- import { noop as a } from "./index142.js";
7
- import o from "./index219.js";
8
- import { pickBy as s } from "./index239.js";
9
- import c from "./index254.js";
10
- import { computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineAsyncComponent as g, defineComponent as _, mergeModels as v, mergeProps as y, normalizeClass as b, openBlock as x, ref as S, renderSlot as C, toDisplayString as w, toRef as T, unref as E, useAttrs as D, useModel as O, withCtx as k } from "vue";
1
+ import e from "./index36.js";
2
+ import { useLocale as t } from "./index42.js";
3
+ import { extractDomContainer as n } from "./index45.js";
4
+ import { isEqual as r } from "./index82.js";
5
+ import { noop as i } from "./index142.js";
6
+ import a from "./index219.js";
7
+ import { pickBy as o } from "./index239.js";
8
+ import s from "./index254.js";
9
+ import { computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineAsyncComponent as h, defineComponent as g, mergeModels as _, mergeProps as v, normalizeClass as y, openBlock as b, ref as x, renderSlot as S, toDisplayString as C, toRef as w, unref as T, useAttrs as E, useModel as D, withCtx as O } from "vue";
11
10
  //#region src/components/BbButton/BbButton.vue?vue&type=script&setup=true&lang.ts
12
- var A = {
11
+ var k = {
13
12
  key: 2,
14
13
  class: "bb-button__loading-label sr-only"
15
- }, j = /* @__PURE__ */ _({
14
+ }, A = /* @__PURE__ */ g({
16
15
  inheritAttrs: !1,
17
16
  __name: "BbButton",
18
- props: /* @__PURE__ */ v({
17
+ props: /* @__PURE__ */ _({
19
18
  autoLoading: { type: Boolean },
20
19
  activeClass: {},
21
20
  ariaCurrentValue: {},
@@ -64,28 +63,26 @@ var A = {
64
63
  modelModifiers: {}
65
64
  }),
66
65
  emits: ["update:modelValue"],
67
- setup(_, { expose: v }) {
68
- let j = g(() => import("./index345.js")), M = _, N = O(_, "modelValue"), P = l(() => N.value !== void 0), F = l(() => i(N.value, M.trueValue)), { t: I } = n();
69
- e();
70
- let L = D(), R = S(), z = (e) => {
71
- R.value = r(e) ?? void 0;
72
- }, B = l(() => {
73
- let { onClick: e, ...t } = L;
66
+ setup(g, { expose: _ }) {
67
+ let A = h(() => import("./index346.js")), j = g, M = D(g, "modelValue"), N = c(() => M.value !== void 0), P = c(() => r(M.value, j.trueValue)), { t: F } = t(), I = E(), L = x(), R = (e) => {
68
+ L.value = n(e) ?? void 0;
69
+ }, z = c(() => {
70
+ let { onClick: e, ...t } = I;
74
71
  return t;
75
- }), V = S(0), H = l(() => M.loading || !!V.value && M.autoLoading), U = l(() => M.disabled), W = async (e) => {
76
- if (H.value && !M.enabledWhileLoading) return (M.type === "submit" || M.href || M.to) && e.preventDefault(), null;
77
- if (P.value) {
78
- let e = M.trueValue, t = M.falseValue;
79
- N.value = i(N.value, e) ? t : e;
72
+ }), B = x(0), V = c(() => j.loading || !!B.value && j.autoLoading), H = c(() => j.disabled), U = async (e) => {
73
+ if (V.value && !j.enabledWhileLoading) return (j.type === "submit" || j.href || j.to) && e.preventDefault(), null;
74
+ if (N.value) {
75
+ let e = j.trueValue, t = j.falseValue;
76
+ M.value = r(M.value, e) ? t : e;
80
77
  }
81
- V.value++, await (L.onClick ?? a)(e), V.value--;
82
- }, G = typeof M.size == "string" ? { default: M.size } : {
78
+ B.value++, await (I.onClick ?? i)(e), B.value--;
79
+ }, W = typeof j.size == "string" ? { default: j.size } : {
83
80
  default: "md",
84
- ...M.size
85
- }, K = Object.entries(G).reduce((e, [t, n]) => (t === "default" ? e[`data-${n}`] = "" : e[`data-${t}:${n}`] = "", e), {}), q = T(() => ({
86
- ...B.value,
87
- ...K,
88
- ...s(M, (e, t) => ![
81
+ ...j.size
82
+ }, G = Object.entries(W).reduce((e, [t, n]) => (t === "default" ? e[`data-${n}`] = "" : e[`data-${t}:${n}`] = "", e), {}), K = w(() => ({
83
+ ...z.value,
84
+ ...G,
85
+ ...o(j, (e, t) => ![
89
86
  "append:icon",
90
87
  "autoLoading",
91
88
  "disabled",
@@ -102,51 +99,51 @@ var A = {
102
99
  "trueValue"
103
100
  ].includes(t))
104
101
  }));
105
- return v({ $el: R }), (e, n) => (x(), u(E(t), y({ ref: z }, q.value, {
106
- "aria-disabled": H.value ? !0 : void 0,
107
- "aria-pressed": P.value ? F.value : void 0,
102
+ return _({ $el: L }), (t, n) => (b(), l(T(e), v({ ref: R }, K.value, {
103
+ "aria-disabled": V.value ? !0 : void 0,
104
+ "aria-pressed": N.value ? P.value : void 0,
108
105
  class: {
109
106
  "bb-button": !0,
110
- "bb-button--loading": H.value,
111
- "bb-button--group": M.group,
112
- "bb-button--icon": !!e.icon,
113
- "bb-button--active": P.value && F.value
107
+ "bb-button--loading": V.value,
108
+ "bb-button--group": j.group,
109
+ "bb-button--icon": !!t.icon,
110
+ "bb-button--active": N.value && P.value
114
111
  },
115
- disabled: U.value,
116
- tabindex: H.value ? -1 : void 0,
117
- onClick: W
112
+ disabled: H.value,
113
+ tabindex: V.value ? -1 : void 0,
114
+ onClick: U
118
115
  }), {
119
- default: k(() => [
120
- h(E(c), { class: "bb-button__spinner" }),
121
- M.icon ? (x(), u(o, {
116
+ default: O(() => [
117
+ m(T(s), { class: "bb-button__spinner" }),
118
+ j.icon ? (b(), l(a, {
122
119
  key: 0,
123
120
  class: "bb-button__icon",
124
- type: M.icon
125
- }, null, 8, ["type"])) : M["prepend:icon"] ? (x(), u(o, {
121
+ type: j.icon
122
+ }, null, 8, ["type"])) : j["prepend:icon"] ? (b(), l(a, {
126
123
  key: 1,
127
124
  class: "bb-button__prepend-icon",
128
- type: M["prepend:icon"]
129
- }, null, 8, ["type"])) : d("", !0),
130
- p("span", { class: b(["bb-button__content", { "sr-only": !!e.icon }]) }, [C(e.$slots, "default", {}, () => [m(w(e.text), 1)])], 2),
131
- H.value ? (x(), f("span", A, w(E(I)("common.loadingText")), 1)) : d("", !0),
132
- !e.icon && M["append:icon"] ? (x(), u(o, {
125
+ type: j["prepend:icon"]
126
+ }, null, 8, ["type"])) : u("", !0),
127
+ f("span", { class: y(["bb-button__content", { "sr-only": !!t.icon }]) }, [S(t.$slots, "default", {}, () => [p(C(t.text), 1)])], 2),
128
+ V.value ? (b(), d("span", k, C(T(F)("common.loadingText")), 1)) : u("", !0),
129
+ !t.icon && j["append:icon"] ? (b(), l(a, {
133
130
  key: 3,
134
131
  class: "bb-button__append-icon",
135
- type: M["append:icon"]
136
- }, null, 8, ["type"])) : d("", !0),
137
- e.tooltip != null || e.$slots.tooltip ? (x(), u(E(j), {
132
+ type: j["append:icon"]
133
+ }, null, 8, ["type"])) : u("", !0),
134
+ t.tooltip != null || t.$slots.tooltip ? (b(), l(T(A), {
138
135
  key: 4,
139
- activator: R.value,
140
- placement: e.tooltipPlacement,
141
- timeout: e.tooltipTimeout
136
+ activator: L.value,
137
+ placement: t.tooltipPlacement,
138
+ timeout: t.tooltipTimeout
142
139
  }, {
143
- default: k(() => [C(e.$slots, "tooltip", { text: e.tooltip }, () => [m(w(e.tooltip), 1)])]),
140
+ default: O(() => [S(t.$slots, "tooltip", { text: t.tooltip }, () => [p(C(t.tooltip), 1)])]),
144
141
  _: 3
145
142
  }, 8, [
146
143
  "activator",
147
144
  "placement",
148
145
  "timeout"
149
- ])) : d("", !0)
146
+ ])) : u("", !0)
150
147
  ]),
151
148
  _: 3
152
149
  }, 16, [
@@ -159,4 +156,4 @@ var A = {
159
156
  }
160
157
  });
161
158
  //#endregion
162
- export { j as default };
159
+ export { A as default };
package/dist/index270.js CHANGED
@@ -56,7 +56,7 @@ var w = [
56
56
  let n = A.accept[t];
57
57
  if (n.includes("/")) e.push(n);
58
58
  else {
59
- k ||= (await import("./index356.js")).default;
59
+ k ||= (await import("./index357.js")).default;
60
60
  let t = k.getType(n);
61
61
  if (!t) throw Error(`Could not detect the correct mime associated with ${n}`);
62
62
  e.push(t);
package/dist/index325.js CHANGED
@@ -1,43 +1,36 @@
1
- import { useLogger as e } from "./index31.js";
2
- //#region src/components/BbTable/utils.ts
3
- var t = (t, n) => {
4
- if (!n.length) return;
5
- let r = Array.from(t.querySelectorAll(":scope > thead th"));
6
- if (!r.length) return;
7
- let { error: i } = e(), a = r.length, o = n.map((e) => ({
8
- index: typeof e == "number" ? e : e.index,
9
- position: typeof e == "number" ? "left" : e.position
10
- })).sort((e, t) => e.position === t.position ? e.position === "left" ? e.index - t.index : t.index - e.index : e.position === "left" ? -1 : 1).reduce((e, t) => {
11
- let n = r[t.index];
12
- if (!n) return i(`BbTable fixedColumns: Cannot affix column at index ${t.index}. Table has ${a} columns (valid indices: 0–${a - 1}).`), e;
13
- let { width: o } = n.getBoundingClientRect(), s = e.filter((e) => e.position === t.position).reduce((e, t) => e + t.width, 0);
14
- return e.push({
15
- index: t.index,
16
- position: t.position,
17
- width: Math.floor(o),
18
- offset: s
19
- }), e;
20
- }, []);
21
- Array.from(t.querySelectorAll(":scope > thead > tr, :scope > tbody > tr")).forEach((e) => {
22
- o.forEach((t) => {
23
- let n = e.querySelector(`:scope > :nth-child(${t.index + 1})`);
24
- n && (n.style.position = "sticky", n.style[t.position] = `${t.offset}px`);
25
- });
1
+ import { useId as e } from "./index12.js";
2
+ import { computed as t, onBeforeUnmount as n, onMounted as r, reactive as i, ref as a, toValue as o, watchEffect as s } from "vue";
3
+ //#region src/composables/useTableWidthContext.ts
4
+ var c = i(/* @__PURE__ */ new Map()), l = "[data-bb-table-id]";
5
+ function u(u) {
6
+ let d = e().id, f = t(() => o(u.id) || d.value), p = a(null), m = i({
7
+ id: f.value,
8
+ parentId: null,
9
+ tracks: {}
26
10
  });
27
- }, n = (e) => Array.isArray(e) ? e : [e], r = (e) => e.split(/\W+/g).join("_").toLowerCase(), i = (e, t, r) => {
28
- let i = [...n(e)];
29
- return t && i.push(...n(t)), r && i.push(...n(r)), i;
30
- }, a = (e, t, r, i, a, o) => {
31
- let s = [...n(e)], c = (e) => typeof e == "function" ? e(i, a, o) : e;
32
- if (t) {
33
- let e = c(t);
34
- e && s.push(...n(e));
35
- }
36
- if (r) {
37
- let e = c(r);
38
- e && s.push(...n(e));
39
- }
40
- return s;
41
- };
11
+ s(() => {
12
+ m.id = f.value, m.parentId = p.value, c.set(f.value, m);
13
+ }), r(() => {
14
+ p.value = (o(u.container)?.parentElement?.closest(l))?.dataset.bbTableId ?? null;
15
+ }), n(() => c.delete(f.value));
16
+ let h = t(() => p.value ? c.get(p.value) ?? null : null);
17
+ return {
18
+ id: f,
19
+ parentId: p,
20
+ parentNode: h,
21
+ parentHasTrack: (e) => !!h.value?.tracks[e],
22
+ parentVar: (e, t = "auto") => p.value ? `var(--bb-table-${p.value}-track-${e}, ${t})` : t,
23
+ node: m,
24
+ registry: c,
25
+ setTracks: (e) => {
26
+ m.tracks = e;
27
+ },
28
+ cssVars: t(() => {
29
+ let e = {};
30
+ for (let [t, n] of Object.entries(m.tracks)) e[`--bb-table-${f.value}-track-${t}`] = n;
31
+ return e;
32
+ })
33
+ };
34
+ }
42
35
  //#endregion
43
- export { t as applyFixedTableColumns, r as columnKeyToSlotName, a as mergeCellClasses, i as mergeHeaderClasses };
36
+ export { u as useTableWidthContext };