@hero-design/rn 8.91.7 → 8.91.8
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +11 -0
- package/es/index.js +19 -10
- package/lib/index.js +19 -10
- package/package.json +1 -1
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +12 -2
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +33 -15
- package/src/components/FAB/ActionGroup/index.tsx +14 -3
- package/stats/8.91.8/rn-stats.html +4842 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +6 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
[7m [0m [91m ~~~~~~~~~~~~~~~~~~~[0m
|
|
11
11
|
[39m
|
|
12
12
|
[1m[33m(!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.[39m[22m
|
|
13
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
13
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m52.7s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.91.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3725](https://github.com/Thinkei/hero-design/pull/3725) [`a3106d46950f6e5008ff8a75608a738d64e1f028`](https://github.com/Thinkei/hero-design/commit/a3106d46950f6e5008ff8a75608a738d64e1f028) Thanks [@quang-dx](https://github.com/quang-dx)! - [Icon] Add new outlined icons: desktop-computer-outlined, mobile-phone-1-outlined, tablet-outlined
|
|
8
|
+
|
|
9
|
+
- [#3722](https://github.com/Thinkei/hero-design/pull/3722) [`655027fd13f8d2008db326a81aafc946cc558a1d`](https://github.com/Thinkei/hero-design/commit/655027fd13f8d2008db326a81aafc946cc558a1d) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [FAB.ActionGroup] Update styling:
|
|
10
|
+
|
|
11
|
+
- Resolve unexpected children margin change when passing margin
|
|
12
|
+
- Update backdrop to cover full screen
|
|
13
|
+
|
|
3
14
|
## 8.91.7
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/es/index.js
CHANGED
|
@@ -9776,7 +9776,7 @@ var Divider = function Divider(_ref) {
|
|
|
9776
9776
|
}));
|
|
9777
9777
|
};
|
|
9778
9778
|
|
|
9779
|
-
var AnimatedPressable$
|
|
9779
|
+
var AnimatedPressable$1 = Animated.createAnimatedComponent(Pressable);
|
|
9780
9780
|
var AnimatedSafeAreaView = Animated.createAnimatedComponent(SafeAreaView);
|
|
9781
9781
|
var StyledWrapper$a = index$a(View)(_objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
9782
9782
|
flexDirection: 'column-reverse'
|
|
@@ -9813,7 +9813,7 @@ var StyledBottomSheet = index$a(AnimatedSafeAreaView)(function (_ref3) {
|
|
|
9813
9813
|
maxHeight: '94%'
|
|
9814
9814
|
};
|
|
9815
9815
|
});
|
|
9816
|
-
var StyledBackdrop$2 = index$a(AnimatedPressable$
|
|
9816
|
+
var StyledBackdrop$2 = index$a(AnimatedPressable$1)(function (_ref4) {
|
|
9817
9817
|
var theme = _ref4.theme;
|
|
9818
9818
|
return _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
9819
9819
|
backgroundColor: theme.__hd__.bottomSheet.colors.backdrop,
|
|
@@ -15336,7 +15336,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
15336
15336
|
}));
|
|
15337
15337
|
};
|
|
15338
15338
|
|
|
15339
|
-
var AnimatedPressable
|
|
15339
|
+
var AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
15340
15340
|
var StyledContainer$5 = index$a(View)(function (_ref) {
|
|
15341
15341
|
var theme = _ref.theme,
|
|
15342
15342
|
enableShadow = _ref.enableShadow;
|
|
@@ -15364,7 +15364,7 @@ var StyledDragableContainer = index$a(View)(function (_ref2) {
|
|
|
15364
15364
|
flexDirection: 'column-reverse'
|
|
15365
15365
|
});
|
|
15366
15366
|
});
|
|
15367
|
-
var StyledBackdrop$1 = index$a(AnimatedPressable
|
|
15367
|
+
var StyledBackdrop$1 = index$a(AnimatedPressable)(function (_ref3) {
|
|
15368
15368
|
var theme = _ref3.theme;
|
|
15369
15369
|
return _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
15370
15370
|
backgroundColor: theme.__hd__.drawer.colors.backdrop
|
|
@@ -16554,8 +16554,17 @@ var StyledFAB$1 = index$a(FAB$1)(function (_ref) {
|
|
|
16554
16554
|
alignSelf: 'flex-end'
|
|
16555
16555
|
};
|
|
16556
16556
|
});
|
|
16557
|
-
var
|
|
16558
|
-
|
|
16557
|
+
var StyledBackdropPressable = index$a(Pressable)(function () {
|
|
16558
|
+
return {
|
|
16559
|
+
position: 'absolute',
|
|
16560
|
+
left: 0,
|
|
16561
|
+
right: 0,
|
|
16562
|
+
top: 0,
|
|
16563
|
+
bottom: 0,
|
|
16564
|
+
backgroundColor: 'transparent'
|
|
16565
|
+
};
|
|
16566
|
+
});
|
|
16567
|
+
var StyledBackdrop = index$a(Box)(function (_ref2) {
|
|
16559
16568
|
var theme = _ref2.theme;
|
|
16560
16569
|
return {
|
|
16561
16570
|
position: 'absolute',
|
|
@@ -16641,19 +16650,19 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16641
16650
|
}, /*#__PURE__*/React__default.createElement(StyledContainerInModal, {
|
|
16642
16651
|
testID: testID,
|
|
16643
16652
|
style: [style]
|
|
16644
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
16653
|
+
}, /*#__PURE__*/React__default.createElement(StyledBackdropPressable, {
|
|
16645
16654
|
testID: "back-drop",
|
|
16646
16655
|
onPress: onBackdropPress
|
|
16647
|
-
}), /*#__PURE__*/React__default.createElement(StyledActionGroupContainer, {
|
|
16656
|
+
}, active && /*#__PURE__*/React__default.createElement(Portal$1, null, /*#__PURE__*/React__default.createElement(StyledBackdrop, null))), /*#__PURE__*/React__default.createElement(StyledActionGroupContainer, {
|
|
16648
16657
|
testID: "action-group",
|
|
16649
16658
|
pointerEvents: "box-none",
|
|
16650
16659
|
style: {
|
|
16651
16660
|
opacity: actionGroupOpacity
|
|
16652
16661
|
}
|
|
16653
16662
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
16654
|
-
style:
|
|
16663
|
+
style: {
|
|
16655
16664
|
paddingBottom: 0
|
|
16656
|
-
}
|
|
16665
|
+
}
|
|
16657
16666
|
}, items === null || items === void 0 ? void 0 : items.map(function (itemProp, index) {
|
|
16658
16667
|
return /*#__PURE__*/React__default.createElement(ActionItem, _extends$1({
|
|
16659
16668
|
key: itemProp.key || "".concat(itemProp.icon, "_").concat(itemProp.title)
|
package/lib/index.js
CHANGED
|
@@ -9804,7 +9804,7 @@ var Divider = function Divider(_ref) {
|
|
|
9804
9804
|
}));
|
|
9805
9805
|
};
|
|
9806
9806
|
|
|
9807
|
-
var AnimatedPressable$
|
|
9807
|
+
var AnimatedPressable$1 = reactNative.Animated.createAnimatedComponent(reactNative.Pressable);
|
|
9808
9808
|
var AnimatedSafeAreaView = reactNative.Animated.createAnimatedComponent(reactNative.SafeAreaView);
|
|
9809
9809
|
var StyledWrapper$a = index$a(reactNative.View)(_objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
9810
9810
|
flexDirection: 'column-reverse'
|
|
@@ -9841,7 +9841,7 @@ var StyledBottomSheet = index$a(AnimatedSafeAreaView)(function (_ref3) {
|
|
|
9841
9841
|
maxHeight: '94%'
|
|
9842
9842
|
};
|
|
9843
9843
|
});
|
|
9844
|
-
var StyledBackdrop$2 = index$a(AnimatedPressable$
|
|
9844
|
+
var StyledBackdrop$2 = index$a(AnimatedPressable$1)(function (_ref4) {
|
|
9845
9845
|
var theme = _ref4.theme;
|
|
9846
9846
|
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
9847
9847
|
backgroundColor: theme.__hd__.bottomSheet.colors.backdrop,
|
|
@@ -15364,7 +15364,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
15364
15364
|
}));
|
|
15365
15365
|
};
|
|
15366
15366
|
|
|
15367
|
-
var AnimatedPressable
|
|
15367
|
+
var AnimatedPressable = reactNative.Animated.createAnimatedComponent(reactNative.Pressable);
|
|
15368
15368
|
var StyledContainer$5 = index$a(reactNative.View)(function (_ref) {
|
|
15369
15369
|
var theme = _ref.theme,
|
|
15370
15370
|
enableShadow = _ref.enableShadow;
|
|
@@ -15392,7 +15392,7 @@ var StyledDragableContainer = index$a(reactNative.View)(function (_ref2) {
|
|
|
15392
15392
|
flexDirection: 'column-reverse'
|
|
15393
15393
|
});
|
|
15394
15394
|
});
|
|
15395
|
-
var StyledBackdrop$1 = index$a(AnimatedPressable
|
|
15395
|
+
var StyledBackdrop$1 = index$a(AnimatedPressable)(function (_ref3) {
|
|
15396
15396
|
var theme = _ref3.theme;
|
|
15397
15397
|
return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
15398
15398
|
backgroundColor: theme.__hd__.drawer.colors.backdrop
|
|
@@ -16582,8 +16582,17 @@ var StyledFAB$1 = index$a(FAB$1)(function (_ref) {
|
|
|
16582
16582
|
alignSelf: 'flex-end'
|
|
16583
16583
|
};
|
|
16584
16584
|
});
|
|
16585
|
-
var
|
|
16586
|
-
|
|
16585
|
+
var StyledBackdropPressable = index$a(reactNative.Pressable)(function () {
|
|
16586
|
+
return {
|
|
16587
|
+
position: 'absolute',
|
|
16588
|
+
left: 0,
|
|
16589
|
+
right: 0,
|
|
16590
|
+
top: 0,
|
|
16591
|
+
bottom: 0,
|
|
16592
|
+
backgroundColor: 'transparent'
|
|
16593
|
+
};
|
|
16594
|
+
});
|
|
16595
|
+
var StyledBackdrop = index$a(Box)(function (_ref2) {
|
|
16587
16596
|
var theme = _ref2.theme;
|
|
16588
16597
|
return {
|
|
16589
16598
|
position: 'absolute',
|
|
@@ -16669,19 +16678,19 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
16669
16678
|
}, /*#__PURE__*/React__namespace.default.createElement(StyledContainerInModal, {
|
|
16670
16679
|
testID: testID,
|
|
16671
16680
|
style: [style]
|
|
16672
|
-
}, /*#__PURE__*/React__namespace.default.createElement(
|
|
16681
|
+
}, /*#__PURE__*/React__namespace.default.createElement(StyledBackdropPressable, {
|
|
16673
16682
|
testID: "back-drop",
|
|
16674
16683
|
onPress: onBackdropPress
|
|
16675
|
-
}), /*#__PURE__*/React__namespace.default.createElement(StyledActionGroupContainer, {
|
|
16684
|
+
}, active && /*#__PURE__*/React__namespace.default.createElement(Portal$1, null, /*#__PURE__*/React__namespace.default.createElement(StyledBackdrop, null))), /*#__PURE__*/React__namespace.default.createElement(StyledActionGroupContainer, {
|
|
16676
16685
|
testID: "action-group",
|
|
16677
16686
|
pointerEvents: "box-none",
|
|
16678
16687
|
style: {
|
|
16679
16688
|
opacity: actionGroupOpacity
|
|
16680
16689
|
}
|
|
16681
16690
|
}, /*#__PURE__*/React__namespace.default.createElement(Box, {
|
|
16682
|
-
style:
|
|
16691
|
+
style: {
|
|
16683
16692
|
paddingBottom: 0
|
|
16684
|
-
}
|
|
16693
|
+
}
|
|
16685
16694
|
}, items === null || items === void 0 ? void 0 : items.map(function (itemProp, index) {
|
|
16686
16695
|
return /*#__PURE__*/React__namespace.default.createElement(ActionItem, _extends$1({
|
|
16687
16696
|
key: itemProp.key || "".concat(itemProp.icon, "_").concat(itemProp.title)
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import styled from '@emotion/native';
|
|
|
3
3
|
import type { ComponentProps } from 'react';
|
|
4
4
|
import type { ViewProps } from 'react-native';
|
|
5
5
|
import FAB from '../FAB';
|
|
6
|
+
import Box from '../../Box';
|
|
6
7
|
|
|
7
8
|
const StyledContainer = styled(View)<ViewProps>({
|
|
8
9
|
position: 'absolute',
|
|
@@ -38,8 +39,16 @@ const StyledFAB = styled(FAB)(({ theme }) => ({
|
|
|
38
39
|
alignSelf: 'flex-end',
|
|
39
40
|
}));
|
|
40
41
|
|
|
41
|
-
const
|
|
42
|
-
|
|
42
|
+
const StyledBackdropPressable = styled(Pressable)(() => ({
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
left: 0,
|
|
45
|
+
right: 0,
|
|
46
|
+
top: 0,
|
|
47
|
+
bottom: 0,
|
|
48
|
+
backgroundColor: 'transparent',
|
|
49
|
+
}));
|
|
50
|
+
|
|
51
|
+
const StyledBackdrop = styled(Box)(({ theme }) => ({
|
|
43
52
|
position: 'absolute',
|
|
44
53
|
left: 0,
|
|
45
54
|
right: 0,
|
|
@@ -52,6 +61,7 @@ const StyledBackdrop = styled(AnimatedPressable)(({ theme }) => ({
|
|
|
52
61
|
export {
|
|
53
62
|
StyledActionGroupContainer,
|
|
54
63
|
StyledBackdrop,
|
|
64
|
+
StyledBackdropPressable,
|
|
55
65
|
StyledContainer,
|
|
56
66
|
StyledContainerInModal,
|
|
57
67
|
StyledFAB,
|
|
@@ -408,15 +408,17 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
408
408
|
onResponderTerminationRequest={[Function]}
|
|
409
409
|
onStartShouldSetResponder={[Function]}
|
|
410
410
|
style={
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
411
|
+
[
|
|
412
|
+
{
|
|
413
|
+
"backgroundColor": "transparent",
|
|
414
|
+
"bottom": 0,
|
|
415
|
+
"left": 0,
|
|
416
|
+
"position": "absolute",
|
|
417
|
+
"right": 0,
|
|
418
|
+
"top": 0,
|
|
419
|
+
},
|
|
420
|
+
undefined,
|
|
421
|
+
]
|
|
420
422
|
}
|
|
421
423
|
testID="back-drop"
|
|
422
424
|
/>
|
|
@@ -437,12 +439,9 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
437
439
|
style={
|
|
438
440
|
[
|
|
439
441
|
{},
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
"paddingBottom": 0,
|
|
444
|
-
},
|
|
445
|
-
],
|
|
442
|
+
{
|
|
443
|
+
"paddingBottom": 0,
|
|
444
|
+
},
|
|
446
445
|
]
|
|
447
446
|
}
|
|
448
447
|
>
|
|
@@ -1171,6 +1170,25 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
1171
1170
|
</View>
|
|
1172
1171
|
</Modal>
|
|
1173
1172
|
</View>
|
|
1173
|
+
<View
|
|
1174
|
+
style={
|
|
1175
|
+
[
|
|
1176
|
+
{},
|
|
1177
|
+
[
|
|
1178
|
+
{
|
|
1179
|
+
"backgroundColor": "#000000",
|
|
1180
|
+
"bottom": 0,
|
|
1181
|
+
"left": 0,
|
|
1182
|
+
"opacity": 0.4,
|
|
1183
|
+
"position": "absolute",
|
|
1184
|
+
"right": 0,
|
|
1185
|
+
"top": 0,
|
|
1186
|
+
},
|
|
1187
|
+
undefined,
|
|
1188
|
+
],
|
|
1189
|
+
]
|
|
1190
|
+
}
|
|
1191
|
+
/>
|
|
1174
1192
|
<View
|
|
1175
1193
|
pointerEvents="box-none"
|
|
1176
1194
|
position="bottom"
|
|
@@ -7,11 +7,12 @@ import ActionItem from './ActionItem';
|
|
|
7
7
|
import {
|
|
8
8
|
StyledActionGroupContainer,
|
|
9
9
|
StyledBackdrop,
|
|
10
|
+
StyledBackdropPressable,
|
|
10
11
|
StyledContainer,
|
|
11
12
|
StyledContainerInModal,
|
|
12
13
|
StyledFAB,
|
|
13
14
|
} from './StyledActionGroup';
|
|
14
|
-
|
|
15
|
+
import Portal from '../../Portal';
|
|
15
16
|
import Box from '../../Box';
|
|
16
17
|
import { FABHandles } from '../FAB';
|
|
17
18
|
import { useDeprecation } from '../../../utils/hooks';
|
|
@@ -151,7 +152,17 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
|
|
|
151
152
|
supportedOrientations={supportedOrientations}
|
|
152
153
|
>
|
|
153
154
|
<StyledContainerInModal testID={testID} style={[style]}>
|
|
154
|
-
<
|
|
155
|
+
<StyledBackdropPressable
|
|
156
|
+
testID="back-drop"
|
|
157
|
+
onPress={onBackdropPress}
|
|
158
|
+
>
|
|
159
|
+
{active && (
|
|
160
|
+
<Portal>
|
|
161
|
+
<StyledBackdrop />
|
|
162
|
+
</Portal>
|
|
163
|
+
)}
|
|
164
|
+
</StyledBackdropPressable>
|
|
165
|
+
|
|
155
166
|
<StyledActionGroupContainer
|
|
156
167
|
testID="action-group"
|
|
157
168
|
pointerEvents="box-none"
|
|
@@ -159,7 +170,7 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
|
|
|
159
170
|
opacity: actionGroupOpacity,
|
|
160
171
|
}}
|
|
161
172
|
>
|
|
162
|
-
<Box style={
|
|
173
|
+
<Box style={{ paddingBottom: 0 }}>
|
|
163
174
|
{items?.map((itemProp, index) => (
|
|
164
175
|
<ActionItem
|
|
165
176
|
key={itemProp.key || `${itemProp.icon}_${itemProp.title}`}
|