@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,235 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Dropdown
|
|
3
|
-
v-model="isOpen"
|
|
4
|
-
class="datepicker"
|
|
5
|
-
data-testid="datepicker"
|
|
6
|
-
aria-label="datepicker"
|
|
7
|
-
:placement="placement"
|
|
8
|
-
:class="classNames"
|
|
9
|
-
:disabled="disabled">
|
|
10
|
-
<template #activator>
|
|
11
|
-
<Input
|
|
12
|
-
v-bind="$attrs"
|
|
13
|
-
:value="value"
|
|
14
|
-
:model-value="value"
|
|
15
|
-
data-testid="datepicker-input"
|
|
16
|
-
class="datepicker__input"
|
|
17
|
-
:placeholder="placeholder"
|
|
18
|
-
:disabled="disabled"
|
|
19
|
-
:error="error"
|
|
20
|
-
:size="size"
|
|
21
|
-
:clearable="clearable"
|
|
22
|
-
:container-class="containerClass"
|
|
23
|
-
readonly
|
|
24
|
-
@clear="onClear"
|
|
25
|
-
@focus="onFocus">
|
|
26
|
-
<template #append>
|
|
27
|
-
<IconCalendar
|
|
28
|
-
class="datepicker__icon" />
|
|
29
|
-
</template>
|
|
30
|
-
</Input>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<Calendar
|
|
34
|
-
v-model="model"
|
|
35
|
-
class="datepicker__calendar"
|
|
36
|
-
:start="start"
|
|
37
|
-
:end="end"
|
|
38
|
-
:disabled="disabled"
|
|
39
|
-
:readonly="readonly"
|
|
40
|
-
:max="max"
|
|
41
|
-
:min="min"
|
|
42
|
-
:mode="mode"
|
|
43
|
-
:range="range"
|
|
44
|
-
:min-range="minRange"
|
|
45
|
-
:max-range="maxRange"
|
|
46
|
-
@change="onSelected"
|
|
47
|
-
@update:start="$emit('update:start', $event)"
|
|
48
|
-
@update:end="$emit('update:end', $event)" />
|
|
49
|
-
</Dropdown>
|
|
50
|
-
</template>
|
|
51
|
-
|
|
52
|
-
<script lang="ts" setup>
|
|
53
|
-
import Dropdown from '../dropdown/Dropdown.vue'
|
|
54
|
-
import Input from '../input/Input.vue'
|
|
55
|
-
import Calendar from '../calendar/Calendar.vue'
|
|
56
|
-
import { format as formatDate, isDate } from 'date-fns'
|
|
57
|
-
import type { PropType } from 'vue-demi'
|
|
58
|
-
import {
|
|
59
|
-
computed,
|
|
60
|
-
ref,
|
|
61
|
-
watch,
|
|
62
|
-
} from 'vue-demi'
|
|
63
|
-
import type { CalendarMode } from '../calendar/adapter/adapter'
|
|
64
|
-
import { useVModel } from '../input'
|
|
65
|
-
import IconCalendar from '@privyid/persona-icon/vue/calendar/16.vue'
|
|
66
|
-
import type { SizeVariant } from '../button'
|
|
67
|
-
import type { Placement } from '@floating-ui/dom'
|
|
68
|
-
|
|
69
|
-
defineOptions({ inheritAttrs: false })
|
|
70
|
-
|
|
71
|
-
const props = defineProps({
|
|
72
|
-
modelValue: {
|
|
73
|
-
type : [Date, Array] as PropType<Date | [Date, Date]>,
|
|
74
|
-
default: undefined,
|
|
75
|
-
},
|
|
76
|
-
size: {
|
|
77
|
-
type : String as PropType<SizeVariant>,
|
|
78
|
-
default: 'md',
|
|
79
|
-
},
|
|
80
|
-
disabled: {
|
|
81
|
-
type : Boolean,
|
|
82
|
-
default: false,
|
|
83
|
-
},
|
|
84
|
-
readonly: {
|
|
85
|
-
type : Boolean,
|
|
86
|
-
default: false,
|
|
87
|
-
},
|
|
88
|
-
error: {
|
|
89
|
-
type : Boolean,
|
|
90
|
-
default: false,
|
|
91
|
-
},
|
|
92
|
-
clearable: {
|
|
93
|
-
type : Boolean,
|
|
94
|
-
default: false,
|
|
95
|
-
},
|
|
96
|
-
containerClass: {
|
|
97
|
-
type: [
|
|
98
|
-
String,
|
|
99
|
-
Array,
|
|
100
|
-
Object,
|
|
101
|
-
],
|
|
102
|
-
default: undefined,
|
|
103
|
-
},
|
|
104
|
-
start: {
|
|
105
|
-
type : Date,
|
|
106
|
-
default: undefined,
|
|
107
|
-
},
|
|
108
|
-
end: {
|
|
109
|
-
type : Date,
|
|
110
|
-
default: undefined,
|
|
111
|
-
},
|
|
112
|
-
placeholder: {
|
|
113
|
-
type : String,
|
|
114
|
-
default: '',
|
|
115
|
-
},
|
|
116
|
-
format: {
|
|
117
|
-
type : String,
|
|
118
|
-
default: 'dd/MM/yyyy',
|
|
119
|
-
},
|
|
120
|
-
max: {
|
|
121
|
-
type : Date,
|
|
122
|
-
default: undefined,
|
|
123
|
-
},
|
|
124
|
-
min: {
|
|
125
|
-
type : Date,
|
|
126
|
-
default: undefined,
|
|
127
|
-
},
|
|
128
|
-
mode: {
|
|
129
|
-
type : String as PropType<CalendarMode>,
|
|
130
|
-
default: 'date',
|
|
131
|
-
},
|
|
132
|
-
range: {
|
|
133
|
-
type : Boolean,
|
|
134
|
-
default: false,
|
|
135
|
-
},
|
|
136
|
-
minRange: {
|
|
137
|
-
type : String,
|
|
138
|
-
default: undefined,
|
|
139
|
-
},
|
|
140
|
-
maxRange: {
|
|
141
|
-
type : String,
|
|
142
|
-
default: undefined,
|
|
143
|
-
},
|
|
144
|
-
placement: {
|
|
145
|
-
type : String as PropType<Placement>,
|
|
146
|
-
default: 'bottom-start',
|
|
147
|
-
},
|
|
148
|
-
})
|
|
149
|
-
|
|
150
|
-
const emit = defineEmits<{
|
|
151
|
-
'change': [unknown],
|
|
152
|
-
'update:modelValue': [unknown],
|
|
153
|
-
'update:start': [Date],
|
|
154
|
-
'update:end': [Date],
|
|
155
|
-
}>()
|
|
156
|
-
|
|
157
|
-
const model = useVModel(props)
|
|
158
|
-
const isOpen = ref(false)
|
|
159
|
-
|
|
160
|
-
const value = computed(() => {
|
|
161
|
-
const dates = Array.isArray(model.value)
|
|
162
|
-
? model.value
|
|
163
|
-
: [model.value]
|
|
164
|
-
|
|
165
|
-
return dates.map((date) => {
|
|
166
|
-
return isDate(date)
|
|
167
|
-
? formatDate(date as Date, props.format)
|
|
168
|
-
: ''
|
|
169
|
-
}).filter(Boolean).join(' - ')
|
|
170
|
-
})
|
|
171
|
-
|
|
172
|
-
watch(() => props.start, (start) => {
|
|
173
|
-
if (Array.isArray(model.value))
|
|
174
|
-
model.value[0] = start
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
watch(() => props.end, (end) => {
|
|
178
|
-
if (Array.isArray(model.value))
|
|
179
|
-
model.value[1] = end
|
|
180
|
-
})
|
|
181
|
-
|
|
182
|
-
const classNames = computed(() => {
|
|
183
|
-
const result: string[] = []
|
|
184
|
-
|
|
185
|
-
if (isOpen.value)
|
|
186
|
-
result.push('datepicker--open')
|
|
187
|
-
|
|
188
|
-
if (props.disabled)
|
|
189
|
-
result.push('datepicker--disabled')
|
|
190
|
-
|
|
191
|
-
if (props.readonly)
|
|
192
|
-
result.push('datepicker--readonly')
|
|
193
|
-
|
|
194
|
-
if (props.error)
|
|
195
|
-
result.push('datepicker--error', 'state--error')
|
|
196
|
-
|
|
197
|
-
return result
|
|
198
|
-
})
|
|
199
|
-
|
|
200
|
-
function onFocus () {
|
|
201
|
-
if (!props.disabled && !props.readonly)
|
|
202
|
-
isOpen.value = true
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function onClear () {
|
|
206
|
-
if (!props.disabled && !props.readonly)
|
|
207
|
-
model.value = undefined
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
function onSelected (event: Event) {
|
|
211
|
-
isOpen.value = false
|
|
212
|
-
|
|
213
|
-
emit('change', event)
|
|
214
|
-
}
|
|
215
|
-
</script>
|
|
216
|
-
|
|
217
|
-
<style lang="postcss">
|
|
218
|
-
.datepicker {
|
|
219
|
-
&__input {
|
|
220
|
-
@apply pr-8 truncate;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
&__icon {
|
|
224
|
-
@apply transition-transform duration-150 text-muted pointer-events-none;
|
|
225
|
-
@apply dark:text-dark-muted;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
> .dropdown__menu {
|
|
229
|
-
--p-dropdown-size: auto;
|
|
230
|
-
--p-dropdown-max-height: 100%;
|
|
231
|
-
|
|
232
|
-
@apply min-w-max max-h-min;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
</style>
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Modal
|
|
3
|
-
v-if="context"
|
|
4
|
-
:key="id"
|
|
5
|
-
v-model="modal"
|
|
6
|
-
v-bind="context.attrs"
|
|
7
|
-
class="modal-dialog"
|
|
8
|
-
:title="context.title"
|
|
9
|
-
:size="context.size"
|
|
10
|
-
:centered="context.centered"
|
|
11
|
-
:dismissable="context.dismissable"
|
|
12
|
-
:no-close-on-backdrop="context.noCloseOnBackdrop"
|
|
13
|
-
@show="onModalShow"
|
|
14
|
-
@hide="onModalHide"
|
|
15
|
-
@close="onCancel">
|
|
16
|
-
<template #header>
|
|
17
|
-
<template v-if="dialogIcon">
|
|
18
|
-
<div class="modal-dialog__icon">
|
|
19
|
-
<component
|
|
20
|
-
:is="dialogIcon"
|
|
21
|
-
:class="context.iconClass"
|
|
22
|
-
v-bind="context.iconAttrs" />
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
<Heading
|
|
26
|
-
v-p-md.inline="context.title"
|
|
27
|
-
class="modal__title"
|
|
28
|
-
element="h6" />
|
|
29
|
-
</template>
|
|
30
|
-
<template #default>
|
|
31
|
-
<template v-if="(typeof context.content === 'function')">
|
|
32
|
-
<component :is="context.content" />
|
|
33
|
-
</template>
|
|
34
|
-
<template v-else>
|
|
35
|
-
<span v-p-md.inline="context.text" />
|
|
36
|
-
</template>
|
|
37
|
-
</template>
|
|
38
|
-
<template #footer>
|
|
39
|
-
<dialog-footer
|
|
40
|
-
:align="context.footerAlign"
|
|
41
|
-
:cancel-class="context.cancel.className"
|
|
42
|
-
:cancel-visible="context.cancel.visible"
|
|
43
|
-
:cancel-color="context.cancel.color"
|
|
44
|
-
:cancel-variant="context.cancel.variant"
|
|
45
|
-
:cancel-text="context.cancel.text"
|
|
46
|
-
:cancel-attrs="context.cancel.attrs"
|
|
47
|
-
:confirm-class="context.confirm.className"
|
|
48
|
-
:confirm-visible="context.confirm.visible"
|
|
49
|
-
:confirm-color="context.confirm.color"
|
|
50
|
-
:confirm-variant="context.confirm.variant"
|
|
51
|
-
:confirm-text="context.confirm.text"
|
|
52
|
-
:confirm-attrs="context.confirm.attrs"
|
|
53
|
-
@confirm="onConfirm"
|
|
54
|
-
@cancel="onCancel" />
|
|
55
|
-
</template>
|
|
56
|
-
</Modal>
|
|
57
|
-
</template>
|
|
58
|
-
|
|
59
|
-
<script lang="ts" setup>
|
|
60
|
-
import {
|
|
61
|
-
h,
|
|
62
|
-
ref,
|
|
63
|
-
computed,
|
|
64
|
-
nextTick,
|
|
65
|
-
shallowRef,
|
|
66
|
-
} from 'vue-demi'
|
|
67
|
-
import Modal from '../modal/Modal.vue'
|
|
68
|
-
import Heading from '../heading/Heading.vue'
|
|
69
|
-
import DialogFooter from './DialogFooter.vue'
|
|
70
|
-
import type { DialogContext } from '.'
|
|
71
|
-
import { vPMd } from '../markdown'
|
|
72
|
-
import { until } from '@vueuse/core'
|
|
73
|
-
|
|
74
|
-
const id = ref<symbol>()
|
|
75
|
-
const modal = ref(false)
|
|
76
|
-
const processing = ref(false)
|
|
77
|
-
const context = shallowRef<DialogContext>()
|
|
78
|
-
|
|
79
|
-
const dialogIcon = computed(() => {
|
|
80
|
-
if (context.value.icon) {
|
|
81
|
-
if (typeof context.value.icon === 'string') {
|
|
82
|
-
return () => h('img', {
|
|
83
|
-
'src' : context.value.icon,
|
|
84
|
-
'width' : 20,
|
|
85
|
-
'height' : 20,
|
|
86
|
-
'data-testid': 'dialog-icon-image',
|
|
87
|
-
})
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return context.value.icon
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
async function show (options: DialogContext) {
|
|
95
|
-
id.value = Symbol('DialogId')
|
|
96
|
-
context.value = options
|
|
97
|
-
|
|
98
|
-
await nextTick()
|
|
99
|
-
|
|
100
|
-
modal.value = true
|
|
101
|
-
processing.value = true
|
|
102
|
-
|
|
103
|
-
// Wait animation done
|
|
104
|
-
await until(processing).toBe(false)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
async function hide () {
|
|
108
|
-
modal.value = false
|
|
109
|
-
processing.value = true
|
|
110
|
-
|
|
111
|
-
// Wait animation done
|
|
112
|
-
await until(processing).toBe(false)
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
async function onConfirm () {
|
|
116
|
-
await hide()
|
|
117
|
-
|
|
118
|
-
context.value.onConfirm()
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
async function onCancel () {
|
|
122
|
-
await hide()
|
|
123
|
-
|
|
124
|
-
context.value.onCancel()
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function onModalHide () {
|
|
128
|
-
processing.value = false
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function onModalShow () {
|
|
132
|
-
processing.value = false
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
defineExpose({
|
|
136
|
-
show,
|
|
137
|
-
hide,
|
|
138
|
-
})
|
|
139
|
-
</script>
|
|
140
|
-
|
|
141
|
-
<style lang="postcss">
|
|
142
|
-
.modal-dialog {
|
|
143
|
-
--p-modal-z-index: theme(zIndex.dialog);
|
|
144
|
-
|
|
145
|
-
&__icon {
|
|
146
|
-
@apply mt-1 mr-2;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
</style>
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
data-testid="dialog-footer"
|
|
4
|
-
:class="footerClassNames">
|
|
5
|
-
<Button
|
|
6
|
-
v-if="cancelVisible"
|
|
7
|
-
v-bind="cancelAttrs"
|
|
8
|
-
:class="cancelClass"
|
|
9
|
-
:color="cancelColor"
|
|
10
|
-
:variant="cancelVariant"
|
|
11
|
-
@click="cancel">
|
|
12
|
-
{{ cancelText }}
|
|
13
|
-
</Button>
|
|
14
|
-
|
|
15
|
-
<Button
|
|
16
|
-
v-if="confirmVisible"
|
|
17
|
-
v-bind="confirmAttrs"
|
|
18
|
-
:class="confirmClass"
|
|
19
|
-
:color="confirmColor"
|
|
20
|
-
:variant="confirmVariant"
|
|
21
|
-
@click="confirm">
|
|
22
|
-
{{ confirmText }}
|
|
23
|
-
</Button>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script lang="ts" setup>
|
|
28
|
-
import Button from '../button/Button.vue'
|
|
29
|
-
import type { PropType } from 'vue-demi'
|
|
30
|
-
import { computed } from 'vue-demi'
|
|
31
|
-
import type {
|
|
32
|
-
StyleVariant as FooterButtonStyleVariant,
|
|
33
|
-
ColorVariant as FooterButtonColorVariant,
|
|
34
|
-
} from '../button'
|
|
35
|
-
import type { FooterAlignVariant } from '.'
|
|
36
|
-
import type { AdditionalAttr } from '../global/types'
|
|
37
|
-
|
|
38
|
-
const props = defineProps({
|
|
39
|
-
align: {
|
|
40
|
-
type : String as PropType<FooterAlignVariant>,
|
|
41
|
-
default: 'start',
|
|
42
|
-
},
|
|
43
|
-
cancelClass: {
|
|
44
|
-
type : String,
|
|
45
|
-
default: undefined,
|
|
46
|
-
},
|
|
47
|
-
cancelVisible: {
|
|
48
|
-
type : Boolean,
|
|
49
|
-
default: true,
|
|
50
|
-
},
|
|
51
|
-
cancelColor: {
|
|
52
|
-
type : String as PropType<FooterButtonColorVariant>,
|
|
53
|
-
default: 'default',
|
|
54
|
-
},
|
|
55
|
-
cancelVariant: {
|
|
56
|
-
type : String as PropType<FooterButtonStyleVariant>,
|
|
57
|
-
default: 'link',
|
|
58
|
-
},
|
|
59
|
-
cancelText: {
|
|
60
|
-
type : String,
|
|
61
|
-
default: 'Cancel',
|
|
62
|
-
},
|
|
63
|
-
cancelAttrs: {
|
|
64
|
-
type : Object as PropType<AdditionalAttr>,
|
|
65
|
-
default: undefined,
|
|
66
|
-
},
|
|
67
|
-
confirmClass: {
|
|
68
|
-
type : String,
|
|
69
|
-
default: undefined,
|
|
70
|
-
},
|
|
71
|
-
confirmVisible: {
|
|
72
|
-
type : Boolean,
|
|
73
|
-
default: true,
|
|
74
|
-
},
|
|
75
|
-
confirmColor: {
|
|
76
|
-
type : String as PropType<FooterButtonColorVariant>,
|
|
77
|
-
default: 'info',
|
|
78
|
-
},
|
|
79
|
-
confirmVariant: {
|
|
80
|
-
type : String as PropType<FooterButtonStyleVariant>,
|
|
81
|
-
default: 'solid',
|
|
82
|
-
},
|
|
83
|
-
confirmText: {
|
|
84
|
-
type : String,
|
|
85
|
-
default: 'Confirm',
|
|
86
|
-
},
|
|
87
|
-
confirmAttrs: {
|
|
88
|
-
type : Object as PropType<AdditionalAttr>,
|
|
89
|
-
default: undefined,
|
|
90
|
-
},
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
const emit = defineEmits<{
|
|
94
|
-
'cancel': [],
|
|
95
|
-
'confirm': [],
|
|
96
|
-
}>()
|
|
97
|
-
|
|
98
|
-
const footerClassNames = computed(() => {
|
|
99
|
-
const result: string[] = ['modal-dialog__footer']
|
|
100
|
-
|
|
101
|
-
if (props.align)
|
|
102
|
-
result.push(`modal-dialog__footer--align-${props.align}`)
|
|
103
|
-
|
|
104
|
-
return result
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
function cancel (): void {
|
|
108
|
-
emit('cancel')
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function confirm (): void {
|
|
112
|
-
emit('confirm')
|
|
113
|
-
}
|
|
114
|
-
</script>
|
|
115
|
-
|
|
116
|
-
<style lang="postcss">
|
|
117
|
-
.modal-dialog {
|
|
118
|
-
&__footer {
|
|
119
|
-
@apply flex items-center space-x-3;
|
|
120
|
-
|
|
121
|
-
&--align {
|
|
122
|
-
&-left,
|
|
123
|
-
&-start {
|
|
124
|
-
@apply justify-start;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&-right,
|
|
128
|
-
&-end {
|
|
129
|
-
@apply justify-end;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
&-center {
|
|
133
|
-
@apply justify-center;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
</style>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { SizeVariant } from '../modal';
|
|
2
|
-
import type { SizeVariant as InputSizeVariant, StyleVariant as FooterButtonStyleVariant, ColorVariant as FooterButtonColorVariant } from '../button';
|
|
3
|
-
import type { VNode, Component, HTMLAttributes } from 'vue-demi';
|
|
4
|
-
import type { AcceptVariant } from '../input';
|
|
5
|
-
import type { AdditionalAttr } from '../global/types';
|
|
6
|
-
export type FooterAlignVariant = 'start' | 'end';
|
|
7
|
-
interface DialogButton {
|
|
8
|
-
text?: string;
|
|
9
|
-
visible?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
closeModal?: boolean;
|
|
12
|
-
color?: FooterButtonColorVariant;
|
|
13
|
-
variant?: FooterButtonStyleVariant;
|
|
14
|
-
attrs?: AdditionalAttr;
|
|
15
|
-
}
|
|
16
|
-
export interface DialogOptions {
|
|
17
|
-
title: string;
|
|
18
|
-
icon?: string | Component;
|
|
19
|
-
iconClass?: HTMLAttributes['class'];
|
|
20
|
-
iconAttrs?: AdditionalAttr;
|
|
21
|
-
text?: string;
|
|
22
|
-
size?: SizeVariant;
|
|
23
|
-
centered?: boolean;
|
|
24
|
-
dismissable?: boolean;
|
|
25
|
-
noCloseOnBackdrop?: boolean;
|
|
26
|
-
footerAlign?: FooterAlignVariant;
|
|
27
|
-
cancel?: DialogButton;
|
|
28
|
-
confirm?: DialogButton;
|
|
29
|
-
attrs?: AdditionalAttr;
|
|
30
|
-
}
|
|
31
|
-
export type DialogConfirmOption = DialogOptions;
|
|
32
|
-
export type DialogAlertOption = Omit<DialogOptions, 'cancel'>;
|
|
33
|
-
export interface DialogPromptOption extends DialogOptions {
|
|
34
|
-
value?: string;
|
|
35
|
-
input?: {
|
|
36
|
-
type?: string;
|
|
37
|
-
placeholder?: string;
|
|
38
|
-
size?: InputSizeVariant;
|
|
39
|
-
clearable?: boolean;
|
|
40
|
-
accept?: AcceptVariant;
|
|
41
|
-
attrs?: AdditionalAttr;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export interface DialogContext extends DialogOptions {
|
|
45
|
-
onConfirm: () => void;
|
|
46
|
-
onCancel: () => void;
|
|
47
|
-
content?: () => VNode;
|
|
48
|
-
}
|
|
49
|
-
export declare function confirm(options: DialogConfirmOption): Promise<boolean>;
|
|
50
|
-
export declare function alert(options: DialogConfirmOption): Promise<void>;
|
|
51
|
-
export declare function prompt(options: DialogPromptOption): Promise<string>;
|
|
52
|
-
export {};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { useSingleton } from "../global/use-singleton.mjs";
|
|
2
|
-
import defu from "defu";
|
|
3
|
-
import {
|
|
4
|
-
ref,
|
|
5
|
-
h,
|
|
6
|
-
mergeProps
|
|
7
|
-
} from "vue-demi";
|
|
8
|
-
import pInput from "../input/Input.vue";
|
|
9
|
-
import pFormGroup from "../form-group/FormGroup.vue";
|
|
10
|
-
export async function confirm(options) {
|
|
11
|
-
const { default: Dialog } = await import("./Dialog.vue");
|
|
12
|
-
const modal = await useSingleton(Dialog);
|
|
13
|
-
const result = await new Promise((resolve) => {
|
|
14
|
-
modal.show(defu(
|
|
15
|
-
{
|
|
16
|
-
onConfirm: () => resolve(true),
|
|
17
|
-
onCancel: () => resolve(false)
|
|
18
|
-
},
|
|
19
|
-
options,
|
|
20
|
-
{
|
|
21
|
-
title: "Confirm",
|
|
22
|
-
confirm: {},
|
|
23
|
-
cancel: {},
|
|
24
|
-
centered: true
|
|
25
|
-
}
|
|
26
|
-
));
|
|
27
|
-
});
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
30
|
-
export async function alert(options) {
|
|
31
|
-
await confirm(defu(
|
|
32
|
-
{ cancel: { visible: false } },
|
|
33
|
-
options,
|
|
34
|
-
{
|
|
35
|
-
title: "Alert",
|
|
36
|
-
confirm: { text: "Ok" }
|
|
37
|
-
}
|
|
38
|
-
));
|
|
39
|
-
}
|
|
40
|
-
export async function prompt(options) {
|
|
41
|
-
const { default: Dialog } = await import("./Dialog.vue");
|
|
42
|
-
const model = ref(options.value);
|
|
43
|
-
const input = ref();
|
|
44
|
-
const modal = await useSingleton(Dialog);
|
|
45
|
-
const result = await new Promise((resolve) => {
|
|
46
|
-
modal.show(defu(
|
|
47
|
-
{
|
|
48
|
-
content: () => {
|
|
49
|
-
return h("form", {
|
|
50
|
-
onSubmit(event) {
|
|
51
|
-
event.preventDefault();
|
|
52
|
-
resolve(model.value);
|
|
53
|
-
}
|
|
54
|
-
}, [
|
|
55
|
-
h(pFormGroup, { label: options.text }, () => [
|
|
56
|
-
h(pInput, mergeProps(options.input?.attrs, {
|
|
57
|
-
"ref": input,
|
|
58
|
-
"type": options.input?.type,
|
|
59
|
-
"placeholder": options.input?.placeholder,
|
|
60
|
-
"size": options.input?.size,
|
|
61
|
-
"clearable": options.input?.clearable,
|
|
62
|
-
"accept": options.input?.accept,
|
|
63
|
-
"modelValue": model.value,
|
|
64
|
-
"onUpdate:modelValue": (value) => {
|
|
65
|
-
model.value = value;
|
|
66
|
-
}
|
|
67
|
-
}))
|
|
68
|
-
])
|
|
69
|
-
]);
|
|
70
|
-
},
|
|
71
|
-
onConfirm: () => resolve(model.value),
|
|
72
|
-
onCancel: () => resolve("")
|
|
73
|
-
},
|
|
74
|
-
options,
|
|
75
|
-
{
|
|
76
|
-
title: "Question",
|
|
77
|
-
confirm: { text: "Submit" },
|
|
78
|
-
cancel: {},
|
|
79
|
-
centered: true
|
|
80
|
-
}
|
|
81
|
-
)).then(() => {
|
|
82
|
-
input.value?.input.focus();
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
return result;
|
|
86
|
-
}
|