vega-frontend-monorepo/libs/tailwindcss-config/src/theme.js

185 lines
4.0 KiB
JavaScript
Raw Normal View History

2022-02-23 17:57:44 +00:00
const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
screens: {
xs: '500px',
sm: '640px',
md: '768px',
2022-02-23 17:57:44 +00:00
lg: '960px',
xl: '1280px',
xxl: '1536px',
2022-02-23 17:57:44 +00:00
},
colors: {
transparent: 'transparent',
current: 'currentColor',
vega: {
yellow: '#EDFF22',
pink: '#FF2D5E',
green: '#00F780',
},
red: {
DEFAULT: '#ED1515',
transparent: 'rgba(255, 38, 65, 0.3)',
vega: '#FF261A',
Feat/305 add console v2 first view screen (#424) * [#305] add initial landing dialog on markets page and fix some typos * [#305] market-list utils and generate schema * [#305] initial styling of the landing dialog and add arrows * [#305] routing to markets and add hover and market list tests * [#305] fix z-index on dialog overlay * [#305] default market shoulde be oldest market that is currently trading in continuous mode * [#305] refactor market-list library * [#305] add arrow unit tests * Update libs/market-list/src/lib/components/landing/landing-dialog.tsx Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * Update libs/market-list/src/lib/components/landing/select-market-list.tsx Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * Update libs/market-list/src/lib/components/landing/select-market-list.tsx Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * test: fix failing tests from homepage change * [#305] sort by id after sorting by date * test: increase timeout for failing tests in CI * [#305] destructuring all over the place and some code tweaks, arrows and percentage changes * [#305] update sparkline to show colour * [#305] fix order of market list * [#305] stretchedLink class plus a-tag href for navigation - accessibility updates * [#305] use href only and remove log * [#305] use bignumber.js for price calculations * [#305] change to bg-white/50 on dark mode overlay as asked from UX * [#305] change to bg-white/50 on dark mode overlay as asked from UX * [#305] toLocaleString fix * [#305] toLocaleString fix * [#305] add price-change-cell and use formatNumber * [#305] add extra test for select market list * Update apps/trading/specs/index.spec.tsx Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * [#305] use memo, sort by date and id lodash Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> Co-authored-by: Joe <joe@vega.xyz>
2022-05-23 12:21:54 +00:00
dark: '#EB001B',
},
green: {
DEFAULT: '#26FF8A',
transparent: 'rgba(38, 255, 138, 0.3)',
Feat/305 add console v2 first view screen (#424) * [#305] add initial landing dialog on markets page and fix some typos * [#305] market-list utils and generate schema * [#305] initial styling of the landing dialog and add arrows * [#305] routing to markets and add hover and market list tests * [#305] fix z-index on dialog overlay * [#305] default market shoulde be oldest market that is currently trading in continuous mode * [#305] refactor market-list library * [#305] add arrow unit tests * Update libs/market-list/src/lib/components/landing/landing-dialog.tsx Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * Update libs/market-list/src/lib/components/landing/select-market-list.tsx Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * Update libs/market-list/src/lib/components/landing/select-market-list.tsx Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * test: fix failing tests from homepage change * [#305] sort by id after sorting by date * test: increase timeout for failing tests in CI * [#305] destructuring all over the place and some code tweaks, arrows and percentage changes * [#305] update sparkline to show colour * [#305] fix order of market list * [#305] stretchedLink class plus a-tag href for navigation - accessibility updates * [#305] use href only and remove log * [#305] use bignumber.js for price calculations * [#305] change to bg-white/50 on dark mode overlay as asked from UX * [#305] change to bg-white/50 on dark mode overlay as asked from UX * [#305] toLocaleString fix * [#305] toLocaleString fix * [#305] add price-change-cell and use formatNumber * [#305] add extra test for select market list * Update apps/trading/specs/index.spec.tsx Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> * [#305] use memo, sort by date and id lodash Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com> Co-authored-by: Joe <joe@vega.xyz>
2022-05-23 12:21:54 +00:00
dark: '#008545',
vega: '#00F780',
},
text: '#C7C7C7',
deemphasise: '#8A9BA8',
2022-03-07 13:27:17 +00:00
white: {
DEFAULT: '#FFF',
'02': 'rgba(255, 255, 255, 0.02)',
'05': 'rgba(255, 255, 255, 0.05)',
10: 'rgba(255, 255, 255, 0.10)',
25: 'rgba(255, 255, 255, 0.25)',
40: 'rgba(255, 255, 255, 0.40)',
60: 'rgba(255, 255, 255, 0.60)',
80: 'rgba(255, 255, 255, 0.80)',
95: 'rgba(255, 255, 255, 0.95)',
100: 'rgba(255, 255, 255, 1.00)',
},
black: {
DEFAULT: '#000',
'02': 'rgba(0, 0, 0, 0.02)',
'05': 'rgba(0, 0, 0, 0.05)',
10: 'rgba(0, 0, 0, 0.10)',
25: 'rgba(0, 0, 0, 0.25)',
40: 'rgba(0, 0, 0, 0.40)',
60: 'rgba(0, 0, 0, 0.60)',
80: 'rgba(0, 0, 0, 0.80)',
95: 'rgba(0, 0, 0, 0.95)',
100: 'rgba(0, 0, 0, 1)',
},
2022-03-09 08:57:59 +00:00
blue: '#1DA2FB',
2022-02-23 17:57:44 +00:00
coral: '#FF6057',
pink: '#FF2D5E',
orange: '#D9822B',
yellow: {
DEFAULT: '#EDFF22',
dark: '#474B0A', // yellow 0.3 opacity on black
2022-02-23 17:57:44 +00:00
},
intent: {
danger: '#FF261A',
warning: '#FF7A1A',
prompt: '#EDFF22',
success: '#26FF8A',
help: '#494949',
2022-03-16 12:57:24 +00:00
highlight: '#E5E5E5',
2022-02-25 14:12:13 +00:00
},
'intent-background': {
danger: '#9E0025', // for white text
},
2022-02-23 17:57:44 +00:00
},
spacing: {
0: '0px',
2: '0.125rem',
4: '0.25rem',
8: '0.5rem',
12: '0.75rem',
2022-03-02 09:32:22 +00:00
16: '1rem',
20: '1.25rem',
2022-03-02 09:32:22 +00:00
24: '1.5rem',
2022-02-23 17:57:44 +00:00
28: '1.75rem',
2022-03-02 09:32:22 +00:00
32: '2rem',
40: '2.5rem',
2022-02-23 17:57:44 +00:00
44: '2.75rem',
64: '4rem',
2022-02-23 17:57:44 +00:00
},
2022-03-04 16:21:24 +00:00
opacity: {
0: '0',
2: '0.02',
5: '0.05',
10: '0.1',
15: '0.15',
20: '0.2',
25: '0.25',
30: '0.3',
35: '0.35',
40: '0.4',
45: '0.45',
50: '0.5',
55: '0.55',
60: '0.6',
65: '0.65',
70: '0.7',
75: '0.75',
80: '0.8',
85: '0.85',
90: '0.9',
95: '0.95',
100: '1',
},
2022-02-23 17:57:44 +00:00
borderWidth: {
DEFAULT: '1px',
1: '1px',
2022-02-23 17:57:44 +00:00
4: '4px',
},
2022-03-16 12:57:24 +00:00
borderRadius: {
none: '0',
sm: '0.125rem',
DEFAULT: '0.225rem',
md: '0.3rem',
lg: '0.5rem',
full: '100%',
2022-03-16 12:57:24 +00:00
},
2022-02-23 17:57:44 +00:00
fontFamily: {
mono: ['Roboto Mono', ...defaultTheme.fontFamily.mono],
2022-02-23 17:57:44 +00:00
serif: defaultTheme.fontFamily.serif,
sans: [
'"Helvetica Neue"',
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'Roboto',
'Arial',
'"Noto Sans"',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Noto Color Emoji"',
],
alpha: [
'AlphaLyrae',
2022-02-23 17:57:44 +00:00
'"Helvetica Neue"',
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'Roboto',
'Arial',
'"Noto Sans"',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Noto Color Emoji"',
],
},
fontSize: {
2022-03-01 09:26:26 +00:00
h1: ['72px', { lineHeight: '92px', letterSpacing: '-0.01em' }],
h2: ['48px', { lineHeight: '64px', letterSpacing: '-0.01em' }],
h3: ['32px', { lineHeight: '40px', letterSpacing: '-0.01em' }],
2022-02-23 17:57:44 +00:00
2022-03-01 09:26:26 +00:00
h4: ['24px', { lineHeight: '36px', letterSpacing: '-0.01em' }],
h5: ['18px', { lineHeight: '28px', letterSpacing: '-0.01em' }],
2022-02-23 17:57:44 +00:00
'body-large': ['16px', '24px'],
body: ['14px', '20px'],
ui: ['14px', '20px'],
'ui-small': ['12px', '16px'],
2022-02-23 17:57:44 +00:00
},
Feat/63 Deal ticket (#82) * scaffold dealticket package, remove trading views from react-helpers * add deal ticket component, add intent utils, expand dialog and form group styles * add splash component, show market not found message if market doesnt exist * tidy up error handling * add handleError method for vega tx hook * add better testname for provider test, flesh out tests a bit more for deal ticket * Add unit tests for useVegaTransaction and useOrderSubmit hooks * add wrapper component for order dialog styles * add vega styled loader to ui toolkit and use in order dialog * add title prop to order dialog * split limit and market tickets into own files * add button radio component * revert dialog styles * move splash component to ui-toolkit, add story * convert intent to enum * Make button always type=button unless type prop is passed * inline filter logic for tif selector * add date-fns, add datetime to helpers * add order types to wallet package, make price undefined if order type is market * use enums in deal ticket logic * tidy up order state by moving submit and transaction hooks out of deal ticket * add comment for dialog styles * remove decimal from price input * add types package, delete old generated types from trading project * rename types package to graphql * update generate command to point to correct locations * fix use order submit test * use intent shadow helper * remove date-fns and format manually, update submit button error to use input-error * remove stray console.log
2022-03-17 19:35:46 +00:00
boxShadow: {
callout: '5px 5px 0 1px rgba(255, 255, 255, 0.05)',
focus: '0px 0px 0px 1px #FFFFFF, 0px 0px 3px 2px #FFE600',
'focus-dark': '0px 0px 0px 1px #000000, 0px 0px 3px 2px #FFE600',
radio: '1px 1px 0 0',
2022-02-23 17:57:44 +00:00
},
};