-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add in/out transition props to components (#67)
- Loading branch information
Showing
79 changed files
with
1,576 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"bits-ui": patch | ||
--- | ||
|
||
Feat: Improve transition props to support `in` and `out` transitions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,4 +85,5 @@ | |
"svelte": "^4.0.0" | ||
}, | ||
"packageManager": "pnpm@8.6.3" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,18 @@ | ||
diff --git a/dist/builders/dialog/create.js b/dist/builders/dialog/create.js | ||
index 13cf6ab7c4ee392ae7530813b6f5a3edc2819628..d42908e0e139327970718e5c32731b3d0cc09de5 100644 | ||
--- a/dist/builders/dialog/create.js | ||
+++ b/dist/builders/dialog/create.js | ||
@@ -38,13 +38,15 @@ export function createDialog(props) { | ||
activeTrigger.set(triggerEl); | ||
} | ||
function handleClose() { | ||
- open.set(false); | ||
- const triggerEl = document.getElementById(ids.trigger); | ||
- if (triggerEl) { | ||
- tick().then(() => { | ||
- triggerEl.focus(); | ||
- }); | ||
- } | ||
+ tick().then(() => { | ||
+ open.set(false); | ||
+ const triggerEl = document.getElementById(ids.trigger); | ||
+ if (triggerEl) { | ||
+ tick().then(() => { | ||
+ triggerEl.focus(); | ||
+ }); | ||
+ } | ||
+ }) | ||
} | ||
onMount(() => { | ||
activeTrigger.set(document.getElementById(ids.trigger)); | ||
diff --git a/dist/internal/helpers/overridable.js b/dist/internal/helpers/overridable.js | ||
index 4bfd74ec7fc838dbce59491c37180f9a3cd798c2..a92e724ef14e9148e5bdf40c1e5a1e5817d61ed7 100644 | ||
--- a/dist/internal/helpers/overridable.js | ||
+++ b/dist/internal/helpers/overridable.js | ||
@@ -1,10 +1,10 @@ | ||
-export const overridable = (store, onChange) => { | ||
+export const overridable = async (store, onChange) => { | ||
const update = (updater, sideEffect) => { | ||
- store.update((curr) => { | ||
+ store.update(async (curr) => { | ||
const next = updater(curr); | ||
let res = next; | ||
if (onChange) { | ||
- res = onChange({ curr, next }); | ||
+ res = await onChange({ curr, next }); | ||
} | ||
sideEffect?.(res); | ||
return res; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.