@basiq/connect-auth 0.1.76 → 0.1.79
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/LICENSE +21 -0
- package/README.md +159 -1
- package/dist/App.d.ts +3 -0
- package/dist/BasiqConnect.d.ts +3 -0
- package/dist/actions/actions.d.ts +22 -0
- package/dist/components/modals/LoadingModal.d.ts +8 -0
- package/dist/components/modals/index.d.ts +1 -0
- package/dist/components/pages/AuthScreen.d.ts +9 -0
- package/dist/components/pages/NotFound.d.ts +6 -0
- package/dist/components/pages/Page.d.ts +18 -0
- package/dist/components/pages/StartScreen.d.ts +10 -0
- package/dist/components/pages/index.d.ts +4 -0
- package/dist/components/ui/Button.d.ts +10 -0
- package/dist/components/ui/Modal.d.ts +9 -0
- package/dist/components/ui/icon.d.ts +7 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/connect-auth.cjs.development.js +1494 -0
- package/dist/connect-auth.cjs.development.js.map +1 -0
- package/dist/connect-auth.cjs.production.min.js +2 -0
- package/dist/connect-auth.cjs.production.min.js.map +1 -0
- package/dist/connect-auth.esm.js +1486 -0
- package/dist/connect-auth.esm.js.map +1 -0
- package/dist/helpers/constants.d.ts +1 -0
- package/dist/helpers/hookUtils.d.ts +2 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/utils.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -0
- package/dist/locales/i18n.d.ts +36 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/styledComponents/base.d.ts +4 -0
- package/dist/styledComponents/breakpoints.d.ts +15 -0
- package/dist/styledComponents/index.d.ts +4 -0
- package/dist/styledComponents/pages/auth.d.ts +10 -0
- package/dist/styledComponents/pages/basic.d.ts +23 -0
- package/dist/styledComponents/pages/index.d.ts +4 -0
- package/dist/styledComponents/pages/notFound.d.ts +9 -0
- package/dist/styledComponents/pages/start.d.ts +1 -0
- package/dist/styledComponents/styles.d.ts +2 -0
- package/dist/styledComponents/theme.d.ts +45 -0
- package/dist/styledComponents/ui/basic.d.ts +10 -0
- package/dist/styledComponents/ui/button.d.ts +9 -0
- package/dist/styledComponents/ui/index.d.ts +3 -0
- package/dist/styledComponents/ui/modals.d.ts +7 -0
- package/package.json +63 -99
- package/src/App.tsx +96 -0
- package/src/BasiqConnect.tsx +17 -0
- package/src/actions/actions.ts +72 -0
- package/src/components/modals/LoadingModal.tsx +28 -0
- package/src/components/modals/index.ts +1 -0
- package/src/components/pages/AuthScreen.tsx +96 -0
- package/src/components/pages/NotFound.tsx +44 -0
- package/src/components/pages/Page.tsx +46 -0
- package/src/components/pages/StartScreen.tsx +83 -0
- package/src/components/pages/index.ts +4 -0
- package/src/components/ui/Button.tsx +24 -0
- package/src/components/ui/Modal.tsx +29 -0
- package/src/components/ui/icon.tsx +18 -0
- package/src/components/ui/index.ts +1 -0
- package/src/custom.d.ts +9 -0
- package/{dist/25001c0659b6d43e86d2ee06256a7f63.otf → src/fonts/Mark-W1G-Bold.otf} +0 -0
- package/{dist/9763eea8f13903a473622431f7cb7c5c.otf → src/fonts/Mark-W1G-Book.otf} +0 -0
- package/src/fonts.d.ts +1 -0
- package/src/helpers/constants.ts +2 -0
- package/src/helpers/hookUtils.ts +8 -0
- package/src/helpers/index.ts +3 -0
- package/src/helpers/utils.ts +12 -0
- package/src/images/back.svg +8 -0
- package/src/images/error.svg +10 -0
- package/src/images/loading_indicator.svg +14 -0
- package/src/index.tsx +1 -0
- package/src/locales/en/translation.json +29 -0
- package/src/locales/i18n.ts +27 -0
- package/src/logo.svg +1 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/react-i18next.d.ts +9 -0
- package/src/setupTests.ts +5 -0
- package/src/styled.d.ts +6 -0
- package/src/styledComponents/base.ts +73 -0
- package/src/styledComponents/breakpoints.ts +32 -0
- package/src/styledComponents/index.ts +4 -0
- package/src/styledComponents/pages/auth.ts +49 -0
- package/src/styledComponents/pages/basic.ts +126 -0
- package/src/styledComponents/pages/index.ts +4 -0
- package/src/styledComponents/pages/notFound.ts +70 -0
- package/src/styledComponents/pages/start.ts +6 -0
- package/src/styledComponents/styles.ts +25 -0
- package/src/styledComponents/theme.ts +58 -0
- package/src/styledComponents/ui/basic.ts +96 -0
- package/src/styledComponents/ui/button.ts +112 -0
- package/src/styledComponents/ui/index.ts +3 -0
- package/src/styledComponents/ui/modals.ts +48 -0
- package/.eslintignore +0 -1
- package/dist/60fda426a98e8c5b0470d694e2c66520.otf +0 -1
- package/dist/d4bd6e2e30a9c41422cecb85a045da71.otf +0 -1
- package/dist/main.js +0 -2
- package/dist/main.js.LICENSE.txt +0 -8
- package/tsconfig.json +0 -24
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
interface IInputStyled {
|
|
4
|
+
filled: boolean;
|
|
5
|
+
error: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const PageConnectFooterControl = styled.div`
|
|
9
|
+
position: absolute;
|
|
10
|
+
bottom: 80px;
|
|
11
|
+
width: 100%;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
left: 0;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
padding: 16px;
|
|
19
|
+
`;
|
|
20
|
+
export const PageConnectFooterText = styled.span`
|
|
21
|
+
color: ${({ theme }) => theme.color.abbey};
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export const InputStyled = styled.input<IInputStyled>`
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 64px;
|
|
28
|
+
background: ${({ theme, filled, error }) => (error ? theme.color.wePeep : filled ? theme.color.linkWater : theme.color.porcelainSecond)};
|
|
29
|
+
color: ${({ theme, error }) => (error ? theme.color.cerise : theme.color.endeavour)};
|
|
30
|
+
border-radius: 2px;
|
|
31
|
+
text-align: center;
|
|
32
|
+
font-size: 32px;
|
|
33
|
+
border: none;
|
|
34
|
+
box-shadow: none;
|
|
35
|
+
letter-spacing: 20px;
|
|
36
|
+
text-indent: 20px;
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
export const InputContainer = styled.div`
|
|
40
|
+
width: 100%;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
`;
|
|
45
|
+
export const DivAsLink = styled.div`
|
|
46
|
+
color: ${({ theme }) => theme.color.endeavour};
|
|
47
|
+
display: inherit;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
`;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { ButtonStyled } from '../ui';
|
|
3
|
+
import { hexToRGBa } from '../../helpers';
|
|
4
|
+
import { devices } from '../breakpoints';
|
|
5
|
+
|
|
6
|
+
interface IPageStyledProps {
|
|
7
|
+
buttonCount?: number;
|
|
8
|
+
horizontal?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface IStatusMessage {
|
|
12
|
+
error?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface IPageControlsSectionProps {
|
|
16
|
+
notEmpty: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface IHorizontalProps {
|
|
19
|
+
horizontal?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export const PageStyled = styled.div<IPageStyledProps>`
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
${({ buttonCount, horizontal }) =>
|
|
25
|
+
buttonCount && buttonCount > 0
|
|
26
|
+
? horizontal
|
|
27
|
+
? 'padding-bottom: 96px;'
|
|
28
|
+
: `padding-bottom: ${46 + 50 * buttonCount}px;`
|
|
29
|
+
: 'padding-bottom: 16px;'}
|
|
30
|
+
`;
|
|
31
|
+
export const PageSubtitle = styled.div`
|
|
32
|
+
${({ theme }) => theme.mixin.subtitle()};
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
export const PageMainContainer = styled.div`
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
`;
|
|
40
|
+
export const PageControlsSection = styled.div<IPageControlsSectionProps>`
|
|
41
|
+
position: absolute;
|
|
42
|
+
bottom: 0;
|
|
43
|
+
left: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
${({ notEmpty }) => `padding: ${notEmpty ? '16px' : '0'}`};
|
|
46
|
+
background-color: ${({ theme }) => theme.color.white};
|
|
47
|
+
border-top: 1px solid ${({ theme }) => theme.color.porcelainLight};
|
|
48
|
+
`;
|
|
49
|
+
export const PageShadowWrapper = styled.div<IHorizontalProps>`
|
|
50
|
+
width: 100%;
|
|
51
|
+
${({ horizontal }) =>
|
|
52
|
+
horizontal &&
|
|
53
|
+
css`
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: space-between;
|
|
57
|
+
|
|
58
|
+
${ButtonStyled} {
|
|
59
|
+
margin-bottom: 0;
|
|
60
|
+
margin-right: 16px;
|
|
61
|
+
|
|
62
|
+
&:last-child {
|
|
63
|
+
margin-right: unset;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`}
|
|
67
|
+
`;
|
|
68
|
+
export const PageShadow = styled.div`
|
|
69
|
+
position: absolute;
|
|
70
|
+
height: 71px;
|
|
71
|
+
left: 0;
|
|
72
|
+
right: 0;
|
|
73
|
+
top: -71px;
|
|
74
|
+
background: linear-gradient(180deg, #cecece 0%, ${hexToRGBa('#cecece', 0)} 100%);
|
|
75
|
+
opacity: 0.8;
|
|
76
|
+
transform: rotate(-180deg);
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
`;
|
|
79
|
+
export const PageHeader = styled.header`
|
|
80
|
+
margin-bottom: 32px;
|
|
81
|
+
width: 100%;
|
|
82
|
+
border-radius: 8px;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
background-color: ${({ theme }) => theme.color.porcelainSecond};
|
|
87
|
+
padding: 16px;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
height: 150px;
|
|
90
|
+
${devices.phone} {
|
|
91
|
+
background-color: unset;
|
|
92
|
+
overflow: initial;
|
|
93
|
+
height: 150px;
|
|
94
|
+
padding: 16px;
|
|
95
|
+
}
|
|
96
|
+
img {
|
|
97
|
+
border-radius: 4px;
|
|
98
|
+
width: auto !important;
|
|
99
|
+
height: auto;
|
|
100
|
+
max-width: 100%;
|
|
101
|
+
max-height: 100%;
|
|
102
|
+
${devices.phone} {
|
|
103
|
+
width: 100%;
|
|
104
|
+
padding: 16px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
`;
|
|
108
|
+
|
|
109
|
+
export const PageContent = styled.div`
|
|
110
|
+
width: 100%;
|
|
111
|
+
`;
|
|
112
|
+
export const StatusMessage = styled.div<IStatusMessage>`
|
|
113
|
+
width: 100%;
|
|
114
|
+
background: ${({ theme, error }) => (error ? theme.color.wePeep : theme.color.iceberg)};
|
|
115
|
+
border-radius: 4px;
|
|
116
|
+
padding: 11px;
|
|
117
|
+
box-sizing: border-box;
|
|
118
|
+
text-align: center;
|
|
119
|
+
display: flex;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
align-items: center;
|
|
122
|
+
font-weight: 400;
|
|
123
|
+
font-size: 14px;
|
|
124
|
+
color: ${({ theme, error }) => (error ? theme.color.cerise : theme.color.gossamer)};
|
|
125
|
+
margin-bottom: 16px;
|
|
126
|
+
`;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { IconWrapper } from '../ui';
|
|
3
|
+
import { PageContent, PageMainContainer } from './basic';
|
|
4
|
+
|
|
5
|
+
interface IStatusScreenCircleContainer {
|
|
6
|
+
type: 'success' | 'warning' | 'error';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const PageStatusScreenMain = styled(PageMainContainer)`
|
|
10
|
+
height: 100%;
|
|
11
|
+
`;
|
|
12
|
+
export const PageStatusScreenContent = styled(PageContent)`
|
|
13
|
+
height: inherit;
|
|
14
|
+
width: 100%;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
text-align: center;
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 0;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
right: 0;
|
|
25
|
+
`;
|
|
26
|
+
export const StatusScreenCircleContainer = styled.div<IStatusScreenCircleContainer>`
|
|
27
|
+
width: 64px;
|
|
28
|
+
height: 64px;
|
|
29
|
+
background-color: ${({ theme, type }) => {
|
|
30
|
+
switch (type) {
|
|
31
|
+
case 'success':
|
|
32
|
+
return theme.color.emerald;
|
|
33
|
+
case 'error':
|
|
34
|
+
return theme.color.sunsetOrange;
|
|
35
|
+
case 'warning':
|
|
36
|
+
return theme.color.hokeyPokey;
|
|
37
|
+
default:
|
|
38
|
+
return theme.color.porcelain;
|
|
39
|
+
}
|
|
40
|
+
}};
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
margin-bottom: 24px;
|
|
46
|
+
|
|
47
|
+
${IconWrapper} {
|
|
48
|
+
width: 40px;
|
|
49
|
+
color: ${({ theme }) => theme.color.white};
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
export const StatusScreenErrorCode = styled.span`
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
margin-top: 16px;
|
|
55
|
+
color: ${({ theme }) => theme.color.osloGrey};
|
|
56
|
+
`;
|
|
57
|
+
export const PageSuccessImgContainer = styled.div`
|
|
58
|
+
margin-bottom: 24px;
|
|
59
|
+
width: 64px;
|
|
60
|
+
height: 64px;
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
border-radius: 50%;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
img {
|
|
67
|
+
width: 100%;
|
|
68
|
+
height: auto;
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createGlobalStyle } from 'styled-components';
|
|
2
|
+
import MarkW1GBook from '../fonts/Mark-W1G-Book.otf';
|
|
3
|
+
import MarkW1GBold from '../fonts/Mark-W1G-Bold.otf';
|
|
4
|
+
|
|
5
|
+
export default createGlobalStyle`
|
|
6
|
+
|
|
7
|
+
@font-face {
|
|
8
|
+
font-family: MarkW1G;
|
|
9
|
+
src: url(${MarkW1GBook}) format('opentype');
|
|
10
|
+
}
|
|
11
|
+
@font-face {
|
|
12
|
+
font-family: MarkW1G;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
src: url(${MarkW1GBold}) format('opentype');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
body{
|
|
18
|
+
font-family: 'MarkW1G', sans-serif;
|
|
19
|
+
}
|
|
20
|
+
body * {
|
|
21
|
+
font-family: 'MarkW1G', sans-serif;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export const theme = {
|
|
2
|
+
color: {
|
|
3
|
+
white: '#fff',
|
|
4
|
+
porcelain: '#e2E8Ea',
|
|
5
|
+
porcelainSecond: '#f5F7F8',
|
|
6
|
+
porcelainLight: '#e5Eaec',
|
|
7
|
+
porcelainSecondLight: '#f7F9F9',
|
|
8
|
+
iron: '#cbd1D3',
|
|
9
|
+
ironSecond: '#dcdedf',
|
|
10
|
+
casper: '#90a4Ae',
|
|
11
|
+
mercury: '#e5E5E5',
|
|
12
|
+
dodgerBlue: '#4c6Cff',
|
|
13
|
+
dodgerBlueLight: '#5e7Bff',
|
|
14
|
+
royalBlue: '#4461e6',
|
|
15
|
+
bostonBlue: '#367ab9',
|
|
16
|
+
endeavour: '#0459a8',
|
|
17
|
+
congressBlue: '#045097',
|
|
18
|
+
brilliantBlue: '#0075dc',
|
|
19
|
+
curiousBlue: '#2784da',
|
|
20
|
+
iceberg: '#cdf2ed',
|
|
21
|
+
linkWater: '#cddeee',
|
|
22
|
+
spindle: '#b4Cde5',
|
|
23
|
+
cyprus: '#002d3C',
|
|
24
|
+
gossamer: '#06bea6',
|
|
25
|
+
emerald: '#4fc35A',
|
|
26
|
+
hokeyPokey: '#fabe34',
|
|
27
|
+
hokeyPokeyLight: '#f9C858',
|
|
28
|
+
anzac: '#e1B141',
|
|
29
|
+
cerise: '#d63F5a',
|
|
30
|
+
sunsetOrange: '#fe493f',
|
|
31
|
+
wePeep: '#f7d9de',
|
|
32
|
+
ebony: '#130f26',
|
|
33
|
+
abbey: '#4e5457',
|
|
34
|
+
osloGrey: '#7f888c',
|
|
35
|
+
loblolly: '#c1c8cc',
|
|
36
|
+
jumbo: '#7d7d84',
|
|
37
|
+
blackPearl: '#061D24',
|
|
38
|
+
blueBayoux: '#4b6a75'
|
|
39
|
+
},
|
|
40
|
+
mixin: {
|
|
41
|
+
subtitle: () => ` margin-top: 8px;
|
|
42
|
+
margin-bottom: 4px;
|
|
43
|
+
width: 100%;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: space-between;`,
|
|
47
|
+
|
|
48
|
+
title: () => ` font-size: 26px;
|
|
49
|
+
line-height: 30px;
|
|
50
|
+
letter-spacing: -0.2px;
|
|
51
|
+
margin-top: 0;
|
|
52
|
+
margin-bottom: 24px;
|
|
53
|
+
color: #130f26;
|
|
54
|
+
white-space: pre-line;
|
|
55
|
+
`
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
export type ThemeType = typeof theme;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
interface IIconWrapper {
|
|
4
|
+
rotating: boolean;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const rotate = keyframes`
|
|
8
|
+
from {
|
|
9
|
+
-ms-transform: rotate(0deg);
|
|
10
|
+
-moz-transform: rotate(0deg);
|
|
11
|
+
-webkit-transform: rotate(0deg);
|
|
12
|
+
-o-transform: rotate(0deg);
|
|
13
|
+
transform: rotate(0deg);
|
|
14
|
+
}
|
|
15
|
+
to {
|
|
16
|
+
-ms-transform: rotate(360deg);
|
|
17
|
+
-moz-transform: rotate(360deg);
|
|
18
|
+
-webkit-transform: rotate(360deg);
|
|
19
|
+
-o-transform: rotate(360deg);
|
|
20
|
+
transform: rotate(360deg);
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
export const SimpleButton = styled.button`
|
|
24
|
+
border-radius: 2px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
border: none;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
margin-bottom: 8px;
|
|
31
|
+
padding: 10px;
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export const Input = styled.input`
|
|
35
|
+
height: 48px;
|
|
36
|
+
background: ${({ theme }) => theme.color.porcelainSecond};
|
|
37
|
+
border-radius: 2px;
|
|
38
|
+
border: none;
|
|
39
|
+
width: 100%;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
padding: 0 16px;
|
|
42
|
+
color: ${({ theme }) => theme.color.ebony};
|
|
43
|
+
margin-bottom: 16px;
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
|
|
46
|
+
&::placeholder {
|
|
47
|
+
color: ${({ theme }) => theme.color.osloGrey};
|
|
48
|
+
opacity: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:-ms-input-placeholder {
|
|
52
|
+
color: ${({ theme }) => theme.color.osloGrey};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&::-ms-input-placeholder {
|
|
56
|
+
color: ${({ theme }) => theme.color.osloGrey};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:focus-visible {
|
|
60
|
+
outline: none;
|
|
61
|
+
background-color: ${({ theme }) => theme.color.spindle};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:disabled {
|
|
65
|
+
background-color: ${({ theme }) => theme.color.porcelain};
|
|
66
|
+
color: ${({ theme }) => theme.color.casper};
|
|
67
|
+
cursor: not-allowed;
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
export const H4Styled = styled.h4`
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
user-select: none;
|
|
73
|
+
${({ theme }) => theme.mixin.subtitle()};
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
export const Spacer = styled.div`
|
|
77
|
+
display: flex;
|
|
78
|
+
width: 100%;
|
|
79
|
+
margin-top: 12px;
|
|
80
|
+
margin-bottom: 12px;
|
|
81
|
+
height: 1px;
|
|
82
|
+
background-color: ${({ theme }) => theme.color.porcelain};
|
|
83
|
+
`;
|
|
84
|
+
export const IconWrapper = styled.span<IIconWrapper>`
|
|
85
|
+
display: flex;
|
|
86
|
+
width: 22px;
|
|
87
|
+
${({ rotating }) =>
|
|
88
|
+
rotating &&
|
|
89
|
+
css`
|
|
90
|
+
animation: ${rotate} 2s linear infinite;
|
|
91
|
+
`}
|
|
92
|
+
};
|
|
93
|
+
svg, img {
|
|
94
|
+
width: 100%;
|
|
95
|
+
}
|
|
96
|
+
`;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { SimpleButton } from './basic';
|
|
3
|
+
import { ButtonType } from '../../components/ui/Button';
|
|
4
|
+
|
|
5
|
+
export const ButtonLabel = styled.span`
|
|
6
|
+
font-size: 18px;
|
|
7
|
+
`;
|
|
8
|
+
|
|
9
|
+
interface IButtonStyled {
|
|
10
|
+
buttonType?: ButtonType;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
}
|
|
14
|
+
export const ButtonStyled = styled(SimpleButton)<IButtonStyled>`
|
|
15
|
+
min-height: 40px;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
background-color: ${(props) => props.theme.color.endeavour};
|
|
18
|
+
text-align: center;
|
|
19
|
+
box-shadow: none;
|
|
20
|
+
border: none;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
color: ${({ theme }) => theme.color.white};
|
|
23
|
+
|
|
24
|
+
&:last-child {
|
|
25
|
+
margin-bottom: 0;
|
|
26
|
+
}
|
|
27
|
+
&:hover {
|
|
28
|
+
background-color: ${({ theme }) => theme.color.bostonBlue};
|
|
29
|
+
}
|
|
30
|
+
&:active {
|
|
31
|
+
background-color: ${({ theme }) => theme.color.congressBlue};
|
|
32
|
+
}
|
|
33
|
+
${({ buttonType, theme }) => {
|
|
34
|
+
switch (buttonType) {
|
|
35
|
+
case 'secondary':
|
|
36
|
+
return css`
|
|
37
|
+
color: ${theme.color.ebony};
|
|
38
|
+
background-color: ${theme.color.porcelainSecond};
|
|
39
|
+
&:hover {
|
|
40
|
+
color: ${theme.color.abbey};
|
|
41
|
+
background-color: ${theme.color.porcelainSecondLight};
|
|
42
|
+
}
|
|
43
|
+
&:active {
|
|
44
|
+
background-color: ${theme.color.ironSecond};
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
case 'tiny':
|
|
48
|
+
return css`
|
|
49
|
+
width: auto;
|
|
50
|
+
min-height: 32px;
|
|
51
|
+
padding: 6px 16px;
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
color: ${theme.color.cyprus};
|
|
55
|
+
background-color: ${theme.color.hokeyPokey};
|
|
56
|
+
&:hover {
|
|
57
|
+
background-color: ${theme.color.hokeyPokeyLight};
|
|
58
|
+
}
|
|
59
|
+
&:active {
|
|
60
|
+
background-color: ${theme.color.anzac};
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
case 'back':
|
|
65
|
+
return css`
|
|
66
|
+
background: none;
|
|
67
|
+
justify-content: initial;
|
|
68
|
+
padding: 0;
|
|
69
|
+
min-height: unset;
|
|
70
|
+
color: ${theme.color.casper};
|
|
71
|
+
width: auto;
|
|
72
|
+
img {
|
|
73
|
+
width: 25px;
|
|
74
|
+
filter: invert(68%) sepia(13%) saturate(348%) hue-rotate(155deg) brightness(91%) contrast(94%);
|
|
75
|
+
}
|
|
76
|
+
&:hover {
|
|
77
|
+
color: ${theme.color.abbey};
|
|
78
|
+
background-color: unset;
|
|
79
|
+
img {
|
|
80
|
+
filter: invert(31%) sepia(10%) saturate(313%) hue-rotate(155deg) brightness(96%) contrast(87%);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
&:active {
|
|
84
|
+
color: ${theme.color.jumbo};
|
|
85
|
+
background-color: unset;
|
|
86
|
+
img {
|
|
87
|
+
filter: invert(49%) sepia(0%) saturate(5%) hue-rotate(29deg) brightness(99%) contrast(83%);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
&:disabled {
|
|
91
|
+
color: ${theme.color.porcelain};
|
|
92
|
+
background-color: unset !important;
|
|
93
|
+
img {
|
|
94
|
+
color: ${theme.color.porcelain};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
default:
|
|
99
|
+
return '';
|
|
100
|
+
}
|
|
101
|
+
}}
|
|
102
|
+
img {
|
|
103
|
+
color: ${({ theme }) => theme.color.casper};
|
|
104
|
+
margin-right: 3px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:disabled {
|
|
108
|
+
background-color: ${({ theme }) => theme.color.porcelain};
|
|
109
|
+
color: ${({ theme }) => theme.color.casper};
|
|
110
|
+
cursor: not-allowed;
|
|
111
|
+
}
|
|
112
|
+
`;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { hexToRGBa } from '../../helpers';
|
|
3
|
+
import { IconWrapper } from './basic';
|
|
4
|
+
|
|
5
|
+
interface IModalStyled {
|
|
6
|
+
disableTransparency: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const ModalStyled = styled.div<IModalStyled>`
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
background-color: ${({ theme, disableTransparency }) => (disableTransparency ? theme.color.jumbo : hexToRGBa(theme.color.blackPearl, 0.7))};
|
|
19
|
+
z-index: 1000000000;
|
|
20
|
+
padding: 16px;
|
|
21
|
+
|
|
22
|
+
a {
|
|
23
|
+
margin-bottom: 8px;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
export const LoadingModalStyled = styled.div<IModalStyled>`
|
|
27
|
+
box-shadow: ${({ theme, disableTransparency }) => (disableTransparency ? 'none' : `0 1px 2px ${hexToRGBa(theme.color.blueBayoux, 0.3)}`)};
|
|
28
|
+
border-radius: 2px;
|
|
29
|
+
padding: 16px 12px;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
line-height: 16px;
|
|
32
|
+
color: ${({ theme }) => theme.color.white};
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
align-items: center;
|
|
36
|
+
|
|
37
|
+
${IconWrapper} {
|
|
38
|
+
filter: invert(1);
|
|
39
|
+
margin-bottom: 15px;
|
|
40
|
+
width: 48px;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
export const LoadingModalText = styled.span`
|
|
44
|
+
font-size: 18px;
|
|
45
|
+
white-space: pre-line;
|
|
46
|
+
text-align: center;
|
|
47
|
+
line-height: 30px;
|
|
48
|
+
`;
|
package/.eslintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
./**/*.js
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "9763eea8f13903a473622431f7cb7c5c.otf";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default __webpack_public_path__ + "25001c0659b6d43e86d2ee06256a7f63.otf";
|