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,1534 @@
|
|
|
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.Carousel = {}, global.Vue));
|
|
6
|
+
})(this, (function (exports, vue) { 'use strict';
|
|
7
|
+
|
|
8
|
+
let config = {
|
|
9
|
+
defaultIconPack: "mdi",
|
|
10
|
+
defaultIconComponent: null,
|
|
11
|
+
defaultIconPrev: "chevron-left",
|
|
12
|
+
defaultIconNext: "chevron-right",
|
|
13
|
+
defaultCarouselInterval: 3500,
|
|
14
|
+
defaultImageWebpFallback: null,
|
|
15
|
+
defaultImageLazy: true,
|
|
16
|
+
defaultImageResponsive: true,
|
|
17
|
+
defaultImageRatio: null};
|
|
18
|
+
|
|
19
|
+
function signPoly(value) {
|
|
20
|
+
if (value < 0) return -1;
|
|
21
|
+
return value > 0 ? 1 : 0;
|
|
22
|
+
}
|
|
23
|
+
const sign = Math.sign || signPoly;
|
|
24
|
+
function hasFlag(val, flag) {
|
|
25
|
+
return (val & flag) === flag;
|
|
26
|
+
}
|
|
27
|
+
function mod(n, mod2) {
|
|
28
|
+
return (n % mod2 + mod2) % mod2;
|
|
29
|
+
}
|
|
30
|
+
function bound(val, min, max) {
|
|
31
|
+
return Math.max(min, Math.min(max, val));
|
|
32
|
+
}
|
|
33
|
+
function isWebpSupported() {
|
|
34
|
+
return new Promise((resolve) => {
|
|
35
|
+
const image = new Image();
|
|
36
|
+
image.onerror = () => resolve(false);
|
|
37
|
+
image.onload = () => resolve(image.width === 1);
|
|
38
|
+
image.src = "data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=";
|
|
39
|
+
}).catch(() => false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const mdiIcons = {
|
|
43
|
+
sizes: {
|
|
44
|
+
default: "mdi-24px",
|
|
45
|
+
"is-small": null,
|
|
46
|
+
"is-medium": "mdi-36px",
|
|
47
|
+
"is-large": "mdi-48px"
|
|
48
|
+
},
|
|
49
|
+
iconPrefix: "mdi-"
|
|
50
|
+
};
|
|
51
|
+
const faIcons = () => {
|
|
52
|
+
const faIconPrefix = "fa-";
|
|
53
|
+
return {
|
|
54
|
+
sizes: {
|
|
55
|
+
default: null,
|
|
56
|
+
"is-small": null,
|
|
57
|
+
"is-medium": faIconPrefix + "lg",
|
|
58
|
+
"is-large": faIconPrefix + "2x"
|
|
59
|
+
},
|
|
60
|
+
iconPrefix: faIconPrefix,
|
|
61
|
+
internalIcons: {
|
|
62
|
+
information: "info-circle",
|
|
63
|
+
alert: "exclamation-triangle",
|
|
64
|
+
"alert-circle": "exclamation-circle",
|
|
65
|
+
"chevron-right": "angle-right",
|
|
66
|
+
"chevron-left": "angle-left",
|
|
67
|
+
"chevron-down": "angle-down",
|
|
68
|
+
"eye-off": "eye-slash",
|
|
69
|
+
"menu-down": "caret-down",
|
|
70
|
+
"menu-up": "caret-up",
|
|
71
|
+
"close-circle": "times-circle"
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
const getIcons = () => {
|
|
76
|
+
let icons = {
|
|
77
|
+
mdi: mdiIcons,
|
|
78
|
+
fa: faIcons(),
|
|
79
|
+
fas: faIcons(),
|
|
80
|
+
far: faIcons(),
|
|
81
|
+
fad: faIcons(),
|
|
82
|
+
fab: faIcons(),
|
|
83
|
+
fal: faIcons(),
|
|
84
|
+
"fa-solid": faIcons(),
|
|
85
|
+
"fa-regular": faIcons(),
|
|
86
|
+
"fa-light": faIcons(),
|
|
87
|
+
"fa-thin": faIcons(),
|
|
88
|
+
"fa-duotone": faIcons(),
|
|
89
|
+
"fa-brands": faIcons()
|
|
90
|
+
};
|
|
91
|
+
return icons;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var _sfc_main$4 = vue.defineComponent({
|
|
95
|
+
name: "BIcon",
|
|
96
|
+
props: {
|
|
97
|
+
type: [String, Object],
|
|
98
|
+
component: String,
|
|
99
|
+
pack: String,
|
|
100
|
+
icon: {
|
|
101
|
+
type: String,
|
|
102
|
+
required: true
|
|
103
|
+
},
|
|
104
|
+
size: String,
|
|
105
|
+
customSize: String,
|
|
106
|
+
customClass: String,
|
|
107
|
+
both: Boolean
|
|
108
|
+
// This is used internally to show both MDI and FA icon
|
|
109
|
+
},
|
|
110
|
+
computed: {
|
|
111
|
+
iconConfig() {
|
|
112
|
+
const allIcons = getIcons();
|
|
113
|
+
return allIcons[this.newPack];
|
|
114
|
+
},
|
|
115
|
+
iconPrefix() {
|
|
116
|
+
if (this.iconConfig && this.iconConfig.iconPrefix) {
|
|
117
|
+
return this.iconConfig.iconPrefix;
|
|
118
|
+
}
|
|
119
|
+
return "";
|
|
120
|
+
},
|
|
121
|
+
/*
|
|
122
|
+
* Internal icon name based on the pack.
|
|
123
|
+
* If pack is 'fa', gets the equivalent FA icon name of the MDI,
|
|
124
|
+
* internal icons are always MDI.
|
|
125
|
+
*/
|
|
126
|
+
newIcon() {
|
|
127
|
+
return `${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`;
|
|
128
|
+
},
|
|
129
|
+
newPack() {
|
|
130
|
+
return this.pack || config.defaultIconPack;
|
|
131
|
+
},
|
|
132
|
+
newType() {
|
|
133
|
+
if (!this.type) return;
|
|
134
|
+
let splitType = [];
|
|
135
|
+
if (typeof this.type === "string") {
|
|
136
|
+
splitType = this.type.split("-");
|
|
137
|
+
} else {
|
|
138
|
+
for (const key in this.type) {
|
|
139
|
+
if (this.type[key]) {
|
|
140
|
+
splitType = key.split("-");
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (splitType.length <= 1) return;
|
|
146
|
+
const [, ...type] = splitType;
|
|
147
|
+
return `has-text-${type.join("-")}`;
|
|
148
|
+
},
|
|
149
|
+
newCustomSize() {
|
|
150
|
+
return this.customSize || this.customSizeByPack;
|
|
151
|
+
},
|
|
152
|
+
customSizeByPack() {
|
|
153
|
+
if (this.iconConfig && this.iconConfig.sizes) {
|
|
154
|
+
if (this.size && this.iconConfig.sizes[this.size] !== void 0) {
|
|
155
|
+
return this.iconConfig.sizes[this.size];
|
|
156
|
+
} else if (this.iconConfig.sizes.default) {
|
|
157
|
+
return this.iconConfig.sizes.default;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return null;
|
|
161
|
+
},
|
|
162
|
+
useIconComponent() {
|
|
163
|
+
return this.component || config.defaultIconComponent;
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
methods: {
|
|
167
|
+
/*
|
|
168
|
+
* Equivalent icon name of the MDI.
|
|
169
|
+
*/
|
|
170
|
+
getEquivalentIconOf(value) {
|
|
171
|
+
if (!this.both) {
|
|
172
|
+
return value;
|
|
173
|
+
}
|
|
174
|
+
if (this.iconConfig == null) {
|
|
175
|
+
return value;
|
|
176
|
+
}
|
|
177
|
+
const maybeInternal = this.iconConfig;
|
|
178
|
+
if (maybeInternal && maybeInternal.internalIcons && maybeInternal.internalIcons[value]) {
|
|
179
|
+
return maybeInternal.internalIcons[value];
|
|
180
|
+
}
|
|
181
|
+
return value;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
var _export_sfc = (sfc, props) => {
|
|
187
|
+
const target = sfc.__vccOpts || sfc;
|
|
188
|
+
for (const [key, val] of props) {
|
|
189
|
+
target[key] = val;
|
|
190
|
+
}
|
|
191
|
+
return target;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
195
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
196
|
+
"span",
|
|
197
|
+
{
|
|
198
|
+
class: vue.normalizeClass(["icon", [_ctx.newType, _ctx.size]])
|
|
199
|
+
},
|
|
200
|
+
[
|
|
201
|
+
!_ctx.useIconComponent ? (vue.openBlock(), vue.createElementBlock(
|
|
202
|
+
"i",
|
|
203
|
+
{
|
|
204
|
+
key: 0,
|
|
205
|
+
class: vue.normalizeClass([_ctx.newPack, _ctx.newIcon, _ctx.newCustomSize, _ctx.customClass])
|
|
206
|
+
},
|
|
207
|
+
null,
|
|
208
|
+
2
|
|
209
|
+
/* CLASS */
|
|
210
|
+
)) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.useIconComponent), {
|
|
211
|
+
key: 1,
|
|
212
|
+
icon: [_ctx.newPack, _ctx.newIcon],
|
|
213
|
+
size: _ctx.newCustomSize,
|
|
214
|
+
class: vue.normalizeClass([_ctx.customClass])
|
|
215
|
+
}, null, 8, ["icon", "size", "class"]))
|
|
216
|
+
],
|
|
217
|
+
2
|
|
218
|
+
/* CLASS */
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
var BIcon = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
|
|
222
|
+
|
|
223
|
+
var __defProp$3 = Object.defineProperty;
|
|
224
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
225
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
226
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
227
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
228
|
+
var __spreadValues$3 = (a, b) => {
|
|
229
|
+
for (var prop in b || (b = {}))
|
|
230
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
231
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
232
|
+
if (__getOwnPropSymbols$3)
|
|
233
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
234
|
+
if (__propIsEnum$3.call(b, prop))
|
|
235
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
236
|
+
}
|
|
237
|
+
return a;
|
|
238
|
+
};
|
|
239
|
+
const items = 1;
|
|
240
|
+
const sorted$1 = 3;
|
|
241
|
+
const Sorted$1 = sorted$1;
|
|
242
|
+
var ProviderParentMixin = (itemName, flags) => {
|
|
243
|
+
const mixin = {
|
|
244
|
+
provide() {
|
|
245
|
+
return {
|
|
246
|
+
["b" + itemName]: this
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
if (hasFlag(flags, items)) {
|
|
251
|
+
mixin.data = function() {
|
|
252
|
+
return __spreadValues$3({
|
|
253
|
+
childItems: []
|
|
254
|
+
}, hasFlag(flags, sorted$1) ? { nextIndex: 0 } : {});
|
|
255
|
+
};
|
|
256
|
+
mixin.methods = {
|
|
257
|
+
_registerItem(item) {
|
|
258
|
+
if (hasFlag(flags, sorted$1)) {
|
|
259
|
+
item.dynamicIndex = this.nextIndex;
|
|
260
|
+
++this.nextIndex;
|
|
261
|
+
}
|
|
262
|
+
this.childItems.push(item);
|
|
263
|
+
},
|
|
264
|
+
_unregisterItem(item) {
|
|
265
|
+
this.childItems = this.childItems.filter((i) => i.uniqueValue !== item.uniqueValue);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
if (hasFlag(flags, sorted$1)) {
|
|
269
|
+
mixin.computed = {
|
|
270
|
+
/*
|
|
271
|
+
* When items are added/removed sort them according to their position
|
|
272
|
+
*/
|
|
273
|
+
sortedItems() {
|
|
274
|
+
return this.childItems.slice().sort((i1, i2) => {
|
|
275
|
+
return i1.index - i2.index;
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return mixin;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
var _sfc_main$3 = vue.defineComponent({
|
|
285
|
+
name: "BCarousel",
|
|
286
|
+
components: {
|
|
287
|
+
BIcon
|
|
288
|
+
},
|
|
289
|
+
mixins: [ProviderParentMixin("carousel", Sorted$1)],
|
|
290
|
+
props: {
|
|
291
|
+
modelValue: {
|
|
292
|
+
type: Number,
|
|
293
|
+
default: 0
|
|
294
|
+
},
|
|
295
|
+
animated: {
|
|
296
|
+
type: String,
|
|
297
|
+
default: "slide"
|
|
298
|
+
},
|
|
299
|
+
interval: Number,
|
|
300
|
+
hasDrag: {
|
|
301
|
+
type: Boolean,
|
|
302
|
+
default: true
|
|
303
|
+
},
|
|
304
|
+
autoplay: {
|
|
305
|
+
type: Boolean,
|
|
306
|
+
default: true
|
|
307
|
+
},
|
|
308
|
+
pauseHover: {
|
|
309
|
+
type: Boolean,
|
|
310
|
+
default: true
|
|
311
|
+
},
|
|
312
|
+
pauseInfo: {
|
|
313
|
+
type: Boolean,
|
|
314
|
+
default: true
|
|
315
|
+
},
|
|
316
|
+
pauseInfoType: {
|
|
317
|
+
type: String,
|
|
318
|
+
default: "is-white"
|
|
319
|
+
},
|
|
320
|
+
pauseText: {
|
|
321
|
+
type: String,
|
|
322
|
+
default: "Pause"
|
|
323
|
+
},
|
|
324
|
+
arrow: {
|
|
325
|
+
type: Boolean,
|
|
326
|
+
default: true
|
|
327
|
+
},
|
|
328
|
+
arrowHover: {
|
|
329
|
+
type: Boolean,
|
|
330
|
+
default: true
|
|
331
|
+
},
|
|
332
|
+
repeat: {
|
|
333
|
+
type: Boolean,
|
|
334
|
+
default: true
|
|
335
|
+
},
|
|
336
|
+
iconPack: String,
|
|
337
|
+
iconSize: String,
|
|
338
|
+
iconPrev: {
|
|
339
|
+
type: String,
|
|
340
|
+
default: () => {
|
|
341
|
+
return config.defaultIconPrev;
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
iconNext: {
|
|
345
|
+
type: String,
|
|
346
|
+
default: () => {
|
|
347
|
+
return config.defaultIconNext;
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
indicator: {
|
|
351
|
+
type: Boolean,
|
|
352
|
+
default: true
|
|
353
|
+
},
|
|
354
|
+
indicatorBackground: Boolean,
|
|
355
|
+
indicatorCustom: Boolean,
|
|
356
|
+
indicatorCustomSize: {
|
|
357
|
+
type: String,
|
|
358
|
+
default: "is-small"
|
|
359
|
+
},
|
|
360
|
+
indicatorInside: {
|
|
361
|
+
type: Boolean,
|
|
362
|
+
default: true
|
|
363
|
+
},
|
|
364
|
+
indicatorMode: {
|
|
365
|
+
type: String,
|
|
366
|
+
default: "click"
|
|
367
|
+
},
|
|
368
|
+
indicatorPosition: {
|
|
369
|
+
type: String,
|
|
370
|
+
default: "is-bottom"
|
|
371
|
+
},
|
|
372
|
+
indicatorStyle: {
|
|
373
|
+
type: String,
|
|
374
|
+
default: "is-dots"
|
|
375
|
+
},
|
|
376
|
+
overlay: Boolean,
|
|
377
|
+
progress: Boolean,
|
|
378
|
+
progressType: {
|
|
379
|
+
type: String,
|
|
380
|
+
default: "is-primary"
|
|
381
|
+
},
|
|
382
|
+
withCarouselList: Boolean
|
|
383
|
+
},
|
|
384
|
+
emits: {
|
|
385
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
386
|
+
change: (_index) => true,
|
|
387
|
+
click: () => true,
|
|
388
|
+
"update:modelValue": (_value) => true
|
|
389
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
390
|
+
},
|
|
391
|
+
data() {
|
|
392
|
+
return {
|
|
393
|
+
transition: "next",
|
|
394
|
+
activeChild: this.modelValue || 0,
|
|
395
|
+
isPause: false,
|
|
396
|
+
dragX: false,
|
|
397
|
+
timer: void 0
|
|
398
|
+
};
|
|
399
|
+
},
|
|
400
|
+
computed: {
|
|
401
|
+
indicatorClasses() {
|
|
402
|
+
return [
|
|
403
|
+
{
|
|
404
|
+
"has-background": this.indicatorBackground,
|
|
405
|
+
"has-custom": this.indicatorCustom,
|
|
406
|
+
"is-inside": this.indicatorInside
|
|
407
|
+
},
|
|
408
|
+
this.indicatorCustom && this.indicatorCustomSize,
|
|
409
|
+
this.indicatorInside && this.indicatorPosition
|
|
410
|
+
];
|
|
411
|
+
},
|
|
412
|
+
// checking arrows
|
|
413
|
+
hasPrev() {
|
|
414
|
+
return this.repeat || this.activeChild !== 0;
|
|
415
|
+
},
|
|
416
|
+
hasNext() {
|
|
417
|
+
return this.repeat || this.activeChild < this.childItems.length - 1;
|
|
418
|
+
},
|
|
419
|
+
activeChildIndex() {
|
|
420
|
+
const item = this.sortedItems[this.activeChild];
|
|
421
|
+
return item != null ? item.index : void 0;
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
watch: {
|
|
425
|
+
/*
|
|
426
|
+
* When v-model is changed set the new active item.
|
|
427
|
+
*/
|
|
428
|
+
modelValue(value) {
|
|
429
|
+
this.changeActive(value);
|
|
430
|
+
},
|
|
431
|
+
/*
|
|
432
|
+
* When carousel-items are updated, set active one.
|
|
433
|
+
*/
|
|
434
|
+
sortedItems(items) {
|
|
435
|
+
if (this.activeChild >= items.length && this.activeChild > 0) {
|
|
436
|
+
this.changeActive(this.activeChild - 1);
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
/*
|
|
440
|
+
* When autoplay is changed, start or pause timer accordingly
|
|
441
|
+
*/
|
|
442
|
+
autoplay(status) {
|
|
443
|
+
status ? this.startTimer() : this.pauseTimer();
|
|
444
|
+
},
|
|
445
|
+
/*
|
|
446
|
+
* Since the timer can get paused at the end, if repeat is changed we need to restart it
|
|
447
|
+
*/
|
|
448
|
+
repeat(status) {
|
|
449
|
+
if (status) {
|
|
450
|
+
this.startTimer();
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
methods: {
|
|
455
|
+
startTimer() {
|
|
456
|
+
if (!this.autoplay || this.timer) return;
|
|
457
|
+
this.isPause = false;
|
|
458
|
+
this.timer = setInterval(() => {
|
|
459
|
+
if (!this.repeat && this.activeChild >= this.childItems.length - 1) {
|
|
460
|
+
this.pauseTimer();
|
|
461
|
+
} else {
|
|
462
|
+
this.next();
|
|
463
|
+
}
|
|
464
|
+
}, this.interval || config.defaultCarouselInterval);
|
|
465
|
+
},
|
|
466
|
+
pauseTimer() {
|
|
467
|
+
this.isPause = true;
|
|
468
|
+
if (this.timer) {
|
|
469
|
+
clearInterval(this.timer);
|
|
470
|
+
this.timer = void 0;
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
restartTimer() {
|
|
474
|
+
this.pauseTimer();
|
|
475
|
+
this.startTimer();
|
|
476
|
+
},
|
|
477
|
+
checkPause() {
|
|
478
|
+
if (this.pauseHover && this.autoplay) {
|
|
479
|
+
this.pauseTimer();
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
/*
|
|
483
|
+
* Change the active item and emit change event.
|
|
484
|
+
* action only for animated slide, there true = next, false = prev
|
|
485
|
+
*/
|
|
486
|
+
changeActive(newIndex, direction = 0) {
|
|
487
|
+
if (this.activeChild === newIndex || isNaN(newIndex)) return;
|
|
488
|
+
direction = direction || newIndex - this.activeChild;
|
|
489
|
+
newIndex = this.repeat ? mod(newIndex, this.childItems.length) : bound(newIndex, 0, this.childItems.length - 1);
|
|
490
|
+
this.transition = direction > 0 ? "prev" : "next";
|
|
491
|
+
this.activeChild = newIndex;
|
|
492
|
+
if (newIndex !== this.modelValue) {
|
|
493
|
+
this.$emit("update:modelValue", newIndex);
|
|
494
|
+
}
|
|
495
|
+
this.restartTimer();
|
|
496
|
+
this.$emit("change", newIndex);
|
|
497
|
+
},
|
|
498
|
+
// Indicator trigger when change active item.
|
|
499
|
+
modeChange(trigger, value) {
|
|
500
|
+
if (this.indicatorMode === trigger) {
|
|
501
|
+
return this.changeActive(value);
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
prev() {
|
|
505
|
+
this.changeActive(this.activeChild - 1, -1);
|
|
506
|
+
},
|
|
507
|
+
next() {
|
|
508
|
+
this.changeActive(this.activeChild + 1, 1);
|
|
509
|
+
},
|
|
510
|
+
// handle drag event
|
|
511
|
+
dragStart(event) {
|
|
512
|
+
if (!this.hasDrag || !event.target.draggable) return;
|
|
513
|
+
const touches = event.touches;
|
|
514
|
+
this.dragX = touches ? event.changedTouches[0].pageX : event.pageX;
|
|
515
|
+
if (touches) {
|
|
516
|
+
this.pauseTimer();
|
|
517
|
+
} else {
|
|
518
|
+
event.preventDefault();
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
dragEnd(event) {
|
|
522
|
+
if (this.dragX === false) return;
|
|
523
|
+
const touches = event.touches;
|
|
524
|
+
const detected = touches ? event.changedTouches[0].pageX : event.pageX;
|
|
525
|
+
const diffX = detected - this.dragX;
|
|
526
|
+
if (Math.abs(diffX) > 30) {
|
|
527
|
+
if (diffX < 0) {
|
|
528
|
+
this.next();
|
|
529
|
+
} else {
|
|
530
|
+
this.prev();
|
|
531
|
+
}
|
|
532
|
+
} else {
|
|
533
|
+
event.target.click();
|
|
534
|
+
this.sortedItems[this.activeChild].$emit("click");
|
|
535
|
+
this.$emit("click");
|
|
536
|
+
}
|
|
537
|
+
if (touches) {
|
|
538
|
+
this.startTimer();
|
|
539
|
+
}
|
|
540
|
+
this.dragX = false;
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
mounted() {
|
|
544
|
+
this.startTimer();
|
|
545
|
+
},
|
|
546
|
+
beforeUnmount() {
|
|
547
|
+
this.pauseTimer();
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
const _hoisted_1$3 = ["value", "max"];
|
|
552
|
+
const _hoisted_2$1 = {
|
|
553
|
+
key: 1,
|
|
554
|
+
class: "carousel-pause"
|
|
555
|
+
};
|
|
556
|
+
const _hoisted_3$1 = ["onMouseover", "onClick"];
|
|
557
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
558
|
+
const _component_b_icon = vue.resolveComponent("b-icon");
|
|
559
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
560
|
+
"div",
|
|
561
|
+
{
|
|
562
|
+
class: vue.normalizeClass(["carousel", { "is-overlay": _ctx.overlay }]),
|
|
563
|
+
onMouseenter: _cache[4] || (_cache[4] = (...args) => _ctx.checkPause && _ctx.checkPause(...args)),
|
|
564
|
+
onMouseleave: _cache[5] || (_cache[5] = (...args) => _ctx.startTimer && _ctx.startTimer(...args))
|
|
565
|
+
},
|
|
566
|
+
[
|
|
567
|
+
_ctx.progress ? (vue.openBlock(), vue.createElementBlock("progress", {
|
|
568
|
+
key: 0,
|
|
569
|
+
class: vue.normalizeClass(["progress", _ctx.progressType]),
|
|
570
|
+
value: _ctx.activeChild,
|
|
571
|
+
max: _ctx.childItems.length - 1
|
|
572
|
+
}, vue.toDisplayString(_ctx.childItems.length - 1), 11, _hoisted_1$3)) : vue.createCommentVNode("v-if", true),
|
|
573
|
+
vue.createElementVNode(
|
|
574
|
+
"div",
|
|
575
|
+
{
|
|
576
|
+
class: "carousel-items",
|
|
577
|
+
onMousedown: _cache[0] || (_cache[0] = (...args) => _ctx.dragStart && _ctx.dragStart(...args)),
|
|
578
|
+
onMouseup: _cache[1] || (_cache[1] = (...args) => _ctx.dragEnd && _ctx.dragEnd(...args)),
|
|
579
|
+
onTouchstart: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.dragStart && _ctx.dragStart(...args), ["stop"])),
|
|
580
|
+
onTouchend: _cache[3] || (_cache[3] = vue.withModifiers((...args) => _ctx.dragEnd && _ctx.dragEnd(...args), ["stop"]))
|
|
581
|
+
},
|
|
582
|
+
[
|
|
583
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
|
584
|
+
_ctx.arrow ? (vue.openBlock(), vue.createElementBlock(
|
|
585
|
+
"div",
|
|
586
|
+
{
|
|
587
|
+
key: 0,
|
|
588
|
+
class: vue.normalizeClass(["carousel-arrow", { "is-hovered": _ctx.arrowHover }])
|
|
589
|
+
},
|
|
590
|
+
[
|
|
591
|
+
vue.withDirectives(vue.createVNode(_component_b_icon, {
|
|
592
|
+
class: "has-icons-left",
|
|
593
|
+
onClick: _ctx.prev,
|
|
594
|
+
pack: _ctx.iconPack,
|
|
595
|
+
icon: _ctx.iconPrev,
|
|
596
|
+
size: _ctx.iconSize,
|
|
597
|
+
both: ""
|
|
598
|
+
}, null, 8, ["onClick", "pack", "icon", "size"]), [
|
|
599
|
+
[vue.vShow, _ctx.hasPrev]
|
|
600
|
+
]),
|
|
601
|
+
vue.withDirectives(vue.createVNode(_component_b_icon, {
|
|
602
|
+
class: "has-icons-right",
|
|
603
|
+
onClick: _ctx.next,
|
|
604
|
+
pack: _ctx.iconPack,
|
|
605
|
+
icon: _ctx.iconNext,
|
|
606
|
+
size: _ctx.iconSize,
|
|
607
|
+
both: ""
|
|
608
|
+
}, null, 8, ["onClick", "pack", "icon", "size"]), [
|
|
609
|
+
[vue.vShow, _ctx.hasNext]
|
|
610
|
+
])
|
|
611
|
+
],
|
|
612
|
+
2
|
|
613
|
+
/* CLASS */
|
|
614
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
615
|
+
],
|
|
616
|
+
32
|
|
617
|
+
/* NEED_HYDRATION */
|
|
618
|
+
),
|
|
619
|
+
_ctx.autoplay && _ctx.pauseHover && _ctx.pauseInfo && _ctx.isPause ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [
|
|
620
|
+
vue.createElementVNode(
|
|
621
|
+
"span",
|
|
622
|
+
{
|
|
623
|
+
class: vue.normalizeClass(["tag", _ctx.pauseInfoType])
|
|
624
|
+
},
|
|
625
|
+
vue.toDisplayString(_ctx.pauseText),
|
|
626
|
+
3
|
|
627
|
+
/* TEXT, CLASS */
|
|
628
|
+
)
|
|
629
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
630
|
+
_ctx.withCarouselList && !_ctx.indicator ? vue.renderSlot(_ctx.$slots, "list", {
|
|
631
|
+
key: 2,
|
|
632
|
+
active: _ctx.activeChild,
|
|
633
|
+
switch: _ctx.changeActive
|
|
634
|
+
}) : vue.createCommentVNode("v-if", true),
|
|
635
|
+
_ctx.indicator ? (vue.openBlock(), vue.createElementBlock(
|
|
636
|
+
"div",
|
|
637
|
+
{
|
|
638
|
+
key: 3,
|
|
639
|
+
class: vue.normalizeClass(["carousel-indicator", _ctx.indicatorClasses])
|
|
640
|
+
},
|
|
641
|
+
[
|
|
642
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
643
|
+
vue.Fragment,
|
|
644
|
+
null,
|
|
645
|
+
vue.renderList(_ctx.sortedItems, (item, index) => {
|
|
646
|
+
return vue.openBlock(), vue.createElementBlock("a", {
|
|
647
|
+
class: vue.normalizeClass(["indicator-item", { "is-active": item.isActive }]),
|
|
648
|
+
onMouseover: ($event) => _ctx.modeChange("hover", index),
|
|
649
|
+
onClick: ($event) => _ctx.modeChange("click", index),
|
|
650
|
+
key: item.uniqueValue
|
|
651
|
+
}, [
|
|
652
|
+
vue.renderSlot(_ctx.$slots, "indicators", { i: index }, () => [
|
|
653
|
+
vue.createElementVNode(
|
|
654
|
+
"span",
|
|
655
|
+
{
|
|
656
|
+
class: vue.normalizeClass(["indicator-style", _ctx.indicatorStyle])
|
|
657
|
+
},
|
|
658
|
+
null,
|
|
659
|
+
2
|
|
660
|
+
/* CLASS */
|
|
661
|
+
)
|
|
662
|
+
])
|
|
663
|
+
], 42, _hoisted_3$1);
|
|
664
|
+
}),
|
|
665
|
+
128
|
|
666
|
+
/* KEYED_FRAGMENT */
|
|
667
|
+
))
|
|
668
|
+
],
|
|
669
|
+
2
|
|
670
|
+
/* CLASS */
|
|
671
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
672
|
+
_ctx.overlay ? vue.renderSlot(_ctx.$slots, "overlay", { key: 4 }) : vue.createCommentVNode("v-if", true)
|
|
673
|
+
],
|
|
674
|
+
34
|
|
675
|
+
/* CLASS, NEED_HYDRATION */
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
var Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
679
|
+
|
|
680
|
+
var __defProp$2 = Object.defineProperty;
|
|
681
|
+
var __defProps = Object.defineProperties;
|
|
682
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
683
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
684
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
685
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
686
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
687
|
+
var __spreadValues$2 = (a, b) => {
|
|
688
|
+
for (var prop in b || (b = {}))
|
|
689
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
690
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
691
|
+
if (__getOwnPropSymbols$2)
|
|
692
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
693
|
+
if (__propIsEnum$2.call(b, prop))
|
|
694
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
695
|
+
}
|
|
696
|
+
return a;
|
|
697
|
+
};
|
|
698
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
699
|
+
const sorted = 1;
|
|
700
|
+
const optional = 2;
|
|
701
|
+
const Sorted = sorted;
|
|
702
|
+
var InjectedChildMixin = (parentItemName, flags) => {
|
|
703
|
+
const mixin = {
|
|
704
|
+
// FIXME: initializing `parent` with an empty string does not make
|
|
705
|
+
// sense at all, but some code supposes that `parent` is non-null.
|
|
706
|
+
// so I leave it as is for now.
|
|
707
|
+
inject: { parent: { from: "b" + parentItemName, default: "" } },
|
|
708
|
+
props: {
|
|
709
|
+
// if `value` is non-null, it must be unique among all the siblings.
|
|
710
|
+
// see `uniqueValue`
|
|
711
|
+
value: {
|
|
712
|
+
type: String,
|
|
713
|
+
default: null
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
computed: {
|
|
717
|
+
// `ProviderParentMixin` uses `uniqueValue` computed value to
|
|
718
|
+
// identify the child in its `childItems` collection.
|
|
719
|
+
// so the value must be unique among all the siblings.
|
|
720
|
+
// falls back to the `uid` internal field to ensure uniqueness.
|
|
721
|
+
uniqueValue() {
|
|
722
|
+
return this.value != null ? this.value : this.$.uid;
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
created() {
|
|
726
|
+
if (!this.parent) {
|
|
727
|
+
if (!hasFlag(flags, optional)) {
|
|
728
|
+
throw new Error("You should wrap " + this.$options.name + " in a " + parentItemName);
|
|
729
|
+
}
|
|
730
|
+
} else if (this.parent._registerItem) {
|
|
731
|
+
this.parent._registerItem(this);
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
beforeUnmount() {
|
|
735
|
+
if (this.parent && this.parent._unregisterItem) {
|
|
736
|
+
this.parent._unregisterItem(this);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
if (hasFlag(flags, sorted)) {
|
|
741
|
+
mixin.props = __spreadProps(__spreadValues$2({}, mixin.props), {
|
|
742
|
+
order: {
|
|
743
|
+
type: Number,
|
|
744
|
+
required: false
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
mixin.data = () => {
|
|
748
|
+
return {
|
|
749
|
+
dynamicIndex: void 0
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
mixin.computed = __spreadProps(__spreadValues$2({}, mixin.computed), {
|
|
753
|
+
index() {
|
|
754
|
+
return this.order != null ? this.order : this.dynamicIndex;
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
return mixin;
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
var _sfc_main$2 = vue.defineComponent({
|
|
762
|
+
name: "BCarouselItem",
|
|
763
|
+
mixins: [InjectedChildMixin("carousel", Sorted)],
|
|
764
|
+
data() {
|
|
765
|
+
return {
|
|
766
|
+
transitionName: null
|
|
767
|
+
};
|
|
768
|
+
},
|
|
769
|
+
computed: {
|
|
770
|
+
transition() {
|
|
771
|
+
if (this.parent.animated === "fade") {
|
|
772
|
+
return "fade";
|
|
773
|
+
} else if (this.parent.transition) {
|
|
774
|
+
return "slide-" + this.parent.transition;
|
|
775
|
+
} else {
|
|
776
|
+
return void 0;
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
isActive() {
|
|
780
|
+
return this.parent.activeChildIndex === this.index;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
|
|
785
|
+
const _hoisted_1$2 = { class: "carousel-item" };
|
|
786
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
787
|
+
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
788
|
+
name: _ctx.transition,
|
|
789
|
+
persisted: ""
|
|
790
|
+
}, {
|
|
791
|
+
default: vue.withCtx(() => [
|
|
792
|
+
vue.withDirectives(vue.createElementVNode(
|
|
793
|
+
"div",
|
|
794
|
+
_hoisted_1$2,
|
|
795
|
+
[
|
|
796
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
797
|
+
],
|
|
798
|
+
512
|
|
799
|
+
/* NEED_PATCH */
|
|
800
|
+
), [
|
|
801
|
+
[vue.vShow, _ctx.isActive]
|
|
802
|
+
])
|
|
803
|
+
]),
|
|
804
|
+
_: 3
|
|
805
|
+
/* FORWARDED */
|
|
806
|
+
}, 8, ["name"]);
|
|
807
|
+
}
|
|
808
|
+
var CarouselItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
809
|
+
|
|
810
|
+
var __defProp$1 = Object.defineProperty;
|
|
811
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
812
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
813
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
814
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
815
|
+
var __spreadValues$1 = (a, b) => {
|
|
816
|
+
for (var prop in b || (b = {}))
|
|
817
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
818
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
819
|
+
if (__getOwnPropSymbols$1)
|
|
820
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
821
|
+
if (__propIsEnum$1.call(b, prop))
|
|
822
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
823
|
+
}
|
|
824
|
+
return a;
|
|
825
|
+
};
|
|
826
|
+
const BULMA_KNOWN_RATIO = [
|
|
827
|
+
"square",
|
|
828
|
+
"1by1",
|
|
829
|
+
"5by4",
|
|
830
|
+
"4by3",
|
|
831
|
+
"3by2",
|
|
832
|
+
"5by3",
|
|
833
|
+
"16by9",
|
|
834
|
+
"b2y1",
|
|
835
|
+
"3by1",
|
|
836
|
+
"4by5",
|
|
837
|
+
"3by4",
|
|
838
|
+
"2by3",
|
|
839
|
+
"3by5",
|
|
840
|
+
"9by16",
|
|
841
|
+
"1by2",
|
|
842
|
+
"1by3"
|
|
843
|
+
];
|
|
844
|
+
function isBulmaKnownRatio(value) {
|
|
845
|
+
return BULMA_KNOWN_RATIO.indexOf(value) !== -1;
|
|
846
|
+
}
|
|
847
|
+
var _sfc_main$1 = vue.defineComponent({
|
|
848
|
+
name: "BImage",
|
|
849
|
+
props: {
|
|
850
|
+
src: String,
|
|
851
|
+
alt: String,
|
|
852
|
+
srcFallback: String,
|
|
853
|
+
webpFallback: {
|
|
854
|
+
type: String,
|
|
855
|
+
default: () => {
|
|
856
|
+
return config.defaultImageWebpFallback;
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
lazy: {
|
|
860
|
+
type: Boolean,
|
|
861
|
+
default: () => {
|
|
862
|
+
return config.defaultImageLazy;
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
responsive: {
|
|
866
|
+
type: Boolean,
|
|
867
|
+
default: () => {
|
|
868
|
+
return config.defaultImageResponsive;
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
ratio: {
|
|
872
|
+
type: String,
|
|
873
|
+
default: () => {
|
|
874
|
+
return config.defaultImageRatio;
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
placeholder: String,
|
|
878
|
+
srcset: String,
|
|
879
|
+
srcsetSizes: Array,
|
|
880
|
+
srcsetFormatter: {
|
|
881
|
+
type: Function,
|
|
882
|
+
default: (src, size, vm) => {
|
|
883
|
+
{
|
|
884
|
+
return vm.formatSrcset(src, size);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
rounded: {
|
|
889
|
+
type: Boolean,
|
|
890
|
+
default: false
|
|
891
|
+
},
|
|
892
|
+
captionFirst: {
|
|
893
|
+
type: Boolean,
|
|
894
|
+
default: false
|
|
895
|
+
},
|
|
896
|
+
customClass: String
|
|
897
|
+
},
|
|
898
|
+
emits: {
|
|
899
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
900
|
+
load: (event, src) => true,
|
|
901
|
+
error: (event, src) => true
|
|
902
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
903
|
+
},
|
|
904
|
+
data() {
|
|
905
|
+
return {
|
|
906
|
+
clientWidth: 0,
|
|
907
|
+
webpSupportVerified: false,
|
|
908
|
+
webpSupported: false,
|
|
909
|
+
useNativeLazy: false,
|
|
910
|
+
observer: null,
|
|
911
|
+
inViewPort: false,
|
|
912
|
+
loaded: false,
|
|
913
|
+
failed: false
|
|
914
|
+
};
|
|
915
|
+
},
|
|
916
|
+
computed: {
|
|
917
|
+
ratioPattern() {
|
|
918
|
+
return /([0-9]+)by([0-9]+)/;
|
|
919
|
+
},
|
|
920
|
+
hasRatio() {
|
|
921
|
+
return this.ratio != null && this.ratioPattern.test(this.ratio);
|
|
922
|
+
},
|
|
923
|
+
figureClasses() {
|
|
924
|
+
const classes = { image: this.responsive };
|
|
925
|
+
if (this.hasRatio && isBulmaKnownRatio(this.ratio)) {
|
|
926
|
+
classes[`is-${this.ratio}`] = true;
|
|
927
|
+
}
|
|
928
|
+
return classes;
|
|
929
|
+
},
|
|
930
|
+
figureStyles() {
|
|
931
|
+
if (this.hasRatio && !isBulmaKnownRatio(this.ratio)) {
|
|
932
|
+
const ratioValues = this.ratioPattern.exec(this.ratio);
|
|
933
|
+
return {
|
|
934
|
+
paddingTop: `${+ratioValues[2] / +ratioValues[1] * 100}%`
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
return void 0;
|
|
938
|
+
},
|
|
939
|
+
imgClasses() {
|
|
940
|
+
return __spreadValues$1({
|
|
941
|
+
"is-rounded": this.rounded,
|
|
942
|
+
"has-ratio": this.hasRatio
|
|
943
|
+
}, this.customClass ? { [this.customClass]: !!this.customClass } : {});
|
|
944
|
+
},
|
|
945
|
+
srcExt() {
|
|
946
|
+
return this.getExt(this.src);
|
|
947
|
+
},
|
|
948
|
+
isWepb() {
|
|
949
|
+
return this.srcExt === "webp";
|
|
950
|
+
},
|
|
951
|
+
computedSrc() {
|
|
952
|
+
let src = this.src;
|
|
953
|
+
if (this.failed && this.srcFallback) {
|
|
954
|
+
src = this.srcFallback;
|
|
955
|
+
}
|
|
956
|
+
if (!this.webpSupported && this.isWepb && this.webpFallback) {
|
|
957
|
+
if (this.webpFallback.startsWith(".")) {
|
|
958
|
+
return src.replace(/\.webp/gi, `${this.webpFallback}`);
|
|
959
|
+
}
|
|
960
|
+
return this.webpFallback;
|
|
961
|
+
}
|
|
962
|
+
return src;
|
|
963
|
+
},
|
|
964
|
+
computedWidth() {
|
|
965
|
+
if (this.responsive && this.clientWidth > 0) {
|
|
966
|
+
return this.clientWidth;
|
|
967
|
+
}
|
|
968
|
+
return void 0;
|
|
969
|
+
},
|
|
970
|
+
computedNativeLazy() {
|
|
971
|
+
if (this.lazy && this.useNativeLazy) {
|
|
972
|
+
return "lazy";
|
|
973
|
+
}
|
|
974
|
+
return void 0;
|
|
975
|
+
},
|
|
976
|
+
isDisplayed() {
|
|
977
|
+
return (this.webpSupportVerified || !this.isWepb) && (!this.lazy || this.useNativeLazy || this.inViewPort);
|
|
978
|
+
},
|
|
979
|
+
placeholderExt() {
|
|
980
|
+
if (this.placeholder) {
|
|
981
|
+
return this.getExt(this.placeholder);
|
|
982
|
+
}
|
|
983
|
+
return void 0;
|
|
984
|
+
},
|
|
985
|
+
isPlaceholderWepb() {
|
|
986
|
+
if (this.placeholder) {
|
|
987
|
+
return this.placeholderExt === "webp";
|
|
988
|
+
}
|
|
989
|
+
return false;
|
|
990
|
+
},
|
|
991
|
+
computedPlaceholder() {
|
|
992
|
+
if (!this.webpSupported && this.isPlaceholderWepb && this.webpFallback && this.webpFallback.startsWith(".")) {
|
|
993
|
+
return this.placeholder.replace(/\.webp/gi, `${this.webpFallback}`);
|
|
994
|
+
}
|
|
995
|
+
return this.placeholder;
|
|
996
|
+
},
|
|
997
|
+
isPlaceholderDisplayed() {
|
|
998
|
+
return !this.loaded && (this.$slots.placeholder || this.placeholder && (this.webpSupportVerified || !this.isPlaceholderWepb));
|
|
999
|
+
},
|
|
1000
|
+
computedSrcset() {
|
|
1001
|
+
if (this.srcset) {
|
|
1002
|
+
if (!this.webpSupported && this.isWepb && this.webpFallback && this.webpFallback.startsWith(".")) {
|
|
1003
|
+
return this.srcset.replace(/\.webp/gi, `${this.webpFallback}`);
|
|
1004
|
+
}
|
|
1005
|
+
return this.srcset;
|
|
1006
|
+
}
|
|
1007
|
+
if (this.srcsetSizes && Array.isArray(this.srcsetSizes) && this.srcsetSizes.length > 0) {
|
|
1008
|
+
return this.srcsetSizes.map((size) => {
|
|
1009
|
+
return `${this.srcsetFormatter(this.computedSrc, size, this)} ${size}w`;
|
|
1010
|
+
}).join(",");
|
|
1011
|
+
}
|
|
1012
|
+
return void 0;
|
|
1013
|
+
},
|
|
1014
|
+
computedSizes() {
|
|
1015
|
+
if (this.computedSrcset && this.computedWidth) {
|
|
1016
|
+
return `${this.computedWidth}px`;
|
|
1017
|
+
}
|
|
1018
|
+
return void 0;
|
|
1019
|
+
},
|
|
1020
|
+
isCaptionFirst() {
|
|
1021
|
+
return this.$slots.caption && this.captionFirst;
|
|
1022
|
+
},
|
|
1023
|
+
isCaptionLast() {
|
|
1024
|
+
return this.$slots.caption && !this.captionFirst;
|
|
1025
|
+
}
|
|
1026
|
+
},
|
|
1027
|
+
methods: {
|
|
1028
|
+
getExt(filename, clean = true) {
|
|
1029
|
+
if (filename) {
|
|
1030
|
+
const noParam = clean ? filename.split("?")[0] : filename;
|
|
1031
|
+
return noParam.split(".").pop();
|
|
1032
|
+
}
|
|
1033
|
+
return "";
|
|
1034
|
+
},
|
|
1035
|
+
setWidth() {
|
|
1036
|
+
this.clientWidth = this.$el.clientWidth;
|
|
1037
|
+
},
|
|
1038
|
+
formatSrcset(src, size) {
|
|
1039
|
+
const ext = this.getExt(src, false);
|
|
1040
|
+
const name = src.split(".").slice(0, -1).join(".");
|
|
1041
|
+
return `${name}-${size}.${ext}`;
|
|
1042
|
+
},
|
|
1043
|
+
onLoad(event) {
|
|
1044
|
+
this.loaded = true;
|
|
1045
|
+
this.emitSrc(event, (src) => this.$emit("load", event, src));
|
|
1046
|
+
},
|
|
1047
|
+
onError(event) {
|
|
1048
|
+
this.emitSrc(event, (src) => this.$emit("error", event, src));
|
|
1049
|
+
if (!this.failed) {
|
|
1050
|
+
this.failed = true;
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
emitSrc(event, emit) {
|
|
1054
|
+
const target = event.target;
|
|
1055
|
+
emit(target.currentSrc || target.src || this.computedSrc);
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
created() {
|
|
1059
|
+
if (this.isWepb) {
|
|
1060
|
+
isWebpSupported().then((supported) => {
|
|
1061
|
+
this.webpSupportVerified = true;
|
|
1062
|
+
this.webpSupported = supported;
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
if (this.lazy) {
|
|
1066
|
+
const nativeLazySupported = typeof window !== "undefined" && "HTMLImageElement" in window && "loading" in HTMLImageElement.prototype;
|
|
1067
|
+
const intersectionObserverSupported = typeof window !== "undefined" && "IntersectionObserver" in window;
|
|
1068
|
+
if (!nativeLazySupported && intersectionObserverSupported) {
|
|
1069
|
+
this.observer = new IntersectionObserver((events) => {
|
|
1070
|
+
const { target, isIntersecting } = events[0];
|
|
1071
|
+
if (isIntersecting && !this.inViewPort) {
|
|
1072
|
+
this.inViewPort = true;
|
|
1073
|
+
this.observer.unobserve(target);
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1076
|
+
} else {
|
|
1077
|
+
this.useNativeLazy = true;
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
mounted() {
|
|
1082
|
+
if (this.lazy && this.observer) {
|
|
1083
|
+
this.observer.observe(this.$el);
|
|
1084
|
+
}
|
|
1085
|
+
this.setWidth();
|
|
1086
|
+
if (typeof window !== "undefined") {
|
|
1087
|
+
window.addEventListener("resize", this.setWidth);
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
beforeUnmount() {
|
|
1091
|
+
if (this.observer) {
|
|
1092
|
+
this.observer.disconnect();
|
|
1093
|
+
}
|
|
1094
|
+
if (typeof window !== "undefined") {
|
|
1095
|
+
window.removeEventListener("resize", this.setWidth);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
|
|
1100
|
+
const _hoisted_1$1 = { key: 0 };
|
|
1101
|
+
const _hoisted_2 = ["srcset", "src", "alt", "width", "sizes", "loading"];
|
|
1102
|
+
const _hoisted_3 = ["src", "alt"];
|
|
1103
|
+
const _hoisted_4 = { key: 1 };
|
|
1104
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1105
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
1106
|
+
"figure",
|
|
1107
|
+
{
|
|
1108
|
+
class: vue.normalizeClass(["b-image-wrapper", _ctx.figureClasses]),
|
|
1109
|
+
style: vue.normalizeStyle(_ctx.figureStyles)
|
|
1110
|
+
},
|
|
1111
|
+
[
|
|
1112
|
+
_ctx.isCaptionFirst ? (vue.openBlock(), vue.createElementBlock("figcaption", _hoisted_1$1, [
|
|
1113
|
+
vue.renderSlot(_ctx.$slots, "caption")
|
|
1114
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
1115
|
+
vue.createVNode(vue.Transition, { name: "fade" }, {
|
|
1116
|
+
default: vue.withCtx(() => [
|
|
1117
|
+
_ctx.isDisplayed ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
1118
|
+
key: 0,
|
|
1119
|
+
srcset: _ctx.computedSrcset,
|
|
1120
|
+
src: _ctx.computedSrc,
|
|
1121
|
+
alt: _ctx.alt,
|
|
1122
|
+
class: vue.normalizeClass(_ctx.imgClasses),
|
|
1123
|
+
width: _ctx.computedWidth,
|
|
1124
|
+
sizes: _ctx.computedSizes,
|
|
1125
|
+
loading: _ctx.computedNativeLazy,
|
|
1126
|
+
onLoad: _cache[0] || (_cache[0] = (...args) => _ctx.onLoad && _ctx.onLoad(...args)),
|
|
1127
|
+
onError: _cache[1] || (_cache[1] = (...args) => _ctx.onError && _ctx.onError(...args))
|
|
1128
|
+
}, null, 42, _hoisted_2)) : vue.createCommentVNode("v-if", true)
|
|
1129
|
+
]),
|
|
1130
|
+
_: 1
|
|
1131
|
+
/* STABLE */
|
|
1132
|
+
}),
|
|
1133
|
+
vue.createVNode(vue.Transition, { name: "fade" }, {
|
|
1134
|
+
default: vue.withCtx(() => [
|
|
1135
|
+
_ctx.isPlaceholderDisplayed ? vue.renderSlot(_ctx.$slots, "placeholder", { key: 0 }, () => [
|
|
1136
|
+
vue.createElementVNode("img", {
|
|
1137
|
+
src: _ctx.computedPlaceholder,
|
|
1138
|
+
alt: _ctx.alt,
|
|
1139
|
+
class: vue.normalizeClass([_ctx.imgClasses, "placeholder"])
|
|
1140
|
+
}, null, 10, _hoisted_3)
|
|
1141
|
+
]) : vue.createCommentVNode("v-if", true)
|
|
1142
|
+
]),
|
|
1143
|
+
_: 3
|
|
1144
|
+
/* FORWARDED */
|
|
1145
|
+
}),
|
|
1146
|
+
_ctx.isCaptionLast ? (vue.openBlock(), vue.createElementBlock("figcaption", _hoisted_4, [
|
|
1147
|
+
vue.renderSlot(_ctx.$slots, "caption")
|
|
1148
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
1149
|
+
],
|
|
1150
|
+
6
|
|
1151
|
+
/* CLASS, STYLE */
|
|
1152
|
+
);
|
|
1153
|
+
}
|
|
1154
|
+
var BImage = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
1155
|
+
|
|
1156
|
+
var __defProp = Object.defineProperty;
|
|
1157
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
1158
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1159
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
1160
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1161
|
+
var __spreadValues = (a, b) => {
|
|
1162
|
+
for (var prop in b || (b = {}))
|
|
1163
|
+
if (__hasOwnProp.call(b, prop))
|
|
1164
|
+
__defNormalProp(a, prop, b[prop]);
|
|
1165
|
+
if (__getOwnPropSymbols)
|
|
1166
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
1167
|
+
if (__propIsEnum.call(b, prop))
|
|
1168
|
+
__defNormalProp(a, prop, b[prop]);
|
|
1169
|
+
}
|
|
1170
|
+
return a;
|
|
1171
|
+
};
|
|
1172
|
+
var _sfc_main = vue.defineComponent({
|
|
1173
|
+
name: "BCarouselList",
|
|
1174
|
+
components: {
|
|
1175
|
+
BIcon,
|
|
1176
|
+
BImage
|
|
1177
|
+
},
|
|
1178
|
+
props: {
|
|
1179
|
+
data: {
|
|
1180
|
+
type: Array,
|
|
1181
|
+
default: () => []
|
|
1182
|
+
},
|
|
1183
|
+
modelValue: {
|
|
1184
|
+
type: Number,
|
|
1185
|
+
default: 0
|
|
1186
|
+
},
|
|
1187
|
+
scrollValue: {
|
|
1188
|
+
type: Number,
|
|
1189
|
+
default: 0
|
|
1190
|
+
},
|
|
1191
|
+
hasDrag: {
|
|
1192
|
+
type: Boolean,
|
|
1193
|
+
default: true
|
|
1194
|
+
},
|
|
1195
|
+
hasGrayscale: Boolean,
|
|
1196
|
+
hasOpacity: Boolean,
|
|
1197
|
+
repeat: Boolean,
|
|
1198
|
+
itemsToShow: {
|
|
1199
|
+
type: Number,
|
|
1200
|
+
default: 4
|
|
1201
|
+
},
|
|
1202
|
+
itemsToList: {
|
|
1203
|
+
type: Number,
|
|
1204
|
+
default: 1
|
|
1205
|
+
},
|
|
1206
|
+
asIndicator: Boolean,
|
|
1207
|
+
arrow: {
|
|
1208
|
+
type: Boolean,
|
|
1209
|
+
default: true
|
|
1210
|
+
},
|
|
1211
|
+
arrowHover: {
|
|
1212
|
+
type: Boolean,
|
|
1213
|
+
default: true
|
|
1214
|
+
},
|
|
1215
|
+
iconPack: String,
|
|
1216
|
+
iconSize: String,
|
|
1217
|
+
iconPrev: {
|
|
1218
|
+
type: String,
|
|
1219
|
+
default: () => {
|
|
1220
|
+
return config.defaultIconPrev;
|
|
1221
|
+
}
|
|
1222
|
+
},
|
|
1223
|
+
iconNext: {
|
|
1224
|
+
type: String,
|
|
1225
|
+
default: () => {
|
|
1226
|
+
return config.defaultIconNext;
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
breakpoints: {
|
|
1230
|
+
type: Object,
|
|
1231
|
+
default: () => ({})
|
|
1232
|
+
}
|
|
1233
|
+
},
|
|
1234
|
+
emits: {
|
|
1235
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1236
|
+
switch: (_value) => true,
|
|
1237
|
+
"update:modelValue": (_value) => true,
|
|
1238
|
+
"updated:scroll": (_index) => true
|
|
1239
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
1240
|
+
},
|
|
1241
|
+
data() {
|
|
1242
|
+
return {
|
|
1243
|
+
activeItem: this.modelValue,
|
|
1244
|
+
scrollIndex: this.asIndicator ? this.scrollValue : this.modelValue,
|
|
1245
|
+
delta: 0,
|
|
1246
|
+
dragX: false,
|
|
1247
|
+
hold: 0,
|
|
1248
|
+
windowWidth: 0,
|
|
1249
|
+
touch: false,
|
|
1250
|
+
observer: null,
|
|
1251
|
+
refresh_: 0
|
|
1252
|
+
};
|
|
1253
|
+
},
|
|
1254
|
+
computed: {
|
|
1255
|
+
dragging() {
|
|
1256
|
+
return this.dragX !== false;
|
|
1257
|
+
},
|
|
1258
|
+
listClass() {
|
|
1259
|
+
return [
|
|
1260
|
+
{
|
|
1261
|
+
"has-grayscale": this.settings.hasGrayscale,
|
|
1262
|
+
"has-opacity": this.settings.hasOpacity,
|
|
1263
|
+
"is-dragging": this.dragging
|
|
1264
|
+
}
|
|
1265
|
+
];
|
|
1266
|
+
},
|
|
1267
|
+
itemStyle() {
|
|
1268
|
+
return `width: ${this.itemWidth}px;`;
|
|
1269
|
+
},
|
|
1270
|
+
translation() {
|
|
1271
|
+
return -bound(
|
|
1272
|
+
this.delta + this.scrollIndex * this.itemWidth,
|
|
1273
|
+
0,
|
|
1274
|
+
(this.data.length - this.settings.itemsToShow) * this.itemWidth
|
|
1275
|
+
);
|
|
1276
|
+
},
|
|
1277
|
+
total() {
|
|
1278
|
+
return this.data.length - this.settings.itemsToShow;
|
|
1279
|
+
},
|
|
1280
|
+
hasPrev() {
|
|
1281
|
+
return this.settings.repeat || this.scrollIndex > 0;
|
|
1282
|
+
},
|
|
1283
|
+
hasNext() {
|
|
1284
|
+
return this.settings.repeat || this.scrollIndex < this.total;
|
|
1285
|
+
},
|
|
1286
|
+
breakpointKeys() {
|
|
1287
|
+
return Object.keys(this.breakpoints).sort((a, b) => +b - +a);
|
|
1288
|
+
},
|
|
1289
|
+
settings() {
|
|
1290
|
+
const breakpoint = this.breakpointKeys.filter((breakpoint2) => {
|
|
1291
|
+
if (this.windowWidth >= +breakpoint2) {
|
|
1292
|
+
return true;
|
|
1293
|
+
} else {
|
|
1294
|
+
return false;
|
|
1295
|
+
}
|
|
1296
|
+
})[0];
|
|
1297
|
+
if (breakpoint) {
|
|
1298
|
+
return __spreadValues(__spreadValues({}, this.$props), this.breakpoints[+breakpoint]);
|
|
1299
|
+
}
|
|
1300
|
+
return this.$props;
|
|
1301
|
+
},
|
|
1302
|
+
itemWidth() {
|
|
1303
|
+
if (this.windowWidth) {
|
|
1304
|
+
this.refresh_;
|
|
1305
|
+
const rect = this.$el.getBoundingClientRect();
|
|
1306
|
+
return rect.width / this.settings.itemsToShow;
|
|
1307
|
+
}
|
|
1308
|
+
return 0;
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
watch: {
|
|
1312
|
+
/*
|
|
1313
|
+
* When v-model is changed set the new active item.
|
|
1314
|
+
*/
|
|
1315
|
+
modelValue(value) {
|
|
1316
|
+
this.switchTo(this.asIndicator ? value - (this.itemsToShow - 3) / 2 : value);
|
|
1317
|
+
if (this.activeItem !== value) {
|
|
1318
|
+
this.activeItem = bound(value, 0, this.data.length - 1);
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
scrollValue(value) {
|
|
1322
|
+
this.switchTo(value);
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
methods: {
|
|
1326
|
+
resized() {
|
|
1327
|
+
this.windowWidth = window.innerWidth;
|
|
1328
|
+
},
|
|
1329
|
+
switchTo(newIndex) {
|
|
1330
|
+
if (newIndex === this.scrollIndex || isNaN(newIndex)) {
|
|
1331
|
+
return;
|
|
1332
|
+
}
|
|
1333
|
+
if (this.settings.repeat) {
|
|
1334
|
+
newIndex = mod(newIndex, this.total + 1);
|
|
1335
|
+
}
|
|
1336
|
+
newIndex = bound(newIndex, 0, this.total);
|
|
1337
|
+
this.scrollIndex = newIndex;
|
|
1338
|
+
if (!this.asIndicator && this.modelValue !== newIndex) {
|
|
1339
|
+
this.$emit("update:modelValue", newIndex);
|
|
1340
|
+
} else if (this.scrollIndex !== newIndex) {
|
|
1341
|
+
this.$emit("updated:scroll", newIndex);
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
next() {
|
|
1345
|
+
this.switchTo(this.scrollIndex + this.settings.itemsToList);
|
|
1346
|
+
},
|
|
1347
|
+
prev() {
|
|
1348
|
+
this.switchTo(this.scrollIndex - this.settings.itemsToList);
|
|
1349
|
+
},
|
|
1350
|
+
checkAsIndicator(value, event) {
|
|
1351
|
+
if (!this.asIndicator) return;
|
|
1352
|
+
const dragEndX = event.changedTouches ? event.changedTouches[0].clientX : event.clientX;
|
|
1353
|
+
if (this.hold - Date.now() > 2e3 || Math.abs(+this.dragX - dragEndX) > 10) return;
|
|
1354
|
+
this.dragX = false;
|
|
1355
|
+
this.hold = 0;
|
|
1356
|
+
event.preventDefault();
|
|
1357
|
+
this.activeItem = value;
|
|
1358
|
+
this.$emit("switch", value);
|
|
1359
|
+
},
|
|
1360
|
+
// handle drag event
|
|
1361
|
+
dragStart(event) {
|
|
1362
|
+
if (this.dragging || !this.settings.hasDrag || event.button !== 0 && event.type !== "touchstart") return;
|
|
1363
|
+
this.hold = Date.now();
|
|
1364
|
+
this.touch = !!event.touches;
|
|
1365
|
+
this.dragX = this.touch ? event.touches[0].clientX : event.clientX;
|
|
1366
|
+
window.addEventListener(this.touch ? "touchmove" : "mousemove", this.dragMove);
|
|
1367
|
+
window.addEventListener(this.touch ? "touchend" : "mouseup", this.dragEnd);
|
|
1368
|
+
},
|
|
1369
|
+
dragMove(event) {
|
|
1370
|
+
if (!this.dragging) return;
|
|
1371
|
+
const dragEndX = event.touches ? (event.changedTouches[0] || event.touches[0]).clientX : event.clientX;
|
|
1372
|
+
this.delta = +this.dragX - dragEndX;
|
|
1373
|
+
if (!event.touches) {
|
|
1374
|
+
event.preventDefault();
|
|
1375
|
+
}
|
|
1376
|
+
},
|
|
1377
|
+
dragEnd() {
|
|
1378
|
+
if (!this.dragging && !this.hold) return;
|
|
1379
|
+
if (this.hold) {
|
|
1380
|
+
const signCheck = sign(this.delta);
|
|
1381
|
+
const results = Math.round(Math.abs(this.delta / this.itemWidth) + 0.15);
|
|
1382
|
+
this.switchTo(this.scrollIndex + signCheck * results);
|
|
1383
|
+
}
|
|
1384
|
+
this.delta = 0;
|
|
1385
|
+
this.dragX = false;
|
|
1386
|
+
window.removeEventListener(this.touch ? "touchmove" : "mousemove", this.dragMove);
|
|
1387
|
+
window.removeEventListener(this.touch ? "touchend" : "mouseup", this.dragEnd);
|
|
1388
|
+
},
|
|
1389
|
+
refresh() {
|
|
1390
|
+
this.$nextTick(() => {
|
|
1391
|
+
this.refresh_++;
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
mounted() {
|
|
1396
|
+
if (typeof window !== "undefined") {
|
|
1397
|
+
if (window.ResizeObserver) {
|
|
1398
|
+
this.observer = new ResizeObserver(this.refresh);
|
|
1399
|
+
this.observer.observe(this.$el);
|
|
1400
|
+
}
|
|
1401
|
+
window.addEventListener("resize", this.resized);
|
|
1402
|
+
document.addEventListener("animationend", this.refresh);
|
|
1403
|
+
document.addEventListener("transitionend", this.refresh);
|
|
1404
|
+
document.addEventListener("transitionstart", this.refresh);
|
|
1405
|
+
this.resized();
|
|
1406
|
+
}
|
|
1407
|
+
if (this.$attrs.config) {
|
|
1408
|
+
throw new Error("The config prop was removed, you need to use v-bind instead");
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
beforeUnmount() {
|
|
1412
|
+
if (typeof window !== "undefined") {
|
|
1413
|
+
if (window.ResizeObserver) {
|
|
1414
|
+
this.observer.disconnect();
|
|
1415
|
+
}
|
|
1416
|
+
window.removeEventListener("resize", this.resized);
|
|
1417
|
+
document.removeEventListener("animationend", this.refresh);
|
|
1418
|
+
document.removeEventListener("transitionend", this.refresh);
|
|
1419
|
+
document.removeEventListener("transitionstart", this.refresh);
|
|
1420
|
+
this.dragEnd();
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
});
|
|
1424
|
+
|
|
1425
|
+
const _hoisted_1 = ["onMouseup", "onTouchend"];
|
|
1426
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1427
|
+
const _component_b_image = vue.resolveComponent("b-image");
|
|
1428
|
+
const _component_b_icon = vue.resolveComponent("b-icon");
|
|
1429
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
1430
|
+
"div",
|
|
1431
|
+
{
|
|
1432
|
+
class: vue.normalizeClass(["carousel-list", { "has-shadow": _ctx.scrollIndex > 0 }]),
|
|
1433
|
+
onMousedown: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.dragStart && _ctx.dragStart(...args), ["prevent"])),
|
|
1434
|
+
onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.dragStart && _ctx.dragStart(...args))
|
|
1435
|
+
},
|
|
1436
|
+
[
|
|
1437
|
+
vue.createElementVNode(
|
|
1438
|
+
"div",
|
|
1439
|
+
{
|
|
1440
|
+
class: vue.normalizeClass(["carousel-slides", _ctx.listClass]),
|
|
1441
|
+
style: vue.normalizeStyle("transform:translateX(" + _ctx.translation + "px)")
|
|
1442
|
+
},
|
|
1443
|
+
[
|
|
1444
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
1445
|
+
vue.Fragment,
|
|
1446
|
+
null,
|
|
1447
|
+
vue.renderList(_ctx.data, (list, index) => {
|
|
1448
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1449
|
+
class: vue.normalizeClass(["carousel-slide", { "is-active": _ctx.asIndicator ? _ctx.activeItem === index : _ctx.scrollIndex === index }]),
|
|
1450
|
+
onMouseup: ($event) => _ctx.checkAsIndicator(index, $event),
|
|
1451
|
+
onTouchend: ($event) => _ctx.checkAsIndicator(index, $event),
|
|
1452
|
+
key: index,
|
|
1453
|
+
style: vue.normalizeStyle(_ctx.itemStyle)
|
|
1454
|
+
}, [
|
|
1455
|
+
vue.renderSlot(_ctx.$slots, "item", vue.mergeProps({
|
|
1456
|
+
index,
|
|
1457
|
+
active: _ctx.activeItem,
|
|
1458
|
+
scroll: _ctx.scrollIndex
|
|
1459
|
+
}, list, { list }), () => [
|
|
1460
|
+
vue.createVNode(_component_b_image, vue.mergeProps({
|
|
1461
|
+
src: list.image
|
|
1462
|
+
}, list), null, 16, ["src"])
|
|
1463
|
+
])
|
|
1464
|
+
], 46, _hoisted_1);
|
|
1465
|
+
}),
|
|
1466
|
+
128
|
|
1467
|
+
/* KEYED_FRAGMENT */
|
|
1468
|
+
))
|
|
1469
|
+
],
|
|
1470
|
+
6
|
|
1471
|
+
/* CLASS, STYLE */
|
|
1472
|
+
),
|
|
1473
|
+
_ctx.arrow ? (vue.openBlock(), vue.createElementBlock(
|
|
1474
|
+
"div",
|
|
1475
|
+
{
|
|
1476
|
+
key: 0,
|
|
1477
|
+
class: vue.normalizeClass(["carousel-arrow", { "is-hovered": _ctx.settings.arrowHover }])
|
|
1478
|
+
},
|
|
1479
|
+
[
|
|
1480
|
+
vue.withDirectives(vue.createVNode(_component_b_icon, {
|
|
1481
|
+
class: "has-icons-left",
|
|
1482
|
+
onClick: vue.withModifiers(_ctx.prev, ["prevent"]),
|
|
1483
|
+
pack: _ctx.settings.iconPack,
|
|
1484
|
+
icon: _ctx.settings.iconPrev,
|
|
1485
|
+
size: _ctx.settings.iconSize,
|
|
1486
|
+
both: ""
|
|
1487
|
+
}, null, 8, ["onClick", "pack", "icon", "size"]), [
|
|
1488
|
+
[vue.vShow, _ctx.hasPrev]
|
|
1489
|
+
]),
|
|
1490
|
+
vue.withDirectives(vue.createVNode(_component_b_icon, {
|
|
1491
|
+
class: "has-icons-right",
|
|
1492
|
+
onClick: vue.withModifiers(_ctx.next, ["prevent"]),
|
|
1493
|
+
pack: _ctx.settings.iconPack,
|
|
1494
|
+
icon: _ctx.settings.iconNext,
|
|
1495
|
+
size: _ctx.settings.iconSize,
|
|
1496
|
+
both: ""
|
|
1497
|
+
}, null, 8, ["onClick", "pack", "icon", "size"]), [
|
|
1498
|
+
[vue.vShow, _ctx.hasNext]
|
|
1499
|
+
])
|
|
1500
|
+
],
|
|
1501
|
+
2
|
|
1502
|
+
/* CLASS */
|
|
1503
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
1504
|
+
],
|
|
1505
|
+
34
|
|
1506
|
+
/* CLASS, NEED_HYDRATION */
|
|
1507
|
+
);
|
|
1508
|
+
}
|
|
1509
|
+
var CarouselList = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
1510
|
+
|
|
1511
|
+
const registerComponent = (Vue, component, name) => {
|
|
1512
|
+
const componentName = component.name;
|
|
1513
|
+
if (componentName == null) {
|
|
1514
|
+
throw new Error("Buefy.registerComponent: missing component name");
|
|
1515
|
+
}
|
|
1516
|
+
Vue.component(componentName, component);
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
const Plugin = {
|
|
1520
|
+
install(Vue) {
|
|
1521
|
+
registerComponent(Vue, Carousel);
|
|
1522
|
+
registerComponent(Vue, CarouselItem);
|
|
1523
|
+
registerComponent(Vue, CarouselList);
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
|
|
1527
|
+
exports.BCarousel = Carousel;
|
|
1528
|
+
exports.BCarouselItem = CarouselItem;
|
|
1529
|
+
exports.BCarouselList = CarouselList;
|
|
1530
|
+
exports.default = Plugin;
|
|
1531
|
+
|
|
1532
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1533
|
+
|
|
1534
|
+
}));
|