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
@@ -1,121 +1,121 @@
1
- <script>
2
- import { toCssWidth } from '../../utils/helpers'
3
-
4
- export default {
5
- name: 'BTableColumn',
6
- inject: {
7
- $table: { name: '$table', default: false }
8
- },
9
- props: {
10
- label: String,
11
- customKey: [String, Number],
12
- field: String,
13
- meta: [String, Number, Boolean, Function, Object, Array],
14
- width: [Number, String],
15
- numeric: Boolean,
16
- centered: Boolean,
17
- searchable: Boolean,
18
- sortable: Boolean,
19
- visible: {
20
- type: Boolean,
21
- default: true
22
- },
23
- subheading: [String, Number],
24
- customSort: Function,
25
- customSearch: Function,
26
- sticky: Boolean,
27
- headerSelectable: Boolean,
28
- headerClass: String,
29
- cellClass: String,
30
- thAttrs: {
31
- type: Function,
32
- default: () => ({})
33
- },
34
- tdAttrs: {
35
- type: Function,
36
- default: () => ({})
37
- }
38
- },
39
- data() {
40
- return {
41
- newKey: this.customKey || this.label,
42
- _isTableColumn: true
43
- }
44
- },
45
- computed: {
46
- thClasses() {
47
- const attrs = this.thAttrs(this)
48
- const classes = [this.headerClass, {
49
- 'is-sortable': this.sortable,
50
- 'is-sticky': this.sticky,
51
- 'is-unselectable': this.isHeaderUnSelectable
52
- }]
53
- if (attrs && attrs.class) {
54
- classes.push(attrs.class)
55
- }
56
- return classes
57
- },
58
- thStyle() {
59
- const attrs = this.thAttrs(this)
60
- const style = [this.style]
61
- if (attrs && attrs.style) {
62
- style.push(attrs.style)
63
- }
64
- return style
65
- },
66
- rootClasses() {
67
- return [this.cellClass, {
68
- 'has-text-right': this.numeric && !this.centered,
69
- 'has-text-centered': this.centered,
70
- 'is-sticky': this.sticky
71
- }]
72
- },
73
- style() {
74
- return {
75
- width: toCssWidth(this.width)
76
- }
77
- },
78
- hasDefaultSlot() {
79
- return !!this.$scopedSlots.default
80
- },
81
- /**
82
- * Return if column header is un-selectable
83
- */
84
- isHeaderUnSelectable() {
85
- return !this.headerSelectable && this.sortable
86
- }
87
- },
88
- methods: {
89
- getRootClasses(row) {
90
- const attrs = this.tdAttrs(row, this)
91
- const classes = [this.rootClasses]
92
- if (attrs && attrs.class) {
93
- classes.push(attrs.class)
94
- }
95
- return classes
96
- },
97
- getRootStyle(row) {
98
- const attrs = this.tdAttrs(row, this)
99
- const style = []
100
- if (attrs && attrs.style) {
101
- style.push(attrs.style)
102
- }
103
- return style
104
- }
105
- },
106
- created() {
107
- if (!this.$table) {
108
- this.$destroy()
109
- throw new Error('You should wrap bTableColumn on a bTable')
110
- }
111
- this.$table.refreshSlots()
112
- },
113
- beforeDestroy() {
114
- this.$table.refreshSlots()
115
- },
116
- render(createElement) {
117
- // renderless
118
- return null
119
- }
120
- }
121
- </script>
1
+ <script>
2
+ import { toCssWidth } from '../../utils/helpers'
3
+
4
+ export default {
5
+ name: 'BTableColumn',
6
+ inject: {
7
+ $table: { name: '$table', default: false }
8
+ },
9
+ props: {
10
+ label: String,
11
+ customKey: [String, Number],
12
+ field: String,
13
+ meta: [String, Number, Boolean, Function, Object, Array],
14
+ width: [Number, String],
15
+ numeric: Boolean,
16
+ centered: Boolean,
17
+ searchable: Boolean,
18
+ sortable: Boolean,
19
+ visible: {
20
+ type: Boolean,
21
+ default: true
22
+ },
23
+ subheading: [String, Number],
24
+ customSort: Function,
25
+ customSearch: Function,
26
+ sticky: Boolean,
27
+ headerSelectable: Boolean,
28
+ headerClass: String,
29
+ cellClass: String,
30
+ thAttrs: {
31
+ type: Function,
32
+ default: () => ({})
33
+ },
34
+ tdAttrs: {
35
+ type: Function,
36
+ default: () => ({})
37
+ }
38
+ },
39
+ data() {
40
+ return {
41
+ newKey: this.customKey || this.label,
42
+ _isTableColumn: true
43
+ }
44
+ },
45
+ computed: {
46
+ thClasses() {
47
+ const attrs = this.thAttrs(this)
48
+ const classes = [this.headerClass, {
49
+ 'is-sortable': this.sortable,
50
+ 'is-sticky': this.sticky,
51
+ 'is-unselectable': this.isHeaderUnSelectable
52
+ }]
53
+ if (attrs && attrs.class) {
54
+ classes.push(attrs.class)
55
+ }
56
+ return classes
57
+ },
58
+ thStyle() {
59
+ const attrs = this.thAttrs(this)
60
+ const style = [this.style]
61
+ if (attrs && attrs.style) {
62
+ style.push(attrs.style)
63
+ }
64
+ return style
65
+ },
66
+ rootClasses() {
67
+ return [this.cellClass, {
68
+ 'has-text-right': this.numeric && !this.centered,
69
+ 'has-text-centered': this.centered,
70
+ 'is-sticky': this.sticky
71
+ }]
72
+ },
73
+ style() {
74
+ return {
75
+ width: toCssWidth(this.width)
76
+ }
77
+ },
78
+ hasDefaultSlot() {
79
+ return !!this.$scopedSlots.default
80
+ },
81
+ /**
82
+ * Return if column header is un-selectable
83
+ */
84
+ isHeaderUnSelectable() {
85
+ return !this.headerSelectable && this.sortable
86
+ }
87
+ },
88
+ methods: {
89
+ getRootClasses(row) {
90
+ const attrs = this.tdAttrs(row, this)
91
+ const classes = [this.rootClasses]
92
+ if (attrs && attrs.class) {
93
+ classes.push(attrs.class)
94
+ }
95
+ return classes
96
+ },
97
+ getRootStyle(row) {
98
+ const attrs = this.tdAttrs(row, this)
99
+ const style = []
100
+ if (attrs && attrs.style) {
101
+ style.push(attrs.style)
102
+ }
103
+ return style
104
+ }
105
+ },
106
+ created() {
107
+ if (!this.$table) {
108
+ this.$destroy()
109
+ throw new Error('You should wrap bTableColumn on a bTable')
110
+ }
111
+ this.$table.refreshSlots()
112
+ },
113
+ beforeDestroy() {
114
+ this.$table.refreshSlots()
115
+ },
116
+ render(createElement) {
117
+ // renderless
118
+ return null
119
+ }
120
+ }
121
+ </script>
@@ -86,8 +86,8 @@
86
86
  </template>
87
87
 
88
88
  <script>
89
- import Select from '../select/Select'
90
- import Icon from '../icon/Icon'
89
+ import Select from '../select/Select.vue'
90
+ import Icon from '../icon/Icon.vue'
91
91
 
92
92
  export default {
93
93
  name: 'BTableMobileSort',
@@ -29,7 +29,7 @@
29
29
  </template>
30
30
 
31
31
  <script>
32
- import Pagination from '../pagination/Pagination'
32
+ import Pagination from '../pagination/Pagination.vue'
33
33
 
34
34
  export default {
35
35
  name: 'BTablePagination',
@@ -1,5 +1,5 @@
1
- import Table from './Table'
2
- import TableColumn from './TableColumn'
1
+ import Table from './Table.vue'
2
+ import TableColumn from './TableColumn.vue'
3
3
 
4
4
  import { use, registerComponent } from '../../utils/plugins'
5
5
  import { VueInstance, setVueInstance } from '../../utils/config'
@@ -1,5 +1,5 @@
1
1
  <script>
2
- import TabbedChildMixin from '../../utils/TabbedChildMixin.js'
2
+ import TabbedChildMixin from '../../utils/TabbedChildMixin'
3
3
 
4
4
  export default {
5
5
  name: 'BTabItem',
@@ -60,7 +60,7 @@
60
60
 
61
61
  <script>
62
62
  import config from '../../utils/config'
63
- import TabbedMixin from '../../utils/TabbedMixin.js'
63
+ import TabbedMixin from '../../utils/TabbedMixin'
64
64
 
65
65
  export default {
66
66
  name: 'BTabs',
@@ -1,5 +1,5 @@
1
- import Tabs from './Tabs'
2
- import TabItem from './TabItem'
1
+ import Tabs from './Tabs.vue'
2
+ import TabItem from './TabItem.vue'
3
3
 
4
4
  import { use, registerComponent } from '../../utils/plugins'
5
5
 
@@ -1,5 +1,5 @@
1
- import Tag from './Tag'
2
- import Taglist from './Taglist'
1
+ import Tag from './Tag.vue'
2
+ import Taglist from './Taglist.vue'
3
3
 
4
4
  import { use, registerComponent } from '../../utils/plugins'
5
5
 
@@ -43,7 +43,7 @@
43
43
  :loading="loading"
44
44
  :autocomplete="nativeAutocomplete"
45
45
  :open-on-focus="openOnFocus"
46
- :keep-open="openOnFocus"
46
+ :keep-open="keepOpen"
47
47
  :keep-first="keepFirst"
48
48
  :group-field="groupField"
49
49
  :group-options="groupOptions"
@@ -98,8 +98,8 @@
98
98
 
99
99
  <script>
100
100
  import { getValueByPath } from '../../utils/helpers'
101
- import Tag from '../tag/Tag'
102
- import Autocomplete from '../autocomplete/Autocomplete'
101
+ import Tag from '../tag/Tag.vue'
102
+ import Autocomplete from '../autocomplete/Autocomplete.vue'
103
103
  import config from '../../utils/config'
104
104
  import FormElementMixin from '../../utils/FormElementMixin'
105
105
 
@@ -147,6 +147,10 @@ export default {
147
147
  groupOptions: String,
148
148
  nativeAutocomplete: String,
149
149
  openOnFocus: Boolean,
150
+ keepOpen: {
151
+ type: Boolean,
152
+ default: true
153
+ },
150
154
  keepFirst: Boolean,
151
155
  disabled: Boolean,
152
156
  ellipsis: Boolean,
@@ -1,4 +1,4 @@
1
- import Taginput from './Taginput'
1
+ import Taginput from './Taginput.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -129,12 +129,12 @@
129
129
 
130
130
  <script>
131
131
  import TimepickerMixin from '../../utils/TimepickerMixin'
132
- import Dropdown from '../dropdown/Dropdown'
133
- import DropdownItem from '../dropdown/DropdownItem'
134
- import Input from '../input/Input'
135
- import Field from '../field/Field'
136
- import Select from '../select/Select'
137
- import Icon from '../icon/Icon'
132
+ import Dropdown from '../dropdown/Dropdown.vue'
133
+ import DropdownItem from '../dropdown/DropdownItem.vue'
134
+ import Input from '../input/Input.vue'
135
+ import Field from '../field/Field.vue'
136
+ import Select from '../select/Select.vue'
137
+ import Icon from '../icon/Icon.vue'
138
138
 
139
139
  export default {
140
140
  name: 'BTimepicker',
@@ -1,4 +1,4 @@
1
- import Timepicker from './Timepicker'
1
+ import Timepicker from './Timepicker.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  <script>
24
24
  import config from '../../utils/config'
25
- import NoticeMixin from '../../utils/NoticeMixin.js'
25
+ import NoticeMixin from '../../utils/NoticeMixin'
26
26
 
27
27
  export default {
28
28
  name: 'BToast',
@@ -1,4 +1,4 @@
1
- import Toast from './Toast'
1
+ import Toast from './Toast.vue'
2
2
 
3
3
  import config, { VueInstance } from '../../utils/config'
4
4
  import { merge } from '../../utils/helpers'
@@ -16,4 +16,39 @@ describe('BTooltip', () => {
16
16
  it('render correctly', () => {
17
17
  expect(wrapper.html()).toMatchSnapshot()
18
18
  })
19
+
20
+ it('tests isActive watch', async () => {
21
+ await wrapper.setProps({appendToBody: true})
22
+ wrapper.vm.updateAppendToBody = jest.fn()
23
+ wrapper.vm.isActive = true
24
+ expect(wrapper.vm.updateAppendToBody).toHaveBeenCalled()
25
+ expect(wrapper.emitted().open).toBeTruthy()
26
+ })
27
+
28
+ it('tests onHover method', async () => {
29
+ const onHover = jest.spyOn(wrapper.vm, 'onHover')
30
+ const open = jest.spyOn(wrapper.vm, 'open')
31
+ await wrapper.setProps({triggers: ['hover']})
32
+ wrapper.vm.onHover()
33
+ expect(onHover).toHaveBeenCalled()
34
+ expect(open).toHaveBeenCalled()
35
+ })
36
+
37
+ it('tests onContextMenu method', async () => {
38
+ const onContextMenu = jest.spyOn(wrapper.vm, 'onContextMenu')
39
+ const open = jest.spyOn(wrapper.vm, 'open')
40
+ await wrapper.setProps({triggers: ['contextmenu']})
41
+ wrapper.vm.onContextMenu({preventDefault: jest.fn()})
42
+ expect(onContextMenu).toHaveBeenCalled()
43
+ expect(open).toHaveBeenCalled()
44
+ })
45
+
46
+ it('tests onFocus method', async () => {
47
+ const onFocus = jest.spyOn(wrapper.vm, 'onFocus')
48
+ const open = jest.spyOn(wrapper.vm, 'open')
49
+ await wrapper.setProps({triggers: ['focus']})
50
+ wrapper.vm.onFocus()
51
+ expect(onFocus).toHaveBeenCalled()
52
+ expect(open).toHaveBeenCalled()
53
+ })
19
54
  })
@@ -1,4 +1,4 @@
1
- import Tooltip from './Tooltip'
1
+ import Tooltip from './Tooltip.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
@@ -1,4 +1,4 @@
1
- import Upload from './Upload'
1
+ import Upload from './Upload.vue'
2
2
 
3
3
  import { use, registerComponent } from '../../utils/plugins'
4
4
 
package/src/index.js CHANGED
@@ -36,5 +36,6 @@ export { NotificationProgrammatic } from './components/notification'
36
36
  export { SnackbarProgrammatic } from './components/snackbar'
37
37
  export { ToastProgrammatic } from './components/toast'
38
38
  export { default as ConfigProgrammatic } from './utils/ConfigComponent'
39
+ export { default as Color } from './utils/color'
39
40
  // export helpers
40
41
  export * from './utils/helpers'
@@ -46,7 +46,7 @@ $colorpicker-hue-selected-stroke: $primary !default;
46
46
  .dropdown.is-expanded.is-mobile-modal .dropdown-menu {
47
47
  width: unset;
48
48
  }
49
- .dropdown-horizonal-colorpicker {
49
+ .dropdown-horizontal-colorpicker {
50
50
  display: flex;
51
51
  flex-direction: row;
52
52
 
@@ -210,10 +210,10 @@ $datepicker-item-selected-background-color: $primary !default;
210
210
  margin-left: 5px;
211
211
  display: flex;
212
212
  }
213
- .dropdown-horizonal-timepicker {
213
+ .dropdown-horizontal-timepicker {
214
214
  display: flex;
215
215
  }
216
- .content-horizonal-timepicker {
216
+ .content-horizontal-timepicker {
217
217
  border-right: 1px solid #dbdbdb;
218
218
  }
219
219
  }
@@ -4,7 +4,13 @@
4
4
  padding-top: 0;
5
5
  border: 0;
6
6
  }
7
- progress {
8
- height: 5px;
7
+ .auto-close-progress {
8
+ progress {
9
+ border-top-left-radius: 0!important;
10
+ border-top-right-radius: 0!important;
11
+ border-bottom-left-radius: 0!important;
12
+ border-bottom-right-radius: 0!important;
13
+ height: 10px!important;
14
+ }
9
15
  }
10
16
  }
@@ -1,8 +1,8 @@
1
1
  .notification {
2
- .progress-wrapper {
3
- position: absolute;
4
- bottom: 0;
5
- left: 0;
6
- width: 100%;
2
+ .auto-close-progress.progress-wrapper {
3
+ position: absolute;
4
+ bottom: 0;
5
+ left: 0;
6
+ width: 100%;
7
7
  }
8
8
  }
@@ -82,6 +82,9 @@ $radio-colors: $form-colors !default;
82
82
  }
83
83
  }
84
84
  }
85
+ &[disabled] + .check {
86
+ cursor: not-allowed;
87
+ }
85
88
  }
86
89
  .control-label {
87
90
  padding-left: $control-padding-horizontal;
@@ -123,6 +123,7 @@ $table-sticky-header-height: 300px !default;
123
123
  &.is-numeric {
124
124
  flex-direction: row-reverse;
125
125
  text-align: right;
126
+ width: 95%;
126
127
  .icon {
127
128
  margin-left: 0;
128
129
  margin-right: 0.5rem;
@@ -1,4 +1,4 @@
1
- import Icon from '../components/icon/Icon'
1
+ import Icon from '../components/icon/Icon.vue'
2
2
 
3
3
  export default {
4
4
  components: {
@@ -62,8 +62,8 @@ export default (parentCmp) => ({
62
62
  name: 'show',
63
63
  value: this.isActive && this.visible
64
64
  }],
65
+ staticClass: this.elementClass,
65
66
  attrs: {
66
- 'class': this.elementClass,
67
67
  'role': this.elementRole,
68
68
  'id': `${this.value}-content`,
69
69
  'aria-labelledby': this.elementRole ? `${this.value}-label` : null,
@@ -1,4 +1,4 @@
1
- import Icon from '../components/icon/Icon'
1
+ import Icon from '../components/icon/Icon.vue'
2
2
  import SlotComponent from '../utils/SlotComponent'
3
3
  import { default as ProviderParentMixin, Sorted } from './ProviderParentMixin'
4
4
  import {bound} from './helpers'
@@ -1,6 +1,7 @@
1
1
  export const colorChannels = ['red', 'green', 'blue', 'alpha']
2
2
 
3
3
  export const colorsNammed = {
4
+ transparent: '#00000000',
4
5
  black: '#000000',
5
6
  silver: '#c0c0c0',
6
7
  gray: '#808080',
@@ -328,12 +329,12 @@ class Color {
328
329
  ]
329
330
 
330
331
  return Color.fromRGB(...channels.map((value) => Number(value)))
331
- } else if ((match = args[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))) {
332
+ } else if ((args[0].match(/^(h(sl|wb)a?|lab|color|cmyk)\(/i))) {
332
333
  throw new Error('Color expression not implemented yet')
333
334
  }
334
335
  }
335
336
 
336
- return new Color()
337
+ throw new Error('Invalid color expression')
337
338
  }
338
339
 
339
340
  static parseObject(object) {
@@ -7,8 +7,10 @@ describe('Color', () => {
7
7
 
8
8
  expect(red.$channels).toEqual(new Uint8Array([255, 0, 0, 255]))
9
9
  expect(transparentBlue.$channels).toEqual(new Uint8Array([0, 0, 255, 6]))
10
+ expect(() => Color.parse('#1234567')).toThrow()
11
+ expect(() => Color.parse('#123456789')).toThrow()
10
12
  })
11
- it('parse nammed color', () => {
13
+ it('parse named color', () => {
12
14
  const lime = Color.parse('lime')
13
15
  const transparent = Color.parse('transparent')
14
16