@tecsinapse/react-native-kit 3.5.13-beta.0 → 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 +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { Dimensions, ScrollView, View } from 'react-native';
|
|
3
4
|
import { extractNumbersFromString } from '@tecsinapse/react-core';
|
|
@@ -22,7 +23,7 @@ const SnappingSlider = ({
|
|
|
22
23
|
const padCompensation = horizontalPadding * Math.sign(index);
|
|
23
24
|
return offset + padCompensation;
|
|
24
25
|
});
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
26
27
|
ScrollView,
|
|
27
28
|
{
|
|
28
29
|
horizontal: true,
|
|
@@ -30,24 +31,24 @@ const SnappingSlider = ({
|
|
|
30
31
|
snapToStart: true,
|
|
31
32
|
snapToEnd: true,
|
|
32
33
|
showsHorizontalScrollIndicator: false,
|
|
33
|
-
...rest
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
...rest,
|
|
35
|
+
children: React.Children.map(children, (child, index) => {
|
|
36
|
+
const isFirst = index === 0;
|
|
37
|
+
const isLast = index === childCount - 1;
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
View,
|
|
40
|
+
{
|
|
41
|
+
style: {
|
|
42
|
+
width: totalSlideWidth,
|
|
43
|
+
paddingHorizontal: horizontalPadding,
|
|
44
|
+
paddingLeft: isFirst ? 0 : horizontalPadding,
|
|
45
|
+
paddingRight: isLast ? 0 : horizontalPadding
|
|
46
|
+
},
|
|
47
|
+
children: child
|
|
46
48
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})
|
|
49
|
+
);
|
|
50
|
+
})
|
|
51
|
+
}
|
|
51
52
|
);
|
|
52
53
|
};
|
|
53
54
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Tag as Tag$1 } from '@tecsinapse/react-core';
|
|
3
3
|
import Text from '../Text/Text.js';
|
|
4
4
|
|
|
5
5
|
const Tag = ({ value, ...rest }) => {
|
|
6
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
7
|
Tag$1,
|
|
8
8
|
{
|
|
9
|
-
value: /* @__PURE__ */
|
|
9
|
+
value: /* @__PURE__ */ jsx(
|
|
10
10
|
Text,
|
|
11
11
|
{
|
|
12
12
|
colorVariant: "secondary",
|
|
13
13
|
colorTone: "dark",
|
|
14
14
|
fontStack: "default",
|
|
15
15
|
fontWeight: "bold",
|
|
16
|
-
typography: rest.variant === "small" ? "sub" : "base"
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
typography: rest.variant === "small" ? "sub" : "base",
|
|
17
|
+
children: value
|
|
18
|
+
}
|
|
19
19
|
),
|
|
20
20
|
...rest
|
|
21
21
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { StyledNativeText } from './styled.js';
|
|
3
3
|
|
|
4
4
|
const Text = ({ children, ...rest }) => {
|
|
5
|
-
return /* @__PURE__ */
|
|
5
|
+
return /* @__PURE__ */ jsx(StyledNativeText, { ...rest, children });
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export { Text as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useInputFocus, TextArea as TextArea$1 } from '@tecsinapse/react-core';
|
|
3
3
|
import Text from '../Text/Text.js';
|
|
4
4
|
import { StyledNativeInput } from './styled.js';
|
|
@@ -34,7 +34,7 @@ const TextArea = ({
|
|
|
34
34
|
onBlur,
|
|
35
35
|
!disabled
|
|
36
36
|
);
|
|
37
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
38
|
TextArea$1,
|
|
39
39
|
{
|
|
40
40
|
label,
|
|
@@ -58,23 +58,23 @@ const TextArea = ({
|
|
|
58
58
|
hint,
|
|
59
59
|
style,
|
|
60
60
|
TextComponent: Text,
|
|
61
|
-
maxLength
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
61
|
+
maxLength,
|
|
62
|
+
children: /* @__PURE__ */ jsx(
|
|
63
|
+
StyledNativeInput,
|
|
64
|
+
{
|
|
65
|
+
...rest,
|
|
66
|
+
fontStack: inputFontStack,
|
|
67
|
+
fontWeight: inputFontWeight,
|
|
68
|
+
disabled,
|
|
69
|
+
onFocus: handleFocus,
|
|
70
|
+
onBlur: handleBlur,
|
|
71
|
+
textAlignVertical: "top",
|
|
72
|
+
multiline: true,
|
|
73
|
+
value,
|
|
74
|
+
maxLength
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
78
|
);
|
|
79
79
|
};
|
|
80
80
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Calendar as Calendar$1 } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import { getLocale } from '../../../utils/date.js';
|
|
4
4
|
import Text from '../../atoms/Text/Text.js';
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ const Calendar = ({
|
|
|
7
7
|
locale,
|
|
8
8
|
...rest
|
|
9
9
|
}) => {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
11
|
Calendar$1,
|
|
12
12
|
{
|
|
13
13
|
...rest,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { DatePicker as DatePicker$1 } from '@tecsinapse/react-core';
|
|
2
|
-
import
|
|
3
|
+
import { useMemo } from 'react';
|
|
3
4
|
import { getLocale } from '../../../utils/date.js';
|
|
4
5
|
import 'react-native';
|
|
5
6
|
import { ModalView } from '../../atoms/Modal/ui/BaseModalView.js';
|
|
@@ -42,7 +43,7 @@ const DatePicker = ({
|
|
|
42
43
|
}
|
|
43
44
|
return void 0;
|
|
44
45
|
}, [value]);
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
46
47
|
DatePicker$1,
|
|
47
48
|
{
|
|
48
49
|
...rest,
|
|
@@ -56,12 +57,12 @@ const DatePicker = ({
|
|
|
56
57
|
onChange: handleChange,
|
|
57
58
|
requestShowCalendar: modal.show,
|
|
58
59
|
requestCloseCalendar: modal.close,
|
|
59
|
-
renderCalendar: (calendar, blur) => modal.sync(/* @__PURE__ */
|
|
60
|
+
renderCalendar: (calendar, blur) => modal.sync(/* @__PURE__ */ jsx(NativeModal, { onClose: blur, children: calendar }))
|
|
60
61
|
}
|
|
61
62
|
);
|
|
62
63
|
};
|
|
63
64
|
const NativeModal = ({ children, ...others }) => {
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ jsx(ModalView, { BoxComponent: CalendarBoxContent, ...others, children });
|
|
65
66
|
};
|
|
66
67
|
|
|
67
68
|
export { DatePicker };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { DateTimePicker as DateTimePicker$1, ControlledDateTimeSelector } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import { getLocale } from '../../../utils/date.js';
|
|
4
|
+
import 'react';
|
|
4
5
|
import 'react-native';
|
|
5
6
|
import { ModalView } from '../../atoms/Modal/ui/BaseModalView.js';
|
|
6
7
|
import { useLazyModalManager } from '../../atoms/Modal/useLazyModalManager.js';
|
|
@@ -12,12 +13,12 @@ const DateTimePicker = ({
|
|
|
12
13
|
...rest
|
|
13
14
|
}) => {
|
|
14
15
|
const modal = useLazyModalManager();
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
16
17
|
DateTimePicker$1,
|
|
17
18
|
{
|
|
18
19
|
...rest,
|
|
19
20
|
TextComponent: Text,
|
|
20
|
-
DateTimeSelectorComponent: (props) => /* @__PURE__ */
|
|
21
|
+
DateTimeSelectorComponent: (props) => /* @__PURE__ */ jsx(
|
|
21
22
|
ControlledDateTimeSelector,
|
|
22
23
|
{
|
|
23
24
|
SelectorComponent: DateTimePickerSelector,
|
|
@@ -27,12 +28,12 @@ const DateTimePicker = ({
|
|
|
27
28
|
locale: locale ?? getLocale(),
|
|
28
29
|
requestShowSelector: modal.show,
|
|
29
30
|
requestCloseSelector: modal.close,
|
|
30
|
-
renderSelector: (selector, blur) => modal.sync(/* @__PURE__ */
|
|
31
|
+
renderSelector: (selector, blur) => modal.sync(/* @__PURE__ */ jsx(NativeModal, { onClose: blur, children: selector }))
|
|
31
32
|
}
|
|
32
33
|
);
|
|
33
34
|
};
|
|
34
35
|
const NativeModal = ({ children, ...others }) => {
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsx(ModalView, { ...others, children });
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
export { DateTimePicker };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Button } from '../../atoms/Button/Button.js';
|
|
3
3
|
import { Icon } from '@tecsinapse/react-core';
|
|
4
4
|
import Text from '../../atoms/Text/Text.js';
|
|
@@ -26,44 +26,51 @@ const DateTimePickerSelector = ({
|
|
|
26
26
|
minuteLabel,
|
|
27
27
|
...rest
|
|
28
28
|
}) => {
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
29
|
+
return /* @__PURE__ */ jsxs(Root, { ...rest, children: [
|
|
30
|
+
/* @__PURE__ */ jsxs(Header, { children: [
|
|
31
|
+
currentMode === 1 && /* @__PURE__ */ jsx(BackButton, { onPress: handlePressBack, children: /* @__PURE__ */ jsx(
|
|
32
|
+
Icon,
|
|
33
|
+
{
|
|
34
|
+
type: "material-community",
|
|
35
|
+
name: "chevron-left",
|
|
36
|
+
size: "mega",
|
|
37
|
+
colorVariant: "secondary"
|
|
38
|
+
}
|
|
39
|
+
) }),
|
|
40
|
+
/* @__PURE__ */ jsx(TextComponent, { typography: "base", colorVariant: "secondary", children: modalTitle })
|
|
41
|
+
] }),
|
|
42
|
+
isDate ? /* @__PURE__ */ jsx(
|
|
43
|
+
Calendar,
|
|
44
|
+
{
|
|
45
|
+
type: "day",
|
|
46
|
+
value: date,
|
|
47
|
+
onChange: handleCalendarChange,
|
|
48
|
+
year: date.getFullYear(),
|
|
49
|
+
month: date.getMonth()
|
|
50
|
+
}
|
|
51
|
+
) : isMonth ? /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(
|
|
52
|
+
ScrollableSelector,
|
|
53
|
+
{
|
|
54
|
+
onChange: setDate,
|
|
55
|
+
value: date,
|
|
56
|
+
yearLabel,
|
|
57
|
+
monthLabel,
|
|
58
|
+
format: "MM-yyyy",
|
|
59
|
+
locale: locale ?? getLocale()
|
|
60
|
+
}
|
|
61
|
+
) }) : /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(
|
|
62
|
+
ScrollableSelector,
|
|
63
|
+
{
|
|
64
|
+
onChange: setDate,
|
|
65
|
+
value: date,
|
|
66
|
+
hourLabel,
|
|
67
|
+
minuteLabel,
|
|
68
|
+
format: "HH-mm",
|
|
69
|
+
locale: locale ?? getLocale()
|
|
70
|
+
}
|
|
71
|
+
) }),
|
|
72
|
+
/* @__PURE__ */ jsx(Button, { color: "primary", onPress: handlePressConfirm, children: /* @__PURE__ */ jsx(TextComponent, { fontWeight: "bold", fontColor: "light", children: confirmButtonText || "OK" }) })
|
|
73
|
+
] });
|
|
67
74
|
};
|
|
68
75
|
|
|
69
76
|
export { DateTimePickerSelector as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { View } from 'react-native';
|
|
3
4
|
import GridItem from './Item/Item.js';
|
|
@@ -12,7 +13,7 @@ const Grid = ({
|
|
|
12
13
|
}) => {
|
|
13
14
|
if (layout) {
|
|
14
15
|
const flatLayout = layout.flat();
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
16
17
|
View,
|
|
17
18
|
{
|
|
18
19
|
style: [
|
|
@@ -23,21 +24,21 @@ const Grid = ({
|
|
|
23
24
|
flexWrap: "wrap"
|
|
24
25
|
}
|
|
25
26
|
],
|
|
26
|
-
...rest
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
...rest,
|
|
28
|
+
children: React__default.Children.map(children, (child, index) => /* @__PURE__ */ jsx(
|
|
29
|
+
GridItem,
|
|
30
|
+
{
|
|
31
|
+
columns,
|
|
32
|
+
span: flatLayout[index],
|
|
33
|
+
spacing,
|
|
34
|
+
children: child
|
|
35
|
+
},
|
|
36
|
+
`child-${index}`
|
|
37
|
+
))
|
|
38
|
+
}
|
|
38
39
|
);
|
|
39
40
|
}
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
41
42
|
View,
|
|
42
43
|
{
|
|
43
44
|
style: [
|
|
@@ -48,16 +49,16 @@ const Grid = ({
|
|
|
48
49
|
flexWrap: "wrap"
|
|
49
50
|
}
|
|
50
51
|
],
|
|
51
|
-
...rest
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})
|
|
60
|
-
}
|
|
52
|
+
...rest,
|
|
53
|
+
children: React__default.Children.map(children, (child, index) => {
|
|
54
|
+
return React__default.cloneElement(child, {
|
|
55
|
+
...child?.props,
|
|
56
|
+
columns,
|
|
57
|
+
spacing: child?.props.spacing ?? spacing,
|
|
58
|
+
key: `child-${index}`
|
|
59
|
+
});
|
|
60
|
+
})
|
|
61
|
+
}
|
|
61
62
|
);
|
|
62
63
|
};
|
|
63
64
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { View } from 'react-native';
|
|
3
4
|
import { useTheme, getGridItemColumSpan, getGridItemPadding } from '@tecsinapse/react-core';
|
|
@@ -49,7 +50,7 @@ const GridItem = ({
|
|
|
49
50
|
...children?.props,
|
|
50
51
|
style: wrapper ? children?.props.style : { ..._style, ...children?.props.style }
|
|
51
52
|
});
|
|
52
|
-
return wrapper ? /* @__PURE__ */
|
|
53
|
+
return wrapper ? /* @__PURE__ */ jsx(View, { ...rest, style: [style, _style], children: clone }) : clone;
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
export { GridItem as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import { IconComponent, fontColorVC } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import { StyledIconTextButton } from './styled.js';
|
|
4
4
|
import TextComponent from './TextComponent.js';
|
|
5
5
|
|
|
@@ -12,31 +12,35 @@ const IconTextButton = ({
|
|
|
12
12
|
size = "default",
|
|
13
13
|
...rest
|
|
14
14
|
}) => {
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
15
|
+
return /* @__PURE__ */ jsxs(StyledIconTextButton, { boxed: !label, variant, ...rest, children: [
|
|
16
|
+
iconPosition === "left" ? /* @__PURE__ */ jsx(
|
|
17
|
+
IconComponent,
|
|
18
|
+
{
|
|
19
|
+
iconProps,
|
|
20
|
+
size,
|
|
21
|
+
defaultFontColor: fontColorVC[variant]
|
|
22
|
+
}
|
|
23
|
+
) : /* @__PURE__ */ jsx(Fragment, {}),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
TextComponent,
|
|
26
|
+
{
|
|
27
|
+
label,
|
|
28
|
+
defaultFontColor: fontColorVC[variant],
|
|
29
|
+
hasIcon: !!iconProps,
|
|
30
|
+
iconPosition,
|
|
31
|
+
textProps,
|
|
32
|
+
size
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
iconPosition === "right" ? /* @__PURE__ */ jsx(
|
|
36
|
+
IconComponent,
|
|
37
|
+
{
|
|
38
|
+
iconProps,
|
|
39
|
+
size,
|
|
40
|
+
defaultFontColor: fontColorVC[variant]
|
|
41
|
+
}
|
|
42
|
+
) : /* @__PURE__ */ jsx(Fragment, {})
|
|
43
|
+
] });
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
export { IconTextButton as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { StyledText } from './styled.js';
|
|
3
4
|
|
|
@@ -9,7 +10,7 @@ const TextComponent = ({
|
|
|
9
10
|
iconPosition = "left",
|
|
10
11
|
hasIcon = false
|
|
11
12
|
}) => {
|
|
12
|
-
return label ? /* @__PURE__ */
|
|
13
|
+
return label ? /* @__PURE__ */ jsx(
|
|
13
14
|
StyledText,
|
|
14
15
|
{
|
|
15
16
|
typography: textProps?.typography ?? size === "small" ? "sub" : "base",
|
|
@@ -17,10 +18,10 @@ const TextComponent = ({
|
|
|
17
18
|
fontColor: textProps?.fontColor ?? defaultFontColor,
|
|
18
19
|
iconPosition,
|
|
19
20
|
hasIcon,
|
|
20
|
-
...textProps
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
) : /* @__PURE__ */
|
|
21
|
+
...textProps,
|
|
22
|
+
children: label
|
|
23
|
+
}
|
|
24
|
+
) : /* @__PURE__ */ jsx(Fragment, {});
|
|
24
25
|
};
|
|
25
26
|
var TextComponent$1 = React__default.memo(TextComponent);
|
|
26
27
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled, { css } from '@emotion/native';
|
|
2
2
|
import { Button } from '../../atoms/Button/Button.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
3
4
|
import '@tecsinapse/react-core';
|
|
4
|
-
import 'react';
|
|
5
5
|
import Text from '../../atoms/Text/Text.js';
|
|
6
6
|
|
|
7
7
|
const boxedStyle = ({ theme }) => `
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import { InputPasswordIcon } from '@tecsinapse/react-core';
|
|
2
3
|
import React__default, { useState } from 'react';
|
|
3
4
|
import Input from '../../atoms/Input/Input.js';
|
|
@@ -5,20 +6,23 @@ import Input from '../../atoms/Input/Input.js';
|
|
|
5
6
|
const InputPassword = React__default.forwardRef(
|
|
6
7
|
({ rightComponent, ...rest }, ref) => {
|
|
7
8
|
const [revealed, setRevealed] = useState(false);
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
9
10
|
Input,
|
|
10
11
|
{
|
|
11
12
|
...rest,
|
|
12
13
|
ref,
|
|
13
14
|
secureTextEntry: !revealed,
|
|
14
|
-
rightComponent: /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
rightComponent: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
InputPasswordIcon,
|
|
18
|
+
{
|
|
19
|
+
onChangeState: setRevealed,
|
|
20
|
+
revealed,
|
|
21
|
+
effect: "none"
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
rightComponent
|
|
25
|
+
] })
|
|
22
26
|
}
|
|
23
27
|
);
|
|
24
28
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { Pressable } from 'react-native';
|
|
3
4
|
import { StyledLabel } from './styled.js';
|
|
@@ -12,16 +13,16 @@ const LabelComponent = ({
|
|
|
12
13
|
}) => {
|
|
13
14
|
const defaultFontColor = active && !switchDisabled ? "dark" : "medium";
|
|
14
15
|
const defaultFontWeight = active && !switchDisabled ? "bold" : "regular";
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(Pressable, { ...rest, children: /* @__PURE__ */ jsx(
|
|
16
17
|
StyledLabel,
|
|
17
18
|
{
|
|
18
19
|
labelPosition,
|
|
19
20
|
fontColor: labelProps?.fontColor ?? defaultFontColor,
|
|
20
21
|
fontWeight: labelProps?.fontWeight ?? defaultFontWeight,
|
|
21
|
-
...labelProps
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
));
|
|
22
|
+
...labelProps,
|
|
23
|
+
children: label
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
25
26
|
};
|
|
26
27
|
var LabelComponent$1 = React__default.memo(LabelComponent);
|
|
27
28
|
|