@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,138 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<img
|
|
3
|
-
class="pdf-text"
|
|
4
|
-
:width="width"
|
|
5
|
-
:height="height"
|
|
6
|
-
:src="preview"
|
|
7
|
-
:srcset="srcset"
|
|
8
|
-
:alt="text">
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts" setup>
|
|
12
|
-
import type { PropType } from 'vue-demi'
|
|
13
|
-
import { onMounted, ref } from 'vue-demi'
|
|
14
|
-
import { createSpinner } from '../avatar/utils/create-image'
|
|
15
|
-
import { usePreview } from '../cropper'
|
|
16
|
-
import type { ModelModifier } from '../dropzone'
|
|
17
|
-
import { useVModel } from '../input'
|
|
18
|
-
import { fromBase64 } from '../utils/base64'
|
|
19
|
-
import { watchDebounced } from '@vueuse/core'
|
|
20
|
-
import generate from './utils/text-to-image'
|
|
21
|
-
|
|
22
|
-
const props = defineProps({
|
|
23
|
-
modelValue: {
|
|
24
|
-
type : [String, globalThis.File],
|
|
25
|
-
default: undefined,
|
|
26
|
-
},
|
|
27
|
-
modelModifiers: {
|
|
28
|
-
type : Object as PropType<ModelModifier>,
|
|
29
|
-
default: () => ({} as ModelModifier),
|
|
30
|
-
},
|
|
31
|
-
text: {
|
|
32
|
-
type : String,
|
|
33
|
-
default: '',
|
|
34
|
-
},
|
|
35
|
-
width: {
|
|
36
|
-
type : Number,
|
|
37
|
-
default: 198,
|
|
38
|
-
},
|
|
39
|
-
height: {
|
|
40
|
-
type : Number,
|
|
41
|
-
default: 106,
|
|
42
|
-
},
|
|
43
|
-
color: {
|
|
44
|
-
type : String,
|
|
45
|
-
default: '#4a5362',
|
|
46
|
-
},
|
|
47
|
-
size: {
|
|
48
|
-
type : Number,
|
|
49
|
-
default: 16,
|
|
50
|
-
},
|
|
51
|
-
minSize: {
|
|
52
|
-
type : Number,
|
|
53
|
-
default: 11,
|
|
54
|
-
},
|
|
55
|
-
maxSize: {
|
|
56
|
-
type : Number,
|
|
57
|
-
default: 72,
|
|
58
|
-
},
|
|
59
|
-
fixedSize: {
|
|
60
|
-
type : Boolean,
|
|
61
|
-
default: false,
|
|
62
|
-
},
|
|
63
|
-
font: {
|
|
64
|
-
type : String,
|
|
65
|
-
default: 'DM Sans',
|
|
66
|
-
},
|
|
67
|
-
lineHeight: {
|
|
68
|
-
type : Number,
|
|
69
|
-
default: 1.5,
|
|
70
|
-
},
|
|
71
|
-
padding: {
|
|
72
|
-
type : Number,
|
|
73
|
-
default: 12,
|
|
74
|
-
},
|
|
75
|
-
label: {
|
|
76
|
-
type : String,
|
|
77
|
-
default: '',
|
|
78
|
-
},
|
|
79
|
-
labelColor: {
|
|
80
|
-
type : String,
|
|
81
|
-
default: '#9EA0A2',
|
|
82
|
-
},
|
|
83
|
-
labelFont: {
|
|
84
|
-
type : String,
|
|
85
|
-
default: undefined,
|
|
86
|
-
},
|
|
87
|
-
labelSize: {
|
|
88
|
-
type : Number,
|
|
89
|
-
default: 12,
|
|
90
|
-
},
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
defineEmits<{
|
|
94
|
-
'update:modelValue': [unknown],
|
|
95
|
-
}>()
|
|
96
|
-
|
|
97
|
-
const model = useVModel(props)
|
|
98
|
-
const preview = usePreview(model, createSpinner(props.width, props.height))
|
|
99
|
-
const srcset = ref('')
|
|
100
|
-
|
|
101
|
-
watchDebounced(() => [
|
|
102
|
-
props.text,
|
|
103
|
-
props.width,
|
|
104
|
-
props.height,
|
|
105
|
-
props.color,
|
|
106
|
-
props.size,
|
|
107
|
-
props.fixedSize,
|
|
108
|
-
props.font,
|
|
109
|
-
props.lineHeight,
|
|
110
|
-
props.padding,
|
|
111
|
-
props.label,
|
|
112
|
-
props.labelColor,
|
|
113
|
-
props.labelFont,
|
|
114
|
-
props.labelSize,
|
|
115
|
-
], () => {
|
|
116
|
-
load()
|
|
117
|
-
}, { debounce: 300 })
|
|
118
|
-
|
|
119
|
-
onMounted(() => {
|
|
120
|
-
load()
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
async function load () {
|
|
124
|
-
const result = await generate(props)
|
|
125
|
-
const value = props.modelModifiers.base64
|
|
126
|
-
? result
|
|
127
|
-
: fromBase64(result)
|
|
128
|
-
|
|
129
|
-
model.value = value
|
|
130
|
-
srcset.value = `${await generate(props, 2)} 2x`
|
|
131
|
-
}
|
|
132
|
-
</script>
|
|
133
|
-
|
|
134
|
-
<style lang="postcss">
|
|
135
|
-
.pdf-object .pdf-text {
|
|
136
|
-
@apply w-full h-full;
|
|
137
|
-
}
|
|
138
|
-
</style>
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
interface GenerateOptions {
|
|
2
|
-
/**
|
|
3
|
-
* Canvas's element
|
|
4
|
-
*/
|
|
5
|
-
canvas?: HTMLCanvasElement;
|
|
6
|
-
/**
|
|
7
|
-
* Text to be generated
|
|
8
|
-
*/
|
|
9
|
-
text: string;
|
|
10
|
-
/**
|
|
11
|
-
* Image width
|
|
12
|
-
*/
|
|
13
|
-
width: number;
|
|
14
|
-
/**
|
|
15
|
-
* Image height
|
|
16
|
-
*/
|
|
17
|
-
height: number;
|
|
18
|
-
/**
|
|
19
|
-
* Text color
|
|
20
|
-
*/
|
|
21
|
-
color: string;
|
|
22
|
-
/**
|
|
23
|
-
* Text font size
|
|
24
|
-
*/
|
|
25
|
-
size: number;
|
|
26
|
-
/**
|
|
27
|
-
* Minimum font size
|
|
28
|
-
*/
|
|
29
|
-
minSize: number;
|
|
30
|
-
/**
|
|
31
|
-
* Maximum font size
|
|
32
|
-
*/
|
|
33
|
-
maxSize: number;
|
|
34
|
-
/**
|
|
35
|
-
* Autofit mode
|
|
36
|
-
*/
|
|
37
|
-
fixedSize: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Text font family
|
|
40
|
-
*/
|
|
41
|
-
font: string;
|
|
42
|
-
/**
|
|
43
|
-
* Text line height
|
|
44
|
-
*/
|
|
45
|
-
lineHeight: number;
|
|
46
|
-
/**
|
|
47
|
-
* Text box padding
|
|
48
|
-
*/
|
|
49
|
-
padding: number;
|
|
50
|
-
/**
|
|
51
|
-
* Label text
|
|
52
|
-
*/
|
|
53
|
-
label?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Label color
|
|
56
|
-
*/
|
|
57
|
-
labelColor?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Label font family
|
|
60
|
-
*/
|
|
61
|
-
labelFont?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Label font size
|
|
64
|
-
*/
|
|
65
|
-
labelSize?: number;
|
|
66
|
-
}
|
|
67
|
-
export default function generate(options: GenerateOptions, dpi?: number): Promise<string>;
|
|
68
|
-
export {};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { createCanvas } from "../../signature-draw/utils/canvas.mjs";
|
|
2
|
-
import loadFont from "../../signature-text/utils/load-font.mjs";
|
|
3
|
-
import { clamp } from "lodash-es";
|
|
4
|
-
function wrapText(context, text, fontSize, fontFamily, maxWidth) {
|
|
5
|
-
const lines = [];
|
|
6
|
-
context.font = `${fontSize}px ${JSON.stringify(fontFamily)}`;
|
|
7
|
-
context.textBaseline = "top";
|
|
8
|
-
let line = "";
|
|
9
|
-
let i;
|
|
10
|
-
let test;
|
|
11
|
-
let metrics;
|
|
12
|
-
for (const paragraph of text.split("\n")) {
|
|
13
|
-
const words = paragraph.split(" ");
|
|
14
|
-
for (i = 0; i < words.length; i++) {
|
|
15
|
-
test = words[i];
|
|
16
|
-
metrics = context.measureText(test);
|
|
17
|
-
while (metrics.width > maxWidth) {
|
|
18
|
-
test = test.slice(0, Math.max(0, test.length - 1));
|
|
19
|
-
metrics = context.measureText(test);
|
|
20
|
-
}
|
|
21
|
-
if (words[i] !== test) {
|
|
22
|
-
words.splice(i + 1, 0, words[i].slice(test.length));
|
|
23
|
-
words[i] = test;
|
|
24
|
-
}
|
|
25
|
-
test = `${line + words[i]} `;
|
|
26
|
-
metrics = context.measureText(test);
|
|
27
|
-
if (metrics.width > maxWidth && i > 0) {
|
|
28
|
-
lines.push(line);
|
|
29
|
-
line = `${words[i]} `;
|
|
30
|
-
} else
|
|
31
|
-
line = test;
|
|
32
|
-
}
|
|
33
|
-
lines.push(line);
|
|
34
|
-
line = "";
|
|
35
|
-
}
|
|
36
|
-
return lines;
|
|
37
|
-
}
|
|
38
|
-
export default async function generate(options, dpi = 1) {
|
|
39
|
-
const {
|
|
40
|
-
text,
|
|
41
|
-
color,
|
|
42
|
-
padding,
|
|
43
|
-
font,
|
|
44
|
-
height,
|
|
45
|
-
width,
|
|
46
|
-
size,
|
|
47
|
-
minSize,
|
|
48
|
-
maxSize,
|
|
49
|
-
fixedSize,
|
|
50
|
-
label,
|
|
51
|
-
lineHeight
|
|
52
|
-
} = options;
|
|
53
|
-
await loadFont(font);
|
|
54
|
-
const canvas = options.canvas ?? createCanvas(width, height, dpi);
|
|
55
|
-
const context = canvas.getContext("2d");
|
|
56
|
-
const maxWidth = width - padding * 2;
|
|
57
|
-
let y = padding;
|
|
58
|
-
if (label) {
|
|
59
|
-
const labelSize = options.labelSize ?? size;
|
|
60
|
-
const labelFont = options.labelFont ?? font;
|
|
61
|
-
const labelColor = options.labelColor ?? color;
|
|
62
|
-
const labelLines = wrapText(
|
|
63
|
-
context,
|
|
64
|
-
label,
|
|
65
|
-
labelSize,
|
|
66
|
-
labelFont,
|
|
67
|
-
maxWidth
|
|
68
|
-
);
|
|
69
|
-
context.font = `${labelSize}px ${JSON.stringify(labelFont)}`;
|
|
70
|
-
context.textBaseline = "top";
|
|
71
|
-
context.textAlign = "start";
|
|
72
|
-
context.fillStyle = labelColor;
|
|
73
|
-
for (const line of labelLines) {
|
|
74
|
-
context.fillText(line, padding, y, maxWidth);
|
|
75
|
-
y += labelSize * lineHeight;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
if (text) {
|
|
79
|
-
const maxHeight = height - (y + padding);
|
|
80
|
-
let fontSize = size;
|
|
81
|
-
let lines = wrapText(
|
|
82
|
-
context,
|
|
83
|
-
text,
|
|
84
|
-
fontSize,
|
|
85
|
-
font,
|
|
86
|
-
maxWidth
|
|
87
|
-
);
|
|
88
|
-
if (!fixedSize) {
|
|
89
|
-
let textHeight = lines.length * lineHeight;
|
|
90
|
-
let count = 0;
|
|
91
|
-
do {
|
|
92
|
-
const newFontSize = clamp(
|
|
93
|
-
Math.round((maxHeight / textHeight * fontSize + fontSize) / 2),
|
|
94
|
-
minSize,
|
|
95
|
-
maxSize
|
|
96
|
-
);
|
|
97
|
-
if (newFontSize === fontSize)
|
|
98
|
-
break;
|
|
99
|
-
fontSize = newFontSize;
|
|
100
|
-
lines = wrapText(
|
|
101
|
-
context,
|
|
102
|
-
text,
|
|
103
|
-
fontSize,
|
|
104
|
-
font,
|
|
105
|
-
maxWidth
|
|
106
|
-
);
|
|
107
|
-
textHeight = lines.length * lineHeight * fontSize;
|
|
108
|
-
} while (textHeight > maxHeight && ++count < 5);
|
|
109
|
-
}
|
|
110
|
-
context.font = `${fontSize}px ${JSON.stringify(font)}`;
|
|
111
|
-
context.textBaseline = "top";
|
|
112
|
-
context.textAlign = "start";
|
|
113
|
-
context.fillStyle = color;
|
|
114
|
-
for (const line of lines) {
|
|
115
|
-
context.fillText(line, padding, y, maxWidth);
|
|
116
|
-
y += fontSize * lineHeight;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return canvas.toDataURL("image/png");
|
|
120
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-p-aspect-ratio="1122/793"
|
|
4
|
-
data-testid="pdf-error"
|
|
5
|
-
class="pdf__error">
|
|
6
|
-
<Heading element="h3">
|
|
7
|
-
Failed to load PDF
|
|
8
|
-
</Heading>
|
|
9
|
-
<dl class="mt-7">
|
|
10
|
-
<dt>URL:</dt>
|
|
11
|
-
<dd class="truncate">
|
|
12
|
-
<a
|
|
13
|
-
:href="url"
|
|
14
|
-
target="_blank">
|
|
15
|
-
<code>{{ url }}</code>
|
|
16
|
-
</a>
|
|
17
|
-
</dd>
|
|
18
|
-
<dt>
|
|
19
|
-
Reason:
|
|
20
|
-
</dt>
|
|
21
|
-
<dd><code>{{ error.message }}</code></dd>
|
|
22
|
-
<dt>
|
|
23
|
-
PDFJS Version:
|
|
24
|
-
</dt>
|
|
25
|
-
<dd><code>{{ version }}</code></dd>
|
|
26
|
-
</dl>
|
|
27
|
-
</div>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script lang="ts" setup>
|
|
31
|
-
import { vPAspectRatio } from '../aspect-ratio'
|
|
32
|
-
import type { PropType } from 'vue-demi'
|
|
33
|
-
import { onMounted, ref } from 'vue-demi'
|
|
34
|
-
import Heading from '../heading/Heading.vue'
|
|
35
|
-
import { getVersion } from './utils/pdfjs'
|
|
36
|
-
|
|
37
|
-
defineProps({
|
|
38
|
-
url: {
|
|
39
|
-
type : String,
|
|
40
|
-
default: '',
|
|
41
|
-
},
|
|
42
|
-
error: {
|
|
43
|
-
type : Object as PropType<Error>,
|
|
44
|
-
default: () => ({} as Error),
|
|
45
|
-
},
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
const version = ref('')
|
|
49
|
-
|
|
50
|
-
onMounted(async () => {
|
|
51
|
-
version.value = await getVersion()
|
|
52
|
-
})
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
<style lang="postcss">
|
|
56
|
-
.pdf__error {
|
|
57
|
-
@apply shadow-lg mb-4 p-6 bg-danger w-full h-full max-w-[var(--p-pdf-container-width)] mx-auto text-default;
|
|
58
|
-
@apply dark:bg-dark-danger-emphasis dark:text-dark-default;
|
|
59
|
-
|
|
60
|
-
a {
|
|
61
|
-
&,
|
|
62
|
-
&:hover {
|
|
63
|
-
> code {
|
|
64
|
-
@apply text-danger;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
:not(pre) code {
|
|
70
|
-
@apply bg-emphasis-alpha text-danger;
|
|
71
|
-
@apply dark:bg-dark-danger dark:text-dark-danger;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
data-testid="pdf-loading"
|
|
4
|
-
class="pdf__loading">
|
|
5
|
-
<img
|
|
6
|
-
:src="PDF_LOADING_IMG"
|
|
7
|
-
width="793"
|
|
8
|
-
height="1122">
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script lang="ts" setup>
|
|
13
|
-
import PDF_LOADING_IMG from './assets/pdf-loading.svg'
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<style lang="postcss">
|
|
17
|
-
.pdf__loading {
|
|
18
|
-
@apply shadow-lg mb-4 p-4 bg-default max-w-[var(--p-pdf-container-width)] mx-auto;
|
|
19
|
-
|
|
20
|
-
> img {
|
|
21
|
-
@apply max-w-full object-contain h-auto;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
</style>
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
data-testid="pdf-navigation"
|
|
4
|
-
class="pdf__navigation">
|
|
5
|
-
<div class="pdf__navigation-container">
|
|
6
|
-
<p-button
|
|
7
|
-
data-testid="pdf-zoom-out"
|
|
8
|
-
variant="ghost"
|
|
9
|
-
size="xs"
|
|
10
|
-
icon
|
|
11
|
-
@click="zoomOut">
|
|
12
|
-
<IconZoomOut />
|
|
13
|
-
</p-button>
|
|
14
|
-
<span class="pdf__navigation-scale">
|
|
15
|
-
{{ (scale * 100).toFixed(0) }}%
|
|
16
|
-
</span>
|
|
17
|
-
<p-button
|
|
18
|
-
data-testid="pdf-zoom-in"
|
|
19
|
-
variant="ghost"
|
|
20
|
-
size="xs"
|
|
21
|
-
icon
|
|
22
|
-
@click="zoomIn">
|
|
23
|
-
<IconZoomIn />
|
|
24
|
-
</p-button>
|
|
25
|
-
<p-divider vertical />
|
|
26
|
-
<p-select
|
|
27
|
-
v-model="page"
|
|
28
|
-
:options="pages"
|
|
29
|
-
size="xs" />
|
|
30
|
-
<span
|
|
31
|
-
data-testid="pdf-total"
|
|
32
|
-
class="pdf__navigation-total">
|
|
33
|
-
<slot name="num-of-pages-navigation">
|
|
34
|
-
{{ numOfPagesNavLabel }}
|
|
35
|
-
</slot> {{ totalPage }}</span>
|
|
36
|
-
<p-button
|
|
37
|
-
data-testid="pdf-start"
|
|
38
|
-
variant="ghost"
|
|
39
|
-
size="xs"
|
|
40
|
-
icon
|
|
41
|
-
@click="first">
|
|
42
|
-
<slot name="first-navigation">
|
|
43
|
-
{{ firstNavLabel }}
|
|
44
|
-
</slot>
|
|
45
|
-
</p-button>
|
|
46
|
-
<p-button
|
|
47
|
-
data-testid="pdf-prev"
|
|
48
|
-
variant="ghost"
|
|
49
|
-
size="xs"
|
|
50
|
-
icon
|
|
51
|
-
@click="prev">
|
|
52
|
-
<IconPrev />
|
|
53
|
-
</p-button>
|
|
54
|
-
<p-button
|
|
55
|
-
data-testid="pdf-next"
|
|
56
|
-
variant="ghost"
|
|
57
|
-
size="xs"
|
|
58
|
-
icon
|
|
59
|
-
@click="next">
|
|
60
|
-
<IconNext />
|
|
61
|
-
</p-button>
|
|
62
|
-
<p-button
|
|
63
|
-
data-testid="pdf-end"
|
|
64
|
-
variant="ghost"
|
|
65
|
-
size="xs"
|
|
66
|
-
icon
|
|
67
|
-
@click="last">
|
|
68
|
-
<slot name="last-navigation">
|
|
69
|
-
{{ lastNavLabel }}
|
|
70
|
-
</slot>
|
|
71
|
-
</p-button>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</template>
|
|
75
|
-
|
|
76
|
-
<script lang="ts" setup>
|
|
77
|
-
import { computed } from 'vue-demi'
|
|
78
|
-
import { usePdfContext } from '.'
|
|
79
|
-
import IconZoomIn from '@privyid/persona-icon/vue/zoom-in/20.vue'
|
|
80
|
-
import IconZoomOut from '@privyid/persona-icon/vue/zoom-out/20.vue'
|
|
81
|
-
import IconPrev from '@privyid/persona-icon/vue/chevron-up/20.vue'
|
|
82
|
-
import IconNext from '@privyid/persona-icon/vue/chevron-down/20.vue'
|
|
83
|
-
import pButton from '../button/Button.vue'
|
|
84
|
-
import pDivider from '../divider/Divider.vue'
|
|
85
|
-
import pSelect from '../select/Select.vue'
|
|
86
|
-
import type { SelectItem } from '../select'
|
|
87
|
-
|
|
88
|
-
defineProps({
|
|
89
|
-
firstNavLabel: {
|
|
90
|
-
type : String,
|
|
91
|
-
default: 'First',
|
|
92
|
-
},
|
|
93
|
-
lastNavLabel: {
|
|
94
|
-
type : String,
|
|
95
|
-
default: 'Last',
|
|
96
|
-
},
|
|
97
|
-
numOfPagesNavLabel: {
|
|
98
|
-
type : String,
|
|
99
|
-
default: 'of',
|
|
100
|
-
},
|
|
101
|
-
})
|
|
102
|
-
|
|
103
|
-
const {
|
|
104
|
-
page,
|
|
105
|
-
scale,
|
|
106
|
-
totalPage,
|
|
107
|
-
zoomIn,
|
|
108
|
-
zoomOut,
|
|
109
|
-
next,
|
|
110
|
-
prev,
|
|
111
|
-
first,
|
|
112
|
-
last,
|
|
113
|
-
} = usePdfContext()
|
|
114
|
-
|
|
115
|
-
const pages = computed<SelectItem[]>(() => {
|
|
116
|
-
return Array.from({ length: totalPage.value }).map((_, i) => {
|
|
117
|
-
return {
|
|
118
|
-
text : `${i + 1}`,
|
|
119
|
-
value: i + 1,
|
|
120
|
-
}
|
|
121
|
-
})
|
|
122
|
-
})
|
|
123
|
-
</script>
|
|
124
|
-
|
|
125
|
-
<style lang="postcss">
|
|
126
|
-
.pdf {
|
|
127
|
-
&__navigation {
|
|
128
|
-
@apply absolute bottom-4 inset-x-0 justify-center items-center flex min-w-96 mx-auto z-10;
|
|
129
|
-
|
|
130
|
-
&-container {
|
|
131
|
-
@apply flex bg-inverse text-subtlest rounded p-2 space-x-1 items-center;
|
|
132
|
-
@apply dark:text-dark-default;
|
|
133
|
-
|
|
134
|
-
> .btn.btn--variant-ghost {
|
|
135
|
-
@apply text-subtlest hover:text-muted focus:text-muted;
|
|
136
|
-
@apply dark:text-dark-subtle hover:dark:text-dark-default focus:dark:text-dark-default;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
> .select {
|
|
140
|
-
--p-dropdown-size: theme(width.32);
|
|
141
|
-
|
|
142
|
-
@apply w-16;
|
|
143
|
-
|
|
144
|
-
> .input {
|
|
145
|
-
@apply bg-default-alpha;
|
|
146
|
-
@apply dark:bg-dark-default-alpha;
|
|
147
|
-
|
|
148
|
-
> .input__form {
|
|
149
|
-
@apply border-subtle-alpha bg-default-alpha text-state-emphasis;
|
|
150
|
-
@apply dark:border-dark-subtle-alpha dark:bg-dark-default-alpha dark:text-dark-state-emphasis;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
> .divider {
|
|
156
|
-
@apply border-none bg-dark-emphasis-alpha;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
&-page {
|
|
161
|
-
@apply w-20 inline-flex;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
&-total {
|
|
165
|
-
@apply shrink-0 mr-3 !important;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
</style>
|