@lyeve-labs/ui-kit 0.25.0 → 0.25.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/README.md +4 -3
- package/dist/components/Autocomplete.svelte +1 -1
- package/dist/components/DatePicker.svelte +1 -1
- package/dist/components/Drawer.svelte +2 -2
- package/dist/components/Dropdown.svelte +1 -1
- package/dist/components/Modal.svelte +2 -2
- package/dist/components/MultiSelect.svelte +1 -1
- package/dist/components/Select.svelte +1 -1
- package/dist/components/Toaster.svelte +1 -1
- package/dist/components/dialog/Dialog.svelte +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/motion.js +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -196,16 +196,17 @@ leaves through the same presets the kit's overlays use:
|
|
|
196
196
|
</script>
|
|
197
197
|
|
|
198
198
|
{#if open}
|
|
199
|
-
<div transition:motion.popover>...</div>
|
|
199
|
+
<div transition:motion.popover|global>...</div>
|
|
200
200
|
{/if}
|
|
201
201
|
|
|
202
202
|
{#each items as item (item.id)}
|
|
203
|
-
<li transition:motion.toast animate:motion.reorder>...</li>
|
|
203
|
+
<li transition:motion.toast|global animate:motion.reorder>...</li>
|
|
204
204
|
{/each}
|
|
205
205
|
```
|
|
206
206
|
|
|
207
207
|
`dialog`, `scrim`, `drawer`, `popover` and `toast` read the tokens at run
|
|
208
|
-
time
|
|
208
|
+
time; the `|global` modifier is what lets the exit play when a parent block
|
|
209
|
+
removes the surface, so keep it. They so retuning a token retunes them, and every one of them plays nothing
|
|
209
210
|
for a reader who has asked for reduced motion. Do not write `duration-150`,
|
|
210
211
|
`ease-out` or `transition-all` beside a kit class: they are a fifth speed and
|
|
211
212
|
a fourth curve, and the kit's own test suite refuses them.
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
{/if}
|
|
236
236
|
|
|
237
237
|
{#if box.open}
|
|
238
|
-
<div use:placePanel transition:motion.popover class="{PANEL_SURFACE} w-full">
|
|
238
|
+
<div use:placePanel transition:motion.popover|global class="{PANEL_SURFACE} w-full">
|
|
239
239
|
<div class={PANEL_LIST} data-panel-list use:panel {...box.listAttrs}>
|
|
240
240
|
{#each rows as option, index (option.value)}
|
|
241
241
|
{@const isSelected = option.value === value}
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
role="dialog"
|
|
255
255
|
aria-label="Choose date"
|
|
256
256
|
use:placePanel
|
|
257
|
-
transition:motion.popover
|
|
257
|
+
transition:motion.popover|global
|
|
258
258
|
class="{PANEL_SURFACE} w-68"
|
|
259
259
|
>
|
|
260
260
|
<div class="overflow-y-auto overscroll-contain p-3" data-panel-list={PANEL_LIST_UNCAPPED}>
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
aria-hidden="true"
|
|
66
66
|
class="absolute inset-0 bg-black/60 backdrop-blur-sm cursor-default"
|
|
67
67
|
onclick={close}
|
|
68
|
-
transition:motion.scrim
|
|
68
|
+
transition:motion.scrim|global
|
|
69
69
|
></button>
|
|
70
70
|
|
|
71
71
|
<div
|
|
72
72
|
use:overlay
|
|
73
|
-
transition:motion.drawer={{ side }}
|
|
73
|
+
transition:motion.drawer|global={{ side }}
|
|
74
74
|
class="relative flex h-full max-w-full flex-col {widths[size]} bg-surface shadow-2xl
|
|
75
75
|
{side === 'right' ? 'border-s' : 'border-e'} border-line"
|
|
76
76
|
role="dialog"
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
bind:this={menuEl}
|
|
257
257
|
role="menu"
|
|
258
258
|
use:placePanel
|
|
259
|
-
transition:motion.popover
|
|
259
|
+
transition:motion.popover|global
|
|
260
260
|
class="{PANEL_SURFACE} min-w-36 {align === 'right' ? 'end-0' : 'start-0'}"
|
|
261
261
|
>
|
|
262
262
|
<div class={PANEL_LIST} data-panel-list>
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
aria-hidden="true"
|
|
61
61
|
class="absolute inset-0 bg-black/60 backdrop-blur-sm cursor-default"
|
|
62
62
|
onclick={close}
|
|
63
|
-
transition:motion.scrim
|
|
63
|
+
transition:motion.scrim|global
|
|
64
64
|
></button>
|
|
65
65
|
|
|
66
66
|
<div
|
|
67
67
|
use:overlay
|
|
68
|
-
transition:motion.dialog
|
|
68
|
+
transition:motion.dialog|global
|
|
69
69
|
class="relative flex max-h-[calc(100dvh-2rem)] w-full {widths[size]} flex-col
|
|
70
70
|
overflow-hidden rounded-xl border border-line bg-surface shadow-2xl"
|
|
71
71
|
role="dialog"
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
</div>
|
|
255
255
|
|
|
256
256
|
{#if box.open}
|
|
257
|
-
<div use:placePanel transition:motion.popover class="{PANEL_SURFACE} w-full">
|
|
257
|
+
<div use:placePanel transition:motion.popover|global class="{PANEL_SURFACE} w-full">
|
|
258
258
|
{#if searchable}
|
|
259
259
|
<div class="border-b border-line p-2">
|
|
260
260
|
<input
|
|
@@ -409,7 +409,7 @@
|
|
|
409
409
|
<input type="hidden" {name} {disabled} value={value ?? ''} />
|
|
410
410
|
|
|
411
411
|
{#if box.open}
|
|
412
|
-
<div use:placePanel transition:motion.popover class="{PANEL_SURFACE} w-full">
|
|
412
|
+
<div use:placePanel transition:motion.popover|global class="{PANEL_SURFACE} w-full">
|
|
413
413
|
{#if searchable}
|
|
414
414
|
<div class="border-b border-line p-2">
|
|
415
415
|
<!--
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
>
|
|
28
28
|
{#each toast.items as t (t.id)}
|
|
29
29
|
<div
|
|
30
|
-
transition:motion.toast
|
|
30
|
+
transition:motion.toast|global
|
|
31
31
|
animate:motion.reorder
|
|
32
32
|
class="pointer-events-auto flex items-start gap-3 overflow-hidden rounded-lg border border-line
|
|
33
33
|
bg-surface ps-0 pe-3 py-3 shadow-xl"
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
<!-- Backdrop -->
|
|
94
94
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
95
95
|
<div
|
|
96
|
-
transition:motion.scrim
|
|
96
|
+
transition:motion.scrim|global
|
|
97
97
|
class="absolute inset-0 bg-black/60 backdrop-blur-sm"
|
|
98
98
|
onclick={handleBackdropClick}
|
|
99
99
|
onkeydown={(e: KeyboardEvent) => {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
<div
|
|
108
108
|
bind:this={dialogEl}
|
|
109
109
|
use:overlay
|
|
110
|
-
transition:motion.dialog
|
|
110
|
+
transition:motion.dialog|global
|
|
111
111
|
class="relative w-full {sizeClass(entry.options.size ?? 'md')} mx-4
|
|
112
112
|
bg-surface border border-line rounded-xl shadow-2xl
|
|
113
113
|
transition-transform duration-slow
|
package/dist/index.d.ts
CHANGED
|
@@ -92,4 +92,4 @@ export { cn, type ClassValue } from './utils/cn.js';
|
|
|
92
92
|
export { getTheme, getThemePreference, nextThemePreference, resolveTheme, setTheme, setThemePreference, systemTheme, themeBootScript, toggleTheme, watchSystemTheme, THEME_PREFERENCES, type Theme, type ThemePreference, } from './utils/theme.js';
|
|
93
93
|
export * as motion from './motion.js';
|
|
94
94
|
export type { Rung as MotionRung, Curve as MotionCurve } from './motion.js';
|
|
95
|
-
export declare const VERSION = "0.25.
|
|
95
|
+
export declare const VERSION = "0.25.1";
|
package/dist/index.js
CHANGED
|
@@ -102,4 +102,4 @@ export * as motion from './motion.js';
|
|
|
102
102
|
// ── Version ────────────────────────────────────────────────────────────────
|
|
103
103
|
// Generated from package.json by `pnpm version:sync`. Bump package.json, never
|
|
104
104
|
// this line; the build and the test suite fail when the two disagree.
|
|
105
|
-
export const VERSION = '0.25.
|
|
105
|
+
export const VERSION = '0.25.1';
|
package/dist/motion.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The entrances and exits, as Svelte transitions that read the motion tokens.
|
|
3
3
|
*
|
|
4
|
-
* <div
|
|
5
|
-
* <div transition:motion.popover>
|
|
4
|
+
* <div transition:motion.dialog|global>
|
|
5
|
+
* <div transition:motion.popover|global>
|
|
6
6
|
* <li animate:motion.reorder>
|
|
7
7
|
*
|
|
8
|
+
* `|global` is not optional. A Svelte transition is local by default and
|
|
9
|
+
* plays only when its own block toggles; a page that wraps a Modal in its own
|
|
10
|
+
* `{#if}` to reset the form each time removes the whole component, and a
|
|
11
|
+
* local exit never runs. Global plays it on any ancestor change.
|
|
12
|
+
*
|
|
8
13
|
* A CSS animation plays an entrance and nothing else: the element it ran on
|
|
9
14
|
* is gone the moment `{#if}` turns false, so a dialog that eased open snapped
|
|
10
15
|
* shut. A Svelte transition keeps the element until the exit has played, and
|
package/package.json
CHANGED