@transferwise/components 46.26.2 → 46.28.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/build/i18n/th.json +2 -2
- package/build/i18n/zh-CN.json +5 -5
- package/build/index.js +410 -645
- package/build/index.js.map +1 -1
- package/build/index.mjs +411 -646
- package/build/index.mjs.map +1 -1
- package/build/logo/svg/flag-platform-white.svg +1 -0
- package/build/logo/svg/flag-platform.svg +1 -0
- package/build/logo/svg/logo-platform-white.svg +1 -0
- package/build/logo/svg/logo-platform.svg +1 -0
- package/build/main.css +0 -16
- package/build/styles/logo/Logo.css +0 -16
- package/build/styles/main.css +0 -16
- package/build/types/alert/Alert.d.ts +47 -58
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/alert/index.d.ts +2 -1
- package/build/types/alert/index.d.ts.map +1 -1
- package/build/types/button/Button.d.ts +7 -9
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/common/dateUtils/isWithinRange/isWithinRange.d.ts +1 -1
- package/build/types/common/dateUtils/isWithinRange/isWithinRange.d.ts.map +1 -1
- package/build/types/common/dateUtils/moveToWithinRange/moveToWithinRange.d.ts +1 -1
- package/build/types/common/dateUtils/moveToWithinRange/moveToWithinRange.d.ts.map +1 -1
- package/build/types/common/propsValues/sentiment.d.ts +0 -1
- package/build/types/common/propsValues/sentiment.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts +75 -28
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.messages.d.ts +42 -63
- package/build/types/dateLookup/DateLookup.messages.d.ts.map +1 -1
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts +9 -22
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/dateLookup/dateHeader/index.d.ts +1 -1
- package/build/types/dateLookup/dateHeader/index.d.ts.map +1 -1
- package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts +13 -31
- package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts.map +1 -1
- package/build/types/dateLookup/dateTrigger/index.d.ts +1 -1
- package/build/types/dateLookup/dateTrigger/index.d.ts.map +1 -1
- package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts +19 -2
- package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts.map +1 -1
- package/build/types/dateLookup/dayCalendar/index.d.ts +1 -1
- package/build/types/dateLookup/dayCalendar/index.d.ts.map +1 -1
- package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts +12 -2
- package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts.map +1 -1
- package/build/types/dateLookup/dayCalendar/table/index.d.ts +1 -1
- package/build/types/dateLookup/dayCalendar/table/index.d.ts.map +1 -1
- package/build/types/dateLookup/getStartOfDay/getStartOfDay.d.ts +1 -1
- package/build/types/dateLookup/getStartOfDay/getStartOfDay.d.ts.map +1 -1
- package/build/types/dateLookup/getStartOfDay/index.d.ts +1 -1
- package/build/types/dateLookup/getStartOfDay/index.d.ts.map +1 -1
- package/build/types/dateLookup/index.d.ts +2 -1
- package/build/types/dateLookup/index.d.ts.map +1 -1
- package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts +17 -2
- package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts.map +1 -1
- package/build/types/dateLookup/monthCalendar/index.d.ts +1 -1
- package/build/types/dateLookup/monthCalendar/index.d.ts.map +1 -1
- package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts +10 -26
- package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts.map +1 -1
- package/build/types/dateLookup/monthCalendar/table/index.d.ts +1 -1
- package/build/types/dateLookup/monthCalendar/table/index.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts +15 -2
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/index.d.ts +1 -1
- package/build/types/dateLookup/yearCalendar/index.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts +10 -26
- package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/table/index.d.ts +1 -1
- package/build/types/dateLookup/yearCalendar/table/index.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inlineAlert/InlineAlert.d.ts +2 -4
- package/build/types/inlineAlert/InlineAlert.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/build/types/logo/Logo.d.ts +1 -1
- package/build/types/logo/Logo.d.ts.map +1 -1
- package/build/types/logo/logoTypes.d.ts +2 -1
- package/build/types/logo/logoTypes.d.ts.map +1 -1
- package/build/types/markdown/Markdown.d.ts +1 -0
- package/build/types/markdown/Markdown.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/alert/{Alert.spec.js → Alert.spec.tsx} +43 -40
- package/src/alert/Alert.story.tsx +1 -2
- package/src/alert/Alert.tsx +218 -0
- package/src/alert/index.ts +2 -0
- package/src/button/Button.tsx +6 -10
- package/src/common/dateUtils/isWithinRange/isWithinRange.spec.ts +21 -0
- package/src/common/dateUtils/isWithinRange/isWithinRange.ts +2 -2
- package/src/common/dateUtils/moveToWithinRange/moveToWithinRange.ts +8 -4
- package/src/common/propsValues/sentiment.ts +0 -10
- package/src/dateLookup/DateLookup.state.spec.js +7 -0
- package/src/dateLookup/{DateLookup.story.js → DateLookup.story.tsx} +13 -14
- package/src/dateLookup/DateLookup.tests.story.tsx +70 -0
- package/src/dateLookup/{DateLookup.js → DateLookup.tsx} +115 -81
- package/src/dateLookup/dateHeader/{DateHeader.js → DateHeader.tsx} +15 -15
- package/src/dateLookup/dateTrigger/DateTrigger.spec.js +0 -22
- package/src/dateLookup/dateTrigger/{DateTrigger.js → DateTrigger.tsx} +15 -32
- package/src/dateLookup/dayCalendar/{DayCalendar.js → DayCalendar.tsx} +14 -21
- package/src/dateLookup/dayCalendar/table/{DayCalendarTable.js → DayCalendarTable.tsx} +26 -37
- package/src/dateLookup/getStartOfDay/{getStartOfDay.js → getStartOfDay.tsx} +1 -1
- package/src/dateLookup/index.ts +2 -0
- package/src/dateLookup/monthCalendar/{MonthCalendar.js → MonthCalendar.tsx} +19 -22
- package/src/dateLookup/monthCalendar/table/{MonthCalendarTable.js → MonthCalendarTable.tsx} +31 -30
- package/src/dateLookup/yearCalendar/{YearCalendar.js → YearCalendar.tsx} +18 -21
- package/src/dateLookup/yearCalendar/table/{YearCalendarTable.js → YearCalendarTable.tsx} +26 -28
- package/src/i18n/th.json +2 -2
- package/src/i18n/zh-CN.json +5 -5
- package/src/index.ts +2 -1
- package/src/inlineAlert/InlineAlert.spec.tsx +0 -7
- package/src/inlineAlert/InlineAlert.tsx +19 -47
- package/src/inputs/InputGroup.tsx +3 -3
- package/src/inputs/SelectInput.tsx +1 -0
- package/src/inputs/_BottomSheet.tsx +44 -54
- package/src/inputs/_Popover.tsx +20 -23
- package/src/instructionsList/InstructionsList.spec.tsx +5 -0
- package/src/instructionsList/InstructionsList.story.tsx +1 -0
- package/src/instructionsList/InstructionsList.tsx +3 -2
- package/src/logo/Logo.css +0 -16
- package/src/logo/Logo.js +27 -5
- package/src/logo/Logo.less +0 -16
- package/src/logo/Logo.spec.js +15 -1
- package/src/logo/__snapshots__/Logo.spec.js.snap +45 -71
- package/src/logo/logoTypes.ts +1 -0
- package/src/logo/svg/flag-platform-white.svg +1 -0
- package/src/logo/svg/flag-platform.svg +1 -0
- package/src/logo/svg/logo-platform-white.svg +1 -0
- package/src/logo/svg/logo-platform.svg +1 -0
- package/src/main.css +0 -16
- package/src/markdown/Markdown.spec.tsx +16 -0
- package/src/markdown/Markdown.tsx +6 -1
- package/src/statusIcon/StatusIcon.tsx +14 -14
- package/build/types/alert/withArrow/alertArrowPositions.d.ts +0 -9
- package/build/types/alert/withArrow/alertArrowPositions.d.ts.map +0 -1
- package/build/types/alert/withArrow/index.d.ts +0 -3
- package/build/types/alert/withArrow/index.d.ts.map +0 -1
- package/build/types/alert/withArrow/withArrow.d.ts +0 -11
- package/build/types/alert/withArrow/withArrow.d.ts.map +0 -1
- package/src/alert/Alert.js +0 -196
- package/src/alert/index.js +0 -1
- package/src/alert/withArrow/alertArrowPositions.ts +0 -9
- package/src/alert/withArrow/index.js +0 -2
- package/src/alert/withArrow/withArrow.js +0 -50
- package/src/alert/withArrow/withArrow.spec.js +0 -51
- package/src/dateLookup/index.js +0 -1
- /package/src/dateLookup/{DateLookup.messages.js → DateLookup.messages.ts} +0 -0
- /package/src/dateLookup/dateHeader/{index.js → index.ts} +0 -0
- /package/src/dateLookup/dateTrigger/{index.js → index.ts} +0 -0
- /package/src/dateLookup/dayCalendar/{index.js → index.ts} +0 -0
- /package/src/dateLookup/dayCalendar/table/{index.js → index.ts} +0 -0
- /package/src/dateLookup/getStartOfDay/{index.js → index.ts} +0 -0
- /package/src/dateLookup/monthCalendar/{index.js → index.ts} +0 -0
- /package/src/dateLookup/monthCalendar/table/{index.js → index.ts} +0 -0
- /package/src/dateLookup/yearCalendar/{index.js → index.ts} +0 -0
- /package/src/dateLookup/yearCalendar/table/{index.js → index.ts} +0 -0
|
@@ -107,9 +107,9 @@ function InputAddon({
|
|
|
107
107
|
const ref = useRef<HTMLSpanElement>(null);
|
|
108
108
|
useResizeObserver(ref, (entry) => {
|
|
109
109
|
// TODO: Remove fallback once most browsers support `borderBoxSize`
|
|
110
|
-
|
|
111
|
-
if (
|
|
112
|
-
setInputPadding(
|
|
110
|
+
const inlineSize = entry.borderBoxSize?.[0]?.inlineSize;
|
|
111
|
+
if (inlineSize != null) {
|
|
112
|
+
setInputPadding(inlineSize);
|
|
113
113
|
} else {
|
|
114
114
|
const targetStyle = getComputedStyle(entry.target);
|
|
115
115
|
setInputPadding(
|
|
@@ -12,7 +12,6 @@ import classNames from 'classnames';
|
|
|
12
12
|
import { useState } from 'react';
|
|
13
13
|
|
|
14
14
|
import { CloseButton } from '../common/closeButton';
|
|
15
|
-
import FocusBoundary from '../common/focusBoundary/FocusBoundary';
|
|
16
15
|
import { PreventScroll } from '../common/preventScroll/PreventScroll';
|
|
17
16
|
import { Size } from '../common/propsValues/size';
|
|
18
17
|
|
|
@@ -81,65 +80,56 @@ export function BottomSheet({
|
|
|
81
80
|
}}
|
|
82
81
|
afterLeave={onCloseEnd}
|
|
83
82
|
>
|
|
84
|
-
<
|
|
83
|
+
<Transition.Child
|
|
84
|
+
enter="np-bottom-sheet-v2-backdrop-container--enter"
|
|
85
|
+
enterFrom="np-bottom-sheet-v2-backdrop-container--enter-from"
|
|
86
|
+
leave="np-bottom-sheet-v2-backdrop-container--leave"
|
|
87
|
+
leaveTo="np-bottom-sheet-v2-backdrop-container--leave-to"
|
|
88
|
+
>
|
|
89
|
+
<div className="np-bottom-sheet-v2-backdrop" />
|
|
90
|
+
</Transition.Child>
|
|
91
|
+
|
|
92
|
+
<div className="np-bottom-sheet-v2">
|
|
85
93
|
<Transition.Child
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
className="np-bottom-sheet-v2-content"
|
|
95
|
+
enter="np-bottom-sheet-v2-content--enter"
|
|
96
|
+
enterFrom="np-bottom-sheet-v2-content--enter-from"
|
|
97
|
+
leave="np-bottom-sheet-v2-content--leave"
|
|
98
|
+
leaveTo="np-bottom-sheet-v2-content--leave-to"
|
|
90
99
|
>
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
enter="np-bottom-sheet-v2-content--enter"
|
|
98
|
-
enterFrom="np-bottom-sheet-v2-content--enter-from"
|
|
99
|
-
leave="np-bottom-sheet-v2-content--leave"
|
|
100
|
-
leaveTo="np-bottom-sheet-v2-content--leave-to"
|
|
101
|
-
>
|
|
102
|
-
<FloatingFocusManager
|
|
103
|
-
context={context}
|
|
104
|
-
initialFocus={initialFocusRef}
|
|
105
|
-
guards={false}
|
|
106
|
-
modal={false}
|
|
100
|
+
<FloatingFocusManager context={context} initialFocus={initialFocusRef}>
|
|
101
|
+
<div
|
|
102
|
+
key={floatingKey} // Force inner state invalidation on open
|
|
103
|
+
ref={refs.setFloating}
|
|
104
|
+
className="np-bottom-sheet-v2-content-inner-container"
|
|
105
|
+
{...getFloatingProps()}
|
|
107
106
|
>
|
|
107
|
+
<div className="np-bottom-sheet-v2-header">
|
|
108
|
+
<CloseButton
|
|
109
|
+
size={Size.SMALL}
|
|
110
|
+
onClick={() => {
|
|
111
|
+
onClose?.();
|
|
112
|
+
}}
|
|
113
|
+
/>
|
|
114
|
+
</div>
|
|
108
115
|
<div
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
className={classNames(
|
|
117
|
+
'np-bottom-sheet-v2-content-inner',
|
|
118
|
+
title && 'np-bottom-sheet-v2-content-inner--has-title',
|
|
119
|
+
{
|
|
120
|
+
'np-bottom-sheet-v2-content-inner--padding-md': padding === 'md',
|
|
121
|
+
},
|
|
122
|
+
)}
|
|
113
123
|
>
|
|
114
|
-
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
onClose?.();
|
|
119
|
-
}}
|
|
120
|
-
/>
|
|
121
|
-
</div>
|
|
122
|
-
<div
|
|
123
|
-
className={classNames(
|
|
124
|
-
'np-bottom-sheet-v2-content-inner',
|
|
125
|
-
title && 'np-bottom-sheet-v2-content-inner--has-title',
|
|
126
|
-
{
|
|
127
|
-
'np-bottom-sheet-v2-content-inner--padding-md': padding === 'md',
|
|
128
|
-
},
|
|
129
|
-
)}
|
|
130
|
-
>
|
|
131
|
-
{title ? (
|
|
132
|
-
<h2 className="np-bottom-sheet-v2-title np-text-title-body">{title}</h2>
|
|
133
|
-
) : null}
|
|
134
|
-
<div className="np-bottom-sheet-v2-body np-text-body-default">
|
|
135
|
-
{children}
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
124
|
+
{title ? (
|
|
125
|
+
<h2 className="np-bottom-sheet-v2-title np-text-title-body">{title}</h2>
|
|
126
|
+
) : null}
|
|
127
|
+
<div className="np-bottom-sheet-v2-body np-text-body-default">{children}</div>
|
|
138
128
|
</div>
|
|
139
|
-
</
|
|
140
|
-
</
|
|
141
|
-
</
|
|
142
|
-
</
|
|
129
|
+
</div>
|
|
130
|
+
</FloatingFocusManager>
|
|
131
|
+
</Transition.Child>
|
|
132
|
+
</div>
|
|
143
133
|
</Transition>
|
|
144
134
|
</ThemeProvider>
|
|
145
135
|
</FloatingPortal>
|
package/src/inputs/_Popover.tsx
CHANGED
|
@@ -17,7 +17,6 @@ import { ThemeProvider, useTheme } from '@wise/components-theming';
|
|
|
17
17
|
import classNames from 'classnames';
|
|
18
18
|
import { useState } from 'react';
|
|
19
19
|
|
|
20
|
-
import FocusBoundary from '../common/focusBoundary/FocusBoundary';
|
|
21
20
|
import { PreventScroll } from '../common/preventScroll/PreventScroll';
|
|
22
21
|
|
|
23
22
|
export interface PopoverProps {
|
|
@@ -104,32 +103,30 @@ export function Popover({
|
|
|
104
103
|
}}
|
|
105
104
|
afterLeave={onCloseEnd}
|
|
106
105
|
>
|
|
107
|
-
<
|
|
108
|
-
<
|
|
106
|
+
<FloatingFocusManager context={context}>
|
|
107
|
+
<div
|
|
108
|
+
key={floatingKey} // Force inner state invalidation on open
|
|
109
|
+
ref={refs.setFloating}
|
|
110
|
+
className={classNames('np-popover-v2-container', {
|
|
111
|
+
'np-popover-v2-container--size-md': size === 'md',
|
|
112
|
+
'np-popover-v2-container--size-lg': size === 'lg',
|
|
113
|
+
})}
|
|
114
|
+
// eslint-disable-next-line react/forbid-dom-props
|
|
115
|
+
style={floatingStyles}
|
|
116
|
+
{...getFloatingProps()}
|
|
117
|
+
>
|
|
109
118
|
<div
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
className={classNames('np-popover-v2-container', {
|
|
113
|
-
'np-popover-v2-container--size-md': size === 'md',
|
|
114
|
-
'np-popover-v2-container--size-lg': size === 'lg',
|
|
119
|
+
className={classNames('np-popover-v2', title && 'np-popover-v2--has-title', {
|
|
120
|
+
'np-popover-v2--padding-md': padding === 'md',
|
|
115
121
|
})}
|
|
116
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
117
|
-
style={floatingStyles}
|
|
118
|
-
{...getFloatingProps()}
|
|
119
122
|
>
|
|
120
|
-
|
|
121
|
-
className=
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
>
|
|
125
|
-
{title ? (
|
|
126
|
-
<h2 className="np-popover-v2-title np-text-title-body">{title}</h2>
|
|
127
|
-
) : null}
|
|
128
|
-
<div className="np-popover-v2-content np-text-body-default">{children}</div>
|
|
129
|
-
</div>
|
|
123
|
+
{title ? (
|
|
124
|
+
<h2 className="np-popover-v2-title np-text-title-body">{title}</h2>
|
|
125
|
+
) : null}
|
|
126
|
+
<div className="np-popover-v2-content np-text-body-default">{children}</div>
|
|
130
127
|
</div>
|
|
131
|
-
</
|
|
132
|
-
</
|
|
128
|
+
</div>
|
|
129
|
+
</FloatingFocusManager>
|
|
133
130
|
</Transition>
|
|
134
131
|
</ThemeProvider>
|
|
135
132
|
</FloatingPortal>
|
|
@@ -3,6 +3,11 @@ import { render, screen } from '../test-utils';
|
|
|
3
3
|
import InstructionsList from '.';
|
|
4
4
|
|
|
5
5
|
describe('InstructionsList', () => {
|
|
6
|
+
it('should render with custom class', () => {
|
|
7
|
+
render(<InstructionsList className="foo" dos={['bar', 'baz']} />);
|
|
8
|
+
expect(screen.getByRole('list')).toHaveClass('foo');
|
|
9
|
+
});
|
|
10
|
+
|
|
6
11
|
it('should render dos list only', () => {
|
|
7
12
|
const dos = ['Test this component', 'With multiple dos'];
|
|
8
13
|
render(<InstructionsList dos={dos} />);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CrossCircleFill as DontIcon, CheckCircleFill as DoIcon } from '@transferwise/icons';
|
|
2
|
+
import classNames from 'classnames';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
4
|
|
|
4
5
|
import Body from '../body/Body';
|
|
@@ -23,7 +24,7 @@ export type InstructionsListProps = CommonProps &
|
|
|
23
24
|
}
|
|
24
25
|
);
|
|
25
26
|
|
|
26
|
-
const InstructionsList = ({ dos, donts, sort = 'dosFirst' }: InstructionsListProps) => {
|
|
27
|
+
const InstructionsList = ({ className, dos, donts, sort = 'dosFirst' }: InstructionsListProps) => {
|
|
27
28
|
const dosInstructions =
|
|
28
29
|
dos?.map((doThis, index) => (
|
|
29
30
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -49,7 +50,7 @@ const InstructionsList = ({ dos, donts, sort = 'dosFirst' }: InstructionsListPro
|
|
|
49
50
|
</>
|
|
50
51
|
);
|
|
51
52
|
|
|
52
|
-
return <ul className=
|
|
53
|
+
return <ul className={classNames('tw-instructions', className)}>{orderedInstructions}</ul>;
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
function Instruction({ item, type }: { item: ReactNode | InstructionNode; type: 'do' | 'dont' }) {
|
package/src/logo/Logo.css
CHANGED
|
@@ -8,19 +8,3 @@
|
|
|
8
8
|
.np-theme-personal--dark .np-logo-svg path {
|
|
9
9
|
fill: var(--color-white);
|
|
10
10
|
}
|
|
11
|
-
.np-logo-svg--size-sm {
|
|
12
|
-
display: block;
|
|
13
|
-
}
|
|
14
|
-
@media (min-width: 576px) {
|
|
15
|
-
.np-logo-svg--size-sm {
|
|
16
|
-
display: none;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
.np-logo-svg--size-md {
|
|
20
|
-
display: none;
|
|
21
|
-
}
|
|
22
|
-
@media (min-width: 576px) {
|
|
23
|
-
.np-logo-svg--size-md {
|
|
24
|
-
display: block;
|
|
25
|
-
}
|
|
26
|
-
}
|
package/src/logo/Logo.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
|
+
import { Breakpoint } from '../common';
|
|
5
|
+
import { useScreenSize } from '../common/hooks/useScreenSize';
|
|
6
|
+
|
|
4
7
|
import { LogoType } from './logoTypes';
|
|
5
8
|
import { ReactComponent as LogoFlagInverse } from './svg/flag-inverse.svg';
|
|
9
|
+
import { ReactComponent as LogoFlagPlatformInverse } from './svg/flag-platform-white.svg';
|
|
10
|
+
import { ReactComponent as LogoFlagPlatform } from './svg/flag-platform.svg';
|
|
6
11
|
import { ReactComponent as LogoFlag } from './svg/flag.svg';
|
|
7
12
|
import { ReactComponent as LogoWiseInverse } from './svg/logo-inverse.svg';
|
|
13
|
+
import { ReactComponent as LogoWisePlatformInverse } from './svg/logo-platform-white.svg';
|
|
14
|
+
import { ReactComponent as LogoWisePlatform } from './svg/logo-platform.svg';
|
|
8
15
|
import { ReactComponent as LogoWise } from './svg/logo.svg';
|
|
9
16
|
|
|
10
17
|
const svgPaths = {
|
|
@@ -12,22 +19,37 @@ const svgPaths = {
|
|
|
12
19
|
WISE_BUSINESS: LogoWise,
|
|
13
20
|
WISE_INVERSE: LogoWiseInverse,
|
|
14
21
|
WISE_BUSINESS_INVERSE: LogoWiseInverse,
|
|
22
|
+
WISE_PLATFORM: LogoWisePlatform,
|
|
23
|
+
WISE_PLATFORM_INVERSE: LogoWisePlatformInverse,
|
|
15
24
|
WISE_FLAG: LogoFlag,
|
|
16
25
|
WISE_FLAG_INVERSE: LogoFlagInverse,
|
|
26
|
+
WISE_FLAG_PLATFORM: LogoFlagPlatform,
|
|
27
|
+
WISE_FLAG_PLATFORM_INVERSE: LogoFlagPlatformInverse,
|
|
17
28
|
};
|
|
18
29
|
|
|
19
30
|
const Logo = ({ className, inverse, type }) => {
|
|
20
|
-
const LogoSm =
|
|
31
|
+
const LogoSm =
|
|
32
|
+
svgPaths[
|
|
33
|
+
`WISE_FLAG${type === LogoType.WISE_PLATFORM ? '_PLATFORM' : ''}${inverse ? '_INVERSE' : ''}`
|
|
34
|
+
];
|
|
21
35
|
const LogoMd = svgPaths[`${type}${inverse ? '_INVERSE' : ''}`];
|
|
22
36
|
|
|
37
|
+
const screenMd = useScreenSize(Breakpoint.MEDIUM);
|
|
38
|
+
|
|
23
39
|
return (
|
|
24
40
|
<span
|
|
25
|
-
aria-label={
|
|
41
|
+
aria-label={
|
|
42
|
+
type === LogoType.WISE
|
|
43
|
+
? 'Wise'
|
|
44
|
+
: 'Wise Business' | (type === LogoType.WISE_PLATFORM)
|
|
45
|
+
? 'Wise Platform'
|
|
46
|
+
: 'Wise Business'
|
|
47
|
+
}
|
|
26
48
|
role="img"
|
|
27
49
|
className={classNames(className, 'np-logo')}
|
|
28
50
|
>
|
|
29
|
-
<LogoSm className="np-logo-svg
|
|
30
|
-
<LogoMd className="np-logo-svg
|
|
51
|
+
{!screenMd && <LogoSm className="np-logo-svg" />}
|
|
52
|
+
{screenMd && <LogoMd className="np-logo-svg" />}
|
|
31
53
|
</span>
|
|
32
54
|
);
|
|
33
55
|
};
|
|
@@ -38,7 +60,7 @@ Logo.propTypes = {
|
|
|
38
60
|
/** If true, will use dark colours for dark on light theme */
|
|
39
61
|
inverse: PropTypes.bool,
|
|
40
62
|
/** What type of logo to display */
|
|
41
|
-
type: PropTypes.oneOf(['WISE', 'WISE_BUSINESS']),
|
|
63
|
+
type: PropTypes.oneOf(['WISE', 'WISE_BUSINESS', 'WISE_PLATFORM']),
|
|
42
64
|
};
|
|
43
65
|
|
|
44
66
|
Logo.defaultProps = {
|
package/src/logo/Logo.less
CHANGED
package/src/logo/Logo.spec.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { render } from '../test-utils';
|
|
1
|
+
import { render, mockMatchMedia } from '../test-utils';
|
|
2
2
|
|
|
3
3
|
import Logo, { LogoType } from '.';
|
|
4
4
|
|
|
5
|
+
mockMatchMedia();
|
|
6
|
+
|
|
5
7
|
describe('Logo', () => {
|
|
6
8
|
it('renders wise logo', () => {
|
|
7
9
|
expect(render(<Logo className="class" type={LogoType.WISE} />).container).toMatchSnapshot();
|
|
@@ -17,6 +19,12 @@ describe('Logo', () => {
|
|
|
17
19
|
).toMatchSnapshot();
|
|
18
20
|
});
|
|
19
21
|
|
|
22
|
+
it('renders wise platform logo', () => {
|
|
23
|
+
expect(
|
|
24
|
+
render(<Logo className="class" type={LogoType.WISE_PLATFORM} />).container,
|
|
25
|
+
).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
|
|
20
28
|
it('renders wise logo inversed', () => {
|
|
21
29
|
expect(
|
|
22
30
|
render(<Logo className="class" type={LogoType.WISE} inverse />).container,
|
|
@@ -29,6 +37,12 @@ describe('Logo', () => {
|
|
|
29
37
|
).toMatchSnapshot();
|
|
30
38
|
});
|
|
31
39
|
|
|
40
|
+
it('renders wise platform logo inversed', () => {
|
|
41
|
+
expect(
|
|
42
|
+
render(<Logo className="class" type={LogoType.WISE_PLATFORM} inverse />).container,
|
|
43
|
+
).toMatchSnapshot();
|
|
44
|
+
});
|
|
45
|
+
|
|
32
46
|
describe('on mobile', () => {
|
|
33
47
|
beforeEach(() => {
|
|
34
48
|
window.innerWidth = 500;
|
|
@@ -8,7 +8,7 @@ exports[`Logo on mobile renders only fast flag 1`] = `
|
|
|
8
8
|
role="img"
|
|
9
9
|
>
|
|
10
10
|
<svg
|
|
11
|
-
class="np-logo-svg
|
|
11
|
+
class="np-logo-svg"
|
|
12
12
|
fill="none"
|
|
13
13
|
height="24"
|
|
14
14
|
width="26"
|
|
@@ -19,18 +19,6 @@ exports[`Logo on mobile renders only fast flag 1`] = `
|
|
|
19
19
|
fill="#163300"
|
|
20
20
|
/>
|
|
21
21
|
</svg>
|
|
22
|
-
<svg
|
|
23
|
-
class="np-logo-svg np-logo-svg--size-md"
|
|
24
|
-
fill="none"
|
|
25
|
-
height="24"
|
|
26
|
-
width="106"
|
|
27
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
28
|
-
>
|
|
29
|
-
<path
|
|
30
|
-
d="M58.738.359h6.498l-3.27 23.322h-6.498L58.739.359Zm-8.193 0L46.16 13.794 44.247.359h-4.545L33.96 13.754 33.243.36h-6.299l2.193 23.322h5.223l6.458-14.75 2.272 14.75h5.143L56.725.359h-6.18Zm54.558 13.555H89.674c.08 3.03 1.894 5.023 4.565 5.023 2.014 0 3.608-1.077 4.844-3.13l5.208 2.368C102.501 21.702 98.729 24 94.08 24c-6.339 0-10.545-4.266-10.545-11.123C83.535 5.342 88.478 0 95.455 0c6.14 0 10.007 4.146 10.007 10.605 0 1.076-.12 2.152-.359 3.309Zm-5.78-4.466c0-2.71-1.516-4.425-3.947-4.425-2.512 0-4.585 1.794-5.144 4.425h9.09ZM6.632 7.387 0 15.139h11.844l1.33-3.655H8.1l3.1-3.586.01-.095-2.016-3.471h9.072l-7.032 19.35h4.812L24.538.358H2.6l4.033 7.028Zm69.168-2.364c2.292 0 4.3 1.233 6.055 3.346l.921-6.575C81.143.688 78.93 0 76 0c-5.82 0-9.09 3.409-9.09 7.734 0 3 1.675 4.834 4.426 6.02l1.315.598c2.452 1.047 3.11 1.565 3.11 2.671 0 1.146-1.106 1.874-2.79 1.874-2.782.01-5.034-1.415-6.728-3.847l-.94 6.699C67.234 23.22 69.708 24 72.97 24c5.532 0 8.93-3.19 8.93-7.615 0-3.01-1.335-4.943-4.704-6.458l-1.435-.678c-1.994-.887-2.671-1.375-2.671-2.352 0-1.056.927-1.874 2.71-1.874Z"
|
|
31
|
-
fill="#163300"
|
|
32
|
-
/>
|
|
33
|
-
</svg>
|
|
34
22
|
</span>
|
|
35
23
|
</div>
|
|
36
24
|
`;
|
|
@@ -38,24 +26,12 @@ exports[`Logo on mobile renders only fast flag 1`] = `
|
|
|
38
26
|
exports[`Logo renders wise business logo 1`] = `
|
|
39
27
|
<div>
|
|
40
28
|
<span
|
|
41
|
-
aria-label="Wise
|
|
29
|
+
aria-label="Wise Business"
|
|
42
30
|
class="class np-logo"
|
|
43
31
|
role="img"
|
|
44
32
|
>
|
|
45
33
|
<svg
|
|
46
|
-
class="np-logo-svg
|
|
47
|
-
fill="none"
|
|
48
|
-
height="24"
|
|
49
|
-
width="26"
|
|
50
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
51
|
-
>
|
|
52
|
-
<path
|
|
53
|
-
d="M6.826 7.232 0 15.21h12.188l1.37-3.762H8.335l3.191-3.69.01-.098L9.461 4.09h9.336L11.56 24h4.953L25.25 0H2.676l4.15 7.232Z"
|
|
54
|
-
fill="#163300"
|
|
55
|
-
/>
|
|
56
|
-
</svg>
|
|
57
|
-
<svg
|
|
58
|
-
class="np-logo-svg np-logo-svg--size-md"
|
|
34
|
+
class="np-logo-svg"
|
|
59
35
|
fill="none"
|
|
60
36
|
height="24"
|
|
61
37
|
width="106"
|
|
@@ -73,24 +49,12 @@ exports[`Logo renders wise business logo 1`] = `
|
|
|
73
49
|
exports[`Logo renders wise business logo inversed 1`] = `
|
|
74
50
|
<div>
|
|
75
51
|
<span
|
|
76
|
-
aria-label="Wise
|
|
52
|
+
aria-label="Wise Business"
|
|
77
53
|
class="class np-logo"
|
|
78
54
|
role="img"
|
|
79
55
|
>
|
|
80
56
|
<svg
|
|
81
|
-
class="np-logo-svg
|
|
82
|
-
fill="none"
|
|
83
|
-
height="24"
|
|
84
|
-
width="26"
|
|
85
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
86
|
-
>
|
|
87
|
-
<path
|
|
88
|
-
d="M6.826 7.232 0 15.21h12.188l1.37-3.762H8.335l3.191-3.69.01-.098L9.461 4.09h9.336L11.56 24h4.953L25.25 0H2.676l4.15 7.232Z"
|
|
89
|
-
fill="#9FE870"
|
|
90
|
-
/>
|
|
91
|
-
</svg>
|
|
92
|
-
<svg
|
|
93
|
-
class="np-logo-svg np-logo-svg--size-md"
|
|
57
|
+
class="np-logo-svg"
|
|
94
58
|
fill="none"
|
|
95
59
|
height="24"
|
|
96
60
|
width="106"
|
|
@@ -113,19 +77,7 @@ exports[`Logo renders wise logo 1`] = `
|
|
|
113
77
|
role="img"
|
|
114
78
|
>
|
|
115
79
|
<svg
|
|
116
|
-
class="np-logo-svg
|
|
117
|
-
fill="none"
|
|
118
|
-
height="24"
|
|
119
|
-
width="26"
|
|
120
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
121
|
-
>
|
|
122
|
-
<path
|
|
123
|
-
d="M6.826 7.232 0 15.21h12.188l1.37-3.762H8.335l3.191-3.69.01-.098L9.461 4.09h9.336L11.56 24h4.953L25.25 0H2.676l4.15 7.232Z"
|
|
124
|
-
fill="#163300"
|
|
125
|
-
/>
|
|
126
|
-
</svg>
|
|
127
|
-
<svg
|
|
128
|
-
class="np-logo-svg np-logo-svg--size-md"
|
|
80
|
+
class="np-logo-svg"
|
|
129
81
|
fill="none"
|
|
130
82
|
height="24"
|
|
131
83
|
width="106"
|
|
@@ -148,19 +100,30 @@ exports[`Logo renders wise logo by default 1`] = `
|
|
|
148
100
|
role="img"
|
|
149
101
|
>
|
|
150
102
|
<svg
|
|
151
|
-
class="np-logo-svg
|
|
103
|
+
class="np-logo-svg"
|
|
152
104
|
fill="none"
|
|
153
105
|
height="24"
|
|
154
|
-
width="
|
|
106
|
+
width="106"
|
|
155
107
|
xmlns="http://www.w3.org/2000/svg"
|
|
156
108
|
>
|
|
157
109
|
<path
|
|
158
|
-
d="
|
|
110
|
+
d="M58.738.359h6.498l-3.27 23.322h-6.498L58.739.359Zm-8.193 0L46.16 13.794 44.247.359h-4.545L33.96 13.754 33.243.36h-6.299l2.193 23.322h5.223l6.458-14.75 2.272 14.75h5.143L56.725.359h-6.18Zm54.558 13.555H89.674c.08 3.03 1.894 5.023 4.565 5.023 2.014 0 3.608-1.077 4.844-3.13l5.208 2.368C102.501 21.702 98.729 24 94.08 24c-6.339 0-10.545-4.266-10.545-11.123C83.535 5.342 88.478 0 95.455 0c6.14 0 10.007 4.146 10.007 10.605 0 1.076-.12 2.152-.359 3.309Zm-5.78-4.466c0-2.71-1.516-4.425-3.947-4.425-2.512 0-4.585 1.794-5.144 4.425h9.09ZM6.632 7.387 0 15.139h11.844l1.33-3.655H8.1l3.1-3.586.01-.095-2.016-3.471h9.072l-7.032 19.35h4.812L24.538.358H2.6l4.033 7.028Zm69.168-2.364c2.292 0 4.3 1.233 6.055 3.346l.921-6.575C81.143.688 78.93 0 76 0c-5.82 0-9.09 3.409-9.09 7.734 0 3 1.675 4.834 4.426 6.02l1.315.598c2.452 1.047 3.11 1.565 3.11 2.671 0 1.146-1.106 1.874-2.79 1.874-2.782.01-5.034-1.415-6.728-3.847l-.94 6.699C67.234 23.22 69.708 24 72.97 24c5.532 0 8.93-3.19 8.93-7.615 0-3.01-1.335-4.943-4.704-6.458l-1.435-.678c-1.994-.887-2.671-1.375-2.671-2.352 0-1.056.927-1.874 2.71-1.874Z"
|
|
159
111
|
fill="#163300"
|
|
160
112
|
/>
|
|
161
113
|
</svg>
|
|
114
|
+
</span>
|
|
115
|
+
</div>
|
|
116
|
+
`;
|
|
117
|
+
|
|
118
|
+
exports[`Logo renders wise logo inversed 1`] = `
|
|
119
|
+
<div>
|
|
120
|
+
<span
|
|
121
|
+
aria-label="Wise"
|
|
122
|
+
class="class np-logo"
|
|
123
|
+
role="img"
|
|
124
|
+
>
|
|
162
125
|
<svg
|
|
163
|
-
class="np-logo-svg
|
|
126
|
+
class="np-logo-svg"
|
|
164
127
|
fill="none"
|
|
165
128
|
height="24"
|
|
166
129
|
width="106"
|
|
@@ -168,42 +131,53 @@ exports[`Logo renders wise logo by default 1`] = `
|
|
|
168
131
|
>
|
|
169
132
|
<path
|
|
170
133
|
d="M58.738.359h6.498l-3.27 23.322h-6.498L58.739.359Zm-8.193 0L46.16 13.794 44.247.359h-4.545L33.96 13.754 33.243.36h-6.299l2.193 23.322h5.223l6.458-14.75 2.272 14.75h5.143L56.725.359h-6.18Zm54.558 13.555H89.674c.08 3.03 1.894 5.023 4.565 5.023 2.014 0 3.608-1.077 4.844-3.13l5.208 2.368C102.501 21.702 98.729 24 94.08 24c-6.339 0-10.545-4.266-10.545-11.123C83.535 5.342 88.478 0 95.455 0c6.14 0 10.007 4.146 10.007 10.605 0 1.076-.12 2.152-.359 3.309Zm-5.78-4.466c0-2.71-1.516-4.425-3.947-4.425-2.512 0-4.585 1.794-5.144 4.425h9.09ZM6.632 7.387 0 15.139h11.844l1.33-3.655H8.1l3.1-3.586.01-.095-2.016-3.471h9.072l-7.032 19.35h4.812L24.538.358H2.6l4.033 7.028Zm69.168-2.364c2.292 0 4.3 1.233 6.055 3.346l.921-6.575C81.143.688 78.93 0 76 0c-5.82 0-9.09 3.409-9.09 7.734 0 3 1.675 4.834 4.426 6.02l1.315.598c2.452 1.047 3.11 1.565 3.11 2.671 0 1.146-1.106 1.874-2.79 1.874-2.782.01-5.034-1.415-6.728-3.847l-.94 6.699C67.234 23.22 69.708 24 72.97 24c5.532 0 8.93-3.19 8.93-7.615 0-3.01-1.335-4.943-4.704-6.458l-1.435-.678c-1.994-.887-2.671-1.375-2.671-2.352 0-1.056.927-1.874 2.71-1.874Z"
|
|
171
|
-
fill="#
|
|
134
|
+
fill="#9FE870"
|
|
172
135
|
/>
|
|
173
136
|
</svg>
|
|
174
137
|
</span>
|
|
175
138
|
</div>
|
|
176
139
|
`;
|
|
177
140
|
|
|
178
|
-
exports[`Logo renders wise logo
|
|
141
|
+
exports[`Logo renders wise platform logo 1`] = `
|
|
179
142
|
<div>
|
|
180
143
|
<span
|
|
181
|
-
aria-label="Wise"
|
|
144
|
+
aria-label="Wise Platform"
|
|
182
145
|
class="class np-logo"
|
|
183
146
|
role="img"
|
|
184
147
|
>
|
|
185
148
|
<svg
|
|
186
|
-
class="np-logo-svg
|
|
149
|
+
class="np-logo-svg"
|
|
187
150
|
fill="none"
|
|
188
|
-
height="
|
|
189
|
-
width="
|
|
151
|
+
height="18"
|
|
152
|
+
width="172"
|
|
190
153
|
xmlns="http://www.w3.org/2000/svg"
|
|
191
154
|
>
|
|
192
155
|
<path
|
|
193
|
-
d="
|
|
194
|
-
fill="#
|
|
156
|
+
d="M43.276.841h4.787l-2.409 16.86h-4.787L43.276.84Zm-6.036 0-3.232 9.712L32.598.84H29.25l-4.23 9.684L24.49.84h-4.64l1.616 16.86h3.848l4.758-10.664L31.747 17.7h3.788L41.794.84H37.24Zm40.196 9.8H66.069c.059 2.189 1.396 3.63 3.363 3.63 1.483 0 2.657-.778 3.568-2.261l3.837 1.711c-1.32 2.55-4.098 4.211-7.523 4.211-4.67 0-7.769-3.083-7.769-8.04 0-5.447 3.642-9.31 8.783-9.31 4.524 0 7.373 2.998 7.373 7.667 0 .778-.088 1.555-.265 2.391Zm-4.259-3.228c0-1.96-1.117-3.2-2.908-3.2s-3.378 1.298-3.789 3.2h6.697ZM4.887 5.92 0 11.526h8.726l.98-2.642H5.969l2.284-2.592.008-.069-1.486-2.508h6.683L8.276 17.702h3.546L18.079.842H1.916l2.97 5.08Zm50.96-1.709c1.69 0 3.169.892 4.461 2.42l.679-4.755C59.783 1.077 58.152.58 55.994.58c-4.288 0-6.697 2.464-6.697 5.59 0 2.17 1.234 3.496 3.26 4.353l.97.432c1.806.756 2.291 1.132 2.291 1.931 0 .8-.815 1.355-2.056 1.355-2.048.007-3.708-1.024-4.956-2.782l-.692 4.843c1.422 1.063 3.245 1.628 5.648 1.628 4.076 0 6.58-2.306 6.58-5.505 0-2.176-.984-3.573-3.466-4.669l-1.058-.49c-1.469-.641-1.968-.994-1.968-1.7 0-.763.683-1.354 1.997-1.354ZM83.392 17.72V.792h6.149c1.342 0 2.454.24 3.335.719.882.48 1.541 1.134 1.979 1.963.437.83.656 1.762.656 2.798s-.22 1.976-.662 2.806c-.44.829-1.103 1.485-1.988 1.967-.884.482-1.994.723-3.33.723H85.3V9.603h3.993c.848 0 1.536-.144 2.064-.434.528-.29.915-.684 1.163-1.186.247-.501.37-1.07.37-1.71 0-.639-.123-1.206-.37-1.702-.248-.497-.636-.885-1.167-1.165-.53-.282-1.228-.422-2.092-.422h-3.269v14.735H83.39ZM100.21.793v16.926h-2.519V.793h2.519ZM107.102 18c-.82 0-1.561-.15-2.224-.45a3.664 3.664 0 0 1-1.571-1.31c-.385-.573-.577-1.275-.577-2.107 0-.717.141-1.307.421-1.768.281-.462.661-.83 1.138-1.1a6.031 6.031 0 0 1 1.6-.612c.589-.139 1.19-.243 1.802-.314.774-.088 1.403-.16 1.887-.218.482-.058.833-.153 1.052-.286.219-.132.329-.347.329-.644v-.058c0-.72-.207-1.28-.619-1.678-.412-.396-1.026-.595-1.84-.595-.813 0-1.514.183-2.001.55-.486.366-.821.772-1.006 1.218l-2.367-.528c.281-.772.692-1.395 1.235-1.873a5.03 5.03 0 0 1 1.874-1.041 7.558 7.558 0 0 1 2.231-.327c.517 0 1.066.06 1.648.178a4.952 4.952 0 0 1 1.634.65c.508.313.925.76 1.25 1.342.325.58.489 1.334.489 2.26v8.43h-2.46v-1.736h-.101a3.5 3.5 0 0 1-.732.942c-.327.309-.745.565-1.256.77-.511.204-1.123.305-1.836.305Zm.548-1.984c.696 0 1.293-.135 1.79-.405.497-.27.876-.623 1.138-1.062.26-.438.391-.908.391-1.409v-1.637c-.09.089-.262.17-.517.244a7.34 7.34 0 0 1-.872.19c-.326.054-.643.1-.951.14l-.775.104a6.22 6.22 0 0 0-1.335.306c-.401.144-.722.348-.961.616-.238.267-.357.62-.357 1.062 0 .612.23 1.073.69 1.385.46.31 1.047.466 1.76.466h-.001Zm14.574-10.991V7.01h-7.068V5.025h7.068Zm-5.173-3.04h2.519v12.008c0 .48.073.838.219 1.078a1.1 1.1 0 0 0 .569.488c.233.086.487.128.762.128.202 0 .379-.014.531-.04l.354-.066.455 2.041a4.555 4.555 0 0 1-.624.17c-.27.058-.607.09-1.011.095a4.51 4.51 0 0 1-1.853-.347 3.17 3.17 0 0 1-1.39-1.124c-.354-.506-.531-1.143-.531-1.91V1.985Zm13.846 3.041V7.01h-7.311V5.026h7.311Zm-5.306 12.694V3.555c0-.794.177-1.453.531-1.98.354-.525.823-.92 1.406-1.18a4.614 4.614 0 0 1 1.904-.393 6.067 6.067 0 0 1 2.098.338l-.59 2c-.118-.034-.27-.074-.454-.12a2.818 2.818 0 0 0-.674-.07c-.612 0-1.048.148-1.309.445-.261.297-.392.728-.392 1.29V17.72h-2.52Zm12.182.255c-1.214 0-2.271-.273-3.175-.818-.905-.545-1.607-1.31-2.106-2.289-.5-.981-.75-2.127-.75-3.438 0-1.312.25-2.469.75-3.455.499-.986 1.201-1.753 2.106-2.298.904-.545 1.963-.818 3.175-.818 1.212 0 2.271.273 3.175.818.905.545 1.606 1.312 2.106 2.298.5.986.75 2.138.75 3.455 0 1.316-.25 2.457-.75 3.438-.499.981-1.201 1.744-2.106 2.289-.904.545-1.963.818-3.175.818Zm.008-2.074c.786 0 1.437-.204 1.954-.612.516-.41.9-.95 1.149-1.628.25-.678.375-1.425.375-2.24 0-.815-.125-1.555-.375-2.236-.25-.68-.633-1.227-1.149-1.64-.517-.415-1.168-.62-1.954-.62s-1.448.206-1.967.62c-.519.412-.904.96-1.153 1.64a6.414 6.414 0 0 0-.375 2.236c0 .81.124 1.562.375 2.24.25.677.634 1.22 1.153 1.628.519.407 1.175.612 1.967.612Zm8.039 1.819V5.026h2.435v2.016h.135a3.1 3.1 0 0 1 1.25-1.617 3.62 3.62 0 0 1 2.034-.591 10.671 10.671 0 0 1 1.071.058v2.363a5.174 5.174 0 0 0-.539-.095 5.594 5.594 0 0 0-.774-.054c-.595 0-1.125.122-1.589.368a2.83 2.83 0 0 0-1.099 1.017c-.27.432-.405.924-.405 1.475v7.752h-2.519v.002Zm8.59 0V5.025h2.418v2.067h.16c.27-.7.71-1.246 1.322-1.641.612-.394 1.345-.592 2.199-.592.855 0 1.591.198 2.178.596a3.5 3.5 0 0 1 1.301 1.637h.135a3.62 3.62 0 0 1 1.475-1.624c.673-.405 1.477-.607 2.408-.607 1.175 0 2.132.361 2.877 1.082.744.722 1.116 1.81 1.116 3.265v8.512h-2.518V9.44c0-.86-.239-1.483-.716-1.869-.477-.386-1.047-.578-1.71-.578-.82 0-1.457.246-1.912.739-.455.492-.683 1.125-.683 1.896v8.092h-2.509V9.283c0-.69-.219-1.243-.657-1.662-.438-.419-1.008-.627-1.71-.627-.477 0-.917.122-1.318.368a2.742 2.742 0 0 0-.969 1.02c-.244.435-.365.94-.365 1.513v7.826h-2.519l-.003-.001Z"
|
|
157
|
+
fill="#163300"
|
|
195
158
|
/>
|
|
196
159
|
</svg>
|
|
160
|
+
</span>
|
|
161
|
+
</div>
|
|
162
|
+
`;
|
|
163
|
+
|
|
164
|
+
exports[`Logo renders wise platform logo inversed 1`] = `
|
|
165
|
+
<div>
|
|
166
|
+
<span
|
|
167
|
+
aria-label="Wise Platform"
|
|
168
|
+
class="class np-logo"
|
|
169
|
+
role="img"
|
|
170
|
+
>
|
|
197
171
|
<svg
|
|
198
|
-
class="np-logo-svg
|
|
172
|
+
class="np-logo-svg"
|
|
199
173
|
fill="none"
|
|
200
|
-
height="
|
|
201
|
-
width="
|
|
174
|
+
height="18"
|
|
175
|
+
width="172"
|
|
202
176
|
xmlns="http://www.w3.org/2000/svg"
|
|
203
177
|
>
|
|
204
178
|
<path
|
|
205
|
-
d="
|
|
206
|
-
fill="#
|
|
179
|
+
d="M43.276.841h4.787l-2.409 16.86h-4.787L43.276.84Zm-6.036 0-3.232 9.712L32.598.84H29.25l-4.23 9.684L24.49.84h-4.64l1.616 16.86h3.848l4.758-10.664L31.747 17.7h3.788L41.794.84H37.24Zm40.196 9.8H66.069c.059 2.189 1.396 3.63 3.363 3.63 1.483 0 2.657-.778 3.568-2.261l3.837 1.711c-1.32 2.55-4.098 4.211-7.523 4.211-4.67 0-7.769-3.083-7.769-8.04 0-5.447 3.642-9.31 8.783-9.31 4.524 0 7.373 2.998 7.373 7.667 0 .778-.088 1.555-.265 2.391Zm-4.259-3.228c0-1.96-1.117-3.2-2.908-3.2s-3.378 1.298-3.789 3.2h6.697ZM4.887 5.92 0 11.526h8.726l.98-2.642H5.969l2.284-2.592.008-.069-1.486-2.508h6.683L8.276 17.702h3.546L18.079.842H1.916l2.97 5.08Zm50.96-1.709c1.69 0 3.169.892 4.461 2.42l.679-4.755C59.783 1.077 58.152.58 55.994.58c-4.288 0-6.697 2.464-6.697 5.59 0 2.17 1.234 3.496 3.26 4.353l.97.432c1.806.756 2.291 1.132 2.291 1.931 0 .8-.815 1.355-2.056 1.355-2.048.007-3.708-1.024-4.956-2.782l-.692 4.843c1.422 1.063 3.245 1.628 5.648 1.628 4.076 0 6.58-2.306 6.58-5.505 0-2.176-.984-3.573-3.466-4.669l-1.058-.49c-1.469-.641-1.968-.994-1.968-1.7 0-.763.683-1.354 1.997-1.354ZM83.392 17.72V.792h6.149c1.342 0 2.454.24 3.335.719.882.48 1.541 1.134 1.979 1.963.437.83.656 1.762.656 2.798s-.22 1.976-.662 2.806c-.44.829-1.103 1.485-1.988 1.967-.884.482-1.994.723-3.33.723H85.3V9.603h3.993c.848 0 1.536-.144 2.064-.434.528-.29.915-.684 1.163-1.186.247-.501.37-1.07.37-1.71 0-.639-.123-1.206-.37-1.702-.248-.497-.636-.885-1.167-1.165-.53-.282-1.228-.422-2.092-.422h-3.269v14.735H83.39ZM100.21.793v16.926h-2.519V.793h2.519ZM107.102 18c-.82 0-1.561-.15-2.224-.45a3.664 3.664 0 0 1-1.571-1.31c-.385-.573-.577-1.275-.577-2.107 0-.717.141-1.307.421-1.768.281-.462.661-.83 1.138-1.1a6.031 6.031 0 0 1 1.6-.612c.589-.139 1.19-.243 1.802-.314.774-.088 1.403-.16 1.887-.218.482-.058.833-.153 1.052-.286.219-.132.329-.347.329-.644v-.058c0-.72-.207-1.28-.619-1.678-.412-.396-1.026-.595-1.84-.595-.813 0-1.514.183-2.001.55-.486.366-.821.772-1.006 1.218l-2.367-.528c.281-.772.692-1.395 1.235-1.873a5.03 5.03 0 0 1 1.874-1.041 7.558 7.558 0 0 1 2.231-.327c.517 0 1.066.06 1.648.178a4.952 4.952 0 0 1 1.634.65c.508.313.925.76 1.25 1.342.325.58.489 1.334.489 2.26v8.43h-2.46v-1.736h-.101a3.5 3.5 0 0 1-.732.942c-.327.309-.745.565-1.256.77-.511.204-1.123.305-1.836.305Zm.548-1.984c.696 0 1.293-.135 1.79-.405.497-.27.876-.623 1.138-1.062.26-.438.391-.908.391-1.409v-1.637c-.09.089-.262.17-.517.244a7.34 7.34 0 0 1-.872.19c-.326.054-.643.1-.951.14l-.775.104a6.22 6.22 0 0 0-1.335.306c-.401.144-.722.348-.961.616-.238.267-.357.62-.357 1.062 0 .612.23 1.073.69 1.385.46.31 1.047.466 1.76.466h-.001Zm14.574-10.991V7.01h-7.068V5.025h7.068Zm-5.173-3.04h2.519v12.008c0 .48.073.838.219 1.078a1.1 1.1 0 0 0 .569.488c.233.086.487.128.762.128.202 0 .379-.014.531-.04l.354-.066.455 2.041a4.555 4.555 0 0 1-.624.17c-.27.058-.607.09-1.011.095a4.51 4.51 0 0 1-1.853-.347 3.17 3.17 0 0 1-1.39-1.124c-.354-.506-.531-1.143-.531-1.91V1.985Zm13.846 3.041V7.01h-7.311V5.026h7.311Zm-5.306 12.694V3.555c0-.794.177-1.453.531-1.98.354-.525.823-.92 1.406-1.18a4.614 4.614 0 0 1 1.904-.393 6.067 6.067 0 0 1 2.098.338l-.59 2c-.118-.034-.27-.074-.454-.12a2.818 2.818 0 0 0-.674-.07c-.612 0-1.048.148-1.309.445-.261.297-.392.728-.392 1.29V17.72h-2.52Zm12.182.255c-1.214 0-2.271-.273-3.175-.818-.905-.545-1.607-1.31-2.106-2.289-.5-.981-.75-2.127-.75-3.438 0-1.312.25-2.469.75-3.455.499-.986 1.201-1.753 2.106-2.298.904-.545 1.963-.818 3.175-.818 1.212 0 2.271.273 3.175.818.905.545 1.606 1.312 2.106 2.298.5.986.75 2.138.75 3.455 0 1.316-.25 2.457-.75 3.438-.499.981-1.201 1.744-2.106 2.289-.904.545-1.963.818-3.175.818Zm.008-2.074c.786 0 1.437-.204 1.954-.612.516-.41.9-.95 1.149-1.628.25-.678.375-1.425.375-2.24 0-.815-.125-1.555-.375-2.236-.25-.68-.633-1.227-1.149-1.64-.517-.415-1.168-.62-1.954-.62s-1.448.206-1.967.62c-.519.412-.904.96-1.153 1.64a6.414 6.414 0 0 0-.375 2.236c0 .81.124 1.562.375 2.24.25.677.634 1.22 1.153 1.628.519.407 1.175.612 1.967.612Zm8.039 1.819V5.026h2.435v2.016h.135a3.1 3.1 0 0 1 1.25-1.617 3.62 3.62 0 0 1 2.034-.591 10.671 10.671 0 0 1 1.071.058v2.363a5.174 5.174 0 0 0-.539-.095 5.594 5.594 0 0 0-.774-.054c-.595 0-1.125.122-1.589.368a2.83 2.83 0 0 0-1.099 1.017c-.27.432-.405.924-.405 1.475v7.752h-2.519v.002Zm8.59 0V5.025h2.418v2.067h.16c.27-.7.71-1.246 1.322-1.641.612-.394 1.345-.592 2.199-.592.855 0 1.591.198 2.178.596a3.5 3.5 0 0 1 1.301 1.637h.135a3.62 3.62 0 0 1 1.475-1.624c.673-.405 1.477-.607 2.408-.607 1.175 0 2.132.361 2.877 1.082.744.722 1.116 1.81 1.116 3.265v8.512h-2.518V9.44c0-.86-.239-1.483-.716-1.869-.477-.386-1.047-.578-1.71-.578-.82 0-1.457.246-1.912.739-.455.492-.683 1.125-.683 1.896v8.092h-2.509V9.283c0-.69-.219-1.243-.657-1.662-.438-.419-1.008-.627-1.71-.627-.477 0-.917.122-1.318.368a2.742 2.742 0 0 0-.969 1.02c-.244.435-.365.94-.365 1.513v7.826h-2.519l-.003-.001Z"
|
|
180
|
+
fill="#fff"
|
|
207
181
|
/>
|
|
208
182
|
</svg>
|
|
209
183
|
</span>
|
package/src/logo/logoTypes.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="111" height="18" fill="none"><path fill="#fff" d="M4.887 5.918 0 11.523h8.726l.98-2.642H5.969l2.284-2.593.008-.068-1.486-2.508h6.683L8.276 17.699h3.546L18.079.838H1.916l2.97 5.08ZM22.001 17.717V.791h6.15c1.341 0 2.454.24 3.334.719.882.48 1.541 1.134 1.979 1.963.438.83.657 1.762.657 2.798s-.22 1.976-.662 2.806c-.44.83-1.104 1.485-1.988 1.967-.885.482-1.995.723-3.331.723h-4.23V9.6h3.994c.848 0 1.536-.144 2.064-.434.528-.29.914-.684 1.162-1.186.248-.501.37-1.07.37-1.71 0-.639-.122-1.206-.37-1.702-.248-.497-.636-.885-1.166-1.165-.531-.282-1.228-.422-2.093-.422h-3.268v14.735H22h.001ZM38.823.791v16.926h-2.518V.791h2.518ZM45.712 17.998c-.82 0-1.561-.15-2.224-.45a3.665 3.665 0 0 1-1.572-1.31c-.385-.573-.576-1.275-.576-2.107 0-.716.14-1.307.42-1.768.281-.462.661-.83 1.138-1.1a6.036 6.036 0 0 1 1.6-.612c.59-.139 1.19-.243 1.802-.313.775-.09 1.404-.161 1.887-.22.482-.057.834-.152 1.052-.285.22-.132.33-.347.33-.644v-.058c0-.72-.208-1.28-.62-1.678-.412-.396-1.025-.595-1.84-.595-.813 0-1.514.183-2 .55-.486.366-.822.772-1.007 1.218l-2.366-.528c.28-.772.692-1.395 1.234-1.872a5.034 5.034 0 0 1 1.874-1.042 7.562 7.562 0 0 1 2.232-.327c.516 0 1.065.06 1.647.178a4.949 4.949 0 0 1 1.634.65c.509.313.925.76 1.25 1.342.325.58.49 1.334.49 2.26v8.43h-2.46V15.98h-.101c-.163.32-.408.634-.733.942-.326.309-.744.565-1.255.77-.512.204-1.123.305-1.836.305Zm.547-1.984c.696 0 1.294-.135 1.79-.405.497-.27.876-.623 1.138-1.062a2.71 2.71 0 0 0 .392-1.409v-1.637c-.09.089-.262.17-.518.245a7.313 7.313 0 0 1-.871.19c-.327.053-.644.099-.952.14l-.774.103c-.489.06-.933.162-1.336.306-.4.144-.722.348-.96.616-.239.267-.358.62-.358 1.062 0 .612.23 1.073.69 1.385.46.31 1.048.466 1.76.466ZM60.833 5.023v1.984h-7.067V5.023h7.067Zm-5.172-3.04h2.518V13.99c0 .48.074.838.22 1.078.145.24.335.403.568.488.233.086.487.128.763.128.201 0 .378-.014.53-.04l.354-.066.455 2.041a4.518 4.518 0 0 1-.624.17c-.27.058-.607.09-1.01.095a4.509 4.509 0 0 1-1.853-.347 3.165 3.165 0 0 1-1.39-1.124c-.355-.506-.531-1.143-.531-1.91V1.983ZM69.507 5.024v1.984h-7.312V5.024h7.312ZM64.2 17.718V3.553c0-.794.177-1.453.531-1.98.354-.525.823-.92 1.406-1.18A4.615 4.615 0 0 1 68.041 0a6.072 6.072 0 0 1 2.098.338l-.59 2c-.117-.034-.27-.074-.454-.12a2.81 2.81 0 0 0-.674-.07c-.612 0-1.048.148-1.309.445-.26.297-.392.728-.392 1.29v13.835H64.2ZM76.382 17.975c-1.213 0-2.27-.273-3.175-.818-.904-.545-1.606-1.31-2.106-2.289-.5-.981-.75-2.127-.75-3.438 0-1.312.25-2.469.75-3.455.5-.986 1.202-1.753 2.106-2.298.904-.545 1.963-.818 3.175-.818 1.213 0 2.271.273 3.176.818.904.545 1.605 1.312 2.106 2.298.499.986.75 2.138.75 3.455 0 1.316-.251 2.457-.75 3.438-.5.981-1.202 1.744-2.106 2.289-.905.545-1.963.818-3.176.818Zm.008-2.074c.787 0 1.438-.204 1.954-.612.517-.41.9-.95 1.15-1.628.25-.678.374-1.425.374-2.24 0-.815-.124-1.555-.374-2.236-.25-.68-.633-1.227-1.15-1.64-.516-.415-1.167-.62-1.954-.62-.786 0-1.448.206-1.967.62-.519.412-.904.96-1.153 1.64a6.43 6.43 0 0 0-.375 2.236c0 .81.125 1.562.375 2.24.25.677.634 1.22 1.153 1.628.52.407 1.176.612 1.967.612ZM84.434 17.718V5.024h2.434V7.04h.135a3.098 3.098 0 0 1 1.25-1.617 3.619 3.619 0 0 1 2.034-.591 10.666 10.666 0 0 1 1.071.058v2.363c-.1-.027-.28-.059-.538-.095a5.6 5.6 0 0 0-.775-.054c-.595 0-1.124.122-1.588.368-.464.245-.83.584-1.1 1.017-.27.432-.405.924-.405 1.475v7.752h-2.518v.002ZM93.023 17.718V5.023h2.418V7.09h.16c.27-.7.71-1.246 1.322-1.641.612-.394 1.345-.592 2.2-.592.854 0 1.59.198 2.177.596.587.396 1.021.942 1.302 1.637h.135c.309-.678.8-1.22 1.474-1.624.674-.405 1.477-.607 2.409-.607 1.174 0 2.132.361 2.876 1.082.744.722 1.117 1.81 1.117 3.265v8.512h-2.519v-8.28c0-.86-.239-1.483-.716-1.869-.477-.386-1.047-.578-1.71-.578-.82 0-1.457.246-1.912.739-.455.492-.683 1.125-.683 1.896v8.092h-2.509V9.281c0-.69-.219-1.242-.657-1.662-.437-.419-1.007-.627-1.71-.627-.477 0-.917.122-1.318.368a2.74 2.74 0 0 0-.969 1.02c-.243.435-.365.94-.365 1.513v7.826H93.023Z"/></svg>
|