react-native-molecules 0.5.0-beta.17 → 0.5.0-beta.19

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.
@@ -121,6 +121,11 @@ function TimePicker({
121
121
 
122
122
  if (newDisplayMode !== displayMode) setDisplayMode(newDisplayMode);
123
123
 
124
+ if (params.focused) {
125
+ const nextFocused = params.focused;
126
+ setTimeout(() => onFocusInput(nextFocused), 300);
127
+ }
128
+
124
129
  onTimeChange?.({
125
130
  time: `${`${params.hours}`.padStart(2, '0')}:${`${params.minutes}`.padStart(
126
131
  2,
@@ -129,7 +134,7 @@ function TimePicker({
129
134
  focused: params.focused,
130
135
  });
131
136
  },
132
- [displayMode, onTimeChange],
137
+ [displayMode, onFocusInput, onTimeChange],
133
138
  );
134
139
 
135
140
  const memoizedValue = useMemo(
@@ -41,6 +41,9 @@ const timePickerStylesDefault = StyleSheet.create(theme => ({
41
41
 
42
42
  const timePickerInputsStylesDefault = StyleSheet.create(theme => ({
43
43
  spaceBetweenInputsAndSwitcher: { width: 12 },
44
+ wrapper: {
45
+ alignItems: 'center',
46
+ },
44
47
  inputContainer: {
45
48
  flexDirection: 'row',
46
49
  alignItems: 'center',
@@ -70,6 +73,27 @@ const timePickerInputsStylesDefault = StyleSheet.create(theme => ({
70
73
  betweenDot: {
71
74
  height: 12,
72
75
  },
76
+ supportingRow: {
77
+ flexDirection: 'row',
78
+ alignItems: 'flex-start',
79
+ width: '100%',
80
+ marginTop: 2,
81
+ },
82
+ supportingSlot: {
83
+ width: 96,
84
+ minHeight: theme.typescale.bodyMedium.lineHeight * 2,
85
+ },
86
+ supportingText: {
87
+ ...theme.typescale.bodyMedium,
88
+ fontSize: 12,
89
+ lineHeight: 16,
90
+ color: theme.colors.onSurfaceVariant,
91
+ textAlign: 'left',
92
+ paddingHorizontal: theme.spacings['1'],
93
+ },
94
+ supportingTextError: {
95
+ color: theme.colors.error,
96
+ },
73
97
  }));
74
98
 
75
99
  const timePickerInputStylesDefault = StyleSheet.create(theme => ({
@@ -91,6 +115,10 @@ const timePickerInputStylesDefault = StyleSheet.create(theme => ({
91
115
  color: theme.colors.onSurface,
92
116
  borderRadius: theme.shapes.corner.small,
93
117
 
118
+ _web: {
119
+ outline: 'none',
120
+ },
121
+
94
122
  variants: {
95
123
  state: {
96
124
  highlighted: {
@@ -100,6 +128,20 @@ const timePickerInputStylesDefault = StyleSheet.create(theme => ({
100
128
  },
101
129
  },
102
130
  },
131
+ keyboardInput: {
132
+ borderWidth: 2,
133
+ borderColor: 'transparent',
134
+ },
135
+ keyboardInputHighlighted: {
136
+ borderColor: theme.colors.primary,
137
+ },
138
+ inputError: {
139
+ backgroundColor: theme.colors.errorContainer,
140
+ color: theme.colors.onErrorContainer,
141
+ },
142
+ keyboardInputError: {
143
+ borderColor: theme.colors.error,
144
+ },
103
145
  button: {
104
146
  overflow: 'hidden',
105
147
  borderRadius: theme.shapes.corner.small,
@@ -253,6 +295,7 @@ const timePickerModalStylesDefault = StyleSheet.create(theme => ({
253
295
  timePickerContainer: {
254
296
  padding: theme.spacings['6'],
255
297
  paddingTop: theme.spacings['2'],
298
+ paddingBottom: 0,
256
299
  },
257
300
  footer: {
258
301
  flexDirection: 'row',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-molecules",
3
- "version": "0.5.0-beta.17",
3
+ "version": "0.5.0-beta.19",
4
4
  "author": "Thet Aung <thetaung.dev@gmail.com>",
5
5
  "license": "MIT",
6
6
  "main": "index.ts",