buefy 0.7.9 → 0.8.2
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/CHANGELOG.md +82 -0
- package/dist/buefy.css +13759 -8263
- package/dist/buefy.js +9073 -14866
- package/dist/buefy.min.css +1 -5
- package/dist/buefy.min.js +2 -2
- package/dist/cjs/autocomplete.js +22 -0
- package/dist/cjs/button.js +106 -0
- package/dist/cjs/checkbox.js +135 -0
- package/dist/cjs/chunk-07fe6fc0.js +247 -0
- package/dist/cjs/chunk-0af453a7.js +105 -0
- package/dist/cjs/chunk-0e89e51b.js +394 -0
- package/dist/cjs/chunk-13e039f5.js +104 -0
- package/dist/cjs/chunk-143d9e6d.js +404 -0
- package/dist/cjs/chunk-19ebd649.js +114 -0
- package/dist/cjs/chunk-1b1231ce.js +94 -0
- package/dist/cjs/chunk-1e6abfcf.js +94 -0
- package/dist/cjs/chunk-28d164b1.js +172 -0
- package/dist/cjs/chunk-3396605d.js +394 -0
- package/dist/cjs/chunk-364a37a0.js +404 -0
- package/dist/cjs/chunk-3b066933.js +103 -0
- package/dist/cjs/chunk-3dffe6e7.js +54 -0
- package/dist/cjs/chunk-4a03b064.js +199 -0
- package/dist/cjs/chunk-50b06939.js +153 -0
- package/dist/cjs/chunk-52623128.js +105 -0
- package/dist/cjs/chunk-53d4f332.js +94 -0
- package/dist/cjs/chunk-544a95da.js +404 -0
- package/dist/cjs/chunk-545f01b1.js +49 -0
- package/dist/cjs/chunk-59b91990.js +64 -0
- package/dist/cjs/chunk-5b2a3329.js +394 -0
- package/dist/cjs/chunk-60061aa8.js +172 -0
- package/dist/cjs/chunk-67658e54.js +404 -0
- package/dist/cjs/chunk-6963026a.js +86 -0
- package/dist/cjs/chunk-6cece6b7.js +140 -0
- package/dist/cjs/chunk-6d6465c1.js +140 -0
- package/dist/cjs/chunk-6e9c0aca.js +94 -0
- package/dist/cjs/chunk-77f69fca.js +106 -0
- package/dist/cjs/chunk-7a25d736.js +114 -0
- package/dist/cjs/chunk-876befa8.js +247 -0
- package/dist/cjs/chunk-8985ffff.js +105 -0
- package/dist/cjs/chunk-8a05c8c9.js +207 -0
- package/dist/cjs/chunk-90407463.js +258 -0
- package/dist/cjs/chunk-956525c9.js +106 -0
- package/dist/cjs/chunk-96ce35a2.js +114 -0
- package/dist/cjs/chunk-9da1d120.js +86 -0
- package/dist/cjs/chunk-9f6a8079.js +54 -0
- package/dist/cjs/chunk-a60dc21d.js +281 -0
- package/dist/cjs/chunk-b628277d.js +199 -0
- package/dist/cjs/chunk-c146745e.js +153 -0
- package/dist/cjs/chunk-c2aec7a9.js +547 -0
- package/dist/cjs/chunk-c9641331.js +86 -0
- package/dist/cjs/chunk-d492406b.js +172 -0
- package/dist/cjs/chunk-e0aa62a0.js +404 -0
- package/dist/cjs/chunk-e45e0329.js +48 -0
- package/dist/cjs/chunk-e5de6583.js +207 -0
- package/dist/cjs/chunk-e85cceb6.js +258 -0
- package/dist/cjs/chunk-ed5addd6.js +547 -0
- package/dist/cjs/chunk-ef4753d5.js +283 -0
- package/dist/cjs/chunk-f0c597f9.js +199 -0
- package/dist/cjs/chunk-f1df1c63.js +9 -0
- package/dist/cjs/chunk-f1ee2f5c.js +207 -0
- package/dist/cjs/chunk-fbd4d545.js +247 -0
- package/dist/cjs/clockpicker.js +447 -0
- package/dist/cjs/collapse.js +102 -0
- package/dist/cjs/datepicker.js +1281 -0
- package/dist/cjs/dialog.js +237 -0
- package/dist/cjs/dropdown.js +19 -0
- package/dist/cjs/field.js +18 -0
- package/dist/cjs/icon.js +17 -0
- package/dist/cjs/index.js +164 -0
- package/dist/cjs/input.js +20 -0
- package/dist/cjs/loading.js +166 -0
- package/dist/cjs/menu.js +231 -0
- package/dist/cjs/message.js +65 -0
- package/dist/cjs/modal.js +48 -0
- package/dist/cjs/navbar.js +258 -0
- package/dist/cjs/notification.js +142 -0
- package/dist/cjs/numberinput.js +191 -0
- package/dist/cjs/pagination.js +19 -0
- package/dist/cjs/progress.js +151 -0
- package/dist/cjs/radio.js +224 -0
- package/dist/cjs/select.js +20 -0
- package/dist/cjs/slider.js +511 -0
- package/dist/cjs/snackbar.js +114 -0
- package/dist/cjs/steps.js +352 -0
- package/dist/cjs/switch.js +144 -0
- package/dist/cjs/table.js +877 -0
- package/dist/cjs/tabs.js +258 -0
- package/dist/cjs/tag.js +63 -0
- package/dist/cjs/taginput.js +297 -0
- package/dist/cjs/timepicker.js +75 -0
- package/dist/cjs/toast.js +89 -0
- package/dist/cjs/tooltip.js +17 -0
- package/dist/cjs/upload.js +210 -0
- package/dist/components/autocomplete/index.js +1084 -2
- package/dist/components/autocomplete/index.min.js +2 -0
- package/dist/components/button/index.js +425 -2
- package/dist/components/button/index.min.js +2 -0
- package/dist/components/checkbox/index.js +342 -2
- package/dist/components/checkbox/index.min.js +2 -0
- package/dist/components/clockpicker/index.js +2340 -2
- package/dist/components/clockpicker/index.min.js +2 -0
- package/dist/components/collapse/index.js +201 -2
- package/dist/components/collapse/index.min.js +2 -0
- package/dist/components/datepicker/index.js +2720 -2
- package/dist/components/datepicker/index.min.js +2 -0
- package/dist/components/dialog/index.js +768 -2
- package/dist/components/dialog/index.min.js +2 -0
- package/dist/components/dropdown/index.js +555 -2
- package/dist/components/dropdown/index.min.js +2 -0
- package/dist/components/field/index.js +447 -2
- package/dist/components/field/index.min.js +2 -0
- package/dist/components/icon/index.js +322 -2
- package/dist/components/icon/index.min.js +2 -0
- package/dist/components/input/index.js +675 -2
- package/dist/components/input/index.min.js +2 -0
- package/dist/components/loading/index.js +282 -2
- package/dist/components/loading/index.min.js +2 -0
- package/dist/components/menu/index.js +550 -2
- package/dist/components/menu/index.min.js +2 -0
- package/dist/components/message/index.js +482 -2
- package/dist/components/message/index.min.js +2 -0
- package/dist/components/modal/index.js +400 -2
- package/dist/components/modal/index.min.js +2 -0
- package/dist/components/navbar/index.js +371 -0
- package/dist/components/navbar/index.min.js +2 -0
- package/dist/components/notification/index.js +705 -2
- package/dist/components/notification/index.min.js +2 -0
- package/dist/components/numberinput/index.js +846 -2
- package/dist/components/numberinput/index.min.js +2 -0
- package/dist/components/pagination/index.js +577 -2
- package/dist/components/pagination/index.min.js +2 -0
- package/dist/components/progress/index.js +250 -0
- package/dist/components/progress/index.min.js +2 -0
- package/dist/components/radio/index.js +323 -2
- package/dist/components/radio/index.min.js +2 -0
- package/dist/components/select/index.js +571 -2
- package/dist/components/select/index.min.js +2 -0
- package/dist/components/slider/index.js +764 -0
- package/dist/components/slider/index.min.js +2 -0
- package/dist/components/snackbar/index.js +397 -2
- package/dist/components/snackbar/index.min.js +2 -0
- package/dist/components/steps/index.js +721 -2
- package/dist/components/steps/index.min.js +2 -0
- package/dist/components/switch/index.js +243 -2
- package/dist/components/switch/index.min.js +2 -0
- package/dist/components/table/index.js +1870 -2
- package/dist/components/table/index.min.js +2 -0
- package/dist/components/tabs/index.js +627 -2
- package/dist/components/tabs/index.min.js +2 -0
- package/dist/components/tag/index.js +262 -2
- package/dist/components/tag/index.min.js +2 -0
- package/dist/components/taginput/index.js +1459 -2
- package/dist/components/taginput/index.min.js +2 -0
- package/dist/components/timepicker/index.js +2053 -2
- package/dist/components/timepicker/index.min.js +2 -0
- package/dist/components/toast/index.js +372 -2
- package/dist/components/toast/index.min.js +2 -0
- package/dist/components/tooltip/index.js +236 -2
- package/dist/components/tooltip/index.min.js +2 -0
- package/dist/components/upload/index.js +501 -2
- package/dist/components/upload/index.min.js +2 -0
- package/dist/esm/autocomplete.js +18 -0
- package/dist/esm/button.js +102 -0
- package/dist/esm/checkbox.js +131 -0
- package/dist/esm/chunk-00e3e67f.js +401 -0
- package/dist/esm/chunk-051f8b06.js +105 -0
- package/dist/esm/chunk-0566c90d.js +152 -0
- package/dist/esm/chunk-07e19446.js +545 -0
- package/dist/esm/chunk-085a700d.js +7 -0
- package/dist/esm/chunk-0ad6938a.js +53 -0
- package/dist/esm/chunk-0e3f4fb5.js +52 -0
- package/dist/esm/chunk-10c85529.js +151 -0
- package/dist/esm/chunk-121b1efa.js +197 -0
- package/dist/esm/chunk-19dad95e.js +256 -0
- package/dist/esm/chunk-231b6066.js +113 -0
- package/dist/esm/chunk-24d1a01f.js +279 -0
- package/dist/esm/chunk-297bff6b.js +393 -0
- package/dist/esm/chunk-2b2ae5c6.js +245 -0
- package/dist/esm/chunk-2cb6f867.js +46 -0
- package/dist/esm/chunk-33717194.js +392 -0
- package/dist/esm/chunk-3b811b77.js +139 -0
- package/dist/esm/chunk-3e47308f.js +104 -0
- package/dist/esm/chunk-411d6eea.js +84 -0
- package/dist/esm/chunk-4535dec5.js +92 -0
- package/dist/esm/chunk-47a5f3a1.js +103 -0
- package/dist/esm/chunk-4a5384da.js +205 -0
- package/dist/esm/chunk-4b663574.js +112 -0
- package/dist/esm/chunk-4d393f09.js +170 -0
- package/dist/esm/chunk-4d695899.js +257 -0
- package/dist/esm/chunk-4f508891.js +171 -0
- package/dist/esm/chunk-531b8274.js +281 -0
- package/dist/esm/chunk-591ee4a2.js +151 -0
- package/dist/esm/chunk-5d3bf82e.js +170 -0
- package/dist/esm/chunk-5e0b0665.js +104 -0
- package/dist/esm/chunk-648b9aa4.js +45 -0
- package/dist/esm/chunk-666940cf.js +546 -0
- package/dist/esm/chunk-67c97e13.js +246 -0
- package/dist/esm/chunk-6844653e.js +401 -0
- package/dist/esm/chunk-699b7cb4.js +245 -0
- package/dist/esm/chunk-6f881e7d.js +51 -0
- package/dist/esm/chunk-7123d158.js +256 -0
- package/dist/esm/chunk-7cf87590.js +60 -0
- package/dist/esm/chunk-823177ac.js +545 -0
- package/dist/esm/chunk-8838757a.js +401 -0
- package/dist/esm/chunk-8ca878c0.js +198 -0
- package/dist/esm/chunk-8fc2e874.js +85 -0
- package/dist/esm/chunk-912ed715.js +92 -0
- package/dist/esm/chunk-92acc21f.js +392 -0
- package/dist/esm/chunk-98e86f40.js +197 -0
- package/dist/esm/chunk-99a1f9df.js +92 -0
- package/dist/esm/chunk-9a776697.js +112 -0
- package/dist/esm/chunk-9e3207cc.js +46 -0
- package/dist/esm/chunk-9ec14e09.js +112 -0
- package/dist/esm/chunk-a5ea70d0.js +205 -0
- package/dist/esm/chunk-ac3f4847.js +138 -0
- package/dist/esm/chunk-b5376f3e.js +92 -0
- package/dist/esm/chunk-b56eb2c8.js +197 -0
- package/dist/esm/chunk-b796d1b2.js +392 -0
- package/dist/esm/chunk-b822a5db.js +205 -0
- package/dist/esm/chunk-b9bdb0e4.js +6 -0
- package/dist/esm/chunk-bfe15983.js +401 -0
- package/dist/esm/chunk-c9039f68.js +104 -0
- package/dist/esm/chunk-cc718c15.js +245 -0
- package/dist/esm/chunk-cca88db8.js +99 -0
- package/dist/esm/chunk-d6200087.js +50 -0
- package/dist/esm/chunk-daeac852.js +138 -0
- package/dist/esm/chunk-db31c548.js +103 -0
- package/dist/esm/chunk-e5568f45.js +84 -0
- package/dist/esm/chunk-e5fce48f.js +59 -0
- package/dist/esm/chunk-e84b4047.js +170 -0
- package/dist/esm/chunk-e8d90b72.js +98 -0
- package/dist/esm/chunk-e932bb68.js +206 -0
- package/dist/esm/chunk-edd8ff91.js +103 -0
- package/dist/esm/chunk-f0465d8d.js +84 -0
- package/dist/esm/chunk-f743d154.js +93 -0
- package/dist/esm/chunk-f8036b32.js +402 -0
- package/dist/esm/chunk-f984748f.js +401 -0
- package/dist/esm/chunk-fd5b0e1e.js +99 -0
- package/dist/esm/clockpicker.js +443 -0
- package/dist/esm/collapse.js +98 -0
- package/dist/esm/datepicker.js +1277 -0
- package/dist/esm/dialog.js +231 -0
- package/dist/esm/dropdown.js +14 -0
- package/dist/esm/field.js +14 -0
- package/dist/esm/icon.js +13 -0
- package/dist/esm/index.js +154 -0
- package/dist/esm/input.js +16 -0
- package/dist/esm/loading.js +159 -0
- package/dist/esm/menu.js +225 -0
- package/dist/esm/message.js +61 -0
- package/dist/esm/modal.js +42 -0
- package/dist/esm/navbar.js +253 -0
- package/dist/esm/notification.js +135 -0
- package/dist/esm/numberinput.js +187 -0
- package/dist/esm/pagination.js +15 -0
- package/dist/esm/progress.js +147 -0
- package/dist/esm/radio.js +219 -0
- package/dist/esm/select.js +16 -0
- package/dist/esm/slider.js +506 -0
- package/dist/esm/snackbar.js +108 -0
- package/dist/esm/steps.js +347 -0
- package/dist/esm/switch.js +140 -0
- package/dist/esm/table.js +872 -0
- package/dist/esm/tabs.js +253 -0
- package/dist/esm/tag.js +59 -0
- package/dist/esm/taginput.js +293 -0
- package/dist/esm/timepicker.js +71 -0
- package/dist/esm/toast.js +83 -0
- package/dist/esm/tooltip.js +13 -0
- package/dist/esm/upload.js +206 -0
- package/package.json +26 -4
- package/src/components/checkbox/Checkbox.vue +12 -4
- package/src/components/checkbox/CheckboxButton.vue +10 -2
- package/src/components/clockpicker/Clockpicker.vue +0 -5
- package/src/components/datepicker/Datepicker.spec.js +60 -0
- package/src/components/datepicker/Datepicker.vue +46 -19
- package/src/components/datepicker/DatepickerTable.spec.js +107 -2
- package/src/components/datepicker/DatepickerTable.vue +73 -4
- package/src/components/datepicker/DatepickerTableRow.spec.js +127 -17
- package/src/components/datepicker/DatepickerTableRow.vue +103 -4
- package/src/components/dialog/Dialog.vue +5 -3
- package/src/components/dialog/index.js +2 -2
- package/src/components/dropdown/Dropdown.vue +1 -4
- package/src/components/dropdown/DropdownItem.vue +7 -3
- package/src/components/field/Field.spec.js +18 -0
- package/src/components/field/Field.vue +21 -2
- package/src/components/index.js +6 -0
- package/src/components/input/Input.vue +2 -2
- package/src/components/loading/index.js +1 -1
- package/src/components/modal/index.js +1 -1
- package/src/components/navbar/NavBar.spec.js +76 -0
- package/src/components/navbar/Navbar.vue +127 -0
- package/src/components/navbar/NavbarBurger.vue +25 -0
- package/src/components/navbar/NavbarItem.vue +21 -0
- package/src/components/navbar/index.js +20 -0
- package/src/components/notification/index.js +1 -1
- package/src/components/pagination/Pagination.vue +28 -6
- package/src/components/progress/Progress.spec.js +77 -0
- package/src/components/progress/Progress.vue +108 -0
- package/src/components/progress/__snapshots__/Progress.spec.js.snap +7 -0
- package/src/components/progress/index.js +17 -0
- package/src/components/radio/Radio.spec.js +18 -1
- package/src/components/radio/Radio.vue +11 -5
- package/src/components/radio/RadioButton.spec.js +18 -1
- package/src/components/radio/RadioButton.vue +20 -8
- package/src/components/select/Select.spec.js +22 -1
- package/src/components/select/Select.vue +2 -1
- package/src/components/select/__snapshots__/Select.spec.js.snap +7 -0
- package/src/components/slider/Slider.spec.js +10 -0
- package/src/components/slider/Slider.vue +240 -0
- package/src/components/slider/SliderThumb.vue +188 -0
- package/src/components/slider/SliderTick.vue +43 -0
- package/src/components/slider/index.js +20 -0
- package/src/components/snackbar/index.js +2 -2
- package/src/components/steps/StepItem.vue +2 -3
- package/src/components/steps/Steps.vue +7 -5
- package/src/components/switch/Switch.spec.js +29 -0
- package/src/components/switch/Switch.vue +29 -5
- package/src/components/switch/__snapshots__/Switch.spec.js.snap +3 -0
- package/src/components/table/Table.vue +30 -8
- package/src/components/table/TableColumn.vue +2 -2
- package/src/components/tag/Tag.vue +4 -1
- package/src/components/taginput/Taginput.spec.js +10 -0
- package/src/components/taginput/Taginput.vue +8 -3
- package/src/components/toast/index.js +2 -2
- package/src/components/tooltip/Tooltip.vue +5 -5
- package/src/components/upload/Upload.vue +15 -8
- package/src/index.js +11 -4
- package/src/scss/buefy-build.scss +3 -3
- package/src/scss/buefy.scss +4 -0
- package/src/scss/components/_datepicker.scss +40 -1
- package/src/scss/components/_form.scss +52 -1
- package/src/scss/components/_progress.scss +45 -0
- package/src/scss/components/_radio.scss +14 -14
- package/src/scss/components/_slider.scss +138 -0
- package/src/scss/components/_steps.scss +4 -4
- package/src/scss/components/_switch.scss +54 -2
- package/src/scss/components/_taginput.scss +3 -0
- package/src/scss/components/_upload.scss +1 -3
- package/src/utils/SlotComponent.js +9 -2
- package/src/utils/TimepickerMixin.js +17 -6
- package/src/utils/config.js +4 -1
- package/src/utils/helpers.spec.js +67 -0
- package/src/utils/plugins.js +2 -1
- package/types/components.d.ts +3 -3
- package/types/index.d.ts +24 -11
- package/dist/components/index.js +0 -2
|
@@ -8,7 +8,7 @@ MIT (https://github.com/Wikiki/bulma-steps/blob/master/LICENSE)
|
|
|
8
8
|
$steps-maker-default-color: $grey-light !default;
|
|
9
9
|
$steps-marker-default-border: .2em solid #fff !default;
|
|
10
10
|
$steps-default-color: $grey-lighter !default;
|
|
11
|
-
$steps-
|
|
11
|
+
$steps-previous-color: $primary !default;
|
|
12
12
|
$steps-active-color: $primary !default;
|
|
13
13
|
$steps-divider-height: .2em !default;
|
|
14
14
|
|
|
@@ -110,7 +110,7 @@ $steps-divider-height: .2em !default;
|
|
|
110
110
|
background-position: left bottom;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
&.is-
|
|
113
|
+
&.is-previous {
|
|
114
114
|
.step-marker {
|
|
115
115
|
color: $color-invert;
|
|
116
116
|
background-color: $color;
|
|
@@ -165,10 +165,10 @@ $steps-divider-height: .2em !default;
|
|
|
165
165
|
background-position: left bottom;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
&.is-
|
|
168
|
+
&.is-previous {
|
|
169
169
|
.step-marker {
|
|
170
170
|
color: $white;
|
|
171
|
-
background-color: $steps-
|
|
171
|
+
background-color: $steps-previous-color;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
&::before {
|
|
@@ -26,12 +26,12 @@ $switch-active-background-color: $primary !default;
|
|
|
26
26
|
height: #{$switch-width / 2 + $switch-padding};
|
|
27
27
|
padding: $switch-padding;
|
|
28
28
|
background: $grey-light;
|
|
29
|
-
border-radius:
|
|
29
|
+
border-radius: $radius;
|
|
30
30
|
transition: background $speed-slow $easing;
|
|
31
31
|
&:before {
|
|
32
32
|
content: "";
|
|
33
33
|
display: block;
|
|
34
|
-
border-radius:
|
|
34
|
+
border-radius: $radius;
|
|
35
35
|
width: #{($switch-width - $switch-padding * 2) / 2};
|
|
36
36
|
height: #{($switch-width - $switch-padding * 2) / 2};
|
|
37
37
|
background: $background;
|
|
@@ -92,6 +92,58 @@ $switch-active-background-color: $primary !default;
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
+
&.is-rounded {
|
|
96
|
+
input[type=checkbox] {
|
|
97
|
+
+ .check {
|
|
98
|
+
border-radius: $radius-rounded;
|
|
99
|
+
&:before {
|
|
100
|
+
border-radius: $radius-rounded;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
&.is-outlined {
|
|
106
|
+
input[type=checkbox] {
|
|
107
|
+
+ .check {
|
|
108
|
+
background: transparent;
|
|
109
|
+
border: .1rem solid $grey-light;
|
|
110
|
+
&:before {
|
|
111
|
+
background: $grey-light;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
&:checked + .check {
|
|
115
|
+
border-color: $switch-active-background-color;
|
|
116
|
+
@each $name, $pair in $colors {
|
|
117
|
+
$color: nth($pair, 1);
|
|
118
|
+
&.is-#{$name} {
|
|
119
|
+
border-color: $color;
|
|
120
|
+
&:before {
|
|
121
|
+
background: $color;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
&:before {
|
|
126
|
+
background: $switch-active-background-color;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
&:hover {
|
|
131
|
+
input[type=checkbox] + .check {
|
|
132
|
+
background: transparent;
|
|
133
|
+
border-color: rgba($grey-light, 0.9);
|
|
134
|
+
}
|
|
135
|
+
input[type=checkbox]:checked + .check {
|
|
136
|
+
background: transparent;
|
|
137
|
+
border-color: rgba($switch-active-background-color, 0.9);
|
|
138
|
+
@each $name, $pair in $colors {
|
|
139
|
+
$color: nth($pair, 1);
|
|
140
|
+
&.is-#{$name} {
|
|
141
|
+
border-color: rgba($color, 0.9);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
95
147
|
&.is-small {
|
|
96
148
|
@include control-small;
|
|
97
149
|
}
|
|
@@ -9,6 +9,12 @@ export default {
|
|
|
9
9
|
type: String,
|
|
10
10
|
default: 'default'
|
|
11
11
|
},
|
|
12
|
+
scoped: {
|
|
13
|
+
type: Boolean
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
type: Object
|
|
17
|
+
},
|
|
12
18
|
tag: {
|
|
13
19
|
type: String,
|
|
14
20
|
default: 'div'
|
|
@@ -38,8 +44,9 @@ export default {
|
|
|
38
44
|
},
|
|
39
45
|
render(createElement) {
|
|
40
46
|
if (this.isVueComponent()) {
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
return createElement(this.tag, {},
|
|
48
|
+
this.scoped ? this.component.$scopedSlots[this.name](this.props)
|
|
49
|
+
: this.component.$slots[this.name])
|
|
43
50
|
}
|
|
44
51
|
}
|
|
45
52
|
}
|
|
@@ -118,7 +118,9 @@ export default {
|
|
|
118
118
|
position: String,
|
|
119
119
|
unselectableTimes: Array,
|
|
120
120
|
openOnFocus: Boolean,
|
|
121
|
-
enableSeconds: Boolean
|
|
121
|
+
enableSeconds: Boolean,
|
|
122
|
+
defaultMinutes: Number,
|
|
123
|
+
defaultSeconds: Number
|
|
122
124
|
},
|
|
123
125
|
data() {
|
|
124
126
|
return {
|
|
@@ -175,7 +177,7 @@ export default {
|
|
|
175
177
|
const minutes = []
|
|
176
178
|
for (let i = 0; i < 60; i += this.incrementMinutes) {
|
|
177
179
|
minutes.push({
|
|
178
|
-
label: this.formatNumber(i),
|
|
180
|
+
label: this.formatNumber(i, true),
|
|
179
181
|
value: i
|
|
180
182
|
})
|
|
181
183
|
}
|
|
@@ -186,7 +188,7 @@ export default {
|
|
|
186
188
|
const seconds = []
|
|
187
189
|
for (let i = 0; i < 60; i += this.incrementSeconds) {
|
|
188
190
|
seconds.push({
|
|
189
|
-
label: this.formatNumber(i),
|
|
191
|
+
label: this.formatNumber(i, true),
|
|
190
192
|
value: i
|
|
191
193
|
})
|
|
192
194
|
}
|
|
@@ -241,6 +243,12 @@ export default {
|
|
|
241
243
|
},
|
|
242
244
|
|
|
243
245
|
onHoursChange(value) {
|
|
246
|
+
if (!this.minutesSelected && this.defaultMinutes) {
|
|
247
|
+
this.minutesSelected = this.defaultMinutes
|
|
248
|
+
}
|
|
249
|
+
if (!this.secondsSelected && this.defaultSeconds) {
|
|
250
|
+
this.secondsSelected = this.defaultSeconds
|
|
251
|
+
}
|
|
244
252
|
this.updateDateSelected(
|
|
245
253
|
parseInt(value, 10),
|
|
246
254
|
this.minutesSelected,
|
|
@@ -250,6 +258,9 @@ export default {
|
|
|
250
258
|
},
|
|
251
259
|
|
|
252
260
|
onMinutesChange(value) {
|
|
261
|
+
if (!this.secondsSelected && this.defaultSeconds) {
|
|
262
|
+
this.secondsSelected = this.defaultSeconds
|
|
263
|
+
}
|
|
253
264
|
this.updateDateSelected(
|
|
254
265
|
this.hoursSelected,
|
|
255
266
|
parseInt(value, 10),
|
|
@@ -460,7 +471,7 @@ export default {
|
|
|
460
471
|
const hours = date.getHours()
|
|
461
472
|
const minutes = date.getMinutes()
|
|
462
473
|
const seconds = date.getSeconds()
|
|
463
|
-
return this.formatNumber(hours) + ':' +
|
|
474
|
+
return this.formatNumber(hours, true) + ':' +
|
|
464
475
|
this.formatNumber(minutes, true) + ':' +
|
|
465
476
|
this.formatNumber(seconds, true)
|
|
466
477
|
}
|
|
@@ -490,8 +501,8 @@ export default {
|
|
|
490
501
|
}
|
|
491
502
|
},
|
|
492
503
|
|
|
493
|
-
formatNumber(value,
|
|
494
|
-
return this.isHourFormat24 ||
|
|
504
|
+
formatNumber(value, prependZero) {
|
|
505
|
+
return this.isHourFormat24 || prependZero
|
|
495
506
|
? this.pad(value)
|
|
496
507
|
: value
|
|
497
508
|
},
|
package/src/utils/config.js
CHANGED
|
@@ -12,6 +12,7 @@ let config = {
|
|
|
12
12
|
defaultNotificationPosition: null,
|
|
13
13
|
defaultTooltipType: 'is-primary',
|
|
14
14
|
defaultTooltipAnimated: false,
|
|
15
|
+
defaultTooltipDelay: 0,
|
|
15
16
|
defaultInputAutocomplete: 'on',
|
|
16
17
|
defaultDateFormatter: null,
|
|
17
18
|
defaultDateParser: null,
|
|
@@ -28,12 +29,14 @@ let config = {
|
|
|
28
29
|
defaultTimepickerMobileNative: true,
|
|
29
30
|
defaultNoticeQueue: true,
|
|
30
31
|
defaultInputHasCounter: true,
|
|
32
|
+
defaultTaginputHasCounter: true,
|
|
31
33
|
defaultUseHtml5Validation: true,
|
|
32
34
|
defaultDropdownMobileModal: true,
|
|
33
35
|
defaultFieldLabelPosition: null,
|
|
34
36
|
defaultDatepickerYearsRange: [-100, 3],
|
|
35
37
|
defaultDatepickerNearbyMonthDays: true,
|
|
36
|
-
defaultDatepickerNearbySelectableMonthDays: false
|
|
38
|
+
defaultDatepickerNearbySelectableMonthDays: false,
|
|
39
|
+
defaultDatepickerShowWeekNumber: false
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
export default config
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { getValueByPath, indexOf, escapeRegExpChars } from './helpers'
|
|
2
|
+
|
|
3
|
+
describe('helpers', () => {
|
|
4
|
+
describe('getValueByPath', () => {
|
|
5
|
+
it('get value of an object property/path even if it is nested', () => {
|
|
6
|
+
const obj = {
|
|
7
|
+
val1: 'val1',
|
|
8
|
+
val2: {
|
|
9
|
+
val21: 'val21'
|
|
10
|
+
},
|
|
11
|
+
val3: {
|
|
12
|
+
val31: {
|
|
13
|
+
val311: 'val311'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
expect(getValueByPath(obj, 'val1')).toBe('val1')
|
|
19
|
+
expect(getValueByPath(obj, 'val2.val21')).toBe('val21')
|
|
20
|
+
expect(getValueByPath(obj, 'val3.val31.val311')).toBe('val311')
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
describe('indexOf', () => {
|
|
25
|
+
it('get index of an array element using equality function', () => {
|
|
26
|
+
const obj1 = {
|
|
27
|
+
selected: true,
|
|
28
|
+
valid: false
|
|
29
|
+
}
|
|
30
|
+
const obj2 = {
|
|
31
|
+
selected: false,
|
|
32
|
+
valid: false
|
|
33
|
+
}
|
|
34
|
+
const obj3 = {
|
|
35
|
+
selected: true,
|
|
36
|
+
valid: true
|
|
37
|
+
}
|
|
38
|
+
const obj4 = {
|
|
39
|
+
selected: false,
|
|
40
|
+
valid: true
|
|
41
|
+
}
|
|
42
|
+
const arr = [
|
|
43
|
+
obj1,
|
|
44
|
+
obj2,
|
|
45
|
+
obj3,
|
|
46
|
+
obj4
|
|
47
|
+
]
|
|
48
|
+
const fnc = (obj1, obj2) => {
|
|
49
|
+
return obj1.selected === obj2.selected && obj1.valid === obj2.valid
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
expect(indexOf(arr, obj1, fnc)).toBe(0)
|
|
53
|
+
expect(indexOf(arr, obj2, fnc)).toBe(1)
|
|
54
|
+
expect(indexOf(arr, obj3, fnc)).toBe(2)
|
|
55
|
+
expect(indexOf(arr, obj4, fnc)).toBe(3)
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
describe('escapeRegExpChars', () => {
|
|
60
|
+
it('escape regex characters', () => {
|
|
61
|
+
const initial = 'All of these should be escaped: \\ ^ $ * + ? . ( ) | { } [ ]'
|
|
62
|
+
const expected = 'All of these should be escaped: \\\\ \\^ \\$ \\* \\+ \\? \\. \\( \\) \\| \\{ \\} \\[ \\]'
|
|
63
|
+
|
|
64
|
+
expect(escapeRegExpChars(initial)).toBe(expected)
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
})
|
package/src/utils/plugins.js
CHANGED
|
@@ -10,5 +10,6 @@ export const registerComponent = (Vue, component) => {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export const registerComponentProgrammatic = (Vue, property, component) => {
|
|
13
|
-
Vue.prototype
|
|
13
|
+
if (!Vue.prototype.$buefy) Vue.prototype.$buefy = {}
|
|
14
|
+
Vue.prototype.$buefy[property] = component
|
|
14
15
|
}
|
package/types/components.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ type PromptDialogConfig = DialogConfig & {
|
|
|
86
86
|
inputAttrs?: any;
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
export declare const
|
|
89
|
+
export declare const DialogProgrammatic: {
|
|
90
90
|
alert: (params: DialogConfig | string) => any;
|
|
91
91
|
confirm: (params: DialogConfig) => any;
|
|
92
92
|
prompt: (params: PromptDialogConfig) => any;
|
|
@@ -134,7 +134,7 @@ export declare type SnackbarConfig = {
|
|
|
134
134
|
indefinite?: boolean;
|
|
135
135
|
onAction?: () => any;
|
|
136
136
|
}
|
|
137
|
-
export declare const
|
|
137
|
+
export declare const SnackbarProgrammatic: {
|
|
138
138
|
open: (params: SnackbarConfig | string) => any;
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -172,7 +172,7 @@ export declare type ToastConfig = {
|
|
|
172
172
|
queue?: boolean;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
export declare const
|
|
175
|
+
export declare const ToastProgrammatic: {
|
|
176
176
|
open: (params: ToastConfig | string) => any;
|
|
177
177
|
}
|
|
178
178
|
|
package/types/index.d.ts
CHANGED
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
import _Vue from "vue";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
DialogProgrammatic,
|
|
5
|
+
ModalProgrammatic,
|
|
6
|
+
LoadingProgrammatic,
|
|
7
|
+
ToastProgrammatic,
|
|
8
|
+
SnackbarProgrammatic,
|
|
9
|
+
NotificationProgrammatic } from "./components";
|
|
4
10
|
import { ColorModifiers, GlobalPositions } from "./helpers";
|
|
5
11
|
|
|
6
|
-
// Adds Buefy method signatures to Vue instance (ie this.$dialog)
|
|
12
|
+
// Adds Buefy method signatures to Vue instance (ie this.$buefy.dialog)
|
|
7
13
|
declare module 'vue/types/vue' {
|
|
8
14
|
interface Vue {
|
|
9
|
-
$
|
|
10
|
-
$loading: typeof LoadingProgrammatic,
|
|
11
|
-
$modal: typeof ModalProgrammatic,
|
|
12
|
-
$snackbar: typeof Snackbar,
|
|
13
|
-
$toast: typeof Toast,
|
|
14
|
-
$notification: typeof NotificationProgrammatic
|
|
15
|
+
$buefy: BuefyNamespace
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
export declare type BuefyNamespace = {
|
|
20
|
+
dialog: typeof DialogProgrammatic,
|
|
21
|
+
loading: typeof LoadingProgrammatic,
|
|
22
|
+
modal: typeof ModalProgrammatic,
|
|
23
|
+
snackbar: typeof SnackbarProgrammatic,
|
|
24
|
+
toast: typeof ToastProgrammatic,
|
|
25
|
+
notification: typeof NotificationProgrammatic
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
export declare type BuefyConfig = {
|
|
19
29
|
defaultContainerElement?: string,
|
|
20
30
|
defaultIconPack?: string;
|
|
@@ -29,6 +39,7 @@ export declare type BuefyConfig = {
|
|
|
29
39
|
defaultNotificationPosition?: GlobalPositions;
|
|
30
40
|
defaultTooltipType?: ColorModifiers;
|
|
31
41
|
defaultTooltipAnimated?: boolean;
|
|
42
|
+
defaultTooltipDelay?: number;
|
|
32
43
|
defaultInputAutocomplete?: string;
|
|
33
44
|
defaultDateFormatter?: Function;
|
|
34
45
|
defaultDateParser?: Function;
|
|
@@ -45,12 +56,14 @@ export declare type BuefyConfig = {
|
|
|
45
56
|
defaultTimepickerMobileNative?: boolean;
|
|
46
57
|
defaultNoticeQueue?: boolean;
|
|
47
58
|
defaultInputHasCounter?: boolean;
|
|
59
|
+
defaultTaginputHasCounter?: boolean;
|
|
48
60
|
defaultUseHtml5Validation?: boolean;
|
|
49
61
|
defaultDropdownMobileModal?: boolean;
|
|
50
62
|
defaultFieldLabelPosition?: 'inside' | 'on-border';
|
|
51
63
|
defaultDatepickerYearsRange?: number[];
|
|
52
64
|
defaultDatepickerNearbyMonthDays?: boolean;
|
|
53
65
|
defaultDatepickerNearbySelectableMonthDays?: boolean;
|
|
66
|
+
defaultDatepickerShowWeekNumber?: boolean;
|
|
54
67
|
};
|
|
55
68
|
|
|
56
69
|
declare const _default: {
|
|
@@ -58,11 +71,11 @@ declare const _default: {
|
|
|
58
71
|
};
|
|
59
72
|
|
|
60
73
|
export {
|
|
61
|
-
|
|
74
|
+
DialogProgrammatic,
|
|
62
75
|
LoadingProgrammatic,
|
|
63
76
|
ModalProgrammatic,
|
|
64
|
-
|
|
65
|
-
|
|
77
|
+
SnackbarProgrammatic,
|
|
78
|
+
ToastProgrammatic,
|
|
66
79
|
NotificationProgrammatic
|
|
67
80
|
}
|
|
68
81
|
|