@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,28 +0,0 @@
|
|
|
1
|
-
import { createCanvas } from "../../signature-draw/utils/canvas.mjs";
|
|
2
|
-
import loadFont from "./load-font.mjs";
|
|
3
|
-
export default async function generate(options, dpi = 1) {
|
|
4
|
-
await loadFont(options.font);
|
|
5
|
-
const text = options.text;
|
|
6
|
-
const width = options.width;
|
|
7
|
-
const height = options.height;
|
|
8
|
-
const color = options.color;
|
|
9
|
-
const font = options.font;
|
|
10
|
-
const canvas = createCanvas(width, height, dpi);
|
|
11
|
-
const context = canvas.getContext("2d");
|
|
12
|
-
context.fillStyle = color;
|
|
13
|
-
context.font = `100px ${font}`;
|
|
14
|
-
context.textBaseline = "middle";
|
|
15
|
-
let size = 100;
|
|
16
|
-
let measure = context.measureText(text);
|
|
17
|
-
if (measure.width > width) {
|
|
18
|
-
size = Math.floor(size / measure.width * (width - 16));
|
|
19
|
-
context.font = `${size}px ${font}`;
|
|
20
|
-
measure = context.measureText(text);
|
|
21
|
-
} else if (size >= height) {
|
|
22
|
-
size = height - 16;
|
|
23
|
-
context.font = `${size}px ${font}`;
|
|
24
|
-
measure = context.measureText(text);
|
|
25
|
-
}
|
|
26
|
-
context.fillText(text, (width - measure.width) / 2, height / 2 + 16);
|
|
27
|
-
return canvas.toDataURL();
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function loadFont(font: string): Promise<void>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import PQueue from "../../global/utils/queue.mjs";
|
|
2
|
-
const queue = new PQueue();
|
|
3
|
-
const loadedFont = /* @__PURE__ */ new Set();
|
|
4
|
-
export default async function loadFont(font) {
|
|
5
|
-
return await queue.add(async () => {
|
|
6
|
-
if (!loadedFont.has(font)) {
|
|
7
|
-
const WebFont = await import("webfontloader");
|
|
8
|
-
return await new Promise((resolve, reject) => {
|
|
9
|
-
WebFont.load({
|
|
10
|
-
google: { families: [font] },
|
|
11
|
-
fontactive() {
|
|
12
|
-
loadedFont.add(font);
|
|
13
|
-
resolve();
|
|
14
|
-
},
|
|
15
|
-
fontinactive() {
|
|
16
|
-
reject(new Error("FONTLOADER_TIMEOUT"));
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg
|
|
3
|
-
data-testid="spinner"
|
|
4
|
-
class="spinner spinner-basic"
|
|
5
|
-
width="1em"
|
|
6
|
-
height="1em"
|
|
7
|
-
viewBox="0 0 19 19"
|
|
8
|
-
fill="currentColor"
|
|
9
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
10
|
-
<rect
|
|
11
|
-
class="spinner-basic__bar"
|
|
12
|
-
x="8.125"
|
|
13
|
-
width="2.5"
|
|
14
|
-
height="6.25"
|
|
15
|
-
rx="1.25"
|
|
16
|
-
fill="currentColor"
|
|
17
|
-
fill-opacity="60%">
|
|
18
|
-
<animate
|
|
19
|
-
attributeName="opacity"
|
|
20
|
-
values="1;0"
|
|
21
|
-
keyTimes="0;1"
|
|
22
|
-
dur="1s"
|
|
23
|
-
begin="0"
|
|
24
|
-
repeatCount="indefinite" />
|
|
25
|
-
</rect>
|
|
26
|
-
<rect
|
|
27
|
-
class="spinner-basic__bar"
|
|
28
|
-
x="15.1202"
|
|
29
|
-
y="1.86199"
|
|
30
|
-
width="2.5"
|
|
31
|
-
height="6.25"
|
|
32
|
-
rx="1.25"
|
|
33
|
-
transform="rotate(45 15.1202 1.86199)"
|
|
34
|
-
fill="currentColor"
|
|
35
|
-
fill-opacity="60%">
|
|
36
|
-
<animate
|
|
37
|
-
attributeName="opacity"
|
|
38
|
-
values="1;0"
|
|
39
|
-
keyTimes="0;1"
|
|
40
|
-
dur="1s"
|
|
41
|
-
begin="0.125s"
|
|
42
|
-
repeatCount="indefinite" />
|
|
43
|
-
</rect>
|
|
44
|
-
<rect
|
|
45
|
-
class="spinner-basic__bar"
|
|
46
|
-
x="18.75"
|
|
47
|
-
y="8.125"
|
|
48
|
-
width="2.5"
|
|
49
|
-
height="6.25"
|
|
50
|
-
rx="1.25"
|
|
51
|
-
transform="rotate(90 18.75 8.125)"
|
|
52
|
-
fill="currentColor"
|
|
53
|
-
fill-opacity="60%">
|
|
54
|
-
<animate
|
|
55
|
-
attributeName="opacity"
|
|
56
|
-
values="1;0"
|
|
57
|
-
keyTimes="0;1"
|
|
58
|
-
dur="1s"
|
|
59
|
-
begin="0.250s"
|
|
60
|
-
repeatCount="indefinite" />
|
|
61
|
-
</rect>
|
|
62
|
-
<rect
|
|
63
|
-
class="spinner-basic__bar"
|
|
64
|
-
x="16.888"
|
|
65
|
-
y="15.1202"
|
|
66
|
-
width="2.5"
|
|
67
|
-
height="6.25"
|
|
68
|
-
rx="1.25"
|
|
69
|
-
transform="rotate(135 16.888 15.1202)"
|
|
70
|
-
fill="currentColor"
|
|
71
|
-
fill-opacity="60%">
|
|
72
|
-
<animate
|
|
73
|
-
attributeName="opacity"
|
|
74
|
-
values="1;0"
|
|
75
|
-
keyTimes="0;1"
|
|
76
|
-
dur="1s"
|
|
77
|
-
begin="0.375s"
|
|
78
|
-
repeatCount="indefinite" />
|
|
79
|
-
</rect>
|
|
80
|
-
<rect
|
|
81
|
-
class="spinner-basic__bar"
|
|
82
|
-
x="8.125"
|
|
83
|
-
y="12.5"
|
|
84
|
-
width="2.5"
|
|
85
|
-
height="6.25"
|
|
86
|
-
rx="1.25"
|
|
87
|
-
fill="currentColor"
|
|
88
|
-
fill-opacity="60%">
|
|
89
|
-
<animate
|
|
90
|
-
attributeName="opacity"
|
|
91
|
-
values="1;0"
|
|
92
|
-
keyTimes="0;1"
|
|
93
|
-
dur="1s"
|
|
94
|
-
begin="0.500s"
|
|
95
|
-
repeatCount="indefinite" />
|
|
96
|
-
</rect>
|
|
97
|
-
<rect
|
|
98
|
-
class="spinner-basic__bar"
|
|
99
|
-
x="6.2814"
|
|
100
|
-
y="10.7008"
|
|
101
|
-
width="2.5"
|
|
102
|
-
height="6.25"
|
|
103
|
-
rx="1.25"
|
|
104
|
-
transform="rotate(45 6.2814 10.7008)"
|
|
105
|
-
fill="currentColor"
|
|
106
|
-
fill-opacity="60%">
|
|
107
|
-
<animate
|
|
108
|
-
attributeName="opacity"
|
|
109
|
-
values="1;0"
|
|
110
|
-
keyTimes="0;1"
|
|
111
|
-
dur="1s"
|
|
112
|
-
begin="0.625s"
|
|
113
|
-
repeatCount="indefinite" />
|
|
114
|
-
</rect>
|
|
115
|
-
<rect
|
|
116
|
-
class="spinner-basic__bar"
|
|
117
|
-
x="6.25"
|
|
118
|
-
y="8.125"
|
|
119
|
-
width="2.5"
|
|
120
|
-
height="6.25"
|
|
121
|
-
rx="1.25"
|
|
122
|
-
transform="rotate(90 6.25 8.125)"
|
|
123
|
-
fill="currentColor"
|
|
124
|
-
fill-opacity="60%">
|
|
125
|
-
<animate
|
|
126
|
-
attributeName="opacity"
|
|
127
|
-
values="1;0"
|
|
128
|
-
keyTimes="0;1"
|
|
129
|
-
dur="1s"
|
|
130
|
-
begin="0.750s"
|
|
131
|
-
repeatCount="indefinite" />
|
|
132
|
-
</rect>
|
|
133
|
-
<rect
|
|
134
|
-
class="spinner-basic__bar"
|
|
135
|
-
x="8.04917"
|
|
136
|
-
y="6.2814"
|
|
137
|
-
width="2.5"
|
|
138
|
-
height="6.25"
|
|
139
|
-
rx="1.25"
|
|
140
|
-
transform="rotate(135 8.04917 6.2814)"
|
|
141
|
-
fill="currentColor"
|
|
142
|
-
fill-opacity="60%">
|
|
143
|
-
<animate
|
|
144
|
-
attributeName="opacity"
|
|
145
|
-
values="1;0"
|
|
146
|
-
keyTimes="0;1"
|
|
147
|
-
dur="1s"
|
|
148
|
-
begin="0.875s"
|
|
149
|
-
repeatCount="indefinite" />
|
|
150
|
-
</rect>
|
|
151
|
-
</svg>
|
|
152
|
-
</template>
|
|
153
|
-
|
|
154
|
-
<script lang="ts" setup>
|
|
155
|
-
//
|
|
156
|
-
</script>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg
|
|
3
|
-
data-testid="spinner"
|
|
4
|
-
class="spinner spinner--ring"
|
|
5
|
-
width="1em"
|
|
6
|
-
height="1em"
|
|
7
|
-
viewBox="0 0 18 18"
|
|
8
|
-
fill="currentColor"
|
|
9
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
10
|
-
<circle
|
|
11
|
-
cx="9"
|
|
12
|
-
cy="9"
|
|
13
|
-
r="8"
|
|
14
|
-
stroke-dasharray="50.2654825"
|
|
15
|
-
stroke-dashoffset="10"
|
|
16
|
-
stroke-linecap="round"
|
|
17
|
-
stroke-width="2px"
|
|
18
|
-
fill="transparent"
|
|
19
|
-
stroke="currentColor">
|
|
20
|
-
<animateTransform
|
|
21
|
-
attributeType="xml"
|
|
22
|
-
attributeName="transform"
|
|
23
|
-
type="rotate"
|
|
24
|
-
from="0 9 9"
|
|
25
|
-
to="360 9 9"
|
|
26
|
-
dur="1s"
|
|
27
|
-
repeatCount="indefinite" />
|
|
28
|
-
</circle>
|
|
29
|
-
</svg>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script lang="ts" setup>
|
|
33
|
-
//
|
|
34
|
-
</script>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg
|
|
3
|
-
data-testid="spinner"
|
|
4
|
-
class="spinner spinner--ringgo"
|
|
5
|
-
width="1em"
|
|
6
|
-
height="1em"
|
|
7
|
-
viewBox="0 0 18 18"
|
|
8
|
-
xmlns="http://www.w3.org/2000/svg">
|
|
9
|
-
<circle
|
|
10
|
-
class="spinner-ringgo__track"
|
|
11
|
-
cx="9"
|
|
12
|
-
cy="9"
|
|
13
|
-
r="8"
|
|
14
|
-
fill="transparent"
|
|
15
|
-
stroke-width="2px"
|
|
16
|
-
stroke-opacity="10%"
|
|
17
|
-
stroke="currentColor" />
|
|
18
|
-
<g>
|
|
19
|
-
<circle
|
|
20
|
-
class="spinner-ringgo__ring"
|
|
21
|
-
cx="9"
|
|
22
|
-
cy="9"
|
|
23
|
-
r="8"
|
|
24
|
-
stroke-dasharray="50.2654825"
|
|
25
|
-
stroke-linecap="round"
|
|
26
|
-
stroke-width="2px"
|
|
27
|
-
fill="transparent"
|
|
28
|
-
stroke="currentColor">
|
|
29
|
-
<animate
|
|
30
|
-
attributeName="stroke-dashoffset"
|
|
31
|
-
values="45.2389342;5.02654825;45.2389342"
|
|
32
|
-
keyTimes="0;.5;1"
|
|
33
|
-
dur="1.5s"
|
|
34
|
-
repeatCount="indefinite"
|
|
35
|
-
calcMode="spline"
|
|
36
|
-
keySplines="0.4 0 0.2 1; 0.4 0 0.2 1" />
|
|
37
|
-
<animateTransform
|
|
38
|
-
attributeType="xml"
|
|
39
|
-
attributeName="transform"
|
|
40
|
-
type="rotate"
|
|
41
|
-
values="0 9 9;45 9 9;360 9 9"
|
|
42
|
-
dur="1.5s"
|
|
43
|
-
repeatCount="indefinite"
|
|
44
|
-
calcMode="spline"
|
|
45
|
-
keySplines="0.4 0 0.2 1; 0.4 0 0.2 1" />
|
|
46
|
-
</circle>
|
|
47
|
-
<animateTransform
|
|
48
|
-
attributeType="xml"
|
|
49
|
-
attributeName="transform"
|
|
50
|
-
type="rotate"
|
|
51
|
-
from="0 9 9"
|
|
52
|
-
to="360 9 9"
|
|
53
|
-
dur="2s"
|
|
54
|
-
repeatCount="indefinite" />
|
|
55
|
-
</g>
|
|
56
|
-
</svg>
|
|
57
|
-
</template>
|
|
58
|
-
|
|
59
|
-
<script lang="ts" setup>
|
|
60
|
-
/**
|
|
61
|
-
* Special thank to: Glenn McComb
|
|
62
|
-
* https://glennmccomb.com/articles/building-a-pure-css-animated-svg-spinner/
|
|
63
|
-
*/
|
|
64
|
-
</script>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="spread"
|
|
4
|
-
data-testid="spread"
|
|
5
|
-
:class="{ 'spread--active': active }">
|
|
6
|
-
<template
|
|
7
|
-
v-for="i in 3"
|
|
8
|
-
:key="i">
|
|
9
|
-
<div
|
|
10
|
-
class="spread__item">
|
|
11
|
-
<slot />
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script lang="ts" setup>
|
|
18
|
-
defineProps({
|
|
19
|
-
active: {
|
|
20
|
-
type : Boolean,
|
|
21
|
-
default: false,
|
|
22
|
-
},
|
|
23
|
-
})
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<style lang="postcss">
|
|
27
|
-
.spread {
|
|
28
|
-
@apply relative flex;
|
|
29
|
-
|
|
30
|
-
&__item {
|
|
31
|
-
@apply will-change-transform;
|
|
32
|
-
|
|
33
|
-
&:nth-child(2) {
|
|
34
|
-
@apply z-[2];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&:nth-child(1),
|
|
38
|
-
&:nth-child(3) {
|
|
39
|
-
@apply opacity-25 absolute top-0 left-0 origin-bottom transition-transform z-1 will-change-transform;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&--active {
|
|
44
|
-
.spread__item:nth-child(1) {
|
|
45
|
-
@apply -translate-x-[60%] translate-y-1 -rotate-[20deg];
|
|
46
|
-
}
|
|
47
|
-
.spread__item:nth-child(3) {
|
|
48
|
-
@apply translate-x-[60%] translate-y-1 rotate-[20deg];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
</style>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="step"
|
|
4
|
-
data-testid="step">
|
|
5
|
-
<slot
|
|
6
|
-
:step="step"
|
|
7
|
-
:next="next"
|
|
8
|
-
:prev="prev"
|
|
9
|
-
:total="total"
|
|
10
|
-
:can-prev="canPrev"
|
|
11
|
-
:can-next="canNext"
|
|
12
|
-
:to-step="toStep" />
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts" setup>
|
|
17
|
-
import type { PropType } from 'vue-demi'
|
|
18
|
-
import type { TravelHook } from '.'
|
|
19
|
-
import { useStep } from '.'
|
|
20
|
-
|
|
21
|
-
defineOptions({ name: 'Step' })
|
|
22
|
-
|
|
23
|
-
const props = defineProps({
|
|
24
|
-
onBeforePrev: {
|
|
25
|
-
type : Function as PropType<TravelHook>,
|
|
26
|
-
default: () => true,
|
|
27
|
-
},
|
|
28
|
-
onBeforeNext: {
|
|
29
|
-
type : Function as PropType<TravelHook>,
|
|
30
|
-
default: () => true,
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
const {
|
|
35
|
-
canNext,
|
|
36
|
-
canPrev,
|
|
37
|
-
toStep,
|
|
38
|
-
step,
|
|
39
|
-
total,
|
|
40
|
-
next,
|
|
41
|
-
prev,
|
|
42
|
-
onBeforeNext: addOnBeforeNext,
|
|
43
|
-
onBeforePrev: addOnBeforePrev,
|
|
44
|
-
} = useStep()
|
|
45
|
-
|
|
46
|
-
// Registering Hooks
|
|
47
|
-
addOnBeforeNext(props.onBeforeNext)
|
|
48
|
-
addOnBeforePrev(props.onBeforePrev)
|
|
49
|
-
</script>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {
|
|
3
|
-
defineComponent,
|
|
4
|
-
h,
|
|
5
|
-
KeepAlive,
|
|
6
|
-
Transition
|
|
7
|
-
} from "vue-demi";
|
|
8
|
-
import { findAllChildren } from "../utils/vnode";
|
|
9
|
-
export default defineComponent({
|
|
10
|
-
props: {
|
|
11
|
-
active: {
|
|
12
|
-
type: Number,
|
|
13
|
-
default: 0
|
|
14
|
-
},
|
|
15
|
-
keepAlive: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: false
|
|
18
|
-
},
|
|
19
|
-
transition: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: "slide-left"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
setup(props, { slots }) {
|
|
25
|
-
return () => {
|
|
26
|
-
const step = findAllChildren(slots.default(), "Step").at(props.active);
|
|
27
|
-
const body = () => {
|
|
28
|
-
return props.keepAlive ? h(KeepAlive, h(step, { key: props.active })) : h(step, { key: props.active });
|
|
29
|
-
};
|
|
30
|
-
return h(Transition, {
|
|
31
|
-
name: props.transition,
|
|
32
|
-
mode: "out-in"
|
|
33
|
-
}, body);
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
</script>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue-demi").DefineComponent<import("vue-demi").ExtractPropTypes<{
|
|
2
|
-
active: {
|
|
3
|
-
type: NumberConstructor;
|
|
4
|
-
default: number;
|
|
5
|
-
};
|
|
6
|
-
keepAlive: {
|
|
7
|
-
type: BooleanConstructor;
|
|
8
|
-
default: boolean;
|
|
9
|
-
};
|
|
10
|
-
transition: {
|
|
11
|
-
type: StringConstructor;
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
14
|
-
}>, () => import("vue-demi").VNode<import("vue-demi").RendererNode, import("vue-demi").RendererElement, {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
}>, {}, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").PublicProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
17
|
-
active: {
|
|
18
|
-
type: NumberConstructor;
|
|
19
|
-
default: number;
|
|
20
|
-
};
|
|
21
|
-
keepAlive: {
|
|
22
|
-
type: BooleanConstructor;
|
|
23
|
-
default: boolean;
|
|
24
|
-
};
|
|
25
|
-
transition: {
|
|
26
|
-
type: StringConstructor;
|
|
27
|
-
default: string;
|
|
28
|
-
};
|
|
29
|
-
}>> & Readonly<{}>, {
|
|
30
|
-
transition: string;
|
|
31
|
-
active: number;
|
|
32
|
-
keepAlive: boolean;
|
|
33
|
-
}, {}, {}, {}, string, import("vue-demi").ComponentProvideOptions, true, {}, any>;
|
|
34
|
-
export default _default;
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="steps"
|
|
4
|
-
data-testid="steps">
|
|
5
|
-
<StepSlider
|
|
6
|
-
:active="step - 1"
|
|
7
|
-
:keep-alive="keepAlive"
|
|
8
|
-
:transition="transition">
|
|
9
|
-
<slot />
|
|
10
|
-
</StepSlider>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script lang="ts" setup>
|
|
15
|
-
import type { PropType, VNode } from 'vue-demi'
|
|
16
|
-
import {
|
|
17
|
-
computed,
|
|
18
|
-
provide,
|
|
19
|
-
ref,
|
|
20
|
-
} from 'vue-demi'
|
|
21
|
-
import StepSlider from './StepSlider.vue'
|
|
22
|
-
import { useVModel } from '../input'
|
|
23
|
-
import { findAllChildren } from '../utils/vnode'
|
|
24
|
-
import type {
|
|
25
|
-
TravelHook,
|
|
26
|
-
FinishedHook,
|
|
27
|
-
DirectionVariant,
|
|
28
|
-
AnimationVariant,
|
|
29
|
-
} from '.'
|
|
30
|
-
import { STEPS_CONTEXT } from '.'
|
|
31
|
-
import { syncRef } from '@vueuse/core'
|
|
32
|
-
import { useClamp } from '@vueuse/math'
|
|
33
|
-
import { runAllHooks } from './utils/hook'
|
|
34
|
-
import { noop } from 'lodash-es'
|
|
35
|
-
|
|
36
|
-
const props = defineProps({
|
|
37
|
-
modelValue: {
|
|
38
|
-
type : Number,
|
|
39
|
-
default: 1,
|
|
40
|
-
},
|
|
41
|
-
keepAlive: {
|
|
42
|
-
type : Boolean,
|
|
43
|
-
default: false,
|
|
44
|
-
},
|
|
45
|
-
direction: {
|
|
46
|
-
type : String as PropType<DirectionVariant>,
|
|
47
|
-
default: 'horizontal',
|
|
48
|
-
},
|
|
49
|
-
loop: {
|
|
50
|
-
type : Boolean,
|
|
51
|
-
default: false,
|
|
52
|
-
},
|
|
53
|
-
animation: {
|
|
54
|
-
type : String as PropType<AnimationVariant>,
|
|
55
|
-
default: 'slide',
|
|
56
|
-
},
|
|
57
|
-
onBeforePrev: {
|
|
58
|
-
type : Function as PropType<TravelHook>,
|
|
59
|
-
default: () => true,
|
|
60
|
-
},
|
|
61
|
-
onBeforeNext: {
|
|
62
|
-
type : Function as PropType<TravelHook>,
|
|
63
|
-
default: () => true,
|
|
64
|
-
},
|
|
65
|
-
onFinished: {
|
|
66
|
-
type : Function as PropType<FinishedHook>,
|
|
67
|
-
default: noop,
|
|
68
|
-
},
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
defineEmits<{
|
|
72
|
-
'update:modelValue': [number],
|
|
73
|
-
}>()
|
|
74
|
-
|
|
75
|
-
const slots = defineSlots<{
|
|
76
|
-
'default'(): VNode[],
|
|
77
|
-
}>()
|
|
78
|
-
|
|
79
|
-
const onNextHooks = ref([props.onBeforeNext])
|
|
80
|
-
const onPrevHooks = ref([props.onBeforePrev])
|
|
81
|
-
|
|
82
|
-
const model = useVModel(props)
|
|
83
|
-
const transition = ref(props.direction === 'vertical' ? 'slide-top' : 'slide-left')
|
|
84
|
-
|
|
85
|
-
const total = computed(() => {
|
|
86
|
-
return findAllChildren(slots.default(), 'Step').length
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
const step = useClamp(model, 1, total)
|
|
90
|
-
|
|
91
|
-
const canNext = computed(() => {
|
|
92
|
-
return props.loop || model.value <= total.value
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
const canPrev = computed(() => {
|
|
96
|
-
return props.loop || model.value > 1
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
async function next () {
|
|
100
|
-
if (canNext.value)
|
|
101
|
-
await toStep(model.value + 1)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
async function prev () {
|
|
105
|
-
if (canPrev.value)
|
|
106
|
-
await toStep(model.value - 1)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
async function toStep (to: number) {
|
|
110
|
-
const from = model.value
|
|
111
|
-
const hooks = to > from
|
|
112
|
-
? onNextHooks.value
|
|
113
|
-
: onPrevHooks.value
|
|
114
|
-
|
|
115
|
-
const toIndex = props.loop
|
|
116
|
-
? (((to - 1) % total.value + total.value) % total.value) + 1
|
|
117
|
-
: to
|
|
118
|
-
|
|
119
|
-
if (await runAllHooks(hooks, toIndex, from)) {
|
|
120
|
-
if (toIndex <= total.value) {
|
|
121
|
-
transition.value = to > from
|
|
122
|
-
? (props.direction === 'vertical' ? `${props.animation}-top` : `${props.animation}-left`)
|
|
123
|
-
: (props.direction === 'vertical' ? `${props.animation}-bottom` : `${props.animation}-right`)
|
|
124
|
-
|
|
125
|
-
step.value = toIndex
|
|
126
|
-
} else
|
|
127
|
-
await props.onFinished()
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
syncRef(step, model)
|
|
132
|
-
|
|
133
|
-
provide(STEPS_CONTEXT, {
|
|
134
|
-
step,
|
|
135
|
-
next,
|
|
136
|
-
prev,
|
|
137
|
-
total,
|
|
138
|
-
canNext,
|
|
139
|
-
canPrev,
|
|
140
|
-
toStep,
|
|
141
|
-
onPrevHooks,
|
|
142
|
-
onNextHooks,
|
|
143
|
-
})
|
|
144
|
-
</script>
|
|
145
|
-
|
|
146
|
-
<style lang="postcss">
|
|
147
|
-
.steps {
|
|
148
|
-
@apply w-full;
|
|
149
|
-
}
|
|
150
|
-
</style>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef, InjectionKey, Ref } from 'vue-demi';
|
|
2
|
-
export type TravelHook = (to: number, from: number) => boolean | Promise<boolean>;
|
|
3
|
-
export type FinishedHook = () => void | Promise<void>;
|
|
4
|
-
export type DirectionVariant = 'horizontal' | 'vertical';
|
|
5
|
-
export type AnimationVariant = 'slide' | 'slide-full';
|
|
6
|
-
export interface StepContext {
|
|
7
|
-
next: () => void;
|
|
8
|
-
prev: () => void;
|
|
9
|
-
toStep: (step: number) => void;
|
|
10
|
-
total: Ref<number>;
|
|
11
|
-
step: Ref<number>;
|
|
12
|
-
canPrev: ComputedRef<boolean>;
|
|
13
|
-
canNext: ComputedRef<boolean>;
|
|
14
|
-
onPrevHooks: Ref<TravelHook[]>;
|
|
15
|
-
onNextHooks: Ref<TravelHook[]>;
|
|
16
|
-
}
|
|
17
|
-
export declare const STEPS_CONTEXT: InjectionKey<StepContext>;
|
|
18
|
-
export declare function useStep(): {
|
|
19
|
-
onBeforePrev: (hook: TravelHook) => void;
|
|
20
|
-
onBeforeNext: (hook: TravelHook) => void;
|
|
21
|
-
next: () => void;
|
|
22
|
-
prev: () => void;
|
|
23
|
-
toStep: (step: number) => void;
|
|
24
|
-
total: Ref<number>;
|
|
25
|
-
step: Ref<number>;
|
|
26
|
-
canPrev: ComputedRef<boolean>;
|
|
27
|
-
canNext: ComputedRef<boolean>;
|
|
28
|
-
onPrevHooks: Ref<TravelHook[]>;
|
|
29
|
-
onNextHooks: Ref<TravelHook[]>;
|
|
30
|
-
};
|