bitboss-ui 2.0.114 → 2.0.116

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 (173) hide show
  1. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +31 -58
  2. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +0 -5
  3. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +5 -0
  4. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +1 -1
  5. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +8 -167
  6. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
  7. package/dist/components/BbSelect/BbSelect.vue.d.ts +5 -0
  8. package/dist/index100.js +72 -70
  9. package/dist/index101.js +5 -3
  10. package/dist/index111.js +12 -12
  11. package/dist/index119.js +1 -1
  12. package/dist/index121.js +6 -6
  13. package/dist/index123.js +1 -1
  14. package/dist/index125.js +1 -1
  15. package/dist/index127.js +1 -1
  16. package/dist/index128.js +1 -1
  17. package/dist/index129.js +1 -1
  18. package/dist/index13.js +2 -2
  19. package/dist/index131.js +1 -1
  20. package/dist/index132.js +2 -2
  21. package/dist/index133.js +2 -2
  22. package/dist/index15.js +5 -5
  23. package/dist/index17.js +3 -3
  24. package/dist/index19.js +8 -8
  25. package/dist/index205.js +2 -115
  26. package/dist/index206.js +3 -2
  27. package/dist/index207.js +51 -6
  28. package/dist/index209.js +13 -126
  29. package/dist/index21.js +16 -16
  30. package/dist/index210.js +2 -5
  31. package/dist/index211.js +4 -125
  32. package/dist/index212.js +2 -16
  33. package/dist/index213.js +86 -16
  34. package/dist/index215.js +25 -15
  35. package/dist/index216.js +17 -2
  36. package/dist/index217.js +51 -2
  37. package/dist/index218.js +14 -40
  38. package/dist/index219.js +3 -13
  39. package/dist/index220.js +11 -19
  40. package/dist/index221.js +16 -6
  41. package/dist/index222.js +125 -14
  42. package/dist/index223.js +5 -53
  43. package/dist/index224.js +127 -0
  44. package/dist/index225.js +16 -13
  45. package/dist/index226.js +16 -5
  46. package/dist/index227.js +17 -367
  47. package/dist/index228.js +13 -17
  48. package/dist/index229.js +2 -27
  49. package/dist/index23.js +31 -32
  50. package/dist/index230.js +2 -250
  51. package/dist/index231.js +41 -52
  52. package/dist/index232.js +12 -43
  53. package/dist/index233.js +20 -5
  54. package/dist/index234.js +5 -59
  55. package/dist/index235.js +11 -82
  56. package/dist/index236.js +7 -0
  57. package/dist/index237.js +365 -21
  58. package/dist/index238.js +18 -16
  59. package/dist/index239.js +26 -47
  60. package/dist/index240.js +8 -15
  61. package/dist/index241.js +250 -12
  62. package/dist/index242.js +52 -16
  63. package/dist/index243.js +44 -2
  64. package/dist/index244.js +5 -4
  65. package/dist/index245.js +60 -2
  66. package/dist/index246.js +3 -4
  67. package/dist/index247.js +7 -3
  68. package/dist/index248.js +4 -3
  69. package/dist/index249.js +115 -7
  70. package/dist/index25.js +7 -7
  71. package/dist/index250.js +2 -2
  72. package/dist/index251.js +2 -18
  73. package/dist/index252.js +2 -106
  74. package/dist/index253.js +20 -0
  75. package/dist/index254.js +53 -47
  76. package/dist/index256.js +100 -12
  77. package/dist/index258.js +12 -2
  78. package/dist/index261.js +9 -9
  79. package/dist/index262.js +23 -6
  80. package/dist/index263.js +89 -15
  81. package/dist/index265.js +8 -0
  82. package/dist/index266.js +15 -8
  83. package/dist/index267.js +224 -23
  84. package/dist/index268.js +3 -9
  85. package/dist/index27.js +1 -1
  86. package/dist/index270.js +7 -28
  87. package/dist/index271.js +4 -281
  88. package/dist/index272.js +3 -6
  89. package/dist/index273.js +17 -2
  90. package/dist/index274.js +9 -2
  91. package/dist/index275.js +28 -2
  92. package/dist/index276.js +281 -2
  93. package/dist/index277.js +6 -2
  94. package/dist/index278.js +2 -2
  95. package/dist/index279.js +2 -126
  96. package/dist/index280.js +2 -431
  97. package/dist/index281.js +2 -176
  98. package/dist/index282.js +2 -2
  99. package/dist/index283.js +2 -3
  100. package/dist/index284.js +128 -0
  101. package/dist/index285.js +429 -5
  102. package/dist/index286.js +176 -22
  103. package/dist/index287.js +4 -0
  104. package/dist/index288.js +22 -7
  105. package/dist/index29.js +3 -3
  106. package/dist/index290.js +7 -2
  107. package/dist/index291.js +11 -2
  108. package/dist/index292.js +2 -2
  109. package/dist/index293.js +2 -2
  110. package/dist/index294.js +1 -1
  111. package/dist/index295.js +1 -1
  112. package/dist/index296.js +1 -21
  113. package/dist/index297.js +4 -0
  114. package/dist/index298.js +22 -3
  115. package/dist/index300.js +9 -200
  116. package/dist/index301.js +191 -427
  117. package/dist/index302.js +422 -113
  118. package/dist/index303.js +126 -3
  119. package/dist/index304.js +83 -218
  120. package/dist/index305.js +8 -89
  121. package/dist/index306.js +1 -1
  122. package/dist/index307.js +1 -1
  123. package/dist/index308.js +4 -4
  124. package/dist/index309.js +2 -5
  125. package/dist/index31.js +2 -2
  126. package/dist/index310.js +3 -2
  127. package/dist/index311.js +1 -1
  128. package/dist/index312.js +5 -5
  129. package/dist/index313.js +3 -8
  130. package/dist/index314.js +3 -3
  131. package/dist/index315.js +58 -3
  132. package/dist/index316.js +32 -57
  133. package/dist/index317.js +5 -3
  134. package/dist/index318.js +8 -53
  135. package/dist/index319.js +4 -53
  136. package/dist/index320.js +6 -46
  137. package/dist/index321.js +18 -6
  138. package/dist/index322.js +52 -18
  139. package/dist/index323.js +52 -32
  140. package/dist/index324.js +6 -3
  141. package/dist/index325.js +46 -6
  142. package/dist/index327.js +1 -1
  143. package/dist/index33.js +8 -8
  144. package/dist/index35.js +4 -4
  145. package/dist/index37.js +136 -135
  146. package/dist/index39.js +5 -5
  147. package/dist/index41.js +2 -2
  148. package/dist/index43.js +8 -8
  149. package/dist/index45.js +7 -7
  150. package/dist/index47.js +2 -2
  151. package/dist/index49.js +2 -2
  152. package/dist/index51.js +11 -12
  153. package/dist/index53.js +1 -1
  154. package/dist/index55.js +1 -1
  155. package/dist/index57.js +2 -2
  156. package/dist/index61.js +1 -1
  157. package/dist/index75.js +3 -3
  158. package/dist/index77.js +1 -1
  159. package/dist/index79.js +2 -2
  160. package/dist/index81.js +1 -1
  161. package/dist/index84.js +4 -4
  162. package/dist/index86.js +2 -2
  163. package/dist/index88.js +5 -5
  164. package/dist/index90.js +1 -1
  165. package/package.json +2 -2
  166. package/dist/index208.js +0 -5
  167. package/dist/index214.js +0 -21
  168. package/dist/index257.js +0 -4
  169. package/dist/index264.js +0 -92
  170. package/dist/index269.js +0 -10
  171. package/dist/index289.js +0 -13
  172. package/dist/index299.js +0 -19
  173. /package/dist/{index328.js → index329.js} +0 -0
@@ -70,7 +70,7 @@ export type BaseCheckboxGroupProps<T> = {
70
70
  */
71
71
  loadingText?: string;
72
72
  /**
73
- * Maximum number of selected items.
73
+ * Maximum number of selectable items.
74
74
  */
75
75
  max?: number;
76
76
  /**
@@ -106,67 +106,40 @@ export type BaseCheckboxGroupEvents = {
106
106
  (e: 'mouseup', event: MouseEvent): void;
107
107
  (e: 'update:modelValue', value: any): void;
108
108
  };
109
+ export type BaseCheckboxGroupSlots<T> = {
110
+ prepend?: (props: object) => any;
111
+ loading?: (props: object) => any;
112
+ 'no-data'?: (props: object) => any;
113
+ 'option:prepend'?: (props: {
114
+ checked: boolean;
115
+ disabled: boolean;
116
+ id?: string;
117
+ item: T;
118
+ text: string;
119
+ }) => any;
120
+ icon?: (props: SlotAttributes & {
121
+ item: T;
122
+ text: string;
123
+ }) => any;
124
+ label?: (props: {
125
+ item: T;
126
+ text: string;
127
+ checked: boolean;
128
+ }) => any;
129
+ 'option:append'?: (props: {
130
+ checked: boolean;
131
+ disabled: boolean;
132
+ id?: string;
133
+ item: T;
134
+ text: string;
135
+ }) => any;
136
+ append?: (props: object) => any;
137
+ };
109
138
  declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
110
139
  props: __VLS_PrettifyLocal<any & BaseCheckboxGroupProps<T>> & import('vue').PublicProps;
111
140
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
112
141
  attrs: any;
113
- slots: Readonly<{
114
- prepend?: (props: object) => any;
115
- loading?: (props: object) => any;
116
- 'no-data'?: (props: object) => any;
117
- 'option:prepend'?: (props: {
118
- checked: boolean;
119
- disabled: boolean;
120
- id?: string;
121
- item: T;
122
- text: string;
123
- }) => any;
124
- icon?: (props: SlotAttributes & {
125
- item: T;
126
- text: string;
127
- }) => any;
128
- label?: (props: {
129
- item: T;
130
- text: string;
131
- checked: boolean;
132
- }) => any;
133
- 'option:append'?: (props: {
134
- checked: boolean;
135
- disabled: boolean;
136
- id?: string;
137
- item: T;
138
- text: string;
139
- }) => any;
140
- append?: (props: object) => any;
141
- }> & {
142
- prepend?: (props: object) => any;
143
- loading?: (props: object) => any;
144
- 'no-data'?: (props: object) => any;
145
- 'option:prepend'?: (props: {
146
- checked: boolean;
147
- disabled: boolean;
148
- id?: string;
149
- item: T;
150
- text: string;
151
- }) => any;
152
- icon?: (props: SlotAttributes & {
153
- item: T;
154
- text: string;
155
- }) => any;
156
- label?: (props: {
157
- item: T;
158
- text: string;
159
- checked: boolean;
160
- }) => any;
161
- 'option:append'?: (props: {
162
- checked: boolean;
163
- disabled: boolean;
164
- id?: string;
165
- item: T;
166
- text: string;
167
- }) => any;
168
- append?: (props: object) => any;
169
- };
142
+ slots: Readonly<BaseCheckboxGroupSlots<T>> & BaseCheckboxGroupSlots<T>;
170
143
  emit: BaseCheckboxGroupEvents;
171
144
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
172
145
  [key: string]: any;
@@ -87,10 +87,6 @@ export type BaseDatePickerInputProps = {
87
87
  * Target element to teleport the calendar to.
88
88
  */
89
89
  teleportTarget?: string;
90
- /**
91
- * Width of the calendar
92
- */
93
- width?: number | string;
94
90
  };
95
91
  export type BaseDatePickerInputEvents = {
96
92
  (e: 'active'): void;
@@ -308,7 +304,6 @@ declare const __VLS_component: import('vue').DefineComponent<BaseDatePickerInput
308
304
  onActive?: (() => any) | undefined;
309
305
  }>, {
310
306
  autocomplete: string;
311
- width: number | string;
312
307
  allowWriting: boolean | "not-mobile";
313
308
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
314
309
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -151,6 +151,11 @@ export type BaseSelectProps = {
151
151
  * you either always return the previous items or you stash them passing `true` to this option.
152
152
  */
153
153
  stash?: boolean;
154
+ /**
155
+ * Function that returns a string to be displayed when the number of selected labels is greater than maxSelectedLabels.
156
+ * @param count - Number of selected labels.
157
+ */
158
+ selectedLabelsFn?: (count: number) => string;
154
159
  /**
155
160
  * Target to teleport the listbox to.
156
161
  */
@@ -65,7 +65,7 @@ export type BaseSliderProps = {
65
65
  */
66
66
  ticks?: boolean;
67
67
  /**
68
- * Proportionally translates the thumb so it remains on track. Set it to false when displaying ticks so they align with less effort.
68
+ * Proportionally translates the thumb so it remains on track. Set it to false when displaying ticks so they align.
69
69
  */
70
70
  thumbTranslate?: boolean;
71
71
  };
@@ -1,173 +1,14 @@
1
- import { HTMLAttributes, InputHTMLAttributes, MaybeRefOrGetter } from 'vue';
2
- import { NestedKeyOf } from '../../types/NestedKeyOf';
3
- import { SlotAttributes } from '../BaseCheckbox/BaseCheckbox.vue';
4
- export type BaseSwitchGroupProps<T> = {
5
- /**
6
- * Guides to the browser as to the type of information expected in the field.
7
- */
8
- ariaDescribedby?: InputHTMLAttributes['aria-describedby'];
9
- /**
10
- * Sets autofocus on page load.
11
- */
12
- autofocus?: InputHTMLAttributes['autofocus'];
13
- /**
14
- * Define a color for the component.
15
- *
16
- * Either a custom color or a coded color in common HEX, RGB, etc... format.
17
- */
18
- color?: string;
19
- /**
20
- * Defines an array of dependencies that will trigger actions in the component upon change.
21
- */
22
- dependencies?: any[];
23
- /**
24
- * Timeout used to debounce response to changes to dependencies.
25
- */
26
- depsDebounceTime?: number;
27
- /**
28
- * Direction of the layout of the inputs inside the fieldset. It can be either `horizontal` or `vertical`
29
- */
30
- direction?: 'horizontal' | 'vertical';
31
- /**
32
- * Disables the component
33
- */
34
- disabled?: boolean;
35
- /**
36
- * If coherence is enforce the input cannot have a modelValue the is incoherent with its current items.
37
- *
38
- * e.g. You cannot set v-model to a user that is not present in the items passed.
39
- *
40
- * modelValue will be reset upon incoherence.
41
- */
42
- enforceCoherence?: boolean;
43
- /**
44
- * Define if the component should be in an error state.
45
- * It usually attaches a CSS class for styling purposes.
46
- */
47
- hasErrors?: boolean;
48
- /**
49
- * Visually hides the label of the input while maintaining accessibility.
50
- */
51
- hideLabel?: boolean;
52
- /**
53
- * The identifier of the component.
54
- */
55
- id?: HTMLAttributes['id'];
56
- /**
57
- * Used to retrieve items can be an array or a function.
58
- */
59
- items: T[] | ((prefill: boolean, modelValue?: any[]) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[]) => T[]);
60
- /**
61
- * Defines a path that returns a property of the object to use as text or a function that returns a string
62
- */
63
- itemText?: T extends object ? NestedKeyOf<T> | ((item: T) => string) : ((item: T) => string) | undefined;
64
- /**
65
- * Defines a path that returns a property of the object to use as value or a function that returns any value
66
- */
67
- itemValue?: T extends object ? NestedKeyOf<T> | ((item: T) => string) : ((item: T) => any) | undefined;
68
- /**
69
- * String displayed while items are being loaded.
70
- */
71
- loadingText?: string;
72
- /**
73
- * Maximum number of selected items.
74
- */
75
- max?: number;
76
- /**
77
- * Used by v-model. Can be an array of any serializable type.
78
- */
79
- modelValue: any[];
80
- /**
81
- * Timeout used to debounce response to changes to modelValue.
82
- */
83
- modelValueDebounceTime?: number;
84
- /**
85
- * Defines the name of the input.
86
- */
87
- name?: InputHTMLAttributes['name'];
88
- /**
89
- * String displayed when there are no items to display.
90
- */
91
- noDataText?: MaybeRefOrGetter<string>;
92
- /**
93
- * Sets the input in a readonly state.
94
- */
95
- readonly?: boolean;
96
- };
97
- export type BaseSwitchGroupEvents = {
98
- (e: 'blur', event: FocusEvent): void;
99
- (e: 'change', event: Event): void;
100
- (e: 'click', event: MouseEvent): void;
101
- (e: 'focus', event: FocusEvent): void;
102
- (e: 'inactive'): void;
103
- (e: 'input', event: Event): void;
104
- (e: 'keydown', event: KeyboardEvent): void;
105
- (e: 'mousedown', event: MouseEvent): void;
106
- (e: 'mouseup', event: MouseEvent): void;
107
- (e: 'update:modelValue', value: any): void;
108
- };
1
+ import { BaseCheckboxGroupEvents, BaseCheckboxGroupProps, BaseCheckboxGroupSlots } from '../BaseCheckboxGroup/BaseCheckboxGroup.vue';
2
+ export type BaseSwitchGroupProps<T> = BaseCheckboxGroupProps<T>;
3
+ export type BaseSwitchGroupEvents = BaseCheckboxGroupEvents;
109
4
  declare const _default: <T = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
110
- props: __VLS_PrettifyLocal<any & BaseSwitchGroupProps<T>> & import('vue').PublicProps;
5
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
+ readonly [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
7
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, `on${Capitalize<any>}`> & BaseSwitchGroupProps<T>> & import('vue').PublicProps;
111
8
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
112
9
  attrs: any;
113
- slots: Readonly<{
114
- prepend?: (props: object) => any;
115
- loading?: (props: object) => any;
116
- 'no-data'?: (props: object) => any;
117
- 'option:prepend'?: (props: {
118
- checked: boolean;
119
- disabled: boolean;
120
- id?: string;
121
- item: T;
122
- text: string;
123
- }) => any;
124
- icon?: (props: SlotAttributes & {
125
- item: T;
126
- text: string;
127
- }) => any;
128
- label?: (props: {
129
- item: T;
130
- text: string;
131
- checked: boolean;
132
- }) => any;
133
- 'option:append'?: (props: {
134
- checked: boolean;
135
- disabled: boolean;
136
- id?: string;
137
- item: T;
138
- text: string;
139
- }) => any;
140
- append?: (props: object) => any;
141
- }> & {
142
- prepend?: (props: object) => any;
143
- loading?: (props: object) => any;
144
- 'no-data'?: (props: object) => any;
145
- 'option:prepend'?: (props: {
146
- checked: boolean;
147
- disabled: boolean;
148
- id?: string;
149
- item: T;
150
- text: string;
151
- }) => any;
152
- icon?: (props: SlotAttributes & {
153
- item: T;
154
- text: string;
155
- }) => any;
156
- label?: (props: {
157
- item: T;
158
- text: string;
159
- checked: boolean;
160
- }) => any;
161
- 'option:append'?: (props: {
162
- checked: boolean;
163
- disabled: boolean;
164
- id?: string;
165
- item: T;
166
- text: string;
167
- }) => any;
168
- append?: (props: object) => any;
169
- };
170
- emit: BaseSwitchGroupEvents;
10
+ slots: Readonly<BaseCheckboxGroupSlots<T>> & BaseCheckboxGroupSlots<T>;
11
+ emit: BaseCheckboxGroupEvents;
171
12
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
172
13
  [key: string]: any;
173
14
  }> & {
@@ -1,6 +1,6 @@
1
1
  import { BbCollapsibleProps } from '../BbCollapsible/BbCollapsible.vue';
2
2
  import { CommonProps } from '../../types/CommonProps';
3
- export type BbAccordionProps = Partial<BbCollapsibleProps> & Pick<CommonProps, 'id'>;
3
+ export type BbAccordionProps = Pick<BbCollapsibleProps, 'eager' | 'transitionDuration' | 'modelValue'> & Pick<CommonProps, 'id'>;
4
4
  export type BbAccordionEvents = {
5
5
  (e: 'update:modelValue', value: boolean): void;
6
6
  };
@@ -173,6 +173,11 @@ export type BbSelectProps<T> = {
173
173
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
174
174
  */
175
175
  reverse?: boolean;
176
+ /**
177
+ * Function that returns a string to be displayed when the number of selected labels is greater than maxSelectedLabels.
178
+ * @param count - Number of selected labels.
179
+ */
180
+ selectedLabelsFn?: (count: number) => string;
176
181
  /**
177
182
  * Adds a stash to accumulate selected values. Especially
178
183
  * useful when searching in a big database of items.
package/dist/index100.js CHANGED
@@ -1,14 +1,14 @@
1
- import { defineComponent as P, mergeModels as b, computed as I, toRef as m, reactive as R, useModel as B, watch as j, openBlock as g, createElementBlock as k, Fragment as x, renderSlot as r, unref as E, createCommentVNode as G, renderList as U } from "vue";
2
- import { useItemValue as W } from "./index268.js";
3
- import { isNil as H } from "./index257.js";
4
- import { indexBy as q } from "./index269.js";
5
- import { hash as w } from "./index208.js";
6
- import { useItemsGetter as z } from "./index237.js";
7
- import { usePrefill as J } from "./index242.js";
8
- import { useIndexById as K } from "./index238.js";
9
- import { useBaseOptions as Q } from "./index239.js";
10
- import { useHashedWatcher as X } from "./index241.js";
11
- const ne = /* @__PURE__ */ P({
1
+ import { defineComponent as R, mergeModels as b, computed as I, toRef as m, reactive as j, useModel as B, watch as E, openBlock as g, createElementBlock as k, Fragment as H, renderSlot as p, unref as x, createCommentVNode as G, renderList as U } from "vue";
2
+ import { useItemValue as W } from "./index274.js";
3
+ import { isNil as w } from "./index251.js";
4
+ import { indexBy as q } from "./index305.js";
5
+ import { hash as M } from "./index219.js";
6
+ import { useItemsGetter as z } from "./index215.js";
7
+ import { usePrefill as J } from "./index221.js";
8
+ import { useIndexById as K } from "./index216.js";
9
+ import { useBaseOptions as Q } from "./index217.js";
10
+ import { useHashedWatcher as X } from "./index220.js";
11
+ const de = /* @__PURE__ */ R({
12
12
  __name: "BbRows",
13
13
  props: /* @__PURE__ */ b({
14
14
  columns: { default: () => [] },
@@ -31,103 +31,105 @@ const ne = /* @__PURE__ */ P({
31
31
  "select-allModifiers": {}
32
32
  }),
33
33
  emits: /* @__PURE__ */ b(["update:modelValue"], ["update:unselected-items", "update:select-all"]),
34
- setup(d, { emit: M }) {
35
- const l = d, u = M, { getItemValue: O } = W(), p = I(() => !!(l.loading || S.value)), {
36
- getter: f,
37
- items: v,
38
- loading: S
34
+ setup(r, { emit: O }) {
35
+ const l = r, o = O, { getItemValue: S } = W(), f = I(() => !!(l.loading || F.value)), {
36
+ getter: v,
37
+ items: y,
38
+ loading: F
39
39
  } = z({
40
40
  items: m(l, "items")
41
- }), { hasPrefilled: F } = J({
41
+ }), { hasPrefilled: N } = J({
42
42
  onStart: !0,
43
43
  currentValue: l.modelValue,
44
44
  multiple: l.multiple,
45
45
  fn: async ({ prefill: e }) => {
46
- await f(e, l.modelValue);
46
+ await v(e, l.modelValue);
47
47
  }
48
- }), { data: y } = K({
48
+ }), { data: h } = K({
49
49
  items: m(l, "modelValue")
50
- }), { options: N } = Q({
50
+ }), { options: T } = Q({
51
51
  disabled: m(l, "disabled"),
52
- items: v,
52
+ items: y,
53
53
  itemText: void 0,
54
54
  itemValue: l.itemValue,
55
55
  max: l.max,
56
56
  selectable: !0,
57
- selectedIndexedByHash: y
58
- }), T = async (e) => {
59
- l.multiple ? u("update:modelValue", l.modelValue.concat(e.value)) : u("update:modelValue", e.value);
60
- }, $ = async (e) => {
57
+ selectedIndexedByHash: h
58
+ }), $ = async (e) => {
59
+ l.multiple ? o("update:modelValue", l.modelValue.concat(e.value)) : o("update:modelValue", e.value);
60
+ }, A = async (e) => {
61
61
  if (l.multiple) {
62
- const t = { ...y.value };
63
- delete t[e.valueHash], u("update:modelValue", Object.values(t));
62
+ const t = { ...h.value };
63
+ delete t[e.valueHash], o("update:modelValue", Object.values(t));
64
64
  } else
65
- u("update:modelValue", null);
65
+ o("update:modelValue", null);
66
66
  };
67
67
  X(
68
68
  () => [l.dependencies, l.items],
69
69
  async () => {
70
- F.value && await f(!1, l.modelValue);
70
+ N.value && await v(!1, l.modelValue);
71
71
  },
72
72
  {
73
73
  debounce: l.depsDebounceTime
74
74
  }
75
75
  );
76
- const h = I(() => N.value.map((e) => {
76
+ const V = I(() => T.value.map((e) => {
77
77
  let t = !l.selectable;
78
- return typeof l.selectable == "function" && (t = !l.selectable(e.item)), t = t || !!e.disabled, {
79
- columns: q(
80
- l.columns.map((a) => {
81
- const { label: D, key: L } = a;
82
- let o = O(e.item, a.key);
83
- return a.formatter && // By default the formatter runs anyway
84
- (!H(o) || a.formatOnNull !== !1) && (o = a.formatter(o, a.key, e.item)), a.placeholder && H(o) && (o = a.placeholder), {
85
- value: o,
86
- key: L,
87
- label: D
88
- };
89
- }),
90
- (a) => a.key
91
- ),
78
+ typeof l.selectable == "function" && (t = !l.selectable(e.item)), t = t || !!e.disabled;
79
+ const a = q(
80
+ l.columns.map((s) => {
81
+ const { label: L, key: P } = s;
82
+ let u = S(e.item, s.key);
83
+ return s.formatter && // By default the formatter runs anyway
84
+ (!w(u) || s.formatOnNull !== !1) && (u = s.formatter(u, s.key, e.item)), s.placeholder && w(u) && (u = s.placeholder), {
85
+ value: u,
86
+ key: P,
87
+ label: L
88
+ };
89
+ }),
90
+ (s) => s.key
91
+ ), i = !!(e.selected || c.value) && !n.has(e.valueHash);
92
+ return {
93
+ columns: a,
92
94
  item: e.item,
93
95
  text: e.text,
94
96
  valueHash: e.valueHash,
95
97
  value: e.value,
96
- selected: !!(e.selected || i.value),
98
+ selected: i,
97
99
  disabled: t
98
100
  };
99
- })), A = (e) => {
100
- i.value || T(e), c.delete(e.valueHash), n.value = n.value.filter(
101
- (t) => w(t) !== w(e.item)
101
+ })), C = (e) => {
102
+ c.value || $(e), n.delete(e.valueHash), d.value = d.value.filter(
103
+ (t) => M(t) !== M(e.value)
102
104
  );
103
- }, C = (e) => {
104
- c.add(e.valueHash), n.value.push(e.item), $(e);
105
- }, c = R(/* @__PURE__ */ new Set()), n = B(d, "unselected-items");
106
- let i = B(d, "select-all");
107
- return j(i, () => {
108
- c.clear(), n.value = [], u("update:modelValue", []);
109
- }), (e, t) => (g(), k(x, null, [
110
- p.value ? r(e.$slots, "loading", {
105
+ }, D = (e) => {
106
+ n.add(e.valueHash), d.value.push(e.value), A(e);
107
+ }, n = j(/* @__PURE__ */ new Set()), d = B(r, "unselected-items");
108
+ let c = B(r, "select-all");
109
+ return E(c, () => {
110
+ n.clear(), d.value = [], o("update:modelValue", []);
111
+ }), (e, t) => (g(), k(H, null, [
112
+ f.value ? p(e.$slots, "loading", {
111
113
  key: 0,
112
- items: E(v)
114
+ items: x(y)
113
115
  }) : G("", !0),
114
- h.value.length ? (g(!0), k(x, { key: 2 }, U(h.value, (s, V) => r(e.$slots, "default", {
115
- key: s.valueHash,
116
- checked: s.selected,
117
- columns: s.columns,
118
- disabled: s.disabled,
119
- index: V,
120
- item: s.item,
121
- select: () => A(s),
122
- unselect: () => C(s),
123
- value: s.value
124
- })), 128)) : r(e.$slots, "no-data", {
116
+ V.value.length ? (g(!0), k(H, { key: 2 }, U(V.value, (a, i) => p(e.$slots, "default", {
117
+ key: a.valueHash + x(c),
118
+ checked: a.selected,
119
+ columns: a.columns,
120
+ disabled: a.disabled,
121
+ index: i,
122
+ item: a.item,
123
+ select: () => C(a),
124
+ unselect: () => D(a),
125
+ value: a.value
126
+ })), 128)) : p(e.$slots, "no-data", {
125
127
  key: 1,
126
- loading: p.value
128
+ loading: f.value
127
129
  })
128
130
  ], 64));
129
131
  }
130
132
  });
131
133
  export {
132
- ne as default
134
+ de as default
133
135
  };
package/dist/index101.js CHANGED
@@ -3,7 +3,7 @@ import V from "./index27.js";
3
3
  /* empty css */
4
4
  import w from "./index37.js";
5
5
  /* empty css */
6
- const P = /* @__PURE__ */ h({
6
+ const k = /* @__PURE__ */ h({
7
7
  __name: "BbSelect",
8
8
  props: {
9
9
  allowWriting: { type: [Boolean, String], default: !0 },
@@ -45,6 +45,7 @@ const P = /* @__PURE__ */ h({
45
45
  queryDebounceTime: {},
46
46
  readonly: { type: Boolean },
47
47
  reverse: { type: Boolean },
48
+ selectedLabelsFn: {},
48
49
  stash: { type: Boolean },
49
50
  teleportTarget: {},
50
51
  transitionDuration: {},
@@ -119,6 +120,7 @@ const P = /* @__PURE__ */ h({
119
120
  "query-debounce-time": e.queryDebounceTime,
120
121
  readonly: e.readonly,
121
122
  required: e.required,
123
+ "selected-labels-fn": e.selectedLabelsFn,
122
124
  stash: e.stash,
123
125
  "teleport-target": e.teleportTarget,
124
126
  "transition-duration": e.transitionDuration,
@@ -170,12 +172,12 @@ const P = /* @__PURE__ */ h({
170
172
  a(e.$slots, "spinner", l(i(o)))
171
173
  ]),
172
174
  _: 2
173
- }, 1040, ["id", "allow-writing", "append:icon", "aria-describedby", "autocomplete", "autofocus", "comma", "compact", "dependencies", "deps-debounce-time", "disabled", "enforce-coherence", "filter-by", "has-errors", "item-text", "item-value", "items", "loading", "loading-text", "max", "max-selected-labels", "model-value", "model-value-debounce-time", "multiple", "name", "no-data-text", "placeholder", "prefill", "prepend:icon", "query-debounce-time", "readonly", "required", "stash", "teleport-target", "transition-duration", "update-on-animation-frame"])
175
+ }, 1040, ["id", "allow-writing", "append:icon", "aria-describedby", "autocomplete", "autofocus", "comma", "compact", "dependencies", "deps-debounce-time", "disabled", "enforce-coherence", "filter-by", "has-errors", "item-text", "item-value", "items", "loading", "loading-text", "max", "max-selected-labels", "model-value", "model-value-debounce-time", "multiple", "name", "no-data-text", "placeholder", "prefill", "prepend:icon", "query-debounce-time", "readonly", "required", "selected-labels-fn", "stash", "teleport-target", "transition-duration", "update-on-animation-frame"])
174
176
  ]),
175
177
  _: 3
176
178
  }, 8, ["id", "compact", "direction", "errors", "has-errors", "hide-label", "hint", "label", "label-position", "model-value", "name", "reverse", "show-hint"]));
177
179
  }
178
180
  });
179
181
  export {
180
- P as default
182
+ k as default
181
183
  };
package/dist/index111.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import { defineComponent as me, mergeModels as K, ref as fe, computed as v, toRef as j, useModel as Q, watch as X, reactive as ye, openBlock as n, createBlock as Y, resolveDynamicComponent as he, normalizeClass as p, unref as b, withCtx as ve, createElementBlock as d, toDisplayString as m, createCommentVNode as _, createElementVNode as o, renderSlot as f, isRef as ke, Fragment as I, renderList as T, createVNode as Z, createTextVNode as _e, mergeProps as ge } from "vue";
2
- import { add as Ce } from "./index310.js";
3
- import { clamp as we } from "./index206.js";
4
- import { isNil as $ } from "./index257.js";
2
+ import { add as Ce } from "./index309.js";
3
+ import { clamp as we } from "./index205.js";
4
+ import { isNil as $ } from "./index251.js";
5
5
  import { useId as Ve } from "./index8.js";
6
- import { useItemValue as Be } from "./index268.js";
7
- import { when as Ie } from "./index244.js";
6
+ import { useItemValue as Be } from "./index274.js";
7
+ import { when as Ie } from "./index211.js";
8
8
  import ee from "./index17.js";
9
9
  /* empty css */
10
10
  import Te from "./index31.js";
11
11
  /* empty css */
12
- import { hash as le } from "./index208.js";
13
- import { useItemsGetter as $e } from "./index237.js";
14
- import { usePrefill as Ae } from "./index242.js";
15
- import { useIndexById as xe } from "./index238.js";
16
- import { useBaseOptions as Ne } from "./index239.js";
17
- import { useHashedWatcher as Le } from "./index241.js";
18
- import { useLocale as Se } from "./index219.js";
12
+ import { hash as le } from "./index219.js";
13
+ import { useItemsGetter as $e } from "./index215.js";
14
+ import { usePrefill as Ae } from "./index221.js";
15
+ import { useIndexById as xe } from "./index216.js";
16
+ import { useBaseOptions as Ne } from "./index217.js";
17
+ import { useHashedWatcher as Le } from "./index220.js";
18
+ import { useLocale as Se } from "./index232.js";
19
19
  const He = {
20
20
  key: 0,
21
21
  class: "sr-only"
package/dist/index119.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as l, openBlock as e, createBlock as o, withCtx as r, createElementVNode as c, normalizeClass as m, createVNode as i, TransitionGroup as u, createElementBlock as p, Fragment as f, renderList as _, unref as n, mergeProps as d } from "vue";
2
2
  import { state as k, useToast as b } from "./index11.js";
3
- import C from "./index222.js";
3
+ import C from "./index235.js";
4
4
  import B from "./index311.js";
5
5
  const V = /* @__PURE__ */ l({
6
6
  __name: "BbToast",
package/dist/index121.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as V, ref as a, watch as H, computed as z, openBlock as B, createElementBlock as I, mergeProps as R, createElementVNode as c, renderSlot as E, normalizeProps as S, guardReactiveProps as U, unref as u, createVNode as W, withCtx as C, createBlock as j, createCommentVNode as q } from "vue";
2
- import { useFloating as A, arrow as G } from "./index209.js";
2
+ import { useFloating as A, arrow as G } from "./index222.js";
3
3
  import { useId as J } from "./index8.js";
4
4
  import { wait as L } from "./index130.js";
5
5
  import K from "./index13.js";
6
6
  /* empty css */
7
- import { throttle as m } from "./index248.js";
8
- import { waitFor as Q } from "./index221.js";
9
- import X from "./index264.js";
7
+ import { throttle as m } from "./index246.js";
8
+ import { waitFor as Q } from "./index234.js";
9
+ import X from "./index263.js";
10
10
  /* empty css */
11
- import { useLocale as Y } from "./index219.js";
12
- import { autoUpdate as Z, flip as x, shift as ee, hide as te } from "./index227.js";
11
+ import { useLocale as Y } from "./index232.js";
12
+ import { autoUpdate as Z, flip as x, shift as ee, hide as te } from "./index237.js";
13
13
  const me = /* @__PURE__ */ V({
14
14
  __name: "BbTooltip",
15
15
  props: {