@hero-design/rn 8.78.1 → 8.79.0
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 +2 -2
- package/CHANGELOG.md +6 -0
- package/es/index.js +14 -4
- package/lib/index.js +14 -4
- package/package.json +1 -1
- package/src/components/BottomSheet/index.tsx +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +1729 -0
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +35 -0
- package/src/components/Select/MultiSelect/index.tsx +5 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +1617 -0
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +33 -0
- package/src/components/Select/SingleSelect/index.tsx +5 -1
- package/src/components/Select/types.ts +8 -0
- package/stats/8.79.0/rn-stats.html +4844 -0
- package/types/components/BottomSheet/index.d.ts +1 -1
- package/types/components/Select/MultiSelect/index.d.ts +1 -1
- package/types/components/Select/SingleSelect/index.d.ts +1 -1
- package/types/components/Select/index.d.ts +1 -1
- package/types/components/Select/types.d.ts +8 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(node:
|
|
1
|
+
(node:2821) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
2
2
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
3
|
[36m
|
|
4
4
|
[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
5
5
|
[1m[33m(!) [plugin replace] @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
6
6
|
[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
|
|
7
|
-
[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
7
|
+
[32mcreated [1mlib/index.js, es/index.js[22m in [1m50s[22m[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @hero-design/rn
|
|
2
2
|
|
|
3
|
+
## 8.79.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#3489](https://github.com/Thinkei/hero-design/pull/3489) [`94719952550e8923edd82d6d236c366e4d220c44`](https://github.com/Thinkei/hero-design/commit/94719952550e8923edd82d6d236c366e4d220c44) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Select] Support custom BottomSheet config
|
|
8
|
+
|
|
3
9
|
## 8.78.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/es/index.js
CHANGED
|
@@ -17431,7 +17431,9 @@ function MultiSelect(_ref) {
|
|
|
17431
17431
|
testID = _ref.testID,
|
|
17432
17432
|
value = _ref.value,
|
|
17433
17433
|
_ref$supportedOrienta = _ref.supportedOrientations,
|
|
17434
|
-
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta
|
|
17434
|
+
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta,
|
|
17435
|
+
_ref$bottomSheetConfi = _ref.bottomSheetConfig,
|
|
17436
|
+
bottomSheetConfig = _ref$bottomSheetConfi === void 0 ? {} : _ref$bottomSheetConfi;
|
|
17435
17437
|
var _useKeyboard = useKeyboard(),
|
|
17436
17438
|
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
17437
17439
|
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
@@ -17452,6 +17454,8 @@ function MultiSelect(_ref) {
|
|
|
17452
17454
|
return opt.text;
|
|
17453
17455
|
}).join(', ');
|
|
17454
17456
|
var rawValue = value.length > 0 ? value.join(', ') : '';
|
|
17457
|
+
var bottomSheetVariant = bottomSheetConfig.variant,
|
|
17458
|
+
bottomSheetHeader = bottomSheetConfig.header;
|
|
17455
17459
|
useEffect(function () {
|
|
17456
17460
|
setSelectingValue(value);
|
|
17457
17461
|
}, [open, value]);
|
|
@@ -17479,12 +17483,13 @@ function MultiSelect(_ref) {
|
|
|
17479
17483
|
return renderSelectedValue(value, props);
|
|
17480
17484
|
} : undefined
|
|
17481
17485
|
}))))), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
|
|
17486
|
+
variant: bottomSheetVariant || 'fixed',
|
|
17482
17487
|
open: open,
|
|
17483
17488
|
onRequestClose: function onRequestClose() {
|
|
17484
17489
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
17485
17490
|
setOpen(false);
|
|
17486
17491
|
},
|
|
17487
|
-
header: label,
|
|
17492
|
+
header: bottomSheetHeader || label,
|
|
17488
17493
|
style: {
|
|
17489
17494
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
17490
17495
|
},
|
|
@@ -17634,7 +17639,9 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
17634
17639
|
testID = _ref.testID,
|
|
17635
17640
|
value = _ref.value,
|
|
17636
17641
|
_ref$supportedOrienta = _ref.supportedOrientations,
|
|
17637
|
-
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta
|
|
17642
|
+
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta,
|
|
17643
|
+
_ref$bottomSheetConfi = _ref.bottomSheetConfig,
|
|
17644
|
+
bottomSheetConfig = _ref$bottomSheetConfi === void 0 ? {} : _ref$bottomSheetConfi;
|
|
17638
17645
|
var _useKeyboard = useKeyboard(),
|
|
17639
17646
|
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
17640
17647
|
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
@@ -17649,6 +17656,8 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
17649
17656
|
return value === opt.value;
|
|
17650
17657
|
})) === null || _flatOptions$find === void 0 ? void 0 : _flatOptions$find.text;
|
|
17651
17658
|
var rawValue = value ? String(value) : undefined;
|
|
17659
|
+
var bottomSheetVariant = bottomSheetConfig.variant,
|
|
17660
|
+
bottomSheetHeader = bottomSheetConfig.header;
|
|
17652
17661
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(View, {
|
|
17653
17662
|
pointerEvents: !editable || disabled || inputProps !== null && inputProps !== void 0 && inputProps.loading ? 'none' : 'auto'
|
|
17654
17663
|
}, /*#__PURE__*/React__default.createElement(TouchableOpacity, {
|
|
@@ -17673,12 +17682,13 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
17673
17682
|
return renderSelectedValue(value, props);
|
|
17674
17683
|
} : undefined
|
|
17675
17684
|
}))))), /*#__PURE__*/React__default.createElement(BottomSheet$1, {
|
|
17685
|
+
variant: bottomSheetVariant || 'fixed',
|
|
17676
17686
|
open: open,
|
|
17677
17687
|
onRequestClose: function onRequestClose() {
|
|
17678
17688
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
17679
17689
|
setOpen(false);
|
|
17680
17690
|
},
|
|
17681
|
-
header: label,
|
|
17691
|
+
header: bottomSheetHeader || label,
|
|
17682
17692
|
style: {
|
|
17683
17693
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
17684
17694
|
},
|
package/lib/index.js
CHANGED
|
@@ -17458,7 +17458,9 @@ function MultiSelect(_ref) {
|
|
|
17458
17458
|
testID = _ref.testID,
|
|
17459
17459
|
value = _ref.value,
|
|
17460
17460
|
_ref$supportedOrienta = _ref.supportedOrientations,
|
|
17461
|
-
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta
|
|
17461
|
+
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta,
|
|
17462
|
+
_ref$bottomSheetConfi = _ref.bottomSheetConfig,
|
|
17463
|
+
bottomSheetConfig = _ref$bottomSheetConfi === void 0 ? {} : _ref$bottomSheetConfi;
|
|
17462
17464
|
var _useKeyboard = useKeyboard(),
|
|
17463
17465
|
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
17464
17466
|
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
@@ -17479,6 +17481,8 @@ function MultiSelect(_ref) {
|
|
|
17479
17481
|
return opt.text;
|
|
17480
17482
|
}).join(', ');
|
|
17481
17483
|
var rawValue = value.length > 0 ? value.join(', ') : '';
|
|
17484
|
+
var bottomSheetVariant = bottomSheetConfig.variant,
|
|
17485
|
+
bottomSheetHeader = bottomSheetConfig.header;
|
|
17482
17486
|
React.useEffect(function () {
|
|
17483
17487
|
setSelectingValue(value);
|
|
17484
17488
|
}, [open, value]);
|
|
@@ -17506,12 +17510,13 @@ function MultiSelect(_ref) {
|
|
|
17506
17510
|
return renderSelectedValue(value, props);
|
|
17507
17511
|
} : undefined
|
|
17508
17512
|
}))))), /*#__PURE__*/React__namespace.default.createElement(BottomSheet$1, {
|
|
17513
|
+
variant: bottomSheetVariant || 'fixed',
|
|
17509
17514
|
open: open,
|
|
17510
17515
|
onRequestClose: function onRequestClose() {
|
|
17511
17516
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
17512
17517
|
setOpen(false);
|
|
17513
17518
|
},
|
|
17514
|
-
header: label,
|
|
17519
|
+
header: bottomSheetHeader || label,
|
|
17515
17520
|
style: {
|
|
17516
17521
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
17517
17522
|
},
|
|
@@ -17661,7 +17666,9 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
17661
17666
|
testID = _ref.testID,
|
|
17662
17667
|
value = _ref.value,
|
|
17663
17668
|
_ref$supportedOrienta = _ref.supportedOrientations,
|
|
17664
|
-
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta
|
|
17669
|
+
supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta,
|
|
17670
|
+
_ref$bottomSheetConfi = _ref.bottomSheetConfig,
|
|
17671
|
+
bottomSheetConfig = _ref$bottomSheetConfi === void 0 ? {} : _ref$bottomSheetConfi;
|
|
17665
17672
|
var _useKeyboard = useKeyboard(),
|
|
17666
17673
|
isKeyboardVisible = _useKeyboard.isKeyboardVisible,
|
|
17667
17674
|
keyboardHeight = _useKeyboard.keyboardHeight;
|
|
@@ -17676,6 +17683,8 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
17676
17683
|
return value === opt.value;
|
|
17677
17684
|
})) === null || _flatOptions$find === void 0 ? void 0 : _flatOptions$find.text;
|
|
17678
17685
|
var rawValue = value ? String(value) : undefined;
|
|
17686
|
+
var bottomSheetVariant = bottomSheetConfig.variant,
|
|
17687
|
+
bottomSheetHeader = bottomSheetConfig.header;
|
|
17679
17688
|
return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
|
|
17680
17689
|
pointerEvents: !editable || disabled || inputProps !== null && inputProps !== void 0 && inputProps.loading ? 'none' : 'auto'
|
|
17681
17690
|
}, /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableOpacity, {
|
|
@@ -17700,12 +17709,13 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
17700
17709
|
return renderSelectedValue(value, props);
|
|
17701
17710
|
} : undefined
|
|
17702
17711
|
}))))), /*#__PURE__*/React__namespace.default.createElement(BottomSheet$1, {
|
|
17712
|
+
variant: bottomSheetVariant || 'fixed',
|
|
17703
17713
|
open: open,
|
|
17704
17714
|
onRequestClose: function onRequestClose() {
|
|
17705
17715
|
onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
17706
17716
|
setOpen(false);
|
|
17707
17717
|
},
|
|
17708
|
-
header: label,
|
|
17718
|
+
header: bottomSheetHeader || label,
|
|
17709
17719
|
style: {
|
|
17710
17720
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0
|
|
17711
17721
|
},
|
package/package.json
CHANGED