@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 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="204" height="131" version="1.1" viewBox="0 0 204 131"><title>Logo / Negative / Icon</title><desc>Created with Sketch.</desc><defs><linearGradient id="linearGradient-1" x1="38.772%" x2="99.746%" y1="36.946%" y2="100%"><stop offset="0%" stop-color="#000" stop-opacity="0"/><stop offset="10.271%" stop-color="#000" stop-opacity=".054"/><stop offset="19.657%" stop-color="#000" stop-opacity=".106"/><stop offset="30.31%" stop-color="#000" stop-opacity=".192"/><stop offset="38.65%" stop-color="#000" stop-opacity=".245"/><stop offset="100%" stop-color="#000"/></linearGradient></defs><g id="Logo-/-Negative-/-Icon" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Path" fill="#FFF" d="M19.1359203,111.815313 C30.9636339,123.668638 47.3036075,131 65.352117,131 C83.4004497,131 99.7402465,123.668638 111.567783,111.815313 L204,19.1846867 C192.172286,7.33136183 175.832313,0 157.78398,0 C139.735471,0 123.395674,7.33136183 111.568137,19.1845095 L111.56796,19.1846867 C99.7402465,7.33136183 83.4004497,0 65.3522937,0 C26.5673268,0 2.02528496,29.2248333 0,66.4713328 C0.256828333,84.1728482 7.52049215,100.17473 19.1359203,111.815313 Z"/><path id="Path" fill="url(#linearGradient-1)" d="M112,19.2653956 C100.126484,7.36220448 83.7234126,0 65.6053663,0 C26.6702071,0 2.03312774,29.3477806 0,66.7509741 C0.257822885,84.5269588 7.54961478,100.59616 19.2100229,112.285714 L112,19.2653956 Z"/></g></svg>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { useSingleton } from "../global/use-singleton.mjs";
|
|
2
|
-
import Overlay from "./Overlay.vue";
|
|
3
|
-
export async function showOverlay() {
|
|
4
|
-
(await useSingleton(Overlay)).show();
|
|
5
|
-
}
|
|
6
|
-
export async function hideOverlay() {
|
|
7
|
-
(await useSingleton(Overlay)).hide();
|
|
8
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import defu from "defu";
|
|
2
|
-
import { tryOnMounted } from "@vueuse/shared";
|
|
3
|
-
import { computed, ref } from "vue-demi";
|
|
4
|
-
export default function useLoading(options_) {
|
|
5
|
-
const options = defu(options_, { elapsed: true });
|
|
6
|
-
const counter = ref(0);
|
|
7
|
-
const elapsed = ref(options.elapsed !== false);
|
|
8
|
-
const loading = computed({
|
|
9
|
-
get() {
|
|
10
|
-
return counter.value > 0 || elapsed.value;
|
|
11
|
-
},
|
|
12
|
-
set(value) {
|
|
13
|
-
if (value)
|
|
14
|
-
counter.value++;
|
|
15
|
-
else
|
|
16
|
-
counter.value--;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
tryOnMounted(() => {
|
|
20
|
-
if (options.elapsed !== false) {
|
|
21
|
-
const elapsedTime = options.elapsed === true ? 200 : options.elapsed;
|
|
22
|
-
setTimeout(() => {
|
|
23
|
-
elapsed.value = false;
|
|
24
|
-
}, elapsedTime);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
return loading;
|
|
28
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="page"
|
|
4
|
-
data-testid="page"
|
|
5
|
-
:class="classNames">
|
|
6
|
-
<slot />
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script lang="ts" setup>
|
|
11
|
-
import type { PropType } from 'vue-demi'
|
|
12
|
-
import { computed } from 'vue-demi'
|
|
13
|
-
import { useVModel } from '../input'
|
|
14
|
-
import type { ToggleableVariant } from '../navbar'
|
|
15
|
-
import type { TypeVariant } from '../sidebar'
|
|
16
|
-
|
|
17
|
-
const props = defineProps({
|
|
18
|
-
expand: {
|
|
19
|
-
type : String as PropType<ToggleableVariant>,
|
|
20
|
-
default: undefined,
|
|
21
|
-
},
|
|
22
|
-
type: {
|
|
23
|
-
type : String as PropType<TypeVariant>,
|
|
24
|
-
default: 'narrow',
|
|
25
|
-
},
|
|
26
|
-
modelValue: {
|
|
27
|
-
type : Boolean,
|
|
28
|
-
default: true,
|
|
29
|
-
},
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
defineEmits<{
|
|
33
|
-
'update:modelValue': [boolean],
|
|
34
|
-
}>()
|
|
35
|
-
|
|
36
|
-
const model = useVModel(props)
|
|
37
|
-
|
|
38
|
-
const classNames = computed(() => {
|
|
39
|
-
const result: string[] = ['']
|
|
40
|
-
|
|
41
|
-
if (props.expand)
|
|
42
|
-
result.push(`page--expand page--expand-${props.expand}`)
|
|
43
|
-
|
|
44
|
-
if (props.expand && model.value)
|
|
45
|
-
result.push('page--expanded')
|
|
46
|
-
|
|
47
|
-
if (props.type)
|
|
48
|
-
result.push(`page--type-${props.type}`)
|
|
49
|
-
|
|
50
|
-
return result
|
|
51
|
-
})
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<style lang="postcss">
|
|
55
|
-
.page {
|
|
56
|
-
--p-page-type-wide: 60px;
|
|
57
|
-
--p-page-type-narrow: 230px;
|
|
58
|
-
|
|
59
|
-
@apply w-full text-default;
|
|
60
|
-
@apply dark:text-dark-default;
|
|
61
|
-
|
|
62
|
-
&&--expand {
|
|
63
|
-
&:where(&&-all, &&-lg, &&-md, &&-sm) {
|
|
64
|
-
&:is(.page--expanded) {
|
|
65
|
-
@apply transition-[padding] ease-out delay-75;
|
|
66
|
-
|
|
67
|
-
&.page--type-wide {
|
|
68
|
-
@apply pl-[var(--p-page-type-wide)];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&.page--type-narrow {
|
|
72
|
-
@apply pl-[var(--p-page-type-narrow)];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&:where(&&-all, &&-lg, &&-md, &&-sm) {
|
|
78
|
-
@apply pl-0 transition-[padding] ease-in delay-75;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&&-lg {
|
|
82
|
-
@apply lg:pl-[var(--p-page-type-narrow)];
|
|
83
|
-
|
|
84
|
-
&:not(.page--type-narrow) {
|
|
85
|
-
@apply lg:pl-[var(--p-page-type-wide)];
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&&-md {
|
|
90
|
-
@apply md:pl-[var(--p-page-type-narrow)];
|
|
91
|
-
|
|
92
|
-
&:not(.page--type-narrow) {
|
|
93
|
-
@apply md:pl-[var(--p-page-type-wide)];
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&&-sm {
|
|
98
|
-
@apply sm:pl-[var(--p-page-type-narrow)];
|
|
99
|
-
|
|
100
|
-
&:not(.page--type-narrow) {
|
|
101
|
-
@apply sm:pl-[var(--p-page-type-wide)];
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
</style>
|
|
@@ -1,415 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
data-testid="pagination"
|
|
4
|
-
:class="classNames">
|
|
5
|
-
<div
|
|
6
|
-
v-if="quickJump"
|
|
7
|
-
class="pagination__quickjump"
|
|
8
|
-
data-testid="pagination-quickjump">
|
|
9
|
-
{{ pageLabel }}
|
|
10
|
-
<Select
|
|
11
|
-
v-model="model"
|
|
12
|
-
:searchable="false"
|
|
13
|
-
:size="selectSize"
|
|
14
|
-
data-testid="pagination-select"
|
|
15
|
-
:options="pageOptions"
|
|
16
|
-
@change="({ value }) => selectPage(value)" />
|
|
17
|
-
<slot
|
|
18
|
-
name="quick-jump-count"
|
|
19
|
-
:total="totalPageCount">
|
|
20
|
-
of {{ totalPageCount }}
|
|
21
|
-
</slot>
|
|
22
|
-
</div>
|
|
23
|
-
<nav
|
|
24
|
-
v-else
|
|
25
|
-
class="pagination__items">
|
|
26
|
-
<Button
|
|
27
|
-
v-if="variant === 'far'"
|
|
28
|
-
data-testid="pagination-nav-first"
|
|
29
|
-
variant="solid"
|
|
30
|
-
size="sm"
|
|
31
|
-
:disabled="!canPrev"
|
|
32
|
-
class="pagination__items__nav-first"
|
|
33
|
-
icon
|
|
34
|
-
@click="selectPage(1)">
|
|
35
|
-
<slot name="first-navigation">
|
|
36
|
-
{{ firstNavLabel }}
|
|
37
|
-
</slot>
|
|
38
|
-
</Button>
|
|
39
|
-
<Button
|
|
40
|
-
v-if="variant === 'short' || variant === 'far'"
|
|
41
|
-
data-testid="pagination-nav-prev"
|
|
42
|
-
variant="solid"
|
|
43
|
-
size="sm"
|
|
44
|
-
:disabled="!canPrev"
|
|
45
|
-
class="pagination__items__nav-prev"
|
|
46
|
-
icon
|
|
47
|
-
@click="prev">
|
|
48
|
-
<slot name="prev-navigation">
|
|
49
|
-
<template v-if="navigationText">
|
|
50
|
-
{{ prevNavLabel }}
|
|
51
|
-
</template>
|
|
52
|
-
<IconPrev v-else />
|
|
53
|
-
</slot>
|
|
54
|
-
</Button>
|
|
55
|
-
<template v-if="!navigationOnly">
|
|
56
|
-
<Button
|
|
57
|
-
v-for="(page, index) in pageItems"
|
|
58
|
-
:key="index"
|
|
59
|
-
data-testid="pagination-item"
|
|
60
|
-
variant="solid"
|
|
61
|
-
size="sm"
|
|
62
|
-
icon
|
|
63
|
-
:readonly="typeof page === 'string'"
|
|
64
|
-
:active="page === model"
|
|
65
|
-
@click="selectPage(page)">
|
|
66
|
-
{{ page }}
|
|
67
|
-
</Button>
|
|
68
|
-
</template>
|
|
69
|
-
<Button
|
|
70
|
-
v-if="variant === 'short' || variant === 'far'"
|
|
71
|
-
data-testid="pagination-nav-next"
|
|
72
|
-
variant="solid"
|
|
73
|
-
size="sm"
|
|
74
|
-
:disabled="!canNext"
|
|
75
|
-
class="pagination__items__nav-next"
|
|
76
|
-
icon
|
|
77
|
-
@click="next">
|
|
78
|
-
<slot name="next-navigation">
|
|
79
|
-
<template v-if="navigationText">
|
|
80
|
-
{{ nextNavLabel }}
|
|
81
|
-
</template>
|
|
82
|
-
<IconNext v-else />
|
|
83
|
-
</slot>
|
|
84
|
-
</Button>
|
|
85
|
-
<Button
|
|
86
|
-
v-if="variant === 'far'"
|
|
87
|
-
data-testid="pagination-nav-last"
|
|
88
|
-
variant="solid"
|
|
89
|
-
size="sm"
|
|
90
|
-
:disabled="!canNext"
|
|
91
|
-
class="pagination__items__nav-last"
|
|
92
|
-
icon
|
|
93
|
-
@click="selectPage(totalPageCount)">
|
|
94
|
-
<slot name="last-navigation">
|
|
95
|
-
{{ lastNavLabel }}
|
|
96
|
-
</slot>
|
|
97
|
-
</Button>
|
|
98
|
-
</nav>
|
|
99
|
-
<div
|
|
100
|
-
v-if="showCounter || showDetail"
|
|
101
|
-
class="pagination__count"
|
|
102
|
-
data-testid="pagination-count">
|
|
103
|
-
<slot
|
|
104
|
-
name="pagination-count"
|
|
105
|
-
:page="modelValue"
|
|
106
|
-
:per-page="perPage"
|
|
107
|
-
:range="rowRange"
|
|
108
|
-
:total-page="totalPageCount"
|
|
109
|
-
:total="total">
|
|
110
|
-
{{ rowRange[0] }} - {{ rowRange[1] }} of {{ total }}
|
|
111
|
-
</slot>
|
|
112
|
-
</div>
|
|
113
|
-
<div
|
|
114
|
-
v-if="showPerPage || showDetail"
|
|
115
|
-
class="pagination__options"
|
|
116
|
-
data-testid="pagination-option">
|
|
117
|
-
{{ showRowsLabel }}
|
|
118
|
-
<Select
|
|
119
|
-
v-model="rowPerPage"
|
|
120
|
-
:searchable="false"
|
|
121
|
-
:size="selectSize"
|
|
122
|
-
:options="rowPerPageOptions" />
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
</template>
|
|
126
|
-
|
|
127
|
-
<script lang="ts" setup>
|
|
128
|
-
import type { PropType, VNode } from 'vue-demi'
|
|
129
|
-
import { computed, watch } from 'vue-demi'
|
|
130
|
-
import Button from '../button/Button.vue'
|
|
131
|
-
import Select from '../select/Select.vue'
|
|
132
|
-
import IconPrev from '@privyid/persona-icon/vue/chevron-left/20.vue'
|
|
133
|
-
import IconNext from '@privyid/persona-icon/vue/chevron-right/20.vue'
|
|
134
|
-
import type { SelectItem } from '../select'
|
|
135
|
-
import { useVModel } from '../input'
|
|
136
|
-
import { usePagination } from '.'
|
|
137
|
-
import { getPageRange } from './utils/calculate-page'
|
|
138
|
-
import type { SizeVariant } from '../button'
|
|
139
|
-
|
|
140
|
-
type NavigationVariant = 'none' | 'short' | 'far'
|
|
141
|
-
|
|
142
|
-
const props = defineProps({
|
|
143
|
-
modelValue: {
|
|
144
|
-
type : Number,
|
|
145
|
-
default: 1,
|
|
146
|
-
},
|
|
147
|
-
quickJump: {
|
|
148
|
-
type : Boolean,
|
|
149
|
-
default: false,
|
|
150
|
-
},
|
|
151
|
-
showCounter: {
|
|
152
|
-
type : Boolean,
|
|
153
|
-
default: false,
|
|
154
|
-
},
|
|
155
|
-
showPerPage: {
|
|
156
|
-
type : Boolean,
|
|
157
|
-
default: false,
|
|
158
|
-
},
|
|
159
|
-
showDetail: {
|
|
160
|
-
type : Boolean,
|
|
161
|
-
default: false,
|
|
162
|
-
},
|
|
163
|
-
navigationText: {
|
|
164
|
-
type : Boolean,
|
|
165
|
-
default: false,
|
|
166
|
-
},
|
|
167
|
-
navigationOnly: {
|
|
168
|
-
type : Boolean,
|
|
169
|
-
default: false,
|
|
170
|
-
},
|
|
171
|
-
variant: {
|
|
172
|
-
type : String as PropType<NavigationVariant>,
|
|
173
|
-
default: 'short',
|
|
174
|
-
},
|
|
175
|
-
perPage: {
|
|
176
|
-
type : Number,
|
|
177
|
-
default: 10,
|
|
178
|
-
},
|
|
179
|
-
perPageOptions: {
|
|
180
|
-
type : Array<Number>,
|
|
181
|
-
default: () => [
|
|
182
|
-
10,
|
|
183
|
-
20,
|
|
184
|
-
30,
|
|
185
|
-
],
|
|
186
|
-
},
|
|
187
|
-
total: {
|
|
188
|
-
type : Number,
|
|
189
|
-
default: 0,
|
|
190
|
-
},
|
|
191
|
-
displayLimit: {
|
|
192
|
-
type : Number,
|
|
193
|
-
default: 10,
|
|
194
|
-
},
|
|
195
|
-
pageLabel: {
|
|
196
|
-
type : String,
|
|
197
|
-
default: 'Page',
|
|
198
|
-
},
|
|
199
|
-
prevNavLabel: {
|
|
200
|
-
type : String,
|
|
201
|
-
default: 'Previous',
|
|
202
|
-
},
|
|
203
|
-
nextNavLabel: {
|
|
204
|
-
type : String,
|
|
205
|
-
default: 'Next',
|
|
206
|
-
},
|
|
207
|
-
firstNavLabel: {
|
|
208
|
-
type : String,
|
|
209
|
-
default: 'First',
|
|
210
|
-
},
|
|
211
|
-
lastNavLabel: {
|
|
212
|
-
type : String,
|
|
213
|
-
default: 'Last',
|
|
214
|
-
},
|
|
215
|
-
showRowsLabel: {
|
|
216
|
-
type : String,
|
|
217
|
-
default: 'Show rows',
|
|
218
|
-
},
|
|
219
|
-
selectSize: {
|
|
220
|
-
type : String as PropType<SizeVariant>,
|
|
221
|
-
default: 'md',
|
|
222
|
-
},
|
|
223
|
-
})
|
|
224
|
-
|
|
225
|
-
const emit = defineEmits<{
|
|
226
|
-
'update:modelValue': [number],
|
|
227
|
-
'update:perPage': [number],
|
|
228
|
-
'change': [number],
|
|
229
|
-
}>()
|
|
230
|
-
|
|
231
|
-
const classNames = computed(() => {
|
|
232
|
-
const results: string [] = ['pagination']
|
|
233
|
-
|
|
234
|
-
if (props.navigationOnly)
|
|
235
|
-
results.push('pagination--navonly')
|
|
236
|
-
|
|
237
|
-
return results
|
|
238
|
-
})
|
|
239
|
-
|
|
240
|
-
const model = useVModel(props)
|
|
241
|
-
|
|
242
|
-
const {
|
|
243
|
-
pageItems,
|
|
244
|
-
rowRange,
|
|
245
|
-
totalPageCount,
|
|
246
|
-
canNext,
|
|
247
|
-
canPrev,
|
|
248
|
-
} = usePagination(props)
|
|
249
|
-
|
|
250
|
-
const pageOptions = computed<SelectItem[]>(() => {
|
|
251
|
-
return getPageRange(1, totalPageCount.value).map((page) => {
|
|
252
|
-
return {
|
|
253
|
-
text : String(page),
|
|
254
|
-
value: page,
|
|
255
|
-
}
|
|
256
|
-
})
|
|
257
|
-
})
|
|
258
|
-
|
|
259
|
-
const rowPerPageOptions = computed<SelectItem[]>(() => {
|
|
260
|
-
return props.perPageOptions.map((option) => {
|
|
261
|
-
return {
|
|
262
|
-
text : String(option),
|
|
263
|
-
value: option,
|
|
264
|
-
}
|
|
265
|
-
})
|
|
266
|
-
})
|
|
267
|
-
|
|
268
|
-
const rowPerPage = computed({
|
|
269
|
-
get () {
|
|
270
|
-
return props.perPage
|
|
271
|
-
},
|
|
272
|
-
set (value) {
|
|
273
|
-
emit('update:perPage', value)
|
|
274
|
-
},
|
|
275
|
-
})
|
|
276
|
-
|
|
277
|
-
watch(totalPageCount, (value) => {
|
|
278
|
-
if (model.value > value)
|
|
279
|
-
model.value = value || 1
|
|
280
|
-
})
|
|
281
|
-
|
|
282
|
-
function next () {
|
|
283
|
-
model.value = Math.min(model.value + 1, totalPageCount.value)
|
|
284
|
-
|
|
285
|
-
emit('change', model.value)
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
function prev () {
|
|
289
|
-
model.value = Math.max(model.value - 1, 1)
|
|
290
|
-
|
|
291
|
-
emit('change', model.value)
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
function selectPage (page: number | string) {
|
|
295
|
-
if (typeof page === 'string') return
|
|
296
|
-
|
|
297
|
-
if (model.value !== page) {
|
|
298
|
-
model.value = page
|
|
299
|
-
|
|
300
|
-
emit('change', page)
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
defineExpose({
|
|
305
|
-
next,
|
|
306
|
-
prev,
|
|
307
|
-
})
|
|
308
|
-
|
|
309
|
-
defineSlots<{
|
|
310
|
-
'quick-jump-count'(props: { total: number }): VNode[],
|
|
311
|
-
'pagination-count'(props: {
|
|
312
|
-
page: number,
|
|
313
|
-
perPage: number,
|
|
314
|
-
total: number,
|
|
315
|
-
totalPage: number,
|
|
316
|
-
range: number[],
|
|
317
|
-
}): VNode[],
|
|
318
|
-
'first-navigation'(): VNode[],
|
|
319
|
-
'prev-navigation'(): VNode[],
|
|
320
|
-
'next-navigation'(): VNode[],
|
|
321
|
-
'last-navigation'(): VNode[],
|
|
322
|
-
}>()
|
|
323
|
-
</script>
|
|
324
|
-
|
|
325
|
-
<style lang="postcss">
|
|
326
|
-
/**
|
|
327
|
-
* Component Name: Pagination
|
|
328
|
-
* Component URI : https://www.figma.com/file/JIYmbyRYZHc9bnVp6Npm9K/B-A-S-E-%2F-Components?node-id=338%3A15323&t=u3Y7jHGZtoyAFn21-4
|
|
329
|
-
* Date Created : December 22, 2022
|
|
330
|
-
* Last Update : December 22, 2022
|
|
331
|
-
*/
|
|
332
|
-
.pagination {
|
|
333
|
-
@apply relative flex flex-wrap justify-start items-center w-full;
|
|
334
|
-
|
|
335
|
-
&&--navonly {
|
|
336
|
-
.pagination {
|
|
337
|
-
&__items {
|
|
338
|
-
@apply order-4 ml-4 only:ml-auto;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
&__count {
|
|
342
|
-
@apply ml-0 mr-auto;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
&__quickjump,
|
|
348
|
-
&__items,
|
|
349
|
-
&__options {
|
|
350
|
-
@apply flex flex-wrap items-center text-default;
|
|
351
|
-
@apply dark:text-dark-default;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
&__quickjump {
|
|
355
|
-
.dropdown {
|
|
356
|
-
@apply mx-3;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
&__items {
|
|
361
|
-
@apply space-x-2;
|
|
362
|
-
|
|
363
|
-
.btn--icon.btn--sm {
|
|
364
|
-
@apply px-2 py-1 min-w-[34px];
|
|
365
|
-
|
|
366
|
-
&:is(.pagination__items__nav-first, .pagination__items__nav-prev, .pagination__items__nav-next, .pagination__items__nav-last) > svg {
|
|
367
|
-
@apply my-[0.15rem];
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
&__count {
|
|
373
|
-
@apply ml-5 text-default;
|
|
374
|
-
@apply dark:text-dark-default;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
&__options {
|
|
378
|
-
@apply justify-between items-center ml-auto;
|
|
379
|
-
|
|
380
|
-
.dropdown {
|
|
381
|
-
@apply ml-3;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.dropdown {
|
|
386
|
-
@apply max-w-[80px];
|
|
387
|
-
|
|
388
|
-
&__menu {
|
|
389
|
-
@apply min-w-fit;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.btn {
|
|
394
|
-
@apply transition-none;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.btn--variant-solid {
|
|
398
|
-
@apply justify-center items-center hover:shadow-none;
|
|
399
|
-
|
|
400
|
-
&.btn--default {
|
|
401
|
-
@apply bg-transparent hover:bg-ground focus:bg-ground border-transparent focus:border-default hover:border-default text-default font-normal focus:outline-none;
|
|
402
|
-
@apply dark:bg-transparent hover:dark:bg-dark-ground focus:dark:bg-dark-ground dark:border-transparent focus:dark:border-dark-default hover:dark:border-dark-default dark:text-dark-default;
|
|
403
|
-
|
|
404
|
-
&[active="true"] {
|
|
405
|
-
@apply bg-info-emphasis border-info-emphasis text-state-emphasis cursor-default;
|
|
406
|
-
@apply dark:bg-dark-info-emphasis dark:border-dark-info-emphasis dark:text-dark-state-emphasis;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
&[readonly] {
|
|
410
|
-
@apply pointer-events-none;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
</style>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface PaginationProps {
|
|
2
|
-
modelValue: number;
|
|
3
|
-
perPage: number;
|
|
4
|
-
total: number;
|
|
5
|
-
displayLimit: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function usePagination(props: PaginationProps): {
|
|
8
|
-
pageItems: import("vue-demi").ComputedRef<(string | number)[] | undefined>;
|
|
9
|
-
rowRange: import("vue-demi").ComputedRef<number[]>;
|
|
10
|
-
totalPageCount: import("vue-demi").ComputedRef<number>;
|
|
11
|
-
canNext: import("vue-demi").ComputedRef<boolean>;
|
|
12
|
-
canPrev: import("vue-demi").ComputedRef<boolean>;
|
|
13
|
-
};
|
|
14
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { computed, toRef } from "vue-demi";
|
|
2
|
-
import {
|
|
3
|
-
getPageItems,
|
|
4
|
-
getPageRange,
|
|
5
|
-
PAGE_PADDING
|
|
6
|
-
} from "./utils/calculate-page.mjs";
|
|
7
|
-
export function usePagination(props) {
|
|
8
|
-
const page = toRef(props, "modelValue");
|
|
9
|
-
const perPage = toRef(props, "perPage");
|
|
10
|
-
const total = toRef(props, "total");
|
|
11
|
-
const displayLimit = toRef(props, "displayLimit");
|
|
12
|
-
const totalPageCount = computed(() => {
|
|
13
|
-
return total.value <= 0 ? 0 : Math.ceil(total.value / perPage.value);
|
|
14
|
-
});
|
|
15
|
-
const rowRange = computed(() => {
|
|
16
|
-
const start = Math.max((page.value - 1) * perPage.value + 1, 0);
|
|
17
|
-
const end = Math.min(page.value * perPage.value, total.value);
|
|
18
|
-
return [start, end];
|
|
19
|
-
});
|
|
20
|
-
const pageItems = computed(() => {
|
|
21
|
-
if (totalPageCount.value === 0 || displayLimit.value < PAGE_PADDING)
|
|
22
|
-
return [];
|
|
23
|
-
if (totalPageCount.value === 1)
|
|
24
|
-
return [1];
|
|
25
|
-
if (displayLimit.value >= totalPageCount.value)
|
|
26
|
-
return getPageRange(1, totalPageCount.value);
|
|
27
|
-
return getPageItems(page.value, totalPageCount.value, displayLimit.value);
|
|
28
|
-
});
|
|
29
|
-
const canNext = computed(() => page.value < totalPageCount.value);
|
|
30
|
-
const canPrev = computed(() => page.value > 1);
|
|
31
|
-
return {
|
|
32
|
-
pageItems,
|
|
33
|
-
rowRange,
|
|
34
|
-
totalPageCount,
|
|
35
|
-
canNext,
|
|
36
|
-
canPrev
|
|
37
|
-
};
|
|
38
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PAGE_PADDING is total from first_page + last_page + current_page + 2*DOTS
|
|
3
|
-
*/
|
|
4
|
-
export declare const DOTS = "...";
|
|
5
|
-
export declare const PAGE_PADDING = 5;
|
|
6
|
-
export declare function getPageRange(start: number, end: number): number[];
|
|
7
|
-
export declare function getSiblings(displayLimit: number): {
|
|
8
|
-
totalSiblings: number;
|
|
9
|
-
totalPageDisplay: number;
|
|
10
|
-
};
|
|
11
|
-
export declare function getPageItems(page: number, totalPageCount: number, displayLimit: number): (string | number)[] | undefined;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export const DOTS = "...";
|
|
2
|
-
export const PAGE_PADDING = 5;
|
|
3
|
-
export function getPageRange(start, end) {
|
|
4
|
-
const length = end - start + 1;
|
|
5
|
-
return Array.from({ length }, (_, index) => index + start);
|
|
6
|
-
}
|
|
7
|
-
export function getSiblings(displayLimit) {
|
|
8
|
-
const totalSiblings = Math.floor((displayLimit - PAGE_PADDING) / 2);
|
|
9
|
-
const totalPageNumber = 2 * totalSiblings + PAGE_PADDING;
|
|
10
|
-
const totalPageDisplay = totalPageNumber - 2;
|
|
11
|
-
return {
|
|
12
|
-
totalSiblings,
|
|
13
|
-
totalPageDisplay
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export function getPageItems(page, totalPageCount, displayLimit) {
|
|
17
|
-
const { totalSiblings, totalPageDisplay } = getSiblings(displayLimit);
|
|
18
|
-
const startPage = Math.max(page - totalSiblings, 1);
|
|
19
|
-
const endPage = Math.min(page + totalSiblings, totalPageCount);
|
|
20
|
-
const showLeftEllipsis = startPage > 2;
|
|
21
|
-
const showRightEllipsis = endPage <= totalPageCount - 2;
|
|
22
|
-
if (showLeftEllipsis && !showRightEllipsis) {
|
|
23
|
-
const pageRange = getPageRange(totalPageCount - totalPageDisplay + 1, totalPageCount);
|
|
24
|
-
return [
|
|
25
|
-
1,
|
|
26
|
-
DOTS,
|
|
27
|
-
...pageRange
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
if (!showLeftEllipsis && showRightEllipsis) {
|
|
31
|
-
const pageRange = getPageRange(1, totalPageDisplay);
|
|
32
|
-
return [
|
|
33
|
-
...pageRange,
|
|
34
|
-
DOTS,
|
|
35
|
-
totalPageCount
|
|
36
|
-
];
|
|
37
|
-
}
|
|
38
|
-
if (showLeftEllipsis && showRightEllipsis) {
|
|
39
|
-
const pageRange = getPageRange(startPage, endPage);
|
|
40
|
-
return [
|
|
41
|
-
1,
|
|
42
|
-
DOTS,
|
|
43
|
-
...pageRange,
|
|
44
|
-
DOTS,
|
|
45
|
-
totalPageCount
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
}
|