@privyid/persona 1.1.2 → 1.2.1
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,458 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<TableStaticRoot
|
|
3
|
-
data-testid="table-static"
|
|
4
|
-
:scrollable="scrollable"
|
|
5
|
-
:class="classNames"
|
|
6
|
-
:table-class="tableClass">
|
|
7
|
-
<thead
|
|
8
|
-
v-if="!noLabel"
|
|
9
|
-
class="table-static__headers">
|
|
10
|
-
<tr :class="trClass">
|
|
11
|
-
<th
|
|
12
|
-
v-if="draggable"
|
|
13
|
-
class="table-static__header table-static__drag" />
|
|
14
|
-
<th
|
|
15
|
-
v-if="selectable"
|
|
16
|
-
class="table-static__header table-static__checkbox">
|
|
17
|
-
<Checkbox
|
|
18
|
-
v-model="selectAll"
|
|
19
|
-
data-testid="table-static-select-all"
|
|
20
|
-
:indeterminate="indeterminate" />
|
|
21
|
-
</th>
|
|
22
|
-
<th
|
|
23
|
-
v-for="field in fields"
|
|
24
|
-
:key="field.key"
|
|
25
|
-
class="table-static__header"
|
|
26
|
-
data-testid="table-static-header"
|
|
27
|
-
:style="field.width ? { width: withUnit(field.width) } : {}"
|
|
28
|
-
:class="[field.thClass, { 'table-static__header--sortable': isSortable(field) }]"
|
|
29
|
-
:data-header="field.key"
|
|
30
|
-
@click="setSortField(field)">
|
|
31
|
-
<slot
|
|
32
|
-
:name="`head(${field.key})`"
|
|
33
|
-
:label="field.label"
|
|
34
|
-
:field="field"
|
|
35
|
-
:sort="getSortField(field)">
|
|
36
|
-
<span class="table-static__header-label">
|
|
37
|
-
{{ field.label }}
|
|
38
|
-
<TableStaticSort
|
|
39
|
-
v-if="isSortable(field)"
|
|
40
|
-
:active="getSortField(field)" />
|
|
41
|
-
</span>
|
|
42
|
-
</slot>
|
|
43
|
-
</th>
|
|
44
|
-
</tr>
|
|
45
|
-
</thead>
|
|
46
|
-
<Draggable
|
|
47
|
-
v-if="Array.isArray(items) && items.length > 0"
|
|
48
|
-
v-model="rows"
|
|
49
|
-
class="table-static__body"
|
|
50
|
-
handle=".table-static__drag"
|
|
51
|
-
item-key="_key"
|
|
52
|
-
tag="tbody"
|
|
53
|
-
:disabled="!draggable">
|
|
54
|
-
<template #item="{ element, index }">
|
|
55
|
-
<tr
|
|
56
|
-
class="table-static__row"
|
|
57
|
-
:class="trClass"
|
|
58
|
-
data-role="row">
|
|
59
|
-
<slot
|
|
60
|
-
name="row"
|
|
61
|
-
:item="element"
|
|
62
|
-
:index="index">
|
|
63
|
-
<td
|
|
64
|
-
v-if="draggable"
|
|
65
|
-
class="table-static__cell table-static__drag"
|
|
66
|
-
data-testid="table-static-drag-handle">
|
|
67
|
-
<IconDrag />
|
|
68
|
-
</td>
|
|
69
|
-
<td
|
|
70
|
-
v-if="selectable"
|
|
71
|
-
class="table-static__cell table-static__checkbox">
|
|
72
|
-
<Checkbox
|
|
73
|
-
v-model="model"
|
|
74
|
-
data-testid="table-static-select"
|
|
75
|
-
:value="withoutKey(element)"
|
|
76
|
-
:disabled="element._selectable === false" />
|
|
77
|
-
</td>
|
|
78
|
-
<td
|
|
79
|
-
v-for="field in fields"
|
|
80
|
-
:key="field.key"
|
|
81
|
-
class="table-static__cell"
|
|
82
|
-
data-testid="table-static-cell"
|
|
83
|
-
:class="field.tdClass"
|
|
84
|
-
:data-cell="field.key">
|
|
85
|
-
<slot
|
|
86
|
-
:name="`cell(${field.key})`"
|
|
87
|
-
:index="index"
|
|
88
|
-
:item="element">
|
|
89
|
-
{{ field.formatter(element[field.key], element) }}
|
|
90
|
-
</slot>
|
|
91
|
-
</td>
|
|
92
|
-
</slot>
|
|
93
|
-
</tr>
|
|
94
|
-
</template>
|
|
95
|
-
</Draggable>
|
|
96
|
-
<tbody
|
|
97
|
-
v-else
|
|
98
|
-
class="table-static__body">
|
|
99
|
-
<tr
|
|
100
|
-
class="table-static__row">
|
|
101
|
-
<td
|
|
102
|
-
:colspan="selectable ? fields.length+1 : fields.length"
|
|
103
|
-
data-testid="table-static-empty"
|
|
104
|
-
class="table-static__cell table-static__cell--empty datatable__state-empty">
|
|
105
|
-
<slot name="empty">
|
|
106
|
-
<span class="flex items-center justify-center text-subtle dark:text-dark-subtle">
|
|
107
|
-
{{ emptyLabel }}
|
|
108
|
-
</span>
|
|
109
|
-
</slot>
|
|
110
|
-
</td>
|
|
111
|
-
</tr>
|
|
112
|
-
</tbody>
|
|
113
|
-
</TableStaticRoot>
|
|
114
|
-
</template>
|
|
115
|
-
|
|
116
|
-
<script lang="ts" setup generic="T">
|
|
117
|
-
import type {
|
|
118
|
-
HTMLAttributes,
|
|
119
|
-
PropType,
|
|
120
|
-
VNode,
|
|
121
|
-
} from 'vue-demi'
|
|
122
|
-
import {
|
|
123
|
-
ref,
|
|
124
|
-
watch,
|
|
125
|
-
computed,
|
|
126
|
-
} from 'vue-demi'
|
|
127
|
-
import type {
|
|
128
|
-
ApperanceVariant,
|
|
129
|
-
TableField,
|
|
130
|
-
KeyType,
|
|
131
|
-
} from '../table'
|
|
132
|
-
import {
|
|
133
|
-
withKey,
|
|
134
|
-
withoutKey,
|
|
135
|
-
withUnit,
|
|
136
|
-
} from '../table'
|
|
137
|
-
import Checkbox from '../checkbox/Checkbox.vue'
|
|
138
|
-
import TableStaticRoot from './TableStaticRoot.vue'
|
|
139
|
-
import { useVModel } from '../input'
|
|
140
|
-
import IconDrag from '@privyid/persona-icon/vue/draggable/20.vue'
|
|
141
|
-
import Draggable from 'vuedraggable'
|
|
142
|
-
import type { SortValue } from '.'
|
|
143
|
-
import TableStaticSort from './TableStaticSort.vue'
|
|
144
|
-
|
|
145
|
-
const props = defineProps({
|
|
146
|
-
apperance: {
|
|
147
|
-
type : String as PropType<ApperanceVariant>,
|
|
148
|
-
default: 'table',
|
|
149
|
-
},
|
|
150
|
-
modelValue: {
|
|
151
|
-
type : Array as PropType<T[]>,
|
|
152
|
-
default: () => ([]),
|
|
153
|
-
},
|
|
154
|
-
fields: {
|
|
155
|
-
type : Array as PropType<TableField<T>[]>,
|
|
156
|
-
default: () => ([]),
|
|
157
|
-
},
|
|
158
|
-
items: {
|
|
159
|
-
type : Array as PropType<T[]>,
|
|
160
|
-
default: () => ([]),
|
|
161
|
-
},
|
|
162
|
-
selectable: {
|
|
163
|
-
type : Boolean,
|
|
164
|
-
default: false,
|
|
165
|
-
},
|
|
166
|
-
draggable: {
|
|
167
|
-
type : Boolean,
|
|
168
|
-
default: false,
|
|
169
|
-
},
|
|
170
|
-
emptyLabel: {
|
|
171
|
-
type : String,
|
|
172
|
-
default: 'There are no records to show',
|
|
173
|
-
},
|
|
174
|
-
noLabel: {
|
|
175
|
-
type : Boolean,
|
|
176
|
-
default: false,
|
|
177
|
-
},
|
|
178
|
-
tableClass: {
|
|
179
|
-
type: [
|
|
180
|
-
String,
|
|
181
|
-
Array,
|
|
182
|
-
Object,
|
|
183
|
-
] as PropType<HTMLAttributes['class']>,
|
|
184
|
-
default: undefined,
|
|
185
|
-
},
|
|
186
|
-
trClass: {
|
|
187
|
-
type: [
|
|
188
|
-
String,
|
|
189
|
-
Array,
|
|
190
|
-
Object,
|
|
191
|
-
] as PropType<HTMLAttributes['class']>,
|
|
192
|
-
default: undefined,
|
|
193
|
-
},
|
|
194
|
-
scrollable: {
|
|
195
|
-
type : Boolean,
|
|
196
|
-
default: true,
|
|
197
|
-
},
|
|
198
|
-
sortable: {
|
|
199
|
-
type : [Boolean, String] as PropType<boolean | 'single' | 'multiple'>,
|
|
200
|
-
default: false,
|
|
201
|
-
},
|
|
202
|
-
sortBy: {
|
|
203
|
-
type : Object as PropType<Record<string, any>>,
|
|
204
|
-
default: () => ({}),
|
|
205
|
-
},
|
|
206
|
-
})
|
|
207
|
-
|
|
208
|
-
const model = useVModel(props)
|
|
209
|
-
const localSortBy = ref(props.sortBy)
|
|
210
|
-
const emit = defineEmits<{
|
|
211
|
-
'update:modelValue': [T[]],
|
|
212
|
-
'update:items': [T[]],
|
|
213
|
-
'update:sortBy': [Record<string, SortValue>],
|
|
214
|
-
'sort': [Record<string, SortValue>],
|
|
215
|
-
}>()
|
|
216
|
-
|
|
217
|
-
const rows = computed<T[]>({
|
|
218
|
-
get () {
|
|
219
|
-
return props.items.map((item) => {
|
|
220
|
-
return withKey(item as Record<string, unknown>) as T
|
|
221
|
-
})
|
|
222
|
-
},
|
|
223
|
-
set (items) {
|
|
224
|
-
emit('update:items', items)
|
|
225
|
-
},
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
const classNames = computed(() => {
|
|
229
|
-
const result: string[] = ['table-static']
|
|
230
|
-
|
|
231
|
-
if (props.apperance)
|
|
232
|
-
result.push(`table-static--${props.apperance}`)
|
|
233
|
-
|
|
234
|
-
if (props.selectable)
|
|
235
|
-
result.push('table-static--selectable')
|
|
236
|
-
|
|
237
|
-
if (props.draggable)
|
|
238
|
-
result.push('table-static--draggable')
|
|
239
|
-
|
|
240
|
-
if (props.noLabel)
|
|
241
|
-
result.push('table-static--no-label')
|
|
242
|
-
|
|
243
|
-
if (props.scrollable)
|
|
244
|
-
result.push('table-static--scrollable')
|
|
245
|
-
|
|
246
|
-
return result
|
|
247
|
-
})
|
|
248
|
-
|
|
249
|
-
const selectableRows = computed(() => {
|
|
250
|
-
return props.items.filter((item) => (item as Record<string, unknown>)._selectable !== false)
|
|
251
|
-
})
|
|
252
|
-
|
|
253
|
-
const selectAll = computed({
|
|
254
|
-
get () {
|
|
255
|
-
if (props.items.length === 0)
|
|
256
|
-
return false
|
|
257
|
-
|
|
258
|
-
return model.value.length === selectableRows.value.length
|
|
259
|
-
},
|
|
260
|
-
set (value) {
|
|
261
|
-
if (selectAll.value !== value) {
|
|
262
|
-
model.value = value
|
|
263
|
-
? selectableRows.value.map((item) => withoutKey(item as Record<string, unknown>)) as T[]
|
|
264
|
-
: []
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
})
|
|
268
|
-
|
|
269
|
-
const indeterminate = computed(() => {
|
|
270
|
-
return model.value.length > 0
|
|
271
|
-
&& model.value.length < selectableRows.value.length
|
|
272
|
-
})
|
|
273
|
-
|
|
274
|
-
watch(() => props.sortBy, (value) => {
|
|
275
|
-
localSortBy.value = value
|
|
276
|
-
})
|
|
277
|
-
|
|
278
|
-
function isSortable (field: TableField<T>) {
|
|
279
|
-
return props.sortable && field.sortable !== false
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
function getSortField (field: TableField<T>): SortValue {
|
|
283
|
-
return localSortBy.value[field.key as string]
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
function setSortField (field: TableField<T>) {
|
|
287
|
-
if (isSortable(field)) {
|
|
288
|
-
const oldValue: SortValue = getSortField(field)
|
|
289
|
-
const newValue: SortValue = oldValue === 'asc' ? 'desc' : (oldValue === 'desc' ? undefined : 'asc')
|
|
290
|
-
|
|
291
|
-
const value = props.sortable === 'multiple'
|
|
292
|
-
? { ...localSortBy.value, [field.key]: newValue }
|
|
293
|
-
: { [field.key]: newValue }
|
|
294
|
-
|
|
295
|
-
localSortBy.value = value
|
|
296
|
-
|
|
297
|
-
emit('update:sortBy', value)
|
|
298
|
-
emit('sort', value)
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
defineSlots<{
|
|
303
|
-
'empty'(): VNode[],
|
|
304
|
-
'row'(props: { index: number, item: T }): VNode[],
|
|
305
|
-
[K: `cell(${string})`]:(props: { index: number }) => VNode[],
|
|
306
|
-
[K: `head(${string})`]:(props: { field: TableField<T>, label: string, sort?: 'asc' | 'desc' }) => VNode[],
|
|
307
|
-
} & {
|
|
308
|
-
[K in KeyType<T> as `cell(${K})`]:(props: { item: T, index: number }) => VNode[]
|
|
309
|
-
} & {
|
|
310
|
-
[K in KeyType<T> as `head(${K})`]:(props: { field: TableField<T>, label: string, sort?: 'asc' | 'desc' }) => VNode[]
|
|
311
|
-
}>()
|
|
312
|
-
</script>
|
|
313
|
-
|
|
314
|
-
<style lang="postcss">
|
|
315
|
-
.table-static {
|
|
316
|
-
--p-table-bg: theme(backgroundColor.default.DEFAULT);
|
|
317
|
-
--p-table-bg-dark: theme(backgroundColor.dark.default.DEFAULT);
|
|
318
|
-
--p-table-header-bg: var(--p-table-bg);
|
|
319
|
-
--p-table-header-bg-dark: var(--p-table-bg-dark);
|
|
320
|
-
--p-table-border: theme(borderColor.default.DEFAULT);
|
|
321
|
-
--p-table-border-dark: theme(borderColor.dark.default.DEFAULT);
|
|
322
|
-
|
|
323
|
-
@apply w-full;
|
|
324
|
-
|
|
325
|
-
&__table {
|
|
326
|
-
@apply table;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
&:not(&--scrollable) {
|
|
330
|
-
&.table-static__table {
|
|
331
|
-
@apply max-w-full;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
& .table-static__row > .table-static__cell {
|
|
335
|
-
@apply whitespace-pre-wrap;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
&:where(&--scrollable) {
|
|
340
|
-
.table-static__table {
|
|
341
|
-
@apply min-w-full;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
& .table-static__row > .table-static__cell {
|
|
345
|
-
@apply whitespace-pre;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
&__headers {
|
|
350
|
-
@apply pt-4 bg-[color:var(--p-table-bg)];
|
|
351
|
-
@apply dark:bg-[color:var(--p-table-bg-dark)];
|
|
352
|
-
|
|
353
|
-
.table-static__header {
|
|
354
|
-
@apply px-3 text-xs border-x-0;
|
|
355
|
-
|
|
356
|
-
&--sortable {
|
|
357
|
-
@apply cursor-pointer select-none;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
&.table-static__drag,
|
|
361
|
-
&.table-static__checkbox {
|
|
362
|
-
@apply w-[1%];
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
&-label {
|
|
366
|
-
@apply inline-flex items-center;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
&-sort {
|
|
370
|
-
@apply flex flex-col flex-shrink-0 items-center justify-center ml-1;
|
|
371
|
-
@apply text-muted;
|
|
372
|
-
@apply dark:text-dark-muted;
|
|
373
|
-
|
|
374
|
-
&[active="asc"] {
|
|
375
|
-
> .table-static__header-sort-down {
|
|
376
|
-
@apply text-default;
|
|
377
|
-
@apply dark:text-dark-default;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
&[active="desc"] {
|
|
382
|
-
> .table-static__header-sort-up {
|
|
383
|
-
@apply text-default;
|
|
384
|
-
@apply dark:text-dark-default;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
&-sort-down {
|
|
390
|
-
@apply -mt-2;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
+ .table-static__body {
|
|
395
|
-
@apply pt-2;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
& &__row > &__cell {
|
|
400
|
-
@apply ml-2 py-4 px-3 text-sm text-default;
|
|
401
|
-
@apply dark:text-dark-default;
|
|
402
|
-
|
|
403
|
-
&.table-static__drag {
|
|
404
|
-
@apply cursor-grabbing md:mx-3;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
& &__headers &__header {
|
|
409
|
-
@apply bg-[color:var(--p-table-header-bg)];
|
|
410
|
-
@apply dark:bg-[color:var(--p-table-header-bg-dark)];
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
& &__body > &__row {
|
|
414
|
-
@apply border-t border-[color:var(--p-table-border)] bg-[color:var(--p-table-bg)];
|
|
415
|
-
@apply dark:border-[color:var(--p-table-border-dark)] dark:bg-[color:var(--p-table-bg-dark)];
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
&--no-label {
|
|
419
|
-
.table-static__body > .table-static__row:first-child {
|
|
420
|
-
@apply border-t-0;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
&--table {
|
|
425
|
-
.table-static__row .table-static__cell,
|
|
426
|
-
.table-static__headers .table-static__header {
|
|
427
|
-
@apply border-0;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
.table-static__row .table-static__cell {
|
|
431
|
-
@apply align-top;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
&--card {
|
|
436
|
-
.table-static__table {
|
|
437
|
-
@apply border-separate border-spacing-y-2;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.table-static__row .table-static__cell,
|
|
441
|
-
.table-static__headers .table-static__header {
|
|
442
|
-
@apply border-x-0 border-y;
|
|
443
|
-
|
|
444
|
-
&:first-child {
|
|
445
|
-
@apply rounded-l border-l;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
&:last-child {
|
|
449
|
-
@apply rounded-r border-r;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
&--scrollable {
|
|
455
|
-
@apply overflow-auto overscroll-contain;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
</style>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<template v-if="scrollable">
|
|
3
|
-
<div
|
|
4
|
-
class="table-static"
|
|
5
|
-
v-bind="$attrs">
|
|
6
|
-
<table
|
|
7
|
-
class="table-static__table"
|
|
8
|
-
:class="tableClass">
|
|
9
|
-
<slot />
|
|
10
|
-
</table>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
<template v-else>
|
|
14
|
-
<table
|
|
15
|
-
class="table-static__table"
|
|
16
|
-
:class="tableClass"
|
|
17
|
-
v-bind="$attrs">
|
|
18
|
-
<slot />
|
|
19
|
-
</table>
|
|
20
|
-
</template>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script lang="ts" setup>
|
|
24
|
-
import type { HTMLAttributes, PropType } from 'vue-demi'
|
|
25
|
-
|
|
26
|
-
defineOptions({ inheritAttrs: false })
|
|
27
|
-
|
|
28
|
-
defineProps({
|
|
29
|
-
scrollable: {
|
|
30
|
-
type : Boolean,
|
|
31
|
-
default: true,
|
|
32
|
-
},
|
|
33
|
-
tableClass: {
|
|
34
|
-
type: [
|
|
35
|
-
String,
|
|
36
|
-
Array,
|
|
37
|
-
Object,
|
|
38
|
-
] as PropType<HTMLAttributes['class']>,
|
|
39
|
-
default: undefined,
|
|
40
|
-
},
|
|
41
|
-
})
|
|
42
|
-
</script>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:active="active"
|
|
4
|
-
class="table-static__header-sort"
|
|
5
|
-
data-testid="table-static-header-sort">
|
|
6
|
-
<IconUp
|
|
7
|
-
class="table-static__header-sort-up" />
|
|
8
|
-
<IconDown
|
|
9
|
-
class="table-static__header-sort-down" />
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script lang="ts" setup>
|
|
14
|
-
import IconUp from '@privyid/persona-icon/vue/caret-up/16.vue'
|
|
15
|
-
import IconDown from '@privyid/persona-icon/vue/caret-down/16.vue'
|
|
16
|
-
|
|
17
|
-
defineProps({
|
|
18
|
-
active: {
|
|
19
|
-
type : String,
|
|
20
|
-
default: undefined,
|
|
21
|
-
},
|
|
22
|
-
})
|
|
23
|
-
</script>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { MaybeRefOrGetter } from 'vue-demi';
|
|
2
|
-
export type SortValue = 'asc' | 'desc';
|
|
3
|
-
export interface DataTableOption {
|
|
4
|
-
/**
|
|
5
|
-
* Filter list equal to object
|
|
6
|
-
* @example
|
|
7
|
-
* // Filter list with name === 'Tarjono' and gender === 'male'
|
|
8
|
-
* const items = useTable(list, {
|
|
9
|
-
* filterBy: {
|
|
10
|
-
* name: 'Tarjono',
|
|
11
|
-
* gender: 'male',
|
|
12
|
-
* }
|
|
13
|
-
* })
|
|
14
|
-
*/
|
|
15
|
-
filterBy?: MaybeRefOrGetter<Record<string, string>>;
|
|
16
|
-
/**
|
|
17
|
-
* Sort list based on key
|
|
18
|
-
* @example
|
|
19
|
-
* const items = useTable(list, {
|
|
20
|
-
* sortBy: {
|
|
21
|
-
* name: 'asc',
|
|
22
|
-
* }
|
|
23
|
-
* })
|
|
24
|
-
*/
|
|
25
|
-
sortBy?: MaybeRefOrGetter<Record<string, string>>;
|
|
26
|
-
/**
|
|
27
|
-
* Limit showing list
|
|
28
|
-
* @example
|
|
29
|
-
* const items = useTable(lst, {
|
|
30
|
-
* perPage: 5,
|
|
31
|
-
* page: 2,
|
|
32
|
-
* })
|
|
33
|
-
*/
|
|
34
|
-
perPage?: MaybeRefOrGetter<number>;
|
|
35
|
-
page?: MaybeRefOrGetter<number>;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Reactive filter, sort and paginate array of object
|
|
39
|
-
* @param items
|
|
40
|
-
* @param options
|
|
41
|
-
* @returns
|
|
42
|
-
* @example
|
|
43
|
-
*
|
|
44
|
-
* const list = ref([
|
|
45
|
-
* { id: 1, name: 'Tarjono', age: 20, gender: 'male' },
|
|
46
|
-
* { id: 2, name: 'Yuki', age: 25, gender: 'female' },
|
|
47
|
-
* { id: 3, name: 'Agus', age: 33, gender: 'male' },
|
|
48
|
-
* { id: 4, name: 'Tumijah', age: 70, gender: 'female' },
|
|
49
|
-
* { id: 5, name: 'Admojo', age: 55, gender: 'male' },
|
|
50
|
-
* ])
|
|
51
|
-
*
|
|
52
|
-
* const filterBy = ref({ gender: 'male' })
|
|
53
|
-
* const sortBy = ref({ age: 'asc' })
|
|
54
|
-
* const page = ref(1)
|
|
55
|
-
* const perPage = ref(3)
|
|
56
|
-
*
|
|
57
|
-
* const items = useTableQuery(list, {
|
|
58
|
-
* filterBy,
|
|
59
|
-
* sortBy,
|
|
60
|
-
* page,
|
|
61
|
-
* perPage,
|
|
62
|
-
* })
|
|
63
|
-
*/
|
|
64
|
-
export declare function useTableQuery(items: MaybeRefOrGetter<unknown[]>, options?: DataTableOption): import("vue-demi").ComputedRef<unknown[]>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
computed,
|
|
3
|
-
toValue
|
|
4
|
-
} from "vue-demi";
|
|
5
|
-
import { arrayFilter, arraySort } from "../utils/array.mjs";
|
|
6
|
-
export function useTableQuery(items, options = {}) {
|
|
7
|
-
const filteredItems = computed(() => {
|
|
8
|
-
const filterBy = toValue(options.filterBy);
|
|
9
|
-
const list = toValue(items);
|
|
10
|
-
return filterBy ? arrayFilter(list, filterBy) : list;
|
|
11
|
-
});
|
|
12
|
-
const sortedItems = computed(() => {
|
|
13
|
-
const sortBy = toValue(options.sortBy);
|
|
14
|
-
return sortBy ? arraySort(filteredItems.value, sortBy) : filteredItems.value;
|
|
15
|
-
});
|
|
16
|
-
const paginateItems = computed(() => {
|
|
17
|
-
const perPage = toValue(options.perPage) ?? sortedItems.value.length;
|
|
18
|
-
const page = toValue(options.page) ?? 1;
|
|
19
|
-
const start = (page - 1) * perPage;
|
|
20
|
-
const end = start + perPage;
|
|
21
|
-
return sortedItems.value.slice(start, end);
|
|
22
|
-
});
|
|
23
|
-
return paginateItems;
|
|
24
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section
|
|
3
|
-
data-testid="tab-panel"
|
|
4
|
-
class="tab__panel">
|
|
5
|
-
<div
|
|
6
|
-
data-testid="tab-content"
|
|
7
|
-
class="tab__content">
|
|
8
|
-
<slot />
|
|
9
|
-
</div>
|
|
10
|
-
</section>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script lang="ts" setup>
|
|
14
|
-
import type { VNode } from 'vue-demi'
|
|
15
|
-
|
|
16
|
-
defineProps({
|
|
17
|
-
title: {
|
|
18
|
-
type : String,
|
|
19
|
-
default: '',
|
|
20
|
-
},
|
|
21
|
-
disabled: {
|
|
22
|
-
type : Boolean,
|
|
23
|
-
default: false,
|
|
24
|
-
},
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
defineOptions({ name: 'Tab' })
|
|
28
|
-
|
|
29
|
-
defineSlots<{
|
|
30
|
-
'title'(): VNode[],
|
|
31
|
-
'icon'(): VNode[],
|
|
32
|
-
'default'(): VNode[],
|
|
33
|
-
}>()
|
|
34
|
-
</script>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import {
|
|
3
|
-
Transition,
|
|
4
|
-
KeepAlive,
|
|
5
|
-
h,
|
|
6
|
-
ref,
|
|
7
|
-
watch,
|
|
8
|
-
defineComponent
|
|
9
|
-
} from "vue-demi";
|
|
10
|
-
import { findAllChildren, toBoolean } from "../utils/vnode";
|
|
11
|
-
import { useToNumber } from "@vueuse/core";
|
|
12
|
-
export default defineComponent({
|
|
13
|
-
props: {
|
|
14
|
-
active: {
|
|
15
|
-
type: [Number, String],
|
|
16
|
-
required: true
|
|
17
|
-
},
|
|
18
|
-
keepAlive: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: false
|
|
21
|
-
},
|
|
22
|
-
vertical: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
setup(props, { slots }) {
|
|
28
|
-
const transition = ref(props.vertical ? "slide-top" : "slide-left");
|
|
29
|
-
const active = useToNumber(() => props.active, { nanToZero: true });
|
|
30
|
-
watch(() => props.active, (value, last) => {
|
|
31
|
-
transition.value = value < last ? props.vertical ? "slide-bottom" : "slide-right" : props.vertical ? "slide-top" : "slide-left";
|
|
32
|
-
});
|
|
33
|
-
return () => {
|
|
34
|
-
const tab = findAllChildren(slots.default(), "Tab").map((vnode, index) => {
|
|
35
|
-
const isDisabled = toBoolean(vnode.props?.disabled);
|
|
36
|
-
const isActive = index === props.active && !isDisabled;
|
|
37
|
-
return h(vnode, {
|
|
38
|
-
key: index,
|
|
39
|
-
dataTabid: index,
|
|
40
|
-
style: { display: isActive ? "block" : "none" }
|
|
41
|
-
});
|
|
42
|
-
}).at(active.value);
|
|
43
|
-
const body = () => {
|
|
44
|
-
return props.keepAlive ? h(KeepAlive, tab) : tab;
|
|
45
|
-
};
|
|
46
|
-
return h(Transition, {
|
|
47
|
-
name: transition.value,
|
|
48
|
-
mode: "out-in"
|
|
49
|
-
}, body);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
</script>
|