@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,114 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Nav
|
|
3
|
-
:align="align"
|
|
4
|
-
:variant="variant"
|
|
5
|
-
:condensed="condensed"
|
|
6
|
-
class="navbar__nav"
|
|
7
|
-
data-testid="navbar-nav">
|
|
8
|
-
<slot />
|
|
9
|
-
</Nav>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script lang="ts" setup>
|
|
13
|
-
import type { PropType } from 'vue-demi'
|
|
14
|
-
import { inject } from 'vue-demi'
|
|
15
|
-
import Nav from '../nav/Nav.vue'
|
|
16
|
-
import type { AlignVariant } from '../nav'
|
|
17
|
-
import { NAVBAR_SETTINGS } from '.'
|
|
18
|
-
|
|
19
|
-
defineProps({
|
|
20
|
-
align: {
|
|
21
|
-
type : String as PropType<AlignVariant>,
|
|
22
|
-
default: 'left',
|
|
23
|
-
},
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const settings = inject(NAVBAR_SETTINGS, undefined, false)
|
|
27
|
-
const variant = settings?.variant
|
|
28
|
-
const condensed = settings?.condensed
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<style lang="postcss">
|
|
32
|
-
.navbar {
|
|
33
|
-
&__nav {
|
|
34
|
-
@apply flex flex-row items-center;
|
|
35
|
-
|
|
36
|
-
&:not(.nav--align-center):not(.nav--align-right) {
|
|
37
|
-
@apply mr-auto;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&.nav--align-center {
|
|
41
|
-
@apply mx-auto;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&.nav--align-right {
|
|
45
|
-
@apply ml-auto;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.dropdown {
|
|
49
|
-
&__activator {
|
|
50
|
-
&.btn {
|
|
51
|
-
@apply px-3 bg-transparent hover:bg-transparent shadow-none rounded font-normal text-subtle hover:text-default hover:shadow-none;
|
|
52
|
-
@apply dark:bg-transparent hover:dark:bg-transparent dark:text-dark-subtle hover:dark:text-dark-default;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&:not(.btn--variant-outline) {
|
|
56
|
-
&.btn {
|
|
57
|
-
@apply border-transparent hover:border-transparent;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&--open {
|
|
63
|
-
.dropdown__activator {
|
|
64
|
-
&.btn {
|
|
65
|
-
@apply text-default cursor-default border-transparent bg-transparent hover:bg-transparent;
|
|
66
|
-
@apply dark:text-dark-default dark:bg-transparent hover:dark:bg-transparent;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&.nav--pills {
|
|
73
|
-
@apply pb-0;
|
|
74
|
-
|
|
75
|
-
.dropdown {
|
|
76
|
-
&--open {
|
|
77
|
-
.dropdown__activator {
|
|
78
|
-
&.btn {
|
|
79
|
-
@apply bg-base hover:bg-base;
|
|
80
|
-
@apply dark:bg-dark-base hover:dark:bg-dark-base;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&.nav--condensed {
|
|
87
|
-
.nav__link--active {
|
|
88
|
-
@apply bg-base;
|
|
89
|
-
@apply dark:bg-dark-base;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&.nav--lines {
|
|
95
|
-
.dropdown {
|
|
96
|
-
&__activator {
|
|
97
|
-
&.btn {
|
|
98
|
-
@apply border-x-0 rounded-none;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&--open {
|
|
103
|
-
.dropdown__activator {
|
|
104
|
-
&.btn {
|
|
105
|
-
@apply border-b-inverse;
|
|
106
|
-
@apply dark:border-b-dark-inverse;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
</style>
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Button
|
|
3
|
-
class="navbar__toggle"
|
|
4
|
-
data-testid="navbar-toggle"
|
|
5
|
-
variant="outline"
|
|
6
|
-
:class="classNames"
|
|
7
|
-
icon
|
|
8
|
-
@click="expanded">
|
|
9
|
-
<slot :expanded="expand">
|
|
10
|
-
<IconClose v-if="expand" />
|
|
11
|
-
<IconMenu v-else />
|
|
12
|
-
</slot>
|
|
13
|
-
</Button>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts" setup>
|
|
17
|
-
import {
|
|
18
|
-
inject,
|
|
19
|
-
ref,
|
|
20
|
-
computed,
|
|
21
|
-
} from 'vue-demi'
|
|
22
|
-
import Button from '../button/Button.vue'
|
|
23
|
-
import IconMenu from '@privyid/persona-icon/vue/menu-burger/20.vue'
|
|
24
|
-
import IconClose from '@privyid/persona-icon/vue/close/20.vue'
|
|
25
|
-
import { NAVBAR_SETTINGS } from '.'
|
|
26
|
-
|
|
27
|
-
const expand = ref(false)
|
|
28
|
-
const settings = inject(NAVBAR_SETTINGS, undefined, false)
|
|
29
|
-
const toggleable = settings?.toggleable
|
|
30
|
-
|
|
31
|
-
const classNames = computed(() => {
|
|
32
|
-
const result: string[] = []
|
|
33
|
-
|
|
34
|
-
if (toggleable?.value)
|
|
35
|
-
result.push(`navbar__toggle--${toggleable?.value}`)
|
|
36
|
-
|
|
37
|
-
return result
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
function expanded () {
|
|
41
|
-
expand.value = !expand.value
|
|
42
|
-
}
|
|
43
|
-
</script>
|
|
44
|
-
|
|
45
|
-
<style lang="postcss">
|
|
46
|
-
.navbar {
|
|
47
|
-
&__toggle {
|
|
48
|
-
@apply inline-flex;
|
|
49
|
-
|
|
50
|
-
&:is(.btn--variant-outline, .btn--default) {
|
|
51
|
-
@apply bg-base hover:shadow-none text-subtle;
|
|
52
|
-
@apply dark:bg-dark-base dark:text-dark-subtle;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&&--all {
|
|
56
|
-
@apply flex;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&&--lg {
|
|
60
|
-
@apply lg:hidden;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&&--md {
|
|
64
|
-
@apply md:hidden;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&&--sm {
|
|
68
|
-
@apply sm:hidden;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { InjectionKey, Ref } from 'vue-demi';
|
|
2
|
-
import type { StyleVariant } from '../nav';
|
|
3
|
-
export type ToggleableVariant = 'sm' | 'md' | 'lg' | 'all';
|
|
4
|
-
export interface NavbarSettings {
|
|
5
|
-
variant: Ref<StyleVariant>;
|
|
6
|
-
toggleable?: Ref<string | undefined>;
|
|
7
|
-
condensed?: Ref<boolean>;
|
|
8
|
-
}
|
|
9
|
-
export declare const NAVBAR_SETTINGS: InjectionKey<NavbarSettings>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const NAVBAR_SETTINGS = Symbol("NavbarSettings");
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<NavbarNav
|
|
3
|
-
v-for="(menu, i) in menus"
|
|
4
|
-
:key="i"
|
|
5
|
-
:align="menu.align">
|
|
6
|
-
<template
|
|
7
|
-
v-for="(item, id) in menu.items"
|
|
8
|
-
:key="id">
|
|
9
|
-
<NavItemDropdown v-if="item.submenu">
|
|
10
|
-
<template #button-content>
|
|
11
|
-
<template v-if="item.icon && typeof item.icon === 'string'">
|
|
12
|
-
<img
|
|
13
|
-
:src="item.icon"
|
|
14
|
-
alt="icon-menu">
|
|
15
|
-
</template>
|
|
16
|
-
<template v-else-if="item.icon">
|
|
17
|
-
<component :is="item.icon" />
|
|
18
|
-
</template>
|
|
19
|
-
{{ item.label }}
|
|
20
|
-
</template>
|
|
21
|
-
<DropdownItem
|
|
22
|
-
v-for="(submenu, idx) in item.submenu"
|
|
23
|
-
:key="idx">
|
|
24
|
-
{{ submenu.label }}
|
|
25
|
-
</DropdownItem>
|
|
26
|
-
</NavItemDropdown>
|
|
27
|
-
<NavItem
|
|
28
|
-
v-else
|
|
29
|
-
:href="item.url"
|
|
30
|
-
:class="{ 'nav__item--no-label' : !item.label }">
|
|
31
|
-
<template
|
|
32
|
-
#icon>
|
|
33
|
-
<template v-if="item.icon && typeof item.icon === 'string'">
|
|
34
|
-
<img
|
|
35
|
-
:src="item.icon"
|
|
36
|
-
alt="icon-menu">
|
|
37
|
-
</template>
|
|
38
|
-
<template v-else-if="item.icon">
|
|
39
|
-
<component :is="item.icon" />
|
|
40
|
-
</template>
|
|
41
|
-
</template>
|
|
42
|
-
{{ item.label }}
|
|
43
|
-
</NavItem>
|
|
44
|
-
</template>
|
|
45
|
-
</NavbarNav>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<script lang="ts" setup>
|
|
49
|
-
import type { PropType } from 'vue-demi'
|
|
50
|
-
import NavbarNav from '../navbar/NavbarNav.vue'
|
|
51
|
-
import type { Menu } from '../sidebar-menu'
|
|
52
|
-
|
|
53
|
-
defineProps({
|
|
54
|
-
menus: {
|
|
55
|
-
type : Array as PropType<Menu[]>,
|
|
56
|
-
default: () => ([] as Menu[]),
|
|
57
|
-
},
|
|
58
|
-
})
|
|
59
|
-
</script>
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div data-testid="notify">
|
|
3
|
-
<template
|
|
4
|
-
v-for="item in groups.values()"
|
|
5
|
-
:key="item.position">
|
|
6
|
-
<NotifyGroup
|
|
7
|
-
:ref="(el: any) => { item.ref.value = el}"
|
|
8
|
-
:position="item.position" />
|
|
9
|
-
</template>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script lang="ts" setup>
|
|
14
|
-
import type { Ref } from 'vue-demi'
|
|
15
|
-
import {
|
|
16
|
-
ref,
|
|
17
|
-
shallowRef,
|
|
18
|
-
triggerRef,
|
|
19
|
-
nextTick,
|
|
20
|
-
} from 'vue-demi'
|
|
21
|
-
import NotifyGroup from './NotifyGroup.vue'
|
|
22
|
-
import type { NotifyOption, NotifyPositionVariant } from '.'
|
|
23
|
-
|
|
24
|
-
type NotifyGroupInstance = InstanceType<typeof NotifyGroup>
|
|
25
|
-
|
|
26
|
-
type NotifyGroupMap = Map<NotifyPositionVariant, {
|
|
27
|
-
position: NotifyPositionVariant,
|
|
28
|
-
ref: Ref<NotifyGroupInstance>,
|
|
29
|
-
}>
|
|
30
|
-
|
|
31
|
-
const groups = shallowRef<NotifyGroupMap>(new Map())
|
|
32
|
-
|
|
33
|
-
async function show (options: NotifyOption) {
|
|
34
|
-
const position = options.position ?? 'bottom-left'
|
|
35
|
-
|
|
36
|
-
let group = groups.value.get(position)
|
|
37
|
-
|
|
38
|
-
if (!group) {
|
|
39
|
-
group = { ref: ref(), position }
|
|
40
|
-
groups.value.set(position, group)
|
|
41
|
-
|
|
42
|
-
triggerRef(groups)
|
|
43
|
-
|
|
44
|
-
await nextTick()
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return group.ref.value?.show(options)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
defineExpose({ show })
|
|
51
|
-
</script>
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
data-testid="notify-group"
|
|
4
|
-
class="notify-group"
|
|
5
|
-
:class="classNames">
|
|
6
|
-
<TransitionGroup
|
|
7
|
-
tag="div"
|
|
8
|
-
name="notify"
|
|
9
|
-
class="notify-group__container">
|
|
10
|
-
<template
|
|
11
|
-
v-for="item in items"
|
|
12
|
-
:key="item._id">
|
|
13
|
-
<pNotifyItem
|
|
14
|
-
:option="item"
|
|
15
|
-
@update:option="update(item._id, $event)"
|
|
16
|
-
@dismissed="remove(item._id)" />
|
|
17
|
-
</template>
|
|
18
|
-
</TransitionGroup>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script lang="ts" setup>
|
|
23
|
-
import type {
|
|
24
|
-
PropType,
|
|
25
|
-
Ref,
|
|
26
|
-
} from 'vue-demi'
|
|
27
|
-
import {
|
|
28
|
-
computed,
|
|
29
|
-
shallowRef,
|
|
30
|
-
triggerRef,
|
|
31
|
-
} from 'vue-demi'
|
|
32
|
-
import type {
|
|
33
|
-
NotifyInstance,
|
|
34
|
-
NotifyOption,
|
|
35
|
-
NotifyPositionVariant,
|
|
36
|
-
} from '.'
|
|
37
|
-
import pNotifyItem from './NotifyItem.vue'
|
|
38
|
-
import defu from 'defu'
|
|
39
|
-
|
|
40
|
-
interface NotifyItem extends NotifyOption {
|
|
41
|
-
_id: symbol,
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const props = defineProps({
|
|
45
|
-
position: {
|
|
46
|
-
type : String as PropType<NotifyPositionVariant>,
|
|
47
|
-
default: 'bottom-left',
|
|
48
|
-
},
|
|
49
|
-
noAnimation: {
|
|
50
|
-
type : Boolean,
|
|
51
|
-
default: false,
|
|
52
|
-
},
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
const items: Ref<NotifyItem[]> = shallowRef([])
|
|
56
|
-
|
|
57
|
-
const classNames = computed(() => {
|
|
58
|
-
const result: string[] = []
|
|
59
|
-
|
|
60
|
-
if (props.position)
|
|
61
|
-
result.push(`notify-group--${props.position}`)
|
|
62
|
-
|
|
63
|
-
return result
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
function add (option: NotifyOption) {
|
|
67
|
-
const _id = Symbol('NotifyID')
|
|
68
|
-
const item = { ...option, _id }
|
|
69
|
-
|
|
70
|
-
items.value.push(item)
|
|
71
|
-
|
|
72
|
-
triggerRef(items)
|
|
73
|
-
|
|
74
|
-
return _id
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function remove (id: symbol) {
|
|
78
|
-
items.value.splice(items.value.findIndex((item) => item._id === id), 1)
|
|
79
|
-
|
|
80
|
-
triggerRef(items)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function update (id: symbol, option: Partial<NotifyOption>) {
|
|
84
|
-
const i = items.value.findIndex((i) => i._id === id)
|
|
85
|
-
|
|
86
|
-
if (i > -1)
|
|
87
|
-
items.value[i] = defu(option, items.value[i])
|
|
88
|
-
|
|
89
|
-
triggerRef(items)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function show (option: NotifyOption): NotifyInstance {
|
|
93
|
-
const id = add(option)
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
update (option: Partial<NotifyOption>) {
|
|
97
|
-
update(id, option)
|
|
98
|
-
},
|
|
99
|
-
close () {
|
|
100
|
-
remove(id)
|
|
101
|
-
},
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
defineExpose({
|
|
106
|
-
add,
|
|
107
|
-
show,
|
|
108
|
-
remove,
|
|
109
|
-
update,
|
|
110
|
-
})
|
|
111
|
-
</script>
|
|
112
|
-
|
|
113
|
-
<style lang="postcss">
|
|
114
|
-
.notify-group {
|
|
115
|
-
--p-notify-z-index: theme(zIndex.notify);
|
|
116
|
-
|
|
117
|
-
@apply z-[var(--p-notify-z-index)] fixed;
|
|
118
|
-
|
|
119
|
-
&__container {
|
|
120
|
-
@apply flex space-y-2 h-full overflow-visible;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&--top-right {
|
|
124
|
-
.notify-group__container {
|
|
125
|
-
@apply items-end;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.notify {
|
|
129
|
-
&-enter-from,
|
|
130
|
-
&-leave-to {
|
|
131
|
-
@apply opacity-0 translate-x-20;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&--top-center {
|
|
137
|
-
@apply left-1/2 -translate-x-1/2;
|
|
138
|
-
|
|
139
|
-
.notify-group__container {
|
|
140
|
-
@apply items-center;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.notify {
|
|
144
|
-
&-enter-from,
|
|
145
|
-
&-leave-to {
|
|
146
|
-
@apply opacity-0 -translate-y-20;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&--top-left {
|
|
152
|
-
.notify-group__container {
|
|
153
|
-
@apply items-start;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.notify {
|
|
157
|
-
&-enter-from,
|
|
158
|
-
&-leave-to {
|
|
159
|
-
@apply opacity-0 -translate-x-20;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
&--bottom-right {
|
|
165
|
-
.notify-group__container {
|
|
166
|
-
@apply items-end;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.notify {
|
|
170
|
-
&-enter-from,
|
|
171
|
-
&-leave-to {
|
|
172
|
-
@apply opacity-0 translate-x-20;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&--bottom-center {
|
|
178
|
-
@apply left-1/2 -translate-x-1/2;
|
|
179
|
-
|
|
180
|
-
.notify-group__container {
|
|
181
|
-
@apply items-center;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.notify {
|
|
185
|
-
&-enter-from,
|
|
186
|
-
&-leave-to {
|
|
187
|
-
@apply opacity-0 translate-y-20;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
&--bottom-left {
|
|
193
|
-
.notify-group__container {
|
|
194
|
-
@apply items-start;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.notify {
|
|
198
|
-
&-enter-from,
|
|
199
|
-
&-leave-to {
|
|
200
|
-
@apply opacity-0 -translate-x-20;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
&--top-left,
|
|
206
|
-
&--top-center,
|
|
207
|
-
&--top-right {
|
|
208
|
-
@apply top-8;
|
|
209
|
-
|
|
210
|
-
.notify-group__container {
|
|
211
|
-
@apply justify-start flex-col-reverse space-y-reverse;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
&--top-right,
|
|
216
|
-
&--bottom-right {
|
|
217
|
-
@apply right-8;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
&--top-left,
|
|
221
|
-
&--bottom-left {
|
|
222
|
-
@apply left-8;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
&--bottom-left,
|
|
226
|
-
&--bottom-center,
|
|
227
|
-
&--bottom-right {
|
|
228
|
-
@apply bottom-8;
|
|
229
|
-
|
|
230
|
-
.notify-group__container {
|
|
231
|
-
@apply justify-end flex-col;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.notify {
|
|
237
|
-
@apply will-change-[opacity,transform];
|
|
238
|
-
|
|
239
|
-
&-enter-active,
|
|
240
|
-
&-leave-active {
|
|
241
|
-
@apply transition-all duration-150;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
</style>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="option.component"
|
|
4
|
-
v-bind="option.props" />
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script setup lang="ts">
|
|
8
|
-
import type { PropType } from 'vue-demi'
|
|
9
|
-
import { provide, watchEffect } from 'vue-demi'
|
|
10
|
-
import { NOTIFY_CONTEXT, type NotifyOption } from '.'
|
|
11
|
-
|
|
12
|
-
const props = defineProps({
|
|
13
|
-
option: {
|
|
14
|
-
type : Object as PropType<NotifyOption>,
|
|
15
|
-
default: () => ({}),
|
|
16
|
-
},
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const emit = defineEmits<{
|
|
20
|
-
'dismissed': [],
|
|
21
|
-
'update:option': [Partial<NotifyOption>],
|
|
22
|
-
}>()
|
|
23
|
-
|
|
24
|
-
function close () {
|
|
25
|
-
emit('dismissed')
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function update (option: Partial<NotifyOption>) {
|
|
29
|
-
emit('update:option', option)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
watchEffect((onCleanup) => {
|
|
33
|
-
const duration = props.option.duration ?? 3000
|
|
34
|
-
|
|
35
|
-
if (Number.isFinite(duration) && duration > 0) {
|
|
36
|
-
const timer = setTimeout(close, duration)
|
|
37
|
-
|
|
38
|
-
onCleanup(() => {
|
|
39
|
-
clearTimeout(timer)
|
|
40
|
-
})
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
provide(NOTIFY_CONTEXT, { close, update })
|
|
45
|
-
</script>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { InjectionKey } from 'vue-demi';
|
|
2
|
-
import type { ComponentInstance, Component } from '../global/use-singleton';
|
|
3
|
-
export type NotifyPositionVariant = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
4
|
-
export interface NotifyInstance<C extends Component = any> {
|
|
5
|
-
close: () => void;
|
|
6
|
-
update: (option: Partial<NotifyOption<C>>) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const NOTIFY_CONTEXT: InjectionKey<NotifyInstance>;
|
|
9
|
-
export interface NotifyOption<C extends Component = any> {
|
|
10
|
-
component: C;
|
|
11
|
-
props?: ComponentInstance<C>['$props'];
|
|
12
|
-
position?: NotifyPositionVariant;
|
|
13
|
-
duration?: number;
|
|
14
|
-
}
|
|
15
|
-
export declare function showNotify<C extends Component = any>(options: NotifyOption<C>): Promise<NotifyInstance<C>>;
|
|
16
|
-
export declare function useNotifyItem(): {
|
|
17
|
-
close: (...args: any[]) => void;
|
|
18
|
-
update: (...args: any[]) => void;
|
|
19
|
-
};
|
|
20
|
-
export default showNotify;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { inject } from "vue-demi";
|
|
2
|
-
import { useSingleton } from "../global/use-singleton.mjs";
|
|
3
|
-
import { noop } from "lodash-es";
|
|
4
|
-
export const NOTIFY_CONTEXT = Symbol("NotifyContext");
|
|
5
|
-
export async function showNotify(options) {
|
|
6
|
-
const { default: Notify } = await import("./Notify.vue");
|
|
7
|
-
const instance = await useSingleton(Notify);
|
|
8
|
-
return instance.show(options);
|
|
9
|
-
}
|
|
10
|
-
export function useNotifyItem() {
|
|
11
|
-
return inject(NOTIFY_CONTEXT, () => {
|
|
12
|
-
return {
|
|
13
|
-
close: noop,
|
|
14
|
-
update: noop
|
|
15
|
-
};
|
|
16
|
-
}, true);
|
|
17
|
-
}
|
|
18
|
-
export default showNotify;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-if="loading"
|
|
4
|
-
data-testid="overlay"
|
|
5
|
-
class="overlay">
|
|
6
|
-
<div class="overlay__icon">
|
|
7
|
-
<img
|
|
8
|
-
:src="icon"
|
|
9
|
-
alt="overlay-icon">
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script lang="ts" setup>
|
|
15
|
-
import useLoading from './utils/use-loading'
|
|
16
|
-
import Icon from './assets/icon-white.svg'
|
|
17
|
-
|
|
18
|
-
defineProps({
|
|
19
|
-
icon: {
|
|
20
|
-
type : String,
|
|
21
|
-
default: Icon,
|
|
22
|
-
},
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const loading = useLoading({ elapsed: false })
|
|
26
|
-
|
|
27
|
-
function show () {
|
|
28
|
-
loading.value = true
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function hide () {
|
|
32
|
-
loading.value = false
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
defineExpose({
|
|
36
|
-
show,
|
|
37
|
-
hide,
|
|
38
|
-
})
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<style lang="postcss">
|
|
42
|
-
@keyframes overlayLoading {
|
|
43
|
-
from {
|
|
44
|
-
opacity: 1;
|
|
45
|
-
transform: scale(0);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
to {
|
|
49
|
-
opacity: 0;
|
|
50
|
-
transform: scale(1.5);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.overlay {
|
|
55
|
-
--p-overlay-z-index: theme(zIndex.overlay);
|
|
56
|
-
|
|
57
|
-
@apply z-[var(--p-overlay-z-index)] fixed top-0 left-0 right-0 bottom-0 w-screen h-screen bg-inverse/30 flex items-center justify-center select-none will-change-[transform,opacity];
|
|
58
|
-
@apply dark:bg-dark-inverse/30;
|
|
59
|
-
|
|
60
|
-
&__icon {
|
|
61
|
-
@apply w-10 md:w-16 animate-[overlayLoading_1s_ease-in-out_infinite];
|
|
62
|
-
|
|
63
|
-
& > img {
|
|
64
|
-
@apply max-w-full h-auto;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
</style>
|