@leavepulse/ui 0.24.1 → 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.
- package/dist/assets/LpNumberFlow-rZkwQwlU.css +116 -0
- package/dist/assets/LpRollingText-CR1mb0Vt.css +74 -0
- package/dist/assets/LpSparkline-0mKTq7pb.css +51 -0
- package/dist/assets/LpTooltip-B61SYd4K.css +17 -0
- package/dist/assets/LpUptimeBar-B98o9krI.css +18 -0
- package/dist/chunks/LpChart-tNXs1ttr.js +671 -0
- package/dist/chunks/{LpConfirmDialog-CObRah9c.js → LpConfirmDialog-CjOGcj1e.js} +32 -4
- package/dist/chunks/{LpFileTree-H7Ho8uoq.js → LpFileTree-BaV7f0O7.js} +1 -1
- package/dist/chunks/{LpFileTreeNode-BEZIvxHi.js → LpFileTreeNode-BzpBa7R7.js} +5 -7
- package/dist/chunks/{LpLogViewer-B1aLUVdz.js → LpLogViewer-CcQ3s3Fp.js} +2 -1
- package/dist/chunks/{LpMapPicker-DFKrd1Ne.js → LpMapPicker-CXvoTrAe.js} +2 -4
- package/dist/chunks/{LpNotificationBell-X1M30e0X.js → LpNotificationBell-Dvu-b6Vn.js} +56 -27
- package/dist/chunks/LpNumberFlow-amWYaeuA.js +221 -0
- package/dist/chunks/LpPie-BkjWlfSw.js +525 -0
- package/dist/chunks/LpProgress-DoIP4jQR.js +198 -0
- package/dist/chunks/LpRollingText-CM5gkSeF.js +50 -0
- package/dist/chunks/LpSparkline-C6xQ2dwv.js +175 -0
- package/dist/chunks/{LpStat-CdbEFOvn.js → LpStat-CDanpzU0.js} +43 -5
- package/dist/chunks/{LpThemeSwitcher-BgpJgrnP.js → LpThemeSwitcher-7mAK6bI7.js} +2 -4
- package/dist/chunks/LpTooltip-hCLPAqMG.js +131 -0
- package/dist/chunks/LpUptimeBar-DcQ8HikG.js +152 -0
- package/dist/component-names.d.ts +1 -1
- package/dist/components/LpChart.vue.d.ts +88 -0
- package/dist/components/LpChart.vue.js +4 -0
- package/dist/components/LpConfirmDialog.vue.d.ts +18 -2
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpFileTree.vue.d.ts +1 -1
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpLightbox.vue.d.ts +1 -1
- package/dist/components/LpLogViewer.vue.d.ts +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.d.ts +12 -0
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNumberFlow.vue.d.ts +35 -0
- package/dist/components/LpNumberFlow.vue.js +4 -0
- package/dist/components/LpPie.vue.d.ts +134 -0
- package/dist/components/LpPie.vue.js +4 -0
- package/dist/components/LpProgress.vue.d.ts +56 -2
- package/dist/components/LpProgress.vue.js +1 -1
- package/dist/components/LpRollingText.vue.d.ts +33 -0
- package/dist/components/LpRollingText.vue.js +4 -0
- package/dist/components/LpSparkline.vue.d.ts +48 -0
- package/dist/components/LpSparkline.vue.js +4 -0
- package/dist/components/LpStat.vue.d.ts +25 -2
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpTooltip.vue.d.ts +24 -3
- package/dist/components/LpTooltip.vue.js +1 -1
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/chart.d.ts +180 -0
- package/dist/components/chart.js +353 -0
- package/dist/composables/easing.d.ts +46 -0
- package/dist/composables/easing.js +23 -0
- package/dist/composables/usePillTransition.d.ts +13 -1
- package/dist/composables/usePillTransition.js +22 -2
- package/dist/composables/useReveal.d.ts +26 -0
- package/dist/composables/useReveal.js +45 -0
- package/dist/composables/useSettled.js +2 -2
- package/dist/composables/useShift.js +2 -4
- package/dist/index.d.ts +14 -0
- package/dist/index.js +125 -102
- package/package.json +2 -1
- package/src/component-names.ts +5 -0
- package/src/components/LpChart.vue +846 -0
- package/src/components/LpConfirmDialog.vue +49 -0
- package/src/components/LpFileTreeNode.vue +5 -9
- package/src/components/LpLogViewer.vue +2 -3
- package/src/components/LpMapPicker.vue +2 -5
- package/src/components/LpNotificationBell.vue +76 -15
- package/src/components/LpNumberFlow.vue +524 -0
- package/src/components/LpPie.vue +778 -0
- package/src/components/LpProgress.vue +283 -6
- package/src/components/LpRollingText.vue +157 -0
- package/src/components/LpSparkline.vue +312 -0
- package/src/components/LpStat.vue +52 -4
- package/src/components/LpTooltip.vue +185 -3
- package/src/components/LpUptimeBar.vue +150 -53
- package/src/components/chart.ts +686 -0
- package/src/composables/easing.ts +88 -0
- package/src/composables/usePillTransition.ts +71 -6
- package/src/composables/useReveal.ts +113 -0
- package/src/composables/useSettled.ts +2 -4
- package/src/composables/useShift.ts +2 -8
- package/src/index.ts +19 -0
- package/src/theme/useTheme.ts +2 -8
- package/src/tokens/tokens.css +36 -0
- package/dist/chunks/LpProgress-BhI0IbjC.js +0 -37
- package/dist/chunks/LpTooltip-D1hbjQWG.js +0 -63
- package/dist/chunks/LpUptimeBar-CB366k0O.js +0 -127
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Unscoped: TransitionGroup applies its classes to elements Vue moves and
|
|
4
|
+
* clones, which a scoped attribute selector doesn't reliably reach. Everything
|
|
5
|
+
* is namespaced under .lp-nf.
|
|
6
|
+
*/
|
|
7
|
+
/*
|
|
8
|
+
* Fades the top and bottom of every column, so a digit rolls in and out of a
|
|
9
|
+
* window rather than appearing at a hard edge.
|
|
10
|
+
*
|
|
11
|
+
* In PIXELS, not percentages. A percentage fade scales with the row: at 18% it
|
|
12
|
+
* ate 2.4px off a 13.2px line, which on small text read as a shadow lying over
|
|
13
|
+
* the digits rather than as a window they pass through. A fixed 2px looks the
|
|
14
|
+
* same at every size, and only ever touches the sliver where a digit is
|
|
15
|
+
* genuinely entering or leaving.
|
|
16
|
+
*/
|
|
17
|
+
.lp-nf__track {
|
|
18
|
+
--lp-nf-fade: 2px;
|
|
19
|
+
-webkit-mask-image: linear-gradient(
|
|
20
|
+
to bottom,
|
|
21
|
+
transparent 0,
|
|
22
|
+
#000 var(--lp-nf-fade),
|
|
23
|
+
#000 calc(100% - var(--lp-nf-fade)),
|
|
24
|
+
transparent 100%
|
|
25
|
+
);
|
|
26
|
+
mask-image: linear-gradient(
|
|
27
|
+
to bottom,
|
|
28
|
+
transparent 0,
|
|
29
|
+
#000 var(--lp-nf-fade),
|
|
30
|
+
#000 calc(100% - var(--lp-nf-fade)),
|
|
31
|
+
transparent 100%
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* The cell INHERITS its line box rather than declaring one. A fixed 1.1 made
|
|
37
|
+
* the digits 13.2px tall next to 16px text in the same row, so the two sat on
|
|
38
|
+
* different baselines and the number read as floating above the words beside
|
|
39
|
+
* it. Sharing the inherited line-height puts them on one baseline at any size.
|
|
40
|
+
*/
|
|
41
|
+
.lp-nf__cell {
|
|
42
|
+
position: relative;
|
|
43
|
+
display: inline-block;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
/* A formatter may put a space before its unit ("412 GB"); inline-flex would
|
|
46
|
+
collapse it away, gluing the unit to the number. */
|
|
47
|
+
white-space: pre;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* The strip is as tall as its 20 entries and hangs from the top of the cell —
|
|
52
|
+
* NOT stretched to the cell's height, or each entry would be a twentieth of a
|
|
53
|
+
* line tall. Percentages on `translateY` resolve against the strip's own
|
|
54
|
+
* height, so one entry is 5% of it: digit N sits at -N × 5%.
|
|
55
|
+
*/
|
|
56
|
+
.lp-nf__strip {
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
right: 0;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
/* Per-instance, so a counter whose VALUE is already being animated from
|
|
64
|
+
outside can shorten the wheel's own spin and stop lagging behind it. */
|
|
65
|
+
/* Settles rather than stops: the wheel carries a hair past its digit and
|
|
66
|
+
drifts back, so a column reads as a mechanism coming to rest. */
|
|
67
|
+
transition: transform var(--lp-nf-spin, var(--duration-slow, 320ms))
|
|
68
|
+
var(--ease-settle);
|
|
69
|
+
will-change: transform;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Each strip entry is exactly one line box tall, so translating by -N × 5%
|
|
73
|
+
(one twentieth of the 20-entry strip) lands digit N in the window. */
|
|
74
|
+
.lp-nf__digit {
|
|
75
|
+
line-height: inherit;
|
|
76
|
+
}
|
|
77
|
+
.lp-nf__ghost {
|
|
78
|
+
visibility: hidden;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Faded, so a held-open column reads as an empty wheel rather than a zero the
|
|
82
|
+
number actually has. */
|
|
83
|
+
.lp-nf__cell--pad {
|
|
84
|
+
opacity: 0.18;
|
|
85
|
+
transition: opacity var(--duration-fast, 160ms) linear;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/*
|
|
89
|
+
* Columns fade rather than grow. Animating `max-width` here was the cause of
|
|
90
|
+
* the row jittering whenever the digit count changed: the width tween fought
|
|
91
|
+
* the layout while the value was still climbing, so the whole number shuffled
|
|
92
|
+
* sideways and every wheel restarted. The padding above now reserves the space
|
|
93
|
+
* up front, which leaves these transitions with only the appearance of a
|
|
94
|
+
* column to handle — and that is a fade.
|
|
95
|
+
*/
|
|
96
|
+
.lp-nf-cell-enter-active,
|
|
97
|
+
.lp-nf-cell-leave-active {
|
|
98
|
+
transition: opacity var(--duration-fast, 160ms) linear;
|
|
99
|
+
}
|
|
100
|
+
.lp-nf-cell-enter-from,
|
|
101
|
+
.lp-nf-cell-leave-to {
|
|
102
|
+
opacity: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Out of flow while leaving, so the settled row closes up without a reflow
|
|
106
|
+
jump at the end of the transition. */
|
|
107
|
+
.lp-nf-cell-leave-active {
|
|
108
|
+
position: absolute;
|
|
109
|
+
}
|
|
110
|
+
@media (prefers-reduced-motion: reduce) {
|
|
111
|
+
.lp-nf__strip,
|
|
112
|
+
.lp-nf-cell-enter-active,
|
|
113
|
+
.lp-nf-cell-leave-active {
|
|
114
|
+
transition: none;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Unscoped on purpose: the transition classes are applied to the element Vue
|
|
4
|
+
* clones during the leave phase, which a scoped attribute selector doesn't
|
|
5
|
+
* reliably reach. Everything is namespaced under .lp-roll instead.
|
|
6
|
+
*/
|
|
7
|
+
.lp-roll {
|
|
8
|
+
perspective: var(--lp-roll-perspective);
|
|
9
|
+
}
|
|
10
|
+
.lp-roll__item {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
backface-visibility: hidden;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* The outgoing copy leaves the flow so the incoming one keeps the baseline. */
|
|
17
|
+
.lp-roll-up-leave-active,
|
|
18
|
+
.lp-roll-down-leave-active,
|
|
19
|
+
.lp-roll-flip-leave-active {
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset: 0;
|
|
22
|
+
}
|
|
23
|
+
.lp-roll-up-enter-active,
|
|
24
|
+
.lp-roll-up-leave-active,
|
|
25
|
+
.lp-roll-down-enter-active,
|
|
26
|
+
.lp-roll-down-leave-active {
|
|
27
|
+
transition:
|
|
28
|
+
transform var(--lp-roll-duration) var(--ease-emphasized),
|
|
29
|
+
opacity var(--lp-roll-duration) var(--ease-emphasized);
|
|
30
|
+
}
|
|
31
|
+
.lp-roll-up-enter-from {
|
|
32
|
+
transform: translateY(100%);
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
.lp-roll-up-leave-to {
|
|
36
|
+
transform: translateY(-100%);
|
|
37
|
+
opacity: 0;
|
|
38
|
+
}
|
|
39
|
+
.lp-roll-down-enter-from {
|
|
40
|
+
transform: translateY(-100%);
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
.lp-roll-down-leave-to {
|
|
44
|
+
transform: translateY(100%);
|
|
45
|
+
opacity: 0;
|
|
46
|
+
}
|
|
47
|
+
.lp-roll-flip-enter-active,
|
|
48
|
+
.lp-roll-flip-leave-active {
|
|
49
|
+
transition:
|
|
50
|
+
transform var(--lp-roll-duration) var(--ease-emphasized),
|
|
51
|
+
opacity calc(var(--lp-roll-duration) * 0.6) linear;
|
|
52
|
+
transform-origin: center center;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Quarter turns, not halves: the two faces meet edge-on at the midpoint, so
|
|
56
|
+
the box reads as turning rather than as one label briefly vanishing. */
|
|
57
|
+
.lp-roll-flip-enter-from {
|
|
58
|
+
transform: rotateX(-90deg);
|
|
59
|
+
opacity: 0;
|
|
60
|
+
}
|
|
61
|
+
.lp-roll-flip-leave-to {
|
|
62
|
+
transform: rotateX(90deg);
|
|
63
|
+
opacity: 0;
|
|
64
|
+
}
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
.lp-roll-up-enter-active,
|
|
67
|
+
.lp-roll-up-leave-active,
|
|
68
|
+
.lp-roll-down-enter-active,
|
|
69
|
+
.lp-roll-down-leave-active,
|
|
70
|
+
.lp-roll-flip-enter-active,
|
|
71
|
+
.lp-roll-flip-leave-active {
|
|
72
|
+
transition: none;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Unscoped and namespaced: the reveal is driven by CSS variables the component
|
|
4
|
+
* sets inline, and keyframes cannot live in a scoped block that the animated
|
|
5
|
+
* element may not carry the attribute for.
|
|
6
|
+
*
|
|
7
|
+
* Only elements that were given the variables animate — `animate: false` omits
|
|
8
|
+
* them, the `var()` fallbacks resolve to a finished state, and nothing moves.
|
|
9
|
+
*
|
|
10
|
+
* `--waiting` is the third state: the element is on the page but has not been
|
|
11
|
+
* scrolled to, so it is held at the animation's first frame. It cannot simply
|
|
12
|
+
* be left un-animated, because that is indistinguishable from finished.
|
|
13
|
+
*/
|
|
14
|
+
.lp-spark__line {
|
|
15
|
+
stroke-dasharray: var(--lp-spark-len, none);
|
|
16
|
+
stroke-dashoffset: 0;
|
|
17
|
+
animation: lp-spark-draw var(--lp-spark-dur, 0ms) var(--ease-travel) both;
|
|
18
|
+
}
|
|
19
|
+
.lp-spark__area,
|
|
20
|
+
.lp-spark__dot {
|
|
21
|
+
/* Behind the line: the fill and the end marker belong to a line that has
|
|
22
|
+
already been drawn, so they fade in over its last third. */
|
|
23
|
+
animation: lp-spark-fade var(--lp-spark-dur, 0ms) ease both;
|
|
24
|
+
}
|
|
25
|
+
.lp-spark--waiting.lp-spark__line {
|
|
26
|
+
stroke-dashoffset: var(--lp-spark-len, 0);
|
|
27
|
+
animation: none;
|
|
28
|
+
}
|
|
29
|
+
.lp-spark--waiting.lp-spark__area,
|
|
30
|
+
.lp-spark--waiting.lp-spark__dot {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
animation: none;
|
|
33
|
+
}
|
|
34
|
+
@keyframes lp-spark-draw {
|
|
35
|
+
from {
|
|
36
|
+
stroke-dashoffset: var(--lp-spark-len, 0);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
@keyframes lp-spark-fade {
|
|
40
|
+
0%,
|
|
41
|
+
60% {
|
|
42
|
+
opacity: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
@media (prefers-reduced-motion: reduce) {
|
|
46
|
+
.lp-spark__line,
|
|
47
|
+
.lp-spark__area,
|
|
48
|
+
.lp-spark__dot {
|
|
49
|
+
animation: none;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Unscoped: the element that has to be made transparent is reka's own
|
|
4
|
+
* positioning wrapper, which this component never renders and a scoped
|
|
5
|
+
* attribute therefore never reaches.
|
|
6
|
+
*
|
|
7
|
+
* In follow mode the tip is placed AT the cursor, so both the panel and that
|
|
8
|
+
* wrapper sit under the pointer. The panel alone being transparent was not
|
|
9
|
+
* enough — the wrapper still took the events, the trigger never received its
|
|
10
|
+
* pointerleave, and the tip stayed open: it lingered after the pointer left,
|
|
11
|
+
* a second chart could open its own on top, and a scroll left them stranded
|
|
12
|
+
* because the trigger had never been told the pointer had gone.
|
|
13
|
+
*/
|
|
14
|
+
:has(> [data-lp-follow]),
|
|
15
|
+
[data-lp-follow] {
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* The slot is the full share of the row; the mark inside it is narrowed to a
|
|
4
|
+
* FRACTION of that share, which is what produces the space between days.
|
|
5
|
+
* Because the inset scales with the slot, the mark-to-gap ratio holds at any
|
|
6
|
+
* width and any number of slices, and both round to device pixels together
|
|
7
|
+
* instead of drifting apart.
|
|
8
|
+
*
|
|
9
|
+
* A horizontal scale, not padding. Percentage padding resolves against the
|
|
10
|
+
* PARENT's width, never the element's own — so `padding-inline: 18%` on a slot
|
|
11
|
+
* of a 384px bar asked for 69px of padding on each side of a 3.2px slice. The
|
|
12
|
+
* marks collapsed to zero width and the bar vanished, while flex stretched the
|
|
13
|
+
* slots to fit the padding. `scale` is one of the few things that is genuinely
|
|
14
|
+
* relative to the box itself.
|
|
15
|
+
*/
|
|
16
|
+
.lp-uptime__mark {
|
|
17
|
+
scale: 0.64 1;
|
|
18
|
+
}
|