bitboss-ui 1.0.60 → 1.0.62

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 (214) hide show
  1. package/dist/components/BaseCheckbox/BaseCheckbox.vue.d.ts +4 -0
  2. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +4 -0
  3. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +4 -0
  4. package/dist/components/BaseRadio/BaseRadio.vue.d.ts +4 -0
  5. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +7 -0
  6. package/dist/components/BaseRating/BaseRating.vue.d.ts +4 -0
  7. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +4 -0
  8. package/dist/components/BaseSlider/BaseSlider.vue.d.ts +4 -0
  9. package/dist/components/BaseTag/BaseTag.vue.d.ts +4 -0
  10. package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +4 -0
  11. package/dist/components/BaseTextarea/BaseTextarea.vue.d.ts +4 -0
  12. package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +4 -0
  13. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +4 -0
  14. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +4 -0
  15. package/dist/components/BbRadio/BbRadio.vue.d.ts +4 -0
  16. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +7 -0
  17. package/dist/components/BbSelect/BbSelect.vue.d.ts +7 -0
  18. package/dist/components/BbSlider/BbSlider.vue.d.ts +4 -0
  19. package/dist/components/BbTag/BbTag.vue.d.ts +4 -0
  20. package/dist/components/BbTextInput/BbTextInput.vue.d.ts +4 -0
  21. package/dist/components/BbTextarea/BbTextarea.vue.d.ts +4 -0
  22. package/dist/index105.js +4 -4
  23. package/dist/index107.js +20 -18
  24. package/dist/index107.js.map +1 -1
  25. package/dist/index109.js +7 -5
  26. package/dist/index109.js.map +1 -1
  27. package/dist/index111.js +27 -25
  28. package/dist/index111.js.map +1 -1
  29. package/dist/index113.js +1 -1
  30. package/dist/index115.js +3 -3
  31. package/dist/index117.js +1 -1
  32. package/dist/index121.js +1 -1
  33. package/dist/index123.js +1 -1
  34. package/dist/index14.js +22 -19
  35. package/dist/index14.js.map +1 -1
  36. package/dist/index16.js +1 -1
  37. package/dist/index18.js +8 -8
  38. package/dist/index199.js +3 -122
  39. package/dist/index199.js.map +1 -1
  40. package/dist/index20.js +24 -22
  41. package/dist/index20.js.map +1 -1
  42. package/dist/index200.js +3 -5
  43. package/dist/index200.js.map +1 -1
  44. package/dist/index201.js +42 -134
  45. package/dist/index201.js.map +1 -1
  46. package/dist/index202.js +1 -21
  47. package/dist/index202.js.map +1 -1
  48. package/dist/index203.js +13 -2
  49. package/dist/index203.js.map +1 -1
  50. package/dist/index204.js +5 -2
  51. package/dist/index204.js.map +1 -1
  52. package/dist/index205.js +16 -35
  53. package/dist/index205.js.map +1 -1
  54. package/dist/index206.js +14 -172
  55. package/dist/index206.js.map +1 -1
  56. package/dist/index207.js +19 -6
  57. package/dist/index207.js.map +1 -1
  58. package/dist/index208.js +20 -42
  59. package/dist/index208.js.map +1 -1
  60. package/dist/index209.js +31 -1
  61. package/dist/index209.js.map +1 -1
  62. package/dist/index210.js +8 -13
  63. package/dist/index210.js.map +1 -1
  64. package/dist/index211.js +2 -369
  65. package/dist/index211.js.map +1 -1
  66. package/dist/index212.js +2 -427
  67. package/dist/index212.js.map +1 -1
  68. package/dist/index213.js +4 -16
  69. package/dist/index213.js.map +1 -1
  70. package/dist/index214.js +2 -16
  71. package/dist/index214.js.map +1 -1
  72. package/dist/index215.js +120 -18
  73. package/dist/index215.js.map +1 -1
  74. package/dist/index216.js +130 -25
  75. package/dist/index216.js.map +1 -1
  76. package/dist/index217.js +2 -8
  77. package/dist/index217.js.map +1 -1
  78. package/dist/index218.js +35 -2
  79. package/dist/index218.js.map +1 -1
  80. package/dist/index219.js +174 -4
  81. package/dist/index219.js.map +1 -1
  82. package/dist/index22.js +88 -79
  83. package/dist/index22.js.map +1 -1
  84. package/dist/index220.js +6 -2
  85. package/dist/index220.js.map +1 -1
  86. package/dist/index221.js +364 -169
  87. package/dist/index221.js.map +1 -1
  88. package/dist/index222.js +427 -3
  89. package/dist/index222.js.map +1 -1
  90. package/dist/index223.js +174 -3
  91. package/dist/index223.js.map +1 -1
  92. package/dist/index228.js +223 -9
  93. package/dist/index228.js.map +1 -1
  94. package/dist/index229.js +2 -3
  95. package/dist/index229.js.map +1 -1
  96. package/dist/index230.js +15 -221
  97. package/dist/index230.js.map +1 -1
  98. package/dist/index231.js +12 -2
  99. package/dist/index231.js.map +1 -1
  100. package/dist/index232.js +9 -17
  101. package/dist/index232.js.map +1 -1
  102. package/dist/index233.js +3 -12
  103. package/dist/index233.js.map +1 -1
  104. package/dist/index234.js +224 -6
  105. package/dist/index234.js.map +1 -1
  106. package/dist/index235.js +258 -17
  107. package/dist/index235.js.map +1 -1
  108. package/dist/index236.js +3 -79
  109. package/dist/index236.js.map +1 -1
  110. package/dist/index237.js +1 -11
  111. package/dist/index237.js.map +1 -1
  112. package/dist/index238.js +7 -23
  113. package/dist/index238.js.map +1 -1
  114. package/dist/index239.js +9 -295
  115. package/dist/index239.js.map +1 -1
  116. package/dist/index24.js +2 -2
  117. package/dist/index240.js +23 -6
  118. package/dist/index240.js.map +1 -1
  119. package/dist/index241.js +295 -2
  120. package/dist/index241.js.map +1 -1
  121. package/dist/index242.js +6 -2
  122. package/dist/index242.js.map +1 -1
  123. package/dist/index243.js +2 -2
  124. package/dist/index244.js +2 -106
  125. package/dist/index244.js.map +1 -1
  126. package/dist/index245.js +2 -435
  127. package/dist/index245.js.map +1 -1
  128. package/dist/index246.js +2 -3
  129. package/dist/index246.js.map +1 -1
  130. package/dist/index247.js +4 -1
  131. package/dist/index247.js.map +1 -1
  132. package/dist/index248.js +2 -7
  133. package/dist/index248.js.map +1 -1
  134. package/dist/index249.js +6 -4
  135. package/dist/index249.js.map +1 -1
  136. package/dist/index250.js +17 -2
  137. package/dist/index250.js.map +1 -1
  138. package/dist/index251.js +4 -2
  139. package/dist/index251.js.map +1 -1
  140. package/dist/index252.js +79 -2
  141. package/dist/index252.js.map +1 -1
  142. package/dist/index253.js +2 -2
  143. package/dist/index254.js +100 -112
  144. package/dist/index254.js.map +1 -1
  145. package/dist/index255.js +424 -189
  146. package/dist/index255.js.map +1 -1
  147. package/dist/index256.js +2 -224
  148. package/dist/index256.js.map +1 -1
  149. package/dist/index257.js +68 -257
  150. package/dist/index257.js.map +1 -1
  151. package/dist/index258.js +5 -2
  152. package/dist/index258.js.map +1 -1
  153. package/dist/index259.js +117 -68
  154. package/dist/index259.js.map +1 -1
  155. package/dist/index26.js +32 -30
  156. package/dist/index26.js.map +1 -1
  157. package/dist/index260.js +200 -5
  158. package/dist/index260.js.map +1 -1
  159. package/dist/index261.js +1 -1
  160. package/dist/index262.js +1 -1
  161. package/dist/index264.js +35 -4
  162. package/dist/index264.js.map +1 -1
  163. package/dist/index265.js +4 -4
  164. package/dist/index265.js.map +1 -1
  165. package/dist/index266.js +4 -61
  166. package/dist/index266.js.map +1 -1
  167. package/dist/index267.js +60 -34
  168. package/dist/index267.js.map +1 -1
  169. package/dist/index268.js +1 -1
  170. package/dist/index28.js +36 -41
  171. package/dist/index28.js.map +1 -1
  172. package/dist/index30.js +18 -16
  173. package/dist/index30.js.map +1 -1
  174. package/dist/index32.js +20 -18
  175. package/dist/index32.js.map +1 -1
  176. package/dist/index34.js +53 -51
  177. package/dist/index34.js.map +1 -1
  178. package/dist/index36.js +42 -40
  179. package/dist/index36.js.map +1 -1
  180. package/dist/index38.js +37 -34
  181. package/dist/index38.js.map +1 -1
  182. package/dist/index40.js +1 -1
  183. package/dist/index42.js +35 -33
  184. package/dist/index42.js.map +1 -1
  185. package/dist/index44.js +26 -24
  186. package/dist/index44.js.map +1 -1
  187. package/dist/index46.js +15 -13
  188. package/dist/index46.js.map +1 -1
  189. package/dist/index52.js +1 -1
  190. package/dist/index54.js +1 -1
  191. package/dist/index58.js +2 -2
  192. package/dist/index60.js +12 -10
  193. package/dist/index60.js.map +1 -1
  194. package/dist/index66.js +13 -11
  195. package/dist/index66.js.map +1 -1
  196. package/dist/index70.js +5 -5
  197. package/dist/index74.js +2 -2
  198. package/dist/index77.js +32 -30
  199. package/dist/index77.js.map +1 -1
  200. package/dist/index79.js +1 -1
  201. package/dist/index81.js +1 -1
  202. package/dist/index83.js +4 -4
  203. package/dist/index87.js +18 -16
  204. package/dist/index87.js.map +1 -1
  205. package/dist/index89.js +21 -19
  206. package/dist/index89.js.map +1 -1
  207. package/dist/index95.js +7 -5
  208. package/dist/index95.js.map +1 -1
  209. package/dist/index97.js +14 -12
  210. package/dist/index97.js.map +1 -1
  211. package/dist/index99.js +20 -18
  212. package/dist/index99.js.map +1 -1
  213. package/dist/style.css +1 -1
  214. package/package.json +2 -2
@@ -47,6 +47,10 @@ export type BaseCheckboxProps = {
47
47
  * Sets the input in a readonly state.
48
48
  */
49
49
  readonly?: InputHTMLAttributes['readonly'];
50
+ /**
51
+ * Sets the input as required.
52
+ */
53
+ required?: boolean;
50
54
  /**
51
55
  * Will submit "falseValue" if the input is not checked. Otherwise "trueValue" will be submitted.
52
56
  */
@@ -71,6 +71,10 @@ export type BaseDatePickerInputProps = {
71
71
  * Sets the input in a readonly state.
72
72
  */
73
73
  readonly?: InputHTMLAttributes['readonly'];
74
+ /**
75
+ * Sets the input as required.
76
+ */
77
+ required?: boolean;
74
78
  /**
75
79
  * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected
76
80
  * @param date
@@ -61,6 +61,10 @@ export type BaseNumberInputProps = {
61
61
  * Sets the input in a readonly state.
62
62
  */
63
63
  readonly?: InputHTMLAttributes['readonly'];
64
+ /**
65
+ * Sets the input as required.
66
+ */
67
+ required?: boolean;
64
68
  /**
65
69
  * Incremental unit used in the exposed `increase`
66
70
  * and `decrease` function. It's NOT APPLIED to manual input as a step of 5
@@ -43,6 +43,10 @@ export type BaseRadioProps = {
43
43
  * Sets the input in a readonly state.
44
44
  */
45
45
  readonly?: InputHTMLAttributes['readonly'];
46
+ /**
47
+ * Sets the input as required.
48
+ */
49
+ required?: boolean;
46
50
  /**
47
51
  * Defines the value of the radio input.
48
52
  * It can be any serializable value.
@@ -95,6 +95,10 @@ export type BaseRadioGroupProps<T> = {
95
95
  * Sets the input in a readonly state.
96
96
  */
97
97
  readonly?: InputHTMLAttributes['readonly'];
98
+ /**
99
+ * Sets the input as required.
100
+ */
101
+ required?: boolean;
98
102
  };
99
103
  export type BaseRadioGroupEvents = {
100
104
  (e: 'blur', event: FocusEvent): void;
@@ -138,6 +142,7 @@ declare const _default: <T = any>(__VLS_props: {
138
142
  modelValue: any;
139
143
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
140
144
  ariaDescribedby?: string | undefined;
145
+ required?: boolean | undefined;
141
146
  onInactive?: (() => any) | undefined;
142
147
  items: T[] | ((prefill: boolean, modelValue?: any[] | undefined) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[] | undefined) => T[]);
143
148
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
@@ -231,6 +236,7 @@ declare const _default: <T = any>(__VLS_props: {
231
236
  modelValue: any;
232
237
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
233
238
  ariaDescribedby?: string | undefined;
239
+ required?: boolean | undefined;
234
240
  onInactive?: (() => any) | undefined;
235
241
  items: T[] | ((prefill: boolean, modelValue?: any[] | undefined) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[] | undefined) => T[]);
236
242
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
@@ -328,6 +334,7 @@ declare const _default: <T = any>(__VLS_props: {
328
334
  modelValue: any;
329
335
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
330
336
  ariaDescribedby?: string | undefined;
337
+ required?: boolean | undefined;
331
338
  onInactive?: (() => any) | undefined;
332
339
  items: T[] | ((prefill: boolean, modelValue?: any[] | undefined) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[] | undefined) => T[]);
333
340
  } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
@@ -40,6 +40,10 @@ export type BaseRatingProps = {
40
40
  * Sets the input in a readonly state.
41
41
  */
42
42
  readonly?: InputHTMLAttributes['readonly'];
43
+ /**
44
+ * Sets the input as required.
45
+ */
46
+ required?: boolean;
43
47
  /**
44
48
  * Maximum number of stars to render and maximum value of the component
45
49
  */
@@ -140,6 +140,10 @@ export type BaseSelectProps = {
140
140
  * Sets the input in a readonly state.
141
141
  */
142
142
  readonly?: InputHTMLAttributes['readonly'];
143
+ /**
144
+ * Sets the input as required.
145
+ */
146
+ required?: boolean;
143
147
  /**
144
148
  * If `true` when in multiple selection, reset the query immediately
145
149
  * upon selecting an option. By default the query is
@@ -52,6 +52,10 @@ export type BaseSliderProps = {
52
52
  * Sets the input in a readonly state.
53
53
  */
54
54
  readonly?: InputHTMLAttributes['readonly'];
55
+ /**
56
+ * Sets the input as required.
57
+ */
58
+ required?: boolean;
55
59
  /**
56
60
  * The step attribute is a number that specifies the granularity that the value must adhere to.
57
61
  */
@@ -67,6 +67,10 @@ export type BaseTagProps = {
67
67
  * Sets the input in a readonly state.
68
68
  */
69
69
  readonly?: InputHTMLAttributes['readonly'];
70
+ /**
71
+ * Sets the input as required.
72
+ */
73
+ required?: boolean;
70
74
  };
71
75
  export type BaseTagEvents = {
72
76
  (e: 'blur', event: FocusEvent): void;
@@ -53,6 +53,10 @@ export type BaseTextInputProps = {
53
53
  * Sets the input in a readonly state.
54
54
  */
55
55
  readonly?: InputHTMLAttributes['readonly'];
56
+ /**
57
+ * Sets the input as required.
58
+ */
59
+ required?: boolean;
56
60
  /**
57
61
  * Type of the input. Returns the content type of the object.
58
62
  */
@@ -57,6 +57,10 @@ export type BaseTextareaProps = {
57
57
  * Sets the input in a readonly state.
58
58
  */
59
59
  readonly?: InputHTMLAttributes['readonly'];
60
+ /**
61
+ * Sets the input as required.
62
+ */
63
+ required?: boolean;
60
64
  /**
61
65
  * Sets the input in a readonly state.
62
66
  */
@@ -80,6 +80,10 @@ export type BbCheckboxProps = {
80
80
  * Sets the input in a readonly state.
81
81
  */
82
82
  readonly?: InputHTMLAttributes['readonly'];
83
+ /**
84
+ * Sets the input as required.
85
+ */
86
+ required?: boolean;
83
87
  /**
84
88
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
85
89
  */
@@ -99,6 +99,10 @@ export type BbDatePickerInputProps = {
99
99
  * Sets the input in a readonly state.
100
100
  */
101
101
  readonly?: InputHTMLAttributes['readonly'];
102
+ /**
103
+ * Sets the input as required.
104
+ */
105
+ required?: boolean;
102
106
  /**
103
107
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
104
108
  */
@@ -86,6 +86,10 @@ export type BbNumberInputProps = {
86
86
  * Sets the input in a readonly state.
87
87
  */
88
88
  readonly?: InputHTMLAttributes['readonly'];
89
+ /**
90
+ * Sets the input as required.
91
+ */
92
+ required?: boolean;
89
93
  /**
90
94
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
91
95
  */
@@ -72,6 +72,10 @@ export type BbRadioProps = {
72
72
  * Sets the input in a readonly state.
73
73
  */
74
74
  readonly?: InputHTMLAttributes['readonly'];
75
+ /**
76
+ * Sets the input as required.
77
+ */
78
+ required?: boolean;
75
79
  /**
76
80
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
77
81
  */
@@ -113,6 +113,10 @@ export type BbRadioGroupProps<T> = {
113
113
  * Sets the input in a readonly state.
114
114
  */
115
115
  readonly?: InputHTMLAttributes['readonly'];
116
+ /**
117
+ * Sets the input as required.
118
+ */
119
+ required?: boolean;
116
120
  /**
117
121
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
118
122
  */
@@ -151,6 +155,7 @@ declare const _default: <T = any>(__VLS_props: {
151
155
  noDataText?: string | undefined;
152
156
  modelValue: any;
153
157
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
158
+ required?: boolean | undefined;
154
159
  onInactive?: (() => any) | undefined;
155
160
  items: T[] | ((prefill: boolean, modelValue?: any[] | undefined) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[] | undefined) => T[]);
156
161
  hint?: string | undefined;
@@ -257,6 +262,7 @@ declare const _default: <T = any>(__VLS_props: {
257
262
  noDataText?: string | undefined;
258
263
  modelValue: any;
259
264
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
265
+ required?: boolean | undefined;
260
266
  onInactive?: (() => any) | undefined;
261
267
  items: T[] | ((prefill: boolean, modelValue?: any[] | undefined) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[] | undefined) => T[]);
262
268
  hint?: string | undefined;
@@ -367,6 +373,7 @@ declare const _default: <T = any>(__VLS_props: {
367
373
  noDataText?: string | undefined;
368
374
  modelValue: any;
369
375
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
376
+ required?: boolean | undefined;
370
377
  onInactive?: (() => any) | undefined;
371
378
  items: T[] | ((prefill: boolean, modelValue?: any[] | undefined) => Promise<T[]>) | ((prefill: boolean, modelValue?: any[] | undefined) => T[]);
372
379
  hint?: string | undefined;
@@ -157,6 +157,10 @@ export type BbSelectProps<T> = {
157
157
  * Name of the icon to be added at the start of the input.
158
158
  */
159
159
  'prepend:icon'?: string;
160
+ /**
161
+ * Sets the input as required.
162
+ */
163
+ required?: boolean;
160
164
  /**
161
165
  * Time to wait when the users stops writing in the input before querying data.
162
166
  * Especially useful when searching live data on big datasets.
@@ -295,6 +299,7 @@ declare const _default: <T = any>(__VLS_props: {
295
299
  modelValue: any;
296
300
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
297
301
  prefill?: boolean | "focus" | undefined;
302
+ required?: boolean | undefined;
298
303
  onInactive?: (() => any) | undefined;
299
304
  items: T[] | ((query: string, prefill: boolean, modelValue: any) => Promise<T[]>) | ((query: string, prefill: boolean, modelValue: any) => T[]);
300
305
  'append:icon'?: string | undefined;
@@ -349,6 +354,7 @@ declare const _default: <T = any>(__VLS_props: {
349
354
  modelValue: any;
350
355
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
351
356
  prefill?: boolean | "focus" | undefined;
357
+ required?: boolean | undefined;
352
358
  onInactive?: (() => any) | undefined;
353
359
  items: T[] | ((query: string, prefill: boolean, modelValue: any) => Promise<T[]>) | ((query: string, prefill: boolean, modelValue: any) => T[]);
354
360
  'append:icon'?: string | undefined;
@@ -407,6 +413,7 @@ declare const _default: <T = any>(__VLS_props: {
407
413
  modelValue: any;
408
414
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
409
415
  prefill?: boolean | "focus" | undefined;
416
+ required?: boolean | undefined;
410
417
  onInactive?: (() => any) | undefined;
411
418
  items: T[] | ((query: string, prefill: boolean, modelValue: any) => Promise<T[]>) | ((query: string, prefill: boolean, modelValue: any) => T[]);
412
419
  'append:icon'?: string | undefined;
@@ -77,6 +77,10 @@ export type BbSliderProps = {
77
77
  * Sets the input in a readonly state.
78
78
  */
79
79
  readonly?: InputHTMLAttributes['readonly'];
80
+ /**
81
+ * Sets the input as required.
82
+ */
83
+ required?: boolean;
80
84
  /**
81
85
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
82
86
  */
@@ -92,6 +92,10 @@ export type BbTagProps = {
92
92
  * Sets the input in a readonly state.
93
93
  */
94
94
  readonly?: InputHTMLAttributes['readonly'];
95
+ /**
96
+ * Sets the input as required.
97
+ */
98
+ required?: boolean;
95
99
  /**
96
100
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
97
101
  */
@@ -78,6 +78,10 @@ export type BbTextInputProps = {
78
78
  * Sets the input in a readonly state.
79
79
  */
80
80
  readonly?: InputHTMLAttributes['readonly'];
81
+ /**
82
+ * Sets the input as required.
83
+ */
84
+ required?: boolean;
81
85
  /**
82
86
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
83
87
  */
@@ -82,6 +82,10 @@ export type BbTextareaProps = {
82
82
  * Sets the input in a readonly state.
83
83
  */
84
84
  readonly?: InputHTMLAttributes['readonly'];
85
+ /**
86
+ * Sets the input as required.
87
+ */
88
+ required?: boolean;
85
89
  /**
86
90
  * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.
87
91
  */
package/dist/index105.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as ie, ref as q, computed as p, onMounted as de, watch as J, openBlock as n, createBlock as be, resolveDynamicComponent as re, normalizeClass as f, withCtx as ue, createElementBlock as d, toDisplayString as m, createCommentVNode as v, createElementVNode as o, renderSlot as y, unref as C, createVNode as j, Fragment as N, renderList as S, createTextVNode as pe, mergeProps as fe } from "vue";
2
- import { add as me } from "./index258.js";
2
+ import { add as me } from "./index256.js";
3
3
  import { clamp as ye } from "./index198.js";
4
- import { deepEqual as K } from "./index230.js";
4
+ import { deepEqual as K } from "./index228.js";
5
5
  import { isNil as x } from "./index124.js";
6
6
  import { isNotNil as he } from "./index129.js";
7
7
  import { useId as _e } from "./index7.js";
8
- import { useItemValue as ke } from "./index233.js";
9
- import { when as ge } from "./index219.js";
8
+ import { useItemValue as ke } from "./index231.js";
9
+ import { when as ge } from "./index213.js";
10
10
  import Q from "./index14.js";
11
11
  import "./index15.js";
12
12
  import ve from "./index28.js";
package/dist/index107.js CHANGED
@@ -1,9 +1,9 @@
1
- import { defineComponent as v, ref as y, computed as B, openBlock as g, createBlock as k, withCtx as l, renderSlot as n, normalizeProps as r, guardReactiveProps as i, createVNode as $, mergeProps as w } from "vue";
1
+ import { defineComponent as v, ref as y, computed as B, openBlock as g, createBlock as k, withCtx as l, renderSlot as r, normalizeProps as n, guardReactiveProps as i, createVNode as $, mergeProps as w } from "vue";
2
2
  import V from "./index24.js";
3
3
  import "./index25.js";
4
4
  import P from "./index42.js";
5
5
  import "./index43.js";
6
- const z = /* @__PURE__ */ v({
6
+ const K = /* @__PURE__ */ v({
7
7
  __name: "BbTag",
8
8
  props: {
9
9
  "append:icon": {},
@@ -28,27 +28,28 @@ const z = /* @__PURE__ */ v({
28
28
  placeholder: {},
29
29
  "prepend:icon": {},
30
30
  readonly: {},
31
+ required: { type: Boolean },
31
32
  reverse: { type: Boolean }
32
33
  },
33
34
  emits: ["blur", "change", "click", "duplicate", "focus", "inactive", "input", "keydown", "keyup", "update:modelValue"],
34
35
  setup(t, { emit: u }) {
35
- const p = t, a = u, d = y(!1), m = B(() => p.persistentHint || d.value), c = {
36
+ const d = t, a = u, p = y(!1), m = B(() => d.persistentHint || p.value), c = {
36
37
  onBlur: (e) => a("blur", e),
37
38
  onChange: (e) => a("change", e),
38
39
  onClick: (e) => a("click", e),
39
40
  onDuplicate: (e) => a("duplicate", e),
40
41
  onFocus: (e) => {
41
- d.value = !0, a("focus", e);
42
+ p.value = !0, a("focus", e);
42
43
  },
43
44
  onInactive: () => {
44
- d.value = !1, a("inactive");
45
+ p.value = !1, a("inactive");
45
46
  },
46
47
  onInput: (e) => a("input", e),
47
48
  onKeydown: (e) => a("keydown", e),
48
49
  onKeyup: (e) => a("keyup", e),
49
50
  "onUpdate:modelValue": (e) => a("update:modelValue", e)
50
51
  };
51
- return (e, C) => (g(), k(V, {
52
+ return (e, q) => (g(), k(V, {
52
53
  id: e.id,
53
54
  class: "bb-tag",
54
55
  direction: e.direction,
@@ -64,12 +65,12 @@ const z = /* @__PURE__ */ v({
64
65
  "show-hint": m.value
65
66
  }, {
66
67
  label: l((s) => [
67
- n(e.$slots, "label", r(i(s)))
68
+ r(e.$slots, "label", n(i(s)))
68
69
  ]),
69
70
  input: l(({ id: s, name: h, hasErrors: b, ariaDescribedby: f }) => [
70
71
  $(P, w({
71
72
  id: s,
72
- "append:icon": p["append:icon"],
73
+ "append:icon": d["append:icon"],
73
74
  "aria-describedby": f,
74
75
  autocomplete: e.autocomplete,
75
76
  autofocus: e.autofocus,
@@ -82,35 +83,36 @@ const z = /* @__PURE__ */ v({
82
83
  multiple: e.multiple,
83
84
  name: h,
84
85
  placeholder: e.placeholder,
85
- "prepend:icon": p["prepend:icon"],
86
- readonly: e.readonly
86
+ "prepend:icon": d["prepend:icon"],
87
+ readonly: e.readonly,
88
+ required: e.required
87
89
  }, c), {
88
90
  "prepend-outer": l((o) => [
89
- n(e.$slots, "prepend-outer", r(i(o)))
91
+ r(e.$slots, "prepend-outer", n(i(o)))
90
92
  ]),
91
93
  prepend: l((o) => [
92
- n(e.$slots, "prepend", r(i(o)))
94
+ r(e.$slots, "prepend", n(i(o)))
93
95
  ]),
94
96
  prefix: l((o) => [
95
- n(e.$slots, "prefix", r(i(o)))
97
+ r(e.$slots, "prefix", n(i(o)))
96
98
  ]),
97
99
  append: l((o) => [
98
- n(e.$slots, "append", r(i(o)))
100
+ r(e.$slots, "append", n(i(o)))
99
101
  ]),
100
102
  suffix: l((o) => [
101
- n(e.$slots, "suffix", r(i(o)))
103
+ r(e.$slots, "suffix", n(i(o)))
102
104
  ]),
103
105
  "append-outer": l((o) => [
104
- n(e.$slots, "append-outer", r(i(o)))
106
+ r(e.$slots, "append-outer", n(i(o)))
105
107
  ]),
106
108
  _: 2
107
- }, 1040, ["id", "append:icon", "aria-describedby", "autocomplete", "autofocus", "comma", "disabled", "divider", "has-errors", "loading", "model-value", "multiple", "name", "placeholder", "prepend:icon", "readonly"])
109
+ }, 1040, ["id", "append:icon", "aria-describedby", "autocomplete", "autofocus", "comma", "disabled", "divider", "has-errors", "loading", "model-value", "multiple", "name", "placeholder", "prepend:icon", "readonly", "required"])
108
110
  ]),
109
111
  _: 3
110
112
  }, 8, ["id", "direction", "errors", "has-errors", "hide-label", "hint", "label", "label-position", "model-value", "name", "reverse", "show-hint"]));
111
113
  }
112
114
  });
113
115
  export {
114
- z as default
116
+ K as default
115
117
  };
116
118
  //# sourceMappingURL=index107.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index107.js","sources":["../src/components/BbTag/BbTag.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-tag\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseTag\n\t\t\t\t:id=\"id\"\n\t\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:comma=\"comma\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:divider=\"divider\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:loading=\"loading\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:multiple=\"multiple\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template #prepend-outer=\"data\"\n\t\t\t\t\t><slot name=\"prepend-outer\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t\t<template #prepend=\"data\"\n\t\t\t\t\t><slot name=\"prepend\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t\t<template #prefix=\"data\"><slot name=\"prefix\" v-bind=\"data\" /></template>\n\t\t\t\t<template #append=\"data\"><slot name=\"append\" v-bind=\"data\" /></template>\n\t\t\t\t<template #suffix=\"data\"><slot name=\"suffix\" v-bind=\"data\" /></template>\n\t\t\t\t<template #append-outer=\"data\"\n\t\t\t\t\t><slot name=\"append-outer\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t</BaseTag>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseTag from '../BaseTag/BaseTag.vue';\nimport type { BaseTagEvents } from '../BaseTag/BaseTag.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\n\nexport type BbTagProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The divider key used to separate values from one another. By default it is \"Enter\"\n\t */\n\tdivider?: KeyboardEvent['key'];\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n};\n\nconst props = withDefaults(defineProps<BbTagProps>(), {\n\tmultiple: true,\n});\n\nexport type BbTagEvents = BaseTagEvents;\n\nconst emit = defineEmits<BbTagEvents>();\n\nexport type BbTagSlots = {\n\tappend?: (props: object) => any;\n\t'append-outer'?: (props: object) => any;\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\tprepend?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tsuffix?: (props: object) => any;\n\t'prepend-outer'?: (props: object) => any;\n};\n\ndefineSlots<BbTagSlots>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonDuplicate: (string: string) => emit('duplicate', string),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonInactive: () => {\n\t\tactive.value = false;\n\t\temit('inactive');\n\t},\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonKeyup: (event: KeyboardEvent) => emit('keyup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTag';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event","string","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2LA,UAAMA,IAAQC,GAMRC,IAAOC,GAcPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAE9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBP,EAAK,QAAQO,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,aAAa,CAACC,MAAmBR,EAAK,aAAaQ,CAAM;AAAA,MACzD,SAAS,CAACD,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,YAAY,MAAM;AACjB,QAAAL,EAAO,QAAQ,IACfF,EAAK,UAAU;AAAA,MAChB;AAAA,MACA,SAAS,CAACO,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,SAAS,CAACA,MAAyBP,EAAK,SAASO,CAAK;AAAA,MACtD,uBAAuB,CAACE,MAAeT,EAAK,qBAAqBS,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index107.js","sources":["../src/components/BbTag/BbTag.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-tag\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseTag\n\t\t\t\t:id=\"id\"\n\t\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:comma=\"comma\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:divider=\"divider\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:loading=\"loading\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:multiple=\"multiple\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template #prepend-outer=\"data\"\n\t\t\t\t\t><slot name=\"prepend-outer\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t\t<template #prepend=\"data\"\n\t\t\t\t\t><slot name=\"prepend\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t\t<template #prefix=\"data\"><slot name=\"prefix\" v-bind=\"data\" /></template>\n\t\t\t\t<template #append=\"data\"><slot name=\"append\" v-bind=\"data\" /></template>\n\t\t\t\t<template #suffix=\"data\"><slot name=\"suffix\" v-bind=\"data\" /></template>\n\t\t\t\t<template #append-outer=\"data\"\n\t\t\t\t\t><slot name=\"append-outer\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t</BaseTag>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseTag from '../BaseTag/BaseTag.vue';\nimport type { BaseTagEvents } from '../BaseTag/BaseTag.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\n\nexport type BbTagProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The divider key used to separate values from one another. By default it is \"Enter\"\n\t */\n\tdivider?: KeyboardEvent['key'];\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n};\n\nconst props = withDefaults(defineProps<BbTagProps>(), {\n\tmultiple: true,\n});\n\nexport type BbTagEvents = BaseTagEvents;\n\nconst emit = defineEmits<BbTagEvents>();\n\nexport type BbTagSlots = {\n\tappend?: (props: object) => any;\n\t'append-outer'?: (props: object) => any;\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\tprepend?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tsuffix?: (props: object) => any;\n\t'prepend-outer'?: (props: object) => any;\n};\n\ndefineSlots<BbTagSlots>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonDuplicate: (string: string) => emit('duplicate', string),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonInactive: () => {\n\t\tactive.value = false;\n\t\temit('inactive');\n\t},\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonKeyup: (event: KeyboardEvent) => emit('keyup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTag';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event","string","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiMA,UAAMA,IAAQC,GAMRC,IAAOC,GAcPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAE9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBP,EAAK,QAAQO,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,aAAa,CAACC,MAAmBR,EAAK,aAAaQ,CAAM;AAAA,MACzD,SAAS,CAACD,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,YAAY,MAAM;AACjB,QAAAL,EAAO,QAAQ,IACfF,EAAK,UAAU;AAAA,MAChB;AAAA,MACA,SAAS,CAACO,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,SAAS,CAACA,MAAyBP,EAAK,SAASO,CAAK;AAAA,MACtD,uBAAuB,CAACE,MAAeT,EAAK,qBAAqBS,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index109.js CHANGED
@@ -1,9 +1,9 @@
1
- import { defineComponent as w, ref as y, computed as v, openBlock as g, createBlock as B, withCtx as r, renderSlot as a, normalizeProps as d, guardReactiveProps as p, createVNode as $, mergeProps as k } from "vue";
1
+ import { defineComponent as w, ref as y, computed as v, openBlock as B, createBlock as g, withCtx as r, renderSlot as a, normalizeProps as d, guardReactiveProps as p, createVNode as $, mergeProps as k } from "vue";
2
2
  import V from "./index24.js";
3
3
  import "./index25.js";
4
4
  import P from "./index44.js";
5
5
  import "./index45.js";
6
- const z = /* @__PURE__ */ w({
6
+ const M = /* @__PURE__ */ w({
7
7
  __name: "BbTextarea",
8
8
  props: {
9
9
  "append:icon": {},
@@ -26,6 +26,7 @@ const z = /* @__PURE__ */ w({
26
26
  placeholder: {},
27
27
  "prepend:icon": {},
28
28
  readonly: {},
29
+ required: { type: Boolean },
29
30
  reverse: { type: Boolean },
30
31
  rows: {}
31
32
  },
@@ -46,7 +47,7 @@ const z = /* @__PURE__ */ w({
46
47
  onMouseup: (e) => o("mouseup", e),
47
48
  "onUpdate:modelValue": (e) => o("update:modelValue", e)
48
49
  };
49
- return (e, C) => (g(), B(V, {
50
+ return (e, q) => (B(), g(V, {
50
51
  id: e.id,
51
52
  class: "bb-textarea",
52
53
  direction: e.direction,
@@ -79,6 +80,7 @@ const z = /* @__PURE__ */ w({
79
80
  placeholder: e.placeholder,
80
81
  "prepend:icon": n["prepend:icon"],
81
82
  readonly: e.readonly,
83
+ required: e.required,
82
84
  rows: e.rows
83
85
  }, h), {
84
86
  "append-outer": r(() => [
@@ -100,13 +102,13 @@ const z = /* @__PURE__ */ w({
100
102
  a(e.$slots, "suffix", d(p(i)))
101
103
  ]),
102
104
  _: 2
103
- }, 1040, ["id", "append:icon", "aria-describedby", "auto-grow", "autofocus", "disabled", "has-errors", "loading", "model-value", "name", "placeholder", "prepend:icon", "readonly", "rows"])
105
+ }, 1040, ["id", "append:icon", "aria-describedby", "auto-grow", "autofocus", "disabled", "has-errors", "loading", "model-value", "name", "placeholder", "prepend:icon", "readonly", "required", "rows"])
104
106
  ]),
105
107
  _: 3
106
108
  }, 8, ["id", "direction", "errors", "has-errors", "hide-label", "hint", "label", "label-position", "model-value", "name", "reverse", "show-hint"]));
107
109
  }
108
110
  });
109
111
  export {
110
- z as default
112
+ M as default
111
113
  };
112
114
  //# sourceMappingURL=index109.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index109.js","sources":["../src/components/BbTextarea/BbTextarea.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-textarea\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseTextarea\n\t\t\t\t:id=\"id\"\n\t\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:auto-grow=\"autoGrow\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:loading=\"loading\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:rows=\"rows\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template #append-outer><slot name=\"append-outer\" /></template>\n\t\t\t\t<template #append><slot name=\"append\" /></template>\n\t\t\t\t<template #prepend><slot name=\"prepend\" /></template>\n\t\t\t\t<template #prepend-outer><slot name=\"prepend-outer\" /></template>\n\t\t\t\t<template #prefix=\"data\"><slot name=\"prefix\" v-bind=\"data\" /></template>\n\t\t\t\t<template #suffix=\"data\"><slot name=\"suffix\" v-bind=\"data\" /></template>\n\t\t\t</BaseTextarea>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed } from 'vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseTextarea from '../BaseTextarea/BaseTextarea.vue';\nimport type {\n\tBaseTextareaEvents,\n\tBaseTextareaSlots,\n} from '../BaseTextarea/BaseTextarea.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BbTextareaProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Expands the textarea to match its content\n\t */\n\tautoGrow?: boolean;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\trows?: string | number;\n};\n\nconst props = defineProps<BbTextareaProps>();\n\nexport type BbTextareaEvents = BaseTextareaEvents;\nconst emit = defineEmits<BbTextareaEvents>();\n\nexport type BbTextareaSlots = BaseTextareaSlots & {\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n};\n\ndefineSlots<BbTextareaSlots>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => {\n\t\tactive.value = false;\n\t\temit('blur', event);\n\t},\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: string | null) =>\n\t\temit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTextarea';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA,UAAMA,IAAQC,GAGRC,IAAOC,GAQPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAK9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsB;AAC9B,QAAAL,EAAO,QAAQ,IACfF,EAAK,QAAQO,CAAK;AAAA,MACnB;AAAA,MACA,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,SAAS,CAACA,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBP,EAAK,aAAaO,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBP,EAAK,WAAWO,CAAK;AAAA,MACvD,uBAAuB,CAACC,MACvBR,EAAK,qBAAqBQ,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index109.js","sources":["../src/components/BbTextarea/BbTextarea.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-textarea\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseTextarea\n\t\t\t\t:id=\"id\"\n\t\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:auto-grow=\"autoGrow\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:loading=\"loading\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\t:rows=\"rows\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template #append-outer><slot name=\"append-outer\" /></template>\n\t\t\t\t<template #append><slot name=\"append\" /></template>\n\t\t\t\t<template #prepend><slot name=\"prepend\" /></template>\n\t\t\t\t<template #prepend-outer><slot name=\"prepend-outer\" /></template>\n\t\t\t\t<template #prefix=\"data\"><slot name=\"prefix\" v-bind=\"data\" /></template>\n\t\t\t\t<template #suffix=\"data\"><slot name=\"suffix\" v-bind=\"data\" /></template>\n\t\t\t</BaseTextarea>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed } from 'vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseTextarea from '../BaseTextarea/BaseTextarea.vue';\nimport type {\n\tBaseTextareaEvents,\n\tBaseTextareaSlots,\n} from '../BaseTextarea/BaseTextarea.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BbTextareaProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Expands the textarea to match its content\n\t */\n\tautoGrow?: boolean;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\trows?: string | number;\n};\n\nconst props = defineProps<BbTextareaProps>();\n\nexport type BbTextareaEvents = BaseTextareaEvents;\nconst emit = defineEmits<BbTextareaEvents>();\n\nexport type BbTextareaSlots = BaseTextareaSlots & {\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n};\n\ndefineSlots<BbTextareaSlots>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => {\n\t\tactive.value = false;\n\t\temit('blur', event);\n\t},\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: string | null) =>\n\t\temit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTextarea';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiLA,UAAMA,IAAQC,GAGRC,IAAOC,GAQPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAK9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsB;AAC9B,QAAAL,EAAO,QAAQ,IACfF,EAAK,QAAQO,CAAK;AAAA,MACnB;AAAA,MACA,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,SAAS,CAACA,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBP,EAAK,aAAaO,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBP,EAAK,WAAWO,CAAK;AAAA,MACvD,uBAAuB,CAACC,MACvBR,EAAK,qBAAqBQ,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}