bitboss-ui 2.0.102 → 2.0.104

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 (163) hide show
  1. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +10 -16
  2. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +109 -7
  3. package/dist/components/BbSelect/BbSelect.vue.d.ts +2 -16
  4. package/dist/composables/useBaseOptions.d.ts +31 -0
  5. package/dist/composables/useCoherence.d.ts +20 -0
  6. package/dist/composables/useHashedWatcher.d.ts +2 -0
  7. package/dist/composables/useIndexById.d.ts +11 -0
  8. package/dist/composables/useItemsGetter.d.ts +12 -0
  9. package/dist/composables/usePrefill.d.ts +12 -0
  10. package/dist/index100.js +88 -60
  11. package/dist/index101.js +10 -13
  12. package/dist/index111.js +154 -126
  13. package/dist/index119.js +2 -2
  14. package/dist/index121.js +5 -5
  15. package/dist/index123.js +1 -1
  16. package/dist/index127.js +1 -1
  17. package/dist/index128.js +1 -1
  18. package/dist/index129.js +1 -1
  19. package/dist/index13.js +22 -22
  20. package/dist/index131.js +1 -1
  21. package/dist/index132.js +69 -65
  22. package/dist/index133.js +2 -2
  23. package/dist/index15.js +4 -4
  24. package/dist/index17.js +3 -3
  25. package/dist/index19.js +126 -82
  26. package/dist/index205.js +2 -81
  27. package/dist/index206.js +115 -2
  28. package/dist/index207.js +2 -2
  29. package/dist/index208.js +2 -2
  30. package/dist/index209.js +2 -2
  31. package/dist/index210.js +3 -3
  32. package/dist/index211.js +2 -2
  33. package/dist/index212.js +2 -2
  34. package/dist/index213.js +1 -1
  35. package/dist/index216.js +3 -3
  36. package/dist/index219.js +2 -2
  37. package/dist/index220.js +1 -1
  38. package/dist/index221.js +124 -51
  39. package/dist/{index235.js → index222.js} +1 -1
  40. package/dist/index223.js +2 -13
  41. package/dist/index224.js +41 -2
  42. package/dist/index225.js +20 -4
  43. package/dist/index226.js +6 -2
  44. package/dist/index227.js +51 -18
  45. package/dist/index229.js +12 -2
  46. package/dist/index23.js +11 -11
  47. package/dist/index230.js +5 -168
  48. package/dist/index231.js +10 -82
  49. package/dist/index232.js +371 -0
  50. package/dist/index233.js +4 -8
  51. package/dist/index234.js +83 -125
  52. package/dist/index236.js +8 -2
  53. package/dist/index237.js +24 -40
  54. package/dist/index238.js +17 -6
  55. package/dist/index239.js +48 -5
  56. package/dist/index240.js +15 -12
  57. package/dist/index241.js +11 -368
  58. package/dist/index242.js +16 -3
  59. package/dist/index243.js +2 -7
  60. package/dist/index244.js +4 -2
  61. package/dist/index245.js +2 -18
  62. package/dist/index246.js +3 -106
  63. package/dist/index247.js +9 -0
  64. package/dist/index248.js +2 -100
  65. package/dist/index249.js +20 -0
  66. package/dist/index25.js +5 -5
  67. package/dist/index250.js +106 -2
  68. package/dist/index252.js +100 -10
  69. package/dist/index254.js +11 -8
  70. package/dist/index255.js +2 -23
  71. package/dist/index256.js +3 -89
  72. package/dist/index257.js +4 -0
  73. package/dist/index258.js +10 -9
  74. package/dist/index259.js +3 -6
  75. package/dist/index260.js +8 -15
  76. package/dist/index261.js +23 -9
  77. package/dist/index262.js +88 -7
  78. package/dist/index264.js +8 -5
  79. package/dist/index265.js +6 -2
  80. package/dist/index266.js +16 -2
  81. package/dist/index267.js +281 -2
  82. package/dist/index268.js +6 -2
  83. package/dist/index269.js +2 -2
  84. package/dist/index27.js +1 -1
  85. package/dist/index271.js +2 -2
  86. package/dist/index272.js +2 -2
  87. package/dist/index273.js +2 -2
  88. package/dist/index274.js +2 -2
  89. package/dist/index275.js +2 -28
  90. package/dist/index276.js +1 -21
  91. package/dist/index277.js +4 -0
  92. package/dist/index278.js +2 -7
  93. package/dist/index279.js +28 -3
  94. package/dist/index280.js +24 -0
  95. package/dist/index282.js +7 -224
  96. package/dist/index283.js +3 -176
  97. package/dist/index284.js +7 -3
  98. package/dist/index285.js +11 -12
  99. package/dist/index286.js +16 -8
  100. package/dist/index287.js +7 -15
  101. package/dist/index288.js +3 -4
  102. package/dist/index29.js +3 -3
  103. package/dist/index290.js +174 -9
  104. package/dist/index293.js +1 -1
  105. package/dist/index296.js +1 -1
  106. package/dist/index297.js +3 -88
  107. package/dist/index298.js +8 -200
  108. package/dist/index301.js +200 -2
  109. package/dist/index302.js +89 -3
  110. package/dist/index303.js +1 -1
  111. package/dist/index304.js +3 -213
  112. package/dist/index305.js +206 -59
  113. package/dist/index306.js +224 -5
  114. package/dist/index307.js +5 -3
  115. package/dist/index308.js +2 -3
  116. package/dist/index309.js +66 -3
  117. package/dist/index31.js +2 -2
  118. package/dist/index310.js +3 -58
  119. package/dist/index311.js +6 -32
  120. package/dist/index312.js +18 -7
  121. package/dist/index313.js +5 -8
  122. package/dist/index314.js +7 -4
  123. package/dist/index315.js +3 -8
  124. package/dist/index316.js +3 -7
  125. package/dist/index317.js +56 -17
  126. package/dist/index318.js +8 -7
  127. package/dist/index319.js +8 -4
  128. package/dist/index320.js +7 -2
  129. package/dist/index321.js +3 -46
  130. package/dist/index322.js +33 -480
  131. package/dist/index323.js +49 -0
  132. package/dist/index324.js +2 -424
  133. package/dist/index325.js +479 -46
  134. package/dist/index327.js +426 -0
  135. package/dist/index328.js +49 -0
  136. package/dist/index33.js +102 -61
  137. package/dist/index35.js +3 -3
  138. package/dist/index37.js +284 -244
  139. package/dist/index39.js +4 -4
  140. package/dist/index41.js +2 -2
  141. package/dist/index43.js +129 -84
  142. package/dist/index45.js +122 -120
  143. package/dist/index47.js +2 -2
  144. package/dist/index49.js +2 -2
  145. package/dist/index55.js +1 -1
  146. package/dist/index57.js +2 -2
  147. package/dist/index61.js +2 -2
  148. package/dist/index75.js +3 -3
  149. package/dist/index79.js +2 -2
  150. package/dist/index81.js +1 -1
  151. package/dist/index84.js +3 -3
  152. package/dist/index86.js +1 -1
  153. package/dist/index88.js +4 -4
  154. package/dist/index90.js +1 -1
  155. package/package.json +1 -1
  156. package/dist/composables/useOptions.d.ts +0 -43
  157. package/dist/index228.js +0 -6
  158. package/dist/index251.js +0 -4
  159. package/dist/index253.js +0 -5
  160. package/dist/index263.js +0 -283
  161. package/dist/index281.js +0 -6
  162. package/dist/index289.js +0 -9
  163. /package/dist/{index326.js → index329.js} +0 -0
package/dist/index33.js CHANGED
@@ -1,10 +1,16 @@
1
- import { defineComponent as B, ref as f, toRef as l, openBlock as E, createBlock as $, unref as b, withCtx as t, renderSlot as i, normalizeProps as c, guardReactiveProps as m, createVNode as C, mergeProps as v, createSlots as w } from "vue";
2
- import { useOptions as q } from "./index230.js";
3
- import z from "./index31.js";
1
+ import { defineComponent as F, ref as g, toRef as d, openBlock as M, createBlock as S, unref as V, withCtx as n, renderSlot as i, normalizeProps as f, guardReactiveProps as v, createVNode as R, mergeProps as B, createSlots as G } from "vue";
2
+ import N from "./index31.js";
4
3
  /* empty css */
5
- import F from "./index231.js";
4
+ import W from "./index234.js";
6
5
  /* empty css */
7
- const N = /* @__PURE__ */ B({
6
+ import { useItemsGetter as j } from "./index237.js";
7
+ import { usePrefill as A } from "./index242.js";
8
+ import { useIndexById as k } from "./index238.js";
9
+ import { useBaseOptions as K } from "./index239.js";
10
+ import { useCoherence as O } from "./index240.js";
11
+ import { hash as U } from "./index213.js";
12
+ import { useHashedWatcher as T } from "./index241.js";
13
+ const se = /* @__PURE__ */ F({
8
14
  __name: "BaseRadioGroup",
9
15
  props: {
10
16
  ariaDescribedby: {},
@@ -30,101 +36,136 @@ const N = /* @__PURE__ */ B({
30
36
  required: { type: Boolean }
31
37
  },
32
38
  emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
33
- setup(h, { emit: y }) {
34
- const o = h, n = y, p = f(), r = f(!1), { innerLoading: g, options: T } = q({
35
- dependencies: l(o, "dependencies"),
36
- depsDebounceTime: o.depsDebounceTime,
37
- disabled: l(o, "disabled"),
38
- emit: n,
39
- enforceCoherence: o.enforceCoherence,
40
- items: l(o, "items"),
39
+ setup(E, { emit: L }) {
40
+ const o = E, a = L, h = g(), r = g(!1), {
41
+ getter: u,
42
+ items: $,
43
+ loading: w
44
+ } = j({
45
+ items: d(o, "items")
46
+ }), m = () => {
47
+ o.enforceCoherence && !y.value && a("update:modelValue", null);
48
+ }, { hasPrefilled: C } = A({
49
+ onStart: !0,
50
+ currentValue: o.modelValue,
51
+ multiple: !1,
52
+ fn: async ({ prefill: e }) => {
53
+ await u(e, o.modelValue), m();
54
+ }
55
+ }), { data: D } = k({
56
+ items: d(o, "modelValue")
57
+ }), { options: b } = K({
58
+ disabled: d(o, "disabled"),
59
+ items: $,
41
60
  itemText: o.itemText,
42
61
  itemValue: o.itemValue,
43
- modelValue: l(o, "modelValue"),
44
- modelValueDebounceTime: o.modelValueDebounceTime,
62
+ max: 1 / 0,
63
+ selectable: !0,
64
+ selectedIndexedByHash: D
65
+ }), { data: I } = k({
66
+ items: b,
67
+ key: "valueHash"
68
+ }), { coherent: y } = O({
69
+ modelValue: d(o, "modelValue"),
45
70
  multiple: !1,
46
- prefill: !0,
47
- queryDebounceTime: 0,
48
- resetQueryOnOptionSelected: !1,
49
- stash: !1
50
- }), k = (e) => {
71
+ iteratee: (e) => !!I.value[U(e)]
72
+ });
73
+ let l = 0;
74
+ T(
75
+ () => o.modelValue,
76
+ async () => {
77
+ l++, y.value || (await u(!1, o.modelValue), m()), l--;
78
+ },
79
+ {
80
+ debounce: o.modelValueDebounceTime
81
+ }
82
+ ), T(
83
+ () => [o.dependencies, o.items],
84
+ async () => {
85
+ C.value && (l++, await u(!1, o.modelValue), l === 1 && m(), l--);
86
+ },
87
+ {
88
+ debounce: o.depsDebounceTime
89
+ }
90
+ );
91
+ const H = (e) => {
51
92
  if (o.id)
52
93
  return [o.id, e.valueHash].filter(Boolean).join("-");
53
- }, V = {
54
- onBlur: (e) => n("blur", e),
55
- onChange: (e) => n("change", e),
56
- onClick: (e) => n("click", e),
94
+ }, P = {
95
+ onBlur: (e) => a("blur", e),
96
+ onChange: (e) => a("change", e),
97
+ onClick: (e) => a("click", e),
57
98
  onFocus: (e) => {
58
- n("focus", e), r.value || (document.addEventListener("focusin", d, { passive: !0 }), document.addEventListener("click", u, { passive: !0 }), r.value = !0);
99
+ a("focus", e), r.value || (document.addEventListener("focusin", c, { passive: !0 }), document.addEventListener("click", p, { passive: !0 }), r.value = !0);
59
100
  },
60
- onInput: (e) => n("input", e),
61
- onKeydown: (e) => n("keydown", e),
62
- onMousedown: (e) => n("mousedown", e),
63
- onMouseup: (e) => n("mouseup", e),
64
- "onUpdate:modelValue": (e) => n("update:modelValue", e)
65
- }, d = (e) => {
101
+ onInput: (e) => a("input", e),
102
+ onKeydown: (e) => a("keydown", e),
103
+ onMousedown: (e) => a("mousedown", e),
104
+ onMouseup: (e) => a("mouseup", e),
105
+ "onUpdate:modelValue": (e) => a("update:modelValue", e)
106
+ }, c = (e) => {
66
107
  var s;
67
- e.target instanceof HTMLElement && ((s = p.value) != null && s.contains(e.target) || (n("inactive"), r.value = !1, document.removeEventListener("focusin", d), document.removeEventListener("click", u)));
68
- }, u = (e) => {
108
+ e.target instanceof HTMLElement && ((s = h.value) != null && s.contains(e.target) || (a("inactive"), r.value = !1, document.removeEventListener("focusin", c), document.removeEventListener("click", p)));
109
+ }, p = (e) => {
69
110
  var s;
70
- e.target instanceof HTMLElement && ((s = p.value) != null && s.contains(e.target) || (n("inactive"), r.value = !1, document.removeEventListener("focusin", d), document.removeEventListener("click", u)));
111
+ e.target instanceof HTMLElement && ((s = h.value) != null && s.contains(e.target) || (a("inactive"), r.value = !1, document.removeEventListener("focusin", c), document.removeEventListener("click", p)));
71
112
  };
72
- return (e, s) => (E(), $(F, {
113
+ return (e, s) => (M(), S(W, {
73
114
  class: "bb-base-radio-group",
74
115
  direction: e.direction,
75
116
  "has-errors": e.hasErrors,
76
117
  "hide-label": e.hideLabel,
77
- loading: !!b(g),
118
+ loading: !!V(w),
78
119
  "loading-text": e.loadingText,
79
120
  "no-data-text": e.noDataText,
80
- options: b(T)
121
+ options: V(b)
81
122
  }, {
82
- prepend: t(() => [
123
+ prepend: n(() => [
83
124
  i(e.$slots, "prepend")
84
125
  ]),
85
- loading: t(() => [
126
+ loading: n(() => [
86
127
  i(e.$slots, "loading")
87
128
  ]),
88
- "no-data": t(() => [
129
+ "no-data": n(() => [
89
130
  i(e.$slots, "no-data")
90
131
  ]),
91
- label: t((a) => [
92
- i(e.$slots, "label", c(m(a)))
132
+ label: n((t) => [
133
+ i(e.$slots, "label", f(v(t)))
93
134
  ]),
94
- "option:prepend": t((a) => [
95
- i(e.$slots, "option:prepend", c(m(a)))
135
+ "option:prepend": n((t) => [
136
+ i(e.$slots, "option:prepend", f(v(t)))
96
137
  ]),
97
- input: t(({ option: a, index: D }) => [
98
- C(z, v({
99
- id: k(a),
138
+ input: n(({ option: t, index: q }) => [
139
+ R(N, B({
140
+ id: H(t),
100
141
  "aria-describedby": e.ariaDescribedby,
101
- autofocus: e.autofocus && !D,
102
- checked: a.selected,
142
+ autofocus: e.autofocus && !q,
143
+ checked: t.selected,
103
144
  color: e.color,
104
- disabled: a.disabled,
145
+ disabled: t.disabled,
105
146
  "has-errors": e.hasErrors,
106
147
  "model-value": o.modelValue,
107
148
  name: e.name,
108
149
  readonly: e.readonly,
109
150
  required: e.required,
110
- value: a.value
111
- }, V), w({ _: 2 }, [
151
+ value: t.value
152
+ }, P), G({ _: 2 }, [
112
153
  e.$slots.icon ? {
113
154
  name: "icon",
114
- fn: t((L) => [
115
- i(e.$slots, "icon", v({
116
- item: a.item,
117
- text: a.text
118
- }, L))
155
+ fn: n((z) => [
156
+ i(e.$slots, "icon", B({
157
+ item: t.item,
158
+ text: t.text
159
+ }, z))
119
160
  ]),
120
161
  key: "0"
121
162
  } : void 0
122
163
  ]), 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "model-value", "name", "readonly", "required", "value"])
123
164
  ]),
124
- "option:append": t((a) => [
125
- i(e.$slots, "option:append", c(m(a)))
165
+ "option:append": n((t) => [
166
+ i(e.$slots, "option:append", f(v(t)))
126
167
  ]),
127
- append: t(() => [
168
+ append: n(() => [
128
169
  i(e.$slots, "append")
129
170
  ]),
130
171
  _: 3
@@ -132,5 +173,5 @@ const N = /* @__PURE__ */ B({
132
173
  }
133
174
  });
134
175
  export {
135
- N as default
176
+ se as default
136
177
  };
package/dist/index35.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as C, ref as g, computed as f, openBlock as l, createElementBlock as i, mergeProps as h, createElementVNode as r, renderSlot as p, Fragment as B, renderList as I, normalizeClass as V, toDisplayString as M } from "vue";
2
- import { booleanishToBoolean as D } from "./index226.js";
3
- import { identity as F } from "./index236.js";
4
- import { isCssColor as v } from "./index224.js";
2
+ import { booleanishToBoolean as D } from "./index245.js";
3
+ import { identity as F } from "./index223.js";
4
+ import { isCssColor as v } from "./index243.js";
5
5
  import { isNotNil as T } from "./index134.js";
6
6
  const $ = { class: "bb-base-rating__inner-container" }, q = { class: "bb-base-rating__label-text sr-only" }, x = ["id", "aria-describedby", "autofocus", "checked", "disabled", "name", "required", "value"], H = ["height", "width"], J = /* @__PURE__ */ C({
7
7
  __name: "BaseRating",