@leavepulse/ui 0.22.21 → 0.22.22
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-CxKwIG6T.js → LpAddressInput-peTpNSJK.js} +3 -3
- package/dist/chunks/{LpAppShell-D8CAP9oF.js → LpAppShell-CaQYQKZV.js} +25 -14
- package/dist/chunks/{LpConfirmDialog-CmgeAdCh.js → LpConfirmDialog-DOU_zaTI.js} +1 -1
- package/dist/chunks/{LpFormField-Bn-ZwC6z.js → LpFormField-CesaPWPO.js} +12 -6
- package/dist/chunks/{LpInput-BkomKdqQ.js → LpInput-BfLIWV-P.js} +1 -1
- package/dist/chunks/{LpModal-CNNSf5pv.js → LpModal-D_o-56To.js} +13 -76
- package/dist/chunks/{LpNotificationBell-DWDEkmdA.js → LpNotificationBell-a08cl0yY.js} +67 -61
- package/dist/chunks/{LpPasswordInput-DgUC2Ur7.js → LpPasswordInput-BfjDrvZq.js} +1 -1
- package/dist/chunks/LpShift-DXNsauQZ.js +40 -0
- package/dist/chunks/{LpTextarea-CRAkhemZ.js → LpTextarea-BDl7PR9U.js} +1 -1
- package/dist/component-names.d.ts +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAppShell.vue.d.ts +6 -6
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpShift.vue.d.ts +36 -0
- package/dist/components/LpShift.vue.js +4 -0
- package/dist/components/LpShortcutsDialog.vue.js +1 -1
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/composables/useShift.d.ts +35 -0
- package/dist/composables/useShift.js +112 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +44 -40
- package/package.json +1 -1
- package/src/component-names.ts +1 -0
- package/src/components/LpAppShell.vue +27 -7
- package/src/components/LpFormField.vue +19 -2
- package/src/components/LpModal.vue +20 -128
- package/src/components/LpNotificationBell.vue +48 -42
- package/src/components/LpShift.vue +90 -0
- package/src/composables/useShift.ts +236 -0
- package/src/index.ts +3 -0
|
@@ -3,10 +3,10 @@ import { OSM_TILES, createNominatimProvider, emptyAddress, formatAddress } from
|
|
|
3
3
|
import { flagEmoji, loadCountries } from "../components/countries.js";
|
|
4
4
|
import { _ as _sfc_main$2 } from "./LpAutocomplete-DExlIZe_.js";
|
|
5
5
|
import { _ as _sfc_main$3 } from "./LpButton-5VXXCjwF.js";
|
|
6
|
-
import { _ as _sfc_main$1 } from "./LpFormField-
|
|
6
|
+
import { _ as _sfc_main$1 } from "./LpFormField-CesaPWPO.js";
|
|
7
7
|
import { _ as _sfc_main$4 } from "./LpIcon-CCnX5_2j.js";
|
|
8
|
-
import { _ as _sfc_main$5 } from "./LpInput-
|
|
9
|
-
import { _ as _sfc_main$7 } from "./LpModal-
|
|
8
|
+
import { _ as _sfc_main$5 } from "./LpInput-BfLIWV-P.js";
|
|
9
|
+
import { _ as _sfc_main$7 } from "./LpModal-D_o-56To.js";
|
|
10
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" };
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { defineComponent, computed, watch, openBlock, createElementBlock, createVNode, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, normalizeClass, toDisplayString,
|
|
1
|
+
import { defineComponent, computed, watch, openBlock, createElementBlock, createVNode, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, normalizeClass, toDisplayString, createBlock } from "vue";
|
|
2
2
|
import { _ as _sfc_main$2 } from "./LpButton-5VXXCjwF.js";
|
|
3
3
|
import { _ as _sfc_main$3 } from "./LpIcon-CCnX5_2j.js";
|
|
4
|
-
import { _ as _sfc_main$
|
|
4
|
+
import { _ as _sfc_main$5 } from "./LpScrollArea-D8xyKXcF.js";
|
|
5
|
+
import { _ as _sfc_main$4 } from "./LpShift-DXNsauQZ.js";
|
|
5
6
|
import { _ as _sfc_main$1 } from "./LpSidebar-D3GGLSE7.js";
|
|
6
7
|
const _hoisted_1 = { class: "flex h-dvh overflow-hidden bg-surface text-ink" };
|
|
7
8
|
const _hoisted_2 = { class: "flex min-w-0 flex-1 flex-col" };
|
|
8
9
|
const _hoisted_3 = { class: "flex h-16 shrink-0 items-center gap-3 border-b border-line bg-surface px-4 md:px-6" };
|
|
9
10
|
const _hoisted_4 = { class: "truncate text-lg font-semibold" };
|
|
10
11
|
const _hoisted_5 = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "ml-auto flex items-center gap-2"
|
|
13
|
-
};
|
|
14
|
-
const _hoisted_6 = {
|
|
15
12
|
key: 0,
|
|
16
13
|
class: "min-h-0 flex-1 overflow-hidden"
|
|
17
14
|
};
|
|
@@ -146,16 +143,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
143
|
]),
|
|
147
144
|
_: 1
|
|
148
145
|
}, 8, ["class"]),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
146
|
+
createVNode(_sfc_main$4, {
|
|
147
|
+
axis: "height",
|
|
148
|
+
class: "flex min-w-0 flex-1 items-center"
|
|
149
|
+
}, {
|
|
150
|
+
default: withCtx(() => [
|
|
151
|
+
renderSlot(_ctx.$slots, "header-title", {}, () => [
|
|
152
|
+
createElementVNode("h1", _hoisted_4, toDisplayString(pageTitle.value), 1)
|
|
153
|
+
])
|
|
154
|
+
]),
|
|
155
|
+
_: 3
|
|
156
|
+
}),
|
|
157
|
+
createVNode(_sfc_main$4, {
|
|
158
|
+
axis: "width",
|
|
159
|
+
class: "ml-auto flex shrink-0 items-center gap-2"
|
|
160
|
+
}, {
|
|
161
|
+
default: withCtx(() => [
|
|
162
|
+
renderSlot(_ctx.$slots, "header-actions")
|
|
163
|
+
]),
|
|
164
|
+
_: 3
|
|
165
|
+
})
|
|
155
166
|
]),
|
|
156
|
-
__props.fullBleed ? (openBlock(), createElementBlock("div",
|
|
167
|
+
__props.fullBleed ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
157
168
|
renderSlot(_ctx.$slots, "default")
|
|
158
|
-
])) : (openBlock(), createBlock(_sfc_main$
|
|
169
|
+
])) : (openBlock(), createBlock(_sfc_main$5, {
|
|
159
170
|
key: 1,
|
|
160
171
|
class: "min-h-0 flex-1",
|
|
161
172
|
"content-class": `px-4 py-6 md:px-6 ${__props.contentClass}`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, withCtx, renderSlot, createVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
2
|
import { _ as _sfc_main$2 } from "./LpButton-5VXXCjwF.js";
|
|
3
|
-
import { _ as _sfc_main$1 } from "./LpModal-
|
|
3
|
+
import { _ as _sfc_main$1 } from "./LpModal-D_o-56To.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "LpConfirmDialog",
|
|
6
6
|
props: {
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { defineComponent, useId, openBlock, createElementBlock, createBlock, unref, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
|
|
1
|
+
import { defineComponent, useId, openBlock, createElementBlock, createBlock, unref, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot, createVNode } from "vue";
|
|
2
2
|
import { Label } from "reka-ui";
|
|
3
|
+
import { _ as _sfc_main$1 } from "./LpShift-DXNsauQZ.js";
|
|
3
4
|
const _hoisted_1 = { class: "flex flex-col gap-1.5" };
|
|
4
5
|
const _hoisted_2 = {
|
|
5
6
|
key: 0,
|
|
6
7
|
class: "text-danger"
|
|
7
8
|
};
|
|
8
9
|
const _hoisted_3 = {
|
|
9
|
-
key:
|
|
10
|
-
class: "text-xs text-danger"
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "pt-1.5 text-xs text-danger"
|
|
11
12
|
};
|
|
12
13
|
const _hoisted_4 = {
|
|
13
|
-
key:
|
|
14
|
-
class: "text-xs text-muted"
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "pt-1.5 text-xs text-muted"
|
|
15
16
|
};
|
|
16
17
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
18
|
__name: "LpFormField",
|
|
@@ -37,7 +38,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
_: 1
|
|
38
39
|
}, 8, ["for"])) : createCommentVNode("", true),
|
|
39
40
|
renderSlot(_ctx.$slots, "default", { id: unref(id) }),
|
|
40
|
-
|
|
41
|
+
createVNode(_sfc_main$1, { axis: "height" }, {
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
__props.error ? (openBlock(), createElementBlock("p", _hoisted_3, toDisplayString(__props.error), 1)) : __props.hint ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(__props.hint), 1)) : createCommentVNode("", true)
|
|
44
|
+
]),
|
|
45
|
+
_: 1
|
|
46
|
+
})
|
|
41
47
|
]);
|
|
42
48
|
};
|
|
43
49
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, useSlots, useAttrs, ref, openBlock, createBlock, resolveDynamicComponent, normalizeStyle, normalizeClass, withCtx, createElementVNode, createElementBlock, renderSlot, createCommentVNode, mergeProps, unref } from "vue";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
3
|
import { useInputFilter } from "../composables/useInputFilter.js";
|
|
4
|
-
import { _ as _sfc_main$1 } from "./LpFormField-
|
|
4
|
+
import { _ as _sfc_main$1 } from "./LpFormField-CesaPWPO.js";
|
|
5
5
|
import { _ as _sfc_main$2 } from "./LpIcon-CCnX5_2j.js";
|
|
6
6
|
const _hoisted_1 = {
|
|
7
7
|
key: 0,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent, computed, useSlots, ref, watch,
|
|
1
|
+
import { defineComponent, computed, useSlots, ref, watch, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, mergeProps, createElementBlock, renderSlot, createTextVNode, toDisplayString, createCommentVNode, normalizeClass } from "vue";
|
|
2
2
|
import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose } from "reka-ui";
|
|
3
|
+
import { useShift } from "../composables/useShift.js";
|
|
3
4
|
import { CLOSE_ICON } from "../components/dropdown.js";
|
|
4
5
|
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
5
6
|
import { _ as _sfc_main$2 } from "./LpScrollArea-D8xyKXcF.js";
|
|
@@ -13,7 +14,6 @@ const _hoisted_4 = {
|
|
|
13
14
|
key: 3,
|
|
14
15
|
class: "flex shrink-0 justify-end gap-2 p-5 pt-4"
|
|
15
16
|
};
|
|
16
|
-
const TWEEN_MS = 160;
|
|
17
17
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
18
|
__name: "LpModal",
|
|
19
19
|
props: {
|
|
@@ -82,82 +82,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
let settleTimer;
|
|
91
|
-
let lastHeight = 0;
|
|
92
|
-
let inFlight = false;
|
|
93
|
-
const retune = (el) => {
|
|
94
|
-
if (inFlight) return;
|
|
95
|
-
const from = lastHeight;
|
|
96
|
-
el.style.height = "";
|
|
97
|
-
el.style.maxHeight = "none";
|
|
98
|
-
const to = el.offsetHeight;
|
|
99
|
-
el.style.maxHeight = "";
|
|
100
|
-
lastHeight = to;
|
|
101
|
-
if (to === 0 || from === 0 || to === from) return;
|
|
102
|
-
el.style.height = `${from}px`;
|
|
103
|
-
void el.offsetHeight;
|
|
104
|
-
el.style.height = `${to}px`;
|
|
105
|
-
inFlight = true;
|
|
106
|
-
resizing.value = true;
|
|
107
|
-
clearTimeout(settleTimer);
|
|
108
|
-
settleTimer = setTimeout(() => {
|
|
109
|
-
inFlight = false;
|
|
110
|
-
resizing.value = false;
|
|
111
|
-
el.style.height = "";
|
|
112
|
-
lastHeight = el.offsetHeight;
|
|
113
|
-
}, TWEEN_MS);
|
|
114
|
-
};
|
|
85
|
+
const {
|
|
86
|
+
el: sizedEl,
|
|
87
|
+
tweening,
|
|
88
|
+
resizing
|
|
89
|
+
} = useShift({ axis: "height", enabled: () => props.open });
|
|
115
90
|
watch(
|
|
116
|
-
() => props.open,
|
|
117
|
-
(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
ro = void 0;
|
|
121
|
-
mo = void 0;
|
|
122
|
-
cancelAnimationFrame(raf);
|
|
123
|
-
clearTimeout(settleTimer);
|
|
124
|
-
tweening.value = false;
|
|
125
|
-
resizing.value = false;
|
|
126
|
-
lastHeight = 0;
|
|
127
|
-
inFlight = false;
|
|
128
|
-
const el = panelRef.value?.$el;
|
|
129
|
-
if (!isOpen || !(el instanceof HTMLElement)) return;
|
|
130
|
-
lastHeight = el.offsetHeight;
|
|
131
|
-
el.style.height = `${el.offsetHeight}px`;
|
|
132
|
-
raf = requestAnimationFrame(() => {
|
|
133
|
-
tweening.value = true;
|
|
134
|
-
el.style.height = "";
|
|
135
|
-
});
|
|
136
|
-
const watchChildren = () => {
|
|
137
|
-
if (!ro) return;
|
|
138
|
-
ro.disconnect();
|
|
139
|
-
for (const child of Array.from(el.children)) ro.observe(child);
|
|
140
|
-
};
|
|
141
|
-
if (typeof ResizeObserver !== "undefined") {
|
|
142
|
-
ro = new ResizeObserver(() => retune(el));
|
|
143
|
-
watchChildren();
|
|
144
|
-
}
|
|
145
|
-
if (typeof MutationObserver !== "undefined") {
|
|
146
|
-
mo = new MutationObserver(() => {
|
|
147
|
-
watchChildren();
|
|
148
|
-
retune(el);
|
|
149
|
-
});
|
|
150
|
-
mo.observe(el, { childList: true, subtree: true, characterData: true });
|
|
151
|
-
}
|
|
91
|
+
() => props.open ? panelRef.value : null,
|
|
92
|
+
(panel) => {
|
|
93
|
+
const el = panel?.$el;
|
|
94
|
+
sizedEl.value = el instanceof HTMLElement ? el : null;
|
|
152
95
|
},
|
|
153
96
|
{ flush: "post" }
|
|
154
97
|
);
|
|
155
|
-
onBeforeUnmount(() => {
|
|
156
|
-
ro?.disconnect();
|
|
157
|
-
mo?.disconnect();
|
|
158
|
-
cancelAnimationFrame(raf);
|
|
159
|
-
clearTimeout(settleTimer);
|
|
160
|
-
});
|
|
161
98
|
return (_ctx, _cache) => {
|
|
162
99
|
return openBlock(), createBlock(unref(DialogRoot), {
|
|
163
100
|
open: __props.open,
|
|
@@ -171,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
171
108
|
createVNode(unref(DialogContent), mergeProps({
|
|
172
109
|
ref_key: "panelRef",
|
|
173
110
|
ref: panelRef,
|
|
174
|
-
class: ["pointer-events-auto flex max-h-[min(90vh,calc(100dvh-2rem))] min-h-0 flex-col overflow-hidden rounded-card border border-line bg-surface-raised shadow-panel outline-none data-[state=open]:animate-[rise-in_var(--duration-medium)_var(--ease-emphasized)] data-[state=closed]:animate-[rise-out_120ms_cubic-bezier(0.4,0,1,1)]", [widthClass.value, tweening
|
|
111
|
+
class: ["pointer-events-auto flex max-h-[min(90vh,calc(100dvh-2rem))] min-h-0 flex-col overflow-hidden rounded-card border border-line bg-surface-raised shadow-panel outline-none data-[state=open]:animate-[rise-in_var(--duration-medium)_var(--ease-emphasized)] data-[state=closed]:animate-[rise-out_120ms_cubic-bezier(0.4,0,1,1)]", [widthClass.value, unref(tweening) ? "transition-[height] duration-fast ease-[var(--ease-emphasized)] motion-reduce:transition-none" : ""]],
|
|
175
112
|
style: __props.width ? { width: __props.width } : void 0
|
|
176
113
|
}, describedByAttrs.value, { onOpenAutoFocus }), {
|
|
177
114
|
default: withCtx(() => [
|
|
@@ -217,7 +154,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
217
154
|
renderSlot(_ctx.$slots, "default")
|
|
218
155
|
], 2)) : (openBlock(), createBlock(_sfc_main$2, {
|
|
219
156
|
key: 2,
|
|
220
|
-
class: normalizeClass(["min-h-0 flex-1 text-sm text-ink/90", resizing
|
|
157
|
+
class: normalizeClass(["min-h-0 flex-1 text-sm text-ink/90", unref(resizing) ? "[&_[data-scrollbarimpl]]:invisible" : ""]),
|
|
221
158
|
"content-class": bodyPad.value
|
|
222
159
|
}, {
|
|
223
160
|
default: withCtx(() => [
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent, computed, useModel, openBlock, createBlock, withCtx, createElementVNode, toDisplayString, createElementBlock, createCommentVNode, Fragment, renderList, resolveDynamicComponent, normalizeClass,
|
|
2
|
-
import { _ as _sfc_main$
|
|
3
|
-
import { _ as _sfc_main$
|
|
4
|
-
import { _ as _sfc_main$
|
|
5
|
-
import { _ as _sfc_main$
|
|
6
|
-
import { _ as _sfc_main$
|
|
1
|
+
import { defineComponent, computed, useModel, openBlock, createBlock, withCtx, createElementVNode, toDisplayString, createElementBlock, createCommentVNode, createVNode, Fragment, renderList, resolveDynamicComponent, normalizeClass, createTextVNode, mergeModels } from "vue";
|
|
2
|
+
import { _ as _sfc_main$8 } from "./LpBadge-BPodVcJa.js";
|
|
3
|
+
import { _ as _sfc_main$7 } from "./LpButton-5VXXCjwF.js";
|
|
4
|
+
import { _ as _sfc_main$5 } from "./LpContextMenu-D0mzXqA7.js";
|
|
5
|
+
import { _ as _sfc_main$3 } from "./LpEmptyState-CrfyRJUG.js";
|
|
6
|
+
import { _ as _sfc_main$6 } from "./LpIcon-CCnX5_2j.js";
|
|
7
7
|
import { _ as _sfc_main$1 } from "./LpPopover-8268UmlC.js";
|
|
8
|
-
import { _ as _sfc_main$
|
|
8
|
+
import { _ as _sfc_main$4 } from "./LpScrollArea-D8xyKXcF.js";
|
|
9
|
+
import { _ as _sfc_main$2 } from "./LpShift-DXNsauQZ.js";
|
|
9
10
|
const _hoisted_1 = { class: "flex items-center justify-between gap-2 px-3 py-2.5" };
|
|
10
11
|
const _hoisted_2 = { class: "text-sm font-semibold" };
|
|
11
12
|
const _hoisted_3 = {
|
|
@@ -134,9 +135,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
134
135
|
"panel-class": "w-80 p-0"
|
|
135
136
|
}, {
|
|
136
137
|
trigger: withCtx(() => [
|
|
137
|
-
createVNode(_sfc_main$
|
|
138
|
+
createVNode(_sfc_main$5, { items: contextMenu.value }, {
|
|
138
139
|
default: withCtx(() => [
|
|
139
|
-
createVNode(_sfc_main$
|
|
140
|
+
createVNode(_sfc_main$7, {
|
|
140
141
|
variant: "ghost",
|
|
141
142
|
size: "sm",
|
|
142
143
|
class: "relative",
|
|
@@ -144,11 +145,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
144
145
|
onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
|
|
145
146
|
}, {
|
|
146
147
|
default: withCtx(() => [
|
|
147
|
-
createVNode(_sfc_main$
|
|
148
|
+
createVNode(_sfc_main$6, {
|
|
148
149
|
name: "lucide:bell",
|
|
149
150
|
size: 18
|
|
150
151
|
}),
|
|
151
|
-
hasUnread.value ? (openBlock(), createBlock(_sfc_main$
|
|
152
|
+
hasUnread.value ? (openBlock(), createBlock(_sfc_main$8, {
|
|
152
153
|
key: 0,
|
|
153
154
|
tone: "danger",
|
|
154
155
|
class: "absolute -right-1 -top-1 min-w-4 justify-center px-1 py-0 text-[10px] leading-4"
|
|
@@ -175,65 +176,70 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
176
|
onClick: _cache[1] || (_cache[1] = ($event) => emit("markAllRead"))
|
|
176
177
|
}, toDisplayString(l.value.markAllRead), 1)) : createCommentVNode("", true)
|
|
177
178
|
]),
|
|
178
|
-
|
|
179
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(4, (i) => {
|
|
180
|
-
return createElementVNode("div", {
|
|
181
|
-
key: i,
|
|
182
|
-
class: "h-12 animate-pulse rounded-control bg-surface-soft"
|
|
183
|
-
});
|
|
184
|
-
}), 64))
|
|
185
|
-
])) : !__props.items.length ? (openBlock(), createBlock(_sfc_main$2, {
|
|
186
|
-
key: 1,
|
|
187
|
-
icon: "lucide:bell-off",
|
|
188
|
-
title: l.value.empty,
|
|
189
|
-
class: "px-3 py-10"
|
|
190
|
-
}, null, 8, ["title"])) : (openBlock(), createBlock(_sfc_main$3, {
|
|
191
|
-
key: 2,
|
|
192
|
-
class: "max-h-96",
|
|
193
|
-
"content-class": "flex flex-col gap-0.5 px-2 pb-2"
|
|
194
|
-
}, {
|
|
179
|
+
createVNode(_sfc_main$2, { axis: "height" }, {
|
|
195
180
|
default: withCtx(() => [
|
|
196
|
-
(openBlock(
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
181
|
+
__props.loading ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
182
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(4, (i) => {
|
|
183
|
+
return createElementVNode("div", {
|
|
184
|
+
key: i,
|
|
185
|
+
class: "h-12 animate-pulse rounded-control bg-surface-soft"
|
|
186
|
+
});
|
|
187
|
+
}), 64))
|
|
188
|
+
])) : !__props.items.length ? (openBlock(), createBlock(_sfc_main$3, {
|
|
189
|
+
key: 1,
|
|
190
|
+
icon: "lucide:bell-off",
|
|
191
|
+
title: l.value.empty,
|
|
192
|
+
class: "px-3 py-10"
|
|
193
|
+
}, null, 8, ["title"])) : (openBlock(), createBlock(_sfc_main$4, {
|
|
194
|
+
key: 2,
|
|
195
|
+
class: "max-h-96",
|
|
196
|
+
"content-class": "flex flex-col gap-0.5 px-2 pb-2"
|
|
197
|
+
}, {
|
|
198
|
+
default: withCtx(() => [
|
|
199
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
200
|
+
return openBlock(), createBlock(_sfc_main$5, {
|
|
201
|
+
key: item.id,
|
|
202
|
+
items: rowMenu(item)
|
|
207
203
|
}, {
|
|
208
204
|
default: withCtx(() => [
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
], 2),
|
|
217
|
-
createElementVNode("span", _hoisted_4, [
|
|
218
|
-
createElementVNode("span", _hoisted_5, [
|
|
205
|
+
(openBlock(), createBlock(resolveDynamicComponent(item.link ? "a" : "button"), {
|
|
206
|
+
href: item.link || void 0,
|
|
207
|
+
type: item.link ? void 0 : "button",
|
|
208
|
+
class: normalizeClass(["group/notif flex w-full items-start gap-2.5 rounded-control px-2 py-2 text-left outline-none transition-colors hover:bg-white/[0.05] focus-visible:bg-white/[0.05]", item.read ? "" : "bg-brand-soft/35"]),
|
|
209
|
+
onClick: ($event) => onSelect(item)
|
|
210
|
+
}, {
|
|
211
|
+
default: withCtx(() => [
|
|
219
212
|
createElementVNode("span", {
|
|
220
|
-
class: normalizeClass(["
|
|
221
|
-
},
|
|
222
|
-
|
|
213
|
+
class: normalizeClass(["grid size-7 shrink-0 place-items-center rounded-control", item.read ? "bg-surface-soft text-muted" : "bg-brand-soft text-brand"])
|
|
214
|
+
}, [
|
|
215
|
+
createVNode(_sfc_main$6, {
|
|
216
|
+
name: item.icon || "lucide:bell",
|
|
217
|
+
size: 15
|
|
218
|
+
}, null, 8, ["name"])
|
|
219
|
+
], 2),
|
|
220
|
+
createElementVNode("span", _hoisted_4, [
|
|
221
|
+
createElementVNode("span", _hoisted_5, [
|
|
222
|
+
createElementVNode("span", {
|
|
223
|
+
class: normalizeClass(["truncate text-sm font-medium", item.read ? "text-muted-strong" : "text-ink"])
|
|
224
|
+
}, toDisplayString(item.title), 3),
|
|
225
|
+
!item.read ? (openBlock(), createElementBlock("span", _hoisted_6)) : createCommentVNode("", true)
|
|
226
|
+
]),
|
|
227
|
+
item.body ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(item.body), 1)) : createCommentVNode("", true),
|
|
228
|
+
item.createdAt ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(timeAgo(item.createdAt)), 1)) : createCommentVNode("", true)
|
|
229
|
+
])
|
|
223
230
|
]),
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
])
|
|
231
|
+
_: 2
|
|
232
|
+
}, 1032, ["href", "type", "class", "onClick"]))
|
|
227
233
|
]),
|
|
228
234
|
_: 2
|
|
229
|
-
}, 1032, ["
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
})
|
|
235
|
+
}, 1032, ["items"]);
|
|
236
|
+
}), 128))
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
}))
|
|
234
240
|
]),
|
|
235
241
|
_: 1
|
|
236
|
-
})
|
|
242
|
+
})
|
|
237
243
|
]),
|
|
238
244
|
_: 1
|
|
239
245
|
}, 8, ["open"]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, openBlock, createBlock, createSlots, withCtx, createElementVNode, createVNode, renderSlot } from "vue";
|
|
2
2
|
import { _ as _sfc_main$2 } from "./LpIcon-CCnX5_2j.js";
|
|
3
|
-
import { _ as _sfc_main$1 } from "./LpInput-
|
|
3
|
+
import { _ as _sfc_main$1 } from "./LpInput-BfLIWV-P.js";
|
|
4
4
|
const _hoisted_1 = ["aria-label"];
|
|
5
5
|
const __default__ = { inheritAttrs: false };
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from "vue";
|
|
2
|
+
import { useShift } from "../composables/useShift.js";
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "LpShift",
|
|
5
|
+
props: {
|
|
6
|
+
axis: { default: "height" },
|
|
7
|
+
duration: {},
|
|
8
|
+
disabled: { type: Boolean, default: false }
|
|
9
|
+
},
|
|
10
|
+
setup(__props, { expose: __expose }) {
|
|
11
|
+
const props = __props;
|
|
12
|
+
const { el, tweening, resizing } = useShift({
|
|
13
|
+
axis: () => props.axis,
|
|
14
|
+
duration: () => props.duration,
|
|
15
|
+
enabled: () => !props.disabled
|
|
16
|
+
});
|
|
17
|
+
const TRANSITION_CLASS = {
|
|
18
|
+
height: "transition-[height]",
|
|
19
|
+
width: "transition-[width]",
|
|
20
|
+
both: "transition-[height,width]"
|
|
21
|
+
};
|
|
22
|
+
const transitionClass = computed(() => TRANSITION_CLASS[props.axis]);
|
|
23
|
+
__expose({ resizing });
|
|
24
|
+
return (_ctx, _cache) => {
|
|
25
|
+
return openBlock(), createElementBlock("div", {
|
|
26
|
+
ref_key: "el",
|
|
27
|
+
ref: el,
|
|
28
|
+
class: normalizeClass([
|
|
29
|
+
unref(tweening) && !__props.disabled ? `${transitionClass.value} duration-fast ease-[var(--ease-emphasized)] motion-reduce:transition-none` : "",
|
|
30
|
+
unref(resizing) ? "overflow-hidden" : ""
|
|
31
|
+
])
|
|
32
|
+
}, [
|
|
33
|
+
renderSlot(_ctx.$slots, "default", { resizing: unref(resizing) })
|
|
34
|
+
], 2);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
_sfc_main as _
|
|
40
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementVNode } from "vue";
|
|
2
|
-
import { _ as _sfc_main$1 } from "./LpFormField-
|
|
2
|
+
import { _ as _sfc_main$1 } from "./LpFormField-CesaPWPO.js";
|
|
3
3
|
const _hoisted_1 = ["value", "placeholder", "rows", "disabled"];
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "LpTextarea",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const COMPONENT_NAMES: readonly ["LayoutCanvas", "LayoutNode", "LpAddressInput", "LpAlert", "LpAppShell", "LpAutocomplete", "LpAvatar", "LpBadge", "LpBreadcrumbs", "LpButton", "LpCalendar", "LpCard", "LpCheckbox", "LpCodeBlock", "LpCommandPalette", "LpConfirmDialog", "LpContextMenu", "LpDatePicker", "LpDisclosure", "LpDivider", "LpDrawer", "LpDropdownMenu", "LpEmptyState", "LpFileTree", "LpFileTreeNode", "LpFormField", "LpIcon", "LpInfraNode", "LpInput", "LpLaneNode", "LpLightbox", "LpLink", "LpLogViewer", "LpMapPicker", "LpModal", "LpNotificationBell", "LpNumberField", "LpOtpInput", "LpPagination", "LpPasswordInput", "LpPhoneInput", "LpPopover", "LpProgress", "LpRadio", "LpRadioGroup", "LpScrollArea", "LpSegmented", "LpSelect", "LpServiceNode", "LpShortcutsDialog", "LpSidebar", "LpSidebarNav", "LpSkeleton", "LpSlider", "LpStat", "LpStepper", "LpSwitch", "LpTable", "LpTableOfContents", "LpTabs", "LpTextarea", "LpThemeSwitcher", "LpTilt", "LpToaster", "LpTooltip", "LpTopologyCanvas", "LpUptimeBar", "LpWaypointEdge"];
|
|
1
|
+
export declare const COMPONENT_NAMES: readonly ["LayoutCanvas", "LayoutNode", "LpAddressInput", "LpAlert", "LpAppShell", "LpAutocomplete", "LpAvatar", "LpBadge", "LpBreadcrumbs", "LpButton", "LpCalendar", "LpCard", "LpCheckbox", "LpCodeBlock", "LpCommandPalette", "LpConfirmDialog", "LpContextMenu", "LpDatePicker", "LpDisclosure", "LpDivider", "LpDrawer", "LpDropdownMenu", "LpEmptyState", "LpFileTree", "LpFileTreeNode", "LpFormField", "LpIcon", "LpInfraNode", "LpInput", "LpLaneNode", "LpLightbox", "LpLink", "LpLogViewer", "LpMapPicker", "LpModal", "LpNotificationBell", "LpNumberField", "LpOtpInput", "LpPagination", "LpPasswordInput", "LpPhoneInput", "LpPopover", "LpProgress", "LpRadio", "LpRadioGroup", "LpScrollArea", "LpSegmented", "LpSelect", "LpServiceNode", "LpShift", "LpShortcutsDialog", "LpSidebar", "LpSidebarNav", "LpSkeleton", "LpSlider", "LpStat", "LpStepper", "LpSwitch", "LpTable", "LpTableOfContents", "LpTabs", "LpTextarea", "LpThemeSwitcher", "LpTilt", "LpToaster", "LpTooltip", "LpTopologyCanvas", "LpUptimeBar", "LpWaypointEdge"];
|
|
@@ -38,7 +38,7 @@ type __VLS_Props = {
|
|
|
38
38
|
declare var __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {
|
|
39
39
|
item: SidebarItem;
|
|
40
40
|
active: boolean;
|
|
41
|
-
},
|
|
41
|
+
}, __VLS_42: {}, __VLS_50: {}, __VLS_52: {}, __VLS_60: {}, __VLS_62: {};
|
|
42
42
|
type __VLS_Slots = {} & {
|
|
43
43
|
logo?: (props: typeof __VLS_12) => any;
|
|
44
44
|
} & {
|
|
@@ -48,15 +48,15 @@ type __VLS_Slots = {} & {
|
|
|
48
48
|
} & {
|
|
49
49
|
'sidebar-item'?: (props: typeof __VLS_21) => any;
|
|
50
50
|
} & {
|
|
51
|
-
'header-title'?: (props: typeof
|
|
51
|
+
'header-title'?: (props: typeof __VLS_42) => any;
|
|
52
52
|
} & {
|
|
53
|
-
'header-actions'?: (props: typeof
|
|
53
|
+
'header-actions'?: (props: typeof __VLS_50) => any;
|
|
54
54
|
} & {
|
|
55
|
-
default?: (props: typeof
|
|
55
|
+
default?: (props: typeof __VLS_52) => any;
|
|
56
56
|
} & {
|
|
57
|
-
default?: (props: typeof
|
|
57
|
+
default?: (props: typeof __VLS_60) => any;
|
|
58
58
|
} & {
|
|
59
|
-
overlays?: (props: typeof
|
|
59
|
+
overlays?: (props: typeof __VLS_62) => any;
|
|
60
60
|
};
|
|
61
61
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
62
62
|
openDrawer: () => void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ShiftAxis } from '../composables/useShift';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Which dimension eases. `"width"` for a row that gains/loses controls,
|
|
5
|
+
* `"height"` for a stack whose content grows, `"both"` when either can.
|
|
6
|
+
*/
|
|
7
|
+
axis?: ShiftAxis;
|
|
8
|
+
/** Tween length in ms. Defaults to the kit's `--duration-fast`. */
|
|
9
|
+
duration?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Turn the easing off entirely — the wrapper stays, the box resizes
|
|
12
|
+
* instantly. For a box that is being driven by something else (a drag, a
|
|
13
|
+
* canvas), where a tween would fight the thing already animating it.
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare var __VLS_1: {
|
|
18
|
+
resizing: boolean;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
default?: (props: typeof __VLS_1) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
24
|
+
resizing: import('vue').Ref<boolean, boolean>;
|
|
25
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
axis: ShiftAxis;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString, unref } from "vue";
|
|
2
|
-
import { _ as _sfc_main$1 } from "../chunks/LpModal-
|
|
2
|
+
import { _ as _sfc_main$1 } from "../chunks/LpModal-D_o-56To.js";
|
|
3
3
|
import { appleModifierLabel } from "../composables/useHotkeys.js";
|
|
4
4
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
5
5
|
import '../assets/LpShortcutsDialog-B7H-RZLQ.css';const _hoisted_1 = { class: "shortcut-groups" };
|