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,666 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var CompatFallthroughMixin = require('./CompatFallthroughMixin-hhK0Gkhr.js');
|
|
5
|
+
var FormElementMixin = require('./FormElementMixin-DavX4iOv.js');
|
|
6
|
+
var helpers = require('./helpers.js');
|
|
7
|
+
var config = require('./config-DR826Ki2.js');
|
|
8
|
+
|
|
9
|
+
const AM = "AM";
|
|
10
|
+
const PM = "PM";
|
|
11
|
+
const HOUR_FORMAT_24 = "24";
|
|
12
|
+
const HOUR_FORMAT_12 = "12";
|
|
13
|
+
const defaultTimeFormatter = (date, vm) => {
|
|
14
|
+
return vm.dtf.format(date);
|
|
15
|
+
};
|
|
16
|
+
const defaultTimeParser = (timeString, vm) => {
|
|
17
|
+
if (timeString) {
|
|
18
|
+
let d = null;
|
|
19
|
+
if (vm.computedValue && !isNaN(vm.computedValue.valueOf())) {
|
|
20
|
+
d = new Date(vm.computedValue);
|
|
21
|
+
} else {
|
|
22
|
+
d = vm.timeCreator();
|
|
23
|
+
d.setMilliseconds(0);
|
|
24
|
+
}
|
|
25
|
+
if (vm.dtf.formatToParts && typeof vm.dtf.formatToParts === "function") {
|
|
26
|
+
const formatRegex = vm.dtf.formatToParts(d).map((part) => {
|
|
27
|
+
if (part.type === "literal") {
|
|
28
|
+
return part.value.replace(/ /g, "\\s?");
|
|
29
|
+
} else if (part.type === "dayPeriod") {
|
|
30
|
+
return `((?!=<${part.type}>)(${vm.amString}|${vm.pmString}|${AM}|${PM}|${AM.toLowerCase()}|${PM.toLowerCase()})?)`;
|
|
31
|
+
}
|
|
32
|
+
return `((?!=<${part.type}>)\\d+)`;
|
|
33
|
+
}).join("");
|
|
34
|
+
const timeGroups = helpers.matchWithGroups(formatRegex, timeString);
|
|
35
|
+
timeGroups.hour = timeGroups.hour ? parseInt(timeGroups.hour + "", 10) : null;
|
|
36
|
+
timeGroups.minute = timeGroups.minute ? parseInt(timeGroups.minute + "", 10) : null;
|
|
37
|
+
timeGroups.second = timeGroups.second ? parseInt(timeGroups.second + "", 10) : null;
|
|
38
|
+
if (timeGroups.hour && timeGroups.hour >= 0 && timeGroups.hour < 24 && timeGroups.minute && timeGroups.minute >= 0 && timeGroups.minute < 59) {
|
|
39
|
+
const dayPeriod = timeGroups.dayPeriod;
|
|
40
|
+
if (dayPeriod && (dayPeriod.toLowerCase() === vm.pmString.toLowerCase() || dayPeriod.toLowerCase() === PM.toLowerCase()) && timeGroups.hour < 12) {
|
|
41
|
+
timeGroups.hour += 12;
|
|
42
|
+
}
|
|
43
|
+
d.setHours(timeGroups.hour);
|
|
44
|
+
d.setMinutes(timeGroups.minute);
|
|
45
|
+
d.setSeconds(timeGroups.second || 0);
|
|
46
|
+
return d;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
let am = false;
|
|
50
|
+
if (vm.hourFormat === HOUR_FORMAT_12) {
|
|
51
|
+
const dateString12 = timeString.split(" ");
|
|
52
|
+
timeString = dateString12[0];
|
|
53
|
+
am = dateString12[1] === vm.amString || dateString12[1] === AM;
|
|
54
|
+
}
|
|
55
|
+
const time = timeString.split(":");
|
|
56
|
+
let hours = parseInt(time[0], 10);
|
|
57
|
+
const minutes = parseInt(time[1], 10);
|
|
58
|
+
const seconds = vm.enableSeconds ? parseInt(time[2], 10) : 0;
|
|
59
|
+
if (isNaN(hours) || hours < 0 || hours > 23 || vm.hourFormat === HOUR_FORMAT_12 && (hours < 1 || hours > 12) || isNaN(minutes) || minutes < 0 || minutes > 59) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
d.setSeconds(seconds);
|
|
63
|
+
d.setMinutes(minutes);
|
|
64
|
+
if (vm.hourFormat === HOUR_FORMAT_12) {
|
|
65
|
+
if (am && hours === 12) {
|
|
66
|
+
hours = 0;
|
|
67
|
+
} else if (!am && hours !== 12) {
|
|
68
|
+
hours += 12;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
d.setHours(hours);
|
|
72
|
+
return new Date(d.getTime());
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
};
|
|
76
|
+
var TimepickerMixin = vue.defineComponent({
|
|
77
|
+
mixins: [CompatFallthroughMixin.CompatFallthroughMixin, FormElementMixin.FormElementMixin],
|
|
78
|
+
props: {
|
|
79
|
+
modelValue: [Date, null],
|
|
80
|
+
inline: Boolean,
|
|
81
|
+
minTime: [Date, null],
|
|
82
|
+
maxTime: [Date, null],
|
|
83
|
+
placeholder: String,
|
|
84
|
+
editable: Boolean,
|
|
85
|
+
disabled: Boolean,
|
|
86
|
+
hourFormat: {
|
|
87
|
+
type: String,
|
|
88
|
+
validator: (value) => {
|
|
89
|
+
return value === HOUR_FORMAT_24 || value === HOUR_FORMAT_12;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
incrementHours: {
|
|
93
|
+
type: Number,
|
|
94
|
+
default: 1
|
|
95
|
+
},
|
|
96
|
+
incrementMinutes: {
|
|
97
|
+
type: Number,
|
|
98
|
+
default: 1
|
|
99
|
+
},
|
|
100
|
+
incrementSeconds: {
|
|
101
|
+
type: Number,
|
|
102
|
+
default: 1
|
|
103
|
+
},
|
|
104
|
+
timeFormatter: {
|
|
105
|
+
type: Function,
|
|
106
|
+
default: (date, vm) => {
|
|
107
|
+
if (typeof config.config.defaultTimeFormatter === "function") {
|
|
108
|
+
return config.config.defaultTimeFormatter(date);
|
|
109
|
+
} else {
|
|
110
|
+
return defaultTimeFormatter(date, vm);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
timeParser: {
|
|
115
|
+
type: Function,
|
|
116
|
+
default: (date, vm) => {
|
|
117
|
+
if (typeof config.config.defaultTimeParser === "function") {
|
|
118
|
+
return config.config.defaultTimeParser(date);
|
|
119
|
+
} else {
|
|
120
|
+
return defaultTimeParser(date, vm);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
mobileNative: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: () => config.config.defaultTimepickerMobileNative
|
|
127
|
+
},
|
|
128
|
+
mobileModal: {
|
|
129
|
+
type: Boolean,
|
|
130
|
+
default: () => config.config.defaultTimepickerMobileModal
|
|
131
|
+
},
|
|
132
|
+
timeCreator: {
|
|
133
|
+
type: Function,
|
|
134
|
+
default: () => {
|
|
135
|
+
if (typeof config.config.defaultTimeCreator === "function") {
|
|
136
|
+
return config.config.defaultTimeCreator();
|
|
137
|
+
} else {
|
|
138
|
+
return /* @__PURE__ */ new Date();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
position: String,
|
|
143
|
+
unselectableTimes: Array,
|
|
144
|
+
openOnFocus: Boolean,
|
|
145
|
+
enableSeconds: Boolean,
|
|
146
|
+
defaultMinutes: Number,
|
|
147
|
+
defaultSeconds: Number,
|
|
148
|
+
focusable: {
|
|
149
|
+
type: Boolean,
|
|
150
|
+
default: true
|
|
151
|
+
},
|
|
152
|
+
tzOffset: {
|
|
153
|
+
type: Number,
|
|
154
|
+
default: 0
|
|
155
|
+
},
|
|
156
|
+
appendToBody: Boolean,
|
|
157
|
+
resetOnMeridianChange: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
default: false
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
emits: {
|
|
163
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
164
|
+
"update:modelValue": (_value) => true
|
|
165
|
+
},
|
|
166
|
+
data() {
|
|
167
|
+
return {
|
|
168
|
+
dateSelected: this.modelValue,
|
|
169
|
+
hoursSelected: null,
|
|
170
|
+
minutesSelected: null,
|
|
171
|
+
secondsSelected: null,
|
|
172
|
+
meridienSelected: null,
|
|
173
|
+
_elementRef: "input",
|
|
174
|
+
AM,
|
|
175
|
+
PM,
|
|
176
|
+
HOUR_FORMAT_24,
|
|
177
|
+
HOUR_FORMAT_12
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
computed: {
|
|
181
|
+
computedValue: {
|
|
182
|
+
get() {
|
|
183
|
+
return this.dateSelected;
|
|
184
|
+
},
|
|
185
|
+
set(value) {
|
|
186
|
+
this.dateSelected = value;
|
|
187
|
+
this.$emit("update:modelValue", this.dateSelected);
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
localeOptions() {
|
|
191
|
+
return new Intl.DateTimeFormat(this.locale, {
|
|
192
|
+
hour: "numeric",
|
|
193
|
+
minute: "numeric",
|
|
194
|
+
second: this.enableSeconds ? "numeric" : void 0
|
|
195
|
+
}).resolvedOptions();
|
|
196
|
+
},
|
|
197
|
+
dtf() {
|
|
198
|
+
return new Intl.DateTimeFormat(this.locale, {
|
|
199
|
+
hour: this.localeOptions.hour || "numeric",
|
|
200
|
+
minute: this.localeOptions.minute || "numeric",
|
|
201
|
+
second: this.enableSeconds ? this.localeOptions.second || "numeric" : void 0,
|
|
202
|
+
// Fixes 12 hour display github.com/buefy/buefy/issues/3418
|
|
203
|
+
hourCycle: !this.isHourFormat24 ? "h12" : "h23"
|
|
204
|
+
});
|
|
205
|
+
},
|
|
206
|
+
newHourFormat() {
|
|
207
|
+
return this.hourFormat || (this.localeOptions.hour12 ? HOUR_FORMAT_12 : HOUR_FORMAT_24);
|
|
208
|
+
},
|
|
209
|
+
sampleTime() {
|
|
210
|
+
const d = this.timeCreator();
|
|
211
|
+
d.setHours(10);
|
|
212
|
+
d.setSeconds(0);
|
|
213
|
+
d.setMinutes(0);
|
|
214
|
+
d.setMilliseconds(0);
|
|
215
|
+
return d;
|
|
216
|
+
},
|
|
217
|
+
hourLiteral() {
|
|
218
|
+
if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
|
|
219
|
+
const d = this.sampleTime;
|
|
220
|
+
const parts = this.dtf.formatToParts(d);
|
|
221
|
+
const literal = parts.find((part, idx) => idx > 0 && parts[idx - 1].type === "hour");
|
|
222
|
+
if (literal) {
|
|
223
|
+
return literal.value;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return ":";
|
|
227
|
+
},
|
|
228
|
+
minuteLiteral() {
|
|
229
|
+
if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
|
|
230
|
+
const d = this.sampleTime;
|
|
231
|
+
const parts = this.dtf.formatToParts(d);
|
|
232
|
+
const literal = parts.find((part, idx) => idx > 0 && parts[idx - 1].type === "minute");
|
|
233
|
+
if (literal) {
|
|
234
|
+
return literal.value;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return ":";
|
|
238
|
+
},
|
|
239
|
+
secondLiteral() {
|
|
240
|
+
if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
|
|
241
|
+
const d = this.sampleTime;
|
|
242
|
+
const parts = this.dtf.formatToParts(d);
|
|
243
|
+
const literal = parts.find((part, idx) => idx > 0 && parts[idx - 1].type === "second");
|
|
244
|
+
if (literal) {
|
|
245
|
+
return literal.value;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return void 0;
|
|
249
|
+
},
|
|
250
|
+
amString() {
|
|
251
|
+
if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
|
|
252
|
+
const d = this.sampleTime;
|
|
253
|
+
d.setHours(10);
|
|
254
|
+
const dayPeriod = this.dtf.formatToParts(d).find((part) => part.type === "dayPeriod");
|
|
255
|
+
if (dayPeriod) {
|
|
256
|
+
return dayPeriod.value;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return AM;
|
|
260
|
+
},
|
|
261
|
+
pmString() {
|
|
262
|
+
if (this.dtf.formatToParts && typeof this.dtf.formatToParts === "function") {
|
|
263
|
+
const d = this.sampleTime;
|
|
264
|
+
d.setHours(20);
|
|
265
|
+
const dayPeriod = this.dtf.formatToParts(d).find((part) => part.type === "dayPeriod");
|
|
266
|
+
if (dayPeriod) {
|
|
267
|
+
return dayPeriod.value;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return PM;
|
|
271
|
+
},
|
|
272
|
+
hours() {
|
|
273
|
+
if (!this.incrementHours || this.incrementHours < 1) throw new Error("Hour increment cannot be null or less than 1.");
|
|
274
|
+
const hours = [];
|
|
275
|
+
const numberOfHours = this.isHourFormat24 ? 24 : 12;
|
|
276
|
+
for (let i = 0; i < numberOfHours; i += this.incrementHours) {
|
|
277
|
+
let value = i;
|
|
278
|
+
let label = value;
|
|
279
|
+
if (!this.isHourFormat24) {
|
|
280
|
+
value = i + 1;
|
|
281
|
+
label = value;
|
|
282
|
+
if (this.meridienSelected === this.amString) {
|
|
283
|
+
if (value === 12) {
|
|
284
|
+
value = 0;
|
|
285
|
+
}
|
|
286
|
+
} else if (this.meridienSelected === this.pmString) {
|
|
287
|
+
if (value !== 12) {
|
|
288
|
+
value += 12;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
hours.push({
|
|
293
|
+
label: this.formatNumber(label),
|
|
294
|
+
value
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
return hours;
|
|
298
|
+
},
|
|
299
|
+
minutes() {
|
|
300
|
+
if (!this.incrementMinutes || this.incrementMinutes < 1) throw new Error("Minute increment cannot be null or less than 1.");
|
|
301
|
+
const minutes = [];
|
|
302
|
+
for (let i = 0; i < 60; i += this.incrementMinutes) {
|
|
303
|
+
minutes.push({
|
|
304
|
+
label: this.formatNumber(i, true),
|
|
305
|
+
value: i
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
return minutes;
|
|
309
|
+
},
|
|
310
|
+
seconds() {
|
|
311
|
+
if (!this.incrementSeconds || this.incrementSeconds < 1) throw new Error("Second increment cannot be null or less than 1.");
|
|
312
|
+
const seconds = [];
|
|
313
|
+
for (let i = 0; i < 60; i += this.incrementSeconds) {
|
|
314
|
+
seconds.push({
|
|
315
|
+
label: this.formatNumber(i, true),
|
|
316
|
+
value: i
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
return seconds;
|
|
320
|
+
},
|
|
321
|
+
meridiens() {
|
|
322
|
+
return [this.amString, this.pmString];
|
|
323
|
+
},
|
|
324
|
+
isMobile() {
|
|
325
|
+
return this.mobileNative && helpers.isMobile.any();
|
|
326
|
+
},
|
|
327
|
+
isHourFormat24() {
|
|
328
|
+
return this.newHourFormat === HOUR_FORMAT_24;
|
|
329
|
+
},
|
|
330
|
+
disabledOrUndefined() {
|
|
331
|
+
return this.disabled || void 0;
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
watch: {
|
|
335
|
+
hourFormat() {
|
|
336
|
+
if (this.hoursSelected !== null) {
|
|
337
|
+
this.meridienSelected = this.hoursSelected >= 12 ? this.pmString : this.amString;
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
locale() {
|
|
341
|
+
if (!this.modelValue) {
|
|
342
|
+
this.meridienSelected = this.amString;
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
/*
|
|
346
|
+
* When v-model is changed:
|
|
347
|
+
* 1. Update internal value.
|
|
348
|
+
* 2. If it's invalid, validate again.
|
|
349
|
+
*/
|
|
350
|
+
modelValue: {
|
|
351
|
+
handler(value) {
|
|
352
|
+
this.updateInternalState(value);
|
|
353
|
+
!this.isValid && this.$refs.input.checkHtml5Validity();
|
|
354
|
+
},
|
|
355
|
+
immediate: true
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
methods: {
|
|
359
|
+
onMeridienChange(value) {
|
|
360
|
+
if (this.hoursSelected !== null && this.resetOnMeridianChange) {
|
|
361
|
+
this.hoursSelected = null;
|
|
362
|
+
this.minutesSelected = null;
|
|
363
|
+
this.secondsSelected = null;
|
|
364
|
+
this.computedValue = null;
|
|
365
|
+
} else if (this.hoursSelected !== null) {
|
|
366
|
+
if (value === this.pmString) {
|
|
367
|
+
this.hoursSelected += 12;
|
|
368
|
+
} else if (value === this.amString) {
|
|
369
|
+
this.hoursSelected -= 12;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
this.updateDateSelected(
|
|
373
|
+
this.hoursSelected,
|
|
374
|
+
this.minutesSelected,
|
|
375
|
+
this.enableSeconds ? this.secondsSelected : 0,
|
|
376
|
+
value
|
|
377
|
+
);
|
|
378
|
+
},
|
|
379
|
+
onHoursChange(value) {
|
|
380
|
+
if (!this.minutesSelected && typeof this.defaultMinutes !== "undefined") {
|
|
381
|
+
this.minutesSelected = this.defaultMinutes;
|
|
382
|
+
}
|
|
383
|
+
if (!this.secondsSelected && typeof this.defaultSeconds !== "undefined") {
|
|
384
|
+
this.secondsSelected = this.defaultSeconds;
|
|
385
|
+
}
|
|
386
|
+
this.updateDateSelected(
|
|
387
|
+
parseInt(`${value}`, 10),
|
|
388
|
+
this.minutesSelected,
|
|
389
|
+
this.enableSeconds ? this.secondsSelected : 0,
|
|
390
|
+
this.meridienSelected
|
|
391
|
+
);
|
|
392
|
+
},
|
|
393
|
+
onMinutesChange(value) {
|
|
394
|
+
if (!this.secondsSelected && this.defaultSeconds) {
|
|
395
|
+
this.secondsSelected = this.defaultSeconds;
|
|
396
|
+
}
|
|
397
|
+
this.updateDateSelected(
|
|
398
|
+
this.hoursSelected,
|
|
399
|
+
parseInt(`${value}`, 10),
|
|
400
|
+
this.enableSeconds ? this.secondsSelected : 0,
|
|
401
|
+
this.meridienSelected
|
|
402
|
+
);
|
|
403
|
+
},
|
|
404
|
+
onSecondsChange(value) {
|
|
405
|
+
this.updateDateSelected(
|
|
406
|
+
this.hoursSelected,
|
|
407
|
+
this.minutesSelected,
|
|
408
|
+
parseInt(`${value}`, 10),
|
|
409
|
+
this.meridienSelected
|
|
410
|
+
);
|
|
411
|
+
},
|
|
412
|
+
updateDateSelected(hours, minutes, seconds, meridiens) {
|
|
413
|
+
if (hours != null && minutes != null && (!this.isHourFormat24 && meridiens !== null || this.isHourFormat24)) {
|
|
414
|
+
let time = null;
|
|
415
|
+
if (this.computedValue && !isNaN(this.computedValue.valueOf())) {
|
|
416
|
+
time = new Date(this.computedValue);
|
|
417
|
+
} else {
|
|
418
|
+
time = this.timeCreator();
|
|
419
|
+
time.setMilliseconds(0);
|
|
420
|
+
}
|
|
421
|
+
time.setHours(hours);
|
|
422
|
+
time.setMinutes(minutes);
|
|
423
|
+
time.setSeconds(seconds);
|
|
424
|
+
if (!isNaN(time.getTime())) this.computedValue = new Date(time.getTime());
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
updateInternalState(value) {
|
|
428
|
+
if (value) {
|
|
429
|
+
this.hoursSelected = value.getHours();
|
|
430
|
+
this.minutesSelected = value.getMinutes();
|
|
431
|
+
this.secondsSelected = value.getSeconds();
|
|
432
|
+
this.meridienSelected = value.getHours() >= 12 ? this.pmString : this.amString;
|
|
433
|
+
} else {
|
|
434
|
+
this.hoursSelected = null;
|
|
435
|
+
this.minutesSelected = null;
|
|
436
|
+
this.secondsSelected = null;
|
|
437
|
+
this.meridienSelected = this.amString;
|
|
438
|
+
}
|
|
439
|
+
this.dateSelected = value;
|
|
440
|
+
},
|
|
441
|
+
isHourDisabled(hour) {
|
|
442
|
+
let disabled = false;
|
|
443
|
+
if (this.minTime) {
|
|
444
|
+
const minHours = this.minTime.getHours();
|
|
445
|
+
const noMinutesAvailable = this.minutes.every((minute) => {
|
|
446
|
+
return this.isMinuteDisabledForHour(hour, minute.value);
|
|
447
|
+
});
|
|
448
|
+
disabled = hour < minHours || noMinutesAvailable;
|
|
449
|
+
}
|
|
450
|
+
if (this.maxTime) {
|
|
451
|
+
if (!disabled) {
|
|
452
|
+
const maxHours = this.maxTime.getHours();
|
|
453
|
+
disabled = hour > maxHours;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
if (this.unselectableTimes) {
|
|
457
|
+
if (!disabled) {
|
|
458
|
+
const unselectable = this.unselectableTimes.filter((time) => {
|
|
459
|
+
if (this.enableSeconds && this.secondsSelected !== null) {
|
|
460
|
+
return time.getHours() === hour && time.getMinutes() === this.minutesSelected && time.getSeconds() === this.secondsSelected;
|
|
461
|
+
} else if (this.minutesSelected !== null) {
|
|
462
|
+
return time.getHours() === hour && time.getMinutes() === this.minutesSelected;
|
|
463
|
+
}
|
|
464
|
+
return false;
|
|
465
|
+
});
|
|
466
|
+
if (unselectable.length > 0) {
|
|
467
|
+
disabled = true;
|
|
468
|
+
} else {
|
|
469
|
+
disabled = this.minutes.every((minute) => {
|
|
470
|
+
return this.unselectableTimes.filter((time) => {
|
|
471
|
+
return time.getHours() === hour && time.getMinutes() === minute.value;
|
|
472
|
+
}).length > 0;
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
return disabled;
|
|
478
|
+
},
|
|
479
|
+
isMinuteDisabledForHour(hour, minute) {
|
|
480
|
+
let disabled = false;
|
|
481
|
+
if (this.minTime) {
|
|
482
|
+
const minHours = this.minTime.getHours();
|
|
483
|
+
const minMinutes = this.minTime.getMinutes();
|
|
484
|
+
disabled = hour === minHours && minute < minMinutes;
|
|
485
|
+
}
|
|
486
|
+
if (this.maxTime) {
|
|
487
|
+
if (!disabled) {
|
|
488
|
+
const maxHours = this.maxTime.getHours();
|
|
489
|
+
const maxMinutes = this.maxTime.getMinutes();
|
|
490
|
+
disabled = hour === maxHours && minute > maxMinutes;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
return disabled;
|
|
494
|
+
},
|
|
495
|
+
isMinuteDisabled(minute) {
|
|
496
|
+
let disabled = false;
|
|
497
|
+
if (this.hoursSelected !== null) {
|
|
498
|
+
if (this.isHourDisabled(this.hoursSelected)) {
|
|
499
|
+
disabled = true;
|
|
500
|
+
} else {
|
|
501
|
+
disabled = this.isMinuteDisabledForHour(this.hoursSelected, minute);
|
|
502
|
+
}
|
|
503
|
+
if (this.unselectableTimes) {
|
|
504
|
+
if (!disabled) {
|
|
505
|
+
const unselectable = this.unselectableTimes.filter((time) => {
|
|
506
|
+
if (this.enableSeconds && this.secondsSelected !== null) {
|
|
507
|
+
return time.getHours() === this.hoursSelected && time.getMinutes() === minute && time.getSeconds() === this.secondsSelected;
|
|
508
|
+
} else {
|
|
509
|
+
return time.getHours() === this.hoursSelected && time.getMinutes() === minute;
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
disabled = unselectable.length > 0;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return disabled;
|
|
517
|
+
},
|
|
518
|
+
isSecondDisabled(second) {
|
|
519
|
+
let disabled = false;
|
|
520
|
+
if (this.minutesSelected !== null) {
|
|
521
|
+
if (this.isMinuteDisabled(this.minutesSelected)) {
|
|
522
|
+
disabled = true;
|
|
523
|
+
} else {
|
|
524
|
+
if (this.minTime) {
|
|
525
|
+
const minHours = this.minTime.getHours();
|
|
526
|
+
const minMinutes = this.minTime.getMinutes();
|
|
527
|
+
const minSeconds = this.minTime.getSeconds();
|
|
528
|
+
disabled = this.hoursSelected === minHours && this.minutesSelected === minMinutes && second < minSeconds;
|
|
529
|
+
}
|
|
530
|
+
if (this.maxTime) {
|
|
531
|
+
if (!disabled) {
|
|
532
|
+
const maxHours = this.maxTime.getHours();
|
|
533
|
+
const maxMinutes = this.maxTime.getMinutes();
|
|
534
|
+
const maxSeconds = this.maxTime.getSeconds();
|
|
535
|
+
disabled = this.hoursSelected === maxHours && this.minutesSelected === maxMinutes && second > maxSeconds;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
if (this.unselectableTimes) {
|
|
540
|
+
if (!disabled) {
|
|
541
|
+
const unselectable = this.unselectableTimes.filter((time) => {
|
|
542
|
+
return time.getHours() === this.hoursSelected && time.getMinutes() === this.minutesSelected && time.getSeconds() === second;
|
|
543
|
+
});
|
|
544
|
+
disabled = unselectable.length > 0;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
return disabled;
|
|
549
|
+
},
|
|
550
|
+
/*
|
|
551
|
+
* Parse string into date
|
|
552
|
+
*/
|
|
553
|
+
onChange(value) {
|
|
554
|
+
const date = this.timeParser(value, this);
|
|
555
|
+
this.updateInternalState(date);
|
|
556
|
+
if (date && !isNaN(date.valueOf())) {
|
|
557
|
+
this.computedValue = date;
|
|
558
|
+
} else {
|
|
559
|
+
this.computedValue = null;
|
|
560
|
+
this.$refs.input.newValue = this.computedValue;
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
/*
|
|
564
|
+
* Toggle timepicker
|
|
565
|
+
*/
|
|
566
|
+
toggle(active) {
|
|
567
|
+
if (this.$refs.dropdown) {
|
|
568
|
+
this.$refs.dropdown.isActive = typeof active === "boolean" ? active : !this.$refs.dropdown.isActive;
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
/*
|
|
572
|
+
* Close timepicker
|
|
573
|
+
*/
|
|
574
|
+
close() {
|
|
575
|
+
this.toggle(false);
|
|
576
|
+
},
|
|
577
|
+
/*
|
|
578
|
+
* Call default onFocus method and show timepicker
|
|
579
|
+
*/
|
|
580
|
+
handleOnFocus() {
|
|
581
|
+
this.onFocus();
|
|
582
|
+
if (this.openOnFocus) {
|
|
583
|
+
this.toggle(true);
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
/*
|
|
587
|
+
* Format date into string 'HH-MM-SS'
|
|
588
|
+
*/
|
|
589
|
+
formatHHMMSS(value) {
|
|
590
|
+
const date = new Date(value);
|
|
591
|
+
if (value && !isNaN(date.valueOf())) {
|
|
592
|
+
const hours = date.getHours();
|
|
593
|
+
const minutes = date.getMinutes();
|
|
594
|
+
const seconds = date.getSeconds();
|
|
595
|
+
return this.formatNumber(hours, true) + ":" + this.formatNumber(minutes, true) + ":" + this.formatNumber(seconds, true);
|
|
596
|
+
}
|
|
597
|
+
return "";
|
|
598
|
+
},
|
|
599
|
+
/*
|
|
600
|
+
* Parse time from string
|
|
601
|
+
*/
|
|
602
|
+
onChangeNativePicker(event) {
|
|
603
|
+
const date = event.target.value;
|
|
604
|
+
if (date) {
|
|
605
|
+
let time = null;
|
|
606
|
+
if (this.computedValue && !isNaN(this.computedValue.valueOf())) {
|
|
607
|
+
time = new Date(this.computedValue);
|
|
608
|
+
} else {
|
|
609
|
+
time = /* @__PURE__ */ new Date();
|
|
610
|
+
time.setMilliseconds(0);
|
|
611
|
+
}
|
|
612
|
+
const t = date.split(":");
|
|
613
|
+
time.setHours(parseInt(t[0], 10));
|
|
614
|
+
time.setMinutes(parseInt(t[1], 10));
|
|
615
|
+
time.setSeconds(t[2] ? parseInt(t[2], 10) : 0);
|
|
616
|
+
this.computedValue = new Date(time.getTime());
|
|
617
|
+
} else {
|
|
618
|
+
this.computedValue = null;
|
|
619
|
+
}
|
|
620
|
+
},
|
|
621
|
+
formatNumber(value, prependZero) {
|
|
622
|
+
return this.isHourFormat24 || prependZero ? this.pad(value) : `${value}`;
|
|
623
|
+
},
|
|
624
|
+
pad(value) {
|
|
625
|
+
return (value < 10 ? "0" : "") + value;
|
|
626
|
+
},
|
|
627
|
+
/*
|
|
628
|
+
* Format date into string
|
|
629
|
+
*/
|
|
630
|
+
formatValue(date) {
|
|
631
|
+
if (date && !isNaN(date.valueOf())) {
|
|
632
|
+
return this.timeFormatter(date, this);
|
|
633
|
+
} else {
|
|
634
|
+
return null;
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
/*
|
|
638
|
+
* Keypress event that is bound to the document.
|
|
639
|
+
*/
|
|
640
|
+
keyPress({ key }) {
|
|
641
|
+
if (this.$refs.dropdown && this.$refs.dropdown.isActive && (key === "Escape" || key === "Esc")) {
|
|
642
|
+
this.toggle(false);
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
/*
|
|
646
|
+
* Emit 'blur' event on dropdown is not active (closed)
|
|
647
|
+
*/
|
|
648
|
+
onActiveChange(value) {
|
|
649
|
+
if (!value) {
|
|
650
|
+
this.onBlur();
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
created() {
|
|
655
|
+
if (typeof window !== "undefined") {
|
|
656
|
+
document.addEventListener("keyup", this.keyPress);
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
beforeUnmounted() {
|
|
660
|
+
if (typeof window !== "undefined") {
|
|
661
|
+
document.removeEventListener("keyup", this.keyPress);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
|
|
666
|
+
exports.TimepickerMixin = TimepickerMixin;
|