react-native-system-ui 1.0.0 → 1.0.2

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 (210) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/components/action-sheet/ActionSheet.js +51 -53
  3. package/dist/cjs/components/area/Area.js +22 -22
  4. package/dist/cjs/components/avatar/Avatar.js +23 -23
  5. package/dist/cjs/components/badge/Badge.js +56 -61
  6. package/dist/cjs/components/button/Button.js +87 -92
  7. package/dist/cjs/components/button/ButtonGroup.js +4 -4
  8. package/dist/cjs/components/calendar/Calendar.js +28 -28
  9. package/dist/cjs/components/cascader/Cascader.js +206 -212
  10. package/dist/cjs/components/cell/Cell.js +54 -51
  11. package/dist/cjs/components/cell/CellGroup.js +26 -25
  12. package/dist/cjs/components/checkbox/Checkbox.js +1 -0
  13. package/dist/cjs/components/checkbox/CheckboxGroup.js +20 -19
  14. package/dist/cjs/components/circle/Circle.js +66 -54
  15. package/dist/cjs/components/collapse/Collapse.js +18 -18
  16. package/dist/cjs/components/config-provider/ConfigProvider.js +5 -5
  17. package/dist/cjs/components/count-down/CountDown.js +17 -17
  18. package/dist/cjs/components/datetime-picker/DatetimePicker.js +34 -35
  19. package/dist/cjs/components/dialog/Dialog.js +16 -10
  20. package/dist/cjs/components/dialog/imperative.js +8 -14
  21. package/dist/cjs/components/dialog/tokens.js +1 -0
  22. package/dist/cjs/components/divider/Divider.js +48 -51
  23. package/dist/cjs/components/empty/Empty.js +30 -25
  24. package/dist/cjs/components/error-boundary/ErrorBoundary.js +3 -2
  25. package/dist/cjs/components/flex/Flex.js +27 -27
  26. package/dist/cjs/components/flex/FlexItem.js +1 -0
  27. package/dist/cjs/components/form/Form.js +94 -93
  28. package/dist/cjs/components/form/FormItem.js +60 -54
  29. package/dist/cjs/components/form/FormList.js +35 -35
  30. package/dist/cjs/components/grid/Grid.js +48 -48
  31. package/dist/cjs/components/grid/GridItem.js +9 -2
  32. package/dist/cjs/components/image/Image.js +25 -24
  33. package/dist/cjs/components/image/tokens.js +3 -1
  34. package/dist/cjs/components/image-preview/ImagePreview.js +38 -28
  35. package/dist/cjs/components/image-preview/tokens.js +3 -1
  36. package/dist/cjs/components/input/Input.js +16 -19
  37. package/dist/cjs/components/loading/Loading.js +27 -27
  38. package/dist/cjs/components/nav-bar/NavBar.js +21 -18
  39. package/dist/cjs/components/nav-bar/tokens.js +3 -1
  40. package/dist/cjs/components/notice-bar/NoticeBar.js +7 -3
  41. package/dist/cjs/components/notice-bar/tokens.js +3 -1
  42. package/dist/cjs/components/notify/Notify.js +2 -1
  43. package/dist/cjs/components/notify/imperative.js +17 -17
  44. package/dist/cjs/components/notify/tokens.js +1 -0
  45. package/dist/cjs/components/number-keyboard/NumberKeyboard.js +217 -201
  46. package/dist/cjs/components/number-keyboard/tokens.js +7 -1
  47. package/dist/cjs/components/overlay/Overlay.js +15 -15
  48. package/dist/cjs/components/password-input/PasswordInput.js +49 -49
  49. package/dist/cjs/components/picker/Picker.js +50 -58
  50. package/dist/cjs/components/popup/Popup.js +10 -10
  51. package/dist/cjs/components/popup/tokens.js +1 -0
  52. package/dist/cjs/components/portal/Portal.js +3 -4
  53. package/dist/cjs/components/progress/Progress.js +94 -95
  54. package/dist/cjs/components/progress/tokens.js +1 -0
  55. package/dist/cjs/components/radio/Radio.js +67 -63
  56. package/dist/cjs/components/radio/RadioGroup.js +6 -6
  57. package/dist/cjs/components/safe-area-view/SafeAreaView.js +7 -7
  58. package/dist/cjs/components/search/Search.js +28 -28
  59. package/dist/cjs/components/selector/Selector.js +19 -26
  60. package/dist/cjs/components/share-sheet/ShareSheet.js +8 -2
  61. package/dist/cjs/components/share-sheet/tokens.js +3 -1
  62. package/dist/cjs/components/sidebar/Sidebar.js +22 -16
  63. package/dist/cjs/components/sidebar/SidebarItem.js +9 -8
  64. package/dist/cjs/components/sidebar/tokens.js +3 -1
  65. package/dist/cjs/components/skeleton/Skeleton.js +43 -42
  66. package/dist/cjs/components/slider/Slider.js +1 -1
  67. package/dist/cjs/components/space/Space.js +45 -41
  68. package/dist/cjs/components/space/tokens.js +7 -1
  69. package/dist/cjs/components/stepper/Stepper.js +17 -15
  70. package/dist/cjs/components/stepper/tokens.js +1 -0
  71. package/dist/cjs/components/swiper/Swiper.js +10 -7
  72. package/dist/cjs/components/swiper/SwiperPagIndicator.js +3 -2
  73. package/dist/cjs/components/switch/Switch.js +23 -23
  74. package/dist/cjs/components/tabbar/Tabbar.js +26 -26
  75. package/dist/cjs/components/tabbar/TabbarItem.js +6 -0
  76. package/dist/cjs/components/tabs/Tabs.js +143 -153
  77. package/dist/cjs/components/tabs/tokens.js +3 -1
  78. package/dist/cjs/components/tag/Tag.js +38 -38
  79. package/dist/cjs/components/toast/Toast.js +7 -3
  80. package/dist/cjs/components/toast/tokens.js +1 -0
  81. package/dist/cjs/components/typography/Typography.js +23 -21
  82. package/dist/cjs/components/water-mark/WaterMark.js +65 -65
  83. package/dist/cjs/design-system/Text.js +38 -0
  84. package/dist/cjs/design-system/createComponentTokensHook.js +2 -2
  85. package/dist/cjs/design-system/index.js +7 -0
  86. package/dist/cjs/design-system/mergeTokensOverride.js +1 -4
  87. package/dist/cjs/hooks/useControllableValue.js +11 -11
  88. package/dist/cjs/hooks/useCountDown.js +18 -18
  89. package/dist/cjs/platform/measure.js +4 -2
  90. package/dist/cjs/utils/color.js +2 -7
  91. package/dist/cjs/utils/compare.js +3 -3
  92. package/dist/cjs/utils/date.js +2 -2
  93. package/dist/cjs/utils/deepMerge.js +5 -5
  94. package/dist/cjs/utils/hairline.js +1 -0
  95. package/dist/cjs/utils/render.js +2 -8
  96. package/dist/cjs/utils/validate.js +2 -4
  97. package/dist/es/components/action-sheet/ActionSheet.js +51 -53
  98. package/dist/es/components/area/Area.js +22 -22
  99. package/dist/es/components/avatar/Avatar.js +23 -23
  100. package/dist/es/components/badge/Badge.js +56 -61
  101. package/dist/es/components/button/Button.js +87 -92
  102. package/dist/es/components/button/ButtonGroup.js +4 -4
  103. package/dist/es/components/calendar/Calendar.js +28 -28
  104. package/dist/es/components/cascader/Cascader.js +206 -212
  105. package/dist/es/components/cell/Cell.js +55 -52
  106. package/dist/es/components/cell/CellGroup.js +26 -25
  107. package/dist/es/components/checkbox/Checkbox.js +1 -0
  108. package/dist/es/components/checkbox/CheckboxGroup.js +20 -19
  109. package/dist/es/components/circle/Circle.js +66 -54
  110. package/dist/es/components/collapse/Collapse.js +18 -18
  111. package/dist/es/components/config-provider/ConfigProvider.js +5 -5
  112. package/dist/es/components/count-down/CountDown.js +17 -17
  113. package/dist/es/components/datetime-picker/DatetimePicker.js +34 -35
  114. package/dist/es/components/dialog/Dialog.js +16 -10
  115. package/dist/es/components/dialog/imperative.js +8 -14
  116. package/dist/es/components/dialog/tokens.js +1 -0
  117. package/dist/es/components/divider/Divider.js +48 -51
  118. package/dist/es/components/empty/Empty.js +30 -25
  119. package/dist/es/components/error-boundary/ErrorBoundary.js +3 -2
  120. package/dist/es/components/flex/Flex.js +27 -27
  121. package/dist/es/components/flex/FlexItem.js +1 -0
  122. package/dist/es/components/form/Form.js +95 -94
  123. package/dist/es/components/form/FormItem.js +60 -54
  124. package/dist/es/components/form/FormList.js +35 -35
  125. package/dist/es/components/grid/Grid.js +48 -48
  126. package/dist/es/components/grid/GridItem.js +10 -3
  127. package/dist/es/components/image/Image.js +25 -24
  128. package/dist/es/components/image/tokens.js +3 -1
  129. package/dist/es/components/image-preview/ImagePreview.js +39 -29
  130. package/dist/es/components/image-preview/tokens.js +3 -1
  131. package/dist/es/components/input/Input.js +16 -19
  132. package/dist/es/components/loading/Loading.js +27 -27
  133. package/dist/es/components/nav-bar/NavBar.js +21 -18
  134. package/dist/es/components/nav-bar/tokens.js +3 -1
  135. package/dist/es/components/notice-bar/NoticeBar.js +7 -3
  136. package/dist/es/components/notice-bar/tokens.js +3 -1
  137. package/dist/es/components/notify/Notify.js +2 -1
  138. package/dist/es/components/notify/imperative.js +17 -17
  139. package/dist/es/components/notify/tokens.js +1 -0
  140. package/dist/es/components/number-keyboard/NumberKeyboard.js +217 -201
  141. package/dist/es/components/number-keyboard/tokens.js +7 -1
  142. package/dist/es/components/overlay/Overlay.js +15 -15
  143. package/dist/es/components/password-input/PasswordInput.js +49 -49
  144. package/dist/es/components/picker/Picker.js +50 -58
  145. package/dist/es/components/popup/Popup.js +10 -10
  146. package/dist/es/components/popup/tokens.js +1 -0
  147. package/dist/es/components/portal/Portal.js +3 -4
  148. package/dist/es/components/progress/Progress.js +94 -95
  149. package/dist/es/components/progress/tokens.js +1 -0
  150. package/dist/es/components/radio/Radio.js +67 -63
  151. package/dist/es/components/radio/RadioGroup.js +6 -6
  152. package/dist/es/components/safe-area-view/SafeAreaView.js +7 -7
  153. package/dist/es/components/search/Search.js +28 -28
  154. package/dist/es/components/selector/Selector.js +19 -26
  155. package/dist/es/components/share-sheet/ShareSheet.js +8 -2
  156. package/dist/es/components/share-sheet/tokens.js +3 -1
  157. package/dist/es/components/sidebar/Sidebar.js +22 -16
  158. package/dist/es/components/sidebar/SidebarItem.js +9 -8
  159. package/dist/es/components/sidebar/tokens.js +3 -1
  160. package/dist/es/components/skeleton/Skeleton.js +43 -42
  161. package/dist/es/components/slider/Slider.js +3 -3
  162. package/dist/es/components/space/Space.js +45 -41
  163. package/dist/es/components/space/tokens.js +7 -1
  164. package/dist/es/components/stepper/Stepper.js +17 -15
  165. package/dist/es/components/stepper/tokens.js +1 -0
  166. package/dist/es/components/swiper/Swiper.js +11 -8
  167. package/dist/es/components/swiper/SwiperPagIndicator.js +3 -2
  168. package/dist/es/components/switch/Switch.js +23 -23
  169. package/dist/es/components/tabbar/Tabbar.js +26 -26
  170. package/dist/es/components/tabbar/TabbarItem.js +6 -0
  171. package/dist/es/components/tabs/Tabs.js +144 -154
  172. package/dist/es/components/tabs/tokens.js +3 -1
  173. package/dist/es/components/tag/Tag.js +38 -38
  174. package/dist/es/components/toast/Toast.js +7 -3
  175. package/dist/es/components/toast/tokens.js +1 -0
  176. package/dist/es/components/typography/Typography.js +23 -21
  177. package/dist/es/components/water-mark/WaterMark.js +65 -65
  178. package/dist/es/design-system/Text.js +19 -0
  179. package/dist/es/design-system/createComponentTokensHook.js +2 -2
  180. package/dist/es/design-system/index.js +1 -0
  181. package/dist/es/design-system/mergeTokensOverride.js +1 -4
  182. package/dist/es/hooks/useControllableValue.js +11 -11
  183. package/dist/es/hooks/useCountDown.js +18 -18
  184. package/dist/es/platform/measure.js +4 -2
  185. package/dist/es/utils/color.js +1 -4
  186. package/dist/es/utils/compare.js +3 -3
  187. package/dist/es/utils/date.js +2 -2
  188. package/dist/es/utils/deepMerge.js +5 -5
  189. package/dist/es/utils/hairline.js +1 -0
  190. package/dist/es/utils/render.js +1 -1
  191. package/dist/es/utils/validate.js +1 -2
  192. package/dist/types/components/dialog/tokens.d.ts +1 -0
  193. package/dist/types/components/image-preview/tokens.d.ts +1 -0
  194. package/dist/types/components/nav-bar/tokens.d.ts +1 -1
  195. package/dist/types/components/notice-bar/tokens.d.ts +1 -0
  196. package/dist/types/components/number-keyboard/tokens.d.ts +5 -0
  197. package/dist/types/components/picker/Picker.d.ts +1 -1
  198. package/dist/types/components/popup/tokens.d.ts +1 -0
  199. package/dist/types/components/share-sheet/tokens.d.ts +1 -0
  200. package/dist/types/components/stepper/tokens.d.ts +1 -0
  201. package/dist/types/components/tabs/tokens.d.ts +1 -0
  202. package/dist/types/components/toast/tokens.d.ts +1 -0
  203. package/dist/types/design-system/Text.d.ts +3 -0
  204. package/dist/types/design-system/index.d.ts +1 -0
  205. package/dist/types/hooks/useCountDown.d.ts +1 -1
  206. package/dist/types/utils/color.d.ts +0 -2
  207. package/dist/types/utils/date.d.ts +1 -1
  208. package/dist/types/utils/render.d.ts +1 -1
  209. package/dist/types/utils/validate.d.ts +0 -1
  210. package/package.json +17 -3
@@ -30,15 +30,15 @@ const ConfigProviderBase = ({
30
30
  children
31
31
  }) => {
32
32
  const ctxLocale = (0, _react().useContext)(_LocaleContext.LocaleContext);
33
- const ctxDirection = (0, _react().useContext)(_DirectionContext.DirectionContext);
34
- const resolvedLocale = locale ?? ctxLocale;
35
- const resolvedDirection = direction ?? ctxDirection ?? (_reactNative().I18nManager.isRTL ? 'rtl' : 'ltr');
33
+ const ctxDir = (0, _react().useContext)(_DirectionContext.DirectionContext);
34
+ const rLocale = locale ?? ctxLocale;
35
+ const rDir = direction ?? ctxDir ?? (_reactNative().I18nManager.isRTL ? 'rtl' : 'ltr');
36
36
  return /*#__PURE__*/_react().default.createElement(_ThemeProvider.ThemeProvider, {
37
37
  value: theme
38
38
  }, /*#__PURE__*/_react().default.createElement(_DirectionContext.DirectionContext.Provider, {
39
- value: resolvedDirection
39
+ value: rDir
40
40
  }, /*#__PURE__*/_react().default.createElement(_LocaleContext.LocaleContext.Provider, {
41
- value: resolvedLocale
41
+ value: rLocale
42
42
  }, /*#__PURE__*/_react().default.createElement(_portal.PortalHost, null, children))));
43
43
  };
44
44
  const ConfigProvider = exports.ConfigProvider = /*#__PURE__*/_react().default.memo(ConfigProviderBase);
@@ -27,10 +27,10 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
27
27
  const CountDownImpl = (props, ref) => {
28
28
  const {
29
29
  tokensOverride,
30
- autoStart: autoStartProp,
31
- millisecond: millisecondProp,
32
- time: timeProp,
33
- format: formatProp,
30
+ autoStart: autoStartP,
31
+ millisecond: msP,
32
+ time: timeP,
33
+ format: fmtP,
34
34
  children,
35
35
  onChange,
36
36
  onFinish,
@@ -38,32 +38,32 @@ const CountDownImpl = (props, ref) => {
38
38
  ...rest
39
39
  } = props;
40
40
  const tokens = (0, _tokens.useCountDownTokens)(tokensOverride);
41
- const autoStart = autoStartProp ?? tokens.defaults.autoStart;
42
- const millisecond = millisecondProp ?? tokens.defaults.millisecond;
43
- const time = timeProp ?? tokens.defaults.time;
44
- const format = formatProp ?? tokens.defaults.format;
45
- const normalizedTime = Math.max(0, Number(time) || 0);
41
+ const autoStart = autoStartP ?? tokens.defaults.autoStart;
42
+ const millisecond = msP ?? tokens.defaults.millisecond;
43
+ const time = timeP ?? tokens.defaults.time;
44
+ const format = fmtP ?? tokens.defaults.format;
45
+ const normTime = Math.max(0, Number(time) || 0);
46
46
  const {
47
47
  start,
48
48
  pause,
49
49
  reset,
50
50
  current
51
51
  } = (0, _hooks.useCountDown)({
52
- time: normalizedTime,
52
+ time: normTime,
53
53
  millisecond,
54
54
  onChange,
55
55
  onFinish
56
56
  });
57
57
  const resetTimer = (0, _react().useCallback)(() => {
58
- reset(normalizedTime);
59
- if (autoStart && normalizedTime > 0) start();
60
- }, [autoStart, normalizedTime, reset, start]);
58
+ reset(normTime);
59
+ if (autoStart && normTime > 0) start();
60
+ }, [autoStart, normTime, reset, start]);
61
61
  (0, _react().useEffect)(() => {
62
62
  resetTimer();
63
63
  return () => {
64
64
  pause();
65
65
  };
66
- }, [autoStart, normalizedTime, pause, reset, start]);
66
+ }, [autoStart, normTime, pause, reset, start]);
67
67
  (0, _react().useImperativeHandle)(ref, () => ({
68
68
  start,
69
69
  pause,
@@ -71,13 +71,13 @@ const CountDownImpl = (props, ref) => {
71
71
  }));
72
72
  const content = (0, _utils.isFunction)(children) ? children(current) : (0, _utils.formatDuration)(format, current);
73
73
  const contentNode = (0, _utils.renderTextOrNode)(content, tokens.layout.text);
74
- const accessibilityLabel = (0, _validate.isText)(content) ? String(content) : `${current.hours}h ${current.minutes}m ${current.seconds}s`;
74
+ const accLabel = (0, _validate.isText)(content) ? String(content) : `${current.hours}h ${current.minutes}m ${current.seconds}s`;
75
75
  return /*#__PURE__*/_react().default.createElement(_reactNative().View, _extends({
76
76
  accessibilityRole: "timer",
77
77
  accessibilityLiveRegion: "polite",
78
- accessibilityLabel: accessibilityLabel,
78
+ accessibilityLabel: accLabel,
79
79
  accessibilityValue: {
80
- text: accessibilityLabel
80
+ text: accLabel
81
81
  },
82
82
  style: style
83
83
  }, rest), contentNode);
@@ -32,16 +32,13 @@ const DatetimePickerImpl = props => {
32
32
  trigger: 'onPopupVisibleChange'
33
33
  });
34
34
  const handleClose = (0, _react().useCallback)(() => setPopupVisible(false), [setPopupVisible]);
35
- const renderPopup = (0, _react().useCallback)((node, popup, popupProps) => {
36
- if (!popup) return node;
37
- return /*#__PURE__*/_react().default.createElement(_Popup.Popup, _extends({
38
- visible: popupVisible,
39
- onClose: handleClose,
40
- placement: tokens.defaults.popupPlacement,
41
- round: tokens.defaults.popupRound,
42
- safeAreaInsetBottom: tokens.defaults.popupSafeAreaInsetBottom
43
- }, popupProps), node);
44
- }, [handleClose, popupVisible, tokens.defaults.popupPlacement, tokens.defaults.popupRound, tokens.defaults.popupSafeAreaInsetBottom]);
35
+ const renderPopup = (0, _react().useCallback)((node, popup, popupProps) => !popup ? node : /*#__PURE__*/_react().default.createElement(_Popup.Popup, _extends({
36
+ visible: popupVisible,
37
+ onClose: handleClose,
38
+ placement: tokens.defaults.popupPlacement,
39
+ round: tokens.defaults.popupRound,
40
+ safeAreaInsetBottom: tokens.defaults.popupSafeAreaInsetBottom
41
+ }, popupProps), node), [handleClose, popupVisible, tokens.defaults.popupPlacement, tokens.defaults.popupRound, tokens.defaults.popupSafeAreaInsetBottom]);
45
42
  const {
46
43
  popup,
47
44
  popupVisible: _popupVisible,
@@ -52,8 +49,8 @@ const DatetimePickerImpl = props => {
52
49
  onCancel,
53
50
  ...pickerProps
54
51
  } = props;
55
- const onConfirmRef = (0, _react().useRef)(onConfirm),
56
- onCancelRef = (0, _react().useRef)(onCancel);
52
+ const onConfirmRef = (0, _react().useRef)(onConfirm);
53
+ const onCancelRef = (0, _react().useRef)(onCancel);
57
54
  onConfirmRef.current = onConfirm;
58
55
  onCancelRef.current = onCancel;
59
56
  const handleConfirm = (0, _react().useCallback)(value => {
@@ -89,8 +86,8 @@ const DatePicker = props => {
89
86
  ...pickerProps
90
87
  } = props;
91
88
  const formatValue = (0, _react().useCallback)(dateValue => {
92
- const fallback = (0, _utils.isValidDate)(dateValue) ? dateValue : new Date();
93
- const date = new Date((0, _utils.clamp)(fallback.getTime(), minDate.getTime(), maxDate.getTime()));
89
+ const fb = (0, _utils.isValidDate)(dateValue) ? dateValue : new Date();
90
+ const date = new Date((0, _utils.clamp)(fb.getTime(), minDate.getTime(), maxDate.getTime()));
94
91
  if (type === 'year-month') {
95
92
  date.setDate(1);
96
93
  date.setHours(0, 0, 0, 0);
@@ -99,6 +96,7 @@ const DatePicker = props => {
99
96
  } else if (type === 'datehour') {
100
97
  date.setMinutes(0, 0, 0);
101
98
  }
99
+ ;
102
100
  return date;
103
101
  }, [maxDate, minDate, type]);
104
102
  const [currentDate, setCurrentDate] = (0, _react().useState)(() => formatValue(value ?? defaultValue));
@@ -227,8 +225,8 @@ const DatePicker = props => {
227
225
  if (type === 'datetime') minute = getValue('minute') || 0;
228
226
  return formatValue(new Date(year, month - 1, day, hour, minute));
229
227
  }, [currentDate, formatValue, originColumns, type]);
230
- const onChangeRef = (0, _react().useRef)(onChange),
231
- onConfirmRef = (0, _react().useRef)(onConfirm);
228
+ const onChangeRef = (0, _react().useRef)(onChange);
229
+ const onConfirmRef = (0, _react().useRef)(onConfirm);
232
230
  onChangeRef.current = onChange;
233
231
  onConfirmRef.current = onConfirm;
234
232
  const handleChange = (0, _react().useCallback)(values => {
@@ -236,9 +234,9 @@ const DatePicker = props => {
236
234
  setCurrentDate(next);
237
235
  onChangeRef.current?.(next);
238
236
  }, [buildDateFromValues]);
239
- const currentDateRef = (0, _react().useRef)(currentDate);
240
- currentDateRef.current = currentDate;
241
- const handleConfirm = (0, _react().useCallback)(() => onConfirmRef.current?.(currentDateRef.current), []);
237
+ const curDateRef = (0, _react().useRef)(currentDate);
238
+ curDateRef.current = currentDate;
239
+ const handleConfirm = (0, _react().useCallback)(() => onConfirmRef.current?.(curDateRef.current), []);
242
240
  return /*#__PURE__*/_react().default.createElement(_picker.default, _extends({}, pickerProps, {
243
241
  columns: columns,
244
242
  interactionMode: interactionMode,
@@ -270,9 +268,9 @@ const TimePicker = props => {
270
268
  return `${(0, _utils.padZero)((0, _utils.clamp)(Number.isNaN(hour) ? minHour : hour, minHour, maxHour))}:${(0, _utils.padZero)((0, _utils.clamp)(Number.isNaN(minute) ? minMinute : minute, minMinute, maxMinute))}`;
271
269
  }, [maxHour, maxMinute, minHour, minMinute]);
272
270
  const [currentTime, setCurrentTime] = (0, _react().useState)(() => {
273
- const initial = formatTime(value ?? defaultValue);
274
- timeRef.current = initial;
275
- return initial;
271
+ const init = formatTime(value ?? defaultValue);
272
+ timeRef.current = init;
273
+ return init;
276
274
  });
277
275
  (0, _react().useEffect)(() => {
278
276
  const next = (0, _utils.isString)(value) ? formatTime(value) : formatTime(timeRef.current);
@@ -282,23 +280,24 @@ const TimePicker = props => {
282
280
  }
283
281
  }, [formatTime, value]);
284
282
  const [hourValues, minuteValues] = (0, _react().useMemo)(() => {
285
- let hours = (0, _utils.times)(maxHour - minHour + 1, index => (0, _utils.padZero)(minHour + index));
286
- let minutes = (0, _utils.times)(maxMinute - minMinute + 1, index => (0, _utils.padZero)(minMinute + index));
283
+ let h = (0, _utils.times)(maxHour - minHour + 1, i => (0, _utils.padZero)(minHour + i));
284
+ let m = (0, _utils.times)(maxMinute - minMinute + 1, i => (0, _utils.padZero)(minMinute + i));
287
285
  if (filter) {
288
- hours = filter('hour', hours);
289
- minutes = filter('minute', minutes);
286
+ h = filter('hour', h);
287
+ m = filter('minute', m);
290
288
  }
291
- return [hours, minutes];
289
+ ;
290
+ return [h, m];
292
291
  }, [filter, maxHour, maxMinute, minHour, minMinute]);
293
- const columns = (0, _react().useMemo)(() => [hourValues.map(value => ({
294
- label: formatter('hour', value),
295
- value
296
- })), minuteValues.map(value => ({
297
- label: formatter('minute', value),
298
- value
292
+ const columns = (0, _react().useMemo)(() => [hourValues.map(v => ({
293
+ label: formatter('hour', v),
294
+ value: v
295
+ })), minuteValues.map(v => ({
296
+ label: formatter('minute', v),
297
+ value: v
299
298
  }))], [formatter, hourValues, minuteValues]);
300
- const onChangeRef = (0, _react().useRef)(onChange),
301
- onConfirmRef = (0, _react().useRef)(onConfirm);
299
+ const onChangeRef = (0, _react().useRef)(onChange);
300
+ const onConfirmRef = (0, _react().useRef)(onConfirm);
302
301
  onChangeRef.current = onChange;
303
302
  onConfirmRef.current = onConfirm;
304
303
  const handleChange = (0, _react().useCallback)(values => {
@@ -76,6 +76,7 @@ const ActionButton = props => {
76
76
  color: txtColor
77
77
  }) : (0, _utils.renderTextOrNode)(text ?? '', {
78
78
  color: txtColor,
79
+ fontFamily: tokens.typography.fontFamily,
79
80
  fontSize: tokens.typography.actionSize,
80
81
  fontWeight: tokens.typography.actionWeight
81
82
  }));
@@ -157,6 +158,7 @@ const DialogImpl = props => {
157
158
  handler?.();
158
159
  return;
159
160
  }
161
+ ;
160
162
  let result;
161
163
  try {
162
164
  result = bc(action);
@@ -164,6 +166,7 @@ const DialogImpl = props => {
164
166
  handler?.();
165
167
  return;
166
168
  }
169
+ ;
167
170
  if (result === false) return;
168
171
  if ((0, _promise.isPromiseLike)(result)) {
169
172
  void result.then(resolved => {
@@ -176,6 +179,7 @@ const DialogImpl = props => {
176
179
  });
177
180
  return;
178
181
  }
182
+ ;
179
183
  handler?.();
180
184
  }, []);
181
185
  const handleCloseIcon = (0, _react().useCallback)(() => {
@@ -191,9 +195,9 @@ const DialogImpl = props => {
191
195
  run('confirm', () => onConfirmRef.current?.());
192
196
  }, [run]);
193
197
  const scaleAnim = (0, _react().useRef)(new (_reactNative().Animated.Value)(0.7)).current;
194
- const scaleAnimRef = (0, _react().useRef)(null);
198
+ const scaleRef = (0, _react().useRef)(null);
195
199
  (0, _react().useEffect)(() => {
196
- scaleAnimRef.current?.stop();
200
+ scaleRef.current?.stop();
197
201
  scaleAnim.setValue(visible ? 0.7 : 1);
198
202
  const anim = _reactNative().Animated.timing(scaleAnim, {
199
203
  toValue: visible ? 1 : 0.9,
@@ -202,11 +206,11 @@ const DialogImpl = props => {
202
206
  useNativeDriver: _platform.nativeDriverEnabled,
203
207
  isInteraction: false
204
208
  });
205
- scaleAnimRef.current = anim;
209
+ scaleRef.current = anim;
206
210
  anim.start();
207
211
  }, [scaleAnim, visible, reducedMotion]);
208
212
  (0, _react().useEffect)(() => () => {
209
- scaleAnimRef.current?.stop();
213
+ scaleRef.current?.stop();
210
214
  }, []);
211
215
  const widthStyle = (0, _react().useMemo)(() => width ? (0, _validate.isNumber)(width) ? {
212
216
  width
@@ -224,16 +228,18 @@ const DialogImpl = props => {
224
228
  }] : null, [hContent, hTitle, tokens.spacing.paddingHorizontal, tokens.spacing.titleGap, tokens.spacing.titleIsolatedPadding, tokens.spacing.titlePaddingTop]);
225
229
  const titleTxtStyle = (0, _react().useMemo)(() => hTitle ? [S.title, {
226
230
  color: tokens.colors.title,
231
+ fontFamily: tokens.typography.fontFamily,
227
232
  fontSize: tokens.typography.titleSize,
228
233
  lineHeight: tokens.typography.titleLineHeight,
229
234
  fontWeight: tokens.typography.titleWeight
230
- }, titleStyle] : null, [hTitle, titleStyle, tokens.colors.title, tokens.typography.titleLineHeight, tokens.typography.titleSize, tokens.typography.titleWeight]);
235
+ }, titleStyle] : null, [hTitle, titleStyle, tokens.colors.title, tokens.typography.fontFamily, tokens.typography.titleLineHeight, tokens.typography.titleSize, tokens.typography.titleWeight]);
231
236
  const msgTxtStyle = (0, _react().useMemo)(() => [S.msg, {
232
237
  color: isRound ? tokens.colors.title : tokens.colors.message,
238
+ fontFamily: tokens.typography.fontFamily,
233
239
  fontSize: tokens.typography.messageSize,
234
240
  lineHeight: tokens.typography.messageLineHeight,
235
241
  textAlign: messageAlign
236
- }, messageStyle], [isRound, messageAlign, messageStyle, tokens.colors.message, tokens.colors.title, tokens.typography.messageLineHeight, tokens.typography.messageSize]);
242
+ }, messageStyle], [isRound, messageAlign, messageStyle, tokens.colors.message, tokens.colors.title, tokens.typography.fontFamily, tokens.typography.messageLineHeight, tokens.typography.messageSize]);
237
243
  const msgContentStyle = (0, _react().useMemo)(() => !hChildren ? {
238
244
  alignItems: messageAlign === 'center' ? 'center' : messageAlign === 'left' ? 'flex-start' : 'flex-end'
239
245
  } : null, [hChildren, messageAlign]);
@@ -249,7 +255,7 @@ const DialogImpl = props => {
249
255
  right: 0,
250
256
  top: 0
251
257
  })], [tokens.colors.divider]);
252
- const mergedCloseOnOverlay = closeOnOverlayPress || closeOnClickOverlay;
258
+ const mergeOverlay = closeOnOverlayPress || closeOnClickOverlay;
253
259
  const animStyle = (0, _react().useMemo)(() => ({
254
260
  transform: [{
255
261
  scale: scaleAnim
@@ -260,7 +266,7 @@ const DialogImpl = props => {
260
266
  paddingHorizontal: tokens.spacing.messagePaddingHorizontal,
261
267
  paddingBottom: tokens.spacing.roundFooterPadding
262
268
  }], [tokens.spacing.messagePaddingHorizontal, tokens.spacing.messagePaddingTop, tokens.spacing.roundFooterPadding]);
263
- const popupBeforeClose = (0, _react().useCallback)(() => {
269
+ const popupBc = (0, _react().useCallback)(() => {
264
270
  const bc = beforeCloseRef.current;
265
271
  if (!bc) return true;
266
272
  try {
@@ -341,9 +347,9 @@ const DialogImpl = props => {
341
347
  overlayTestID: overlayTestID,
342
348
  closeOnBackPress: closeOnBackPress,
343
349
  closeOnPopstate: closeOnPopstate,
344
- closeOnClickOverlay: mergedCloseOnOverlay,
350
+ closeOnClickOverlay: mergeOverlay,
345
351
  onClickOverlay: onClickOverlay,
346
- beforeClose: popupBeforeClose,
352
+ beforeClose: popupBc,
347
353
  onClose: onClose,
348
354
  onClosed: onClosed,
349
355
  contentAnimationStyle: animStyle,
@@ -76,34 +76,28 @@ const DialogPortalInstance = ({
76
76
  if (!portalKeyRef.current) return;
77
77
  attachCloser(portalKeyRef.current, close);
78
78
  return () => {
79
- const entry = dialogRegistry.get(portalKeyRef.current ?? -1);
80
- if (entry && entry.close === close) entry.close = undefined;
79
+ const e = dialogRegistry.get(portalKeyRef.current ?? -1);
80
+ if (e && e.close === close) e.close = undefined;
81
81
  };
82
82
  }, [close, portalKeyRef]);
83
83
  (0, _react().useEffect)(() => () => {
84
84
  if (portalKeyRef.current) unregisterEntry(portalKeyRef.current);
85
85
  }, [portalKeyRef]);
86
86
  const handleCancel = (0, _react().useCallback)(async () => {
87
- const allowed = await runHook(() => options.beforeClose?.('cancel'));
88
- if (!allowed) return;
89
- const shouldClose = await runHook(options.onCancel);
90
- if (!shouldClose) return;
87
+ if (!(await runHook(() => options.beforeClose?.('cancel')))) return;
88
+ if (!(await runHook(options.onCancel))) return;
91
89
  if (meta.mode === 'confirm') meta.resolve?.(false);
92
90
  close();
93
91
  }, [close, meta, options.beforeClose, options.onCancel]);
94
92
  const handleConfirm = (0, _react().useCallback)(async () => {
95
- const allowed = await runHook(() => options.beforeClose?.('confirm'));
96
- if (!allowed) return;
97
- const shouldClose = await runHook(options.onConfirm);
98
- if (!shouldClose) return;
93
+ if (!(await runHook(() => options.beforeClose?.('confirm')))) return;
94
+ if (!(await runHook(options.onConfirm))) return;
99
95
  if (meta.mode === 'alert' || meta.mode === 'confirm') meta.resolve?.(true);
100
96
  close();
101
97
  }, [close, meta, options.beforeClose, options.onConfirm]);
102
98
  const handleClose = (0, _react().useCallback)(async () => {
103
- const allowed = await runHook(() => options.beforeClose?.('close'));
104
- if (!allowed) return;
105
- const shouldClose = await runHook(options.onClose);
106
- if (!shouldClose) return;
99
+ if (!(await runHook(() => options.beforeClose?.('close')))) return;
100
+ if (!(await runHook(options.onClose))) return;
107
101
  if (meta.mode === 'confirm') meta.resolve?.(false);
108
102
  close();
109
103
  }, [close, meta, options.beforeClose, options.onClose]);
@@ -49,6 +49,7 @@ const createDialogTokens = foundations => {
49
49
  roundButtonHeight: 40
50
50
  },
51
51
  typography: {
52
+ fontFamily: typography.fontFamily,
52
53
  titleSize: fontSize.md,
53
54
  titleLineHeight: fontSize.md * typography.lineHeightMultiplier,
54
55
  titleWeight: typography.weight.semiBold,
@@ -26,11 +26,11 @@ const DividerImpl = props => {
26
26
  const {
27
27
  tokensOverride,
28
28
  children,
29
- type: typeProp,
30
- orientation: orientationProp,
31
- dashed: dashedProp,
32
- hairline: hairlineProp,
33
- contentPosition: contentPositionProp,
29
+ type: typeP,
30
+ orientation: oriP,
31
+ dashed: dashP,
32
+ hairline: hlP,
33
+ contentPosition: posP,
34
34
  textStyle,
35
35
  contentStyle,
36
36
  lineColor,
@@ -38,51 +38,48 @@ const DividerImpl = props => {
38
38
  ...rest
39
39
  } = props;
40
40
  const tokens = (0, _tokens.useDividerTokens)(tokensOverride);
41
- const dashed = dashedProp ?? tokens.defaults.dashed;
42
- const hairline = hairlineProp ?? tokens.defaults.hairline;
43
- const contentPosition = contentPositionProp ?? tokens.defaults.contentPosition;
44
- const orientation = typeProp ?? orientationProp ?? 'horizontal';
45
- const resolvedColor = lineColor ?? tokens.colors.line;
46
- const borderStyle = dashed ? 'dashed' : 'solid';
47
- const hasContent = orientation === 'horizontal' && (0, _utils.isRenderable)(children);
48
- const content = hasContent ? (0, _utils.renderTextOrNode)(children, [tokens.layout.text, {
41
+ const dash = dashP ?? tokens.defaults.dashed;
42
+ const hl = hlP ?? tokens.defaults.hairline;
43
+ const pos = posP ?? tokens.defaults.contentPosition;
44
+ const ori = typeP ?? oriP ?? 'horizontal';
45
+ const clr = lineColor ?? tokens.colors.line;
46
+ const bStyle = dash ? 'dashed' : 'solid';
47
+ const hasCnt = ori === 'horizontal' && (0, _utils.isRenderable)(children);
48
+ const cnt = hasCnt ? (0, _utils.renderTextOrNode)(children, [tokens.layout.text, {
49
49
  color: tokens.colors.text,
50
50
  fontSize: tokens.typography.fontSize,
51
51
  lineHeight: tokens.typography.lineHeight,
52
52
  fontFamily: tokens.typography.fontFamily,
53
53
  fontWeight: tokens.typography.fontWeight
54
54
  }, textStyle]) : null;
55
- const leftGrow = contentPosition === 'left' ? tokens.sizing.sideMinFlex : 1;
56
- const rightGrow = contentPosition === 'right' ? tokens.sizing.sideMinFlex : 1;
57
- const renderLine = grow => {
58
- if (hairline) return /*#__PURE__*/_react().default.createElement(_reactNative().View, {
59
- style: [tokens.layout.hairlineWrapper, {
60
- flexGrow: grow
61
- }]
62
- }, /*#__PURE__*/_react().default.createElement(_reactNative().View, {
63
- style: [(0, _utils.createHairlineView)({
64
- position: 'bottom',
65
- color: resolvedColor,
66
- left: 0,
67
- right: 0,
68
- bottom: 0
69
- }), {
70
- borderStyle
71
- }]
72
- }));
73
- return /*#__PURE__*/_react().default.createElement(_reactNative().View, {
74
- style: {
75
- flexGrow: grow,
76
- flexShrink: 1,
77
- height: tokens.borders.thickness,
78
- borderBottomWidth: tokens.borders.thickness,
79
- borderBottomColor: resolvedColor,
80
- borderStyle
81
- }
82
- });
83
- };
84
- if (orientation === 'vertical') {
85
- const line = hairline ? /*#__PURE__*/_react().default.createElement(_reactNative().View, {
55
+ const leftG = pos === 'left' ? tokens.sizing.sideMinFlex : 1;
56
+ const rightG = pos === 'right' ? tokens.sizing.sideMinFlex : 1;
57
+ const line = g => hl ? /*#__PURE__*/_react().default.createElement(_reactNative().View, {
58
+ style: [tokens.layout.hairlineWrapper, {
59
+ flexGrow: g
60
+ }]
61
+ }, /*#__PURE__*/_react().default.createElement(_reactNative().View, {
62
+ style: [(0, _utils.createHairlineView)({
63
+ position: 'bottom',
64
+ color: clr,
65
+ left: 0,
66
+ right: 0,
67
+ bottom: 0
68
+ }), {
69
+ borderStyle: bStyle
70
+ }]
71
+ })) : /*#__PURE__*/_react().default.createElement(_reactNative().View, {
72
+ style: {
73
+ flexGrow: g,
74
+ flexShrink: 1,
75
+ height: tokens.borders.thickness,
76
+ borderBottomWidth: tokens.borders.thickness,
77
+ borderBottomColor: clr,
78
+ borderStyle: bStyle
79
+ }
80
+ });
81
+ if (ori === 'vertical') {
82
+ const vLine = hl ? /*#__PURE__*/_react().default.createElement(_reactNative().View, {
86
83
  style: [tokens.layout.hairlineWrapper, {
87
84
  width: tokens.borders.thickness,
88
85
  height: '100%'
@@ -90,20 +87,20 @@ const DividerImpl = props => {
90
87
  }, /*#__PURE__*/_react().default.createElement(_reactNative().View, {
91
88
  style: [(0, _utils.createHairlineView)({
92
89
  position: 'left',
93
- color: resolvedColor,
90
+ color: clr,
94
91
  top: 0,
95
92
  bottom: 0,
96
93
  left: 0
97
94
  }), {
98
- borderStyle
95
+ borderStyle: bStyle
99
96
  }]
100
97
  })) : /*#__PURE__*/_react().default.createElement(_reactNative().View, {
101
98
  style: {
102
99
  width: tokens.borders.thickness,
103
100
  height: '100%',
104
101
  borderLeftWidth: tokens.borders.thickness,
105
- borderLeftColor: resolvedColor,
106
- borderStyle
102
+ borderLeftColor: clr,
103
+ borderStyle: bStyle
107
104
  }
108
105
  });
109
106
  return /*#__PURE__*/_react().default.createElement(_reactNative().View, _extends({
@@ -112,18 +109,18 @@ const DividerImpl = props => {
112
109
  marginVertical: tokens.spacing.vertical,
113
110
  flexDirection: 'column'
114
111
  }, style]
115
- }, rest), line);
112
+ }, rest), vLine);
116
113
  }
117
114
  return /*#__PURE__*/_react().default.createElement(_reactNative().View, _extends({
118
115
  accessibilityRole: 'separator',
119
116
  style: [tokens.layout.container, {
120
117
  marginVertical: tokens.spacing.vertical
121
118
  }, style]
122
- }, rest), renderLine(hasContent ? leftGrow : 1), hasContent && /*#__PURE__*/_react().default.createElement(_react().default.Fragment, null, /*#__PURE__*/_react().default.createElement(_reactNative().View, {
119
+ }, rest), line(hasCnt ? leftG : 1), hasCnt && /*#__PURE__*/_react().default.createElement(_react().default.Fragment, null, /*#__PURE__*/_react().default.createElement(_reactNative().View, {
123
120
  style: [tokens.layout.contentWrapper, {
124
121
  paddingHorizontal: tokens.spacing.contentPadding
125
122
  }, contentStyle]
126
- }, content), renderLine(rightGrow)));
123
+ }, cnt), line(rightG)));
127
124
  };
128
125
  const Divider = exports.Divider = /*#__PURE__*/_react().default.memo(DividerImpl);
129
126
  Divider.displayName = 'Divider';
@@ -39,32 +39,32 @@ const PRESET_ICONS = {
39
39
  const EmptyImpl = props => {
40
40
  const {
41
41
  tokensOverride,
42
- image: imageProp,
43
- imageSize: imageSizeProp,
42
+ image: imgP,
43
+ imageSize: sizeP,
44
44
  imageStyle,
45
45
  description,
46
46
  descriptionStyle,
47
47
  children,
48
48
  style,
49
- gap: gapProp,
49
+ gap: gapP,
50
50
  ...rest
51
51
  } = props;
52
52
  const tokens = (0, _tokens.useEmptyTokens)(tokensOverride);
53
- const image = imageProp ?? tokens.defaults.image;
54
- const gap = gapProp ?? tokens.defaults.gap;
55
- const resolvedImageSize = imageSizeProp ?? tokens.sizing.image;
56
- const renderImage = () => {
57
- if (/*#__PURE__*/_react().default.isValidElement(image)) return /*#__PURE__*/_react().default.createElement(_reactNative().View, {
53
+ const img = imgP ?? tokens.defaults.image;
54
+ const gap = gapP ?? tokens.defaults.gap;
55
+ const imgSize = sizeP ?? tokens.sizing.image;
56
+ const rImg = () => {
57
+ if (/*#__PURE__*/_react().default.isValidElement(img)) return /*#__PURE__*/_react().default.createElement(_reactNative().View, {
58
58
  style: [tokens.layout.imageWrapper, {
59
- width: resolvedImageSize,
60
- height: resolvedImageSize
59
+ width: imgSize,
60
+ height: imgSize
61
61
  }, imageStyle]
62
- }, image);
63
- if ((0, _utils.isString)(image)) {
64
- if (/^https?:/.test(image)) return /*#__PURE__*/_react().default.createElement(_image.default, {
65
- src: image,
66
- width: resolvedImageSize,
67
- height: resolvedImageSize,
62
+ }, img);
63
+ if ((0, _utils.isString)(img)) {
64
+ if (/^https?:/.test(img)) return /*#__PURE__*/_react().default.createElement(_image.default, {
65
+ src: img,
66
+ width: imgSize,
67
+ height: imgSize,
68
68
  fit: "contain",
69
69
  showLoading: false,
70
70
  showError: false,
@@ -72,21 +72,21 @@ const EmptyImpl = props => {
72
72
  backgroundColor: tokens.colors.imageBackground
73
73
  }, imageStyle]
74
74
  });
75
- const IconComponent = PRESET_ICONS[image] || PRESET_ICONS.default;
76
- const iconSize = resolvedImageSize * tokens.sizing.iconScale;
75
+ const Icon = PRESET_ICONS[img] || PRESET_ICONS.default;
77
76
  return /*#__PURE__*/_react().default.createElement(_reactNative().View, {
78
77
  style: [tokens.layout.imageWrapper, {
79
- width: resolvedImageSize,
80
- height: resolvedImageSize
78
+ width: imgSize,
79
+ height: imgSize
81
80
  }, imageStyle]
82
- }, /*#__PURE__*/_react().default.createElement(IconComponent, {
83
- size: iconSize,
81
+ }, /*#__PURE__*/_react().default.createElement(Icon, {
82
+ size: imgSize * tokens.sizing.iconScale,
84
83
  color: tokens.colors.icon
85
84
  }));
86
85
  }
86
+ ;
87
87
  return null;
88
88
  };
89
- const renderDescription = () => {
89
+ const rDesc = () => {
90
90
  if (!(0, _utils.isRenderable)(description)) return null;
91
91
  if ((0, _utils.isText)(description)) return /*#__PURE__*/_react().default.createElement(_reactNative().Text, {
92
92
  style: [tokens.layout.descriptionText, {
@@ -106,15 +106,20 @@ const EmptyImpl = props => {
106
106
  }
107
107
  }, description);
108
108
  };
109
+ const footStyle = {
110
+ fontFamily: tokens.typography.descriptionFontFamily,
111
+ fontSize: tokens.typography.descriptionSize,
112
+ fontWeight: tokens.typography.descriptionFontWeight
113
+ };
109
114
  return /*#__PURE__*/_react().default.createElement(_reactNative().View, _extends({
110
115
  accessibilityRole: "summary",
111
116
  accessibilityLabel: (0, _utils.isText)(description) ? String(description) : undefined,
112
117
  style: [tokens.layout.container, style]
113
- }, rest), renderImage(), renderDescription(), (0, _utils.isRenderable)(children) && /*#__PURE__*/_react().default.createElement(_reactNative().View, {
118
+ }, rest), rImg(), rDesc(), (0, _utils.isRenderable)(children) && /*#__PURE__*/_react().default.createElement(_reactNative().View, {
114
119
  style: {
115
120
  marginTop: tokens.spacing.footerMarginTop
116
121
  }
117
- }, (0, _utils.renderTextOrNode)(children)));
122
+ }, (0, _utils.renderTextOrNode)(children, footStyle)));
118
123
  };
119
124
  const Empty = exports.Empty = /*#__PURE__*/_react().default.memo(EmptyImpl);
120
125
  Empty.displayName = 'Empty';
@@ -39,10 +39,10 @@ class ErrorBoundaryClass extends _react().default.Component {
39
39
  forwardedRef
40
40
  } = this.props;
41
41
  if (!forwardedRef) return;
42
- const refValue = {
42
+ const refVal = {
43
43
  reset: this.reset
44
44
  };
45
- if (typeof forwardedRef === 'function') forwardedRef(refValue);else if (forwardedRef && typeof forwardedRef === 'object') forwardedRef.current = refValue;
45
+ if (typeof forwardedRef === 'function') forwardedRef(refVal);else if (forwardedRef && typeof forwardedRef === 'object') forwardedRef.current = refVal;
46
46
  }
47
47
  reset = () => {
48
48
  this.props.onReset?.();
@@ -63,6 +63,7 @@ class ErrorBoundaryClass extends _react().default.Component {
63
63
  if (fallback !== undefined) return fallback;
64
64
  return null;
65
65
  }
66
+ ;
66
67
  return children ?? null;
67
68
  }
68
69
  }