@leavepulse/ui 0.22.18 → 0.22.20
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/dist/chunks/{LpAddressInput-DYN7a67n.js → LpAddressInput-CxKwIG6T.js} +1 -1
- package/dist/chunks/{LpFileTree-Cw50eG_y.js → LpFileTree-CMy2qQ1m.js} +4 -3
- package/dist/chunks/{LpFileTreeNode-DFg4PhOK.js → LpFileTreeNode-Cgf68Tup.js} +9 -7
- package/dist/chunks/{LpPhoneInput-BxuDyXp3.js → LpPhoneInput-NXXjciJJ.js} +2 -0
- package/dist/chunks/{LpSelect-C0QqopPi.js → LpSelect-Cw8-gL5F.js} +2 -0
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpFileTree.vue.d.ts +2 -0
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.d.ts +2 -0
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/src/components/LpFileTree.vue +4 -0
- package/src/components/LpFileTreeNode.vue +3 -0
- package/src/components/LpPhoneInput.vue +6 -0
- package/src/components/LpSelect.vue +0 -0
|
@@ -7,7 +7,7 @@ import { _ as _sfc_main$1 } from "./LpFormField-Bn-ZwC6z.js";
|
|
|
7
7
|
import { _ as _sfc_main$4 } from "./LpIcon-CCnX5_2j.js";
|
|
8
8
|
import { _ as _sfc_main$5 } from "./LpInput-BkomKdqQ.js";
|
|
9
9
|
import { _ as _sfc_main$7 } from "./LpModal-CNNSf5pv.js";
|
|
10
|
-
import { _ as _sfc_main$6 } from "./LpSelect-
|
|
10
|
+
import { _ as _sfc_main$6 } from "./LpSelect-Cw8-gL5F.js";
|
|
11
11
|
const _hoisted_1 = { class: "flex flex-col gap-3" };
|
|
12
12
|
const _hoisted_2 = { class: "flex items-stretch gap-2" };
|
|
13
13
|
const _hoisted_3 = { class: "grid gap-3 sm:grid-cols-[minmax(0,1fr)_10rem]" };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, computed, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createBlock, createVNode, withCtx, createElementVNode, renderSlot, mergeProps, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { computeStats, formatSize, sortNodes, subtreeIds, ancestorIds } from "../components/fileTree.js";
|
|
3
3
|
import { _ as _sfc_main$1 } from "./LpEmptyState-CrfyRJUG.js";
|
|
4
|
-
import { _ as _sfc_main$3 } from "./LpFileTreeNode-
|
|
4
|
+
import { _ as _sfc_main$3 } from "./LpFileTreeNode-Cgf68Tup.js";
|
|
5
5
|
import { _ as _sfc_main$2 } from "./LpScrollArea-D8xyKXcF.js";
|
|
6
6
|
const _hoisted_1 = {
|
|
7
7
|
key: 0,
|
|
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
emptyLabel: { default: "No files" },
|
|
35
35
|
emptyDescription: { default: "This folder is empty." }
|
|
36
36
|
},
|
|
37
|
-
emits: ["update:selected", "update:expanded", "select", "open", "expand", "collapse", "update:checked", "summary"],
|
|
37
|
+
emits: ["update:selected", "update:expanded", "select", "open", "expand", "collapse", "update:checked", "summary", "contextmenu"],
|
|
38
38
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
39
39
|
const props = __props;
|
|
40
40
|
const emit = __emit;
|
|
@@ -360,7 +360,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
360
360
|
onSelect,
|
|
361
361
|
onToggle,
|
|
362
362
|
onFocus: _cache[0] || (_cache[0] = ($event) => focusedId.value = $event.id),
|
|
363
|
-
onCheck
|
|
363
|
+
onCheck,
|
|
364
|
+
onContextmenu: _cache[1] || (_cache[1] = (n, e) => emit("contextmenu", n, e))
|
|
364
365
|
}, {
|
|
365
366
|
row: withCtx((slotProps) => [
|
|
366
367
|
renderSlot(_ctx.$slots, "row", mergeProps({ ref_for: true }, slotProps))
|
|
@@ -45,7 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
showSize: { type: Boolean },
|
|
46
46
|
showModified: { type: Boolean }
|
|
47
47
|
},
|
|
48
|
-
emits: ["select", "toggle", "focus", "check"],
|
|
48
|
+
emits: ["select", "toggle", "focus", "check", "contextmenu"],
|
|
49
49
|
setup(__props, { emit: __emit }) {
|
|
50
50
|
const props = __props;
|
|
51
51
|
const emit = __emit;
|
|
@@ -132,7 +132,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
132
132
|
__props.node.disabled ? "cursor-not-allowed text-muted/50" : isSelected.value ? "bg-brand-soft text-ink" : "text-muted hover:bg-surface-soft hover:text-ink"
|
|
133
133
|
]]),
|
|
134
134
|
style: normalizeStyle({ paddingLeft: `${__props.depth * 14 + 6}px` }),
|
|
135
|
-
onClick: withModifiers(onActivate, ["stop"])
|
|
135
|
+
onClick: withModifiers(onActivate, ["stop"]),
|
|
136
|
+
onContextmenu: _cache[2] || (_cache[2] = ($event) => emit("contextmenu", __props.node, $event))
|
|
136
137
|
}, [
|
|
137
138
|
createElementVNode("span", _hoisted_3, [
|
|
138
139
|
isLoading.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
@@ -177,7 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
177
178
|
__props.node.meta ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(__props.node.meta), 1)) : createCommentVNode("", true),
|
|
178
179
|
modifiedLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(modifiedLabel.value), 1)) : createCommentVNode("", true),
|
|
179
180
|
sizeLabel.value ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(sizeLabel.value), 1)) : createCommentVNode("", true)
|
|
180
|
-
],
|
|
181
|
+
], 46, _hoisted_2)
|
|
181
182
|
]),
|
|
182
183
|
_: 3
|
|
183
184
|
}, 8, ["items"]),
|
|
@@ -206,10 +207,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
206
207
|
stats: __props.stats,
|
|
207
208
|
"show-size": __props.showSize,
|
|
208
209
|
"show-modified": __props.showModified,
|
|
209
|
-
onSelect: _cache[
|
|
210
|
-
onToggle: _cache[
|
|
211
|
-
onFocus: _cache[
|
|
212
|
-
onCheck: _cache[
|
|
210
|
+
onSelect: _cache[3] || (_cache[3] = ($event) => emit("select", $event)),
|
|
211
|
+
onToggle: _cache[4] || (_cache[4] = ($event) => emit("toggle", $event)),
|
|
212
|
+
onFocus: _cache[5] || (_cache[5] = ($event) => emit("focus", $event)),
|
|
213
|
+
onCheck: _cache[6] || (_cache[6] = (n, v) => emit("check", n, v)),
|
|
214
|
+
onContextmenu: _cache[7] || (_cache[7] = (n, e) => emit("contextmenu", n, e))
|
|
213
215
|
}, {
|
|
214
216
|
row: withCtx((slotProps) => [
|
|
215
217
|
renderSlot(_ctx.$slots, "row", mergeProps({ ref_for: true }, slotProps))
|
|
@@ -97,6 +97,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
97
97
|
open: open.value,
|
|
98
98
|
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => open.value = $event),
|
|
99
99
|
"ignore-filter": true,
|
|
100
|
+
"reset-search-term-on-select": false,
|
|
101
|
+
"reset-search-term-on-blur": false,
|
|
100
102
|
disabled: __props.disabled,
|
|
101
103
|
class: "flex"
|
|
102
104
|
}, {
|
|
@@ -114,6 +114,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
114
114
|
multiple: __props.multiple,
|
|
115
115
|
disabled: __props.disabled,
|
|
116
116
|
"ignore-filter": true,
|
|
117
|
+
"reset-search-term-on-select": false,
|
|
118
|
+
"reset-search-term-on-blur": false,
|
|
117
119
|
class: "relative",
|
|
118
120
|
"onUpdate:modelValue": onUpdate,
|
|
119
121
|
"onUpdate:open": onOpenChange
|
|
@@ -71,6 +71,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
|
71
71
|
expand: (node: FileNode) => any;
|
|
72
72
|
select: (node: FileNode) => any;
|
|
73
73
|
summary: (summary: FileTreeSummary) => any;
|
|
74
|
+
contextmenu: (node: FileNode, event: MouseEvent) => any;
|
|
74
75
|
open: (node: FileNode) => any;
|
|
75
76
|
collapse: (node: FileNode) => any;
|
|
76
77
|
"update:selected": (id: string) => any;
|
|
@@ -80,6 +81,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
|
80
81
|
onExpand?: ((node: FileNode) => any) | undefined;
|
|
81
82
|
onSelect?: ((node: FileNode) => any) | undefined;
|
|
82
83
|
onSummary?: ((summary: FileTreeSummary) => any) | undefined;
|
|
84
|
+
onContextmenu?: ((node: FileNode, event: MouseEvent) => any) | undefined;
|
|
83
85
|
onOpen?: ((node: FileNode) => any) | undefined;
|
|
84
86
|
onCollapse?: ((node: FileNode) => any) | undefined;
|
|
85
87
|
"onUpdate:selected"?: ((id: string) => any) | undefined;
|
|
@@ -30,11 +30,13 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
30
30
|
check: (node: FileNode, value: boolean) => any;
|
|
31
31
|
focus: (node: FileNode) => any;
|
|
32
32
|
select: (node: FileNode) => any;
|
|
33
|
+
contextmenu: (node: FileNode, event: MouseEvent) => any;
|
|
33
34
|
toggle: (node: FileNode) => any;
|
|
34
35
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
35
36
|
onCheck?: ((node: FileNode, value: boolean) => any) | undefined;
|
|
36
37
|
onFocus?: ((node: FileNode) => any) | undefined;
|
|
37
38
|
onSelect?: ((node: FileNode) => any) | undefined;
|
|
39
|
+
onContextmenu?: ((node: FileNode, event: MouseEvent) => any) | undefined;
|
|
38
40
|
onToggle?: ((node: FileNode) => any) | undefined;
|
|
39
41
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
40
42
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ } from "./chunks/LayoutCanvas-Dd20boUG.js";
|
|
2
|
-
import { _ as _2 } from "./chunks/LpAddressInput-
|
|
2
|
+
import { _ as _2 } from "./chunks/LpAddressInput-CxKwIG6T.js";
|
|
3
3
|
import { _ as _3 } from "./chunks/LpMapPicker-DFKrd1Ne.js";
|
|
4
4
|
import { OSM_TILES, createNominatimProvider, emptyAddress, formatAddress, project, tileUrl, unproject } from "./components/address.js";
|
|
5
5
|
import { _ as _4 } from "./chunks/LpAlert-BAYHDSS1.js";
|
|
@@ -22,7 +22,7 @@ import { _ as _19 } from "./chunks/LpDivider-CUX46KR0.js";
|
|
|
22
22
|
import { _ as _20 } from "./chunks/LpDrawer-DAJN5rGK.js";
|
|
23
23
|
import { _ as _21 } from "./chunks/LpDropdownMenu-DJpoqRCb.js";
|
|
24
24
|
import { _ as _22 } from "./chunks/LpEmptyState-CrfyRJUG.js";
|
|
25
|
-
import { _ as _23 } from "./chunks/LpFileTree-
|
|
25
|
+
import { _ as _23 } from "./chunks/LpFileTree-CMy2qQ1m.js";
|
|
26
26
|
import { ancestorIds, checkStateOf, checkedCount, computeStats, fileIcon, formatModified, formatSize, sortNodes, subtreeIds, subtreeSize } from "./components/fileTree.js";
|
|
27
27
|
import { _ as _24 } from "./chunks/LpFormField-Bn-ZwC6z.js";
|
|
28
28
|
import { _ as _25 } from "./chunks/LpIcon-CCnX5_2j.js";
|
|
@@ -38,7 +38,7 @@ import { _ as _33 } from "./chunks/LpNumberField-B3JuQFol.js";
|
|
|
38
38
|
import { _ as _34 } from "./chunks/LpOtpInput-DqaT0Z75.js";
|
|
39
39
|
import { _ as _35 } from "./chunks/LpPagination-CeGuNe_q.js";
|
|
40
40
|
import { _ as _36 } from "./chunks/LpPasswordInput-DgUC2Ur7.js";
|
|
41
|
-
import { _ as _37 } from "./chunks/LpPhoneInput-
|
|
41
|
+
import { _ as _37 } from "./chunks/LpPhoneInput-NXXjciJJ.js";
|
|
42
42
|
import { flagEmoji, loadCountries, matchCountryByValue } from "./components/countries.js";
|
|
43
43
|
import { _ as _38 } from "./chunks/LpPopover-8268UmlC.js";
|
|
44
44
|
import { _ as _39 } from "./chunks/LpProgress-BhI0IbjC.js";
|
|
@@ -46,7 +46,7 @@ import { _ as _40 } from "./chunks/LpRadio-CL-pI0_O.js";
|
|
|
46
46
|
import { _ as _41 } from "./chunks/LpRadioGroup-B4yDTmi6.js";
|
|
47
47
|
import { _ as _42 } from "./chunks/LpScrollArea-D8xyKXcF.js";
|
|
48
48
|
import { _ as _43 } from "./chunks/LpSegmented-BmpanyAo.js";
|
|
49
|
-
import { _ as _44 } from "./chunks/LpSelect-
|
|
49
|
+
import { _ as _44 } from "./chunks/LpSelect-Cw8-gL5F.js";
|
|
50
50
|
import { _ as _45 } from "./chunks/LpServiceNode-D8uJ8sGk.js";
|
|
51
51
|
import { default as default3 } from "./components/LpShortcutsDialog.vue.js";
|
|
52
52
|
import { _ as _46 } from "./chunks/LpSidebar-D3GGLSE7.js";
|
package/package.json
CHANGED
|
@@ -103,6 +103,9 @@ const emit = defineEmits<{
|
|
|
103
103
|
(e: "update:checked", ids: string[]): void
|
|
104
104
|
/** Ticked set changed, with the rolled-up stats already computed. */
|
|
105
105
|
(e: "summary", summary: FileTreeSummary): void
|
|
106
|
+
/* Not prevented here: a caller that wants the native menu on some rows needs
|
|
107
|
+
the event intact to decide. */
|
|
108
|
+
(e: "contextmenu", node: FileNode, event: MouseEvent): void
|
|
106
109
|
}>()
|
|
107
110
|
|
|
108
111
|
defineSlots<{
|
|
@@ -528,6 +531,7 @@ defineExpose({ reveal, expandAll, collapseAll, checkAll, clearChecked, summary }
|
|
|
528
531
|
@toggle="onToggle"
|
|
529
532
|
@focus="focusedId = $event.id"
|
|
530
533
|
@check="onCheck"
|
|
534
|
+
@contextmenu="(n, e) => emit('contextmenu', n, e)"
|
|
531
535
|
>
|
|
532
536
|
<template #row="slotProps">
|
|
533
537
|
<slot name="row" v-bind="slotProps" />
|
|
@@ -47,6 +47,7 @@ const emit = defineEmits<{
|
|
|
47
47
|
(e: "toggle", node: FileNode): void
|
|
48
48
|
(e: "focus", node: FileNode): void
|
|
49
49
|
(e: "check", node: FileNode, value: boolean): void
|
|
50
|
+
(e: "contextmenu", node: FileNode, event: MouseEvent): void
|
|
50
51
|
}>()
|
|
51
52
|
|
|
52
53
|
// Declared explicitly: the component renders itself, so an inferred slot type
|
|
@@ -176,6 +177,7 @@ function onActivate() {
|
|
|
176
177
|
]"
|
|
177
178
|
:style="{ paddingLeft: `${depth * 14 + 6}px` }"
|
|
178
179
|
@click.stop="onActivate"
|
|
180
|
+
@contextmenu="emit('contextmenu', node, $event)"
|
|
179
181
|
>
|
|
180
182
|
<!-- Chevron sits in a fixed-width slot so names line up whether or not
|
|
181
183
|
the row can expand. Leaves get the same gutter, left empty. -->
|
|
@@ -281,6 +283,7 @@ function onActivate() {
|
|
|
281
283
|
@toggle="emit('toggle', $event)"
|
|
282
284
|
@focus="emit('focus', $event)"
|
|
283
285
|
@check="(n, v) => emit('check', n, v)"
|
|
286
|
+
@contextmenu="(n, e) => emit('contextmenu', n, e)"
|
|
284
287
|
>
|
|
285
288
|
<template #row="slotProps">
|
|
286
289
|
<slot name="row" v-bind="slotProps" />
|
|
@@ -160,9 +160,15 @@ const sizeClass = {
|
|
|
160
160
|
disabled ? 'cursor-not-allowed opacity-55' : '',
|
|
161
161
|
]"
|
|
162
162
|
>
|
|
163
|
+
<!-- reset-search-term-on-{select,blur}: as in LpSelect, the trigger shows
|
|
164
|
+
the selection and the box only filters, so reka seeding the chosen value
|
|
165
|
+
into it would pin the list to one country. Harmless today because the
|
|
166
|
+
select handler clears `query` by hand, declared so it stays that way. -->
|
|
163
167
|
<ComboboxRoot
|
|
164
168
|
v-model:open="open"
|
|
165
169
|
:ignore-filter="true"
|
|
170
|
+
:reset-search-term-on-select="false"
|
|
171
|
+
:reset-search-term-on-blur="false"
|
|
166
172
|
:disabled="disabled"
|
|
167
173
|
class="flex"
|
|
168
174
|
>
|
|
Binary file
|