@leavepulse/ui 0.78.0 → 0.78.1
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/{DropzoneLinkField-DXIr0eFz.js → DropzoneLinkField-CLLhd3WB.js} +1 -1
- package/dist/chunks/FieldLeading-mr81aEAP.js +27 -0
- package/dist/chunks/{LpAddressInput-ZqoZ-N2Y.js → LpAddressInput-BSS49jpm.js} +2 -2
- package/dist/chunks/{LpAppShell-BNAVTQsY.js → LpAppShell-BKbYCHkx.js} +23 -4
- package/dist/chunks/{LpCodeBlock-DuzmnIHl.js → LpCodeBlock-DBqy4RLd.js} +1 -1
- package/dist/chunks/{LpCodeDisplay-CO8fngxa.js → LpCodeDisplay-D3BUAhV1.js} +2 -2
- package/dist/chunks/{LpColorPicker-BxAHEnR5.js → LpColorPicker-COHzV68R.js} +1 -1
- package/dist/chunks/{LpConfirmDialog-6oCIJTDa.js → LpConfirmDialog-CnrmzkuN.js} +1 -1
- package/dist/chunks/{LpConfirmHost-DgHvfT6s.js → LpConfirmHost-CwbObVGH.js} +1 -1
- package/dist/chunks/{LpContextMenu--eMGIql6.js → LpContextMenu-Bx_IhQDS.js} +5 -5
- package/dist/chunks/{LpCopyButton-7EOSIuwa.js → LpCopyButton-sAMvWeLP.js} +1 -1
- package/dist/chunks/{LpDataList-DgBeM01y.js → LpDataList-CaVfsozH.js} +2 -2
- package/dist/chunks/{LpDrawer-Bt9UUqt_.js → LpDrawer-DXNQFpAA.js} +1 -1
- package/dist/chunks/{LpFileTree-BSx1kBoV.js → LpFileTree-C-rJKzEQ.js} +3 -3
- package/dist/chunks/{LpFileTreeNode-4dVmFHb3.js → LpFileTreeNode-BgYn4U1J.js} +1 -1
- package/dist/chunks/{LpHoverCard-DanH3Nz1.js → LpHoverCard-CHE9jAJG.js} +6 -6
- package/dist/chunks/{LpInfraNode-BAU40Km2.js → LpInfraNode-Bb5nbuFY.js} +17 -0
- package/dist/chunks/{LpInput-DL6HEJdi.js → LpInput-D0O6dpuA.js} +18 -21
- package/dist/chunks/{LpInspector-CuoMAhiw.js → LpInspector-DO3fTCQ1.js} +2 -2
- package/dist/chunks/{LpLaneNode-HtnQf2FF.js → LpLaneNode-Bqcdm8Rf.js} +19 -1
- package/dist/chunks/{LpLightbox-xvpQ64MM.js → LpLightbox-CtDTQV01.js} +1 -1
- package/dist/chunks/{LpLogInspector-6cNnXqp4.js → LpLogInspector-BdQlX6S-.js} +1 -1
- package/dist/chunks/{LpLogViewer-Dvb1E9_G.js → LpLogViewer-umCZBapN.js} +4 -4
- package/dist/chunks/{LpMediaGallery-Df-tiWeq.js → LpMediaGallery-BYEwySoF.js} +2 -2
- package/dist/chunks/{LpModal-DrtQ_1A2.js → LpModal-DDvrSAnf.js} +1 -1
- package/dist/chunks/{LpModalNav-DkmGCnZE.js → LpModalNav-gOi1Giz1.js} +2 -2
- package/dist/chunks/{LpNotificationBell-D_wklO1m.js → LpNotificationBell-DUbVyK6R.js} +3 -3
- package/dist/chunks/{LpNumberField-CNHsmSDZ.js → LpNumberField-Csg-1Zh_.js} +20 -6
- package/dist/chunks/LpPageScrollbar-D2O0xhJw.js +164 -0
- package/dist/chunks/{LpPaletteTheme-dVtxHx-F.js → LpPaletteTheme-BIXpZLGe.js} +2 -2
- package/dist/chunks/{LpPasswordInput-B-zD6tUS.js → LpPasswordInput-D4HPhqfV.js} +2 -2
- package/dist/chunks/{LpPie-9t_guO49.js → LpPie-oVNHjsKD.js} +2 -2
- package/dist/chunks/{LpPipeline-rjXvEDRJ.js → LpPipeline-BSXT6oUJ.js} +1 -1
- package/dist/chunks/{LpRelativeTime-BovUk8MP.js → LpRelativeTime-0zI-44ve.js} +1 -1
- package/dist/chunks/{LpScrollArea-ay4Xo_hg.js → LpScrollArea-CqvwfZs2.js} +9 -12
- package/dist/chunks/{LpSecretField-DBvU6iAw.js → LpSecretField-B2roc4Iz.js} +4 -4
- package/dist/chunks/{LpServiceNode-D8uJ8sGk.js → LpServiceNode-Cln2ntdw.js} +17 -0
- package/dist/chunks/{LpSidebar-kSkpPh3-.js → LpSidebar-DDNJzb69.js} +4 -4
- package/dist/chunks/{LpSidebarNav-C2mvqrY2.js → LpSidebarNav-CE0jQS8i.js} +2 -2
- package/dist/chunks/{LpSidebarRow-eRP4Q31q.js → LpSidebarRow-DOTg1txp.js} +2 -2
- package/dist/chunks/{LpStat-pMNZgFcq.js → LpStat-DPjc6_fX.js} +17 -4
- package/dist/chunks/{LpTableFilter-DgARTsA1.js → LpTableFilter-B_XMOeAh.js} +1 -1
- package/dist/chunks/{LpThemeStudio-DzYfE-5k.js → LpThemeStudio-ChU0_Ga8.js} +2 -2
- package/dist/chunks/{LpThemeSwitcher-CFLkdbBL.js → LpThemeSwitcher-DmCZ21P_.js} +2 -2
- package/dist/chunks/{LpToaster-QFj0P-5m.js → LpToaster-Ct_ZOhCh.js} +1 -1
- package/dist/chunks/{LpTooltip-BJf3lZMq.js → LpTooltip-Bz_rrq5S.js} +5 -5
- package/dist/chunks/{LpTopologyCanvas-BOHHHZ_6.js → LpTopologyCanvas-jqz1KCq2.js} +14 -9
- package/dist/chunks/{LpTruncate-C6u3gjc6.js → LpTruncate-ellq9RYM.js} +2 -2
- package/dist/chunks/{LpUptimeBar-BnYmR2rj.js → LpUptimeBar-BoxcCDVY.js} +1 -1
- package/dist/chunks/{LpWorkspaceSwitcher-D0e9upAy.js → LpWorkspaceSwitcher-BeNHCLd5.js} +2 -2
- package/dist/chunks/{RevealToggle-CCPDE8Mv.js → RevealToggle-D_iyrB8d.js} +1 -1
- package/dist/component-names.d.ts +1 -1
- package/dist/components/DropzoneLinkField.vue.js +1 -1
- package/dist/components/FieldLeading.vue.d.ts +16 -0
- package/dist/components/FieldLeading.vue.js +4 -0
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAppShell.vue.d.ts +15 -0
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpChart.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpCodeDisplay.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.js +1 -1
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpCopyButton.vue.js +1 -1
- package/dist/components/LpDataList.vue.js +1 -1
- package/dist/components/LpDock.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +1 -1
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpHoverCard.vue.js +1 -1
- package/dist/components/LpInfraNode.vue.d.ts +11 -2
- package/dist/components/LpInfraNode.vue.js +1 -1
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpInspector.vue.js +1 -1
- package/dist/components/LpLaneNode.vue.d.ts +2 -3
- package/dist/components/LpLaneNode.vue.js +1 -1
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLogInspector.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNumberField.vue.d.ts +13 -2
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpPageScrollbar.vue.d.ts +10 -0
- package/dist/components/LpPageScrollbar.vue.js +4 -0
- package/dist/components/LpPaletteTheme.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpPipeline.vue.js +1 -1
- package/dist/components/LpRelativeTime.vue.js +1 -1
- package/dist/components/LpScrollArea.vue.js +1 -1
- package/dist/components/LpSecretField.vue.js +1 -1
- package/dist/components/LpServiceNode.vue.d.ts +8 -2
- package/dist/components/LpServiceNode.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSidebarRow.vue.js +1 -1
- package/dist/components/LpStat.vue.d.ts +16 -0
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpTable.vue.js +4 -4
- package/dist/components/LpTableFilter.vue.js +1 -1
- package/dist/components/LpTabs.vue.js +1 -1
- package/dist/components/LpThemeStudio.vue.js +1 -1
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTooltip.vue.js +1 -1
- package/dist/components/LpTopologyCanvas.vue.d.ts +2 -2
- package/dist/components/LpTopologyCanvas.vue.js +1 -1
- package/dist/components/LpTruncate.vue.js +1 -1
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/LpWorkspaceSwitcher.vue.js +1 -1
- package/dist/components/RevealToggle.vue.js +1 -1
- package/dist/components/menuWhen.js +1 -1
- package/dist/components/scrollbar.d.ts +34 -0
- package/dist/components/scrollbar.js +47 -0
- package/dist/composables/propCheck.d.ts +1 -1
- package/dist/composables/propCheck.js +15 -4
- package/dist/composables/usePaletteCommands.js +4 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +162 -160
- package/package.json +1 -1
- package/src/component-names.ts +1 -0
- package/src/components/FieldLeading.vue +17 -0
- package/src/components/LpAppShell.vue +23 -0
- package/src/components/LpContextMenu.vue +7 -0
- package/src/components/LpHoverCard.vue +7 -0
- package/src/components/LpInfraNode.vue +4 -3
- package/src/components/LpInput.vue +4 -3
- package/src/components/LpLaneNode.vue +5 -1
- package/src/components/LpNumberField.vue +7 -1
- package/src/components/LpPageScrollbar.vue +195 -0
- package/src/components/LpScrollArea.vue +27 -23
- package/src/components/LpServiceNode.vue +4 -2
- package/src/components/LpStat.vue +25 -5
- package/src/components/LpTooltip.vue +7 -0
- package/src/components/LpTopologyCanvas.vue +3 -1
- package/src/components/scrollbar.ts +71 -0
- package/src/composables/propCheck.ts +20 -5
- package/src/composables/usePaletteCommands.ts +5 -2
- package/src/index.ts +1 -0
|
@@ -220,9 +220,9 @@ type __VLS_ModelProps = {
|
|
|
220
220
|
"timelineIndex"?: number | undefined;
|
|
221
221
|
};
|
|
222
222
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
223
|
-
declare var
|
|
223
|
+
declare var __VLS_76: {};
|
|
224
224
|
type __VLS_Slots = {} & {
|
|
225
|
-
'legend-extra'?: (props: typeof
|
|
225
|
+
'legend-extra'?: (props: typeof __VLS_76) => any;
|
|
226
226
|
};
|
|
227
227
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
228
228
|
fitView: typeof fitFramed;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const BAR_Y = "group flex touch-none select-none justify-end pl-2.5";
|
|
2
|
+
export declare const BAR_X = "group flex flex-col touch-none select-none justify-end pt-2.5";
|
|
3
|
+
export declare const BAR_Y_SIZE: {
|
|
4
|
+
wall: string;
|
|
5
|
+
floating: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const BAR_X_SIZE: {
|
|
8
|
+
wall: string;
|
|
9
|
+
floating: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const THUMB_Y = "min-w-1 bg-brand/40 before:absolute before:inset-y-0 before:right-0 before:-left-2.5 before:content-[''] transition-[min-width,background-color] duration-[var(--duration-fast)] group-hover:min-w-1.5 group-hover:bg-brand";
|
|
12
|
+
export declare const THUMB_X = "min-h-1 bg-brand/40 before:absolute before:inset-x-0 before:bottom-0 before:-top-2.5 before:content-[''] transition-[min-height,background-color] duration-[var(--duration-fast)] group-hover:min-h-1.5 group-hover:bg-brand";
|
|
13
|
+
export declare const THUMB_Y_ROUND: {
|
|
14
|
+
wall: string;
|
|
15
|
+
floating: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const THUMB_X_ROUND: {
|
|
18
|
+
wall: string;
|
|
19
|
+
floating: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const BAR_FADE = "opacity-0 data-[state=visible]:animate-[fade-in_180ms_ease] data-[state=visible]:opacity-100 data-[state=hidden]:animate-[fade-out_240ms_ease]";
|
|
22
|
+
export declare const SCROLL_HIDE_DELAY_MS = 500;
|
|
23
|
+
/**
|
|
24
|
+
* A press on the bar beside the thumb. Like a native bar it pages one view
|
|
25
|
+
* towards the pointer, smoothly, rather than putting the thumb's middle under
|
|
26
|
+
* it (reka's own answer, which yanked the content by half a thumb on a near
|
|
27
|
+
* miss and teleported it on a far press).
|
|
28
|
+
*/
|
|
29
|
+
export declare function pageToward(scroller: Element, axis: "x" | "y", before: boolean): void;
|
|
30
|
+
/**
|
|
31
|
+
* Hide the document's own scrollbar (`lp-scrollbar-none` on <html>) while the
|
|
32
|
+
* kit draws one. Scrolling is untouched. Returns the release.
|
|
33
|
+
*/
|
|
34
|
+
export declare function hideNativeBar(doc: Document): () => void;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { prefersReducedMotion } from "../composables/easing.js";
|
|
2
|
+
import "vue";
|
|
3
|
+
import { nodeWindow } from "../composables/realm.js";
|
|
4
|
+
const BAR_Y = "group flex touch-none select-none justify-end pl-2.5";
|
|
5
|
+
const BAR_X = "group flex flex-col touch-none select-none justify-end pt-2.5";
|
|
6
|
+
const BAR_Y_SIZE = { wall: "w-3.5 py-px pr-px", floating: "w-4 py-1 pr-1" };
|
|
7
|
+
const BAR_X_SIZE = { wall: "h-3.5 px-px pb-px", floating: "h-4 px-1 pb-1" };
|
|
8
|
+
const THUMB_Y = "min-w-1 bg-brand/40 before:absolute before:inset-y-0 before:right-0 before:-left-2.5 before:content-[''] transition-[min-width,background-color] duration-[var(--duration-fast)] group-hover:min-w-1.5 group-hover:bg-brand";
|
|
9
|
+
const THUMB_X = "min-h-1 bg-brand/40 before:absolute before:inset-x-0 before:bottom-0 before:-top-2.5 before:content-[''] transition-[min-height,background-color] duration-[var(--duration-fast)] group-hover:min-h-1.5 group-hover:bg-brand";
|
|
10
|
+
const THUMB_Y_ROUND = { wall: "rounded-l-pill", floating: "rounded-pill" };
|
|
11
|
+
const THUMB_X_ROUND = { wall: "rounded-t-pill", floating: "rounded-pill" };
|
|
12
|
+
const BAR_FADE = "opacity-0 data-[state=visible]:animate-[fade-in_180ms_ease] data-[state=visible]:opacity-100 data-[state=hidden]:animate-[fade-out_240ms_ease]";
|
|
13
|
+
const SCROLL_HIDE_DELAY_MS = 500;
|
|
14
|
+
const PAGE_FRACTION = 0.85;
|
|
15
|
+
function pageToward(scroller, axis, before) {
|
|
16
|
+
const view = axis === "y" ? scroller.clientHeight : scroller.clientWidth;
|
|
17
|
+
const step = view * PAGE_FRACTION * (before ? -1 : 1);
|
|
18
|
+
const behavior = prefersReducedMotion(nodeWindow(scroller)) ? "auto" : "smooth";
|
|
19
|
+
scroller.scrollBy(axis === "y" ? { top: step, behavior } : { left: step, behavior });
|
|
20
|
+
}
|
|
21
|
+
const nativeHidden = /* @__PURE__ */ new WeakMap();
|
|
22
|
+
function hideNativeBar(doc) {
|
|
23
|
+
nativeHidden.set(doc, (nativeHidden.get(doc) ?? 0) + 1);
|
|
24
|
+
doc.documentElement.classList.add("lp-scrollbar-none");
|
|
25
|
+
let released = false;
|
|
26
|
+
return () => {
|
|
27
|
+
if (released) return;
|
|
28
|
+
released = true;
|
|
29
|
+
const left = (nativeHidden.get(doc) ?? 1) - 1;
|
|
30
|
+
nativeHidden.set(doc, left);
|
|
31
|
+
if (!left) doc.documentElement.classList.remove("lp-scrollbar-none");
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
BAR_FADE,
|
|
36
|
+
BAR_X,
|
|
37
|
+
BAR_X_SIZE,
|
|
38
|
+
BAR_Y,
|
|
39
|
+
BAR_Y_SIZE,
|
|
40
|
+
SCROLL_HIDE_DELAY_MS,
|
|
41
|
+
THUMB_X,
|
|
42
|
+
THUMB_X_ROUND,
|
|
43
|
+
THUMB_Y,
|
|
44
|
+
THUMB_Y_ROUND,
|
|
45
|
+
hideNativeBar,
|
|
46
|
+
pageToward
|
|
47
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Teleport } from "vue";
|
|
1
2
|
const KIT_COMPONENT = /^Lp[A-Z]/;
|
|
2
3
|
const ALWAYS_ALLOWED = /^(data-|aria-|on[A-Z])/;
|
|
3
4
|
const GLOBAL_ATTRIBUTES = /* @__PURE__ */ new Set([
|
|
@@ -46,11 +47,21 @@ function unknownAttributes(attributes, elements, ignore = []) {
|
|
|
46
47
|
return !elements.some((el) => propertiesOf(el).has(key));
|
|
47
48
|
});
|
|
48
49
|
}
|
|
50
|
+
function rootElements(vnode, out = []) {
|
|
51
|
+
if (!vnode || vnode.type === Teleport) return out;
|
|
52
|
+
if (vnode.component) return rootElements(vnode.component.subTree, out);
|
|
53
|
+
const el = vnode.el;
|
|
54
|
+
if (el?.nodeType === 1) {
|
|
55
|
+
out.push(el);
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
if (Array.isArray(vnode.children)) {
|
|
59
|
+
for (const child of vnode.children) if (child && typeof child === "object") rootElements(child, out);
|
|
60
|
+
}
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
49
63
|
function renderedElements(instance) {
|
|
50
|
-
|
|
51
|
-
if (root?.nodeType !== 1) return [];
|
|
52
|
-
const el = root;
|
|
53
|
-
return [el, ...el.querySelectorAll(FORWARD_TARGETS)];
|
|
64
|
+
return rootElements(instance.$.subTree).flatMap((el) => [el, ...el.querySelectorAll(FORWARD_TARGETS)]);
|
|
54
65
|
}
|
|
55
66
|
const lpPropCheck = {
|
|
56
67
|
install(app, options = {}) {
|
|
@@ -194,8 +194,10 @@ function usePaletteControl(options = {}) {
|
|
|
194
194
|
autofocus: void 0,
|
|
195
195
|
palette: false,
|
|
196
196
|
disabled: options.disabled?.() || !writable(),
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
// Only to a control that declares them: elsewhere they fell through
|
|
198
|
+
// as attributes onto its root (a switch's button took `required`).
|
|
199
|
+
..."invalid" in instance.props ? { invalid: options.invalid?.() } : {},
|
|
200
|
+
..."required" in instance.props ? { required: field?.value.required ?? instance.props.required } : {},
|
|
199
201
|
"aria-label": label(),
|
|
200
202
|
class: "w-full",
|
|
201
203
|
style: void 0
|
package/dist/index.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ export { default as LpRadioGroup } from "./components/LpRadioGroup.vue";
|
|
|
133
133
|
export type { RadioOption } from "./components/LpRadioGroup.vue";
|
|
134
134
|
export { default as LpRollingText } from "./components/LpRollingText.vue";
|
|
135
135
|
export { default as LpScrollArea } from "./components/LpScrollArea.vue";
|
|
136
|
+
export { default as LpPageScrollbar } from "./components/LpPageScrollbar.vue";
|
|
136
137
|
export { default as LpSegmented } from "./components/LpSegmented.vue";
|
|
137
138
|
export type { SegmentedOption } from "./components/LpSegmented.vue";
|
|
138
139
|
export { default as LpSection } from "./components/LpSection.vue";
|