bitboss-ui 0.1.60 → 0.1.63

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 (295) hide show
  1. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +1 -1
  2. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +5 -2
  3. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +2 -2
  4. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +1 -1
  5. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +5 -6
  6. package/dist/components/BaseInputContainer/BaseInputContainer.vue.d.ts +17 -17
  7. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +17 -10
  8. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +18 -22
  9. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +13 -23
  10. package/dist/components/BaseRating/BaseRating.vue.d.ts +8 -9
  11. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +50 -22
  12. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +15 -9
  13. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +4 -1
  14. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +10 -11
  15. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +9 -9
  16. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +3 -4
  17. package/dist/components/BbAlert/BbAlert.vue.d.ts +13 -8
  18. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +92 -33
  19. package/dist/components/BbBadge/BbBadge.vue.d.ts +17 -3
  20. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue.d.ts +17 -3
  21. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +1 -1
  22. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +3 -2
  23. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +9 -9
  24. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +8 -8
  25. package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
  26. package/dist/components/BbPopover/BbPopover.vue.d.ts +2 -2
  27. package/dist/components/BbRadio/BbRadio.vue.d.ts +2 -2
  28. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -3
  29. package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
  30. package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -2
  31. package/dist/components/BbSwitch/BbSwitch.vue.d.ts +1 -1
  32. package/dist/components/BbTable/BbTable.vue.d.ts +12 -8
  33. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +2 -2
  34. package/dist/composables/useOptions.d.ts +9 -3
  35. package/dist/index10.js +43 -41
  36. package/dist/index10.js.map +1 -1
  37. package/dist/index104.js +1 -1
  38. package/dist/index106.js +3 -3
  39. package/dist/index111.js +1 -1
  40. package/dist/index112.js +1 -1
  41. package/dist/index113.js +1 -1
  42. package/dist/index114.js +1 -1
  43. package/dist/index116.js +1 -1
  44. package/dist/index118.js +1 -1
  45. package/dist/index119.js +1 -1
  46. package/dist/index12.js +10 -10
  47. package/dist/index12.js.map +1 -1
  48. package/dist/index120.js +1 -1
  49. package/dist/index122.js +224 -3
  50. package/dist/index122.js.map +1 -1
  51. package/dist/index123.js +2 -2
  52. package/dist/index124.js +2 -2
  53. package/dist/index125.js +2 -2
  54. package/dist/index126.js +2 -2
  55. package/dist/index127.js +2 -2
  56. package/dist/index128.js +2 -2
  57. package/dist/index129.js +2 -2
  58. package/dist/index130.js +2 -2
  59. package/dist/index131.js +2 -2
  60. package/dist/index132.js +2 -2
  61. package/dist/index133.js +2 -2
  62. package/dist/index134.js +2 -2
  63. package/dist/index135.js +2 -2
  64. package/dist/index136.js +2 -2
  65. package/dist/index137.js +2 -2
  66. package/dist/index138.js +2 -2
  67. package/dist/index139.js +2 -2
  68. package/dist/index14.js +9 -9
  69. package/dist/index14.js.map +1 -1
  70. package/dist/index140.js +2 -2
  71. package/dist/index141.js +2 -2
  72. package/dist/index142.js +2 -2
  73. package/dist/index143.js +2 -2
  74. package/dist/index144.js +2 -2
  75. package/dist/index145.js +2 -2
  76. package/dist/index146.js +2 -2
  77. package/dist/index147.js +2 -2
  78. package/dist/index148.js +3 -2
  79. package/dist/index148.js.map +1 -1
  80. package/dist/index149.js +2 -3
  81. package/dist/index149.js.map +1 -1
  82. package/dist/index150.js +3 -2
  83. package/dist/index150.js.map +1 -1
  84. package/dist/index151.js +2 -3
  85. package/dist/index151.js.map +1 -1
  86. package/dist/index152.js +2 -2
  87. package/dist/index153.js +2 -2
  88. package/dist/index154.js +2 -2
  89. package/dist/index155.js +2 -2
  90. package/dist/index156.js +2 -2
  91. package/dist/index157.js +3 -2
  92. package/dist/index157.js.map +1 -1
  93. package/dist/index158.js +2 -3
  94. package/dist/index158.js.map +1 -1
  95. package/dist/index159.js +3 -2
  96. package/dist/index159.js.map +1 -1
  97. package/dist/index16.js +3 -3
  98. package/dist/index16.js.map +1 -1
  99. package/dist/index160.js +2 -2
  100. package/dist/index161.js +2 -3
  101. package/dist/index161.js.map +1 -1
  102. package/dist/index162.js +2 -2
  103. package/dist/index163.js +2 -2
  104. package/dist/index164.js +2 -2
  105. package/dist/index165.js +2 -2
  106. package/dist/index166.js +2 -2
  107. package/dist/index167.js +2 -2
  108. package/dist/index168.js +2 -2
  109. package/dist/index169.js +2 -2
  110. package/dist/index170.js +2 -2
  111. package/dist/index171.js +2 -2
  112. package/dist/index172.js +2 -2
  113. package/dist/index173.js +3 -2
  114. package/dist/index173.js.map +1 -1
  115. package/dist/index174.js +2 -3
  116. package/dist/index174.js.map +1 -1
  117. package/dist/index175.js +3 -2
  118. package/dist/index175.js.map +1 -1
  119. package/dist/index176.js +2 -3
  120. package/dist/index176.js.map +1 -1
  121. package/dist/index177.js +2 -2
  122. package/dist/index178.js +2 -2
  123. package/dist/index179.js +2 -2
  124. package/dist/index18.js +6 -6
  125. package/dist/index18.js.map +1 -1
  126. package/dist/index180.js +2 -2
  127. package/dist/index181.js +2 -2
  128. package/dist/index182.js +2 -2
  129. package/dist/index183.js +2 -2
  130. package/dist/index184.js +2 -2
  131. package/dist/index185.js +3 -2
  132. package/dist/index185.js.map +1 -1
  133. package/dist/index186.js +2 -2
  134. package/dist/index186.js.map +1 -1
  135. package/dist/index187.js +4 -2
  136. package/dist/index187.js.map +1 -1
  137. package/dist/index188.js +2 -350
  138. package/dist/index188.js.map +1 -1
  139. package/dist/index189.js +2 -2
  140. package/dist/index189.js.map +1 -1
  141. package/dist/index190.js +295 -2
  142. package/dist/index190.js.map +1 -1
  143. package/dist/index191.js +16 -6
  144. package/dist/index191.js.map +1 -1
  145. package/dist/index192.js +16 -4
  146. package/dist/index192.js.map +1 -1
  147. package/dist/index193.js +18 -330
  148. package/dist/index193.js.map +1 -1
  149. package/dist/index194.js +20 -3
  150. package/dist/index194.js.map +1 -1
  151. package/dist/index195.js +29 -3
  152. package/dist/index195.js.map +1 -1
  153. package/dist/index197.js +2 -5
  154. package/dist/index197.js.map +1 -1
  155. package/dist/index198.js +3 -19
  156. package/dist/index198.js.map +1 -1
  157. package/dist/index199.js +3 -20
  158. package/dist/index199.js.map +1 -1
  159. package/dist/index20.js +15 -15
  160. package/dist/index20.js.map +1 -1
  161. package/dist/index200.js +348 -27
  162. package/dist/index200.js.map +1 -1
  163. package/dist/index201.js +131 -13
  164. package/dist/index201.js.map +1 -1
  165. package/dist/index202.js +2 -16
  166. package/dist/index202.js.map +1 -1
  167. package/dist/index203.js +181 -129
  168. package/dist/index203.js.map +1 -1
  169. package/dist/index204.js +23 -2
  170. package/dist/index204.js.map +1 -1
  171. package/dist/index205.js +321 -176
  172. package/dist/index205.js.map +1 -1
  173. package/dist/index206.js +3 -23
  174. package/dist/index206.js.map +1 -1
  175. package/dist/index207.js +35 -3
  176. package/dist/index207.js.map +1 -1
  177. package/dist/index208.js +6 -35
  178. package/dist/index208.js.map +1 -1
  179. package/dist/index209.js +2 -235
  180. package/dist/index209.js.map +1 -1
  181. package/dist/index210.js +2 -9
  182. package/dist/index210.js.map +1 -1
  183. package/dist/index211.js +228 -89
  184. package/dist/index211.js.map +1 -1
  185. package/dist/index212.js +8 -27
  186. package/dist/index212.js.map +1 -1
  187. package/dist/index213.js +95 -12
  188. package/dist/index213.js.map +1 -1
  189. package/dist/index214.js +25 -76
  190. package/dist/index214.js.map +1 -1
  191. package/dist/index215.js +13 -224
  192. package/dist/index215.js.map +1 -1
  193. package/dist/index216.js +4 -258
  194. package/dist/index216.js.map +1 -1
  195. package/dist/index217.js +77 -115
  196. package/dist/index217.js.map +1 -1
  197. package/dist/index218.js +5 -105
  198. package/dist/index218.js.map +1 -1
  199. package/dist/index219.js +2 -4
  200. package/dist/index219.js.map +1 -1
  201. package/dist/index22.js +13 -13
  202. package/dist/index22.js.map +1 -1
  203. package/dist/index220.js +2 -6
  204. package/dist/index220.js.map +1 -1
  205. package/dist/index221.js +2 -2
  206. package/dist/index222.js +2 -295
  207. package/dist/index222.js.map +1 -1
  208. package/dist/index223.js +2 -2
  209. package/dist/index225.js +224 -2
  210. package/dist/index225.js.map +1 -1
  211. package/dist/index226.js +258 -2
  212. package/dist/index226.js.map +1 -1
  213. package/dist/index227.js +2 -2
  214. package/dist/index228.js +117 -2
  215. package/dist/index228.js.map +1 -1
  216. package/dist/index229.js +105 -10
  217. package/dist/index229.js.map +1 -1
  218. package/dist/index230.js +10 -434
  219. package/dist/index230.js.map +1 -1
  220. package/dist/index231.js +433 -7
  221. package/dist/index231.js.map +1 -1
  222. package/dist/index232.js +7 -87
  223. package/dist/index232.js.map +1 -1
  224. package/dist/index233.js +86 -197
  225. package/dist/index233.js.map +1 -1
  226. package/dist/index234.js +200 -2
  227. package/dist/index234.js.map +1 -1
  228. package/dist/index235.js +2 -9
  229. package/dist/index235.js.map +1 -1
  230. package/dist/index236.js +8 -5
  231. package/dist/index236.js.map +1 -1
  232. package/dist/index237.js +6 -69
  233. package/dist/index237.js.map +1 -1
  234. package/dist/index238.js +68 -37
  235. package/dist/index238.js.map +1 -1
  236. package/dist/index239.js +38 -2
  237. package/dist/index239.js.map +1 -1
  238. package/dist/index24.js +59 -57
  239. package/dist/index24.js.map +1 -1
  240. package/dist/index240.js +2 -2
  241. package/dist/index240.js.map +1 -1
  242. package/dist/index241.js +2 -2
  243. package/dist/index241.js.map +1 -1
  244. package/dist/index242.js +2 -2
  245. package/dist/index243.js +5 -0
  246. package/dist/index243.js.map +1 -0
  247. package/dist/index26.js +50 -48
  248. package/dist/index26.js.map +1 -1
  249. package/dist/index28.js +189 -160
  250. package/dist/index28.js.map +1 -1
  251. package/dist/index30.js +11 -11
  252. package/dist/index30.js.map +1 -1
  253. package/dist/index32.js +2 -2
  254. package/dist/index34.js +52 -50
  255. package/dist/index34.js.map +1 -1
  256. package/dist/index36.js +7 -7
  257. package/dist/index36.js.map +1 -1
  258. package/dist/index38.js +5 -5
  259. package/dist/index38.js.map +1 -1
  260. package/dist/index40.js +5 -5
  261. package/dist/index40.js.map +1 -1
  262. package/dist/index42.js +10 -10
  263. package/dist/index42.js.map +1 -1
  264. package/dist/index44.js +1 -1
  265. package/dist/index44.js.map +1 -1
  266. package/dist/index46.js +2 -2
  267. package/dist/index46.js.map +1 -1
  268. package/dist/index48.js.map +1 -1
  269. package/dist/index5.js +125 -91
  270. package/dist/index5.js.map +1 -1
  271. package/dist/index54.js +10 -8
  272. package/dist/index54.js.map +1 -1
  273. package/dist/index56.js +1 -1
  274. package/dist/index62.js +5 -5
  275. package/dist/index66.js +3 -3
  276. package/dist/index69.js +1 -1
  277. package/dist/index72.js +1 -1
  278. package/dist/index74.js +1 -1
  279. package/dist/index76.js +4 -4
  280. package/dist/index78.js +1 -1
  281. package/dist/index8.js +2 -2
  282. package/dist/index8.js.map +1 -1
  283. package/dist/index82.js +8 -6
  284. package/dist/index82.js.map +1 -1
  285. package/dist/index88.js +22 -20
  286. package/dist/index88.js.map +1 -1
  287. package/dist/index94.js +9 -7
  288. package/dist/index94.js.map +1 -1
  289. package/dist/index96.js +2 -2
  290. package/dist/index98.js +177 -151
  291. package/dist/index98.js.map +1 -1
  292. package/dist/style.css +1 -1
  293. package/dist/types/CommonProps.d.ts +44 -0
  294. package/dist/utilities/functions/booleanishToBoolean.d.ts +6 -0
  295. package/package.json +2 -1
@@ -1,5 +1,5 @@
1
- import { CommonProps, GenericModelValue } from '../../types/CommonProps';
2
1
  import { ExtractGenericFromComputedRef } from '../../types/ExtractGenericFromComputedRef';
2
+ import type { CommonProps, GenericModelValue } from '../../types/CommonProps';
3
3
  export type BaseCheckboxProps = Pick<CommonProps, "autofocus" | "checked" | "color" | "disabled" | "falseValue" | "hasErrors" | "id" | "indeterminate" | "name" | "readonly" | "submitWhenFalse" | "trueValue"> & GenericModelValue;
4
4
  export type BaseCheckboxEvents = {
5
5
  (e: "blur", event: FocusEvent): void;
@@ -1,6 +1,6 @@
1
1
  import { BaseCheckboxProps } from "../BaseCheckbox/BaseCheckbox.vue";
2
2
  import type { CommonProps, Direction, OptionItems, GenericModelValueArray } from '../../types/CommonProps';
3
- export type BaseCheckboxGroupProps = Pick<BaseCheckboxProps, "autofocus" | "color" | "disabled" | "id" | "name" | "readonly"> & Pick<CommonProps, "dependencies" | "depsDebounceTime" | "enforceCoherence" | "hasErrors" | "hideLabel" | "itemText" | "itemValue" | "loadingText" | "modelValueDebounceTime" | "noDataText"> & Direction<"horizontal" | "vertical"> & Required<GenericModelValueArray> & OptionItems;
3
+ export type BaseCheckboxGroupProps = Pick<BaseCheckboxProps, "autofocus" | "color" | "disabled" | "id" | "name" | "readonly"> & Pick<CommonProps, "dependencies" | "depsDebounceTime" | "enforceCoherence" | "hasErrors" | "hideLabel" | "itemText" | "itemValue" | "loadingText" | "matchStrategy" | "modelValueDebounceTime" | "noDataText"> & Partial<Direction<"horizontal" | "vertical">> & Required<GenericModelValueArray> & OptionItems;
4
4
  export type BaseCheckboxGroupEvents = {
5
5
  (e: "blur", event: FocusEvent): void;
6
6
  (e: "change", event: Event): void;
@@ -18,6 +18,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
18
18
  direction: string;
19
19
  items: () => never[];
20
20
  loadingText: string;
21
+ matchStrategy: string;
21
22
  modelValueDebounceTime: number;
22
23
  noDataText: string;
23
24
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -36,6 +37,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
36
37
  direction: string;
37
38
  items: () => never[];
38
39
  loadingText: string;
40
+ matchStrategy: string;
39
41
  modelValueDebounceTime: number;
40
42
  noDataText: string;
41
43
  }>>> & {
@@ -51,10 +53,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
51
53
  onInactive?: (() => any) | undefined;
52
54
  }, {
53
55
  depsDebounceTime: number;
56
+ direction: "horizontal" | "vertical";
54
57
  loadingText: string;
58
+ matchStrategy: "string" | "equality";
55
59
  modelValueDebounceTime: number;
56
60
  noDataText: string;
57
- direction: "horizontal" | "vertical";
58
61
  items: any[] | ((prefill: boolean, modelValue?: any[] | undefined) => Promise<any[]>) | ((prefill: boolean, modelValue?: any[] | undefined) => any[]);
59
62
  }, {}>, Readonly<{
60
63
  prepend?: ((props: {}) => any) | undefined;
@@ -1,7 +1,7 @@
1
1
  import { default as dayjs } from "dayjs";
2
- import type { Dayjs } from "dayjs";
3
2
  import { default as it } from "dayjs/locale/it";
4
- import { CommonProps } from '../../types/CommonProps';
3
+ import type { CommonProps } from '../../types/CommonProps';
4
+ import type { Dayjs } from "dayjs";
5
5
  export type BaseDatePickerProps = Pick<CommonProps, "disabled" | "multiple" | "readonly"> & {
6
6
  /**
7
7
  * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday
@@ -1,6 +1,6 @@
1
1
  import { default as dayjs } from "dayjs";
2
2
  import { type BaseDatePickerProps } from "../BaseDatePicker/BaseDatePicker.vue";
3
- import { CommonProps } from '../../types/CommonProps';
3
+ import type { CommonProps } from '../../types/CommonProps';
4
4
  export type BaseDatePickerInputProps = Omit<BaseDatePickerProps, "multiple"> & Pick<CommonProps, "allowWriting" | "autocomplete" | "autofocus" | "hasErrors" | "id" | "name" | "placeholder">;
5
5
  export type BaseDatePickerInputEvents = {
6
6
  (e: "update:modelValue", value: BaseDatePickerInputProps["modelValue"]): void;
@@ -1,5 +1,4 @@
1
- import type { Classes } from '../../types/Classes';
2
- import { CommonProps, Size } from '../../types/CommonProps';
1
+ import type { CommonProps, Size } from '../../types/CommonProps';
3
2
  export type Sizes = {
4
3
  sm: number;
5
4
  md: number;
@@ -11,11 +10,11 @@ export type BaseDialogProps = Pick<CommonProps, "closeLabel" | "compact" | "disa
11
10
  */
12
11
  description?: string;
13
12
  /**
14
- * Displays the modala s fulscreen with no margin to the page
13
+ * Displays the modala as fulscreen with no margin to the page
15
14
  */
16
15
  fullscreen?: boolean;
17
16
  /**
18
- * Defines the state open / clpsed of the modal.
17
+ * Defines the state open / closed of the modal.
19
18
  */
20
19
  modelValue?: boolean | null;
21
20
  };
@@ -75,8 +74,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
75
74
  onShown?: (() => any) | undefined;
76
75
  }, {
77
76
  closeLabel: string;
78
- overlayClasses: Classes;
79
- panelClasses: Classes;
77
+ overlayClasses: import("../../types/Classes").Classes;
78
+ panelClasses: import("../../types/Classes").Classes;
80
79
  showClose: boolean;
81
80
  transition: string;
82
81
  transitionDuration: number;
@@ -1,18 +1,18 @@
1
- export type BaseInputContainerProps = {
2
- direction?: "horizontal" | "vertical" | "auto" | string;
3
- errors?: string | string[];
4
- hasErrors?: boolean;
5
- hideLabel?: boolean;
6
- id?: string;
7
- inputPosition?: "left" | "center" | "right";
8
- label: string;
9
- labelPosition?: "left" | "center" | "right";
1
+ import type { CommonProps, GenericModelValue } from '../../types/CommonProps';
2
+ export type BaseInputContainerProps = Pick<CommonProps, "direction" | "direction" | "errors" | "hasErrors" | "hideLabel" | "id" | "inputPosition" | "label" | "labelPosition" | "name" | "reverse"> & {
3
+ /**
4
+ * Defines the HTML tag of the label element.
5
+ * Usually is a `label` but for certain component like checkboxes
6
+ * that have their own label it should be a `legend`.
7
+ * It is important for accessibility reasons.
8
+ */
10
9
  labelTag?: string;
11
- modelValue?: any;
12
- name?: string;
13
- reverse?: boolean;
10
+ /**
11
+ * HTML tag of the container, it is by default a `span` so
12
+ * it can be used inline without breaking HTML validation.
13
+ */
14
14
  tag?: string;
15
- };
15
+ } & GenericModelValue;
16
16
  export type BaseInputContainerSlots = {
17
17
  input?: (props: {
18
18
  id: string;
@@ -39,11 +39,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
39
39
  reverse: boolean;
40
40
  tag: string;
41
41
  }>>>, {
42
- tag: string;
43
- reverse: boolean;
44
42
  direction: string;
45
- inputPosition: "center" | "right" | "left";
46
- labelPosition: "center" | "right" | "left";
43
+ inputPosition: "left" | "center" | "right";
44
+ labelPosition: "left" | "center" | "right";
45
+ reverse: boolean;
46
+ tag: string;
47
47
  labelTag: string;
48
48
  }, {}>, Readonly<BaseInputContainerSlots>>;
49
49
  export default _default;
@@ -1,17 +1,24 @@
1
- export interface BaseNumberInputProps {
2
- autocomplete?: string;
3
- autofocus?: boolean;
4
- disabled?: boolean;
5
- hasErrors?: boolean;
6
- id?: string;
1
+ import type { CommonProps } from '../../types/CommonProps';
2
+ export type BaseNumberInputProps = Pick<CommonProps, 'autocomplete' | 'autofocus' | 'disabled' | 'hasErrors' | 'id' | 'name' | 'placeholder' | 'readonly'> & {
3
+ /**
4
+ * Maximum value cap
5
+ */
7
6
  max?: number;
7
+ /**
8
+ * Minimum value cap
9
+ */
8
10
  min?: number;
11
+ /**
12
+ * Used by v-model
13
+ */
9
14
  modelValue?: number | string | null;
10
- name?: string;
11
- placeholder?: string;
12
- readonly?: boolean;
15
+ /**
16
+ * Incremental unit used in the exposed `increase`
17
+ * and `decrease` function. It's NOT APPLIED to manual input as a step of 5
18
+ * will prevent the user from inserting a value like `115` because of rounding down.
19
+ */
13
20
  step?: number;
14
- }
21
+ };
15
22
  export type BaseNumberInputEvents = {
16
23
  (e: "blur", event: FocusEvent): void;
17
24
  (e: "change", event: Event): void;
@@ -1,26 +1,22 @@
1
1
  import { ExtractGenericFromComputedRef } from '../../types/ExtractGenericFromComputedRef';
2
- export interface BaseRadioProps {
3
- autofocus?: boolean;
4
- checked?: boolean;
5
- color?: string;
6
- disabled?: boolean;
7
- hasErrors?: boolean;
8
- id?: string;
9
- modelValue?: any;
10
- name: string;
11
- readonly?: boolean;
2
+ import type { CommonProps, GenericModelValue } from '../../types/CommonProps';
3
+ export type BaseRadioProps = Pick<CommonProps, "autofocus" | "checked" | "color" | "disabled" | "hasErrors" | "id" | "name" | "readonly"> & GenericModelValue & Required<Pick<CommonProps, "name">> & {
4
+ /**
5
+ * Defines the value of the radio input.
6
+ * It can be any serializable value.
7
+ */
12
8
  value: any;
13
- }
9
+ };
14
10
  export type BaseRadioEvents = {
15
- (e: 'blur', event: FocusEvent): void;
16
- (e: 'change', event: Event): void;
17
- (e: 'click', event: MouseEvent): void;
18
- (e: 'focus', event: FocusEvent): void;
19
- (e: 'input', event: Event): void;
20
- (e: 'keydown', event: KeyboardEvent): void;
21
- (e: 'mousedown', event: MouseEvent): void;
22
- (e: 'mouseup', event: MouseEvent): void;
23
- (e: 'update:modelValue', value: any): void;
11
+ (e: "blur", event: FocusEvent): void;
12
+ (e: "change", event: Event): void;
13
+ (e: "click", event: MouseEvent): void;
14
+ (e: "focus", event: FocusEvent): void;
15
+ (e: "input", event: Event): void;
16
+ (e: "keydown", event: KeyboardEvent): void;
17
+ (e: "mousedown", event: MouseEvent): void;
18
+ (e: "mouseup", event: MouseEvent): void;
19
+ (e: "update:modelValue", value: any): void;
24
20
  };
25
21
  export type SlotAttributes = ExtractGenericFromComputedRef<typeof slotAttributes>;
26
22
  declare const slotAttributes: import("vue").ComputedRef<{
@@ -31,7 +27,7 @@ declare const slotAttributes: import("vue").ComputedRef<{
31
27
  id: string | undefined;
32
28
  name: string;
33
29
  parsedValue: any;
34
- readonly: boolean;
30
+ readonly: (boolean | "true" | "false") | undefined;
35
31
  value: any;
36
32
  }>;
37
33
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<BaseRadioProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -63,7 +59,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
63
59
  id: string | undefined;
64
60
  name: string;
65
61
  parsedValue: any;
66
- readonly: boolean;
62
+ readonly: (boolean | "true" | "false") | undefined;
67
63
  value: any;
68
64
  }) => any) | undefined;
69
65
  }>>;
@@ -1,25 +1,12 @@
1
1
  import type { BaseRadioEvents } from "../BaseRadio/BaseRadio.vue";
2
- export interface BaseRadioGroupProps {
3
- autofocus?: boolean;
4
- color?: string;
5
- dependencies?: any[];
6
- depsDebounceTime?: number;
2
+ import type { BaseRadioProps } from "../BaseRadio/BaseRadio.vue";
3
+ import type { CommonProps, GenericModelValue, OptionItems } from '../../types/CommonProps';
4
+ export type BaseRadioGroupProps = Pick<BaseRadioProps, "autofocus" | "color" | "disabled" | "hasErrors" | "id" | "name" | "readonly"> & Pick<CommonProps, "dependencies" | "depsDebounceTime" | "enforceCoherence" | "hideLabel" | "itemText" | "itemValue" | "loadingText" | "modelValueDebounceTime" | "noDataText" | "matchStrategy"> & OptionItems & GenericModelValue & {
5
+ /**
6
+ * Direction of the layout of the inputs inside the fieldset. It can be either `horizontal` or `vertical`
7
+ */
7
8
  direction?: "horizontal" | "vertical";
8
- disabled?: boolean;
9
- enforceCoherence?: boolean;
10
- hasErrors?: boolean;
11
- hideLabel?: boolean;
12
- id?: string;
13
- items: any[] | ((prefill: boolean, modelValue: any) => Promise<any[]>) | ((prefill: boolean, modelValue: any) => any[]);
14
- itemText?: string | ((item: any) => string);
15
- itemValue?: string | ((item: any) => any);
16
- loadingText?: string;
17
- modelValue?: any;
18
- modelValueDebounceTime?: number;
19
- name: string;
20
- noDataText?: string;
21
- readonly?: boolean;
22
- }
9
+ };
23
10
  export type BaseRadioGroupEvents = BaseRadioEvents & {
24
11
  (e: "inactive"): void;
25
12
  };
@@ -28,6 +15,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
28
15
  direction: string;
29
16
  items: () => never[];
30
17
  loadingText: string;
18
+ matchStrategy: string;
31
19
  modelValueDebounceTime: number;
32
20
  noDataText: string;
33
21
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -46,6 +34,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
46
34
  direction: string;
47
35
  items: () => never[];
48
36
  loadingText: string;
37
+ matchStrategy: string;
49
38
  modelValueDebounceTime: number;
50
39
  noDataText: string;
51
40
  }>>> & {
@@ -61,11 +50,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
61
50
  onInactive?: (() => any) | undefined;
62
51
  }, {
63
52
  depsDebounceTime: number;
53
+ direction: "horizontal" | "vertical";
64
54
  loadingText: string;
55
+ matchStrategy: "string" | "equality";
65
56
  modelValueDebounceTime: number;
66
57
  noDataText: string;
67
- direction: "horizontal" | "vertical";
68
- items: any[] | ((prefill: boolean, modelValue: any) => Promise<any[]>) | ((prefill: boolean, modelValue: any) => any[]);
58
+ items: any[] | ((prefill: boolean, modelValue?: any[] | undefined) => Promise<any[]>) | ((prefill: boolean, modelValue?: any[] | undefined) => any[]);
69
59
  }, {}>, Readonly<{
70
60
  prepend?: ((props: {}) => any) | undefined;
71
61
  loading?: ((props: {}) => any) | undefined;
@@ -81,7 +71,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
81
71
  id: string | undefined;
82
72
  name: string;
83
73
  parsedValue: any;
84
- readonly: boolean;
74
+ readonly: (boolean | "true" | "false") | undefined;
85
75
  value: any;
86
76
  item: any;
87
77
  text: string;
@@ -1,15 +1,14 @@
1
+ import { CommonProps } from '../../types/CommonProps';
1
2
  import type { BbIconProps } from "../BbIcon/BbIcon.vue";
2
- export type BaseRatingProps = {
3
- autofocus?: boolean;
4
- color?: string;
5
- disabled?: boolean;
6
- hasErrors?: boolean;
7
- id?: string;
3
+ export type BaseRatingProps = Pick<CommonProps, "autofocus" | "color" | "disabled" | "hasErrors" | "id" | "readonly"> & Required<Pick<CommonProps, "name">> & Pick<BbIconProps, "size"> & {
4
+ /**
5
+ * Used by v-model
6
+ */
8
7
  modelValue?: null | number;
9
- name: string;
10
- readonly?: boolean;
8
+ /**
9
+ * Maximum number of stars to render and maximum value of the component
10
+ */
11
11
  stars?: number;
12
- size?: BbIconProps["size"];
13
12
  };
14
13
  export type BaseRatingEvents = {
15
14
  (e: "blur", event: FocusEvent): void;
@@ -1,33 +1,58 @@
1
- export interface BaseSelectProps {
1
+ import type { CommonProps, OptionItemsWithQuery, GenericModelValue } from '../../types/CommonProps';
2
+ export type BaseSelectProps = Pick<CommonProps, "allowWriting" | "autofocus" | "dependencies" | "depsDebounceTime" | "disabled" | "enforceCoherence" | "hasErrors" | "id" | "itemText" | "itemValue" | "loadingText" | "id" | "itemText" | "itemValue" | "loadingText" | "modelValueDebounceTime" | "multiple" | "name" | "noDataText" | "placeholder" | "readonly" | "transitionDuration"> & OptionItemsWithQuery & GenericModelValue & {
3
+ /**
4
+ * Allows the user to add options to the list by
5
+ * inserting text in the input and pressing ENTER.
6
+ * The value and text of the option generated is a
7
+ * string equal to what has been inserted.
8
+ */
2
9
  addOptions?: boolean;
3
- allowWriting?: boolean;
4
- autofocus?: boolean;
10
+ /**
11
+ * Sets the display model for selected values to a list
12
+ * of comma separated string. In this mode the user
13
+ * cannot deselect an option by pressing the close button.
14
+ */
5
15
  comma?: boolean;
6
- dependencies?: any[];
7
- depsDebounceTime?: number;
8
- disabled?: boolean;
9
- enforceCoherence?: boolean;
16
+ /**
17
+ * Defines how the filtering should work.
18
+ * In any case options are always filtered by the text displayed but
19
+ * they can also take into account other properties of the
20
+ * passed elements when this property is a string or an array of string.
21
+ * E.g. items could be a list of users and you can filter users by email or phone by passing `['email', 'phone']`
22
+ * You can also pass false to not filter anything or a function for more granular control.
23
+ *
24
+ */
10
25
  filterBy?: string | string[] | false | ((value: any, item: any) => boolean) | null;
11
- hasErrors?: boolean;
12
- id?: string;
13
- items: any[] | ((query: string, prefill: boolean, modelValue: any) => Promise<any[]>) | ((query: string, prefill: boolean, modelValue: any) => any[]);
14
- itemText?: string | ((item: any) => string);
15
- itemValue?: string | ((item: any) => any);
16
- loadingText?: string;
17
- modelValue?: any;
18
- modelValueDebounceTime?: number;
19
- multiple?: boolean;
20
- name?: string;
21
- noDataText?: string;
22
- placeholder?: string;
26
+ /**
27
+ * Defines the prefill strategy for the input. By default the input will prefill
28
+ * on focus. It can also always prefill with `true` and only prefill on search with `false`.
29
+ */
23
30
  prefill?: boolean | "focus";
31
+ /**
32
+ * Time to wait when the users stops writing in the input before querying data.
33
+ * Especially useful when searching live data on big datasets.
34
+ */
24
35
  queryDebounceTime?: number;
25
- readonly?: boolean;
36
+ /**
37
+ * If `true` when in multiple selection, reset the query immediately
38
+ * upon selecting an option. By default the query is
39
+ * not reset until focus is lost so the user can search
40
+ * for "Cath" and select "Cathy" and then write more to
41
+ * search for "Catherine"
42
+ */
26
43
  resetQueryOnOptionSelected?: boolean;
44
+ /**
45
+ * Adds a stash to accumulate selected values. Especially
46
+ * useful when searching in a big database of items.
47
+ * E.g. if you search for "John" and then search for "Richard"
48
+ * you either always return the previous items or you stash them passing `true` to this option.
49
+ */
27
50
  stash?: boolean;
28
- transitionDuration?: number;
51
+ /**
52
+ * Pass `true` if the dropdown is not updating following movement in the UI, like in modals. Very expensive so use with care.
53
+ */
29
54
  updateOnAnimationFrame?: boolean;
30
- }
55
+ } & Pick<CommonProps, "matchStrategy">;
31
56
  type BaseOption = {
32
57
  id: string;
33
58
  jsonValue: string;
@@ -97,6 +122,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
97
122
  depsDebounceTime: number;
98
123
  filterBy: () => never[];
99
124
  loadingText: string;
125
+ matchStrategy: string;
100
126
  modelValueDebounceTime: number;
101
127
  noDataText: string;
102
128
  prefill: string;
@@ -116,6 +142,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
116
142
  depsDebounceTime: number;
117
143
  filterBy: () => never[];
118
144
  loadingText: string;
145
+ matchStrategy: string;
119
146
  modelValueDebounceTime: number;
120
147
  noDataText: string;
121
148
  prefill: string;
@@ -134,6 +161,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
134
161
  allowWriting: boolean;
135
162
  depsDebounceTime: number;
136
163
  loadingText: string;
164
+ matchStrategy: "string" | "equality";
137
165
  modelValueDebounceTime: number;
138
166
  noDataText: string;
139
167
  transitionDuration: number;
@@ -1,16 +1,22 @@
1
- export interface BaseSliderProps {
2
- autofocus?: boolean;
3
- color?: string;
4
- disabled?: boolean;
5
- hasErrors?: boolean;
6
- id?: string;
1
+ import type { CommonProps } from '../../types/CommonProps';
2
+ export type BaseSliderProps = Pick<CommonProps, "autofocus" | "color" | "disabled" | "hasErrors" | "id" | "name" | "readonly"> & {
3
+ /**
4
+ * Maximum value cap.
5
+ */
7
6
  max?: number;
7
+ /**
8
+ * Minimum value cap.
9
+ */
8
10
  min?: number;
11
+ /**
12
+ * Used by v-model.
13
+ */
9
14
  modelValue: number | string | null;
10
- name?: string;
11
- readonly?: boolean;
15
+ /**
16
+ * The step attribute is a number that specifies the granularity that the value must adhere to.
17
+ */
12
18
  step?: number;
13
- }
19
+ };
14
20
  export type BaseSliderEvents = {
15
21
  (e: "click", event: MouseEvent): void;
16
22
  (e: "end", value: BaseSliderProps["modelValue"]): void;
@@ -29,6 +29,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
29
29
  direction: string;
30
30
  items: () => never[];
31
31
  loadingText: string;
32
+ matchStrategy: string;
32
33
  modelValueDebounceTime: number;
33
34
  noDataText: string;
34
35
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -47,6 +48,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
47
48
  direction: string;
48
49
  items: () => never[];
49
50
  loadingText: string;
51
+ matchStrategy: string;
50
52
  modelValueDebounceTime: number;
51
53
  noDataText: string;
52
54
  }>>> & {
@@ -62,10 +64,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
62
64
  onInactive?: (() => any) | undefined;
63
65
  }, {
64
66
  depsDebounceTime: number;
67
+ direction: "horizontal" | "vertical";
65
68
  loadingText: string;
69
+ matchStrategy: "string" | "equality";
66
70
  modelValueDebounceTime: number;
67
71
  noDataText: string;
68
- direction: "horizontal" | "vertical";
69
72
  items: any[] | ((prefill: boolean, modelValue?: any[] | undefined) => Promise<any[]>) | ((prefill: boolean, modelValue?: any[] | undefined) => any[]);
70
73
  }, {}>, Readonly<BaseSwitchGroupSlots>>;
71
74
  export default _default;
@@ -1,15 +1,14 @@
1
- export interface BaseTextInputProps {
2
- autocomplete?: string;
3
- autofocus?: boolean;
4
- disabled?: boolean;
5
- hasErrors?: boolean;
6
- id?: string;
7
- modelValue?: any;
8
- name?: string;
9
- placeholder?: string;
10
- readonly?: boolean;
1
+ import type { CommonProps } from '../../types/CommonProps';
2
+ export type BaseTextInputProps = Pick<CommonProps, 'autocomplete' | 'autofocus' | 'disabled' | 'hasErrors' | 'id' | 'name' | 'placeholder' | 'readonly'> & {
3
+ /**
4
+ * Used my v-model
5
+ */
6
+ modelValue?: string | null;
7
+ /**
8
+ * Type of the input. Returns the content type of the object.
9
+ */
11
10
  type?: HTMLInputElement['type'];
12
- }
11
+ };
13
12
  export type BaseTextInputEvents = {
14
13
  (e: 'blur', event: FocusEvent): void;
15
14
  (e: 'change', event: Event): void;
@@ -1,14 +1,14 @@
1
- export interface BaseTextareaProps {
1
+ import type { CommonProps } from '../../types/CommonProps';
2
+ export type BaseTextareaProps = Pick<CommonProps, "autofocus" | "disabled" | "hasErrors" | "id" | "name" | "placeholder" | "readonly"> & {
3
+ /**
4
+ * Expands the textarea to match its content
5
+ */
2
6
  autoGrow?: boolean;
3
- autofocus?: boolean;
4
- disabled?: boolean;
5
- hasErrors?: boolean;
6
- id?: string;
7
+ /**
8
+ * Used by v-model
9
+ */
7
10
  modelValue?: string | null;
8
- name?: string;
9
- placeholder?: string;
10
- readonly?: boolean;
11
- }
11
+ };
12
12
  export type BaseTextareaEvents = {
13
13
  (e: "blur", event: FocusEvent): void;
14
14
  (e: "change", event: Event): void;
@@ -1,7 +1,6 @@
1
- import { type BbCollapsibleProps } from "../BbCollapsible/BbCollapsible.vue";
2
- export type BbAccordionProps = BbCollapsibleProps & {
3
- id?: string;
4
- };
1
+ import type { BbCollapsibleProps } from "../BbCollapsible/BbCollapsible.vue";
2
+ import type { CommonProps } from '../../types/CommonProps';
3
+ export type BbAccordionProps = BbCollapsibleProps & Pick<CommonProps, "id">;
5
4
  export type BbAccordionEvents = {
6
5
  (e: "update:modelValue", value: boolean): void;
7
6
  };
@@ -1,13 +1,18 @@
1
1
  import type { BbIconProps } from "../BbIcon/BbIcon.vue";
2
- export type BbAlertProps = {
3
- closeLabel?: string;
4
- icon?: string;
2
+ import type { CommonProps } from '../../types/CommonProps';
3
+ export type BbAlertProps = Pick<CommonProps, 'closeLabel' | 'showClose' | 'text' | 'theme' | 'title'> & {
4
+ /**
5
+ * Name of the icon to use
6
+ */
7
+ icon?: BbIconProps['type'];
8
+ /**
9
+ * Size of the icon to use
10
+ */
5
11
  iconSize?: BbIconProps["size"];
6
- modelValue?: any;
7
- showClose?: boolean;
8
- text?: string;
9
- theme?: string;
10
- title?: string;
12
+ /**
13
+ * Used by v-model
14
+ */
15
+ modelValue?: boolean;
11
16
  };
12
17
  export type BbAlertEvents = {
13
18
  (e: "update:modelValue", value: boolean): void;