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