@leavepulse/ui 0.24.0 → 0.25.0

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.
Files changed (104) hide show
  1. package/dist/assets/LpNumberFlow-rZkwQwlU.css +116 -0
  2. package/dist/assets/LpRollingText-CR1mb0Vt.css +74 -0
  3. package/dist/assets/LpSparkline-0mKTq7pb.css +51 -0
  4. package/dist/assets/LpTooltip-B61SYd4K.css +17 -0
  5. package/dist/assets/LpUptimeBar-B98o9krI.css +18 -0
  6. package/dist/chunks/{LpAppShell-CaQYQKZV.js → LpAppShell-B5k0J3Cf.js} +1 -1
  7. package/dist/chunks/LpChart-tNXs1ttr.js +671 -0
  8. package/dist/chunks/{LpCodeBlock-CSiOSPs8.js → LpCodeBlock-rS_6mO3D.js} +1 -1
  9. package/dist/chunks/{LpConfirmDialog-CObRah9c.js → LpConfirmDialog-CjOGcj1e.js} +32 -4
  10. package/dist/chunks/{LpDisclosure-DP6yfgfM.js → LpDisclosure-BnwP4Q-b.js} +1 -1
  11. package/dist/chunks/{LpFileTree-nU1wRRxZ.js → LpFileTree-BaV7f0O7.js} +1 -1
  12. package/dist/chunks/{LpFileTreeNode-D7WgUPcJ.js → LpFileTreeNode-BzpBa7R7.js} +6 -8
  13. package/dist/chunks/{LpLogViewer-B1aLUVdz.js → LpLogViewer-CcQ3s3Fp.js} +2 -1
  14. package/dist/chunks/{LpMapPicker-DFKrd1Ne.js → LpMapPicker-CXvoTrAe.js} +2 -4
  15. package/dist/chunks/{LpNotificationBell-X1M30e0X.js → LpNotificationBell-Dvu-b6Vn.js} +56 -27
  16. package/dist/chunks/LpNumberFlow-amWYaeuA.js +221 -0
  17. package/dist/chunks/LpPie-BkjWlfSw.js +525 -0
  18. package/dist/chunks/LpProgress-DoIP4jQR.js +198 -0
  19. package/dist/chunks/LpRollingText-CM5gkSeF.js +50 -0
  20. package/dist/chunks/{LpSidebar-D3GGLSE7.js → LpSidebar-7Vpy2IJc.js} +1 -1
  21. package/dist/chunks/{LpSidebarNav-X14xMdPa.js → LpSidebarNav-CFX5NxGs.js} +1 -1
  22. package/dist/chunks/LpSparkline-C6xQ2dwv.js +175 -0
  23. package/dist/chunks/{LpStat-CdbEFOvn.js → LpStat-CDanpzU0.js} +43 -5
  24. package/dist/chunks/{LpThemeSwitcher-BgpJgrnP.js → LpThemeSwitcher-7mAK6bI7.js} +2 -4
  25. package/dist/chunks/LpTooltip-hCLPAqMG.js +131 -0
  26. package/dist/chunks/LpUptimeBar-DcQ8HikG.js +152 -0
  27. package/dist/component-names.d.ts +1 -1
  28. package/dist/components/LpAppShell.vue.js +1 -1
  29. package/dist/components/LpChart.vue.d.ts +88 -0
  30. package/dist/components/LpChart.vue.js +4 -0
  31. package/dist/components/LpCodeBlock.vue.js +1 -1
  32. package/dist/components/LpConfirmDialog.vue.d.ts +18 -2
  33. package/dist/components/LpConfirmDialog.vue.js +1 -1
  34. package/dist/components/LpDisclosure.vue.js +1 -1
  35. package/dist/components/LpFileTree.vue.d.ts +1 -1
  36. package/dist/components/LpFileTree.vue.js +1 -1
  37. package/dist/components/LpFileTreeNode.vue.js +1 -1
  38. package/dist/components/LpLightbox.vue.d.ts +1 -1
  39. package/dist/components/LpLogViewer.vue.d.ts +1 -1
  40. package/dist/components/LpLogViewer.vue.js +1 -1
  41. package/dist/components/LpMapPicker.vue.js +1 -1
  42. package/dist/components/LpNotificationBell.vue.d.ts +12 -0
  43. package/dist/components/LpNotificationBell.vue.js +1 -1
  44. package/dist/components/LpNumberFlow.vue.d.ts +35 -0
  45. package/dist/components/LpNumberFlow.vue.js +4 -0
  46. package/dist/components/LpPie.vue.d.ts +134 -0
  47. package/dist/components/LpPie.vue.js +4 -0
  48. package/dist/components/LpProgress.vue.d.ts +56 -2
  49. package/dist/components/LpProgress.vue.js +1 -1
  50. package/dist/components/LpRollingText.vue.d.ts +33 -0
  51. package/dist/components/LpRollingText.vue.js +4 -0
  52. package/dist/components/LpSidebar.vue.js +1 -1
  53. package/dist/components/LpSidebarNav.vue.js +1 -1
  54. package/dist/components/LpSparkline.vue.d.ts +48 -0
  55. package/dist/components/LpSparkline.vue.js +4 -0
  56. package/dist/components/LpStat.vue.d.ts +25 -2
  57. package/dist/components/LpStat.vue.js +1 -1
  58. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  59. package/dist/components/LpTooltip.vue.d.ts +24 -3
  60. package/dist/components/LpTooltip.vue.js +1 -1
  61. package/dist/components/LpUptimeBar.vue.js +1 -1
  62. package/dist/components/chart.d.ts +180 -0
  63. package/dist/components/chart.js +353 -0
  64. package/dist/composables/easing.d.ts +46 -0
  65. package/dist/composables/easing.js +23 -0
  66. package/dist/composables/usePillTransition.d.ts +13 -1
  67. package/dist/composables/usePillTransition.js +22 -2
  68. package/dist/composables/useReveal.d.ts +26 -0
  69. package/dist/composables/useReveal.js +45 -0
  70. package/dist/composables/useSettled.js +2 -2
  71. package/dist/composables/useShift.js +2 -4
  72. package/dist/index.d.ts +14 -0
  73. package/dist/index.js +126 -103
  74. package/package.json +2 -1
  75. package/src/component-names.ts +5 -0
  76. package/src/components/LpChart.vue +846 -0
  77. package/src/components/LpCodeBlock.vue +1 -1
  78. package/src/components/LpConfirmDialog.vue +49 -0
  79. package/src/components/LpDisclosure.vue +1 -1
  80. package/src/components/LpFileTreeNode.vue +9 -10
  81. package/src/components/LpLogViewer.vue +2 -3
  82. package/src/components/LpMapPicker.vue +2 -5
  83. package/src/components/LpNotificationBell.vue +76 -15
  84. package/src/components/LpNumberFlow.vue +524 -0
  85. package/src/components/LpPie.vue +778 -0
  86. package/src/components/LpProgress.vue +283 -6
  87. package/src/components/LpRollingText.vue +157 -0
  88. package/src/components/LpSidebarNav.vue +1 -1
  89. package/src/components/LpSparkline.vue +312 -0
  90. package/src/components/LpStat.vue +52 -4
  91. package/src/components/LpTooltip.vue +185 -3
  92. package/src/components/LpUptimeBar.vue +150 -53
  93. package/src/components/chart.ts +686 -0
  94. package/src/composables/easing.ts +88 -0
  95. package/src/composables/usePillTransition.ts +71 -6
  96. package/src/composables/useReveal.ts +113 -0
  97. package/src/composables/useSettled.ts +2 -4
  98. package/src/composables/useShift.ts +2 -8
  99. package/src/index.ts +19 -0
  100. package/src/theme/useTheme.ts +2 -8
  101. package/src/tokens/tokens.css +36 -0
  102. package/dist/chunks/LpProgress-BhI0IbjC.js +0 -37
  103. package/dist/chunks/LpTooltip-D1hbjQWG.js +0 -63
  104. package/dist/chunks/LpUptimeBar-CB366k0O.js +0 -127
@@ -1,127 +0,0 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, toDisplayString, createTextVNode, createElementVNode, createCommentVNode, createVNode, unref, withCtx, Fragment, renderList, createBlock, normalizeStyle, normalizeClass } from "vue";
2
- import { TooltipProvider, TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent } from "reka-ui";
3
- import { PANEL_SURFACE, TOOLTIP_ANIM } from "../components/dropdown.js";
4
- const _hoisted_1 = { class: "flex flex-col gap-1.5" };
5
- const _hoisted_2 = {
6
- key: 0,
7
- class: "flex items-baseline justify-between gap-3 text-xs"
8
- };
9
- const _hoisted_3 = {
10
- key: 0,
11
- class: "font-medium text-ink"
12
- };
13
- const _hoisted_4 = { key: 1 };
14
- const _hoisted_5 = {
15
- key: 2,
16
- class: "tabular-nums text-muted-strong"
17
- };
18
- const _hoisted_6 = { class: "flex h-7 items-stretch gap-0.5" };
19
- const _hoisted_7 = ["aria-label"];
20
- const _hoisted_8 = { class: "flex items-center gap-1.5" };
21
- const _hoisted_9 = {
22
- key: 1,
23
- class: "flex items-center justify-between text-xs text-muted"
24
- };
25
- const _sfc_main = /* @__PURE__ */ defineComponent({
26
- __name: "LpUptimeBar",
27
- props: {
28
- segments: {},
29
- startLabel: {},
30
- endLabel: {},
31
- showUptime: { type: Boolean, default: true },
32
- title: {},
33
- colors: {}
34
- },
35
- setup(__props) {
36
- const props = __props;
37
- const defaultColor = {
38
- operational: "var(--color-brand)",
39
- degraded: "var(--color-accent)",
40
- down: "var(--color-danger)",
41
- maintenance: "var(--color-action)",
42
- empty: "var(--color-surface-soft)"
43
- };
44
- const colorFor = (status) => props.colors?.[status] ?? defaultColor[status];
45
- const statusLabel = {
46
- operational: "Operational",
47
- degraded: "Degraded",
48
- down: "Down",
49
- maintenance: "Maintenance",
50
- empty: "No data"
51
- };
52
- const uptimePct = computed(() => {
53
- const tracked = props.segments.filter((s) => s.status !== "empty");
54
- if (!tracked.length) return null;
55
- const up = tracked.filter((s) => s.status === "operational" || s.status === "maintenance").length;
56
- return up / tracked.length * 100;
57
- });
58
- const uptimeText = computed(() => {
59
- const v = uptimePct.value;
60
- if (v == null) return "—";
61
- return `${Number(v.toFixed(2))}%`;
62
- });
63
- return (_ctx, _cache) => {
64
- return openBlock(), createElementBlock("div", _hoisted_1, [
65
- __props.showUptime || __props.title ? (openBlock(), createElementBlock("div", _hoisted_2, [
66
- __props.title ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.title), 1)) : (openBlock(), createElementBlock("span", _hoisted_4)),
67
- __props.showUptime ? (openBlock(), createElementBlock("span", _hoisted_5, [
68
- createTextVNode(toDisplayString(uptimeText.value), 1),
69
- _cache[0] || (_cache[0] = createElementVNode("span", { class: "text-muted" }, " uptime", -1))
70
- ])) : createCommentVNode("", true)
71
- ])) : createCommentVNode("", true),
72
- createVNode(unref(TooltipProvider), { "delay-duration": 120 }, {
73
- default: withCtx(() => [
74
- createElementVNode("div", _hoisted_6, [
75
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.segments, (seg, i) => {
76
- return openBlock(), createBlock(unref(TooltipRoot), { key: i }, {
77
- default: withCtx(() => [
78
- createVNode(unref(TooltipTrigger), { "as-child": "" }, {
79
- default: withCtx(() => [
80
- createElementVNode("button", {
81
- type: "button",
82
- class: normalizeClass(["min-w-0 flex-1 rounded-xs outline-none transition-[scale,opacity] duration-150 hover:scale-y-110 focus-visible:ring-2 focus-visible:ring-ring", seg.status === "empty" ? "opacity-50" : ""]),
83
- style: normalizeStyle({ backgroundColor: colorFor(seg.status) }),
84
- "aria-label": seg.label ?? statusLabel[seg.status]
85
- }, null, 14, _hoisted_7)
86
- ]),
87
- _: 2
88
- }, 1024),
89
- createVNode(unref(TooltipPortal), null, {
90
- default: withCtx(() => [
91
- createVNode(unref(TooltipContent), {
92
- "side-offset": 6,
93
- class: normalizeClass([unref(PANEL_SURFACE), unref(TOOLTIP_ANIM), "z-(--z-tooltip) px-2.5 py-1.5 text-xs text-ink"])
94
- }, {
95
- default: withCtx(() => [
96
- createElementVNode("span", _hoisted_8, [
97
- createElementVNode("span", {
98
- class: "size-1.5 shrink-0 rounded-full",
99
- style: normalizeStyle({ backgroundColor: colorFor(seg.status) })
100
- }, null, 4),
101
- createTextVNode(" " + toDisplayString(seg.label ?? statusLabel[seg.status]), 1)
102
- ])
103
- ]),
104
- _: 2
105
- }, 1032, ["class"])
106
- ]),
107
- _: 2
108
- }, 1024)
109
- ]),
110
- _: 2
111
- }, 1024);
112
- }), 128))
113
- ])
114
- ]),
115
- _: 1
116
- }),
117
- __props.startLabel || __props.endLabel ? (openBlock(), createElementBlock("div", _hoisted_9, [
118
- createElementVNode("span", null, toDisplayString(__props.startLabel), 1),
119
- createElementVNode("span", null, toDisplayString(__props.endLabel), 1)
120
- ])) : createCommentVNode("", true)
121
- ]);
122
- };
123
- }
124
- });
125
- export {
126
- _sfc_main as _
127
- };