@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
package/dist/layout/useLayout.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { shallowRef, computed, ref } from "vue";
|
|
2
|
-
import { makeLayout, countBlocks, serializeLayout, resizeAt, setActiveTab,
|
|
1
|
+
import { shallowRef, computed, ref, watch } from "vue";
|
|
2
|
+
import { makeLayout, countBlocks, serializeLayout, resizeAt, setActiveTab, snapshotLayout, restoreLayout, reorderTab, removeBlock, moveLeaf, deserializeLayout, removeLeaf, addTab, addLeaf } from "./tree.js";
|
|
3
|
+
const controllers = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function layoutController(tree) {
|
|
5
|
+
return controllers.get(tree);
|
|
6
|
+
}
|
|
3
7
|
function useLayout(options) {
|
|
4
8
|
const limit = options.historyLimit ?? 50;
|
|
5
9
|
const layout = shallowRef(makeLayout(options.initial));
|
|
@@ -8,16 +12,36 @@ function useLayout(options) {
|
|
|
8
12
|
const future = ref([]);
|
|
9
13
|
const canUndo = computed(() => past.value.length > 0);
|
|
10
14
|
const canRedo = computed(() => future.value.length > 0);
|
|
11
|
-
const snapshot = () =>
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
mutate();
|
|
15
|
+
const snapshot = () => snapshotLayout(layout.value);
|
|
16
|
+
function push(before) {
|
|
17
|
+
if (before === snapshot()) return;
|
|
15
18
|
past.value.push(before);
|
|
16
19
|
if (past.value.length > limit) past.value.shift();
|
|
17
20
|
future.value = [];
|
|
18
21
|
}
|
|
22
|
+
function record(mutate) {
|
|
23
|
+
const before = snapshot();
|
|
24
|
+
mutate();
|
|
25
|
+
push(before);
|
|
26
|
+
}
|
|
27
|
+
let resizeStart = null;
|
|
28
|
+
const controller = {
|
|
29
|
+
move: (movingId, targetId, side) => record(() => moveLeaf(layout.value, movingId, targetId, side)),
|
|
30
|
+
removeBlock: (leafId, index) => record(() => removeBlock(layout.value, leafId, index)),
|
|
31
|
+
reorderTab: (leafId, from, to) => record(() => reorderTab(layout.value, leafId, from, to)),
|
|
32
|
+
setActive: (leafId, index) => setActiveTab(layout.value, leafId, index),
|
|
33
|
+
resize: (parent, index, delta) => resizeAt(parent, index, delta),
|
|
34
|
+
beginResize: () => {
|
|
35
|
+
resizeStart = snapshot();
|
|
36
|
+
},
|
|
37
|
+
endResize: () => {
|
|
38
|
+
if (resizeStart !== null) push(resizeStart);
|
|
39
|
+
resizeStart = null;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
watch(layout, (tree) => controllers.set(tree, controller), { immediate: true, flush: "sync" });
|
|
19
43
|
function restore(serialized) {
|
|
20
|
-
layout.value =
|
|
44
|
+
layout.value = restoreLayout(serialized);
|
|
21
45
|
}
|
|
22
46
|
return {
|
|
23
47
|
layout,
|
|
@@ -26,15 +50,17 @@ function useLayout(options) {
|
|
|
26
50
|
canRedo,
|
|
27
51
|
add: (block, side) => record(() => addLeaf(layout.value, block, side)),
|
|
28
52
|
addTab: (leafId, block) => record(() => addTab(layout.value, leafId, block)),
|
|
29
|
-
setActive:
|
|
30
|
-
reorderTab:
|
|
31
|
-
removeBlock:
|
|
53
|
+
setActive: controller.setActive,
|
|
54
|
+
reorderTab: controller.reorderTab,
|
|
55
|
+
removeBlock: controller.removeBlock,
|
|
32
56
|
remove: (leafId) => record(() => removeLeaf(layout.value, leafId)),
|
|
33
|
-
move:
|
|
57
|
+
move: controller.move,
|
|
34
58
|
// Resize fires continuously during a divider drag; recording every frame
|
|
35
|
-
// would flood history
|
|
36
|
-
//
|
|
37
|
-
resize:
|
|
59
|
+
// would flood history. The canvas brackets its gestures with
|
|
60
|
+
// beginResize/endResize, which records the whole drag as one step.
|
|
61
|
+
resize: controller.resize,
|
|
62
|
+
beginResize: controller.beginResize,
|
|
63
|
+
endResize: controller.endResize,
|
|
38
64
|
undo: () => {
|
|
39
65
|
const prev = past.value.pop();
|
|
40
66
|
if (prev === void 0) return;
|
|
@@ -57,5 +83,6 @@ function useLayout(options) {
|
|
|
57
83
|
};
|
|
58
84
|
}
|
|
59
85
|
export {
|
|
86
|
+
layoutController,
|
|
60
87
|
useLayout
|
|
61
88
|
};
|
package/dist/theme/backdrop.d.ts
CHANGED
|
@@ -7,3 +7,15 @@ export declare function isBrokenBackdropEngine(nav?: Navigator): boolean;
|
|
|
7
7
|
* and a no-op outside the browser.
|
|
8
8
|
*/
|
|
9
9
|
export declare function detectBackdropFilter(root?: HTMLElement): boolean;
|
|
10
|
+
export declare const GLASS_BACKDROP_ATTR = "data-lp-glass-backdrop";
|
|
11
|
+
/**
|
|
12
|
+
* Give glass panels a wallpaper to frost where backdrop-filter does not work:
|
|
13
|
+
* `setGlassBackdrop("url(/bg.jpg) center / cover no-repeat, #0b0f14")`, the
|
|
14
|
+
* same value the app paints behind itself. `filter` replaces the default blur,
|
|
15
|
+
* e.g. `"none"` for a wallpaper that was blurred ahead of time, which is
|
|
16
|
+
* cheaper on an engine that blurs on the CPU. `null` turns it off.
|
|
17
|
+
*/
|
|
18
|
+
export declare function setGlassBackdrop(background: string | null, options?: {
|
|
19
|
+
filter?: string;
|
|
20
|
+
root?: HTMLElement;
|
|
21
|
+
}): void;
|
package/dist/theme/presets.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { TokenSet } from "./tokens";
|
|
|
2
2
|
export declare const dark: TokenSet;
|
|
3
3
|
export declare const light: TokenSet;
|
|
4
4
|
export declare const lime: TokenSet;
|
|
5
|
-
export declare const leavepulse: TokenSet;
|
|
6
5
|
export declare const rose: TokenSet;
|
|
7
6
|
export declare const amber: TokenSet;
|
|
8
7
|
export declare const violet: TokenSet;
|
|
@@ -11,7 +10,6 @@ export declare const presets: {
|
|
|
11
10
|
readonly dark: TokenSet;
|
|
12
11
|
readonly light: TokenSet;
|
|
13
12
|
readonly lime: TokenSet;
|
|
14
|
-
readonly leavepulse: TokenSet;
|
|
15
13
|
readonly rose: TokenSet;
|
|
16
14
|
readonly amber: TokenSet;
|
|
17
15
|
readonly violet: TokenSet;
|
package/dist/theme/useTheme.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { type ComputedRef, type DeepReadonly, type Ref } from "vue";
|
|
2
2
|
import { type TokenSet } from "./tokens";
|
|
3
|
+
/** A light/dark pair followed by the operating system's colour scheme. */
|
|
4
|
+
export interface SystemThemes {
|
|
5
|
+
light: TokenSet;
|
|
6
|
+
dark: TokenSet;
|
|
7
|
+
}
|
|
8
|
+
/** Whether the OS asks for dark. True where it cannot be asked (server, old engines). */
|
|
9
|
+
export declare function prefersDarkScheme(): boolean;
|
|
10
|
+
/** Every CSS variable a theme sets, in application order. */
|
|
11
|
+
export declare function themeEntries(input: TokenSet): [string, string][];
|
|
3
12
|
export declare function applyTheme(theme: TokenSet, root?: HTMLElement): void;
|
|
4
13
|
/** Point a circular theme reveal expands from (viewport px). */
|
|
5
14
|
export interface RevealOrigin {
|
|
@@ -11,31 +20,45 @@ export declare function serializeTheme(theme: TokenSet): string;
|
|
|
11
20
|
export declare function themeToCssVars(theme: TokenSet): string;
|
|
12
21
|
/** Render a theme as a complete CSS rule (default selector `:root`). */
|
|
13
22
|
export declare function themeToCssRule(theme: TokenSet, selector?: string): string;
|
|
14
|
-
|
|
23
|
+
export declare function normalizeTheme(raw: Partial<TokenSet> & {
|
|
24
|
+
name?: string;
|
|
25
|
+
}): TokenSet;
|
|
26
|
+
/** Parse + validate a theme JSON; throws on a malformed shape. */
|
|
15
27
|
export declare function parseTheme(json: string): TokenSet;
|
|
16
28
|
export declare function bootstrapTheme(fallback: TokenSet): TokenSet;
|
|
17
29
|
export declare function cacheTheme(theme: TokenSet): void;
|
|
30
|
+
/** Persist "follow the OS" with the pair it switches between. */
|
|
31
|
+
export declare function cacheSystemThemes(system: SystemThemes): void;
|
|
18
32
|
export declare const THEME_COOKIE = "lp-theme";
|
|
19
33
|
/**
|
|
20
34
|
* Resolve a theme name (as read from the `lp-theme` cookie) against a set of
|
|
21
35
|
* known themes. Returns `null` when the name is absent or unknown, so the caller
|
|
22
36
|
* can fall back to its own default.
|
|
23
37
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
38
|
+
* Accepts both a raw and an already-decoded value: frameworks differ on whether
|
|
39
|
+
* their cookie helpers decode, and a name containing `%` must not throw.
|
|
40
|
+
* A "follow the OS" cookie resolves to its dark member unless `prefersDark` is
|
|
41
|
+
* false (pass it from the `Sec-CH-Prefers-Color-Scheme` request header).
|
|
26
42
|
*/
|
|
27
|
-
export declare function themeFromCookie(cookieValue: string | null | undefined, themes: readonly TokenSet[]
|
|
43
|
+
export declare function themeFromCookie(cookieValue: string | null | undefined, themes: readonly TokenSet[], options?: {
|
|
44
|
+
prefersDark?: boolean;
|
|
45
|
+
}): TokenSet | null;
|
|
28
46
|
export interface UseTheme {
|
|
29
47
|
/** The active theme, kept in sync by the kit. Null until hydrated (SSR/first
|
|
30
|
-
* paint)
|
|
48
|
+
* paint), reactive, so a switcher binds straight to it. */
|
|
31
49
|
current: DeepReadonly<Ref<TokenSet | null>>;
|
|
32
50
|
/** The active theme's name (""="not yet hydrated"). */
|
|
33
51
|
currentName: ComputedRef<string>;
|
|
34
|
-
/**
|
|
35
|
-
|
|
52
|
+
/** True while the theme follows the OS colour scheme (see setSystem). */
|
|
53
|
+
system: ComputedRef<boolean>;
|
|
54
|
+
/** Set + persist a theme (with the circular reveal). Stops following the OS. */
|
|
36
55
|
setTheme: (theme: TokenSet, origin?: RevealOrigin) => void;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
56
|
+
/**
|
|
57
|
+
* Follow the OS colour scheme, switching between `themes.light` and
|
|
58
|
+
* `themes.dark` as it changes. Persisted like any other choice.
|
|
59
|
+
*/
|
|
60
|
+
setSystem: (themes: SystemThemes, origin?: RevealOrigin) => void;
|
|
61
|
+
/** Seed the fallback (used when nothing is cached) and hydrate now. */
|
|
39
62
|
init: (fallback: TokenSet) => TokenSet;
|
|
40
63
|
apply: (theme: TokenSet) => void;
|
|
41
64
|
applyWithTransition: (theme: TokenSet, origin?: RevealOrigin) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leavepulse/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "LeavePulse token-driven Vue component kit.",
|
|
6
6
|
"repository": {
|
|
@@ -22,16 +22,21 @@
|
|
|
22
22
|
"style": "./src/index.css",
|
|
23
23
|
"import": "./dist/index.js"
|
|
24
24
|
},
|
|
25
|
+
"./icons-all": {
|
|
26
|
+
"types": "./dist/icons-all.d.ts",
|
|
27
|
+
"import": "./dist/icons-all.js"
|
|
28
|
+
},
|
|
25
29
|
"./nuxt": "./src/nuxt.ts",
|
|
26
30
|
"./css": "./src/index.css",
|
|
27
31
|
"./tokens.css": "./src/tokens/tokens.css",
|
|
28
32
|
"./scrollbar.css": "./src/tokens/scrollbar.css",
|
|
29
33
|
"./canvas.css": "./src/canvas.css",
|
|
30
34
|
"./package.json": "./package.json",
|
|
31
|
-
"./dist
|
|
35
|
+
"./dist/*.js": {
|
|
32
36
|
"types": "./dist/*.d.ts",
|
|
33
|
-
"default": "./dist
|
|
34
|
-
}
|
|
37
|
+
"default": "./dist/*.js"
|
|
38
|
+
},
|
|
39
|
+
"./dist/*": "./dist/*"
|
|
35
40
|
},
|
|
36
41
|
"publishConfig": {
|
|
37
42
|
"registry": "https://registry.npmjs.org",
|
|
@@ -40,26 +45,30 @@
|
|
|
40
45
|
"sideEffects": [
|
|
41
46
|
"**/*.css",
|
|
42
47
|
"**/icons.ts",
|
|
43
|
-
"**/icons.
|
|
48
|
+
"**/icons-all.ts",
|
|
49
|
+
"**/icons-all.js",
|
|
50
|
+
"**/chunks/LpIcon-*.js",
|
|
51
|
+
"**/chunks/icons-*.js"
|
|
44
52
|
],
|
|
45
53
|
"scripts": {
|
|
46
54
|
"dev": "vite",
|
|
47
55
|
"gen:names": "node scripts/gen-component-names.mjs",
|
|
48
|
-
"build": "node scripts/gen-component-names.mjs && vue-tsc --noEmit -p tsconfig.build.json && vite build --config vite.lib.config.ts && vue-tsc --declaration --emitDeclarationOnly --noEmit false -p tsconfig.build.json --outDir dist",
|
|
56
|
+
"build": "node scripts/gen-component-names.mjs && node scripts/gen-kit-icons.mjs && vue-tsc --noEmit -p tsconfig.build.json && vite build --config vite.lib.config.ts && vue-tsc --declaration --emitDeclarationOnly --noEmit false -p tsconfig.build.json --outDir dist",
|
|
49
57
|
"dev:dist": "vite build --watch --config vite.lib.config.ts",
|
|
50
58
|
"prepublishOnly": "npm run build",
|
|
51
59
|
"typecheck": "vue-tsc --noEmit",
|
|
52
60
|
"test": "bun test",
|
|
53
61
|
"release": "npm version patch -m \"chore: release v%s\" && git push --follow-tags",
|
|
54
62
|
"release:minor": "npm version minor -m \"chore: release v%s\" && git push --follow-tags",
|
|
55
|
-
"release:major": "npm version major -m \"chore: release v%s\" && git push --follow-tags"
|
|
63
|
+
"release:major": "npm version major -m \"chore: release v%s\" && git push --follow-tags",
|
|
64
|
+
"check:pack": "node scripts/check-pack.mjs",
|
|
65
|
+
"gen:icons": "node scripts/gen-kit-icons.mjs"
|
|
56
66
|
},
|
|
57
67
|
"peerDependencies": {
|
|
58
68
|
"@iconify-json/lucide": "^1.2.0",
|
|
59
69
|
"@iconify/vue": "^5.0.0",
|
|
60
70
|
"@internationalized/date": "^3.5.0",
|
|
61
71
|
"@nuxt/kit": "^3.0.0 || ^4.0.0",
|
|
62
|
-
"@vueuse/core": "^12.0.0 || ^13.0.0 || ^14.0.0",
|
|
63
72
|
"motion-v": "^2.2.0",
|
|
64
73
|
"reka-ui": "^2.9.0",
|
|
65
74
|
"tailwind-variants": "^3.0.0",
|
|
@@ -93,6 +102,7 @@
|
|
|
93
102
|
"@vue-flow/controls": "^1.1.3",
|
|
94
103
|
"@vue-flow/core": "^1.48.2",
|
|
95
104
|
"@vue-flow/minimap": "^1.5.4",
|
|
105
|
+
"libphonenumber-js": "^1.12.0",
|
|
96
106
|
"vaul-vue": "^0.4.1"
|
|
97
107
|
}
|
|
98
108
|
}
|
package/src/component-names.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/* AUTO-GENERATED by scripts/gen-component-names.mjs — do not edit.
|
|
2
2
|
* The full list of kit component names, kept in sync with the component files
|
|
3
|
-
* so the Nuxt module (./nuxt) auto-registers every component including new ones. */
|
|
3
|
+
* so the Nuxt module (./nuxt) auto-registers every exported component including new ones. */
|
|
4
4
|
export const COMPONENT_NAMES = [
|
|
5
5
|
"LayoutCanvas",
|
|
6
|
-
"LayoutNode",
|
|
7
6
|
"LpActionBar",
|
|
8
7
|
"LpAddressInput",
|
|
9
8
|
"LpAlert",
|
|
@@ -21,22 +20,23 @@ export const COMPONENT_NAMES = [
|
|
|
21
20
|
"LpColorPicker",
|
|
22
21
|
"LpCommandPalette",
|
|
23
22
|
"LpConfirmDialog",
|
|
23
|
+
"LpConfirmHost",
|
|
24
24
|
"LpContextMenu",
|
|
25
25
|
"LpDatePicker",
|
|
26
|
+
"LpDateRangePicker",
|
|
26
27
|
"LpDisclosure",
|
|
27
28
|
"LpDivider",
|
|
28
29
|
"LpDrawer",
|
|
29
30
|
"LpDropdownMenu",
|
|
30
31
|
"LpDropzone",
|
|
31
32
|
"LpEmptyState",
|
|
33
|
+
"LpFieldNotice",
|
|
32
34
|
"LpFileTree",
|
|
33
|
-
"LpFileTreeNode",
|
|
34
35
|
"LpFormField",
|
|
35
36
|
"LpIcon",
|
|
36
37
|
"LpImageEditor",
|
|
37
38
|
"LpInfraNode",
|
|
38
39
|
"LpInput",
|
|
39
|
-
"LpLaneNode",
|
|
40
40
|
"LpLightbox",
|
|
41
41
|
"LpLink",
|
|
42
42
|
"LpLogViewer",
|
|
@@ -56,6 +56,7 @@ export const COMPONENT_NAMES = [
|
|
|
56
56
|
"LpProgress",
|
|
57
57
|
"LpRadio",
|
|
58
58
|
"LpRadioGroup",
|
|
59
|
+
"LpRangeCalendar",
|
|
59
60
|
"LpRollingText",
|
|
60
61
|
"LpScrollArea",
|
|
61
62
|
"LpSection",
|
|
@@ -65,7 +66,6 @@ export const COMPONENT_NAMES = [
|
|
|
65
66
|
"LpShift",
|
|
66
67
|
"LpShortcutsDialog",
|
|
67
68
|
"LpSidebar",
|
|
68
|
-
"LpSidebarNav",
|
|
69
69
|
"LpSkeleton",
|
|
70
70
|
"LpSlider",
|
|
71
71
|
"LpSparkline",
|
|
@@ -75,13 +75,15 @@ export const COMPONENT_NAMES = [
|
|
|
75
75
|
"LpTable",
|
|
76
76
|
"LpTableOfContents",
|
|
77
77
|
"LpTabs",
|
|
78
|
+
"LpTagsInput",
|
|
78
79
|
"LpTextarea",
|
|
80
|
+
"LpThemeProvider",
|
|
79
81
|
"LpThemeSwitcher",
|
|
80
82
|
"LpTilt",
|
|
81
83
|
"LpTimeField",
|
|
82
84
|
"LpToaster",
|
|
83
85
|
"LpTooltip",
|
|
86
|
+
"LpTooltipProvider",
|
|
84
87
|
"LpTopologyCanvas",
|
|
85
|
-
"LpUptimeBar"
|
|
86
|
-
"LpWaypointEdge"
|
|
88
|
+
"LpUptimeBar"
|
|
87
89
|
] as const
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/*
|
|
3
|
+
* The rows of an LpContextMenu panel, rendering itself for every submenu so
|
|
4
|
+
* `children` nests to any depth. Internal: not exported.
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
ContextMenuCheckboxItem,
|
|
8
|
+
ContextMenuItem,
|
|
9
|
+
ContextMenuPortal,
|
|
10
|
+
ContextMenuSeparator,
|
|
11
|
+
ContextMenuSub,
|
|
12
|
+
ContextMenuSubContent,
|
|
13
|
+
ContextMenuSubTrigger,
|
|
14
|
+
} from "reka-ui"
|
|
15
|
+
import type { ContextMenuItemDef } from "./LpContextMenu.vue"
|
|
16
|
+
import LpIcon from "./LpIcon.vue"
|
|
17
|
+
|
|
18
|
+
defineOptions({ name: "ContextMenuItems" })
|
|
19
|
+
|
|
20
|
+
defineProps<{
|
|
21
|
+
items: ContextMenuItemDef[]
|
|
22
|
+
panel: string
|
|
23
|
+
}>()
|
|
24
|
+
|
|
25
|
+
const ITEM =
|
|
26
|
+
"group/item flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-1.5 text-sm outline-none transition-[background-color,color] duration-[var(--duration-fast)] data-[disabled]:pointer-events-none data-[disabled]:opacity-45 data-[highlighted]:bg-brand-soft"
|
|
27
|
+
const ICON =
|
|
28
|
+
"transition-transform duration-[var(--duration-fast)] ease-[var(--ease-emphasized)] group-data-[highlighted]/item:translate-x-0.5"
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<template v-for="(item, i) in items" :key="i">
|
|
33
|
+
<ContextMenuSeparator v-if="item.separatorBefore" class="my-1 h-px bg-line" />
|
|
34
|
+
|
|
35
|
+
<ContextMenuSub v-if="item.children?.length">
|
|
36
|
+
<ContextMenuSubTrigger
|
|
37
|
+
:class="[ITEM, 'justify-between text-ink data-[highlighted]:text-brand data-[state=open]:bg-brand-soft data-[state=open]:text-brand']"
|
|
38
|
+
:disabled="item.disabled"
|
|
39
|
+
>
|
|
40
|
+
<span class="flex items-center gap-2">
|
|
41
|
+
<LpIcon v-if="item.icon" :name="item.icon" :size="15" :class="ICON" />
|
|
42
|
+
{{ item.label }}
|
|
43
|
+
</span>
|
|
44
|
+
<LpIcon name="lucide:chevron-right" :size="14" class="text-muted" />
|
|
45
|
+
</ContextMenuSubTrigger>
|
|
46
|
+
<ContextMenuPortal>
|
|
47
|
+
<ContextMenuSubContent :collision-padding="8" :class="panel" :side-offset="2" :align-offset="-4">
|
|
48
|
+
<ContextMenuItems :items="item.children" :panel="panel" />
|
|
49
|
+
</ContextMenuSubContent>
|
|
50
|
+
</ContextMenuPortal>
|
|
51
|
+
</ContextMenuSub>
|
|
52
|
+
|
|
53
|
+
<!-- Tick-box item: a real checkbox item, so assistive tech hears its state.
|
|
54
|
+
`@select.prevent` keeps the menu open, since these come in lists where
|
|
55
|
+
several are set in one visit. The tick occupies a fixed slot so
|
|
56
|
+
unticked rows stay aligned with ticked ones. -->
|
|
57
|
+
<ContextMenuCheckboxItem
|
|
58
|
+
v-else-if="item.checked !== undefined"
|
|
59
|
+
:model-value="item.checked"
|
|
60
|
+
:class="[ITEM, 'justify-between text-ink data-[highlighted]:text-brand']"
|
|
61
|
+
:disabled="item.disabled"
|
|
62
|
+
@select.prevent="item.onSelect?.()"
|
|
63
|
+
>
|
|
64
|
+
<span class="flex items-center gap-2">
|
|
65
|
+
<LpIcon
|
|
66
|
+
:name="item.checked ? 'lucide:check' : 'lucide:minus'"
|
|
67
|
+
:size="15"
|
|
68
|
+
:class="[ICON, item.checked ? '' : 'opacity-25']"
|
|
69
|
+
/>
|
|
70
|
+
{{ item.label }}
|
|
71
|
+
</span>
|
|
72
|
+
<kbd v-if="item.shortcut" class="text-xs text-muted">{{ item.shortcut }}</kbd>
|
|
73
|
+
</ContextMenuCheckboxItem>
|
|
74
|
+
|
|
75
|
+
<ContextMenuItem
|
|
76
|
+
v-else
|
|
77
|
+
:class="[ITEM, 'justify-between', item.danger ? 'text-danger data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger' : 'text-ink data-[highlighted]:text-brand']"
|
|
78
|
+
:disabled="item.disabled"
|
|
79
|
+
@select="item.onSelect?.()"
|
|
80
|
+
>
|
|
81
|
+
<span class="flex items-center gap-2">
|
|
82
|
+
<LpIcon v-if="item.icon" :name="item.icon" :size="15" :class="ICON" />
|
|
83
|
+
{{ item.label }}
|
|
84
|
+
</span>
|
|
85
|
+
<kbd v-if="item.shortcut" class="text-xs text-muted">{{ item.shortcut }}</kbd>
|
|
86
|
+
</ContextMenuItem>
|
|
87
|
+
</template>
|
|
88
|
+
</template>
|
|
@@ -22,7 +22,8 @@ import {
|
|
|
22
22
|
type Split,
|
|
23
23
|
} from "../layout/tree"
|
|
24
24
|
import type { BlockRegistry } from "../layout/registry"
|
|
25
|
-
import {
|
|
25
|
+
import { layoutController, type LayoutController } from "../layout/useLayout"
|
|
26
|
+
import { computed, ref } from "vue"
|
|
26
27
|
|
|
27
28
|
const props = defineProps<{
|
|
28
29
|
modelValue: Split
|
|
@@ -42,13 +43,30 @@ defineSlots<{
|
|
|
42
43
|
|
|
43
44
|
const dragId = ref<string | null>(null)
|
|
44
45
|
|
|
46
|
+
// A tree owned by useLayout() is edited through its controller, so every edit
|
|
47
|
+
// lands in undo history; a bare tree is mutated directly as before.
|
|
48
|
+
const edits = computed<LayoutController>(() => {
|
|
49
|
+
const tree = props.modelValue
|
|
50
|
+
return (
|
|
51
|
+
layoutController(tree) ?? {
|
|
52
|
+
move: (movingId, targetId, side) => moveLeaf(tree, movingId, targetId, side),
|
|
53
|
+
removeBlock: (leafId, index) => removeBlock(tree, leafId, index),
|
|
54
|
+
reorderTab: (leafId, from, to) => reorderTab(tree, leafId, from, to),
|
|
55
|
+
setActive: (leafId, index) => setActiveTab(tree, leafId, index),
|
|
56
|
+
resize: (parent, index, delta) => resizeAt(parent, index, delta),
|
|
57
|
+
beginResize: () => {},
|
|
58
|
+
endResize: () => {},
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
})
|
|
62
|
+
|
|
45
63
|
function onDrop(targetId: string, side: Side) {
|
|
46
|
-
if (dragId.value)
|
|
64
|
+
if (dragId.value) edits.value.move(dragId.value, targetId, side)
|
|
47
65
|
dragId.value = null
|
|
48
66
|
}
|
|
49
67
|
|
|
50
68
|
function onResize(parent: Split, index: number, delta: number) {
|
|
51
|
-
|
|
69
|
+
edits.value.resize(parent, index, delta)
|
|
52
70
|
}
|
|
53
71
|
</script>
|
|
54
72
|
|
|
@@ -63,10 +81,12 @@ function onResize(parent: Split, index: number, delta: number) {
|
|
|
63
81
|
@dragstart="(id) => (dragId = id)"
|
|
64
82
|
@dragend="dragId = null"
|
|
65
83
|
@drop="onDrop"
|
|
66
|
-
@set-active="(leafId, i) =>
|
|
67
|
-
@remove-block="(leafId, i) => removeBlock(
|
|
68
|
-
@reorder-tab="(leafId, from, to) => reorderTab(
|
|
84
|
+
@set-active="(leafId, i) => edits.setActive(leafId, i)"
|
|
85
|
+
@remove-block="(leafId, i) => edits.removeBlock(leafId, i)"
|
|
86
|
+
@reorder-tab="(leafId, from, to) => edits.reorderTab(leafId, from, to)"
|
|
69
87
|
@resize="onResize"
|
|
88
|
+
@resize-start="edits.beginResize()"
|
|
89
|
+
@resize-end="edits.endResize()"
|
|
70
90
|
>
|
|
71
91
|
<template #block="slotProps">
|
|
72
92
|
<slot name="block" v-bind="slotProps" />
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { Motion } from "motion-v"
|
|
3
|
-
import { computed, ref } from "vue"
|
|
2
|
+
import { Motion, useReducedMotion } from "motion-v"
|
|
3
|
+
import { computed, onBeforeUnmount, ref } from "vue"
|
|
4
4
|
import type { LayoutNode, Leaf, Side, Split } from "../layout/tree"
|
|
5
5
|
import type { BlockRegistry } from "../layout/registry"
|
|
6
6
|
import { blockTitle } from "../layout/registry"
|
|
7
7
|
import LpIcon from "./LpIcon.vue"
|
|
8
8
|
|
|
9
|
+
// Same spring as LpTabs' panel height; instant under reduced motion, which
|
|
10
|
+
// motion-v does not apply on its own.
|
|
11
|
+
const reduceMotion = useReducedMotion()
|
|
12
|
+
const layoutTransition = computed(() =>
|
|
13
|
+
reduceMotion.value
|
|
14
|
+
? { duration: 0 }
|
|
15
|
+
: { type: "spring" as const, stiffness: 520, damping: 42, mass: 0.9 },
|
|
16
|
+
)
|
|
17
|
+
|
|
9
18
|
const props = defineProps<{
|
|
10
19
|
node: LayoutNode
|
|
11
20
|
dragId: string | null
|
|
@@ -21,6 +30,8 @@ const emit = defineEmits<{
|
|
|
21
30
|
(e: "remove-block", leafId: string, index: number): void
|
|
22
31
|
(e: "reorder-tab", leafId: string, from: number, to: number): void
|
|
23
32
|
(e: "resize", parent: Split, index: number, deltaFraction: number): void
|
|
33
|
+
(e: "resize-start"): void
|
|
34
|
+
(e: "resize-end"): void
|
|
24
35
|
}>()
|
|
25
36
|
|
|
26
37
|
// Explicit slot shape so the recursive #block pass-through types cleanly.
|
|
@@ -97,10 +108,18 @@ function onDragOver(ev: DragEvent) {
|
|
|
97
108
|
else hoverSide.value = "center"
|
|
98
109
|
}
|
|
99
110
|
|
|
111
|
+
let stopSplitter: (() => void) | null = null
|
|
112
|
+
onBeforeUnmount(() => stopSplitter?.())
|
|
113
|
+
|
|
100
114
|
function startSplitter(ev: PointerEvent, parent: Split, index: number) {
|
|
101
115
|
ev.preventDefault()
|
|
102
|
-
const
|
|
116
|
+
const handle = ev.currentTarget as HTMLElement
|
|
117
|
+
const host = handle.parentElement
|
|
103
118
|
if (!host) return
|
|
119
|
+
// Capture keeps the moves coming when the pointer crosses an iframe or leaves
|
|
120
|
+
// the window; pointercancel (a touch the browser took over) ends it too.
|
|
121
|
+
handle.setPointerCapture?.(ev.pointerId)
|
|
122
|
+
emit("resize-start")
|
|
104
123
|
const rect = host.getBoundingClientRect()
|
|
105
124
|
const horizontal = parent.dir === "row"
|
|
106
125
|
const span = horizontal ? rect.width : rect.height
|
|
@@ -114,9 +133,14 @@ function startSplitter(ev: PointerEvent, parent: Split, index: number) {
|
|
|
114
133
|
const up = () => {
|
|
115
134
|
window.removeEventListener("pointermove", move)
|
|
116
135
|
window.removeEventListener("pointerup", up)
|
|
136
|
+
window.removeEventListener("pointercancel", up)
|
|
137
|
+
stopSplitter = null
|
|
138
|
+
emit("resize-end")
|
|
117
139
|
}
|
|
140
|
+
stopSplitter = up
|
|
118
141
|
window.addEventListener("pointermove", move)
|
|
119
142
|
window.addEventListener("pointerup", up)
|
|
143
|
+
window.addEventListener("pointercancel", up)
|
|
120
144
|
}
|
|
121
145
|
</script>
|
|
122
146
|
|
|
@@ -141,6 +165,8 @@ function startSplitter(ev: PointerEvent, parent: Split, index: number) {
|
|
|
141
165
|
@remove-block="(l, idx) => emit('remove-block', l, idx)"
|
|
142
166
|
@reorder-tab="(l, from, to) => emit('reorder-tab', l, from, to)"
|
|
143
167
|
@resize="(p, idx, d) => emit('resize', p, idx, d)"
|
|
168
|
+
@resize-start="emit('resize-start')"
|
|
169
|
+
@resize-end="emit('resize-end')"
|
|
144
170
|
>
|
|
145
171
|
<template #block="slotProps">
|
|
146
172
|
<slot name="block" v-bind="slotProps" />
|
|
@@ -168,7 +194,7 @@ function startSplitter(ev: PointerEvent, parent: Split, index: number) {
|
|
|
168
194
|
<Motion
|
|
169
195
|
v-else-if="leaf"
|
|
170
196
|
:layout="true"
|
|
171
|
-
:transition="
|
|
197
|
+
:transition="layoutTransition"
|
|
172
198
|
class="relative flex min-h-0 min-w-0 flex-col"
|
|
173
199
|
:class="{ 'opacity-35': dragId === node.id }"
|
|
174
200
|
>
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
* name rather than `alertdialog` — it is a landmark you can Tab into, not a
|
|
21
21
|
* thing demanding an answer before anything else can happen.
|
|
22
22
|
*/
|
|
23
|
-
import { computed,
|
|
23
|
+
import { computed, onBeforeUnmount, ref, useSlots, watch } from "vue"
|
|
24
|
+
import { useLabels } from "../composables/useLpConfig"
|
|
24
25
|
import { useBarStack } from "./actionBar"
|
|
25
26
|
import { CLOSE_ICON } from "./dropdown"
|
|
26
27
|
import LpButton from "./LpButton.vue"
|
|
@@ -85,6 +86,7 @@ const props = withDefaults(
|
|
|
85
86
|
maxWidth?: string
|
|
86
87
|
/** Accessible name for the landmark. Falls back to `title`. */
|
|
87
88
|
ariaLabel?: string
|
|
89
|
+
labels?: Partial<{ dismiss: string }>
|
|
88
90
|
}>(),
|
|
89
91
|
{
|
|
90
92
|
open: true,
|
|
@@ -100,6 +102,7 @@ const emit = defineEmits<{
|
|
|
100
102
|
}>()
|
|
101
103
|
|
|
102
104
|
const slots = useSlots()
|
|
105
|
+
const text = useLabels("actionBar", { dismiss: "Dismiss" }, () => props.labels)
|
|
103
106
|
|
|
104
107
|
// The last action is the primary one unless the caller has said otherwise; the
|
|
105
108
|
// rest default to `ghost` so a bar with three buttons still has one obvious
|
|
@@ -154,19 +157,39 @@ const stackOffset = computed(() => {
|
|
|
154
157
|
return offset()
|
|
155
158
|
})
|
|
156
159
|
|
|
160
|
+
/*
|
|
161
|
+
* The height is watched, not measured once: a description that wraps after a
|
|
162
|
+
* rotation, or content swapped while the bar is up, changes it, and the bars
|
|
163
|
+
* above would overlap this one.
|
|
164
|
+
*/
|
|
165
|
+
let observer: ResizeObserver | null = null
|
|
166
|
+
|
|
157
167
|
watch(
|
|
158
168
|
() => props.open,
|
|
159
|
-
|
|
169
|
+
(isOpen) => {
|
|
170
|
+
// Nothing on the server ever unregisters, so registering there would leak
|
|
171
|
+
// one slot per rendered request into every later page.
|
|
172
|
+
if (typeof window === "undefined") return
|
|
160
173
|
if (!isOpen) {
|
|
161
174
|
unregister()
|
|
162
175
|
return
|
|
163
176
|
}
|
|
164
177
|
register()
|
|
165
|
-
await nextTick()
|
|
166
|
-
if (root.value) setHeight(root.value.getBoundingClientRect().height)
|
|
167
178
|
},
|
|
168
179
|
{ immediate: true },
|
|
169
180
|
)
|
|
181
|
+
|
|
182
|
+
watch(root, (el) => {
|
|
183
|
+
observer?.disconnect()
|
|
184
|
+
observer = null
|
|
185
|
+
if (!el) return
|
|
186
|
+
setHeight(el.getBoundingClientRect().height)
|
|
187
|
+
if (typeof ResizeObserver === "undefined") return
|
|
188
|
+
observer = new ResizeObserver(() => setHeight(el.getBoundingClientRect().height))
|
|
189
|
+
observer.observe(el)
|
|
190
|
+
})
|
|
191
|
+
|
|
192
|
+
onBeforeUnmount(() => observer?.disconnect())
|
|
170
193
|
</script>
|
|
171
194
|
|
|
172
195
|
<template>
|
|
@@ -186,7 +209,7 @@ watch(
|
|
|
186
209
|
Reduced motion skips it entirely rather than holding a frame it never
|
|
187
210
|
animated to. -->
|
|
188
211
|
<Transition
|
|
189
|
-
enter-active-class="animate-[rise-in_var(--duration-medium)_var(--ease-emphasized)]"
|
|
212
|
+
enter-active-class="animate-[rise-in_var(--duration-medium)_var(--ease-emphasized)] motion-reduce:animate-none"
|
|
190
213
|
leave-active-class="animate-[rise-out_var(--duration-fast)_ease_forwards] motion-reduce:animate-none"
|
|
191
214
|
>
|
|
192
215
|
<div
|
|
@@ -194,9 +217,9 @@ watch(
|
|
|
194
217
|
ref="root"
|
|
195
218
|
role="region"
|
|
196
219
|
:aria-label="ariaLabel ?? title"
|
|
197
|
-
class="pointer-events-none fixed inset-x-0 bottom-0
|
|
220
|
+
class="pointer-events-none fixed inset-x-0 bottom-0 flex justify-center transition-[translate] duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] motion-reduce:transition-none"
|
|
198
221
|
:class="width === 'full' ? '' : 'p-3 sm:p-4'"
|
|
199
|
-
:style="{ translate: `0 -${stackOffset}px
|
|
222
|
+
:style="{ translate: `0 -${stackOffset}px`, zIndex: 'calc(var(--z-overlay) - 1)' }"
|
|
200
223
|
>
|
|
201
224
|
<div
|
|
202
225
|
class="lp-skin-panel pointer-events-auto flex items-center gap-3 border-solid bg-surface-overlay"
|
|
@@ -261,7 +284,7 @@ watch(
|
|
|
261
284
|
<button
|
|
262
285
|
v-if="dismissible"
|
|
263
286
|
type="button"
|
|
264
|
-
aria-label="
|
|
287
|
+
:aria-label="text.dismiss"
|
|
265
288
|
class="group -mr-1 flex size-8 shrink-0 items-center justify-center rounded-control text-muted outline-none transition-colors duration-[var(--duration-fast)] hover:text-ink focus-visible:ring-2 focus-visible:ring-ring"
|
|
266
289
|
@click="dismiss"
|
|
267
290
|
>
|