@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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineComponent, computed, useAttrs, openBlock, createBlock, resolveDynamicComponent, normalizeStyle, unref, normalizeClass, withCtx, createElementVNode, mergeProps } from "vue";
|
|
2
|
+
import { useFieldControl } from "../composables/useField.js";
|
|
3
|
+
import { mergeClass } from "../composables/useMergedClass.js";
|
|
4
|
+
import { _ as _sfc_main$1 } from "./LpFormField-CtVYj6tO.js";
|
|
5
|
+
const _hoisted_1 = ["id", "value", "placeholder", "rows", "disabled", "required", "aria-invalid", "aria-describedby"];
|
|
6
|
+
const __default__ = { inheritAttrs: false };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
...__default__,
|
|
9
|
+
__name: "LpTextarea",
|
|
10
|
+
props: {
|
|
11
|
+
modelValue: {},
|
|
12
|
+
placeholder: {},
|
|
13
|
+
rows: {},
|
|
14
|
+
invalid: { type: Boolean },
|
|
15
|
+
disabled: { type: Boolean },
|
|
16
|
+
label: {},
|
|
17
|
+
hint: {},
|
|
18
|
+
error: {},
|
|
19
|
+
required: { type: Boolean }
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:modelValue"],
|
|
22
|
+
setup(__props) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const hasField = computed(() => !!props.label || !!props.hint || !!props.error);
|
|
25
|
+
const attrs = useAttrs();
|
|
26
|
+
const textareaAttrs = computed(() => {
|
|
27
|
+
const { class: _c, style: _s, ...rest } = attrs;
|
|
28
|
+
return rest;
|
|
29
|
+
});
|
|
30
|
+
const field = useFieldControl(() => ({
|
|
31
|
+
wrapped: hasField.value,
|
|
32
|
+
hasMessage: !!props.error || !!props.hint,
|
|
33
|
+
id: typeof attrs.id === "string" ? attrs.id : void 0,
|
|
34
|
+
invalid: props.invalid || !!props.error,
|
|
35
|
+
required: props.required,
|
|
36
|
+
disabled: props.disabled
|
|
37
|
+
}));
|
|
38
|
+
const textareaClass = computed(
|
|
39
|
+
() => mergeClass(
|
|
40
|
+
"w-full resize-y rounded-control border bg-surface-soft px-3 py-2 text-sm text-ink outline-none transition-colors duration-[var(--duration-fast)] placeholder:text-muted focus:border-brand focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-55",
|
|
41
|
+
field.value.invalid ? "border-danger focus:border-danger focus:ring-danger-soft" : "border-line",
|
|
42
|
+
hasField.value ? "" : attrs.class
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return openBlock(), createBlock(resolveDynamicComponent(hasField.value ? _sfc_main$1 : "div"), {
|
|
47
|
+
id: hasField.value ? unref(field).id : void 0,
|
|
48
|
+
label: hasField.value ? __props.label : void 0,
|
|
49
|
+
hint: hasField.value ? __props.hint : void 0,
|
|
50
|
+
error: hasField.value ? __props.error : void 0,
|
|
51
|
+
required: hasField.value ? __props.required : void 0,
|
|
52
|
+
class: normalizeClass(hasField.value ? unref(attrs).class : "contents"),
|
|
53
|
+
style: normalizeStyle(hasField.value ? unref(attrs).style : void 0)
|
|
54
|
+
}, {
|
|
55
|
+
default: withCtx(() => [
|
|
56
|
+
createElementVNode("textarea", mergeProps(textareaAttrs.value, {
|
|
57
|
+
id: unref(field).id,
|
|
58
|
+
value: __props.modelValue,
|
|
59
|
+
placeholder: __props.placeholder,
|
|
60
|
+
rows: __props.rows ?? 4,
|
|
61
|
+
disabled: unref(field).disabled,
|
|
62
|
+
required: unref(field).required || void 0,
|
|
63
|
+
"aria-invalid": unref(field).invalid || void 0,
|
|
64
|
+
"aria-describedby": unref(field).describedBy,
|
|
65
|
+
class: textareaClass.value,
|
|
66
|
+
style: hasField.value ? void 0 : unref(attrs).style,
|
|
67
|
+
onInput: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.value))
|
|
68
|
+
}), null, 16, _hoisted_1)
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
}, 8, ["id", "label", "hint", "error", "required", "class", "style"]);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export {
|
|
76
|
+
_sfc_main as _
|
|
77
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, mergeProps, unref, withCtx, renderSlot } from "vue";
|
|
2
|
+
import { t as themeEntries } from "./useTheme-DJm1JSsY.js";
|
|
3
|
+
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
4
|
+
const __default__ = { inheritAttrs: false };
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
...__default__,
|
|
7
|
+
__name: "LpThemeProvider",
|
|
8
|
+
props: {
|
|
9
|
+
theme: {},
|
|
10
|
+
as: { default: "div" }
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const { class: rootClass, attrs: rest } = useMergedAttrs("bg-surface text-ink");
|
|
15
|
+
const style = computed(() => ({
|
|
16
|
+
...Object.fromEntries(themeEntries(props.theme)),
|
|
17
|
+
colorScheme: props.theme.mode
|
|
18
|
+
}));
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), mergeProps({
|
|
21
|
+
style: style.value,
|
|
22
|
+
"data-theme-mode": __props.theme.mode,
|
|
23
|
+
class: unref(rootClass)
|
|
24
|
+
}, unref(rest)), {
|
|
25
|
+
default: withCtx(() => [
|
|
26
|
+
renderSlot(_ctx.$slots, "default")
|
|
27
|
+
]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 16, ["style", "data-theme-mode", "class"]);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
_sfc_main as _
|
|
35
|
+
};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { defineComponent, computed, onMounted, ref, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, createElementBlock, createVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import { useLabels } from "../composables/useLpConfig.js";
|
|
3
|
+
import { u as useTheme, p as presets } from "./useTheme-DJm1JSsY.js";
|
|
4
|
+
import { _ as _sfc_main$1 } from "./LpContextMenu-BqkAYa9X.js";
|
|
5
|
+
import { _ as _sfc_main$2 } from "./LpIcon-DYtaid0K.js";
|
|
6
|
+
const _hoisted_1 = ["aria-label", "title"];
|
|
7
|
+
const _hoisted_2 = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "grid shrink-0 place-items-center"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_3 = {
|
|
12
|
+
key: 2,
|
|
13
|
+
class: "text-sm font-medium"
|
|
14
|
+
};
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
|
+
__name: "LpThemeSwitcher",
|
|
17
|
+
props: {
|
|
18
|
+
modelValue: {},
|
|
19
|
+
themes: {},
|
|
20
|
+
cycleThemes: {},
|
|
21
|
+
variant: { default: "swatch" },
|
|
22
|
+
showLabel: { type: Boolean },
|
|
23
|
+
default: {},
|
|
24
|
+
transition: { type: Boolean, default: true },
|
|
25
|
+
size: { default: "md" },
|
|
26
|
+
"aria-label": {},
|
|
27
|
+
system: {},
|
|
28
|
+
labels: {}
|
|
29
|
+
},
|
|
30
|
+
emits: ["update:modelValue", "change"],
|
|
31
|
+
setup(__props, { emit: __emit }) {
|
|
32
|
+
const props = __props;
|
|
33
|
+
const emit = __emit;
|
|
34
|
+
const theme = useTheme();
|
|
35
|
+
const text = useLabels(
|
|
36
|
+
"themeSwitcher",
|
|
37
|
+
{ trigger: "Theme: {name}. Click to switch, right-click to choose.", system: "System" },
|
|
38
|
+
() => props.labels
|
|
39
|
+
);
|
|
40
|
+
const list = computed(
|
|
41
|
+
() => props.themes && props.themes.length ? props.themes : Object.values(presets)
|
|
42
|
+
);
|
|
43
|
+
const activeName = computed(
|
|
44
|
+
() => props.modelValue ?? (theme.currentName.value || list.value[0]?.name || "")
|
|
45
|
+
);
|
|
46
|
+
onMounted(() => {
|
|
47
|
+
if (props.default == null) return;
|
|
48
|
+
const fallback = typeof props.default === "string" ? list.value.find((t) => t.name === props.default) : props.default;
|
|
49
|
+
if (fallback) theme.init(fallback);
|
|
50
|
+
});
|
|
51
|
+
const SIZES = { sm: "size-7", md: "size-8", lg: "size-9" };
|
|
52
|
+
const HEIGHTS = { sm: "h-7", md: "h-8", lg: "h-9" };
|
|
53
|
+
const ICON_SIZE = { sm: 15, md: 16, lg: 18 };
|
|
54
|
+
const CHIP = { sm: "size-3.5", md: "size-4", lg: "size-[18px]" };
|
|
55
|
+
const wantsLabel = computed(() => props.showLabel || props.variant === "pill");
|
|
56
|
+
function applyTheme(t, ev) {
|
|
57
|
+
if (props.transition) {
|
|
58
|
+
theme.setTheme(t, ev ? { x: ev.clientX, y: ev.clientY } : void 0);
|
|
59
|
+
} else {
|
|
60
|
+
theme.apply(t);
|
|
61
|
+
}
|
|
62
|
+
emit("update:modelValue", t.name);
|
|
63
|
+
emit("change", t);
|
|
64
|
+
}
|
|
65
|
+
const cycleList = computed(() => {
|
|
66
|
+
if (!props.cycleThemes?.length) return list.value;
|
|
67
|
+
const resolved = props.cycleThemes.map(
|
|
68
|
+
(t) => typeof t === "string" ? list.value.find((x) => x.name === t) : t
|
|
69
|
+
).filter((t) => Boolean(t));
|
|
70
|
+
return resolved.length ? resolved : list.value;
|
|
71
|
+
});
|
|
72
|
+
function cycle(ev) {
|
|
73
|
+
const arr = cycleList.value;
|
|
74
|
+
if (!arr.length) return;
|
|
75
|
+
const i = arr.findIndex((t) => t.name === activeName.value);
|
|
76
|
+
const next = arr[(i + 1) % arr.length];
|
|
77
|
+
if (next) applyTheme(next, ev);
|
|
78
|
+
}
|
|
79
|
+
function resolve(t) {
|
|
80
|
+
return typeof t === "string" ? list.value.find((x) => x.name === t) : t;
|
|
81
|
+
}
|
|
82
|
+
const systemPair = computed(() => {
|
|
83
|
+
if (!props.system) return null;
|
|
84
|
+
const light = resolve(props.system.light);
|
|
85
|
+
const dark = resolve(props.system.dark);
|
|
86
|
+
return light && dark ? { light, dark } : null;
|
|
87
|
+
});
|
|
88
|
+
function followSystem() {
|
|
89
|
+
const pair = systemPair.value;
|
|
90
|
+
if (!pair) return;
|
|
91
|
+
theme.setSystem(pair);
|
|
92
|
+
const next = theme.current.value;
|
|
93
|
+
if (next) {
|
|
94
|
+
emit("update:modelValue", next.name);
|
|
95
|
+
emit("change", next);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const menu = computed(() => {
|
|
99
|
+
const following = theme.system.value;
|
|
100
|
+
const items = list.value.map((t) => ({
|
|
101
|
+
label: t.name,
|
|
102
|
+
icon: !following && t.name === activeName.value ? "lucide:check" : t.mode === "dark" ? "lucide:moon" : "lucide:sun",
|
|
103
|
+
onSelect: () => applyTheme(t)
|
|
104
|
+
}));
|
|
105
|
+
if (systemPair.value) {
|
|
106
|
+
items.unshift({
|
|
107
|
+
label: text.value.system,
|
|
108
|
+
icon: following ? "lucide:check" : "lucide:monitor",
|
|
109
|
+
onSelect: followSystem
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return items;
|
|
113
|
+
});
|
|
114
|
+
const hydrated = ref(false);
|
|
115
|
+
onMounted(() => {
|
|
116
|
+
hydrated.value = true;
|
|
117
|
+
});
|
|
118
|
+
const labelName = computed(
|
|
119
|
+
() => hydrated.value ? activeName.value : list.value[0]?.name ?? ""
|
|
120
|
+
);
|
|
121
|
+
const triggerLabel = computed(
|
|
122
|
+
() => props["aria-label"] ?? text.value.trigger.replace("{name}", labelName.value)
|
|
123
|
+
);
|
|
124
|
+
return (_ctx, _cache) => {
|
|
125
|
+
return openBlock(), createBlock(_sfc_main$1, { items: menu.value }, {
|
|
126
|
+
default: withCtx(() => [
|
|
127
|
+
createElementVNode("button", {
|
|
128
|
+
type: "button",
|
|
129
|
+
"aria-label": triggerLabel.value,
|
|
130
|
+
title: triggerLabel.value,
|
|
131
|
+
class: normalizeClass([
|
|
132
|
+
"inline-flex shrink-0 items-center justify-center gap-2 outline-none transition-colors duration-[var(--duration-fast)] focus-visible:ring-2 focus-visible:ring-ring",
|
|
133
|
+
wantsLabel.value ? [
|
|
134
|
+
HEIGHTS[__props.size],
|
|
135
|
+
"rounded-full border border-line bg-surface-raised pl-2 pr-3 text-ink hover:border-line-strong hover:bg-surface-soft"
|
|
136
|
+
] : [SIZES[__props.size], "rounded-control text-muted hover:bg-surface-soft hover:text-ink"]
|
|
137
|
+
]),
|
|
138
|
+
onClick: cycle
|
|
139
|
+
}, [
|
|
140
|
+
__props.variant !== "icon" ? (openBlock(), createElementBlock("span", {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: normalizeClass(["shrink-0 rounded-full shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--color-ink)_22%,transparent)]", CHIP[__props.size]]),
|
|
143
|
+
style: { "background": "linear-gradient(135deg, var(--color-surface) 50%, var(--color-brand) 50%)" }
|
|
144
|
+
}, null, 2)) : (openBlock(), createElementBlock("span", _hoisted_2, [
|
|
145
|
+
createVNode(_sfc_main$2, {
|
|
146
|
+
name: "lucide:moon",
|
|
147
|
+
size: ICON_SIZE[__props.size],
|
|
148
|
+
class: "in-data-[theme-mode=light]:hidden"
|
|
149
|
+
}, null, 8, ["size"]),
|
|
150
|
+
createVNode(_sfc_main$2, {
|
|
151
|
+
name: "lucide:sun",
|
|
152
|
+
size: ICON_SIZE[__props.size],
|
|
153
|
+
class: "hidden in-data-[theme-mode=light]:block"
|
|
154
|
+
}, null, 8, ["size"])
|
|
155
|
+
])),
|
|
156
|
+
wantsLabel.value ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(labelName.value), 1)) : createCommentVNode("", true)
|
|
157
|
+
], 10, _hoisted_1)
|
|
158
|
+
]),
|
|
159
|
+
_: 1
|
|
160
|
+
}, 8, ["items"]);
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
export {
|
|
165
|
+
_sfc_main as _
|
|
166
|
+
};
|
|
@@ -11,12 +11,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
11
11
|
},
|
|
12
12
|
setup(__props) {
|
|
13
13
|
const props = __props;
|
|
14
|
-
const tilt = useTilt({
|
|
14
|
+
const tilt = useTilt(() => ({
|
|
15
15
|
max: props.max,
|
|
16
16
|
lift: props.lift,
|
|
17
17
|
scale: props.scale,
|
|
18
18
|
glare: props.glare
|
|
19
|
-
});
|
|
19
|
+
}));
|
|
20
20
|
const stageStyle = computed(() => ({ perspective: `${props.perspective}px` }));
|
|
21
21
|
return (_ctx, _cache) => {
|
|
22
22
|
return openBlock(), createElementBlock("div", {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, unref, normalizeClass, withCtx, createCommentVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { Time } from "@internationalized/date";
|
|
3
3
|
import { TimeFieldRoot, TimeFieldInput } from "reka-ui";
|
|
4
|
-
import {
|
|
4
|
+
import { useFieldControl } from "../composables/useField.js";
|
|
5
|
+
import { _ as _sfc_main$1 } from "./LpIcon-DYtaid0K.js";
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
7
|
__name: "LpTimeField",
|
|
7
8
|
props: {
|
|
@@ -29,6 +30,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
30
|
const pad = (n) => String(n).padStart(2, "0");
|
|
30
31
|
emit("update:modelValue", `${pad(next.hour)}:${pad(next.minute)}`);
|
|
31
32
|
}
|
|
33
|
+
const field = useFieldControl(() => ({
|
|
34
|
+
wrapped: false,
|
|
35
|
+
invalid: props.invalid,
|
|
36
|
+
disabled: props.disabled
|
|
37
|
+
}));
|
|
32
38
|
const shellSize = {
|
|
33
39
|
sm: "h-(--size-control-sm) text-xs",
|
|
34
40
|
md: "h-(--size-control-md) text-sm",
|
|
@@ -40,10 +46,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
46
|
"hour-cycle": __props.hourCycle,
|
|
41
47
|
locale: __props.locale,
|
|
42
48
|
granularity: "minute",
|
|
43
|
-
disabled:
|
|
49
|
+
disabled: unref(field).disabled,
|
|
50
|
+
"aria-invalid": unref(field).invalid || void 0,
|
|
51
|
+
"aria-describedby": unref(field).describedBy,
|
|
44
52
|
class: normalizeClass(["flex w-full items-center gap-0.5 rounded-control border bg-surface-soft px-3 text-ink transition-colors duration-[var(--duration-fast)] focus-within:ring-2 focus-within:ring-ring data-[disabled]:cursor-not-allowed data-[disabled]:opacity-55", [
|
|
45
53
|
shellSize[__props.size],
|
|
46
|
-
|
|
54
|
+
unref(field).invalid ? "border-danger focus-within:ring-danger-soft" : "border-line focus-within:border-brand"
|
|
47
55
|
]]),
|
|
48
56
|
"onUpdate:modelValue": onUpdate
|
|
49
57
|
}, {
|
|
@@ -54,10 +62,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
54
62
|
size: 15,
|
|
55
63
|
class: "mr-1.5 shrink-0 text-muted"
|
|
56
64
|
})) : createCommentVNode("", true),
|
|
57
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(segments, (item) => {
|
|
58
|
-
return openBlock(), createElementBlock(Fragment, {
|
|
59
|
-
key: item.part
|
|
60
|
-
}, [
|
|
65
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(segments, (item, i) => {
|
|
66
|
+
return openBlock(), createElementBlock(Fragment, { key: i }, [
|
|
61
67
|
item.part === "literal" ? (openBlock(), createBlock(unref(TimeFieldInput), {
|
|
62
68
|
key: 0,
|
|
63
69
|
part: item.part,
|
|
@@ -81,7 +87,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
87
|
}), 128))
|
|
82
88
|
]),
|
|
83
89
|
_: 1
|
|
84
|
-
}, 8, ["model-value", "hour-cycle", "locale", "disabled", "class"]);
|
|
90
|
+
}, 8, ["model-value", "hour-cycle", "locale", "disabled", "aria-invalid", "aria-describedby", "class"]);
|
|
85
91
|
};
|
|
86
92
|
}
|
|
87
93
|
});
|
|
@@ -1,31 +1,70 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, useId, onMounted, nextTick, onBeforeUnmount, ref, watch, openBlock, createBlock, unref, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode, withModifiers, normalizeStyle, Teleport } from "vue";
|
|
2
2
|
import { ToastProvider, ToastRoot, ToastTitle, ToastDescription, ToastViewport } from "reka-ui";
|
|
3
|
+
import { prefersReducedMotion } from "../composables/easing.js";
|
|
4
|
+
import { useLabels } from "../composables/useLpConfig.js";
|
|
3
5
|
import { useToast } from "../composables/useToast.js";
|
|
4
6
|
import { CLOSE_ICON } from "../components/dropdown.js";
|
|
5
|
-
import { _ as _sfc_main$1 } from "./LpIcon-
|
|
7
|
+
import { _ as _sfc_main$1 } from "./LpIcon-DYtaid0K.js";
|
|
6
8
|
const _hoisted_1 = { class: "flex items-start gap-3 p-3.5" };
|
|
7
9
|
const _hoisted_2 = { class: "flex min-w-0 flex-1 flex-col gap-0.5" };
|
|
8
|
-
const _hoisted_3 = ["onClick"];
|
|
9
|
-
const _hoisted_4 = ["onClick"];
|
|
10
|
+
const _hoisted_3 = ["disabled", "aria-busy", "onClick"];
|
|
11
|
+
const _hoisted_4 = ["aria-label", "onClick"];
|
|
10
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
13
|
__name: "LpToaster",
|
|
14
|
+
props: {
|
|
15
|
+
labels: {}
|
|
16
|
+
},
|
|
12
17
|
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const text = useLabels("toast", { dismiss: "Dismiss" }, () => props.labels);
|
|
13
20
|
const { queue, dismiss } = useToast();
|
|
21
|
+
let observer;
|
|
22
|
+
const tops = /* @__PURE__ */ new WeakMap();
|
|
23
|
+
function toastsIn(root) {
|
|
24
|
+
return [...root.querySelectorAll("li[data-state]")];
|
|
25
|
+
}
|
|
26
|
+
function slide(root) {
|
|
27
|
+
const reduce = prefersReducedMotion();
|
|
28
|
+
const height = root.offsetHeight;
|
|
29
|
+
for (const el of toastsIn(root)) {
|
|
30
|
+
const before = tops.get(el);
|
|
31
|
+
const now2 = el.offsetTop - height;
|
|
32
|
+
tops.set(el, now2);
|
|
33
|
+
if (before === void 0 || before === now2 || reduce || el.hasAttribute("data-swipe")) continue;
|
|
34
|
+
el.animate([{ translate: `0 ${before - now2}px` }, { translate: "0 0" }], {
|
|
35
|
+
duration: 220,
|
|
36
|
+
easing: "cubic-bezier(0.2, 0, 0, 1)"
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const viewportId = useId();
|
|
41
|
+
onMounted(
|
|
42
|
+
() => nextTick(() => {
|
|
43
|
+
const root = document.querySelector(`[data-lp-toasts="${viewportId}"]`);
|
|
44
|
+
if (!root || typeof MutationObserver === "undefined") return;
|
|
45
|
+
for (const el of toastsIn(root)) tops.set(el, el.offsetTop - root.offsetHeight);
|
|
46
|
+
observer = new MutationObserver(() => slide(root));
|
|
47
|
+
observer.observe(root, { childList: true, subtree: true });
|
|
48
|
+
})
|
|
49
|
+
);
|
|
50
|
+
onBeforeUnmount(() => observer?.disconnect());
|
|
51
|
+
const tag = (t) => `${t.id}:${t.rev}`;
|
|
14
52
|
const closing = ref(/* @__PURE__ */ new Set());
|
|
15
|
-
function beginClose(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
53
|
+
function beginClose(t) {
|
|
54
|
+
const at = tag(t);
|
|
55
|
+
if (closing.value.has(at)) return;
|
|
56
|
+
closing.value = new Set(closing.value).add(at);
|
|
57
|
+
window.setTimeout(() => finishClose(t.id, at), 220);
|
|
19
58
|
}
|
|
20
|
-
function finishClose(id) {
|
|
21
|
-
if (!closing.value.has(
|
|
59
|
+
function finishClose(id, at) {
|
|
60
|
+
if (!closing.value.has(at)) return;
|
|
22
61
|
const next = new Set(closing.value);
|
|
23
|
-
next.delete(
|
|
62
|
+
next.delete(at);
|
|
24
63
|
closing.value = next;
|
|
25
|
-
dismiss(id);
|
|
64
|
+
if (queue.some((t) => tag(t) === at)) dismiss(id);
|
|
26
65
|
}
|
|
27
|
-
function onAnimEnd(e,
|
|
28
|
-
if (e.animationName === "toast-out") finishClose(id);
|
|
66
|
+
function onAnimEnd(e, t) {
|
|
67
|
+
if (e.animationName === "toast-out") finishClose(t.id, tag(t));
|
|
29
68
|
}
|
|
30
69
|
const variantIcon = {
|
|
31
70
|
info: "lucide:info",
|
|
@@ -64,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
64
103
|
if (!queue.some((t) => t.id === id)) pausedAt.delete(id);
|
|
65
104
|
}
|
|
66
105
|
if (closing.value.size) {
|
|
67
|
-
const live = new Set([...closing.value].filter((
|
|
106
|
+
const live = new Set([...closing.value].filter((at) => queue.some((t) => tag(t) === at)));
|
|
68
107
|
if (live.size !== closing.value.size) closing.value = live;
|
|
69
108
|
}
|
|
70
109
|
if (queue.some((t) => t.dismissAt !== null)) startTimer();
|
|
@@ -89,27 +128,46 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
128
|
const remaining = t.dismissAt - at;
|
|
90
129
|
return Math.max(0, Math.min(100, remaining / t.duration * 100));
|
|
91
130
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
131
|
+
let swiped = null;
|
|
132
|
+
function onSwipeDone(t) {
|
|
133
|
+
swiped = tag(t);
|
|
134
|
+
window.setTimeout(() => swiped = null, 0);
|
|
135
|
+
}
|
|
136
|
+
const busy = ref(/* @__PURE__ */ new Set());
|
|
137
|
+
async function settle(t, run) {
|
|
138
|
+
const at = tag(t);
|
|
139
|
+
if (busy.value.has(at)) return;
|
|
140
|
+
busy.value = new Set(busy.value).add(at);
|
|
141
|
+
try {
|
|
142
|
+
await run();
|
|
143
|
+
beginClose(t);
|
|
144
|
+
} finally {
|
|
145
|
+
const next = new Set(busy.value);
|
|
146
|
+
next.delete(at);
|
|
147
|
+
busy.value = next;
|
|
96
148
|
}
|
|
97
149
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
150
|
+
function runClick(t) {
|
|
151
|
+
if (swiped === tag(t)) return;
|
|
152
|
+
if (t.onClick) return settle(t, t.onClick);
|
|
153
|
+
}
|
|
154
|
+
function runAction(t, action) {
|
|
155
|
+
return settle(t, action.onClick);
|
|
101
156
|
}
|
|
102
157
|
return (_ctx, _cache) => {
|
|
103
158
|
return openBlock(), createBlock(unref(ToastProvider), null, {
|
|
104
159
|
default: withCtx(() => [
|
|
105
160
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(queue), (t) => {
|
|
106
161
|
return openBlock(), createBlock(unref(ToastRoot), {
|
|
107
|
-
key: t
|
|
108
|
-
open: !closing.value.has(t
|
|
162
|
+
key: tag(t),
|
|
163
|
+
open: !closing.value.has(tag(t)),
|
|
109
164
|
duration: t.duration,
|
|
165
|
+
type: t.variant === "error" || t.variant === "warning" ? "foreground" : "background",
|
|
110
166
|
class: normalizeClass(["pointer-events-auto relative overflow-hidden rounded-card border border-line bg-surface-raised shadow-panel data-[state=open]:animate-[toast-in_200ms_var(--ease-emphasized)] data-[state=closed]:animate-[toast-out_140ms_ease]", { "cursor-pointer": t.onClick }]),
|
|
111
|
-
"onUpdate:open": (open) => !open && beginClose(t
|
|
112
|
-
onAnimationend: (e) => onAnimEnd(e, t
|
|
167
|
+
"onUpdate:open": (open) => !open && beginClose(t),
|
|
168
|
+
onAnimationend: (e) => onAnimEnd(e, t),
|
|
169
|
+
onSwipeEnd: ($event) => onSwipeDone(t),
|
|
170
|
+
onSwipeCancel: ($event) => onSwipeDone(t),
|
|
113
171
|
onPause: ($event) => onPause(t),
|
|
114
172
|
onResume: ($event) => onResume(t),
|
|
115
173
|
onClick: ($event) => runClick(t)
|
|
@@ -147,7 +205,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
147
205
|
return openBlock(), createElementBlock("button", {
|
|
148
206
|
key: i,
|
|
149
207
|
type: "button",
|
|
150
|
-
|
|
208
|
+
disabled: busy.value.has(tag(t)),
|
|
209
|
+
"aria-busy": busy.value.has(tag(t)) || void 0,
|
|
210
|
+
class: "inline-flex items-center gap-1.5 rounded-control disabled:opacity-60 border border-line bg-surface-soft px-2.5 py-1 text-xs font-medium text-ink outline-none transition-[border-color,background-color,scale] duration-[var(--duration-fast)] ease-[var(--ease-emphasized)] hover:border-line-strong hover:bg-surface-soft/70 active:scale-95 motion-reduce:active:scale-100 focus-visible:ring-2 focus-visible:ring-ring",
|
|
151
211
|
onClick: ($event) => runAction(t, action)
|
|
152
212
|
}, [
|
|
153
213
|
action.icon ? (openBlock(), createBlock(_sfc_main$1, {
|
|
@@ -163,8 +223,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
163
223
|
createElementVNode("button", {
|
|
164
224
|
type: "button",
|
|
165
225
|
class: "group -mr-1 -mt-1 rounded-md p-1 text-muted outline-none transition-colors duration-[var(--duration-fast)] hover:text-ink",
|
|
166
|
-
"aria-label":
|
|
167
|
-
onClick: withModifiers(($event) => beginClose(t
|
|
226
|
+
"aria-label": unref(text).dismiss,
|
|
227
|
+
onClick: withModifiers(($event) => beginClose(t), ["stop"])
|
|
168
228
|
}, [
|
|
169
229
|
createVNode(_sfc_main$1, {
|
|
170
230
|
name: "lucide:x",
|
|
@@ -180,10 +240,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
180
240
|
}, null, 6)) : createCommentVNode("", true)
|
|
181
241
|
]),
|
|
182
242
|
_: 2
|
|
183
|
-
}, 1032, ["open", "duration", "class", "onUpdate:open", "onAnimationend", "onPause", "onResume", "onClick"]);
|
|
243
|
+
}, 1032, ["open", "duration", "type", "class", "onUpdate:open", "onAnimationend", "onSwipeEnd", "onSwipeCancel", "onPause", "onResume", "onClick"]);
|
|
184
244
|
}), 128)),
|
|
185
245
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
186
|
-
createVNode(unref(ToastViewport), {
|
|
246
|
+
createVNode(unref(ToastViewport), {
|
|
247
|
+
"data-lp-toasts": unref(viewportId),
|
|
248
|
+
class: "fixed bottom-0 right-0 z-(--z-toast) flex w-[min(92vw,22rem)] flex-col gap-2 p-4 outline-none"
|
|
249
|
+
}, null, 8, ["data-lp-toasts"])
|
|
187
250
|
]))
|
|
188
251
|
]),
|
|
189
252
|
_: 1
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, onBeforeUnmount, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, normalizeStyle, normalizeClass, createTextVNode, toDisplayString } from "vue";
|
|
2
|
-
import { TooltipProvider, TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent } from "reka-ui";
|
|
1
|
+
import { defineComponent, ref, watch, onBeforeUnmount, openBlock, createBlock, resolveDynamicComponent, unref, normalizeProps, guardReactiveProps, withCtx, createVNode, renderSlot, normalizeStyle, normalizeClass, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { injectTooltipProviderContext, TooltipProvider, TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent } from "reka-ui";
|
|
3
3
|
import { springStep, springSettled } from "../composables/usePillTransition.js";
|
|
4
4
|
import { PANEL_SURFACE, TOOLTIP_ANIM } from "../components/dropdown.js";
|
|
5
5
|
import '../assets/LpTooltip-B61SYd4K.css';const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -9,13 +9,16 @@ import '../assets/LpTooltip-B61SYd4K.css';const _sfc_main = /* @__PURE__ */ defi
|
|
|
9
9
|
sideOffset: {},
|
|
10
10
|
side: { default: "top" },
|
|
11
11
|
label: { type: Boolean },
|
|
12
|
-
delay: {
|
|
12
|
+
delay: {},
|
|
13
13
|
showOnPointerFocus: { type: Boolean },
|
|
14
14
|
followCursor: { type: Boolean },
|
|
15
15
|
disabled: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
setup(__props) {
|
|
18
18
|
const props = __props;
|
|
19
|
+
const shared = injectTooltipProviderContext(null);
|
|
20
|
+
const PassThrough = (_, { slots }) => slots.default?.();
|
|
21
|
+
const reducedMotion = () => typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
19
22
|
const target = { x: 0, y: 0 };
|
|
20
23
|
const offset = ref({ x: 0, y: 0 });
|
|
21
24
|
let sx = { value: 0, velocity: 0 };
|
|
@@ -49,6 +52,10 @@ import '../assets/LpTooltip-B61SYd4K.css';const _sfc_main = /* @__PURE__ */ defi
|
|
|
49
52
|
const half = props.side === "top" || props.side === "bottom" ? rect.height / 2 : 0;
|
|
50
53
|
const dir = props.side === "bottom" ? -1 : 1;
|
|
51
54
|
target.y = e.clientY - (rect.top + rect.height / 2) + half * dir;
|
|
55
|
+
if (reducedMotion()) {
|
|
56
|
+
offset.value = { x: target.x, y: target.y };
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
52
59
|
if (!frame) frame = requestAnimationFrame(settle);
|
|
53
60
|
};
|
|
54
61
|
const open = ref(false);
|
|
@@ -73,10 +80,11 @@ import '../assets/LpTooltip-B61SYd4K.css';const _sfc_main = /* @__PURE__ */ defi
|
|
|
73
80
|
if (frame) cancelAnimationFrame(frame);
|
|
74
81
|
});
|
|
75
82
|
return (_ctx, _cache) => {
|
|
76
|
-
return openBlock(), createBlock(unref(TooltipProvider), {
|
|
83
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(shared) ? PassThrough : unref(TooltipProvider)), normalizeProps(guardReactiveProps(unref(shared) ? {} : { delayDuration: __props.delay ?? 200 })), {
|
|
77
84
|
default: withCtx(() => [
|
|
78
85
|
createVNode(unref(TooltipRoot), {
|
|
79
86
|
open: open.value,
|
|
87
|
+
"delay-duration": __props.delay,
|
|
80
88
|
"ignore-non-keyboard-focus": !__props.showOnPointerFocus,
|
|
81
89
|
"disable-hoverable-content": __props.followCursor,
|
|
82
90
|
"disable-closing-trigger": __props.followCursor,
|
|
@@ -119,10 +127,10 @@ import '../assets/LpTooltip-B61SYd4K.css';const _sfc_main = /* @__PURE__ */ defi
|
|
|
119
127
|
})
|
|
120
128
|
]),
|
|
121
129
|
_: 3
|
|
122
|
-
}, 8, ["open", "ignore-non-keyboard-focus", "disable-hoverable-content", "disable-closing-trigger"])
|
|
130
|
+
}, 8, ["open", "delay-duration", "ignore-non-keyboard-focus", "disable-hoverable-content", "disable-closing-trigger"])
|
|
123
131
|
]),
|
|
124
132
|
_: 3
|
|
125
|
-
},
|
|
133
|
+
}, 16);
|
|
126
134
|
};
|
|
127
135
|
}
|
|
128
136
|
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, renderSlot } from "vue";
|
|
2
|
+
import { TooltipProvider } from "reka-ui";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "LpTooltipProvider",
|
|
5
|
+
props: {
|
|
6
|
+
delay: { default: 200 },
|
|
7
|
+
skipDelay: { default: 300 }
|
|
8
|
+
},
|
|
9
|
+
setup(__props) {
|
|
10
|
+
return (_ctx, _cache) => {
|
|
11
|
+
return openBlock(), createBlock(unref(TooltipProvider), {
|
|
12
|
+
"delay-duration": __props.delay,
|
|
13
|
+
"skip-delay-duration": __props.skipDelay
|
|
14
|
+
}, {
|
|
15
|
+
default: withCtx(() => [
|
|
16
|
+
renderSlot(_ctx.$slots, "default")
|
|
17
|
+
]),
|
|
18
|
+
_: 3
|
|
19
|
+
}, 8, ["delay-duration", "skip-delay-duration"]);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
_sfc_main as _
|
|
25
|
+
};
|