@transferwise/components 0.0.0-experimental-8d0974a → 0.0.0-experimental-53b8447
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/avatar/Avatar.js +3 -0
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +3 -0
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatarView/AvatarView.js +187 -0
- package/build/avatarView/AvatarView.js.map +1 -0
- package/build/avatarView/AvatarView.mjs +185 -0
- package/build/avatarView/AvatarView.mjs.map +1 -0
- package/build/avatarView/NotificationDot.js +56 -0
- package/build/avatarView/NotificationDot.js.map +1 -0
- package/build/avatarView/NotificationDot.mjs +54 -0
- package/build/avatarView/NotificationDot.mjs.map +1 -0
- package/build/avatarWrapper/AvatarWrapper.js +6 -1
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +6 -1
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js +8 -1
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +8 -1
- package/build/badge/Badge.mjs.map +1 -1
- package/build/badge/BadgeAssets.js +63 -0
- package/build/badge/BadgeAssets.js.map +1 -0
- package/build/badge/BadgeAssets.mjs +61 -0
- package/build/badge/BadgeAssets.mjs.map +1 -0
- package/build/common/circle/Circle.js +29 -3
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs +29 -3
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +6 -6
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.mjs +6 -6
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +1 -4
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +1 -4
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -1
- package/build/i18n/de.json +5 -0
- package/build/i18n/de.json.js +5 -0
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +5 -0
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/es.json +5 -0
- package/build/i18n/es.json.js +5 -0
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/es.json.mjs +5 -0
- package/build/i18n/es.json.mjs.map +1 -1
- package/build/i18n/fr.json +5 -0
- package/build/i18n/fr.json.js +5 -0
- package/build/i18n/fr.json.js.map +1 -1
- package/build/i18n/fr.json.mjs +5 -0
- package/build/i18n/fr.json.mjs.map +1 -1
- package/build/i18n/hu.json +5 -0
- package/build/i18n/hu.json.js +5 -0
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/hu.json.mjs +5 -0
- package/build/i18n/hu.json.mjs.map +1 -1
- package/build/i18n/id.json +5 -0
- package/build/i18n/id.json.js +5 -0
- package/build/i18n/id.json.js.map +1 -1
- package/build/i18n/id.json.mjs +5 -0
- package/build/i18n/id.json.mjs.map +1 -1
- package/build/i18n/it.json +5 -0
- package/build/i18n/it.json.js +5 -0
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +5 -0
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/ja.json +5 -0
- package/build/i18n/ja.json.js +5 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +5 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/pl.json +5 -0
- package/build/i18n/pl.json.js +5 -0
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pl.json.mjs +5 -0
- package/build/i18n/pl.json.mjs.map +1 -1
- package/build/i18n/pt.json +5 -0
- package/build/i18n/pt.json.js +5 -0
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/pt.json.mjs +5 -0
- package/build/i18n/pt.json.mjs.map +1 -1
- package/build/i18n/ro.json +5 -0
- package/build/i18n/ro.json.js +5 -0
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ro.json.mjs +5 -0
- package/build/i18n/ro.json.mjs.map +1 -1
- package/build/i18n/ru.json +5 -0
- package/build/i18n/ru.json.js +5 -0
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +5 -0
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/i18n/tr.json +5 -0
- package/build/i18n/tr.json.js +5 -0
- package/build/i18n/tr.json.js.map +1 -1
- package/build/i18n/tr.json.mjs +5 -0
- package/build/i18n/tr.json.mjs.map +1 -1
- package/build/index.js +15 -4
- package/build/index.js.map +1 -1
- package/build/index.mjs +10 -2
- package/build/index.mjs.map +1 -1
- package/build/main.css +98 -25
- package/build/statusIcon/StatusIcon.js +2 -2
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +2 -2
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/avatarGroup/AvatarGroup.css +28 -0
- package/build/styles/avatarView/AvatarView.css +28 -0
- package/build/styles/avatarView/NotificationDot.css +20 -0
- package/build/styles/badge/Badge.css +6 -5
- package/build/styles/common/circle/Circle.css +36 -0
- package/build/styles/main.css +98 -25
- package/build/styles/statusIcon/StatusIcon.css +0 -20
- package/build/types/avatar/Avatar.d.ts +3 -0
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/avatarGroup/AvatarGroup.d.ts +18 -0
- package/build/types/avatarGroup/AvatarGroup.d.ts.map +1 -0
- package/build/types/avatarGroup/index.d.ts +3 -0
- package/build/types/avatarGroup/index.d.ts.map +1 -0
- package/build/types/avatarView/AvatarView.d.ts +25 -0
- package/build/types/avatarView/AvatarView.d.ts.map +1 -0
- package/build/types/avatarView/NotificationDot.d.ts +8 -0
- package/build/types/avatarView/NotificationDot.d.ts.map +1 -0
- package/build/types/avatarView/index.d.ts +3 -0
- package/build/types/avatarView/index.d.ts.map +1 -0
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +3 -0
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts +5 -1
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/badge/BadgeAssets.d.ts +15 -0
- package/build/types/badge/BadgeAssets.d.ts.map +1 -0
- package/build/types/badge/index.d.ts +2 -0
- package/build/types/badge/index.d.ts.map +1 -1
- package/build/types/common/circle/Circle.d.ts +3 -1
- package/build/types/common/circle/Circle.d.ts.map +1 -1
- package/build/types/common/dateUtils/index.d.ts +0 -1
- package/build/types/common/dateUtils/index.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts +1 -1
- package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +6 -2
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/avatar/Avatar.tsx +3 -0
- package/src/avatarGroup/AvatarGroup.css +28 -0
- package/src/avatarGroup/AvatarGroup.less +32 -0
- package/src/avatarGroup/AvatarGroup.story.tsx +195 -0
- package/src/avatarGroup/AvatarGroup.tsx +80 -0
- package/src/avatarGroup/index.ts +2 -0
- package/src/avatarView/AvatarView.css +28 -0
- package/src/avatarView/AvatarView.less +16 -0
- package/src/avatarView/AvatarView.story.tsx +573 -0
- package/src/avatarView/AvatarView.tsx +184 -0
- package/src/avatarView/NotificationDot.css +20 -0
- package/src/avatarView/NotificationDot.less +24 -0
- package/src/avatarView/NotificationDot.tsx +32 -0
- package/src/avatarView/index.ts +2 -0
- package/src/avatarWrapper/AvatarWrapper.story.tsx +6 -0
- package/src/avatarWrapper/AvatarWrapper.tsx +3 -0
- package/src/badge/Badge.css +6 -5
- package/src/badge/Badge.less +4 -3
- package/src/badge/Badge.tsx +8 -1
- package/src/badge/BadgeAssets.tsx +65 -0
- package/src/badge/index.ts +3 -0
- package/src/common/circle/Circle.css +36 -0
- package/src/common/circle/Circle.less +42 -1
- package/src/common/circle/Circle.tsx +41 -3
- package/src/common/dateUtils/index.ts +0 -1
- package/src/dateLookup/DateLookup.tests.story.tsx +5 -40
- package/src/dateLookup/DateLookup.tsx +11 -9
- package/src/dateLookup/dayCalendar/table/DayCalendarTable.tsx +2 -5
- package/src/decision/Decision.story.tsx +10 -46
- package/src/flowNavigation/FlowNavigation.story.js +10 -39
- package/src/i18n/de.json +5 -0
- package/src/i18n/es.json +5 -0
- package/src/i18n/fr.json +5 -0
- package/src/i18n/hu.json +5 -0
- package/src/i18n/id.json +5 -0
- package/src/i18n/it.json +5 -0
- package/src/i18n/ja.json +5 -0
- package/src/i18n/pl.json +5 -0
- package/src/i18n/pt.json +5 -0
- package/src/i18n/ro.json +5 -0
- package/src/i18n/ru.json +5 -0
- package/src/i18n/tr.json +5 -0
- package/src/index.ts +4 -0
- package/src/listItem/ListItem.story.tsx +6 -43
- package/src/main.css +98 -25
- package/src/main.less +2 -0
- package/src/navigationOption/NavigationOption.story.js +14 -65
- package/src/overlayHeader/OverlayHeader.story.tsx +5 -10
- package/src/radio/Radio.story.tsx +5 -5
- package/src/radioGroup/RadioGroup.story.tsx +3 -3
- package/src/selectOption/SelectOption.story.tsx +31 -30
- package/src/statusIcon/StatusIcon.css +0 -20
- package/src/statusIcon/StatusIcon.less +0 -17
- package/src/statusIcon/StatusIcon.tsx +14 -4
- package/src/tile/Tile.story.tsx +2 -6
- package/build/common/dateUtils/getDateView/getDateView.js +0 -10
- package/build/common/dateUtils/getDateView/getDateView.js.map +0 -1
- package/build/common/dateUtils/getDateView/getDateView.mjs +0 -8
- package/build/common/dateUtils/getDateView/getDateView.mjs.map +0 -1
- package/build/types/common/dateUtils/getDateView/getDateView.d.ts +0 -2
- package/build/types/common/dateUtils/getDateView/getDateView.d.ts.map +0 -1
- package/src/common/dateUtils/getDateView/getDateView.ts +0 -5
|
@@ -7,10 +7,15 @@ import Circle, { CircleProps } from '../common/circle';
|
|
|
7
7
|
import { useMedia } from '../common/hooks/useMedia';
|
|
8
8
|
|
|
9
9
|
import messages from './StatusIcon.messages';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead
|
|
13
|
+
*/
|
|
14
|
+
type LegacySizes = SizeSmall | SizeMedium | SizeLarge;
|
|
10
15
|
|
|
11
16
|
export type StatusIconProps = {
|
|
12
|
-
sentiment
|
|
13
|
-
size
|
|
17
|
+
sentiment?: `${Sentiment}`;
|
|
18
|
+
size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
14
19
|
/**
|
|
15
20
|
* Override for the sentiment's-derived, default, accessible
|
|
16
21
|
* name announced by the screen readers. <br />
|
|
@@ -77,13 +82,18 @@ const StatusIcon = ({
|
|
|
77
82
|
|
|
78
83
|
const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
|
|
79
84
|
const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
|
|
80
|
-
const size =
|
|
85
|
+
const size =
|
|
86
|
+
sizeProp === Size.SMALL && isTinyViewport
|
|
87
|
+
? 32
|
|
88
|
+
: typeof sizeProp === 'string'
|
|
89
|
+
? mapLegacySize[sizeProp]
|
|
90
|
+
: sizeProp;
|
|
81
91
|
return (
|
|
82
92
|
<Circle
|
|
83
93
|
as="span"
|
|
84
94
|
size={size}
|
|
85
95
|
data-testid="status-icon"
|
|
86
|
-
className={clsx('status-circle',
|
|
96
|
+
className={clsx('status-circle', sentiment)}
|
|
87
97
|
>
|
|
88
98
|
<Icon
|
|
89
99
|
className={clsx('status-icon', iconColor)}
|
package/src/tile/Tile.story.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
2
|
import { text, boolean } from '@storybook/addon-knobs';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import AvatarView from '../avatarView';
|
|
5
5
|
import { Size } from '../common';
|
|
6
6
|
|
|
7
7
|
import Tile from '.';
|
|
@@ -41,11 +41,7 @@ export const Basic = () => {
|
|
|
41
41
|
description={description}
|
|
42
42
|
disabled={disabled}
|
|
43
43
|
href="#href1"
|
|
44
|
-
media={
|
|
45
|
-
<Avatar size="md" type="initials">
|
|
46
|
-
HM
|
|
47
|
-
</Avatar>
|
|
48
|
-
}
|
|
44
|
+
media={<AvatarView name="Henry Mike" />}
|
|
49
45
|
size={medium ? Size.MEDIUM : Size.SMALL}
|
|
50
46
|
title={title}
|
|
51
47
|
onClick={action('onClick')}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var moveToWithinRange = require('../moveToWithinRange/moveToWithinRange.js');
|
|
4
|
-
|
|
5
|
-
const returnDateView = (selectedDate, min, max) => {
|
|
6
|
-
return selectedDate || (min || max) && moveToWithinRange.moveToWithinRange(new Date(), min, max) || new Date();
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
exports.returnDateView = returnDateView;
|
|
10
|
-
//# sourceMappingURL=getDateView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDateView.js","sources":["../../../../src/common/dateUtils/getDateView/getDateView.ts"],"sourcesContent":["import { moveToWithinRange } from '../moveToWithinRange/moveToWithinRange';\n\nexport const returnDateView = (selectedDate: Date | null, min: Date | null, max: Date | null) => {\n return selectedDate || ((min || max) && moveToWithinRange(new Date(), min, max)) || new Date();\n};\n"],"names":["returnDateView","selectedDate","min","max","moveToWithinRange","Date"],"mappings":";;;;AAEO,MAAMA,cAAc,GAAGA,CAACC,YAAyB,EAAEC,GAAgB,EAAEC,GAAgB,KAAI;EAC9F,OAAOF,YAAY,IAAK,CAACC,GAAG,IAAIC,GAAG,KAAKC,mCAAiB,CAAC,IAAIC,IAAI,EAAE,EAAEH,GAAG,EAAEC,GAAG,CAAE,IAAI,IAAIE,IAAI,EAAE,CAAA;AAChG;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { moveToWithinRange } from '../moveToWithinRange/moveToWithinRange.mjs';
|
|
2
|
-
|
|
3
|
-
const returnDateView = (selectedDate, min, max) => {
|
|
4
|
-
return selectedDate || (min || max) && moveToWithinRange(new Date(), min, max) || new Date();
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
export { returnDateView };
|
|
8
|
-
//# sourceMappingURL=getDateView.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDateView.mjs","sources":["../../../../src/common/dateUtils/getDateView/getDateView.ts"],"sourcesContent":["import { moveToWithinRange } from '../moveToWithinRange/moveToWithinRange';\n\nexport const returnDateView = (selectedDate: Date | null, min: Date | null, max: Date | null) => {\n return selectedDate || ((min || max) && moveToWithinRange(new Date(), min, max)) || new Date();\n};\n"],"names":["returnDateView","selectedDate","min","max","moveToWithinRange","Date"],"mappings":";;AAEO,MAAMA,cAAc,GAAGA,CAACC,YAAyB,EAAEC,GAAgB,EAAEC,GAAgB,KAAI;EAC9F,OAAOF,YAAY,IAAK,CAACC,GAAG,IAAIC,GAAG,KAAKC,iBAAiB,CAAC,IAAIC,IAAI,EAAE,EAAEH,GAAG,EAAEC,GAAG,CAAE,IAAI,IAAIE,IAAI,EAAE,CAAA;AAChG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDateView.d.ts","sourceRoot":"","sources":["../../../../../src/common/dateUtils/getDateView/getDateView.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,iBAAkB,IAAI,GAAG,IAAI,OAAO,IAAI,GAAG,IAAI,OAAO,IAAI,GAAG,IAAI,SAE3F,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { moveToWithinRange } from '../moveToWithinRange/moveToWithinRange';
|
|
2
|
-
|
|
3
|
-
export const returnDateView = (selectedDate: Date | null, min: Date | null, max: Date | null) => {
|
|
4
|
-
return selectedDate || ((min || max) && moveToWithinRange(new Date(), min, max)) || new Date();
|
|
5
|
-
};
|