Skip to content

Commit

Permalink
Merge pull request #2574 from gluestack/release/@gluestack-ui/popover…
Browse files Browse the repository at this point in the history
…@0.1.41

Release/@gluestack UI/[email protected]
  • Loading branch information
Viraj-10 authored Nov 8, 2024
2 parents 73f32dc + 74b9604 commit 1c9a5a6
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion example/storybook-nativewind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@gluestack-style/animation-resolver": "^1.0.4",
"@gluestack-style/react": "^1.0.57",
"@gluestack-ui/config": "^1.1.19",
"@gluestack-ui/themed": "^1.1.58",
"@gluestack-ui/themed": "^1.1.59",
"@gluestack/design-system": "^0.5.36",
"@gorhom/bottom-sheet": "^5.0.0-alpha.10",
"@legendapp/motion": "^2.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@gluestack-ui/menu": "0.2.36",
"@gluestack-ui/modal": "0.1.34",
"@gluestack-ui/overlay": "0.1.15",
"@gluestack-ui/popover": "0.1.40",
"@gluestack-ui/popover": "0.1.41",
"@gluestack-ui/pressable": "0.1.16",
"@gluestack-ui/progress": "0.1.17",
"@gluestack-ui/provider": "0.1.12",
Expand All @@ -66,14 +66,14 @@
"@gluestack-ui/switch": "0.1.22",
"@gluestack-ui/tabs": "0.1.17",
"@gluestack-ui/textarea": "0.1.23",
"@gluestack-ui/themed": "1.1.58",
"@gluestack-ui/themed": "1.1.59",
"@gluestack-ui/toast": "1.0.7",
"@gluestack-ui/tooltip": "0.1.34",
"@legendapp/motion": "latest"
},
"peerDependencies": {
"@gluestack-style/react": ">=1.0.57",
"@gluestack-ui/themed": ">=1.1.58"
"@gluestack-ui/themed": ">=1.1.59"
},
"release-it": {
"git": {
Expand Down
7 changes: 7 additions & 0 deletions packages/themed/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @gluestack-ui/themed

## 1.1.59

### Patch Changes

- Updated dependencies
- @gluestack-ui/popover@0.1.41

## 1.1.58

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/themed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gluestack-ui/themed",
"version": "1.1.58",
"version": "1.1.59",
"main": "build/index.js",
"types": "build/index.d.ts",
"module": "build/index",
Expand Down Expand Up @@ -54,7 +54,7 @@
"@gluestack-ui/menu": "0.2.36",
"@gluestack-ui/modal": "0.1.34",
"@gluestack-ui/overlay": "0.1.15",
"@gluestack-ui/popover": "0.1.40",
"@gluestack-ui/popover": "0.1.41",
"@gluestack-ui/pressable": "0.1.16",
"@gluestack-ui/progress": "0.1.17",
"@gluestack-ui/provider": "0.1.12",
Expand Down
6 changes: 6 additions & 0 deletions packages/unstyled/popover/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @gluestack-ui/popover

## 0.1.41

### Patch Changes

- fix: popover error issue

## 0.1.40

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/unstyled/popover/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gluestack-ui/popover",
"version": "0.1.40",
"version": "0.1.41",
"main": "lib/commonjs/index",
"module": "lib/module/index",
"types": "lib/typescript/index.d.ts",
Expand Down
23 changes: 5 additions & 18 deletions packages/unstyled/popover/src/PopoverArrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,6 @@ const PopoverArrow = (StyledPopoverArrow: any) =>
});
}, [arrowHeight, arrowWidth, placement, actualPlacement]);

const ArrowStyle = React.useMemo(() => {
return {
top: arrowProps?.style?.top - arrowHeight / 2,
left: arrowProps?.style?.left - arrowWidth / 2,
};
}, [
arrowHeight,
arrowWidth,
arrowProps?.style?.top,
arrowProps?.style?.left,
]);

React.useEffect(() => {
const ArrowComponent = (
<StyledPopoverArrow
Expand All @@ -48,7 +36,6 @@ const PopoverArrow = (StyledPopoverArrow: any) =>
updateArrowSize({ height, width });
}}
{...props}
{...ArrowStyle}
key={actualPlacement + 'arrow'}
initial={{
opacity: 0,
Expand Down Expand Up @@ -78,15 +65,15 @@ const PopoverArrow = (StyledPopoverArrow: any) =>
}}
style={[
props?.style,
ArrowStyle,
arrowProps?.style,
{
// To avoid border radius case
top:
placement === 'right bottom' || placement === 'left bottom'
? ArrowStyle?.top > 4
? ArrowStyle?.top - 4
: ArrowStyle?.top
: ArrowStyle?.top,
? arrowProps?.style?.top > 4
? arrowProps?.style?.top - 4
: arrowProps?.style?.top
: arrowProps?.style?.top,
},
additionalStyles,
]}
Expand Down

0 comments on commit 1c9a5a6

Please sign in to comment.