buefy 0.9.21 → 0.9.23

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 (297) hide show
  1. package/README.md +4 -0
  2. package/dist/buefy.css +76 -24
  3. package/dist/buefy.esm.js +103 -89
  4. package/dist/buefy.esm.min.js +2 -2
  5. package/dist/buefy.js +103 -88
  6. package/dist/buefy.min.css +1 -1
  7. package/dist/buefy.min.js +2 -2
  8. package/dist/cjs/autocomplete.js +2 -2
  9. package/dist/cjs/{chunk-dddb035c.js → chunk-37e64a78.js} +6 -2
  10. package/dist/cjs/{chunk-f8eb56c6.js → chunk-4702fda4.js} +1 -1
  11. package/dist/cjs/{chunk-bcab8905.js → chunk-6e9f64e7.js} +3 -3
  12. package/dist/cjs/{chunk-eba24a95.js → chunk-8ab08774.js} +5 -5
  13. package/dist/cjs/{chunk-85b00a19.js → chunk-94bbc46e.js} +4 -4
  14. package/dist/cjs/{chunk-befea70a.js → chunk-994f8066.js} +22 -8
  15. package/dist/cjs/{chunk-95c4b826.js → chunk-a39776c7.js} +4 -1
  16. package/dist/cjs/{chunk-cc9676a6.js → chunk-b7163607.js} +2 -1
  17. package/dist/cjs/clockpicker.js +3 -3
  18. package/dist/cjs/colorpicker-a5bbcf7b.js +1774 -0
  19. package/dist/cjs/colorpicker.js +14 -1750
  20. package/dist/cjs/datepicker.js +4 -4
  21. package/dist/cjs/datetimepicker.js +5 -5
  22. package/dist/cjs/dialog.js +1 -1
  23. package/dist/cjs/dropdown.js +1 -1
  24. package/dist/cjs/field.js +1 -1
  25. package/dist/cjs/index.js +12 -11
  26. package/dist/cjs/input.js +1 -1
  27. package/dist/cjs/message.js +1 -1
  28. package/dist/cjs/modal.js +1 -1
  29. package/dist/cjs/navbar.js +4 -1
  30. package/dist/cjs/notification.js +1 -1
  31. package/dist/cjs/numberinput.js +7 -2
  32. package/dist/cjs/sidebar.js +6 -44
  33. package/dist/cjs/steps.js +1 -1
  34. package/dist/cjs/table.js +5 -5
  35. package/dist/cjs/tabs.js +1 -1
  36. package/dist/cjs/taginput.js +7 -3
  37. package/dist/cjs/timepicker.js +4 -4
  38. package/dist/components/autocomplete/index.js +26 -9
  39. package/dist/components/autocomplete/index.min.js +2 -2
  40. package/dist/components/breadcrumb/index.js +1 -1
  41. package/dist/components/breadcrumb/index.min.js +1 -1
  42. package/dist/components/button/index.js +1 -1
  43. package/dist/components/button/index.min.js +1 -1
  44. package/dist/components/carousel/index.js +1 -1
  45. package/dist/components/carousel/index.min.js +1 -1
  46. package/dist/components/checkbox/index.js +1 -1
  47. package/dist/components/checkbox/index.min.js +1 -1
  48. package/dist/components/clockpicker/index.js +12 -5
  49. package/dist/components/clockpicker/index.min.js +2 -2
  50. package/dist/components/collapse/index.js +1 -1
  51. package/dist/components/collapse/index.min.js +1 -1
  52. package/dist/components/colorpicker/index.js +46 -21
  53. package/dist/components/colorpicker/index.min.js +2 -2
  54. package/dist/components/datepicker/index.js +13 -6
  55. package/dist/components/datepicker/index.min.js +2 -2
  56. package/dist/components/datetimepicker/index.js +13 -6
  57. package/dist/components/datetimepicker/index.min.js +2 -2
  58. package/dist/components/dialog/index.js +3 -2
  59. package/dist/components/dialog/index.min.js +2 -2
  60. package/dist/components/dropdown/index.js +7 -3
  61. package/dist/components/dropdown/index.min.js +2 -2
  62. package/dist/components/field/index.js +2 -2
  63. package/dist/components/field/index.min.js +2 -2
  64. package/dist/components/icon/index.js +1 -1
  65. package/dist/components/icon/index.min.js +1 -1
  66. package/dist/components/image/index.js +1 -1
  67. package/dist/components/image/index.min.js +1 -1
  68. package/dist/components/input/index.js +5 -2
  69. package/dist/components/input/index.min.js +2 -2
  70. package/dist/components/loading/index.js +1 -1
  71. package/dist/components/loading/index.min.js +1 -1
  72. package/dist/components/menu/index.js +1 -1
  73. package/dist/components/menu/index.min.js +1 -1
  74. package/dist/components/message/index.js +2 -2
  75. package/dist/components/message/index.min.js +2 -2
  76. package/dist/components/modal/index.js +3 -2
  77. package/dist/components/modal/index.min.js +2 -2
  78. package/dist/components/navbar/index.js +5 -2
  79. package/dist/components/navbar/index.min.js +2 -2
  80. package/dist/components/notification/index.js +2 -2
  81. package/dist/components/notification/index.min.js +2 -2
  82. package/dist/components/numberinput/index.js +11 -3
  83. package/dist/components/numberinput/index.min.js +2 -2
  84. package/dist/components/pagination/index.js +1 -1
  85. package/dist/components/pagination/index.min.js +1 -1
  86. package/dist/components/progress/index.js +1 -1
  87. package/dist/components/progress/index.min.js +1 -1
  88. package/dist/components/radio/index.js +1 -1
  89. package/dist/components/radio/index.min.js +1 -1
  90. package/dist/components/rate/index.js +1 -1
  91. package/dist/components/rate/index.min.js +1 -1
  92. package/dist/components/select/index.js +1 -1
  93. package/dist/components/select/index.min.js +1 -1
  94. package/dist/components/sidebar/index.js +7 -48
  95. package/dist/components/sidebar/index.min.js +2 -2
  96. package/dist/components/skeleton/index.js +1 -1
  97. package/dist/components/skeleton/index.min.js +1 -1
  98. package/dist/components/slider/index.js +1 -1
  99. package/dist/components/slider/index.min.js +1 -1
  100. package/dist/components/snackbar/index.js +1 -1
  101. package/dist/components/snackbar/index.min.js +1 -1
  102. package/dist/components/steps/index.js +6 -6
  103. package/dist/components/steps/index.min.js +2 -2
  104. package/dist/components/switch/index.js +1 -1
  105. package/dist/components/switch/index.min.js +1 -1
  106. package/dist/components/table/index.js +9 -6
  107. package/dist/components/table/index.min.js +2 -2
  108. package/dist/components/tabs/index.js +6 -6
  109. package/dist/components/tabs/index.min.js +2 -2
  110. package/dist/components/tag/index.js +1 -1
  111. package/dist/components/tag/index.min.js +1 -1
  112. package/dist/components/taginput/index.js +31 -10
  113. package/dist/components/taginput/index.min.js +2 -2
  114. package/dist/components/timepicker/index.js +12 -5
  115. package/dist/components/timepicker/index.min.js +2 -2
  116. package/dist/components/toast/index.js +1 -1
  117. package/dist/components/toast/index.min.js +1 -1
  118. package/dist/components/tooltip/index.js +1 -1
  119. package/dist/components/tooltip/index.min.js +1 -1
  120. package/dist/components/upload/index.js +1 -1
  121. package/dist/components/upload/index.min.js +1 -1
  122. package/dist/esm/autocomplete.js +6 -6
  123. package/dist/esm/button.js +4 -4
  124. package/dist/esm/carousel.js +4 -4
  125. package/dist/esm/{chunk-293c457c.js → chunk-007b3ff8.js} +7 -7
  126. package/dist/esm/{chunk-c5284276.js → chunk-048831a9.js} +2 -2
  127. package/dist/esm/{chunk-493ff0a9.js → chunk-07da0ba7.js} +1 -1
  128. package/dist/esm/{chunk-ade5b253.js → chunk-0c67e5e7.js} +8 -4
  129. package/dist/esm/{chunk-9b0b8225.js → chunk-18dce47f.js} +1 -1
  130. package/dist/esm/{chunk-6e56b8bc.js → chunk-27ec55c7.js} +1 -1
  131. package/dist/esm/{chunk-7e17a637.js → chunk-4b289821.js} +1 -1
  132. package/dist/esm/{chunk-d46e7ff0.js → chunk-6a7209ee.js} +2 -2
  133. package/dist/esm/{chunk-b5576437.js → chunk-6b514c98.js} +2 -2
  134. package/dist/esm/{chunk-f32d0228.js → chunk-6efa106e.js} +9 -9
  135. package/dist/esm/{chunk-60a03517.js → chunk-70481141.js} +1 -1
  136. package/dist/esm/{chunk-455cdeae.js → chunk-851d1b8f.js} +1 -1
  137. package/dist/esm/{chunk-33e1434e.js → chunk-8e497030.js} +2 -1
  138. package/dist/esm/{chunk-b0123b89.js → chunk-9bd1f33e.js} +24 -10
  139. package/dist/esm/{chunk-4e788733.js → chunk-bf29bc31.js} +3 -3
  140. package/dist/esm/{chunk-7bb9107f.js → chunk-d62aa1f5.js} +2 -2
  141. package/dist/esm/{chunk-83c8b459.js → chunk-d77d421b.js} +7 -4
  142. package/dist/esm/{chunk-6c64686f.js → chunk-dc931ea5.js} +8 -8
  143. package/dist/esm/clockpicker.js +8 -8
  144. package/dist/esm/colorpicker-91643f19.js +1770 -0
  145. package/dist/esm/colorpicker.js +13 -1754
  146. package/dist/esm/config.js +1 -1
  147. package/dist/esm/datepicker.js +10 -10
  148. package/dist/esm/datetimepicker.js +11 -11
  149. package/dist/esm/dialog.js +4 -4
  150. package/dist/esm/dropdown.js +4 -4
  151. package/dist/esm/field.js +3 -3
  152. package/dist/esm/helpers.js +1 -1
  153. package/dist/esm/icon.js +3 -3
  154. package/dist/esm/image.js +3 -3
  155. package/dist/esm/index.js +24 -24
  156. package/dist/esm/input.js +5 -5
  157. package/dist/esm/loading.js +3 -3
  158. package/dist/esm/menu.js +2 -2
  159. package/dist/esm/message.js +4 -4
  160. package/dist/esm/modal.js +3 -3
  161. package/dist/esm/navbar.js +5 -2
  162. package/dist/esm/notification.js +5 -5
  163. package/dist/esm/numberinput.js +10 -5
  164. package/dist/esm/pagination.js +4 -4
  165. package/dist/esm/progress.js +2 -2
  166. package/dist/esm/rate.js +2 -2
  167. package/dist/esm/select.js +5 -5
  168. package/dist/esm/sidebar.js +8 -46
  169. package/dist/esm/slider.js +2 -2
  170. package/dist/esm/snackbar.js +2 -2
  171. package/dist/esm/steps.js +5 -5
  172. package/dist/esm/table.js +12 -12
  173. package/dist/esm/tabs.js +5 -5
  174. package/dist/esm/taginput.js +10 -6
  175. package/dist/esm/timepicker.js +11 -11
  176. package/dist/esm/toast.js +2 -2
  177. package/dist/esm/tooltip.js +3 -3
  178. package/dist/esm/upload.js +2 -2
  179. package/dist/vetur/attributes.json +12 -0
  180. package/dist/vetur/tags.json +5 -2
  181. package/package.json +3 -2
  182. package/src/components/autocomplete/Autocomplete.vue +23 -4
  183. package/src/components/autocomplete/index.js +1 -1
  184. package/src/components/breadcrumb/Breadcrumb.vue +0 -2
  185. package/src/components/breadcrumb/BreadcrumbItem.spec.js +1 -1
  186. package/src/components/breadcrumb/BreadcrumbItem.vue +0 -3
  187. package/src/components/breadcrumb/index.js +2 -2
  188. package/src/components/button/Button.vue +1 -1
  189. package/src/components/button/index.js +1 -1
  190. package/src/components/carousel/Carousel.vue +1 -1
  191. package/src/components/carousel/CarouselList.vue +2 -2
  192. package/src/components/carousel/index.js +3 -3
  193. package/src/components/checkbox/Checkbox.vue +1 -1
  194. package/src/components/checkbox/CheckboxButton.vue +1 -1
  195. package/src/components/checkbox/index.js +2 -2
  196. package/src/components/clockpicker/Clockpicker.vue +5 -5
  197. package/src/components/clockpicker/index.js +1 -1
  198. package/src/components/collapse/index.js +1 -1
  199. package/src/components/colorpicker/Colorpicker.vue +50 -31
  200. package/src/components/colorpicker/ColorpickerAlphaSlider.spec.js +3 -1
  201. package/src/components/colorpicker/ColorpickerAlphaSlider.vue +1 -1
  202. package/src/components/colorpicker/index.js +1 -1
  203. package/src/components/datepicker/Datepicker.spec.js +4 -4
  204. package/src/components/datepicker/Datepicker.vue +14 -13
  205. package/src/components/datepicker/DatepickerTable.vue +1 -1
  206. package/src/components/datepicker/index.js +1 -1
  207. package/src/components/datetimepicker/Datetimepicker.vue +2 -2
  208. package/src/components/datetimepicker/index.js +1 -1
  209. package/src/components/dialog/Dialog.vue +3 -3
  210. package/src/components/dialog/index.js +1 -1
  211. package/src/components/dropdown/Dropdown.vue +6 -2
  212. package/src/components/dropdown/index.js +2 -2
  213. package/src/components/field/Field.spec.js +11 -2
  214. package/src/components/field/Field.vue +6 -2
  215. package/src/components/field/index.js +1 -1
  216. package/src/components/icon/index.js +1 -1
  217. package/src/components/image/index.js +1 -1
  218. package/src/components/input/Input.spec.js +11 -0
  219. package/src/components/input/Input.vue +5 -2
  220. package/src/components/input/index.js +1 -1
  221. package/src/components/loading/index.js +1 -1
  222. package/src/components/menu/MenuItem.vue +1 -1
  223. package/src/components/menu/index.js +3 -3
  224. package/src/components/message/Message.vue +2 -1
  225. package/src/components/message/index.js +1 -1
  226. package/src/components/modal/Modal.vue +2 -1
  227. package/src/components/modal/index.js +1 -1
  228. package/src/components/navbar/NavBar.spec.js +1 -1
  229. package/src/components/navbar/{NavbarBurger.spec.js → NavBarBurger.spec.js} +1 -1
  230. package/src/components/navbar/NavBarItem.spec.js +1 -1
  231. package/src/components/navbar/NavbarDropdown.spec.js +1 -1
  232. package/src/components/navbar/NavbarDropdown.vue +10 -1
  233. package/src/components/navbar/index.js +3 -3
  234. package/src/components/notification/Notification.vue +3 -2
  235. package/src/components/notification/NotificationNotice.vue +1 -1
  236. package/src/components/notification/index.js +2 -2
  237. package/src/components/numberinput/Numberinput.spec.js +31 -0
  238. package/src/components/numberinput/Numberinput.vue +8 -3
  239. package/src/components/numberinput/index.js +1 -1
  240. package/src/components/pagination/Pagination.vue +2 -2
  241. package/src/components/pagination/index.js +2 -2
  242. package/src/components/progress/index.js +2 -2
  243. package/src/components/radio/Radio.vue +1 -1
  244. package/src/components/radio/RadioButton.vue +1 -1
  245. package/src/components/radio/index.js +2 -2
  246. package/src/components/rate/Rate.vue +1 -1
  247. package/src/components/rate/index.js +1 -1
  248. package/src/components/select/Select.vue +1 -1
  249. package/src/components/select/index.js +1 -1
  250. package/src/components/sidebar/Sidebar.vue +6 -25
  251. package/src/components/sidebar/index.js +1 -1
  252. package/src/components/skeleton/index.js +1 -1
  253. package/src/components/slider/Slider.vue +2 -2
  254. package/src/components/slider/SliderThumb.vue +1 -1
  255. package/src/components/slider/index.js +2 -2
  256. package/src/components/snackbar/Snackbar.vue +1 -1
  257. package/src/components/snackbar/index.js +1 -1
  258. package/src/components/steps/StepItem.vue +1 -1
  259. package/src/components/steps/Steps.vue +2 -2
  260. package/src/components/steps/index.js +2 -2
  261. package/src/components/switch/index.js +1 -1
  262. package/src/components/table/Table.vue +31 -19
  263. package/src/components/table/TableColumn.vue +121 -121
  264. package/src/components/table/TableMobileSort.vue +2 -2
  265. package/src/components/table/TablePagination.vue +1 -1
  266. package/src/components/table/index.js +2 -2
  267. package/src/components/tabs/TabItem.vue +1 -1
  268. package/src/components/tabs/Tabs.vue +1 -1
  269. package/src/components/tabs/index.js +2 -2
  270. package/src/components/tag/index.js +2 -2
  271. package/src/components/taginput/Taginput.vue +7 -3
  272. package/src/components/taginput/index.js +1 -1
  273. package/src/components/timepicker/Timepicker.vue +6 -6
  274. package/src/components/timepicker/index.js +1 -1
  275. package/src/components/toast/Toast.vue +1 -1
  276. package/src/components/toast/index.js +1 -1
  277. package/src/components/tooltip/Tooltip.spec.js +35 -0
  278. package/src/components/tooltip/index.js +1 -1
  279. package/src/components/upload/index.js +1 -1
  280. package/src/index.js +1 -0
  281. package/src/scss/components/_colorpicker.scss +1 -1
  282. package/src/scss/components/_datepicker.scss +2 -2
  283. package/src/scss/components/_message.scss +8 -2
  284. package/src/scss/components/_notification.scss +5 -5
  285. package/src/scss/components/_radio.scss +3 -0
  286. package/src/scss/components/_table.scss +1 -0
  287. package/src/utils/MessageMixin.js +1 -1
  288. package/src/utils/TabbedChildMixin.js +1 -1
  289. package/src/utils/TabbedMixin.js +1 -1
  290. package/src/utils/color.js +3 -2
  291. package/src/utils/color.spec.js +3 -1
  292. package/CHANGELOG.md +0 -1741
  293. /package/dist/esm/{chunk-6d0f2352.js → chunk-241dbe8d.js} +0 -0
  294. /package/dist/esm/{chunk-17b33cd2.js → chunk-6ca75105.js} +0 -0
  295. /package/dist/esm/{chunk-c9c18b2f.js → chunk-f37c671e.js} +0 -0
  296. /package/dist/esm/{chunk-a32d1427.js → chunk-f4922148.js} +0 -0
  297. /package/src/components/colorpicker/__snapshots__/{ColorPickerHSLRepresentationSquare.spec.js.snap → ColorpickerHSLRepresentationSquare.spec.js.snap} +0 -0
@@ -24,7 +24,7 @@
24
24
  :expanded="expanded"
25
25
  :disabled="disabled"
26
26
  >
27
- <span class="color-name">{{ colorFormatter(colorSelected) }}</span>
27
+ <span class="color-name">{{ colorFormatter(computedValue) }}</span>
28
28
  </b-button>
29
29
  </slot>
30
30
  </template>
@@ -33,7 +33,7 @@
33
33
  :disabled="disabled"
34
34
  :focusable="focusable"
35
35
  custom
36
- :class="{'dropdown-horizonal-colorpicker': horizontalColorPicker}"
36
+ :class="{'dropdown-horizontal-colorpicker': horizontalColorPicker}"
37
37
  >
38
38
  <div>
39
39
  <header class="colorpicker-header">
@@ -44,12 +44,12 @@
44
44
  <div class="colorpicker-content">
45
45
  <b-colorpicker-h-s-l-representation-square
46
46
  v-if="representation === 'square'"
47
- :value="colorSelected"
47
+ :value="computedValue"
48
48
  @input="updateColor"
49
49
  />
50
50
  <b-colorpicker-h-s-l-representation-triangle
51
51
  v-else
52
- :value="colorSelected"
52
+ :value="computedValue"
53
53
  @input="updateColor"
54
54
  />
55
55
  </div>
@@ -57,16 +57,17 @@
57
57
  <footer class="colorpicker-footer">
58
58
  <b-colorpicker-alpha-slider
59
59
  v-if="alpha"
60
- :value="colorSelected.alpha"
60
+ :value="computedValue.alpha"
61
61
  @input="updateAlpha"
62
- :color="colorSelected"
62
+ :color="computedValue"
63
63
  />
64
- <slot name="footer" :color="colorSelected">
64
+ <slot name="footer" :color="computedValue">
65
65
  <b-field class="colorpicker-fields" grouped>
66
66
  <b-field horizontal label="R">
67
67
  <b-input
68
68
  type="number"
69
- v-model.number="colorSelected.red"
69
+ v-model.number="computedValue.red"
70
+ @input="updateRGB"
70
71
  size="is-small"
71
72
  aria-label="Red"
72
73
  />
@@ -74,7 +75,8 @@
74
75
  <b-field horizontal label="G">
75
76
  <b-input
76
77
  type="number"
77
- v-model.number="colorSelected.green"
78
+ v-model.number="computedValue.green"
79
+ @input="updateRGB"
78
80
  size="is-small"
79
81
  aria-label="Green"
80
82
  />
@@ -82,7 +84,8 @@
82
84
  <b-field horizontal label="B">
83
85
  <b-input
84
86
  type="number"
85
- v-model.number="colorSelected.blue"
87
+ v-model.number="computedValue.blue"
88
+ @input="updateRGB"
86
89
  size="is-small"
87
90
  aria-label="Blue"
88
91
  />
@@ -101,16 +104,16 @@ import { isMobile } from '../../utils/helpers'
101
104
  import config from '../../utils/config'
102
105
  import Color from '../../utils/color'
103
106
 
104
- import Dropdown from '../dropdown/Dropdown'
105
- import DropdownItem from '../dropdown/DropdownItem'
106
- import Input from '../input/Input'
107
- import Field from '../field/Field'
108
- import Select from '../select/Select'
109
- import Icon from '../icon/Icon'
107
+ import Dropdown from '../dropdown/Dropdown.vue'
108
+ import DropdownItem from '../dropdown/DropdownItem.vue'
109
+ import Input from '../input/Input.vue'
110
+ import Field from '../field/Field.vue'
111
+ import Select from '../select/Select.vue'
112
+ import Icon from '../icon/Icon.vue'
110
113
 
111
- import ColorpickerHSLRepresentationTriangle from './ColorpickerHSLRepresentationTriangle'
112
- import ColorpickerHSLRepresentationSquare from './ColorpickerHSLRepresentationSquare'
113
- import ColorpickerAlphaSlider from './ColorpickerAlphaSlider'
114
+ import ColorpickerHSLRepresentationTriangle from './ColorpickerHSLRepresentationTriangle.vue'
115
+ import ColorpickerHSLRepresentationSquare from './ColorpickerHSLRepresentationSquare.vue'
116
+ import ColorpickerAlphaSlider from './ColorpickerAlphaSlider.vue'
114
117
 
115
118
  const defaultColorFormatter = (color, vm) => {
116
119
  if (color.alpha < 1) {
@@ -211,22 +214,28 @@ export default {
211
214
  appendToBody: Boolean
212
215
  },
213
216
  data() {
214
- const color = this.colorParser(this.value)
215
-
216
217
  return {
217
- colorSelected: color
218
+ color: this.parseColor(this.value)
218
219
  }
219
220
  },
220
221
  computed: {
222
+ computedValue: {
223
+ set(value) {
224
+ this.color = this.parseColor(value)
225
+ },
226
+ get() {
227
+ return this.color
228
+ }
229
+ },
221
230
  background() {
222
231
  if (this.alpha) {
223
232
  return `linear-gradient(
224
233
  45deg,
225
- ${this.colorSelected.toString('hex')} 50%,
226
- ${this.colorSelected.toString('hexa')} 50%
234
+ ${this.computedValue.toString('hex')} 50%,
235
+ ${this.computedValue.toString('hexa')} 50%
227
236
  )`
228
237
  } else {
229
- const hex = this.colorSelected.toString('hex')
238
+ const hex = this.computedValue.toString('hex')
230
239
  return `linear-gradient(
231
240
  45deg,
232
241
  ${hex} 50%,
@@ -235,7 +244,7 @@ export default {
235
244
  }
236
245
  },
237
246
  triggerStyle() {
238
- const { red, green, blue } = this.colorSelected
247
+ const { red, green, blue } = this.computedValue
239
248
  const light = (red * 0.299 + green * 0.587 + blue * 0.114) > 186
240
249
 
241
250
  return {
@@ -264,18 +273,28 @@ export default {
264
273
  },
265
274
  watch: {
266
275
  value(value) {
267
- this.colorSelected = new Color(value)
276
+ this.computedValue = new Color(value)
268
277
  }
269
278
  },
270
279
  methods: {
280
+ parseColor(color) {
281
+ try {
282
+ return this.colorParser(color)
283
+ } catch (e) {
284
+ return new Color()
285
+ }
286
+ },
271
287
  updateColor(value) {
272
- value.alpha = this.colorSelected.alpha
273
- this.colorSelected = value
288
+ value.alpha = this.computedValue.alpha
289
+ this.computedValue = value
274
290
  this.$emit('input', value)
275
291
  },
276
292
  updateAlpha(alpha) {
277
- this.colorSelected.alpha = alpha
278
- this.$emit('input', this.colorSelected)
293
+ this.computedValue.alpha = alpha
294
+ this.$emit('input', this.computedValue)
295
+ },
296
+ updateRGB() {
297
+ this.$emit('input', this.computedValue)
279
298
  },
280
299
  /*
281
300
  * Format color into string
@@ -1,11 +1,13 @@
1
1
  import { shallowMount } from '@vue/test-utils'
2
+ import Color from '@utils/color'
2
3
  import BColorpickerAlphaSlider from '@components/colorpicker/ColorpickerAlphaSlider'
3
4
 
4
5
  describe('BColorpickerAlphaSlider', () => {
5
6
  it('render correctly', () => {
6
7
  const wrapper = shallowMount(BColorpickerAlphaSlider, {
7
8
  propsData: {
8
- value: 100
9
+ value: 100,
10
+ color: Color.parse('#123456')
9
11
  }
10
12
  })
11
13
 
@@ -27,7 +27,7 @@
27
27
 
28
28
  <script>
29
29
  import Color from '../../utils/color'
30
- import Tooltip from '../tooltip/Tooltip'
30
+ import Tooltip from '../tooltip/Tooltip.vue'
31
31
 
32
32
  export default {
33
33
  name: 'BColorpickerAlphaSlider',
@@ -1,4 +1,4 @@
1
- import Colorpicker from './Colorpicker'
1
+ import Colorpicker from './Colorpicker.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -377,13 +377,13 @@ describe('BDatepicker', () => {
377
377
  })
378
378
  })
379
379
 
380
- it('renders a component with .dropdown-horizonal-timepicker class', () => {
381
- const subject = wrapper.find('.dropdown-horizonal-timepicker')
380
+ it('renders a component with .dropdown-horizontal-timepicker class', () => {
381
+ const subject = wrapper.find('.dropdown-horizontal-timepicker')
382
382
  expect(subject.exists()).toBeTruthy()
383
383
  })
384
384
 
385
- it('renders a component with .content-horizonal-timepicker class', () => {
386
- const subject = wrapper.find('.content-horizonal-timepicker')
385
+ it('renders a component with .content-horizontal-timepicker class', () => {
386
+ const subject = wrapper.find('.content-horizontal-timepicker')
387
387
  expect(subject.exists()).toBeTruthy()
388
388
  })
389
389
 
@@ -14,9 +14,10 @@
14
14
  :aria-role="ariaRole"
15
15
  :append-to-body="appendToBody"
16
16
  append-to-body-copy-parent
17
- @active-change="onActiveChange">
18
- <template #trigger v-if="!inline">
19
- <slot name="trigger">
17
+ @active-change="onActiveChange"
18
+ :trigger-tabindex="-1">
19
+ <template #trigger="props" v-if="!inline">
20
+ <slot name="trigger" v-bind="props">
20
21
  <b-input
21
22
  ref="input"
22
23
  autocomplete="off"
@@ -45,7 +46,7 @@
45
46
  :disabled="disabled"
46
47
  :focusable="focusable"
47
48
  custom
48
- :class="{'dropdown-horizonal-timepicker': horizontalTimePicker}">
49
+ :class="{'dropdown-horizontal-timepicker': horizontalTimePicker}">
49
50
  <div>
50
51
  <header class="datepicker-header">
51
52
  <template v-if="$slots.header !== undefined && $slots.header.length">
@@ -122,7 +123,7 @@
122
123
  <div
123
124
  v-if="!isTypeMonth"
124
125
  class="datepicker-content"
125
- :class="{'content-horizonal-timepicker': horizontalTimePicker}">
126
+ :class="{'content-horizontal-timepicker': horizontalTimePicker}">
126
127
  <b-datepicker-table
127
128
  v-model="computedValue"
128
129
  :day-names="newDayNames"
@@ -213,15 +214,15 @@ import FormElementMixin from '../../utils/FormElementMixin'
213
214
  import { isMobile, getMonthNames, getWeekdayNames, matchWithGroups } from '../../utils/helpers'
214
215
  import config from '../../utils/config'
215
216
 
216
- import Dropdown from '../dropdown/Dropdown'
217
- import DropdownItem from '../dropdown/DropdownItem'
218
- import Input from '../input/Input'
219
- import Field from '../field/Field'
220
- import Select from '../select/Select'
221
- import Icon from '../icon/Icon'
217
+ import Dropdown from '../dropdown/Dropdown.vue'
218
+ import DropdownItem from '../dropdown/DropdownItem.vue'
219
+ import Input from '../input/Input.vue'
220
+ import Field from '../field/Field.vue'
221
+ import Select from '../select/Select.vue'
222
+ import Icon from '../icon/Icon.vue'
222
223
 
223
- import DatepickerTable from './DatepickerTable'
224
- import DatepickerMonth from './DatepickerMonth'
224
+ import DatepickerTable from './DatepickerTable.vue'
225
+ import DatepickerMonth from './DatepickerMonth.vue'
225
226
 
226
227
  const defaultDateFormatter = (date, vm) => {
227
228
  const targetDates = Array.isArray(date) ? date : [date]
@@ -42,7 +42,7 @@
42
42
  </template>
43
43
 
44
44
  <script>
45
- import DatepickerTableRow from './DatepickerTableRow'
45
+ import DatepickerTableRow from './DatepickerTableRow.vue'
46
46
  import { isDefined } from '../../utils/helpers'
47
47
 
48
48
  export default {
@@ -1,4 +1,4 @@
1
- import Datepicker from './Datepicker'
1
+ import Datepicker from './Datepicker.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -94,8 +94,8 @@ import FormElementMixin from '../../utils/FormElementMixin'
94
94
  import { isMobile, matchWithGroups } from '../../utils/helpers'
95
95
  import config from '../../utils/config'
96
96
 
97
- import Datepicker from '../datepicker/Datepicker'
98
- import Timepicker from '../timepicker/Timepicker'
97
+ import Datepicker from '../datepicker/Datepicker.vue'
98
+ import Timepicker from '../timepicker/Timepicker.vue'
99
99
 
100
100
  const AM = 'AM'
101
101
  const PM = 'PM'
@@ -1,4 +1,4 @@
1
- import Datetimepicker from './Datetimepicker'
1
+ import Datetimepicker from './Datetimepicker.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -72,9 +72,9 @@
72
72
 
73
73
  <script>
74
74
  import trapFocus from '../../directives/trapFocus'
75
- import Icon from '../icon/Icon'
76
- import Modal from '../modal/Modal'
77
- import Button from '../button/Button'
75
+ import Icon from '../icon/Icon.vue'
76
+ import Modal from '../modal/Modal.vue'
77
+ import Button from '../button/Button.vue'
78
78
  import config from '../../utils/config'
79
79
  import { removeElement } from '../../utils/helpers'
80
80
 
@@ -1,4 +1,4 @@
1
- import Dialog from './Dialog'
1
+ import Dialog from './Dialog.vue'
2
2
 
3
3
  import config, { VueInstance } from '../../utils/config'
4
4
  import { merge } from '../../utils/helpers'
@@ -7,7 +7,7 @@
7
7
  >
8
8
  <div
9
9
  v-if="!inline"
10
- :tabindex="disabled ? false : 0"
10
+ :tabindex="disabled ? false : triggerTabindex"
11
11
  ref="trigger"
12
12
  class="dropdown-trigger"
13
13
  @click="onClick"
@@ -125,7 +125,11 @@ export default {
125
125
  },
126
126
  expanded: Boolean,
127
127
  appendToBody: Boolean,
128
- appendToBodyCopyParent: Boolean
128
+ appendToBodyCopyParent: Boolean,
129
+ triggerTabindex: {
130
+ type: Number,
131
+ default: 0
132
+ }
129
133
  },
130
134
  data() {
131
135
  return {
@@ -1,5 +1,5 @@
1
- import Dropdown from './Dropdown'
2
- import DropdownItem from './DropdownItem'
1
+ import Dropdown from './Dropdown.vue'
2
+ import DropdownItem from './DropdownItem.vue'
3
3
 
4
4
  import { use, registerComponent } from '../../utils/plugins'
5
5
 
@@ -48,13 +48,14 @@ describe('BField', () => {
48
48
  })
49
49
 
50
50
  describe('Passing a message prop', () => {
51
- const generateMountOptions = ({message}) => {
51
+ const generateMountOptions = ({message, slot}) => {
52
52
  return {
53
53
  propsData: {message},
54
54
  localVue,
55
55
  slots: {
56
56
  default: [BInput, '<button class="button">Button</button>']
57
- }
57
+ },
58
+ scopedSlots: slot ? {message: slot} : {}
58
59
  }
59
60
  }
60
61
 
@@ -114,6 +115,14 @@ describe('BField', () => {
114
115
  const wrapper = shallowMount(BField, mountOptions)
115
116
  expect(wrapper.find('p.help').html().split('<br>').length).toEqual(5)
116
117
  })
118
+
119
+ it('messages are passed down to the message slot', () => {
120
+ const message = 'Some string message'
121
+ const slot = '<template #message="{ messages }">{{ messages }}</template>'
122
+ const mountOptions = generateMountOptions({message, slot})
123
+ const wrapper = shallowMount(BField, mountOptions)
124
+ expect(wrapper.find('p.help').text()).toEqual(message)
125
+ })
117
126
  })
118
127
 
119
128
  describe('managing groups', () => {
@@ -45,7 +45,11 @@
45
45
  class="help"
46
46
  :class="newType"
47
47
  >
48
- <slot v-if="$slots.message" name="message"/>
48
+ <slot
49
+ v-if="$slots.message"
50
+ name="message"
51
+ :messages="formattedMessage"
52
+ />
49
53
  <template v-else>
50
54
  <template v-for="(mess, i) in formattedMessage">
51
55
  {{ mess }}
@@ -58,7 +62,7 @@
58
62
 
59
63
  <script>
60
64
  import config from '../../utils/config'
61
- import FieldBody from './FieldBody'
65
+ import FieldBody from './FieldBody.vue'
62
66
 
63
67
  export default {
64
68
  name: 'BField',
@@ -1,4 +1,4 @@
1
- import Field from './Field'
1
+ import Field from './Field.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -1,4 +1,4 @@
1
- import Icon from './Icon'
1
+ import Icon from './Icon.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -1,4 +1,4 @@
1
- import Image from './Image'
1
+ import Image from './Image.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -54,6 +54,17 @@ describe('BInput', () => {
54
54
  expect(counter.text()).toBe('4 / 100')
55
55
  })
56
56
 
57
+ it('display correct input value length when value contains some emoji', () => {
58
+ wrapper.setProps({
59
+ value: '😀2',
60
+ maxlength: 5
61
+ })
62
+ const counter = wrapper.find('small.counter')
63
+
64
+ expect(counter.exists()).toBeTruthy()
65
+ expect(counter.text()).toBe('2 / 5')
66
+ })
67
+
57
68
  it('no display counter when hasCounter property set for false', () => {
58
69
  wrapper.setProps({ maxlength: 100 })
59
70
  expect(wrapper.find('small.counter').exists()).toBeTruthy()
@@ -61,7 +61,7 @@
61
61
  </template>
62
62
 
63
63
  <script>
64
- import Icon from '../icon/Icon'
64
+ import Icon from '../icon/Icon.vue'
65
65
  import config from '../../utils/config'
66
66
  import FormElementMixin from '../../utils/FormElementMixin'
67
67
 
@@ -203,7 +203,7 @@ export default {
203
203
  */
204
204
  valueLength() {
205
205
  if (typeof this.computedValue === 'string') {
206
- return this.computedValue.length
206
+ return Array.from(this.computedValue).length
207
207
  } else if (typeof this.computedValue === 'number') {
208
208
  return this.computedValue.toString().length
209
209
  }
@@ -217,6 +217,9 @@ export default {
217
217
  */
218
218
  value(value) {
219
219
  this.newValue = value
220
+ },
221
+ type(type) {
222
+ this.newType = type
220
223
  }
221
224
  },
222
225
  methods: {
@@ -1,4 +1,4 @@
1
- import Input from './Input'
1
+ import Input from './Input.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -1,4 +1,4 @@
1
- import Loading from './Loading'
1
+ import Loading from './Loading.vue'
2
2
 
3
3
  import { VueInstance } from '../../utils/config'
4
4
  import { merge } from '../../utils/helpers'
@@ -37,7 +37,7 @@
37
37
  </template>
38
38
 
39
39
  <script>
40
- import Icon from '../icon/Icon'
40
+ import Icon from '../icon/Icon.vue'
41
41
  import config from '../../utils/config'
42
42
 
43
43
  export default {
@@ -1,6 +1,6 @@
1
- import Menu from './Menu'
2
- import MenuList from './MenuList'
3
- import MenuItem from './MenuItem'
1
+ import Menu from './Menu.vue'
2
+ import MenuList from './MenuList.vue'
3
+ import MenuItem from './MenuItem.vue'
4
4
 
5
5
  import { use, registerComponent } from '../../utils/plugins'
6
6
 
@@ -34,6 +34,7 @@
34
34
  </section>
35
35
  <b-progress
36
36
  v-if="autoClose && progressBar"
37
+ class="auto-close-progress"
37
38
  :value="remainingTime - 1"
38
39
  :max="duration / 1000 - 1"
39
40
  :type="type"
@@ -43,7 +44,7 @@
43
44
  </template>
44
45
 
45
46
  <script>
46
- import MessageMixin from '../../utils/MessageMixin.js'
47
+ import MessageMixin from '../../utils/MessageMixin'
47
48
 
48
49
  export default {
49
50
  name: 'BMessage',
@@ -1,4 +1,4 @@
1
- import Message from './Message'
1
+ import Message from './Message.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -18,7 +18,7 @@
18
18
  <div class="modal-background" @click="cancel('outside')"/>
19
19
  <div
20
20
  class="animation-content"
21
- :class="{ 'modal-content': !hasModalCard }"
21
+ :class="[{ 'modal-content': !hasModalCard }, customContentClass]"
22
22
  :style="customStyle">
23
23
  <component
24
24
  v-if="component"
@@ -116,6 +116,7 @@ export default {
116
116
  }
117
117
  },
118
118
  customClass: String,
119
+ customContentClass: [String, Array, Object],
119
120
  ariaRole: {
120
121
  type: String,
121
122
  validator: (value) => {
@@ -1,4 +1,4 @@
1
- import Modal from './Modal'
1
+ import Modal from './Modal.vue'
2
2
 
3
3
  import { VueInstance } from '../../utils/config'
4
4
  import { merge } from '../../utils/helpers'
@@ -1,5 +1,5 @@
1
1
  import { mount } from '@vue/test-utils'
2
- import BNavbar from '@components/navbar/Navbar.vue'
2
+ import BNavbar from '@components/navbar/Navbar'
3
3
 
4
4
  describe('BNavbar', () => {
5
5
  let wrapper
@@ -1,5 +1,5 @@
1
1
  import { shallowMount, mount } from '@vue/test-utils'
2
- import BNavbarBurger from '@components/navbar/NavbarBurger.vue'
2
+ import BNavbarBurger from '@components/navbar/NavbarBurger'
3
3
 
4
4
  describe('BNavbarBurger', () => {
5
5
  let wrapper
@@ -1,5 +1,5 @@
1
1
  import { shallowMount } from '@vue/test-utils'
2
- import BNavbarItem from '@components/navbar/NavbarItem.vue'
2
+ import BNavbarItem from '@components/navbar/NavbarItem'
3
3
  import sinon from 'sinon'
4
4
 
5
5
  let wrapper
@@ -1,5 +1,5 @@
1
1
  import { shallowMount } from '@vue/test-utils'
2
- import BNavbarDropdown from '@components/navbar/NavbarDropdown.vue'
2
+ import BNavbarDropdown from '@components/navbar/NavbarDropdown'
3
3
 
4
4
  let wrapper
5
5
 
@@ -25,9 +25,18 @@
25
25
  <template v-if="label">{{ label }}</template>
26
26
  <slot v-else name="label" />
27
27
  </component>
28
+ <div
29
+ class="navbar-dropdown is-hidden-touch"
30
+ :class="{
31
+ 'is-right': right,
32
+ 'is-boxed': boxed,
33
+ }"
34
+ >
35
+ <slot />
36
+ </div>
28
37
  <div
29
38
  v-show="!collapsible || (collapsible && newActive)"
30
- class="navbar-dropdown"
39
+ class="navbar-dropdown is-hidden-desktop"
31
40
  :class="{
32
41
  'is-right': right,
33
42
  'is-boxed': boxed,
@@ -1,6 +1,6 @@
1
- import Navbar from './Navbar'
2
- import NavbarItem from './NavbarItem'
3
- import NavbarDropdown from './NavbarDropdown'
1
+ import Navbar from './Navbar.vue'
2
+ import NavbarItem from './NavbarItem.vue'
3
+ import NavbarDropdown from './NavbarDropdown.vue'
4
4
 
5
5
  import { use, registerComponent } from '../../utils/plugins'
6
6