Skip to content

Commit 56e759e

Browse files
fix: updating style and stuff for new styles required by change layout
Signed-off-by: Antonio Sonis <[email protected]>
1 parent a6444cd commit 56e759e

21 files changed

+212
-9
lines changed

.storybook/preview-head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<link rel="stylesheet" href="../fonts/Montserrat/fonts.css" />
1+
<link rel="stylesheet" href="../fonts/fonts.css" />
22
<script>
33
window.global = window;
44
</script>
786 KB
Binary file not shown.

fonts/Inter/OFL.txt

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
2+
3+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
4+
This license is copied below, and is also available with a FAQ at:
5+
http://scripts.sil.org/OFL
6+
7+
8+
-----------------------------------------------------------
9+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10+
-----------------------------------------------------------
11+
12+
PREAMBLE
13+
The goals of the Open Font License (OFL) are to stimulate worldwide
14+
development of collaborative font projects, to support the font creation
15+
efforts of academic and linguistic communities, and to provide a free and
16+
open framework in which fonts may be shared and improved in partnership
17+
with others.
18+
19+
The OFL allows the licensed fonts to be used, studied, modified and
20+
redistributed freely as long as they are not sold by themselves. The
21+
fonts, including any derivative works, can be bundled, embedded,
22+
redistributed and/or sold with any software provided that any reserved
23+
names are not used by derivative works. The fonts and derivatives,
24+
however, cannot be released under any other type of license. The
25+
requirement for fonts to remain under this license does not apply
26+
to any document created using the fonts or their derivatives.
27+
28+
DEFINITIONS
29+
"Font Software" refers to the set of files released by the Copyright
30+
Holder(s) under this license and clearly marked as such. This may
31+
include source files, build scripts and documentation.
32+
33+
"Reserved Font Name" refers to any names specified as such after the
34+
copyright statement(s).
35+
36+
"Original Version" refers to the collection of Font Software components as
37+
distributed by the Copyright Holder(s).
38+
39+
"Modified Version" refers to any derivative made by adding to, deleting,
40+
or substituting -- in part or in whole -- any of the components of the
41+
Original Version, by changing formats or by porting the Font Software to a
42+
new environment.
43+
44+
"Author" refers to any designer, engineer, programmer, technical
45+
writer or other person who contributed to the Font Software.
46+
47+
PERMISSION & CONDITIONS
48+
Permission is hereby granted, free of charge, to any person obtaining
49+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
50+
redistribute, and sell modified and unmodified copies of the Font
51+
Software, subject to the following conditions:
52+
53+
1) Neither the Font Software nor any of its individual components,
54+
in Original or Modified Versions, may be sold by itself.
55+
56+
2) Original or Modified Versions of the Font Software may be bundled,
57+
redistributed and/or sold with any software, provided that each copy
58+
contains the above copyright notice and this license. These can be
59+
included either as stand-alone text files, human-readable headers or
60+
in the appropriate machine-readable metadata fields within text or
61+
binary files as long as those fields can be easily viewed by the user.
62+
63+
3) No Modified Version of the Font Software may use the Reserved Font
64+
Name(s) unless explicit written permission is granted by the corresponding
65+
Copyright Holder. This restriction only applies to the primary font name as
66+
presented to the users.
67+
68+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69+
Software shall not be used to promote, endorse or advertise any
70+
Modified Version, except to acknowledge the contribution(s) of the
71+
Copyright Holder(s) and the Author(s) or with their explicit written
72+
permission.
73+
74+
5) The Font Software, modified or unmodified, in part or in whole,
75+
must be distributed entirely under this license, and must not be
76+
distributed under any other license. The requirement for fonts to
77+
remain under this license does not apply to any document created
78+
using the Font Software.
79+
80+
TERMINATION
81+
This license becomes null and void if any of the above conditions are
82+
not met.
83+
84+
DISCLAIMER
85+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93+
OTHER DEALINGS IN THE FONT SOFTWARE.

fonts/Inter/README.txt

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
Inter Variable Font
2+
===================
3+
4+
This download contains Inter as both a variable font and static fonts.
5+
6+
Inter is a variable font with these axes:
7+
slnt
8+
wght
9+
10+
This means all the styles are contained in a single file:
11+
Inter-VariableFont_slnt,wght.ttf
12+
13+
If your app fully supports variable fonts, you can now pick intermediate styles
14+
that aren’t available as static fonts. Not all apps support variable fonts, and
15+
in those cases you can use the static font files for Inter:
16+
static/Inter-Thin.ttf
17+
static/Inter-ExtraLight.ttf
18+
static/Inter-Light.ttf
19+
static/Inter-Regular.ttf
20+
static/Inter-Medium.ttf
21+
static/Inter-SemiBold.ttf
22+
static/Inter-Bold.ttf
23+
static/Inter-ExtraBold.ttf
24+
static/Inter-Black.ttf
25+
26+
Get started
27+
-----------
28+
29+
1. Install the font files you want to use
30+
31+
2. Use your app's font picker to view the font family and all the
32+
available styles
33+
34+
Learn more about variable fonts
35+
-------------------------------
36+
37+
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
38+
https://variablefonts.typenetwork.com
39+
https://medium.com/variable-fonts
40+
41+
In desktop apps
42+
43+
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
44+
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
45+
46+
Online
47+
48+
https://developers.google.com/fonts/docs/getting_started
49+
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
50+
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
51+
52+
Installing fonts
53+
54+
MacOS: https://support.apple.com/en-us/HT201749
55+
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
56+
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
57+
58+
Android Apps
59+
60+
https://developers.google.com/fonts/docs/android
61+
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
62+
63+
License
64+
-------
65+
Please read the full license text (OFL.txt) to understand the permissions,
66+
restrictions and requirements for usage, redistribution, and modification.
67+
68+
You can use them in your products & projects – print or digital,
69+
commercial or otherwise.
70+
71+
This isn't legal advice, please consider consulting a lawyer and see the full
72+
license for all details.

fonts/Inter/static/Inter-Black.ttf

309 KB
Binary file not shown.

fonts/Inter/static/Inter-Bold.ttf

309 KB
Binary file not shown.
310 KB
Binary file not shown.
304 KB
Binary file not shown.

fonts/Inter/static/Inter-Light.ttf

304 KB
Binary file not shown.

fonts/Inter/static/Inter-Medium.ttf

308 KB
Binary file not shown.

fonts/Inter/static/Inter-Regular.ttf

303 KB
Binary file not shown.

fonts/Inter/static/Inter-SemiBold.ttf

309 KB
Binary file not shown.

fonts/Inter/static/Inter-Thin.ttf

304 KB
Binary file not shown.

fonts/Montserrat/fonts.css renamed to fonts/fonts.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@
44
font-weight: 400;
55
font-style: normal;
66
}
7+
8+
@font-face {
9+
font-family: 'Inter';
10+
src: url('/fonts/Inter/static/Inter-Regular.ttf') format('truetype');
11+
font-weight: 400;
12+
font-style: normal;
13+
}

src/components/HorizontalSeparator.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { DARK_GREEN, MAIN_DARK_BLUE, WHITE } from './constants'
66
import styles from './HorizontalSeparator.module.css'
77
function HorizontalSeparator ({ marginTop, marginBottom, color, opacity }) {
88
function getClassName () {
9-
let className = commonStyles[`text--${color}`] + ' '
9+
let className = `${styles.style} `
10+
className += commonStyles[`text--${color}`] + ' '
1011
// margin
1112
className += (marginTop === marginBottom ? `${styles['marginY-' + marginTop]}` : `${styles['marginT-' + marginTop]} ${styles['marginB-' + marginBottom]}`)
1213
// opacity

src/components/HorizontalSeparator.module.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.style {
2+
@apply border-b-0 border-t;
3+
}
14
.marginY-4 {
25
@apply my-4;
36
}
@@ -10,6 +13,18 @@
1013
@apply mb-4;
1114
}
1215

16+
.marginY-8 {
17+
@apply my-8;
18+
}
19+
20+
.marginT-8 {
21+
@apply mt-8;
22+
}
23+
24+
.marginB-8 {
25+
@apply mb-8;
26+
}
27+
1328
.marginY-10 {
1429
@apply my-10;
1530
}

src/components/constants.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export const TRANSPARENT = 'transparent'
99
export const TERTIARY_BLUE = 'tertiary-blue'
1010
export const ERROR_RED = 'error-red'
1111
export const WARNING_YELLOW = 'warning-yellow'
12+
export const RICH_BLACK = 'rich-black'
13+
1214
export const NONE = 'none'
1315
export const EXTRA_SMALL = 'extra-small'
1416
export const SMALL = 'small'
@@ -26,7 +28,7 @@ export const HOVER_EFFECTS_BUTTONS = [BOX_SHADOW, BACKGROUND_COLOR_OPAQUE, UNDER
2628
export const MODAL_SIZES = [SMALL, MEDIUM, FULL_WIDTH]
2729

2830
export const COLORS_ICON = [MAIN_GREEN, WHITE, MAIN_DARK_BLUE, ERROR_RED, WARNING_YELLOW, TERTIARY_BLUE]
29-
export const COLORS_BUTTON = [MAIN_GREEN, DARK_GREEN, LIGHT_GREEN, MAIN_DARK_BLUE, DARK_BLUE, LIGHT_BLUE, WHITE, ERROR_RED, TERTIARY_BLUE, TRANSPARENT]
31+
export const COLORS_BUTTON = [MAIN_GREEN, DARK_GREEN, LIGHT_GREEN, MAIN_DARK_BLUE, DARK_BLUE, LIGHT_BLUE, WHITE, ERROR_RED, TERTIARY_BLUE, TRANSPARENT, RICH_BLACK]
3032
export const COLORS_BORDERED_BOX = [MAIN_GREEN, ERROR_RED, WHITE, DARK_BLUE, MAIN_DARK_BLUE, WARNING_YELLOW, TRANSPARENT, LIGHT_BLUE, TERTIARY_BLUE]
3133

3234
export const MODAL_POPUP = 'popup'
@@ -49,6 +51,7 @@ export const ROLE_USER = 'user'
4951
export const ROLE_OWNER = 'owner'
5052

5153
export const MARGIN_10 = 10
54+
export const MARGIN_8 = 8
5255
export const MARGIN_0 = 0
5356

5457
export const OPACITY_20 = 20

src/components/forms/Field.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react'
22
import PropTypes from 'prop-types'
33
import styles from './Field.module.css'
4+
import { ERROR_RED, MAIN_DARK_BLUE, WHITE } from '../constants'
45

56
function Field ({ title, titleColor, helper, children, disabled, required }) {
67
let className = `${styles.container}`
@@ -29,7 +30,7 @@ Field.propTypes = {
2930
/**
3031
* titleColor
3132
*/
32-
titleColor: PropTypes.oneOf(['error-red', 'main-dark-blue']),
33+
titleColor: PropTypes.oneOf([ERROR_RED, MAIN_DARK_BLUE, WHITE]),
3334
/**
3435
* helper
3536
*/

src/components/forms/Field.module.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
.text-color-error-red {
1111
@apply text-error-red;
1212
}
13+
.text-color-white {
14+
@apply text-white;
15+
}
1316
.helper{
1417
@apply text-sm pb-4;
1518
}

src/components/forms/Input.jsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import PlatformaticIcon from '../PlatformaticIcon'
77
import { MAIN_DARK_BLUE, MAIN_GREEN } from '../constants'
88
import BorderedBox from '../BorderedBox'
99

10-
function Input ({ placeholder, value, name, borderColor, errorMessage, onChange, disabled, beforeIcon, afterIcon, focused, placeholderApart }) {
10+
function Input ({ placeholder, value, name, borderColor, errorMessage, onChange, disabled, beforeIcon, afterIcon, focused, placeholderApart, backgroundTransparent }) {
1111
let inputClassName = `${commonStyles.fullWidth} ${styles.input} `
1212
inputClassName += commonStyles[`bordered--${borderColor}`] + ' ' + commonStyles[`text--${borderColor}`]
13+
if (backgroundTransparent) inputClassName += ` ${commonStyles['background-color-transparent']}`
1314
const showError = errorMessage.length > 0
1415
if (showError) inputClassName += ' ' + commonStyles['bordered--error-red']
1516
if (disabled) inputClassName += ' ' + commonStyles['apply-opacity-30']
@@ -80,7 +81,11 @@ Input.propTypes = {
8081
/**
8182
* placeholderApart
8283
*/
83-
placeholderApart: PropTypes.bool
84+
placeholderApart: PropTypes.bool,
85+
/**
86+
* backgroundTransparent
87+
*/
88+
backgroundTransparent: PropTypes.bool
8489
}
8590

8691
Input.defaultProps = {
@@ -94,7 +99,8 @@ Input.defaultProps = {
9499
beforeIcon: null,
95100
afterIcon: null,
96101
focused: false,
97-
shadowPlaceholder: false
102+
shadowPlaceholder: false,
103+
backgroundTransparent: false
98104
}
99105

100106
export default Input

tailwind.config.cjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ module.exports = {
4040
'error-red': '#FA2121',
4141
'tertiary-blue': '#2588E4',
4242
transparent: 'transparent',
43-
'warning-yellow': '#FEB928'
43+
'warning-yellow': '#FEB928',
44+
'rich-black': '#00050B'
4445
},
4546
fontFamily: {
46-
sans: ['Montserrat']
47+
sans: ['Montserrat'],
48+
inter: ['Inter']
4749
},
4850
letterSpacing: {
4951
tighter: '-.05em',

0 commit comments

Comments
 (0)