From 898df27014fa4de58c327526a1056ab7b77a4772 Mon Sep 17 00:00:00 2001 From: Adam Bottega Date: Wed, 15 Jan 2025 16:51:58 +1100 Subject: [PATCH] ActionsMenu update and tags UI bug fixes (#348) * Updating ActionsMenu component and fixing Tags UI bug * 3.2.47 * Fixed a few more tags bugs --- .../ActionsMenu/ActionsMenu.animations.js | 121 +++++++++++++ .../ActionsMenu/ActionsMenu.stories.js | 2 +- lib/components/ActionsMenu/index.js | 160 +++++++++++------- lib/components/Select/index.js | 1 + lib/components/Tag/Tag.stories.js | 11 +- lib/components/Tag/index.js | 32 ++-- package-lock.json | 4 +- package.json | 2 +- 8 files changed, 246 insertions(+), 87 deletions(-) create mode 100644 lib/components/ActionsMenu/ActionsMenu.animations.js diff --git a/lib/components/ActionsMenu/ActionsMenu.animations.js b/lib/components/ActionsMenu/ActionsMenu.animations.js new file mode 100644 index 00000000..7f62a8e3 --- /dev/null +++ b/lib/components/ActionsMenu/ActionsMenu.animations.js @@ -0,0 +1,121 @@ +import { keyframes } from "styled-components"; + +export const crossFadeIn = keyframes` + 0% { + opacity: 0; + } + 75% { + opacity: 0; + } + 100% { + opacity: 1; + } +`; + +export const beforeDotCollapsing = keyframes` + 0% { + transform: translate(0, -6px); + } + 50% { + transform: translate(0, 0); + } + 100% { + transform: translate(0, 0); + } +`; + +export const beforeDotExpanding = keyframes` + 0% { + transform: translate(0, 0); + } + 50% { + transform: translate(0, 0); + } + 100% { + transform: translate(0, -6px); + } +`; + +export const afterDotCollapsing = keyframes` + 0% { + transform: translate(0, 6px); + } + 50% { + transform: translate(0, 0); + } + 100% { + transform: translate(0, 0); + } +`; + +export const afterDotExpanding = keyframes` + 0% { + transform: translate(0, 0); + } + 50% { + transform: translate(0, 0); + } + 100% { + transform: translate(0, 6px); + } +`; + +export const beforeCrossExpanding = keyframes` + 0% { + height: 4px; + transform: rotate(-45deg); + } + 50% { + height: 4px; + transform: rotate(-45deg); + } + 100% { + height: 18px; + transform: translate(0, -7px) rotate(-45deg); + } +`; + +export const beforeCrossCollapsing = keyframes` + 0% { + height: 18px; + transform: translate(0, -7px) rotate(-45deg); + } + 50% { + height: 4px; + transform: rotate(-45deg); + } + 100% { + height: 4px; + transform: rotate(-45deg); + } +`; + +export const afterCrossExpanding = keyframes` + 0% { + height: 4px; + transform: rotate(45deg); + } + 50% { + height: 4px; + transform: rotate(45deg); + } + 100% { + height: 18px; + transform: translate(0, -7px) rotate(45deg); + } +`; + +export const afterCrossCollapsing = keyframes` + 0% { + height: 18px; + transform: translate(0, -7px) rotate(45deg); + } + 50% { + height: 4px; + transform: rotate(45deg); + } + 100% { + height: 4px; + transform: rotate(45deg); + } +`; diff --git a/lib/components/ActionsMenu/ActionsMenu.stories.js b/lib/components/ActionsMenu/ActionsMenu.stories.js index b2760dd8..c5d2bce3 100644 --- a/lib/components/ActionsMenu/ActionsMenu.stories.js +++ b/lib/components/ActionsMenu/ActionsMenu.stories.js @@ -102,6 +102,7 @@ const MenuItems = React.forwardRef(({ closeMenu, reasons }, ref) => { @@ -128,7 +129,6 @@ const MenuItems = React.forwardRef(({ closeMenu, reasons }, ref) => { {showOther && (