@hero-design/rn 8.63.3 → 8.64.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.
Files changed (54) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +6 -0
  3. package/es/index.js +85 -38
  4. package/eslint.config.js +42 -0
  5. package/lib/index.js +85 -38
  6. package/package.json +7 -3
  7. package/rollup.config.js +13 -0
  8. package/sonar-project.properties +1 -1
  9. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  10. package/src/components/BottomSheet/__tests__/index.spec.tsx +17 -0
  11. package/src/components/BottomSheet/index.tsx +6 -0
  12. package/src/components/Calendar/CalendarRowItem.tsx +3 -1
  13. package/src/components/Calendar/StyledCalendar.tsx +21 -8
  14. package/src/components/Calendar/__tests__/CalendarRowItem.spec.tsx +1 -0
  15. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +4 -2
  16. package/src/components/Calendar/__tests__/index.spec.tsx +7 -1
  17. package/src/components/Calendar/index.tsx +30 -8
  18. package/src/components/DatePicker/DatePickerCalendar.tsx +14 -10
  19. package/src/components/DatePicker/DatePickerIOS.tsx +2 -0
  20. package/src/components/DatePicker/__tests__/DatePickerCalendar.spec.tsx +37 -0
  21. package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +34 -0
  22. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +5 -0
  23. package/src/components/DatePicker/types.ts +4 -0
  24. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  25. package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +45 -24
  26. package/src/components/FAB/ActionGroup/index.tsx +6 -0
  27. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +20 -0
  28. package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +28 -0
  29. package/src/components/Select/MultiSelect/index.tsx +6 -0
  30. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +15 -0
  31. package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +25 -0
  32. package/src/components/Select/SingleSelect/index.tsx +6 -0
  33. package/src/components/TimePicker/TimePickerIOS.tsx +2 -0
  34. package/src/components/TimePicker/__tests__/TimePickerIOS.spec.tsx +31 -0
  35. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +5 -0
  36. package/src/components/TimePicker/types.ts +4 -0
  37. package/src/testHelpers/utils.ts +21 -0
  38. package/stats/8.63.3/rn-stats.html +4844 -0
  39. package/stats/8.64.0/rn-stats.html +4842 -0
  40. package/types/components/BottomSheet/index.d.ts +5 -1
  41. package/types/components/Calendar/CalendarRowItem.d.ts +2 -1
  42. package/types/components/Calendar/StyledCalendar.d.ts +7 -0
  43. package/types/components/DatePicker/DatePickerCalendar.d.ts +1 -1
  44. package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
  45. package/types/components/DatePicker/types.d.ts +4 -0
  46. package/types/components/FAB/ActionGroup/index.d.ts +4 -0
  47. package/types/components/Select/MultiSelect/index.d.ts +5 -1
  48. package/types/components/Select/SingleSelect/index.d.ts +5 -1
  49. package/types/components/Select/index.d.ts +1 -1
  50. package/types/components/TimePicker/TimePickerIOS.d.ts +1 -1
  51. package/types/components/TimePicker/types.d.ts +4 -0
  52. package/types/testHelpers/utils.d.ts +1 -0
  53. package/.eslintrc.js +0 -13
  54. package/src/theme/components/.eslintrc.json +0 -10
@@ -2,4 +2,4 @@
2
2
  src/index.ts → lib/index.js, es/index.js...
3
3
  (!) 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`.
4
4
  (!) 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
5
- created lib/index.js, es/index.js in 1m 3s
5
+ created lib/index.js, es/index.js in 1m 0.7s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @hero-design/rn
2
2
 
3
+ ## 8.64.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3239](https://github.com/Thinkei/hero-design/pull/3239) [`a6dfbbed4`](https://github.com/Thinkei/hero-design/commit/a6dfbbed4670c47c54f6c6bc8489d27879bf48cf) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - Add landscape mode support for BottomSheet, DatePicker, DatePickerCalendar, FAB, Select, TimePicker
8
+
3
9
  ## 8.63.3
4
10
 
5
11
  ### Patch Changes
package/es/index.js CHANGED
@@ -9202,7 +9202,9 @@ var BottomSheet = function BottomSheet(_ref) {
9202
9202
  style = _ref.style,
9203
9203
  testID = _ref.testID,
9204
9204
  _ref$keyboardAvoiding = _ref.keyboardAvoidingViewProps,
9205
- keyboardAvoidingViewProps = _ref$keyboardAvoiding === void 0 ? {} : _ref$keyboardAvoiding;
9205
+ keyboardAvoidingViewProps = _ref$keyboardAvoiding === void 0 ? {} : _ref$keyboardAvoiding,
9206
+ _ref$supportedOrienta = _ref.supportedOrientations,
9207
+ supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta;
9206
9208
  var _Dimensions$get = Dimensions.get('window'),
9207
9209
  height = _Dimensions$get.height;
9208
9210
  // Internal state to control modal open/close timing with animation
@@ -9265,7 +9267,8 @@ var BottomSheet = function BottomSheet(_ref) {
9265
9267
  onRequestClose: onRequestClose,
9266
9268
  transparent: true,
9267
9269
  testID: testID,
9268
- onShow: onOpen
9270
+ onShow: onOpen,
9271
+ supportedOrientations: supportedOrientations
9269
9272
  }, /*#__PURE__*/React__default.createElement(StyledWrapper$9, {
9270
9273
  pointerEvents: "box-none"
9271
9274
  }, /*#__PURE__*/React__default.createElement(StyledKeyboardAvoidingView, _extends$1({
@@ -11636,9 +11639,10 @@ var StyledCalendarHeader = index$9(View)(function (_ref2) {
11636
11639
  };
11637
11640
  });
11638
11641
  var StyledCalendarDayNameCell = index$9(View)(function (_ref3) {
11639
- var theme = _ref3.theme;
11642
+ var theme = _ref3.theme,
11643
+ themeItemWidth = _ref3.themeItemWidth;
11640
11644
  return {
11641
- width: theme.__hd__.calendar.sizes.cellWidth,
11645
+ width: themeItemWidth || theme.__hd__.calendar.sizes.cellWidth,
11642
11646
  height: theme.__hd__.calendar.sizes.cellHeight,
11643
11647
  alignItems: 'center',
11644
11648
  justifyContent: 'center'
@@ -11647,7 +11651,8 @@ var StyledCalendarDayNameCell = index$9(View)(function (_ref3) {
11647
11651
  var StyledCalendarCell = index$9(TouchableOpacity)(function (_ref4) {
11648
11652
  var theme = _ref4.theme,
11649
11653
  _ref4$variant = _ref4.variant,
11650
- variant = _ref4$variant === void 0 ? 'default' : _ref4$variant;
11654
+ variant = _ref4$variant === void 0 ? 'default' : _ref4$variant,
11655
+ themeItemWidth = _ref4.themeItemWidth;
11651
11656
  return {
11652
11657
  borderColor: theme.__hd__.calendar.colors.border,
11653
11658
  borderWidth: variant === 'current' ? 1 : 0,
@@ -11655,7 +11660,7 @@ var StyledCalendarCell = index$9(TouchableOpacity)(function (_ref4) {
11655
11660
  alignItems: 'center',
11656
11661
  justifyContent: 'center',
11657
11662
  backgroundColor: variant === 'selected' ? theme.__hd__.calendar.colors.primary : undefined,
11658
- width: theme.__hd__.calendar.sizes.cellCircleWidth,
11663
+ width: themeItemWidth || theme.__hd__.calendar.sizes.cellCircleWidth,
11659
11664
  height: theme.__hd__.calendar.sizes.cellCircleHeight
11660
11665
  };
11661
11666
  });
@@ -11668,21 +11673,23 @@ var StyledCalendarRow = index$9(View)(function (_ref5) {
11668
11673
  };
11669
11674
  });
11670
11675
  var StyledCalendarRowItem = index$9(View)(function (_ref6) {
11671
- var theme = _ref6.theme;
11676
+ var theme = _ref6.theme,
11677
+ themeItemWidth = _ref6.themeItemWidth;
11672
11678
  return {
11673
11679
  flexBasis: "".concat(Math.floor(100.0 / 7.0), "%"),
11674
11680
  alignItems: 'center',
11675
- width: theme.__hd__.calendar.sizes.cellWidth,
11681
+ width: themeItemWidth || theme.__hd__.calendar.sizes.cellWidth,
11676
11682
  height: theme.__hd__.calendar.sizes.cellHeight,
11677
11683
  justifyContent: 'center'
11678
11684
  };
11679
11685
  });
11680
11686
  var StyledDisabledCalendarRowItem = index$9(View)(function (_ref7) {
11681
- var theme = _ref7.theme;
11687
+ var theme = _ref7.theme,
11688
+ themeItemWidth = _ref7.themeItemWidth;
11682
11689
  return {
11683
11690
  flexBasis: "".concat(Math.floor(100.0 / 7.0), "%"),
11684
11691
  alignItems: 'center',
11685
- width: theme.__hd__.calendar.sizes.cellWidth,
11692
+ width: themeItemWidth || theme.__hd__.calendar.sizes.cellWidth,
11686
11693
  height: theme.__hd__.calendar.sizes.cellHeight
11687
11694
  };
11688
11695
  });
@@ -11715,9 +11722,11 @@ var CalendarRowItem = function CalendarRowItem(_ref) {
11715
11722
  _ref$textIntent = _ref.textIntent,
11716
11723
  textIntent = _ref$textIntent === void 0 ? 'body' : _ref$textIntent,
11717
11724
  _ref$marked = _ref.marked,
11718
- marked = _ref$marked === void 0 ? false : _ref$marked;
11725
+ marked = _ref$marked === void 0 ? false : _ref$marked,
11726
+ itemWidth = _ref.itemWidth;
11719
11727
  return /*#__PURE__*/React__default.createElement(StyledCalendarRowItem, {
11720
- testID: "calendar-date-cell"
11728
+ testID: "calendar-date-cell",
11729
+ themeItemWidth: itemWidth
11721
11730
  }, /*#__PURE__*/React__default.createElement(StyledCalendarCell, {
11722
11731
  variant: getCellVariant(isSelected, isCurrent),
11723
11732
  onPress: onPress
@@ -11789,14 +11798,21 @@ var Calendar = function Calendar(_ref) {
11789
11798
  var parsedMaskedDate = markedDates.reduce(function (current, markedDate) {
11790
11799
  return _objectSpread2(_objectSpread2({}, current), {}, _defineProperty({}, markedDate.toDateString(), true));
11791
11800
  }, {});
11792
- var _React$useState = React__default.useState(false),
11793
- _React$useState2 = _slicedToArray(_React$useState, 2),
11794
- monthPickerVisible = _React$useState2[0],
11795
- setMonthPickerVisible = _React$useState2[1];
11796
- var _React$useState3 = React__default.useState(0),
11797
- _React$useState4 = _slicedToArray(_React$useState3, 2),
11798
- contentHeight = _React$useState4[0],
11799
- setContentHeight = _React$useState4[1];
11801
+ var _useState = useState(false),
11802
+ _useState2 = _slicedToArray(_useState, 2),
11803
+ monthPickerVisible = _useState2[0],
11804
+ setMonthPickerVisible = _useState2[1];
11805
+ var _useState3 = useState(0),
11806
+ _useState4 = _slicedToArray(_useState3, 2),
11807
+ contentHeight = _useState4[0],
11808
+ setContentHeight = _useState4[1];
11809
+ var _useState5 = useState(0),
11810
+ _useState6 = _slicedToArray(_useState5, 2),
11811
+ contentWidth = _useState6[0],
11812
+ setContentWidth = _useState6[1];
11813
+ var calendarItemWidth = useMemo(function () {
11814
+ return contentWidth > 0 ? contentWidth / 7 : undefined;
11815
+ }, [contentWidth]);
11800
11816
  var useMonthPicker = onMonthChange !== noop$1;
11801
11817
  var firstDateOfMonth = new Date(currentYear, currentMonth, 1);
11802
11818
  var lastDateOfMonth = new Date(currentYear, currentMonth + 1, 0);
@@ -11862,16 +11878,23 @@ var Calendar = function Calendar(_ref) {
11862
11878
  onChange: onMonthChange,
11863
11879
  style: {
11864
11880
  height: contentHeight + theme.__hd__.calendar.space.iosPickerMarginVertical * 2,
11865
- marginVertical: -theme.__hd__.calendar.space.iosPickerMarginVertical
11881
+ marginVertical: -theme.__hd__.calendar.space.iosPickerMarginVertical,
11882
+ width: contentWidth
11866
11883
  }
11867
11884
  })) : /*#__PURE__*/React__default.createElement(Box, {
11868
11885
  onLayout: Platform.OS === 'ios' ? function (e) {
11869
- return setContentHeight(e.nativeEvent.layout.height);
11886
+ var _e$nativeEvent$layout = e.nativeEvent.layout,
11887
+ width = _e$nativeEvent$layout.width,
11888
+ height = _e$nativeEvent$layout.height;
11889
+ setContentHeight(height);
11890
+ setContentWidth(width);
11870
11891
  } : undefined
11871
11892
  }, /*#__PURE__*/React__default.createElement(StyledCalendarRow, null, DAYS_OF_WEEK.map(function (day) {
11872
11893
  return /*#__PURE__*/React__default.createElement(StyledCalendarRowItem, {
11873
11894
  key: day
11874
- }, /*#__PURE__*/React__default.createElement(StyledCalendarDayNameCell, null, /*#__PURE__*/React__default.createElement(Typography.Body, {
11895
+ }, /*#__PURE__*/React__default.createElement(StyledCalendarDayNameCell, {
11896
+ themeItemWidth: calendarItemWidth
11897
+ }, /*#__PURE__*/React__default.createElement(Typography.Body, {
11875
11898
  variant: "small"
11876
11899
  }, day)));
11877
11900
  })), /*#__PURE__*/React__default.createElement(StyledCalendarRow, null, daysOfPreviousMonth.map(function (date) {
@@ -11884,12 +11907,15 @@ var Calendar = function Calendar(_ref) {
11884
11907
  return onChange === null || onChange === void 0 ? void 0 : onChange(date);
11885
11908
  },
11886
11909
  textIntent: "subdued",
11887
- marked: parsedMaskedDate[date.toDateString()]
11910
+ marked: parsedMaskedDate[date.toDateString()],
11911
+ itemWidth: contentWidth > 0 ? contentWidth / 7 : undefined
11888
11912
  }) : /*#__PURE__*/React__default.createElement(StyledDisabledCalendarRowItem, {
11913
+ themeItemWidth: calendarItemWidth,
11889
11914
  testID: "calendar-disabled-cell"
11890
11915
  });
11891
11916
  }), daysOfCurrentMonth.map(function (date) {
11892
11917
  return date ? /*#__PURE__*/React__default.createElement(CalendarRowItem, {
11918
+ itemWidth: calendarItemWidth,
11893
11919
  key: date.toDateString(),
11894
11920
  date: date,
11895
11921
  isCurrent: isEqDate(now, date),
@@ -11899,10 +11925,12 @@ var Calendar = function Calendar(_ref) {
11899
11925
  },
11900
11926
  marked: parsedMaskedDate[date.toDateString()]
11901
11927
  }) : /*#__PURE__*/React__default.createElement(StyledDisabledCalendarRowItem, {
11928
+ themeItemWidth: calendarItemWidth,
11902
11929
  testID: "calendar-disabled-cell"
11903
11930
  });
11904
11931
  }), daysOfNextMonth.map(function (date) {
11905
11932
  return date ? /*#__PURE__*/React__default.createElement(CalendarRowItem, {
11933
+ itemWidth: calendarItemWidth,
11906
11934
  key: date.toDateString(),
11907
11935
  date: date,
11908
11936
  isCurrent: isEqDate(now, date),
@@ -11913,6 +11941,7 @@ var Calendar = function Calendar(_ref) {
11913
11941
  textIntent: "subdued",
11914
11942
  marked: parsedMaskedDate[date.toDateString()]
11915
11943
  }) : /*#__PURE__*/React__default.createElement(StyledDisabledCalendarRowItem, {
11944
+ themeItemWidth: calendarItemWidth,
11916
11945
  testID: "calendar-disabled-cell"
11917
11946
  });
11918
11947
  })), Platform.OS === 'android' && monthPickerVisible && /*#__PURE__*/React__default.createElement(MonthYearPickerDialogueAndroid, {
@@ -13360,7 +13389,9 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
13360
13389
  style = _ref2.style,
13361
13390
  testID = _ref2.testID,
13362
13391
  monthPickerConfirmLabel = _ref2.monthPickerConfirmLabel,
13363
- monthPickerCancelLabel = _ref2.monthPickerCancelLabel;
13392
+ monthPickerCancelLabel = _ref2.monthPickerCancelLabel,
13393
+ _ref2$supportedOrient = _ref2.supportedOrientations,
13394
+ supportedOrientations = _ref2$supportedOrient === void 0 ? ['portrait'] : _ref2$supportedOrient;
13364
13395
  var _useState5 = useState(false),
13365
13396
  _useState6 = _slicedToArray(_useState5, 2),
13366
13397
  open = _useState6[0],
@@ -13415,8 +13446,9 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
13415
13446
  }
13416
13447
  setOpen(false);
13417
13448
  }
13418
- })
13419
- }, /*#__PURE__*/React__default.createElement(InternalCalendar, {
13449
+ }),
13450
+ supportedOrientations: supportedOrientations
13451
+ }, /*#__PURE__*/React__default.createElement(ScrollView, null, /*#__PURE__*/React__default.createElement(InternalCalendar, {
13420
13452
  minDate: minDate,
13421
13453
  maxDate: maxDate,
13422
13454
  value: value,
@@ -13426,7 +13458,7 @@ var DatePickerCalendar = function DatePickerCalendar(_ref2) {
13426
13458
  onToggleMonthPicker: function onToggleMonthPicker(visible) {
13427
13459
  return setMonthPickerVisible(visible);
13428
13460
  }
13429
- })));
13461
+ }))));
13430
13462
  };
13431
13463
 
13432
13464
  var StyledPickerWrapper$1 = index$9(View)(function (_ref) {
@@ -13452,7 +13484,9 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
13452
13484
  error = _ref.error,
13453
13485
  helpText = _ref.helpText,
13454
13486
  style = _ref.style,
13455
- testID = _ref.testID;
13487
+ testID = _ref.testID,
13488
+ _ref$supportedOrienta = _ref.supportedOrientations,
13489
+ supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta;
13456
13490
  var _useState = useState(getDateValue(value || new Date(), minDate, maxDate)),
13457
13491
  _useState2 = _slicedToArray(_useState, 2),
13458
13492
  selectingDate = _useState2[0],
@@ -13503,7 +13537,8 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
13503
13537
  }
13504
13538
  setOpen(false);
13505
13539
  }
13506
- })
13540
+ }),
13541
+ supportedOrientations: supportedOrientations
13507
13542
  }, /*#__PURE__*/React__default.createElement(StyledPickerWrapper$1, null, /*#__PURE__*/React__default.createElement(DateTimePicker, {
13508
13543
  testID: "datePickerIOS",
13509
13544
  value: selectingDate,
@@ -14781,7 +14816,9 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
14781
14816
  fabTitle = _ref.fabTitle,
14782
14817
  onBackdropPress = _ref.onBackdropPress,
14783
14818
  _ref$fabIcon = _ref.fabIcon,
14784
- fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon;
14819
+ fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon,
14820
+ _ref$supportedOrienta = _ref.supportedOrientations,
14821
+ supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta;
14785
14822
  useDeprecation("FAB.ActionGroup's headerTitle prop will be removed in the next major release. Please remove it.", headerTitle !== undefined);
14786
14823
  var theme = useTheme();
14787
14824
  var fabRef = useRef(null);
@@ -14837,7 +14874,8 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
14837
14874
  visible: active,
14838
14875
  animationType: "fade",
14839
14876
  transparent: true,
14840
- statusBarTranslucent: true
14877
+ statusBarTranslucent: true,
14878
+ supportedOrientations: supportedOrientations
14841
14879
  }, /*#__PURE__*/React__default.createElement(StyledContainerInModal, {
14842
14880
  testID: testID,
14843
14881
  style: [style]
@@ -16599,7 +16637,9 @@ function MultiSelect(_ref) {
16599
16637
  required = _ref.required,
16600
16638
  style = _ref.style,
16601
16639
  testID = _ref.testID,
16602
- value = _ref.value;
16640
+ value = _ref.value,
16641
+ _ref$supportedOrienta = _ref.supportedOrientations,
16642
+ supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta;
16603
16643
  var _useKeyboard = useKeyboard(),
16604
16644
  isKeyboardVisible = _useKeyboard.isKeyboardVisible,
16605
16645
  keyboardHeight = _useKeyboard.keyboardHeight;
@@ -16678,7 +16718,8 @@ function MultiSelect(_ref) {
16678
16718
  var scrollParams = getScrollParams(value === null || value === void 0 ? void 0 : value[0], sections);
16679
16719
  (_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 || _sectionListRef$curre.scrollToLocation(scrollParams);
16680
16720
  }
16681
- }
16721
+ },
16722
+ supportedOrientations: supportedOrientations
16682
16723
  }, onQueryChange && /*#__PURE__*/React__default.createElement(StyledSearchBar, null, /*#__PURE__*/React__default.createElement(TextInput, {
16683
16724
  editable: true,
16684
16725
  placeholder: "Search",
@@ -16799,7 +16840,9 @@ var SingleSelect = function SingleSelect(_ref) {
16799
16840
  required = _ref.required,
16800
16841
  style = _ref.style,
16801
16842
  testID = _ref.testID,
16802
- value = _ref.value;
16843
+ value = _ref.value,
16844
+ _ref$supportedOrienta = _ref.supportedOrientations,
16845
+ supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta;
16803
16846
  var _useKeyboard = useKeyboard(),
16804
16847
  isKeyboardVisible = _useKeyboard.isKeyboardVisible,
16805
16848
  keyboardHeight = _useKeyboard.keyboardHeight;
@@ -16853,7 +16896,8 @@ var SingleSelect = function SingleSelect(_ref) {
16853
16896
  var scrollParams = getScrollParams(value, sections);
16854
16897
  (_sectionListRef$curre = sectionListRef.current) === null || _sectionListRef$curre === void 0 || _sectionListRef$curre.scrollToLocation(scrollParams);
16855
16898
  }
16856
- }
16899
+ },
16900
+ supportedOrientations: supportedOrientations
16857
16901
  }, onQueryChange && /*#__PURE__*/React__default.createElement(StyledSearchBar, null, /*#__PURE__*/React__default.createElement(TextInput, {
16858
16902
  editable: true,
16859
16903
  placeholder: "Search",
@@ -18200,7 +18244,9 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
18200
18244
  style = _ref.style,
18201
18245
  testID = _ref.testID,
18202
18246
  _ref$showSuffix = _ref.showSuffix,
18203
- showSuffix = _ref$showSuffix === void 0 ? true : _ref$showSuffix;
18247
+ showSuffix = _ref$showSuffix === void 0 ? true : _ref$showSuffix,
18248
+ _ref$supportedOrienta = _ref.supportedOrientations,
18249
+ supportedOrientations = _ref$supportedOrienta === void 0 ? ['portrait'] : _ref$supportedOrienta;
18204
18250
  var _useState = useState(value || new Date()),
18205
18251
  _useState2 = _slicedToArray(_useState, 2),
18206
18252
  selectingDate = _useState2[0],
@@ -18246,7 +18292,8 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
18246
18292
  }
18247
18293
  setOpen(false);
18248
18294
  }
18249
- })
18295
+ }),
18296
+ supportedOrientations: supportedOrientations
18250
18297
  }, /*#__PURE__*/React__default.createElement(StyledPickerWrapper, null, /*#__PURE__*/React__default.createElement(DateTimePicker, {
18251
18298
  testID: "timePickerIOS",
18252
18299
  value: selectingDate,
@@ -0,0 +1,42 @@
1
+ const heroDesign = require('@hero-design/eslint-plugin');
2
+ const _import = require('eslint-plugin-import');
3
+ const { FlatCompat } = require('@eslint/eslintrc');
4
+ const { includeIgnoreFile } = require('@eslint/compat');
5
+ const path = require('path');
6
+
7
+ const compat = new FlatCompat({
8
+ baseDirectory: __dirname,
9
+ });
10
+
11
+ const gitignorePath = path.resolve(__dirname, '../../.gitignore');
12
+
13
+ module.exports = [
14
+ ...compat.extends('hd', 'plugin:@hero-design/recommendedRn'),
15
+ includeIgnoreFile(gitignorePath),
16
+ {
17
+ files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
18
+
19
+ plugins: {
20
+ '@hero-design': heroDesign,
21
+ import: _import,
22
+ },
23
+
24
+ languageOptions: {
25
+ parserOptions: {
26
+ tsconfigRootDir: __dirname,
27
+ project: ['./tsconfig.json'],
28
+ },
29
+ },
30
+
31
+ rules: {
32
+ 'no-underscore-dangle': [
33
+ 'error',
34
+ {
35
+ allow: ['__hd__'],
36
+ },
37
+ ],
38
+
39
+ 'import/no-cycle': 'error',
40
+ },
41
+ },
42
+ ];