bitboss-ui 0.1.80 → 0.1.82

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 (224) hide show
  1. package/dist/components/BaseButton/BaseButton.vue.d.ts +5 -2
  2. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +3 -0
  3. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +10 -2
  4. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +3 -0
  5. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +3 -0
  6. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +3 -0
  7. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +3 -0
  8. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +4 -1
  9. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +4 -1
  10. package/dist/components/BaseRating/BaseRating.vue.d.ts +4 -1
  11. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +16 -2
  12. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +3 -0
  13. package/dist/components/BaseSwitch/BaseSwitch.vue.d.ts +3 -0
  14. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +3 -0
  15. package/dist/components/BaseTag/BaseTag.vue.d.ts +4 -1
  16. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +4 -1
  17. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +2 -2
  18. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +5 -2
  19. package/dist/components/BbAlert/BbAlert.vue.d.ts +3 -0
  20. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +7 -58
  21. package/dist/components/BbBadge/BbBadge.vue.d.ts +4 -1
  22. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +3 -0
  23. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +3 -0
  24. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +3 -0
  25. package/dist/components/BbChip/BbChip.vue.d.ts +7 -1
  26. package/dist/components/BbCollapsible/BbCollapsible.vue.d.ts +4 -1
  27. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -0
  28. package/dist/components/BbDialog/BbDialog.vue.d.ts +3 -0
  29. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +15 -3
  30. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +4 -1
  31. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +6 -7
  32. package/dist/components/BbIcon/BbIcon.vue.d.ts +3 -0
  33. package/dist/components/BbIntersection/BbIntersection.vue.d.ts +4 -1
  34. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +3 -0
  35. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -0
  36. package/dist/components/BbPagination/BbPagination.vue.d.ts +4 -1
  37. package/dist/components/BbPopover/BbPopover.vue.d.ts +14 -7
  38. package/dist/components/BbProgress/BbProgress.vue.d.ts +3 -0
  39. package/dist/components/BbRadio/BbRadio.vue.d.ts +3 -0
  40. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +1 -6
  41. package/dist/components/BbRating/BbRating.vue.d.ts +3 -0
  42. package/dist/components/BbRatio/BbRatio.vue.d.ts +4 -1
  43. package/dist/components/BbSelect/BbSelect.vue.d.ts +14 -3
  44. package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +5 -2
  45. package/dist/components/BbSpinner/BbSpinner.vue.d.ts +3 -0
  46. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +3 -0
  47. package/dist/components/BbTab/BbTab.vue.d.ts +4 -1
  48. package/dist/components/BbTable/BbTable.vue.d.ts +258 -295
  49. package/dist/components/BbTable/types.d.ts +214 -0
  50. package/dist/components/BbTag/BbTag.vue.d.ts +3 -0
  51. package/dist/components/BbToast/BbToast.vue.d.ts +3 -0
  52. package/dist/components/BbToast/BbToastMessage.vue.d.ts +3 -0
  53. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +8 -7
  54. package/dist/components/BbTree/BbTree.vue.d.ts +9 -1
  55. package/dist/composables/useItemText.d.ts +6 -1
  56. package/dist/index.d.ts +1 -1
  57. package/dist/index10.js +2 -2
  58. package/dist/index10.js.map +1 -1
  59. package/dist/index100.js +2 -2
  60. package/dist/index102.js +4 -3
  61. package/dist/index102.js.map +1 -1
  62. package/dist/index106.js +1 -1
  63. package/dist/index108.js +85 -57
  64. package/dist/index108.js.map +1 -1
  65. package/dist/index110.js +77 -55
  66. package/dist/index110.js.map +1 -1
  67. package/dist/index112.js +5 -5
  68. package/dist/index112.js.map +1 -1
  69. package/dist/index113.js +1 -1
  70. package/dist/index113.js.map +1 -1
  71. package/dist/index114.js +1 -1
  72. package/dist/index115.js +1 -1
  73. package/dist/index115.js.map +1 -1
  74. package/dist/index116.js +1 -1
  75. package/dist/index118.js +1 -1
  76. package/dist/index12.js +8 -8
  77. package/dist/index120.js +1 -1
  78. package/dist/index121.js +11 -11
  79. package/dist/index121.js.map +1 -1
  80. package/dist/index14.js +9 -9
  81. package/dist/index16.js +3 -3
  82. package/dist/index18.js +2 -2
  83. package/dist/index189.js +2 -2
  84. package/dist/index189.js.map +1 -1
  85. package/dist/index190.js +2 -4
  86. package/dist/index190.js.map +1 -1
  87. package/dist/index191.js +2 -2
  88. package/dist/index191.js.map +1 -1
  89. package/dist/index192.js +3 -2
  90. package/dist/index192.js.map +1 -1
  91. package/dist/index193.js +3 -2
  92. package/dist/index193.js.map +1 -1
  93. package/dist/index194.js +4 -3
  94. package/dist/index194.js.map +1 -1
  95. package/dist/index195.js +3 -35
  96. package/dist/index195.js.map +1 -1
  97. package/dist/index196.js +35 -6
  98. package/dist/index196.js.map +1 -1
  99. package/dist/index197.js +6 -350
  100. package/dist/index197.js.map +1 -1
  101. package/dist/index198.js +5 -134
  102. package/dist/index198.js.map +1 -1
  103. package/dist/index199.js +16 -5
  104. package/dist/index199.js.map +1 -1
  105. package/dist/index20.js +1 -1
  106. package/dist/index20.js.map +1 -1
  107. package/dist/index200.js +15 -18
  108. package/dist/index200.js.map +1 -1
  109. package/dist/index201.js +19 -2
  110. package/dist/index201.js.map +1 -1
  111. package/dist/index202.js +18 -184
  112. package/dist/index202.js.map +1 -1
  113. package/dist/index203.js +29 -23
  114. package/dist/index203.js.map +1 -1
  115. package/dist/index204.js +8 -331
  116. package/dist/index204.js.map +1 -1
  117. package/dist/index205.js +2 -2
  118. package/dist/index205.js.map +1 -1
  119. package/dist/index206.js +351 -2
  120. package/dist/index206.js.map +1 -1
  121. package/dist/index207.js +131 -13
  122. package/dist/index207.js.map +1 -1
  123. package/dist/index208.js +2 -16
  124. package/dist/index208.js.map +1 -1
  125. package/dist/index209.js +184 -18
  126. package/dist/index209.js.map +1 -1
  127. package/dist/index210.js +23 -29
  128. package/dist/index210.js.map +1 -1
  129. package/dist/index211.js +369 -8
  130. package/dist/index211.js.map +1 -1
  131. package/dist/index212.js +2 -3
  132. package/dist/index212.js.map +1 -1
  133. package/dist/index213.js +2 -3
  134. package/dist/index213.js.map +1 -1
  135. package/dist/index216.js +73 -53
  136. package/dist/index216.js.map +1 -1
  137. package/dist/index217.js +3 -3
  138. package/dist/index22.js +2 -2
  139. package/dist/index221.js +223 -10
  140. package/dist/index221.js.map +1 -1
  141. package/dist/index222.js +252 -429
  142. package/dist/index222.js.map +1 -1
  143. package/dist/index223.js +10 -8
  144. package/dist/index223.js.map +1 -1
  145. package/dist/index224.js +428 -82
  146. package/dist/index224.js.map +1 -1
  147. package/dist/index225.js +9 -8
  148. package/dist/index225.js.map +1 -1
  149. package/dist/index226.js +88 -5
  150. package/dist/index226.js.map +1 -1
  151. package/dist/index235.js +2 -69
  152. package/dist/index235.js.map +1 -1
  153. package/dist/index236.js +2 -162
  154. package/dist/index236.js.map +1 -1
  155. package/dist/index237.js +2 -2
  156. package/dist/index238.js +2 -2
  157. package/dist/index238.js.map +1 -1
  158. package/dist/index239.js +9 -2
  159. package/dist/index239.js.map +1 -1
  160. package/dist/index24.js +1 -1
  161. package/dist/index24.js.map +1 -1
  162. package/dist/index240.js +6 -2
  163. package/dist/index240.js.map +1 -1
  164. package/dist/index241.js +162 -2
  165. package/dist/index241.js.map +1 -1
  166. package/dist/index242.js +2 -2
  167. package/dist/index243.js +2 -224
  168. package/dist/index243.js.map +1 -1
  169. package/dist/index244.js +68 -257
  170. package/dist/index244.js.map +1 -1
  171. package/dist/index245.js +2 -38
  172. package/dist/index245.js.map +1 -1
  173. package/dist/index246.js +38 -2
  174. package/dist/index246.js.map +1 -1
  175. package/dist/index247.js +2 -2
  176. package/dist/index247.js.map +1 -1
  177. package/dist/index248.js +2 -2
  178. package/dist/index248.js.map +1 -1
  179. package/dist/index249.js +2 -2
  180. package/dist/index250.js +2 -2
  181. package/dist/index251.js +2 -2
  182. package/dist/index251.js.map +1 -1
  183. package/dist/index252.js +5 -0
  184. package/dist/index252.js.map +1 -0
  185. package/dist/index26.js +3 -3
  186. package/dist/index26.js.map +1 -1
  187. package/dist/index28.js +172 -155
  188. package/dist/index28.js.map +1 -1
  189. package/dist/index30.js +2 -2
  190. package/dist/index32.js +2 -2
  191. package/dist/index34.js +2 -2
  192. package/dist/index34.js.map +1 -1
  193. package/dist/index36.js +21 -19
  194. package/dist/index36.js.map +1 -1
  195. package/dist/index38.js.map +1 -1
  196. package/dist/index44.js +1 -1
  197. package/dist/index44.js.map +1 -1
  198. package/dist/index46.js +1 -1
  199. package/dist/index46.js.map +1 -1
  200. package/dist/index6.js.map +1 -1
  201. package/dist/index62.js +168 -137
  202. package/dist/index62.js.map +1 -1
  203. package/dist/index64.js +38 -30
  204. package/dist/index64.js.map +1 -1
  205. package/dist/index66.js.map +1 -1
  206. package/dist/index69.js +1 -1
  207. package/dist/index72.js +1 -1
  208. package/dist/index74.js.map +1 -1
  209. package/dist/index76.js +96 -66
  210. package/dist/index76.js.map +1 -1
  211. package/dist/index78.js +1 -1
  212. package/dist/index8.js +2 -2
  213. package/dist/index82.js +2 -2
  214. package/dist/index82.js.map +1 -1
  215. package/dist/index84.js.map +1 -1
  216. package/dist/index88.js +7 -4
  217. package/dist/index88.js.map +1 -1
  218. package/dist/index96.js +2 -2
  219. package/dist/index96.js.map +1 -1
  220. package/dist/index98.js +35 -30
  221. package/dist/index98.js.map +1 -1
  222. package/dist/style.css +1 -1
  223. package/dist/types/CommonProps.d.ts +15 -8
  224. package/package.json +1 -1
@@ -0,0 +1,214 @@
1
+ import { Classes } from '../../types/Classes';
2
+ import { CommonProps, GenericModelValue } from '../../types/CommonProps';
3
+ type NestedKeyOf<ObjectType extends object> = {
4
+ [Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : `${Key}`;
5
+ }[keyof ObjectType & (string | number)];
6
+ type Path<T extends object> = NestedKeyOf<T> | (string & Record<never, never>);
7
+ /**
8
+ * Column as defined from outside
9
+ */
10
+ export type TableColumn<U extends object = any> = {
11
+ /**
12
+ * Text alignment of the column.
13
+ */
14
+ align?: "left" | "right" | "center";
15
+ /**
16
+ * When set to false the formatter will not run on nullish values.
17
+ * By default is true so you can create virtual columns with keys that do not
18
+ * reference a prop in the `item` and still extract data from the other
19
+ * arguments in the formatting function.
20
+ */
21
+ formatOnNull?: boolean;
22
+ /**
23
+ * Formatting function used to generate enhanced content.
24
+ * @param content The content generated by the extraction of `Item[key]`
25
+ * @param key Key of the column taken from the column definition.
26
+ * @param item Item of the row.
27
+ */
28
+ formatter?: (content: any, key: string, item: U) => any;
29
+ /**
30
+ * Key identifying the column.
31
+ */
32
+ key: Path<U>;
33
+ /**
34
+ * Text used in the header for this column.
35
+ */
36
+ label: string;
37
+ /**
38
+ * Placeholder used when the pipeline returns null content.
39
+ */
40
+ placeholder?: string;
41
+ } & Pick<BbTableProps<U>, "tdClass" | "thClass">;
42
+ export type BbTableProps<T extends object = any> = Pick<CommonProps, "compact" | "dependencies" | "depsDebounceTime" | "disabled" | "itemValue" | "loading" | "loadingText" | "matchStrategy" | "multiple" | "name" | "noDataText" | "readonly"> & {
43
+ items: T[] | ((prefill: boolean, modelValue?: any[]) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[]) => T[]);
44
+ } & Partial<Pick<CommonProps, "legend">> & GenericModelValue & {
45
+ /**
46
+ * Function that accepts the columns and the current item as
47
+ * arguments and returns a label to be used for accessibility purposes.
48
+ */
49
+ accessibleLabel?: (columns: MappedCell[], item: T) => string;
50
+ /**
51
+ * Displays the actions column.
52
+ */
53
+ actions?: boolean;
54
+ /**
55
+ * Label used in the header of the actions column.
56
+ */
57
+ actionsText?: string;
58
+ /**
59
+ * Text alignment of the columns.
60
+ */
61
+ align?: "left" | "center" | "right";
62
+ /**
63
+ * Boolean that defines whether to display a "Select all" checkbox.
64
+ */
65
+ allowSelectAll?: boolean;
66
+ /**
67
+ * Caption that describes the content of the table. Used for accessibility purposes.
68
+ */
69
+ caption?: string;
70
+ /**
71
+ * Array of definitions of how the columns should be rendered.
72
+ */
73
+ columns: TableColumn<T>[];
74
+ /**
75
+ * Boolean that defines whether to display or hide the caption.
76
+ * By default is true and the caption is hidden.
77
+ */
78
+ displayCaption?: boolean;
79
+ /**
80
+ * Defines the table layout as fixed
81
+ * making each column take up the same amount of space.
82
+ */
83
+ fixed?: boolean;
84
+ /**
85
+ * Boolean that sets the headers as sticky top the top of the table.
86
+ */
87
+ fixedHeader?: boolean;
88
+ /**
89
+ * Definition for which column should be fixed.
90
+ * It can be an array of index of the column to fix on the left side of the table or
91
+ * an array of objects indicating the index and the position `left` or `right` where to affix the columns.
92
+ */
93
+ fixedColumns?: (number | {
94
+ index: number;
95
+ position: "left" | "right";
96
+ })[];
97
+ /**
98
+ * Defines whther the table is selectable.
99
+ * Can be a global boolean that affects all rows or a function
100
+ * that accepts an otem and returns a boolean that only affects that item.
101
+ */
102
+ selectable?: boolean | ((item: T) => boolean);
103
+ /**
104
+ * Used by v-model:selectAll. Indicates whether the "Select all" checkbox is checked or not.
105
+ */
106
+ selectAll?: boolean;
107
+ /**
108
+ * Text of the label used by the "Select all" boolean.
109
+ */
110
+ selectAllText?: string;
111
+ /**
112
+ * Text of the header used for the radio inputs when the table is not `multiple`.
113
+ */
114
+ selectText?: string;
115
+ /**
116
+ * Defines the classes to be passed to the `<td>` elements. Can also be a function for dynamic values.
117
+ */
118
+ tdClass?: ColumnClasses;
119
+ /**
120
+ * Defines the classes to be passed to the `<th>`.
121
+ */
122
+ thClass?: Classes;
123
+ };
124
+ /**
125
+ * We allow table data classes to be a function so it can depend on the item
126
+ */
127
+ export type ColumnClasses = Classes | (<T>(content: any, key: string, item: T) => Classes);
128
+ /**
129
+ * Projection that represents a row of cells with flags
130
+ * linked to the state of the item
131
+ */
132
+ export type MappedItem = {
133
+ accessibleLabel: string;
134
+ cols: MappedCell[];
135
+ jsonValue: string;
136
+ original: any;
137
+ selectable: boolean;
138
+ value: string;
139
+ onRowClick: (event: MouseEvent) => void;
140
+ onRowContextMenu: (event: MouseEvent) => void;
141
+ onRowDblClick: (event: MouseEvent) => void;
142
+ } & ({
143
+ selected: true;
144
+ selectedIndex: number;
145
+ } | {
146
+ selected: false;
147
+ selectedIndex: undefined;
148
+ });
149
+ /**
150
+ * Projection that represnets a header
151
+ */
152
+ export type MappedHeader = {
153
+ align: string;
154
+ classes?: Classes[];
155
+ key: string;
156
+ slotName: string;
157
+ label: string;
158
+ };
159
+ /**
160
+ * Projection that represents a cell of data.
161
+ */
162
+ export type MappedCell = {
163
+ align: string;
164
+ classes: Classes[];
165
+ content: string;
166
+ key: string;
167
+ label: string;
168
+ slotName: string;
169
+ };
170
+ export type BbTableEvents = {
171
+ (e: "click:row", event: MouseEvent, item: any, selected: boolean): void;
172
+ (e: "contextmenu:row", event: MouseEvent, item: any, selected: boolean): void;
173
+ (e: "dblclick:row", event: MouseEvent, item: any, selected: boolean): void;
174
+ (e: "update:modelValue", value: any): void;
175
+ (e: "update:selectAll", value: Boolean): void;
176
+ };
177
+ export type BbTableSlots<T = any> = {
178
+ thead?: (props: {}) => any;
179
+ tbody?: (props: {}) => any;
180
+ tfoot?: (props: {}) => any;
181
+ header_select?: (props: {
182
+ multiple: boolean;
183
+ selectAll: boolean;
184
+ }) => any;
185
+ header_actions?: (props: {
186
+ text: string;
187
+ }) => any;
188
+ loading?: (props: {
189
+ items: T[];
190
+ }) => any;
191
+ "no-data"?: (props: {}) => any;
192
+ actions?: (props: {
193
+ item: T;
194
+ value: any;
195
+ }) => any;
196
+ select?: (props: {
197
+ item: T;
198
+ value: any;
199
+ checked: boolean;
200
+ disabled: boolean;
201
+ inputName: string;
202
+ readonly: boolean;
203
+ }) => any;
204
+ } & {
205
+ [key: string]: (props: {
206
+ classes?: Classes[];
207
+ content?: any;
208
+ items?: T[];
209
+ item: T;
210
+ label?: string;
211
+ value?: any;
212
+ }) => any;
213
+ };
214
+ export {};
@@ -57,6 +57,9 @@ type __VLS_WithDefaults<P, D> = {
57
57
  default: D[K];
58
58
  }> : P[K];
59
59
  };
60
+ type __VLS_Prettify<T> = {
61
+ [K in keyof T]: T[K];
62
+ } & {};
60
63
  type __VLS_WithTemplateSlots<T, S> = T & {
61
64
  new (): {
62
65
  $slots: S;
@@ -26,3 +26,6 @@ type __VLS_WithDefaults<P, D> = {
26
26
  default: D[K];
27
27
  }> : P[K];
28
28
  };
29
+ type __VLS_Prettify<T> = {
30
+ [K in keyof T]: T[K];
31
+ } & {};
@@ -25,3 +25,6 @@ type __VLS_WithDefaults<P, D> = {
25
25
  default: D[K];
26
26
  }> : P[K];
27
27
  };
28
+ type __VLS_Prettify<T> = {
29
+ [K in keyof T]: T[K];
30
+ } & {};
@@ -1,11 +1,6 @@
1
1
  import { Placement } from "@floating-ui/vue";
2
2
  import type { CommonProps } from '../../types/CommonProps';
3
- export type BbTooltipProps = Pick<CommonProps, "block" | "disabled" | "id" | "placement" | "showClose" | "theme" | "transitionDuration"> & {
4
- /**
5
- * Minimum empty space to keep from the edge of the page
6
- */
7
- padding?: number;
8
- };
3
+ export type BbTooltipProps = Pick<CommonProps, "arrowPadding" | "block" | "disabled" | "eager" | "id" | "padding" | "placement" | "showClose" | "theme" | "transitionDuration">;
9
4
  type BbTooltipSlots = {
10
5
  activator?: (props: {
11
6
  props: {
@@ -27,23 +22,26 @@ declare const onMouseenter: () => void;
27
22
  declare const onFocus: () => void;
28
23
  declare const closeTooltip: () => Promise<void>;
29
24
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BbTooltipProps>, {
25
+ arrowPadding: number;
30
26
  padding: number;
31
27
  placement: string;
32
28
  showClose: boolean;
33
29
  theme: string;
34
30
  transitionDuration: number;
35
31
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BbTooltipProps>, {
32
+ arrowPadding: number;
36
33
  padding: number;
37
34
  placement: string;
38
35
  showClose: boolean;
39
36
  theme: string;
40
37
  transitionDuration: number;
41
38
  }>>>, {
39
+ arrowPadding: number;
40
+ padding: number;
42
41
  placement: "left" | "right" | "top" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
43
42
  showClose: boolean;
44
43
  theme: string;
45
44
  transitionDuration: number;
46
- padding: number;
47
45
  }, {}>, Readonly<BbTooltipSlots>>;
48
46
  export default _default;
49
47
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -60,6 +58,9 @@ type __VLS_WithDefaults<P, D> = {
60
58
  default: D[K];
61
59
  }> : P[K];
62
60
  };
61
+ type __VLS_Prettify<T> = {
62
+ [K in keyof T]: T[K];
63
+ } & {};
63
64
  type __VLS_WithTemplateSlots<T, S> = T & {
64
65
  new (): {
65
66
  $slots: S;
@@ -11,7 +11,7 @@ export type TreeItem = {
11
11
  */
12
12
  open?: boolean;
13
13
  [key: symbol | string]: any;
14
- } & Pick<BbTreeProps, 'expandable'>;
14
+ } & Pick<BbTreeProps, "expandable">;
15
15
  export type BbTreeProps = {
16
16
  /**
17
17
  * Array containing the tree like structure of the items.
@@ -42,6 +42,9 @@ export type BbTreeSlots = {
42
42
  [key: string]: (props: {
43
43
  item: any;
44
44
  parent?: any;
45
+ index: number;
46
+ offset: number;
47
+ open: boolean;
45
48
  depth: number;
46
49
  identifier?: string | number;
47
50
  expandable: boolean;
@@ -50,10 +53,12 @@ export type BbTreeSlots = {
50
53
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BbTreeProps>, {
51
54
  identifier: string;
52
55
  depth: number;
56
+ offset: number;
53
57
  items: () => TreeItem[];
54
58
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<BbTreeProps>, {
55
59
  identifier: string;
56
60
  depth: number;
61
+ offset: number;
57
62
  items: () => TreeItem[];
58
63
  }>>>, {
59
64
  items: TreeItem[];
@@ -75,6 +80,9 @@ type __VLS_WithDefaults<P, D> = {
75
80
  default: D[K];
76
81
  }> : P[K];
77
82
  };
83
+ type __VLS_Prettify<T> = {
84
+ [K in keyof T]: T[K];
85
+ } & {};
78
86
  type __VLS_WithTemplateSlots<T, S> = T & {
79
87
  new (): {
80
88
  $slots: S;
@@ -1,3 +1,8 @@
1
+ type NestedKeyOf<ObjectType extends object> = {
2
+ [Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : `${Key}`;
3
+ }[keyof ObjectType & (string | number)];
4
+ export type Path<T> = T extends object ? NestedKeyOf<T> | ((item: T) => string | number) | undefined | (string & Record<never, never>) : undefined;
1
5
  export declare const useItemText: () => {
2
- getItemText<T>(item: T, getter?: string | ((item: T) => string) | undefined): string;
6
+ getItemText<T>(item: T, getter?: Path<T> | undefined): string;
3
7
  };
8
+ export {};
package/dist/index.d.ts CHANGED
@@ -111,7 +111,7 @@ export type { BbSmoothHeightProps, BbSmoothHeightSlots } from "./components/BbSm
111
111
  export type { BbSpinnerProps, Size as BbSpinnerSizes } from "./components/BbSpinner/BbSpinner.vue";
112
112
  export type { BbSwitchGroupProps, BbSwitchGroupEvents } from "./components/BbSwitchGroup/BbSwitchGroup.vue";
113
113
  export type { BbSwitchProps, BbSwitchEvents } from "./components/BbSwitch/BbSwitch.vue";
114
- export type { BbTableProps, TableColumn, BbTableEvents, BbTableSlots } from "./components/BbTable/BbTable.vue";
114
+ export type { BbTableProps, TableColumn, BbTableEvents, BbTableSlots } from "./components/BbTable/types";
115
115
  export type { BbTabProps, BbTabEvents, BbTabItem } from "./components/BbTab/BbTab.vue";
116
116
  export type { BbTagProps, BbTagEvents } from "./components/BbTag/BbTag.vue";
117
117
  export type { BbTextareaProps, BbTextareaEvents } from "./components/BbTextarea/BbTextarea.vue";
package/dist/index10.js CHANGED
@@ -28,9 +28,9 @@ const M = { class: "bb-base-checkbox-group__container" }, H = {
28
28
  matchStrategy: { default: "string" },
29
29
  modelValueDebounceTime: { default: 0 },
30
30
  noDataText: { default: "Nessun elemento da visualizzare" },
31
- direction: { default: "horizontal" },
32
31
  modelValue: {},
33
- items: { type: [Array, Function], default: () => [] }
32
+ items: { type: [Array, Function], default: () => [] },
33
+ direction: { default: "horizontal" }
34
34
  },
35
35
  emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
36
36
  setup(C, { emit: E }) {
@@ -1 +1 @@
1
- {"version":3,"file":"index10.js","sources":["../src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-checkbox-group__container\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"bb-base-checkbox-group__loading-container\"\n}\nconst _hoisted_3 = {\n key: 1,\n class: \"bb-base-select__no-data-container\"\n}\n\nimport {\n default as BaseCheckbox,\n BaseCheckboxProps,\n} from \"../BaseCheckbox/BaseCheckbox.vue\";\nimport { ref, toRef } from \"vue\";\nimport { useOptions, type Option } from \"@/composables/useOptions\";\nimport type { Simplify } from \"@/types/Simplify\";\nimport type { SlotAttributes } from \"../BaseCheckbox/BaseCheckbox.vue\";\nimport type {\n CommonProps,\n Direction,\n OptionItems,\n GenericModelValueArray,\n} from \"@/types/CommonProps\";\n\nexport type BaseCheckboxGroupProps = Pick<\n BaseCheckboxProps,\n \"autofocus\" | \"color\" | \"disabled\" | \"id\" | \"name\" | \"readonly\"\n> &\n Pick<\n CommonProps,\n | \"dependencies\"\n | \"depsDebounceTime\"\n | \"enforceCoherence\"\n | \"hasErrors\"\n | \"hideLabel\"\n | \"itemText\"\n | \"itemValue\"\n | \"loadingText\"\n | \"matchStrategy\"\n | \"modelValueDebounceTime\"\n | \"noDataText\"\n > &\n Partial<Direction<\"horizontal\" | \"vertical\">> &\n Required<GenericModelValueArray> &\n OptionItems;\n\nexport type BaseCheckboxGroupEvents = {\n (e: \"blur\", event: FocusEvent): void;\n (e: \"change\", event: Event): void;\n (e: \"click\", event: MouseEvent): void;\n (e: \"focus\", event: FocusEvent): void;\n (e: \"inactive\"): void;\n (e: \"input\", event: Event): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n (e: \"mousedown\", event: MouseEvent): void;\n (e: \"mouseup\", event: MouseEvent): void;\n (e: \"update:modelValue\", value: any): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseCheckboxGroup',\n props: {\n autofocus: {},\n color: {},\n disabled: { type: Boolean },\n id: {},\n name: {},\n readonly: {},\n dependencies: {},\n depsDebounceTime: { default: 0 },\n enforceCoherence: { type: Boolean },\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n itemText: {},\n itemValue: {},\n loadingText: { default: \"Caricamento...\" },\n matchStrategy: { default: \"string\" },\n modelValueDebounceTime: { default: 0 },\n noDataText: { default: \"Nessun elemento da visualizzare\" },\n direction: { default: \"horizontal\" },\n modelValue: {},\n items: { type: [Array, Function], default: () => [] }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"inactive\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst { loading, options } = useOptions({\n dependencies: toRef(() => props.dependencies),\n depsDebounceTime: props.depsDebounceTime,\n disabled: toRef(() => props.disabled),\n emitter: (value) => emit(\"update:modelValue\", value),\n enforceCoherence: toRef(() => props.enforceCoherence),\n id: props.id,\n immediate: true,\n initialItems: toRef(() => props.items),\n itemText: props.itemText,\n itemValue: props.itemValue,\n matchStrategy: props.matchStrategy,\n modelValue: toRef(() => props.modelValue),\n modelValueDebounceTime: props.modelValueDebounceTime,\n multiple: true,\n});\n\n/**\n * When selecting an option split behavior based on single or multiple selection\n */\nconst onOptionSelected = (option: Option) => {\n let valueToEmit;\n if (option.selected) {\n valueToEmit = props.modelValue\n .slice(0, option.selectedIndex)\n .concat(props.modelValue.slice(option.selectedIndex + 1));\n } else {\n valueToEmit = props.modelValue.concat(option.value);\n }\n emit(\"update:modelValue\", valueToEmit);\n};\n\nconst onChange = (event: Event, option: Option) => {\n emit(\"change\", event);\n onOptionSelected(option);\n};\n\nconst onFocus = (event: FocusEvent) => {\n emit(\"focus\", event);\n if (!active.value) {\n document.addEventListener(\"focusin\", onDocumentFocus, { passive: true });\n document.addEventListener(\"click\", onDocumentClick, { passive: true });\n active.value = true;\n }\n};\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus,\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n if (event.target instanceof HTMLElement) {\n if (!container.value?.contains(event.target)) {\n emit(\"inactive\");\n active.value = false;\n document.removeEventListener(\"focusin\", onDocumentFocus);\n document.removeEventListener(\"click\", onDocumentClick);\n }\n }\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n if (event.target instanceof HTMLElement) {\n if (!container.value?.contains(event.target)) {\n emit(\"inactive\");\n active.value = false;\n document.removeEventListener(\"focusin\", onDocumentFocus);\n document.removeEventListener(\"click\", onDocumentClick);\n }\n }\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"bb-base-checkbox-group\", {\n 'bb-base-checkbox-group--errors': _ctx.hasErrors,\n 'bb-base-checkbox-group--horizontal': _ctx.direction === 'horizontal',\n 'bb-base-checkbox-group--vertical': _ctx.direction === 'vertical',\n }]),\n ref_key: \"container\",\n ref: container\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n (!_unref(options).length && _unref(loading))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, 'loading', {}, () => [\n _createTextVNode(_toDisplayString(_ctx.loadingText), 1)\n ])\n ]))\n : (!_unref(options).length)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, 'no-data', {}, () => [\n _createTextVNode(_toDisplayString(_ctx.noDataText), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(options), (option, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: option?.id || option.jsonValue\n }, [\n _renderSlot(_ctx.$slots, \"option:prepend\", {\n item: option.original\n }),\n _createElementVNode(\"label\", {\n class: _normalizeClass([\"bb-base-checkbox-group-option\", {\n 'bb-base-checkbox-group-option__selected': option.selected,\n }])\n }, [\n _createVNode(BaseCheckbox, _mergeProps({\n autofocus: _ctx.autofocus && !index,\n checked: option.selected,\n color: _ctx.color,\n disabled: option.disabled,\n \"has-errors\": _ctx.hasErrors,\n id: option.id,\n name: _ctx.name,\n readonly: _ctx.readonly,\n onChange: (event) => onChange(event, option),\n \"true-value\": option.value\n }, eventListeners), {\n icon: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"icon\", _mergeProps({\n item: option.original,\n text: option.text\n }, data))\n ]),\n _: 2\n }, 1040, [\"autofocus\", \"checked\", \"color\", \"disabled\", \"has-errors\", \"id\", \"name\", \"readonly\", \"onChange\", \"true-value\"]),\n _createElementVNode(\"span\", {\n class: _normalizeClass({\n 'bb-base-checkbox-group-option__text': true,\n 'bb-base-checkbox-group-option__text--hidden': _ctx.hideLabel,\n })\n }, [\n _renderSlot(_ctx.$slots, \"label\", {\n text: option.text,\n item: option.original,\n checked: option.selected\n }, () => [\n _createTextVNode(_toDisplayString(option.text), 1)\n ])\n ], 2)\n ], 2),\n _renderSlot(_ctx.$slots, \"option:append\", {\n item: option.original\n })\n ], 64))\n }), 128)),\n _renderSlot(_ctx.$slots, \"append\")\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","__emit","props","emit","container","ref","active","loading","options","useOptions","toRef","value","onOptionSelected","option","valueToEmit","onChange","event","eventListeners","onDocumentFocus","onDocumentClick","_a","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot","_unref","_createTextVNode","_toDisplayString","_createCommentVNode","_Fragment","_renderList","index","_createVNode","BaseCheckbox","_mergeProps","_withCtx","data"],"mappings":";;;;AAGA,MAAMA,IAAa,EAAE,OAAO,uCACtBC,IAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GACMC,IAAa;AAAA,EACjB,KAAK;AAAA,EACL,OAAO;AACT,GAoD4BC,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,OAAO,CAAC;AAAA,IACR,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,IAAI,CAAC;AAAA,IACL,MAAM,CAAC;AAAA,IACP,UAAU,CAAC;AAAA,IACX,cAAc,CAAC;AAAA,IACf,kBAAkB,EAAE,SAAS,EAAE;AAAA,IAC/B,kBAAkB,EAAE,MAAM,QAAQ;AAAA,IAClC,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,UAAU,CAAC;AAAA,IACX,WAAW,CAAC;AAAA,IACZ,aAAa,EAAE,SAAS,iBAAiB;AAAA,IACzC,eAAe,EAAE,SAAS,SAAS;AAAA,IACnC,wBAAwB,EAAE,SAAS,EAAE;AAAA,IACrC,YAAY,EAAE,SAAS,kCAAkC;AAAA,IACzD,WAAW,EAAE,SAAS,aAAa;AAAA,IACnC,YAAY,CAAC;AAAA,IACb,OAAO,EAAE,MAAM,CAAC,OAAO,QAAQ,GAAG,SAAS,MAAM,GAAG;AAAA,EACtD;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,SAAS,YAAY,SAAS,WAAW,aAAa,WAAW,mBAAmB;AAAA,EACvH,MAAMC,GAAc,EAAE,M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N,EAAK,QAAQ,QAAQgB,EAAY;AAAA,kBAC3C,MAAMxB,EAAO;AAAA,kBACb,MAAMA,EAAO;AAAA,gBACf,GAAG0B,CAAI,CAAC;AAAA,cAAA,CACT;AAAA,cACD,GAAG;AAAA,YACF,GAAA,MAAM,CAAC,aAAa,WAAW,SAAS,YAAY,cAAc,MAAM,QAAQ,YAAY,YAAY,YAAY,CAAC;AAAA,YACxHb,EAAoB,QAAQ;AAAA,cAC1B,OAAOD,EAAgB;AAAA,gBACvB,uCAAuC;AAAA,gBACvC,+CAA+CJ,EAAK;AAAA,cAAA,CACrD;AAAA,YAAA,GACE;AAAA,cACDM,EAAYN,EAAK,QAAQ,SAAS;AAAA,gBAChC,MAAMR,EAAO;AAAA,gBACb,MAAMA,EAAO;AAAA,gBACb,SAASA,EAAO;AAAA,cAAA,GACf,MAAM;AAAA,gBACPgB,EAAiBC,EAAiBjB,EAAO,IAAI,GAAG,CAAC;AAAA,cAAA,CAClD;AAAA,eACA,CAAC;AAAA,aACH,CAAC;AAAA,UACJc,EAAYN,EAAK,QAAQ,iBAAiB;AAAA,YACxC,MAAMR,EAAO;AAAA,UAAA,CACd;AAAA,WACA,EAAE,EACN,GAAG,GAAG;AAAA,QACPc,EAAYN,EAAK,QAAQ,QAAQ;AAAA,MAAA,CAClC;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
1
+ {"version":3,"file":"index10.js","sources":["../src/components/BaseCheckboxGroup/BaseCheckboxGroup.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { renderSlot as _renderSlot, unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from \"vue\"\n\nconst _hoisted_1 = { class: \"bb-base-checkbox-group__container\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"bb-base-checkbox-group__loading-container\"\n}\nconst _hoisted_3 = {\n key: 1,\n class: \"bb-base-select__no-data-container\"\n}\n\nimport {\n default as BaseCheckbox,\n BaseCheckboxProps,\n} from \"../BaseCheckbox/BaseCheckbox.vue\";\nimport { ref, toRef } from \"vue\";\nimport { useOptions, type Option } from \"@/composables/useOptions\";\nimport type { Simplify } from \"@/types/Simplify\";\nimport type { SlotAttributes } from \"../BaseCheckbox/BaseCheckbox.vue\";\nimport type {\n CommonProps,\n OptionItems,\n GenericModelValueArray,\n} from \"@/types/CommonProps\";\n\nexport type BaseCheckboxGroupProps = Pick<\n BaseCheckboxProps,\n \"autofocus\" | \"color\" | \"disabled\" | \"id\" | \"name\" | \"readonly\"\n> &\n Pick<\n CommonProps,\n | \"dependencies\"\n | \"depsDebounceTime\"\n | \"enforceCoherence\"\n | \"hasErrors\"\n | \"hideLabel\"\n | \"itemText\"\n | \"itemValue\"\n | \"loadingText\"\n | \"matchStrategy\"\n | \"modelValueDebounceTime\"\n | \"noDataText\"\n > &\n Required<GenericModelValueArray> &\n OptionItems & {\n /**\n * Direction of the layout of the inputs inside the fieldset. It can be either `horizontal` or `vertical`\n */\n direction?: \"horizontal\" | \"vertical\";\n };\n\nexport type BaseCheckboxGroupEvents = {\n (e: \"blur\", event: FocusEvent): void;\n (e: \"change\", event: Event): void;\n (e: \"click\", event: MouseEvent): void;\n (e: \"focus\", event: FocusEvent): void;\n (e: \"inactive\"): void;\n (e: \"input\", event: Event): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n (e: \"mousedown\", event: MouseEvent): void;\n (e: \"mouseup\", event: MouseEvent): void;\n (e: \"update:modelValue\", value: any): void;\n};\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BaseCheckboxGroup',\n props: {\n autofocus: {},\n color: {},\n disabled: { type: Boolean },\n id: {},\n name: {},\n readonly: {},\n dependencies: {},\n depsDebounceTime: { default: 0 },\n enforceCoherence: { type: Boolean },\n hasErrors: { type: Boolean },\n hideLabel: { type: Boolean },\n itemText: {},\n itemValue: {},\n loadingText: { default: \"Caricamento...\" },\n matchStrategy: { default: \"string\" },\n modelValueDebounceTime: { default: 0 },\n noDataText: { default: \"Nessun elemento da visualizzare\" },\n modelValue: {},\n items: { type: [Array, Function], default: () => [] },\n direction: { default: \"horizontal\" }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"inactive\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props;\n\nconst emit = __emit;\n\n\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst { loading, options } = useOptions({\n dependencies: toRef(() => props.dependencies),\n depsDebounceTime: props.depsDebounceTime,\n disabled: toRef(() => props.disabled),\n emitter: (value) => emit(\"update:modelValue\", value),\n enforceCoherence: toRef(() => props.enforceCoherence),\n id: props.id,\n immediate: true,\n initialItems: toRef(() => props.items),\n itemText: props.itemText,\n itemValue: props.itemValue,\n matchStrategy: props.matchStrategy,\n modelValue: toRef(() => props.modelValue),\n modelValueDebounceTime: props.modelValueDebounceTime,\n multiple: true,\n});\n\n/**\n * When selecting an option split behavior based on single or multiple selection\n */\nconst onOptionSelected = (option: Option) => {\n let valueToEmit;\n if (option.selected) {\n valueToEmit = props.modelValue\n .slice(0, option.selectedIndex)\n .concat(props.modelValue.slice(option.selectedIndex + 1));\n } else {\n valueToEmit = props.modelValue.concat(option.value);\n }\n emit(\"update:modelValue\", valueToEmit);\n};\n\nconst onChange = (event: Event, option: Option) => {\n emit(\"change\", event);\n onOptionSelected(option);\n};\n\nconst onFocus = (event: FocusEvent) => {\n emit(\"focus\", event);\n if (!active.value) {\n document.addEventListener(\"focusin\", onDocumentFocus, { passive: true });\n document.addEventListener(\"click\", onDocumentClick, { passive: true });\n active.value = true;\n }\n};\n\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus,\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n if (event.target instanceof HTMLElement) {\n if (!container.value?.contains(event.target)) {\n emit(\"inactive\");\n active.value = false;\n document.removeEventListener(\"focusin\", onDocumentFocus);\n document.removeEventListener(\"click\", onDocumentClick);\n }\n }\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n if (event.target instanceof HTMLElement) {\n if (!container.value?.contains(event.target)) {\n emit(\"inactive\");\n active.value = false;\n document.removeEventListener(\"focusin\", onDocumentFocus);\n document.removeEventListener(\"click\", onDocumentClick);\n }\n }\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n class: _normalizeClass([\"bb-base-checkbox-group\", {\n 'bb-base-checkbox-group--errors': _ctx.hasErrors,\n 'bb-base-checkbox-group--horizontal': _ctx.direction === 'horizontal',\n 'bb-base-checkbox-group--vertical': _ctx.direction === 'vertical',\n }]),\n ref_key: \"container\",\n ref: container\n }, [\n _createElementVNode(\"span\", _hoisted_1, [\n _renderSlot(_ctx.$slots, \"prepend\"),\n (!_unref(options).length && _unref(loading))\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_2, [\n _renderSlot(_ctx.$slots, 'loading', {}, () => [\n _createTextVNode(_toDisplayString(_ctx.loadingText), 1)\n ])\n ]))\n : (!_unref(options).length)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, [\n _renderSlot(_ctx.$slots, 'no-data', {}, () => [\n _createTextVNode(_toDisplayString(_ctx.noDataText), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(options), (option, index) => {\n return (_openBlock(), _createElementBlock(_Fragment, {\n key: option?.id || option.jsonValue\n }, [\n _renderSlot(_ctx.$slots, \"option:prepend\", {\n item: option.original\n }),\n _createElementVNode(\"label\", {\n class: _normalizeClass([\"bb-base-checkbox-group-option\", {\n 'bb-base-checkbox-group-option__selected': option.selected,\n }])\n }, [\n _createVNode(BaseCheckbox, _mergeProps({\n autofocus: _ctx.autofocus && !index,\n checked: option.selected,\n color: _ctx.color,\n disabled: option.disabled,\n \"has-errors\": _ctx.hasErrors,\n id: option.id,\n name: _ctx.name,\n readonly: _ctx.readonly,\n onChange: (event) => onChange(event, option),\n \"true-value\": option.value\n }, eventListeners), {\n icon: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"icon\", _mergeProps({\n item: option.original,\n text: option.text\n }, data))\n ]),\n _: 2\n }, 1040, [\"autofocus\", \"checked\", \"color\", \"disabled\", \"has-errors\", \"id\", \"name\", \"readonly\", \"onChange\", \"true-value\"]),\n _createElementVNode(\"span\", {\n class: _normalizeClass({\n 'bb-base-checkbox-group-option__text': true,\n 'bb-base-checkbox-group-option__text--hidden': _ctx.hideLabel,\n })\n }, [\n _renderSlot(_ctx.$slots, \"label\", {\n text: option.text,\n item: option.original,\n checked: option.selected\n }, () => [\n _createTextVNode(_toDisplayString(option.text), 1)\n ])\n ], 2)\n ], 2),\n _renderSlot(_ctx.$slots, \"option:append\", {\n item: option.original\n })\n ], 64))\n }), 128)),\n _renderSlot(_ctx.$slots, \"append\")\n ])\n ], 2))\n}\n}\n\n})"],"names":["_hoisted_1","_hoisted_2","_hoisted_3","_sfc_main","_defineComponent","__props","__emit","props","emit","container","ref","active","loading","options","useOptions","toRef","value","onOptionSelected","option","valueToEmit","onChange","event","eventListeners","onDocumentFocus","onDocumentClick","_a","_ctx","_cache","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot","_unref","_createTextVNode","_toDisplayString","_createCommentVNode","_Fragment","_renderList","index","_createVNode","BaseCheckbox","_mergeProps","_withCtx","data"],"mappings":";;;;AAGA,MAAMA,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C;AAAA,YACxHb,EAAoB,QAAQ;AAAA,cAC1B,OAAOD,EAAgB;AAAA,gBACvB,uCAAuC;AAAA,gBACvC,+CAA+CJ,EAAK;AAAA,cAAA,CACrD;AAAA,YAAA,GACE;AAAA,cACDM,EAAYN,EAAK,QAAQ,SAAS;AAAA,gBAChC,MAAMR,EAAO;AAAA,gBACb,MAAMA,EAAO;AAAA,gBACb,SAASA,EAAO;AAAA,cAAA,GACf,MAAM;AAAA,gBACPgB,EAAiBC,EAAiBjB,EAAO,IAAI,GAAG,CAAC;AAAA,cAAA,CAClD;AAAA,eACA,CAAC;AAAA,aACH,CAAC;AAAA,UACJc,EAAYN,EAAK,QAAQ,iBAAiB;AAAA,YACxC,MAAMR,EAAO;AAAA,UAAA,CACd;AAAA,WACA,EAAE,EACN,GAAG,GAAG;AAAA,QACPc,EAAYN,EAAK,QAAQ,QAAQ;AAAA,MAAA,CAClC;AAAA,OACA,CAAC;AAAA,EAEN;AAEA,CAAC;"}
package/dist/index100.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as m, openBlock as c, createBlock as b, withCtx as a, renderSlot as r, normalizeProps as i, guardReactiveProps as n, createVNode as h, mergeProps as y } from "vue";
2
2
  import f from "./index18.js";
3
3
  import "./index19.js";
4
- import v from "./index236.js";
5
- import "./index237.js";
4
+ import v from "./index241.js";
5
+ import "./index242.js";
6
6
  const w = /* @__PURE__ */ m({
7
7
  __name: "BbTag",
8
8
  props: {
package/dist/index102.js CHANGED
@@ -1,11 +1,12 @@
1
- import { defineComponent as i, openBlock as p, createBlock as t, withCtx as r, renderSlot as a, normalizeProps as m, guardReactiveProps as b, createVNode as h, mergeProps as c } from "vue";
1
+ import { defineComponent as p, openBlock as i, createBlock as t, withCtx as r, renderSlot as a, normalizeProps as m, guardReactiveProps as b, createVNode as h, mergeProps as c } from "vue";
2
2
  import f from "./index18.js";
3
3
  import "./index19.js";
4
4
  import y from "./index36.js";
5
5
  import "./index37.js";
6
- const g = /* @__PURE__ */ i({
6
+ const g = /* @__PURE__ */ p({
7
7
  __name: "BbTextarea",
8
8
  props: {
9
+ autocomplete: {},
9
10
  autofocus: {},
10
11
  disabled: { type: Boolean },
11
12
  hasErrors: { type: Boolean },
@@ -35,7 +36,7 @@ const g = /* @__PURE__ */ i({
35
36
  onMouseup: (e) => o("mouseup", e),
36
37
  "onUpdate:modelValue": (e) => o("update:modelValue", e)
37
38
  };
38
- return (e, V) => (p(), t(f, {
39
+ return (e, V) => (i(), t(f, {
39
40
  class: "bb-textarea",
40
41
  direction: e.direction,
41
42
  errors: e.errors,
@@ -1 +1 @@
1
- {"version":3,"file":"index102.js","sources":["../src/components/BbTextarea/BbTextarea.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer, {\n type BaseInputContainerProps,\n type BaseInputContainerSlots,\n} from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport BaseTextarea from \"../BaseTextarea/BaseTextarea.vue\";\nimport type {\n BaseTextareaEvents,\n BaseTextareaProps,\n BaseTextareaSlots,\n} from \"../BaseTextarea/BaseTextarea.vue\";\nimport type { Simplify } from \"@/types/Simplify\";\n\nexport type BbTextareaProps = BaseTextareaProps &\n Pick<\n BaseInputContainerProps,\n \"direction\" | \"errors\" | \"hideLabel\" | \"label\" | \"labelPosition\" | \"reverse\"\n >;\n\nexport type BbTextareaEvents = BaseTextareaEvents;\nexport type BbTextareaSlots = Simplify<\n BaseTextareaSlots & Pick<BaseInputContainerSlots, \"label\">\n>;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTextarea',\n props: {\n autofocus: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n name: {},\n placeholder: {},\n readonly: {},\n autoGrow: { type: Boolean },\n modelValue: {},\n direction: {},\n errors: {},\n hideLabel: { type: Boolean },\n label: {},\n labelPosition: {},\n reverse: { type: Boolean }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: string | null) =>\n emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-textarea\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n modelValue: _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseTextarea, _mergeProps({\n autoGrow: _ctx.autoGrow,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n hasErrors: hasErrors,\n id: id,\n modelValue: _ctx.modelValue,\n name: name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly\n }, eventListeners), {\n \"append-outer\": _withCtx(() => [\n _renderSlot(_ctx.$slots, \"append-outer\")\n ]),\n append: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"append\")\n ]),\n prepend: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"prepend\")\n ]),\n \"prepend-outer\": _withCtx(() => [\n _renderSlot(_ctx.$slots, \"prepend-outer\")\n ]),\n _: 2\n }, 1040, [\"autoGrow\", \"autofocus\", \"disabled\", \"hasErrors\", \"id\", \"modelValue\", \"name\", \"placeholder\", \"readonly\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"hasErrors\", \"hideLabel\", \"id\", \"label\", \"labelPosition\", \"modelValue\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseTextarea","_mergeProps"],"mappings":";;;;;AA0BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,CAAC;AAAA,IACX,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,YAAY,CAAC;AAAA,IACb,WAAW,CAAC;AAAA,IACZ,QAAQ,CAAC;AAAA,IACT,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,OAAO,CAAC;AAAA,IACR,eAAe,CAAC;AAAA,IAChB,SAAS,EAAE,MAAM,QAAQ;AAAA,EAC3B;AAAA,EACA,OAAO,CAAC,QAAQ,UAAU,SAAS,SAAS,SAAS,WAAW,aAAa,WAAW,mBAAmB;AAAA,EAC3G,MAAMC,GAAc,EAAE,MAAMC,KAAU;AAIxC,UAAMC,IAAOD,GAOPE,IAAiB;AAAA,MACrB,Q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;AAAA,UAClB,UAAUA,EAAK;AAAA,QACjB,GAAGH,CAAc,GAAG;AAAA,UAClB,gBAAgBQ,EAAS,MAAM;AAAA,YAC7BE,EAAYP,EAAK,QAAQ,cAAc;AAAA,UAAA,CACxC;AAAA,UACD,QAAQK,EAAS,MAAM;AAAA,YACrBE,EAAYP,EAAK,QAAQ,QAAQ;AAAA,UAAA,CAClC;AAAA,UACD,SAASK,EAAS,MAAM;AAAA,YACtBE,EAAYP,EAAK,QAAQ,SAAS;AAAA,UAAA,CACnC;AAAA,UACD,iBAAiBK,EAAS,MAAM;AAAA,YAC9BE,EAAYP,EAAK,QAAQ,eAAe;AAAA,UAAA,CACzC;AAAA,UACD,GAAG;AAAA,QACF,GAAA,MAAM,CAAC,YAAY,aAAa,YAAY,aAAa,MAAM,cAAc,QAAQ,eAAe,UAAU,CAAC;AAAA,MAAA,CACnH;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,aAAa,UAAU,aAAa,aAAa,MAAM,SAAS,iBAAiB,cAAc,QAAQ,SAAS,CAAC;AAAA,EAE1H;AAEA,CAAC;"}
1
+ {"version":3,"file":"index102.js","sources":["../src/components/BbTextarea/BbTextarea.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from \"vue\"\n\nimport BaseInputContainer, {\n type BaseInputContainerProps,\n type BaseInputContainerSlots,\n} from \"../BaseInputContainer/BaseInputContainer.vue\";\nimport BaseTextarea from \"../BaseTextarea/BaseTextarea.vue\";\nimport type {\n BaseTextareaEvents,\n BaseTextareaProps,\n BaseTextareaSlots,\n} from \"../BaseTextarea/BaseTextarea.vue\";\nimport type { Simplify } from \"@/types/Simplify\";\n\nexport type BbTextareaProps = BaseTextareaProps &\n Pick<\n BaseInputContainerProps,\n \"direction\" | \"errors\" | \"hideLabel\" | \"label\" | \"labelPosition\" | \"reverse\"\n >;\n\nexport type BbTextareaEvents = BaseTextareaEvents;\nexport type BbTextareaSlots = Simplify<\n BaseTextareaSlots & Pick<BaseInputContainerSlots, \"label\">\n>;\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'BbTextarea',\n props: {\n autocomplete: {},\n autofocus: {},\n disabled: { type: Boolean },\n hasErrors: { type: Boolean },\n id: {},\n name: {},\n placeholder: {},\n readonly: {},\n autoGrow: { type: Boolean },\n modelValue: {},\n direction: {},\n errors: {},\n hideLabel: { type: Boolean },\n label: {},\n labelPosition: {},\n reverse: { type: Boolean }\n },\n emits: [\"blur\", \"change\", \"click\", \"focus\", \"input\", \"keydown\", \"mousedown\", \"mouseup\", \"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\n\n\nconst emit = __emit;\n\n\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n onBlur: (event: FocusEvent) => emit(\"blur\", event),\n onChange: (event: Event) => emit(\"change\", event),\n onClick: (event: MouseEvent) => emit(\"click\", event),\n onFocus: (event: FocusEvent) => emit(\"focus\", event),\n onInput: (event: Event) => emit(\"input\", event),\n onKeydown: (event: KeyboardEvent) => emit(\"keydown\", event),\n onMousedown: (event: MouseEvent) => emit(\"mousedown\", event),\n onMouseup: (event: MouseEvent) => emit(\"mouseup\", event),\n \"onUpdate:modelValue\": (value: string | null) =>\n emit(\"update:modelValue\", value),\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createBlock(BaseInputContainer, {\n class: \"bb-textarea\",\n direction: _ctx.direction,\n errors: _ctx.errors,\n hasErrors: _ctx.hasErrors,\n hideLabel: _ctx.hideLabel,\n id: _ctx.id,\n label: _ctx.label,\n labelPosition: _ctx.labelPosition,\n modelValue: _ctx.modelValue,\n name: _ctx.name,\n reverse: _ctx.reverse\n }, {\n label: _withCtx((data) => [\n _renderSlot(_ctx.$slots, \"label\", _normalizeProps(_guardReactiveProps(data)))\n ]),\n input: _withCtx(({ id, name, hasErrors }) => [\n _createVNode(BaseTextarea, _mergeProps({\n autoGrow: _ctx.autoGrow,\n autofocus: _ctx.autofocus,\n disabled: _ctx.disabled,\n hasErrors: hasErrors,\n id: id,\n modelValue: _ctx.modelValue,\n name: name,\n placeholder: _ctx.placeholder,\n readonly: _ctx.readonly\n }, eventListeners), {\n \"append-outer\": _withCtx(() => [\n _renderSlot(_ctx.$slots, \"append-outer\")\n ]),\n append: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"append\")\n ]),\n prepend: _withCtx(() => [\n _renderSlot(_ctx.$slots, \"prepend\")\n ]),\n \"prepend-outer\": _withCtx(() => [\n _renderSlot(_ctx.$slots, \"prepend-outer\")\n ]),\n _: 2\n }, 1040, [\"autoGrow\", \"autofocus\", \"disabled\", \"hasErrors\", \"id\", \"modelValue\", \"name\", \"placeholder\", \"readonly\"])\n ]),\n _: 3\n }, 8, [\"direction\", \"errors\", \"hasErrors\", \"hideLabel\", \"id\", \"label\", \"labelPosition\", \"modelValue\", \"name\", \"reverse\"]))\n}\n}\n\n})"],"names":["_sfc_main","_defineComponent","__props","__emit","emit","eventListeners","event","value","_ctx","_cache","_openBlock","_createBlock","BaseInputContainer","_withCtx","data","_renderSlot","_normalizeProps","_guardReactiveProps","id","name","hasErrors","_createVNode","BaseTextarea","_mergeProps"],"mappings":";;;;;AA0BA,MAA4BA,IAAiBC,gBAAAA,EAAA;AAAA,EAC3C,QAAQ;AAAA,EACR,OAAO;AAAA,IACL,cAAc,CAAC;AAAA,IACf,WAAW,CAAC;AAAA,IACZ,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,WAAW,EAAE,MAAM,QAAQ;AAAA,IAC3B,IAAI,CAAC;AAAA,IACL,MAAM,CAAC;AAAA,IACP,aAAa,CAAC;AAAA,IACd,UAAU,CAAC;AAAA,IACX,UAAU,EAAE,MAAM,QAAQ;AAAA,IAC1B,YAAY,CAAC;AAAA,IACb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AASQ,EAAgBC,EAAoBH,CAAI,CAAC,CAAC;AAAA,MAAA,CAC7E;AAAA,MACD,OAAOD,EAAS,CAAC,EAAE,IAAAK,GAAI,MAAAC,GAAM,WAAAC,QAAgB;AAAA,QAC3CC,EAAaC,GAAcC,EAAY;AAAA,UACrC,UAAUf,EAAK;AAAA,UACf,WAAWA,EAAK;AAAA,UAChB,UAAUA,EAAK;AAAA,UACf,WAAAY;AAAA,UACA,IAAAF;AAAA,UACA,YAAYV,EAAK;AAAA,UACjB,MAAAW;AAAA,UACA,aAAaX,EAAK;AAAA,UAClB,UAAUA,EAAK;AAAA,QACjB,GAAGH,CAAc,GAAG;AAAA,UAClB,gBAAgBQ,EAAS,MAAM;AAAA,YAC7BE,EAAYP,EAAK,QAAQ,cAAc;AAAA,UAAA,CACxC;AAAA,UACD,QAAQK,EAAS,MAAM;AAAA,YACrBE,EAAYP,EAAK,QAAQ,QAAQ;AAAA,UAAA,CAClC;AAAA,UACD,SAASK,EAAS,MAAM;AAAA,YACtBE,EAAYP,EAAK,QAAQ,SAAS;AAAA,UAAA,CACnC;AAAA,UACD,iBAAiBK,EAAS,MAAM;AAAA,YAC9BE,EAAYP,EAAK,QAAQ,eAAe;AAAA,UAAA,CACzC;AAAA,UACD,GAAG;AAAA,QACF,GAAA,MAAM,CAAC,YAAY,aAAa,YAAY,aAAa,MAAM,cAAc,QAAQ,eAAe,UAAU,CAAC;AAAA,MAAA,CACnH;AAAA,MACD,GAAG;AAAA,IACF,GAAA,GAAG,CAAC,aAAa,UAAU,aAAa,aAAa,MAAM,SAAS,iBAAiB,cAAc,QAAQ,SAAS,CAAC;AAAA,EAE1H;AAEA,CAAC;"}
package/dist/index106.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as s, openBlock as e, createBlock as o, Teleport as l, createElementVNode as c, normalizeClass as m, createVNode as i, TransitionGroup as p, withCtx as u, createElementBlock as d, Fragment as f, renderList as _, unref as r, mergeProps as b } from "vue";
2
2
  import { state as k, useToast as C } from "./index4.js";
3
- import B from "./index235.js";
3
+ import B from "./index244.js";
4
4
  const N = /* @__PURE__ */ s({
5
5
  __name: "BbToast",
6
6
  props: {