@leavepulse/ui 0.45.0 → 0.46.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.
Files changed (87) hide show
  1. package/dist/assets/{LpCommandPalette-nGNnzXqQ.css → LpCommandPalette-5miKYsb-.css} +21 -21
  2. package/dist/assets/{LpDropzone-i4BdMi1H.css → LpDropzone-Ev6X03zj.css} +12 -12
  3. package/dist/assets/{LpTable-CPwWxTJS.css → LpTable-BoeA_TgK.css} +17 -17
  4. package/dist/chunks/{LpAddressInput-BwX8uo4_.js → LpAddressInput-iOJhmRzy.js} +1 -1
  5. package/dist/chunks/{LpAppShell-C53_RaGF.js → LpAppShell-BmMYcEVx.js} +2 -2
  6. package/dist/chunks/{LpAvatar-C1XStdOo.js → LpAvatar-DeSb6H0c.js} +1 -1
  7. package/dist/chunks/{LpCard-C2IvucmX.js → LpCard-BdxkMXjo.js} +1 -1
  8. package/dist/chunks/{LpColorPicker-zz4VGkG4.js → LpColorPicker-BLqPX5Vw.js} +1 -1
  9. package/dist/chunks/{LpConfirmDialog-DCw5jR1t.js → LpConfirmDialog-Ca-CTlxT.js} +1 -1
  10. package/dist/chunks/{LpConfirmHost-CbywMpMP.js → LpConfirmHost-BAaSaT2b.js} +1 -1
  11. package/dist/chunks/{LpContextMenu-BqkAYa9X.js → LpContextMenu-1cKew_Dc.js} +17 -4
  12. package/dist/chunks/{LpDatePicker-DuusgT69.js → LpDatePicker-BrdFtSTy.js} +3 -1
  13. package/dist/chunks/{LpDateRangePicker-DHeuznfC.js → LpDateRangePicker-Drd7EbIz.js} +4 -2
  14. package/dist/chunks/{LpDrawer-Dt4aB4Fr.js → LpDrawer-CBFVD624.js} +2 -2
  15. package/dist/chunks/{LpDropdownMenu-DdJGQzPn.js → LpDropdownMenu-DrpJJBp0.js} +22 -8
  16. package/dist/chunks/{LpFileTree-CNurOvkV.js → LpFileTree-bk5VjBey.js} +2 -2
  17. package/dist/chunks/{LpFileTreeNode-D_qRRdsH.js → LpFileTreeNode-BvMSBM7X.js} +1 -1
  18. package/dist/chunks/{LpLogViewer-KypbgOyo.js → LpLogViewer-BDFXzvcl.js} +2 -2
  19. package/dist/chunks/{LpModal-DMMDQHAu.js → LpModal-JNa3B_Lr.js} +13 -6
  20. package/dist/chunks/{LpModalNav-BVPDyIup.js → LpModalNav-BAxC9et7.js} +20 -7
  21. package/dist/chunks/{LpNotificationBell-CCwyJP5C.js → LpNotificationBell-DsqSyMwS.js} +2 -2
  22. package/dist/chunks/{LpPie-BEJ2SfI6.js → LpPie-BdSnta11.js} +1 -1
  23. package/dist/chunks/{LpScrollArea-Bry1fdOM.js → LpScrollArea-Hz3-JWUG.js} +23 -5
  24. package/dist/chunks/{LpSidebar-CQNB0-yU.js → LpSidebar-DpEiGi8L.js} +2 -2
  25. package/dist/chunks/{LpSidebarNav-kx-LdqNU.js → LpSidebarNav-BUuxipX-.js} +2 -2
  26. package/dist/chunks/{LpThemeSwitcher-B4aVPbNC.js → LpThemeSwitcher-BbYFFT5w.js} +1 -1
  27. package/dist/chunks/{LpToaster-DpJvoCOh.js → LpToaster-DTtWuKvq.js} +39 -6
  28. package/dist/chunks/MenuTitle-J3ZDYjpV.js +56 -0
  29. package/dist/components/LpAddressInput.vue.js +1 -1
  30. package/dist/components/LpAppShell.vue.js +1 -1
  31. package/dist/components/LpAvatar.vue.js +1 -1
  32. package/dist/components/LpCard.vue.js +1 -1
  33. package/dist/components/LpChart.vue.js +1 -1
  34. package/dist/components/LpColorPicker.vue.js +1 -1
  35. package/dist/components/LpCommandPalette.vue.js +7 -4
  36. package/dist/components/LpConfirmDialog.vue.js +1 -1
  37. package/dist/components/LpConfirmHost.vue.js +1 -1
  38. package/dist/components/LpContextMenu.vue.d.ts +11 -0
  39. package/dist/components/LpContextMenu.vue.js +1 -1
  40. package/dist/components/LpDatePicker.vue.js +1 -1
  41. package/dist/components/LpDateRangePicker.vue.js +1 -1
  42. package/dist/components/LpDrawer.vue.js +1 -1
  43. package/dist/components/LpDropdownMenu.vue.d.ts +6 -0
  44. package/dist/components/LpDropdownMenu.vue.js +1 -1
  45. package/dist/components/LpDropzone.vue.d.ts +14 -0
  46. package/dist/components/LpDropzone.vue.js +9 -7
  47. package/dist/components/LpFileTree.vue.js +1 -1
  48. package/dist/components/LpFileTreeNode.vue.js +1 -1
  49. package/dist/components/LpLogViewer.vue.js +1 -1
  50. package/dist/components/LpModal.vue.d.ts +7 -5
  51. package/dist/components/LpModal.vue.js +1 -1
  52. package/dist/components/LpModalNav.vue.d.ts +5 -3
  53. package/dist/components/LpModalNav.vue.js +1 -1
  54. package/dist/components/LpNotificationBell.vue.js +1 -1
  55. package/dist/components/LpPie.vue.js +1 -1
  56. package/dist/components/LpScrollArea.vue.d.ts +2 -2
  57. package/dist/components/LpScrollArea.vue.js +1 -1
  58. package/dist/components/LpShortcutsDialog.vue.js +1 -1
  59. package/dist/components/LpSidebar.vue.js +1 -1
  60. package/dist/components/LpSidebarNav.vue.js +1 -1
  61. package/dist/components/LpTable.vue.js +5 -5
  62. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  63. package/dist/components/LpToaster.vue.d.ts +2 -0
  64. package/dist/components/LpToaster.vue.js +1 -1
  65. package/dist/components/MenuTitle.vue.d.ts +9 -0
  66. package/dist/components/MenuTitle.vue.js +4 -0
  67. package/dist/composables/useClipboard.js +35 -2
  68. package/dist/composables/useLocale.d.ts +2 -0
  69. package/dist/composables/useLocale.js +9 -0
  70. package/dist/index.js +22 -22
  71. package/package.json +1 -1
  72. package/src/components/LpCommandPalette.vue +7 -1
  73. package/src/components/LpContextMenu.vue +19 -1
  74. package/src/components/LpDatePicker.vue +3 -1
  75. package/src/components/LpDateRangePicker.vue +3 -1
  76. package/src/components/LpDrawer.vue +1 -1
  77. package/src/components/LpDropdownMenu.vue +14 -2
  78. package/src/components/LpDropzone.vue +13 -5
  79. package/src/components/LpModal.vue +8 -2
  80. package/src/components/LpModalNav.vue +17 -2
  81. package/src/components/LpScrollArea.vue +30 -2
  82. package/src/components/LpTable.vue +1 -1
  83. package/src/components/LpToaster.vue +42 -4
  84. package/src/components/MenuTitle.vue +34 -0
  85. package/src/composables/useClipboard.ts +49 -7
  86. package/src/composables/useLocale.ts +14 -0
  87. package/src/tokens/tokens.css +7 -4
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpFileTree-CNurOvkV.js";
1
+ import { _ as _sfc_main } from "../chunks/LpFileTree-bk5VjBey.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpFileTreeNode-D_qRRdsH.js";
1
+ import { _ as _sfc_main } from "../chunks/LpFileTreeNode-BvMSBM7X.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpLogViewer-KypbgOyo.js";
1
+ import { _ as _sfc_main } from "../chunks/LpLogViewer-BDFXzvcl.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -43,19 +43,21 @@ type __VLS_Props = {
43
43
  close: string;
44
44
  }>;
45
45
  };
46
- declare var __VLS_31: {}, __VLS_45: {}, __VLS_64: {}, __VLS_72: {}, __VLS_74: {}, __VLS_76: {};
46
+ declare var __VLS_31: {}, __VLS_45: {}, __VLS_53: {}, __VLS_66: {}, __VLS_74: {}, __VLS_76: {}, __VLS_78: {};
47
47
  type __VLS_Slots = {} & {
48
48
  aside?: (props: typeof __VLS_31) => any;
49
49
  } & {
50
50
  title?: (props: typeof __VLS_45) => any;
51
51
  } & {
52
- default?: (props: typeof __VLS_64) => any;
52
+ actions?: (props: typeof __VLS_53) => any;
53
53
  } & {
54
- default?: (props: typeof __VLS_72) => any;
54
+ default?: (props: typeof __VLS_66) => any;
55
55
  } & {
56
- footer?: (props: typeof __VLS_74) => any;
56
+ default?: (props: typeof __VLS_74) => any;
57
57
  } & {
58
- asideEnd?: (props: typeof __VLS_76) => any;
58
+ footer?: (props: typeof __VLS_76) => any;
59
+ } & {
60
+ asideEnd?: (props: typeof __VLS_78) => any;
59
61
  };
60
62
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
61
63
  "update:open": (value: boolean) => any;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpModal-DMMDQHAu.js";
1
+ import { _ as _sfc_main } from "../chunks/LpModal-JNa3B_Lr.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -34,13 +34,15 @@ type __VLS_Props = {
34
34
  /** Frosted glass panel, passed to LpModal. Follows `provideGlass` when unset. */
35
35
  glass?: boolean;
36
36
  };
37
- declare var __VLS_36: {}, __VLS_38: {}, __VLS_41: {};
37
+ declare var __VLS_36: {}, __VLS_39: {}, __VLS_41: {}, __VLS_44: {};
38
38
  type __VLS_Slots = {} & {
39
39
  title?: (props: typeof __VLS_36) => any;
40
40
  } & {
41
- default?: (props: typeof __VLS_38) => any;
41
+ actions?: (props: typeof __VLS_39) => any;
42
42
  } & {
43
- footer?: (props: typeof __VLS_41) => any;
43
+ default?: (props: typeof __VLS_41) => any;
44
+ } & {
45
+ footer?: (props: typeof __VLS_44) => any;
44
46
  };
45
47
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
46
48
  "update:modelValue": (value: string) => any;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpModalNav-BVPDyIup.js";
1
+ import { _ as _sfc_main } from "../chunks/LpModalNav-BAxC9et7.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpNotificationBell-CCwyJP5C.js";
1
+ import { _ as _sfc_main } from "../chunks/LpNotificationBell-DsqSyMwS.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpPie-BEJ2SfI6.js";
1
+ import { _ as _sfc_main } from "../chunks/LpPie-BdSnta11.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -4,9 +4,9 @@ type __VLS_Props = {
4
4
  contentClass?: string;
5
5
  barInsetTop?: string;
6
6
  };
7
- declare var __VLS_46: {};
7
+ declare var __VLS_50: {};
8
8
  type __VLS_Slots = {} & {
9
- default?: (props: typeof __VLS_46) => any;
9
+ default?: (props: typeof __VLS_50) => any;
10
10
  };
11
11
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
12
12
  viewportEl: import("vue").ComputedRef<HTMLElement | null>;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpScrollArea-Bry1fdOM.js";
1
+ import { _ as _sfc_main } from "../chunks/LpScrollArea-Hz3-JWUG.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString, createTextVNode, createCommentVNode } from "vue";
2
- import { _ as _sfc_main$1 } from "../chunks/LpModal-DMMDQHAu.js";
2
+ import { _ as _sfc_main$1 } from "../chunks/LpModal-JNa3B_Lr.js";
3
3
  import { useAppleKeyboard, mergeShortcutGroups, activeShortcuts, useHotkeys, appleModifierLabel } from "../composables/useHotkeys.js";
4
4
  import { useLabels } from "../composables/useLpConfig.js";
5
5
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpSidebar-CQNB0-yU.js";
1
+ import { _ as _sfc_main } from "../chunks/LpSidebar-DpEiGi8L.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpSidebarNav-kx-LdqNU.js";
1
+ import { _ as _sfc_main } from "../chunks/LpSidebarNav-BUuxipX-.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,10 +1,10 @@
1
1
  import { defineComponent, computed, useAttrs, ref, shallowRef, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createElementVNode, Transition, renderSlot, mergeProps, normalizeStyle, createBlock, TransitionGroup, unref, withModifiers, nextTick } from "vue";
2
2
  import { _ as _sfc_main$7 } from "../chunks/LpCheckbox-Bkj13CbW.js";
3
- import { _ as _sfc_main$6 } from "../chunks/LpContextMenu-BqkAYa9X.js";
3
+ import { _ as _sfc_main$6 } from "../chunks/LpContextMenu-1cKew_Dc.js";
4
4
  import { _ as _sfc_main$2 } from "../chunks/LpIcon-DYtaid0K.js";
5
5
  import { _ as _sfc_main$a } from "../chunks/LpPagination-BcDlo3r_.js";
6
6
  import { _ as _sfc_main$8 } from "../chunks/LpPopover-DCKeqiVn.js";
7
- import { _ as _sfc_main$5 } from "../chunks/LpScrollArea-Bry1fdOM.js";
7
+ import { _ as _sfc_main$5 } from "../chunks/LpScrollArea-Hz3-JWUG.js";
8
8
  import { _ as _sfc_main$4 } from "../chunks/LpRollingText-DB7upf-5.js";
9
9
  import { _ as _sfc_main$3 } from "../chunks/LpShift-DXNsauQZ.js";
10
10
  import { _ as _sfc_main$9 } from "../chunks/LpTableFilter-BV8PpLM9.js";
@@ -18,7 +18,7 @@ import { _ as _sfc_main$1 } from "../chunks/LpButton-CKSwC6Mu.js";
18
18
  import { toCsv, downloadFile, fileStem } from "./exportData.js";
19
19
  import { summarizeShown, parseTableState, serializeTableState, countValues } from "./tableFilter.js";
20
20
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
21
- import '../assets/LpTable-CPwWxTJS.css';const _hoisted_1 = {
21
+ import '../assets/LpTable-BoeA_TgK.css';const _hoisted_1 = {
22
22
  key: 0,
23
23
  class: "flex justify-end"
24
24
  };
@@ -726,7 +726,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
726
726
  }),
727
727
  createVNode(_sfc_main$5, mergeProps(scrollAttrs.value, {
728
728
  fade: false,
729
- class: "min-h-0 flex-1 rounded-card border border-line",
729
+ class: "min-h-0 flex-1 rounded-card border border-line bg-surface",
730
730
  style: __props.load && floor.value ? { minHeight: `${floor.value + 2}px` } : void 0,
731
731
  "bar-inset-top": barInsetTop.value
732
732
  }), {
@@ -924,7 +924,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
924
924
  };
925
925
  }
926
926
  });
927
- const LpTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fff7ed10"]]);
927
+ const LpTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7fc0998d"]]);
928
928
  export {
929
929
  LpTable as default
930
930
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpThemeSwitcher-B4aVPbNC.js";
1
+ import { _ as _sfc_main } from "../chunks/LpThemeSwitcher-BbYFFT5w.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,6 +1,8 @@
1
1
  type __VLS_Props = {
2
2
  labels?: Partial<{
3
3
  dismiss: string;
4
+ copy: string;
5
+ copied: string;
4
6
  }>;
5
7
  };
6
8
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpToaster-DpJvoCOh.js";
1
+ import { _ as _sfc_main } from "../chunks/LpToaster-DTtWuKvq.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -0,0 +1,9 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ subtitle?: string;
4
+ icon?: string;
5
+ image?: string;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { _ as _sfc_main } from "../chunks/MenuTitle-J3ZDYjpV.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,5 +1,39 @@
1
1
  import { ref, onScopeDispose } from "vue";
2
2
  import { useToast } from "./useToast.js";
3
+ async function writeAsync(text) {
4
+ if (typeof navigator === "undefined" || !navigator.clipboard) return false;
5
+ try {
6
+ await navigator.clipboard.writeText(text);
7
+ return true;
8
+ } catch {
9
+ return false;
10
+ }
11
+ }
12
+ function writeLegacy(text) {
13
+ if (typeof document === "undefined") return false;
14
+ const active = document.activeElement;
15
+ const selection = document.getSelection();
16
+ const ranges = selection ? Array.from({ length: selection.rangeCount }, (_, i) => selection.getRangeAt(i)) : [];
17
+ const field = document.createElement("textarea");
18
+ field.value = text;
19
+ field.setAttribute("readonly", "");
20
+ field.style.cssText = "position:fixed;top:0;left:0;width:1px;height:1px;opacity:0;pointer-events:none";
21
+ document.body.appendChild(field);
22
+ field.select();
23
+ let ok = false;
24
+ try {
25
+ ok = document.execCommand("copy");
26
+ } catch {
27
+ ok = false;
28
+ }
29
+ field.remove();
30
+ if (selection) {
31
+ selection.removeAllRanges();
32
+ for (const range of ranges) selection.addRange(range);
33
+ }
34
+ active?.focus?.({ preventScroll: true });
35
+ return ok;
36
+ }
3
37
  const COPIED_MS = 1400;
4
38
  function useClipboard() {
5
39
  const copied = ref(false);
@@ -8,8 +42,7 @@ function useClipboard() {
8
42
  async function copy(text, options = {}) {
9
43
  const { toast = false, errorToast = false } = options;
10
44
  try {
11
- await navigator.clipboard?.writeText(text);
12
- if (!navigator.clipboard) throw new Error("clipboard unavailable");
45
+ if (!await writeAsync(text) && !writeLegacy(text)) throw new Error("clipboard unavailable");
13
46
  copied.value = true;
14
47
  clearTimeout(timer);
15
48
  timer = setTimeout(() => copied.value = false, COPIED_MS);
@@ -0,0 +1,2 @@
1
+ import { type ComputedRef, type MaybeRefOrGetter } from "vue";
2
+ export declare function useLocale(own?: MaybeRefOrGetter<string | undefined>): ComputedRef<string | undefined>;
@@ -0,0 +1,9 @@
1
+ import { computed, toValue } from "vue";
2
+ import { injectConfigProviderContext } from "reka-ui";
3
+ function useLocale(own) {
4
+ const context = injectConfigProviderContext({});
5
+ return computed(() => toValue(own) || context.locale?.value || void 0);
6
+ }
7
+ export {
8
+ useLocale
9
+ };
package/dist/index.js CHANGED
@@ -1,42 +1,42 @@
1
1
  import { _ } from "./chunks/LayoutCanvas-BkaGXTjx.js";
2
- import { _ as _2 } from "./chunks/LpAddressInput-BwX8uo4_.js";
2
+ import { _ as _2 } from "./chunks/LpAddressInput-iOJhmRzy.js";
3
3
  import { _ as _3 } from "./chunks/LpMapPicker-Cc84LaM3.js";
4
4
  import { OSM_TILES, createNominatimProvider, emptyAddress, formatAddress, project, tileUrl, unproject } from "./components/address.js";
5
5
  import { _ as _4 } from "./chunks/LpActionBar-CnfFVIwC.js";
6
6
  import { _ as _5 } from "./chunks/LpAlert-B6ilrM7T.js";
7
- import { _ as _6 } from "./chunks/LpAppShell-C53_RaGF.js";
7
+ import { _ as _6 } from "./chunks/LpAppShell-BmMYcEVx.js";
8
8
  import { _ as _7 } from "./chunks/LpAutocomplete-C8IgSMsi.js";
9
- import { _ as _8 } from "./chunks/LpAvatar-C1XStdOo.js";
9
+ import { _ as _8 } from "./chunks/LpAvatar-DeSb6H0c.js";
10
10
  import { _ as _9 } from "./chunks/LpBadge-Fe0D1bYx.js";
11
11
  import { _ as _10 } from "./chunks/LpBreadcrumbs-CQJd73Gm.js";
12
12
  import { _ as _11 } from "./chunks/LpButton-CKSwC6Mu.js";
13
13
  import { _ as _12 } from "./chunks/LpCalendar-DrA2McTU.js";
14
- import { _ as _13 } from "./chunks/LpCard-C2IvucmX.js";
14
+ import { _ as _13 } from "./chunks/LpCard-BdxkMXjo.js";
15
15
  import { default as default2 } from "./components/LpChart.vue.js";
16
16
  import { backgroundOf, csvField, downloadFile, fileStem, inlineSvg, resolveCssColor, svgToPng, toCsv } from "./components/exportData.js";
17
17
  import { CHART_PALETTE, axisTicks, chartSummary, formatTick, markerIndex, niceScale, resolveSlices } from "./components/chart.js";
18
18
  import { _ as _14 } from "./chunks/LpCheckbox-Bkj13CbW.js";
19
19
  import { _ as _15 } from "./chunks/LpCodeBlock-ca7ANFyW.js";
20
20
  import { tokenizeLines } from "./components/codeHighlight.js";
21
- import { _ as _16 } from "./chunks/LpColorPicker-zz4VGkG4.js";
21
+ import { _ as _16 } from "./chunks/LpColorPicker-BLqPX5Vw.js";
22
22
  import { DEFAULT_SWATCHES, clampHsv, formatColor, hsvToHsl, hsvToRgb, isLight, normalizeHue, opaqueCss, parseColor, parseHex, rgbToHex, rgbToHsv } from "./components/color.js";
23
23
  import { default as default3 } from "./components/LpCommandPalette.vue.js";
24
24
  import { parseCommandQuery, rankCommandItems } from "./components/commandSearch.js";
25
- import { _ as _17 } from "./chunks/LpConfirmDialog-DCw5jR1t.js";
26
- import { _ as _18 } from "./chunks/LpConfirmHost-CbywMpMP.js";
25
+ import { _ as _17 } from "./chunks/LpConfirmDialog-Ca-CTlxT.js";
26
+ import { _ as _18 } from "./chunks/LpConfirmHost-BAaSaT2b.js";
27
27
  import { confirm, useConfirm } from "./components/confirm.js";
28
- import { _ as _19 } from "./chunks/LpContextMenu-BqkAYa9X.js";
29
- import { _ as _20 } from "./chunks/LpDatePicker-DuusgT69.js";
30
- import { _ as _21 } from "./chunks/LpDateRangePicker-DHeuznfC.js";
28
+ import { _ as _19 } from "./chunks/LpContextMenu-1cKew_Dc.js";
29
+ import { _ as _20 } from "./chunks/LpDatePicker-BrdFtSTy.js";
30
+ import { _ as _21 } from "./chunks/LpDateRangePicker-Drd7EbIz.js";
31
31
  import { _ as _22 } from "./chunks/LpRangeCalendar-DZuaRV0W.js";
32
32
  import { clampRange, defaultRangePresets, formatRange, normalizeRange, sameRange } from "./components/dateRange.js";
33
33
  import { _ as _23 } from "./chunks/LpDisclosure-Cc23-JOT.js";
34
34
  import { _ as _24 } from "./chunks/LpDivider-CUX46KR0.js";
35
- import { _ as _25 } from "./chunks/LpDrawer-Dt4aB4Fr.js";
36
- import { _ as _26 } from "./chunks/LpDropdownMenu-DdJGQzPn.js";
35
+ import { _ as _25 } from "./chunks/LpDrawer-CBFVD624.js";
36
+ import { _ as _26 } from "./chunks/LpDropdownMenu-DrpJJBp0.js";
37
37
  import { default as default4 } from "./components/LpDropzone.vue.js";
38
38
  import { _ as _27 } from "./chunks/LpEmptyState-BJbZXC8D.js";
39
- import { _ as _28 } from "./chunks/LpFileTree-CNurOvkV.js";
39
+ import { _ as _28 } from "./chunks/LpFileTree-bk5VjBey.js";
40
40
  import { ancestorIds, checkStateOf, checkedCount, computeStats, fileIcon, formatModified, formatSize, sortNodes, subtreeIds, subtreeSize } from "./components/fileTree.js";
41
41
  import { _ as _29 } from "./chunks/LpFieldNotice-wtieLUTj.js";
42
42
  import { _ as _30 } from "./chunks/LpFormField-CtVYj6tO.js";
@@ -48,19 +48,19 @@ import { _ as _33 } from "./chunks/LpInput-D-YGQbEv.js";
48
48
  import { _ as _34 } from "./chunks/LpLightbox-DSDahF23.js";
49
49
  import { fileNameOf } from "./components/lightbox.js";
50
50
  import { _ as _35 } from "./chunks/LpLink-Krkjhe_y.js";
51
- import { _ as _36 } from "./chunks/LpLogViewer-KypbgOyo.js";
51
+ import { _ as _36 } from "./chunks/LpLogViewer-BDFXzvcl.js";
52
52
  import { countLevels, matchPositions, matchesTerm, ringWindow, stepMatch } from "./components/logSearch.js";
53
53
  import { _ as _37 } from "./chunks/LpMediaGallery-YKr-cQPN.js";
54
- import { _ as _38 } from "./chunks/LpModal-DMMDQHAu.js";
55
- import { _ as _39 } from "./chunks/LpModalNav-BVPDyIup.js";
56
- import { _ as _40 } from "./chunks/LpNotificationBell-CCwyJP5C.js";
54
+ import { _ as _38 } from "./chunks/LpModal-JNa3B_Lr.js";
55
+ import { _ as _39 } from "./chunks/LpModalNav-BAxC9et7.js";
56
+ import { _ as _40 } from "./chunks/LpNotificationBell-DsqSyMwS.js";
57
57
  import { _ as _41 } from "./chunks/LpNumberField-B77O-z28.js";
58
58
  import { _ as _42 } from "./chunks/LpTimeField-Cqe7fXnh.js";
59
59
  import { _ as _43 } from "./chunks/LpNumberFlow-z4WPZcZu.js";
60
60
  import { _ as _44 } from "./chunks/LpOtpInput-CziPF3Oq.js";
61
61
  import { _ as _45 } from "./chunks/LpPagination-BcDlo3r_.js";
62
62
  import { _ as _46 } from "./chunks/LpPasswordInput-eKzQhbQP.js";
63
- import { _ as _47 } from "./chunks/LpPie-BEJ2SfI6.js";
63
+ import { _ as _47 } from "./chunks/LpPie-BdSnta11.js";
64
64
  import { _ as _48 } from "./chunks/LpPhoneInput-BCbrrhgE.js";
65
65
  import { filterCountries, flagEmoji, loadCountries, matchCountryByValue } from "./components/countries.js";
66
66
  import { _ as _49 } from "./chunks/LpPopover-DCKeqiVn.js";
@@ -68,14 +68,14 @@ import { _ as _50 } from "./chunks/LpProgress-CBU1iI69.js";
68
68
  import { _ as _51 } from "./chunks/LpRadio-B5AfqTpZ.js";
69
69
  import { _ as _52 } from "./chunks/LpRadioGroup-DmEW0l78.js";
70
70
  import { _ as _53 } from "./chunks/LpRollingText-DB7upf-5.js";
71
- import { _ as _54 } from "./chunks/LpScrollArea-Bry1fdOM.js";
71
+ import { _ as _54 } from "./chunks/LpScrollArea-Hz3-JWUG.js";
72
72
  import { _ as _55 } from "./chunks/LpSegmented-C09EEam2.js";
73
73
  import { _ as _56 } from "./chunks/LpSection-tKEH0jYf.js";
74
74
  import { _ as _57 } from "./chunks/LpSelect-DNIL6MB9.js";
75
75
  import { _ as _58 } from "./chunks/LpServiceNode-D8uJ8sGk.js";
76
76
  import { _ as _59 } from "./chunks/LpShift-DXNsauQZ.js";
77
77
  import { default as default6 } from "./components/LpShortcutsDialog.vue.js";
78
- import { _ as _60 } from "./chunks/LpSidebar-CQNB0-yU.js";
78
+ import { _ as _60 } from "./chunks/LpSidebar-DpEiGi8L.js";
79
79
  import { _ as _61 } from "./chunks/LpSkeleton-BB6XIV-w.js";
80
80
  import { _ as _62 } from "./chunks/LpSlider-Cuzmrd7p.js";
81
81
  import { _ as _63 } from "./chunks/LpSparkline-CB80N8SJ.js";
@@ -89,9 +89,9 @@ import { _ as _68 } from "./chunks/LpTabs-29iW1XOx.js";
89
89
  import { _ as _69 } from "./chunks/LpTagsInput-D1SuqbhB.js";
90
90
  import { addTags, splitTags } from "./components/tags.js";
91
91
  import { _ as _70 } from "./chunks/LpTextarea-uuScWo6-.js";
92
- import { _ as _71 } from "./chunks/LpThemeSwitcher-B4aVPbNC.js";
92
+ import { _ as _71 } from "./chunks/LpThemeSwitcher-BbYFFT5w.js";
93
93
  import { _ as _72 } from "./chunks/LpTilt-B7KHX1zH.js";
94
- import { _ as _73 } from "./chunks/LpToaster-DpJvoCOh.js";
94
+ import { _ as _73 } from "./chunks/LpToaster-DTtWuKvq.js";
95
95
  import { _ as _74 } from "./chunks/LpTooltip-CXVKcOXT.js";
96
96
  import { _ as _75 } from "./chunks/LpTooltipProvider-CftjV7Xc.js";
97
97
  import { _ as _76 } from "./chunks/LpTopologyCanvas-6ozNrQKh.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leavepulse/ui",
3
- "version": "0.45.0",
3
+ "version": "0.46.0",
4
4
  "type": "module",
5
5
  "description": "LeavePulse token-driven Vue component kit.",
6
6
  "repository": {
@@ -594,6 +594,10 @@ const grouped = computed<{ name: string; items: Command[] }[]>(() => {
594
594
  */
595
595
  const expanded = ref(new Set<string>())
596
596
  const moreOf = new WeakMap<Command, string>()
597
+ // The first row each "Show more" hides. Unfolding removes the "Show more" row
598
+ // itself, so the highlight has to be handed to this one: an id that is gone
599
+ // from the list sends the selection back to the top, and the list with it.
600
+ const firstHidden = new WeakMap<Command, string>()
597
601
 
598
602
  /*
599
603
  * Folding hides at least two rows: a "Show 1 more" row takes the same space
@@ -609,6 +613,7 @@ function folded(name: string, items: Command[]): Command[] {
609
613
  keepOpen: true,
610
614
  }
611
615
  moreOf.set(more, name)
616
+ firstHidden.set(more, items[limit].id)
612
617
  return [...items.slice(0, limit), more]
613
618
  }
614
619
 
@@ -822,6 +827,7 @@ function run(c: Command | undefined) {
822
827
  // was hidden: the arrows carry on from where the fold was.
823
828
  const group = moreOf.get(c)
824
829
  if (group !== undefined) {
830
+ selectedId.value = firstHidden.get(c) ?? null
825
831
  expanded.value = new Set([...expanded.value, group])
826
832
  inputRef.value?.focus()
827
833
  return
@@ -939,7 +945,7 @@ useHotkeys(() =>
939
945
  <DialogContent
940
946
  ref="contentRef"
941
947
  class="lp-cmd-dialog fixed left-1/2 top-[12vh] flex max-h-[76vh] -translate-x-1/2 flex-col overflow-hidden rounded-card border border-line shadow-panel outline-none data-[state=open]:animate-[pop-in_160ms_var(--ease-emphasized)] data-[state=closed]:animate-[pop-out_130ms_ease]"
942
- :class="[frosted ? (layer.nested ? 'lp-glass-overlay--nested' : 'lp-glass-overlay') : 'bg-surface-raised', previewPane && 'lp-cmd-split']"
948
+ :class="[frosted ? (layer.nested ? 'lp-glass-overlay lp-glass-overlay--nested' : 'lp-glass-overlay') : 'bg-surface-raised', previewPane && 'lp-cmd-split']"
943
949
  :style="{ zIndex: layer.panel }"
944
950
  :data-pane="paneOpen ? 'open' : undefined"
945
951
  @open-auto-focus.prevent
@@ -9,6 +9,7 @@
9
9
  import { ContextMenuContent, ContextMenuPortal, ContextMenuRoot, ContextMenuTrigger } from "reka-ui"
10
10
  import { computed } from "vue"
11
11
  import ContextMenuItems from "./ContextMenuItems.vue"
12
+ import MenuTitle from "./MenuTitle.vue"
12
13
  import { POPOVER_PANEL } from "./dropdown"
13
14
 
14
15
  export interface ContextMenuItemDef {
@@ -40,6 +41,17 @@ const props = defineProps<{
40
41
  * native-menu mode on that first click and swallow it.
41
42
  */
42
43
  always?: boolean
44
+ /**
45
+ * What the menu acts on, shown as a heading above the items: the row's name
46
+ * in a list of similar rows, so the user sees which one the right-click hit.
47
+ * Also names the menu for assistive tech.
48
+ */
49
+ title?: string
50
+ /** A muted second line under `title`, e.g. a version or a path. */
51
+ subtitle?: string
52
+ /** An icon beside the title, or `titleImage` for a picture (an avatar, a logo). */
53
+ titleIcon?: string
54
+ titleImage?: string
43
55
  }>()
44
56
 
45
57
  // With no items the trigger is disabled, so the element keeps the browser's
@@ -87,7 +99,13 @@ function returnFocus(event: Event) {
87
99
  <slot />
88
100
  </ContextMenuTrigger>
89
101
  <ContextMenuPortal v-if="items.length">
90
- <ContextMenuContent :collision-padding="8" :class="PANEL" @close-auto-focus="returnFocus">
102
+ <ContextMenuContent
103
+ :collision-padding="8"
104
+ :class="PANEL"
105
+ :aria-label="title"
106
+ @close-auto-focus="returnFocus"
107
+ >
108
+ <MenuTitle v-if="title" :title="title" :subtitle="subtitle" :icon="titleIcon" :image="titleImage" />
91
109
  <ContextMenuItems :items="items" :panel="PANEL" />
92
110
  </ContextMenuContent>
93
111
  </ContextMenuPortal>
@@ -20,6 +20,7 @@ export default { inheritAttrs: false }
20
20
  import { PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger } from "reka-ui"
21
21
  import { computed, ref, useAttrs } from "vue"
22
22
  import { useFieldControl } from "../composables/useField"
23
+ import { useLocale } from "../composables/useLocale"
23
24
  import { useLabels } from "../composables/useLpConfig"
24
25
  import { mergeClass } from "../composables/useMergedClass"
25
26
  import { POPOVER_PANEL } from "./dropdown"
@@ -73,12 +74,13 @@ const minute = computed(() => {
73
74
  return /^\d{2}:\d{2}$/.test(at) ? at : ""
74
75
  })
75
76
 
77
+ const locale = useLocale()
76
78
  const display = computed(() => {
77
79
  if (!props.modelValue) return ""
78
80
  // Parse as local midnight so the formatted day can't drift across a timezone.
79
81
  const [y, m, d] = day.value.split("-").map(Number)
80
82
  if (!y || !m || !d) return props.modelValue
81
- const shown = new Intl.DateTimeFormat(undefined, props.format).format(new Date(y, m - 1, d))
83
+ const shown = new Intl.DateTimeFormat(locale.value, props.format).format(new Date(y, m - 1, d))
82
84
  return props.time && minute.value ? `${shown}, ${minute.value}` : shown
83
85
  })
84
86
 
@@ -12,6 +12,7 @@ export default { inheritAttrs: false }
12
12
  import { PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger } from "reka-ui"
13
13
  import { computed, onBeforeUnmount, onMounted, ref, useAttrs } from "vue"
14
14
  import { useFieldControl } from "../composables/useField"
15
+ import { useLocale } from "../composables/useLocale"
15
16
  import { useLabels } from "../composables/useLpConfig"
16
17
  import { mergeClass } from "../composables/useMergedClass"
17
18
  import {
@@ -85,7 +86,8 @@ const text = useLabels<DateRangePickerLabels>(
85
86
 
86
87
  const open = ref(false)
87
88
  const value = computed(() => normalizeRange(props.modelValue))
88
- const display = computed(() => (value.value ? formatRange(value.value, props.locale, props.format) : ""))
89
+ const locale = useLocale(() => props.locale)
90
+ const display = computed(() => (value.value ? formatRange(value.value, locale.value, props.format) : ""))
89
91
 
90
92
  const presetList = computed<DateRangePreset[]>(() => {
91
93
  return props.presets ?? defaultRangePresets(text.value)
@@ -162,7 +162,7 @@ watch(() => props.open, (open) => (open ? claim() : release()), { immediate: tru
162
162
  onBeforeUnmount(release)
163
163
 
164
164
  const contentClass = computed(() => {
165
- const surface = frosted.value ? (layer.value.nested ? "lp-glass-overlay--nested" : "lp-glass-overlay") : "bg-surface-raised"
165
+ const surface = frosted.value ? (layer.value.nested ? "lp-glass-overlay lp-glass-overlay--nested" : "lp-glass-overlay") : "bg-surface-raised"
166
166
  const base = `fixed z-(--z-modal) flex flex-col border-line ${surface} shadow-panel outline-none`
167
167
  const map: Record<Direction, string> = {
168
168
  left: "inset-y-0 left-0 border-r rounded-r-card",
@@ -9,16 +9,25 @@ import {
9
9
  } from "reka-ui"
10
10
  import { POPOVER_PANEL } from "./dropdown"
11
11
  import LpIcon from "./LpIcon.vue"
12
+ import MenuTitle from "./MenuTitle.vue"
12
13
 
13
14
  export interface MenuItem {
14
15
  label: string
15
16
  icon?: string
16
17
  danger?: boolean
17
18
  separatorBefore?: boolean
19
+ disabled?: boolean
18
20
  onSelect?: () => void
19
21
  }
20
22
 
21
- defineProps<{ items: MenuItem[] }>()
23
+ defineProps<{
24
+ items: MenuItem[]
25
+ /** A heading naming what the menu acts on; see LpContextMenu's `title`. */
26
+ title?: string
27
+ subtitle?: string
28
+ titleIcon?: string
29
+ titleImage?: string
30
+ }>()
22
31
  </script>
23
32
 
24
33
  <template>
@@ -32,12 +41,15 @@ defineProps<{ items: MenuItem[] }>()
32
41
  :side-offset="6"
33
42
  align="end"
34
43
  :class="[POPOVER_PANEL, 'z-(--z-popover) min-w-44 p-1 outline-none']"
44
+ :aria-label="title"
35
45
  >
46
+ <MenuTitle v-if="title" :title="title" :subtitle="subtitle" :icon="titleIcon" :image="titleImage" />
36
47
  <template v-for="(item, i) in items" :key="i">
37
48
  <DropdownMenuSeparator v-if="item.separatorBefore" class="my-1 h-px bg-line" />
38
49
  <DropdownMenuItem
39
- class="group/item flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-sm outline-none transition-[background-color,color] duration-[var(--duration-fast)] data-[highlighted]:bg-brand-soft"
50
+ class="group/item flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-sm outline-none transition-[background-color,color] duration-[var(--duration-fast)] data-[disabled]:pointer-events-none data-[disabled]:opacity-45 data-[highlighted]:bg-brand-soft"
40
51
  :class="item.danger ? 'text-danger data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger' : 'text-ink data-[highlighted]:text-brand'"
52
+ :disabled="item.disabled"
41
53
  @select="item.onSelect?.()"
42
54
  >
43
55
  <LpIcon