@leavepulse/ui 0.14.7 → 0.14.9
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/{LpAppShell-BVXvIWjF.js → LpAppShell-BLKZDLh8.js} +2 -2
- package/dist/chunks/{LpCard-1yvWT9fx.js → LpCard-BmrTvWOe.js} +21 -9
- package/dist/chunks/{LpConfirmDialog-BV7iXMtQ.js → LpConfirmDialog-BA45MvRL.js} +1 -1
- package/dist/chunks/{LpDrawer-BBINS_bU.js → LpDrawer-6n5Hd-iF.js} +1 -1
- package/dist/chunks/{LpLogViewer-CH_5LQH_.js → LpLogViewer-BBgaY38i.js} +1 -1
- package/dist/chunks/{LpModal-D9WInJq_.js → LpModal-B9CVVC5U.js} +1 -1
- package/dist/chunks/{LpNotificationBell-BbJnzpq4.js → LpNotificationBell-B9VHks_D.js} +1 -1
- package/dist/chunks/{LpScrollArea-Bw5p782q.js → LpScrollArea-BtnZCCBT.js} +5 -1
- package/dist/chunks/{LpSidebar-CqKQX5gn.js → LpSidebar-tZ2z-PnM.js} +2 -2
- package/dist/chunks/{LpSidebarNav-CeiurDUn.js → LpSidebarNav-D-YvtwsH.js} +1 -1
- package/dist/chunks/{LpTable-B6jQX1W7.js → LpTable-CzHVcr3v.js} +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpCard.vue.d.ts +5 -0
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.js +1 -1
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpScrollArea.vue.d.ts +1 -0
- package/dist/components/LpScrollArea.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpTable.vue.js +1 -1
- package/dist/index.js +10 -10
- package/package.json +2 -2
- package/src/components/LpCard.vue +12 -5
- package/src/components/LpScrollArea.vue +9 -1
- package/src/tokens/tokens.css +42 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent, computed, watch, openBlock, createElementBlock, createVNode, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createElementVNode, normalizeClass, toDisplayString, createCommentVNode, 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 } from "./LpScrollArea-
|
|
5
|
-
import { _ as _sfc_main$1 } from "./LpSidebar-
|
|
4
|
+
import { _ as _sfc_main$4 } from "./LpScrollArea-BtnZCCBT.js";
|
|
5
|
+
import { _ as _sfc_main$1 } from "./LpSidebar-tZ2z-PnM.js";
|
|
6
6
|
const _hoisted_1 = { class: "flex h-dvh overflow-hidden bg-surface text-ink" };
|
|
7
7
|
const _hoisted_2 = { class: "flex min-w-0 flex-1 flex-col" };
|
|
8
8
|
const _hoisted_3 = { class: "flex h-16 shrink-0 items-center gap-3 border-b border-line bg-surface px-4 md:px-6" };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, withCtx,
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, withCtx, resolveDynamicComponent, mergeProps, renderSlot } from "vue";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
3
|
import { _ as _sfc_main$1 } from "./LpContextMenu-D0mzXqA7.js";
|
|
4
4
|
const __default__ = { inheritAttrs: false };
|
|
@@ -9,7 +9,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
variant: { default: "raised" },
|
|
10
10
|
padded: { type: Boolean, default: true },
|
|
11
11
|
interactive: { type: Boolean, default: false },
|
|
12
|
-
menuItems: {}
|
|
12
|
+
menuItems: {},
|
|
13
|
+
as: { default: "div" }
|
|
13
14
|
},
|
|
14
15
|
setup(__props) {
|
|
15
16
|
const card = tv({
|
|
@@ -32,6 +33,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
33
|
// NOTE: in Tailwind v4 `translate-*` writes the native `translate` property
|
|
33
34
|
// (not `transform`), so the transition list MUST name `translate` explicitly
|
|
34
35
|
// or the lift snaps while the rest eases.
|
|
36
|
+
//
|
|
37
|
+
// The glow reaches past the card, so a clipping ancestor (scroll area,
|
|
38
|
+
// dialog body) will slice it unless the list reserves room — see the
|
|
39
|
+
// `.lp-glow-room` helper in tokens.css, whose spread tokens describe exactly
|
|
40
|
+
// the distance this shadow travels.
|
|
35
41
|
interactive: {
|
|
36
42
|
true: "cursor-pointer transition-[translate,box-shadow,border-color] duration-medium ease-[var(--ease-emphasized)] hover:-translate-y-0.5 hover:border-brand/40 hover:shadow-[var(--lp-card-glow)] hover:[--surface-panel-shadow:var(--lp-card-glow)] [--lp-card-glow:0_8px_24px_-6px_color-mix(in_srgb,var(--color-brand)_38%,transparent)] motion-reduce:transition-none motion-reduce:hover:translate-y-0"
|
|
37
43
|
}
|
|
@@ -47,17 +53,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
53
|
items: __props.menuItems
|
|
48
54
|
}, {
|
|
49
55
|
default: withCtx(() => [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.as), mergeProps({ class: classes.value }, _ctx.$attrs), {
|
|
57
|
+
default: withCtx(() => [
|
|
58
|
+
renderSlot(_ctx.$slots, "default")
|
|
59
|
+
]),
|
|
60
|
+
_: 3
|
|
61
|
+
}, 16, ["class"]))
|
|
53
62
|
]),
|
|
54
63
|
_: 3
|
|
55
|
-
}, 8, ["items"])) : (openBlock(),
|
|
64
|
+
}, 8, ["items"])) : (openBlock(), createBlock(resolveDynamicComponent(__props.as), mergeProps({
|
|
56
65
|
key: 1,
|
|
57
66
|
class: classes.value
|
|
58
|
-
}, _ctx.$attrs),
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
}, _ctx.$attrs), {
|
|
68
|
+
default: withCtx(() => [
|
|
69
|
+
renderSlot(_ctx.$slots, "default")
|
|
70
|
+
]),
|
|
71
|
+
_: 3
|
|
72
|
+
}, 16, ["class"]));
|
|
61
73
|
};
|
|
62
74
|
}
|
|
63
75
|
});
|
|
@@ -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-B9CVVC5U.js";
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "LpConfirmDialog",
|
|
6
6
|
props: {
|
|
@@ -3,7 +3,7 @@ import { usePointerSwipe } from "@vueuse/core";
|
|
|
3
3
|
import { DrawerRoot, DrawerPortal, DrawerOverlay, DrawerContent, DrawerHandle, DrawerTitle, DrawerDescription, DrawerClose } from "vaul-vue";
|
|
4
4
|
import { CLOSE_ICON } from "../components/dropdown.js";
|
|
5
5
|
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
6
|
-
import { _ as _sfc_main$2 } from "./LpScrollArea-
|
|
6
|
+
import { _ as _sfc_main$2 } from "./LpScrollArea-BtnZCCBT.js";
|
|
7
7
|
const _hoisted_1 = { class: "text-base font-semibold text-ink" };
|
|
8
8
|
const _hoisted_2 = { class: "flex flex-col gap-1" };
|
|
9
9
|
const _hoisted_3 = ["data-vaul-no-drag"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, watch, nextTick, onMounted, onBeforeUnmount, openBlock, createElementBlock, createVNode, normalizeStyle, withCtx, createElementVNode, toDisplayString, createCommentVNode, Fragment, createBlock, resolveDynamicComponent, TransitionGroup, mergeProps, renderList, normalizeClass, createTextVNode, Transition } from "vue";
|
|
2
2
|
import { _ as _sfc_main$3 } from "./LpContextMenu-D0mzXqA7.js";
|
|
3
3
|
import { _ as _sfc_main$2 } from "./LpIcon-CCnX5_2j.js";
|
|
4
|
-
import { _ as _sfc_main$1 } from "./LpScrollArea-
|
|
4
|
+
import { _ as _sfc_main$1 } from "./LpScrollArea-BtnZCCBT.js";
|
|
5
5
|
const _hoisted_1 = { class: "relative overflow-hidden rounded-card border border-line bg-surface font-mono text-xs leading-relaxed" };
|
|
6
6
|
const _hoisted_2 = {
|
|
7
7
|
key: 0,
|
|
@@ -2,7 +2,7 @@ import { defineComponent, computed, useSlots, openBlock, createBlock, unref, wit
|
|
|
2
2
|
import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose } from "reka-ui";
|
|
3
3
|
import { CLOSE_ICON } from "../components/dropdown.js";
|
|
4
4
|
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
5
|
-
import { _ as _sfc_main$2 } from "./LpScrollArea-
|
|
5
|
+
import { _ as _sfc_main$2 } from "./LpScrollArea-BtnZCCBT.js";
|
|
6
6
|
const _hoisted_1 = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "flex shrink-0 items-start justify-between gap-4 p-5 pb-3"
|
|
@@ -5,7 +5,7 @@ import { _ as _sfc_main$4 } from "./LpContextMenu-D0mzXqA7.js";
|
|
|
5
5
|
import { _ as _sfc_main$2 } from "./LpEmptyState-CrfyRJUG.js";
|
|
6
6
|
import { _ as _sfc_main$5 } from "./LpIcon-CCnX5_2j.js";
|
|
7
7
|
import { _ as _sfc_main$1 } from "./LpPopover-8268UmlC.js";
|
|
8
|
-
import { _ as _sfc_main$3 } from "./LpScrollArea-
|
|
8
|
+
import { _ as _sfc_main$3 } from "./LpScrollArea-BtnZCCBT.js";
|
|
9
9
|
const _hoisted_1 = { class: "flex items-center justify-between gap-2 px-3 py-2.5" };
|
|
10
10
|
const _hoisted_2 = { class: "text-sm font-semibold" };
|
|
11
11
|
const _hoisted_3 = {
|
|
@@ -5,6 +5,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5
5
|
__name: "LpScrollArea",
|
|
6
6
|
props: {
|
|
7
7
|
fade: { type: Boolean },
|
|
8
|
+
smooth: { type: Boolean },
|
|
8
9
|
contentClass: {},
|
|
9
10
|
barInsetTop: {}
|
|
10
11
|
},
|
|
@@ -45,7 +46,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
46
|
createVNode(unref(ScrollAreaViewport), {
|
|
46
47
|
ref_key: "viewportRef",
|
|
47
48
|
ref: viewportRef,
|
|
48
|
-
class: normalizeClass(["size-full min-w-0 [&>div]:!block [&>div]:!min-w-0",
|
|
49
|
+
class: normalizeClass(["size-full min-w-0 [&>div]:!block [&>div]:!min-w-0", [
|
|
50
|
+
__props.smooth ? "scroll-smooth motion-reduce:scroll-auto" : "",
|
|
51
|
+
__props.fade ? "[mask-image:linear-gradient(to_bottom,transparent_0,black_14px,black_calc(100%-14px),transparent_100%)]" : ""
|
|
52
|
+
]]),
|
|
49
53
|
onScrollPassive: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("scroll", $event))
|
|
50
54
|
}, {
|
|
51
55
|
default: withCtx(() => [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, useId, openBlock, createElementBlock, Fragment, createElementVNode, mergeProps, normalizeClass, renderSlot, createCommentVNode, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps, createBlock } from "vue";
|
|
2
|
-
import { _ as _sfc_main$2 } from "./LpDrawer-
|
|
3
|
-
import { _ as _sfc_main$1 } from "./LpSidebarNav-
|
|
2
|
+
import { _ as _sfc_main$2 } from "./LpDrawer-6n5Hd-iF.js";
|
|
3
|
+
import { _ as _sfc_main$1 } from "./LpSidebarNav-D-YvtwsH.js";
|
|
4
4
|
const _hoisted_1 = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "mt-2 flex shrink-0 flex-col gap-2"
|
|
@@ -4,7 +4,7 @@ import { usePillTransition } from "../composables/usePillTransition.js";
|
|
|
4
4
|
import { _ as _sfc_main$4 } from "./LpBadge-CXzBPnwO.js";
|
|
5
5
|
import { _ as _sfc_main$2 } from "./LpContextMenu-D0mzXqA7.js";
|
|
6
6
|
import { _ as _sfc_main$3 } from "./LpIcon-CCnX5_2j.js";
|
|
7
|
-
import { _ as _sfc_main$1 } from "./LpScrollArea-
|
|
7
|
+
import { _ as _sfc_main$1 } from "./LpScrollArea-BtnZCCBT.js";
|
|
8
8
|
const _hoisted_1 = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex min-h-0 flex-1 flex-col gap-4"
|
|
@@ -2,7 +2,7 @@ import { defineComponent, computed, ref, watch, onBeforeUnmount, openBlock, crea
|
|
|
2
2
|
import { _ as _sfc_main$2 } from "./LpCheckbox-BO0zuuPh.js";
|
|
3
3
|
import { _ as _sfc_main$4 } from "./LpContextMenu-D0mzXqA7.js";
|
|
4
4
|
import { _ as _sfc_main$3 } from "./LpIcon-CCnX5_2j.js";
|
|
5
|
-
import { _ as _sfc_main$1 } from "./LpScrollArea-
|
|
5
|
+
import { _ as _sfc_main$1 } from "./LpScrollArea-BtnZCCBT.js";
|
|
6
6
|
const _hoisted_1 = { class: "w-full border-collapse text-sm" };
|
|
7
7
|
const _hoisted_2 = { class: "border-b border-line bg-surface-soft" };
|
|
8
8
|
const _hoisted_3 = {
|
|
@@ -7,13 +7,18 @@ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
|
|
|
7
7
|
interactive?: boolean;
|
|
8
8
|
/** Right-click menu for the card. Omit (or pass []) to keep the native one. */
|
|
9
9
|
menuItems?: ContextMenuItemDef[];
|
|
10
|
+
/** Element to render as. A card inside a <ul> has to be an `li` to be valid. */
|
|
11
|
+
as?: string;
|
|
10
12
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
11
13
|
variant?: "flat" | "ghost" | "raised" | undefined;
|
|
12
14
|
padded?: boolean;
|
|
13
15
|
interactive?: boolean;
|
|
14
16
|
/** Right-click menu for the card. Omit (or pass []) to keep the native one. */
|
|
15
17
|
menuItems?: ContextMenuItemDef[];
|
|
18
|
+
/** Element to render as. A card inside a <ul> has to be an `li` to be valid. */
|
|
19
|
+
as?: string;
|
|
16
20
|
}> & Readonly<{}>, {
|
|
21
|
+
as: string;
|
|
17
22
|
variant: "flat" | "ghost" | "raised";
|
|
18
23
|
padded: boolean;
|
|
19
24
|
interactive: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch, nextTick, onMounted, onBeforeUnmount, openBlock, createBlock, unref, withCtx, createVNode, withModifiers, createTextVNode, createElementVNode, withDirectives, withKeys, vModelText, createElementBlock, toDisplayString, createCommentVNode, Fragment, renderList, normalizeClass } from "vue";
|
|
2
2
|
import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription } from "reka-ui";
|
|
3
3
|
import { _ as _sfc_main$1 } from "../chunks/LpIcon-CCnX5_2j.js";
|
|
4
|
-
import { _ as _sfc_main$2 } from "../chunks/LpScrollArea-
|
|
4
|
+
import { _ as _sfc_main$2 } from "../chunks/LpScrollArea-BtnZCCBT.js";
|
|
5
5
|
import '../assets/LpCommandPalette-D315B47-.css';const _hoisted_1 = { class: "flex shrink-0 items-center gap-2.5 border-b border-line px-4" };
|
|
6
6
|
const _hoisted_2 = ["placeholder", "onKeydown"];
|
|
7
7
|
const _hoisted_3 = {
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { _ } from "./chunks/LayoutCanvas-Dd20boUG.js";
|
|
2
2
|
import { _ as _2 } from "./chunks/LpAlert-BAYHDSS1.js";
|
|
3
|
-
import { _ as _3 } from "./chunks/LpAppShell-
|
|
3
|
+
import { _ as _3 } from "./chunks/LpAppShell-BLKZDLh8.js";
|
|
4
4
|
import { _ as _4 } from "./chunks/LpAutocomplete-B9uoCs4t.js";
|
|
5
5
|
import { _ as _5 } from "./chunks/LpAvatar-B1Ez0ZAx.js";
|
|
6
6
|
import { _ as _6 } from "./chunks/LpBadge-CXzBPnwO.js";
|
|
7
7
|
import { _ as _7 } from "./chunks/LpBreadcrumbs-B7Aqatzw.js";
|
|
8
8
|
import { _ as _8 } from "./chunks/LpButton-5VXXCjwF.js";
|
|
9
9
|
import { _ as _9 } from "./chunks/LpCalendar-B7ZL0ty3.js";
|
|
10
|
-
import { _ as _10 } from "./chunks/LpCard-
|
|
10
|
+
import { _ as _10 } from "./chunks/LpCard-BmrTvWOe.js";
|
|
11
11
|
import { _ as _11 } from "./chunks/LpCheckbox-BO0zuuPh.js";
|
|
12
12
|
import { _ as _12 } from "./chunks/LpCodeBlock-CSiOSPs8.js";
|
|
13
13
|
import { default as default2 } from "./components/LpCommandPalette.vue.js";
|
|
14
|
-
import { _ as _13 } from "./chunks/LpConfirmDialog-
|
|
14
|
+
import { _ as _13 } from "./chunks/LpConfirmDialog-BA45MvRL.js";
|
|
15
15
|
import { _ as _14 } from "./chunks/LpContextMenu-D0mzXqA7.js";
|
|
16
16
|
import { _ as _15 } from "./chunks/LpDatePicker-dY2q4dr4.js";
|
|
17
17
|
import { _ as _16 } from "./chunks/LpDisclosure-DP6yfgfM.js";
|
|
18
18
|
import { _ as _17 } from "./chunks/LpDivider-CUX46KR0.js";
|
|
19
|
-
import { _ as _18 } from "./chunks/LpDrawer-
|
|
19
|
+
import { _ as _18 } from "./chunks/LpDrawer-6n5Hd-iF.js";
|
|
20
20
|
import { _ as _19 } from "./chunks/LpDropdownMenu-DJpoqRCb.js";
|
|
21
21
|
import { _ as _20 } from "./chunks/LpEmptyState-CrfyRJUG.js";
|
|
22
22
|
import { _ as _21 } from "./chunks/LpFormField-Bn-ZwC6z.js";
|
|
@@ -24,9 +24,9 @@ import { _ as _22 } from "./chunks/LpIcon-CCnX5_2j.js";
|
|
|
24
24
|
import { _ as _23 } from "./chunks/LpInfraNode-C_PHcthC.js";
|
|
25
25
|
import { _ as _24 } from "./chunks/LpInput-BauZRyzm.js";
|
|
26
26
|
import { _ as _25 } from "./chunks/LpLink-DHwOEp4e.js";
|
|
27
|
-
import { _ as _26 } from "./chunks/LpLogViewer-
|
|
28
|
-
import { _ as _27 } from "./chunks/LpModal-
|
|
29
|
-
import { _ as _28 } from "./chunks/LpNotificationBell-
|
|
27
|
+
import { _ as _26 } from "./chunks/LpLogViewer-BBgaY38i.js";
|
|
28
|
+
import { _ as _27 } from "./chunks/LpModal-B9CVVC5U.js";
|
|
29
|
+
import { _ as _28 } from "./chunks/LpNotificationBell-B9VHks_D.js";
|
|
30
30
|
import { _ as _29 } from "./chunks/LpNumberField-C5ar-OwE.js";
|
|
31
31
|
import { _ as _30 } from "./chunks/LpOtpInput-DqaT0Z75.js";
|
|
32
32
|
import { _ as _31 } from "./chunks/LpPagination-CeGuNe_q.js";
|
|
@@ -37,17 +37,17 @@ import { _ as _34 } from "./chunks/LpPopover-8268UmlC.js";
|
|
|
37
37
|
import { _ as _35 } from "./chunks/LpProgress-BhI0IbjC.js";
|
|
38
38
|
import { _ as _36 } from "./chunks/LpRadio-CL-pI0_O.js";
|
|
39
39
|
import { _ as _37 } from "./chunks/LpRadioGroup-B4yDTmi6.js";
|
|
40
|
-
import { _ as _38 } from "./chunks/LpScrollArea-
|
|
40
|
+
import { _ as _38 } from "./chunks/LpScrollArea-BtnZCCBT.js";
|
|
41
41
|
import { _ as _39 } from "./chunks/LpSegmented-BmpanyAo.js";
|
|
42
42
|
import { _ as _40 } from "./chunks/LpSelect-DznhPEWX.js";
|
|
43
43
|
import { _ as _41 } from "./chunks/LpServiceNode-Dc-Ut5RS.js";
|
|
44
|
-
import { _ as _42 } from "./chunks/LpSidebar-
|
|
44
|
+
import { _ as _42 } from "./chunks/LpSidebar-tZ2z-PnM.js";
|
|
45
45
|
import { _ as _43 } from "./chunks/LpSkeleton-eSFIo4kD.js";
|
|
46
46
|
import { _ as _44 } from "./chunks/LpSlider-B1SF3pRV.js";
|
|
47
47
|
import { _ as _45 } from "./chunks/LpStat-CdbEFOvn.js";
|
|
48
48
|
import { _ as _46 } from "./chunks/LpStepper-5dFTrW21.js";
|
|
49
49
|
import { _ as _47 } from "./chunks/LpSwitch-v6fnccSM.js";
|
|
50
|
-
import { _ as _48 } from "./chunks/LpTable-
|
|
50
|
+
import { _ as _48 } from "./chunks/LpTable-CzHVcr3v.js";
|
|
51
51
|
import { _ as _49 } from "./chunks/LpTableOfContents-CjvxPMpU.js";
|
|
52
52
|
import { _ as _50 } from "./chunks/LpTabs-D7aTVPOb.js";
|
|
53
53
|
import { _ as _51 } from "./chunks/LpTextarea-CRAkhemZ.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leavepulse/ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "LeavePulse token-driven Vue component kit.",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"./dist/*": "./dist/*"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
34
|
-
"registry": "https://
|
|
34
|
+
"registry": "https://registry.npmjs.org"
|
|
35
35
|
},
|
|
36
36
|
"sideEffects": [
|
|
37
37
|
"**/*.css",
|
|
@@ -30,6 +30,11 @@ const card = tv({
|
|
|
30
30
|
// NOTE: in Tailwind v4 `translate-*` writes the native `translate` property
|
|
31
31
|
// (not `transform`), so the transition list MUST name `translate` explicitly
|
|
32
32
|
// or the lift snaps while the rest eases.
|
|
33
|
+
//
|
|
34
|
+
// The glow reaches past the card, so a clipping ancestor (scroll area,
|
|
35
|
+
// dialog body) will slice it unless the list reserves room — see the
|
|
36
|
+
// `.lp-glow-room` helper in tokens.css, whose spread tokens describe exactly
|
|
37
|
+
// the distance this shadow travels.
|
|
33
38
|
interactive: {
|
|
34
39
|
true: "cursor-pointer transition-[translate,box-shadow,border-color] duration-medium ease-[var(--ease-emphasized)] hover:-translate-y-0.5 hover:border-brand/40 hover:shadow-[var(--lp-card-glow)] hover:[--surface-panel-shadow:var(--lp-card-glow)] [--lp-card-glow:0_8px_24px_-6px_color-mix(in_srgb,var(--color-brand)_38%,transparent)] motion-reduce:transition-none motion-reduce:hover:translate-y-0",
|
|
35
40
|
},
|
|
@@ -47,8 +52,10 @@ const props = withDefaults(
|
|
|
47
52
|
interactive?: boolean
|
|
48
53
|
/** Right-click menu for the card. Omit (or pass []) to keep the native one. */
|
|
49
54
|
menuItems?: ContextMenuItemDef[]
|
|
55
|
+
/** Element to render as. A card inside a <ul> has to be an `li` to be valid. */
|
|
56
|
+
as?: string
|
|
50
57
|
}>(),
|
|
51
|
-
{ variant: "raised", padded: true, interactive: false },
|
|
58
|
+
{ variant: "raised", padded: true, interactive: false, as: "div" },
|
|
52
59
|
)
|
|
53
60
|
|
|
54
61
|
const classes = computed(() =>
|
|
@@ -61,11 +68,11 @@ const classes = computed(() =>
|
|
|
61
68
|
(inheritAttrs:false above), so the card surface looks identical whether or
|
|
62
69
|
not it's wrapped in a context menu. -->
|
|
63
70
|
<LpContextMenu v-if="menuItems?.length" :items="menuItems">
|
|
64
|
-
<
|
|
71
|
+
<component :is="as" :class="classes" v-bind="$attrs">
|
|
65
72
|
<slot />
|
|
66
|
-
</
|
|
73
|
+
</component>
|
|
67
74
|
</LpContextMenu>
|
|
68
|
-
<
|
|
75
|
+
<component :is="as" v-else :class="classes" v-bind="$attrs">
|
|
69
76
|
<slot />
|
|
70
|
-
</
|
|
77
|
+
</component>
|
|
71
78
|
</template>
|
|
@@ -20,8 +20,13 @@ import {
|
|
|
20
20
|
// component root, since items live inside reka's viewport.
|
|
21
21
|
// `barInsetTop` (any CSS length) pulls the vertical scrollbar down by that much,
|
|
22
22
|
// so it doesn't run under a sticky header pinned at the top of the viewport.
|
|
23
|
+
// `smooth` eases wheel and keyboard scrolling. Opt-in rather than default:
|
|
24
|
+
// it also applies to `scrollTo({ behavior: "auto" })`, which consumers that
|
|
25
|
+
// drive the scroll themselves (a log tail jumping to the newest line) rely on
|
|
26
|
+
// being instant.
|
|
23
27
|
const props = defineProps<{
|
|
24
28
|
fade?: boolean
|
|
29
|
+
smooth?: boolean
|
|
25
30
|
contentClass?: string
|
|
26
31
|
barInsetTop?: string
|
|
27
32
|
}>()
|
|
@@ -85,7 +90,10 @@ const barFade =
|
|
|
85
90
|
<ScrollAreaViewport
|
|
86
91
|
ref="viewportRef"
|
|
87
92
|
class="size-full min-w-0 [&>div]:!block [&>div]:!min-w-0"
|
|
88
|
-
:class="
|
|
93
|
+
:class="[
|
|
94
|
+
smooth ? 'scroll-smooth motion-reduce:scroll-auto' : '',
|
|
95
|
+
fade ? '[mask-image:linear-gradient(to_bottom,transparent_0,black_14px,black_calc(100%-14px),transparent_100%)]' : '',
|
|
96
|
+
]"
|
|
89
97
|
@scroll.passive="$emit('scroll', $event)"
|
|
90
98
|
>
|
|
91
99
|
<div :class="contentClass">
|
package/src/tokens/tokens.css
CHANGED
|
@@ -60,6 +60,16 @@
|
|
|
60
60
|
/* ── depth ───────────────────────────────────── */
|
|
61
61
|
--shadow-panel: 0 16px 48px rgba(0, 0, 0, 0.32);
|
|
62
62
|
|
|
63
|
+
/* How far an interactive card's hover glow spreads past its own box, and how
|
|
64
|
+
far the card lifts. A scroll area or any `overflow: hidden` parent clips
|
|
65
|
+
whatever crosses its edge, so a list of cards has to reserve this much room
|
|
66
|
+
around itself or the glow gets sliced off — see the `.lp-glow-room` helper.
|
|
67
|
+
Derived from LpCard's glow (0 8px 24px -6px): blur 24 minus spread 6 = 18
|
|
68
|
+
sideways and up, plus the 8px downward offset below. */
|
|
69
|
+
--lp-glow-spread: 18px;
|
|
70
|
+
--lp-glow-spread-bottom: 26px;
|
|
71
|
+
--lp-card-lift: 2px;
|
|
72
|
+
|
|
63
73
|
/* ── surface / skin ──────────────────────────────
|
|
64
74
|
The skin axis (flat default). applyTheme() overrides these at runtime per
|
|
65
75
|
TokenSet.surface; components paint panels via .lp-skin-panel which reads
|
|
@@ -131,16 +141,22 @@
|
|
|
131
141
|
* of appearing. Exit drops back the same way but shorter and on an accelerating
|
|
132
142
|
* curve, since a dismissal shouldn't be savoured.
|
|
133
143
|
*/
|
|
144
|
+
/*
|
|
145
|
+
* Centred-dialog enter/exit. Deliberately translate + fade with NO scale: the
|
|
146
|
+
* panel is a flex column with a max-height and its own scroll regions, and
|
|
147
|
+
* scaling it re-runs that layout every frame — the content visibly squashed and
|
|
148
|
+
* the animation stuttered. A short rise reads as arriving just as well.
|
|
149
|
+
*/
|
|
134
150
|
@keyframes pop-in {
|
|
135
151
|
from {
|
|
136
152
|
opacity: 0;
|
|
137
|
-
transform: translate(-50%, calc(-50% +
|
|
153
|
+
transform: translate(-50%, calc(-50% + 10px));
|
|
138
154
|
}
|
|
139
155
|
}
|
|
140
156
|
@keyframes pop-out {
|
|
141
157
|
to {
|
|
142
158
|
opacity: 0;
|
|
143
|
-
transform: translate(-50%, calc(-50% +
|
|
159
|
+
transform: translate(-50%, calc(-50% + 5px));
|
|
144
160
|
}
|
|
145
161
|
}
|
|
146
162
|
/*
|
|
@@ -294,6 +310,30 @@
|
|
|
294
310
|
z-index: 1;
|
|
295
311
|
}
|
|
296
312
|
|
|
313
|
+
/*
|
|
314
|
+
* Room for a hover glow. An interactive card's glow spreads past the card's own
|
|
315
|
+
* box, so inside anything that clips — a scroll area, a dialog body, a panel
|
|
316
|
+
* with `overflow: hidden` — the glow gets sliced off flat against the edge, and
|
|
317
|
+
* a card sitting at the very top or bottom of a list loses it entirely. The
|
|
318
|
+
* same clip takes the focus ring, which is likewise drawn outside the border;
|
|
319
|
+
* the glow is the wider of the two, so reserving for it covers both.
|
|
320
|
+
*
|
|
321
|
+
* Put this on the element that LAYS OUT the cards (the <ul>, the grid), not on
|
|
322
|
+
* the clipping parent: it pads the content inward by exactly the distance the
|
|
323
|
+
* glow travels, so the glow lands on padding instead of on the clip boundary.
|
|
324
|
+
* Negative margins pull that padding back out, so the cards stay where they
|
|
325
|
+
* were and nothing shifts — only the overflow gets somewhere to go.
|
|
326
|
+
*
|
|
327
|
+
* Bottom gets more room than the top because the glow is offset downward, and
|
|
328
|
+
* the top gets the lift added back, since a hovered card rises into it.
|
|
329
|
+
*/
|
|
330
|
+
.lp-glow-room {
|
|
331
|
+
padding: calc(var(--lp-glow-spread) + var(--lp-card-lift)) var(--lp-glow-spread)
|
|
332
|
+
var(--lp-glow-spread-bottom);
|
|
333
|
+
margin: calc(-1 * (var(--lp-glow-spread) + var(--lp-card-lift))) calc(-1 * var(--lp-glow-spread))
|
|
334
|
+
calc(-1 * var(--lp-glow-spread-bottom));
|
|
335
|
+
}
|
|
336
|
+
|
|
297
337
|
/* ── circular theme reveal (View Transitions) ────
|
|
298
338
|
applyThemeWithTransition() snapshots the page, swaps the theme tokens, then
|
|
299
339
|
shrinks a clip-path circle in the OLD snapshot from the toggle's position,
|