@hero-design/rn 8.0.1 → 8.0.2
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/.turbo/turbo-build.log +9 -9
- package/es/index.js +8 -4
- package/lib/index.js +8 -4
- package/package.json +5 -5
- package/src/components/TimePicker/TimePickerAndroid.tsx +2 -1
- package/src/components/TimePicker/TimePickerIOS.tsx +2 -1
- package/src/components/TimePicker/__tests__/TimePickerAndroid.spec.tsx +13 -0
- package/src/components/TimePicker/__tests__/TimePickerIOS.spec.tsx +14 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +208 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +208 -0
- package/src/components/TimePicker/types.ts +5 -0
- package/types/components/TimePicker/TimePickerAndroid.d.ts +1 -1
- package/types/components/TimePicker/TimePickerIOS.d.ts +1 -1
- package/types/components/TimePicker/types.d.ts +4 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
1
|
+
[36m@hero-design/rn:build[0m: cache hit, replaying output [2m395e759f2a2de395[0m
|
|
2
|
+
[36m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
|
+
[36m@hero-design/rn:build: [0m$ rollup -c
|
|
4
|
+
[36m@hero-design/rn:build: [0m[36m
|
|
5
|
+
[36m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
|
+
[36m@hero-design/rn:build: [0m[1m[33m(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
7
|
+
[36m@hero-design/rn:build: [0m[1m[33m(!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning[39m[22m
|
|
8
|
+
[36m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m28.3s[22m[39m
|
|
9
|
+
[36m@hero-design/rn:build: [0m$ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
|
package/es/index.js
CHANGED
|
@@ -13899,7 +13899,9 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
13899
13899
|
error = _ref.error,
|
|
13900
13900
|
helpText = _ref.helpText,
|
|
13901
13901
|
style = _ref.style,
|
|
13902
|
-
testID = _ref.testID
|
|
13902
|
+
testID = _ref.testID,
|
|
13903
|
+
_ref$showSuffix = _ref.showSuffix,
|
|
13904
|
+
showSuffix = _ref$showSuffix === void 0 ? true : _ref$showSuffix;
|
|
13903
13905
|
var _useState = useState(false),
|
|
13904
13906
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13905
13907
|
open = _useState2[0],
|
|
@@ -13918,7 +13920,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
13918
13920
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
13919
13921
|
label: label,
|
|
13920
13922
|
value: displayValue,
|
|
13921
|
-
suffix:
|
|
13923
|
+
suffix: showSuffix ? 'clock-3' : undefined,
|
|
13922
13924
|
placeholder: placeholder || displayFormat,
|
|
13923
13925
|
disabled: disabled,
|
|
13924
13926
|
error: error,
|
|
@@ -13962,7 +13964,9 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
13962
13964
|
error = _ref.error,
|
|
13963
13965
|
helpText = _ref.helpText,
|
|
13964
13966
|
style = _ref.style,
|
|
13965
|
-
testID = _ref.testID
|
|
13967
|
+
testID = _ref.testID,
|
|
13968
|
+
_ref$showSuffix = _ref.showSuffix,
|
|
13969
|
+
showSuffix = _ref$showSuffix === void 0 ? true : _ref$showSuffix;
|
|
13966
13970
|
var _useState = useState(value || new Date()),
|
|
13967
13971
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13968
13972
|
selectingDate = _useState2[0],
|
|
@@ -13984,7 +13988,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
13984
13988
|
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
13985
13989
|
label: label,
|
|
13986
13990
|
value: displayValue,
|
|
13987
|
-
suffix:
|
|
13991
|
+
suffix: showSuffix ? 'clock-3' : undefined,
|
|
13988
13992
|
placeholder: placeholder || displayFormat,
|
|
13989
13993
|
disabled: disabled,
|
|
13990
13994
|
error: error,
|
package/lib/index.js
CHANGED
|
@@ -13928,7 +13928,9 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
13928
13928
|
error = _ref.error,
|
|
13929
13929
|
helpText = _ref.helpText,
|
|
13930
13930
|
style = _ref.style,
|
|
13931
|
-
testID = _ref.testID
|
|
13931
|
+
testID = _ref.testID,
|
|
13932
|
+
_ref$showSuffix = _ref.showSuffix,
|
|
13933
|
+
showSuffix = _ref$showSuffix === void 0 ? true : _ref$showSuffix;
|
|
13932
13934
|
var _useState = React.useState(false),
|
|
13933
13935
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13934
13936
|
open = _useState2[0],
|
|
@@ -13947,7 +13949,7 @@ var TimePickerAndroid = function TimePickerAndroid(_ref) {
|
|
|
13947
13949
|
}, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
13948
13950
|
label: label,
|
|
13949
13951
|
value: displayValue,
|
|
13950
|
-
suffix:
|
|
13952
|
+
suffix: showSuffix ? 'clock-3' : undefined,
|
|
13951
13953
|
placeholder: placeholder || displayFormat,
|
|
13952
13954
|
disabled: disabled,
|
|
13953
13955
|
error: error,
|
|
@@ -13991,7 +13993,9 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
13991
13993
|
error = _ref.error,
|
|
13992
13994
|
helpText = _ref.helpText,
|
|
13993
13995
|
style = _ref.style,
|
|
13994
|
-
testID = _ref.testID
|
|
13996
|
+
testID = _ref.testID,
|
|
13997
|
+
_ref$showSuffix = _ref.showSuffix,
|
|
13998
|
+
showSuffix = _ref$showSuffix === void 0 ? true : _ref$showSuffix;
|
|
13995
13999
|
var _useState = React.useState(value || new Date()),
|
|
13996
14000
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13997
14001
|
selectingDate = _useState2[0],
|
|
@@ -14013,7 +14017,7 @@ var TimePickerIOS = function TimePickerIOS(_ref) {
|
|
|
14013
14017
|
}, /*#__PURE__*/React__default["default"].createElement(TextInput, {
|
|
14014
14018
|
label: label,
|
|
14015
14019
|
value: displayValue,
|
|
14016
|
-
suffix:
|
|
14020
|
+
suffix: showSuffix ? 'clock-3' : undefined,
|
|
14017
14021
|
placeholder: placeholder || displayFormat,
|
|
14018
14022
|
disabled: disabled,
|
|
14019
14023
|
error: error,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@emotion/native": "^11.9.3",
|
|
23
23
|
"@emotion/react": "^11.9.3",
|
|
24
|
-
"@hero-design/colors": "8.0.
|
|
24
|
+
"@hero-design/colors": "8.0.2",
|
|
25
25
|
"date-fns": "^2.16.1",
|
|
26
26
|
"events": "^3.2.0",
|
|
27
27
|
"hero-editor": "^1.9.12"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@babel/preset-typescript": "^7.17.12",
|
|
45
45
|
"@babel/runtime": "^7.18.9",
|
|
46
46
|
"@emotion/jest": "^11.9.3",
|
|
47
|
-
"@hero-design/eslint-plugin": "8.0.
|
|
47
|
+
"@hero-design/eslint-plugin": "8.0.2",
|
|
48
48
|
"@react-native-community/datetimepicker": "^3.5.2",
|
|
49
49
|
"@react-native-community/slider": "4.1.12",
|
|
50
50
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@types/react-native": "^0.67.7",
|
|
61
61
|
"@types/react-native-vector-icons": "^6.4.10",
|
|
62
62
|
"babel-plugin-inline-import": "^3.0.0",
|
|
63
|
-
"eslint-config-hd": "8.0.
|
|
63
|
+
"eslint-config-hd": "8.0.2",
|
|
64
64
|
"jest": "^27.3.1",
|
|
65
|
-
"prettier-config-hd": "8.0.
|
|
65
|
+
"prettier-config-hd": "8.0.2",
|
|
66
66
|
"react": "17.0.2",
|
|
67
67
|
"react-native": "0.65.1",
|
|
68
68
|
"react-native-gesture-handler": "~2.1.0",
|
|
@@ -18,6 +18,7 @@ const TimePickerAndroid = ({
|
|
|
18
18
|
helpText,
|
|
19
19
|
style,
|
|
20
20
|
testID,
|
|
21
|
+
showSuffix = true,
|
|
21
22
|
}: TimePickerProps) => {
|
|
22
23
|
const [open, setOpen] = useState(false);
|
|
23
24
|
|
|
@@ -31,7 +32,7 @@ const TimePickerAndroid = ({
|
|
|
31
32
|
<TextInput
|
|
32
33
|
label={label}
|
|
33
34
|
value={displayValue}
|
|
34
|
-
suffix=
|
|
35
|
+
suffix={showSuffix ? 'clock-3' : undefined}
|
|
35
36
|
placeholder={placeholder || displayFormat}
|
|
36
37
|
disabled={disabled}
|
|
37
38
|
error={error}
|
|
@@ -22,6 +22,7 @@ const TimePickerIOS = ({
|
|
|
22
22
|
helpText,
|
|
23
23
|
style,
|
|
24
24
|
testID,
|
|
25
|
+
showSuffix = true,
|
|
25
26
|
}: TimePickerProps) => {
|
|
26
27
|
const [selectingDate, setSelectingDate] = useState<Date>(value || new Date());
|
|
27
28
|
const [open, setOpen] = useState(false);
|
|
@@ -35,7 +36,7 @@ const TimePickerIOS = ({
|
|
|
35
36
|
<TextInput
|
|
36
37
|
label={label}
|
|
37
38
|
value={displayValue}
|
|
38
|
-
suffix=
|
|
39
|
+
suffix={showSuffix ? 'clock-3' : undefined}
|
|
39
40
|
placeholder={placeholder || displayFormat}
|
|
40
41
|
disabled={disabled}
|
|
41
42
|
error={error}
|
|
@@ -50,4 +50,17 @@ describe('TimePickerAndroid', () => {
|
|
|
50
50
|
|
|
51
51
|
expect(getByText('This is help text')).toBeTruthy();
|
|
52
52
|
});
|
|
53
|
+
it('renders correct with hide suffix', () => {
|
|
54
|
+
const { toJSON } = renderWithTheme(
|
|
55
|
+
<TimePickerAndroid
|
|
56
|
+
value={new Date('December 17, 1995 03:24:00')}
|
|
57
|
+
label="Break time"
|
|
58
|
+
confirmLabel="Confirm"
|
|
59
|
+
helpText="This is help text"
|
|
60
|
+
showSuffix={false}
|
|
61
|
+
onChange={jest.fn()}
|
|
62
|
+
/>
|
|
63
|
+
);
|
|
64
|
+
expect(toJSON()).toMatchSnapshot();
|
|
65
|
+
});
|
|
53
66
|
});
|
|
@@ -56,4 +56,18 @@ describe('TimePickerIOS', () => {
|
|
|
56
56
|
|
|
57
57
|
expect(getByText('This is help text')).toBeTruthy();
|
|
58
58
|
});
|
|
59
|
+
|
|
60
|
+
it('renders correct with hide suffix', () => {
|
|
61
|
+
const { toJSON } = renderWithTheme(
|
|
62
|
+
<TimePickerIOS
|
|
63
|
+
value={new Date('December 17, 1995 03:24:00')}
|
|
64
|
+
label="Break time"
|
|
65
|
+
confirmLabel="Confirm"
|
|
66
|
+
helpText="This is help text"
|
|
67
|
+
showSuffix={false}
|
|
68
|
+
onChange={jest.fn()}
|
|
69
|
+
/>
|
|
70
|
+
);
|
|
71
|
+
expect(toJSON()).toMatchSnapshot();
|
|
72
|
+
});
|
|
59
73
|
});
|
|
@@ -1,5 +1,213 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`TimePickerAndroid renders correct with hide suffix 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
accessible={true}
|
|
6
|
+
collapsable={false}
|
|
7
|
+
focusable={true}
|
|
8
|
+
nativeID="animatedComponent"
|
|
9
|
+
onClick={[Function]}
|
|
10
|
+
onResponderGrant={[Function]}
|
|
11
|
+
onResponderMove={[Function]}
|
|
12
|
+
onResponderRelease={[Function]}
|
|
13
|
+
onResponderTerminate={[Function]}
|
|
14
|
+
onResponderTerminationRequest={[Function]}
|
|
15
|
+
onStartShouldSetResponder={[Function]}
|
|
16
|
+
style={
|
|
17
|
+
Object {
|
|
18
|
+
"opacity": 1,
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
>
|
|
22
|
+
<View
|
|
23
|
+
pointerEvents="none"
|
|
24
|
+
testID="timePickerInputAndroid"
|
|
25
|
+
>
|
|
26
|
+
<View
|
|
27
|
+
pointerEvents="auto"
|
|
28
|
+
style={
|
|
29
|
+
Array [
|
|
30
|
+
Object {
|
|
31
|
+
"marginVertical": 8,
|
|
32
|
+
"width": "100%",
|
|
33
|
+
},
|
|
34
|
+
undefined,
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
>
|
|
38
|
+
<View
|
|
39
|
+
style={
|
|
40
|
+
Array [
|
|
41
|
+
Object {
|
|
42
|
+
"alignItems": "center",
|
|
43
|
+
"flexDirection": "row",
|
|
44
|
+
"padding": 16,
|
|
45
|
+
},
|
|
46
|
+
undefined,
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
>
|
|
50
|
+
<View
|
|
51
|
+
style={
|
|
52
|
+
Array [
|
|
53
|
+
Object {
|
|
54
|
+
"borderColor": "#001f23",
|
|
55
|
+
"borderRadius": 8,
|
|
56
|
+
"borderWidth": 1,
|
|
57
|
+
"bottom": 0,
|
|
58
|
+
"left": 0,
|
|
59
|
+
"position": "absolute",
|
|
60
|
+
"right": 0,
|
|
61
|
+
"top": 0,
|
|
62
|
+
},
|
|
63
|
+
undefined,
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
themeFocused={false}
|
|
67
|
+
themeVariant="filled"
|
|
68
|
+
/>
|
|
69
|
+
<View
|
|
70
|
+
pointerEvents="none"
|
|
71
|
+
style={
|
|
72
|
+
Array [
|
|
73
|
+
Object {
|
|
74
|
+
"backgroundColor": "#ffffff",
|
|
75
|
+
"flexDirection": "row",
|
|
76
|
+
"left": 16,
|
|
77
|
+
"paddingHorizontal": 4,
|
|
78
|
+
"position": "absolute",
|
|
79
|
+
"top": -10,
|
|
80
|
+
"zIndex": 1,
|
|
81
|
+
},
|
|
82
|
+
undefined,
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
>
|
|
86
|
+
<Text
|
|
87
|
+
style={
|
|
88
|
+
Array [
|
|
89
|
+
Object {
|
|
90
|
+
"color": "#001f23",
|
|
91
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
92
|
+
"fontSize": 12,
|
|
93
|
+
"letterSpacing": 0.36,
|
|
94
|
+
"lineHeight": 20,
|
|
95
|
+
},
|
|
96
|
+
Array [
|
|
97
|
+
Object {
|
|
98
|
+
"color": "#001f23",
|
|
99
|
+
},
|
|
100
|
+
undefined,
|
|
101
|
+
],
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
testID="input-label"
|
|
105
|
+
themeFontSize="small"
|
|
106
|
+
themeFontWeight="regular"
|
|
107
|
+
themeIntent="body"
|
|
108
|
+
themeTypeface="neutral"
|
|
109
|
+
themeVariant="filled"
|
|
110
|
+
>
|
|
111
|
+
Break time
|
|
112
|
+
</Text>
|
|
113
|
+
</View>
|
|
114
|
+
<View
|
|
115
|
+
style={
|
|
116
|
+
Array [
|
|
117
|
+
Object {
|
|
118
|
+
"alignItems": "center",
|
|
119
|
+
"alignSelf": "stretch",
|
|
120
|
+
"flexDirection": "row",
|
|
121
|
+
"flexGrow": 2,
|
|
122
|
+
"flexShrink": 1,
|
|
123
|
+
},
|
|
124
|
+
undefined,
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
>
|
|
128
|
+
<TextInput
|
|
129
|
+
accessibilityState={
|
|
130
|
+
Object {
|
|
131
|
+
"disabled": false,
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
editable={true}
|
|
135
|
+
onBlur={[Function]}
|
|
136
|
+
onChangeText={[Function]}
|
|
137
|
+
onFocus={[Function]}
|
|
138
|
+
placeholder=" "
|
|
139
|
+
style={
|
|
140
|
+
Array [
|
|
141
|
+
Object {
|
|
142
|
+
"alignSelf": "stretch",
|
|
143
|
+
"flexGrow": 2,
|
|
144
|
+
"fontSize": 14,
|
|
145
|
+
"marginHorizontal": 8,
|
|
146
|
+
"paddingVertical": 0,
|
|
147
|
+
"textAlignVertical": "center",
|
|
148
|
+
},
|
|
149
|
+
Object {
|
|
150
|
+
"color": "#001f23",
|
|
151
|
+
},
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
testID="text-input"
|
|
155
|
+
value="03:24 AM"
|
|
156
|
+
/>
|
|
157
|
+
</View>
|
|
158
|
+
</View>
|
|
159
|
+
<View
|
|
160
|
+
style={
|
|
161
|
+
Array [
|
|
162
|
+
Object {
|
|
163
|
+
"paddingLeft": 16,
|
|
164
|
+
},
|
|
165
|
+
undefined,
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
>
|
|
169
|
+
<View
|
|
170
|
+
style={
|
|
171
|
+
Array [
|
|
172
|
+
Object {
|
|
173
|
+
"flexDirection": "row",
|
|
174
|
+
"justifyContent": "space-between",
|
|
175
|
+
},
|
|
176
|
+
undefined,
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
/>
|
|
180
|
+
<Text
|
|
181
|
+
style={
|
|
182
|
+
Array [
|
|
183
|
+
Object {
|
|
184
|
+
"color": "#001f23",
|
|
185
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
186
|
+
"fontSize": 14,
|
|
187
|
+
"letterSpacing": 0.42,
|
|
188
|
+
"lineHeight": 22,
|
|
189
|
+
},
|
|
190
|
+
Array [
|
|
191
|
+
Object {
|
|
192
|
+
"fontSize": 12,
|
|
193
|
+
},
|
|
194
|
+
undefined,
|
|
195
|
+
],
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
themeFontSize="medium"
|
|
199
|
+
themeFontWeight="regular"
|
|
200
|
+
themeIntent="body"
|
|
201
|
+
themeTypeface="neutral"
|
|
202
|
+
>
|
|
203
|
+
This is help text
|
|
204
|
+
</Text>
|
|
205
|
+
</View>
|
|
206
|
+
</View>
|
|
207
|
+
</View>
|
|
208
|
+
</View>
|
|
209
|
+
`;
|
|
210
|
+
|
|
3
211
|
exports[`TimePickerAndroid renders correctly 1`] = `
|
|
4
212
|
<View
|
|
5
213
|
accessible={true}
|
|
@@ -1,5 +1,213 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`TimePickerIOS renders correct with hide suffix 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
accessible={true}
|
|
6
|
+
collapsable={false}
|
|
7
|
+
focusable={true}
|
|
8
|
+
nativeID="animatedComponent"
|
|
9
|
+
onClick={[Function]}
|
|
10
|
+
onResponderGrant={[Function]}
|
|
11
|
+
onResponderMove={[Function]}
|
|
12
|
+
onResponderRelease={[Function]}
|
|
13
|
+
onResponderTerminate={[Function]}
|
|
14
|
+
onResponderTerminationRequest={[Function]}
|
|
15
|
+
onStartShouldSetResponder={[Function]}
|
|
16
|
+
style={
|
|
17
|
+
Object {
|
|
18
|
+
"opacity": 1,
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
>
|
|
22
|
+
<View
|
|
23
|
+
pointerEvents="none"
|
|
24
|
+
testID="timePickerInputIOS"
|
|
25
|
+
>
|
|
26
|
+
<View
|
|
27
|
+
pointerEvents="auto"
|
|
28
|
+
style={
|
|
29
|
+
Array [
|
|
30
|
+
Object {
|
|
31
|
+
"marginVertical": 8,
|
|
32
|
+
"width": "100%",
|
|
33
|
+
},
|
|
34
|
+
undefined,
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
>
|
|
38
|
+
<View
|
|
39
|
+
style={
|
|
40
|
+
Array [
|
|
41
|
+
Object {
|
|
42
|
+
"alignItems": "center",
|
|
43
|
+
"flexDirection": "row",
|
|
44
|
+
"padding": 16,
|
|
45
|
+
},
|
|
46
|
+
undefined,
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
>
|
|
50
|
+
<View
|
|
51
|
+
style={
|
|
52
|
+
Array [
|
|
53
|
+
Object {
|
|
54
|
+
"borderColor": "#001f23",
|
|
55
|
+
"borderRadius": 8,
|
|
56
|
+
"borderWidth": 1,
|
|
57
|
+
"bottom": 0,
|
|
58
|
+
"left": 0,
|
|
59
|
+
"position": "absolute",
|
|
60
|
+
"right": 0,
|
|
61
|
+
"top": 0,
|
|
62
|
+
},
|
|
63
|
+
undefined,
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
themeFocused={false}
|
|
67
|
+
themeVariant="filled"
|
|
68
|
+
/>
|
|
69
|
+
<View
|
|
70
|
+
pointerEvents="none"
|
|
71
|
+
style={
|
|
72
|
+
Array [
|
|
73
|
+
Object {
|
|
74
|
+
"backgroundColor": "#ffffff",
|
|
75
|
+
"flexDirection": "row",
|
|
76
|
+
"left": 16,
|
|
77
|
+
"paddingHorizontal": 4,
|
|
78
|
+
"position": "absolute",
|
|
79
|
+
"top": -10,
|
|
80
|
+
"zIndex": 1,
|
|
81
|
+
},
|
|
82
|
+
undefined,
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
>
|
|
86
|
+
<Text
|
|
87
|
+
style={
|
|
88
|
+
Array [
|
|
89
|
+
Object {
|
|
90
|
+
"color": "#001f23",
|
|
91
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
92
|
+
"fontSize": 12,
|
|
93
|
+
"letterSpacing": 0.36,
|
|
94
|
+
"lineHeight": 20,
|
|
95
|
+
},
|
|
96
|
+
Array [
|
|
97
|
+
Object {
|
|
98
|
+
"color": "#001f23",
|
|
99
|
+
},
|
|
100
|
+
undefined,
|
|
101
|
+
],
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
testID="input-label"
|
|
105
|
+
themeFontSize="small"
|
|
106
|
+
themeFontWeight="regular"
|
|
107
|
+
themeIntent="body"
|
|
108
|
+
themeTypeface="neutral"
|
|
109
|
+
themeVariant="filled"
|
|
110
|
+
>
|
|
111
|
+
Break time
|
|
112
|
+
</Text>
|
|
113
|
+
</View>
|
|
114
|
+
<View
|
|
115
|
+
style={
|
|
116
|
+
Array [
|
|
117
|
+
Object {
|
|
118
|
+
"alignItems": "center",
|
|
119
|
+
"alignSelf": "stretch",
|
|
120
|
+
"flexDirection": "row",
|
|
121
|
+
"flexGrow": 2,
|
|
122
|
+
"flexShrink": 1,
|
|
123
|
+
},
|
|
124
|
+
undefined,
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
>
|
|
128
|
+
<TextInput
|
|
129
|
+
accessibilityState={
|
|
130
|
+
Object {
|
|
131
|
+
"disabled": false,
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
editable={true}
|
|
135
|
+
onBlur={[Function]}
|
|
136
|
+
onChangeText={[Function]}
|
|
137
|
+
onFocus={[Function]}
|
|
138
|
+
placeholder=" "
|
|
139
|
+
style={
|
|
140
|
+
Array [
|
|
141
|
+
Object {
|
|
142
|
+
"alignSelf": "stretch",
|
|
143
|
+
"flexGrow": 2,
|
|
144
|
+
"fontSize": 14,
|
|
145
|
+
"marginHorizontal": 8,
|
|
146
|
+
"paddingVertical": 0,
|
|
147
|
+
"textAlignVertical": "center",
|
|
148
|
+
},
|
|
149
|
+
Object {
|
|
150
|
+
"color": "#001f23",
|
|
151
|
+
},
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
testID="text-input"
|
|
155
|
+
value="03:24 AM"
|
|
156
|
+
/>
|
|
157
|
+
</View>
|
|
158
|
+
</View>
|
|
159
|
+
<View
|
|
160
|
+
style={
|
|
161
|
+
Array [
|
|
162
|
+
Object {
|
|
163
|
+
"paddingLeft": 16,
|
|
164
|
+
},
|
|
165
|
+
undefined,
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
>
|
|
169
|
+
<View
|
|
170
|
+
style={
|
|
171
|
+
Array [
|
|
172
|
+
Object {
|
|
173
|
+
"flexDirection": "row",
|
|
174
|
+
"justifyContent": "space-between",
|
|
175
|
+
},
|
|
176
|
+
undefined,
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
/>
|
|
180
|
+
<Text
|
|
181
|
+
style={
|
|
182
|
+
Array [
|
|
183
|
+
Object {
|
|
184
|
+
"color": "#001f23",
|
|
185
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
186
|
+
"fontSize": 14,
|
|
187
|
+
"letterSpacing": 0.42,
|
|
188
|
+
"lineHeight": 22,
|
|
189
|
+
},
|
|
190
|
+
Array [
|
|
191
|
+
Object {
|
|
192
|
+
"fontSize": 12,
|
|
193
|
+
},
|
|
194
|
+
undefined,
|
|
195
|
+
],
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
themeFontSize="medium"
|
|
199
|
+
themeFontWeight="regular"
|
|
200
|
+
themeIntent="body"
|
|
201
|
+
themeTypeface="neutral"
|
|
202
|
+
>
|
|
203
|
+
This is help text
|
|
204
|
+
</Text>
|
|
205
|
+
</View>
|
|
206
|
+
</View>
|
|
207
|
+
</View>
|
|
208
|
+
</View>
|
|
209
|
+
`;
|
|
210
|
+
|
|
3
211
|
exports[`TimePickerIOS renders correctly 1`] = `
|
|
4
212
|
<View
|
|
5
213
|
accessible={true}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TimePickerProps } from './types';
|
|
2
|
-
declare const TimePickerAndroid: ({ value, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, }: TimePickerProps) => JSX.Element;
|
|
2
|
+
declare const TimePickerAndroid: ({ value, label, placeholder, onChange, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, }: TimePickerProps) => JSX.Element;
|
|
3
3
|
export default TimePickerAndroid;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TimePickerProps } from './types';
|
|
2
|
-
declare const TimePickerIOS: ({ value, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, }: TimePickerProps) => JSX.Element;
|
|
2
|
+
declare const TimePickerIOS: ({ value, label, placeholder, onChange, confirmLabel, displayFormat, disabled, required, error, helpText, style, testID, showSuffix, }: TimePickerProps) => JSX.Element;
|
|
3
3
|
export default TimePickerIOS;
|