paris 0.17.9 → 0.17.10

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.17.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 24b86aa: fix(menu): Replace external Transition wrapper with built-in transition prop on MenuItems to fix TypeError crash during unmount
8
+
3
9
  ## 0.17.9
4
10
 
5
11
  ### Patch 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.17.9",
5
+ "version": "0.17.10",
6
6
  "homepage": "https://paris.slingshot.fm",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -20,6 +20,15 @@
20
20
 
21
21
  overflow: hidden;
22
22
  z-index: 100;
23
+
24
+ transition: var(--pte-animations-interaction);
25
+ opacity: 1;
26
+ transform: translateY(0);
27
+
28
+ &[data-closed] {
29
+ opacity: 0;
30
+ transform: translateY(-8px);
31
+ }
23
32
  }
24
33
 
25
34
  .leftPosition {
@@ -3,12 +3,11 @@ import type {
3
3
  MenuProps, MenuItemsProps, MenuItemProps, MenuButtonProps,
4
4
  } from '@headlessui/react';
5
5
  import {
6
- Menu as HeadlessMenu, MenuButton as HMenuButton, MenuItems as HMenuItems, MenuItem as HMenuItem, Transition,
6
+ Menu as HeadlessMenu, MenuButton as HMenuButton, MenuItems as HMenuItems, MenuItem as HMenuItem,
7
7
  } from '@headlessui/react';
8
8
  import { clsx } from 'clsx';
9
9
 
10
10
  import styles from './Menu.module.scss';
11
- import dropdownStyles from '../utility/Dropdown.module.scss';
12
11
 
13
12
  /**
14
13
  * Wraps the `HeadlessMenu` component from `@headlessui/react` to provide a styled dropdown menu.
@@ -56,20 +55,13 @@ export const MenuItems: FC<MenuItemsProps<React.ElementType> & {
56
55
  }> = ({
57
56
  className, children, position = 'left', ...props
58
57
  }) => (
59
- <Transition
60
- as="div"
61
- className={dropdownStyles.transitionContainer}
62
- enter={dropdownStyles.transition}
63
- enterFrom={dropdownStyles.enterFrom}
64
- enterTo={dropdownStyles.enterTo}
65
- leave={dropdownStyles.transition}
66
- leaveFrom={dropdownStyles.leaveFrom}
67
- leaveTo={dropdownStyles.leaveTo}
58
+ <HMenuItems
59
+ transition
60
+ className={clsx(styles.menuItems, position === 'left' && styles.leftPosition, position === 'right' && styles.rightPosition, className)}
61
+ {...props}
68
62
  >
69
- <HMenuItems className={clsx(styles.menuItems, position === 'left' && styles.leftPosition, position === 'right' && styles.rightPosition, className)} {...props}>
70
- {children}
71
- </HMenuItems>
72
- </Transition>
63
+ {children}
64
+ </HMenuItems>
73
65
  );
74
66
 
75
67
  /**