@privyid/persona 1.1.2 → 1.2.1-rc.0
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/module.d.cts +2 -0
- package/dist/module.d.mts +2 -27
- package/dist/module.json +12 -0
- package/dist/module.mjs +13 -92
- package/dist/types.d.mts +13 -0
- package/package.json +25 -27
- package/dist/components/accordion/Accordion.vue +0 -121
- package/dist/components/accordion/AccordionItem.vue +0 -250
- package/dist/components/accordion/AccordionItems.vue +0 -50
- package/dist/components/accordion/AccordionItems.vue.d.ts +0 -41
- package/dist/components/accordion/index.d.ts +0 -7
- package/dist/components/accordion/index.mjs +0 -3
- package/dist/components/aspect-ratio/index.d.ts +0 -3
- package/dist/components/aspect-ratio/index.mjs +0 -21
- package/dist/components/aspect-ratio/utils/calculate-ratio.d.ts +0 -7
- package/dist/components/aspect-ratio/utils/calculate-ratio.mjs +0 -10
- package/dist/components/aspect-ratio/utils/resize-observer.d.ts +0 -1
- package/dist/components/aspect-ratio/utils/resize-observer.mjs +0 -22
- package/dist/components/avatar/Avatar.vue +0 -193
- package/dist/components/avatar/AvatarGroup.vue +0 -42
- package/dist/components/avatar/AvatarTruncate.vue +0 -33
- package/dist/components/avatar/AvatarTruncate.vue.d.ts +0 -31
- 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 +0 -2
- package/dist/components/avatar/index.mjs +0 -0
- package/dist/components/avatar/utils/color-hash.d.ts +0 -2
- package/dist/components/avatar/utils/color-hash.mjs +0 -22
- package/dist/components/avatar/utils/create-image.d.ts +0 -5
- package/dist/components/avatar/utils/create-image.mjs +0 -19
- package/dist/components/avatar/utils/load-image.d.ts +0 -1
- package/dist/components/avatar/utils/load-image.mjs +0 -22
- package/dist/components/badge/Badge.vue +0 -218
- package/dist/components/badge/index.d.ts +0 -1
- package/dist/components/badge/index.mjs +0 -0
- package/dist/components/banner/Banner.vue +0 -213
- package/dist/components/banner/index.d.ts +0 -1
- package/dist/components/banner/index.mjs +0 -0
- package/dist/components/breadcrumbs/Breadcrumb.vue +0 -62
- package/dist/components/breadcrumbs/BreadcrumbItem.vue +0 -95
- package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +0 -78
- package/dist/components/breadcrumbs/index.d.ts +0 -11
- package/dist/components/breadcrumbs/index.mjs +0 -3
- package/dist/components/button/Button.vue +0 -422
- package/dist/components/button/index.d.ts +0 -5
- package/dist/components/button/index.mjs +0 -0
- package/dist/components/button-group/ButtonGroup.vue +0 -220
- package/dist/components/button-group/index.d.ts +0 -6
- package/dist/components/button-group/index.mjs +0 -1
- package/dist/components/calendar/Calendar.vue +0 -465
- package/dist/components/calendar/adapter/adapter.d.ts +0 -32
- package/dist/components/calendar/adapter/adapter.mjs +0 -43
- package/dist/components/calendar/adapter/date.d.ts +0 -2
- package/dist/components/calendar/adapter/date.mjs +0 -86
- package/dist/components/calendar/adapter/month.d.ts +0 -2
- package/dist/components/calendar/adapter/month.mjs +0 -66
- package/dist/components/calendar/adapter/year.d.ts +0 -2
- package/dist/components/calendar/adapter/year.mjs +0 -63
- package/dist/components/camera/Camera.vue +0 -416
- package/dist/components/camera/adapter/adapter.d.ts +0 -41
- package/dist/components/camera/adapter/adapter.mjs +0 -3
- package/dist/components/camera/adapter/capture.d.ts +0 -5
- package/dist/components/camera/adapter/capture.mjs +0 -12
- package/dist/components/camera/adapter/liveness.d.ts +0 -5
- package/dist/components/camera/adapter/liveness.mjs +0 -46
- package/dist/components/camera/adapter/qr-code.d.ts +0 -2
- package/dist/components/camera/adapter/qr-code.mjs +0 -19
- package/dist/components/camera/assets/shutter.wav +0 -0
- package/dist/components/camera/utils/motion.d.ts +0 -29
- package/dist/components/camera/utils/motion.mjs +0 -88
- package/dist/components/camera/utils/take-picture.d.ts +0 -1
- package/dist/components/camera/utils/take-picture.mjs +0 -14
- package/dist/components/caption/Caption.vue +0 -122
- package/dist/components/caption/index.d.ts +0 -1
- package/dist/components/caption/index.mjs +0 -0
- package/dist/components/card/Card.vue +0 -354
- package/dist/components/card/CardSection.vue +0 -81
- package/dist/components/card/index.d.ts +0 -2
- package/dist/components/card/index.mjs +0 -0
- package/dist/components/carousel/Carousel.vue +0 -202
- package/dist/components/carousel/CarouselBody.vue +0 -18
- package/dist/components/carousel/CarouselItem.vue +0 -10
- package/dist/components/carousel/index.d.ts +0 -4
- package/dist/components/carousel/index.mjs +0 -1
- package/dist/components/chart/Chart.vue +0 -155
- package/dist/components/chart/ChartSet.vue +0 -32
- package/dist/components/chart/ChartVal.vue +0 -36
- package/dist/components/chart/adapter/adapter.d.ts +0 -7
- package/dist/components/chart/adapter/adapter.mjs +0 -3
- package/dist/components/chart/adapter/bubble.d.ts +0 -2
- package/dist/components/chart/adapter/bubble.mjs +0 -26
- package/dist/components/chart/adapter/index.d.ts +0 -3
- package/dist/components/chart/adapter/index.mjs +0 -16
- package/dist/components/chart/adapter/line.d.ts +0 -2
- package/dist/components/chart/adapter/line.mjs +0 -66
- package/dist/components/chart/adapter/pie.d.ts +0 -2
- package/dist/components/chart/adapter/pie.mjs +0 -34
- package/dist/components/chart/index.d.ts +0 -2
- package/dist/components/chart/index.mjs +0 -0
- package/dist/components/chart/utils/use-chart.d.ts +0 -2
- package/dist/components/chart/utils/use-chart.mjs +0 -9
- package/dist/components/checkbox/Checkbox.vue +0 -232
- package/dist/components/checkbox/icon/IconCheckbox.vue +0 -13
- package/dist/components/checkbox/icon/IconInderteminate.vue +0 -12
- package/dist/components/checkbox/index.d.ts +0 -7
- package/dist/components/checkbox/index.mjs +0 -34
- package/dist/components/collapse/Collapse.vue +0 -71
- package/dist/components/contextual-bar/ContextualBar.vue +0 -461
- package/dist/components/contextual-bar/index.d.ts +0 -1
- package/dist/components/contextual-bar/index.mjs +0 -0
- package/dist/components/cropper/Cropper.vue +0 -446
- package/dist/components/cropper/index.d.ts +0 -1
- package/dist/components/cropper/index.mjs +0 -3
- package/dist/components/cropper/utils/crop-image.d.ts +0 -44
- package/dist/components/cropper/utils/crop-image.mjs +0 -43
- package/dist/components/cropper/utils/use-pinch.d.ts +0 -8
- package/dist/components/cropper/utils/use-pinch.mjs +0 -50
- package/dist/components/cropper/utils/use-preview.d.ts +0 -3
- package/dist/components/cropper/utils/use-preview.mjs +0 -21
- package/dist/components/cropper/utils/use-ratio.d.ts +0 -9
- package/dist/components/cropper/utils/use-ratio.mjs +0 -24
- package/dist/components/datepicker/Datepicker.vue +0 -235
- package/dist/components/dialog/Dialog.vue +0 -149
- package/dist/components/dialog/DialogFooter.vue +0 -138
- package/dist/components/dialog/index.d.ts +0 -52
- package/dist/components/dialog/index.mjs +0 -86
- package/dist/components/divider/Divider.vue +0 -65
- package/dist/components/dot/Dot.vue +0 -103
- package/dist/components/dot/index.d.ts +0 -1
- package/dist/components/dot/index.mjs +0 -0
- package/dist/components/dropdown/Dropdown.vue +0 -441
- package/dist/components/dropdown/DropdownHeader.vue +0 -33
- package/dist/components/dropdown/DropdownItem.vue +0 -103
- package/dist/components/dropdown/DropdownText.vue +0 -34
- package/dist/components/dropdown/index.d.ts +0 -10
- package/dist/components/dropdown/index.mjs +0 -1
- package/dist/components/dropdown/utils/use-focus.d.ts +0 -5
- package/dist/components/dropdown/utils/use-focus.mjs +0 -22
- package/dist/components/dropdown-subitem/DropdownSubitem.vue +0 -182
- package/dist/components/dropdown-subitem/index.d.ts +0 -12
- package/dist/components/dropdown-subitem/index.mjs +0 -1
- package/dist/components/dropzone/Dropzone.vue +0 -261
- package/dist/components/dropzone/index.d.ts +0 -4
- package/dist/components/dropzone/index.mjs +0 -0
- package/dist/components/dropzone/utils/accept.d.ts +0 -1
- package/dist/components/dropzone/utils/accept.mjs +0 -17
- package/dist/components/filterbar/Filterbar.vue +0 -103
- package/dist/components/filterbar/Filterbar.vue.d.ts +0 -40
- package/dist/components/filterbar/index.d.ts +0 -45
- package/dist/components/filterbar/index.mjs +0 -7
- package/dist/components/filterbar/pinned/PinnedDate.vue +0 -100
- package/dist/components/filterbar/pinned/PinnedDate.vue.d.ts +0 -72
- package/dist/components/filterbar/pinned/PinnedMultiselect.vue +0 -113
- package/dist/components/filterbar/pinned/PinnedMultiselect.vue.d.ts +0 -48
- package/dist/components/filterbar/pinned/PinnedSelect.vue +0 -100
- package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +0 -47
- package/dist/components/filterbar/pinned/PinnedToggle.vue +0 -77
- package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +0 -59
- package/dist/components/form-group/FormGroup.vue +0 -169
- package/dist/components/global/router.d.ts +0 -24
- package/dist/components/global/router.mjs +0 -7
- package/dist/components/global/store.d.ts +0 -49
- package/dist/components/global/store.mjs +0 -52
- package/dist/components/global/types.d.ts +0 -4
- package/dist/components/global/types.mjs +0 -0
- package/dist/components/global/use-singleton.d.ts +0 -21
- package/dist/components/global/use-singleton.mjs +0 -60
- package/dist/components/global/utils/queue.d.ts +0 -16
- package/dist/components/global/utils/queue.mjs +0 -35
- package/dist/components/heading/Heading.vue +0 -140
- package/dist/components/heading/index.d.ts +0 -3
- package/dist/components/heading/index.mjs +0 -0
- package/dist/components/input/Input.vue +0 -243
- package/dist/components/input/index.d.ts +0 -6
- package/dist/components/input/index.mjs +0 -25
- package/dist/components/input/utils/accept.d.ts +0 -26
- package/dist/components/input/utils/accept.mjs +0 -81
- package/dist/components/input-color/index.d.ts +0 -1
- package/dist/components/input-color/index.mjs +0 -0
- package/dist/components/input-color/inputColor.vue +0 -264
- package/dist/components/input-file/InputFile.vue +0 -221
- package/dist/components/input-group/InputGroup.vue +0 -188
- package/dist/components/input-group/InputGroupAddon.vue +0 -42
- package/dist/components/input-group/index.d.ts +0 -6
- package/dist/components/input-group/index.mjs +0 -1
- package/dist/components/input-password/InputPassword.vue +0 -110
- package/dist/components/input-password/index.d.ts +0 -2
- package/dist/components/input-password/index.mjs +0 -17
- package/dist/components/input-pin/InputPin.vue +0 -170
- package/dist/components/input-pin/index.d.ts +0 -6
- package/dist/components/input-pin/index.mjs +0 -3
- package/dist/components/input-range/InputRange.vue +0 -303
- package/dist/components/input-range/utils/use-drag.d.ts +0 -3
- package/dist/components/input-range/utils/use-drag.mjs +0 -26
- package/dist/components/label/Label.vue +0 -265
- package/dist/components/label/index.d.ts +0 -1
- package/dist/components/label/index.mjs +0 -0
- package/dist/components/list-group/ListGroup.vue +0 -75
- package/dist/components/list-group/ListGroupItem.vue +0 -88
- package/dist/components/list-group/index.d.ts +0 -1
- package/dist/components/list-group/index.mjs +0 -0
- package/dist/components/main/Main.vue +0 -66
- package/dist/components/markdown/index.d.ts +0 -29
- package/dist/components/markdown/index.mjs +0 -25
- package/dist/components/meta.json +0 -171
- package/dist/components/modal/Modal.vue +0 -546
- package/dist/components/modal/index.d.ts +0 -1
- package/dist/components/modal/index.mjs +0 -0
- package/dist/components/nav/Nav.vue +0 -416
- package/dist/components/nav/NavCollapse.vue +0 -66
- package/dist/components/nav/NavForm.vue +0 -23
- package/dist/components/nav/NavItem.vue +0 -187
- package/dist/components/nav/NavItemDropdown.vue +0 -120
- package/dist/components/nav/NavSubItem.vue +0 -194
- package/dist/components/nav/NavText.vue +0 -19
- package/dist/components/nav/index.d.ts +0 -2
- package/dist/components/nav/index.mjs +0 -0
- package/dist/components/navbar/Navbar.vue +0 -284
- package/dist/components/navbar/NavbarBrand.vue +0 -31
- package/dist/components/navbar/NavbarNav.vue +0 -114
- package/dist/components/navbar/NavbarToggle.vue +0 -72
- package/dist/components/navbar/index.d.ts +0 -9
- package/dist/components/navbar/index.mjs +0 -1
- package/dist/components/navbar-menu/NavbarNavMenu.vue +0 -59
- package/dist/components/notify/Notify.vue +0 -51
- package/dist/components/notify/NotifyGroup.vue +0 -244
- package/dist/components/notify/NotifyItem.vue +0 -45
- package/dist/components/notify/index.d.ts +0 -20
- package/dist/components/notify/index.mjs +0 -18
- package/dist/components/overlay/Overlay.vue +0 -68
- package/dist/components/overlay/assets/icon-white.svg +0 -1
- package/dist/components/overlay/index.d.ts +0 -2
- package/dist/components/overlay/index.mjs +0 -8
- package/dist/components/overlay/utils/use-loading.d.ts +0 -4
- package/dist/components/overlay/utils/use-loading.mjs +0 -28
- package/dist/components/page/Page.vue +0 -106
- package/dist/components/pagination/Pagination.vue +0 -415
- package/dist/components/pagination/index.d.ts +0 -14
- package/dist/components/pagination/index.mjs +0 -38
- package/dist/components/pagination/utils/calculate-page.d.ts +0 -11
- package/dist/components/pagination/utils/calculate-page.mjs +0 -48
- package/dist/components/pdf-helipad/PdfHelipad.vue +0 -147
- package/dist/components/pdf-helipad/index.d.ts +0 -7
- package/dist/components/pdf-helipad/index.mjs +0 -0
- package/dist/components/pdf-helipad/utils/use-drag.d.ts +0 -3
- package/dist/components/pdf-helipad/utils/use-drag.mjs +0 -38
- package/dist/components/pdf-object/PdfObject.vue +0 -348
- package/dist/components/pdf-object/PdfObjectAddon.vue +0 -55
- package/dist/components/pdf-object/PdfObjectDebugger.vue +0 -70
- package/dist/components/pdf-object/PdfObjects.vue +0 -39
- package/dist/components/pdf-object/index.d.ts +0 -63
- package/dist/components/pdf-object/index.mjs +0 -110
- package/dist/components/pdf-object/utils/overlap.d.ts +0 -51
- package/dist/components/pdf-object/utils/overlap.mjs +0 -54
- package/dist/components/pdf-object/utils/position.d.ts +0 -64
- package/dist/components/pdf-object/utils/position.mjs +0 -48
- package/dist/components/pdf-object/utils/use-drag.d.ts +0 -9
- package/dist/components/pdf-object/utils/use-drag.mjs +0 -69
- package/dist/components/pdf-object/utils/use-drop.d.ts +0 -7
- package/dist/components/pdf-object/utils/use-drop.mjs +0 -57
- package/dist/components/pdf-object/utils/use-resize.d.ts +0 -17
- package/dist/components/pdf-object/utils/use-resize.mjs +0 -90
- package/dist/components/pdf-object/utils/use-selector.d.ts +0 -4
- package/dist/components/pdf-object/utils/use-selector.mjs +0 -26
- package/dist/components/pdf-text/PdfText.vue +0 -138
- package/dist/components/pdf-text/utils/text-to-image.d.ts +0 -68
- package/dist/components/pdf-text/utils/text-to-image.mjs +0 -120
- package/dist/components/pdf-viewer/PdfError.vue +0 -74
- package/dist/components/pdf-viewer/PdfLoading.vue +0 -24
- package/dist/components/pdf-viewer/PdfNavigation.vue +0 -169
- package/dist/components/pdf-viewer/PdfViewer.vue +0 -377
- package/dist/components/pdf-viewer/assets/pdf-loading.svg +0 -1
- package/dist/components/pdf-viewer/index.d.ts +0 -25
- package/dist/components/pdf-viewer/index.mjs +0 -24
- package/dist/components/pdf-viewer/utils/pdfjs.d.ts +0 -68
- package/dist/components/pdf-viewer/utils/pdfjs.mjs +0 -54
- package/dist/components/pdf-viewer/utils/use-idle.d.ts +0 -2
- package/dist/components/pdf-viewer/utils/use-idle.mjs +0 -25
- package/dist/components/pdf-viewer/utils/use-sticky.d.ts +0 -6
- package/dist/components/pdf-viewer/utils/use-sticky.mjs +0 -49
- package/dist/components/pdf-viewer/utils/use-viewer.d.ts +0 -27
- package/dist/components/pdf-viewer/utils/use-viewer.mjs +0 -191
- package/dist/components/popover/Popover.vue +0 -131
- package/dist/components/popover/index.d.ts +0 -17
- package/dist/components/popover/index.mjs +0 -52
- package/dist/components/popup/Popup.vue +0 -428
- package/dist/components/popup/index.d.ts +0 -38
- package/dist/components/popup/index.mjs +0 -31
- package/dist/components/progress/Progress.vue +0 -221
- package/dist/components/progress/ProgressItem.vue +0 -56
- package/dist/components/progress/index.d.ts +0 -2
- package/dist/components/progress/index.mjs +0 -0
- package/dist/components/progress-indicator/ProgressIndicator.vue +0 -132
- package/dist/components/progressbar/Progressbar.vue +0 -113
- package/dist/components/progressbar/index.d.ts +0 -7
- package/dist/components/progressbar/index.mjs +0 -11
- package/dist/components/pspdfkit/PspdfHelipad.vue +0 -165
- package/dist/components/pspdfkit/PspdfObject.vue +0 -341
- package/dist/components/pspdfkit/PspdfObjectAddon.vue +0 -30
- package/dist/components/pspdfkit/PspdfObjects.vue +0 -30
- package/dist/components/pspdfkit/PspdfViewer.vue +0 -257
- package/dist/components/pspdfkit/css/custom.css +0 -345
- package/dist/components/pspdfkit/index.d.ts +0 -8
- package/dist/components/pspdfkit/index.mjs +0 -7
- package/dist/components/pspdfkit/utils/position.d.ts +0 -1
- package/dist/components/pspdfkit/utils/position.mjs +0 -5
- package/dist/components/pspdfkit/utils/pspdfkit.d.ts +0 -17
- package/dist/components/pspdfkit/utils/pspdfkit.mjs +0 -53
- package/dist/components/pspdfkit/utils/use-drop.d.ts +0 -2
- package/dist/components/pspdfkit/utils/use-drop.mjs +0 -41
- package/dist/components/pspdfkit/utils/use-viewer.d.ts +0 -17
- package/dist/components/pspdfkit/utils/use-viewer.mjs +0 -167
- package/dist/components/qrcode/Qrcode.vue +0 -174
- package/dist/components/qrcode/index.d.ts +0 -1
- package/dist/components/qrcode/index.mjs +0 -0
- package/dist/components/radio/Radio.vue +0 -304
- package/dist/components/radio/index.d.ts +0 -7
- package/dist/components/radio/index.mjs +0 -16
- package/dist/components/richtext/Richtext.vue +0 -295
- package/dist/components/richtext/RichtextToolbarAdvance.vue +0 -37
- package/dist/components/richtext/RichtextToolbarSimple.vue +0 -158
- package/dist/components/richtext/control/RichtextControlFontFamily.vue +0 -56
- package/dist/components/richtext/control/RichtextControlFontSize.vue +0 -81
- package/dist/components/richtext/control/RichtextControlHighlight.vue +0 -135
- package/dist/components/richtext/control/RichtextControlHistory.vue +0 -27
- package/dist/components/richtext/control/RichtextControlImage.vue +0 -34
- package/dist/components/richtext/control/RichtextControlLink.vue +0 -53
- package/dist/components/richtext/control/RichtextControlList.vue +0 -45
- package/dist/components/richtext/control/RichtextControlTable.vue +0 -106
- package/dist/components/richtext/control/RichtextControlTextAlign.vue +0 -90
- package/dist/components/richtext/control/RichtextControlTextFormat.vue +0 -49
- package/dist/components/richtext/control/RichtextControlTextHeading.vue +0 -101
- package/dist/components/richtext/index.d.ts +0 -7
- package/dist/components/richtext/index.mjs +0 -7
- package/dist/components/richtext/popup/RichtextPopupImageEdit.vue +0 -65
- package/dist/components/richtext/popup/RichtextPopupLinkDetail.vue +0 -95
- package/dist/components/richtext/popup/RichtextPopupLinkEdit.vue +0 -74
- package/dist/components/richtext/tiptap/image-align.d.ts +0 -43
- package/dist/components/richtext/tiptap/image-align.mjs +0 -60
- package/dist/components/ringbar/Ringbar.vue +0 -158
- package/dist/components/ringbar/index.d.ts +0 -1
- package/dist/components/ringbar/index.mjs +0 -0
- package/dist/components/select/Select.vue +0 -576
- package/dist/components/select/SelectInput.vue +0 -123
- package/dist/components/select/SelectTags.vue +0 -58
- package/dist/components/select/adapter/adapter.d.ts +0 -17
- package/dist/components/select/adapter/adapter.mjs +0 -20
- package/dist/components/select/adapter/async-adapter.d.ts +0 -17
- package/dist/components/select/adapter/async-adapter.mjs +0 -61
- package/dist/components/select/adapter/basic-adapter.d.ts +0 -5
- package/dist/components/select/adapter/basic-adapter.mjs +0 -13
- package/dist/components/select/adapter/fuzzy-adapter.d.ts +0 -2
- package/dist/components/select/adapter/fuzzy-adapter.mjs +0 -24
- package/dist/components/select/index.d.ts +0 -15
- package/dist/components/select/index.mjs +0 -20
- package/dist/components/select/utils/use-on-scroll.d.ts +0 -2
- package/dist/components/select/utils/use-on-scroll.mjs +0 -9
- package/dist/components/select/utils/use-on-typing.d.ts +0 -3
- package/dist/components/select/utils/use-on-typing.mjs +0 -8
- package/dist/components/sheet/Sheet.vue +0 -230
- package/dist/components/shimmer/Shimmer.vue +0 -123
- package/dist/components/shimmer/index.d.ts +0 -2
- package/dist/components/shimmer/index.mjs +0 -10
- package/dist/components/sidebar/Sidebar.vue +0 -249
- package/dist/components/sidebar/SidebarBrand.vue +0 -108
- package/dist/components/sidebar/SidebarContent.vue +0 -21
- package/dist/components/sidebar/SidebarContent.vue.d.ts +0 -16
- package/dist/components/sidebar/SidebarNav.vue +0 -260
- package/dist/components/sidebar/index.d.ts +0 -9
- package/dist/components/sidebar/index.mjs +0 -1
- package/dist/components/sidebar-menu/SidebarMenu.vue +0 -123
- package/dist/components/sidebar-menu/SidebarMenuItem.vue +0 -70
- package/dist/components/sidebar-menu/index.d.ts +0 -138
- package/dist/components/sidebar-menu/index.mjs +0 -44
- package/dist/components/signature-draw/SignatureDraw.vue +0 -101
- package/dist/components/signature-draw/SignatureDrawDesktop.vue +0 -165
- package/dist/components/signature-draw/SignatureDrawMobile.vue +0 -244
- package/dist/components/signature-draw/utils/canvas.d.ts +0 -41
- package/dist/components/signature-draw/utils/canvas.mjs +0 -55
- package/dist/components/signature-draw/utils/image.d.ts +0 -7
- package/dist/components/signature-draw/utils/image.mjs +0 -23
- package/dist/components/signature-draw/utils/smooth-line.d.ts +0 -36
- package/dist/components/signature-draw/utils/smooth-line.mjs +0 -56
- package/dist/components/signature-draw/utils/straight-line.d.ts +0 -8
- package/dist/components/signature-draw/utils/straight-line.mjs +0 -24
- package/dist/components/signature-draw/utils/use-draw.d.ts +0 -7
- package/dist/components/signature-draw/utils/use-draw.mjs +0 -29
- package/dist/components/signature-text/SignatureText.vue +0 -138
- package/dist/components/signature-text/utils/formatter.d.ts +0 -2
- package/dist/components/signature-text/utils/formatter.mjs +0 -8
- package/dist/components/signature-text/utils/generate-text.d.ts +0 -8
- package/dist/components/signature-text/utils/generate-text.mjs +0 -28
- package/dist/components/signature-text/utils/load-font.d.ts +0 -1
- package/dist/components/signature-text/utils/load-font.mjs +0 -22
- package/dist/components/spinner/Spinner.vue +0 -156
- package/dist/components/spinner/SpinnerRing.vue +0 -34
- package/dist/components/spinner/SpinnerRinggo.vue +0 -64
- package/dist/components/spread/Spread.vue +0 -52
- package/dist/components/steps/Step.vue +0 -49
- package/dist/components/steps/StepSlider.vue +0 -37
- package/dist/components/steps/StepSlider.vue.d.ts +0 -34
- package/dist/components/steps/Steps.vue +0 -150
- package/dist/components/steps/index.d.ts +0 -30
- package/dist/components/steps/index.mjs +0 -53
- package/dist/components/steps/utils/hook.d.ts +0 -10
- package/dist/components/steps/utils/hook.mjs +0 -35
- package/dist/components/strengthbar/Strengthbar.vue +0 -97
- package/dist/components/subheading/Subheading.vue +0 -148
- package/dist/components/subheading/index.d.ts +0 -1
- package/dist/components/subheading/index.mjs +0 -0
- package/dist/components/table/Table.vue +0 -391
- package/dist/components/table/Table.vue.d.ts +0 -174
- package/dist/components/table/index.d.ts +0 -49
- package/dist/components/table/index.mjs +0 -37
- package/dist/components/table-flex/TableFlex.vue +0 -341
- package/dist/components/table-static/TableStatic.vue +0 -458
- package/dist/components/table-static/TableStaticRoot.vue +0 -42
- package/dist/components/table-static/TableStaticSort.vue +0 -23
- package/dist/components/table-static/index.d.ts +0 -64
- package/dist/components/table-static/index.mjs +0 -24
- package/dist/components/tabs/Tab.vue +0 -34
- package/dist/components/tabs/TabContent.vue +0 -53
- package/dist/components/tabs/TabContent.vue.d.ts +0 -33
- package/dist/components/tabs/Tabs.vue +0 -234
- package/dist/components/text/Text.vue +0 -235
- package/dist/components/text/index.d.ts +0 -2
- package/dist/components/text/index.mjs +0 -0
- package/dist/components/textarea/Textarea.vue +0 -188
- package/dist/components/time/Time.vue +0 -257
- package/dist/components/time/TimeItem.vue +0 -117
- package/dist/components/time/index.d.ts +0 -19
- package/dist/components/time/index.mjs +0 -53
- package/dist/components/time/utils/index.d.ts +0 -9
- package/dist/components/time/utils/index.mjs +0 -82
- package/dist/components/timepicker/Timepicker.vue +0 -230
- package/dist/components/toast/Toast.vue +0 -269
- package/dist/components/toast/index.d.ts +0 -50
- package/dist/components/toast/index.mjs +0 -44
- package/dist/components/toggle/Toggle.vue +0 -239
- package/dist/components/tooltip/Tooltip.vue +0 -172
- package/dist/components/tooltip/TooltipContainer.vue +0 -89
- package/dist/components/tooltip/index.d.ts +0 -17
- package/dist/components/tooltip/index.mjs +0 -113
- package/dist/components/tooltip/utils/create-handler.d.ts +0 -9
- package/dist/components/tooltip/utils/create-handler.mjs +0 -16
- package/dist/components/tooltip/utils/on-hover.d.ts +0 -23
- package/dist/components/tooltip/utils/on-hover.mjs +0 -42
- package/dist/components/tooltip/utils/parse-bindings.d.ts +0 -23
- package/dist/components/tooltip/utils/parse-bindings.mjs +0 -47
- package/dist/components/tour/Tour.vue +0 -112
- package/dist/components/tour/TourDialog.vue +0 -207
- package/dist/components/tour/TourHighlight.vue +0 -58
- package/dist/components/tour/core/base.d.ts +0 -59
- package/dist/components/tour/core/base.mjs +0 -69
- package/dist/components/tour/core/step/action.d.ts +0 -15
- package/dist/components/tour/core/step/action.mjs +0 -14
- package/dist/components/tour/core/step/conditional.d.ts +0 -25
- package/dist/components/tour/core/step/conditional.mjs +0 -57
- package/dist/components/tour/core/step/delay.d.ts +0 -8
- package/dist/components/tour/core/step/delay.mjs +0 -9
- package/dist/components/tour/core/step/dialog.d.ts +0 -11
- package/dist/components/tour/core/step/dialog.mjs +0 -25
- package/dist/components/tour/core/step/visit.d.ts +0 -9
- package/dist/components/tour/core/step/visit.mjs +0 -15
- package/dist/components/tour/core/step.d.ts +0 -37
- package/dist/components/tour/core/step.mjs +0 -46
- package/dist/components/tour/core/story.d.ts +0 -130
- package/dist/components/tour/core/story.mjs +0 -166
- package/dist/components/tour/core/tour.d.ts +0 -126
- package/dist/components/tour/core/tour.mjs +0 -196
- package/dist/components/tour/index.d.ts +0 -3
- package/dist/components/tour/index.mjs +0 -4
- package/dist/components/tour/utils/focus.d.ts +0 -1
- package/dist/components/tour/utils/focus.mjs +0 -6
- package/dist/components/tour/utils/is-visible.d.ts +0 -1
- package/dist/components/tour/utils/is-visible.mjs +0 -29
- package/dist/components/tour/utils/wait-element.d.ts +0 -6
- package/dist/components/tour/utils/wait-element.mjs +0 -45
- package/dist/components/truncate/Truncate.vue +0 -75
- package/dist/components/utils/array.d.ts +0 -2
- package/dist/components/utils/array.mjs +0 -19
- package/dist/components/utils/base64.d.ts +0 -8
- package/dist/components/utils/base64.mjs +0 -35
- package/dist/components/utils/color.d.ts +0 -17
- package/dist/components/utils/color.mjs +0 -14
- package/dist/components/utils/date.d.ts +0 -22
- package/dist/components/utils/date.mjs +0 -14
- package/dist/components/utils/value.d.ts +0 -8
- package/dist/components/utils/value.mjs +0 -7
- package/dist/components/utils/vnode.d.ts +0 -15
- package/dist/components/utils/vnode.mjs +0 -18
- package/dist/components/wizard/Wizard.vue +0 -84
- package/dist/components/wizard/WizardBody.vue +0 -50
- package/dist/components/wizard/WizardHeader.vue +0 -38
- package/dist/components/wizard/WizardHeader.vue.d.ts +0 -16
- package/dist/components/wizard/WizardStep.vue +0 -31
- package/dist/core/index.d.ts +0 -43
- package/dist/core/index.mjs +0 -148
- package/dist/directive/index.d.ts +0 -3
- package/dist/directive/index.mjs +0 -12
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -27
- package/dist/runtime/plugins/persona.d.ts +0 -2
- package/dist/runtime/plugins/persona.js +0 -35
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const targetsMap = /* @__PURE__ */ new Map();
|
|
2
|
-
export function addHoverListener(target, opts) {
|
|
3
|
-
const delay = Number.isFinite(opts.delay) ? opts.delay : 0;
|
|
4
|
-
const debounce = Number.isFinite(opts.debounced) ? opts.debounced : 500;
|
|
5
|
-
const context = {
|
|
6
|
-
isHovered: false,
|
|
7
|
-
onMouseEnter(event) {
|
|
8
|
-
if (context.onHoverOutTimeout)
|
|
9
|
-
clearTimeout(context.onHoverOutTimeout);
|
|
10
|
-
if (!context.isHovered) {
|
|
11
|
-
if (context.onHoverInTimeout)
|
|
12
|
-
clearTimeout(context.onHoverInTimeout);
|
|
13
|
-
context.onHoverInTimeout = setTimeout(() => {
|
|
14
|
-
opts.onHoverIn(event);
|
|
15
|
-
context.isHovered = true;
|
|
16
|
-
}, delay);
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
onMouseLeave(event) {
|
|
20
|
-
if (context.onHoverOutTimeout)
|
|
21
|
-
clearTimeout(context.onHoverOutTimeout);
|
|
22
|
-
if (!context.isHovered && context.onHoverInTimeout)
|
|
23
|
-
clearTimeout(context.onHoverInTimeout);
|
|
24
|
-
if (context.isHovered) {
|
|
25
|
-
context.onHoverOutTimeout = setTimeout(() => {
|
|
26
|
-
opts.onHoverOut(event);
|
|
27
|
-
context.isHovered = false;
|
|
28
|
-
}, debounce);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
target.addEventListener("mouseenter", context.onMouseEnter, { passive: true });
|
|
33
|
-
target.addEventListener("mouseleave", context.onMouseLeave, { passive: true });
|
|
34
|
-
targetsMap.set(target, context);
|
|
35
|
-
}
|
|
36
|
-
export function removeHoverListener(target) {
|
|
37
|
-
const context = targetsMap.get(target);
|
|
38
|
-
if (context) {
|
|
39
|
-
target.removeEventListener("mouseenter", context.onMouseEnter);
|
|
40
|
-
target.removeEventListener("mouseleave", context.onMouseLeave);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Placement } from '@floating-ui/dom';
|
|
2
|
-
import type { DirectiveBinding } from 'vue-demi';
|
|
3
|
-
import type { ColorVariant } from '..';
|
|
4
|
-
/**
|
|
5
|
-
* Parse placement from modifier
|
|
6
|
-
*/
|
|
7
|
-
export declare function parsePlacement(_el: HTMLElement, { modifiers }: DirectiveBinding): Placement;
|
|
8
|
-
/**
|
|
9
|
-
* Parse action from modifier
|
|
10
|
-
*/
|
|
11
|
-
export declare function parseAction(_el: HTMLElement, { modifiers }: DirectiveBinding): string;
|
|
12
|
-
/**
|
|
13
|
-
* Parse value from element or bindings value
|
|
14
|
-
* @param el binding element
|
|
15
|
-
* @param bindings directive bindings options
|
|
16
|
-
*/
|
|
17
|
-
export declare function parseText(el: HTMLElement, bindings: DirectiveBinding<string | boolean>): string;
|
|
18
|
-
/**
|
|
19
|
-
* Parse color from modifiers
|
|
20
|
-
* @param _el (unused)
|
|
21
|
-
* @param bindings directive bindings options
|
|
22
|
-
*/
|
|
23
|
-
export declare function parseColor(_el: HTMLElement, { modifiers }: DirectiveBinding): ColorVariant;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export function parsePlacement(_el, { modifiers }) {
|
|
2
|
-
let result;
|
|
3
|
-
if (modifiers.top)
|
|
4
|
-
result = "top";
|
|
5
|
-
else if (modifiers.bottom)
|
|
6
|
-
result = "bottom";
|
|
7
|
-
if (result) {
|
|
8
|
-
if (modifiers.left)
|
|
9
|
-
result = `${result}-start`;
|
|
10
|
-
else if (modifiers.right)
|
|
11
|
-
result = `${result}-end`;
|
|
12
|
-
} else {
|
|
13
|
-
if (modifiers.right)
|
|
14
|
-
result = "right";
|
|
15
|
-
else if (modifiers.left)
|
|
16
|
-
result = "left";
|
|
17
|
-
}
|
|
18
|
-
if (!result)
|
|
19
|
-
result = "top";
|
|
20
|
-
if (modifiers.start && !result.endsWith("start"))
|
|
21
|
-
result = `${result}-start`;
|
|
22
|
-
else if (modifiers.end && !result.endsWith("end"))
|
|
23
|
-
result = `${result}-end`;
|
|
24
|
-
return result;
|
|
25
|
-
}
|
|
26
|
-
export function parseAction(_el, { modifiers }) {
|
|
27
|
-
const result = [];
|
|
28
|
-
if (modifiers.manual)
|
|
29
|
-
result.push("manual");
|
|
30
|
-
if (modifiers.focus)
|
|
31
|
-
result.push("focus");
|
|
32
|
-
if (modifiers.hover)
|
|
33
|
-
result.push("hover");
|
|
34
|
-
if (modifiers.click)
|
|
35
|
-
result.push("click");
|
|
36
|
-
return result.join("-") || "focus-hover";
|
|
37
|
-
}
|
|
38
|
-
export function parseText(el, bindings) {
|
|
39
|
-
if (typeof bindings.value === "string")
|
|
40
|
-
return bindings.value;
|
|
41
|
-
if (el.hasAttribute("title"))
|
|
42
|
-
return el.getAttribute("title");
|
|
43
|
-
return el.dataset.tooltipText ?? "";
|
|
44
|
-
}
|
|
45
|
-
export function parseColor(_el, { modifiers }) {
|
|
46
|
-
return modifiers.white ? "white" : "black";
|
|
47
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="tour">
|
|
4
|
-
<TransitionGroup name="fade">
|
|
5
|
-
<TourHighlight
|
|
6
|
-
v-if="isShow"
|
|
7
|
-
:target="target" />
|
|
8
|
-
<TourDialog
|
|
9
|
-
v-if="isShow"
|
|
10
|
-
ref="dialog"
|
|
11
|
-
v-bind="config" />
|
|
12
|
-
</transitiongroup>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts" setup>
|
|
17
|
-
import {
|
|
18
|
-
computed,
|
|
19
|
-
ref,
|
|
20
|
-
shallowRef,
|
|
21
|
-
watchEffect,
|
|
22
|
-
onBeforeUnmount,
|
|
23
|
-
} from 'vue-demi'
|
|
24
|
-
import TourDialog from './TourDialog.vue'
|
|
25
|
-
import TourHighlight from './TourHighlight.vue'
|
|
26
|
-
import {
|
|
27
|
-
autoUpdate,
|
|
28
|
-
computePosition,
|
|
29
|
-
shift,
|
|
30
|
-
autoPlacement,
|
|
31
|
-
inline,
|
|
32
|
-
offset,
|
|
33
|
-
hide as hidden,
|
|
34
|
-
} from '@floating-ui/dom'
|
|
35
|
-
|
|
36
|
-
type TourDialogProps = Partial<InstanceType<typeof TourDialog>['$props']>
|
|
37
|
-
|
|
38
|
-
const isShow = ref(false)
|
|
39
|
-
const dialog = shallowRef<InstanceType<typeof TourDialog>>()
|
|
40
|
-
const target = shallowRef<HTMLElement>()
|
|
41
|
-
const config = shallowRef<TourDialogProps>()
|
|
42
|
-
const tour = computed<HTMLElement>(() => dialog.value?.$el)
|
|
43
|
-
|
|
44
|
-
watchEffect((onCleanup) => {
|
|
45
|
-
if (target.value && tour.value) {
|
|
46
|
-
const cleanup = autoUpdate(target.value, tour.value, async () => {
|
|
47
|
-
computePosition(target.value, tour.value, {
|
|
48
|
-
strategy : 'absolute',
|
|
49
|
-
middleware: [
|
|
50
|
-
autoPlacement({ altBoundary: true }),
|
|
51
|
-
shift({ padding: 16 }),
|
|
52
|
-
inline(),
|
|
53
|
-
hidden(),
|
|
54
|
-
offset(16),
|
|
55
|
-
],
|
|
56
|
-
}).then(({ x, y, middlewareData }) => {
|
|
57
|
-
if (tour.value) {
|
|
58
|
-
tour.value.style.transform = `translate3d(${x || 0}px, ${y || 0}px, 0)`
|
|
59
|
-
tour.value.style.visibility = middlewareData.hide.referenceHidden
|
|
60
|
-
? 'hidden'
|
|
61
|
-
: 'visible'
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
}, { animationFrame: true })
|
|
65
|
-
|
|
66
|
-
onCleanup(cleanup)
|
|
67
|
-
}
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
watchEffect((onCleanup) => {
|
|
71
|
-
if (isShow.value)
|
|
72
|
-
document.body.classList.add('tour--active')
|
|
73
|
-
|
|
74
|
-
onCleanup(() => {
|
|
75
|
-
document.body.classList.remove('tour--active')
|
|
76
|
-
})
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
function show (targetEl: HTMLElement, options: TourDialogProps) {
|
|
80
|
-
target.value = targetEl
|
|
81
|
-
config.value = options
|
|
82
|
-
isShow.value = true
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function hide () {
|
|
86
|
-
isShow.value = false
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
onBeforeUnmount(() => {
|
|
90
|
-
hide()
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
defineExpose({
|
|
94
|
-
show,
|
|
95
|
-
hide,
|
|
96
|
-
})
|
|
97
|
-
</script>
|
|
98
|
-
|
|
99
|
-
<style lang="postcss">
|
|
100
|
-
.tour {
|
|
101
|
-
--p-tour-z-index: theme(zIndex.tour.DEFAULT);
|
|
102
|
-
--p-tour-backdrop-z-index: theme(zIndex.tour.backdrop);
|
|
103
|
-
|
|
104
|
-
& > &__dialog {
|
|
105
|
-
@apply absolute top-0 left-0;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&--active {
|
|
109
|
-
@apply overflow-hidden;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
</style>
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="tour__dialog"
|
|
4
|
-
:class="{ 'tour--image': !!image }"
|
|
5
|
-
data-testid="tour-dialog">
|
|
6
|
-
<span
|
|
7
|
-
v-if="dismissable"
|
|
8
|
-
data-testid="tour-dismiss"
|
|
9
|
-
class="tour__dismiss"
|
|
10
|
-
@click="$emit('dismiss', $event)">
|
|
11
|
-
<IconClose />
|
|
12
|
-
</span>
|
|
13
|
-
<img
|
|
14
|
-
v-if="image"
|
|
15
|
-
class="tour__image"
|
|
16
|
-
data-testid="tour-image"
|
|
17
|
-
:src="image"
|
|
18
|
-
alt="tour-image"
|
|
19
|
-
width="320"
|
|
20
|
-
height="195">
|
|
21
|
-
<div class="tour__body">
|
|
22
|
-
<p-subheading
|
|
23
|
-
v-if="title"
|
|
24
|
-
class="tour__title"
|
|
25
|
-
size="sm">
|
|
26
|
-
<span
|
|
27
|
-
v-p-md.inline="title"
|
|
28
|
-
data-testid="tour-title" />
|
|
29
|
-
</p-subheading>
|
|
30
|
-
<p-caption>
|
|
31
|
-
<span
|
|
32
|
-
v-p-md.inline="text"
|
|
33
|
-
data-testid="tour-text" />
|
|
34
|
-
</p-caption>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="tour__footer">
|
|
37
|
-
<div
|
|
38
|
-
v-if="totalStep > 2"
|
|
39
|
-
class="tour__meta"
|
|
40
|
-
data-testid="tour-meta">
|
|
41
|
-
{{ step }} / {{ totalStep }}
|
|
42
|
-
</div>
|
|
43
|
-
<div class="tour__controls">
|
|
44
|
-
<template v-if="dismissable && step < totalStep">
|
|
45
|
-
<p-button
|
|
46
|
-
data-testid="tour-control-dismiss"
|
|
47
|
-
size="xs"
|
|
48
|
-
variant="link"
|
|
49
|
-
@click="$emit('dismiss', $event)">
|
|
50
|
-
{{ dismissLabel }}
|
|
51
|
-
</p-button>
|
|
52
|
-
<span class="tour__divider">•</span>
|
|
53
|
-
</template>
|
|
54
|
-
|
|
55
|
-
<p-button
|
|
56
|
-
data-testid="tour-control-prev"
|
|
57
|
-
size="xs"
|
|
58
|
-
variant="link"
|
|
59
|
-
:disabled="step < 2"
|
|
60
|
-
@click="$emit('prev', $event)">
|
|
61
|
-
{{ prevLabel }}
|
|
62
|
-
</p-button>
|
|
63
|
-
|
|
64
|
-
<p-button
|
|
65
|
-
v-if="step === totalStep"
|
|
66
|
-
data-testid="tour-control-finish"
|
|
67
|
-
size="xs"
|
|
68
|
-
variant="solid"
|
|
69
|
-
color="info"
|
|
70
|
-
@click="$emit('next', $event)">
|
|
71
|
-
{{ finishLabel }}
|
|
72
|
-
</p-button>
|
|
73
|
-
<p-button
|
|
74
|
-
v-else
|
|
75
|
-
data-testid="tour-control-next"
|
|
76
|
-
size="xs"
|
|
77
|
-
variant="solid"
|
|
78
|
-
color="info"
|
|
79
|
-
@click="$emit('next', $event)">
|
|
80
|
-
{{ nextLabel }}
|
|
81
|
-
</p-button>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
|
86
|
-
|
|
87
|
-
<script lang="ts" setup>
|
|
88
|
-
import pSubheading from '../subheading/Subheading.vue'
|
|
89
|
-
import pCaption from '../caption/Caption.vue'
|
|
90
|
-
import pButton from '../button/Button.vue'
|
|
91
|
-
import { vPMd } from '../markdown'
|
|
92
|
-
import IconClose from '@privyid/persona-icon/vue/close/16.vue'
|
|
93
|
-
|
|
94
|
-
defineProps({
|
|
95
|
-
title: {
|
|
96
|
-
type : String,
|
|
97
|
-
default: undefined,
|
|
98
|
-
},
|
|
99
|
-
text: {
|
|
100
|
-
type : String,
|
|
101
|
-
default: '',
|
|
102
|
-
},
|
|
103
|
-
image: {
|
|
104
|
-
type : String,
|
|
105
|
-
default: undefined,
|
|
106
|
-
},
|
|
107
|
-
highlight: {
|
|
108
|
-
type : Boolean,
|
|
109
|
-
default: true,
|
|
110
|
-
},
|
|
111
|
-
step: {
|
|
112
|
-
type : Number,
|
|
113
|
-
default: 0,
|
|
114
|
-
},
|
|
115
|
-
totalStep: {
|
|
116
|
-
type : Number,
|
|
117
|
-
default: 0,
|
|
118
|
-
},
|
|
119
|
-
dismissable: {
|
|
120
|
-
type : Boolean,
|
|
121
|
-
default: true,
|
|
122
|
-
},
|
|
123
|
-
prevLabel: {
|
|
124
|
-
type : String,
|
|
125
|
-
default: 'Previous',
|
|
126
|
-
},
|
|
127
|
-
nextLabel: {
|
|
128
|
-
type : String,
|
|
129
|
-
default: 'Next',
|
|
130
|
-
},
|
|
131
|
-
dismissLabel: {
|
|
132
|
-
type : String,
|
|
133
|
-
default: 'Dismiss',
|
|
134
|
-
},
|
|
135
|
-
finishLabel: {
|
|
136
|
-
type : String,
|
|
137
|
-
default: 'Finish',
|
|
138
|
-
},
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
defineEmits<{
|
|
142
|
-
'prev': [MouseEvent],
|
|
143
|
-
'next': [MouseEvent],
|
|
144
|
-
'dismiss': [MouseEvent],
|
|
145
|
-
}>()
|
|
146
|
-
</script>
|
|
147
|
-
|
|
148
|
-
<style lang="postcss">
|
|
149
|
-
.tour {
|
|
150
|
-
&__dialog {
|
|
151
|
-
@apply z-[var(--p-tour-z-index)] rounded bg-inverse w-full max-w-xs overflow-hidden relative shadow-sm;
|
|
152
|
-
@apply dark:bg-dark-inverse;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&__image {
|
|
156
|
-
@apply max-w-full h-auto object-cover bg-default;
|
|
157
|
-
@apply dark:bg-dark-default;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
&__body {
|
|
161
|
-
@apply p-4 space-y-3;
|
|
162
|
-
|
|
163
|
-
.tour__title {
|
|
164
|
-
@apply text-on-emphasis;
|
|
165
|
-
@apply dark:text-dark-on-emphasis;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
> * {
|
|
169
|
-
@apply text-on-emphasis;
|
|
170
|
-
@apply dark:text-dark-on-emphasis;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
&__footer {
|
|
175
|
-
@apply p-4 pt-2 space-x-3 flex items-center;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&__meta {
|
|
179
|
-
@apply text-xs text-muted shrink-0;
|
|
180
|
-
@apply dark:text-dark-muted;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
&__controls {
|
|
184
|
-
@apply grow flex space-x-2 justify-end items-center;
|
|
185
|
-
|
|
186
|
-
> .btn--variant-link.btn--default {
|
|
187
|
-
@apply text-on-emphasis hover:text-on-emphasis focus:text-on-emphasis;
|
|
188
|
-
@apply dark:text-dark-on-emphasis hover:dark:text-dark-on-emphasis focus:dark:text-dark-on-emphasis;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
> .tour__divider {
|
|
192
|
-
@apply text-on-emphasis;
|
|
193
|
-
@apply dark:text-dark-on-emphasis;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&__dismiss {
|
|
198
|
-
@apply absolute top-3 right-3 hover:cursor-pointer text-on-emphasis/30 hover:text-on-emphasis/50;
|
|
199
|
-
@apply dark:text-dark-on-emphasis/30 hover:dark:text-dark-on-emphasis/50;
|
|
200
|
-
|
|
201
|
-
.tour--image & {
|
|
202
|
-
@apply text-default/30 hover:text-default/50;
|
|
203
|
-
@apply dark:text-dark-default/30 hover:dark:text-dark-default/50;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
</style>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tour__backdrop">
|
|
3
|
-
<div
|
|
4
|
-
ref="highlight"
|
|
5
|
-
class="tour__highlight"
|
|
6
|
-
v-bind="$attrs" />
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script lang="ts" setup>
|
|
11
|
-
import type { PropType } from 'vue-demi'
|
|
12
|
-
import {
|
|
13
|
-
ref,
|
|
14
|
-
toRef,
|
|
15
|
-
watchEffect,
|
|
16
|
-
} from 'vue-demi'
|
|
17
|
-
import { autoUpdate } from '@floating-ui/dom'
|
|
18
|
-
|
|
19
|
-
defineOptions({ inheritAttrs: false })
|
|
20
|
-
|
|
21
|
-
const props = defineProps({
|
|
22
|
-
target: {
|
|
23
|
-
type : Object as PropType<HTMLElement>,
|
|
24
|
-
default: undefined,
|
|
25
|
-
},
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const target = toRef(props, 'target')
|
|
29
|
-
const highlight = ref<HTMLDivElement>()
|
|
30
|
-
|
|
31
|
-
watchEffect((onCleanup) => {
|
|
32
|
-
if (highlight.value && target.value) {
|
|
33
|
-
const cleanup = autoUpdate(target.value, highlight.value, () => {
|
|
34
|
-
const bounding = target.value.getBoundingClientRect()
|
|
35
|
-
const padding = 16
|
|
36
|
-
|
|
37
|
-
highlight.value.style.width = `${bounding.width + padding}px`
|
|
38
|
-
highlight.value.style.height = `${bounding.height + padding}px`
|
|
39
|
-
highlight.value.style.left = `${bounding.left - padding / 2}px`
|
|
40
|
-
highlight.value.style.top = `${bounding.top - padding / 2}px`
|
|
41
|
-
}, { animationFrame: true })
|
|
42
|
-
|
|
43
|
-
onCleanup(cleanup)
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style lang="postcss">
|
|
49
|
-
.tour {
|
|
50
|
-
&__backdrop {
|
|
51
|
-
@apply fixed inset-0 overflow-hidden w-full h-full z-[var(--p-tour-backdrop-z-index)];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&__highlight {
|
|
55
|
-
@apply z-[var(--p-tour-z-index)] absolute shadow-mask cursor-pointer rounded-tn;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
</style>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Hook } from '../../steps/utils/hook';
|
|
2
|
-
export type TourActionHook = (to: AbstractTour, from: AbstractTour) => boolean | Promise<boolean>;
|
|
3
|
-
export declare enum TourDirection {
|
|
4
|
-
FORWARD = 1,
|
|
5
|
-
BACKWARD = -1
|
|
6
|
-
}
|
|
7
|
-
export interface BaseTourOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Uniq identifier, can be string or symbol
|
|
10
|
-
* use for edit and remove
|
|
11
|
-
*/
|
|
12
|
-
name?: string | symbol;
|
|
13
|
-
/**
|
|
14
|
-
* on-before-prev hook
|
|
15
|
-
*/
|
|
16
|
-
onBeforePrev?: TourActionHook;
|
|
17
|
-
/**
|
|
18
|
-
* on-before-next hook
|
|
19
|
-
*/
|
|
20
|
-
onBeforeNext?: TourActionHook;
|
|
21
|
-
}
|
|
22
|
-
export declare abstract class AbstractTour<Options extends BaseTourOptions = BaseTourOptions> {
|
|
23
|
-
name?: string | symbol;
|
|
24
|
-
/**
|
|
25
|
-
* Step direction, 1 for forward (next), -1 for backward (prev)
|
|
26
|
-
*/
|
|
27
|
-
protected direction: TourDirection;
|
|
28
|
-
protected parent?: AbstractTour;
|
|
29
|
-
protected options: Options;
|
|
30
|
-
protected onNextHooks: Hook<TourActionHook>;
|
|
31
|
-
protected onPrevHooks: Hook<TourActionHook>;
|
|
32
|
-
protected runOnPrevHooks: TourActionHook;
|
|
33
|
-
protected runOnNextHooks: TourActionHook;
|
|
34
|
-
constructor(options?: Options);
|
|
35
|
-
setParent(parent: AbstractTour): this;
|
|
36
|
-
/**
|
|
37
|
-
* Get options with parent options as fallback
|
|
38
|
-
*/
|
|
39
|
-
getOptions(): Options;
|
|
40
|
-
/**
|
|
41
|
-
* Set tour direction
|
|
42
|
-
* @param direction 1 for forward (next) and -1 for backward (prev)
|
|
43
|
-
*/
|
|
44
|
-
setDirection(direction: TourDirection): this;
|
|
45
|
-
/**
|
|
46
|
-
* Attach to parent
|
|
47
|
-
* @param parent Parent Instance
|
|
48
|
-
*/
|
|
49
|
-
attach(parent: AbstractTour): this;
|
|
50
|
-
/**
|
|
51
|
-
* Deattach from parent
|
|
52
|
-
* @param parent Parent Instance
|
|
53
|
-
*/
|
|
54
|
-
detach(parent: AbstractTour): this;
|
|
55
|
-
abstract start(): void | Promise<void>;
|
|
56
|
-
abstract stop(): void | Promise<void>;
|
|
57
|
-
abstract next(): void | Promise<void>;
|
|
58
|
-
abstract prev(): void | Promise<void>;
|
|
59
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import defu from "defu";
|
|
2
|
-
import { Hook } from "../../steps/utils/hook.mjs";
|
|
3
|
-
export var TourDirection = /* @__PURE__ */ ((TourDirection2) => {
|
|
4
|
-
TourDirection2[TourDirection2["FORWARD"] = 1] = "FORWARD";
|
|
5
|
-
TourDirection2[TourDirection2["BACKWARD"] = -1] = "BACKWARD";
|
|
6
|
-
return TourDirection2;
|
|
7
|
-
})(TourDirection || {});
|
|
8
|
-
export class AbstractTour {
|
|
9
|
-
name;
|
|
10
|
-
/**
|
|
11
|
-
* Step direction, 1 for forward (next), -1 for backward (prev)
|
|
12
|
-
*/
|
|
13
|
-
direction;
|
|
14
|
-
parent;
|
|
15
|
-
options;
|
|
16
|
-
onNextHooks;
|
|
17
|
-
onPrevHooks;
|
|
18
|
-
runOnPrevHooks;
|
|
19
|
-
runOnNextHooks;
|
|
20
|
-
constructor(options) {
|
|
21
|
-
this.direction = 1 /* FORWARD */;
|
|
22
|
-
this.name = options?.name ?? Symbol("TourID");
|
|
23
|
-
this.options = options;
|
|
24
|
-
this.onPrevHooks = new Hook();
|
|
25
|
-
this.onNextHooks = new Hook();
|
|
26
|
-
if (typeof options?.onBeforePrev === "function")
|
|
27
|
-
this.onPrevHooks.add(options.onBeforePrev);
|
|
28
|
-
if (typeof options?.onBeforeNext === "function")
|
|
29
|
-
this.onNextHooks.add(options.onBeforeNext);
|
|
30
|
-
this.runOnPrevHooks = async (...args) => await this.onPrevHooks.run(...args);
|
|
31
|
-
this.runOnNextHooks = async (...args) => await this.onNextHooks.run(...args);
|
|
32
|
-
}
|
|
33
|
-
setParent(parent) {
|
|
34
|
-
this.parent = parent;
|
|
35
|
-
return this;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Get options with parent options as fallback
|
|
39
|
-
*/
|
|
40
|
-
getOptions() {
|
|
41
|
-
return defu(this.options, this.parent?.getOptions());
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Set tour direction
|
|
45
|
-
* @param direction 1 for forward (next) and -1 for backward (prev)
|
|
46
|
-
*/
|
|
47
|
-
setDirection(direction) {
|
|
48
|
-
this.direction = direction;
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Attach to parent
|
|
53
|
-
* @param parent Parent Instance
|
|
54
|
-
*/
|
|
55
|
-
attach(parent) {
|
|
56
|
-
parent.onPrevHooks.add(this.runOnPrevHooks);
|
|
57
|
-
parent.onNextHooks.add(this.runOnNextHooks);
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Deattach from parent
|
|
62
|
-
* @param parent Parent Instance
|
|
63
|
-
*/
|
|
64
|
-
detach(parent) {
|
|
65
|
-
parent.onPrevHooks.remove(this.runOnPrevHooks);
|
|
66
|
-
parent.onNextHooks.remove(this.runOnNextHooks);
|
|
67
|
-
return this;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
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 {};
|