@leavepulse/ui 0.12.0 → 0.14.6
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/assets/LpCommandPalette-D315B47-.css +16 -0
- package/dist/chunks/LayoutCanvas-Dd20boUG.js +50 -0
- package/dist/chunks/LayoutNode-DGpZA9LX.js +225 -0
- package/dist/chunks/LpAlert-BAYHDSS1.js +69 -0
- package/dist/chunks/LpAppShell-DBTsNQaM.js +170 -0
- package/dist/chunks/LpAutocomplete-B9uoCs4t.js +196 -0
- package/dist/chunks/LpAvatar-B1Ez0ZAx.js +88 -0
- package/dist/chunks/LpBadge-CXzBPnwO.js +42 -0
- package/dist/chunks/LpBreadcrumbs-B7Aqatzw.js +42 -0
- package/dist/chunks/LpButton-5VXXCjwF.js +101 -0
- package/dist/chunks/LpCalendar-B7ZL0ty3.js +150 -0
- package/dist/chunks/LpCard-1yvWT9fx.js +66 -0
- package/dist/chunks/LpCheckbox-BO0zuuPh.js +55 -0
- package/dist/chunks/LpCodeBlock-CSiOSPs8.js +253 -0
- package/dist/chunks/LpConfirmDialog-KLtTtCiT.js +62 -0
- package/dist/chunks/LpContextMenu-D0mzXqA7.js +151 -0
- package/dist/chunks/LpDatePicker-dY2q4dr4.js +122 -0
- package/dist/chunks/LpDisclosure-DP6yfgfM.js +76 -0
- package/dist/chunks/LpDivider-CUX46KR0.js +43 -0
- package/dist/chunks/LpDrawer-Ce6g9ZMr.js +310 -0
- package/dist/chunks/LpDropdownMenu-DJpoqRCb.js +65 -0
- package/dist/chunks/LpEmptyState-CrfyRJUG.js +47 -0
- package/dist/chunks/LpFormField-Bn-ZwC6z.js +47 -0
- package/dist/chunks/LpIcon-CCnX5_2j.js +41 -0
- package/dist/chunks/LpInfraNode-C_PHcthC.js +99 -0
- package/dist/chunks/LpInput-BauZRyzm.js +136 -0
- package/dist/chunks/LpLaneNode-HtnQf2FF.js +33 -0
- package/dist/chunks/LpLink-DHwOEp4e.js +36 -0
- package/dist/chunks/LpLogViewer-hC0OKkeE.js +482 -0
- package/dist/chunks/LpModal-CWoOExzT.js +128 -0
- package/dist/chunks/LpNotificationBell-BDy0tQwr.js +232 -0
- package/dist/chunks/LpNumberField-C5ar-OwE.js +55 -0
- package/dist/chunks/LpOtpInput-DqaT0Z75.js +65 -0
- package/dist/chunks/LpPagination-CeGuNe_q.js +132 -0
- package/dist/chunks/LpPasswordInput-DIHFw4u0.js +64 -0
- package/dist/chunks/LpPhoneInput-LQvVFGMw.js +199 -0
- package/dist/chunks/LpPopover-8268UmlC.js +54 -0
- package/dist/chunks/LpProgress-BhI0IbjC.js +37 -0
- package/dist/chunks/LpRadio-CL-pI0_O.js +39 -0
- package/dist/chunks/LpRadioGroup-B4yDTmi6.js +52 -0
- package/dist/chunks/LpScrollArea-K1x-azgY.js +67 -0
- package/dist/chunks/LpSegmented-BmpanyAo.js +74 -0
- package/dist/chunks/LpSelect-DznhPEWX.js +222 -0
- package/dist/chunks/LpServiceNode-Dc-Ut5RS.js +51 -0
- package/dist/chunks/LpSidebar-BPQabjae.js +152 -0
- package/dist/chunks/LpSidebarNav-CpF7rZxx.js +126 -0
- package/dist/chunks/LpSkeleton-eSFIo4kD.js +22 -0
- package/dist/chunks/LpSlider-B1SF3pRV.js +53 -0
- package/dist/chunks/LpStat-CdbEFOvn.js +88 -0
- package/dist/chunks/LpStepper-5dFTrW21.js +53 -0
- package/dist/chunks/LpSwitch-v6fnccSM.js +28 -0
- package/dist/chunks/LpTable-CJ4Zt1UH.js +229 -0
- package/dist/chunks/LpTableOfContents-CjvxPMpU.js +155 -0
- package/dist/chunks/LpTabs-D7aTVPOb.js +115 -0
- package/dist/chunks/LpTextarea-CRAkhemZ.js +44 -0
- package/dist/chunks/LpThemeSwitcher-BgWwfkxs.js +601 -0
- package/dist/chunks/LpTilt-DuyKbpkA.js +49 -0
- package/dist/chunks/LpToaster-gDB1EaU3.js +196 -0
- package/dist/chunks/LpTooltip-CIwoRCag.js +49 -0
- package/dist/chunks/LpTopologyCanvas-DVwyQfKa.js +237 -0
- package/dist/chunks/LpUptimeBar-CB366k0O.js +127 -0
- package/dist/component-names.d.ts +1 -1
- package/dist/components/LayoutCanvas.vue.js +4 -0
- package/dist/components/LayoutNode.vue.js +4 -0
- package/dist/components/LpAlert.vue.js +4 -0
- package/dist/components/LpAppShell.vue.js +4 -0
- package/dist/components/LpAutocomplete.vue.js +4 -0
- package/dist/components/LpAvatar.vue.js +4 -0
- package/dist/components/LpBadge.vue.js +4 -0
- package/dist/components/LpBreadcrumbs.vue.js +4 -0
- package/dist/components/LpButton.vue.js +4 -0
- package/dist/components/LpCalendar.vue.js +4 -0
- package/dist/components/LpCard.vue.js +4 -0
- package/dist/components/LpCheckbox.vue.js +4 -0
- package/dist/components/LpCodeBlock.vue.js +4 -0
- package/dist/components/LpCommandPalette.vue.js +310 -0
- package/dist/components/LpConfirmDialog.vue.js +4 -0
- package/dist/components/LpContextMenu.vue.d.ts +7 -0
- package/dist/components/LpContextMenu.vue.js +4 -0
- package/dist/components/LpDatePicker.vue.js +4 -0
- package/dist/components/LpDisclosure.vue.js +4 -0
- package/dist/components/LpDivider.vue.js +4 -0
- package/dist/components/LpDrawer.vue.d.ts +8 -0
- package/dist/components/LpDrawer.vue.js +4 -0
- package/dist/components/LpDropdownMenu.vue.js +4 -0
- package/dist/components/LpEmptyState.vue.js +4 -0
- package/dist/components/LpFormField.vue.js +4 -0
- package/dist/components/LpIcon.vue.js +4 -0
- package/dist/components/LpInfraNode.vue.js +4 -0
- package/dist/components/LpInput.vue.js +4 -0
- package/dist/components/LpLaneNode.vue.js +4 -0
- package/dist/components/LpLink.vue.js +4 -0
- package/dist/components/LpLogViewer.vue.js +4 -0
- package/dist/components/LpModal.vue.js +4 -0
- package/dist/components/LpNotificationBell.vue.js +4 -0
- package/dist/components/LpNumberField.vue.js +4 -0
- package/dist/components/LpOtpInput.vue.js +4 -0
- package/dist/components/LpPagination.vue.js +4 -0
- package/dist/components/LpPasswordInput.vue.js +4 -0
- package/dist/components/LpPhoneInput.vue.js +4 -0
- package/dist/components/LpPopover.vue.js +4 -0
- package/dist/components/LpProgress.vue.js +4 -0
- package/dist/components/LpRadio.vue.js +4 -0
- package/dist/components/LpRadioGroup.vue.js +4 -0
- package/dist/components/LpScrollArea.vue.d.ts +2 -2
- package/dist/components/LpScrollArea.vue.js +4 -0
- package/dist/components/LpSegmented.vue.js +4 -0
- package/dist/components/LpSelect.vue.d.ts +2 -0
- package/dist/components/LpSelect.vue.js +4 -0
- package/dist/components/LpServiceNode.vue.js +4 -0
- package/dist/components/LpSidebar.vue.js +4 -0
- package/dist/components/LpSidebarNav.vue.js +4 -0
- package/dist/components/LpSkeleton.vue.js +4 -0
- package/dist/components/LpSlider.vue.js +4 -0
- package/dist/components/LpStat.vue.js +4 -0
- package/dist/components/LpStepper.vue.js +4 -0
- package/dist/components/LpSwitch.vue.js +4 -0
- package/dist/components/LpTable.vue.js +4 -0
- package/dist/components/LpTableOfContents.vue.js +4 -0
- package/dist/components/LpTabs.vue.d.ts +4 -2
- package/dist/components/LpTabs.vue.js +4 -0
- package/dist/components/LpTextarea.vue.js +4 -0
- package/dist/components/LpThemeSwitcher.vue.js +4 -0
- package/dist/components/LpTilt.vue.d.ts +31 -0
- package/dist/components/LpTilt.vue.js +4 -0
- package/dist/components/LpToaster.vue.js +4 -0
- package/dist/components/LpTooltip.vue.js +4 -0
- package/dist/components/LpTopologyCanvas.vue.js +4 -0
- package/dist/components/LpUptimeBar.vue.js +4 -0
- package/dist/components/codeHighlight.js +230 -0
- package/dist/{countries-data-9rgqJWHo.js → components/countries-data.js} +2 -2
- package/dist/components/countries.js +38 -0
- package/dist/components/dropdown.js +14 -0
- package/dist/components/sidebar.js +1 -0
- package/dist/composables/useInputFilter.js +44 -0
- package/dist/composables/usePillTransition.js +11 -0
- package/dist/composables/useTilt.d.ts +23 -0
- package/dist/composables/useTilt.js +57 -0
- package/dist/composables/useToast.d.ts +2 -0
- package/dist/composables/useToast.js +49 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +197 -17596
- package/dist/layout/registry.js +10 -0
- package/dist/layout/tree.js +192 -0
- package/dist/layout/useLayout.js +61 -0
- package/package.json +5 -3
- package/src/component-names.ts +1 -0
- package/src/components/LpContextMenu.vue +14 -4
- package/src/components/LpDrawer.vue +29 -1
- package/src/components/LpLogViewer.vue +180 -31
- package/src/components/LpScrollArea.vue +20 -15
- package/src/components/LpSelect.vue +0 -0
- package/src/components/LpSidebar.vue +5 -2
- package/src/components/LpTabs.vue +19 -6
- package/src/components/LpThemeSwitcher.vue +13 -2
- package/src/components/LpTilt.vue +61 -0
- package/src/components/LpToaster.vue +11 -4
- package/src/composables/useTilt.ts +103 -0
- package/src/composables/useToast.ts +2 -0
- package/src/index.ts +3 -0
- package/src/nuxt.ts +10 -1
- package/dist/index.css +0 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, normalizeClass, toDisplayString, createElementBlock, withKeys, withModifiers, createCommentVNode } from "vue";
|
|
2
|
+
import { PopoverRoot, PopoverTrigger, PopoverPortal, PopoverContent } from "reka-ui";
|
|
3
|
+
import { POPOVER_PANEL } from "../components/dropdown.js";
|
|
4
|
+
import { _ as _sfc_main$2 } from "./LpCalendar-B7ZL0ty3.js";
|
|
5
|
+
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
6
|
+
const _hoisted_1 = ["disabled"];
|
|
7
|
+
const _hoisted_2 = ["onKeydown"];
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "LpDatePicker",
|
|
10
|
+
props: {
|
|
11
|
+
modelValue: {},
|
|
12
|
+
placeholder: { default: "Pick a date" },
|
|
13
|
+
min: {},
|
|
14
|
+
max: {},
|
|
15
|
+
isDisabled: {},
|
|
16
|
+
clearable: { type: Boolean },
|
|
17
|
+
disabled: { type: Boolean },
|
|
18
|
+
invalid: { type: Boolean },
|
|
19
|
+
size: { default: "md" },
|
|
20
|
+
format: { default: () => ({ year: "numeric", month: "short", day: "numeric" }) }
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:modelValue"],
|
|
23
|
+
setup(__props, { emit: __emit }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const emit = __emit;
|
|
26
|
+
const open = ref(false);
|
|
27
|
+
const display = computed(() => {
|
|
28
|
+
if (!props.modelValue) return "";
|
|
29
|
+
const [y, m, d] = props.modelValue.split("-").map(Number);
|
|
30
|
+
if (!y || !m || !d) return props.modelValue;
|
|
31
|
+
return new Intl.DateTimeFormat(void 0, props.format).format(new Date(y, m - 1, d));
|
|
32
|
+
});
|
|
33
|
+
const shellSize = {
|
|
34
|
+
sm: "h-(--size-control-sm) text-xs",
|
|
35
|
+
md: "h-(--size-control-md) text-sm",
|
|
36
|
+
lg: "h-(--size-control-lg) text-sm"
|
|
37
|
+
};
|
|
38
|
+
function onPick(v) {
|
|
39
|
+
emit("update:modelValue", v);
|
|
40
|
+
open.value = false;
|
|
41
|
+
}
|
|
42
|
+
function clear() {
|
|
43
|
+
emit("update:modelValue", void 0);
|
|
44
|
+
}
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return openBlock(), createBlock(unref(PopoverRoot), {
|
|
47
|
+
open: open.value,
|
|
48
|
+
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event)
|
|
49
|
+
}, {
|
|
50
|
+
default: withCtx(() => [
|
|
51
|
+
createVNode(unref(PopoverTrigger), { "as-child": "" }, {
|
|
52
|
+
default: withCtx(() => [
|
|
53
|
+
createElementVNode("button", {
|
|
54
|
+
type: "button",
|
|
55
|
+
disabled: __props.disabled,
|
|
56
|
+
class: normalizeClass(["group flex w-full items-center gap-2 rounded-control border bg-surface-soft px-3 text-left text-ink outline-none transition-colors duration-[var(--duration-fast)] focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:border-brand disabled:cursor-not-allowed disabled:opacity-55", [
|
|
57
|
+
shellSize[__props.size],
|
|
58
|
+
__props.invalid ? "border-danger focus-visible:ring-danger-soft" : "border-line focus-visible:border-brand"
|
|
59
|
+
]])
|
|
60
|
+
}, [
|
|
61
|
+
createVNode(_sfc_main$1, {
|
|
62
|
+
name: "lucide:calendar",
|
|
63
|
+
size: 16,
|
|
64
|
+
class: "shrink-0 text-muted"
|
|
65
|
+
}),
|
|
66
|
+
createElementVNode("span", {
|
|
67
|
+
class: normalizeClass(["min-w-0 flex-1 truncate", display.value ? "" : "text-muted"])
|
|
68
|
+
}, toDisplayString(display.value || __props.placeholder), 3),
|
|
69
|
+
__props.clearable && __props.modelValue && !__props.disabled ? (openBlock(), createElementBlock("span", {
|
|
70
|
+
key: 0,
|
|
71
|
+
role: "button",
|
|
72
|
+
tabindex: "-1",
|
|
73
|
+
"aria-label": "Clear",
|
|
74
|
+
class: "shrink-0 text-muted transition-colors hover:text-ink",
|
|
75
|
+
onClick: withModifiers(clear, ["stop"]),
|
|
76
|
+
onKeydown: withKeys(withModifiers(clear, ["stop"]), ["enter"])
|
|
77
|
+
}, [
|
|
78
|
+
createVNode(_sfc_main$1, {
|
|
79
|
+
name: "lucide:x",
|
|
80
|
+
size: 15
|
|
81
|
+
})
|
|
82
|
+
], 40, _hoisted_2)) : createCommentVNode("", true),
|
|
83
|
+
createVNode(_sfc_main$1, {
|
|
84
|
+
name: "lucide:chevron-down",
|
|
85
|
+
size: 15,
|
|
86
|
+
class: "shrink-0 text-muted transition-transform duration-[var(--duration-fast)] ease-[var(--ease-emphasized)] group-data-[state=open]:rotate-180"
|
|
87
|
+
})
|
|
88
|
+
], 10, _hoisted_1)
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
}),
|
|
92
|
+
createVNode(unref(PopoverPortal), null, {
|
|
93
|
+
default: withCtx(() => [
|
|
94
|
+
createVNode(unref(PopoverContent), {
|
|
95
|
+
"side-offset": 6,
|
|
96
|
+
align: "start",
|
|
97
|
+
class: normalizeClass([unref(POPOVER_PANEL), "z-(--z-popover) rounded-card p-0 outline-none"])
|
|
98
|
+
}, {
|
|
99
|
+
default: withCtx(() => [
|
|
100
|
+
createVNode(_sfc_main$2, {
|
|
101
|
+
"model-value": __props.modelValue,
|
|
102
|
+
min: __props.min,
|
|
103
|
+
max: __props.max,
|
|
104
|
+
"is-disabled": __props.isDisabled,
|
|
105
|
+
class: "border-0 bg-transparent",
|
|
106
|
+
"onUpdate:modelValue": onPick
|
|
107
|
+
}, null, 8, ["model-value", "min", "max", "is-disabled"])
|
|
108
|
+
]),
|
|
109
|
+
_: 1
|
|
110
|
+
}, 8, ["class"])
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
})
|
|
114
|
+
]),
|
|
115
|
+
_: 1
|
|
116
|
+
}, 8, ["open"]);
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
export {
|
|
121
|
+
_sfc_main as _
|
|
122
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createVNode, createCommentVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString, nextTick } from "vue";
|
|
2
|
+
import { CollapsibleRoot, CollapsibleTrigger, CollapsibleContent } from "reka-ui";
|
|
3
|
+
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
4
|
+
const _hoisted_1 = { class: "min-w-0 flex-1 text-left" };
|
|
5
|
+
const _hoisted_2 = { class: "grid gap-2.5 px-3 pt-1 pb-3.5 group-data-[state=open]/content:animate-[disclosure-body-in_300ms_var(--ease-emphasized)] motion-reduce:animate-none" };
|
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
__name: "LpDisclosure",
|
|
8
|
+
props: {
|
|
9
|
+
open: { type: Boolean },
|
|
10
|
+
defaultOpen: { type: Boolean, default: false },
|
|
11
|
+
label: {},
|
|
12
|
+
icon: {},
|
|
13
|
+
scrollIntoView: { type: Boolean, default: false }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:open"],
|
|
16
|
+
setup(__props, { emit: __emit }) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const emit = __emit;
|
|
19
|
+
const root = ref(null);
|
|
20
|
+
function onToggle(value) {
|
|
21
|
+
emit("update:open", value);
|
|
22
|
+
if (value && props.scrollIntoView) {
|
|
23
|
+
nextTick(() => {
|
|
24
|
+
const el = root.value?.$el;
|
|
25
|
+
el?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createBlock(unref(CollapsibleRoot), {
|
|
31
|
+
ref_key: "root",
|
|
32
|
+
ref: root,
|
|
33
|
+
open: __props.open,
|
|
34
|
+
"default-open": __props.defaultOpen,
|
|
35
|
+
class: "overflow-hidden rounded-control border border-line bg-surface-soft",
|
|
36
|
+
"onUpdate:open": onToggle
|
|
37
|
+
}, {
|
|
38
|
+
default: withCtx(() => [
|
|
39
|
+
createVNode(unref(CollapsibleTrigger), { class: "group flex w-full items-center gap-2 px-3 py-2.5 text-sm font-semibold text-ink outline-none focus-visible:ring-2 focus-visible:ring-ring" }, {
|
|
40
|
+
default: withCtx(() => [
|
|
41
|
+
__props.icon ? (openBlock(), createBlock(_sfc_main$1, {
|
|
42
|
+
key: 0,
|
|
43
|
+
name: __props.icon,
|
|
44
|
+
size: 14,
|
|
45
|
+
class: "text-muted"
|
|
46
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
47
|
+
createElementVNode("span", _hoisted_1, [
|
|
48
|
+
renderSlot(_ctx.$slots, "trigger", {}, () => [
|
|
49
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
50
|
+
])
|
|
51
|
+
]),
|
|
52
|
+
createVNode(_sfc_main$1, {
|
|
53
|
+
name: "lucide:chevron-down",
|
|
54
|
+
size: 16,
|
|
55
|
+
class: "text-muted transition-transform duration-[var(--duration-fast)] group-data-[state=open]:rotate-180"
|
|
56
|
+
})
|
|
57
|
+
]),
|
|
58
|
+
_: 3
|
|
59
|
+
}),
|
|
60
|
+
createVNode(unref(CollapsibleContent), { class: "group/content overflow-hidden data-[state=open]:animate-[collapsible-down_260ms_var(--ease-emphasized)] data-[state=closed]:animate-[collapsible-up_200ms_var(--ease-emphasized)]" }, {
|
|
61
|
+
default: withCtx(() => [
|
|
62
|
+
createElementVNode("div", _hoisted_2, [
|
|
63
|
+
renderSlot(_ctx.$slots, "default")
|
|
64
|
+
])
|
|
65
|
+
]),
|
|
66
|
+
_: 3
|
|
67
|
+
})
|
|
68
|
+
]),
|
|
69
|
+
_: 3
|
|
70
|
+
}, 8, ["open", "default-open"]);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export {
|
|
75
|
+
_sfc_main as _
|
|
76
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
const _hoisted_1 = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "mx-1 w-px shrink-0 self-stretch bg-line",
|
|
5
|
+
role: "separator",
|
|
6
|
+
"aria-orientation": "vertical"
|
|
7
|
+
};
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "flex items-center gap-3",
|
|
11
|
+
role: "separator"
|
|
12
|
+
};
|
|
13
|
+
const _hoisted_3 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "text-xs text-muted"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_4 = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "h-px flex-1 bg-line"
|
|
20
|
+
};
|
|
21
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
22
|
+
__name: "LpDivider",
|
|
23
|
+
props: {
|
|
24
|
+
vertical: { type: Boolean },
|
|
25
|
+
label: {}
|
|
26
|
+
},
|
|
27
|
+
setup(__props) {
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
return __props.vertical ? (openBlock(), createElementBlock("div", _hoisted_1)) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
30
|
+
_cache[0] || (_cache[0] = createElementVNode("span", { class: "h-px flex-1 bg-line" }, null, -1)),
|
|
31
|
+
__props.label || _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3, [
|
|
32
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
33
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
34
|
+
])
|
|
35
|
+
])) : createCommentVNode("", true),
|
|
36
|
+
__props.label || _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4)) : createCommentVNode("", true)
|
|
37
|
+
]));
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
_sfc_main as _
|
|
43
|
+
};
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, useSlots, openBlock, createElementBlock, Fragment, createElementVNode, normalizeStyle, normalizeClass, withDirectives, vShow, toDisplayString, createCommentVNode, createVNode, unref, withCtx, createBlock, renderSlot, createTextVNode } from "vue";
|
|
2
|
+
import { usePointerSwipe } from "@vueuse/core";
|
|
3
|
+
import { DrawerRoot, DrawerPortal, DrawerOverlay, DrawerContent, DrawerHandle, DrawerTitle, DrawerDescription, DrawerClose } from "vaul-vue";
|
|
4
|
+
import { CLOSE_ICON } from "../components/dropdown.js";
|
|
5
|
+
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
6
|
+
import { _ as _sfc_main$2 } from "./LpScrollArea-K1x-azgY.js";
|
|
7
|
+
const _hoisted_1 = { class: "text-base font-semibold text-ink" };
|
|
8
|
+
const _hoisted_2 = { class: "flex flex-col gap-1" };
|
|
9
|
+
const _hoisted_3 = ["data-vaul-no-drag"];
|
|
10
|
+
const _hoisted_4 = {
|
|
11
|
+
key: 3,
|
|
12
|
+
class: "flex justify-end gap-2 px-5 pb-5 pt-4"
|
|
13
|
+
};
|
|
14
|
+
const NO_DRAG_SELECTOR = "input, textarea, select, button, a[href], label, [contenteditable=''], [contenteditable='true']";
|
|
15
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
|
+
__name: "LpDrawer",
|
|
17
|
+
props: {
|
|
18
|
+
open: { type: Boolean },
|
|
19
|
+
direction: {},
|
|
20
|
+
side: { default: "right" },
|
|
21
|
+
title: {},
|
|
22
|
+
description: {},
|
|
23
|
+
size: { default: "sm" },
|
|
24
|
+
width: {},
|
|
25
|
+
dismissible: { type: Boolean, default: true },
|
|
26
|
+
snapPoints: {},
|
|
27
|
+
handle: { type: Boolean },
|
|
28
|
+
handleOnly: { type: Boolean },
|
|
29
|
+
scaleBackground: { type: Boolean },
|
|
30
|
+
closeThreshold: {},
|
|
31
|
+
noDragControls: { type: Boolean, default: true },
|
|
32
|
+
noDragContent: { type: Boolean },
|
|
33
|
+
edgeOpen: { type: Boolean },
|
|
34
|
+
edgeBreakpoint: {},
|
|
35
|
+
edgeSize: { default: 44 },
|
|
36
|
+
edgeOpenThreshold: { default: 0.3 },
|
|
37
|
+
resizable: { type: Boolean },
|
|
38
|
+
minSize: { default: "22rem" },
|
|
39
|
+
maxSize: { default: "96vw" }
|
|
40
|
+
},
|
|
41
|
+
emits: ["update:open"],
|
|
42
|
+
setup(__props, { emit: __emit }) {
|
|
43
|
+
const props = __props;
|
|
44
|
+
const emit = __emit;
|
|
45
|
+
const dir = computed(() => props.direction ?? props.side ?? "right");
|
|
46
|
+
const isHorizontal = computed(() => dir.value === "left" || dir.value === "right");
|
|
47
|
+
const isSheet = computed(() => dir.value === "top" || dir.value === "bottom");
|
|
48
|
+
const showHandle = computed(() => props.handle ?? isSheet.value);
|
|
49
|
+
const SIZES = { sm: 22, md: 28, lg: 36, xl: 48 };
|
|
50
|
+
const contentClass = computed(() => {
|
|
51
|
+
const base = "fixed z-(--z-modal) flex flex-col border-line bg-surface-raised shadow-panel outline-none";
|
|
52
|
+
const map = {
|
|
53
|
+
left: "inset-y-0 left-0 border-r rounded-r-card",
|
|
54
|
+
right: "inset-y-0 right-0 border-l rounded-l-card",
|
|
55
|
+
top: "inset-x-0 top-0 border-b rounded-b-card",
|
|
56
|
+
bottom: "inset-x-0 bottom-0 border-t rounded-t-card"
|
|
57
|
+
};
|
|
58
|
+
return [base, map[dir.value]];
|
|
59
|
+
});
|
|
60
|
+
const resizedPx = ref(null);
|
|
61
|
+
const sizeStyle = computed(() => {
|
|
62
|
+
if (props.snapPoints?.length && isSheet.value) return void 0;
|
|
63
|
+
if (props.resizable && isHorizontal.value && resizedPx.value != null) {
|
|
64
|
+
return { width: `${resizedPx.value}px` };
|
|
65
|
+
}
|
|
66
|
+
const len = props.width ?? `min(${isHorizontal.value ? "94vw" : "94vh"}, ${SIZES[props.size]}rem)`;
|
|
67
|
+
return isHorizontal.value ? { width: len } : { height: len };
|
|
68
|
+
});
|
|
69
|
+
function startResize(e) {
|
|
70
|
+
if (!props.resizable || !isHorizontal.value) return;
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
const fromRight = dir.value === "right";
|
|
73
|
+
const toPx = (css) => {
|
|
74
|
+
if (css.endsWith("rem")) return Number.parseFloat(css) * 16;
|
|
75
|
+
if (css.endsWith("vw")) return Number.parseFloat(css) / 100 * window.innerWidth;
|
|
76
|
+
return Number.parseFloat(css);
|
|
77
|
+
};
|
|
78
|
+
const min = toPx(props.minSize);
|
|
79
|
+
const max = toPx(props.maxSize);
|
|
80
|
+
const onMove = (ev) => {
|
|
81
|
+
const raw = fromRight ? window.innerWidth - ev.clientX : ev.clientX;
|
|
82
|
+
resizedPx.value = Math.max(min, Math.min(max, raw));
|
|
83
|
+
};
|
|
84
|
+
const onUp = () => {
|
|
85
|
+
window.removeEventListener("pointermove", onMove);
|
|
86
|
+
window.removeEventListener("pointerup", onUp);
|
|
87
|
+
document.body.style.userSelect = "";
|
|
88
|
+
document.body.style.cursor = "";
|
|
89
|
+
};
|
|
90
|
+
document.body.style.userSelect = "none";
|
|
91
|
+
document.body.style.cursor = "ew-resize";
|
|
92
|
+
window.addEventListener("pointermove", onMove);
|
|
93
|
+
window.addEventListener("pointerup", onUp);
|
|
94
|
+
}
|
|
95
|
+
const slots = useSlots();
|
|
96
|
+
const hasHeader = computed(() => Boolean(props.title || slots.title));
|
|
97
|
+
const padClass = computed(() => {
|
|
98
|
+
const horizontal = "px-5 pb-5";
|
|
99
|
+
if (showHandle.value || hasHeader.value) return `${horizontal} pt-0`;
|
|
100
|
+
return "p-5";
|
|
101
|
+
});
|
|
102
|
+
const headerClass = computed(() => showHandle.value ? "px-5 pb-4 pt-1" : "px-5 pb-4 pt-5");
|
|
103
|
+
function tagNoDrag(el, { value }) {
|
|
104
|
+
if (!value) return;
|
|
105
|
+
for (const node of el.querySelectorAll(NO_DRAG_SELECTOR)) {
|
|
106
|
+
node.setAttribute("data-vaul-no-drag", "");
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const vNoDragControls = {
|
|
110
|
+
mounted: tagNoDrag,
|
|
111
|
+
updated: tagNoDrag
|
|
112
|
+
};
|
|
113
|
+
const edgeStrip = ref(null);
|
|
114
|
+
const peek = ref(0);
|
|
115
|
+
const peeking = ref(false);
|
|
116
|
+
const handingOff = ref(false);
|
|
117
|
+
function panelPx() {
|
|
118
|
+
const vw = typeof window === "undefined" ? 0 : window.innerWidth;
|
|
119
|
+
const cap = props.width ? Number.parseFloat(props.width) : SIZES[props.size] * 16;
|
|
120
|
+
return Math.min(vw * 0.94, Number.isFinite(cap) ? cap : SIZES[props.size] * 16);
|
|
121
|
+
}
|
|
122
|
+
usePointerSwipe(edgeStrip, {
|
|
123
|
+
threshold: 0,
|
|
124
|
+
pointerTypes: ["touch", "pen"],
|
|
125
|
+
onSwipeStart() {
|
|
126
|
+
if (!props.edgeOpen || props.open) return;
|
|
127
|
+
peeking.value = true;
|
|
128
|
+
},
|
|
129
|
+
onSwipe(e) {
|
|
130
|
+
if (!peeking.value) return;
|
|
131
|
+
const fromRight = dir.value === "right";
|
|
132
|
+
const dx = fromRight ? window.innerWidth - e.clientX : e.clientX;
|
|
133
|
+
peek.value = Math.max(0, Math.min(1, dx / panelPx()));
|
|
134
|
+
},
|
|
135
|
+
onSwipeEnd() {
|
|
136
|
+
if (!peeking.value) return;
|
|
137
|
+
peeking.value = false;
|
|
138
|
+
if (peek.value >= props.edgeOpenThreshold) {
|
|
139
|
+
peek.value = 1;
|
|
140
|
+
handingOff.value = true;
|
|
141
|
+
window.setTimeout(() => {
|
|
142
|
+
emit("update:open", true);
|
|
143
|
+
window.setTimeout(() => {
|
|
144
|
+
handingOff.value = false;
|
|
145
|
+
peek.value = 0;
|
|
146
|
+
}, 60);
|
|
147
|
+
}, 160);
|
|
148
|
+
} else {
|
|
149
|
+
peek.value = 0;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
const previewStyle = computed(() => {
|
|
154
|
+
if (!props.edgeOpen || props.open && !handingOff.value) return { display: "none" };
|
|
155
|
+
const off = (1 - peek.value) * 100;
|
|
156
|
+
const axis = dir.value === "right" ? off : -off;
|
|
157
|
+
return {
|
|
158
|
+
transform: `translateX(${axis}%)`,
|
|
159
|
+
transition: peeking.value ? "none" : "transform 0.16s ease-out",
|
|
160
|
+
pointerEvents: "none"
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
const edgeStripStyle = computed(() => {
|
|
164
|
+
const w = `${props.edgeSize}px`;
|
|
165
|
+
return dir.value === "right" ? { right: "0", width: w } : { left: "0", width: w };
|
|
166
|
+
});
|
|
167
|
+
const EDGE_STRIP_HIDDEN = {
|
|
168
|
+
sm: "sm:hidden",
|
|
169
|
+
md: "md:hidden",
|
|
170
|
+
lg: "lg:hidden",
|
|
171
|
+
xl: "xl:hidden"
|
|
172
|
+
};
|
|
173
|
+
const edgeStripClass = computed(
|
|
174
|
+
() => props.edgeBreakpoint ? EDGE_STRIP_HIDDEN[props.edgeBreakpoint] : ""
|
|
175
|
+
);
|
|
176
|
+
return (_ctx, _cache) => {
|
|
177
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
178
|
+
__props.edgeOpen && isHorizontal.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
179
|
+
createElementVNode("div", {
|
|
180
|
+
ref_key: "edgeStrip",
|
|
181
|
+
ref: edgeStrip,
|
|
182
|
+
class: normalizeClass(["fixed inset-y-0 z-(--z-overlay) touch-none", edgeStripClass.value]),
|
|
183
|
+
style: normalizeStyle(edgeStripStyle.value),
|
|
184
|
+
"aria-hidden": "true"
|
|
185
|
+
}, null, 6),
|
|
186
|
+
withDirectives(createElementVNode("div", {
|
|
187
|
+
class: "pointer-events-none fixed inset-0 z-(--z-overlay) bg-black/50",
|
|
188
|
+
style: normalizeStyle({ opacity: peek.value })
|
|
189
|
+
}, null, 4), [
|
|
190
|
+
[vShow, peeking.value || peek.value > 0]
|
|
191
|
+
]),
|
|
192
|
+
createElementVNode("div", {
|
|
193
|
+
class: normalizeClass(contentClass.value),
|
|
194
|
+
style: normalizeStyle([sizeStyle.value, previewStyle.value]),
|
|
195
|
+
"aria-hidden": "true"
|
|
196
|
+
}, [
|
|
197
|
+
hasHeader.value ? (openBlock(), createElementBlock("div", {
|
|
198
|
+
key: 0,
|
|
199
|
+
class: normalizeClass(["flex items-start justify-between gap-4", headerClass.value])
|
|
200
|
+
}, [
|
|
201
|
+
createElementVNode("span", _hoisted_1, toDisplayString(__props.title), 1)
|
|
202
|
+
], 2)) : createCommentVNode("", true)
|
|
203
|
+
], 6)
|
|
204
|
+
], 64)) : createCommentVNode("", true),
|
|
205
|
+
createVNode(unref(DrawerRoot), {
|
|
206
|
+
open: __props.open,
|
|
207
|
+
direction: dir.value,
|
|
208
|
+
dismissible: __props.dismissible,
|
|
209
|
+
"snap-points": __props.snapPoints,
|
|
210
|
+
"handle-only": __props.handleOnly,
|
|
211
|
+
"should-scale-background": __props.scaleBackground,
|
|
212
|
+
"close-threshold": __props.closeThreshold,
|
|
213
|
+
"onUpdate:open": _cache[0] || (_cache[0] = (v) => emit("update:open", v))
|
|
214
|
+
}, {
|
|
215
|
+
default: withCtx(() => [
|
|
216
|
+
createVNode(unref(DrawerPortal), null, {
|
|
217
|
+
default: withCtx(() => [
|
|
218
|
+
createVNode(unref(DrawerOverlay), { class: "fixed inset-0 z-(--z-overlay) bg-black/50 backdrop-blur-sm data-[state=open]:animate-[fade-in_150ms_ease] data-[state=closed]:animate-[fade-out_130ms_ease]" }),
|
|
219
|
+
createVNode(unref(DrawerContent), {
|
|
220
|
+
class: normalizeClass(contentClass.value),
|
|
221
|
+
style: normalizeStyle(sizeStyle.value),
|
|
222
|
+
"data-vaul-animate": handingOff.value ? "false" : void 0
|
|
223
|
+
}, {
|
|
224
|
+
default: withCtx(() => [
|
|
225
|
+
__props.resizable && isHorizontal.value ? (openBlock(), createElementBlock("div", {
|
|
226
|
+
key: 0,
|
|
227
|
+
"data-vaul-no-drag": "",
|
|
228
|
+
class: normalizeClass(["group/resize absolute inset-y-0 z-10 w-1.5 cursor-ew-resize", dir.value === "right" ? "left-0" : "right-0"]),
|
|
229
|
+
onPointerdown: startResize
|
|
230
|
+
}, [
|
|
231
|
+
createElementVNode("span", {
|
|
232
|
+
class: normalizeClass(["absolute inset-y-0 w-px bg-line transition-colors group-hover/resize:bg-brand", dir.value === "right" ? "left-0" : "right-0"])
|
|
233
|
+
}, null, 2)
|
|
234
|
+
], 34)) : createCommentVNode("", true),
|
|
235
|
+
showHandle.value ? (openBlock(), createBlock(unref(DrawerHandle), {
|
|
236
|
+
key: 1,
|
|
237
|
+
class: "mx-auto my-2 h-1.5 w-12 shrink-0 cursor-grab rounded-pill bg-line-strong transition-colors hover:bg-muted active:cursor-grabbing"
|
|
238
|
+
})) : createCommentVNode("", true),
|
|
239
|
+
hasHeader.value ? (openBlock(), createElementBlock("header", {
|
|
240
|
+
key: 2,
|
|
241
|
+
class: normalizeClass(["flex items-start justify-between gap-4", headerClass.value])
|
|
242
|
+
}, [
|
|
243
|
+
createElementVNode("div", _hoisted_2, [
|
|
244
|
+
createVNode(unref(DrawerTitle), { class: "text-base font-semibold text-ink" }, {
|
|
245
|
+
default: withCtx(() => [
|
|
246
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
247
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
248
|
+
])
|
|
249
|
+
]),
|
|
250
|
+
_: 3
|
|
251
|
+
}),
|
|
252
|
+
__props.description ? (openBlock(), createBlock(unref(DrawerDescription), {
|
|
253
|
+
key: 0,
|
|
254
|
+
class: "text-sm text-muted"
|
|
255
|
+
}, {
|
|
256
|
+
default: withCtx(() => [
|
|
257
|
+
createTextVNode(toDisplayString(__props.description), 1)
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
})) : createCommentVNode("", true)
|
|
261
|
+
]),
|
|
262
|
+
createVNode(unref(DrawerClose), {
|
|
263
|
+
class: "group flex shrink-0 items-center rounded-md p-1 text-muted outline-none transition-colors duration-[var(--duration-fast)] hover:text-ink focus-visible:ring-2 focus-visible:ring-ring",
|
|
264
|
+
"aria-label": "Close"
|
|
265
|
+
}, {
|
|
266
|
+
default: withCtx(() => [
|
|
267
|
+
createVNode(_sfc_main$1, {
|
|
268
|
+
name: "lucide:x",
|
|
269
|
+
size: 18,
|
|
270
|
+
class: normalizeClass(unref(CLOSE_ICON))
|
|
271
|
+
}, null, 8, ["class"])
|
|
272
|
+
]),
|
|
273
|
+
_: 1
|
|
274
|
+
})
|
|
275
|
+
], 2)) : createCommentVNode("", true),
|
|
276
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
277
|
+
class: "flex min-h-0 min-w-0 flex-1 flex-col [-webkit-user-select:text]! [user-select:text]!",
|
|
278
|
+
"data-vaul-no-drag": __props.noDragContent ? "" : void 0
|
|
279
|
+
}, [
|
|
280
|
+
createVNode(_sfc_main$2, {
|
|
281
|
+
class: "min-h-0 min-w-0 flex-1",
|
|
282
|
+
"content-class": `min-w-0 ${padClass.value}`
|
|
283
|
+
}, {
|
|
284
|
+
default: withCtx(() => [
|
|
285
|
+
renderSlot(_ctx.$slots, "default")
|
|
286
|
+
]),
|
|
287
|
+
_: 3
|
|
288
|
+
}, 8, ["content-class"])
|
|
289
|
+
], 8, _hoisted_3)), [
|
|
290
|
+
[vNoDragControls, __props.noDragControls]
|
|
291
|
+
]),
|
|
292
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_4, [
|
|
293
|
+
renderSlot(_ctx.$slots, "footer")
|
|
294
|
+
])) : createCommentVNode("", true)
|
|
295
|
+
]),
|
|
296
|
+
_: 3
|
|
297
|
+
}, 8, ["class", "style", "data-vaul-animate"])
|
|
298
|
+
]),
|
|
299
|
+
_: 3
|
|
300
|
+
})
|
|
301
|
+
]),
|
|
302
|
+
_: 3
|
|
303
|
+
}, 8, ["open", "direction", "dismissible", "snap-points", "handle-only", "should-scale-background", "close-threshold"])
|
|
304
|
+
], 64);
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
export {
|
|
309
|
+
_sfc_main as _
|
|
310
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, normalizeClass, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem } from "reka-ui";
|
|
3
|
+
import { POPOVER_PANEL } from "../components/dropdown.js";
|
|
4
|
+
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "LpDropdownMenu",
|
|
7
|
+
props: {
|
|
8
|
+
items: {}
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
return (_ctx, _cache) => {
|
|
12
|
+
return openBlock(), createBlock(unref(DropdownMenuRoot), null, {
|
|
13
|
+
default: withCtx(() => [
|
|
14
|
+
createVNode(unref(DropdownMenuTrigger), { "as-child": "" }, {
|
|
15
|
+
default: withCtx(() => [
|
|
16
|
+
renderSlot(_ctx.$slots, "trigger")
|
|
17
|
+
]),
|
|
18
|
+
_: 3
|
|
19
|
+
}),
|
|
20
|
+
createVNode(unref(DropdownMenuPortal), null, {
|
|
21
|
+
default: withCtx(() => [
|
|
22
|
+
createVNode(unref(DropdownMenuContent), {
|
|
23
|
+
"side-offset": 6,
|
|
24
|
+
align: "end",
|
|
25
|
+
class: normalizeClass([unref(POPOVER_PANEL), "z-(--z-popover) min-w-44 p-1 outline-none"])
|
|
26
|
+
}, {
|
|
27
|
+
default: withCtx(() => [
|
|
28
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, i) => {
|
|
29
|
+
return openBlock(), createElementBlock(Fragment, { key: i }, [
|
|
30
|
+
item.separatorBefore ? (openBlock(), createBlock(unref(DropdownMenuSeparator), {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "my-1 h-px bg-line"
|
|
33
|
+
})) : createCommentVNode("", true),
|
|
34
|
+
createVNode(unref(DropdownMenuItem), {
|
|
35
|
+
class: normalizeClass(["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", item.danger ? "text-danger data-[highlighted]:bg-danger-soft data-[highlighted]:text-danger" : "text-ink data-[highlighted]:text-brand"]),
|
|
36
|
+
onSelect: ($event) => item.onSelect?.()
|
|
37
|
+
}, {
|
|
38
|
+
default: withCtx(() => [
|
|
39
|
+
item.icon ? (openBlock(), createBlock(_sfc_main$1, {
|
|
40
|
+
key: 0,
|
|
41
|
+
name: item.icon,
|
|
42
|
+
size: 15,
|
|
43
|
+
class: "transition-transform duration-[var(--duration-fast)] ease-[var(--ease-emphasized)] group-data-[highlighted]/item:translate-x-0.5"
|
|
44
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
45
|
+
createTextVNode(" " + toDisplayString(item.label), 1)
|
|
46
|
+
]),
|
|
47
|
+
_: 2
|
|
48
|
+
}, 1032, ["class", "onSelect"])
|
|
49
|
+
], 64);
|
|
50
|
+
}), 128))
|
|
51
|
+
]),
|
|
52
|
+
_: 1
|
|
53
|
+
}, 8, ["class"])
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
})
|
|
57
|
+
]),
|
|
58
|
+
_: 3
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
_sfc_main as _
|
|
65
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createVNode, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from "vue";
|
|
2
|
+
import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
|
|
3
|
+
const _hoisted_1 = { class: "flex flex-col items-center gap-3 px-6 py-12 text-center" };
|
|
4
|
+
const _hoisted_2 = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "flex size-12 items-center justify-center rounded-pill bg-surface-soft text-muted"
|
|
7
|
+
};
|
|
8
|
+
const _hoisted_3 = { class: "flex flex-col gap-1" };
|
|
9
|
+
const _hoisted_4 = { class: "font-semibold text-ink" };
|
|
10
|
+
const _hoisted_5 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "max-w-sm text-sm text-muted"
|
|
13
|
+
};
|
|
14
|
+
const _hoisted_6 = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "mt-1"
|
|
17
|
+
};
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
+
__name: "LpEmptyState",
|
|
20
|
+
props: {
|
|
21
|
+
icon: {},
|
|
22
|
+
title: {},
|
|
23
|
+
description: {}
|
|
24
|
+
},
|
|
25
|
+
setup(__props) {
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
28
|
+
__props.icon ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
29
|
+
createVNode(_sfc_main$1, {
|
|
30
|
+
name: __props.icon,
|
|
31
|
+
size: 22
|
|
32
|
+
}, null, 8, ["name"])
|
|
33
|
+
])) : createCommentVNode("", true),
|
|
34
|
+
createElementVNode("div", _hoisted_3, [
|
|
35
|
+
createElementVNode("p", _hoisted_4, toDisplayString(__props.title), 1),
|
|
36
|
+
__props.description ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(__props.description), 1)) : createCommentVNode("", true)
|
|
37
|
+
]),
|
|
38
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
39
|
+
renderSlot(_ctx.$slots, "default")
|
|
40
|
+
])) : createCommentVNode("", true)
|
|
41
|
+
]);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
_sfc_main as _
|
|
47
|
+
};
|