@tecsinapse/react-core 3.4.15-beta.0 → 3.4.15-beta.1

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 (28) hide show
  1. package/dist/cjs/components/molecules/DateTimeSelector/Selector.js +1 -1
  2. package/dist/cjs/components/molecules/Snackbar/Snackbar.js +1 -1
  3. package/dist/cjs/hooks/useDebouncedState.js +1 -1
  4. package/dist/esm/components/molecules/DateTimeSelector/Selector.js +1 -1
  5. package/dist/esm/components/molecules/Snackbar/Snackbar.js +1 -1
  6. package/dist/esm/hooks/useDebouncedState.js +1 -1
  7. package/dist/types/components/atoms/Badge/Badge.d.ts +1 -1
  8. package/dist/types/components/atoms/Button/Button.d.ts +3 -3
  9. package/dist/types/components/atoms/Card/Card.d.ts +2 -2
  10. package/dist/types/components/atoms/Card/Footer/Footer.d.ts +2 -2
  11. package/dist/types/components/atoms/Card/Header/Header.d.ts +2 -2
  12. package/dist/types/components/atoms/Checkbox/Checkbox.d.ts +2 -2
  13. package/dist/types/components/atoms/GroupButton/GroupButton.d.ts +2 -1
  14. package/dist/types/components/atoms/GroupButton/GroupButtonOption.d.ts +2 -2
  15. package/dist/types/components/atoms/Input/InputContainer/InputContainer.d.ts +4 -4
  16. package/dist/types/components/atoms/Input/PressableInputContainer/PressableInputContainer.d.ts +2 -1
  17. package/dist/types/components/atoms/Paper/Paper.d.ts +2 -2
  18. package/dist/types/components/atoms/PressableSurface/PressableSurface.d.ts +2 -2
  19. package/dist/types/components/atoms/ProgressBar/ProgressBar.d.ts +2 -1
  20. package/dist/types/components/atoms/RadioButton/RadioButton.d.ts +2 -2
  21. package/dist/types/components/molecules/Calendar/Calendar.d.ts +1 -1
  22. package/dist/types/components/molecules/Calendar/components/MemoizedYearCard.d.ts +1 -1
  23. package/dist/types/components/molecules/DatePicker/DatePicker.d.ts +3 -3
  24. package/dist/types/components/molecules/DateTimePicker/DateTimePicker.d.ts +2 -2
  25. package/dist/types/components/molecules/Grid/index.d.ts +1 -1
  26. package/dist/types/components/molecules/HintInputContainer/HintInputContainer.d.ts +2 -2
  27. package/dist/types/components/molecules/Snackbar/Snackbar.d.ts +2 -2
  28. package/package.json +2 -2
@@ -54,7 +54,7 @@ const Selector = ({
54
54
  TextComponent,
55
55
  ...rest
56
56
  }) => {
57
- const pressInTimeoutRef = React__namespace.useRef();
57
+ const pressInTimeoutRef = React__namespace.useRef(void 0);
58
58
  const handlePressInNext = (_next) => {
59
59
  const daysInMonth = dateFns.getDaysInMonth(referenceDate);
60
60
  const next = _next || getPrevAndNext(value, granularity, daysInMonth)[1];
@@ -22,7 +22,7 @@ const Snackbar = ({
22
22
  style
23
23
  }) => {
24
24
  const fadeAnim = React.useRef(new reactNative.Animated.Value(0)).current;
25
- const timeoutRef = React.useRef();
25
+ const timeoutRef = React.useRef(void 0);
26
26
  const fadeIn = () => {
27
27
  reactNative.Animated.timing(fadeAnim, {
28
28
  toValue: 1,
@@ -3,7 +3,7 @@
3
3
  var React = require('react');
4
4
 
5
5
  function useDebouncedState(initialState, timeoutCallback, timeoutMs = 166) {
6
- const timeoutId = React.useRef();
6
+ const timeoutId = React.useRef(void 0);
7
7
  const [state, setState] = React.useState(initialState);
8
8
  React.useEffect(() => {
9
9
  if (timeoutId.current) clearTimeout(timeoutId.current);
@@ -33,7 +33,7 @@ const Selector = ({
33
33
  TextComponent,
34
34
  ...rest
35
35
  }) => {
36
- const pressInTimeoutRef = React.useRef();
36
+ const pressInTimeoutRef = React.useRef(void 0);
37
37
  const handlePressInNext = (_next) => {
38
38
  const daysInMonth = getDaysInMonth(referenceDate);
39
39
  const next = _next || getPrevAndNext(value, granularity, daysInMonth)[1];
@@ -20,7 +20,7 @@ const Snackbar = ({
20
20
  style
21
21
  }) => {
22
22
  const fadeAnim = React__default.useRef(new Animated.Value(0)).current;
23
- const timeoutRef = React__default.useRef();
23
+ const timeoutRef = React__default.useRef(void 0);
24
24
  const fadeIn = () => {
25
25
  Animated.timing(fadeAnim, {
26
26
  toValue: 1,
@@ -1,7 +1,7 @@
1
1
  import { useRef, useState, useEffect } from 'react';
2
2
 
3
3
  function useDebouncedState(initialState, timeoutCallback, timeoutMs = 166) {
4
- const timeoutId = useRef();
4
+ const timeoutId = useRef(void 0);
5
5
  const [state, setState] = useState(initialState);
6
6
  useEffect(() => {
7
7
  if (timeoutId.current) clearTimeout(timeoutId.current);
@@ -8,5 +8,5 @@ export interface BadgeProps {
8
8
  value: React.ReactNode;
9
9
  children?: ReactNode;
10
10
  }
11
- declare const Badge: ({ children, style, color, tone, value, }: BadgeProps) => JSX.Element;
11
+ declare const Badge: ({ children, style, color, tone, value, }: BadgeProps) => React.ReactElement;
12
12
  export default Badge;
@@ -20,9 +20,9 @@ export interface ButtonProps extends PressableSurfaceProps {
20
20
  borderRadius?: BorderRadiusType;
21
21
  size?: ButtonSizeType;
22
22
  state?: ButtonStateType;
23
- loadingComponent?: JSX.Element;
24
- errorComponent?: JSX.Element;
25
- successComponent?: JSX.Element;
23
+ loadingComponent?: React.ReactNode;
24
+ errorComponent?: React.ReactNode;
25
+ successComponent?: React.ReactNode;
26
26
  }
27
27
  declare const Button: FC<ButtonProps>;
28
28
  export default Button;
@@ -1,10 +1,10 @@
1
1
  import { PressableSurfaceProps } from '../PressableSurface';
2
- import { ReactNode } from 'react';
2
+ import React, { ReactNode } from 'react';
3
3
  import { GestureResponderEvent } from 'react-native';
4
4
  import { PaperProps } from '../Paper';
5
5
  export interface CardProps extends PaperProps, Omit<PressableSurfaceProps, 'style'> {
6
6
  onPress?: null | ((event: GestureResponderEvent) => void);
7
7
  children?: ReactNode;
8
8
  }
9
- declare const Card: ({ children, elevated, onPress, ...rest }: CardProps) => JSX.Element;
9
+ declare const Card: ({ children, elevated, onPress, ...rest }: CardProps) => React.ReactElement;
10
10
  export default Card;
@@ -1,8 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  export interface FooterProps {
4
4
  style?: StyleProp<ViewStyle>;
5
5
  children?: ReactNode;
6
6
  }
7
- declare const Footer: ({ children, style }: FooterProps) => JSX.Element;
7
+ declare const Footer: ({ children, style }: FooterProps) => React.ReactElement;
8
8
  export default Footer;
@@ -1,8 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  export interface HeaderProps {
4
4
  style?: StyleProp<ViewStyle>;
5
5
  children?: ReactNode;
6
6
  }
7
- declare const Header: ({ children, style }: HeaderProps) => JSX.Element;
7
+ declare const Header: ({ children, style }: HeaderProps) => React.ReactElement;
8
8
  export default Header;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { ColorGradationType, ColorType } from '../../../types/defaults';
4
4
  export interface CheckboxProps {
@@ -11,5 +11,5 @@ export interface CheckboxProps {
11
11
  style?: StyleProp<ViewStyle>;
12
12
  children?: ReactNode;
13
13
  }
14
- declare const Checkbox: ({ children, checked, onChange, color, colorTone, labelPosition, disabled, ...rest }: CheckboxProps) => JSX.Element;
14
+ declare const Checkbox: ({ children, checked, onChange, color, colorTone, labelPosition, disabled, ...rest }: CheckboxProps) => React.ReactElement;
15
15
  export default Checkbox;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { StyleProp, ViewStyle } from 'react-native';
2
3
  import { ColorGradationType, ColorType } from '../../../types/defaults';
3
4
  import { ButtonSizeType } from '../Button';
@@ -22,7 +23,7 @@ export interface GroupButtonProps<T> {
22
23
  value: T;
23
24
  options: GroupButtonValue<T>[];
24
25
  renderKey: (option?: T) => string | number | undefined;
25
- renderOption: (option: T, active: boolean) => JSX.Element;
26
+ renderOption: (option: T, active: boolean) => React.ReactElement;
26
27
  onChange: (option: T) => void;
27
28
  buttonSize?: ButtonSizeType;
28
29
  style?: StyleProp<ViewStyle>;
@@ -1,9 +1,9 @@
1
- import { FC } from 'react';
1
+ import React, { FC } from 'react';
2
2
  import { TextProps } from '../Text';
3
3
  export interface GroupButtonOptionProps {
4
4
  active: boolean;
5
5
  description: string;
6
6
  TextComponent?: FC<TextProps>;
7
7
  }
8
- declare const GroupButtonOption: ({ TextComponent, active, description, }: GroupButtonOptionProps) => JSX.Element;
8
+ declare const GroupButtonOption: ({ TextComponent, active, description, }: GroupButtonOptionProps) => React.ReactElement;
9
9
  export default GroupButtonOption;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import React, { FC } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { InputElementProps } from '..';
4
4
  import { ColorGradationType, ColorType, FontColorType, FontStackType, FontWeightType, TypographyVariationType } from '../../../../types/defaults';
@@ -13,8 +13,8 @@ export interface InputContainerProps {
13
13
  labelStack?: FontStackType;
14
14
  LabelComponent?: FC<TextProps>;
15
15
  labelWeight?: FontWeightType;
16
- leftComponent?: JSX.Element;
17
- rightComponent?: JSX.Element;
16
+ leftComponent?: React.ReactNode;
17
+ rightComponent?: React.ReactNode;
18
18
  borderColor?: ColorType;
19
19
  borderColorGradation?: ColorGradationType;
20
20
  style?: StyleProp<ViewStyle>;
@@ -23,7 +23,7 @@ export interface InputContainerProps {
23
23
  disabled?: boolean;
24
24
  variant?: InputVariantType;
25
25
  hint?: string;
26
- hintComponent?: JSX.Element;
26
+ hintComponent?: React.ReactNode;
27
27
  testID?: string;
28
28
  }
29
29
  declare const InputContainer: FC<InputContainerProps & Partial<InputElementProps>>;
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { PressableStateCallbackType, StyleProp, ViewStyle } from 'react-native';
2
3
  import { InputContainerProps } from '../InputContainer/InputContainer';
3
4
  import { ReactNode } from 'react';
@@ -7,5 +8,5 @@ export interface PressableInputContainerProps extends Omit<InputContainerProps,
7
8
  style?: StyleProp<ViewStyle> | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>);
8
9
  children?: ReactNode;
9
10
  }
10
- declare const PressableInputContainer: ({ onPress, disabled, style, children, ...rest }: PressableInputContainerProps) => JSX.Element;
11
+ declare const PressableInputContainer: ({ onPress, disabled, style, children, ...rest }: PressableInputContainerProps) => React.ReactElement;
11
12
  export default PressableInputContainer;
@@ -1,9 +1,9 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  export interface PaperProps {
4
4
  elevated?: boolean;
5
5
  style?: StyleProp<ViewStyle>;
6
6
  children?: ReactNode;
7
7
  }
8
- declare const Paper: ({ children, elevated, ...rest }: PaperProps) => JSX.Element;
8
+ declare const Paper: ({ children, elevated, ...rest }: PaperProps) => React.ReactElement;
9
9
  export default Paper;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { PressableProps, StyleProp, ViewStyle } from 'react-native';
3
3
  export interface PressableSurfaceProps extends PressableProps {
4
4
  effect?: 'darken' | 'lighten' | 'none';
@@ -7,5 +7,5 @@ export interface PressableSurfaceProps extends PressableProps {
7
7
  effectStyle?: (pressed: boolean) => StyleProp<ViewStyle>;
8
8
  children?: ReactNode;
9
9
  }
10
- declare const PressableSurface: ({ children, surfaceColor, effect, effectIntensity, effectStyle, style, ...rest }: PressableSurfaceProps) => JSX.Element;
10
+ declare const PressableSurface: ({ children, surfaceColor, effect, effectIntensity, effectStyle, style, ...rest }: PressableSurfaceProps) => React.ReactElement;
11
11
  export default PressableSurface;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { ViewProps } from 'react-native';
2
3
  import { ColorGradationType, ColorType } from '../../../types/defaults';
3
4
  export interface ProgressBarProps extends ViewProps {
@@ -8,5 +9,5 @@ export interface ProgressBarProps extends ViewProps {
8
9
  color?: ColorType;
9
10
  colorTone?: ColorGradationType;
10
11
  }
11
- declare const ProgressBar: ({ segments: _segments, valueMin, valueNow: _valueNow, valueMax, color, colorTone, ...rest }: ProgressBarProps) => JSX.Element;
12
+ declare const ProgressBar: ({ segments: _segments, valueMin, valueNow: _valueNow, valueMax, color, colorTone, ...rest }: ProgressBarProps) => React.ReactElement;
12
13
  export default ProgressBar;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { ColorGradationType, ColorType } from '../../../types/defaults';
4
4
  export interface RadioButtonProps {
@@ -11,5 +11,5 @@ export interface RadioButtonProps {
11
11
  style?: StyleProp<ViewStyle>;
12
12
  children?: ReactNode;
13
13
  }
14
- declare const RadioButton: ({ children, onChange, checked, labelPosition, disabled, color, colorTone, ...rest }: RadioButtonProps) => JSX.Element;
14
+ declare const RadioButton: ({ children, onChange, checked, labelPosition, disabled, color, colorTone, ...rest }: RadioButtonProps) => React.ReactElement;
15
15
  export default RadioButton;
@@ -18,5 +18,5 @@ export interface CalendarProps<T extends SelectionType> extends ViewProps {
18
18
  locale?: Locale;
19
19
  selectYearProps?: Omit<SelectYearProps, 'TextComponent' | 'currentYear' | 'onSelectYear'>;
20
20
  }
21
- declare function Calendar<T extends SelectionType>({ TextComponent, year: _year, month: _month, value, type, onChange, locale, selectYearProps, ...rest }: CalendarProps<T>): JSX.Element;
21
+ declare function Calendar<T extends SelectionType>({ TextComponent, year: _year, month: _month, value, type, onChange, locale, selectYearProps, ...rest }: CalendarProps<T>): React.ReactElement;
22
22
  export default Calendar;
@@ -6,5 +6,5 @@ interface MemoizedYearCardProps {
6
6
  onPress: () => void;
7
7
  TextComponent: React.FC<TextProps>;
8
8
  }
9
- declare const MemoizedYearCard: React.MemoExoticComponent<({ year, isSelected, onPress, TextComponent, }: MemoizedYearCardProps) => JSX.Element>;
9
+ declare const MemoizedYearCard: React.MemoExoticComponent<({ year, isSelected, onPress, TextComponent, }: MemoizedYearCardProps) => React.ReactElement>;
10
10
  export default MemoizedYearCard;
@@ -3,7 +3,7 @@ import { InputContainerProps } from '../../atoms/Input';
3
3
  import { TextProps } from '../../atoms/Text';
4
4
  import { CalendarProps, SelectionType } from '../Calendar';
5
5
  export interface DatePickerProps<T extends SelectionType> extends InputContainerProps, Omit<CalendarProps<T>, 'style'> {
6
- controlComponent?: (onPress: () => void, displayValue?: string) => JSX.Element;
6
+ controlComponent?: (onPress: () => void, displayValue?: string) => React.ReactElement;
7
7
  TextComponent?: React.FC<TextProps>;
8
8
  CalendarComponent: React.FC<CalendarProps<T>>;
9
9
  placeholder?: string;
@@ -11,9 +11,9 @@ export interface DatePickerProps<T extends SelectionType> extends InputContainer
11
11
  onBlur?: () => void | never;
12
12
  format?: string;
13
13
  closeOnPick?: boolean;
14
- renderCalendar: (calendar: React.ReactElement, blur?: () => void) => JSX.Element | null;
14
+ renderCalendar: (calendar: React.ReactElement, blur?: () => void) => React.ReactElement | null;
15
15
  requestShowCalendar: () => void;
16
16
  requestCloseCalendar: () => void;
17
17
  }
18
- declare function DatePicker<T extends SelectionType>({ month, year, onChange, value, type, format, placeholder, onFocus, onBlur, disabled, controlComponent, hintComponent, hint, variant, TextComponent, CalendarComponent, rightComponent, style, locale, closeOnPick, renderCalendar, requestShowCalendar, requestCloseCalendar, ...rest }: DatePickerProps<T>): JSX.Element;
18
+ declare function DatePicker<T extends SelectionType>({ month, year, onChange, value, type, format, placeholder, onFocus, onBlur, disabled, controlComponent, hintComponent, hint, variant, TextComponent, CalendarComponent, rightComponent, style, locale, closeOnPick, renderCalendar, requestShowCalendar, requestCloseCalendar, ...rest }: DatePickerProps<T>): React.ReactElement;
19
19
  export default DatePicker;
@@ -3,13 +3,13 @@ import { InputContainerProps } from '../../atoms/Input';
3
3
  import { TextProps } from '../../atoms/Text';
4
4
  import { DateTimeSelectorProps } from '../DateTimeSelector';
5
5
  export interface DateTimePickerProps extends InputContainerProps, Omit<DateTimeSelectorProps, 'style'> {
6
- controlComponent?: (onPress: () => void, displayValue?: string) => JSX.Element;
6
+ controlComponent?: (onPress: () => void, displayValue?: string) => React.ReactElement;
7
7
  TextComponent?: React.FC<TextProps>;
8
8
  DateTimeSelectorComponent: React.FC<DateTimeSelectorProps>;
9
9
  placeholder?: string;
10
10
  onFocus?: () => void | never;
11
11
  onBlur?: () => void | never;
12
- renderSelector: (selector: React.ReactElement, blur?: () => void) => JSX.Element | null;
12
+ renderSelector: (selector: React.ReactElement, blur?: () => void) => React.ReactElement | null;
13
13
  requestShowSelector: () => void;
14
14
  requestCloseSelector: () => void;
15
15
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SpacingType } from '../../../types/defaults';
3
3
  export interface IGrid {
4
- children: JSX.Element[];
4
+ children: React.ReactNode[];
5
5
  layout?: number[][];
6
6
  columns?: number;
7
7
  spacing?: SpacingType | {
@@ -9,9 +9,9 @@ export interface HintInputContainerProps extends PressableInputContainerProps {
9
9
  onPress?: () => void | never;
10
10
  disabled?: boolean;
11
11
  hint?: string;
12
- hintComponent?: JSX.Element;
12
+ hintComponent?: React.ReactNode;
13
13
  variant?: InputVariantType;
14
- rightComponent?: JSX.Element;
14
+ rightComponent?: React.ReactNode;
15
15
  }
16
16
  declare const HintInputContainer: React.FC<HintInputContainerProps>;
17
17
  export default HintInputContainer;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { ColorGradationType, ColorType } from '../../../types/defaults';
4
4
  import { IconProps } from '../../atoms/Icon';
@@ -17,5 +17,5 @@ export interface SnackbarProps {
17
17
  style?: StyleProp<ViewStyle>;
18
18
  children?: ReactNode;
19
19
  }
20
- declare const Snackbar: ({ children, open, onClose, dismissable, timeout, leftIcon, colorTone, colorVariant, rightIcon, anchor, anchorDistance, style, }: SnackbarProps) => JSX.Element;
20
+ declare const Snackbar: ({ children, open, onClose, dismissable, timeout, leftIcon, colorTone, colorVariant, rightIcon, anchor, anchorDistance, style, }: SnackbarProps) => React.ReactElement;
21
21
  export default Snackbar;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tecsinapse/react-core",
3
3
  "description": "Core hybrid React components library",
4
- "version": "3.4.15-beta.0",
4
+ "version": "3.4.15-beta.1",
5
5
  "license": "MIT",
6
6
  "main": "dist/esm/index.js",
7
7
  "module": "dist/esm/index.js",
@@ -35,5 +35,5 @@
35
35
  "react-native": ">=0.72.0",
36
36
  "react-native-vector-icons": "^9.2.0"
37
37
  },
38
- "gitHead": "a79fd28902c6a78bc91feb725354c363d29765d5"
38
+ "gitHead": "31f09f066e7f7ee57e2736d0124f2aeb667c78a9"
39
39
  }