@leavepulse/ui 0.43.4 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -7
- package/dist/assets/{LpCommandPalette-B-0Est4Z.css → LpCommandPalette-nGNnzXqQ.css} +21 -21
- package/dist/assets/{LpDropzone-BBoWvi-J.css → LpDropzone-i4BdMi1H.css} +12 -12
- package/dist/assets/{LpImageEditor-Ct7Y3aNu.css → LpImageEditor-CbMA82g8.css} +6 -6
- package/dist/assets/{LpRollingText-CR1mb0Vt.css → LpRollingText-BGnE6q9j.css} +3 -0
- package/dist/assets/{LpShortcutsDialog-C6YoQ8_M.css → LpShortcutsDialog-CqYX3yy6.css} +28 -7
- package/dist/assets/{LpSkeleton-D7xU8IPV.css → LpSkeleton-H3Z5dEIk.css} +4 -1
- package/dist/assets/{LpTable-BgPLJOXa.css → LpTable-CPwWxTJS.css} +49 -9
- package/dist/chunks/ContextMenuItems-BtKU7074.js +124 -0
- package/dist/chunks/{LayoutCanvas-Dd20boUG.js → LayoutCanvas-BkaGXTjx.js} +26 -9
- package/dist/chunks/{LayoutNode-DGpZA9LX.js → LayoutNode-B3_9E1Xa.js} +28 -12
- package/dist/chunks/{LpActionBar-BlvtGB2P.js → LpActionBar-CnfFVIwC.js} +26 -12
- package/dist/chunks/{LpAddressInput-B-Zvxsn7.js → LpAddressInput-BwX8uo4_.js} +54 -49
- package/dist/chunks/{LpAlert-BAYHDSS1.js → LpAlert-B6ilrM7T.js} +16 -9
- package/dist/chunks/{LpAppShell-BGQVIY-3.js → LpAppShell-C53_RaGF.js} +53 -26
- package/dist/chunks/{LpAutocomplete-DExlIZe_.js → LpAutocomplete-C8IgSMsi.js} +52 -24
- package/dist/chunks/{LpAvatar-B3-xAOH3.js → LpAvatar-C1XStdOo.js} +19 -10
- package/dist/chunks/LpBreadcrumbs-CQJd73Gm.js +95 -0
- package/dist/chunks/{LpButton-5VXXCjwF.js → LpButton-CKSwC6Mu.js} +45 -15
- package/dist/chunks/{LpCalendar-B7Ko5RdR.js → LpCalendar-DrA2McTU.js} +1 -1
- package/dist/chunks/{LpCard-BhI1N_vL.js → LpCard-C2IvucmX.js} +1 -1
- package/dist/chunks/{LpCheckbox-CVccKYaH.js → LpCheckbox-Bkj13CbW.js} +8 -4
- package/dist/chunks/{LpCodeBlock-Bo0B4TFR.js → LpCodeBlock-ca7ANFyW.js} +49 -17
- package/dist/chunks/{LpColorPicker-BlXea7LM.js → LpColorPicker-zz4VGkG4.js} +75 -26
- package/dist/chunks/{LpConfirmDialog-Q-bxff8z.js → LpConfirmDialog-DCw5jR1t.js} +59 -17
- package/dist/chunks/LpConfirmHost-CbywMpMP.js +49 -0
- package/dist/chunks/LpContextMenu-BqkAYa9X.js +69 -0
- package/dist/chunks/LpDatePicker-DuusgT69.js +195 -0
- package/dist/chunks/LpDateRangePicker-DHeuznfC.js +208 -0
- package/dist/chunks/{LpDisclosure-ChQYmjlR.js → LpDisclosure-Cc23-JOT.js} +1 -1
- package/dist/chunks/{LpDrawer-BZ6k3hvo.js → LpDrawer-Dt4aB4Fr.js} +65 -28
- package/dist/chunks/{LpDropdownMenu-DJpoqRCb.js → LpDropdownMenu-DdJGQzPn.js} +2 -1
- package/dist/chunks/{LpEmptyState-Dsdqz1Wj.js → LpEmptyState-BJbZXC8D.js} +1 -1
- package/dist/chunks/LpFieldNotice-wtieLUTj.js +64 -0
- package/dist/chunks/{LpFileTree-_5vFBgaK.js → LpFileTree-CNurOvkV.js} +25 -10
- package/dist/chunks/{LpFileTreeNode-BdcIYKIE.js → LpFileTreeNode-D_qRRdsH.js} +3 -3
- package/dist/chunks/LpFormField-CtVYj6tO.js +101 -0
- package/dist/chunks/{LpIcon-CCnX5_2j.js → LpIcon-DYtaid0K.js} +20 -6
- package/dist/chunks/{LpInput-9EXWUM9B.js → LpInput-D-YGQbEv.js} +58 -20
- package/dist/chunks/{LpLightbox-2sYVMY-S.js → LpLightbox-DSDahF23.js} +148 -61
- package/dist/chunks/{LpLink-DCND-zyu.js → LpLink-Krkjhe_y.js} +15 -6
- package/dist/chunks/{LpLogViewer-CaRy5MeS.js → LpLogViewer-KypbgOyo.js} +300 -72
- package/dist/chunks/{LpMapPicker-ul4oYno6.js → LpMapPicker-Cc84LaM3.js} +39 -14
- package/dist/chunks/{LpMediaGallery-FF-NquIo.js → LpMediaGallery-YKr-cQPN.js} +7 -4
- package/dist/chunks/{LpModal-Bt0pQCI_.js → LpModal-DMMDQHAu.js} +52 -29
- package/dist/chunks/{LpModalNav-YaifHrXC.js → LpModalNav-BVPDyIup.js} +10 -7
- package/dist/chunks/{LpNotificationBell-DyGGsMAM.js → LpNotificationBell-CCwyJP5C.js} +79 -33
- package/dist/chunks/{LpNumberField-CWuX08iX.js → LpNumberField-B77O-z28.js} +21 -8
- package/dist/chunks/{LpNumberFlow-amWYaeuA.js → LpNumberFlow-z4WPZcZu.js} +22 -12
- package/dist/chunks/{LpOtpInput-y2v-pmiN.js → LpOtpInput-CziPF3Oq.js} +37 -8
- package/dist/chunks/{LpPagination-5FxjmmB5.js → LpPagination-BcDlo3r_.js} +31 -20
- package/dist/chunks/{LpPasswordInput--sjYCkLS.js → LpPasswordInput-eKzQhbQP.js} +11 -8
- package/dist/chunks/LpPhoneInput-BCbrrhgE.js +336 -0
- package/dist/chunks/{LpPie-D6OnzwlJ.js → LpPie-BEJ2SfI6.js} +84 -28
- package/dist/chunks/{LpPopover-8268UmlC.js → LpPopover-DCKeqiVn.js} +5 -2
- package/dist/chunks/{LpProgress-Btq5W4Ut.js → LpProgress-CBU1iI69.js} +5 -4
- package/dist/chunks/{LpRadioGroup-xPIuVDO_.js → LpRadioGroup-DmEW0l78.js} +9 -2
- package/dist/chunks/LpRangeCalendar-DZuaRV0W.js +331 -0
- package/dist/chunks/{LpRollingText-CM5gkSeF.js → LpRollingText-DB7upf-5.js} +1 -1
- package/dist/chunks/{LpScrollArea-D8xyKXcF.js → LpScrollArea-Bry1fdOM.js} +14 -2
- package/dist/chunks/{LpSection-aM6J_u51.js → LpSection-tKEH0jYf.js} +1 -1
- package/dist/chunks/{LpSegmented-fV0Sk92p.js → LpSegmented-C09EEam2.js} +8 -4
- package/dist/chunks/{LpSelect-ANIVtrpM.js → LpSelect-DNIL6MB9.js} +50 -31
- package/dist/chunks/{LpSidebar-ClBUwoEz.js → LpSidebar-CQNB0-yU.js} +30 -22
- package/dist/chunks/{LpSidebarNav-llOcs_Fn.js → LpSidebarNav-kx-LdqNU.js} +16 -11
- package/dist/chunks/{LpSkeleton-CTI-vBgW.js → LpSkeleton-BB6XIV-w.js} +1 -1
- package/dist/chunks/{LpSlider-BwNIBkAK.js → LpSlider-Cuzmrd7p.js} +7 -2
- package/dist/chunks/{LpSparkline-C6xQ2dwv.js → LpSparkline-CB80N8SJ.js} +11 -4
- package/dist/chunks/{LpStat-CQaW8R--.js → LpStat-B-7udBRP.js} +2 -2
- package/dist/chunks/{LpStepper-Bk-XaQYU.js → LpStepper-C7XiVKZj.js} +34 -19
- package/dist/chunks/{LpSwitch-Blizvqyt.js → LpSwitch-OrcOJX9m.js} +41 -27
- package/dist/chunks/LpTableFilter-BV8PpLM9.js +158 -0
- package/dist/chunks/{LpTableOfContents-CjvxPMpU.js → LpTableOfContents-BUcAfGPQ.js} +36 -41
- package/dist/chunks/{LpTabs-Cefe_lys.js → LpTabs-29iW1XOx.js} +20 -6
- package/dist/chunks/LpTagsInput-D1SuqbhB.js +300 -0
- package/dist/chunks/LpTextarea-uuScWo6-.js +77 -0
- package/dist/chunks/LpThemeProvider-Be4r2TQX.js +35 -0
- package/dist/chunks/LpThemeSwitcher-B4aVPbNC.js +166 -0
- package/dist/chunks/{LpTilt-DuyKbpkA.js → LpTilt-B7KHX1zH.js} +2 -2
- package/dist/chunks/{LpTimeField-K6nAGboX.js → LpTimeField-Cqe7fXnh.js} +14 -8
- package/dist/chunks/{LpToaster-gDB1EaU3.js → LpToaster-DpJvoCOh.js} +94 -31
- package/dist/chunks/{LpTooltip-hCLPAqMG.js → LpTooltip-CXVKcOXT.js} +14 -6
- package/dist/chunks/LpTooltipProvider-CftjV7Xc.js +25 -0
- package/dist/chunks/{LpTopologyCanvas-Cm1L39uL.js → LpTopologyCanvas-6ozNrQKh.js} +8 -2
- package/dist/chunks/{LpUptimeBar-DvAMno0S.js → LpUptimeBar-ugcv25xj.js} +44 -15
- package/dist/chunks/icons-CkA0njzm.js +43 -0
- package/dist/chunks/{LpThemeSwitcher-Cue-myST.js → useTheme-DJm1JSsY.js} +215 -260
- package/dist/component-names.d.ts +1 -1
- package/dist/components/ContextMenuItems.vue.d.ts +8 -0
- package/dist/components/ContextMenuItems.vue.js +4 -0
- package/dist/components/LayoutCanvas.vue.js +1 -1
- package/dist/components/LayoutNode.vue.d.ts +4 -0
- package/dist/components/LayoutNode.vue.js +1 -1
- package/dist/components/LpActionBar.vue.d.ts +3 -0
- package/dist/components/LpActionBar.vue.js +1 -1
- package/dist/components/LpAddressInput.vue.d.ts +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAlert.vue.d.ts +9 -0
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.d.ts +10 -0
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAutocomplete.vue.d.ts +31 -6
- package/dist/components/LpAutocomplete.vue.js +1 -1
- package/dist/components/LpAvatar.vue.d.ts +3 -3
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpBadge.vue.d.ts +2 -2
- package/dist/components/LpBreadcrumbs.vue.d.ts +13 -9
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpButton.vue.d.ts +35 -98
- package/dist/components/LpButton.vue.js +1 -1
- package/dist/components/LpCalendar.vue.js +1 -1
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpChart.vue.d.ts +47 -3
- package/dist/components/LpChart.vue.js +377 -97
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.d.ts +2 -0
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.d.ts +2 -2
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.d.ts +14 -3
- package/dist/components/LpCommandPalette.vue.js +142 -77
- package/dist/components/LpConfirmDialog.vue.d.ts +15 -3
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.d.ts +9 -0
- package/dist/components/LpConfirmHost.vue.js +4 -0
- package/dist/components/LpContextMenu.vue.d.ts +3 -5
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpDatePicker.vue.d.ts +24 -6
- package/dist/components/LpDatePicker.vue.js +1 -1
- package/dist/components/LpDateRangePicker.vue.d.ts +60 -0
- package/dist/components/LpDateRangePicker.vue.js +4 -0
- package/dist/components/LpDisclosure.vue.js +1 -1
- package/dist/components/LpDrawer.vue.d.ts +10 -0
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropdownMenu.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +23 -7
- package/dist/components/LpEmptyState.vue.js +1 -1
- package/dist/components/LpFieldNotice.vue.d.ts +8 -0
- package/dist/components/LpFieldNotice.vue.js +4 -0
- package/dist/components/LpFileTree.vue.d.ts +11 -2
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.d.ts +13 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpIcon.vue.d.ts +0 -1
- package/dist/components/LpIcon.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.js +93 -58
- package/dist/components/LpInput.vue.d.ts +22 -3
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpLightbox.vue.d.ts +17 -0
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLink.vue.d.ts +11 -11
- package/dist/components/LpLink.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.d.ts +72 -3
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.d.ts +4 -4
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.d.ts +16 -6
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.d.ts +0 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.d.ts +11 -2
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNumberField.vue.d.ts +2 -0
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpNumberFlow.vue.js +1 -1
- package/dist/components/LpOtpInput.vue.js +1 -1
- package/dist/components/LpPagination.vue.d.ts +2 -0
- package/dist/components/LpPagination.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.d.ts +13 -0
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpPie.vue.d.ts +21 -2
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpPopover.vue.d.ts +2 -0
- package/dist/components/LpPopover.vue.js +1 -1
- package/dist/components/LpProgress.vue.d.ts +1 -1
- package/dist/components/LpProgress.vue.js +1 -1
- package/dist/components/LpRadioGroup.vue.js +1 -1
- package/dist/components/LpRangeCalendar.vue.d.ts +51 -0
- package/dist/components/LpRangeCalendar.vue.js +4 -0
- package/dist/components/LpRollingText.vue.d.ts +1 -1
- package/dist/components/LpRollingText.vue.js +1 -1
- package/dist/components/LpScrollArea.vue.d.ts +2 -2
- package/dist/components/LpScrollArea.vue.js +1 -1
- package/dist/components/LpSection.vue.d.ts +1 -1
- package/dist/components/LpSection.vue.js +1 -1
- package/dist/components/LpSegmented.vue.d.ts +5 -0
- package/dist/components/LpSegmented.vue.js +1 -1
- package/dist/components/LpSelect.vue.d.ts +1 -0
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.d.ts +7 -1
- package/dist/components/LpShortcutsDialog.vue.js +60 -15
- package/dist/components/LpSidebar.vue.d.ts +6 -2
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSkeleton.vue.js +1 -1
- package/dist/components/LpSlider.vue.js +1 -1
- package/dist/components/LpSparkline.vue.d.ts +1 -0
- package/dist/components/LpSparkline.vue.js +1 -1
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpStepper.vue.js +1 -1
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTable.vue.d.ts +107 -3
- package/dist/components/LpTable.vue.js +540 -128
- package/dist/components/LpTableFilter.vue.d.ts +31 -0
- package/dist/components/LpTableFilter.vue.js +4 -0
- package/dist/components/LpTableOfContents.vue.d.ts +4 -2
- package/dist/components/LpTableOfContents.vue.js +1 -1
- package/dist/components/LpTabs.vue.d.ts +2 -0
- package/dist/components/LpTabs.vue.js +1 -1
- package/dist/components/LpTagsInput.vue.d.ts +77 -0
- package/dist/components/LpTagsInput.vue.js +4 -0
- package/dist/components/LpTextarea.vue.d.ts +19 -6
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpThemeProvider.vue.d.ts +22 -0
- package/dist/components/LpThemeProvider.vue.js +4 -0
- package/dist/components/LpThemeSwitcher.vue.d.ts +15 -2
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpTilt.vue.js +1 -1
- package/dist/components/LpTimeField.vue.js +1 -1
- package/dist/components/LpToaster.vue.d.ts +6 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTooltip.vue.d.ts +1 -2
- package/dist/components/LpTooltip.vue.js +1 -1
- package/dist/components/LpTooltipProvider.vue.d.ts +22 -0
- package/dist/components/LpTooltipProvider.vue.js +4 -0
- package/dist/components/LpTopologyCanvas.vue.js +1 -1
- package/dist/components/LpUptimeBar.vue.d.ts +4 -0
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/chart.d.ts +32 -1
- package/dist/components/chart.js +42 -6
- package/dist/components/codeHighlight.d.ts +6 -0
- package/dist/components/codeHighlight.js +92 -20
- package/dist/components/color.d.ts +1 -1
- package/dist/components/color.js +20 -9
- package/dist/components/commandSearch.js +3 -0
- package/dist/components/confirm.d.ts +25 -0
- package/dist/components/confirm.js +26 -0
- package/dist/components/countries.d.ts +6 -0
- package/dist/components/countries.js +7 -0
- package/dist/components/dateRange.d.ts +43 -0
- package/dist/components/dateRange.js +76 -0
- package/dist/components/exportData.d.ts +58 -0
- package/dist/components/exportData.js +165 -0
- package/dist/components/fileTree.js +16 -7
- package/dist/components/imageCrop.d.ts +42 -0
- package/dist/components/imageCrop.js +47 -0
- package/dist/components/link.d.ts +12 -0
- package/dist/components/link.js +19 -0
- package/dist/components/logSearch.d.ts +18 -0
- package/dist/components/logSearch.js +36 -0
- package/dist/components/modalDepth.d.ts +18 -2
- package/dist/components/modalDepth.js +17 -5
- package/dist/components/otp.d.ts +5 -0
- package/dist/components/otp.js +10 -0
- package/dist/components/phone.d.ts +41 -0
- package/dist/components/phone.js +80 -0
- package/dist/components/sidebar.d.ts +7 -1
- package/dist/components/tableFilter.d.ts +36 -0
- package/dist/components/tableFilter.js +84 -0
- package/dist/components/tableSort.d.ts +8 -0
- package/dist/components/tableSort.js +31 -0
- package/dist/components/tags.d.ts +20 -0
- package/dist/components/tags.js +37 -0
- package/dist/composables/useField.d.ts +38 -0
- package/dist/composables/useField.js +45 -0
- package/dist/composables/useFieldNotice.d.ts +17 -0
- package/dist/composables/useFieldNotice.js +28 -0
- package/dist/composables/useForm.d.ts +53 -0
- package/dist/composables/useForm.js +207 -0
- package/dist/composables/useFormDraft.d.ts +10 -3
- package/dist/composables/useFormDraft.js +9 -14
- package/dist/composables/useHotkeys.d.ts +81 -5
- package/dist/composables/useHotkeys.js +223 -25
- package/dist/composables/useInputFilter.d.ts +17 -0
- package/dist/composables/useInputFilter.js +47 -10
- package/dist/composables/useInputMask.d.ts +59 -0
- package/dist/composables/useInputMask.js +170 -0
- package/dist/composables/useLpConfig.d.ts +24 -0
- package/dist/composables/useLpConfig.js +44 -0
- package/dist/composables/usePaintSelect.d.ts +22 -0
- package/dist/composables/usePaintSelect.js +169 -0
- package/dist/composables/useRovingFocus.js +7 -0
- package/dist/composables/useShift.js +7 -2
- package/dist/composables/useTilt.d.ts +2 -2
- package/dist/composables/useTilt.js +5 -6
- package/dist/composables/useToast.d.ts +20 -0
- package/dist/composables/useToast.js +28 -4
- package/dist/composables/useZoomPan.d.ts +3 -3
- package/dist/composables/useZoomPan.js +4 -4
- package/dist/icons-all.d.ts +1 -0
- package/dist/icons-all.js +3 -0
- package/dist/icons.d.ts +14 -1
- package/dist/index.d.ts +60 -4
- package/dist/index.js +245 -141
- package/dist/kit-icons.d.ts +2 -0
- package/dist/layout/tree.d.ts +2 -0
- package/dist/layout/tree.js +16 -1
- package/dist/layout/useLayout.d.ts +15 -0
- package/dist/layout/useLayout.js +41 -14
- package/dist/theme/backdrop.d.ts +12 -0
- package/dist/theme/presets.d.ts +0 -2
- package/dist/theme/useTheme.d.ts +32 -9
- package/package.json +18 -8
- package/src/component-names.ts +9 -7
- package/src/components/ContextMenuItems.vue +88 -0
- package/src/components/LayoutCanvas.vue +26 -6
- package/src/components/LayoutNode.vue +30 -4
- package/src/components/LpActionBar.vue +31 -8
- package/src/components/LpAddressInput.vue +57 -41
- package/src/components/LpAlert.vue +16 -3
- package/src/components/LpAppShell.vue +45 -12
- package/src/components/LpAutocomplete.vue +47 -10
- package/src/components/LpAvatar.vue +20 -6
- package/src/components/LpBreadcrumbs.vue +65 -41
- package/src/components/LpButton.vue +60 -14
- package/src/components/LpChart.vue +351 -28
- package/src/components/LpCheckbox.vue +7 -3
- package/src/components/LpCodeBlock.vue +50 -14
- package/src/components/LpColorPicker.vue +73 -10
- package/src/components/LpCommandPalette.vue +115 -20
- package/src/components/LpConfirmDialog.vue +68 -17
- package/src/components/LpConfirmHost.vue +59 -0
- package/src/components/LpContextMenu.vue +15 -116
- package/src/components/LpDatePicker.vue +104 -68
- package/src/components/LpDateRangePicker.vue +224 -0
- package/src/components/LpDrawer.vue +56 -19
- package/src/components/LpDropdownMenu.vue +1 -0
- package/src/components/LpDropzone.vue +21 -4
- package/src/components/LpFieldNotice.vue +65 -0
- package/src/components/LpFileTree.vue +33 -7
- package/src/components/LpFormField.vue +59 -7
- package/src/components/LpIcon.vue +22 -4
- package/src/components/LpImageEditor.vue +96 -57
- package/src/components/LpInput.vue +62 -11
- package/src/components/LpLightbox.vue +140 -29
- package/src/components/LpLink.vue +24 -13
- package/src/components/LpLogViewer.vue +311 -39
- package/src/components/LpMapPicker.vue +36 -13
- package/src/components/LpMediaGallery.vue +8 -2
- package/src/components/LpModal.vue +54 -28
- package/src/components/LpModalNav.vue +5 -2
- package/src/components/LpNotificationBell.vue +77 -23
- package/src/components/LpNumberField.vue +21 -6
- package/src/components/LpNumberFlow.vue +26 -10
- package/src/components/LpOtpInput.vue +43 -8
- package/src/components/LpPagination.vue +23 -7
- package/src/components/LpPasswordInput.vue +4 -1
- package/src/components/LpPhoneInput.vue +224 -39
- package/src/components/LpPie.vue +102 -20
- package/src/components/LpPopover.vue +4 -0
- package/src/components/LpProgress.vue +5 -3
- package/src/components/LpRadioGroup.vue +9 -2
- package/src/components/LpRangeCalendar.vue +365 -0
- package/src/components/LpRollingText.vue +3 -0
- package/src/components/LpScrollArea.vue +22 -2
- package/src/components/LpSegmented.vue +12 -2
- package/src/components/LpSelect.vue +0 -0
- package/src/components/LpShortcutsDialog.vue +83 -9
- package/src/components/LpSidebar.vue +14 -9
- package/src/components/LpSidebarNav.vue +17 -5
- package/src/components/LpSkeleton.vue +4 -1
- package/src/components/LpSlider.vue +7 -1
- package/src/components/LpSparkline.vue +11 -3
- package/src/components/LpStepper.vue +23 -10
- package/src/components/LpSwitch.vue +31 -8
- package/src/components/LpTable.vue +668 -90
- package/src/components/LpTableFilter.vue +175 -0
- package/src/components/LpTableOfContents.vue +50 -32
- package/src/components/LpTabs.vue +23 -6
- package/src/components/LpTagsInput.vue +364 -0
- package/src/components/LpTextarea.vue +44 -6
- package/src/components/LpThemeProvider.vue +41 -0
- package/src/components/LpThemeSwitcher.vue +76 -33
- package/src/components/LpTilt.vue +2 -2
- package/src/components/LpTimeField.vue +14 -3
- package/src/components/LpToaster.vue +115 -27
- package/src/components/LpTooltip.vue +29 -5
- package/src/components/LpTooltipProvider.vue +24 -0
- package/src/components/LpTopologyCanvas.vue +19 -2
- package/src/components/LpUptimeBar.vue +46 -8
- package/src/components/chart.ts +82 -8
- package/src/components/codeHighlight.ts +111 -15
- package/src/components/color.ts +30 -9
- package/src/components/commandSearch.ts +6 -0
- package/src/components/confirm.ts +58 -0
- package/src/components/countries.ts +12 -0
- package/src/components/dateRange.ts +134 -0
- package/src/components/exportData.ts +228 -0
- package/src/components/fileTree.ts +19 -7
- package/src/components/imageCrop.ts +107 -0
- package/src/components/link.ts +34 -0
- package/src/components/logSearch.ts +46 -0
- package/src/components/modalDepth.ts +48 -6
- package/src/components/otp.ts +16 -0
- package/src/components/phone.ts +140 -0
- package/src/components/sidebar.ts +7 -1
- package/src/components/tableFilter.ts +122 -0
- package/src/components/tableSort.ts +37 -0
- package/src/components/tags.ts +62 -0
- package/src/composables/useField.ts +83 -0
- package/src/composables/useFieldNotice.ts +59 -0
- package/src/composables/useForm.ts +314 -0
- package/src/composables/useFormDraft.ts +25 -20
- package/src/composables/useHotkeys.ts +355 -28
- package/src/composables/useInputFilter.ts +77 -14
- package/src/composables/useInputMask.ts +254 -0
- package/src/composables/useLpConfig.ts +87 -0
- package/src/composables/usePaintSelect.ts +243 -0
- package/src/composables/useRovingFocus.ts +11 -0
- package/src/composables/useShift.ts +13 -2
- package/src/composables/useTilt.ts +5 -6
- package/src/composables/useToast.ts +56 -4
- package/src/composables/useZoomPan.ts +6 -6
- package/src/iconSubset.d.mts +10 -0
- package/src/iconSubset.mjs +51 -0
- package/src/icons-all.ts +10 -0
- package/src/icons.ts +59 -8
- package/src/index.ts +73 -4
- package/src/kit-icons.ts +5 -0
- package/src/layout/tree.ts +30 -0
- package/src/layout/useLayout.ts +68 -18
- package/src/nuxt.ts +87 -17
- package/src/runtime/config.plugin.ts +14 -0
- package/src/runtime/theme.plugin.ts +43 -23
- package/src/theme/backdrop.ts +69 -0
- package/src/theme/presets.ts +6 -64
- package/src/theme/useTheme.ts +206 -100
- package/src/tokens/tokens.css +46 -0
- package/dist/chunks/LpBreadcrumbs-p4jHe_V-.js +0 -62
- package/dist/chunks/LpContextMenu-CwW1QXe_.js +0 -217
- package/dist/chunks/LpDatePicker-CwOToxGq.js +0 -164
- package/dist/chunks/LpFormField-CazBc2-a.js +0 -62
- package/dist/chunks/LpPhoneInput-BDSKVl_z.js +0 -209
- package/dist/chunks/LpTextarea-t7F6gv8E.js +0 -47
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent, watch, onBeforeUnmount, computed,
|
|
1
|
+
import { defineComponent, ref, watch, onBeforeUnmount, computed, nextTick, openBlock, createBlock, unref, withCtx, createVNode, normalizeStyle, normalizeClass, createTextVNode, toDisplayString, createElementVNode, createElementBlock, createCommentVNode, renderSlot, withModifiers, Fragment, renderList } from "vue";
|
|
2
2
|
import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription } from "reka-ui";
|
|
3
|
+
import { useLabels } from "../composables/useLpConfig.js";
|
|
3
4
|
import { useZoomPan } from "../composables/useZoomPan.js";
|
|
4
5
|
import { fileNameOf } from "../components/lightbox.js";
|
|
5
|
-
import { _ as _sfc_main$1 } from "./LpIcon-
|
|
6
|
+
import { _ as _sfc_main$1 } from "./LpIcon-DYtaid0K.js";
|
|
6
7
|
import { useModalLayer } from "../components/modalDepth.js";
|
|
7
8
|
const _hoisted_1 = { class: "flex shrink-0 items-center gap-1 p-3 text-sm text-white/70 [--chrome-from:-8px] animate-[lightbox-chrome-in_var(--duration-medium)_var(--ease-emphasized)_60ms_both] motion-reduce:animate-none" };
|
|
8
9
|
const _hoisted_2 = {
|
|
@@ -14,28 +15,40 @@ const _hoisted_3 = {
|
|
|
14
15
|
class: "px-2 tabular-nums"
|
|
15
16
|
};
|
|
16
17
|
const _hoisted_4 = { class: "ml-auto flex items-center gap-1" };
|
|
17
|
-
const _hoisted_5 = ["
|
|
18
|
-
const _hoisted_6 =
|
|
18
|
+
const _hoisted_5 = ["title"];
|
|
19
|
+
const _hoisted_6 = ["title"];
|
|
20
|
+
const _hoisted_7 = ["title"];
|
|
21
|
+
const _hoisted_8 = ["title"];
|
|
22
|
+
const _hoisted_9 = ["title"];
|
|
23
|
+
const _hoisted_10 = ["title"];
|
|
24
|
+
const _hoisted_11 = ["disabled", "aria-label"];
|
|
25
|
+
const _hoisted_12 = {
|
|
19
26
|
key: 0,
|
|
20
27
|
class: "flex flex-col items-center gap-3 text-white/60"
|
|
21
28
|
};
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
const _hoisted_13 = { class: "text-sm" };
|
|
30
|
+
const _hoisted_14 = {
|
|
31
|
+
key: 1,
|
|
32
|
+
class: "flex flex-col items-center gap-3 text-white/70"
|
|
33
|
+
};
|
|
34
|
+
const _hoisted_15 = { class: "text-sm font-medium" };
|
|
35
|
+
const _hoisted_16 = ["src", "alt"];
|
|
36
|
+
const _hoisted_17 = ["disabled", "aria-label"];
|
|
37
|
+
const _hoisted_18 = { class: "shrink-0 p-3 pt-2 animate-[lightbox-chrome-in_var(--duration-medium)_var(--ease-emphasized)_60ms_both] motion-reduce:animate-none" };
|
|
38
|
+
const _hoisted_19 = {
|
|
26
39
|
key: 0,
|
|
27
40
|
class: "mb-2 text-center"
|
|
28
41
|
};
|
|
29
|
-
const
|
|
42
|
+
const _hoisted_20 = {
|
|
30
43
|
key: 0,
|
|
31
44
|
class: "truncate text-sm font-medium text-white"
|
|
32
45
|
};
|
|
33
|
-
const
|
|
46
|
+
const _hoisted_21 = {
|
|
34
47
|
key: 1,
|
|
35
48
|
class: "truncate text-xs text-white/55"
|
|
36
49
|
};
|
|
37
|
-
const
|
|
38
|
-
const
|
|
50
|
+
const _hoisted_22 = ["data-index", "aria-label", "onClick"];
|
|
51
|
+
const _hoisted_23 = ["src", "alt"];
|
|
39
52
|
const WHEEL_STEP = 60;
|
|
40
53
|
const BTN = "flex size-9 items-center justify-center rounded-control text-white/80 outline-none transition-colors duration-[var(--duration-fast)] hover:bg-white/15 hover:text-white focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40";
|
|
41
54
|
const ARROW = "absolute top-1/2 z-10 flex size-11 -translate-y-1/2 items-center justify-center rounded-pill bg-black/45 text-white/75 ring-1 ring-white/0 outline-none backdrop-blur-sm transition-[background-color,scale,color,box-shadow] duration-[var(--duration-fast)] ease-[var(--ease-emphasized)] hover:bg-white/20 hover:text-white hover:ring-white/30 hover:scale-110 active:scale-95 focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-0 motion-reduce:transition-none motion-reduce:hover:scale-100 motion-reduce:active:scale-100";
|
|
@@ -50,20 +63,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
63
|
downloadable: { type: Boolean, default: true },
|
|
51
64
|
copyable: { type: Boolean, default: false },
|
|
52
65
|
loop: { type: Boolean, default: true },
|
|
53
|
-
maxZoom: { default: 8 }
|
|
66
|
+
maxZoom: { default: 8 },
|
|
67
|
+
labels: {}
|
|
54
68
|
},
|
|
55
69
|
emits: ["update:open", "update:index", "change", "download", "copy"],
|
|
56
70
|
setup(__props, { emit: __emit }) {
|
|
57
71
|
const props = __props;
|
|
58
72
|
const emit = __emit;
|
|
59
|
-
const
|
|
73
|
+
const text = useLabels(
|
|
74
|
+
"lightbox",
|
|
75
|
+
{
|
|
76
|
+
viewer: "Image viewer",
|
|
77
|
+
position: "Image {index} of {total}",
|
|
78
|
+
previous: "Previous image",
|
|
79
|
+
next: "Next image",
|
|
80
|
+
zoomIn: "Zoom in (+)",
|
|
81
|
+
zoomOut: "Zoom out (−)",
|
|
82
|
+
rotate: "Rotate (R)",
|
|
83
|
+
copy: "Copy image",
|
|
84
|
+
download: "Download",
|
|
85
|
+
close: "Close (Esc)",
|
|
86
|
+
failed: "This image couldn't be loaded.",
|
|
87
|
+
spoiler: "Spoiler",
|
|
88
|
+
reveal: "Show image"
|
|
89
|
+
},
|
|
90
|
+
() => props.labels
|
|
91
|
+
);
|
|
92
|
+
const position = (i) => text.value.position.replace("{index}", String(i + 1)).replace("{total}", String(props.items.length));
|
|
93
|
+
const contentRef = ref(null);
|
|
94
|
+
const { claim, release, layer } = useModalLayer({ element: () => contentRef.value?.$el });
|
|
60
95
|
watch(() => props.open, (open) => open ? claim() : release(), { immediate: true });
|
|
61
96
|
onBeforeUnmount(release);
|
|
62
|
-
const zoom = useZoomPan({ max: props.maxZoom });
|
|
97
|
+
const zoom = useZoomPan({ max: () => props.maxZoom });
|
|
63
98
|
const scale = computed(() => zoom.scale.value);
|
|
64
99
|
const isZoomed = computed(() => zoom.zoomed.value);
|
|
65
100
|
const isPanning = computed(() => zoom.panning.value);
|
|
66
|
-
const
|
|
101
|
+
const shown = ref(props.index);
|
|
102
|
+
watch(() => props.index, (i) => shown.value = i);
|
|
103
|
+
const current = computed(() => Math.min(Math.max(shown.value, 0), Math.max(props.items.length - 1, 0)));
|
|
67
104
|
const item = computed(() => props.items[current.value]);
|
|
68
105
|
const total = computed(() => props.items.length);
|
|
69
106
|
const showStrip = computed(() => props.filmstrip ?? total.value > 1);
|
|
@@ -79,6 +116,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
116
|
const wrapped = props.loop ? (next + total.value) % total.value : Math.min(Math.max(next, 0), total.value - 1);
|
|
80
117
|
if (wrapped === current.value) return;
|
|
81
118
|
direction.value = next > current.value ? 1 : -1;
|
|
119
|
+
shown.value = wrapped;
|
|
82
120
|
emit("update:index", wrapped);
|
|
83
121
|
emit("change", wrapped, props.items[wrapped]);
|
|
84
122
|
}
|
|
@@ -124,6 +162,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
124
162
|
function close() {
|
|
125
163
|
emit("update:open", false);
|
|
126
164
|
}
|
|
165
|
+
const revealed = ref(/* @__PURE__ */ new Set());
|
|
166
|
+
const covered = (i) => !!props.items[i]?.spoiler && !revealed.value.has(i);
|
|
167
|
+
function reveal(i) {
|
|
168
|
+
revealed.value = new Set(revealed.value).add(i);
|
|
169
|
+
}
|
|
170
|
+
watch(
|
|
171
|
+
() => props.open,
|
|
172
|
+
(open) => {
|
|
173
|
+
if (!open) revealed.value = /* @__PURE__ */ new Set();
|
|
174
|
+
}
|
|
175
|
+
);
|
|
127
176
|
function onKeydown(e) {
|
|
128
177
|
switch (e.key) {
|
|
129
178
|
case "ArrowRight":
|
|
@@ -190,18 +239,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
190
239
|
if (e.target.closest("[data-lightbox-image]")) return;
|
|
191
240
|
close();
|
|
192
241
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
242
|
+
function sameOrigin(src) {
|
|
243
|
+
try {
|
|
244
|
+
const url = new URL(src, window.location.href);
|
|
245
|
+
return url.protocol === "blob:" || url.protocol === "data:" || url.origin === window.location.origin;
|
|
246
|
+
} catch {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function save(href, name, newTab = false) {
|
|
197
251
|
const a = document.createElement("a");
|
|
198
|
-
a.href =
|
|
199
|
-
|
|
200
|
-
|
|
252
|
+
a.href = href;
|
|
253
|
+
if (newTab) {
|
|
254
|
+
a.target = "_blank";
|
|
255
|
+
a.rel = "noopener";
|
|
256
|
+
} else {
|
|
257
|
+
a.download = name;
|
|
258
|
+
}
|
|
201
259
|
document.body.appendChild(a);
|
|
202
260
|
a.click();
|
|
203
261
|
a.remove();
|
|
204
262
|
}
|
|
263
|
+
async function download() {
|
|
264
|
+
const target = item.value;
|
|
265
|
+
if (!target) return;
|
|
266
|
+
emit("download", target);
|
|
267
|
+
const name = fileNameOf(target);
|
|
268
|
+
if (sameOrigin(target.src)) return save(target.src, name);
|
|
269
|
+
try {
|
|
270
|
+
const response = await fetch(target.src, { mode: "cors" });
|
|
271
|
+
if (!response.ok) throw new Error(String(response.status));
|
|
272
|
+
const url = URL.createObjectURL(await response.blob());
|
|
273
|
+
save(url, name);
|
|
274
|
+
window.setTimeout(() => URL.revokeObjectURL(url), 0);
|
|
275
|
+
} catch {
|
|
276
|
+
save(target.src, name, true);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
205
279
|
async function copy() {
|
|
206
280
|
const target = item.value;
|
|
207
281
|
if (!target) return;
|
|
@@ -233,7 +307,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
233
307
|
return (_ctx, _cache) => {
|
|
234
308
|
return openBlock(), createBlock(unref(DialogRoot), {
|
|
235
309
|
open: __props.open,
|
|
236
|
-
"onUpdate:open": _cache[
|
|
310
|
+
"onUpdate:open": _cache[9] || (_cache[9] = (v) => emit("update:open", v))
|
|
237
311
|
}, {
|
|
238
312
|
default: withCtx(() => [
|
|
239
313
|
createVNode(unref(DialogPortal), null, {
|
|
@@ -243,6 +317,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
243
317
|
style: normalizeStyle({ zIndex: unref(layer).scrim })
|
|
244
318
|
}, null, 8, ["class", "style"]),
|
|
245
319
|
createVNode(unref(DialogContent), {
|
|
320
|
+
ref_key: "contentRef",
|
|
321
|
+
ref: contentRef,
|
|
246
322
|
class: "fixed inset-0 flex flex-col outline-none data-[state=open]:animate-[lightbox-in_var(--duration-medium)_var(--ease-emphasized)] data-[state=closed]:animate-[lightbox-out_140ms_cubic-bezier(0.4,0,1,1)] motion-reduce:animate-none",
|
|
247
323
|
style: normalizeStyle({ zIndex: unref(layer).panel }),
|
|
248
324
|
onKeydown
|
|
@@ -250,13 +326,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
250
326
|
default: withCtx(() => [
|
|
251
327
|
createVNode(unref(DialogTitle), { class: "sr-only" }, {
|
|
252
328
|
default: withCtx(() => [
|
|
253
|
-
createTextVNode(toDisplayString(item.value?.title ??
|
|
329
|
+
createTextVNode(toDisplayString(item.value?.title ?? unref(text).viewer), 1)
|
|
254
330
|
]),
|
|
255
331
|
_: 1
|
|
256
332
|
}),
|
|
257
333
|
createVNode(unref(DialogDescription), { class: "sr-only" }, {
|
|
258
334
|
default: withCtx(() => [
|
|
259
|
-
createTextVNode(toDisplayString(item.value?.description ??
|
|
335
|
+
createTextVNode(toDisplayString(item.value?.description ?? position(current.value)), 1)
|
|
260
336
|
]),
|
|
261
337
|
_: 1
|
|
262
338
|
}),
|
|
@@ -271,72 +347,72 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
271
347
|
createElementVNode("button", {
|
|
272
348
|
class: normalizeClass(BTN),
|
|
273
349
|
type: "button",
|
|
274
|
-
title:
|
|
350
|
+
title: unref(text).zoomOut,
|
|
275
351
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(zoom).zoomBy(1 / 1.3))
|
|
276
352
|
}, [
|
|
277
353
|
createVNode(_sfc_main$1, {
|
|
278
354
|
name: "lucide:zoom-out",
|
|
279
355
|
size: 18
|
|
280
356
|
})
|
|
281
|
-
]),
|
|
357
|
+
], 8, _hoisted_5),
|
|
282
358
|
createElementVNode("button", {
|
|
283
359
|
class: normalizeClass(BTN),
|
|
284
360
|
type: "button",
|
|
285
|
-
title:
|
|
361
|
+
title: unref(text).zoomIn,
|
|
286
362
|
onClick: _cache[1] || (_cache[1] = ($event) => unref(zoom).zoomBy(1.3))
|
|
287
363
|
}, [
|
|
288
364
|
createVNode(_sfc_main$1, {
|
|
289
365
|
name: "lucide:zoom-in",
|
|
290
366
|
size: 18
|
|
291
367
|
})
|
|
292
|
-
]),
|
|
368
|
+
], 8, _hoisted_6),
|
|
293
369
|
__props.rotatable ? (openBlock(), createElementBlock("button", {
|
|
294
370
|
key: 0,
|
|
295
371
|
class: normalizeClass(BTN),
|
|
296
372
|
type: "button",
|
|
297
|
-
title:
|
|
373
|
+
title: unref(text).rotate,
|
|
298
374
|
onClick: rotate
|
|
299
375
|
}, [
|
|
300
376
|
createVNode(_sfc_main$1, {
|
|
301
377
|
name: "lucide:rotate-cw",
|
|
302
378
|
size: 18
|
|
303
379
|
})
|
|
304
|
-
])) : createCommentVNode("", true),
|
|
380
|
+
], 8, _hoisted_7)) : createCommentVNode("", true),
|
|
305
381
|
__props.copyable ? (openBlock(), createElementBlock("button", {
|
|
306
382
|
key: 1,
|
|
307
383
|
class: normalizeClass(BTN),
|
|
308
384
|
type: "button",
|
|
309
|
-
title:
|
|
385
|
+
title: unref(text).copy,
|
|
310
386
|
onClick: copy
|
|
311
387
|
}, [
|
|
312
388
|
createVNode(_sfc_main$1, {
|
|
313
389
|
name: "lucide:copy",
|
|
314
390
|
size: 18
|
|
315
391
|
})
|
|
316
|
-
])) : createCommentVNode("", true),
|
|
392
|
+
], 8, _hoisted_8)) : createCommentVNode("", true),
|
|
317
393
|
__props.downloadable ? (openBlock(), createElementBlock("button", {
|
|
318
394
|
key: 2,
|
|
319
395
|
class: normalizeClass(BTN),
|
|
320
396
|
type: "button",
|
|
321
|
-
title:
|
|
397
|
+
title: unref(text).download,
|
|
322
398
|
onClick: download
|
|
323
399
|
}, [
|
|
324
400
|
createVNode(_sfc_main$1, {
|
|
325
401
|
name: "lucide:download",
|
|
326
402
|
size: 18
|
|
327
403
|
})
|
|
328
|
-
])) : createCommentVNode("", true),
|
|
404
|
+
], 8, _hoisted_9)) : createCommentVNode("", true),
|
|
329
405
|
createElementVNode("button", {
|
|
330
406
|
class: normalizeClass(BTN),
|
|
331
407
|
type: "button",
|
|
332
|
-
title:
|
|
408
|
+
title: unref(text).close,
|
|
333
409
|
onClick: close
|
|
334
410
|
}, [
|
|
335
411
|
createVNode(_sfc_main$1, {
|
|
336
412
|
name: "lucide:x",
|
|
337
413
|
size: 20
|
|
338
414
|
})
|
|
339
|
-
])
|
|
415
|
+
], 8, _hoisted_10)
|
|
340
416
|
])
|
|
341
417
|
]),
|
|
342
418
|
createElementVNode("div", {
|
|
@@ -345,10 +421,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
345
421
|
class: normalizeClass(["relative flex min-h-0 flex-1 items-center justify-center overflow-hidden", isPanning.value ? "cursor-grabbing" : isZoomed.value ? "cursor-grab" : ""]),
|
|
346
422
|
onWheel: onStageWheel,
|
|
347
423
|
onPointerdown: onPointerDown,
|
|
348
|
-
onPointermove: _cache[
|
|
424
|
+
onPointermove: _cache[7] || (_cache[7] = //@ts-ignore
|
|
349
425
|
(...args) => unref(zoom).onPointerMove && unref(zoom).onPointerMove(...args)),
|
|
350
426
|
onPointerup: onPointerUp,
|
|
351
|
-
onPointercancel: _cache[
|
|
427
|
+
onPointercancel: _cache[8] || (_cache[8] = //@ts-ignore
|
|
352
428
|
(...args) => unref(zoom).onPointerUp && unref(zoom).onPointerUp(...args)),
|
|
353
429
|
onDblclick: onDoubleClick,
|
|
354
430
|
onClick: onViewportClick
|
|
@@ -357,33 +433,44 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
357
433
|
class: normalizeClass([ARROW, "left-4"]),
|
|
358
434
|
type: "button",
|
|
359
435
|
disabled: !canPrev.value,
|
|
360
|
-
"aria-label":
|
|
436
|
+
"aria-label": unref(text).previous,
|
|
361
437
|
onClick: _cache[2] || (_cache[2] = withModifiers(($event) => go(current.value - 1), ["stop"]))
|
|
362
438
|
}, [
|
|
363
439
|
createVNode(_sfc_main$1, {
|
|
364
440
|
name: "lucide:chevron-left",
|
|
365
441
|
size: 24
|
|
366
442
|
})
|
|
367
|
-
], 10,
|
|
368
|
-
failed.value ? (openBlock(), createElementBlock("div",
|
|
443
|
+
], 10, _hoisted_11),
|
|
444
|
+
failed.value ? (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
369
445
|
createVNode(_sfc_main$1, {
|
|
370
446
|
name: "lucide:image-off",
|
|
371
447
|
size: 40
|
|
372
448
|
}),
|
|
373
|
-
|
|
449
|
+
createElementVNode("p", _hoisted_13, toDisplayString(unref(text).failed), 1)
|
|
450
|
+
])) : item.value && covered(current.value) ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
451
|
+
createVNode(_sfc_main$1, {
|
|
452
|
+
name: "lucide:eye-off",
|
|
453
|
+
size: 36
|
|
454
|
+
}),
|
|
455
|
+
createElementVNode("p", _hoisted_15, toDisplayString(unref(text).spoiler), 1),
|
|
456
|
+
createElementVNode("button", {
|
|
457
|
+
type: "button",
|
|
458
|
+
class: "rounded-control bg-white/15 px-3 py-1.5 text-sm text-white outline-none transition-colors hover:bg-white/25 focus-visible:ring-2 focus-visible:ring-ring",
|
|
459
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(($event) => reveal(current.value), ["stop"]))
|
|
460
|
+
}, toDisplayString(unref(text).reveal), 1)
|
|
374
461
|
])) : item.value ? (openBlock(), createElementBlock("img", {
|
|
375
|
-
key: item.value.src
|
|
462
|
+
key: `${current.value}:${item.value.src}`,
|
|
376
463
|
"data-lightbox-image": "",
|
|
377
464
|
src: item.value.src,
|
|
378
465
|
alt: item.value.title ?? "",
|
|
379
466
|
class: "max-h-full max-w-full select-none object-contain transition-transform duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] animate-[lightbox-frame-in_var(--duration-medium)_var(--ease-emphasized)] motion-reduce:animate-none motion-reduce:transition-none",
|
|
380
467
|
style: normalizeStyle(imageStyle.value),
|
|
381
468
|
draggable: "false",
|
|
382
|
-
onLoad: _cache[
|
|
383
|
-
onError: _cache[
|
|
384
|
-
}, null, 44,
|
|
385
|
-
loading.value && !failed.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
386
|
-
key:
|
|
469
|
+
onLoad: _cache[4] || (_cache[4] = ($event) => loading.value = false),
|
|
470
|
+
onError: _cache[5] || (_cache[5] = ($event) => (failed.value = true, loading.value = false))
|
|
471
|
+
}, null, 44, _hoisted_16)) : createCommentVNode("", true),
|
|
472
|
+
loading.value && !failed.value && !covered(current.value) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
473
|
+
key: 3,
|
|
387
474
|
name: "lucide:loader-circle",
|
|
388
475
|
size: 28,
|
|
389
476
|
class: "absolute animate-spin text-white/50"
|
|
@@ -392,24 +479,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
392
479
|
class: normalizeClass([ARROW, "right-4"]),
|
|
393
480
|
type: "button",
|
|
394
481
|
disabled: !canNext.value,
|
|
395
|
-
"aria-label":
|
|
396
|
-
onClick: _cache[
|
|
482
|
+
"aria-label": unref(text).next,
|
|
483
|
+
onClick: _cache[6] || (_cache[6] = withModifiers(($event) => go(current.value + 1), ["stop"]))
|
|
397
484
|
}, [
|
|
398
485
|
createVNode(_sfc_main$1, {
|
|
399
486
|
name: "lucide:chevron-right",
|
|
400
487
|
size: 24
|
|
401
488
|
})
|
|
402
|
-
], 10,
|
|
489
|
+
], 10, _hoisted_17)
|
|
403
490
|
], 34),
|
|
404
|
-
createElementVNode("div",
|
|
491
|
+
createElementVNode("div", _hoisted_18, [
|
|
405
492
|
renderSlot(_ctx.$slots, "caption", {
|
|
406
493
|
item: item.value,
|
|
407
494
|
index: current.value,
|
|
408
495
|
total: total.value
|
|
409
496
|
}, () => [
|
|
410
|
-
item.value?.title || item.value?.description ? (openBlock(), createElementBlock("div",
|
|
411
|
-
item.value.title ? (openBlock(), createElementBlock("p",
|
|
412
|
-
item.value.description ? (openBlock(), createElementBlock("p",
|
|
497
|
+
item.value?.title || item.value?.description ? (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
498
|
+
item.value.title ? (openBlock(), createElementBlock("p", _hoisted_20, toDisplayString(item.value.title), 1)) : createCommentVNode("", true),
|
|
499
|
+
item.value.description ? (openBlock(), createElementBlock("p", _hoisted_21, toDisplayString(item.value.description), 1)) : createCommentVNode("", true)
|
|
413
500
|
])) : createCommentVNode("", true)
|
|
414
501
|
]),
|
|
415
502
|
showStrip.value && total.value > 1 ? (openBlock(), createElementBlock("div", {
|
|
@@ -425,16 +512,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
425
512
|
type: "button",
|
|
426
513
|
style: normalizeStyle({ "--thumb-delay": `${Math.min(i * 30, 240)}ms` }),
|
|
427
514
|
class: normalizeClass(["size-14 shrink-0 overflow-hidden rounded-control outline-none ring-2 transition-[opacity,box-shadow,scale] duration-[var(--duration-fast)] hover:scale-105 focus-visible:ring-ring animate-[lightbox-chrome-in_var(--duration-medium)_var(--ease-emphasized)_both] [animation-delay:var(--thumb-delay)] motion-reduce:animate-none", i === current.value ? "opacity-100 ring-brand" : "opacity-45 ring-transparent hover:opacity-80"]),
|
|
428
|
-
"aria-label": entry.title ??
|
|
515
|
+
"aria-label": entry.title ?? position(i),
|
|
429
516
|
onClick: ($event) => go(i)
|
|
430
517
|
}, [
|
|
431
518
|
createElementVNode("img", {
|
|
432
519
|
src: entry.thumb ?? entry.src,
|
|
433
520
|
alt: entry.title ?? "",
|
|
434
|
-
class: "size-full object-cover",
|
|
521
|
+
class: normalizeClass(["size-full object-cover", covered(i) ? "scale-110 blur-md" : ""]),
|
|
435
522
|
draggable: "false"
|
|
436
|
-
}, null,
|
|
437
|
-
], 14,
|
|
523
|
+
}, null, 10, _hoisted_23)
|
|
524
|
+
], 14, _hoisted_22);
|
|
438
525
|
}), 128))
|
|
439
526
|
], 512)) : createCommentVNode("", true)
|
|
440
527
|
])
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, mergeProps, unref, withCtx, renderSlot } from "vue";
|
|
2
|
+
import { useLinkComponent } from "../composables/useLpConfig.js";
|
|
2
3
|
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
4
|
+
import { resolveLink } from "../components/link.js";
|
|
3
5
|
const __default__ = { inheritAttrs: false };
|
|
4
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
7
|
...__default__,
|
|
6
8
|
__name: "LpLink",
|
|
7
9
|
props: {
|
|
8
10
|
href: {},
|
|
11
|
+
to: {},
|
|
9
12
|
external: { type: Boolean },
|
|
10
13
|
muted: { type: Boolean },
|
|
11
14
|
tone: {},
|
|
12
|
-
as: {
|
|
15
|
+
as: {},
|
|
13
16
|
variant: { default: "default" },
|
|
14
17
|
revealOn: { default: "self" }
|
|
15
18
|
},
|
|
16
19
|
setup(__props) {
|
|
17
20
|
const props = __props;
|
|
18
|
-
const
|
|
21
|
+
const linkComponent = useLinkComponent();
|
|
22
|
+
const resolved = computed(() => {
|
|
23
|
+
if (props.as) {
|
|
24
|
+
return props.as === "a" ? { is: "a", props: { href: props.href } } : { is: props.as, props: props.to != null ? { to: props.to } : { href: props.href } };
|
|
25
|
+
}
|
|
26
|
+
const component = props.external ? "a" : linkComponent.value;
|
|
27
|
+
return resolveLink(component, { to: props.to, href: props.href }) ?? { is: "a", props: {} };
|
|
28
|
+
});
|
|
19
29
|
const rel = computed(() => props.external ? "noopener noreferrer" : void 0);
|
|
20
30
|
const target = computed(() => props.external ? "_blank" : void 0);
|
|
21
31
|
const colorClass = computed(() => {
|
|
@@ -47,17 +57,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
57
|
].join(" ")
|
|
48
58
|
);
|
|
49
59
|
return (_ctx, _cache) => {
|
|
50
|
-
return openBlock(), createBlock(resolveDynamicComponent(
|
|
51
|
-
href: isAnchor.value ? __props.href : void 0,
|
|
60
|
+
return openBlock(), createBlock(resolveDynamicComponent(resolved.value.is), mergeProps({ ...resolved.value.props, ...unref(rest) }, {
|
|
52
61
|
target: target.value,
|
|
53
62
|
rel: rel.value,
|
|
54
63
|
class: unref(rootClass)
|
|
55
|
-
}
|
|
64
|
+
}), {
|
|
56
65
|
default: withCtx(() => [
|
|
57
66
|
renderSlot(_ctx.$slots, "default")
|
|
58
67
|
]),
|
|
59
68
|
_: 3
|
|
60
|
-
}, 16, ["
|
|
69
|
+
}, 16, ["target", "rel", "class"]);
|
|
61
70
|
};
|
|
62
71
|
}
|
|
63
72
|
});
|