buefy 1.0.0 → 1.0.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/LICENSE.md +21 -0
- package/README.md +242 -0
- package/dist/buefy.css +15895 -0
- package/dist/buefy.d.ts +11706 -0
- package/dist/buefy.esm.js +21082 -0
- package/dist/buefy.esm.min.js +2 -0
- package/dist/buefy.js +21227 -0
- package/dist/buefy.min.css +1 -0
- package/dist/buefy.min.js +2 -0
- package/dist/cjs/Autocomplete-BMmOsPiK.js +864 -0
- package/dist/cjs/Button-Cq7yqI8p.js +118 -0
- package/dist/cjs/CheckRadioMixin-CDu0SN3g.js +58 -0
- package/dist/cjs/Checkbox-GPzAMQqM.js +85 -0
- package/dist/cjs/CompatFallthroughMixin-hhK0Gkhr.js +48 -0
- package/dist/cjs/Datepicker-B-9ReBe6.js +2120 -0
- package/dist/cjs/Dropdown-DtpKU9qf.js +470 -0
- package/dist/cjs/DropdownItem-IMOKyRGV.js +110 -0
- package/dist/cjs/Field-19ZCJFF8.js +405 -0
- package/dist/cjs/FormElementMixin-DavX4iOv.js +170 -0
- package/dist/cjs/Icon-lsDKE2wQ.js +184 -0
- package/dist/cjs/Image-CocPwU3n.js +356 -0
- package/dist/cjs/InjectedChildMixin-CUKn09dB.js +150 -0
- package/dist/cjs/Input-BcloGeZ3.js +350 -0
- package/dist/cjs/Loading-GqqqjipO.js +145 -0
- package/dist/cjs/MessageMixin-bGuuzfev.js +136 -0
- package/dist/cjs/Modal-CYpSQe2Q.js +315 -0
- package/dist/cjs/NoticeMixin--3RjH43z.js +163 -0
- package/dist/cjs/Pagination-D1MVdiLp.js +547 -0
- package/dist/cjs/Progress-DT9Qc8Id.js +177 -0
- package/dist/cjs/Select-DayPKwCY.js +147 -0
- package/dist/cjs/SlotComponent-BruGdRW3.js +41 -0
- package/dist/cjs/TabbedChildMixin-B3JUUwcf.js +211 -0
- package/dist/cjs/Tag-BprnwJJ1.js +167 -0
- package/dist/cjs/Timepicker-CDZ3V-2J.js +283 -0
- package/dist/cjs/TimepickerMixin-C9WVvcUL.js +666 -0
- package/dist/cjs/Tooltip-Cgighv0j.js +393 -0
- package/dist/cjs/_plugin-vue_export-helper-Die8u8yB.js +11 -0
- package/dist/cjs/autocomplete.js +23 -0
- package/dist/cjs/breadcrumb.js +107 -0
- package/dist/cjs/button.js +20 -0
- package/dist/cjs/carousel.js +825 -0
- package/dist/cjs/checkbox.js +88 -0
- package/dist/cjs/clockpicker.js +668 -0
- package/dist/cjs/collapse.js +99 -0
- package/dist/cjs/colorpicker.js +25 -0
- package/dist/cjs/config-DR826Ki2.js +103 -0
- package/dist/cjs/config.js +18 -0
- package/dist/cjs/datepicker.js +28 -0
- package/dist/cjs/datetimepicker.js +483 -0
- package/dist/cjs/dialog.js +506 -0
- package/dist/cjs/dropdown.js +23 -0
- package/dist/cjs/field.js +19 -0
- package/dist/cjs/helpers.js +276 -0
- package/dist/cjs/icon.js +19 -0
- package/dist/cjs/image.js +19 -0
- package/dist/cjs/index-DiQy3SCb.js +1942 -0
- package/dist/cjs/index.js +274 -0
- package/dist/cjs/input.js +22 -0
- package/dist/cjs/loading.js +87 -0
- package/dist/cjs/menu.js +340 -0
- package/dist/cjs/message.js +119 -0
- package/dist/cjs/modal.js +103 -0
- package/dist/cjs/navbar.js +572 -0
- package/dist/cjs/notification.js +281 -0
- package/dist/cjs/numberinput.js +386 -0
- package/dist/cjs/pagination.js +22 -0
- package/dist/cjs/plugins-DbyYGVpp.js +16 -0
- package/dist/cjs/progress.js +91 -0
- package/dist/cjs/radio.js +137 -0
- package/dist/cjs/rate.js +197 -0
- package/dist/cjs/select.js +22 -0
- package/dist/cjs/sidebar.js +309 -0
- package/dist/cjs/skeleton.js +78 -0
- package/dist/cjs/slider.js +699 -0
- package/dist/cjs/snackbar.js +224 -0
- package/dist/cjs/ssr-DVRFTu_P.js +8 -0
- package/dist/cjs/steps.js +347 -0
- package/dist/cjs/switch.js +161 -0
- package/dist/cjs/table.js +2391 -0
- package/dist/cjs/tabs.js +258 -0
- package/dist/cjs/tag.js +44 -0
- package/dist/cjs/taginput.js +425 -0
- package/dist/cjs/timepicker.js +29 -0
- package/dist/cjs/toast.js +162 -0
- package/dist/cjs/tooltip.js +19 -0
- package/dist/cjs/trapFocus-BlX6xykt.js +53 -0
- package/dist/cjs/upload.js +195 -0
- package/dist/components/autocomplete/index.js +1647 -0
- package/dist/components/autocomplete/index.min.js +2 -0
- package/dist/components/breadcrumb/index.js +173 -0
- package/dist/components/breadcrumb/index.min.js +2 -0
- package/dist/components/button/index.js +334 -0
- package/dist/components/button/index.min.js +2 -0
- package/dist/components/carousel/index.js +1534 -0
- package/dist/components/carousel/index.min.js +2 -0
- package/dist/components/checkbox/index.js +236 -0
- package/dist/components/checkbox/index.min.js +2 -0
- package/dist/components/clockpicker/index.js +2636 -0
- package/dist/components/clockpicker/index.min.js +2 -0
- package/dist/components/collapse/index.js +111 -0
- package/dist/components/collapse/index.min.js +2 -0
- package/dist/components/colorpicker/index.js +4251 -0
- package/dist/components/colorpicker/index.min.js +2 -0
- package/dist/components/datepicker/index.js +4110 -0
- package/dist/components/datepicker/index.min.js +2 -0
- package/dist/components/datetimepicker/index.js +5479 -0
- package/dist/components/datetimepicker/index.min.js +2 -0
- package/dist/components/dialog/index.js +1202 -0
- package/dist/components/dialog/index.min.js +2 -0
- package/dist/components/dropdown/index.js +680 -0
- package/dist/components/dropdown/index.min.js +2 -0
- package/dist/components/field/index.js +439 -0
- package/dist/components/field/index.min.js +2 -0
- package/dist/components/icon/index.js +212 -0
- package/dist/components/icon/index.min.js +2 -0
- package/dist/components/image/index.js +396 -0
- package/dist/components/image/index.min.js +2 -0
- package/dist/components/input/index.js +764 -0
- package/dist/components/input/index.min.js +2 -0
- package/dist/components/loading/index.js +280 -0
- package/dist/components/loading/index.min.js +2 -0
- package/dist/components/menu/index.js +586 -0
- package/dist/components/menu/index.min.js +2 -0
- package/dist/components/message/index.js +611 -0
- package/dist/components/message/index.min.js +2 -0
- package/dist/components/modal/index.js +516 -0
- package/dist/components/modal/index.min.js +2 -0
- package/dist/components/navbar/index.js +634 -0
- package/dist/components/navbar/index.min.js +2 -0
- package/dist/components/notification/index.js +976 -0
- package/dist/components/notification/index.min.js +2 -0
- package/dist/components/numberinput/index.js +1128 -0
- package/dist/components/numberinput/index.min.js +2 -0
- package/dist/components/pagination/index.js +764 -0
- package/dist/components/pagination/index.min.js +2 -0
- package/dist/components/progress/index.js +280 -0
- package/dist/components/progress/index.min.js +2 -0
- package/dist/components/radio/index.js +208 -0
- package/dist/components/radio/index.min.js +2 -0
- package/dist/components/rate/index.js +391 -0
- package/dist/components/rate/index.min.js +2 -0
- package/dist/components/select/index.js +560 -0
- package/dist/components/select/index.min.js +2 -0
- package/dist/components/sidebar/index.js +337 -0
- package/dist/components/sidebar/index.min.js +2 -0
- package/dist/components/skeleton/index.js +87 -0
- package/dist/components/skeleton/index.min.js +2 -0
- package/dist/components/slider/index.js +1171 -0
- package/dist/components/slider/index.min.js +2 -0
- package/dist/components/snackbar/index.js +439 -0
- package/dist/components/snackbar/index.min.js +2 -0
- package/dist/components/steps/index.js +925 -0
- package/dist/components/steps/index.min.js +2 -0
- package/dist/components/switch/index.js +182 -0
- package/dist/components/switch/index.min.js +2 -0
- package/dist/components/table/index.js +4208 -0
- package/dist/components/table/index.min.js +2 -0
- package/dist/components/tabs/index.js +837 -0
- package/dist/components/tabs/index.min.js +2 -0
- package/dist/components/tag/index.js +396 -0
- package/dist/components/tag/index.min.js +2 -0
- package/dist/components/taginput/index.js +2209 -0
- package/dist/components/taginput/index.min.js +2 -0
- package/dist/components/timepicker/index.js +2906 -0
- package/dist/components/timepicker/index.min.js +2 -0
- package/dist/components/toast/index.js +377 -0
- package/dist/components/toast/index.min.js +2 -0
- package/dist/components/tooltip/index.js +445 -0
- package/dist/components/tooltip/index.min.js +2 -0
- package/dist/components/upload/index.js +426 -0
- package/dist/components/upload/index.min.js +2 -0
- package/dist/esm/Autocomplete-CjbTh9D8.js +862 -0
- package/dist/esm/Button-DyUYShTZ.js +116 -0
- package/dist/esm/CheckRadioMixin-DSD_rjC8.js +56 -0
- package/dist/esm/Checkbox-KUMz0sfA.js +83 -0
- package/dist/esm/CompatFallthroughMixin-C8LPuwDr.js +46 -0
- package/dist/esm/Datepicker-Bl8Wfdkn.js +2118 -0
- package/dist/esm/Dropdown-CGTYVyoL.js +467 -0
- package/dist/esm/DropdownItem-Cn3nM0A3.js +108 -0
- package/dist/esm/Field-B7bX_uUg.js +403 -0
- package/dist/esm/FormElementMixin-Dd_wkBN5.js +168 -0
- package/dist/esm/Icon-DPyGDeRK.js +182 -0
- package/dist/esm/Image-DhX-4hlV.js +354 -0
- package/dist/esm/InjectedChildMixin-D2K-FwuO.js +145 -0
- package/dist/esm/Input-C4L520az.js +348 -0
- package/dist/esm/Loading-tuQoo6TU.js +143 -0
- package/dist/esm/MessageMixin-CQ7LIdvq.js +134 -0
- package/dist/esm/Modal-tfvyhxw_.js +313 -0
- package/dist/esm/NoticeMixin-ByNlva3T.js +161 -0
- package/dist/esm/Pagination-B-LAJQay.js +543 -0
- package/dist/esm/Progress-BPGTVZgr.js +174 -0
- package/dist/esm/Select-bl4qUzij.js +145 -0
- package/dist/esm/SlotComponent-BwNpVnfH.js +39 -0
- package/dist/esm/TabbedChildMixin-C4i6WP9j.js +208 -0
- package/dist/esm/Tag-jS5Bcj6N.js +165 -0
- package/dist/esm/Timepicker-DnkqnOBT.js +281 -0
- package/dist/esm/TimepickerMixin-Bikh6_Fg.js +664 -0
- package/dist/esm/Tooltip-CtDSXAqa.js +391 -0
- package/dist/esm/_plugin-vue_export-helper-OJRSZE6i.js +9 -0
- package/dist/esm/autocomplete.js +18 -0
- package/dist/esm/breadcrumb.js +101 -0
- package/dist/esm/button.js +15 -0
- package/dist/esm/carousel.js +818 -0
- package/dist/esm/checkbox.js +82 -0
- package/dist/esm/clockpicker.js +663 -0
- package/dist/esm/collapse.js +94 -0
- package/dist/esm/colorpicker.js +16 -0
- package/dist/esm/config-CKuo-p6e.js +100 -0
- package/dist/esm/config.js +14 -0
- package/dist/esm/datepicker.js +23 -0
- package/dist/esm/datetimepicker.js +478 -0
- package/dist/esm/dialog.js +500 -0
- package/dist/esm/dropdown.js +17 -0
- package/dist/esm/field.js +14 -0
- package/dist/esm/helpers.js +247 -0
- package/dist/esm/icon.js +14 -0
- package/dist/esm/image.js +14 -0
- package/dist/esm/index-CQegEsxK.js +1938 -0
- package/dist/esm/index.js +164 -0
- package/dist/esm/input.js +17 -0
- package/dist/esm/loading.js +81 -0
- package/dist/esm/menu.js +333 -0
- package/dist/esm/message.js +114 -0
- package/dist/esm/modal.js +97 -0
- package/dist/esm/navbar.js +565 -0
- package/dist/esm/notification.js +275 -0
- package/dist/esm/numberinput.js +381 -0
- package/dist/esm/pagination.js +16 -0
- package/dist/esm/plugins-B172kuKE.js +13 -0
- package/dist/esm/progress.js +85 -0
- package/dist/esm/radio.js +131 -0
- package/dist/esm/rate.js +192 -0
- package/dist/esm/select.js +17 -0
- package/dist/esm/sidebar.js +304 -0
- package/dist/esm/skeleton.js +73 -0
- package/dist/esm/slider.js +693 -0
- package/dist/esm/snackbar.js +218 -0
- package/dist/esm/ssr-C7yEpGLm.js +5 -0
- package/dist/esm/steps.js +341 -0
- package/dist/esm/switch.js +156 -0
- package/dist/esm/table.js +2385 -0
- package/dist/esm/tabs.js +252 -0
- package/dist/esm/tag.js +38 -0
- package/dist/esm/taginput.js +420 -0
- package/dist/esm/timepicker.js +24 -0
- package/dist/esm/toast.js +156 -0
- package/dist/esm/tooltip.js +14 -0
- package/dist/esm/trapFocus-KHP_kCNE.js +51 -0
- package/dist/esm/upload.js +190 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +73 -6
- package/src/components/autocomplete/Autocomplete.spec.ts +783 -0
- package/src/components/autocomplete/Autocomplete.vue +966 -0
- package/src/components/autocomplete/__snapshots__/Autocomplete.spec.ts.snap +21 -0
- package/src/components/autocomplete/index.ts +16 -0
- package/src/components/breadcrumb/Breadcrumb.spec.ts +65 -0
- package/src/components/breadcrumb/Breadcrumb.vue +42 -0
- package/src/components/breadcrumb/BreadcrumbItem.spec.ts +74 -0
- package/src/components/breadcrumb/BreadcrumbItem.vue +34 -0
- package/src/components/breadcrumb/__snapshots__/Breadcrumb.spec.ts.snap +7 -0
- package/src/components/breadcrumb/__snapshots__/BreadcrumbItem.spec.ts.snap +3 -0
- package/src/components/breadcrumb/index.ts +19 -0
- package/src/components/button/Button.spec.ts +117 -0
- package/src/components/button/Button.vue +112 -0
- package/src/components/button/__snapshots__/Button.spec.ts.snap +9 -0
- package/src/components/button/index.ts +16 -0
- package/src/components/carousel/Carousel.spec.ts +304 -0
- package/src/components/carousel/Carousel.vue +389 -0
- package/src/components/carousel/CarouselItem.spec.ts +105 -0
- package/src/components/carousel/CarouselItem.vue +38 -0
- package/src/components/carousel/CarouselList.spec.ts +172 -0
- package/src/components/carousel/CarouselList.vue +364 -0
- package/src/components/carousel/__snapshots__/Carousel.spec.ts.snap +19 -0
- package/src/components/carousel/__snapshots__/CarouselItem.spec.ts.snap +7 -0
- package/src/components/carousel/__snapshots__/CarouselList.spec.ts.snap +36 -0
- package/src/components/carousel/index.ts +23 -0
- package/src/components/carousel/types.ts +17 -0
- package/src/components/checkbox/Checkbox.spec.ts +40 -0
- package/src/components/checkbox/Checkbox.vue +63 -0
- package/src/components/checkbox/CheckboxButton.spec.ts +46 -0
- package/src/components/checkbox/CheckboxButton.vue +59 -0
- package/src/components/checkbox/__snapshots__/Checkbox.spec.ts.snap +9 -0
- package/src/components/checkbox/__snapshots__/CheckboxButton.spec.ts.snap +3 -0
- package/src/components/checkbox/index.ts +20 -0
- package/src/components/clockpicker/Clockpicker.spec.ts +161 -0
- package/src/components/clockpicker/Clockpicker.vue +311 -0
- package/src/components/clockpicker/ClockpickerFace.spec.ts +99 -0
- package/src/components/clockpicker/ClockpickerFace.vue +272 -0
- package/src/components/clockpicker/__snapshots__/Clockpicker.spec.ts.snap +36 -0
- package/src/components/clockpicker/__snapshots__/ClockpickerFace.spec.ts.snap +9 -0
- package/src/components/clockpicker/index.ts +16 -0
- package/src/components/collapse/Collapse.spec.ts +106 -0
- package/src/components/collapse/Collapse.vue +98 -0
- package/src/components/collapse/__snapshots__/Collapse.spec.ts.snap +10 -0
- package/src/components/collapse/index.ts +16 -0
- package/src/components/colorpicker/Colorpicker.spec.ts +22 -0
- package/src/components/colorpicker/Colorpicker.vue +416 -0
- package/src/components/colorpicker/ColorpickerAlphaSlider.spec.ts +17 -0
- package/src/components/colorpicker/ColorpickerAlphaSlider.vue +205 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.spec.ts +23 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationSquare.vue +380 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.spec.ts +23 -0
- package/src/components/colorpicker/ColorpickerHSLRepresentationTriangle.vue +456 -0
- package/src/components/colorpicker/__snapshots__/Colorpicker.spec.ts.snap +77 -0
- package/src/components/colorpicker/__snapshots__/ColorpickerAlphaSlider.spec.ts.snap +9 -0
- package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationSquare.spec.ts.snap +12 -0
- package/src/components/colorpicker/__snapshots__/ColorpickerHSLRepresentationTriangle.spec.ts.snap +36 -0
- package/src/components/colorpicker/index.ts +16 -0
- package/src/components/datepicker/Datepicker.spec.ts +482 -0
- package/src/components/datepicker/Datepicker.vue +908 -0
- package/src/components/datepicker/DatepickerMonth.spec.ts +346 -0
- package/src/components/datepicker/DatepickerMonth.vue +444 -0
- package/src/components/datepicker/DatepickerTable.spec.ts +290 -0
- package/src/components/datepicker/DatepickerTable.vue +398 -0
- package/src/components/datepicker/DatepickerTableRow.spec.ts +300 -0
- package/src/components/datepicker/DatepickerTableRow.vue +416 -0
- package/src/components/datepicker/__snapshots__/Datepicker.spec.ts.snap +54 -0
- package/src/components/datepicker/__snapshots__/DatepickerMonth.spec.ts.snap +33 -0
- package/src/components/datepicker/__snapshots__/DatepickerTable.spec.ts.snap +16 -0
- package/src/components/datepicker/__snapshots__/DatepickerTableRow.spec.ts.snap +23 -0
- package/src/components/datepicker/index.ts +17 -0
- package/src/components/datepicker/types.ts +41 -0
- package/src/components/datetimepicker/Datetimepicker.spec.ts +132 -0
- package/src/components/datetimepicker/Datetimepicker.vue +491 -0
- package/src/components/datetimepicker/index.ts +16 -0
- package/src/components/dialog/Dialog.spec.ts +108 -0
- package/src/components/dialog/Dialog.vue +300 -0
- package/src/components/dialog/index.ts +169 -0
- package/src/components/dropdown/Dropdown.spec.ts +229 -0
- package/src/components/dropdown/Dropdown.vue +491 -0
- package/src/components/dropdown/DropdownItem.spec.ts +78 -0
- package/src/components/dropdown/DropdownItem.vue +112 -0
- package/src/components/dropdown/__snapshots__/Dropdown.spec.ts.snap +15 -0
- package/src/components/dropdown/__snapshots__/DropdownItem.spec.ts.snap +3 -0
- package/src/components/dropdown/index.ts +20 -0
- package/src/components/field/Field.spec.ts +324 -0
- package/src/components/field/Field.vue +316 -0
- package/src/components/field/FieldBody.spec.ts +96 -0
- package/src/components/field/FieldBody.vue +74 -0
- package/src/components/field/__snapshots__/Field.spec.ts.snap +8 -0
- package/src/components/field/__snapshots__/FieldBody.spec.ts.snap +3 -0
- package/src/components/field/index.ts +16 -0
- package/src/components/icon/Icon.spec.ts +142 -0
- package/src/components/icon/Icon.vue +120 -0
- package/src/components/icon/__snapshots__/Icon.spec.ts.snap +3 -0
- package/src/components/icon/index.ts +17 -0
- package/src/components/image/Image.spec.ts +218 -0
- package/src/components/image/Image.vue +358 -0
- package/src/components/image/__snapshots__/Image.spec.ts.snap +37 -0
- package/src/components/image/index.ts +16 -0
- package/src/components/index.ts +179 -0
- package/src/components/input/Input.spec.ts +396 -0
- package/src/components/input/Input.vue +335 -0
- package/src/components/input/__snapshots__/Input.spec.ts.snap +9 -0
- package/src/components/input/index.ts +17 -0
- package/src/components/loading/Loading.spec.ts +151 -0
- package/src/components/loading/Loading.vue +135 -0
- package/src/components/loading/__snapshots__/Loading.spec.ts.snap +10 -0
- package/src/components/loading/index.ts +91 -0
- package/src/components/menu/Menu.spec.ts +21 -0
- package/src/components/menu/Menu.vue +31 -0
- package/src/components/menu/MenuItem.spec.ts +92 -0
- package/src/components/menu/MenuItem.vue +168 -0
- package/src/components/menu/MenuItemContainerMixin.ts +72 -0
- package/src/components/menu/MenuList.spec.ts +35 -0
- package/src/components/menu/MenuList.vue +47 -0
- package/src/components/menu/__snapshots__/Menu.spec.ts.snap +3 -0
- package/src/components/menu/__snapshots__/MenuItem.spec.ts.snap +9 -0
- package/src/components/menu/__snapshots__/MenuList.spec.ts.snap +8 -0
- package/src/components/menu/index.ts +25 -0
- package/src/components/message/Message.spec.ts +30 -0
- package/src/components/message/Message.vue +73 -0
- package/src/components/message/__snapshots__/Message.spec.ts.snap +11 -0
- package/src/components/message/index.ts +15 -0
- package/src/components/modal/Modal.spec.ts +167 -0
- package/src/components/modal/Modal.vue +335 -0
- package/src/components/modal/__snapshots__/Modal.spec.ts.snap +10 -0
- package/src/components/modal/index.ts +107 -0
- package/src/components/navbar/NavBar.spec.ts +78 -0
- package/src/components/navbar/NavBarBurger.spec.ts +30 -0
- package/src/components/navbar/NavBarItem.spec.ts +92 -0
- package/src/components/navbar/Navbar.vue +274 -0
- package/src/components/navbar/NavbarBurger.vue +29 -0
- package/src/components/navbar/NavbarDropdown.spec.ts +84 -0
- package/src/components/navbar/NavbarDropdown.vue +115 -0
- package/src/components/navbar/NavbarItem.vue +97 -0
- package/src/components/navbar/__snapshots__/NavBar.spec.ts.snap +11 -0
- package/src/components/navbar/__snapshots__/NavBarBurger.spec.ts.snap +3 -0
- package/src/components/navbar/__snapshots__/NavBarItem.spec.ts.snap +3 -0
- package/src/components/navbar/__snapshots__/NavbarDropdown.spec.ts.snap +7 -0
- package/src/components/navbar/index.ts +22 -0
- package/src/components/notification/Notification.spec.ts +21 -0
- package/src/components/notification/Notification.vue +77 -0
- package/src/components/notification/NotificationNotice.vue +76 -0
- package/src/components/notification/__snapshots__/Notification.spec.ts.snap +10 -0
- package/src/components/notification/index.ts +121 -0
- package/src/components/numberinput/Numberinput.spec.ts +445 -0
- package/src/components/numberinput/Numberinput.vue +372 -0
- package/src/components/numberinput/index.ts +16 -0
- package/src/components/pagination/Pagination.spec.ts +94 -0
- package/src/components/pagination/Pagination.vue +434 -0
- package/src/components/pagination/PaginationButton.spec.ts +42 -0
- package/src/components/pagination/PaginationButton.vue +59 -0
- package/src/components/pagination/__snapshots__/Pagination.spec.ts.snap +22 -0
- package/src/components/pagination/__snapshots__/PaginationButton.spec.ts.snap +3 -0
- package/src/components/pagination/index.ts +19 -0
- package/src/components/pagination/types.ts +11 -0
- package/src/components/progress/Progress.spec.ts +81 -0
- package/src/components/progress/Progress.vue +168 -0
- package/src/components/progress/ProgressBar.spec.ts +45 -0
- package/src/components/progress/ProgressBar.vue +74 -0
- package/src/components/progress/__snapshots__/Progress.spec.ts.snap +7 -0
- package/src/components/progress/__snapshots__/ProgressBar.spec.ts.snap +7 -0
- package/src/components/progress/index.ts +18 -0
- package/src/components/radio/Radio.spec.ts +40 -0
- package/src/components/radio/Radio.vue +35 -0
- package/src/components/radio/RadioButton.spec.ts +40 -0
- package/src/components/radio/RadioButton.vue +69 -0
- package/src/components/radio/__snapshots__/Radio.spec.ts.snap +3 -0
- package/src/components/radio/__snapshots__/RadioButton.spec.ts.snap +3 -0
- package/src/components/radio/index.ts +18 -0
- package/src/components/rate/Rate.spec.ts +90 -0
- package/src/components/rate/Rate.vue +158 -0
- package/src/components/rate/index.ts +15 -0
- package/src/components/select/Select.spec.ts +74 -0
- package/src/components/select/Select.vue +118 -0
- package/src/components/select/__snapshots__/Select.spec.ts.snap +7 -0
- package/src/components/select/index.ts +16 -0
- package/src/components/sidebar/Sidebar.spec.ts +107 -0
- package/src/components/sidebar/Sidebar.vue +316 -0
- package/src/components/sidebar/__snapshots__/Sidebar.spec.ts.snap +25 -0
- package/src/components/sidebar/index.ts +16 -0
- package/src/components/skeleton/Skeleton.spec.ts +16 -0
- package/src/components/skeleton/Skeleton.vue +98 -0
- package/src/components/skeleton/__snapshots__/Skeleton.spec.ts.snap +7 -0
- package/src/components/skeleton/index.ts +18 -0
- package/src/components/slider/Slider.spec.ts +115 -0
- package/src/components/slider/Slider.vue +374 -0
- package/src/components/slider/SliderThumb.spec.ts +176 -0
- package/src/components/slider/SliderThumb.vue +251 -0
- package/src/components/slider/SliderTick.spec.ts +33 -0
- package/src/components/slider/SliderTick.vue +50 -0
- package/src/components/slider/__snapshots__/Slider.spec.ts.snap +12 -0
- package/src/components/slider/__snapshots__/SliderThumb.spec.ts.snap +16 -0
- package/src/components/slider/__snapshots__/SliderTick.spec.ts.snap +7 -0
- package/src/components/slider/index.ts +19 -0
- package/src/components/slider/types.ts +34 -0
- package/src/components/snackbar/Snackbar.spec.ts +35 -0
- package/src/components/snackbar/Snackbar.vue +88 -0
- package/src/components/snackbar/__snapshots__/Snackbar.spec.ts.snap +12 -0
- package/src/components/snackbar/index.ts +118 -0
- package/src/components/steps/StepItem.spec.ts +114 -0
- package/src/components/steps/StepItem.vue +26 -0
- package/src/components/steps/Steps.spec.ts +125 -0
- package/src/components/steps/Steps.vue +273 -0
- package/src/components/steps/__snapshots__/StepItem.spec.ts.snap +7 -0
- package/src/components/steps/__snapshots__/Steps.spec.ts.snap +40 -0
- package/src/components/steps/index.ts +19 -0
- package/src/components/switch/Switch.spec.ts +74 -0
- package/src/components/switch/Switch.vue +146 -0
- package/src/components/switch/__snapshots__/Switch.spec.ts.snap +3 -0
- package/src/components/switch/index.ts +16 -0
- package/src/components/table/Table.spec.ts +622 -0
- package/src/components/table/Table.vue +1770 -0
- package/src/components/table/TableColumn.spec.ts +85 -0
- package/src/components/table/TableColumn.vue +140 -0
- package/src/components/table/TableMobileSort.spec.ts +47 -0
- package/src/components/table/TableMobileSort.vue +236 -0
- package/src/components/table/TablePagination.vue +86 -0
- package/src/components/table/__snapshots__/Table.spec.ts.snap +24 -0
- package/src/components/table/__snapshots__/TableMobileSort.spec.ts.snap +12 -0
- package/src/components/table/index.ts +32 -0
- package/src/components/table/mockTableColumn.ts +110 -0
- package/src/components/table/types.ts +110 -0
- package/src/components/tabs/TabItem.spec.ts +203 -0
- package/src/components/tabs/TabItem.vue +19 -0
- package/src/components/tabs/Tabs.spec.ts +122 -0
- package/src/components/tabs/Tabs.vue +204 -0
- package/src/components/tabs/__snapshots__/TabItem.spec.ts.snap +7 -0
- package/src/components/tabs/__snapshots__/Tabs.spec.ts.snap +33 -0
- package/src/components/tabs/index.ts +19 -0
- package/src/components/tag/Tag.spec.ts +32 -0
- package/src/components/tag/Tag.vue +132 -0
- package/src/components/tag/Taglist.spec.ts +21 -0
- package/src/components/tag/Taglist.vue +16 -0
- package/src/components/tag/__snapshots__/Tag.spec.ts.snap +6 -0
- package/src/components/tag/__snapshots__/Taglist.spec.ts.snap +3 -0
- package/src/components/tag/index.ts +19 -0
- package/src/components/taginput/Taginput.spec.ts +132 -0
- package/src/components/taginput/Taginput.vue +415 -0
- package/src/components/taginput/__snapshots__/Taginput.spec.ts.snap +10 -0
- package/src/components/taginput/index.ts +16 -0
- package/src/components/timepicker/Timepicker.spec.ts +108 -0
- package/src/components/timepicker/Timepicker.vue +183 -0
- package/src/components/timepicker/__snapshots__/Timepicker.spec.ts.snap +41 -0
- package/src/components/timepicker/index.ts +17 -0
- package/src/components/toast/Toast.spec.ts +74 -0
- package/src/components/toast/Toast.vue +46 -0
- package/src/components/toast/__snapshots__/Toast.spec.ts.snap +10 -0
- package/src/components/toast/index.ts +120 -0
- package/src/components/tooltip/Tooltip.spec.ts +64 -0
- package/src/components/tooltip/Tooltip.vue +393 -0
- package/src/components/tooltip/__snapshots__/Tooltip.spec.ts.snap +12 -0
- package/src/components/tooltip/index.ts +16 -0
- package/src/components/upload/Upload.spec.ts +62 -0
- package/src/components/upload/Upload.vue +188 -0
- package/src/components/upload/__snapshots__/Upload.spec.ts.snap +3 -0
- package/src/components/upload/index.ts +15 -0
- package/src/directives/clickOutside.ts +113 -0
- package/src/directives/trapFocus.ts +61 -0
- package/src/index.ts +43 -0
- package/src/scss/buefy-build.scss +6 -0
- package/src/scss/buefy.scss +39 -0
- package/src/scss/components/_autocomplete.scss +39 -0
- package/src/scss/components/_carousel.scss +204 -0
- package/src/scss/components/_checkbox.scss +106 -0
- package/src/scss/components/_clockpicker.scss +283 -0
- package/src/scss/components/_collapse.scss +9 -0
- package/src/scss/components/_colorpicker.scss +283 -0
- package/src/scss/components/_datepicker.scss +220 -0
- package/src/scss/components/_dialog.scss +54 -0
- package/src/scss/components/_dropdown.scss +143 -0
- package/src/scss/components/_form.scss +309 -0
- package/src/scss/components/_icon.scss +16 -0
- package/src/scss/components/_image.scss +20 -0
- package/src/scss/components/_loading.scss +45 -0
- package/src/scss/components/_menu.scss +11 -0
- package/src/scss/components/_message.scss +16 -0
- package/src/scss/components/_modal.scss +37 -0
- package/src/scss/components/_navbar.scss +22 -0
- package/src/scss/components/_notices.scss +144 -0
- package/src/scss/components/_notification.scss +8 -0
- package/src/scss/components/_numberinput.scss +33 -0
- package/src/scss/components/_pagination.scss +63 -0
- package/src/scss/components/_progress.scss +105 -0
- package/src/scss/components/_radio.scss +123 -0
- package/src/scss/components/_rate.scss +72 -0
- package/src/scss/components/_select.scss +38 -0
- package/src/scss/components/_sidebar.scss +107 -0
- package/src/scss/components/_skeleton.scss +66 -0
- package/src/scss/components/_slider.scss +162 -0
- package/src/scss/components/_steps.scss +491 -0
- package/src/scss/components/_switch.scss +214 -0
- package/src/scss/components/_table.scss +322 -0
- package/src/scss/components/_tabs.scss +197 -0
- package/src/scss/components/_tag.scss +36 -0
- package/src/scss/components/_taginput.scss +73 -0
- package/src/scss/components/_timepicker.scss +73 -0
- package/src/scss/components/_tooltip.scss +192 -0
- package/src/scss/components/_upload.scss +62 -0
- package/src/scss/utils/_all.scss +4 -0
- package/src/scss/utils/_animations.scss +183 -0
- package/src/scss/utils/_functions.scss +49 -0
- package/src/scss/utils/_helpers.scss +6 -0
- package/src/scss/utils/_variables-ext.scss +2 -0
- package/src/scss/utils/_variables.scss +16 -0
- package/src/utils/CheckRadioMixin.spec.ts +28 -0
- package/src/utils/CheckRadioMixin.ts +61 -0
- package/src/utils/CompatFallthroughMixin.ts +34 -0
- package/src/utils/ConfigComponent.ts +12 -0
- package/src/utils/FormElementMixin.spec.ts +41 -0
- package/src/utils/FormElementMixin.ts +206 -0
- package/src/utils/InjectedChildMixin.ts +139 -0
- package/src/utils/MessageMixin.spec.ts +51 -0
- package/src/utils/MessageMixin.ts +138 -0
- package/src/utils/NoticeMixin.spec.ts +55 -0
- package/src/utils/NoticeMixin.ts +181 -0
- package/src/utils/ProvideInjectTypes.ts +20 -0
- package/src/utils/ProviderParentMixin.ts +105 -0
- package/src/utils/SlotComponent.spec.ts +55 -0
- package/src/utils/SlotComponent.ts +38 -0
- package/src/utils/TabbedChildMixin.ts +96 -0
- package/src/utils/TabbedMixin.ts +166 -0
- package/src/utils/TabbedTypes.ts +33 -0
- package/src/utils/TimepickerMixin.spec.ts +75 -0
- package/src/utils/TimepickerMixin.ts +767 -0
- package/src/utils/color.spec.ts +55 -0
- package/src/utils/color.ts +507 -0
- package/src/utils/config.spec.ts +11 -0
- package/src/utils/config.ts +619 -0
- package/src/utils/debounce.spec.ts +52 -0
- package/src/utils/debounce.ts +20 -0
- package/src/utils/helpers.spec.ts +257 -0
- package/src/utils/helpers.ts +527 -0
- package/src/utils/icons.ts +73 -0
- package/src/utils/plugins.ts +20 -0
- package/src/utils/ssr.ts +6 -0
- package/src/utils/vue-augmentation.ts +35 -0
|
@@ -0,0 +1,1171 @@
|
|
|
1
|
+
/*! Buefy v1.0.2 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
(function (global, factory) {
|
|
3
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
4
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Slider = {}, global.Vue));
|
|
6
|
+
})(this, (function (exports, vue) { 'use strict';
|
|
7
|
+
|
|
8
|
+
let config = {
|
|
9
|
+
defaultLocale: void 0,
|
|
10
|
+
defaultTooltipType: "is-primary",
|
|
11
|
+
defaultTooltipDelay: null,
|
|
12
|
+
defaultTooltipCloseDelay: null,
|
|
13
|
+
defaultCompatFallthrough: true};
|
|
14
|
+
|
|
15
|
+
function bound(val, min, max) {
|
|
16
|
+
return Math.max(min, Math.min(max, val));
|
|
17
|
+
}
|
|
18
|
+
function removeElement(el) {
|
|
19
|
+
if (typeof el.remove !== "undefined") {
|
|
20
|
+
el.remove();
|
|
21
|
+
} else if (typeof el.parentNode !== "undefined" && el.parentNode !== null) {
|
|
22
|
+
el.parentNode.removeChild(el);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function createAbsoluteElement(el) {
|
|
26
|
+
const root = document.createElement("div");
|
|
27
|
+
root.style.position = "absolute";
|
|
28
|
+
root.style.left = "0px";
|
|
29
|
+
root.style.top = "0px";
|
|
30
|
+
root.style.width = "100%";
|
|
31
|
+
const wrapper = document.createElement("div");
|
|
32
|
+
root.appendChild(wrapper);
|
|
33
|
+
wrapper.appendChild(el);
|
|
34
|
+
document.body.appendChild(root);
|
|
35
|
+
return root;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const TOOLTIP_POSITIONS = ["is-auto", "is-top", "is-bottom", "is-left", "is-right"];
|
|
39
|
+
var _sfc_main$3 = vue.defineComponent({
|
|
40
|
+
name: "BTooltip",
|
|
41
|
+
props: {
|
|
42
|
+
active: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true
|
|
45
|
+
},
|
|
46
|
+
type: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: () => config.defaultTooltipType
|
|
49
|
+
},
|
|
50
|
+
label: String,
|
|
51
|
+
delay: {
|
|
52
|
+
type: Number,
|
|
53
|
+
default: () => config.defaultTooltipDelay
|
|
54
|
+
},
|
|
55
|
+
closeDelay: {
|
|
56
|
+
type: Number,
|
|
57
|
+
default: () => config.defaultTooltipCloseDelay
|
|
58
|
+
},
|
|
59
|
+
position: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "is-auto",
|
|
62
|
+
validator(value) {
|
|
63
|
+
return TOOLTIP_POSITIONS.indexOf(value) > -1;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
triggers: {
|
|
67
|
+
type: Array,
|
|
68
|
+
default: () => ["hover"]
|
|
69
|
+
},
|
|
70
|
+
always: Boolean,
|
|
71
|
+
square: Boolean,
|
|
72
|
+
dashed: Boolean,
|
|
73
|
+
multilined: Boolean,
|
|
74
|
+
size: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "is-medium"
|
|
77
|
+
},
|
|
78
|
+
appendToBody: Boolean,
|
|
79
|
+
animated: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: true
|
|
82
|
+
},
|
|
83
|
+
animation: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: "fade"
|
|
86
|
+
},
|
|
87
|
+
contentClass: String,
|
|
88
|
+
autoClose: {
|
|
89
|
+
type: [Array, Boolean],
|
|
90
|
+
default: true
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
emits: {
|
|
94
|
+
close: () => true,
|
|
95
|
+
open: () => true
|
|
96
|
+
},
|
|
97
|
+
data() {
|
|
98
|
+
return {
|
|
99
|
+
isActive: false,
|
|
100
|
+
triggerStyle: {},
|
|
101
|
+
timer: void 0,
|
|
102
|
+
_bodyEl: void 0,
|
|
103
|
+
// Used to append to body
|
|
104
|
+
resizeObserver: void 0,
|
|
105
|
+
resizeListener: void 0,
|
|
106
|
+
timeOutID: void 0,
|
|
107
|
+
controller: void 0,
|
|
108
|
+
dynamicPosition: void 0
|
|
109
|
+
// Computed once opened
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
computed: {
|
|
113
|
+
rootClasses() {
|
|
114
|
+
return ["b-tooltip", this.type, this.dynamicPosition, this.size, {
|
|
115
|
+
"is-square": this.square,
|
|
116
|
+
"is-always": this.always,
|
|
117
|
+
"is-multiline": this.multilined,
|
|
118
|
+
"is-dashed": this.dashed
|
|
119
|
+
}];
|
|
120
|
+
},
|
|
121
|
+
newAnimation() {
|
|
122
|
+
return this.animated ? this.animation : void 0;
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
watch: {
|
|
126
|
+
isActive() {
|
|
127
|
+
this.isActive ? this.$emit("open") : this.$emit("close");
|
|
128
|
+
if (this.appendToBody) {
|
|
129
|
+
this.updateAppendToBody();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
methods: {
|
|
134
|
+
computePosition() {
|
|
135
|
+
if (this.position !== "is-auto") return this.position;
|
|
136
|
+
const trigger = this.$refs.trigger;
|
|
137
|
+
const bounds = trigger.getBoundingClientRect();
|
|
138
|
+
const dt = bounds.top;
|
|
139
|
+
const db = window.innerHeight - bounds.bottom;
|
|
140
|
+
const dl = bounds.left;
|
|
141
|
+
const dr = window.innerWidth - bounds.right;
|
|
142
|
+
const min = Math.min(dt, db, dl, dr);
|
|
143
|
+
if (min === dt) {
|
|
144
|
+
return "is-bottom";
|
|
145
|
+
} else if (min === db) {
|
|
146
|
+
return "is-top";
|
|
147
|
+
} else if (min === dl) {
|
|
148
|
+
return "is-right";
|
|
149
|
+
} else {
|
|
150
|
+
return "is-left";
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
updateAppendToBody() {
|
|
154
|
+
const tooltip = this.$refs.tooltip;
|
|
155
|
+
const trigger = this.$refs.trigger;
|
|
156
|
+
if (tooltip && trigger) {
|
|
157
|
+
const tooltipEl = this.$data._bodyEl.children[0];
|
|
158
|
+
tooltipEl.classList.forEach((item) => tooltipEl.classList.remove(item));
|
|
159
|
+
this.rootClasses.forEach((item) => {
|
|
160
|
+
if (typeof item === "object") {
|
|
161
|
+
const record = item;
|
|
162
|
+
for (const key in record) {
|
|
163
|
+
if (record[key]) {
|
|
164
|
+
tooltipEl.classList.add(key);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
tooltipEl.classList.add(item);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
const rect = trigger.getBoundingClientRect();
|
|
172
|
+
const top = rect.top + window.scrollY;
|
|
173
|
+
const left = rect.left + window.scrollX;
|
|
174
|
+
tooltipEl.style.position = "absolute";
|
|
175
|
+
this.dynamicPosition = this.computePosition();
|
|
176
|
+
switch (this.dynamicPosition) {
|
|
177
|
+
case "is-top":
|
|
178
|
+
tooltipEl.style.width = `${trigger.clientWidth}px`;
|
|
179
|
+
tooltipEl.style.height = "0px";
|
|
180
|
+
tooltipEl.style.top = "0px";
|
|
181
|
+
tooltipEl.style.left = "0px";
|
|
182
|
+
break;
|
|
183
|
+
case "is-bottom":
|
|
184
|
+
tooltipEl.style.width = `${trigger.clientWidth}px`;
|
|
185
|
+
tooltipEl.style.height = "0px";
|
|
186
|
+
tooltipEl.style.top = `${trigger.clientHeight}px`;
|
|
187
|
+
tooltipEl.style.left = "0px";
|
|
188
|
+
break;
|
|
189
|
+
case "is-left":
|
|
190
|
+
tooltipEl.style.width = "0px";
|
|
191
|
+
tooltipEl.style.height = `${trigger.clientHeight}px`;
|
|
192
|
+
tooltipEl.style.top = "0px";
|
|
193
|
+
tooltipEl.style.left = "0px";
|
|
194
|
+
break;
|
|
195
|
+
case "is-right":
|
|
196
|
+
tooltipEl.style.width = "0px";
|
|
197
|
+
tooltipEl.style.height = `${trigger.clientHeight}px`;
|
|
198
|
+
tooltipEl.style.top = "0px";
|
|
199
|
+
tooltipEl.style.left = `${trigger.clientWidth}px`;
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
const wrapper = this.$data._bodyEl;
|
|
203
|
+
wrapper.style.position = "absolute";
|
|
204
|
+
wrapper.style.top = `${top}px`;
|
|
205
|
+
wrapper.style.left = `${left}px`;
|
|
206
|
+
wrapper.style.width = "0px";
|
|
207
|
+
wrapper.style.zIndex = this.isActive || this.always ? "99" : "-1";
|
|
208
|
+
this.triggerStyle = {
|
|
209
|
+
zIndex: this.isActive || this.always ? "100" : void 0
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
onClick() {
|
|
214
|
+
if (this.triggers.indexOf("click") < 0) return;
|
|
215
|
+
this.$nextTick(() => {
|
|
216
|
+
this.timeOutID = setTimeout(() => this.open());
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
onHover() {
|
|
220
|
+
if (this.triggers.indexOf("hover") < 0) return;
|
|
221
|
+
this.open();
|
|
222
|
+
},
|
|
223
|
+
onContextMenu(e) {
|
|
224
|
+
if (this.triggers.indexOf("contextmenu") < 0) return;
|
|
225
|
+
e.preventDefault();
|
|
226
|
+
this.open();
|
|
227
|
+
},
|
|
228
|
+
onFocus() {
|
|
229
|
+
if (this.triggers.indexOf("focus") < 0) return;
|
|
230
|
+
this.open();
|
|
231
|
+
},
|
|
232
|
+
open() {
|
|
233
|
+
this.dynamicPosition = this.computePosition();
|
|
234
|
+
if (this.delay) {
|
|
235
|
+
this.timer = setTimeout(() => {
|
|
236
|
+
this.isActive = true;
|
|
237
|
+
this.timer = void 0;
|
|
238
|
+
}, this.delay);
|
|
239
|
+
} else {
|
|
240
|
+
this.isActive = true;
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
close() {
|
|
244
|
+
if (typeof this.autoClose === "boolean") {
|
|
245
|
+
if (this.autoClose && this.timer) clearTimeout(this.timer);
|
|
246
|
+
if (this.closeDelay) {
|
|
247
|
+
this.timer = setTimeout(() => {
|
|
248
|
+
this.isActive = !this.autoClose;
|
|
249
|
+
this.timer = void 0;
|
|
250
|
+
}, this.closeDelay);
|
|
251
|
+
} else {
|
|
252
|
+
this.isActive = !this.autoClose;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
/*
|
|
257
|
+
* Close tooltip if clicked outside.
|
|
258
|
+
*/
|
|
259
|
+
clickedOutside(event) {
|
|
260
|
+
if (this.isActive) {
|
|
261
|
+
if (Array.isArray(this.autoClose)) {
|
|
262
|
+
if (this.autoClose.includes("outside")) {
|
|
263
|
+
if (!this.isInWhiteList(event.target)) {
|
|
264
|
+
this.isActive = false;
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (this.autoClose.includes("inside")) {
|
|
269
|
+
if (this.isInWhiteList(event.target)) this.isActive = false;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
/*
|
|
275
|
+
* Keypress event that is bound to the document
|
|
276
|
+
*/
|
|
277
|
+
keyPress({ key }) {
|
|
278
|
+
if (this.isActive && (key === "Escape" || key === "Esc")) {
|
|
279
|
+
if (Array.isArray(this.autoClose)) {
|
|
280
|
+
if (this.autoClose.indexOf("escape") >= 0) this.isActive = false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
/*
|
|
285
|
+
* White-listed items to not close when clicked.
|
|
286
|
+
*/
|
|
287
|
+
isInWhiteList(el) {
|
|
288
|
+
if (el === this.$refs.content) return true;
|
|
289
|
+
if (this.$refs.content != null) {
|
|
290
|
+
const children = this.$refs.content.querySelectorAll("*");
|
|
291
|
+
for (const child of children) {
|
|
292
|
+
if (el === child) {
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
mounted() {
|
|
301
|
+
if (this.appendToBody && typeof window !== "undefined") {
|
|
302
|
+
this.controller = new window.AbortController();
|
|
303
|
+
this.$data._bodyEl = createAbsoluteElement(this.$refs.content);
|
|
304
|
+
this.updateAppendToBody();
|
|
305
|
+
const animation = this.$el.closest(".animation-content");
|
|
306
|
+
if (animation != null) {
|
|
307
|
+
const listener = () => {
|
|
308
|
+
this.updateAppendToBody();
|
|
309
|
+
animation.removeEventListener("transitionend", listener);
|
|
310
|
+
};
|
|
311
|
+
animation.addEventListener("transitionend", listener, {
|
|
312
|
+
signal: this.controller.signal
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
this.resizeListener = () => this.updateAppendToBody();
|
|
316
|
+
window.addEventListener("resize", this.resizeListener);
|
|
317
|
+
this.resizeObserver = new ResizeObserver(this.resizeListener);
|
|
318
|
+
if (this.$el.parentNode != null && this.$el.parentNode.nodeType === Node.ELEMENT_NODE) {
|
|
319
|
+
this.resizeObserver.observe(this.$el.parentNode);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
if (this.always) {
|
|
323
|
+
this.dynamicPosition = this.computePosition();
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
created() {
|
|
327
|
+
if (typeof window !== "undefined") {
|
|
328
|
+
document.addEventListener("click", this.clickedOutside);
|
|
329
|
+
document.addEventListener("keyup", this.keyPress);
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
beforeUnmount() {
|
|
333
|
+
if (typeof window !== "undefined") {
|
|
334
|
+
document.removeEventListener("click", this.clickedOutside);
|
|
335
|
+
document.removeEventListener("keyup", this.keyPress);
|
|
336
|
+
}
|
|
337
|
+
if (this.resizeListener != null) {
|
|
338
|
+
window.removeEventListener("resize", this.resizeListener);
|
|
339
|
+
}
|
|
340
|
+
if (this.resizeObserver != null) {
|
|
341
|
+
this.resizeObserver.disconnect();
|
|
342
|
+
}
|
|
343
|
+
if (this.appendToBody) {
|
|
344
|
+
removeElement(this.$data._bodyEl);
|
|
345
|
+
}
|
|
346
|
+
if (this.controller != null) {
|
|
347
|
+
this.controller.abort();
|
|
348
|
+
}
|
|
349
|
+
clearTimeout(this.timer);
|
|
350
|
+
clearTimeout(this.timeOutID);
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
var _export_sfc = (sfc, props) => {
|
|
355
|
+
const target = sfc.__vccOpts || sfc;
|
|
356
|
+
for (const [key, val] of props) {
|
|
357
|
+
target[key] = val;
|
|
358
|
+
}
|
|
359
|
+
return target;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
363
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
364
|
+
"div",
|
|
365
|
+
{
|
|
366
|
+
ref: "tooltip",
|
|
367
|
+
class: vue.normalizeClass(_ctx.rootClasses)
|
|
368
|
+
},
|
|
369
|
+
[
|
|
370
|
+
vue.createVNode(vue.Transition, {
|
|
371
|
+
name: _ctx.newAnimation,
|
|
372
|
+
persisted: ""
|
|
373
|
+
}, {
|
|
374
|
+
default: vue.withCtx(() => [
|
|
375
|
+
vue.withDirectives(vue.createElementVNode(
|
|
376
|
+
"div",
|
|
377
|
+
{
|
|
378
|
+
ref: "content",
|
|
379
|
+
class: vue.normalizeClass(["tooltip-content", _ctx.contentClass])
|
|
380
|
+
},
|
|
381
|
+
[
|
|
382
|
+
_ctx.label ? (vue.openBlock(), vue.createElementBlock(
|
|
383
|
+
vue.Fragment,
|
|
384
|
+
{ key: 0 },
|
|
385
|
+
[
|
|
386
|
+
vue.createTextVNode(
|
|
387
|
+
vue.toDisplayString(_ctx.label),
|
|
388
|
+
1
|
|
389
|
+
/* TEXT */
|
|
390
|
+
)
|
|
391
|
+
],
|
|
392
|
+
64
|
|
393
|
+
/* STABLE_FRAGMENT */
|
|
394
|
+
)) : _ctx.$slots.content ? vue.renderSlot(_ctx.$slots, "content", { key: 1 }) : vue.createCommentVNode("v-if", true)
|
|
395
|
+
],
|
|
396
|
+
2
|
|
397
|
+
/* CLASS */
|
|
398
|
+
), [
|
|
399
|
+
[vue.vShow, _ctx.active && (_ctx.isActive || _ctx.always)]
|
|
400
|
+
])
|
|
401
|
+
]),
|
|
402
|
+
_: 3
|
|
403
|
+
/* FORWARDED */
|
|
404
|
+
}, 8, ["name"]),
|
|
405
|
+
vue.createElementVNode(
|
|
406
|
+
"div",
|
|
407
|
+
{
|
|
408
|
+
ref: "trigger",
|
|
409
|
+
class: "tooltip-trigger",
|
|
410
|
+
style: vue.normalizeStyle(_ctx.triggerStyle),
|
|
411
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args)),
|
|
412
|
+
onContextmenu: _cache[1] || (_cache[1] = (...args) => _ctx.onContextMenu && _ctx.onContextMenu(...args)),
|
|
413
|
+
onMouseenter: _cache[2] || (_cache[2] = (...args) => _ctx.onHover && _ctx.onHover(...args)),
|
|
414
|
+
onFocusCapture: _cache[3] || (_cache[3] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
|
|
415
|
+
onBlurCapture: _cache[4] || (_cache[4] = (...args) => _ctx.close && _ctx.close(...args)),
|
|
416
|
+
onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.close && _ctx.close(...args))
|
|
417
|
+
},
|
|
418
|
+
[
|
|
419
|
+
vue.renderSlot(_ctx.$slots, "default", { ref: "slot" })
|
|
420
|
+
],
|
|
421
|
+
36
|
|
422
|
+
/* STYLE, NEED_HYDRATION */
|
|
423
|
+
)
|
|
424
|
+
],
|
|
425
|
+
2
|
|
426
|
+
/* CLASS */
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
var BTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
430
|
+
|
|
431
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
432
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
433
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
434
|
+
var __objRest = (source, exclude) => {
|
|
435
|
+
var target = {};
|
|
436
|
+
for (var prop in source)
|
|
437
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
438
|
+
target[prop] = source[prop];
|
|
439
|
+
if (source != null && __getOwnPropSymbols)
|
|
440
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
441
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
442
|
+
target[prop] = source[prop];
|
|
443
|
+
}
|
|
444
|
+
return target;
|
|
445
|
+
};
|
|
446
|
+
var CompatFallthroughMixin = vue.defineComponent({
|
|
447
|
+
inheritAttrs: false,
|
|
448
|
+
props: {
|
|
449
|
+
compatFallthrough: {
|
|
450
|
+
type: Boolean,
|
|
451
|
+
default: () => config.defaultCompatFallthrough
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
computed: {
|
|
455
|
+
rootAttrs() {
|
|
456
|
+
return this.compatFallthrough ? {
|
|
457
|
+
class: this.$attrs.class,
|
|
458
|
+
style: this.$attrs.style,
|
|
459
|
+
id: this.$attrs.id
|
|
460
|
+
} : {};
|
|
461
|
+
},
|
|
462
|
+
fallthroughAttrs() {
|
|
463
|
+
if (this.compatFallthrough) {
|
|
464
|
+
const _a = this.$attrs, { style: _1, class: _2, id: _3 } = _a, rest = __objRest(_a, ["style", "class", "id"]);
|
|
465
|
+
return rest;
|
|
466
|
+
} else {
|
|
467
|
+
return this.$attrs;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
const DISPLAY_FORMATS = ["raw", "percent"];
|
|
474
|
+
|
|
475
|
+
var _sfc_main$2 = vue.defineComponent({
|
|
476
|
+
name: "BSliderThumb",
|
|
477
|
+
components: {
|
|
478
|
+
BTooltip
|
|
479
|
+
},
|
|
480
|
+
mixins: [CompatFallthroughMixin],
|
|
481
|
+
props: {
|
|
482
|
+
modelValue: {
|
|
483
|
+
type: Number,
|
|
484
|
+
default: 0
|
|
485
|
+
},
|
|
486
|
+
type: {
|
|
487
|
+
type: String,
|
|
488
|
+
default: ""
|
|
489
|
+
},
|
|
490
|
+
tooltip: {
|
|
491
|
+
type: Boolean,
|
|
492
|
+
default: true
|
|
493
|
+
},
|
|
494
|
+
indicator: {
|
|
495
|
+
type: Boolean,
|
|
496
|
+
default: false
|
|
497
|
+
},
|
|
498
|
+
customFormatter: Function,
|
|
499
|
+
format: {
|
|
500
|
+
type: String,
|
|
501
|
+
default: "raw",
|
|
502
|
+
validator: (value) => {
|
|
503
|
+
return DISPLAY_FORMATS.indexOf(value) >= 0;
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
locale: {
|
|
507
|
+
type: [String, Array],
|
|
508
|
+
default: () => {
|
|
509
|
+
return config.defaultLocale;
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
tooltipAlways: {
|
|
513
|
+
type: Boolean,
|
|
514
|
+
default: false
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
emits: {
|
|
518
|
+
dragend: () => true,
|
|
519
|
+
dragstart: () => true,
|
|
520
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
521
|
+
"update:modelValue": (_value) => true
|
|
522
|
+
},
|
|
523
|
+
data() {
|
|
524
|
+
return {
|
|
525
|
+
isFocused: false,
|
|
526
|
+
dragging: false,
|
|
527
|
+
startX: 0,
|
|
528
|
+
startPosition: 0,
|
|
529
|
+
newPosition: null,
|
|
530
|
+
oldValue: this.modelValue
|
|
531
|
+
};
|
|
532
|
+
},
|
|
533
|
+
computed: {
|
|
534
|
+
parent() {
|
|
535
|
+
return this.$parent;
|
|
536
|
+
},
|
|
537
|
+
disabled() {
|
|
538
|
+
return this.parent.disabled;
|
|
539
|
+
},
|
|
540
|
+
max() {
|
|
541
|
+
return this.parent.max;
|
|
542
|
+
},
|
|
543
|
+
min() {
|
|
544
|
+
return this.parent.min;
|
|
545
|
+
},
|
|
546
|
+
step() {
|
|
547
|
+
return this.parent.step;
|
|
548
|
+
},
|
|
549
|
+
precision() {
|
|
550
|
+
return this.parent.precision;
|
|
551
|
+
},
|
|
552
|
+
currentPosition() {
|
|
553
|
+
return `${(this.modelValue - this.min) / (this.max - this.min) * 100}%`;
|
|
554
|
+
},
|
|
555
|
+
wrapperStyle() {
|
|
556
|
+
return { left: this.currentPosition };
|
|
557
|
+
},
|
|
558
|
+
formattedValue() {
|
|
559
|
+
if (typeof this.customFormatter !== "undefined") {
|
|
560
|
+
return this.customFormatter(this.modelValue);
|
|
561
|
+
}
|
|
562
|
+
if (this.format === "percent") {
|
|
563
|
+
return new Intl.NumberFormat(
|
|
564
|
+
this.locale,
|
|
565
|
+
{
|
|
566
|
+
style: "percent"
|
|
567
|
+
}
|
|
568
|
+
).format((this.modelValue - this.min) / (this.max - this.min));
|
|
569
|
+
}
|
|
570
|
+
return new Intl.NumberFormat(this.locale).format(this.modelValue);
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
methods: {
|
|
574
|
+
onFocus() {
|
|
575
|
+
this.isFocused = true;
|
|
576
|
+
},
|
|
577
|
+
onBlur() {
|
|
578
|
+
this.isFocused = false;
|
|
579
|
+
},
|
|
580
|
+
onButtonDown(event) {
|
|
581
|
+
if (this.disabled) return;
|
|
582
|
+
event.preventDefault();
|
|
583
|
+
this.onDragStart(event);
|
|
584
|
+
if (typeof window !== "undefined") {
|
|
585
|
+
document.addEventListener("mousemove", this.onDragging);
|
|
586
|
+
document.addEventListener("touchmove", this.onDragging);
|
|
587
|
+
document.addEventListener("mouseup", this.onDragEnd);
|
|
588
|
+
document.addEventListener("touchend", this.onDragEnd);
|
|
589
|
+
document.addEventListener("contextmenu", this.onDragEnd);
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
onLeftKeyDown() {
|
|
593
|
+
if (this.disabled || this.modelValue === this.min) return;
|
|
594
|
+
this.newPosition = parseFloat(this.currentPosition) - this.step / (this.max - this.min) * 100;
|
|
595
|
+
this.setPosition(this.newPosition);
|
|
596
|
+
this.parent.emitValue("change");
|
|
597
|
+
},
|
|
598
|
+
onRightKeyDown() {
|
|
599
|
+
if (this.disabled || this.modelValue === this.max) return;
|
|
600
|
+
this.newPosition = parseFloat(this.currentPosition) + this.step / (this.max - this.min) * 100;
|
|
601
|
+
this.setPosition(this.newPosition);
|
|
602
|
+
this.parent.emitValue("change");
|
|
603
|
+
},
|
|
604
|
+
onHomeKeyDown() {
|
|
605
|
+
if (this.disabled || this.modelValue === this.min) return;
|
|
606
|
+
this.newPosition = 0;
|
|
607
|
+
this.setPosition(this.newPosition);
|
|
608
|
+
this.parent.emitValue("change");
|
|
609
|
+
},
|
|
610
|
+
onEndKeyDown() {
|
|
611
|
+
if (this.disabled || this.modelValue === this.max) return;
|
|
612
|
+
this.newPosition = 100;
|
|
613
|
+
this.setPosition(this.newPosition);
|
|
614
|
+
this.parent.emitValue("change");
|
|
615
|
+
},
|
|
616
|
+
onDragStart(event) {
|
|
617
|
+
this.dragging = true;
|
|
618
|
+
this.$emit("dragstart");
|
|
619
|
+
this.startX = event.type === "touchstart" ? event.touches[0].clientX : event.clientX;
|
|
620
|
+
this.startPosition = parseFloat(this.currentPosition);
|
|
621
|
+
this.newPosition = this.startPosition;
|
|
622
|
+
},
|
|
623
|
+
onDragging(event) {
|
|
624
|
+
if (this.dragging) {
|
|
625
|
+
const clientX = event.type === "touchmove" ? event.touches[0].clientX : event.clientX;
|
|
626
|
+
const diff = (clientX - this.startX) / this.parent.sliderSize() * 100;
|
|
627
|
+
this.newPosition = this.startPosition + diff;
|
|
628
|
+
this.setPosition(this.newPosition);
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
onDragEnd() {
|
|
632
|
+
this.dragging = false;
|
|
633
|
+
this.$emit("dragend");
|
|
634
|
+
if (this.modelValue !== this.oldValue) {
|
|
635
|
+
this.parent.emitValue("change");
|
|
636
|
+
}
|
|
637
|
+
this.setPosition(this.newPosition);
|
|
638
|
+
if (typeof window !== "undefined") {
|
|
639
|
+
document.removeEventListener("mousemove", this.onDragging);
|
|
640
|
+
document.removeEventListener("touchmove", this.onDragging);
|
|
641
|
+
document.removeEventListener("mouseup", this.onDragEnd);
|
|
642
|
+
document.removeEventListener("touchend", this.onDragEnd);
|
|
643
|
+
document.removeEventListener("contextmenu", this.onDragEnd);
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
setPosition(percent) {
|
|
647
|
+
if (percent === null || isNaN(percent)) return;
|
|
648
|
+
if (percent < 0) {
|
|
649
|
+
percent = 0;
|
|
650
|
+
} else if (percent > 100) {
|
|
651
|
+
percent = 100;
|
|
652
|
+
}
|
|
653
|
+
const stepLength = 100 / ((this.max - this.min) / this.step);
|
|
654
|
+
const steps = Math.round(percent / stepLength);
|
|
655
|
+
let value = steps * stepLength / 100 * (this.max - this.min) + this.min;
|
|
656
|
+
value = parseFloat(value.toFixed(this.precision));
|
|
657
|
+
this.$emit("update:modelValue", value);
|
|
658
|
+
if (!this.dragging && value !== this.oldValue) {
|
|
659
|
+
this.oldValue = value;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
beforeUnmount() {
|
|
664
|
+
document.removeEventListener("mousemove", this.onDragging);
|
|
665
|
+
document.removeEventListener("touchmove", this.onDragging);
|
|
666
|
+
document.removeEventListener("mouseup", this.onDragEnd);
|
|
667
|
+
document.removeEventListener("touchend", this.onDragEnd);
|
|
668
|
+
document.removeEventListener("contextmenu", this.onDragEnd);
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
const _hoisted_1$2 = ["tabindex"];
|
|
673
|
+
const _hoisted_2 = { key: 0 };
|
|
674
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
675
|
+
const _component_b_tooltip = vue.resolveComponent("b-tooltip");
|
|
676
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
677
|
+
"div",
|
|
678
|
+
vue.mergeProps({
|
|
679
|
+
class: ["b-slider-thumb-wrapper", { "is-dragging": _ctx.dragging, "has-indicator": _ctx.indicator }],
|
|
680
|
+
style: _ctx.wrapperStyle
|
|
681
|
+
}, _ctx.rootAttrs),
|
|
682
|
+
[
|
|
683
|
+
vue.createVNode(_component_b_tooltip, {
|
|
684
|
+
label: _ctx.formattedValue,
|
|
685
|
+
type: _ctx.type,
|
|
686
|
+
always: _ctx.dragging || _ctx.isFocused || _ctx.tooltipAlways,
|
|
687
|
+
active: !_ctx.disabled && _ctx.tooltip
|
|
688
|
+
}, {
|
|
689
|
+
default: vue.withCtx(() => [
|
|
690
|
+
vue.createElementVNode("div", vue.mergeProps({
|
|
691
|
+
class: "b-slider-thumb",
|
|
692
|
+
tabindex: _ctx.disabled ? void 0 : 0
|
|
693
|
+
}, _ctx.fallthroughAttrs, {
|
|
694
|
+
onMousedown: _cache[0] || (_cache[0] = (...args) => _ctx.onButtonDown && _ctx.onButtonDown(...args)),
|
|
695
|
+
onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.onButtonDown && _ctx.onButtonDown(...args)),
|
|
696
|
+
onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.onFocus && _ctx.onFocus(...args)),
|
|
697
|
+
onBlur: _cache[3] || (_cache[3] = (...args) => _ctx.onBlur && _ctx.onBlur(...args)),
|
|
698
|
+
onKeydown: [
|
|
699
|
+
_cache[4] || (_cache[4] = vue.withKeys(vue.withModifiers((...args) => _ctx.onLeftKeyDown && _ctx.onLeftKeyDown(...args), ["prevent"]), ["left"])),
|
|
700
|
+
_cache[5] || (_cache[5] = vue.withKeys(vue.withModifiers((...args) => _ctx.onRightKeyDown && _ctx.onRightKeyDown(...args), ["prevent"]), ["right"])),
|
|
701
|
+
_cache[6] || (_cache[6] = vue.withKeys(vue.withModifiers((...args) => _ctx.onLeftKeyDown && _ctx.onLeftKeyDown(...args), ["prevent"]), ["down"])),
|
|
702
|
+
_cache[7] || (_cache[7] = vue.withKeys(vue.withModifiers((...args) => _ctx.onRightKeyDown && _ctx.onRightKeyDown(...args), ["prevent"]), ["up"])),
|
|
703
|
+
_cache[8] || (_cache[8] = vue.withKeys(vue.withModifiers((...args) => _ctx.onHomeKeyDown && _ctx.onHomeKeyDown(...args), ["prevent"]), ["home"])),
|
|
704
|
+
_cache[9] || (_cache[9] = vue.withKeys(vue.withModifiers((...args) => _ctx.onEndKeyDown && _ctx.onEndKeyDown(...args), ["prevent"]), ["end"]))
|
|
705
|
+
]
|
|
706
|
+
}), [
|
|
707
|
+
_ctx.indicator ? (vue.openBlock(), vue.createElementBlock(
|
|
708
|
+
"span",
|
|
709
|
+
_hoisted_2,
|
|
710
|
+
vue.toDisplayString(_ctx.formattedValue),
|
|
711
|
+
1
|
|
712
|
+
/* TEXT */
|
|
713
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
714
|
+
], 16, _hoisted_1$2)
|
|
715
|
+
]),
|
|
716
|
+
_: 1
|
|
717
|
+
/* STABLE */
|
|
718
|
+
}, 8, ["label", "type", "always", "active"])
|
|
719
|
+
],
|
|
720
|
+
16
|
|
721
|
+
/* FULL_PROPS */
|
|
722
|
+
);
|
|
723
|
+
}
|
|
724
|
+
var BSliderThumb = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
725
|
+
|
|
726
|
+
var _sfc_main$1 = vue.defineComponent({
|
|
727
|
+
name: "BSliderTick",
|
|
728
|
+
props: {
|
|
729
|
+
value: {
|
|
730
|
+
type: Number,
|
|
731
|
+
default: 0
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
computed: {
|
|
735
|
+
parent() {
|
|
736
|
+
return this.$parent;
|
|
737
|
+
},
|
|
738
|
+
position() {
|
|
739
|
+
const pos = (this.value - this.parent.min) / (this.parent.max - this.parent.min) * 100;
|
|
740
|
+
return pos >= 0 && pos <= 100 ? pos : 0;
|
|
741
|
+
},
|
|
742
|
+
hidden() {
|
|
743
|
+
return this.value === this.parent.min || this.value === this.parent.max;
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
methods: {
|
|
747
|
+
getTickStyle(position) {
|
|
748
|
+
return { left: position + "%" };
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
created() {
|
|
752
|
+
if (!this.parent.$data._isSlider) {
|
|
753
|
+
throw new Error("You should wrap bSliderTick on a bSlider");
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
|
|
758
|
+
const _hoisted_1$1 = {
|
|
759
|
+
key: 0,
|
|
760
|
+
class: "b-slider-tick-label"
|
|
761
|
+
};
|
|
762
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
763
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
764
|
+
"div",
|
|
765
|
+
{
|
|
766
|
+
class: vue.normalizeClass(["b-slider-tick", { "is-tick-hidden": _ctx.hidden }]),
|
|
767
|
+
style: vue.normalizeStyle(_ctx.getTickStyle(_ctx.position))
|
|
768
|
+
},
|
|
769
|
+
[
|
|
770
|
+
_ctx.$slots.default ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1$1, [
|
|
771
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
772
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
773
|
+
],
|
|
774
|
+
6
|
|
775
|
+
/* CLASS, STYLE */
|
|
776
|
+
);
|
|
777
|
+
}
|
|
778
|
+
var SliderTick = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
779
|
+
|
|
780
|
+
var _sfc_main = vue.defineComponent({
|
|
781
|
+
name: "BSlider",
|
|
782
|
+
components: {
|
|
783
|
+
BSliderThumb,
|
|
784
|
+
BSliderTick: SliderTick
|
|
785
|
+
},
|
|
786
|
+
props: {
|
|
787
|
+
modelValue: {
|
|
788
|
+
type: [Number, Array],
|
|
789
|
+
default: 0
|
|
790
|
+
},
|
|
791
|
+
min: {
|
|
792
|
+
type: Number,
|
|
793
|
+
default: 0
|
|
794
|
+
},
|
|
795
|
+
max: {
|
|
796
|
+
type: Number,
|
|
797
|
+
default: 100
|
|
798
|
+
},
|
|
799
|
+
step: {
|
|
800
|
+
type: Number,
|
|
801
|
+
default: 1
|
|
802
|
+
},
|
|
803
|
+
type: {
|
|
804
|
+
type: String,
|
|
805
|
+
default: "is-primary"
|
|
806
|
+
},
|
|
807
|
+
size: String,
|
|
808
|
+
ticks: {
|
|
809
|
+
type: Boolean,
|
|
810
|
+
default: false
|
|
811
|
+
},
|
|
812
|
+
tooltip: {
|
|
813
|
+
type: Boolean,
|
|
814
|
+
default: true
|
|
815
|
+
},
|
|
816
|
+
tooltipType: String,
|
|
817
|
+
rounded: {
|
|
818
|
+
type: Boolean,
|
|
819
|
+
default: false
|
|
820
|
+
},
|
|
821
|
+
disabled: {
|
|
822
|
+
type: Boolean,
|
|
823
|
+
default: false
|
|
824
|
+
},
|
|
825
|
+
lazy: {
|
|
826
|
+
type: Boolean,
|
|
827
|
+
default: false
|
|
828
|
+
},
|
|
829
|
+
customFormatter: Function,
|
|
830
|
+
ariaLabel: [String, Array],
|
|
831
|
+
biggerSliderFocus: {
|
|
832
|
+
type: Boolean,
|
|
833
|
+
default: false
|
|
834
|
+
},
|
|
835
|
+
indicator: {
|
|
836
|
+
type: Boolean,
|
|
837
|
+
default: false
|
|
838
|
+
},
|
|
839
|
+
format: {
|
|
840
|
+
type: String,
|
|
841
|
+
default: "raw",
|
|
842
|
+
validator: (value) => {
|
|
843
|
+
return DISPLAY_FORMATS.indexOf(value) >= 0;
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
locale: {
|
|
847
|
+
type: [String, Array],
|
|
848
|
+
default: () => {
|
|
849
|
+
return config.defaultLocale;
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
tooltipAlways: {
|
|
853
|
+
type: Boolean,
|
|
854
|
+
default: false
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
emits: {
|
|
858
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
859
|
+
change: (_value) => true,
|
|
860
|
+
dragend: () => true,
|
|
861
|
+
dragging: (_value) => true,
|
|
862
|
+
dragstart: () => true,
|
|
863
|
+
"update:modelValue": (_value) => true
|
|
864
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
865
|
+
},
|
|
866
|
+
data() {
|
|
867
|
+
return {
|
|
868
|
+
value1: void 0,
|
|
869
|
+
value2: void 0,
|
|
870
|
+
// internal is used to update value1 and value2 with a single shot.
|
|
871
|
+
// internal is also used to stop unnecessary propagation of update.
|
|
872
|
+
internal: {
|
|
873
|
+
value1: void 0,
|
|
874
|
+
value2: void 0
|
|
875
|
+
},
|
|
876
|
+
dragging: false,
|
|
877
|
+
isRange: false,
|
|
878
|
+
isThumbReversed: false,
|
|
879
|
+
isTrackClickDisabled: false,
|
|
880
|
+
_isSlider: true,
|
|
881
|
+
// Used by Thumb and Tick
|
|
882
|
+
timeOutID: void 0
|
|
883
|
+
};
|
|
884
|
+
},
|
|
885
|
+
computed: {
|
|
886
|
+
newTooltipType() {
|
|
887
|
+
return this.tooltipType ? this.tooltipType : this.type;
|
|
888
|
+
},
|
|
889
|
+
tickValues() {
|
|
890
|
+
if (!this.ticks || this.min > this.max || this.step === 0) return [];
|
|
891
|
+
const result = [];
|
|
892
|
+
for (let i = this.min + this.step; i < this.max; i = i + this.step) {
|
|
893
|
+
result.push(i);
|
|
894
|
+
}
|
|
895
|
+
return result;
|
|
896
|
+
},
|
|
897
|
+
minValue() {
|
|
898
|
+
return Math.min(this.value1, this.value2);
|
|
899
|
+
},
|
|
900
|
+
maxValue() {
|
|
901
|
+
return Math.max(this.value1, this.value2);
|
|
902
|
+
},
|
|
903
|
+
barSize() {
|
|
904
|
+
return this.isRange ? `${100 * (this.maxValue - this.minValue) / (this.max - this.min)}%` : `${100 * (this.value1 - this.min) / (this.max - this.min)}%`;
|
|
905
|
+
},
|
|
906
|
+
barStart() {
|
|
907
|
+
return this.isRange ? `${100 * (this.minValue - this.min) / (this.max - this.min)}%` : "0%";
|
|
908
|
+
},
|
|
909
|
+
precision() {
|
|
910
|
+
const precisions = [this.min, this.max, this.step].map((item) => {
|
|
911
|
+
const decimal = ("" + item).split(".")[1];
|
|
912
|
+
return decimal ? decimal.length : 0;
|
|
913
|
+
});
|
|
914
|
+
return Math.max(...precisions);
|
|
915
|
+
},
|
|
916
|
+
barStyle() {
|
|
917
|
+
return {
|
|
918
|
+
width: this.barSize,
|
|
919
|
+
left: this.barStart
|
|
920
|
+
};
|
|
921
|
+
},
|
|
922
|
+
rootClasses() {
|
|
923
|
+
return {
|
|
924
|
+
"is-rounded": this.rounded,
|
|
925
|
+
"is-dragging": this.dragging,
|
|
926
|
+
"is-disabled": this.disabled,
|
|
927
|
+
"slider-focus": this.biggerSliderFocus
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
watch: {
|
|
932
|
+
/*
|
|
933
|
+
* When v-model is changed set the new active step.
|
|
934
|
+
*/
|
|
935
|
+
modelValue(value) {
|
|
936
|
+
this.setValues(value);
|
|
937
|
+
},
|
|
938
|
+
internal({ value1, value2 }) {
|
|
939
|
+
this.value1 = value1;
|
|
940
|
+
this.value2 = value2;
|
|
941
|
+
},
|
|
942
|
+
value1(newValue) {
|
|
943
|
+
if (this.internal.value1 !== newValue) {
|
|
944
|
+
this.onInternalValueUpdate();
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
value2(newValue) {
|
|
948
|
+
if (this.internal.value2 !== newValue) {
|
|
949
|
+
this.onInternalValueUpdate();
|
|
950
|
+
}
|
|
951
|
+
},
|
|
952
|
+
min() {
|
|
953
|
+
this.setValues(this.modelValue);
|
|
954
|
+
},
|
|
955
|
+
max() {
|
|
956
|
+
this.setValues(this.modelValue);
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
methods: {
|
|
960
|
+
setValues(newValue) {
|
|
961
|
+
if (this.min > this.max) {
|
|
962
|
+
return;
|
|
963
|
+
}
|
|
964
|
+
if (Array.isArray(newValue)) {
|
|
965
|
+
this.isRange = true;
|
|
966
|
+
const smallValue = typeof newValue[0] !== "number" || isNaN(newValue[0]) ? this.min : bound(newValue[0], this.min, this.max);
|
|
967
|
+
const largeValue = typeof newValue[1] !== "number" || isNaN(newValue[1]) ? this.max : bound(newValue[1], this.min, this.max);
|
|
968
|
+
this.internal = {
|
|
969
|
+
value1: this.isThumbReversed ? largeValue : smallValue,
|
|
970
|
+
value2: this.isThumbReversed ? smallValue : largeValue
|
|
971
|
+
};
|
|
972
|
+
} else {
|
|
973
|
+
this.isRange = false;
|
|
974
|
+
this.internal = {
|
|
975
|
+
value1: isNaN(newValue) ? this.min : bound(newValue, this.min, this.max),
|
|
976
|
+
value2: void 0
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
},
|
|
980
|
+
onInternalValueUpdate() {
|
|
981
|
+
if (this.isRange) {
|
|
982
|
+
this.isThumbReversed = this.value1 > this.value2;
|
|
983
|
+
}
|
|
984
|
+
if (!this.lazy || !this.dragging) {
|
|
985
|
+
this.emitValue("update:modelValue");
|
|
986
|
+
}
|
|
987
|
+
if (this.dragging) {
|
|
988
|
+
this.emitValue("dragging");
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
sliderSize() {
|
|
992
|
+
return this.$refs.slider.getBoundingClientRect().width;
|
|
993
|
+
},
|
|
994
|
+
onSliderClick(event) {
|
|
995
|
+
if (this.disabled || this.isTrackClickDisabled) return;
|
|
996
|
+
const sliderOffsetLeft = this.$refs.slider.getBoundingClientRect().left;
|
|
997
|
+
const percent = (event.clientX - sliderOffsetLeft) / this.sliderSize() * 100;
|
|
998
|
+
const targetValue = this.min + percent * (this.max - this.min) / 100;
|
|
999
|
+
const diffFirst = Math.abs(targetValue - this.value1);
|
|
1000
|
+
if (!this.isRange) {
|
|
1001
|
+
if (diffFirst < this.step / 2) return;
|
|
1002
|
+
this.$refs.button1.setPosition(percent);
|
|
1003
|
+
} else {
|
|
1004
|
+
const diffSecond = Math.abs(targetValue - this.value2);
|
|
1005
|
+
if (diffFirst <= diffSecond) {
|
|
1006
|
+
if (diffFirst < this.step / 2) return;
|
|
1007
|
+
this.$refs.button1.setPosition(percent);
|
|
1008
|
+
} else {
|
|
1009
|
+
if (diffSecond < this.step / 2) return;
|
|
1010
|
+
this.$refs.button2.setPosition(percent);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
this.emitValue("change");
|
|
1014
|
+
},
|
|
1015
|
+
onDragStart() {
|
|
1016
|
+
this.dragging = true;
|
|
1017
|
+
this.$emit("dragstart");
|
|
1018
|
+
},
|
|
1019
|
+
onDragEnd() {
|
|
1020
|
+
this.isTrackClickDisabled = true;
|
|
1021
|
+
this.timeOutID = setTimeout(() => {
|
|
1022
|
+
this.isTrackClickDisabled = false;
|
|
1023
|
+
}, 0);
|
|
1024
|
+
this.dragging = false;
|
|
1025
|
+
this.$emit("dragend");
|
|
1026
|
+
if (this.lazy) {
|
|
1027
|
+
this.emitValue("update:modelValue");
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
emitValue(type) {
|
|
1031
|
+
const emittedValue = this.isRange ? [this.minValue, this.maxValue] : this.value1;
|
|
1032
|
+
switch (type) {
|
|
1033
|
+
case "change":
|
|
1034
|
+
this.$emit(type, emittedValue);
|
|
1035
|
+
break;
|
|
1036
|
+
case "dragging":
|
|
1037
|
+
this.$emit(type, emittedValue);
|
|
1038
|
+
break;
|
|
1039
|
+
case "update:modelValue":
|
|
1040
|
+
this.$emit(type, emittedValue);
|
|
1041
|
+
break;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
created() {
|
|
1046
|
+
this.isThumbReversed = false;
|
|
1047
|
+
this.isTrackClickDisabled = false;
|
|
1048
|
+
this.setValues(this.modelValue);
|
|
1049
|
+
},
|
|
1050
|
+
beforeUnmount() {
|
|
1051
|
+
clearTimeout(this.timeOutID);
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
|
|
1055
|
+
const _hoisted_1 = {
|
|
1056
|
+
class: "b-slider-track",
|
|
1057
|
+
ref: "slider"
|
|
1058
|
+
};
|
|
1059
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1060
|
+
const _component_b_slider_tick = vue.resolveComponent("b-slider-tick");
|
|
1061
|
+
const _component_b_slider_thumb = vue.resolveComponent("b-slider-thumb");
|
|
1062
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
1063
|
+
"div",
|
|
1064
|
+
{
|
|
1065
|
+
class: vue.normalizeClass(["b-slider", [_ctx.size, _ctx.type, _ctx.rootClasses]]),
|
|
1066
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onSliderClick && _ctx.onSliderClick(...args))
|
|
1067
|
+
},
|
|
1068
|
+
[
|
|
1069
|
+
vue.createElementVNode(
|
|
1070
|
+
"div",
|
|
1071
|
+
_hoisted_1,
|
|
1072
|
+
[
|
|
1073
|
+
vue.createElementVNode(
|
|
1074
|
+
"div",
|
|
1075
|
+
{
|
|
1076
|
+
class: "b-slider-fill",
|
|
1077
|
+
style: vue.normalizeStyle(_ctx.barStyle)
|
|
1078
|
+
},
|
|
1079
|
+
null,
|
|
1080
|
+
4
|
|
1081
|
+
/* STYLE */
|
|
1082
|
+
),
|
|
1083
|
+
_ctx.ticks ? (vue.openBlock(true), vue.createElementBlock(
|
|
1084
|
+
vue.Fragment,
|
|
1085
|
+
{ key: 0 },
|
|
1086
|
+
vue.renderList(_ctx.tickValues, (val, key) => {
|
|
1087
|
+
return vue.openBlock(), vue.createBlock(_component_b_slider_tick, {
|
|
1088
|
+
key,
|
|
1089
|
+
value: val
|
|
1090
|
+
}, null, 8, ["value"]);
|
|
1091
|
+
}),
|
|
1092
|
+
128
|
|
1093
|
+
/* KEYED_FRAGMENT */
|
|
1094
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
1095
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
|
1096
|
+
vue.createVNode(_component_b_slider_thumb, {
|
|
1097
|
+
"tooltip-always": _ctx.tooltipAlways,
|
|
1098
|
+
modelValue: _ctx.value1,
|
|
1099
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.value1 = $event),
|
|
1100
|
+
type: _ctx.newTooltipType,
|
|
1101
|
+
tooltip: _ctx.tooltip,
|
|
1102
|
+
"custom-formatter": _ctx.customFormatter,
|
|
1103
|
+
indicator: _ctx.indicator,
|
|
1104
|
+
format: _ctx.format,
|
|
1105
|
+
locale: _ctx.locale,
|
|
1106
|
+
ref: "button1",
|
|
1107
|
+
role: "slider",
|
|
1108
|
+
"aria-valuenow": _ctx.value1,
|
|
1109
|
+
"aria-valuemin": _ctx.min,
|
|
1110
|
+
"aria-valuemax": _ctx.max,
|
|
1111
|
+
"aria-orientation": "horizontal",
|
|
1112
|
+
"aria-label": Array.isArray(_ctx.ariaLabel) ? _ctx.ariaLabel[0] : _ctx.ariaLabel,
|
|
1113
|
+
"aria-disabled": _ctx.disabled || void 0,
|
|
1114
|
+
onDragstart: _ctx.onDragStart,
|
|
1115
|
+
onDragend: _ctx.onDragEnd
|
|
1116
|
+
}, null, 8, ["tooltip-always", "modelValue", "type", "tooltip", "custom-formatter", "indicator", "format", "locale", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-label", "aria-disabled", "onDragstart", "onDragend"]),
|
|
1117
|
+
_ctx.isRange ? (vue.openBlock(), vue.createBlock(_component_b_slider_thumb, {
|
|
1118
|
+
key: 1,
|
|
1119
|
+
"tooltip-always": _ctx.tooltipAlways,
|
|
1120
|
+
modelValue: _ctx.value2,
|
|
1121
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.value2 = $event),
|
|
1122
|
+
type: _ctx.newTooltipType,
|
|
1123
|
+
tooltip: _ctx.tooltip,
|
|
1124
|
+
"custom-formatter": _ctx.customFormatter,
|
|
1125
|
+
indicator: _ctx.indicator,
|
|
1126
|
+
format: _ctx.format,
|
|
1127
|
+
locale: _ctx.locale,
|
|
1128
|
+
ref: "button2",
|
|
1129
|
+
role: "slider",
|
|
1130
|
+
"aria-valuenow": _ctx.value2,
|
|
1131
|
+
"aria-valuemin": _ctx.min,
|
|
1132
|
+
"aria-valuemax": _ctx.max,
|
|
1133
|
+
"aria-orientation": "horizontal",
|
|
1134
|
+
"aria-label": Array.isArray(_ctx.ariaLabel) ? _ctx.ariaLabel[1] : "",
|
|
1135
|
+
"aria-disabled": _ctx.disabled || void 0,
|
|
1136
|
+
onDragstart: _ctx.onDragStart,
|
|
1137
|
+
onDragend: _ctx.onDragEnd
|
|
1138
|
+
}, null, 8, ["tooltip-always", "modelValue", "type", "tooltip", "custom-formatter", "indicator", "format", "locale", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-label", "aria-disabled", "onDragstart", "onDragend"])) : vue.createCommentVNode("v-if", true)
|
|
1139
|
+
],
|
|
1140
|
+
512
|
|
1141
|
+
/* NEED_PATCH */
|
|
1142
|
+
)
|
|
1143
|
+
],
|
|
1144
|
+
2
|
|
1145
|
+
/* CLASS */
|
|
1146
|
+
);
|
|
1147
|
+
}
|
|
1148
|
+
var Slider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
1149
|
+
|
|
1150
|
+
const registerComponent = (Vue, component, name) => {
|
|
1151
|
+
const componentName = component.name;
|
|
1152
|
+
if (componentName == null) {
|
|
1153
|
+
throw new Error("Buefy.registerComponent: missing component name");
|
|
1154
|
+
}
|
|
1155
|
+
Vue.component(componentName, component);
|
|
1156
|
+
};
|
|
1157
|
+
|
|
1158
|
+
const Plugin = {
|
|
1159
|
+
install(Vue) {
|
|
1160
|
+
registerComponent(Vue, Slider);
|
|
1161
|
+
registerComponent(Vue, SliderTick);
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
exports.BSlider = Slider;
|
|
1166
|
+
exports.BSliderTick = SliderTick;
|
|
1167
|
+
exports.default = Plugin;
|
|
1168
|
+
|
|
1169
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1170
|
+
|
|
1171
|
+
}));
|