@privyid/persona 1.2.1 → 1.2.2-dev.1
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/dist/components/accordion/Accordion.vue +111 -0
- package/dist/components/accordion/Accordion.vue.d.ts +80 -0
- package/dist/components/accordion/AccordionItem.vue +224 -0
- package/dist/components/accordion/AccordionItem.vue.d.ts +121 -0
- package/dist/components/accordion/AccordionItems.vue +50 -0
- package/dist/components/accordion/AccordionItems.vue.d.ts +41 -0
- package/dist/components/accordion/index.d.ts +7 -0
- package/dist/components/accordion/index.mjs +3 -0
- package/dist/components/aspect-ratio/index.d.ts +3 -0
- package/dist/components/aspect-ratio/index.mjs +21 -0
- package/dist/components/aspect-ratio/utils/calculate-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/utils/calculate-ratio.mjs +10 -0
- package/dist/components/aspect-ratio/utils/resize-observer.d.ts +1 -0
- package/dist/components/aspect-ratio/utils/resize-observer.mjs +22 -0
- package/dist/components/avatar/Avatar.vue +167 -0
- package/dist/components/avatar/Avatar.vue.d.ts +91 -0
- package/dist/components/avatar/AvatarGroup.vue +39 -0
- package/dist/components/avatar/AvatarGroup.vue.d.ts +40 -0
- package/dist/components/avatar/AvatarTruncate.vue +33 -0
- package/dist/components/avatar/AvatarTruncate.vue.d.ts +31 -0
- package/dist/components/avatar/assets/avatar-old.png +0 -0
- package/dist/components/avatar/assets/avatar.png +0 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.mjs +0 -0
- package/dist/components/avatar/utils/color-hash.d.ts +2 -0
- package/dist/components/avatar/utils/color-hash.mjs +22 -0
- package/dist/components/avatar/utils/create-image.d.ts +5 -0
- package/dist/components/avatar/utils/create-image.mjs +19 -0
- package/dist/components/avatar/utils/load-image.d.ts +1 -0
- package/dist/components/avatar/utils/load-image.mjs +22 -0
- package/dist/components/badge/Badge.vue +210 -0
- package/dist/components/badge/Badge.vue.d.ts +41 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/index.mjs +0 -0
- package/dist/components/banner/Banner.vue +183 -0
- package/dist/components/banner/Banner.vue.d.ts +91 -0
- package/dist/components/banner/index.d.ts +1 -0
- package/dist/components/banner/index.mjs +0 -0
- package/dist/components/breadcrumbs/Breadcrumb.vue +55 -0
- package/dist/components/breadcrumbs/Breadcrumb.vue.d.ts +59 -0
- package/dist/components/breadcrumbs/BreadcrumbItem.vue +83 -0
- package/dist/components/breadcrumbs/BreadcrumbItem.vue.d.ts +40 -0
- package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +73 -0
- package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue.d.ts +38 -0
- package/dist/components/breadcrumbs/index.d.ts +11 -0
- package/dist/components/breadcrumbs/index.mjs +3 -0
- package/dist/components/button/Button.vue +391 -0
- package/dist/components/button/Button.vue.d.ts +108 -0
- package/dist/components/button/index.d.ts +5 -0
- package/dist/components/button/index.mjs +0 -0
- package/dist/components/button-group/ButtonGroup.vue +211 -0
- package/dist/components/button-group/ButtonGroup.vue.d.ts +40 -0
- package/dist/components/button-group/index.d.ts +6 -0
- package/dist/components/button-group/index.mjs +1 -0
- package/dist/components/calendar/Calendar.vue +396 -0
- package/dist/components/calendar/Calendar.vue.d.ts +120 -0
- package/dist/components/calendar/adapter/adapter.d.ts +32 -0
- package/dist/components/calendar/adapter/adapter.mjs +43 -0
- package/dist/components/calendar/adapter/date.d.ts +2 -0
- package/dist/components/calendar/adapter/date.mjs +86 -0
- package/dist/components/calendar/adapter/month.d.ts +2 -0
- package/dist/components/calendar/adapter/month.mjs +66 -0
- package/dist/components/calendar/adapter/year.d.ts +2 -0
- package/dist/components/calendar/adapter/year.mjs +63 -0
- package/dist/components/camera/Camera.vue +356 -0
- package/dist/components/camera/Camera.vue.d.ts +123 -0
- package/dist/components/camera/adapter/adapter.d.ts +41 -0
- package/dist/components/camera/adapter/adapter.mjs +3 -0
- package/dist/components/camera/adapter/capture.d.ts +5 -0
- package/dist/components/camera/adapter/capture.mjs +12 -0
- package/dist/components/camera/adapter/liveness.d.ts +5 -0
- package/dist/components/camera/adapter/liveness.mjs +46 -0
- package/dist/components/camera/adapter/qr-code.d.ts +2 -0
- package/dist/components/camera/adapter/qr-code.mjs +19 -0
- package/dist/components/camera/assets/shutter.wav +0 -0
- package/dist/components/camera/utils/motion.d.ts +29 -0
- package/dist/components/camera/utils/motion.mjs +88 -0
- package/dist/components/camera/utils/take-picture.d.ts +1 -0
- package/dist/components/camera/utils/take-picture.mjs +14 -0
- package/dist/components/caption/Caption.vue +112 -0
- package/dist/components/caption/Caption.vue.d.ts +50 -0
- package/dist/components/caption/index.d.ts +1 -0
- package/dist/components/caption/index.mjs +0 -0
- package/dist/components/card/Card.vue +330 -0
- package/dist/components/card/Card.vue.d.ts +118 -0
- package/dist/components/card/CardSection.vue +69 -0
- package/dist/components/card/CardSection.vue.d.ts +56 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.mjs +0 -0
- package/dist/components/carousel/Carousel.vue +177 -0
- package/dist/components/carousel/Carousel.vue.d.ts +123 -0
- package/dist/components/carousel/CarouselBody.vue +16 -0
- package/dist/components/carousel/CarouselBody.vue.d.ts +17 -0
- package/dist/components/carousel/CarouselItem.vue +10 -0
- package/dist/components/carousel/CarouselItem.vue.d.ts +17 -0
- package/dist/components/carousel/index.d.ts +4 -0
- package/dist/components/carousel/index.mjs +1 -0
- package/dist/components/chart/Chart.vue +129 -0
- package/dist/components/chart/Chart.vue.d.ts +63 -0
- package/dist/components/chart/ChartSet.vue +28 -0
- package/dist/components/chart/ChartSet.vue.d.ts +57 -0
- package/dist/components/chart/ChartVal.vue +32 -0
- package/dist/components/chart/ChartVal.vue.d.ts +67 -0
- package/dist/components/chart/adapter/adapter.d.ts +7 -0
- package/dist/components/chart/adapter/adapter.mjs +3 -0
- package/dist/components/chart/adapter/bubble.d.ts +2 -0
- package/dist/components/chart/adapter/bubble.mjs +26 -0
- package/dist/components/chart/adapter/index.d.ts +3 -0
- package/dist/components/chart/adapter/index.mjs +16 -0
- package/dist/components/chart/adapter/line.d.ts +2 -0
- package/dist/components/chart/adapter/line.mjs +66 -0
- package/dist/components/chart/adapter/pie.d.ts +2 -0
- package/dist/components/chart/adapter/pie.mjs +34 -0
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/chart/index.mjs +0 -0
- package/dist/components/chart/utils/use-chart.d.ts +2 -0
- package/dist/components/chart/utils/use-chart.mjs +9 -0
- package/dist/components/checkbox/Checkbox.vue +213 -0
- package/dist/components/checkbox/Checkbox.vue.d.ts +105 -0
- package/dist/components/checkbox/icon/IconCheckbox.vue +13 -0
- package/dist/components/checkbox/icon/IconCheckbox.vue.d.ts +2 -0
- package/dist/components/checkbox/icon/IconInderteminate.vue +12 -0
- package/dist/components/checkbox/icon/IconInderteminate.vue.d.ts +2 -0
- package/dist/components/checkbox/index.d.ts +7 -0
- package/dist/components/checkbox/index.mjs +34 -0
- package/dist/components/collapse/Collapse.vue +58 -0
- package/dist/components/collapse/Collapse.vue.d.ts +42 -0
- package/dist/components/contextual-bar/ContextualBar.vue +433 -0
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +124 -0
- package/dist/components/contextual-bar/index.d.ts +1 -0
- package/dist/components/contextual-bar/index.mjs +0 -0
- package/dist/components/cropper/Cropper.vue +382 -0
- package/dist/components/cropper/Cropper.vue.d.ts +195 -0
- package/dist/components/cropper/index.d.ts +1 -0
- package/dist/components/cropper/index.mjs +3 -0
- package/dist/components/cropper/utils/crop-image.d.ts +44 -0
- package/dist/components/cropper/utils/crop-image.mjs +43 -0
- package/dist/components/cropper/utils/use-pinch.d.ts +8 -0
- package/dist/components/cropper/utils/use-pinch.mjs +50 -0
- package/dist/components/cropper/utils/use-preview.d.ts +3 -0
- package/dist/components/cropper/utils/use-preview.mjs +21 -0
- package/dist/components/cropper/utils/use-ratio.d.ts +9 -0
- package/dist/components/cropper/utils/use-ratio.mjs +24 -0
- package/dist/components/datepicker/Datepicker.vue +204 -0
- package/dist/components/datepicker/Datepicker.vue.d.ts +181 -0
- package/dist/components/dialog/Dialog.vue +130 -0
- package/dist/components/dialog/Dialog.vue.d.ts +8 -0
- package/dist/components/dialog/DialogFooter.vue +121 -0
- package/dist/components/dialog/DialogFooter.vue.d.ts +132 -0
- package/dist/components/dialog/index.d.ts +52 -0
- package/dist/components/dialog/index.mjs +86 -0
- package/dist/components/divider/Divider.vue +61 -0
- package/dist/components/divider/Divider.vue.d.ts +14 -0
- package/dist/components/dot/Dot.vue +95 -0
- package/dist/components/dot/Dot.vue.d.ts +26 -0
- package/dist/components/dot/index.d.ts +1 -0
- package/dist/components/dot/index.mjs +0 -0
- package/dist/components/dropdown/Dropdown.vue +381 -0
- package/dist/components/dropdown/Dropdown.vue.d.ts +301 -0
- package/dist/components/dropdown/DropdownHeader.vue +33 -0
- package/dist/components/dropdown/DropdownHeader.vue.d.ts +18 -0
- package/dist/components/dropdown/DropdownItem.vue +87 -0
- package/dist/components/dropdown/DropdownItem.vue.d.ts +62 -0
- package/dist/components/dropdown/DropdownText.vue +34 -0
- package/dist/components/dropdown/DropdownText.vue.d.ts +17 -0
- package/dist/components/dropdown/index.d.ts +10 -0
- package/dist/components/dropdown/index.mjs +1 -0
- package/dist/components/dropdown/utils/use-focus.d.ts +5 -0
- package/dist/components/dropdown/utils/use-focus.mjs +22 -0
- package/dist/components/dropdown-subitem/DropdownSubitem.vue +153 -0
- package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +58 -0
- package/dist/components/dropdown-subitem/index.d.ts +12 -0
- package/dist/components/dropdown-subitem/index.mjs +1 -0
- package/dist/components/dropzone/Dropzone.vue +205 -0
- package/dist/components/dropzone/Dropzone.vue.d.ts +139 -0
- package/dist/components/dropzone/index.d.ts +4 -0
- package/dist/components/dropzone/index.mjs +0 -0
- package/dist/components/dropzone/utils/accept.d.ts +1 -0
- package/dist/components/dropzone/utils/accept.mjs +17 -0
- package/dist/components/filterbar/Filterbar.vue +103 -0
- package/dist/components/filterbar/Filterbar.vue.d.ts +2495 -0
- package/dist/components/filterbar/index.d.ts +45 -0
- package/dist/components/filterbar/index.mjs +7 -0
- package/dist/components/filterbar/pinned/PinnedDate.vue +100 -0
- package/dist/components/filterbar/pinned/PinnedDate.vue.d.ts +508 -0
- package/dist/components/filterbar/pinned/PinnedMultiselect.vue +113 -0
- package/dist/components/filterbar/pinned/PinnedMultiselect.vue.d.ts +675 -0
- package/dist/components/filterbar/pinned/PinnedSelect.vue +100 -0
- package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +607 -0
- package/dist/components/filterbar/pinned/PinnedToggle.vue +77 -0
- package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +220 -0
- package/dist/components/form-group/FormGroup.vue +155 -0
- package/dist/components/form-group/FormGroup.vue.d.ts +105 -0
- package/dist/components/global/router.d.ts +24 -0
- package/dist/components/global/router.mjs +7 -0
- package/dist/components/global/store.d.ts +49 -0
- package/dist/components/global/store.mjs +52 -0
- package/dist/components/global/types.d.ts +4 -0
- package/dist/components/global/types.mjs +0 -0
- package/dist/components/global/use-singleton.d.ts +21 -0
- package/dist/components/global/use-singleton.mjs +60 -0
- package/dist/components/global/utils/queue.d.ts +16 -0
- package/dist/components/global/utils/queue.mjs +35 -0
- package/dist/components/heading/Heading.vue +128 -0
- package/dist/components/heading/Heading.vue.d.ts +49 -0
- package/dist/components/heading/index.d.ts +3 -0
- package/dist/components/heading/index.mjs +0 -0
- package/dist/components/input/Input.vue +215 -0
- package/dist/components/input/Input.vue.d.ts +111 -0
- package/dist/components/input/index.d.ts +6 -0
- package/dist/components/input/index.mjs +25 -0
- package/dist/components/input/utils/accept.d.ts +26 -0
- package/dist/components/input/utils/accept.mjs +81 -0
- package/dist/components/input-color/index.d.ts +1 -0
- package/dist/components/input-color/index.mjs +0 -0
- package/dist/components/input-color/inputColor.vue +245 -0
- package/dist/components/input-color/inputColor.vue.d.ts +88 -0
- package/dist/components/input-file/InputFile.vue +195 -0
- package/dist/components/input-file/InputFile.vue.d.ts +755 -0
- package/dist/components/input-group/InputGroup.vue +177 -0
- package/dist/components/input-group/InputGroup.vue.d.ts +58 -0
- package/dist/components/input-group/InputGroupAddon.vue +42 -0
- package/dist/components/input-group/InputGroupAddon.vue.d.ts +17 -0
- package/dist/components/input-group/index.d.ts +6 -0
- package/dist/components/input-group/index.mjs +1 -0
- package/dist/components/input-password/InputPassword.vue +100 -0
- package/dist/components/input-password/InputPassword.vue.d.ts +86 -0
- package/dist/components/input-password/index.d.ts +2 -0
- package/dist/components/input-password/index.mjs +17 -0
- package/dist/components/input-pin/InputPin.vue +142 -0
- package/dist/components/input-pin/InputPin.vue.d.ts +77 -0
- package/dist/components/input-pin/index.d.ts +6 -0
- package/dist/components/input-pin/index.mjs +3 -0
- package/dist/components/input-range/InputRange.vue +253 -0
- package/dist/components/input-range/InputRange.vue.d.ts +106 -0
- package/dist/components/input-range/utils/use-drag.d.ts +3 -0
- package/dist/components/input-range/utils/use-drag.mjs +26 -0
- package/dist/components/label/Label.vue +249 -0
- package/dist/components/label/Label.vue.d.ts +63 -0
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/label/index.mjs +0 -0
- package/dist/components/list-group/ListGroup.vue +73 -0
- package/dist/components/list-group/ListGroup.vue.d.ts +56 -0
- package/dist/components/list-group/ListGroupItem.vue +79 -0
- package/dist/components/list-group/ListGroupItem.vue.d.ts +49 -0
- package/dist/components/list-group/index.d.ts +1 -0
- package/dist/components/list-group/index.mjs +0 -0
- package/dist/components/main/Main.vue +66 -0
- package/dist/components/main/Main.vue.d.ts +17 -0
- package/dist/components/markdown/index.d.ts +29 -0
- package/dist/components/markdown/index.mjs +25 -0
- package/dist/components/meta.json +171 -0
- package/dist/components/modal/Modal.vue +514 -0
- package/dist/components/modal/Modal.vue.d.ts +196 -0
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/index.mjs +0 -0
- package/dist/components/nav/Nav.vue +403 -0
- package/dist/components/nav/Nav.vue.d.ts +104 -0
- package/dist/components/nav/NavCollapse.vue +60 -0
- package/dist/components/nav/NavCollapse.vue.d.ts +164 -0
- package/dist/components/nav/NavForm.vue +23 -0
- package/dist/components/nav/NavForm.vue.d.ts +17 -0
- package/dist/components/nav/NavItem.vue +165 -0
- package/dist/components/nav/NavItem.vue.d.ts +80 -0
- package/dist/components/nav/NavItemDropdown.vue +104 -0
- package/dist/components/nav/NavItemDropdown.vue.d.ts +122 -0
- package/dist/components/nav/NavSubItem.vue +178 -0
- package/dist/components/nav/NavSubItem.vue.d.ts +45 -0
- package/dist/components/nav/NavText.vue +19 -0
- package/dist/components/nav/NavText.vue.d.ts +17 -0
- package/dist/components/nav/index.d.ts +2 -0
- package/dist/components/nav/index.mjs +0 -0
- package/dist/components/navbar/Navbar.vue +270 -0
- package/dist/components/navbar/Navbar.vue.d.ts +70 -0
- package/dist/components/navbar/NavbarBrand.vue +30 -0
- package/dist/components/navbar/NavbarBrand.vue.d.ts +29 -0
- package/dist/components/navbar/NavbarNav.vue +110 -0
- package/dist/components/navbar/NavbarNav.vue.d.ts +31 -0
- package/dist/components/navbar/NavbarToggle.vue +67 -0
- package/dist/components/navbar/NavbarToggle.vue.d.ts +19 -0
- package/dist/components/navbar/index.d.ts +9 -0
- package/dist/components/navbar/index.mjs +1 -0
- package/dist/components/navbar-menu/NavbarNavMenu.vue +56 -0
- package/dist/components/navbar-menu/NavbarNavMenu.vue.d.ts +16 -0
- package/dist/components/notify/Notify.vue +36 -0
- package/dist/components/notify/Notify.vue.d.ts +6 -0
- package/dist/components/notify/NotifyGroup.vue +214 -0
- package/dist/components/notify/NotifyGroup.vue.d.ts +34 -0
- package/dist/components/notify/NotifyItem.vue +33 -0
- package/dist/components/notify/NotifyItem.vue.d.ts +22 -0
- package/dist/components/notify/index.d.ts +20 -0
- package/dist/components/notify/index.mjs +18 -0
- package/dist/components/overlay/Overlay.vue +63 -0
- package/dist/components/overlay/Overlay.vue.d.ts +19 -0
- package/dist/components/overlay/assets/icon-white.svg +1 -0
- package/dist/components/overlay/index.d.ts +2 -0
- package/dist/components/overlay/index.mjs +8 -0
- package/dist/components/overlay/utils/use-loading.d.ts +4 -0
- package/dist/components/overlay/utils/use-loading.mjs +28 -0
- package/dist/components/page/Page.vue +93 -0
- package/dist/components/page/Page.vue.d.ts +54 -0
- package/dist/components/pagination/Pagination.vue +373 -0
- package/dist/components/pagination/Pagination.vue.d.ts +261 -0
- package/dist/components/pagination/index.d.ts +14 -0
- package/dist/components/pagination/index.mjs +38 -0
- package/dist/components/pagination/utils/calculate-page.d.ts +11 -0
- package/dist/components/pagination/utils/calculate-page.mjs +48 -0
- package/dist/components/pdf-helipad/PdfHelipad.vue +129 -0
- package/dist/components/pdf-helipad/PdfHelipad.vue.d.ts +68 -0
- package/dist/components/pdf-helipad/index.d.ts +7 -0
- package/dist/components/pdf-helipad/index.mjs +0 -0
- package/dist/components/pdf-helipad/utils/use-drag.d.ts +3 -0
- package/dist/components/pdf-helipad/utils/use-drag.mjs +38 -0
- package/dist/components/pdf-object/PdfObject.vue +304 -0
- package/dist/components/pdf-object/PdfObject.vue.d.ts +151 -0
- package/dist/components/pdf-object/PdfObjectAddon.vue +49 -0
- package/dist/components/pdf-object/PdfObjectAddon.vue.d.ts +31 -0
- package/dist/components/pdf-object/PdfObjectDebugger.vue +66 -0
- package/dist/components/pdf-object/PdfObjectDebugger.vue.d.ts +2 -0
- package/dist/components/pdf-object/PdfObjects.vue +35 -0
- package/dist/components/pdf-object/PdfObjects.vue.d.ts +31 -0
- package/dist/components/pdf-object/index.d.ts +63 -0
- package/dist/components/pdf-object/index.mjs +110 -0
- package/dist/components/pdf-object/utils/overlap.d.ts +51 -0
- package/dist/components/pdf-object/utils/overlap.mjs +54 -0
- package/dist/components/pdf-object/utils/position.d.ts +64 -0
- package/dist/components/pdf-object/utils/position.mjs +48 -0
- package/dist/components/pdf-object/utils/use-drag.d.ts +9 -0
- package/dist/components/pdf-object/utils/use-drag.mjs +69 -0
- package/dist/components/pdf-object/utils/use-drop.d.ts +7 -0
- package/dist/components/pdf-object/utils/use-drop.mjs +57 -0
- package/dist/components/pdf-object/utils/use-resize.d.ts +17 -0
- package/dist/components/pdf-object/utils/use-resize.mjs +90 -0
- package/dist/components/pdf-object/utils/use-selector.d.ts +4 -0
- package/dist/components/pdf-object/utils/use-selector.mjs +26 -0
- package/dist/components/pdf-text/PdfText.vue +125 -0
- package/dist/components/pdf-text/PdfText.vue.d.ts +170 -0
- package/dist/components/pdf-text/utils/text-to-image.d.ts +68 -0
- package/dist/components/pdf-text/utils/text-to-image.mjs +120 -0
- package/dist/components/pdf-viewer/PdfError.vue +70 -0
- package/dist/components/pdf-viewer/PdfError.vue.d.ts +24 -0
- package/dist/components/pdf-viewer/PdfLoading.vue +24 -0
- package/dist/components/pdf-viewer/PdfLoading.vue.d.ts +2 -0
- package/dist/components/pdf-viewer/PdfNavigation.vue +165 -0
- package/dist/components/pdf-viewer/PdfNavigation.vue.d.ts +49 -0
- package/dist/components/pdf-viewer/PdfViewer.vue +319 -0
- package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +187 -0
- package/dist/components/pdf-viewer/assets/pdf-loading.svg +1 -0
- package/dist/components/pdf-viewer/index.d.ts +25 -0
- package/dist/components/pdf-viewer/index.mjs +24 -0
- package/dist/components/pdf-viewer/utils/pdfjs.d.ts +69 -0
- package/dist/components/pdf-viewer/utils/pdfjs.mjs +76 -0
- package/dist/components/pdf-viewer/utils/use-idle.d.ts +2 -0
- package/dist/components/pdf-viewer/utils/use-idle.mjs +25 -0
- package/dist/components/pdf-viewer/utils/use-sticky.d.ts +6 -0
- package/dist/components/pdf-viewer/utils/use-sticky.mjs +49 -0
- package/dist/components/pdf-viewer/utils/use-viewer.d.ts +27 -0
- package/dist/components/pdf-viewer/utils/use-viewer.mjs +193 -0
- package/dist/components/popover/Popover.vue +109 -0
- package/dist/components/popover/Popover.vue.d.ts +209 -0
- package/dist/components/popover/index.d.ts +17 -0
- package/dist/components/popover/index.mjs +52 -0
- package/dist/components/popup/Popup.vue +412 -0
- package/dist/components/popup/Popup.vue.d.ts +112 -0
- package/dist/components/popup/index.d.ts +39 -0
- package/dist/components/popup/index.mjs +31 -0
- package/dist/components/progress/Progress.vue +198 -0
- package/dist/components/progress/Progress.vue.d.ts +53 -0
- package/dist/components/progress/ProgressItem.vue +46 -0
- package/dist/components/progress/ProgressItem.vue.d.ts +43 -0
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/index.mjs +0 -0
- package/dist/components/progress-indicator/ProgressIndicator.vue +114 -0
- package/dist/components/progress-indicator/ProgressIndicator.vue.d.ts +40 -0
- package/dist/components/progressbar/Progressbar.vue +105 -0
- package/dist/components/progressbar/Progressbar.vue.d.ts +59 -0
- package/dist/components/progressbar/index.d.ts +7 -0
- package/dist/components/progressbar/index.mjs +11 -0
- package/dist/components/pspdfkit/PspdfHelipad.vue +142 -0
- package/dist/components/pspdfkit/PspdfHelipad.vue.d.ts +68 -0
- package/dist/components/pspdfkit/PspdfObject.vue +291 -0
- package/dist/components/pspdfkit/PspdfObject.vue.d.ts +151 -0
- package/dist/components/pspdfkit/PspdfObjectAddon.vue +24 -0
- package/dist/components/pspdfkit/PspdfObjectAddon.vue.d.ts +31 -0
- package/dist/components/pspdfkit/PspdfObjects.vue +27 -0
- package/dist/components/pspdfkit/PspdfObjects.vue.d.ts +19 -0
- package/dist/components/pspdfkit/PspdfViewer.vue +223 -0
- package/dist/components/pspdfkit/PspdfViewer.vue.d.ts +142 -0
- package/dist/components/pspdfkit/css/custom.css +1 -0
- package/dist/components/pspdfkit/index.d.ts +8 -0
- package/dist/components/pspdfkit/index.mjs +7 -0
- package/dist/components/pspdfkit/utils/position.d.ts +1 -0
- package/dist/components/pspdfkit/utils/position.mjs +5 -0
- package/dist/components/pspdfkit/utils/pspdfkit.d.ts +17 -0
- package/dist/components/pspdfkit/utils/pspdfkit.mjs +53 -0
- package/dist/components/pspdfkit/utils/use-drop.d.ts +2 -0
- package/dist/components/pspdfkit/utils/use-drop.mjs +41 -0
- package/dist/components/pspdfkit/utils/use-viewer.d.ts +17 -0
- package/dist/components/pspdfkit/utils/use-viewer.mjs +167 -0
- package/dist/components/qrcode/Qrcode.vue +150 -0
- package/dist/components/qrcode/Qrcode.vue.d.ts +145 -0
- package/dist/components/qrcode/index.d.ts +1 -0
- package/dist/components/qrcode/index.mjs +0 -0
- package/dist/components/radio/Radio.vue +285 -0
- package/dist/components/radio/Radio.vue.d.ts +97 -0
- package/dist/components/radio/index.d.ts +7 -0
- package/dist/components/radio/index.mjs +16 -0
- package/dist/components/richtext/Richtext.vue +271 -0
- package/dist/components/richtext/Richtext.vue.d.ts +78 -0
- package/dist/components/richtext/RichtextToolbarAdvance.vue +37 -0
- package/dist/components/richtext/RichtextToolbarAdvance.vue.d.ts +2 -0
- package/dist/components/richtext/RichtextToolbarSimple.vue +146 -0
- package/dist/components/richtext/RichtextToolbarSimple.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlFontFamily.vue +52 -0
- package/dist/components/richtext/control/RichtextControlFontFamily.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlFontSize.vue +74 -0
- package/dist/components/richtext/control/RichtextControlFontSize.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlHighlight.vue +127 -0
- package/dist/components/richtext/control/RichtextControlHighlight.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlHistory.vue +26 -0
- package/dist/components/richtext/control/RichtextControlHistory.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlImage.vue +32 -0
- package/dist/components/richtext/control/RichtextControlImage.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlLink.vue +44 -0
- package/dist/components/richtext/control/RichtextControlLink.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlList.vue +43 -0
- package/dist/components/richtext/control/RichtextControlList.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlTable.vue +90 -0
- package/dist/components/richtext/control/RichtextControlTable.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlTextAlign.vue +78 -0
- package/dist/components/richtext/control/RichtextControlTextAlign.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlTextFormat.vue +48 -0
- package/dist/components/richtext/control/RichtextControlTextFormat.vue.d.ts +2 -0
- package/dist/components/richtext/control/RichtextControlTextHeading.vue +93 -0
- package/dist/components/richtext/control/RichtextControlTextHeading.vue.d.ts +2 -0
- package/dist/components/richtext/index.d.ts +7 -0
- package/dist/components/richtext/index.mjs +7 -0
- package/dist/components/richtext/popup/RichtextPopupImageEdit.vue +64 -0
- package/dist/components/richtext/popup/RichtextPopupImageEdit.vue.d.ts +2 -0
- package/dist/components/richtext/popup/RichtextPopupLinkDetail.vue +79 -0
- package/dist/components/richtext/popup/RichtextPopupLinkDetail.vue.d.ts +2 -0
- package/dist/components/richtext/popup/RichtextPopupLinkEdit.vue +64 -0
- package/dist/components/richtext/popup/RichtextPopupLinkEdit.vue.d.ts +22 -0
- package/dist/components/richtext/tiptap/image-align.d.ts +43 -0
- package/dist/components/richtext/tiptap/image-align.mjs +60 -0
- package/dist/components/ringbar/Ringbar.vue +148 -0
- package/dist/components/ringbar/Ringbar.vue.d.ts +62 -0
- package/dist/components/ringbar/index.d.ts +1 -0
- package/dist/components/ringbar/index.mjs +0 -0
- package/dist/components/select/Select.vue +499 -0
- package/dist/components/select/Select.vue.d.ts +753 -0
- package/dist/components/select/SelectInput.vue +101 -0
- package/dist/components/select/SelectInput.vue.d.ts +71 -0
- package/dist/components/select/SelectTags.vue +53 -0
- package/dist/components/select/SelectTags.vue.d.ts +34 -0
- package/dist/components/select/adapter/adapter.d.ts +17 -0
- package/dist/components/select/adapter/adapter.mjs +20 -0
- package/dist/components/select/adapter/async-adapter.d.ts +17 -0
- package/dist/components/select/adapter/async-adapter.mjs +61 -0
- package/dist/components/select/adapter/basic-adapter.d.ts +5 -0
- package/dist/components/select/adapter/basic-adapter.mjs +13 -0
- package/dist/components/select/adapter/fuzzy-adapter.d.ts +2 -0
- package/dist/components/select/adapter/fuzzy-adapter.mjs +24 -0
- package/dist/components/select/index.d.ts +15 -0
- package/dist/components/select/index.mjs +20 -0
- package/dist/components/select/utils/use-on-scroll.d.ts +2 -0
- package/dist/components/select/utils/use-on-scroll.mjs +9 -0
- package/dist/components/select/utils/use-on-typing.d.ts +3 -0
- package/dist/components/select/utils/use-on-typing.mjs +8 -0
- package/dist/components/sheet/Sheet.vue +210 -0
- package/dist/components/sheet/Sheet.vue.d.ts +79 -0
- package/dist/components/shimmer/Shimmer.vue +121 -0
- package/dist/components/shimmer/Shimmer.vue.d.ts +47 -0
- package/dist/components/shimmer/index.d.ts +2 -0
- package/dist/components/shimmer/index.mjs +10 -0
- package/dist/components/sidebar/Sidebar.vue +225 -0
- package/dist/components/sidebar/Sidebar.vue.d.ts +99 -0
- package/dist/components/sidebar/SidebarBrand.vue +101 -0
- package/dist/components/sidebar/SidebarBrand.vue.d.ts +52 -0
- package/dist/components/sidebar/SidebarContent.vue +21 -0
- package/dist/components/sidebar/SidebarContent.vue.d.ts +16 -0
- package/dist/components/sidebar/SidebarNav.vue +254 -0
- package/dist/components/sidebar/SidebarNav.vue.d.ts +77 -0
- package/dist/components/sidebar/index.d.ts +9 -0
- package/dist/components/sidebar/index.mjs +1 -0
- package/dist/components/sidebar-menu/SidebarMenu.vue +112 -0
- package/dist/components/sidebar-menu/SidebarMenu.vue.d.ts +112 -0
- package/dist/components/sidebar-menu/SidebarMenuItem.vue +67 -0
- package/dist/components/sidebar-menu/SidebarMenuItem.vue.d.ts +25 -0
- package/dist/components/sidebar-menu/index.d.ts +138 -0
- package/dist/components/sidebar-menu/index.mjs +44 -0
- package/dist/components/signature-draw/SignatureDraw.vue +91 -0
- package/dist/components/signature-draw/SignatureDraw.vue.d.ts +98 -0
- package/dist/components/signature-draw/SignatureDrawDesktop.vue +148 -0
- package/dist/components/signature-draw/SignatureDrawDesktop.vue.d.ts +76 -0
- package/dist/components/signature-draw/SignatureDrawMobile.vue +212 -0
- package/dist/components/signature-draw/SignatureDrawMobile.vue.d.ts +94 -0
- package/dist/components/signature-draw/utils/canvas.d.ts +41 -0
- package/dist/components/signature-draw/utils/canvas.mjs +55 -0
- package/dist/components/signature-draw/utils/image.d.ts +7 -0
- package/dist/components/signature-draw/utils/image.mjs +23 -0
- package/dist/components/signature-draw/utils/smooth-line.d.ts +36 -0
- package/dist/components/signature-draw/utils/smooth-line.mjs +56 -0
- package/dist/components/signature-draw/utils/straight-line.d.ts +8 -0
- package/dist/components/signature-draw/utils/straight-line.mjs +24 -0
- package/dist/components/signature-draw/utils/use-draw.d.ts +7 -0
- package/dist/components/signature-draw/utils/use-draw.mjs +29 -0
- package/dist/components/signature-text/SignatureText.vue +114 -0
- package/dist/components/signature-text/SignatureText.vue.d.ts +98 -0
- package/dist/components/signature-text/utils/formatter.d.ts +2 -0
- package/dist/components/signature-text/utils/formatter.mjs +8 -0
- package/dist/components/signature-text/utils/generate-text.d.ts +8 -0
- package/dist/components/signature-text/utils/generate-text.mjs +28 -0
- package/dist/components/signature-text/utils/load-font.d.ts +1 -0
- package/dist/components/signature-text/utils/load-font.mjs +22 -0
- package/dist/components/spinner/Spinner.vue +156 -0
- package/dist/components/spinner/Spinner.vue.d.ts +2 -0
- package/dist/components/spinner/SpinnerRing.vue +34 -0
- package/dist/components/spinner/SpinnerRing.vue.d.ts +2 -0
- package/dist/components/spinner/SpinnerRinggo.vue +61 -0
- package/dist/components/spinner/SpinnerRinggo.vue.d.ts +2 -0
- package/dist/components/spread/Spread.vue +52 -0
- package/dist/components/spread/Spread.vue.d.ts +29 -0
- package/dist/components/steps/Step.vue +42 -0
- package/dist/components/steps/Step.vue.d.ts +48 -0
- package/dist/components/steps/StepSlider.vue +37 -0
- package/dist/components/steps/StepSlider.vue.d.ts +34 -0
- package/dist/components/steps/Steps.vue +116 -0
- package/dist/components/steps/Steps.vue.d.ts +100 -0
- package/dist/components/steps/index.d.ts +30 -0
- package/dist/components/steps/index.mjs +53 -0
- package/dist/components/steps/utils/hook.d.ts +10 -0
- package/dist/components/steps/utils/hook.mjs +35 -0
- package/dist/components/strengthbar/Strengthbar.vue +90 -0
- package/dist/components/strengthbar/Strengthbar.vue.d.ts +41 -0
- package/dist/components/subheading/Subheading.vue +137 -0
- package/dist/components/subheading/Subheading.vue.d.ts +59 -0
- package/dist/components/subheading/index.d.ts +1 -0
- package/dist/components/subheading/index.mjs +0 -0
- package/dist/components/table/Table.vue +391 -0
- package/dist/components/table/Table.vue.d.ts +337 -0
- package/dist/components/table/index.d.ts +49 -0
- package/dist/components/table/index.mjs +37 -0
- package/dist/components/table-flex/TableFlex.vue +309 -0
- package/dist/components/table-flex/TableFlex.vue.d.ts +77 -0
- package/dist/components/table-static/TableStatic.vue +406 -0
- package/dist/components/table-static/TableStatic.vue.d.ts +90 -0
- package/dist/components/table-static/TableStaticRoot.vue +39 -0
- package/dist/components/table-static/TableStaticRoot.vue.d.ts +40 -0
- package/dist/components/table-static/TableStaticSort.vue +22 -0
- package/dist/components/table-static/TableStaticSort.vue.d.ts +14 -0
- package/dist/components/table-static/index.d.ts +64 -0
- package/dist/components/table-static/index.mjs +24 -0
- package/dist/components/tabs/Tab.vue +26 -0
- package/dist/components/tabs/Tab.vue.d.ts +45 -0
- package/dist/components/tabs/TabContent.vue +53 -0
- package/dist/components/tabs/TabContent.vue.d.ts +33 -0
- package/dist/components/tabs/Tabs.vue +209 -0
- package/dist/components/tabs/Tabs.vue.d.ts +96 -0
- package/dist/components/text/Text.vue +220 -0
- package/dist/components/text/Text.vue.d.ts +69 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/text/index.mjs +0 -0
- package/dist/components/textarea/Textarea.vue +162 -0
- package/dist/components/textarea/Textarea.vue.d.ts +112 -0
- package/dist/components/time/Time.vue +222 -0
- package/dist/components/time/Time.vue.d.ts +104 -0
- package/dist/components/time/TimeItem.vue +96 -0
- package/dist/components/time/TimeItem.vue.d.ts +61 -0
- package/dist/components/time/index.d.ts +19 -0
- package/dist/components/time/index.mjs +53 -0
- package/dist/components/time/utils/index.d.ts +9 -0
- package/dist/components/time/utils/index.mjs +82 -0
- package/dist/components/timepicker/Timepicker.vue +204 -0
- package/dist/components/timepicker/Timepicker.vue.d.ts +182 -0
- package/dist/components/toast/Toast.vue +247 -0
- package/dist/components/toast/Toast.vue.d.ts +118 -0
- package/dist/components/toast/index.d.ts +50 -0
- package/dist/components/toast/index.mjs +44 -0
- package/dist/components/toggle/Toggle.vue +216 -0
- package/dist/components/toggle/Toggle.vue.d.ts +145 -0
- package/dist/components/tooltip/Tooltip.vue +154 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +68 -0
- package/dist/components/tooltip/TooltipContainer.vue +74 -0
- package/dist/components/tooltip/TooltipContainer.vue.d.ts +16 -0
- package/dist/components/tooltip/index.d.ts +17 -0
- package/dist/components/tooltip/index.mjs +113 -0
- package/dist/components/tooltip/utils/create-handler.d.ts +9 -0
- package/dist/components/tooltip/utils/create-handler.mjs +16 -0
- package/dist/components/tooltip/utils/on-hover.d.ts +23 -0
- package/dist/components/tooltip/utils/on-hover.mjs +42 -0
- package/dist/components/tooltip/utils/parse-bindings.d.ts +23 -0
- package/dist/components/tooltip/utils/parse-bindings.mjs +47 -0
- package/dist/components/tour/Tour.vue +99 -0
- package/dist/components/tour/Tour.vue.d.ts +9 -0
- package/dist/components/tour/TourDialog.vue +201 -0
- package/dist/components/tour/TourDialog.vue.d.ts +112 -0
- package/dist/components/tour/TourHighlight.vue +51 -0
- package/dist/components/tour/TourHighlight.vue.d.ts +15 -0
- package/dist/components/tour/core/base.d.ts +59 -0
- package/dist/components/tour/core/base.mjs +69 -0
- package/dist/components/tour/core/step/action.d.ts +15 -0
- package/dist/components/tour/core/step/action.mjs +14 -0
- package/dist/components/tour/core/step/conditional.d.ts +25 -0
- package/dist/components/tour/core/step/conditional.mjs +57 -0
- package/dist/components/tour/core/step/delay.d.ts +8 -0
- package/dist/components/tour/core/step/delay.mjs +9 -0
- package/dist/components/tour/core/step/dialog.d.ts +11 -0
- package/dist/components/tour/core/step/dialog.mjs +25 -0
- package/dist/components/tour/core/step/visit.d.ts +9 -0
- package/dist/components/tour/core/step/visit.mjs +15 -0
- package/dist/components/tour/core/step.d.ts +37 -0
- package/dist/components/tour/core/step.mjs +46 -0
- package/dist/components/tour/core/story.d.ts +130 -0
- package/dist/components/tour/core/story.mjs +166 -0
- package/dist/components/tour/core/tour.d.ts +126 -0
- package/dist/components/tour/core/tour.mjs +196 -0
- package/dist/components/tour/index.d.ts +3 -0
- package/dist/components/tour/index.mjs +4 -0
- package/dist/components/tour/utils/focus.d.ts +1 -0
- package/dist/components/tour/utils/focus.mjs +6 -0
- package/dist/components/tour/utils/is-visible.d.ts +1 -0
- package/dist/components/tour/utils/is-visible.mjs +29 -0
- package/dist/components/tour/utils/wait-element.d.ts +6 -0
- package/dist/components/tour/utils/wait-element.mjs +45 -0
- package/dist/components/truncate/Truncate.vue +69 -0
- package/dist/components/truncate/Truncate.vue.d.ts +68 -0
- package/dist/components/utils/array.d.ts +2 -0
- package/dist/components/utils/array.mjs +19 -0
- package/dist/components/utils/base64.d.ts +8 -0
- package/dist/components/utils/base64.mjs +35 -0
- package/dist/components/utils/color.d.ts +17 -0
- package/dist/components/utils/color.mjs +14 -0
- package/dist/components/utils/date.d.ts +22 -0
- package/dist/components/utils/date.mjs +14 -0
- package/dist/components/utils/value.d.ts +8 -0
- package/dist/components/utils/value.mjs +7 -0
- package/dist/components/utils/vnode.d.ts +15 -0
- package/dist/components/utils/vnode.mjs +18 -0
- package/dist/components/wizard/Wizard.vue +76 -0
- package/dist/components/wizard/Wizard.vue.d.ts +91 -0
- package/dist/components/wizard/WizardBody.vue +38 -0
- package/dist/components/wizard/WizardBody.vue.d.ts +36 -0
- package/dist/components/wizard/WizardHeader.vue +38 -0
- package/dist/components/wizard/WizardHeader.vue.d.ts +16 -0
- package/dist/components/wizard/WizardStep.vue +22 -0
- package/dist/components/wizard/WizardStep.vue.d.ts +55 -0
- package/dist/core/index.d.ts +43 -0
- package/dist/core/index.mjs +148 -0
- package/dist/directive/index.d.ts +3 -0
- package/dist/directive/index.mjs +12 -0
- package/dist/module.d.mts +28 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +97 -13
- package/dist/runtime/plugins/persona.d.ts +2 -0
- package/dist/runtime/plugins/persona.js +35 -0
- package/dist/types.d.mts +4 -8
- package/package.json +1 -4
- package/dist/module.d.cts +0 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type UE from '@testing-library/user-event';
|
|
2
|
+
import { AbstractStep } from '../step';
|
|
3
|
+
type UserEvent = ReturnType<typeof UE['setup']>;
|
|
4
|
+
type ExtractParams<F> = F extends (T: Element, ...args: infer P) => Promise<void> ? P : unknown[];
|
|
5
|
+
export type EventType = 'click' | 'dblClick' | 'tripleClick' | 'type' | 'hover' | 'unhover' | 'clear';
|
|
6
|
+
export type ParamsOf<E extends EventType> = ExtractParams<UserEvent[E]>;
|
|
7
|
+
export interface ActionOptions<E extends EventType> {
|
|
8
|
+
target: string;
|
|
9
|
+
action: E;
|
|
10
|
+
params: ParamsOf<E>;
|
|
11
|
+
}
|
|
12
|
+
export default class StepAction<E extends EventType> extends AbstractStep<ActionOptions<E>> {
|
|
13
|
+
protected run(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractStep } from "../step.mjs";
|
|
2
|
+
import { waitElement } from "../../utils/wait-element.mjs";
|
|
3
|
+
export default class StepAction extends AbstractStep {
|
|
4
|
+
async run() {
|
|
5
|
+
const options = this.getOptions();
|
|
6
|
+
const { default: userEvent } = await import("@testing-library/user-event");
|
|
7
|
+
const target = await waitElement(options.target, options.waitTimeout);
|
|
8
|
+
const user = userEvent.setup({ document });
|
|
9
|
+
const action = options.action;
|
|
10
|
+
const params = options.params ?? [];
|
|
11
|
+
await user[action].apply(void 0, [target, ...params]);
|
|
12
|
+
await this.ahead();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { MaybeRef } from '@vueuse/shared';
|
|
2
|
+
import { AbstractStep } from '../step';
|
|
3
|
+
import type { Tour } from '../tour';
|
|
4
|
+
export interface ConditionalOptions {
|
|
5
|
+
condition: MaybeRef<boolean | (() => boolean | Promise<boolean>)>;
|
|
6
|
+
tour: Tour;
|
|
7
|
+
}
|
|
8
|
+
export declare enum ConditionalType {
|
|
9
|
+
IF = 1,
|
|
10
|
+
ELSE_IF = 2,
|
|
11
|
+
ELSE = 3
|
|
12
|
+
}
|
|
13
|
+
interface Routine extends ConditionalOptions {
|
|
14
|
+
type: ConditionalType;
|
|
15
|
+
}
|
|
16
|
+
export default class StepCondition extends AbstractStep<ConditionalOptions> {
|
|
17
|
+
protected routines: Routine[];
|
|
18
|
+
constructor(options: ConditionalOptions);
|
|
19
|
+
canChain(): boolean;
|
|
20
|
+
chain(routine: Routine): this;
|
|
21
|
+
getTotalChild(): number;
|
|
22
|
+
getRoutines(): Routine[];
|
|
23
|
+
protected run(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { unref } from "vue";
|
|
2
|
+
import { AbstractStep } from "../step.mjs";
|
|
3
|
+
export var ConditionalType = /* @__PURE__ */ ((ConditionalType2) => {
|
|
4
|
+
ConditionalType2[ConditionalType2["IF"] = 1] = "IF";
|
|
5
|
+
ConditionalType2[ConditionalType2["ELSE_IF"] = 2] = "ELSE_IF";
|
|
6
|
+
ConditionalType2[ConditionalType2["ELSE"] = 3] = "ELSE";
|
|
7
|
+
return ConditionalType2;
|
|
8
|
+
})(ConditionalType || {});
|
|
9
|
+
export default class StepCondition extends AbstractStep {
|
|
10
|
+
routines;
|
|
11
|
+
constructor(options) {
|
|
12
|
+
super(options);
|
|
13
|
+
this.routines = [
|
|
14
|
+
{
|
|
15
|
+
type: 1 /* IF */,
|
|
16
|
+
condition: options.condition,
|
|
17
|
+
tour: options.tour
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
canChain() {
|
|
22
|
+
return this.routines.at(-1).type !== 3 /* ELSE */;
|
|
23
|
+
}
|
|
24
|
+
chain(routine) {
|
|
25
|
+
this.routines.push(routine);
|
|
26
|
+
return this;
|
|
27
|
+
}
|
|
28
|
+
getTotalChild() {
|
|
29
|
+
return Math.max(...this.routines.map((routine) => routine.tour.getTotalChild()));
|
|
30
|
+
}
|
|
31
|
+
getRoutines() {
|
|
32
|
+
return this.routines;
|
|
33
|
+
}
|
|
34
|
+
async run() {
|
|
35
|
+
let result = false;
|
|
36
|
+
for (const routine of this.routines) {
|
|
37
|
+
const condition = unref(routine.condition);
|
|
38
|
+
try {
|
|
39
|
+
result = typeof condition === "function" ? await condition() : condition;
|
|
40
|
+
} catch (error) {
|
|
41
|
+
if (import.meta.env.DEV)
|
|
42
|
+
console.warn(error);
|
|
43
|
+
result = false;
|
|
44
|
+
}
|
|
45
|
+
if (result) {
|
|
46
|
+
const tour = routine.tour;
|
|
47
|
+
await tour.setParent(this.parent).setDirection(this.direction).start();
|
|
48
|
+
this.onCleanup(async () => {
|
|
49
|
+
await tour.stop();
|
|
50
|
+
});
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (!result)
|
|
55
|
+
await this.ahead();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractStep } from '../step';
|
|
2
|
+
export interface DialogOptions {
|
|
3
|
+
target: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
text: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
}
|
|
8
|
+
export default class StepDialog extends AbstractStep<DialogOptions> {
|
|
9
|
+
protected dismiss(): Promise<void>;
|
|
10
|
+
protected run(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import defu from "defu";
|
|
2
|
+
import { removeSingleton, useSingleton } from "../../../global/use-singleton.mjs";
|
|
3
|
+
import { AbstractStep } from "../step.mjs";
|
|
4
|
+
import { waitElement } from "../../utils/wait-element.mjs";
|
|
5
|
+
export default class StepDialog extends AbstractStep {
|
|
6
|
+
async dismiss() {
|
|
7
|
+
await this.parent.stop();
|
|
8
|
+
}
|
|
9
|
+
async run() {
|
|
10
|
+
const options = this.getOptions();
|
|
11
|
+
const { default: Tour } = await import("../../Tour.vue");
|
|
12
|
+
const tour = await useSingleton(Tour);
|
|
13
|
+
const target = await waitElement(options.target, options.waitTimeout);
|
|
14
|
+
tour.show(target, defu({
|
|
15
|
+
step: this.parent.getIndex() + 1,
|
|
16
|
+
totalStep: this.parent.getTotal(),
|
|
17
|
+
onNext: this.next.bind(this),
|
|
18
|
+
onPrev: this.prev.bind(this),
|
|
19
|
+
onDismiss: this.dismiss.bind(this)
|
|
20
|
+
}, options));
|
|
21
|
+
this.onCleanup(async () => {
|
|
22
|
+
await removeSingleton(Tour);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useRouter } from "../../../global/router.mjs";
|
|
2
|
+
import { TourDirection } from "../base.mjs";
|
|
3
|
+
import { AbstractStep } from "../step.mjs";
|
|
4
|
+
export default class StepVisit extends AbstractStep {
|
|
5
|
+
lastURL = "";
|
|
6
|
+
async run() {
|
|
7
|
+
const router = useRouter();
|
|
8
|
+
const options = this.getOptions();
|
|
9
|
+
const lastURL = this.lastURL;
|
|
10
|
+
const targetURL = this.direction === TourDirection.FORWARD ? options.url : options.backUrl ?? lastURL;
|
|
11
|
+
this.lastURL = router.getURL();
|
|
12
|
+
await router.toURL(targetURL);
|
|
13
|
+
await this.ahead();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AbstractTour } from './base';
|
|
2
|
+
import type { Tour, TourOptions } from './tour';
|
|
3
|
+
type Merge<A, B> = Omit<A, keyof B> & B;
|
|
4
|
+
type BaseOptions = Partial<Omit<TourOptions, 'onFinished'>>;
|
|
5
|
+
export type OnCleanup = (cleanupFn: () => unknown) => unknown;
|
|
6
|
+
export declare abstract class AbstractStep<Option> extends AbstractTour<Merge<BaseOptions, Option>> {
|
|
7
|
+
protected parent?: Tour;
|
|
8
|
+
protected cleanFns: Array<() => unknown>;
|
|
9
|
+
protected dispose(): Promise<PromiseSettledResult<unknown>[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Run function before unmounted
|
|
12
|
+
* @param cleanFn clean function
|
|
13
|
+
*/
|
|
14
|
+
protected onCleanup(cleanFn: () => unknown): void;
|
|
15
|
+
/**
|
|
16
|
+
* Start this step
|
|
17
|
+
*/
|
|
18
|
+
start(): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Stop this step
|
|
21
|
+
*/
|
|
22
|
+
stop(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Trigger next to parent
|
|
25
|
+
*/
|
|
26
|
+
next(): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Trigger prev to parent
|
|
29
|
+
*/
|
|
30
|
+
prev(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Trigger next or prev following the direction
|
|
33
|
+
*/
|
|
34
|
+
ahead(): Promise<void>;
|
|
35
|
+
protected abstract run(): void | Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AbstractTour, TourDirection } from "./base.mjs";
|
|
2
|
+
export class AbstractStep extends AbstractTour {
|
|
3
|
+
cleanFns = [];
|
|
4
|
+
async dispose() {
|
|
5
|
+
return await Promise.allSettled(this.cleanFns.map((clean) => clean()));
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Run function before unmounted
|
|
9
|
+
* @param cleanFn clean function
|
|
10
|
+
*/
|
|
11
|
+
onCleanup(cleanFn) {
|
|
12
|
+
this.cleanFns.push(cleanFn);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Start this step
|
|
16
|
+
*/
|
|
17
|
+
async start() {
|
|
18
|
+
this.attach(this.parent);
|
|
19
|
+
await this.run();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Stop this step
|
|
23
|
+
*/
|
|
24
|
+
async stop() {
|
|
25
|
+
await this.dispose();
|
|
26
|
+
this.detach(this.parent);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Trigger next to parent
|
|
30
|
+
*/
|
|
31
|
+
async next() {
|
|
32
|
+
await this.parent.next();
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Trigger prev to parent
|
|
36
|
+
*/
|
|
37
|
+
async prev() {
|
|
38
|
+
await this.parent.prev();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Trigger next or prev following the direction
|
|
42
|
+
*/
|
|
43
|
+
async ahead() {
|
|
44
|
+
return await (this.direction === TourDirection.BACKWARD ? this.prev() : this.next());
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Tour } from './tour';
|
|
2
|
+
import type { ConditionalOptions } from './step/conditional';
|
|
3
|
+
import type { DialogOptions } from './step/dialog';
|
|
4
|
+
import type { ActionOptions, EventType, ParamsOf } from './step/action';
|
|
5
|
+
type TourBuilderCallback = (tour: TourStory) => unknown;
|
|
6
|
+
/**
|
|
7
|
+
* Tour with additional function to build a tour stories
|
|
8
|
+
*/
|
|
9
|
+
export declare class TourStory extends Tour {
|
|
10
|
+
/**
|
|
11
|
+
* Show tour guide dialog
|
|
12
|
+
* @param options options
|
|
13
|
+
*/
|
|
14
|
+
dialog(options: DialogOptions): this;
|
|
15
|
+
/**
|
|
16
|
+
* Show tour guide dialog
|
|
17
|
+
* @param target target querySelector
|
|
18
|
+
* @param text body text
|
|
19
|
+
* @param title title text
|
|
20
|
+
* @param image url image
|
|
21
|
+
*/
|
|
22
|
+
dialog(target: string, text: string, title?: string, image?: string): this;
|
|
23
|
+
/**
|
|
24
|
+
* Delay or Wait, setTimout equivalent
|
|
25
|
+
* @param duration duration in milliseconds
|
|
26
|
+
*/
|
|
27
|
+
delay(duration: number): this;
|
|
28
|
+
/**
|
|
29
|
+
* Trigger action to target element
|
|
30
|
+
* @param options ActionOptions
|
|
31
|
+
*/
|
|
32
|
+
action<E extends EventType>(options: ActionOptions<E>): this;
|
|
33
|
+
/**
|
|
34
|
+
* Trigger action to target element
|
|
35
|
+
* @param target Target querySelector
|
|
36
|
+
* @param action Action name, ex: 'click', 'type'
|
|
37
|
+
* @param params Action parameters
|
|
38
|
+
*/
|
|
39
|
+
action<E extends EventType>(target: string, action: E, ...params: ParamsOf<E>): this;
|
|
40
|
+
/**
|
|
41
|
+
* Trigger click to target element
|
|
42
|
+
* @param target Target querySelector
|
|
43
|
+
*/
|
|
44
|
+
click(target: string): this;
|
|
45
|
+
/**
|
|
46
|
+
* Trigger double click to target element
|
|
47
|
+
* @param target Target querySelector
|
|
48
|
+
*/
|
|
49
|
+
dblClick(target: string): this;
|
|
50
|
+
/**
|
|
51
|
+
* Trigger triple click to target element
|
|
52
|
+
* @param target Target querySelector
|
|
53
|
+
*/
|
|
54
|
+
tripleClick(target: string): this;
|
|
55
|
+
/**
|
|
56
|
+
* Trigger hover to target element
|
|
57
|
+
* @param target Target querySelector
|
|
58
|
+
*/
|
|
59
|
+
hover(target: string): this;
|
|
60
|
+
/**
|
|
61
|
+
* Trigger unhover (blur) to target element
|
|
62
|
+
* @param target Target querySelector
|
|
63
|
+
*/
|
|
64
|
+
unhover(target: string): this;
|
|
65
|
+
/**
|
|
66
|
+
* Trigger blur (unhover) to target element
|
|
67
|
+
* @param target Target querySelector
|
|
68
|
+
*/
|
|
69
|
+
blur(target: string): this;
|
|
70
|
+
/**
|
|
71
|
+
* Remotely typing target input
|
|
72
|
+
* @param target Target querySelector
|
|
73
|
+
*/
|
|
74
|
+
type(target: string, text: string): this;
|
|
75
|
+
/**
|
|
76
|
+
* Clear input text
|
|
77
|
+
* @param target Target querySelector
|
|
78
|
+
*/
|
|
79
|
+
clear(target: string): this;
|
|
80
|
+
/**
|
|
81
|
+
* Redirect to url
|
|
82
|
+
* @param url target url
|
|
83
|
+
* @param backUrl target url when back button clicked
|
|
84
|
+
*/
|
|
85
|
+
visit(url: string, backUrl?: string): this;
|
|
86
|
+
/**
|
|
87
|
+
* Run steps only when condition meet, skip if not
|
|
88
|
+
* @param condition Ref or Function to check
|
|
89
|
+
* @param buildTour
|
|
90
|
+
* @example
|
|
91
|
+
* tour.runIf(() => window.matchMedia("(max-width: 700px)").matches, (tour) => {
|
|
92
|
+
* return tour
|
|
93
|
+
* .click('#mobile-only')
|
|
94
|
+
* .dialog('#mobile-only', 'Hello World')
|
|
95
|
+
* })
|
|
96
|
+
*/
|
|
97
|
+
runIf(condition: ConditionalOptions['condition'], buildTour: TourBuilderCallback): this;
|
|
98
|
+
/**
|
|
99
|
+
* Run else if, this must be used after runIf.
|
|
100
|
+
* @param condition
|
|
101
|
+
* @param buildTour
|
|
102
|
+
* @example
|
|
103
|
+
* tour.runIf(() => window.matchMedia("(max-width: 700px)").matches, (tour) => {
|
|
104
|
+
* return tour
|
|
105
|
+
* .click('#mobile-only')
|
|
106
|
+
* .dialog('#mobile-only', 'Hello World')
|
|
107
|
+
* }).runElseIf(() => window.matchMedia("(max-width: 1000px), (tour) => {
|
|
108
|
+
* return tour
|
|
109
|
+
* .click('#tablet-only')
|
|
110
|
+
* .dialog('#tablet-only', 'Hello World')*
|
|
111
|
+
* })
|
|
112
|
+
*/
|
|
113
|
+
runElseIf(condition: ConditionalOptions['condition'], buildTour: TourBuilderCallback): this;
|
|
114
|
+
/**
|
|
115
|
+
* Run else condition, this must be used after runElse
|
|
116
|
+
* @param buildTour
|
|
117
|
+
* @example
|
|
118
|
+
* tour.runIf(() => window.matchMedia("(max-width: 700px)").matches, (tour) => {
|
|
119
|
+
* return tour
|
|
120
|
+
* .click('#mobile-only')
|
|
121
|
+
* .dialog('#mobile-only', 'Hello World')
|
|
122
|
+
* }).runElse((tour) => {
|
|
123
|
+
* return tour
|
|
124
|
+
* .click('#not-mobile')
|
|
125
|
+
* .dialog('#not-mobile', 'Hello World')*
|
|
126
|
+
* })
|
|
127
|
+
*/
|
|
128
|
+
runElse(buildTour: TourBuilderCallback): this;
|
|
129
|
+
}
|
|
130
|
+
export {};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { Tour } from "./tour.mjs";
|
|
2
|
+
import { isString } from "lodash-es";
|
|
3
|
+
import StepDialog from "./step/dialog.mjs";
|
|
4
|
+
import StepDelay from "./step/delay.mjs";
|
|
5
|
+
import StepAction from "./step/action.mjs";
|
|
6
|
+
import StepVisit from "./step/visit.mjs";
|
|
7
|
+
import StepCondition, { ConditionalType } from "./step/conditional.mjs";
|
|
8
|
+
export class TourStory extends Tour {
|
|
9
|
+
dialog(targetOrOption, text = "", title, image) {
|
|
10
|
+
return isString(targetOrOption) ? this.add(new StepDialog({
|
|
11
|
+
target: targetOrOption,
|
|
12
|
+
text,
|
|
13
|
+
title,
|
|
14
|
+
image
|
|
15
|
+
})) : this.add(new StepDialog(targetOrOption));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Delay or Wait, setTimout equivalent
|
|
19
|
+
* @param duration duration in milliseconds
|
|
20
|
+
*/
|
|
21
|
+
delay(duration) {
|
|
22
|
+
return this.add(new StepDelay({ duration }));
|
|
23
|
+
}
|
|
24
|
+
action(targetOrOption, action, ...params) {
|
|
25
|
+
return isString(targetOrOption) ? this.add(new StepAction({
|
|
26
|
+
target: targetOrOption,
|
|
27
|
+
action,
|
|
28
|
+
params
|
|
29
|
+
})) : this.add(new StepAction(targetOrOption));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Trigger click to target element
|
|
33
|
+
* @param target Target querySelector
|
|
34
|
+
*/
|
|
35
|
+
click(target) {
|
|
36
|
+
return this.action(target, "click");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Trigger double click to target element
|
|
40
|
+
* @param target Target querySelector
|
|
41
|
+
*/
|
|
42
|
+
dblClick(target) {
|
|
43
|
+
return this.action(target, "dblClick");
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Trigger triple click to target element
|
|
47
|
+
* @param target Target querySelector
|
|
48
|
+
*/
|
|
49
|
+
tripleClick(target) {
|
|
50
|
+
return this.action(target, "tripleClick");
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Trigger hover to target element
|
|
54
|
+
* @param target Target querySelector
|
|
55
|
+
*/
|
|
56
|
+
hover(target) {
|
|
57
|
+
return this.action(target, "hover");
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Trigger unhover (blur) to target element
|
|
61
|
+
* @param target Target querySelector
|
|
62
|
+
*/
|
|
63
|
+
unhover(target) {
|
|
64
|
+
return this.action(target, "unhover");
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Trigger blur (unhover) to target element
|
|
68
|
+
* @param target Target querySelector
|
|
69
|
+
*/
|
|
70
|
+
blur(target) {
|
|
71
|
+
return this.unhover(target);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Remotely typing target input
|
|
75
|
+
* @param target Target querySelector
|
|
76
|
+
*/
|
|
77
|
+
type(target, text) {
|
|
78
|
+
return this.action(target, "type", text);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Clear input text
|
|
82
|
+
* @param target Target querySelector
|
|
83
|
+
*/
|
|
84
|
+
clear(target) {
|
|
85
|
+
return this.action(target, "clear");
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Redirect to url
|
|
89
|
+
* @param url target url
|
|
90
|
+
* @param backUrl target url when back button clicked
|
|
91
|
+
*/
|
|
92
|
+
visit(url, backUrl) {
|
|
93
|
+
return this.add(new StepVisit({ url, backUrl }));
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Run steps only when condition meet, skip if not
|
|
97
|
+
* @param condition Ref or Function to check
|
|
98
|
+
* @param buildTour
|
|
99
|
+
* @example
|
|
100
|
+
* tour.runIf(() => window.matchMedia("(max-width: 700px)").matches, (tour) => {
|
|
101
|
+
* return tour
|
|
102
|
+
* .click('#mobile-only')
|
|
103
|
+
* .dialog('#mobile-only', 'Hello World')
|
|
104
|
+
* })
|
|
105
|
+
*/
|
|
106
|
+
runIf(condition, buildTour) {
|
|
107
|
+
const tour = new TourStory();
|
|
108
|
+
return this.add(new StepCondition({
|
|
109
|
+
condition,
|
|
110
|
+
tour: buildTour(tour) ?? tour
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Run else if, this must be used after runIf.
|
|
115
|
+
* @param condition
|
|
116
|
+
* @param buildTour
|
|
117
|
+
* @example
|
|
118
|
+
* tour.runIf(() => window.matchMedia("(max-width: 700px)").matches, (tour) => {
|
|
119
|
+
* return tour
|
|
120
|
+
* .click('#mobile-only')
|
|
121
|
+
* .dialog('#mobile-only', 'Hello World')
|
|
122
|
+
* }).runElseIf(() => window.matchMedia("(max-width: 1000px), (tour) => {
|
|
123
|
+
* return tour
|
|
124
|
+
* .click('#tablet-only')
|
|
125
|
+
* .dialog('#tablet-only', 'Hello World')*
|
|
126
|
+
* })
|
|
127
|
+
*/
|
|
128
|
+
runElseIf(condition, buildTour) {
|
|
129
|
+
const step = this.steps.at(-1);
|
|
130
|
+
if (!(step instanceof StepCondition) || !step.canChain())
|
|
131
|
+
throw new Error(".runElseIf only can be use after .runIf or .runElseIf");
|
|
132
|
+
const tour = new TourStory();
|
|
133
|
+
step.chain({
|
|
134
|
+
type: ConditionalType.ELSE_IF,
|
|
135
|
+
condition,
|
|
136
|
+
tour: buildTour(tour) ?? tour
|
|
137
|
+
});
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Run else condition, this must be used after runElse
|
|
142
|
+
* @param buildTour
|
|
143
|
+
* @example
|
|
144
|
+
* tour.runIf(() => window.matchMedia("(max-width: 700px)").matches, (tour) => {
|
|
145
|
+
* return tour
|
|
146
|
+
* .click('#mobile-only')
|
|
147
|
+
* .dialog('#mobile-only', 'Hello World')
|
|
148
|
+
* }).runElse((tour) => {
|
|
149
|
+
* return tour
|
|
150
|
+
* .click('#not-mobile')
|
|
151
|
+
* .dialog('#not-mobile', 'Hello World')*
|
|
152
|
+
* })
|
|
153
|
+
*/
|
|
154
|
+
runElse(buildTour) {
|
|
155
|
+
const step = this.steps.at(-1);
|
|
156
|
+
if (!(step instanceof StepCondition) || !step.canChain())
|
|
157
|
+
throw new Error(".runElse only can be use after .runIf or .runElseIf");
|
|
158
|
+
const tour = new TourStory();
|
|
159
|
+
step.chain({
|
|
160
|
+
type: ConditionalType.ELSE,
|
|
161
|
+
condition: true,
|
|
162
|
+
tour: buildTour(tour) ?? tour
|
|
163
|
+
});
|
|
164
|
+
return this;
|
|
165
|
+
}
|
|
166
|
+
}
|