@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,230 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Dropdown
|
|
3
|
-
v-model="isOpen"
|
|
4
|
-
class="timepicker"
|
|
5
|
-
data-testid="timepicker"
|
|
6
|
-
aria-label="timepicker"
|
|
7
|
-
:class="classNames"
|
|
8
|
-
:disabled="disabled">
|
|
9
|
-
<template #activator>
|
|
10
|
-
<Input
|
|
11
|
-
:value="value"
|
|
12
|
-
:model-value="value"
|
|
13
|
-
data-testid="timepicker-input"
|
|
14
|
-
class="timepicker__input"
|
|
15
|
-
:placeholder="placeholder"
|
|
16
|
-
:disabled="disabled"
|
|
17
|
-
:error="error"
|
|
18
|
-
:size="size"
|
|
19
|
-
readonly
|
|
20
|
-
@focus="onFocus">
|
|
21
|
-
<template #append>
|
|
22
|
-
<IconTime
|
|
23
|
-
class="timepicker__icon" />
|
|
24
|
-
</template>
|
|
25
|
-
</Input>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<Time
|
|
29
|
-
v-if="isOpen"
|
|
30
|
-
v-slot="{ confirm }"
|
|
31
|
-
v-model="model"
|
|
32
|
-
:time-separator="timeSeparator"
|
|
33
|
-
:is12-hour="is12Hour"
|
|
34
|
-
:hour-interval="hourInterval"
|
|
35
|
-
:minute-interval="minuteInterval"
|
|
36
|
-
:min="min"
|
|
37
|
-
:max="max"
|
|
38
|
-
@context="onTimeContext"
|
|
39
|
-
@change="(context) => emit('change', context)">
|
|
40
|
-
<slot
|
|
41
|
-
name="footer"
|
|
42
|
-
:confirm="confirm"
|
|
43
|
-
:close="onClose">
|
|
44
|
-
<Button
|
|
45
|
-
v-if="dismissable"
|
|
46
|
-
variant="ghost"
|
|
47
|
-
class="time__action--cancel"
|
|
48
|
-
@click="onClose">
|
|
49
|
-
{{ dimissLabel }}
|
|
50
|
-
</Button>
|
|
51
|
-
<Button
|
|
52
|
-
variant="solid"
|
|
53
|
-
color="info"
|
|
54
|
-
@click="confirm">
|
|
55
|
-
{{ confirmLabel }}
|
|
56
|
-
</Button>
|
|
57
|
-
</slot>
|
|
58
|
-
</Time>
|
|
59
|
-
</Dropdown>
|
|
60
|
-
</template>
|
|
61
|
-
|
|
62
|
-
<script setup lang="ts">
|
|
63
|
-
import Dropdown from '../dropdown/Dropdown.vue'
|
|
64
|
-
import Input from '../input/Input.vue'
|
|
65
|
-
import Button from '../button/Button.vue'
|
|
66
|
-
import IconTime from '@privyid/persona-icon/vue/time/16.vue'
|
|
67
|
-
import Time from '../time/Time.vue'
|
|
68
|
-
import type { SizeVariant } from '../button'
|
|
69
|
-
import { useVModel } from '../input'
|
|
70
|
-
import type { TimeContext, TimeModel } from '../time'
|
|
71
|
-
import { validateInterval } from '../time/utils'
|
|
72
|
-
import type { PropType, VNode } from 'vue-demi'
|
|
73
|
-
import {
|
|
74
|
-
ref, computed, onMounted,
|
|
75
|
-
} from 'vue-demi'
|
|
76
|
-
import { format, isDate } from 'date-fns'
|
|
77
|
-
|
|
78
|
-
const props = defineProps({
|
|
79
|
-
modelValue: {
|
|
80
|
-
type : [Date, Object] as PropType<Date | TimeModel>,
|
|
81
|
-
default: undefined,
|
|
82
|
-
},
|
|
83
|
-
size: {
|
|
84
|
-
type : String as PropType<SizeVariant>,
|
|
85
|
-
default: 'md',
|
|
86
|
-
},
|
|
87
|
-
placeholder: {
|
|
88
|
-
type : String,
|
|
89
|
-
default: '',
|
|
90
|
-
},
|
|
91
|
-
disabled: {
|
|
92
|
-
type : Boolean,
|
|
93
|
-
default: undefined,
|
|
94
|
-
},
|
|
95
|
-
readonly: {
|
|
96
|
-
type : Boolean,
|
|
97
|
-
default: undefined,
|
|
98
|
-
},
|
|
99
|
-
error: {
|
|
100
|
-
type : Boolean,
|
|
101
|
-
default: undefined,
|
|
102
|
-
},
|
|
103
|
-
dismissable: {
|
|
104
|
-
type : Boolean,
|
|
105
|
-
default: false,
|
|
106
|
-
},
|
|
107
|
-
dimissLabel: {
|
|
108
|
-
type : String,
|
|
109
|
-
default: 'Cancel',
|
|
110
|
-
},
|
|
111
|
-
confirmLabel: {
|
|
112
|
-
type : String,
|
|
113
|
-
default: 'Set',
|
|
114
|
-
},
|
|
115
|
-
timeSeparator: {
|
|
116
|
-
type : String,
|
|
117
|
-
default: ':',
|
|
118
|
-
},
|
|
119
|
-
is12Hour: {
|
|
120
|
-
type : Boolean,
|
|
121
|
-
default: false,
|
|
122
|
-
},
|
|
123
|
-
hourInterval: {
|
|
124
|
-
type : Number,
|
|
125
|
-
default : 1,
|
|
126
|
-
validator: (value: number, prop) => {
|
|
127
|
-
return validateInterval('hour', value, prop.is12Hour as boolean)
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
minuteInterval: {
|
|
131
|
-
type : Number,
|
|
132
|
-
default : 1,
|
|
133
|
-
validator: (value: number) => {
|
|
134
|
-
return validateInterval('minute', value)
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
min: {
|
|
138
|
-
type : Date,
|
|
139
|
-
default: undefined,
|
|
140
|
-
},
|
|
141
|
-
max: {
|
|
142
|
-
type : Date,
|
|
143
|
-
default: undefined,
|
|
144
|
-
},
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
const emit = defineEmits<{
|
|
148
|
-
'update:modelValue': [unknown],
|
|
149
|
-
'context': [TimeContext],
|
|
150
|
-
'change': [TimeContext],
|
|
151
|
-
}>()
|
|
152
|
-
|
|
153
|
-
const model = useVModel(props)
|
|
154
|
-
const isOpen = ref(false)
|
|
155
|
-
const value = ref('')
|
|
156
|
-
|
|
157
|
-
const classNames = computed(() => {
|
|
158
|
-
const result: string[] = []
|
|
159
|
-
|
|
160
|
-
if (isOpen.value)
|
|
161
|
-
result.push('timepicker--open')
|
|
162
|
-
|
|
163
|
-
if (props.disabled)
|
|
164
|
-
result.push('timepicker--disabled')
|
|
165
|
-
|
|
166
|
-
if (props.readonly)
|
|
167
|
-
result.push('timepicker--readonly')
|
|
168
|
-
|
|
169
|
-
if (props.error)
|
|
170
|
-
result.push('timepicker--error', 'state--error')
|
|
171
|
-
|
|
172
|
-
return result
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
onMounted(() => {
|
|
176
|
-
if (!model.value)
|
|
177
|
-
return
|
|
178
|
-
|
|
179
|
-
if (isDate(model.value))
|
|
180
|
-
value.value = format(model.value as Date, props.is12Hour ? 'hh:mm a' : 'HH:mm')
|
|
181
|
-
else {
|
|
182
|
-
const { hh, mm, a } = model.value as TimeModel
|
|
183
|
-
const time = `${hh}:${mm}`
|
|
184
|
-
|
|
185
|
-
value.value = props.is12Hour ? `${time} ${a || ''}` : time
|
|
186
|
-
}
|
|
187
|
-
})
|
|
188
|
-
|
|
189
|
-
function onFocus () {
|
|
190
|
-
if (!props.disabled && !props.readonly)
|
|
191
|
-
isOpen.value = true
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function onTimeContext (context: TimeContext) {
|
|
195
|
-
onClose()
|
|
196
|
-
|
|
197
|
-
value.value = context.time
|
|
198
|
-
emit('context', context)
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function onClose () {
|
|
202
|
-
isOpen.value = false
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
defineSlots<{
|
|
206
|
-
'footer'(props: {
|
|
207
|
-
confirm: () => void,
|
|
208
|
-
close: () => void,
|
|
209
|
-
}): VNode[], }>()
|
|
210
|
-
</script>
|
|
211
|
-
|
|
212
|
-
<style lang="postcss">
|
|
213
|
-
.timepicker {
|
|
214
|
-
&__input {
|
|
215
|
-
@apply pr-8 truncate;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
&__icon {
|
|
219
|
-
@apply transition-transform duration-150 text-muted pointer-events-none;
|
|
220
|
-
@apply dark:text-dark-muted;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
> .dropdown__menu {
|
|
224
|
-
--p-dropdown-size: auto;
|
|
225
|
-
--p-dropdown-max-height: 100%;
|
|
226
|
-
|
|
227
|
-
@apply min-w-max max-h-min;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
</style>
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
data-testid="toast"
|
|
4
|
-
class="toast"
|
|
5
|
-
:class="toastClass"
|
|
6
|
-
v-bind="toastAttrs">
|
|
7
|
-
<div
|
|
8
|
-
v-if="toastIcon"
|
|
9
|
-
class="toast__icon"
|
|
10
|
-
data-testid="toast-icon"
|
|
11
|
-
:class="classIcon">
|
|
12
|
-
<component
|
|
13
|
-
:is="toastIcon" />
|
|
14
|
-
</div>
|
|
15
|
-
<div class="toast__body">
|
|
16
|
-
<div
|
|
17
|
-
v-p-md.inline="text || title"
|
|
18
|
-
data-testid="toast-text"
|
|
19
|
-
class="toast__text" />
|
|
20
|
-
</div>
|
|
21
|
-
<div
|
|
22
|
-
v-if="loading"
|
|
23
|
-
data-testid="toast-loading"
|
|
24
|
-
class="toast__loading">
|
|
25
|
-
<span
|
|
26
|
-
v-p-md.inline="loadingText"
|
|
27
|
-
data-testid="toast-loading-text" />
|
|
28
|
-
<SpinnerRinggo
|
|
29
|
-
v-if="loadingSpinner"
|
|
30
|
-
data-testid="toast-loading-spinner" />
|
|
31
|
-
</div>
|
|
32
|
-
<div
|
|
33
|
-
v-if="actions.length > 0"
|
|
34
|
-
class="toast__actions">
|
|
35
|
-
<template
|
|
36
|
-
v-for="(action, i) in actions"
|
|
37
|
-
:key="i">
|
|
38
|
-
<p-button
|
|
39
|
-
class="toast__action"
|
|
40
|
-
data-testid="toast-action"
|
|
41
|
-
v-bind="action.attrs"
|
|
42
|
-
:size="action.size ?? 'xs'"
|
|
43
|
-
:color="action.color"
|
|
44
|
-
:variant="action.variant ?? 'ghost'"
|
|
45
|
-
@click.prevent="onActionClick(action)">
|
|
46
|
-
<span v-p-md.inline="action.text" />
|
|
47
|
-
</p-button>
|
|
48
|
-
</template>
|
|
49
|
-
</div>
|
|
50
|
-
<div
|
|
51
|
-
v-if="dismissable"
|
|
52
|
-
data-testid="toast-close"
|
|
53
|
-
class="toast__close"
|
|
54
|
-
@click="close">
|
|
55
|
-
<IconClose />
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</template>
|
|
59
|
-
|
|
60
|
-
<script lang="ts" setup>
|
|
61
|
-
import type {
|
|
62
|
-
PropType,
|
|
63
|
-
Component,
|
|
64
|
-
} from 'vue-demi'
|
|
65
|
-
import {
|
|
66
|
-
computed,
|
|
67
|
-
h,
|
|
68
|
-
} from 'vue-demi'
|
|
69
|
-
import SpinnerRinggo from '../spinner/SpinnerRinggo.vue'
|
|
70
|
-
import { vPMd } from '../markdown'
|
|
71
|
-
import pButton from '../button/Button.vue'
|
|
72
|
-
import IconClose from '@privyid/persona-icon/vue/close/16.vue'
|
|
73
|
-
import type { ColorVariant } from '../button'
|
|
74
|
-
import type { AdditionalAttr } from '../global/types'
|
|
75
|
-
import type { ToastActionOption } from '.'
|
|
76
|
-
import { useNotifyItem } from '../notify'
|
|
77
|
-
|
|
78
|
-
const props = defineProps({
|
|
79
|
-
text: {
|
|
80
|
-
type : String,
|
|
81
|
-
default: '',
|
|
82
|
-
},
|
|
83
|
-
/**
|
|
84
|
-
* @deprecated use `text` instead
|
|
85
|
-
*/
|
|
86
|
-
title: {
|
|
87
|
-
type : String,
|
|
88
|
-
default: '',
|
|
89
|
-
},
|
|
90
|
-
icon: {
|
|
91
|
-
type: [
|
|
92
|
-
String,
|
|
93
|
-
Object,
|
|
94
|
-
Function,
|
|
95
|
-
] as PropType<string | Component>,
|
|
96
|
-
default: undefined,
|
|
97
|
-
},
|
|
98
|
-
iconColor: {
|
|
99
|
-
type : String as PropType<ColorVariant>,
|
|
100
|
-
default: undefined,
|
|
101
|
-
},
|
|
102
|
-
toastAttrs: {
|
|
103
|
-
type : Object as PropType<AdditionalAttr>,
|
|
104
|
-
default: undefined,
|
|
105
|
-
},
|
|
106
|
-
toastClass: {
|
|
107
|
-
type: [
|
|
108
|
-
String,
|
|
109
|
-
Array,
|
|
110
|
-
Object,
|
|
111
|
-
],
|
|
112
|
-
default: undefined,
|
|
113
|
-
},
|
|
114
|
-
actions: {
|
|
115
|
-
type : Array as PropType<ToastActionOption[]>,
|
|
116
|
-
default: () => ([]),
|
|
117
|
-
},
|
|
118
|
-
dismissable: {
|
|
119
|
-
type : Boolean,
|
|
120
|
-
default: true,
|
|
121
|
-
},
|
|
122
|
-
loading: {
|
|
123
|
-
type : Boolean,
|
|
124
|
-
default: false,
|
|
125
|
-
},
|
|
126
|
-
loadingText: {
|
|
127
|
-
type : String,
|
|
128
|
-
default: '',
|
|
129
|
-
},
|
|
130
|
-
loadingSpinner: {
|
|
131
|
-
type : Boolean,
|
|
132
|
-
default: true,
|
|
133
|
-
},
|
|
134
|
-
})
|
|
135
|
-
|
|
136
|
-
const notify = useNotifyItem()
|
|
137
|
-
const emit = defineEmits<{
|
|
138
|
-
'dismissed': [],
|
|
139
|
-
}>()
|
|
140
|
-
|
|
141
|
-
const classIcon = computed(() => {
|
|
142
|
-
const result: string[] = ['toast__icon--default']
|
|
143
|
-
|
|
144
|
-
if (props.iconColor)
|
|
145
|
-
result.push(`toast__icon--${props.iconColor}`)
|
|
146
|
-
|
|
147
|
-
return result
|
|
148
|
-
})
|
|
149
|
-
|
|
150
|
-
const toastIcon = computed(() => {
|
|
151
|
-
if (props.icon) {
|
|
152
|
-
if (typeof props.icon === 'string') {
|
|
153
|
-
return () => h('img', {
|
|
154
|
-
'src' : props.icon,
|
|
155
|
-
'width' : 16,
|
|
156
|
-
'height' : 16,
|
|
157
|
-
'data-testid': 'toast-icon-image',
|
|
158
|
-
})
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return props.icon
|
|
162
|
-
}
|
|
163
|
-
})
|
|
164
|
-
|
|
165
|
-
function close () {
|
|
166
|
-
notify.close()
|
|
167
|
-
|
|
168
|
-
emit('dismissed')
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
async function onActionClick (action: ToastActionOption) {
|
|
172
|
-
const event = new MouseEvent('click')
|
|
173
|
-
|
|
174
|
-
if (typeof action.onClick === 'function')
|
|
175
|
-
await action.onClick(Object.assign(event, { close }))
|
|
176
|
-
|
|
177
|
-
if (!event.defaultPrevented)
|
|
178
|
-
close()
|
|
179
|
-
}
|
|
180
|
-
</script>
|
|
181
|
-
|
|
182
|
-
<style lang="postcss">
|
|
183
|
-
.toast {
|
|
184
|
-
--p-toast-icon-color-primary: theme(textColor.brand.accent.DEFAULT);
|
|
185
|
-
--p-toast-icon-color-primary-dark: theme(textColor.dark.brand.accent.DEFAULT);
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* global style
|
|
189
|
-
* of toast
|
|
190
|
-
*/
|
|
191
|
-
@apply flex items-center shadow-xl rounded w-72 md:w-96 overflow-hidden bg-inverse px-4 py-3 space-x-2;
|
|
192
|
-
@apply dark:bg-dark-inverse;
|
|
193
|
-
|
|
194
|
-
&__icon,
|
|
195
|
-
&__close,
|
|
196
|
-
&__action {
|
|
197
|
-
@apply shrink-0;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
&__icon {
|
|
201
|
-
@apply flex items-center justify-center;
|
|
202
|
-
|
|
203
|
-
&--default {
|
|
204
|
-
@apply text-on-emphasis;
|
|
205
|
-
@apply dark:text-dark-on-emphasis;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
&--warning {
|
|
209
|
-
@apply text-warning;
|
|
210
|
-
@apply dark:text-dark-warning;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
&--success {
|
|
214
|
-
@apply text-success;
|
|
215
|
-
@apply dark:text-dark-success;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
&--primary {
|
|
219
|
-
@apply text-[color:var(--p-toast-icon-color-primary)];
|
|
220
|
-
@apply dark:text-[color:var(--p-toast-icon-color-primary-dark)];
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
&--danger {
|
|
224
|
-
@apply text-danger;
|
|
225
|
-
@apply dark:text-danger;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
+ .toast__body {
|
|
229
|
-
@apply pl-0;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
&__action {
|
|
234
|
-
@apply px-2;
|
|
235
|
-
|
|
236
|
-
&.btn {
|
|
237
|
-
&.btn--variant-ghost {
|
|
238
|
-
@apply text-dark-link;
|
|
239
|
-
@apply dark:text-link;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
&.btn--variant-outline {
|
|
243
|
-
@apply text-dark-default;
|
|
244
|
-
@apply dark:text-default;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
&__loading {
|
|
250
|
-
@apply flex items-center space-x-3 text-sm text-muted;
|
|
251
|
-
@apply dark:text-dark-muted;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
&__close {
|
|
255
|
-
@apply shrink-0 cursor-pointer text-muted/70 hover:text-muted;
|
|
256
|
-
@apply dark:text-dark-muted/70 dark:hover:text-dark-muted;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
&__body {
|
|
260
|
-
@apply grow space-y-2 flex flex-col overflow-hidden;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
&__text {
|
|
264
|
-
@apply text-sm font-medium leading-[1.75] text-on-emphasis line-clamp-2;
|
|
265
|
-
@apply dark:text-dark-on-emphasis;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
</style>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes, Component } from 'vue-demi';
|
|
2
|
-
import type { NotifyInstance, NotifyOption } from '../notify';
|
|
3
|
-
import type { ColorVariant, StyleVariant as ButtonStyleVariant, ColorVariant as ButtonColorVariant, SizeVariant as ButtonSizeVariant } from '../button';
|
|
4
|
-
import type { AdditionalAttr } from '../global/types';
|
|
5
|
-
import type { PopupActionOption, PopupStyleVariant, PopupTypeVariant } from '../popup';
|
|
6
|
-
import type { RequireAtLeastOne } from 'type-fest';
|
|
7
|
-
import type Toast from './Toast.vue';
|
|
8
|
-
export interface ToastActionOption extends PopupActionOption {
|
|
9
|
-
variant?: ButtonStyleVariant;
|
|
10
|
-
color?: ButtonColorVariant;
|
|
11
|
-
size?: ButtonSizeVariant;
|
|
12
|
-
}
|
|
13
|
-
interface Option extends Omit<NotifyOption, 'component'> {
|
|
14
|
-
text?: string;
|
|
15
|
-
icon?: string | Component;
|
|
16
|
-
iconColor?: ColorVariant;
|
|
17
|
-
toastClass?: HTMLAttributes['class'];
|
|
18
|
-
toastAttrs?: AdditionalAttr;
|
|
19
|
-
dismissable?: boolean;
|
|
20
|
-
actions?: ToastActionOption[];
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated `title` on toast was deprecated, use `popup()` instead.
|
|
23
|
-
*/
|
|
24
|
-
title?: string;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated `type` on toast was deprecated, use `popup()` instead.
|
|
27
|
-
*/
|
|
28
|
-
type?: PopupTypeVariant;
|
|
29
|
-
/**
|
|
30
|
-
* @deprecated `variant` on toast was deprecated, use `popup()` instead
|
|
31
|
-
*/
|
|
32
|
-
variant?: PopupStyleVariant;
|
|
33
|
-
loading?: boolean;
|
|
34
|
-
loadingText?: string;
|
|
35
|
-
loadingSpinner?: boolean;
|
|
36
|
-
}
|
|
37
|
-
export type ToastOption = RequireAtLeastOne<Option, 'title' | 'text'>;
|
|
38
|
-
export type ToastInstance = NotifyInstance<typeof Toast>;
|
|
39
|
-
export interface ToastProgressInstance extends ToastInstance {
|
|
40
|
-
setProgress: (text: string) => void;
|
|
41
|
-
}
|
|
42
|
-
declare function showToast(text: string): Promise<ToastInstance>;
|
|
43
|
-
declare function showToast(option: ToastOption): Promise<ToastInstance>;
|
|
44
|
-
export type ToastProgressOption = Omit<ToastOption, 'title' | 'type' | 'variant' | 'duration' | 'loading' | 'dismissable' | 'actions'>;
|
|
45
|
-
declare function showToastProgress(option: string, loadingText?: string): Promise<ToastProgressInstance>;
|
|
46
|
-
declare function showToastProgress(option: ToastProgressOption): Promise<ToastProgressInstance>;
|
|
47
|
-
declare const _default: typeof showToast & {
|
|
48
|
-
withProgress: typeof showToastProgress;
|
|
49
|
-
};
|
|
50
|
-
export default _default;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
markRaw
|
|
3
|
-
} from "vue-demi";
|
|
4
|
-
import { showNotify } from "../notify/index.mjs";
|
|
5
|
-
import showPopup from "../popup/index.mjs";
|
|
6
|
-
import defu from "defu";
|
|
7
|
-
async function showToast(option) {
|
|
8
|
-
if (typeof option === "string")
|
|
9
|
-
return await showToast({ text: option });
|
|
10
|
-
if (option.type ?? option.variant) {
|
|
11
|
-
if (option.type)
|
|
12
|
-
console.warn("`type` on toast was deprecated, use `popup()` instead.");
|
|
13
|
-
if (option.variant)
|
|
14
|
-
console.warn("`variant` on toast was deprecated, use `popup()` instead.");
|
|
15
|
-
return await showPopup({
|
|
16
|
-
...option,
|
|
17
|
-
popupClass: option.toastClass,
|
|
18
|
-
popupAttrs: option.toastAttrs
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
if (option.title)
|
|
22
|
-
console.warn("`title` on toast was deprecated, use `text` or `popup()` instead.");
|
|
23
|
-
const { default: pToast } = await import("./Toast.vue");
|
|
24
|
-
const instance = await showNotify({
|
|
25
|
-
component: markRaw(pToast),
|
|
26
|
-
props: option,
|
|
27
|
-
duration: option.duration,
|
|
28
|
-
position: option.position
|
|
29
|
-
});
|
|
30
|
-
return instance;
|
|
31
|
-
}
|
|
32
|
-
async function showToastProgress(option, loadingText) {
|
|
33
|
-
const opts = typeof option === "string" ? { text: option, loadingText } : option;
|
|
34
|
-
const instance = await showToast(defu({
|
|
35
|
-
loading: true,
|
|
36
|
-
duration: -1,
|
|
37
|
-
dismissable: false
|
|
38
|
-
}, opts));
|
|
39
|
-
function setProgress(text) {
|
|
40
|
-
instance.update({ props: { loadingText: text } });
|
|
41
|
-
}
|
|
42
|
-
return Object.assign(instance, { setProgress });
|
|
43
|
-
}
|
|
44
|
-
export default Object.assign(showToast, { withProgress: showToastProgress });
|