@heyramzi/ui 2.7.0 → 2.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyramzi/ui",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Svelte 5 UI for apps: primitives, effects and animations, plus tasks, charts, slides, an editor, onboarding and a canvas as subpaths.",
5
5
  "homepage": "https://ui.heyramzi.com",
6
6
  "license": "MIT",
@@ -124,7 +124,7 @@
124
124
  --shimmer-highlight: color-mix(in oklab, black 45%, var(--color-brand));
125
125
  --shimmer-band: 400%;
126
126
  --shimmer-ease: linear;
127
- --digit-dur: var(--duration-very-slow);
127
+ --digit-dur: var(--duration-slow);
128
128
  --digit-distance: var(--distance-base);
129
129
  --digit-blur: var(--blur-small);
130
130
  --digit-ease: var(--ease-smooth-out);
@@ -219,7 +219,7 @@
219
219
  transform-origin: left;
220
220
  border-radius: 9999px;
221
221
  background: var(--color-brand);
222
- transition: transform var(--duration-slow, 400ms) var(--ease-smooth-out, ease);
222
+ transition: transform var(--duration-slow, 300ms) var(--ease-smooth-out, ease);
223
223
  }
224
224
 
225
225
  /* A job with no step count still has to look like it is running, so the fill
@@ -76,7 +76,7 @@ The two merged into components are the exception — `switch.svelte` and `checkb
76
76
  Every transition reads semantic CSS variables (`--modal-open-dur`, `--tilt-follow`, `--think-swap`). Where the shared motion scale in `@heyramzi/ui/design` has a token at that exact value, the variable defaults to it and keeps the literal as the fallback:
77
77
 
78
78
  ```css
79
- --toast-open: var(--duration-medium, 350ms);
79
+ --toast-open: var(--duration-medium, 280ms);
80
80
  ```
81
81
 
82
82
  So the scale is single-sourced when the design layer is imported, and the transition still runs at the shipped value when it is not. A value the scale has no token for — a 1000ms tilt return, a 90ms reel stagger — stays a literal rather than being rounded onto the nearest rung. Override any of them at `:root` or per-scope to retune without forking the CSS.
@@ -5,7 +5,7 @@
5
5
  --tilt-perspective: 1000px;
6
6
  --tilt-return: 1000ms;
7
7
  --tilt-return-ease: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
8
- --tilt-follow: var(--duration-slow, 400ms);
8
+ --tilt-follow: var(--duration-slow, 300ms);
9
9
  --tilt-follow-ease: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
10
10
  --tilt-glare-opacity: 0.32;
11
11
  --tilt-glare-fade: 300ms;
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  :root {
10
- --digit-dur: var(--duration-very-slow, 500ms);
10
+ --digit-dur: var(--duration-slow, 300ms);
11
11
  --digit-distance: var(--distance-base, 8px);
12
12
  --digit-stagger: 70ms;
13
13
  --digit-blur: var(--blur-small, 2px);
@@ -9,8 +9,8 @@
9
9
 
10
10
  :root {
11
11
  --clear-dur: 1000ms;
12
- --clear-out-dur: var(--duration-slow, 400ms);
13
- --clear-in-dur: var(--duration-slow, 400ms);
12
+ --clear-out-dur: var(--duration-slow, 300ms);
13
+ --clear-in-dur: var(--duration-slow, 300ms);
14
14
  --clear-out-fly: 12px;
15
15
  --clear-in-fly: 12px;
16
16
  --clear-out-ease: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
@@ -3,8 +3,8 @@
3
3
  :root {
4
4
  --learn-shift: 2px;
5
5
  --learn-spread: 8deg;
6
- --learn-in: var(--duration-medium, 350ms);
7
- --learn-out: var(--duration-medium, 350ms);
6
+ --learn-in: var(--duration-medium, 280ms);
7
+ --learn-out: var(--duration-medium, 280ms);
8
8
  --learn-ease: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
9
9
  }
10
10
 
@@ -3,7 +3,7 @@
3
3
  :root {
4
4
  --like-color: #f40051;
5
5
  --like-fill: var(--duration-quick, 150ms);
6
- --like-pop: var(--duration-medium, 350ms);
6
+ --like-pop: var(--duration-medium, 280ms);
7
7
  --like-pop-ease: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
8
8
  --like-particle-dur: 600ms;
9
9
  --like-particle-dist: 20px;
@@ -1,7 +1,7 @@
1
1
  /* transitions.dev `dropdown-menu-morph`: the trigger itself becomes the menu. Set the open
2
2
  size on the consumer side, since these sizes are the upstream demo's. */
3
3
  :root {
4
- --morph-open-dur: var(--duration-medium, 350ms);
4
+ --morph-open-dur: var(--duration-medium, 280ms);
5
5
  --morph-close-dur: var(--duration-fast, 250ms);
6
6
  --morph-ease: var(--ease-smooth-out);
7
7
  --morph-close-ease: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
@@ -7,14 +7,14 @@
7
7
  */
8
8
 
9
9
  :root {
10
- --check-opacity-dur: var(--duration-very-slow, 500ms);
11
- --check-rotate-dur: var(--duration-very-slow, 500ms);
10
+ --check-opacity-dur: var(--duration-slow, 300ms);
11
+ --check-rotate-dur: var(--duration-slow, 300ms);
12
12
  --check-rotate-from: 80deg;
13
- --check-bob-dur: var(--duration-very-slow, 500ms);
13
+ --check-bob-dur: var(--duration-slow, 300ms);
14
14
  --check-y-amount: 40px;
15
- --check-blur-dur: var(--duration-very-slow, 500ms);
15
+ --check-blur-dur: var(--duration-slow, 300ms);
16
16
  --check-blur-from: 10px;
17
- --check-path-dur: var(--duration-very-slow, 500ms);
17
+ --check-path-dur: var(--duration-slow, 300ms);
18
18
  --check-path-delay: 80ms;
19
19
  --check-ease-out: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
20
20
  --check-ease-opacity: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
@@ -55,7 +55,8 @@
55
55
  transform-origin: bottom;
56
56
  animation: hr-bar-grow var(--chart-motion-reveal, 1100ms)
57
57
  var(--chart-ease-reveal, cubic-bezier(0.85, 0, 0.15, 1)) both;
58
- transition: opacity var(--chart-motion-fast, 150ms) ease-in-out;
58
+ transition: opacity var(--chart-motion-fast, 150ms)
59
+ var(--ease-in-out, cubic-bezier(0.77, 0, 0.175, 1));
59
60
  }
60
61
  .hr-bar-chart .hr-bar-bars:nth-of-type(2) {
61
62
  animation-delay: var(--chart-stagger, 30ms);
@@ -174,7 +174,8 @@
174
174
  /* bklit-ui's hover: the series drops to 0.3 and hover-focus.svelte redraws the
175
175
  stretch around the point at full strength. */
176
176
  .hr-hover-dim {
177
- transition: opacity 400ms ease-in-out;
177
+ transition: opacity var(--duration-slow, 300ms)
178
+ var(--ease-in-out, cubic-bezier(0.77, 0, 0.175, 1));
178
179
  }
179
180
  .hr-hover-dim.hr-hover-dimmed {
180
181
  opacity: 0.3;
@@ -67,7 +67,7 @@
67
67
  <style>
68
68
  /* Never `:nth-child` here: one such rule makes every DOM insert on the page restyle its later siblings. */
69
69
  :global(.t-empty) > :global(*) {
70
- animation: t-empty-in var(--duration-very-slow) var(--ease-smooth-out) both;
70
+ animation: t-empty-in var(--duration-slow) var(--ease-smooth-out) both;
71
71
  animation-delay: calc((sibling-index() - 1) * var(--duration-stagger));
72
72
  }
73
73
 
@@ -93,12 +93,13 @@
93
93
  --duration-micro: 80ms;
94
94
  --duration-quick: 150ms; /* every close, text swap, tooltip in */
95
95
  --duration-fast: 250ms; /* every open, tabs, icon swap, page slide */
96
- --duration-medium: 350ms; /* panel close, toast close */
97
- --duration-slow: 400ms; /* panel open, skeleton reveal */
98
- --duration-very-slow: 500ms; /* emphasis: badge, text reveal, success check */
96
+ --duration-medium: 280ms; /* panel close, toast close */
97
+ --duration-slow: 300ms; /* panel open, skeleton reveal, emphasis: badge, text reveal, success check. The UI ceiling. */
98
+ --duration-overlay: 500ms; /* modal, drawer, marketing explainer: the only place past 300ms */
99
+ --duration-loop: 500ms; /* one cycle of a spinner or flowing dash, not a transition */
99
100
 
100
101
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); /* all surface motion */
101
- --ease-in-out: ease-in-out; /* swaps and cross-fades */
102
+ --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* swaps, cross-fades, on-screen movement */
102
103
  --ease-out: ease-out; /* tooltips */
103
104
  --ease-linear: linear; /* shimmer, pulse, spinner */
104
105
 
@@ -147,7 +148,8 @@
147
148
  --transition-duration-fast: var(--duration-fast);
148
149
  --transition-duration-medium: var(--duration-medium);
149
150
  --transition-duration-slow: var(--duration-slow);
150
- --transition-duration-very-slow: var(--duration-very-slow);
151
+ --transition-duration-overlay: var(--duration-overlay);
152
+ --transition-duration-loop: var(--duration-loop);
151
153
  }
152
154
 
153
155
  /* Each bits-ui variant matches v2's `data-open` and v1's `data-state`, and ships
@@ -4,7 +4,7 @@
4
4
  .hr-reveal {
5
5
  --hr-reveal-name: hr-reveal-fade;
6
6
  --hr-reveal-play: paused;
7
- --hr-reveal-duration: var(--duration-slow, 400ms);
7
+ --hr-reveal-duration: var(--duration-slow, 300ms);
8
8
  --hr-reveal-ease: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
9
9
  --hr-reveal-stagger: var(--duration-stagger, 40ms);
10
10
  --hr-reveal-delay: 0ms;
@@ -10,7 +10,7 @@ export interface RevealThemeOptions {
10
10
  /** Where the wipe grows from: a click, an element, or a point in the viewport. */
11
11
  export type RevealOrigin = MouseEvent | Element | { x: number; y: number };
12
12
 
13
- const DEFAULT_DURATION = 400;
13
+ const DEFAULT_DURATION = 300;
14
14
  const STYLE_ID = "heyramzi-reveal-theme";
15
15
 
16
16
  /**
@@ -22,7 +22,11 @@ export function revealTheme(
22
22
  apply: () => void,
23
23
  options: RevealThemeOptions = {},
24
24
  ): void {
25
- const { skip = false, duration = DEFAULT_DURATION, easing = "ease-in-out" } = options;
25
+ const {
26
+ skip = false,
27
+ duration = DEFAULT_DURATION,
28
+ easing = "cubic-bezier(0.77, 0, 0.175, 1)",
29
+ } = options;
26
30
  const point = resolveOrigin(origin);
27
31
 
28
32
  const prefersReduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
@@ -28,7 +28,7 @@
28
28
  --deck-text-caption: 13px;
29
29
 
30
30
  --deck-t-slide: var(--duration-fast, 250ms);
31
- --deck-t-morph: var(--duration-slow, 400ms);
31
+ --deck-t-morph: var(--duration-slow, 300ms);
32
32
  --deck-t-quick: var(--duration-quick, 150ms);
33
33
  --deck-stagger: var(--duration-stagger, 40ms);
34
34
  --deck-ease: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
@@ -132,7 +132,7 @@
132
132
 
133
133
  /* A morph runs on the whole page, so it gets the deck's timing while it plays. */
134
134
  html[data-deck-vt] ::view-transition-group(*) {
135
- animation-duration: var(--duration-slow, 400ms);
135
+ animation-duration: var(--duration-slow, 300ms);
136
136
  animation-timing-function: var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
137
137
  }
138
138
 
@@ -153,7 +153,7 @@
153
153
 
154
154
  .sd-fill {
155
155
  transform-origin: 7px 7px;
156
- animation: sd-fill-in var(--duration-slow, 320ms) var(--ease-smooth-out, ease-out) forwards;
156
+ animation: sd-fill-in var(--duration-slow, 300ms) var(--ease-smooth-out, ease-out) forwards;
157
157
  }
158
158
 
159
159
  @keyframes sd-fill-in {
@@ -169,7 +169,7 @@
169
169
 
170
170
  .sd-pop {
171
171
  transform-origin: 7px 7px;
172
- animation: sd-pop-in var(--duration-medium, 240ms) var(--ease-smooth-out, ease-out) forwards;
172
+ animation: sd-pop-in var(--duration-medium, 280ms) var(--ease-smooth-out, ease-out) forwards;
173
173
  }
174
174
 
175
175
  @keyframes sd-pop-in {
@@ -190,7 +190,7 @@
190
190
  .sd-check {
191
191
  stroke-dasharray: 12;
192
192
  stroke-dashoffset: 12;
193
- animation: sd-trace var(--duration-medium, 240ms) var(--ease-smooth-out, ease-out)
193
+ animation: sd-trace var(--duration-medium, 280ms) var(--ease-smooth-out, ease-out)
194
194
  var(--duration-quick, 120ms) forwards;
195
195
  }
196
196
 
@@ -73,7 +73,7 @@
73
73
  <style>
74
74
  .g-today {
75
75
  transform-origin: top;
76
- animation: g-today-in var(--duration-very-slow, 500ms)
76
+ animation: g-today-in var(--duration-slow, 300ms)
77
77
  var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1)) backwards;
78
78
  }
79
79
 
@@ -89,7 +89,7 @@
89
89
  .g-arrow-line {
90
90
  stroke-dasharray: 1;
91
91
  stroke-dashoffset: 0;
92
- animation: g-draw var(--duration-very-slow, 500ms)
92
+ animation: g-draw var(--duration-slow, 300ms)
93
93
  var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1)) 300ms backwards;
94
94
  }
95
95
 
@@ -1,6 +1,6 @@
1
1
  /* Shared by the bar, the derived bar and the group summary: they all slide in the same way. */
2
2
  .g-enter {
3
- animation: g-bar-in var(--duration-slow, 400ms)
3
+ animation: g-bar-in var(--duration-slow, 300ms)
4
4
  var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1)) backwards;
5
5
  animation-delay: calc(var(--g-i, 0) * var(--duration-stagger, 40ms));
6
6
  }
@@ -93,7 +93,7 @@
93
93
  .kanban-column-expanding {
94
94
  flex: 0 0 280px;
95
95
  width: 280px;
96
- animation: column-expand var(--duration-slow, 320ms) var(--ease-smooth-out, ease-out) both;
96
+ animation: column-expand var(--duration-slow, 300ms) var(--ease-smooth-out, ease-out) both;
97
97
  }
98
98
 
99
99
  @keyframes column-expand {
@@ -408,7 +408,7 @@
408
408
  }
409
409
 
410
410
  .tl-row {
411
- animation: tl-row-in var(--duration-slow, 400ms)
411
+ animation: tl-row-in var(--duration-slow, 300ms)
412
412
  var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1)) backwards;
413
413
  animation-delay: calc(var(--tl-i, 0) * var(--duration-stagger, 40ms));
414
414
  transition: background-color var(--duration-quick, 150ms) var(--ease-smooth-out, ease-out);
@@ -65,7 +65,7 @@
65
65
  <style>
66
66
  .time-ring-arc {
67
67
  transition:
68
- stroke-dasharray var(--duration-slow, 400ms)
68
+ stroke-dasharray var(--duration-slow, 300ms)
69
69
  var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1)),
70
70
  color var(--duration-fast, 250ms) var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
71
71
  }
@@ -538,7 +538,7 @@
538
538
  }
539
539
 
540
540
  .time-segment {
541
- transition: width var(--duration-slow, 400ms)
541
+ transition: width var(--duration-slow, 300ms)
542
542
  var(--ease-smooth-out, cubic-bezier(0.22, 1, 0.36, 1));
543
543
  }
544
544
 
@@ -85,12 +85,13 @@
85
85
  --duration-micro: 80ms;
86
86
  --duration-quick: 150ms; /* every close, text swap, tooltip in */
87
87
  --duration-fast: 250ms; /* every open, tabs, icon swap, page slide */
88
- --duration-medium: 350ms; /* panel close, toast close */
89
- --duration-slow: 400ms; /* panel open, skeleton reveal */
90
- --duration-very-slow: 500ms; /* emphasis: badge, text reveal, success check */
88
+ --duration-medium: 280ms; /* panel close, toast close */
89
+ --duration-slow: 300ms; /* panel open, skeleton reveal, emphasis: badge, text reveal, success check. The UI ceiling. */
90
+ --duration-overlay: 500ms; /* modal, drawer, marketing explainer: the only place past 300ms */
91
+ --duration-loop: 500ms; /* one cycle of a spinner or flowing dash, not a transition */
91
92
 
92
93
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); /* all surface motion */
93
- --ease-in-out: ease-in-out; /* swaps and cross-fades */
94
+ --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* swaps, cross-fades, on-screen movement */
94
95
  --ease-out: ease-out; /* tooltips */
95
96
  --ease-linear: linear; /* shimmer, pulse, spinner */
96
97
 
@@ -139,5 +140,6 @@
139
140
  --transition-duration-fast: var(--duration-fast);
140
141
  --transition-duration-medium: var(--duration-medium);
141
142
  --transition-duration-slow: var(--duration-slow);
142
- --transition-duration-very-slow: var(--duration-very-slow);
143
+ --transition-duration-overlay: var(--duration-overlay);
144
+ --transition-duration-loop: var(--duration-loop);
143
145
  }