@leavepulse/ui 0.43.4 → 0.45.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/README.md +121 -7
- package/dist/assets/{LpCommandPalette-B-0Est4Z.css → LpCommandPalette-nGNnzXqQ.css} +21 -21
- package/dist/assets/{LpDropzone-BBoWvi-J.css → LpDropzone-i4BdMi1H.css} +12 -12
- package/dist/assets/{LpImageEditor-Ct7Y3aNu.css → LpImageEditor-CbMA82g8.css} +6 -6
- package/dist/assets/{LpRollingText-CR1mb0Vt.css → LpRollingText-BGnE6q9j.css} +3 -0
- package/dist/assets/{LpShortcutsDialog-C6YoQ8_M.css → LpShortcutsDialog-CqYX3yy6.css} +28 -7
- package/dist/assets/{LpSkeleton-D7xU8IPV.css → LpSkeleton-H3Z5dEIk.css} +4 -1
- package/dist/assets/{LpTable-BgPLJOXa.css → LpTable-CPwWxTJS.css} +49 -9
- package/dist/chunks/ContextMenuItems-BtKU7074.js +124 -0
- package/dist/chunks/{LayoutCanvas-Dd20boUG.js → LayoutCanvas-BkaGXTjx.js} +26 -9
- package/dist/chunks/{LayoutNode-DGpZA9LX.js → LayoutNode-B3_9E1Xa.js} +28 -12
- package/dist/chunks/{LpActionBar-BlvtGB2P.js → LpActionBar-CnfFVIwC.js} +26 -12
- package/dist/chunks/{LpAddressInput-B-Zvxsn7.js → LpAddressInput-BwX8uo4_.js} +54 -49
- package/dist/chunks/{LpAlert-BAYHDSS1.js → LpAlert-B6ilrM7T.js} +16 -9
- package/dist/chunks/{LpAppShell-BGQVIY-3.js → LpAppShell-C53_RaGF.js} +53 -26
- package/dist/chunks/{LpAutocomplete-DExlIZe_.js → LpAutocomplete-C8IgSMsi.js} +52 -24
- package/dist/chunks/{LpAvatar-B3-xAOH3.js → LpAvatar-C1XStdOo.js} +19 -10
- package/dist/chunks/LpBreadcrumbs-CQJd73Gm.js +95 -0
- package/dist/chunks/{LpButton-5VXXCjwF.js → LpButton-CKSwC6Mu.js} +45 -15
- package/dist/chunks/{LpCalendar-B7Ko5RdR.js → LpCalendar-DrA2McTU.js} +1 -1
- package/dist/chunks/{LpCard-BhI1N_vL.js → LpCard-C2IvucmX.js} +1 -1
- package/dist/chunks/{LpCheckbox-CVccKYaH.js → LpCheckbox-Bkj13CbW.js} +8 -4
- package/dist/chunks/{LpCodeBlock-Bo0B4TFR.js → LpCodeBlock-ca7ANFyW.js} +49 -17
- package/dist/chunks/{LpColorPicker-BlXea7LM.js → LpColorPicker-zz4VGkG4.js} +75 -26
- package/dist/chunks/{LpConfirmDialog-Q-bxff8z.js → LpConfirmDialog-DCw5jR1t.js} +59 -17
- package/dist/chunks/LpConfirmHost-CbywMpMP.js +49 -0
- package/dist/chunks/LpContextMenu-BqkAYa9X.js +69 -0
- package/dist/chunks/LpDatePicker-DuusgT69.js +195 -0
- package/dist/chunks/LpDateRangePicker-DHeuznfC.js +208 -0
- package/dist/chunks/{LpDisclosure-ChQYmjlR.js → LpDisclosure-Cc23-JOT.js} +1 -1
- package/dist/chunks/{LpDrawer-BZ6k3hvo.js → LpDrawer-Dt4aB4Fr.js} +65 -28
- package/dist/chunks/{LpDropdownMenu-DJpoqRCb.js → LpDropdownMenu-DdJGQzPn.js} +2 -1
- package/dist/chunks/{LpEmptyState-Dsdqz1Wj.js → LpEmptyState-BJbZXC8D.js} +1 -1
- package/dist/chunks/LpFieldNotice-wtieLUTj.js +64 -0
- package/dist/chunks/{LpFileTree-_5vFBgaK.js → LpFileTree-CNurOvkV.js} +25 -10
- package/dist/chunks/{LpFileTreeNode-BdcIYKIE.js → LpFileTreeNode-D_qRRdsH.js} +3 -3
- package/dist/chunks/LpFormField-CtVYj6tO.js +101 -0
- package/dist/chunks/{LpIcon-CCnX5_2j.js → LpIcon-DYtaid0K.js} +20 -6
- package/dist/chunks/{LpInput-9EXWUM9B.js → LpInput-D-YGQbEv.js} +58 -20
- package/dist/chunks/{LpLightbox-2sYVMY-S.js → LpLightbox-DSDahF23.js} +148 -61
- package/dist/chunks/{LpLink-DCND-zyu.js → LpLink-Krkjhe_y.js} +15 -6
- package/dist/chunks/{LpLogViewer-CaRy5MeS.js → LpLogViewer-KypbgOyo.js} +300 -72
- package/dist/chunks/{LpMapPicker-ul4oYno6.js → LpMapPicker-Cc84LaM3.js} +39 -14
- package/dist/chunks/{LpMediaGallery-FF-NquIo.js → LpMediaGallery-YKr-cQPN.js} +7 -4
- package/dist/chunks/{LpModal-Bt0pQCI_.js → LpModal-DMMDQHAu.js} +52 -29
- package/dist/chunks/{LpModalNav-YaifHrXC.js → LpModalNav-BVPDyIup.js} +10 -7
- package/dist/chunks/{LpNotificationBell-DyGGsMAM.js → LpNotificationBell-CCwyJP5C.js} +79 -33
- package/dist/chunks/{LpNumberField-CWuX08iX.js → LpNumberField-B77O-z28.js} +21 -8
- package/dist/chunks/{LpNumberFlow-amWYaeuA.js → LpNumberFlow-z4WPZcZu.js} +22 -12
- package/dist/chunks/{LpOtpInput-y2v-pmiN.js → LpOtpInput-CziPF3Oq.js} +37 -8
- package/dist/chunks/{LpPagination-5FxjmmB5.js → LpPagination-BcDlo3r_.js} +31 -20
- package/dist/chunks/{LpPasswordInput--sjYCkLS.js → LpPasswordInput-eKzQhbQP.js} +11 -8
- package/dist/chunks/LpPhoneInput-BCbrrhgE.js +336 -0
- package/dist/chunks/{LpPie-D6OnzwlJ.js → LpPie-BEJ2SfI6.js} +84 -28
- package/dist/chunks/{LpPopover-8268UmlC.js → LpPopover-DCKeqiVn.js} +5 -2
- package/dist/chunks/{LpProgress-Btq5W4Ut.js → LpProgress-CBU1iI69.js} +5 -4
- package/dist/chunks/{LpRadioGroup-xPIuVDO_.js → LpRadioGroup-DmEW0l78.js} +9 -2
- package/dist/chunks/LpRangeCalendar-DZuaRV0W.js +331 -0
- package/dist/chunks/{LpRollingText-CM5gkSeF.js → LpRollingText-DB7upf-5.js} +1 -1
- package/dist/chunks/{LpScrollArea-D8xyKXcF.js → LpScrollArea-Bry1fdOM.js} +14 -2
- package/dist/chunks/{LpSection-aM6J_u51.js → LpSection-tKEH0jYf.js} +1 -1
- package/dist/chunks/{LpSegmented-fV0Sk92p.js → LpSegmented-C09EEam2.js} +8 -4
- package/dist/chunks/{LpSelect-ANIVtrpM.js → LpSelect-DNIL6MB9.js} +50 -31
- package/dist/chunks/{LpSidebar-ClBUwoEz.js → LpSidebar-CQNB0-yU.js} +30 -22
- package/dist/chunks/{LpSidebarNav-llOcs_Fn.js → LpSidebarNav-kx-LdqNU.js} +16 -11
- package/dist/chunks/{LpSkeleton-CTI-vBgW.js → LpSkeleton-BB6XIV-w.js} +1 -1
- package/dist/chunks/{LpSlider-BwNIBkAK.js → LpSlider-Cuzmrd7p.js} +7 -2
- package/dist/chunks/{LpSparkline-C6xQ2dwv.js → LpSparkline-CB80N8SJ.js} +11 -4
- package/dist/chunks/{LpStat-CQaW8R--.js → LpStat-B-7udBRP.js} +2 -2
- package/dist/chunks/{LpStepper-Bk-XaQYU.js → LpStepper-C7XiVKZj.js} +34 -19
- package/dist/chunks/{LpSwitch-Blizvqyt.js → LpSwitch-OrcOJX9m.js} +41 -27
- package/dist/chunks/LpTableFilter-BV8PpLM9.js +158 -0
- package/dist/chunks/{LpTableOfContents-CjvxPMpU.js → LpTableOfContents-BUcAfGPQ.js} +36 -41
- package/dist/chunks/{LpTabs-Cefe_lys.js → LpTabs-29iW1XOx.js} +20 -6
- package/dist/chunks/LpTagsInput-D1SuqbhB.js +300 -0
- package/dist/chunks/LpTextarea-uuScWo6-.js +77 -0
- package/dist/chunks/LpThemeProvider-Be4r2TQX.js +35 -0
- package/dist/chunks/LpThemeSwitcher-B4aVPbNC.js +166 -0
- package/dist/chunks/{LpTilt-DuyKbpkA.js → LpTilt-B7KHX1zH.js} +2 -2
- package/dist/chunks/{LpTimeField-K6nAGboX.js → LpTimeField-Cqe7fXnh.js} +14 -8
- package/dist/chunks/{LpToaster-gDB1EaU3.js → LpToaster-DpJvoCOh.js} +94 -31
- package/dist/chunks/{LpTooltip-hCLPAqMG.js → LpTooltip-CXVKcOXT.js} +14 -6
- package/dist/chunks/LpTooltipProvider-CftjV7Xc.js +25 -0
- package/dist/chunks/{LpTopologyCanvas-Cm1L39uL.js → LpTopologyCanvas-6ozNrQKh.js} +8 -2
- package/dist/chunks/{LpUptimeBar-DvAMno0S.js → LpUptimeBar-ugcv25xj.js} +44 -15
- package/dist/chunks/icons-CkA0njzm.js +43 -0
- package/dist/chunks/{LpThemeSwitcher-Cue-myST.js → useTheme-DJm1JSsY.js} +215 -260
- package/dist/component-names.d.ts +1 -1
- package/dist/components/ContextMenuItems.vue.d.ts +8 -0
- package/dist/components/ContextMenuItems.vue.js +4 -0
- package/dist/components/LayoutCanvas.vue.js +1 -1
- package/dist/components/LayoutNode.vue.d.ts +4 -0
- package/dist/components/LayoutNode.vue.js +1 -1
- package/dist/components/LpActionBar.vue.d.ts +3 -0
- package/dist/components/LpActionBar.vue.js +1 -1
- package/dist/components/LpAddressInput.vue.d.ts +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAlert.vue.d.ts +9 -0
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.d.ts +10 -0
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAutocomplete.vue.d.ts +31 -6
- package/dist/components/LpAutocomplete.vue.js +1 -1
- package/dist/components/LpAvatar.vue.d.ts +3 -3
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpBadge.vue.d.ts +2 -2
- package/dist/components/LpBreadcrumbs.vue.d.ts +13 -9
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpButton.vue.d.ts +35 -98
- package/dist/components/LpButton.vue.js +1 -1
- package/dist/components/LpCalendar.vue.js +1 -1
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpChart.vue.d.ts +47 -3
- package/dist/components/LpChart.vue.js +377 -97
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.d.ts +2 -0
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.d.ts +2 -2
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.d.ts +14 -3
- package/dist/components/LpCommandPalette.vue.js +142 -77
- package/dist/components/LpConfirmDialog.vue.d.ts +15 -3
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.d.ts +9 -0
- package/dist/components/LpConfirmHost.vue.js +4 -0
- package/dist/components/LpContextMenu.vue.d.ts +3 -5
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpDatePicker.vue.d.ts +24 -6
- package/dist/components/LpDatePicker.vue.js +1 -1
- package/dist/components/LpDateRangePicker.vue.d.ts +60 -0
- package/dist/components/LpDateRangePicker.vue.js +4 -0
- package/dist/components/LpDisclosure.vue.js +1 -1
- package/dist/components/LpDrawer.vue.d.ts +10 -0
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropdownMenu.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +23 -7
- package/dist/components/LpEmptyState.vue.js +1 -1
- package/dist/components/LpFieldNotice.vue.d.ts +8 -0
- package/dist/components/LpFieldNotice.vue.js +4 -0
- package/dist/components/LpFileTree.vue.d.ts +11 -2
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.d.ts +13 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpIcon.vue.d.ts +0 -1
- package/dist/components/LpIcon.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.js +93 -58
- package/dist/components/LpInput.vue.d.ts +22 -3
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpLightbox.vue.d.ts +17 -0
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLink.vue.d.ts +11 -11
- package/dist/components/LpLink.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.d.ts +72 -3
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.d.ts +4 -4
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.d.ts +16 -6
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.d.ts +0 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.d.ts +11 -2
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNumberField.vue.d.ts +2 -0
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpNumberFlow.vue.js +1 -1
- package/dist/components/LpOtpInput.vue.js +1 -1
- package/dist/components/LpPagination.vue.d.ts +2 -0
- package/dist/components/LpPagination.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.d.ts +13 -0
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpPie.vue.d.ts +21 -2
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpPopover.vue.d.ts +2 -0
- package/dist/components/LpPopover.vue.js +1 -1
- package/dist/components/LpProgress.vue.d.ts +1 -1
- package/dist/components/LpProgress.vue.js +1 -1
- package/dist/components/LpRadioGroup.vue.js +1 -1
- package/dist/components/LpRangeCalendar.vue.d.ts +51 -0
- package/dist/components/LpRangeCalendar.vue.js +4 -0
- package/dist/components/LpRollingText.vue.d.ts +1 -1
- package/dist/components/LpRollingText.vue.js +1 -1
- package/dist/components/LpScrollArea.vue.d.ts +2 -2
- package/dist/components/LpScrollArea.vue.js +1 -1
- package/dist/components/LpSection.vue.d.ts +1 -1
- package/dist/components/LpSection.vue.js +1 -1
- package/dist/components/LpSegmented.vue.d.ts +5 -0
- package/dist/components/LpSegmented.vue.js +1 -1
- package/dist/components/LpSelect.vue.d.ts +1 -0
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.d.ts +7 -1
- package/dist/components/LpShortcutsDialog.vue.js +60 -15
- package/dist/components/LpSidebar.vue.d.ts +6 -2
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSkeleton.vue.js +1 -1
- package/dist/components/LpSlider.vue.js +1 -1
- package/dist/components/LpSparkline.vue.d.ts +1 -0
- package/dist/components/LpSparkline.vue.js +1 -1
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpStepper.vue.js +1 -1
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTable.vue.d.ts +107 -3
- package/dist/components/LpTable.vue.js +540 -128
- package/dist/components/LpTableFilter.vue.d.ts +31 -0
- package/dist/components/LpTableFilter.vue.js +4 -0
- package/dist/components/LpTableOfContents.vue.d.ts +4 -2
- package/dist/components/LpTableOfContents.vue.js +1 -1
- package/dist/components/LpTabs.vue.d.ts +2 -0
- package/dist/components/LpTabs.vue.js +1 -1
- package/dist/components/LpTagsInput.vue.d.ts +77 -0
- package/dist/components/LpTagsInput.vue.js +4 -0
- package/dist/components/LpTextarea.vue.d.ts +19 -6
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpThemeProvider.vue.d.ts +22 -0
- package/dist/components/LpThemeProvider.vue.js +4 -0
- package/dist/components/LpThemeSwitcher.vue.d.ts +15 -2
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpTilt.vue.js +1 -1
- package/dist/components/LpTimeField.vue.js +1 -1
- package/dist/components/LpToaster.vue.d.ts +6 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTooltip.vue.d.ts +1 -2
- package/dist/components/LpTooltip.vue.js +1 -1
- package/dist/components/LpTooltipProvider.vue.d.ts +22 -0
- package/dist/components/LpTooltipProvider.vue.js +4 -0
- package/dist/components/LpTopologyCanvas.vue.js +1 -1
- package/dist/components/LpUptimeBar.vue.d.ts +4 -0
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/chart.d.ts +32 -1
- package/dist/components/chart.js +42 -6
- package/dist/components/codeHighlight.d.ts +6 -0
- package/dist/components/codeHighlight.js +92 -20
- package/dist/components/color.d.ts +1 -1
- package/dist/components/color.js +20 -9
- package/dist/components/commandSearch.js +3 -0
- package/dist/components/confirm.d.ts +25 -0
- package/dist/components/confirm.js +26 -0
- package/dist/components/countries.d.ts +6 -0
- package/dist/components/countries.js +7 -0
- package/dist/components/dateRange.d.ts +43 -0
- package/dist/components/dateRange.js +76 -0
- package/dist/components/exportData.d.ts +58 -0
- package/dist/components/exportData.js +165 -0
- package/dist/components/fileTree.js +16 -7
- package/dist/components/imageCrop.d.ts +42 -0
- package/dist/components/imageCrop.js +47 -0
- package/dist/components/link.d.ts +12 -0
- package/dist/components/link.js +19 -0
- package/dist/components/logSearch.d.ts +18 -0
- package/dist/components/logSearch.js +36 -0
- package/dist/components/modalDepth.d.ts +18 -2
- package/dist/components/modalDepth.js +17 -5
- package/dist/components/otp.d.ts +5 -0
- package/dist/components/otp.js +10 -0
- package/dist/components/phone.d.ts +41 -0
- package/dist/components/phone.js +80 -0
- package/dist/components/sidebar.d.ts +7 -1
- package/dist/components/tableFilter.d.ts +36 -0
- package/dist/components/tableFilter.js +84 -0
- package/dist/components/tableSort.d.ts +8 -0
- package/dist/components/tableSort.js +31 -0
- package/dist/components/tags.d.ts +20 -0
- package/dist/components/tags.js +37 -0
- package/dist/composables/useField.d.ts +38 -0
- package/dist/composables/useField.js +45 -0
- package/dist/composables/useFieldNotice.d.ts +17 -0
- package/dist/composables/useFieldNotice.js +28 -0
- package/dist/composables/useForm.d.ts +53 -0
- package/dist/composables/useForm.js +207 -0
- package/dist/composables/useFormDraft.d.ts +10 -3
- package/dist/composables/useFormDraft.js +9 -14
- package/dist/composables/useHotkeys.d.ts +81 -5
- package/dist/composables/useHotkeys.js +223 -25
- package/dist/composables/useInputFilter.d.ts +17 -0
- package/dist/composables/useInputFilter.js +47 -10
- package/dist/composables/useInputMask.d.ts +59 -0
- package/dist/composables/useInputMask.js +170 -0
- package/dist/composables/useLpConfig.d.ts +24 -0
- package/dist/composables/useLpConfig.js +44 -0
- package/dist/composables/usePaintSelect.d.ts +22 -0
- package/dist/composables/usePaintSelect.js +169 -0
- package/dist/composables/useRovingFocus.js +7 -0
- package/dist/composables/useShift.js +7 -2
- package/dist/composables/useTilt.d.ts +2 -2
- package/dist/composables/useTilt.js +5 -6
- package/dist/composables/useToast.d.ts +20 -0
- package/dist/composables/useToast.js +28 -4
- package/dist/composables/useZoomPan.d.ts +3 -3
- package/dist/composables/useZoomPan.js +4 -4
- package/dist/icons-all.d.ts +1 -0
- package/dist/icons-all.js +3 -0
- package/dist/icons.d.ts +14 -1
- package/dist/index.d.ts +60 -4
- package/dist/index.js +245 -141
- package/dist/kit-icons.d.ts +2 -0
- package/dist/layout/tree.d.ts +2 -0
- package/dist/layout/tree.js +16 -1
- package/dist/layout/useLayout.d.ts +15 -0
- package/dist/layout/useLayout.js +41 -14
- package/dist/theme/backdrop.d.ts +12 -0
- package/dist/theme/presets.d.ts +0 -2
- package/dist/theme/useTheme.d.ts +32 -9
- package/package.json +18 -8
- package/src/component-names.ts +9 -7
- package/src/components/ContextMenuItems.vue +88 -0
- package/src/components/LayoutCanvas.vue +26 -6
- package/src/components/LayoutNode.vue +30 -4
- package/src/components/LpActionBar.vue +31 -8
- package/src/components/LpAddressInput.vue +57 -41
- package/src/components/LpAlert.vue +16 -3
- package/src/components/LpAppShell.vue +45 -12
- package/src/components/LpAutocomplete.vue +47 -10
- package/src/components/LpAvatar.vue +20 -6
- package/src/components/LpBreadcrumbs.vue +65 -41
- package/src/components/LpButton.vue +60 -14
- package/src/components/LpChart.vue +351 -28
- package/src/components/LpCheckbox.vue +7 -3
- package/src/components/LpCodeBlock.vue +50 -14
- package/src/components/LpColorPicker.vue +73 -10
- package/src/components/LpCommandPalette.vue +115 -20
- package/src/components/LpConfirmDialog.vue +68 -17
- package/src/components/LpConfirmHost.vue +59 -0
- package/src/components/LpContextMenu.vue +15 -116
- package/src/components/LpDatePicker.vue +104 -68
- package/src/components/LpDateRangePicker.vue +224 -0
- package/src/components/LpDrawer.vue +56 -19
- package/src/components/LpDropdownMenu.vue +1 -0
- package/src/components/LpDropzone.vue +21 -4
- package/src/components/LpFieldNotice.vue +65 -0
- package/src/components/LpFileTree.vue +33 -7
- package/src/components/LpFormField.vue +59 -7
- package/src/components/LpIcon.vue +22 -4
- package/src/components/LpImageEditor.vue +96 -57
- package/src/components/LpInput.vue +62 -11
- package/src/components/LpLightbox.vue +140 -29
- package/src/components/LpLink.vue +24 -13
- package/src/components/LpLogViewer.vue +311 -39
- package/src/components/LpMapPicker.vue +36 -13
- package/src/components/LpMediaGallery.vue +8 -2
- package/src/components/LpModal.vue +54 -28
- package/src/components/LpModalNav.vue +5 -2
- package/src/components/LpNotificationBell.vue +77 -23
- package/src/components/LpNumberField.vue +21 -6
- package/src/components/LpNumberFlow.vue +26 -10
- package/src/components/LpOtpInput.vue +43 -8
- package/src/components/LpPagination.vue +23 -7
- package/src/components/LpPasswordInput.vue +4 -1
- package/src/components/LpPhoneInput.vue +224 -39
- package/src/components/LpPie.vue +102 -20
- package/src/components/LpPopover.vue +4 -0
- package/src/components/LpProgress.vue +5 -3
- package/src/components/LpRadioGroup.vue +9 -2
- package/src/components/LpRangeCalendar.vue +365 -0
- package/src/components/LpRollingText.vue +3 -0
- package/src/components/LpScrollArea.vue +22 -2
- package/src/components/LpSegmented.vue +12 -2
- package/src/components/LpSelect.vue +0 -0
- package/src/components/LpShortcutsDialog.vue +83 -9
- package/src/components/LpSidebar.vue +14 -9
- package/src/components/LpSidebarNav.vue +17 -5
- package/src/components/LpSkeleton.vue +4 -1
- package/src/components/LpSlider.vue +7 -1
- package/src/components/LpSparkline.vue +11 -3
- package/src/components/LpStepper.vue +23 -10
- package/src/components/LpSwitch.vue +31 -8
- package/src/components/LpTable.vue +668 -90
- package/src/components/LpTableFilter.vue +175 -0
- package/src/components/LpTableOfContents.vue +50 -32
- package/src/components/LpTabs.vue +23 -6
- package/src/components/LpTagsInput.vue +364 -0
- package/src/components/LpTextarea.vue +44 -6
- package/src/components/LpThemeProvider.vue +41 -0
- package/src/components/LpThemeSwitcher.vue +76 -33
- package/src/components/LpTilt.vue +2 -2
- package/src/components/LpTimeField.vue +14 -3
- package/src/components/LpToaster.vue +115 -27
- package/src/components/LpTooltip.vue +29 -5
- package/src/components/LpTooltipProvider.vue +24 -0
- package/src/components/LpTopologyCanvas.vue +19 -2
- package/src/components/LpUptimeBar.vue +46 -8
- package/src/components/chart.ts +82 -8
- package/src/components/codeHighlight.ts +111 -15
- package/src/components/color.ts +30 -9
- package/src/components/commandSearch.ts +6 -0
- package/src/components/confirm.ts +58 -0
- package/src/components/countries.ts +12 -0
- package/src/components/dateRange.ts +134 -0
- package/src/components/exportData.ts +228 -0
- package/src/components/fileTree.ts +19 -7
- package/src/components/imageCrop.ts +107 -0
- package/src/components/link.ts +34 -0
- package/src/components/logSearch.ts +46 -0
- package/src/components/modalDepth.ts +48 -6
- package/src/components/otp.ts +16 -0
- package/src/components/phone.ts +140 -0
- package/src/components/sidebar.ts +7 -1
- package/src/components/tableFilter.ts +122 -0
- package/src/components/tableSort.ts +37 -0
- package/src/components/tags.ts +62 -0
- package/src/composables/useField.ts +83 -0
- package/src/composables/useFieldNotice.ts +59 -0
- package/src/composables/useForm.ts +314 -0
- package/src/composables/useFormDraft.ts +25 -20
- package/src/composables/useHotkeys.ts +355 -28
- package/src/composables/useInputFilter.ts +77 -14
- package/src/composables/useInputMask.ts +254 -0
- package/src/composables/useLpConfig.ts +87 -0
- package/src/composables/usePaintSelect.ts +243 -0
- package/src/composables/useRovingFocus.ts +11 -0
- package/src/composables/useShift.ts +13 -2
- package/src/composables/useTilt.ts +5 -6
- package/src/composables/useToast.ts +56 -4
- package/src/composables/useZoomPan.ts +6 -6
- package/src/iconSubset.d.mts +10 -0
- package/src/iconSubset.mjs +51 -0
- package/src/icons-all.ts +10 -0
- package/src/icons.ts +59 -8
- package/src/index.ts +73 -4
- package/src/kit-icons.ts +5 -0
- package/src/layout/tree.ts +30 -0
- package/src/layout/useLayout.ts +68 -18
- package/src/nuxt.ts +87 -17
- package/src/runtime/config.plugin.ts +14 -0
- package/src/runtime/theme.plugin.ts +43 -23
- package/src/theme/backdrop.ts +69 -0
- package/src/theme/presets.ts +6 -64
- package/src/theme/useTheme.ts +206 -100
- package/src/tokens/tokens.css +46 -0
- package/dist/chunks/LpBreadcrumbs-p4jHe_V-.js +0 -62
- package/dist/chunks/LpContextMenu-CwW1QXe_.js +0 -217
- package/dist/chunks/LpDatePicker-CwOToxGq.js +0 -164
- package/dist/chunks/LpFormField-CazBc2-a.js +0 -62
- package/dist/chunks/LpPhoneInput-BDSKVl_z.js +0 -209
- package/dist/chunks/LpTextarea-t7F6gv8E.js +0 -47
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, onMounted, onBeforeUnmount, watch, shallowRef, openBlock, createElementBlock, mergeProps, unref, createElementVNode, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeClass, normalizeStyle, createVNode, withCtx, withDirectives, vShow, createBlock, createTextVNode } from "vue";
|
|
2
2
|
import { Motion } from "motion-v";
|
|
3
|
+
import { useLabels } from "../composables/useLpConfig.js";
|
|
3
4
|
import { prefersReducedMotion, easeTravel } from "../composables/easing.js";
|
|
4
5
|
import { usePillTransition } from "../composables/usePillTransition.js";
|
|
5
6
|
import { useReveal } from "../composables/useReveal.js";
|
|
6
|
-
import { normalise, pointCount, resolveLabels, extent, axisTicks,
|
|
7
|
-
import { _ as _sfc_main$1 } from "../chunks/LpContextMenu-
|
|
8
|
-
import { _ as _sfc_main$2 } from "../chunks/LpIcon-
|
|
7
|
+
import { normalise, pointCount, resolveLabels, extent, axisTicks, plotHeight, plotWidth, xAt, yAt, areaPath, linePath, barPath, markerIndex, chartSummary, niceScale, nearestIndex, formatTick } from "./chart.js";
|
|
8
|
+
import { _ as _sfc_main$1 } from "../chunks/LpContextMenu-BqkAYa9X.js";
|
|
9
|
+
import { _ as _sfc_main$2 } from "../chunks/LpIcon-DYtaid0K.js";
|
|
9
10
|
import { _ as _sfc_main$3 } from "../chunks/LpShift-DXNsauQZ.js";
|
|
10
11
|
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
12
|
+
import { toCsv, downloadFile, fileStem, svgToPng, backgroundOf, resolveCssColor } from "./exportData.js";
|
|
11
13
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
12
14
|
import '../assets/LpChart-CzgCGaAA.css';const _hoisted_1 = {
|
|
13
15
|
key: 0,
|
|
@@ -26,44 +28,56 @@ const _hoisted_5 = {
|
|
|
26
28
|
key: 1,
|
|
27
29
|
class: "flex flex-wrap items-center gap-x-4 gap-y-1.5"
|
|
28
30
|
};
|
|
29
|
-
const _hoisted_6 = ["onClick"];
|
|
31
|
+
const _hoisted_6 = ["aria-pressed", "onClick"];
|
|
30
32
|
const _hoisted_7 = { class: "text-muted-strong group-hover:text-ink" };
|
|
31
|
-
const _hoisted_8 =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
title: "Measured on the right axis"
|
|
35
|
-
};
|
|
36
|
-
const _hoisted_9 = {
|
|
33
|
+
const _hoisted_8 = ["title"];
|
|
34
|
+
const _hoisted_9 = ["tabindex", "role", "aria-label"];
|
|
35
|
+
const _hoisted_10 = {
|
|
37
36
|
key: 0,
|
|
38
37
|
class: "flex size-full flex-col items-center justify-center gap-2 rounded-control border border-dashed border-line text-muted"
|
|
39
38
|
};
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const _hoisted_13 = ["stop-color"];
|
|
39
|
+
const _hoisted_11 = { class: "text-xs" };
|
|
40
|
+
const _hoisted_12 = ["width", "height"];
|
|
41
|
+
const _hoisted_13 = ["id"];
|
|
44
42
|
const _hoisted_14 = ["stop-color"];
|
|
45
|
-
const _hoisted_15 = ["
|
|
46
|
-
const _hoisted_16 = ["
|
|
47
|
-
const _hoisted_17 = ["
|
|
48
|
-
const _hoisted_18 =
|
|
49
|
-
const _hoisted_19 =
|
|
50
|
-
const _hoisted_20 = ["
|
|
43
|
+
const _hoisted_15 = ["stop-color"];
|
|
44
|
+
const _hoisted_16 = ["id"];
|
|
45
|
+
const _hoisted_17 = ["x", "height", "width"];
|
|
46
|
+
const _hoisted_18 = ["to"];
|
|
47
|
+
const _hoisted_19 = { key: 0 };
|
|
48
|
+
const _hoisted_20 = ["x1", "x2", "y1", "y2"];
|
|
51
49
|
const _hoisted_21 = ["x", "y"];
|
|
52
|
-
const _hoisted_22 = ["
|
|
53
|
-
const _hoisted_23 = ["
|
|
54
|
-
const _hoisted_24 = ["
|
|
55
|
-
const _hoisted_25 = ["
|
|
56
|
-
const _hoisted_26 = ["
|
|
57
|
-
const _hoisted_27 = ["d", "
|
|
58
|
-
const _hoisted_28 = ["
|
|
59
|
-
const _hoisted_29 =
|
|
60
|
-
const _hoisted_30 = ["
|
|
61
|
-
const _hoisted_31 = ["
|
|
62
|
-
const _hoisted_32 = ["x", "y"];
|
|
63
|
-
const _hoisted_33 =
|
|
64
|
-
const _hoisted_34 =
|
|
65
|
-
const _hoisted_35 = {
|
|
66
|
-
const _hoisted_36 =
|
|
50
|
+
const _hoisted_22 = ["x", "y"];
|
|
51
|
+
const _hoisted_23 = ["x1", "x2", "y1", "y2"];
|
|
52
|
+
const _hoisted_24 = ["x", "y", "width", "height"];
|
|
53
|
+
const _hoisted_25 = ["x", "y", "width", "height", "fill"];
|
|
54
|
+
const _hoisted_26 = ["clip-path"];
|
|
55
|
+
const _hoisted_27 = ["d", "fill", "opacity"];
|
|
56
|
+
const _hoisted_28 = ["d", "fill"];
|
|
57
|
+
const _hoisted_29 = ["d", "stroke", "stroke-dasharray"];
|
|
58
|
+
const _hoisted_30 = ["cx", "cy", "fill"];
|
|
59
|
+
const _hoisted_31 = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray"];
|
|
60
|
+
const _hoisted_32 = ["x", "y", "fill"];
|
|
61
|
+
const _hoisted_33 = ["x1", "x2", "y1", "y2", "stroke"];
|
|
62
|
+
const _hoisted_34 = ["x", "y", "fill"];
|
|
63
|
+
const _hoisted_35 = { key: 3 };
|
|
64
|
+
const _hoisted_36 = ["x1", "x2", "y1", "y2"];
|
|
65
|
+
const _hoisted_37 = ["cx", "cy", "fill"];
|
|
66
|
+
const _hoisted_38 = ["x", "y"];
|
|
67
|
+
const _hoisted_39 = { class: "mb-1 text-[11px] font-medium text-muted-strong" };
|
|
68
|
+
const _hoisted_40 = { class: "flex flex-col gap-1" };
|
|
69
|
+
const _hoisted_41 = { class: "flex items-center gap-1.5 text-muted" };
|
|
70
|
+
const _hoisted_42 = { class: "font-mono tabular-nums text-ink" };
|
|
71
|
+
const _hoisted_43 = {
|
|
72
|
+
class: "sr-only",
|
|
73
|
+
"aria-live": "polite"
|
|
74
|
+
};
|
|
75
|
+
const _hoisted_44 = {
|
|
76
|
+
key: 2,
|
|
77
|
+
class: "sr-only"
|
|
78
|
+
};
|
|
79
|
+
const _hoisted_45 = { key: 0 };
|
|
80
|
+
const _hoisted_46 = { scope: "row" };
|
|
67
81
|
const __default__ = { inheritAttrs: false };
|
|
68
82
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
69
83
|
...__default__,
|
|
@@ -89,20 +103,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
103
|
formatRightValue: {},
|
|
90
104
|
stacked: { type: Boolean },
|
|
91
105
|
animate: { type: Boolean, default: true },
|
|
92
|
-
emptyLabel: {
|
|
106
|
+
emptyLabel: {},
|
|
107
|
+
thresholds: { default: () => [] },
|
|
108
|
+
markers: { default: () => [] },
|
|
109
|
+
ariaLabel: {},
|
|
110
|
+
dataTable: { type: Boolean, default: false },
|
|
111
|
+
text: {},
|
|
93
112
|
menuItems: {}
|
|
94
113
|
},
|
|
95
114
|
emits: ["pointClick", "pointContextMenu"],
|
|
96
|
-
setup(__props, { emit: __emit }) {
|
|
115
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
97
116
|
const props = __props;
|
|
117
|
+
const strings = useLabels(
|
|
118
|
+
"chart",
|
|
119
|
+
{ empty: "No data", rightAxis: "Measured on the right axis", point: "Point", xColumn: "Label" },
|
|
120
|
+
() => props.text
|
|
121
|
+
);
|
|
98
122
|
const emit = __emit;
|
|
99
123
|
const root = ref(null);
|
|
100
124
|
const width = ref(0);
|
|
101
125
|
let ro = null;
|
|
102
126
|
const { el: revealAnchor, revealed } = useReveal({ immediate: () => !props.animate });
|
|
103
|
-
const
|
|
127
|
+
const reduced = ref(false);
|
|
128
|
+
const still = computed(() => !props.animate || reduced.value);
|
|
129
|
+
const drawing = computed(() => !still.value && revealed.value);
|
|
104
130
|
onMounted(() => {
|
|
105
131
|
revealAnchor.value = root.value;
|
|
132
|
+
reduced.value = prefersReducedMotion();
|
|
106
133
|
if (!root.value || typeof ResizeObserver === "undefined") return;
|
|
107
134
|
ro = new ResizeObserver(([entry]) => {
|
|
108
135
|
width.value = entry.contentRect.width;
|
|
@@ -119,31 +146,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
119
146
|
if (gutterFrame) cancelAnimationFrame(gutterFrame);
|
|
120
147
|
});
|
|
121
148
|
const hidden = ref(/* @__PURE__ */ new Set());
|
|
122
|
-
const toggleSeries = (
|
|
149
|
+
const toggleSeries = (id) => {
|
|
123
150
|
const next = new Set(hidden.value);
|
|
124
|
-
if (next.has(
|
|
125
|
-
else next.add(
|
|
151
|
+
if (next.has(id)) next.delete(id);
|
|
152
|
+
else next.add(id);
|
|
126
153
|
if (next.size < props.series.length) hidden.value = next;
|
|
127
154
|
};
|
|
128
|
-
const allSeries = computed(
|
|
129
|
-
|
|
155
|
+
const allSeries = computed(
|
|
156
|
+
() => normalise(props.series).map((s, i) => ({ ...s, id: `${i}:${s.name}` }))
|
|
157
|
+
);
|
|
158
|
+
const visible = computed(() => allSeries.value.filter((s) => !hidden.value.has(s.id)));
|
|
130
159
|
const SETTLE_MS = 260;
|
|
131
160
|
const presence = ref(/* @__PURE__ */ new Map());
|
|
132
161
|
let presenceFrame;
|
|
133
|
-
const presenceOf = (
|
|
162
|
+
const presenceOf = (id) => presence.value.get(id) ?? 1;
|
|
134
163
|
watch(
|
|
135
164
|
// A string, not the Set: `hidden` is replaced wholesale on every toggle, and a
|
|
136
165
|
// watcher handed the object itself compares the new reference to the old one
|
|
137
166
|
// and sees a change it cannot describe — or, with a stale copy in the array,
|
|
138
167
|
// no change at all. The names that are currently off say it exactly.
|
|
139
|
-
() => allSeries.value.map((s) => `${s.
|
|
168
|
+
() => allSeries.value.map((s) => `${s.id}:${hidden.value.has(s.id) ? 0 : 1}`).join(","),
|
|
140
169
|
() => {
|
|
141
|
-
const targets = new Map(allSeries.value.map((s) => [s.
|
|
170
|
+
const targets = new Map(allSeries.value.map((s) => [s.id, hidden.value.has(s.id) ? 0 : 1]));
|
|
142
171
|
if (!props.animate || prefersReducedMotion()) {
|
|
143
172
|
presence.value = targets;
|
|
144
173
|
return;
|
|
145
174
|
}
|
|
146
|
-
const from = new Map(allSeries.value.map((s) => [s.
|
|
175
|
+
const from = new Map(allSeries.value.map((s) => [s.id, presenceOf(s.id)]));
|
|
147
176
|
if ([...targets].every(([name, to]) => from.get(name) === to)) return;
|
|
148
177
|
const start = performance.now();
|
|
149
178
|
if (presenceFrame) cancelAnimationFrame(presenceFrame);
|
|
@@ -196,10 +225,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
196
225
|
const hasRightAxis = computed(
|
|
197
226
|
() => declaredRight.value.length > 0 && declaredLeft.value.length > 0
|
|
198
227
|
);
|
|
228
|
+
const withThresholds = (raw, axis) => {
|
|
229
|
+
let { min, max } = raw;
|
|
230
|
+
for (const t of props.thresholds) {
|
|
231
|
+
if ((t.axis ?? "left") !== axis) continue;
|
|
232
|
+
for (const v of [t.value, t.to]) {
|
|
233
|
+
if (v == null || !Number.isFinite(v)) continue;
|
|
234
|
+
min = Math.min(min, v);
|
|
235
|
+
max = Math.max(max, v);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return { min, max };
|
|
239
|
+
};
|
|
199
240
|
const scaleFor = (members) => {
|
|
200
241
|
const totals = stackTotals.value;
|
|
201
242
|
const raw = totals ? { min: Math.min(0, ...totals.neg), max: Math.max(0, ...totals.pos) } : extent(members, zeroBased.value);
|
|
202
|
-
|
|
243
|
+
const wide = hasData.value ? withThresholds(raw, "left") : raw;
|
|
244
|
+
return niceScale(wide.min, wide.max, props.yTicks);
|
|
203
245
|
};
|
|
204
246
|
const targetScale = computed(
|
|
205
247
|
() => scaleFor(onLeft.value.length ? onLeft.value : declaredLeft.value)
|
|
@@ -231,7 +273,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
231
273
|
const targetRightScale = computed(() => {
|
|
232
274
|
if (!hasRightAxis.value) return null;
|
|
233
275
|
const members = onRight.value.length ? onRight.value : declaredRight.value;
|
|
234
|
-
const raw = extent(members, zeroBased.value);
|
|
276
|
+
const raw = withThresholds(extent(members, zeroBased.value), "right");
|
|
235
277
|
const steps = Math.max(
|
|
236
278
|
1,
|
|
237
279
|
axisTicks(targetScale.value.min, targetScale.value.max, targetScale.value.step).length - 1
|
|
@@ -364,7 +406,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
364
406
|
const lines = computed(
|
|
365
407
|
() => allSeries.value.map((s) => {
|
|
366
408
|
const g = geoOf(s);
|
|
367
|
-
const p = presenceOf(s.
|
|
409
|
+
const p = presenceOf(s.id);
|
|
368
410
|
const base = Math.min(Math.max(0, g.min), g.max);
|
|
369
411
|
const values = p === 1 ? s.values : s.values.map((v) => v == null ? null : base + (v - base) * p);
|
|
370
412
|
return {
|
|
@@ -415,7 +457,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
415
457
|
h = Math.abs(top - base);
|
|
416
458
|
}
|
|
417
459
|
out.push({
|
|
418
|
-
key: `${s.
|
|
460
|
+
key: `${s.id}-${i}`,
|
|
419
461
|
x,
|
|
420
462
|
y,
|
|
421
463
|
w: Math.max(1, slot - (props.stacked ? 0 : 2)),
|
|
@@ -454,6 +496,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
454
496
|
const active = ref(-1);
|
|
455
497
|
const pointer = ref({ x: 0, y: 0 });
|
|
456
498
|
const onMove = (e) => {
|
|
499
|
+
keyboard.value = false;
|
|
457
500
|
const el = e.currentTarget;
|
|
458
501
|
const rect = el.getBoundingClientRect();
|
|
459
502
|
const x = e.clientX - rect.left;
|
|
@@ -470,6 +513,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
470
513
|
originalEvent
|
|
471
514
|
});
|
|
472
515
|
const onClick = (e) => {
|
|
516
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
517
|
+
active.value = nearestIndex(e.clientX - rect.left, geo.value);
|
|
473
518
|
if (active.value < 0) return;
|
|
474
519
|
emit("pointClick", pointEvent(e));
|
|
475
520
|
};
|
|
@@ -493,6 +538,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
493
538
|
const sc = scaleOf(s);
|
|
494
539
|
return {
|
|
495
540
|
color: s.color,
|
|
541
|
+
id: s.id,
|
|
496
542
|
name: s.name,
|
|
497
543
|
value: v,
|
|
498
544
|
y: yAt(v, sc.min, sc.max, box.value)
|
|
@@ -501,6 +547,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
501
547
|
});
|
|
502
548
|
const tooltipRows = computed(
|
|
503
549
|
() => active.value < 0 ? [] : visible.value.map((s) => ({
|
|
550
|
+
id: s.id,
|
|
504
551
|
name: s.name,
|
|
505
552
|
color: s.color,
|
|
506
553
|
text: s.values[active.value] == null ? "—" : fmtSeries(s, s.values[active.value])
|
|
@@ -523,14 +570,150 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
523
570
|
const floatTransition = usePillTransition("float");
|
|
524
571
|
const revealKey = shallowRef(0);
|
|
525
572
|
watch(
|
|
526
|
-
() =>
|
|
573
|
+
() => `${props.type}|${count.value}|${allSeries.value.map((s) => s.id).join(",")}`,
|
|
527
574
|
() => {
|
|
528
575
|
revealKey.value++;
|
|
529
|
-
}
|
|
530
|
-
{ deep: true }
|
|
576
|
+
}
|
|
531
577
|
);
|
|
532
578
|
const clipId = `lp-chart-${Math.random().toString(36).slice(2, 9)}`;
|
|
533
579
|
const gradientId = (name, index) => `${clipId}-g-${index}-${name.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
580
|
+
const thresholdMarks = computed(
|
|
581
|
+
() => props.thresholds.flatMap((t, i) => {
|
|
582
|
+
if (!Number.isFinite(t.value) || width.value <= 0) return [];
|
|
583
|
+
const sc = t.axis === "right" && rightScale.value ? rightScale.value : scale.value;
|
|
584
|
+
const y = yAt(t.value, sc.min, sc.max, box.value);
|
|
585
|
+
const to = t.to != null && Number.isFinite(t.to) ? yAt(t.to, sc.min, sc.max, box.value) : null;
|
|
586
|
+
return [
|
|
587
|
+
{
|
|
588
|
+
key: i,
|
|
589
|
+
y,
|
|
590
|
+
top: to == null ? y : Math.min(y, to),
|
|
591
|
+
height: to == null ? 0 : Math.abs(to - y),
|
|
592
|
+
label: t.label,
|
|
593
|
+
color: t.color ?? "var(--color-line-strong)",
|
|
594
|
+
solid: !!t.solid
|
|
595
|
+
}
|
|
596
|
+
];
|
|
597
|
+
})
|
|
598
|
+
);
|
|
599
|
+
const markerMarks = computed(
|
|
600
|
+
() => props.markers.flatMap((m, i) => {
|
|
601
|
+
const index = markerIndex(m.at, labels.value, count.value);
|
|
602
|
+
if (index < 0 || width.value <= 0) return [];
|
|
603
|
+
return [
|
|
604
|
+
{
|
|
605
|
+
key: i,
|
|
606
|
+
x: xAt(index, count.value, box.value, banded.value),
|
|
607
|
+
label: m.label,
|
|
608
|
+
color: m.color ?? "var(--color-line-strong)"
|
|
609
|
+
}
|
|
610
|
+
];
|
|
611
|
+
})
|
|
612
|
+
);
|
|
613
|
+
const summary = computed(
|
|
614
|
+
() => props.ariaLabel ?? chartSummary(visible.value, labels.value, fmtSeries, props.title)
|
|
615
|
+
);
|
|
616
|
+
const keyboard = ref(false);
|
|
617
|
+
const onKeydown = (e) => {
|
|
618
|
+
if (!count.value || !hasData.value) return;
|
|
619
|
+
const last = count.value - 1;
|
|
620
|
+
let next;
|
|
621
|
+
switch (e.key) {
|
|
622
|
+
case "ArrowRight":
|
|
623
|
+
next = active.value < 0 ? 0 : Math.min(last, active.value + 1);
|
|
624
|
+
break;
|
|
625
|
+
case "ArrowLeft":
|
|
626
|
+
next = active.value < 0 ? last : Math.max(0, active.value - 1);
|
|
627
|
+
break;
|
|
628
|
+
case "Home":
|
|
629
|
+
next = 0;
|
|
630
|
+
break;
|
|
631
|
+
case "End":
|
|
632
|
+
next = last;
|
|
633
|
+
break;
|
|
634
|
+
case "Enter":
|
|
635
|
+
case " ":
|
|
636
|
+
if (active.value < 0) return;
|
|
637
|
+
e.preventDefault();
|
|
638
|
+
emit("pointClick", pointEvent(new MouseEvent("click")));
|
|
639
|
+
return;
|
|
640
|
+
case "Escape":
|
|
641
|
+
active.value = -1;
|
|
642
|
+
return;
|
|
643
|
+
default:
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
e.preventDefault();
|
|
647
|
+
keyboard.value = true;
|
|
648
|
+
active.value = next;
|
|
649
|
+
const first = activePoints.value[0];
|
|
650
|
+
pointer.value = {
|
|
651
|
+
x: activeX.value,
|
|
652
|
+
y: first ? first.y : box.value.top + plotHeight(box.value) / 2
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
const onBlur = () => {
|
|
656
|
+
if (keyboard.value) active.value = -1;
|
|
657
|
+
keyboard.value = false;
|
|
658
|
+
};
|
|
659
|
+
const readout = computed(
|
|
660
|
+
() => keyboard.value && active.value >= 0 ? `${labels.value[active.value] ?? `${strings.value.point} ${active.value + 1}`}: ${tooltipRows.value.map((r) => `${r.name} ${r.text}`).join(", ")}` : ""
|
|
661
|
+
);
|
|
662
|
+
const svgEl = ref(null);
|
|
663
|
+
function exportCsv(options = {}) {
|
|
664
|
+
const rows = labels.value.map((label, i) => ({ label, i }));
|
|
665
|
+
const csv = toCsv(rows, [
|
|
666
|
+
{ key: "label", label: strings.value.xColumn },
|
|
667
|
+
...allSeries.value.map((s) => ({ key: s.id, label: s.name, value: (r) => s.values[r.i] }))
|
|
668
|
+
], options);
|
|
669
|
+
if (options.download !== false) {
|
|
670
|
+
downloadFile(`${fileStem(options.filename ?? props.title, "chart")}.csv`, csv, "text/csv;charset=utf-8");
|
|
671
|
+
}
|
|
672
|
+
return csv;
|
|
673
|
+
}
|
|
674
|
+
async function exportPng(options = {}) {
|
|
675
|
+
const svg = svgEl.value;
|
|
676
|
+
if (!svg || typeof document === "undefined") return null;
|
|
677
|
+
const style = getComputedStyle(root.value ?? svg);
|
|
678
|
+
const font = style.fontFamily;
|
|
679
|
+
const ink = style.getPropertyValue("--color-ink").trim() || style.color;
|
|
680
|
+
const muted = style.getPropertyValue("--color-muted-strong").trim() || style.color;
|
|
681
|
+
const legend = props.showLegend && allSeries.value.length > 1 ? visible.value : [];
|
|
682
|
+
const blob = await svgToPng(svg, {
|
|
683
|
+
scale: options.scale,
|
|
684
|
+
padding: 16,
|
|
685
|
+
background: options.background ?? backgroundOf(root.value),
|
|
686
|
+
header: (ctx) => {
|
|
687
|
+
let y = 0;
|
|
688
|
+
if (props.title) {
|
|
689
|
+
ctx.font = `500 14px ${font}`;
|
|
690
|
+
ctx.fillStyle = ink;
|
|
691
|
+
ctx.textBaseline = "top";
|
|
692
|
+
ctx.fillText(props.title, 0, y);
|
|
693
|
+
y += 22;
|
|
694
|
+
}
|
|
695
|
+
if (legend.length) {
|
|
696
|
+
ctx.font = `12px ${font}`;
|
|
697
|
+
ctx.textBaseline = "middle";
|
|
698
|
+
let x = 0;
|
|
699
|
+
for (const s of legend) {
|
|
700
|
+
ctx.fillStyle = resolveCssColor(s.color, root.value ?? svg);
|
|
701
|
+
ctx.beginPath();
|
|
702
|
+
ctx.arc(x + 4, y + 8, 4, 0, Math.PI * 2);
|
|
703
|
+
ctx.fill();
|
|
704
|
+
ctx.fillStyle = muted;
|
|
705
|
+
ctx.fillText(s.name, x + 14, y + 8);
|
|
706
|
+
x += 14 + ctx.measureText(s.name).width + 16;
|
|
707
|
+
}
|
|
708
|
+
y += 24;
|
|
709
|
+
}
|
|
710
|
+
return y ? y + 8 : 0;
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
if (options.download !== false) downloadFile(`${fileStem(options.filename ?? props.title, "chart")}.png`, blob);
|
|
714
|
+
return blob;
|
|
715
|
+
}
|
|
716
|
+
__expose({ exportCsv, exportPng });
|
|
534
717
|
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
535
718
|
"flex w-full flex-col gap-3"
|
|
536
719
|
);
|
|
@@ -550,17 +733,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
550
733
|
__props.showLegend && allSeries.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
551
734
|
(openBlock(true), createElementBlock(Fragment, null, renderList(allSeries.value, (s) => {
|
|
552
735
|
return openBlock(), createElementBlock("button", {
|
|
553
|
-
key: s.
|
|
736
|
+
key: s.id,
|
|
554
737
|
type: "button",
|
|
555
|
-
class: normalizeClass(["group flex cursor-pointer items-center gap-1.5 rounded-md text-xs outline-none transition-opacity duration-fast focus-visible:ring-2 focus-visible:ring-ring", hidden.value.has(s.
|
|
556
|
-
|
|
738
|
+
class: normalizeClass(["group flex cursor-pointer items-center gap-1.5 rounded-md text-xs outline-none transition-opacity duration-fast focus-visible:ring-2 focus-visible:ring-ring", hidden.value.has(s.id) ? "opacity-40" : ""]),
|
|
739
|
+
"aria-pressed": !hidden.value.has(s.id),
|
|
740
|
+
onClick: ($event) => toggleSeries(s.id)
|
|
557
741
|
}, [
|
|
558
742
|
createElementVNode("span", {
|
|
559
743
|
class: "size-2 shrink-0 rounded-full transition-transform duration-fast group-hover:scale-125",
|
|
560
744
|
style: normalizeStyle({ backgroundColor: s.color })
|
|
561
745
|
}, null, 4),
|
|
562
746
|
createElementVNode("span", _hoisted_7, toDisplayString(s.name), 1),
|
|
563
|
-
hasRightAxis.value && s.axis === "right" ? (openBlock(), createElementBlock("span",
|
|
747
|
+
hasRightAxis.value && s.axis === "right" ? (openBlock(), createElementBlock("span", {
|
|
748
|
+
key: 0,
|
|
749
|
+
class: "text-[10px] text-muted",
|
|
750
|
+
title: unref(strings).rightAxis
|
|
751
|
+
}, " ↗ ", 8, _hoisted_8)) : createCommentVNode("", true)
|
|
564
752
|
], 10, _hoisted_6);
|
|
565
753
|
}), 128))
|
|
566
754
|
])) : createCommentVNode("", true),
|
|
@@ -570,20 +758,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
570
758
|
}, {
|
|
571
759
|
default: withCtx(() => [
|
|
572
760
|
createElementVNode("div", {
|
|
573
|
-
class: "group/plot relative",
|
|
574
|
-
style: normalizeStyle({ height: `${__props.height}px` })
|
|
761
|
+
class: "group/plot relative rounded-control outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
762
|
+
style: normalizeStyle({ height: `${__props.height}px` }),
|
|
763
|
+
tabindex: hasData.value ? 0 : void 0,
|
|
764
|
+
role: hasData.value ? "group" : void 0,
|
|
765
|
+
"aria-roledescription": "chart",
|
|
766
|
+
"aria-label": hasData.value ? summary.value : void 0,
|
|
767
|
+
onKeydown,
|
|
768
|
+
onBlur
|
|
575
769
|
}, [
|
|
576
|
-
!hasData.value ? (openBlock(), createElementBlock("div",
|
|
770
|
+
!hasData.value ? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
577
771
|
createVNode(_sfc_main$2, {
|
|
578
772
|
name: "lucide:chart-no-axes-column",
|
|
579
773
|
size: 18
|
|
580
774
|
}),
|
|
581
|
-
createElementVNode("span",
|
|
775
|
+
createElementVNode("span", _hoisted_11, toDisplayString(__props.emptyLabel ?? unref(strings).empty), 1)
|
|
582
776
|
])) : width.value > 0 ? (openBlock(), createElementBlock("svg", {
|
|
583
777
|
key: 1,
|
|
778
|
+
ref_key: "svgEl",
|
|
779
|
+
ref: svgEl,
|
|
584
780
|
width: width.value,
|
|
585
781
|
height: __props.height,
|
|
586
782
|
class: "overflow-visible touch-none select-none",
|
|
783
|
+
"aria-hidden": "true",
|
|
587
784
|
onPointermove: onMove,
|
|
588
785
|
onPointerleave: onLeave,
|
|
589
786
|
onClick,
|
|
@@ -593,7 +790,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
593
790
|
(openBlock(true), createElementBlock(Fragment, null, renderList(lines.value, (s, i) => {
|
|
594
791
|
return openBlock(), createElementBlock("linearGradient", {
|
|
595
792
|
id: gradientId(s.name, i),
|
|
596
|
-
key: s.
|
|
793
|
+
key: s.id,
|
|
597
794
|
x1: "0",
|
|
598
795
|
y1: "0",
|
|
599
796
|
x2: "0",
|
|
@@ -603,13 +800,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
603
800
|
offset: "0%",
|
|
604
801
|
"stop-color": s.color,
|
|
605
802
|
"stop-opacity": "0.28"
|
|
606
|
-
}, null, 8,
|
|
803
|
+
}, null, 8, _hoisted_14),
|
|
607
804
|
createElementVNode("stop", {
|
|
608
805
|
offset: "100%",
|
|
609
806
|
"stop-color": s.color,
|
|
610
807
|
"stop-opacity": "0.02"
|
|
611
|
-
}, null, 8,
|
|
612
|
-
], 8,
|
|
808
|
+
}, null, 8, _hoisted_15)
|
|
809
|
+
], 8, _hoisted_13);
|
|
613
810
|
}), 128)),
|
|
614
811
|
createElementVNode("clipPath", {
|
|
615
812
|
id: `${clipId}-reveal`
|
|
@@ -619,7 +816,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
619
816
|
x: box.value.left,
|
|
620
817
|
y: 0,
|
|
621
818
|
height: __props.height,
|
|
622
|
-
width:
|
|
819
|
+
width: still.value ? unref(plotWidth)(box.value) : 0
|
|
623
820
|
}, [
|
|
624
821
|
drawing.value ? (openBlock(), createElementBlock("animate", {
|
|
625
822
|
key: 0,
|
|
@@ -631,11 +828,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
631
828
|
calcMode: "spline",
|
|
632
829
|
keySplines: "0.2 0.25 0.5 0.85",
|
|
633
830
|
keyTimes: "0;1"
|
|
634
|
-
}, null, 8,
|
|
635
|
-
], 8,
|
|
636
|
-
], 8,
|
|
831
|
+
}, null, 8, _hoisted_18)) : createCommentVNode("", true)
|
|
832
|
+
], 8, _hoisted_17))
|
|
833
|
+
], 8, _hoisted_16)
|
|
637
834
|
]),
|
|
638
|
-
__props.showGrid || __props.showYAxis ? (openBlock(), createElementBlock("g",
|
|
835
|
+
__props.showGrid || __props.showYAxis ? (openBlock(), createElementBlock("g", _hoisted_19, [
|
|
639
836
|
(openBlock(true), createElementBlock(Fragment, null, renderList(gridLines.value, (g) => {
|
|
640
837
|
return openBlock(), createElementBlock(Fragment, {
|
|
641
838
|
key: g.key
|
|
@@ -648,7 +845,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
648
845
|
y2: g.y,
|
|
649
846
|
stroke: "var(--color-line)",
|
|
650
847
|
"stroke-width": "1"
|
|
651
|
-
}, null, 8,
|
|
848
|
+
}, null, 8, _hoisted_20)) : createCommentVNode("", true),
|
|
652
849
|
__props.showYAxis ? (openBlock(), createElementBlock("text", {
|
|
653
850
|
key: 1,
|
|
654
851
|
x: box.value.left - 8,
|
|
@@ -656,7 +853,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
656
853
|
"text-anchor": "end",
|
|
657
854
|
"dominant-baseline": "middle",
|
|
658
855
|
class: "fill-[var(--color-muted)] text-[10px] tabular-nums"
|
|
659
|
-
}, toDisplayString(g.label), 9,
|
|
856
|
+
}, toDisplayString(g.label), 9, _hoisted_21)) : createCommentVNode("", true),
|
|
660
857
|
__props.showYAxis && g.rightLabel ? (openBlock(), createElementBlock("text", {
|
|
661
858
|
key: 2,
|
|
662
859
|
x: box.value.width - box.value.right + 8,
|
|
@@ -664,7 +861,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
664
861
|
"text-anchor": "start",
|
|
665
862
|
"dominant-baseline": "middle",
|
|
666
863
|
class: "fill-[var(--color-muted)] text-[10px] tabular-nums"
|
|
667
|
-
}, toDisplayString(g.rightLabel), 9,
|
|
864
|
+
}, toDisplayString(g.rightLabel), 9, _hoisted_22)) : createCommentVNode("", true)
|
|
668
865
|
], 64);
|
|
669
866
|
}), 128))
|
|
670
867
|
])) : createCommentVNode("", true),
|
|
@@ -676,7 +873,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
676
873
|
y2: baseY.value,
|
|
677
874
|
stroke: "var(--color-line-strong)",
|
|
678
875
|
"stroke-width": "1"
|
|
679
|
-
}, null, 8,
|
|
876
|
+
}, null, 8, _hoisted_23)) : createCommentVNode("", true),
|
|
680
877
|
active.value >= 0 && banded.value ? (openBlock(), createElementBlock("rect", {
|
|
681
878
|
key: 2,
|
|
682
879
|
x: activeX.value - unref(plotWidth)(box.value) / count.value / 2,
|
|
@@ -685,7 +882,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
685
882
|
height: unref(plotHeight)(box.value),
|
|
686
883
|
fill: "var(--color-surface-soft)",
|
|
687
884
|
opacity: "0.5"
|
|
688
|
-
}, null, 8,
|
|
885
|
+
}, null, 8, _hoisted_24)) : createCommentVNode("", true),
|
|
886
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(thresholdMarks.value.filter((m) => m.height > 0), (t) => {
|
|
887
|
+
return openBlock(), createElementBlock("rect", {
|
|
888
|
+
key: `band-${t.key}`,
|
|
889
|
+
x: box.value.left,
|
|
890
|
+
y: t.top,
|
|
891
|
+
width: unref(plotWidth)(box.value),
|
|
892
|
+
height: t.height,
|
|
893
|
+
fill: t.color,
|
|
894
|
+
opacity: "0.08"
|
|
895
|
+
}, null, 8, _hoisted_25);
|
|
896
|
+
}), 128)),
|
|
689
897
|
createElementVNode("g", {
|
|
690
898
|
"clip-path": `url(#${clipId}-reveal)`
|
|
691
899
|
}, [
|
|
@@ -696,17 +904,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
696
904
|
fill: b.color,
|
|
697
905
|
class: "transition-opacity duration-fast",
|
|
698
906
|
opacity: active.value < 0 || active.value === b.index ? 1 : 0.45
|
|
699
|
-
}, null, 8,
|
|
907
|
+
}, null, 8, _hoisted_27);
|
|
700
908
|
}), 128)),
|
|
701
909
|
(openBlock(true), createElementBlock(Fragment, null, renderList(lines.value, (s, i) => {
|
|
702
910
|
return openBlock(), createElementBlock("g", {
|
|
703
|
-
key: `s-${s.
|
|
911
|
+
key: `s-${s.id}`,
|
|
704
912
|
style: normalizeStyle({ opacity: s.alpha })
|
|
705
913
|
}, [
|
|
706
914
|
withDirectives(createElementVNode("path", {
|
|
707
915
|
d: s.fill,
|
|
708
916
|
fill: `url(#${gradientId(s.name, i)})`
|
|
709
|
-
}, null, 8,
|
|
917
|
+
}, null, 8, _hoisted_28), [
|
|
710
918
|
[vShow, __props.type === "area"]
|
|
711
919
|
]),
|
|
712
920
|
withDirectives(createElementVNode("path", {
|
|
@@ -717,7 +925,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
717
925
|
"stroke-linecap": "round",
|
|
718
926
|
"stroke-linejoin": "round",
|
|
719
927
|
"stroke-dasharray": s.dashed ? "5 4" : void 0
|
|
720
|
-
}, null, 8,
|
|
928
|
+
}, null, 8, _hoisted_29), [
|
|
721
929
|
[vShow, __props.type !== "bar"]
|
|
722
930
|
]),
|
|
723
931
|
__props.type !== "bar" && s.points ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(s.values, (v, j) => {
|
|
@@ -727,14 +935,59 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
727
935
|
cy: v == null ? 0 : unref(yAt)(v, s.scale.min, s.scale.max, box.value),
|
|
728
936
|
r: "2.5",
|
|
729
937
|
fill: s.color
|
|
730
|
-
}, null, 8,
|
|
938
|
+
}, null, 8, _hoisted_30)), [
|
|
731
939
|
[vShow, v != null]
|
|
732
940
|
]);
|
|
733
941
|
}), 128)) : createCommentVNode("", true)
|
|
734
942
|
], 4);
|
|
735
943
|
}), 128))
|
|
736
|
-
], 8,
|
|
737
|
-
|
|
944
|
+
], 8, _hoisted_26),
|
|
945
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(thresholdMarks.value, (t) => {
|
|
946
|
+
return openBlock(), createElementBlock("g", {
|
|
947
|
+
key: `t-${t.key}`
|
|
948
|
+
}, [
|
|
949
|
+
createElementVNode("line", {
|
|
950
|
+
x1: box.value.left,
|
|
951
|
+
x2: box.value.width - box.value.right,
|
|
952
|
+
y1: t.y,
|
|
953
|
+
y2: t.y,
|
|
954
|
+
stroke: t.color,
|
|
955
|
+
"stroke-width": "1",
|
|
956
|
+
"stroke-dasharray": t.solid ? void 0 : "4 3"
|
|
957
|
+
}, null, 8, _hoisted_31),
|
|
958
|
+
t.label ? (openBlock(), createElementBlock("text", {
|
|
959
|
+
key: 0,
|
|
960
|
+
x: box.value.width - box.value.right - 4,
|
|
961
|
+
y: t.top - 4,
|
|
962
|
+
"text-anchor": "end",
|
|
963
|
+
class: "text-[10px]",
|
|
964
|
+
fill: t.color
|
|
965
|
+
}, toDisplayString(t.label), 9, _hoisted_32)) : createCommentVNode("", true)
|
|
966
|
+
]);
|
|
967
|
+
}), 128)),
|
|
968
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(markerMarks.value, (m) => {
|
|
969
|
+
return openBlock(), createElementBlock("g", {
|
|
970
|
+
key: `m-${m.key}`
|
|
971
|
+
}, [
|
|
972
|
+
createElementVNode("line", {
|
|
973
|
+
x1: m.x,
|
|
974
|
+
x2: m.x,
|
|
975
|
+
y1: box.value.top,
|
|
976
|
+
y2: box.value.top + unref(plotHeight)(box.value),
|
|
977
|
+
stroke: m.color,
|
|
978
|
+
"stroke-width": "1",
|
|
979
|
+
"stroke-dasharray": "2 3"
|
|
980
|
+
}, null, 8, _hoisted_33),
|
|
981
|
+
m.label ? (openBlock(), createElementBlock("text", {
|
|
982
|
+
key: 0,
|
|
983
|
+
x: m.x + 4,
|
|
984
|
+
y: box.value.top + 9,
|
|
985
|
+
class: "text-[10px]",
|
|
986
|
+
fill: m.color
|
|
987
|
+
}, toDisplayString(m.label), 9, _hoisted_34)) : createCommentVNode("", true)
|
|
988
|
+
]);
|
|
989
|
+
}), 128)),
|
|
990
|
+
active.value >= 0 && __props.type !== "bar" ? (openBlock(), createElementBlock("g", _hoisted_35, [
|
|
738
991
|
createElementVNode("line", {
|
|
739
992
|
x1: activeX.value,
|
|
740
993
|
x2: activeX.value,
|
|
@@ -743,17 +996,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
743
996
|
stroke: "var(--color-line-strong)",
|
|
744
997
|
"stroke-width": "1",
|
|
745
998
|
"stroke-dasharray": "3 3"
|
|
746
|
-
}, null, 8,
|
|
999
|
+
}, null, 8, _hoisted_36),
|
|
747
1000
|
(openBlock(true), createElementBlock(Fragment, null, renderList(activePoints.value, (p) => {
|
|
748
1001
|
return openBlock(), createElementBlock("circle", {
|
|
749
|
-
key: p.
|
|
1002
|
+
key: p.id,
|
|
750
1003
|
cx: activeX.value,
|
|
751
1004
|
cy: p.y,
|
|
752
1005
|
r: "4",
|
|
753
1006
|
fill: p.color,
|
|
754
1007
|
stroke: "var(--color-surface)",
|
|
755
1008
|
"stroke-width": "2"
|
|
756
|
-
}, null, 8,
|
|
1009
|
+
}, null, 8, _hoisted_37);
|
|
757
1010
|
}), 128))
|
|
758
1011
|
])) : createCommentVNode("", true),
|
|
759
1012
|
(openBlock(true), createElementBlock(Fragment, null, renderList(xLabels.value, (l) => {
|
|
@@ -763,11 +1016,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
763
1016
|
y: __props.height - 8,
|
|
764
1017
|
"text-anchor": "middle",
|
|
765
1018
|
class: normalizeClass(["fill-[var(--color-muted)] text-[10px]", active.value === l.i ? "fill-[var(--color-ink)]" : ""])
|
|
766
|
-
}, toDisplayString(l.label), 11,
|
|
1019
|
+
}, toDisplayString(l.label), 11, _hoisted_38)), [
|
|
767
1020
|
[vShow, __props.showXAxis]
|
|
768
1021
|
]);
|
|
769
1022
|
}), 128))
|
|
770
|
-
], 40,
|
|
1023
|
+
], 40, _hoisted_12)) : createCommentVNode("", true),
|
|
771
1024
|
active.value >= 0 && hasData.value ? (openBlock(), createBlock(unref(Motion), {
|
|
772
1025
|
key: 2,
|
|
773
1026
|
as: "div",
|
|
@@ -784,21 +1037,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
784
1037
|
default: withCtx(() => [
|
|
785
1038
|
createVNode(_sfc_main$3, { axis: "both" }, {
|
|
786
1039
|
default: withCtx(() => [
|
|
787
|
-
createElementVNode("div",
|
|
788
|
-
createElementVNode("div",
|
|
1040
|
+
createElementVNode("div", _hoisted_39, toDisplayString(labels.value[active.value]), 1),
|
|
1041
|
+
createElementVNode("div", _hoisted_40, [
|
|
789
1042
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tooltipRows.value, (r) => {
|
|
790
1043
|
return openBlock(), createElementBlock("div", {
|
|
791
|
-
key: r.
|
|
1044
|
+
key: r.id,
|
|
792
1045
|
class: "flex items-center justify-between gap-3 text-xs"
|
|
793
1046
|
}, [
|
|
794
|
-
createElementVNode("span",
|
|
1047
|
+
createElementVNode("span", _hoisted_41, [
|
|
795
1048
|
createElementVNode("span", {
|
|
796
1049
|
class: "size-1.5 shrink-0 rounded-full",
|
|
797
1050
|
style: normalizeStyle({ backgroundColor: r.color })
|
|
798
1051
|
}, null, 4),
|
|
799
1052
|
createTextVNode(" " + toDisplayString(r.name), 1)
|
|
800
1053
|
]),
|
|
801
|
-
createElementVNode("span",
|
|
1054
|
+
createElementVNode("span", _hoisted_42, toDisplayString(r.text), 1)
|
|
802
1055
|
]);
|
|
803
1056
|
}), 128))
|
|
804
1057
|
])
|
|
@@ -807,16 +1060,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
807
1060
|
})
|
|
808
1061
|
]),
|
|
809
1062
|
_: 1
|
|
810
|
-
}, 8, ["animate", "transition"])) : createCommentVNode("", true)
|
|
811
|
-
|
|
1063
|
+
}, 8, ["animate", "transition"])) : createCommentVNode("", true),
|
|
1064
|
+
createElementVNode("span", _hoisted_43, toDisplayString(readout.value), 1)
|
|
1065
|
+
], 44, _hoisted_9)
|
|
812
1066
|
]),
|
|
813
1067
|
_: 1
|
|
814
|
-
}, 8, ["items", "always"])
|
|
1068
|
+
}, 8, ["items", "always"]),
|
|
1069
|
+
__props.dataTable && hasData.value ? (openBlock(), createElementBlock("table", _hoisted_44, [
|
|
1070
|
+
__props.title ? (openBlock(), createElementBlock("caption", _hoisted_45, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
1071
|
+
createElementVNode("thead", null, [
|
|
1072
|
+
createElementVNode("tr", null, [
|
|
1073
|
+
_cache[0] || (_cache[0] = createElementVNode("th", { scope: "col" }, null, -1)),
|
|
1074
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(allSeries.value, (s) => {
|
|
1075
|
+
return openBlock(), createElementBlock("th", {
|
|
1076
|
+
key: s.id,
|
|
1077
|
+
scope: "col"
|
|
1078
|
+
}, toDisplayString(s.name), 1);
|
|
1079
|
+
}), 128))
|
|
1080
|
+
])
|
|
1081
|
+
]),
|
|
1082
|
+
createElementVNode("tbody", null, [
|
|
1083
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(labels.value, (label, i) => {
|
|
1084
|
+
return openBlock(), createElementBlock("tr", { key: i }, [
|
|
1085
|
+
createElementVNode("th", _hoisted_46, toDisplayString(label), 1),
|
|
1086
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(allSeries.value, (s) => {
|
|
1087
|
+
return openBlock(), createElementBlock("td", {
|
|
1088
|
+
key: s.id
|
|
1089
|
+
}, toDisplayString(s.values[i] == null ? "—" : fmtSeries(s, s.values[i])), 1);
|
|
1090
|
+
}), 128))
|
|
1091
|
+
]);
|
|
1092
|
+
}), 128))
|
|
1093
|
+
])
|
|
1094
|
+
])) : createCommentVNode("", true)
|
|
815
1095
|
], 16);
|
|
816
1096
|
};
|
|
817
1097
|
}
|
|
818
1098
|
});
|
|
819
|
-
const LpChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1099
|
+
const LpChart = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1c25e280"]]);
|
|
820
1100
|
export {
|
|
821
1101
|
LpChart as default
|
|
822
1102
|
};
|