@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,202 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="carousel"
|
|
4
|
-
:class="classNames">
|
|
5
|
-
<div
|
|
6
|
-
ref="container"
|
|
7
|
-
class="carousel__container splide">
|
|
8
|
-
<CarouselBody>
|
|
9
|
-
<slot />
|
|
10
|
-
</CarouselBody>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<div
|
|
14
|
-
v-if="!noProgress"
|
|
15
|
-
class="carousel__progress">
|
|
16
|
-
<ProgressIndicator
|
|
17
|
-
v-model="model"
|
|
18
|
-
:length="length"
|
|
19
|
-
:direction="direction" />
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script lang="ts" setup>
|
|
25
|
-
import type { PropType } from 'vue-demi'
|
|
26
|
-
import {
|
|
27
|
-
computed,
|
|
28
|
-
nextTick,
|
|
29
|
-
onBeforeUnmount,
|
|
30
|
-
onMounted,
|
|
31
|
-
provide,
|
|
32
|
-
ref,
|
|
33
|
-
watch,
|
|
34
|
-
} from 'vue-demi'
|
|
35
|
-
import CarouselBody from './CarouselBody.vue'
|
|
36
|
-
import ProgressIndicator from '../progress-indicator/ProgressIndicator.vue'
|
|
37
|
-
import type { DirectionVariant } from '../steps'
|
|
38
|
-
import '@splidejs/splide/css/core'
|
|
39
|
-
import { defu } from 'defu'
|
|
40
|
-
import type { AlignmentVariant } from '.'
|
|
41
|
-
import { CAROUSEL_INSTANCE } from '.'
|
|
42
|
-
import type { Options, Splide } from '@splidejs/splide'
|
|
43
|
-
import { useVModel } from '../input'
|
|
44
|
-
|
|
45
|
-
const props = defineProps({
|
|
46
|
-
modelValue: {
|
|
47
|
-
type : Number,
|
|
48
|
-
default: 1,
|
|
49
|
-
},
|
|
50
|
-
direction: {
|
|
51
|
-
type : String as PropType<DirectionVariant>,
|
|
52
|
-
default: 'horizontal',
|
|
53
|
-
},
|
|
54
|
-
align: {
|
|
55
|
-
type : String as PropType<AlignmentVariant>,
|
|
56
|
-
default: 'end',
|
|
57
|
-
},
|
|
58
|
-
width: {
|
|
59
|
-
type : [String, Number],
|
|
60
|
-
default: '100%',
|
|
61
|
-
},
|
|
62
|
-
height: {
|
|
63
|
-
type : [String, Number],
|
|
64
|
-
default: 'auto',
|
|
65
|
-
},
|
|
66
|
-
loop: {
|
|
67
|
-
type : Boolean,
|
|
68
|
-
default: false,
|
|
69
|
-
},
|
|
70
|
-
autoplay: {
|
|
71
|
-
type : Boolean,
|
|
72
|
-
default: false,
|
|
73
|
-
},
|
|
74
|
-
autoplayInterval: {
|
|
75
|
-
type : [Number, String],
|
|
76
|
-
default: 5000,
|
|
77
|
-
},
|
|
78
|
-
splideOptions: {
|
|
79
|
-
type : Object as PropType<Options>,
|
|
80
|
-
default: () => ({}),
|
|
81
|
-
},
|
|
82
|
-
noProgress: {
|
|
83
|
-
type : Boolean,
|
|
84
|
-
default: false,
|
|
85
|
-
},
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
const emit = defineEmits<{
|
|
89
|
-
'update:modelValue': [number],
|
|
90
|
-
'change': [number],
|
|
91
|
-
}>()
|
|
92
|
-
|
|
93
|
-
const model = useVModel(props)
|
|
94
|
-
const container = ref<HTMLDivElement>()
|
|
95
|
-
const slider = ref<Splide>()
|
|
96
|
-
const length = ref(1)
|
|
97
|
-
|
|
98
|
-
const classNames = computed(() => {
|
|
99
|
-
const result: string[] = []
|
|
100
|
-
|
|
101
|
-
if (props.direction)
|
|
102
|
-
result.push(`carousel--${props.direction}`)
|
|
103
|
-
|
|
104
|
-
if (props.align)
|
|
105
|
-
result.push(`carousel--${props.align}`)
|
|
106
|
-
|
|
107
|
-
return result
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
const options = computed<Options>(() => {
|
|
111
|
-
return defu<Options, [Options]>(props.splideOptions, {
|
|
112
|
-
type : props.loop ? 'loop' : 'slide',
|
|
113
|
-
direction : props.direction === 'vertical' ? 'ttb' : 'ltr',
|
|
114
|
-
width : props.width,
|
|
115
|
-
height : props.height,
|
|
116
|
-
focus : 'center',
|
|
117
|
-
arrows : false,
|
|
118
|
-
pagination: false,
|
|
119
|
-
autoplay : props.autoplay,
|
|
120
|
-
interval : Number.parseInt(`${props.autoplayInterval}`),
|
|
121
|
-
start : props.modelValue - 1,
|
|
122
|
-
})
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
watch(model, (value) => {
|
|
126
|
-
if (slider.value)
|
|
127
|
-
slider.value.go(value - 1)
|
|
128
|
-
})
|
|
129
|
-
|
|
130
|
-
watch(options, (value) => {
|
|
131
|
-
if (slider.value)
|
|
132
|
-
slider.value.options = value
|
|
133
|
-
}, { deep: true })
|
|
134
|
-
|
|
135
|
-
function onMove (index: number) {
|
|
136
|
-
model.value = index + 1
|
|
137
|
-
|
|
138
|
-
emit('change', index + 1)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function onLoaded () {
|
|
142
|
-
if (slider.value) {
|
|
143
|
-
nextTick(() => {
|
|
144
|
-
length.value = slider.value.length
|
|
145
|
-
model.value = slider.value.index + 1
|
|
146
|
-
})
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
onMounted(async () => {
|
|
151
|
-
if (container.value) {
|
|
152
|
-
const { Splide } = await import('@splidejs/splide')
|
|
153
|
-
|
|
154
|
-
slider.value = new Splide(container.value, options.value)
|
|
155
|
-
|
|
156
|
-
slider.value.on('mounted refresh', onLoaded)
|
|
157
|
-
slider.value.on('move', onMove)
|
|
158
|
-
slider.value.mount()
|
|
159
|
-
}
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
onBeforeUnmount(() => {
|
|
163
|
-
if (slider.value)
|
|
164
|
-
slider.value.destroy()
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
provide(CAROUSEL_INSTANCE, slider)
|
|
168
|
-
</script>
|
|
169
|
-
|
|
170
|
-
<style lang="postcss">
|
|
171
|
-
.carousel {
|
|
172
|
-
@apply flex items-center justify-center w-full;
|
|
173
|
-
|
|
174
|
-
&__progress {
|
|
175
|
-
@apply shrink-0;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&--horizontal {
|
|
179
|
-
@apply space-y-2;
|
|
180
|
-
|
|
181
|
-
&.carousel--end {
|
|
182
|
-
@apply flex-col;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&.carousel--start {
|
|
186
|
-
@apply flex-col-reverse space-y-reverse;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
&--vertical {
|
|
191
|
-
@apply space-x-2 items-stretch;
|
|
192
|
-
|
|
193
|
-
&.carousel--end {
|
|
194
|
-
@apply flex-row;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&.carousel--start {
|
|
198
|
-
@apply flex-row-reverse space-x-reverse;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
</style>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="splide__track">
|
|
3
|
-
<div class="splide__list">
|
|
4
|
-
<slot />
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script lang="ts" setup>
|
|
10
|
-
import { inject, onUpdated } from 'vue-demi'
|
|
11
|
-
import { CAROUSEL_INSTANCE } from '.'
|
|
12
|
-
|
|
13
|
-
const slider = inject(CAROUSEL_INSTANCE)
|
|
14
|
-
|
|
15
|
-
onUpdated(() => {
|
|
16
|
-
slider.value?.refresh()
|
|
17
|
-
})
|
|
18
|
-
</script>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const CAROUSEL_INSTANCE = Symbol("CarouselInstance");
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-p-aspect-ratio="16/9"
|
|
4
|
-
class="chart"
|
|
5
|
-
data-testid="chart"
|
|
6
|
-
:class="classNames">
|
|
7
|
-
<slot />
|
|
8
|
-
<canvas
|
|
9
|
-
ref="canvas"
|
|
10
|
-
data-testid="chart-canvas"
|
|
11
|
-
class="chart__canvas" />
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script lang="ts" setup>
|
|
16
|
-
import type {
|
|
17
|
-
Chart,
|
|
18
|
-
ChartData,
|
|
19
|
-
ChartType,
|
|
20
|
-
ChartOptions,
|
|
21
|
-
} from 'chart.js/auto'
|
|
22
|
-
import { watchIgnorable } from '@vueuse/core'
|
|
23
|
-
import type { PropType, VNode } from 'vue-demi'
|
|
24
|
-
import {
|
|
25
|
-
onMounted,
|
|
26
|
-
watch,
|
|
27
|
-
shallowRef,
|
|
28
|
-
onBeforeUnmount,
|
|
29
|
-
toRef,
|
|
30
|
-
computed,
|
|
31
|
-
nextTick,
|
|
32
|
-
ref,
|
|
33
|
-
} from 'vue-demi'
|
|
34
|
-
import type { LegendPosition } from '.'
|
|
35
|
-
import { defuFn } from 'defu'
|
|
36
|
-
import getAdapter from './adapter/index'
|
|
37
|
-
import { createChart } from './utils/use-chart'
|
|
38
|
-
import { vPAspectRatio } from '../aspect-ratio'
|
|
39
|
-
|
|
40
|
-
const props = defineProps({
|
|
41
|
-
variant: {
|
|
42
|
-
type : String as PropType<ChartType>,
|
|
43
|
-
default: 'line',
|
|
44
|
-
},
|
|
45
|
-
legend: {
|
|
46
|
-
type : String as PropType<LegendPosition>,
|
|
47
|
-
default: 'bottom',
|
|
48
|
-
},
|
|
49
|
-
data: {
|
|
50
|
-
type : Object as PropType<ChartData>,
|
|
51
|
-
default: undefined,
|
|
52
|
-
},
|
|
53
|
-
options: {
|
|
54
|
-
type : Object as PropType<ChartOptions>,
|
|
55
|
-
default: undefined,
|
|
56
|
-
},
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const slots = defineSlots<{
|
|
60
|
-
'default'(): VNode[],
|
|
61
|
-
}>()
|
|
62
|
-
|
|
63
|
-
const instance = shallowRef<Chart>()
|
|
64
|
-
const canvas = ref<HTMLCanvasElement>()
|
|
65
|
-
const variant = toRef(props, 'variant')
|
|
66
|
-
const legend = toRef(props, 'legend')
|
|
67
|
-
|
|
68
|
-
const classNames = computed(() => {
|
|
69
|
-
const result: string[] = []
|
|
70
|
-
|
|
71
|
-
if (props.variant)
|
|
72
|
-
result.push(`chart--${props.variant}`)
|
|
73
|
-
|
|
74
|
-
if (props.legend)
|
|
75
|
-
result.push(`chart--${props.legend}`)
|
|
76
|
-
|
|
77
|
-
return result
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
const data = computed<ChartData>(() => {
|
|
81
|
-
return defuFn(
|
|
82
|
-
props.data as ChartData,
|
|
83
|
-
getAdapter(variant.value)?.getDatasets(slots?.default?.() ?? []),
|
|
84
|
-
)
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
const options = computed<ChartOptions>(() => {
|
|
88
|
-
return defuFn(
|
|
89
|
-
props.options as PropType<ChartOptions>,
|
|
90
|
-
{
|
|
91
|
-
plugins: {
|
|
92
|
-
legend: {
|
|
93
|
-
display : legend.value !== 'none',
|
|
94
|
-
position: legend.value === 'none' ? undefined : legend.value,
|
|
95
|
-
labels : {
|
|
96
|
-
color: '#9CA3AF',
|
|
97
|
-
font : {
|
|
98
|
-
family: 'DM Sans',
|
|
99
|
-
size : 12,
|
|
100
|
-
weight: 600,
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
getAdapter(variant.value)?.getStyle(),
|
|
107
|
-
)
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
async function initChart () {
|
|
111
|
-
if (instance.value)
|
|
112
|
-
instance.value.destroy()
|
|
113
|
-
|
|
114
|
-
instance.value = await createChart(
|
|
115
|
-
canvas.value as HTMLCanvasElement,
|
|
116
|
-
variant.value,
|
|
117
|
-
data.value,
|
|
118
|
-
options.value,
|
|
119
|
-
)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const { ignoreUpdates } = watchIgnorable(data, (newData) => {
|
|
123
|
-
if (instance.value) {
|
|
124
|
-
instance.value.data = newData
|
|
125
|
-
instance.value.update()
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
watch([variant, legend], () => {
|
|
130
|
-
ignoreUpdates(async () => {
|
|
131
|
-
await initChart()
|
|
132
|
-
await nextTick()
|
|
133
|
-
})
|
|
134
|
-
}, { flush: 'pre' })
|
|
135
|
-
|
|
136
|
-
onMounted(() => {
|
|
137
|
-
initChart()
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
onBeforeUnmount(() => {
|
|
141
|
-
if (instance.value)
|
|
142
|
-
instance.value.destroy()
|
|
143
|
-
})
|
|
144
|
-
|
|
145
|
-
</script>
|
|
146
|
-
|
|
147
|
-
<style lang="postcss">
|
|
148
|
-
.chart {
|
|
149
|
-
--p-chart-padding-x: theme(spacing.4);
|
|
150
|
-
--p-chart-padding-y: theme(spacing.4);
|
|
151
|
-
|
|
152
|
-
@apply w-full bg-default px-[var(--p-chart-padding-x)] py-[var(--p-chart-padding-y)];
|
|
153
|
-
@apply dark:bg-dark-default;
|
|
154
|
-
}
|
|
155
|
-
</style>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<slot />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script lang="ts" setup>
|
|
6
|
-
import type { ChartDataset } from 'chart.js/auto'
|
|
7
|
-
import type { PropType } from 'vue-demi'
|
|
8
|
-
|
|
9
|
-
defineOptions({
|
|
10
|
-
name : 'ChartSet',
|
|
11
|
-
inheritAttrs: false,
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
defineProps({
|
|
15
|
-
name: {
|
|
16
|
-
type : [String, Number],
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
color: {
|
|
20
|
-
type : String,
|
|
21
|
-
default: undefined,
|
|
22
|
-
},
|
|
23
|
-
fill: {
|
|
24
|
-
type : String,
|
|
25
|
-
default: undefined,
|
|
26
|
-
},
|
|
27
|
-
options: {
|
|
28
|
-
type : Object as PropType<ChartDataset>,
|
|
29
|
-
default: undefined,
|
|
30
|
-
},
|
|
31
|
-
})
|
|
32
|
-
</script>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<slot />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script lang="ts" setup>
|
|
6
|
-
import type { ChartDataset } from 'chart.js/auto'
|
|
7
|
-
import type { PropType } from 'vue-demi'
|
|
8
|
-
|
|
9
|
-
defineOptions({
|
|
10
|
-
name : 'ChartVal',
|
|
11
|
-
inheritAttrs: false,
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
defineProps({
|
|
15
|
-
name: {
|
|
16
|
-
type : [String, Number],
|
|
17
|
-
default: undefined,
|
|
18
|
-
},
|
|
19
|
-
value: {
|
|
20
|
-
type : undefined as PropType<any>,
|
|
21
|
-
default: undefined,
|
|
22
|
-
},
|
|
23
|
-
color: {
|
|
24
|
-
type : String,
|
|
25
|
-
default: undefined,
|
|
26
|
-
},
|
|
27
|
-
fill: {
|
|
28
|
-
type : String,
|
|
29
|
-
default: undefined,
|
|
30
|
-
},
|
|
31
|
-
options: {
|
|
32
|
-
type : Object as PropType<ChartDataset>,
|
|
33
|
-
default: undefined,
|
|
34
|
-
},
|
|
35
|
-
})
|
|
36
|
-
</script>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ChartData, ChartOptions } from 'chart.js/auto';
|
|
2
|
-
import type { VNode } from 'vue-demi';
|
|
3
|
-
export interface ChartAdapter {
|
|
4
|
-
getStyle: () => ChartOptions;
|
|
5
|
-
getDatasets: (vnodes: VNode[]) => ChartData;
|
|
6
|
-
}
|
|
7
|
-
export declare function defineAdapter(adapter: ChartAdapter): ChartAdapter;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { findAllChildren } from "../../utils/vnode.mjs";
|
|
2
|
-
import { defineAdapter } from "./adapter.mjs";
|
|
3
|
-
import defu from "defu";
|
|
4
|
-
import { startCase } from "lodash-es";
|
|
5
|
-
import { colorHash } from "../../avatar/utils/color-hash.mjs";
|
|
6
|
-
export default defineAdapter({
|
|
7
|
-
getDatasets(vnodes) {
|
|
8
|
-
return {
|
|
9
|
-
datasets: findAllChildren(vnodes, "ChartSet").map((set) => {
|
|
10
|
-
const color = set.props.color ?? colorHash(set.props.name).at(1);
|
|
11
|
-
const fill = set.props.fill ?? color;
|
|
12
|
-
return defu(set.props.options, {
|
|
13
|
-
label: startCase(set.props.name),
|
|
14
|
-
backgroundColor: fill,
|
|
15
|
-
borderColor: color,
|
|
16
|
-
data: findAllChildren(set.children.default(), "ChartVal").map((value) => {
|
|
17
|
-
return value.props.value;
|
|
18
|
-
})
|
|
19
|
-
});
|
|
20
|
-
})
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
getStyle() {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Line from "./line.mjs";
|
|
2
|
-
import Pie from "./pie.mjs";
|
|
3
|
-
import Bubble from "./bubble.mjs";
|
|
4
|
-
const CHART_ADAPTER_MAP = {
|
|
5
|
-
line: Line,
|
|
6
|
-
bar: Line,
|
|
7
|
-
radar: Line,
|
|
8
|
-
pie: Pie,
|
|
9
|
-
doughnut: Pie,
|
|
10
|
-
polarArea: Pie,
|
|
11
|
-
scatter: Bubble,
|
|
12
|
-
bubble: Bubble
|
|
13
|
-
};
|
|
14
|
-
export default function getAdapter(type) {
|
|
15
|
-
return CHART_ADAPTER_MAP[type];
|
|
16
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { startCase } from "lodash-es";
|
|
2
|
-
import { defineAdapter } from "./adapter.mjs";
|
|
3
|
-
import { colorHash } from "../../avatar/utils/color-hash.mjs";
|
|
4
|
-
import { findAllChildren } from "../../utils/vnode.mjs";
|
|
5
|
-
import defu from "defu";
|
|
6
|
-
export default defineAdapter({
|
|
7
|
-
getDatasets(vnodes) {
|
|
8
|
-
const sets = findAllChildren(vnodes, "ChartSet");
|
|
9
|
-
const datasets = /* @__PURE__ */ new Map();
|
|
10
|
-
const labels = [];
|
|
11
|
-
for (const set of sets) {
|
|
12
|
-
const values = findAllChildren(set.children.default(), "ChartVal");
|
|
13
|
-
for (const value of values) {
|
|
14
|
-
const item = datasets.get(value.props.name);
|
|
15
|
-
const color = value.props.color ?? colorHash(value.props.name).at(1);
|
|
16
|
-
const fill = value.props.fill ?? color;
|
|
17
|
-
if (item) {
|
|
18
|
-
item.data.push(value.props.value);
|
|
19
|
-
item.borderColor.push(color);
|
|
20
|
-
item.backgroundColor.push(fill);
|
|
21
|
-
} else {
|
|
22
|
-
datasets.set(value.props.name, defu(value.props.options, {
|
|
23
|
-
label: startCase(value.props.name),
|
|
24
|
-
data: [value.props.value],
|
|
25
|
-
borderColor: [color],
|
|
26
|
-
backgroundColor: [fill],
|
|
27
|
-
fill: !!value.props.fill
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
labels.push(startCase(set.props.name));
|
|
32
|
-
}
|
|
33
|
-
return { labels, datasets: [...datasets.values()] };
|
|
34
|
-
},
|
|
35
|
-
getStyle() {
|
|
36
|
-
return {
|
|
37
|
-
scales: {
|
|
38
|
-
x: {
|
|
39
|
-
ticks: {
|
|
40
|
-
color: "#9CA3AF",
|
|
41
|
-
font: {
|
|
42
|
-
family: "DM Sans",
|
|
43
|
-
size: 12,
|
|
44
|
-
weight: 600
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
border: { color: "#BFBFBF" }
|
|
48
|
-
},
|
|
49
|
-
y: {
|
|
50
|
-
ticks: {
|
|
51
|
-
color: "#9CA3AF",
|
|
52
|
-
font: {
|
|
53
|
-
family: "DM Sans",
|
|
54
|
-
size: 12,
|
|
55
|
-
weight: 600
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
border: {
|
|
59
|
-
color: "#BFBFBF",
|
|
60
|
-
dash: [4]
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { startCase } from "lodash-es";
|
|
2
|
-
import { colorHash } from "../../avatar/utils/color-hash.mjs";
|
|
3
|
-
import { findAllChildren } from "../../utils/vnode.mjs";
|
|
4
|
-
import { defineAdapter } from "./adapter.mjs";
|
|
5
|
-
import defu from "defu";
|
|
6
|
-
export default defineAdapter({
|
|
7
|
-
getDatasets(vnodes) {
|
|
8
|
-
const sets = findAllChildren(vnodes, "ChartSet");
|
|
9
|
-
const datasets = /* @__PURE__ */ new Map();
|
|
10
|
-
const labels = [];
|
|
11
|
-
for (const set of sets) {
|
|
12
|
-
const values = findAllChildren(set.children.default(), "ChartVal");
|
|
13
|
-
for (const value of values) {
|
|
14
|
-
const item = datasets.get(set.props.name);
|
|
15
|
-
const fill = value.props.fill ?? value.props.color ?? colorHash(value.props.name).at(1);
|
|
16
|
-
if (item) {
|
|
17
|
-
item.data.push(value.props.value);
|
|
18
|
-
item.backgroundColor.push(fill);
|
|
19
|
-
} else {
|
|
20
|
-
datasets.set(set.props.name, defu(set.props.options, {
|
|
21
|
-
label: startCase(set.props.name),
|
|
22
|
-
data: [value.props.value],
|
|
23
|
-
backgroundColor: [fill]
|
|
24
|
-
}));
|
|
25
|
-
}
|
|
26
|
-
labels.push(startCase(value.props.name));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return { labels, datasets: [...datasets.values()] };
|
|
30
|
-
},
|
|
31
|
-
getStyle() {
|
|
32
|
-
return {};
|
|
33
|
-
}
|
|
34
|
-
});
|
|
File without changes
|