@tecsinapse/react-native-kit 3.5.13 → 3.5.14-beta.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/dist/cjs/components/atoms/Avatar/Avatar.js +2 -2
- package/dist/cjs/components/atoms/Badge/Badge.js +5 -5
- package/dist/cjs/components/atoms/BottomNavigator/BottomNavigator.js +18 -13
- package/dist/cjs/components/atoms/BottomNavigator/Item.js +3 -22
- package/dist/cjs/components/atoms/Button/Button.js +2 -1
- package/dist/cjs/components/atoms/Button/States/Error.js +2 -2
- package/dist/cjs/components/atoms/Button/States/Loading.js +2 -2
- package/dist/cjs/components/atoms/Button/States/Success.js +2 -2
- package/dist/cjs/components/atoms/GroupButton/GroupButtonOption.js +2 -2
- package/dist/cjs/components/atoms/Header/Header.js +10 -25
- package/dist/cjs/components/atoms/Input/Input.js +37 -33
- package/dist/cjs/components/atoms/InputMask/InputMask.js +37 -33
- package/dist/cjs/components/atoms/Modal/ModalGroupManager.js +16 -12
- package/dist/cjs/components/atoms/Modal/ui/BaseModalView.js +16 -13
- package/dist/cjs/components/atoms/Skeleton/Pulse.js +2 -1
- package/dist/cjs/components/atoms/Skeleton/Skeleton.js +30 -25
- package/dist/cjs/components/atoms/Skeleton/Wave.js +2 -1
- package/dist/cjs/components/atoms/SnappingSlider/SnappingSlider.js +19 -18
- package/dist/cjs/components/atoms/Tag/Tag.js +6 -6
- package/dist/cjs/components/atoms/Text/Text.js +2 -2
- package/dist/cjs/components/atoms/TextArea/TextArea.js +19 -19
- package/dist/cjs/components/molecules/Calendar/Calendar.js +2 -2
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js +4 -3
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +6 -5
- package/dist/cjs/components/molecules/DateTimePickerSelector/DateTimePickerSelector.js +46 -58
- package/dist/cjs/components/molecules/Grid/Grid.js +25 -24
- package/dist/cjs/components/molecules/Grid/Item/Item.js +2 -1
- package/dist/cjs/components/molecules/IconTextButton/IconTextButton.js +30 -26
- package/dist/cjs/components/molecules/IconTextButton/TextComponent.js +6 -5
- package/dist/cjs/components/molecules/IconTextButton/styled.js +1 -1
- package/dist/cjs/components/molecules/InputPassword/InputPassword.js +13 -9
- package/dist/cjs/components/molecules/LabeledSwitch/LabelComponent.js +6 -5
- package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js +36 -32
- package/dist/cjs/components/molecules/ScrollableSelector/ScrollableSelector.js +36 -26
- package/dist/cjs/components/molecules/ScrollableSelector/components/DateBlock.js +52 -48
- package/dist/cjs/components/molecules/Select/Select.js +18 -15
- package/dist/cjs/components/molecules/Select/components/Flat.js +2 -1
- package/dist/cjs/components/molecules/Select/components/Modal.js +59 -52
- package/dist/cjs/components/molecules/Select/components/Option.js +26 -26
- package/dist/cjs/components/molecules/Select/components/Section.js +4 -3
- package/dist/cjs/components/molecules/Select/hooks/useModal.js +2 -1
- package/dist/cjs/components/molecules/Select/hooks/useSelect.js +1 -0
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js +2 -2
- package/dist/cjs/utils/date.js +2 -7
- package/dist/esm/components/atoms/Avatar/Avatar.js +2 -2
- package/dist/esm/components/atoms/Badge/Badge.js +5 -5
- package/dist/esm/components/atoms/BottomNavigator/BottomNavigator.js +18 -13
- package/dist/esm/components/atoms/BottomNavigator/Item.js +3 -3
- package/dist/esm/components/atoms/Button/Button.js +3 -2
- package/dist/esm/components/atoms/Button/States/Error.js +2 -2
- package/dist/esm/components/atoms/Button/States/Loading.js +2 -2
- package/dist/esm/components/atoms/Button/States/Success.js +2 -2
- package/dist/esm/components/atoms/GroupButton/GroupButtonOption.js +2 -2
- package/dist/esm/components/atoms/Header/Header.js +10 -6
- package/dist/esm/components/atoms/Input/Input.js +37 -33
- package/dist/esm/components/atoms/InputMask/InputMask.js +37 -33
- package/dist/esm/components/atoms/Modal/ModalGroupManager.js +17 -13
- package/dist/esm/components/atoms/Modal/ui/BaseModalView.js +17 -14
- package/dist/esm/components/atoms/Skeleton/Pulse.js +3 -2
- package/dist/esm/components/atoms/Skeleton/Skeleton.js +31 -26
- package/dist/esm/components/atoms/Skeleton/Wave.js +3 -2
- package/dist/esm/components/atoms/SnappingSlider/SnappingSlider.js +19 -18
- package/dist/esm/components/atoms/Tag/Tag.js +6 -6
- package/dist/esm/components/atoms/Text/Text.js +2 -2
- package/dist/esm/components/atoms/TextArea/TextArea.js +19 -19
- package/dist/esm/components/molecules/Calendar/Calendar.js +2 -2
- package/dist/esm/components/molecules/DatePicker/DatePicker.js +5 -4
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +6 -5
- package/dist/esm/components/molecules/DateTimePickerSelector/DateTimePickerSelector.js +46 -39
- package/dist/esm/components/molecules/Grid/Grid.js +25 -24
- package/dist/esm/components/molecules/Grid/Item/Item.js +2 -1
- package/dist/esm/components/molecules/IconTextButton/IconTextButton.js +30 -26
- package/dist/esm/components/molecules/IconTextButton/TextComponent.js +6 -5
- package/dist/esm/components/molecules/IconTextButton/styled.js +1 -1
- package/dist/esm/components/molecules/InputPassword/InputPassword.js +13 -9
- package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js +6 -5
- package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +36 -32
- package/dist/esm/components/molecules/ScrollableSelector/ScrollableSelector.js +37 -27
- package/dist/esm/components/molecules/ScrollableSelector/components/DateBlock.js +53 -49
- package/dist/esm/components/molecules/Select/Select.js +18 -15
- package/dist/esm/components/molecules/Select/components/Flat.js +2 -1
- package/dist/esm/components/molecules/Select/components/Modal.js +59 -52
- package/dist/esm/components/molecules/Select/components/Option.js +26 -26
- package/dist/esm/components/molecules/Select/components/Section.js +5 -4
- package/dist/esm/components/molecules/Select/hooks/useModal.js +2 -1
- package/dist/esm/components/molecules/Select/hooks/useSelect.js +1 -0
- package/dist/esm/components/molecules/Snackbar/Snackbar.js +2 -2
- package/dist/esm/utils/date.js +2 -7
- package/dist/types/components/atoms/Skeleton/Pulse.d.ts +1 -2
- package/dist/types/components/atoms/Skeleton/Wave.d.ts +1 -2
- package/dist/types/components/molecules/Select/hooks/useModal.d.ts +1 -1
- package/package.json +2 -2
package/dist/cjs/utils/date.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var reactNative = require('react-native');
|
|
4
3
|
var dateFnsLocales = require('date-fns/locale');
|
|
4
|
+
var reactNative = require('react-native');
|
|
5
5
|
|
|
6
6
|
function _interopNamespaceDefault(e) {
|
|
7
7
|
var n = Object.create(null);
|
|
@@ -23,12 +23,7 @@ function _interopNamespaceDefault(e) {
|
|
|
23
23
|
var dateFnsLocales__namespace = /*#__PURE__*/_interopNamespaceDefault(dateFnsLocales);
|
|
24
24
|
|
|
25
25
|
const getLocale = () => {
|
|
26
|
-
|
|
27
|
-
if (reactNative.Platform.OS === "ios") {
|
|
28
|
-
locale = reactNative.NativeModules.SettingsManager.settings.AppleLocale || reactNative.NativeModules.SettingsManager.settings.AppleLanguages[0];
|
|
29
|
-
} else {
|
|
30
|
-
locale = reactNative.NativeModules.I18nManager.localeIdentifier;
|
|
31
|
-
}
|
|
26
|
+
const locale = reactNative.I18nManager.getConstants().localeIdentifier ?? "pt_BR";
|
|
32
27
|
const code = locale.replace("_", "");
|
|
33
28
|
return dateFnsLocales__namespace[code];
|
|
34
29
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Avatar as Avatar$1 } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import Text from '../Text/Text.js';
|
|
4
4
|
|
|
5
5
|
const Avatar = (props) => {
|
|
6
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsx(Avatar$1, { ...props, TextComponent: Text });
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { Avatar as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Badge as Badge$1 } from '@tecsinapse/react-core';
|
|
3
3
|
import Text from '../Text/Text.js';
|
|
4
4
|
|
|
@@ -8,13 +8,13 @@ const Badge = ({
|
|
|
8
8
|
value,
|
|
9
9
|
...props
|
|
10
10
|
}) => {
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
12
|
Badge$1,
|
|
13
13
|
{
|
|
14
14
|
...props,
|
|
15
|
-
value: /* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
value: /* @__PURE__ */ jsx(Text, { fontColor, fontWeight: "bold", typography: "label", children: value }),
|
|
16
|
+
children
|
|
17
|
+
}
|
|
18
18
|
);
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { StyledView, TabContainer } from './styled.js';
|
|
3
4
|
import Item from './Item.js';
|
|
@@ -9,21 +10,25 @@ function BottomNavigator({
|
|
|
9
10
|
children,
|
|
10
11
|
...rest
|
|
11
12
|
}) {
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsx(StyledView, { ...rest, children: React.Children.map(children, (child) => {
|
|
13
14
|
const { value, label, labelProps, labelElement } = child.props;
|
|
14
15
|
const isSelected = value == selected;
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
return /* @__PURE__ */ jsxs(TabContainer, { selected: isSelected, onPress: () => onSelect(value), children: [
|
|
17
|
+
React.cloneElement(child, {
|
|
18
|
+
_selected: isSelected
|
|
19
|
+
}),
|
|
20
|
+
label && !labelElement && /* @__PURE__ */ jsx(
|
|
21
|
+
Text,
|
|
22
|
+
{
|
|
23
|
+
colorVariant: labelProps?.colorVariant || isSelected ? "primary" : "secondary",
|
|
24
|
+
typography: labelProps?.typography || "sub",
|
|
25
|
+
...labelProps,
|
|
26
|
+
children: label
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
labelElement && labelElement
|
|
30
|
+
] });
|
|
31
|
+
}) });
|
|
27
32
|
}
|
|
28
33
|
BottomNavigator.Item = Item;
|
|
29
34
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Icon } from '@tecsinapse/react-core';
|
|
3
3
|
import { TabContent, CustomTabContent } from './styled.js';
|
|
4
4
|
|
|
@@ -11,9 +11,9 @@ function Item({
|
|
|
11
11
|
const styledButtonStyle = _selected ? void 0 : { backgroundColor: "transparent" };
|
|
12
12
|
const iconColorVariant = _selected ? "primary" : "secondary";
|
|
13
13
|
if (icon) {
|
|
14
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ jsx(TabContent, { style: styledButtonStyle, ...rest, children: /* @__PURE__ */ jsx(Icon, { colorVariant: iconColorVariant, size: "centi", ...icon }) });
|
|
15
15
|
} else {
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(CustomTabContent, { children });
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Button as Button$1 } from '@tecsinapse/react-core';
|
|
2
|
-
import
|
|
3
|
+
import { useCallback } from 'react';
|
|
3
4
|
import { Keyboard } from 'react-native';
|
|
4
5
|
|
|
5
6
|
const Button = ({
|
|
@@ -14,7 +15,7 @@ const Button = ({
|
|
|
14
15
|
},
|
|
15
16
|
[onPress]
|
|
16
17
|
);
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ jsx(Button$1, { ...others, onPress: handleOnPress });
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export { Button };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Error as Error$1 } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import Text from '../../Text/Text.js';
|
|
4
4
|
|
|
5
5
|
const Error = (props) => {
|
|
6
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsx(Error$1, { ...props, textComponent: Text });
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { Error as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Loading as Loading$1 } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import Text from '../../Text/Text.js';
|
|
4
4
|
|
|
5
5
|
const Loading = (props) => {
|
|
6
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsx(Loading$1, { ...props, textComponent: Text });
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { Loading as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Success as Success$1 } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import Text from '../../Text/Text.js';
|
|
4
4
|
|
|
5
5
|
const Success = (props) => {
|
|
6
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsx(Success$1, { ...props, textComponent: Text });
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { Success as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { GroupButtonOption as GroupButtonOption$1 } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import Text from '../Text/Text.js';
|
|
4
4
|
|
|
5
5
|
const GroupButtonOption = (props) => {
|
|
6
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsx(GroupButtonOption$1, { ...props, TextComponent: Text });
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { GroupButtonOption as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import { StyledView, Dummy, FloatingButton } from './styled.js';
|
|
2
3
|
import { Icon } from '@tecsinapse/react-core';
|
|
3
|
-
import * as React from 'react';
|
|
4
4
|
import Badge from '../Badge/Badge.js';
|
|
5
5
|
|
|
6
6
|
const Header = ({
|
|
@@ -9,17 +9,21 @@ const Header = ({
|
|
|
9
9
|
children,
|
|
10
10
|
...rest
|
|
11
11
|
}) => {
|
|
12
|
-
const ButtonBase = ({ button }) => /* @__PURE__ */
|
|
12
|
+
const ButtonBase = ({ button }) => /* @__PURE__ */ jsx(
|
|
13
13
|
FloatingButton,
|
|
14
14
|
{
|
|
15
15
|
...button,
|
|
16
16
|
variant: button?.variant || "filled",
|
|
17
17
|
color: button?.color || "primary",
|
|
18
|
-
size: button?.size || "small"
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
size: button?.size || "small",
|
|
19
|
+
children: button?.icon && /* @__PURE__ */ jsx(Icon, { ...button?.icon })
|
|
20
|
+
}
|
|
21
21
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsxs(StyledView, { ...rest, children: [
|
|
23
|
+
leftButton ? /* @__PURE__ */ jsx(Fragment, { children: leftButton?.valueBadge ? /* @__PURE__ */ jsx(Badge, { value: leftButton.valueBadge, color: "error", children: /* @__PURE__ */ jsx(ButtonBase, { button: leftButton }) }) : /* @__PURE__ */ jsx(ButtonBase, { button: leftButton }) }) : /* @__PURE__ */ jsx(Dummy, { disabled: true }),
|
|
24
|
+
children,
|
|
25
|
+
rightButton ? /* @__PURE__ */ jsx(Fragment, { children: rightButton?.valueBadge ? /* @__PURE__ */ jsx(Badge, { value: rightButton.valueBadge, color: "error", children: /* @__PURE__ */ jsx(ButtonBase, { button: rightButton }) }) : /* @__PURE__ */ jsx(ButtonBase, { button: rightButton }) }) : /* @__PURE__ */ jsx(Dummy, { disabled: true })
|
|
26
|
+
] });
|
|
23
27
|
};
|
|
24
28
|
|
|
25
29
|
export { Header as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { useInputFocus, RFValue, InputContainer, Hint } from '@tecsinapse/react-core';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import { View } from 'react-native';
|
|
@@ -30,7 +31,7 @@ const Input = React__default.forwardRef(
|
|
|
30
31
|
placeholder,
|
|
31
32
|
...rest
|
|
32
33
|
}, ref) => {
|
|
33
|
-
const _hint = hintComponent || /* @__PURE__ */
|
|
34
|
+
const _hint = hintComponent || /* @__PURE__ */ jsx(Hint, { TextComponent: Text, text: hint, variant });
|
|
34
35
|
const { focused, handleBlur, handleFocus } = useInputFocus(
|
|
35
36
|
onFocus,
|
|
36
37
|
onBlur,
|
|
@@ -41,41 +42,44 @@ const Input = React__default.forwardRef(
|
|
|
41
42
|
...{ inputContainerStyle }
|
|
42
43
|
};
|
|
43
44
|
const onlyLabel = label && !placeholder;
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
label: value ? label : void 0,
|
|
48
|
-
labelColor,
|
|
49
|
-
labelColorVariant,
|
|
50
|
-
labelColorTone,
|
|
51
|
-
labelTypography,
|
|
52
|
-
labelStack,
|
|
53
|
-
labelWeight,
|
|
54
|
-
LabelComponent: Text,
|
|
55
|
-
leftComponent,
|
|
56
|
-
rightComponent,
|
|
57
|
-
borderColor,
|
|
58
|
-
borderColorGradation,
|
|
59
|
-
inputContainerStyle: internalStyle,
|
|
60
|
-
focused,
|
|
61
|
-
disabled,
|
|
62
|
-
variant
|
|
63
|
-
},
|
|
64
|
-
/* @__PURE__ */ React__default.createElement(
|
|
65
|
-
StyledNativeInput,
|
|
45
|
+
return /* @__PURE__ */ jsxs(View, { children: [
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
InputContainer,
|
|
66
48
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
49
|
+
label: value ? label : void 0,
|
|
50
|
+
labelColor,
|
|
51
|
+
labelColorVariant,
|
|
52
|
+
labelColorTone,
|
|
53
|
+
labelTypography,
|
|
54
|
+
labelStack,
|
|
55
|
+
labelWeight,
|
|
56
|
+
LabelComponent: Text,
|
|
57
|
+
leftComponent,
|
|
58
|
+
rightComponent,
|
|
59
|
+
borderColor,
|
|
60
|
+
borderColorGradation,
|
|
61
|
+
inputContainerStyle: internalStyle,
|
|
62
|
+
focused,
|
|
73
63
|
disabled,
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
variant,
|
|
65
|
+
children: /* @__PURE__ */ jsx(
|
|
66
|
+
StyledNativeInput,
|
|
67
|
+
{
|
|
68
|
+
...rest,
|
|
69
|
+
placeholder: onlyLabel ? label : placeholder,
|
|
70
|
+
value,
|
|
71
|
+
ref,
|
|
72
|
+
fontStack: inputFontStack,
|
|
73
|
+
fontWeight: inputFontWeight,
|
|
74
|
+
disabled,
|
|
75
|
+
onFocus: handleFocus,
|
|
76
|
+
onBlur: handleBlur
|
|
77
|
+
}
|
|
78
|
+
)
|
|
76
79
|
}
|
|
77
|
-
)
|
|
78
|
-
|
|
80
|
+
),
|
|
81
|
+
hint && _hint
|
|
82
|
+
] });
|
|
79
83
|
}
|
|
80
84
|
);
|
|
81
85
|
Input.displayName = "Input";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { useInputFocus, Hint } from '@tecsinapse/react-core';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import { View } from 'react-native';
|
|
@@ -31,48 +32,51 @@ const InputMask = React__default.forwardRef(
|
|
|
31
32
|
placeholder,
|
|
32
33
|
...rest
|
|
33
34
|
}, ref) => {
|
|
34
|
-
const _hint = hintComponent || /* @__PURE__ */
|
|
35
|
+
const _hint = hintComponent || /* @__PURE__ */ jsx(Hint, { TextComponent: Text, text: hint, variant });
|
|
35
36
|
const { focused, handleBlur, handleFocus } = useInputFocus(
|
|
36
37
|
onFocus,
|
|
37
38
|
onBlur,
|
|
38
39
|
!disabled
|
|
39
40
|
);
|
|
40
41
|
const onlyLabel = label && !placeholder;
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
label: String(value) ? label : void 0,
|
|
45
|
-
labelColor,
|
|
46
|
-
labelColorVariant,
|
|
47
|
-
labelColorTone,
|
|
48
|
-
labelTypography,
|
|
49
|
-
labelStack,
|
|
50
|
-
labelWeight,
|
|
51
|
-
LabelComponent: Text,
|
|
52
|
-
leftComponent,
|
|
53
|
-
rightComponent,
|
|
54
|
-
borderColor,
|
|
55
|
-
borderColorGradation,
|
|
56
|
-
inputContainerStyle,
|
|
57
|
-
focused,
|
|
58
|
-
disabled,
|
|
59
|
-
variant
|
|
60
|
-
},
|
|
61
|
-
/* @__PURE__ */ React__default.createElement(
|
|
62
|
-
StyledNativeInputMask,
|
|
42
|
+
return /* @__PURE__ */ jsxs(View, { style, children: [
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
StyledInputContainer,
|
|
63
45
|
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
46
|
+
label: String(value) ? label : void 0,
|
|
47
|
+
labelColor,
|
|
48
|
+
labelColorVariant,
|
|
49
|
+
labelColorTone,
|
|
50
|
+
labelTypography,
|
|
51
|
+
labelStack,
|
|
52
|
+
labelWeight,
|
|
53
|
+
LabelComponent: Text,
|
|
54
|
+
leftComponent,
|
|
55
|
+
rightComponent,
|
|
56
|
+
borderColor,
|
|
57
|
+
borderColorGradation,
|
|
58
|
+
inputContainerStyle,
|
|
59
|
+
focused,
|
|
70
60
|
disabled,
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
variant,
|
|
62
|
+
children: /* @__PURE__ */ jsx(
|
|
63
|
+
StyledNativeInputMask,
|
|
64
|
+
{
|
|
65
|
+
...rest,
|
|
66
|
+
placeholder: onlyLabel ? label : placeholder,
|
|
67
|
+
value,
|
|
68
|
+
ref,
|
|
69
|
+
fontStack: inputFontStack,
|
|
70
|
+
fontWeight: inputFontWeight,
|
|
71
|
+
disabled,
|
|
72
|
+
onFocus: handleFocus,
|
|
73
|
+
onBlur: handleBlur
|
|
74
|
+
}
|
|
75
|
+
)
|
|
73
76
|
}
|
|
74
|
-
)
|
|
75
|
-
|
|
77
|
+
),
|
|
78
|
+
hint && _hint
|
|
79
|
+
] });
|
|
76
80
|
}
|
|
77
81
|
);
|
|
78
82
|
InputMask.displayName = "InputMask";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Modal } from 'react-native';
|
|
3
4
|
import { createModalLifecycleHandler } from './ModalLifecycleHandler.js';
|
|
4
5
|
|
|
@@ -7,18 +8,21 @@ const ModalGroupManager = ({ children, ...others }) => {
|
|
|
7
8
|
modalLifecycle.attach(useState([]));
|
|
8
9
|
const _render = modalLifecycle.render();
|
|
9
10
|
const hasModals = _render.length > 0;
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
|
+
children,
|
|
13
|
+
/* @__PURE__ */ jsx(
|
|
14
|
+
Modal,
|
|
15
|
+
{
|
|
16
|
+
transparent: true,
|
|
17
|
+
statusBarTranslucent: true,
|
|
18
|
+
animationType: "none",
|
|
19
|
+
visible: hasModals,
|
|
20
|
+
onRequestClose: modalLifecycle.closeLastOpenedModal,
|
|
21
|
+
...others,
|
|
22
|
+
children: _render
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
] });
|
|
22
26
|
};
|
|
23
27
|
|
|
24
28
|
export { ModalGroupManager, modalLifecycle };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import { BoxContent } from '@tecsinapse/react-core';
|
|
2
|
-
import
|
|
3
|
+
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
3
4
|
import { Animated, Easing, Keyboard, Pressable, Dimensions, StatusBar } from 'react-native';
|
|
4
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
6
|
import { StyledPressableBackDrop, BackDropView, CloseBar } from './styled.js';
|
|
@@ -119,26 +120,28 @@ const ModalView = ({
|
|
|
119
120
|
hideEvent.remove();
|
|
120
121
|
};
|
|
121
122
|
}, []);
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
+
return /* @__PURE__ */ jsx(StyledPressableBackDrop, { onPress: !frozen ? close : void 0, children: /* @__PURE__ */ jsx(BackDropView, { style: { backgroundColor: backgroundInterpolation }, children: /* @__PURE__ */ jsx(
|
|
123
124
|
Animated.View,
|
|
124
125
|
{
|
|
125
126
|
style: {
|
|
126
127
|
paddingBottom: isLastShown ? getKeyboardHeight(keyboardOpened) : 0,
|
|
127
128
|
opacity: opacityCarrier,
|
|
128
129
|
transform: [{ translateY: translationCarrier }]
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
/* @__PURE__ */ React__default.createElement(Pressable, null, /* @__PURE__ */ React__default.createElement(
|
|
132
|
-
BoxComponent,
|
|
133
|
-
{
|
|
134
|
-
onLayout: handleBoxLayoutChanges,
|
|
135
|
-
style: { paddingBottom: offset },
|
|
136
|
-
variant: "bottom"
|
|
137
130
|
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
131
|
+
children: /* @__PURE__ */ jsx(Pressable, { children: /* @__PURE__ */ jsxs(
|
|
132
|
+
BoxComponent,
|
|
133
|
+
{
|
|
134
|
+
onLayout: handleBoxLayoutChanges,
|
|
135
|
+
style: { paddingBottom: offset },
|
|
136
|
+
variant: "bottom",
|
|
137
|
+
children: [
|
|
138
|
+
showCloseBar && /* @__PURE__ */ jsx(CloseBar, {}),
|
|
139
|
+
children
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
) })
|
|
143
|
+
}
|
|
144
|
+
) }) });
|
|
142
145
|
};
|
|
143
146
|
|
|
144
147
|
export { ModalView };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Animated } from 'react-native';
|
|
2
|
-
import
|
|
3
|
+
import { useRef, useEffect } from 'react';
|
|
3
4
|
import { pulseAnimation } from './animation.js';
|
|
4
5
|
|
|
5
6
|
const Pulse = ({
|
|
@@ -12,7 +13,7 @@ const Pulse = ({
|
|
|
12
13
|
useEffect(() => {
|
|
13
14
|
pulseAnimation(active, animatedValue);
|
|
14
15
|
}, [active]);
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
16
17
|
Animated.View,
|
|
17
18
|
{
|
|
18
19
|
style: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { View } from 'react-native';
|
|
3
4
|
import { Wrapper } from './styled.js';
|
|
4
5
|
import { Wave } from './Wave.js';
|
|
@@ -27,31 +28,35 @@ const Skeleton = ({
|
|
|
27
28
|
const getChildrenLayout = (event) => {
|
|
28
29
|
setChildrenLayout(event.nativeEvent.layout);
|
|
29
30
|
};
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
31
|
+
return /* @__PURE__ */ jsxs(Wrapper, { width, height, radius, ...rest, children: [
|
|
32
|
+
active && animation === "wave" ? /* @__PURE__ */ jsx(
|
|
33
|
+
Wave,
|
|
34
|
+
{
|
|
35
|
+
active,
|
|
36
|
+
width,
|
|
37
|
+
height,
|
|
38
|
+
childrenLayout
|
|
39
|
+
}
|
|
40
|
+
) : /* @__PURE__ */ jsx(Fragment, {}),
|
|
41
|
+
active && animation === "pulse" ? /* @__PURE__ */ jsx(
|
|
42
|
+
Pulse,
|
|
43
|
+
{
|
|
44
|
+
active,
|
|
45
|
+
width,
|
|
46
|
+
height,
|
|
47
|
+
childrenLayout
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ jsx(Fragment, {}),
|
|
50
|
+
/* @__PURE__ */ jsx(
|
|
51
|
+
View,
|
|
52
|
+
{
|
|
53
|
+
onLayout: (event) => getChildrenLayout(event),
|
|
54
|
+
style: { opacity: active ? 0 : 1 },
|
|
55
|
+
pointerEvents: active ? "none" : "auto",
|
|
56
|
+
children
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] });
|
|
55
60
|
};
|
|
56
61
|
|
|
57
62
|
export { Skeleton as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
2
3
|
import { Animated } from 'react-native';
|
|
3
4
|
import * as RNGradient from 'react-native-linear-gradient';
|
|
4
5
|
import { waveAnimation } from './animation.js';
|
|
@@ -21,7 +22,7 @@ const Wave = ({
|
|
|
21
22
|
useEffect(() => {
|
|
22
23
|
waveAnimation(active, animatedValue);
|
|
23
24
|
}, [active]);
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
25
26
|
AnimatedLinearGradient,
|
|
26
27
|
{
|
|
27
28
|
colors: [
|