From 210428e8d186472910b3f8a3129af63480c162e5 Mon Sep 17 00:00:00 2001 From: mohamed Date: Wed, 11 Sep 2024 17:55:47 +0300 Subject: [PATCH 1/5] feat(TooltipV2): add isHidden prop --- .../core/tooltip-v2/tooltip-v2.component.tsx | 41 +++++++++++-------- .../src/core/tooltip-v2/tooltip-v2.props.ts | 1 + .../ui/stories/core/tooltip-v2.stories.tsx | 1 + 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx b/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx index 3befa47e..37bc8c73 100644 --- a/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx +++ b/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx @@ -14,6 +14,7 @@ const TooltipV2 = intrinsicComponent( arrow = true, warning = false, enableHover = true, + isHidden = false, enterDelay = 0, leaveDelay = 0, offsetX = 0, @@ -26,24 +27,28 @@ const TooltipV2 = intrinsicComponent( ...rest }: TooltipV2Props, ref - ): JSX.Element => ( - {title}} - interactive={enableHover} - arrow={arrow} - delay={[enterDelay, leaveDelay]} - $variant={(warning && Variant.Warning) || (info && Variant.Info) || variant} - $size={size || Size.Sm} - animation="scale" - offset={[offsetX, offsetY]} - appendTo={document.body} - {...rest} - > - {children} - - ) + ): JSX.Element => { + if (isHidden) return children; + + return ( + {title}} + interactive={enableHover} + arrow={arrow} + delay={[enterDelay, leaveDelay]} + $variant={(warning && Variant.Warning) || (info && Variant.Info) || variant} + $size={size || Size.Sm} + animation="scale" + offset={[offsetX, offsetY]} + appendTo={document.body} + {...rest} + > + {children} + + ); + } ); export default TooltipV2; diff --git a/packages/ui/src/core/tooltip-v2/tooltip-v2.props.ts b/packages/ui/src/core/tooltip-v2/tooltip-v2.props.ts index a0af7bcd..14360a9c 100644 --- a/packages/ui/src/core/tooltip-v2/tooltip-v2.props.ts +++ b/packages/ui/src/core/tooltip-v2/tooltip-v2.props.ts @@ -14,6 +14,7 @@ export interface TooltipV2Props extends Omit Date: Wed, 11 Sep 2024 17:59:42 +0300 Subject: [PATCH 2/5] feat(TooltipV2): add isHidden prop --- packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx | 4 ++-- packages/ui/src/core/tooltip-v2/tooltip-v2.props.ts | 2 +- packages/ui/stories/core/tooltip-v2.stories.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx b/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx index 37bc8c73..4b415544 100644 --- a/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx +++ b/packages/ui/src/core/tooltip-v2/tooltip-v2.component.tsx @@ -14,7 +14,7 @@ const TooltipV2 = intrinsicComponent( arrow = true, warning = false, enableHover = true, - isHidden = false, + hide = false, enterDelay = 0, leaveDelay = 0, offsetX = 0, @@ -28,7 +28,7 @@ const TooltipV2 = intrinsicComponent( }: TooltipV2Props, ref ): JSX.Element => { - if (isHidden) return children; + if (hide) return children; return ( Date: Wed, 11 Sep 2024 18:11:51 +0300 Subject: [PATCH 3/5] =?UTF-8?q?chore(release):=20publish=20new=20version?= =?UTF-8?q?=20v2.10.22=F0=9F=94=A5=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 +++++++ lerna.json | 2 +- packages/ui/CHANGELOG.md | 7 +++++++ packages/ui/package.json | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ca75935..644aef93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.10.22](https://github.com/scaleflex/ui/compare/v2.10.21...v2.10.22) (2024-09-11) + +### Features + +- **TooltipV2:** add isHidden prop ([0899c6e](https://github.com/scaleflex/ui/commit/0899c6e20bdb6c52e6fc7911298a0e2300792380)) +- **TooltipV2:** add isHidden prop ([210428e](https://github.com/scaleflex/ui/commit/210428e8d186472910b3f8a3129af63480c162e5)) + ## [2.10.21](https://github.com/scaleflex/ui/compare/v2.10.20...v2.10.21) (2024-09-10) ### Features diff --git a/lerna.json b/lerna.json index c1e812c0..2315e4ae 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.10.21", + "version": "2.10.22", "npmClient": "yarn", "packages": ["packages/*"], "ignoreChanges": ["**/*.spec.{ts,tsx}", "**/*.story.tsx"], diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index fca37a03..5f0029bf 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.10.22](https://github.com/scaleflex/ui/compare/v2.10.21...v2.10.22) (2024-09-11) + +### Features + +- **TooltipV2:** add isHidden prop ([0899c6e](https://github.com/scaleflex/ui/commit/0899c6e20bdb6c52e6fc7911298a0e2300792380)) +- **TooltipV2:** add isHidden prop ([210428e](https://github.com/scaleflex/ui/commit/210428e8d186472910b3f8a3129af63480c162e5)) + ## [2.10.21](https://github.com/scaleflex/ui/compare/v2.10.20...v2.10.21) (2024-09-10) ### Features diff --git a/packages/ui/package.json b/packages/ui/package.json index 93fc304c..16566030 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@scaleflex/ui", - "version": "2.10.21", + "version": "2.10.22", "description": "React UI components library by Scaleflex Company", "main": "lib/index.js", "scripts": { From e43f5ce18abcf43bfc8bdc32a56b329fa2f9780f Mon Sep 17 00:00:00 2001 From: mohamed Date: Wed, 11 Sep 2024 18:16:55 +0300 Subject: [PATCH 4/5] fix typo in change log --- packages/ui/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index 5f0029bf..839c678c 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -7,8 +7,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Features -- **TooltipV2:** add isHidden prop ([0899c6e](https://github.com/scaleflex/ui/commit/0899c6e20bdb6c52e6fc7911298a0e2300792380)) -- **TooltipV2:** add isHidden prop ([210428e](https://github.com/scaleflex/ui/commit/210428e8d186472910b3f8a3129af63480c162e5)) +- **TooltipV2:** add hide prop ([0899c6e](https://github.com/scaleflex/ui/commit/0899c6e20bdb6c52e6fc7911298a0e2300792380)) +- **TooltipV2:** add hide prop ([210428e](https://github.com/scaleflex/ui/commit/210428e8d186472910b3f8a3129af63480c162e5)) ## [2.10.21](https://github.com/scaleflex/ui/compare/v2.10.20...v2.10.21) (2024-09-10) From 54f88b5c18f72192e5eebef469f8ebb17950aabd Mon Sep 17 00:00:00 2001 From: mohamed Date: Wed, 11 Sep 2024 18:25:33 +0300 Subject: [PATCH 5/5] update changelog --- packages/ui/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index 839c678c..c1983e54 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -8,7 +8,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ### Features - **TooltipV2:** add hide prop ([0899c6e](https://github.com/scaleflex/ui/commit/0899c6e20bdb6c52e6fc7911298a0e2300792380)) -- **TooltipV2:** add hide prop ([210428e](https://github.com/scaleflex/ui/commit/210428e8d186472910b3f8a3129af63480c162e5)) ## [2.10.21](https://github.com/scaleflex/ui/compare/v2.10.20...v2.10.21) (2024-09-10)