@leavepulse/ui 0.72.0 → 0.72.1

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.
Files changed (147) hide show
  1. package/dist/assets/{LpKeys-BxRhfQda.css → LpKeys-C5VMcBOW.css} +10 -5
  2. package/dist/chunks/{DropzoneLinkField-D2Rnkcys.js → DropzoneLinkField-DpOB20Lx.js} +2 -2
  3. package/dist/chunks/{FieldWrapper-DnA1rxZ8.js → FieldWrapper-DHhRxO5G.js} +1 -1
  4. package/dist/chunks/{LpActionBar-DfiBL1dE.js → LpActionBar-BqicINE_.js} +2 -2
  5. package/dist/chunks/{LpAddressInput-B1bB3F6M.js → LpAddressInput-CkbKLufb.js} +3 -3
  6. package/dist/chunks/{LpAlert-CpRF9eYr.js → LpAlert-BigMdAbu.js} +2 -2
  7. package/dist/chunks/{LpAppShell-D8Q0Jv9d.js → LpAppShell-DIMy-vjP.js} +4 -4
  8. package/dist/chunks/{LpBadge-vtCpsDmv.js → LpBadge-Huo8EKew.js} +1 -1
  9. package/dist/chunks/{LpBottomNav-VXJf0cKc.js → LpBottomNav-BZIpahzA.js} +1 -1
  10. package/dist/chunks/{LpBreadcrumbs-BdzjQcql.js → LpBreadcrumbs-DGtpBhWt.js} +1 -1
  11. package/dist/chunks/{LpButton-Dk7eT4ro.js → LpButton-CW34A1e4.js} +1 -1
  12. package/dist/chunks/{LpCard-Ce3rw8zm.js → LpCard-B0sFXQzc.js} +1 -1
  13. package/dist/chunks/{LpCheckbox-DLX4amba.js → LpCheckbox-iaD63DEF.js} +1 -1
  14. package/dist/chunks/{LpCodeBlock-j0W5bpmF.js → LpCodeBlock-CFFa_pJb.js} +1 -1
  15. package/dist/chunks/{LpCodeDisplay-COdiv4xu.js → LpCodeDisplay-CFmGMAmP.js} +4 -4
  16. package/dist/chunks/{LpConfirmDialog-w1ni5nxh.js → LpConfirmDialog-BDystNtm.js} +1 -1
  17. package/dist/chunks/{LpConfirmHost-Br_-Gn-6.js → LpConfirmHost-oOsxJHfQ.js} +1 -1
  18. package/dist/chunks/{LpCopyButton-DaD1KCn6.js → LpCopyButton-BNcGbVXF.js} +1 -1
  19. package/dist/chunks/{LpCountdown-Cgy0mVEq.js → LpCountdown-Cak7cq3X.js} +1 -1
  20. package/dist/chunks/{LpDataList-CkcGFJgv.js → LpDataList-B6Meb4M9.js} +1 -1
  21. package/dist/chunks/{LpEditable-D3PvD6Zm.js → LpEditable-BNogo5DL.js} +2 -2
  22. package/dist/chunks/{LpFileTree-D7KTaJiM.js → LpFileTree-CHgtVh14.js} +1 -1
  23. package/dist/chunks/{LpFileTreeNode-14GVqQTd.js → LpFileTreeNode-LqHgHd3B.js} +3 -3
  24. package/dist/chunks/{LpFormField-MSQhRCTz.js → LpFormField-CC57DdTi.js} +1 -1
  25. package/dist/chunks/{LpHintLayer-CmYm37z7.js → LpHintLayer-CvAj4aa6.js} +2 -2
  26. package/dist/chunks/{LpHints-iLIRUkCj.js → LpHints-BtRvHQQ0.js} +3 -3
  27. package/dist/chunks/{LpInfraNode-BT0VQrOa.js → LpInfraNode-CxngdQAG.js} +2 -2
  28. package/dist/chunks/{LpInput-1eNvtzXs.js → LpInput-DqmL-438.js} +1 -1
  29. package/dist/chunks/{LpLightbox-DWw6OSA4.js → LpLightbox-7YP6zSDm.js} +2 -2
  30. package/dist/chunks/{LpLoader-B82_CcV0.js → LpLoader-CUo1MX_0.js} +1 -1
  31. package/dist/chunks/{LpLogViewer-pzanZASC.js → LpLogViewer-DQOIsnZ1.js} +3 -3
  32. package/dist/chunks/{LpMapPicker-DNIUvF6V.js → LpMapPicker-Dm3vJHN2.js} +1 -1
  33. package/dist/chunks/{LpMediaGallery-Dx8xzg5N.js → LpMediaGallery-znEbvIEo.js} +1 -1
  34. package/dist/chunks/{LpModalNav-Cu04W1pV.js → LpModalNav-CH1UE9Ch.js} +2 -2
  35. package/dist/chunks/{LpNotificationBell-PSQqFqEv.js → LpNotificationBell-CrywodQ_.js} +3 -3
  36. package/dist/chunks/{LpPaletteTheme-D05ywM1W.js → LpPaletteTheme-BzHBh-mN.js} +3 -3
  37. package/dist/chunks/{LpPasswordInput-vdcw-koG.js → LpPasswordInput-DVgRgTVx.js} +2 -2
  38. package/dist/chunks/{LpPie-BlWDxCtG.js → LpPie-BjDbeytx.js} +2 -2
  39. package/dist/chunks/{LpPipeline-BXjoxkq_.js → LpPipeline-zZUj7I6K.js} +2 -2
  40. package/dist/chunks/{LpRepeater-fliVBcN7.js → LpRepeater-BQB0twJ5.js} +2 -2
  41. package/dist/chunks/{LpScramble-Cw-af0Yh.js → LpScramble-DbQyBjUY.js} +1 -1
  42. package/dist/chunks/{LpSecretField-D_IMxEGW.js → LpSecretField-uoD6Fngf.js} +6 -6
  43. package/dist/chunks/{LpShift-BAp8lGoa.js → LpShift-C-UGuKMN.js} +11 -0
  44. package/dist/chunks/{LpSidebar-BftYsk5d.js → LpSidebar-DXdbvgM6.js} +2 -2
  45. package/dist/chunks/{LpSidebarNav-BzNWMZfc.js → LpSidebarNav-CE6CVCb0.js} +14 -4
  46. package/dist/chunks/{LpSidebarRow-BIReMT1f.js → LpSidebarRow-CF9VFZ2w.js} +5 -3
  47. package/dist/chunks/{LpStat-BFCM6fUn.js → LpStat-CjpXrC8R.js} +1 -1
  48. package/dist/chunks/{LpStatus-BWTLVPVh.js → LpStatus-g-8z9b_u.js} +2 -2
  49. package/dist/chunks/{LpStepMark-DkdkebLC.js → LpStepMark-DU7xalwW.js} +1 -1
  50. package/dist/chunks/{LpStepper-BgqjKrqg.js → LpStepper-CbRXiXNs.js} +1 -1
  51. package/dist/chunks/{LpSwap-B5YOXgtx.js → LpSwap-Xi4j9PR_.js} +1 -1
  52. package/dist/chunks/{LpSwitch-DyrRes7s.js → LpSwitch-BWcXEahf.js} +1 -1
  53. package/dist/chunks/{LpTabFace-D6BMCbAP.js → LpTabFace-CG0VqD8I.js} +1 -1
  54. package/dist/chunks/{LpTableFilter-Dkzamzkl.js → LpTableFilter-CYtK9GsF.js} +3 -3
  55. package/dist/chunks/{LpTagsInput-DAZNNehI.js → LpTagsInput-D1RzCwb5.js} +2 -2
  56. package/dist/chunks/{LpTextarea-DbmVPj2X.js → LpTextarea-MdIzNTjw.js} +1 -1
  57. package/dist/chunks/{LpThemeStudio-DWtG6OZZ.js → LpThemeStudio-B0Kk1bX0.js} +2 -2
  58. package/dist/chunks/{LpThemeSwitcher-Dcx-VkSk.js → LpThemeSwitcher-CI4I7ygL.js} +2 -2
  59. package/dist/chunks/{LpToaster-50hp_B5O.js → LpToaster-C-P1nmMS.js} +1 -1
  60. package/dist/chunks/{LpTopologyCanvas-CnUh8uzS.js → LpTopologyCanvas-CbEZhsP1.js} +1 -1
  61. package/dist/chunks/{LpTour-DC3LTlxg.js → LpTour-DRyzgpjt.js} +1 -1
  62. package/dist/chunks/{LpTruncate-Ced4gquB.js → LpTruncate-4WvCWqnW.js} +1 -1
  63. package/dist/chunks/{LpUptimeBar-CuB0LX8K.js → LpUptimeBar-B2LNSNxs.js} +2 -2
  64. package/dist/chunks/{RevealToggle-B0ITuIX-.js → RevealToggle-jBLJwVwO.js} +1 -1
  65. package/dist/chunks/{TourCard-CBkj1GYi.js → TourCard-BOBcGbEo.js} +3 -3
  66. package/dist/components/DropzoneLinkField.vue.js +1 -1
  67. package/dist/components/FieldWrapper.vue.js +1 -1
  68. package/dist/components/LpActionBar.vue.js +1 -1
  69. package/dist/components/LpAddressInput.vue.js +1 -1
  70. package/dist/components/LpAlert.vue.js +1 -1
  71. package/dist/components/LpAppShell.vue.js +1 -1
  72. package/dist/components/LpBadge.vue.js +1 -1
  73. package/dist/components/LpBottomNav.vue.js +1 -1
  74. package/dist/components/LpBreadcrumbs.vue.js +1 -1
  75. package/dist/components/LpButton.vue.js +1 -1
  76. package/dist/components/LpCard.vue.js +1 -1
  77. package/dist/components/LpChart.vue.js +2 -2
  78. package/dist/components/LpCheckbox.vue.js +1 -1
  79. package/dist/components/LpCodeBlock.vue.js +1 -1
  80. package/dist/components/LpCodeDisplay.vue.js +1 -1
  81. package/dist/components/LpCommandPalette.vue.js +2 -2
  82. package/dist/components/LpConfirmDialog.vue.js +1 -1
  83. package/dist/components/LpConfirmHost.vue.js +1 -1
  84. package/dist/components/LpCopyButton.vue.js +1 -1
  85. package/dist/components/LpCountdown.vue.js +1 -1
  86. package/dist/components/LpDataList.vue.js +1 -1
  87. package/dist/components/LpDropzone.vue.js +1 -1
  88. package/dist/components/LpEditable.vue.js +1 -1
  89. package/dist/components/LpFileTree.vue.js +1 -1
  90. package/dist/components/LpFileTreeNode.vue.js +1 -1
  91. package/dist/components/LpFormField.vue.js +1 -1
  92. package/dist/components/LpHintLayer.vue.js +1 -1
  93. package/dist/components/LpHints.vue.js +1 -1
  94. package/dist/components/LpImageEditor.vue.js +2 -2
  95. package/dist/components/LpInfraNode.vue.js +1 -1
  96. package/dist/components/LpInput.vue.js +1 -1
  97. package/dist/components/LpKeys.vue.js +13 -10
  98. package/dist/components/LpLightbox.vue.js +1 -1
  99. package/dist/components/LpLoader.vue.js +1 -1
  100. package/dist/components/LpLogViewer.vue.js +1 -1
  101. package/dist/components/LpMapPicker.vue.js +1 -1
  102. package/dist/components/LpMediaGallery.vue.js +1 -1
  103. package/dist/components/LpModalNav.vue.js +1 -1
  104. package/dist/components/LpNotificationBell.vue.js +1 -1
  105. package/dist/components/LpPaletteTheme.vue.js +1 -1
  106. package/dist/components/LpPasswordInput.vue.js +1 -1
  107. package/dist/components/LpPie.vue.js +1 -1
  108. package/dist/components/LpPipeline.vue.js +1 -1
  109. package/dist/components/LpRepeater.vue.js +1 -1
  110. package/dist/components/LpScramble.vue.js +1 -1
  111. package/dist/components/LpSecretField.vue.js +1 -1
  112. package/dist/components/LpShift.vue.js +1 -1
  113. package/dist/components/LpSidebar.vue.js +1 -1
  114. package/dist/components/LpSidebarNav.vue.d.ts +1 -1
  115. package/dist/components/LpSidebarNav.vue.js +1 -1
  116. package/dist/components/LpSidebarRow.vue.d.ts +1 -1
  117. package/dist/components/LpSidebarRow.vue.js +1 -1
  118. package/dist/components/LpStat.vue.js +1 -1
  119. package/dist/components/LpStatus.vue.js +1 -1
  120. package/dist/components/LpStepMark.vue.js +1 -1
  121. package/dist/components/LpStepper.vue.js +1 -1
  122. package/dist/components/LpSwap.vue.js +1 -1
  123. package/dist/components/LpSwitch.vue.js +1 -1
  124. package/dist/components/LpTabFace.vue.js +1 -1
  125. package/dist/components/LpTable.vue.js +6 -6
  126. package/dist/components/LpTableFilter.vue.js +1 -1
  127. package/dist/components/LpTabs.vue.js +1 -1
  128. package/dist/components/LpTagsInput.vue.js +1 -1
  129. package/dist/components/LpTextarea.vue.js +1 -1
  130. package/dist/components/LpThemeStudio.vue.js +1 -1
  131. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  132. package/dist/components/LpToaster.vue.js +1 -1
  133. package/dist/components/LpTopologyCanvas.vue.js +1 -1
  134. package/dist/components/LpTour.vue.js +1 -1
  135. package/dist/components/LpTruncate.vue.js +1 -1
  136. package/dist/components/LpUptimeBar.vue.js +1 -1
  137. package/dist/components/RevealToggle.vue.js +1 -1
  138. package/dist/components/TourCard.vue.js +1 -1
  139. package/dist/components/sidebar.d.ts +5 -0
  140. package/dist/components/sidebar.js +6 -1
  141. package/dist/index.js +55 -55
  142. package/package.json +1 -1
  143. package/src/components/LpKeys.vue +10 -1
  144. package/src/components/LpShift.vue +15 -0
  145. package/src/components/LpSidebarNav.vue +12 -2
  146. package/src/components/LpSidebarRow.vue +7 -3
  147. package/src/components/sidebar.ts +8 -0
@@ -231,6 +231,17 @@ watch(
231
231
  { flush: "post" },
232
232
  )
233
233
 
234
+ // A child that changed inside itself (a label rolling to a longer word) moves
235
+ // its neighbours without any child coming or going: when the box starts to
236
+ // resize, every child glides from where it was last seen.
237
+ watch(resizing, (now) => {
238
+ const box = el.value
239
+ if (!now || !box || !presenceObserver || prefersReducedMotion()) return
240
+ requestAnimationFrame(() => {
241
+ for (const child of box.children) if (!child.hasAttribute(GHOST)) glide(child)
242
+ })
243
+ })
244
+
234
245
  onBeforeUnmount(() => {
235
246
  presenceObserver?.disconnect()
236
247
  presenceSize?.disconnect()
@@ -253,6 +264,10 @@ defineExpose({ resizing })
253
264
  ? `${transitionClass} duration-fast ease-[var(--ease-emphasized)] motion-reduce:transition-none`
254
265
  : '',
255
266
  resizing ? 'overflow-hidden' : '',
267
+ // While the box holds a width its content has outgrown, a flex row would
268
+ // squeeze its children to fit (a button's keys folding into a column)
269
+ // instead of letting the easing edge clip them.
270
+ resizing && axis !== 'height' ? '[&>*]:shrink-0' : '',
256
271
  resizing && anchor === 'end' ? 'justify-end' : '',
257
272
  presence ? 'relative' : '',
258
273
  ]"
@@ -20,7 +20,7 @@ import LpIcon from "./LpIcon.vue"
20
20
  import LpScrollArea from "./LpScrollArea.vue"
21
21
  import LpSkeleton from "./LpSkeleton.vue"
22
22
  import LpSidebarRow from "./LpSidebarRow.vue"
23
- import type { SidebarItem, SidebarSection } from "./sidebar"
23
+ import { waiting, type SidebarItem, type SidebarSection } from "./sidebar"
24
24
  import { useMergedAttrs } from "../composables/useMergedClass"
25
25
 
26
26
  const props = withDefaults(
@@ -196,7 +196,12 @@ function onKey(event: KeyboardEvent) {
196
196
  const SECTION = "lp-section:"
197
197
  function sectionItem(section: SidebarSection): SidebarItem {
198
198
  const icon = section.icon ?? section.items.find((i) => i.icon)?.icon
199
- return { id: `${SECTION}${sectionKey(section)}`, label: section.title ?? "", icon, children: section.items }
199
+ return {
200
+ id: `${SECTION}${sectionKey(section)}`,
201
+ label: section.title ?? "",
202
+ icon,
203
+ children: section.items,
204
+ }
200
205
  }
201
206
 
202
207
  function activate(item: SidebarItem) {
@@ -311,6 +316,11 @@ const { class: rootClass, attrs: rest } = useMergedAttrs(
311
316
  It is always rendered and merely fades, never removed: taking it
312
317
  out of the row changes the heading's height, and a heading that
313
318
  resizes under the cursor makes its own click feel like a misfire. -->
319
+ <span
320
+ v-if="section.items.some(waiting)"
321
+ class="size-1.5 shrink-0 rounded-full bg-brand transition-opacity duration-[var(--duration-fast)] motion-reduce:transition-none"
322
+ :class="isOpen(section) ? 'opacity-0' : 'opacity-100'"
323
+ />
314
324
  <LpBadge
315
325
  tone="neutral"
316
326
  class="shrink-0 transition-opacity duration-[var(--duration-fast)] motion-reduce:transition-none"
@@ -20,7 +20,7 @@ import LpHoverCard from "./LpHoverCard.vue"
20
20
  import LpIcon from "./LpIcon.vue"
21
21
  import LpKeys from "./LpKeys.vue"
22
22
  import LpNumberFlow from "./LpNumberFlow.vue"
23
- import type { SidebarItem } from "./sidebar"
23
+ import { waiting, type SidebarItem } from "./sidebar"
24
24
  import { resolveLink, type ResolvedLink } from "./link"
25
25
 
26
26
  const props = withDefaults(
@@ -92,7 +92,11 @@ const initials = computed(() =>
92
92
  .join(""),
93
93
  )
94
94
 
95
- const hasBadge = computed(() => props.item.badge != null || props.item.dot)
95
+ // Something waiting on a page under this row shows on the row while those pages
96
+ // are out of sight, folded away or behind a compact icon: otherwise closing a
97
+ // group would hide that anything is waiting in it.
98
+ const hidden = computed(() => (props.compact || !props.expanded) && !!props.item.children?.some(waiting))
99
+ const hasBadge = computed(() => props.item.badge != null || !!props.item.dot || hidden.value)
96
100
  const card = computed(() => !props.item.disabled && (props.compact || !!props.item.preview))
97
101
  const delay = computed(() => (props.compact && !props.item.preview ? 250 : props.previewDelay))
98
102
  </script>
@@ -172,7 +176,7 @@ const delay = computed(() => (props.compact && !props.item.preview ? 250 : props
172
176
  aria-hidden="true"
173
177
  class="pointer-events-none absolute right-2 z-10 rounded-small bg-surface-raised/90 opacity-0 transition-opacity duration-(--duration-fast) group-hover/item:opacity-100 group-focus-visible/item:opacity-100"
174
178
  />
175
- <span v-if="item.dot && item.badge == null" class="relative z-10 size-2 shrink-0 rounded-full bg-brand" />
179
+ <span v-if="hasBadge && item.badge == null" class="relative z-10 size-2 shrink-0 rounded-full bg-brand" />
176
180
  <LpBadge v-if="item.badge != null" :tone="active ? 'brand' : 'neutral'" class="relative z-10 shrink-0">
177
181
  <span v-if="bumped" class="absolute inset-0 animate-ping rounded-pill bg-brand/30" />
178
182
  <LpNumberFlow v-if="typeof item.badge === 'number'" :value="item.badge" grouped :locale="locale" :animate-on-mount="false" />
@@ -92,3 +92,11 @@ export interface SidebarSection {
92
92
  /** Icon for the heading — shown when the group is collapsible. */
93
93
  icon?: string
94
94
  }
95
+
96
+ /**
97
+ * Something on this page or a page under it is waiting: a count, news, a dot.
98
+ * A row or a group whose pages are out of sight shows it for them.
99
+ */
100
+ export function waiting(item: SidebarItem): boolean {
101
+ return item.badge != null || !!item.dot || !!item.children?.some(waiting)
102
+ }