@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import { Switch } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import LabelComponent from './LabelComponent.js';
|
|
4
4
|
import { StyledView } from './styled.js';
|
|
5
5
|
|
|
@@ -13,37 +13,41 @@ const LabeledSwitch = ({
|
|
|
13
13
|
onChange,
|
|
14
14
|
...rest
|
|
15
15
|
}) => {
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
16
|
+
return /* @__PURE__ */ jsxs(StyledView, { children: [
|
|
17
|
+
leftLabel ? /* @__PURE__ */ jsx(
|
|
18
|
+
LabelComponent,
|
|
19
|
+
{
|
|
20
|
+
active,
|
|
21
|
+
label: leftLabel,
|
|
22
|
+
labelPosition: "left",
|
|
23
|
+
labelProps,
|
|
24
|
+
disabled: !pressableLabel || disabled,
|
|
25
|
+
switchDisabled: disabled,
|
|
26
|
+
onPress: () => onChange(!active)
|
|
27
|
+
}
|
|
28
|
+
) : /* @__PURE__ */ jsx(Fragment, {}),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
Switch,
|
|
31
|
+
{
|
|
32
|
+
active,
|
|
33
|
+
onChange,
|
|
34
|
+
disabled,
|
|
35
|
+
...rest
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
rightLabel ? /* @__PURE__ */ jsx(
|
|
39
|
+
LabelComponent,
|
|
40
|
+
{
|
|
41
|
+
active,
|
|
42
|
+
label: rightLabel,
|
|
43
|
+
labelPosition: "right",
|
|
44
|
+
labelProps,
|
|
45
|
+
disabled: !pressableLabel || disabled,
|
|
46
|
+
switchDisabled: disabled,
|
|
47
|
+
onPress: () => onChange(!active)
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ jsx(Fragment, {})
|
|
50
|
+
] });
|
|
47
51
|
};
|
|
48
52
|
|
|
49
53
|
export { LabeledSwitch as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo, useState, useEffect, useCallback } from 'react';
|
|
2
3
|
import { StyleSheet, Dimensions, View } from 'react-native';
|
|
3
4
|
import Text from '../../atoms/Text/Text.js';
|
|
4
5
|
import { BlockLabels } from './styled.js';
|
|
@@ -99,32 +100,41 @@ const ScrollableSelector = ({
|
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
102
|
}, [format, date, months, years, hour, minutes]);
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
103
|
+
return /* @__PURE__ */ jsxs(View, { style: { flexDirection: "column", width: "100%" }, children: [
|
|
104
|
+
/* @__PURE__ */ jsx(BlockLabels, { children: format === "MM-yyyy" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
105
|
+
/* @__PURE__ */ jsx(TextComponent, { children: monthLabel }),
|
|
106
|
+
/* @__PURE__ */ jsx(TextComponent, { children: yearLabel })
|
|
107
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
108
|
+
/* @__PURE__ */ jsx(TextComponent, { children: hourLabel }),
|
|
109
|
+
/* @__PURE__ */ jsx(TextComponent, { children: minuteLabel })
|
|
110
|
+
] }) }),
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
112
|
+
View,
|
|
113
|
+
{
|
|
114
|
+
style: [styles.picker, { height: pickerHeight, width: pickerWidth }],
|
|
115
|
+
children: getOrder().map((el, index) => {
|
|
116
|
+
return /* @__PURE__ */ jsx(
|
|
117
|
+
DateBlock,
|
|
118
|
+
{
|
|
119
|
+
date: value ?? /* @__PURE__ */ new Date(),
|
|
120
|
+
digits: el.digits,
|
|
121
|
+
value: el.value,
|
|
122
|
+
onChange: changeHandle,
|
|
123
|
+
height: pickerHeight,
|
|
124
|
+
fontSize: fontSize ?? 22,
|
|
125
|
+
textColor,
|
|
126
|
+
markColor,
|
|
127
|
+
markHeight,
|
|
128
|
+
markWidth: markWidth ?? 70,
|
|
129
|
+
type: el.name,
|
|
130
|
+
locale
|
|
131
|
+
},
|
|
132
|
+
index
|
|
133
|
+
);
|
|
134
|
+
})
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] });
|
|
128
138
|
};
|
|
129
139
|
const styles = StyleSheet.create({
|
|
130
140
|
picker: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
2
3
|
import { TouchableOpacity, Text } from 'react-native';
|
|
3
4
|
import { Block, Mark, StyledScrollView } from '../styled.js';
|
|
4
5
|
import { format } from 'date-fns';
|
|
@@ -42,54 +43,57 @@ const DateBlock = ({
|
|
|
42
43
|
return value2.toString().padStart(2, "0");
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
46
|
+
return /* @__PURE__ */ jsxs(Block, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
Mark,
|
|
49
|
+
{
|
|
50
|
+
markTop: (height - mHeight) / 2,
|
|
51
|
+
markColor: markColor ?? "rgba(0, 0, 0, 0.05)",
|
|
52
|
+
markHeight: 24,
|
|
53
|
+
markWidth: mWidth
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
StyledScrollView,
|
|
58
|
+
{
|
|
59
|
+
ref: scrollRef,
|
|
60
|
+
snapToOffsets: offsets,
|
|
61
|
+
decelerationRate: "fast",
|
|
62
|
+
showsVerticalScrollIndicator: false,
|
|
63
|
+
scrollEventThrottle: 0,
|
|
64
|
+
onMomentumScrollEnd: handleMomentumScrollEnd,
|
|
65
|
+
fadingEdgeLength: 300,
|
|
66
|
+
children: digits.map((value2, index) => {
|
|
67
|
+
return /* @__PURE__ */ jsx(
|
|
68
|
+
TouchableOpacity,
|
|
69
|
+
{
|
|
70
|
+
onPress: () => {
|
|
71
|
+
onChange(type, digits[index]);
|
|
72
|
+
snapScrollToIndex(index);
|
|
73
|
+
},
|
|
74
|
+
children: /* @__PURE__ */ jsx(
|
|
75
|
+
TextComponent,
|
|
76
|
+
{
|
|
77
|
+
style: {
|
|
78
|
+
textAlign: "center",
|
|
79
|
+
fontSize: fontSize || 22,
|
|
80
|
+
color: textColor || "#000000",
|
|
81
|
+
marginBottom: index === digits.length - 1 ? height / 2 - dHeight / 2 : 0,
|
|
82
|
+
marginTop: index === 0 ? height / 2 - dHeight / 2 : 0,
|
|
83
|
+
lineHeight: dHeight,
|
|
84
|
+
height: dHeight,
|
|
85
|
+
textTransform: "capitalize"
|
|
86
|
+
},
|
|
87
|
+
children: getDisplayedValue(type)(value2)
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
},
|
|
91
|
+
index
|
|
92
|
+
);
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] });
|
|
93
97
|
};
|
|
94
98
|
|
|
95
99
|
export { DateBlock as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import { HintInputContainer } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
import Text from '../../atoms/Text/Text.js';
|
|
4
4
|
import { Modal } from './components/Modal.js';
|
|
5
5
|
import { SelectIcon, StyledSelectionText } from './styled.js';
|
|
@@ -41,7 +41,7 @@ function Select(props) {
|
|
|
41
41
|
...rest
|
|
42
42
|
} = useSelect(props);
|
|
43
43
|
modal.sync(
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
45
|
Modal,
|
|
46
46
|
{
|
|
47
47
|
options: selectOptions ?? [],
|
|
@@ -69,7 +69,7 @@ function Select(props) {
|
|
|
69
69
|
}
|
|
70
70
|
)
|
|
71
71
|
);
|
|
72
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ jsx(Fragment, { children: controlComponent ? controlComponent(handlePressInput, getDisplayValue() ?? "") : /* @__PURE__ */ jsx(
|
|
73
73
|
HintInputContainer,
|
|
74
74
|
{
|
|
75
75
|
...rest,
|
|
@@ -82,18 +82,21 @@ function Select(props) {
|
|
|
82
82
|
hint,
|
|
83
83
|
hintComponent,
|
|
84
84
|
label: _label,
|
|
85
|
-
rightComponent: /* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
rightComponent: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
86
|
+
/* @__PURE__ */ jsx(SelectIcon, { name: "chevron-down", type: "ionicon", size: "centi" }),
|
|
87
|
+
rightComponent
|
|
88
|
+
] }),
|
|
89
|
+
children: /* @__PURE__ */ jsx(
|
|
90
|
+
StyledSelectionText,
|
|
91
|
+
{
|
|
92
|
+
numberOfLines,
|
|
93
|
+
fontWeight: "bold",
|
|
94
|
+
disabled,
|
|
95
|
+
children: getDisplayValue() ?? " "
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
) });
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
export { Select as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { Divider } from '../styled.js';
|
|
3
4
|
import { FlatList } from 'react-native';
|
|
@@ -12,7 +13,7 @@ const Flat = ({
|
|
|
12
13
|
() => typeof options !== "function" ? getData(options) : [],
|
|
13
14
|
[options, getData]
|
|
14
15
|
);
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
16
17
|
FlatList,
|
|
17
18
|
{
|
|
18
19
|
data,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Button } from '../../../atoms/Button/Button.js';
|
|
3
3
|
import { RFValue } from '@tecsinapse/react-core';
|
|
4
4
|
import Text from '../../../atoms/Text/Text.js';
|
|
5
5
|
import Header from '../../../atoms/Header/Header.js';
|
|
6
6
|
import Input from '../../../atoms/Input/Input.js';
|
|
7
|
+
import 'react';
|
|
7
8
|
import 'react-native';
|
|
8
9
|
import { ModalView } from '../../../atoms/Modal/ui/BaseModalView.js';
|
|
9
10
|
import { SearchBarContainer, SelectIcon, FetchIndicator, ModalFooter, TextTitleModal } from '../styled.js';
|
|
@@ -11,15 +12,15 @@ import Section from './Section.js';
|
|
|
11
12
|
import Flat from './Flat.js';
|
|
12
13
|
import useModal from '../hooks/useModal.js';
|
|
13
14
|
|
|
14
|
-
const ModalTitle = ({ title }) => title ? /* @__PURE__ */
|
|
15
|
+
const ModalTitle = ({ title }) => title ? /* @__PURE__ */ jsx(
|
|
15
16
|
TextTitleModal,
|
|
16
17
|
{
|
|
17
18
|
typography: "h4",
|
|
18
19
|
fontWeight: "bold",
|
|
19
20
|
numberOfLines: 3,
|
|
20
|
-
style: { maxWidth: RFValue(250) }
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
style: { maxWidth: RFValue(250) },
|
|
22
|
+
children: title
|
|
23
|
+
}
|
|
23
24
|
) : null;
|
|
24
25
|
const Component = (props) => {
|
|
25
26
|
const {
|
|
@@ -42,54 +43,60 @@ const Component = (props) => {
|
|
|
42
43
|
groupLabelExtractor,
|
|
43
44
|
...others
|
|
44
45
|
} = useModal(props);
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
return /* @__PURE__ */ jsxs(ModalView, { ...others, BoxComponent: ModalComponent, showCloseBar: false, children: [
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
Header,
|
|
49
|
+
{
|
|
50
|
+
rightButton: {
|
|
51
|
+
onPress: close,
|
|
52
|
+
icon: {
|
|
53
|
+
name: "close",
|
|
54
|
+
type: "material-community",
|
|
55
|
+
fontColor: "light"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
children: selectModalTitleComponent ? selectModalTitleComponent : /* @__PURE__ */ jsx(ModalTitle, { title: selectModalTitle })
|
|
55
59
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
60
|
+
),
|
|
61
|
+
!hideSearchBar ? /* @__PURE__ */ jsx(SearchBarContainer, { children: /* @__PURE__ */ jsx(
|
|
62
|
+
Input,
|
|
63
|
+
{
|
|
64
|
+
placeholder: searchBarPlaceholder,
|
|
65
|
+
value: searchArg,
|
|
66
|
+
onChange: setSearchArg,
|
|
67
|
+
leftComponent: /* @__PURE__ */ jsx(SelectIcon, { name: "search", type: "ionicon", size: "centi" })
|
|
68
|
+
}
|
|
69
|
+
) }) : null,
|
|
70
|
+
loading ? /* @__PURE__ */ jsx(FetchIndicator, { animating: true, color: "grey", size: "large" }) : null,
|
|
71
|
+
options instanceof Map ? /* @__PURE__ */ jsx(
|
|
72
|
+
Section,
|
|
73
|
+
{
|
|
74
|
+
options,
|
|
75
|
+
getData,
|
|
76
|
+
renderItem,
|
|
77
|
+
keyExtractor,
|
|
78
|
+
groupLabelExtractor
|
|
79
|
+
}
|
|
80
|
+
) : /* @__PURE__ */ jsx(
|
|
81
|
+
Flat,
|
|
82
|
+
{
|
|
83
|
+
renderItem,
|
|
84
|
+
getData,
|
|
85
|
+
options,
|
|
86
|
+
keyExtractor
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
!closeOnPick ? /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsx(
|
|
90
|
+
Button,
|
|
91
|
+
{
|
|
92
|
+
variant: "filled",
|
|
93
|
+
color: "primary",
|
|
94
|
+
onPress: handleConfirm,
|
|
95
|
+
disabled: loading,
|
|
96
|
+
children: /* @__PURE__ */ jsx(Text, { fontColor: "light", fontWeight: "bold", children: confirmButtonText })
|
|
97
|
+
}
|
|
98
|
+
) }) : null
|
|
99
|
+
] });
|
|
93
100
|
};
|
|
94
101
|
const Modal = Component;
|
|
95
102
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { ListItem, StyledTextItemSelect } from '../styled.js';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
import { Checkbox, RadioButton } from '@tecsinapse/react-core';
|
|
@@ -10,39 +10,39 @@ const Component = ({
|
|
|
10
10
|
type
|
|
11
11
|
}) => {
|
|
12
12
|
const label = labelExtractor(item);
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsx(ListItem, { onPress: () => handlePressItem(item), children: /* @__PURE__ */ jsx(View, { pointerEvents: "none", children: type === "multi" ? /* @__PURE__ */ jsx(
|
|
14
14
|
Checkbox,
|
|
15
15
|
{
|
|
16
16
|
color: "primary",
|
|
17
17
|
labelPosition: "right",
|
|
18
|
-
checked: item._checked
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
) : /* @__PURE__ */
|
|
18
|
+
checked: item._checked,
|
|
19
|
+
children: /* @__PURE__ */ jsx(
|
|
20
|
+
StyledTextItemSelect,
|
|
21
|
+
{
|
|
22
|
+
fontWeight: item._checked ? "bold" : "regular",
|
|
23
|
+
ellipsizeMode: "tail",
|
|
24
|
+
numberOfLines: 1,
|
|
25
|
+
children: label
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
) : /* @__PURE__ */ jsx(
|
|
30
30
|
RadioButton,
|
|
31
31
|
{
|
|
32
32
|
color: "primary",
|
|
33
33
|
labelPosition: "right",
|
|
34
|
-
checked: item._checked
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
)));
|
|
34
|
+
checked: item._checked,
|
|
35
|
+
children: /* @__PURE__ */ jsx(
|
|
36
|
+
StyledTextItemSelect,
|
|
37
|
+
{
|
|
38
|
+
fontWeight: item._checked ? "bold" : "regular",
|
|
39
|
+
ellipsizeMode: "tail",
|
|
40
|
+
numberOfLines: 1,
|
|
41
|
+
children: label
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
) }) });
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
export { Component as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useMemo } from 'react';
|
|
2
3
|
import { Divider, SectionHeader } from '../styled.js';
|
|
3
4
|
import { SectionList } from 'react-native';
|
|
4
5
|
import Text from '../../../atoms/Text/Text.js';
|
|
@@ -6,7 +7,7 @@ import Text from '../../../atoms/Text/Text.js';
|
|
|
6
7
|
const SectionHead = ({
|
|
7
8
|
title,
|
|
8
9
|
groupLabelExtractor
|
|
9
|
-
}) => /* @__PURE__ */
|
|
10
|
+
}) => /* @__PURE__ */ jsx(SectionHeader, { children: /* @__PURE__ */ jsx(Text, { fontWeight: "bold", children: groupLabelExtractor ? groupLabelExtractor(title) : title }) });
|
|
10
11
|
const Section = ({
|
|
11
12
|
options,
|
|
12
13
|
renderItem,
|
|
@@ -21,13 +22,13 @@ const Section = ({
|
|
|
21
22
|
})) : [],
|
|
22
23
|
[options, getData]
|
|
23
24
|
);
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
25
26
|
SectionList,
|
|
26
27
|
{
|
|
27
28
|
sections: sectionList,
|
|
28
29
|
renderItem,
|
|
29
30
|
ItemSeparatorComponent: Divider,
|
|
30
|
-
renderSectionHeader: ({ section: { title } }) => /* @__PURE__ */
|
|
31
|
+
renderSectionHeader: ({ section: { title } }) => /* @__PURE__ */ jsx(SectionHead, { title, groupLabelExtractor }),
|
|
31
32
|
keyExtractor
|
|
32
33
|
}
|
|
33
34
|
);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { getStyledModal } from '../styled.js';
|
|
3
4
|
import Component from '../components/Option.js';
|
|
@@ -65,7 +66,7 @@ const useModal = ({
|
|
|
65
66
|
close?.();
|
|
66
67
|
}, [selectedValues]);
|
|
67
68
|
const renderItem = React__default.useCallback(
|
|
68
|
-
({ item }) => /* @__PURE__ */
|
|
69
|
+
({ item }) => /* @__PURE__ */ jsx(
|
|
69
70
|
Component,
|
|
70
71
|
{
|
|
71
72
|
item,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import Text from '../../atoms/Text/Text.js';
|
|
3
3
|
import { SnackbarStyled } from './styled.js';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ const Snackbar = ({
|
|
|
7
7
|
textProps = { colorVariant: "primary", colorTone: "medium" },
|
|
8
8
|
...rest
|
|
9
9
|
}) => {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsx(SnackbarStyled, { ...rest, children: /* @__PURE__ */ jsx(Text, { fontWeight: "bold", typography: "base", ...textProps, children: value }) });
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { Snackbar as default };
|
package/dist/esm/utils/date.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { Platform, NativeModules } from 'react-native';
|
|
2
1
|
import * as dateFnsLocales from 'date-fns/locale';
|
|
2
|
+
import { I18nManager } from 'react-native';
|
|
3
3
|
|
|
4
4
|
const getLocale = () => {
|
|
5
|
-
|
|
6
|
-
if (Platform.OS === "ios") {
|
|
7
|
-
locale = NativeModules.SettingsManager.settings.AppleLocale || NativeModules.SettingsManager.settings.AppleLanguages[0];
|
|
8
|
-
} else {
|
|
9
|
-
locale = NativeModules.I18nManager.localeIdentifier;
|
|
10
|
-
}
|
|
5
|
+
const locale = I18nManager.getConstants().localeIdentifier ?? "pt_BR";
|
|
11
6
|
const code = locale.replace("_", "");
|
|
12
7
|
return dateFnsLocales[code];
|
|
13
8
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { IAnimationComponent } from './types';
|
|
3
|
-
export declare const Pulse: ({ active, width, height, childrenLayout, }: IAnimationComponent) =>
|
|
2
|
+
export declare const Pulse: ({ active, width, height, childrenLayout, }: IAnimationComponent) => import("react/jsx-runtime").JSX.Element;
|