2021-08-10 16:45:48 +03:00
|
|
|
const colors = require('tailwindcss/colors');
|
2023-02-15 20:15:19 +03:00
|
|
|
const plugin = require('tailwindcss/plugin');
|
|
|
|
|
|
|
|
function dataStateVariant(state, { addVariant, e }) {
|
|
|
|
addVariant(`data-state-${state}`, ({ modifySelectors, separator }) => {
|
|
|
|
modifySelectors(({ className }) => {
|
|
|
|
return `.${e(
|
|
|
|
`data-state-${state}${separator}${className}`
|
|
|
|
)}[data-state='${state}']`;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
addVariant(`group-data-state-${state}`, ({ modifySelectors, separator }) => {
|
|
|
|
modifySelectors(({ className }) => {
|
|
|
|
return `.group[data-state='${state}'] .${e(
|
|
|
|
`group-data-state-${state}${separator}${className}`
|
|
|
|
)}`;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
addVariant(`peer-data-state-${state}`, ({ modifySelectors, separator }) => {
|
|
|
|
modifySelectors(({ className }) => {
|
|
|
|
return `.peer[data-state='${state}'] ~ .${e(
|
|
|
|
`peer-data-state-${state}${separator}${className}`
|
|
|
|
)}`;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
2021-08-10 16:45:48 +03:00
|
|
|
|
|
|
|
module.exports = {
|
2022-08-09 12:03:52 +03:00
|
|
|
safelist: {
|
|
|
|
standard: /background$/,
|
2022-06-30 17:16:08 +03:00
|
|
|
},
|
|
|
|
darkMode: 'class',
|
2021-08-10 16:45:48 +03:00
|
|
|
theme: {
|
2022-06-30 17:16:08 +03:00
|
|
|
fontFamily: {
|
|
|
|
sans: ['Gudea', 'ui-sans-serif', 'system-ui'],
|
2023-01-18 17:30:31 +03:00
|
|
|
mono: ['"Overpass Mono"', 'ui-monospace', 'monospace'],
|
2022-06-30 17:16:08 +03:00
|
|
|
},
|
2021-08-10 16:45:48 +03:00
|
|
|
extend: {
|
2023-02-09 22:52:07 +03:00
|
|
|
boxShadow: {
|
|
|
|
eq: 'rgb(0 0 0) 0px 0px 2px',
|
|
|
|
},
|
2021-08-10 16:45:48 +03:00
|
|
|
colors: {
|
2022-06-24 17:32:31 +03:00
|
|
|
current: 'currentColor',
|
2021-08-10 16:45:48 +03:00
|
|
|
yellow: colors.amber,
|
2022-08-09 12:03:52 +03:00
|
|
|
gray: colors.slate,
|
2021-08-10 16:45:48 +03:00
|
|
|
primary: {
|
|
|
|
light: '#fad170',
|
|
|
|
DEFAULT: '#f9c548',
|
|
|
|
dark: '#d5ae52',
|
|
|
|
darker: '#ae8e3e',
|
|
|
|
},
|
|
|
|
cloud: {
|
|
|
|
DEFAULT: '#1eb4d4',
|
|
|
|
dark: '#197b98',
|
|
|
|
darker: '#074c4c',
|
|
|
|
},
|
|
|
|
secondary: {
|
|
|
|
light: '#eef4f7',
|
|
|
|
DEFAULT: '#297393',
|
|
|
|
dark: '#14394a',
|
|
|
|
},
|
|
|
|
legacybg: {
|
|
|
|
DEFAULT: '#f8fafb',
|
|
|
|
},
|
2021-10-07 12:50:04 +03:00
|
|
|
muted: {
|
2023-01-24 15:03:35 +03:00
|
|
|
DEFAULT: '#64748B',
|
2023-01-18 17:30:31 +03:00
|
|
|
dark: '#64748B',
|
2021-10-11 16:20:22 +03:00
|
|
|
},
|
2021-10-07 12:50:04 +03:00
|
|
|
},
|
2021-08-10 16:45:48 +03:00
|
|
|
spacing: {
|
2022-05-25 17:19:20 +03:00
|
|
|
xs: '0.571rem', // ~9.5 px
|
|
|
|
sm: '0.857rem', // ~14 px
|
|
|
|
md: '1.429rem', // ~23 px
|
|
|
|
lg: '2.286rem', // 36.5px
|
|
|
|
xl: '2.857rem', // 45.7px
|
|
|
|
input: '2.5rem', // 41.5px
|
|
|
|
btn: '2.5rem', // 41.5px
|
|
|
|
btnsm: '2rem', // 32px
|
|
|
|
formlabel: '0.571rem', // ~9.5 px
|
2021-08-10 16:45:48 +03:00
|
|
|
},
|
|
|
|
fontSize: {
|
2021-10-11 16:20:22 +03:00
|
|
|
sm: ['0.875rem', { lineHeight: '1.25rem' }],
|
|
|
|
base: ['1rem', { lineHeight: '1.5rem' }],
|
|
|
|
lg: ['1.143rem', { lineHeight: '1.429rem' }],
|
|
|
|
xl: ['1.714rem', { lineHeight: '2.143rem' }],
|
2022-06-07 12:56:04 +03:00
|
|
|
subtitle: ['1.300rem', { lineHeight: '2.143rem' }], // ~20 px
|
|
|
|
title: ['1.5rem', { lineHeight: '2.143rem' }], // ~24 px
|
2021-09-28 13:15:34 +03:00
|
|
|
},
|
2022-07-29 21:11:43 +03:00
|
|
|
width: {
|
|
|
|
inherit: 'inherit',
|
|
|
|
},
|
2022-08-19 20:57:44 +03:00
|
|
|
keyframes: {
|
|
|
|
onboardingWizardFadeIn: {
|
|
|
|
'0%': {
|
|
|
|
opacity: '0',
|
|
|
|
scale: '.9',
|
|
|
|
},
|
|
|
|
'50%': {
|
|
|
|
opacity: '.5',
|
|
|
|
scale: '.95',
|
|
|
|
},
|
|
|
|
'100%': {
|
|
|
|
opacity: '1',
|
|
|
|
scale: '1',
|
|
|
|
},
|
|
|
|
},
|
2022-09-02 12:12:26 +03:00
|
|
|
collapsibleContentOpen: {
|
|
|
|
from: {
|
|
|
|
height: '0',
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
height: 'var(--radix-collapsible-content-height)',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
collapsibleContentClose: {
|
|
|
|
from: {
|
|
|
|
height: 'var(--radix-collapsible-content-height)',
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
height: '0',
|
|
|
|
},
|
|
|
|
},
|
2022-12-21 16:10:41 +03:00
|
|
|
slideUpAndFade: {
|
|
|
|
from: {
|
|
|
|
opacity: `0`,
|
|
|
|
transform: `translateY(2px)`,
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
opacity: `1`,
|
|
|
|
transform: `translateY(0)`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
slideRightAndFade: {
|
|
|
|
from: {
|
|
|
|
opacity: `0`,
|
|
|
|
transform: `translateX(-2px)`,
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
opacity: `1`,
|
|
|
|
transform: `translateX(0)`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
slideDownAndFade: {
|
|
|
|
from: {
|
|
|
|
opacity: `0`,
|
|
|
|
transform: `translateY(-2px)`,
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
opacity: `1`,
|
|
|
|
transform: `translateY(0)`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
slideLeftAndFade: {
|
|
|
|
from: {
|
|
|
|
opacity: `0`,
|
|
|
|
transform: `translateX(2px)`,
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
opacity: `1`,
|
|
|
|
transform: `translateX(0)`,
|
|
|
|
},
|
|
|
|
},
|
2023-01-24 14:07:28 +03:00
|
|
|
notificationOpen: {
|
|
|
|
from: {
|
|
|
|
opacity: `0`,
|
|
|
|
transform: `translateX(100%)`,
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
opacity: `1`,
|
|
|
|
transform: `translateX(0)`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
notificationClose: {
|
|
|
|
from: {
|
|
|
|
opacity: `1`,
|
|
|
|
transform: `translateY(0)`,
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
opacity: `0`,
|
|
|
|
transform: `translateY(-100%)`,
|
|
|
|
},
|
|
|
|
},
|
2023-02-15 20:15:19 +03:00
|
|
|
dropdownMenuContentOpen: {
|
|
|
|
from: {
|
|
|
|
opacity: '0',
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
opacity: '1',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dropdownMenuContentClose: {
|
|
|
|
from: {
|
|
|
|
opacity: '1',
|
|
|
|
},
|
|
|
|
to: {
|
|
|
|
opacity: '0',
|
|
|
|
},
|
|
|
|
},
|
2022-09-02 12:12:26 +03:00
|
|
|
},
|
|
|
|
animation: {
|
|
|
|
collapsibleContentOpen: 'collapsibleContentOpen 300ms ease-out',
|
|
|
|
collapsibleContentClose: 'collapsibleContentClose 300ms ease-out',
|
2022-12-21 16:10:41 +03:00
|
|
|
slideUpAndFade: 'slideUpAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
|
|
|
|
slideRightAndFade:
|
|
|
|
'slideRightAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
|
|
|
|
slideDownAndFade:
|
|
|
|
'slideDownAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
|
|
|
|
slideLeftAndFade:
|
|
|
|
'slideLeftAndFade 400ms cubic-bezier(0.16, 1, 0.3, 1)',
|
2023-01-24 14:07:28 +03:00
|
|
|
notificationOpen: 'notificationOpen 300ms ease-in-out',
|
|
|
|
notificationClose: 'notificationClose 300ms ease-in-out',
|
2023-02-15 20:15:19 +03:00
|
|
|
dropdownMenuContentOpen: 'dropdownMenuContentOpen 100ms ease-in',
|
|
|
|
dropdownMenuContentClose: 'dropdownMenuContentClose 100ms ease-out',
|
2022-08-19 20:57:44 +03:00
|
|
|
},
|
2021-08-10 16:45:48 +03:00
|
|
|
},
|
|
|
|
},
|
2022-09-02 00:23:23 +03:00
|
|
|
plugins: [
|
|
|
|
require('@tailwindcss/typography'),
|
|
|
|
require('@tailwindcss/forms'),
|
|
|
|
require('tailwindcss-radix')(),
|
2023-02-15 20:15:19 +03:00
|
|
|
plugin(helpers => {
|
|
|
|
// variants that help styling Radix-UI components
|
|
|
|
dataStateVariant('open', helpers);
|
|
|
|
dataStateVariant('closed', helpers);
|
|
|
|
dataStateVariant('on', helpers);
|
|
|
|
dataStateVariant('checked', helpers);
|
|
|
|
dataStateVariant('unchecked', helpers);
|
|
|
|
}),
|
2022-09-02 00:23:23 +03:00
|
|
|
],
|
2021-08-10 16:45:48 +03:00
|
|
|
};
|