@hero-design/rn 8.35.0-alpha.3 → 8.35.0-alpha.4

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/es/index.js CHANGED
@@ -13874,8 +13874,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13874
13874
  testID = _ref.testID,
13875
13875
  fabTitle = _ref.fabTitle,
13876
13876
  _ref$fabIcon = _ref.fabIcon,
13877
- fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon,
13878
- portalName = _ref.portalName;
13877
+ fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon;
13879
13878
  var fabRef = useRef(null);
13880
13879
  var tranlateXAnimation = useRef(new Animated.Value(active ? 1 : 0));
13881
13880
  var titleTranslateYValue = React.useRef(new Animated.Value(0));
@@ -13916,10 +13915,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13916
13915
  inputRange: [0, 1],
13917
13916
  outputRange: [0, 1]
13918
13917
  });
13919
- var Wrapper = portalName ? Portal : React.Fragment;
13920
- return /*#__PURE__*/React.createElement(Wrapper, {
13921
- name: portalName
13922
- }, /*#__PURE__*/React.createElement(StyledContainer$2, {
13918
+ return /*#__PURE__*/React.createElement(StyledContainer$2, {
13923
13919
  testID: testID,
13924
13920
  pointerEvents: "box-none",
13925
13921
  style: style
@@ -13955,9 +13951,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13955
13951
  index: active ? index : items.length - index,
13956
13952
  active: active
13957
13953
  }));
13958
- }))), /*#__PURE__*/React.createElement(Portal, {
13959
- hostName: "CustomPortalHost"
13960
- }, /*#__PURE__*/React.createElement(StyledFAB, {
13954
+ }))), /*#__PURE__*/React.createElement(StyledFAB, {
13961
13955
  testID: "fab",
13962
13956
  icon: fabIcon,
13963
13957
  onPress: onPress,
@@ -13965,7 +13959,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13965
13959
  active: active,
13966
13960
  title: fabTitle,
13967
13961
  ref: fabRef
13968
- }))));
13962
+ }));
13969
13963
  });
13970
13964
  ActionGroup.displayName = 'FAB.ActionGroup';
13971
13965
 
package/lib/index.js CHANGED
@@ -13905,8 +13905,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13905
13905
  testID = _ref.testID,
13906
13906
  fabTitle = _ref.fabTitle,
13907
13907
  _ref$fabIcon = _ref.fabIcon,
13908
- fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon,
13909
- portalName = _ref.portalName;
13908
+ fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon;
13910
13909
  var fabRef = React.useRef(null);
13911
13910
  var tranlateXAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
13912
13911
  var titleTranslateYValue = React__default["default"].useRef(new reactNative.Animated.Value(0));
@@ -13947,10 +13946,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13947
13946
  inputRange: [0, 1],
13948
13947
  outputRange: [0, 1]
13949
13948
  });
13950
- var Wrapper = portalName ? Portal : React__default["default"].Fragment;
13951
- return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
13952
- name: portalName
13953
- }, /*#__PURE__*/React__default["default"].createElement(StyledContainer$2, {
13949
+ return /*#__PURE__*/React__default["default"].createElement(StyledContainer$2, {
13954
13950
  testID: testID,
13955
13951
  pointerEvents: "box-none",
13956
13952
  style: style
@@ -13986,9 +13982,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13986
13982
  index: active ? index : items.length - index,
13987
13983
  active: active
13988
13984
  }));
13989
- }))), /*#__PURE__*/React__default["default"].createElement(Portal, {
13990
- hostName: "CustomPortalHost"
13991
- }, /*#__PURE__*/React__default["default"].createElement(StyledFAB, {
13985
+ }))), /*#__PURE__*/React__default["default"].createElement(StyledFAB, {
13992
13986
  testID: "fab",
13993
13987
  icon: fabIcon,
13994
13988
  onPress: onPress,
@@ -13996,7 +13990,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13996
13990
  active: active,
13997
13991
  title: fabTitle,
13998
13992
  ref: fabRef
13999
- }))));
13993
+ }));
14000
13994
  });
14001
13995
  ActionGroup.displayName = 'FAB.ActionGroup';
14002
13996
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.35.0-alpha.3",
3
+ "version": "8.35.0-alpha.4",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -14,7 +14,6 @@ import {
14
14
 
15
15
  import Box from '../../Box';
16
16
  import { FABHandles } from '../FAB';
17
- import { Portal } from '@gorhom/portal';
18
17
 
19
18
  export type ActionGroupHandles = {
20
19
  showFAB: () => void;
@@ -62,7 +61,6 @@ export interface ActionGroupProps {
62
61
  * Testing id of the component.
63
62
  */
64
63
  testID?: string;
65
- portalName?: string;
66
64
  }
67
65
 
68
66
  const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
@@ -76,7 +74,6 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
76
74
  testID,
77
75
  fabTitle,
78
76
  fabIcon = 'add',
79
- portalName,
80
77
  },
81
78
  ref
82
79
  ) => {
@@ -126,57 +123,52 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
126
123
  outputRange: [0, 1],
127
124
  });
128
125
 
129
- const Wrapper = portalName ? Portal : React.Fragment;
130
126
  return (
131
- <Wrapper name={portalName}>
132
- <StyledContainer testID={testID} pointerEvents="box-none" style={style}>
133
- <StyledBackdrop
134
- pointerEvents={active ? 'auto' : 'box-none'}
135
- testID="back-drop"
136
- style={{ opacity: interpolatedBackdropOpacityAnimation }}
137
- />
138
- <StyledActionGroupContainer
139
- pointerEvents={active ? 'auto' : 'none'}
140
- testID="action-group"
141
- style={{
142
- opacity: interpolatedActionGroupOpacityAnimation,
143
- }}
144
- >
145
- {!!headerTitle && (
146
- <Animated.View
147
- style={{ transform: [{ translateY: titleTranslateY }] }}
148
- >
149
- <StyledHeaderText testID="header-text" level="h4">
150
- {headerTitle}
151
- </StyledHeaderText>
152
- </Animated.View>
153
- )}
154
-
155
- <Box style={[style, { paddingBottom: 0 }]}>
156
- {items?.map((itemProp, index) => (
157
- <ActionItem
158
- key={itemProp.key || `${itemProp.icon}_${itemProp.title}`}
159
- {...itemProp}
160
- index={active ? index : items.length - index}
161
- active={active}
162
- />
163
- ))}
164
- </Box>
165
- </StyledActionGroupContainer>
166
-
167
- <Portal hostName="CustomPortalHost">
168
- <StyledFAB
169
- testID="fab"
170
- icon={fabIcon}
171
- onPress={onPress}
172
- animated
173
- active={active}
174
- title={fabTitle}
175
- ref={fabRef}
176
- />
177
- </Portal>
178
- </StyledContainer>
179
- </Wrapper>
127
+ <StyledContainer testID={testID} pointerEvents="box-none" style={style}>
128
+ <StyledBackdrop
129
+ pointerEvents={active ? 'auto' : 'box-none'}
130
+ testID="back-drop"
131
+ style={{ opacity: interpolatedBackdropOpacityAnimation }}
132
+ />
133
+ <StyledActionGroupContainer
134
+ pointerEvents={active ? 'auto' : 'none'}
135
+ testID="action-group"
136
+ style={{
137
+ opacity: interpolatedActionGroupOpacityAnimation,
138
+ }}
139
+ >
140
+ {!!headerTitle && (
141
+ <Animated.View
142
+ style={{ transform: [{ translateY: titleTranslateY }] }}
143
+ >
144
+ <StyledHeaderText testID="header-text" level="h4">
145
+ {headerTitle}
146
+ </StyledHeaderText>
147
+ </Animated.View>
148
+ )}
149
+
150
+ <Box style={[style, { paddingBottom: 0 }]}>
151
+ {items?.map((itemProp, index) => (
152
+ <ActionItem
153
+ key={itemProp.key || `${itemProp.icon}_${itemProp.title}`}
154
+ {...itemProp}
155
+ index={active ? index : items.length - index}
156
+ active={active}
157
+ />
158
+ ))}
159
+ </Box>
160
+ </StyledActionGroupContainer>
161
+
162
+ <StyledFAB
163
+ testID="fab"
164
+ icon={fabIcon}
165
+ onPress={onPress}
166
+ animated
167
+ active={active}
168
+ title={fabTitle}
169
+ ref={fabRef}
170
+ />
171
+ </StyledContainer>
180
172
  );
181
173
  }
182
174
  );
@@ -40,7 +40,6 @@ export interface ActionGroupProps {
40
40
  * Testing id of the component.
41
41
  */
42
42
  testID?: string;
43
- portalName?: string;
44
43
  }
45
44
  declare const ActionGroup: React.ForwardRefExoticComponent<ActionGroupProps & React.RefAttributes<ActionGroupHandles>>;
46
45
  export default ActionGroup;