paris 0.23.0 → 0.23.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # paris
2
2
 
3
+ ## 0.23.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6eafadf: Drawer: animate on first open when mounted already-open. Added `appear` to the Drawer's headlessui `Transition` so a conditionally-rendered Drawer whose first render is `show={true}` animates in instead of snapping open. Always-mounted Drawers are unaffected (they mount with `show={false}`, for which `appear` is a no-op).
8
+
3
9
  ## 0.23.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "paris",
3
3
  "author": "Sanil Chawla <sanil@slingshot.fm> (https://sanil.co)",
4
4
  "description": "Paris is Slingshot's React design system. It's a collection of reusable components, design tokens, and guidelines that help us build consistent, accessible, and performant user interfaces.",
5
- "version": "0.23.0",
5
+ "version": "0.23.1",
6
6
  "homepage": "https://paris.slingshot.fm",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -195,7 +195,13 @@ export const Drawer = <T extends string[] | readonly string[] = string[]>(props:
195
195
  }, [onAfterClose]);
196
196
 
197
197
  return (
198
- <Transition show={isOpen} afterLeave={handleAfterLeave}>
198
+ // `appear` runs the enter transition on the very first mount. Without it,
199
+ // a Drawer that is conditionally rendered and mounts already-open (i.e. its
200
+ // first render has `show={true}`) snaps straight to the open state instead of
201
+ // animating in. Always-mounted Drawers mount with `show={false}`, so `appear`
202
+ // is a no-op for them — it only adds the (desired) enter animation for the
203
+ // mount-open case.
204
+ <Transition show={isOpen} appear afterLeave={handleAfterLeave}>
199
205
  <Dialog
200
206
  as="div"
201
207
  className={clsx(styles.root, props.overrides?.dialog?.className)}