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.
- package/README.md +4 -0
- package/dist/buefy.css +76 -24
- package/dist/buefy.esm.js +103 -89
- package/dist/buefy.esm.min.js +2 -2
- package/dist/buefy.js +103 -88
- package/dist/buefy.min.css +1 -1
- package/dist/buefy.min.js +2 -2
- package/dist/cjs/autocomplete.js +2 -2
- package/dist/cjs/{chunk-dddb035c.js → chunk-37e64a78.js} +6 -2
- package/dist/cjs/{chunk-f8eb56c6.js → chunk-4702fda4.js} +1 -1
- package/dist/cjs/{chunk-bcab8905.js → chunk-6e9f64e7.js} +3 -3
- package/dist/cjs/{chunk-eba24a95.js → chunk-8ab08774.js} +5 -5
- package/dist/cjs/{chunk-85b00a19.js → chunk-94bbc46e.js} +4 -4
- package/dist/cjs/{chunk-befea70a.js → chunk-994f8066.js} +22 -8
- package/dist/cjs/{chunk-95c4b826.js → chunk-a39776c7.js} +4 -1
- package/dist/cjs/{chunk-cc9676a6.js → chunk-b7163607.js} +2 -1
- package/dist/cjs/clockpicker.js +3 -3
- package/dist/cjs/colorpicker-a5bbcf7b.js +1774 -0
- package/dist/cjs/colorpicker.js +14 -1750
- package/dist/cjs/datepicker.js +4 -4
- package/dist/cjs/datetimepicker.js +5 -5
- package/dist/cjs/dialog.js +1 -1
- package/dist/cjs/dropdown.js +1 -1
- package/dist/cjs/field.js +1 -1
- package/dist/cjs/index.js +12 -11
- package/dist/cjs/input.js +1 -1
- package/dist/cjs/message.js +1 -1
- package/dist/cjs/modal.js +1 -1
- package/dist/cjs/navbar.js +4 -1
- package/dist/cjs/notification.js +1 -1
- package/dist/cjs/numberinput.js +7 -2
- package/dist/cjs/sidebar.js +6 -44
- package/dist/cjs/steps.js +1 -1
- package/dist/cjs/table.js +5 -5
- package/dist/cjs/tabs.js +1 -1
- package/dist/cjs/taginput.js +7 -3
- package/dist/cjs/timepicker.js +4 -4
- package/dist/components/autocomplete/index.js +26 -9
- package/dist/components/autocomplete/index.min.js +2 -2
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/breadcrumb/index.min.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.min.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/index.min.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.min.js +1 -1
- package/dist/components/clockpicker/index.js +12 -5
- package/dist/components/clockpicker/index.min.js +2 -2
- package/dist/components/collapse/index.js +1 -1
- package/dist/components/collapse/index.min.js +1 -1
- package/dist/components/colorpicker/index.js +46 -21
- package/dist/components/colorpicker/index.min.js +2 -2
- package/dist/components/datepicker/index.js +13 -6
- package/dist/components/datepicker/index.min.js +2 -2
- package/dist/components/datetimepicker/index.js +13 -6
- package/dist/components/datetimepicker/index.min.js +2 -2
- package/dist/components/dialog/index.js +3 -2
- package/dist/components/dialog/index.min.js +2 -2
- package/dist/components/dropdown/index.js +7 -3
- package/dist/components/dropdown/index.min.js +2 -2
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/index.min.js +2 -2
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon/index.min.js +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/image/index.min.js +1 -1
- package/dist/components/input/index.js +5 -2
- package/dist/components/input/index.min.js +2 -2
- package/dist/components/loading/index.js +1 -1
- package/dist/components/loading/index.min.js +1 -1
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/index.min.js +1 -1
- package/dist/components/message/index.js +2 -2
- package/dist/components/message/index.min.js +2 -2
- package/dist/components/modal/index.js +3 -2
- package/dist/components/modal/index.min.js +2 -2
- package/dist/components/navbar/index.js +5 -2
- package/dist/components/navbar/index.min.js +2 -2
- package/dist/components/notification/index.js +2 -2
- package/dist/components/notification/index.min.js +2 -2
- package/dist/components/numberinput/index.js +11 -3
- package/dist/components/numberinput/index.min.js +2 -2
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/index.min.js +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/index.min.js +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.min.js +1 -1
- package/dist/components/rate/index.js +1 -1
- package/dist/components/rate/index.min.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/index.min.js +1 -1
- package/dist/components/sidebar/index.js +7 -48
- package/dist/components/sidebar/index.min.js +2 -2
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/skeleton/index.min.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.min.js +1 -1
- package/dist/components/snackbar/index.js +1 -1
- package/dist/components/snackbar/index.min.js +1 -1
- package/dist/components/steps/index.js +6 -6
- package/dist/components/steps/index.min.js +2 -2
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.min.js +1 -1
- package/dist/components/table/index.js +9 -6
- package/dist/components/table/index.min.js +2 -2
- package/dist/components/tabs/index.js +6 -6
- package/dist/components/tabs/index.min.js +2 -2
- package/dist/components/tag/index.js +1 -1
- package/dist/components/tag/index.min.js +1 -1
- package/dist/components/taginput/index.js +31 -10
- package/dist/components/taginput/index.min.js +2 -2
- package/dist/components/timepicker/index.js +12 -5
- package/dist/components/timepicker/index.min.js +2 -2
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/index.min.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.min.js +1 -1
- package/dist/components/upload/index.js +1 -1
- package/dist/components/upload/index.min.js +1 -1
- package/dist/esm/autocomplete.js +6 -6
- package/dist/esm/button.js +4 -4
- package/dist/esm/carousel.js +4 -4
- package/dist/esm/{chunk-293c457c.js → chunk-007b3ff8.js} +7 -7
- package/dist/esm/{chunk-c5284276.js → chunk-048831a9.js} +2 -2
- package/dist/esm/{chunk-493ff0a9.js → chunk-07da0ba7.js} +1 -1
- package/dist/esm/{chunk-ade5b253.js → chunk-0c67e5e7.js} +8 -4
- package/dist/esm/{chunk-9b0b8225.js → chunk-18dce47f.js} +1 -1
- package/dist/esm/{chunk-6e56b8bc.js → chunk-27ec55c7.js} +1 -1
- package/dist/esm/{chunk-7e17a637.js → chunk-4b289821.js} +1 -1
- package/dist/esm/{chunk-d46e7ff0.js → chunk-6a7209ee.js} +2 -2
- package/dist/esm/{chunk-b5576437.js → chunk-6b514c98.js} +2 -2
- package/dist/esm/{chunk-f32d0228.js → chunk-6efa106e.js} +9 -9
- package/dist/esm/{chunk-60a03517.js → chunk-70481141.js} +1 -1
- package/dist/esm/{chunk-455cdeae.js → chunk-851d1b8f.js} +1 -1
- package/dist/esm/{chunk-33e1434e.js → chunk-8e497030.js} +2 -1
- package/dist/esm/{chunk-b0123b89.js → chunk-9bd1f33e.js} +24 -10
- package/dist/esm/{chunk-4e788733.js → chunk-bf29bc31.js} +3 -3
- package/dist/esm/{chunk-7bb9107f.js → chunk-d62aa1f5.js} +2 -2
- package/dist/esm/{chunk-83c8b459.js → chunk-d77d421b.js} +7 -4
- package/dist/esm/{chunk-6c64686f.js → chunk-dc931ea5.js} +8 -8
- package/dist/esm/clockpicker.js +8 -8
- package/dist/esm/colorpicker-91643f19.js +1770 -0
- package/dist/esm/colorpicker.js +13 -1754
- package/dist/esm/config.js +1 -1
- package/dist/esm/datepicker.js +10 -10
- package/dist/esm/datetimepicker.js +11 -11
- package/dist/esm/dialog.js +4 -4
- package/dist/esm/dropdown.js +4 -4
- package/dist/esm/field.js +3 -3
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/icon.js +3 -3
- package/dist/esm/image.js +3 -3
- package/dist/esm/index.js +24 -24
- package/dist/esm/input.js +5 -5
- package/dist/esm/loading.js +3 -3
- package/dist/esm/menu.js +2 -2
- package/dist/esm/message.js +4 -4
- package/dist/esm/modal.js +3 -3
- package/dist/esm/navbar.js +5 -2
- package/dist/esm/notification.js +5 -5
- package/dist/esm/numberinput.js +10 -5
- package/dist/esm/pagination.js +4 -4
- package/dist/esm/progress.js +2 -2
- package/dist/esm/rate.js +2 -2
- package/dist/esm/select.js +5 -5
- package/dist/esm/sidebar.js +8 -46
- package/dist/esm/slider.js +2 -2
- package/dist/esm/snackbar.js +2 -2
- package/dist/esm/steps.js +5 -5
- package/dist/esm/table.js +12 -12
- package/dist/esm/tabs.js +5 -5
- package/dist/esm/taginput.js +10 -6
- package/dist/esm/timepicker.js +11 -11
- package/dist/esm/toast.js +2 -2
- package/dist/esm/tooltip.js +3 -3
- package/dist/esm/upload.js +2 -2
- package/dist/vetur/attributes.json +12 -0
- package/dist/vetur/tags.json +5 -2
- package/package.json +3 -2
- package/src/components/autocomplete/Autocomplete.vue +23 -4
- package/src/components/autocomplete/index.js +1 -1
- package/src/components/breadcrumb/Breadcrumb.vue +0 -2
- package/src/components/breadcrumb/BreadcrumbItem.spec.js +1 -1
- package/src/components/breadcrumb/BreadcrumbItem.vue +0 -3
- package/src/components/breadcrumb/index.js +2 -2
- package/src/components/button/Button.vue +1 -1
- package/src/components/button/index.js +1 -1
- package/src/components/carousel/Carousel.vue +1 -1
- package/src/components/carousel/CarouselList.vue +2 -2
- package/src/components/carousel/index.js +3 -3
- package/src/components/checkbox/Checkbox.vue +1 -1
- package/src/components/checkbox/CheckboxButton.vue +1 -1
- package/src/components/checkbox/index.js +2 -2
- package/src/components/clockpicker/Clockpicker.vue +5 -5
- package/src/components/clockpicker/index.js +1 -1
- package/src/components/collapse/index.js +1 -1
- package/src/components/colorpicker/Colorpicker.vue +50 -31
- package/src/components/colorpicker/ColorpickerAlphaSlider.spec.js +3 -1
- package/src/components/colorpicker/ColorpickerAlphaSlider.vue +1 -1
- package/src/components/colorpicker/index.js +1 -1
- package/src/components/datepicker/Datepicker.spec.js +4 -4
- package/src/components/datepicker/Datepicker.vue +14 -13
- package/src/components/datepicker/DatepickerTable.vue +1 -1
- package/src/components/datepicker/index.js +1 -1
- package/src/components/datetimepicker/Datetimepicker.vue +2 -2
- package/src/components/datetimepicker/index.js +1 -1
- package/src/components/dialog/Dialog.vue +3 -3
- package/src/components/dialog/index.js +1 -1
- package/src/components/dropdown/Dropdown.vue +6 -2
- package/src/components/dropdown/index.js +2 -2
- package/src/components/field/Field.spec.js +11 -2
- package/src/components/field/Field.vue +6 -2
- package/src/components/field/index.js +1 -1
- package/src/components/icon/index.js +1 -1
- package/src/components/image/index.js +1 -1
- package/src/components/input/Input.spec.js +11 -0
- package/src/components/input/Input.vue +5 -2
- package/src/components/input/index.js +1 -1
- package/src/components/loading/index.js +1 -1
- package/src/components/menu/MenuItem.vue +1 -1
- package/src/components/menu/index.js +3 -3
- package/src/components/message/Message.vue +2 -1
- package/src/components/message/index.js +1 -1
- package/src/components/modal/Modal.vue +2 -1
- package/src/components/modal/index.js +1 -1
- package/src/components/navbar/NavBar.spec.js +1 -1
- package/src/components/navbar/{NavbarBurger.spec.js → NavBarBurger.spec.js} +1 -1
- package/src/components/navbar/NavBarItem.spec.js +1 -1
- package/src/components/navbar/NavbarDropdown.spec.js +1 -1
- package/src/components/navbar/NavbarDropdown.vue +10 -1
- package/src/components/navbar/index.js +3 -3
- package/src/components/notification/Notification.vue +3 -2
- package/src/components/notification/NotificationNotice.vue +1 -1
- package/src/components/notification/index.js +2 -2
- package/src/components/numberinput/Numberinput.spec.js +31 -0
- package/src/components/numberinput/Numberinput.vue +8 -3
- package/src/components/numberinput/index.js +1 -1
- package/src/components/pagination/Pagination.vue +2 -2
- package/src/components/pagination/index.js +2 -2
- package/src/components/progress/index.js +2 -2
- package/src/components/radio/Radio.vue +1 -1
- package/src/components/radio/RadioButton.vue +1 -1
- package/src/components/radio/index.js +2 -2
- package/src/components/rate/Rate.vue +1 -1
- package/src/components/rate/index.js +1 -1
- package/src/components/select/Select.vue +1 -1
- package/src/components/select/index.js +1 -1
- package/src/components/sidebar/Sidebar.vue +6 -25
- package/src/components/sidebar/index.js +1 -1
- package/src/components/skeleton/index.js +1 -1
- package/src/components/slider/Slider.vue +2 -2
- package/src/components/slider/SliderThumb.vue +1 -1
- package/src/components/slider/index.js +2 -2
- package/src/components/snackbar/Snackbar.vue +1 -1
- package/src/components/snackbar/index.js +1 -1
- package/src/components/steps/StepItem.vue +1 -1
- package/src/components/steps/Steps.vue +2 -2
- package/src/components/steps/index.js +2 -2
- package/src/components/switch/index.js +1 -1
- package/src/components/table/Table.vue +31 -19
- package/src/components/table/TableColumn.vue +121 -121
- package/src/components/table/TableMobileSort.vue +2 -2
- package/src/components/table/TablePagination.vue +1 -1
- package/src/components/table/index.js +2 -2
- package/src/components/tabs/TabItem.vue +1 -1
- package/src/components/tabs/Tabs.vue +1 -1
- package/src/components/tabs/index.js +2 -2
- package/src/components/tag/index.js +2 -2
- package/src/components/taginput/Taginput.vue +7 -3
- package/src/components/taginput/index.js +1 -1
- package/src/components/timepicker/Timepicker.vue +6 -6
- package/src/components/timepicker/index.js +1 -1
- package/src/components/toast/Toast.vue +1 -1
- package/src/components/toast/index.js +1 -1
- package/src/components/tooltip/Tooltip.spec.js +35 -0
- package/src/components/tooltip/index.js +1 -1
- package/src/components/upload/index.js +1 -1
- package/src/index.js +1 -0
- package/src/scss/components/_colorpicker.scss +1 -1
- package/src/scss/components/_datepicker.scss +2 -2
- package/src/scss/components/_message.scss +8 -2
- package/src/scss/components/_notification.scss +5 -5
- package/src/scss/components/_radio.scss +3 -0
- package/src/scss/components/_table.scss +1 -0
- package/src/utils/MessageMixin.js +1 -1
- package/src/utils/TabbedChildMixin.js +1 -1
- package/src/utils/TabbedMixin.js +1 -1
- package/src/utils/color.js +3 -2
- package/src/utils/color.spec.js +3 -1
- package/CHANGELOG.md +0 -1741
- /package/dist/esm/{chunk-6d0f2352.js → chunk-241dbe8d.js} +0 -0
- /package/dist/esm/{chunk-17b33cd2.js → chunk-6ca75105.js} +0 -0
- /package/dist/esm/{chunk-c9c18b2f.js → chunk-f37c671e.js} +0 -0
- /package/dist/esm/{chunk-a32d1427.js → chunk-f4922148.js} +0 -0
- /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(
|
|
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-
|
|
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="
|
|
47
|
+
:value="computedValue"
|
|
48
48
|
@input="updateColor"
|
|
49
49
|
/>
|
|
50
50
|
<b-colorpicker-h-s-l-representation-triangle
|
|
51
51
|
v-else
|
|
52
|
-
:value="
|
|
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="
|
|
60
|
+
:value="computedValue.alpha"
|
|
61
61
|
@input="updateAlpha"
|
|
62
|
-
:color="
|
|
62
|
+
:color="computedValue"
|
|
63
63
|
/>
|
|
64
|
-
<slot name="footer" :color="
|
|
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="
|
|
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="
|
|
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="
|
|
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
|
-
|
|
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.
|
|
226
|
-
${this.
|
|
234
|
+
${this.computedValue.toString('hex')} 50%,
|
|
235
|
+
${this.computedValue.toString('hexa')} 50%
|
|
227
236
|
)`
|
|
228
237
|
} else {
|
|
229
|
-
const hex = this.
|
|
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.
|
|
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.
|
|
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.
|
|
273
|
-
this.
|
|
288
|
+
value.alpha = this.computedValue.alpha
|
|
289
|
+
this.computedValue = value
|
|
274
290
|
this.$emit('input', value)
|
|
275
291
|
},
|
|
276
292
|
updateAlpha(alpha) {
|
|
277
|
-
this.
|
|
278
|
-
this.$emit('input', this.
|
|
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
|
|
|
@@ -377,13 +377,13 @@ describe('BDatepicker', () => {
|
|
|
377
377
|
})
|
|
378
378
|
})
|
|
379
379
|
|
|
380
|
-
it('renders a component with .dropdown-
|
|
381
|
-
const subject = wrapper.find('.dropdown-
|
|
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-
|
|
386
|
-
const subject = wrapper.find('.content-
|
|
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
|
-
|
|
19
|
-
|
|
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-
|
|
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-
|
|
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]
|
|
@@ -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'
|
|
@@ -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
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
9
|
v-if="!inline"
|
|
10
|
-
:tabindex="disabled ? false :
|
|
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 {
|
|
@@ -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
|
|
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',
|
|
@@ -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,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
|
|
47
|
+
import MessageMixin from '../../utils/MessageMixin'
|
|
47
48
|
|
|
48
49
|
export default {
|
|
49
50
|
name: 'BMessage',
|
|
@@ -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) => {
|
|
@@ -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
|
|