@transferwise/components 0.0.0-experimental-7709e0e → 0.0.0-experimental-94569f6
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/build/index.js +52 -52
- package/build/index.js.map +1 -1
- package/build/index.mjs +54 -54
- package/build/index.mjs.map +1 -1
- package/build/main.css +41 -58
- package/build/styles/inputs/SelectInput.css +39 -54
- package/build/styles/main.css +41 -58
- package/build/styles/statusIcon/StatusIcon.css +2 -4
- package/build/types/common/hooks/useVirtualKeyboard.d.ts +2 -0
- package/build/types/common/hooks/useVirtualKeyboard.d.ts.map +1 -0
- package/build/types/field/Field.d.ts +1 -6
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/inlineAlert/InlineAlert.d.ts +2 -2
- package/build/types/inlineAlert/InlineAlert.d.ts.map +1 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/common/hooks/useVirtualKeyboard.ts +16 -0
- package/src/field/Field.story.tsx +36 -17
- package/src/field/Field.tsx +13 -23
- package/src/inlineAlert/InlineAlert.story.tsx +5 -13
- package/src/inlineAlert/InlineAlert.tsx +7 -14
- package/src/inputs/SelectInput.css +39 -54
- package/src/inputs/_BottomSheet.less +34 -52
- package/src/inputs/_BottomSheet.tsx +22 -28
- package/src/main.css +41 -58
- package/src/statusIcon/StatusIcon.css +2 -4
- package/src/statusIcon/StatusIcon.less +2 -4
- package/src/statusIcon/StatusIcon.tsx +1 -1
- package/src/field/Field.tests.story.tsx +0 -33
|
@@ -60,8 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.status-circle.negative
|
|
64
|
-
.status-circle.error {
|
|
63
|
+
.status-circle.negative {
|
|
65
64
|
background-color: var(--color-sentiment-negative);
|
|
66
65
|
}
|
|
67
66
|
|
|
@@ -69,7 +68,6 @@
|
|
|
69
68
|
background-color: var(--color-content-secondary);
|
|
70
69
|
}
|
|
71
70
|
|
|
72
|
-
.status-circle.positive
|
|
73
|
-
.status-circle.success {
|
|
71
|
+
.status-circle.positive {
|
|
74
72
|
background-color: var(--color-sentiment-positive);
|
|
75
73
|
}
|
|
@@ -26,7 +26,7 @@ const StatusIcon = ({ sentiment = 'neutral', size = 'md' }: StatusIconProps) =>
|
|
|
26
26
|
return (
|
|
27
27
|
<span
|
|
28
28
|
data-testid="status-icon"
|
|
29
|
-
className={classNames('status-circle',
|
|
29
|
+
className={classNames('status-circle', 'status-circle-' + size, sentiment)}
|
|
30
30
|
>
|
|
31
31
|
<Icon className={classNames('status-icon', iconColor)} />
|
|
32
32
|
</span>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
import { Input } from '../inputs/Input';
|
|
4
|
-
import { Field } from './Field';
|
|
5
|
-
import { Sentiment } from '../common';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: Field,
|
|
9
|
-
title: 'Field/Tests',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const WithHelpAndErrorOnBlur = () => {
|
|
13
|
-
const [value, setValue] = useState('This is some text');
|
|
14
|
-
const [error, setError] = useState<string | undefined>(undefined);
|
|
15
|
-
return (
|
|
16
|
-
<Field
|
|
17
|
-
label="Phone number"
|
|
18
|
-
sentiment={error ? Sentiment.NEGATIVE : Sentiment.NEUTRAL}
|
|
19
|
-
message={error || 'Please include country code'}
|
|
20
|
-
>
|
|
21
|
-
<Input
|
|
22
|
-
value={value}
|
|
23
|
-
onChange={({ target }) => {
|
|
24
|
-
setValue(target.value);
|
|
25
|
-
setError(undefined);
|
|
26
|
-
}}
|
|
27
|
-
onBlur={() => {
|
|
28
|
-
setError('Something went wrong');
|
|
29
|
-
}}
|
|
30
|
-
/>
|
|
31
|
-
</Field>
|
|
32
|
-
);
|
|
33
|
-
};
|