Merge pull request #332 from supabase/chore/update-tailwind-2.0

chore: update tailwind 2.0 for supabase-ui
This commit is contained in:
Copple authored and GitHub committed 2020-12-06 18:25:16 +08:00
commit 6af28345cd
8 files changed
+27476 -48

No files matched your search

+2
View File
@@ -97,3 +97,5 @@ typings/
# DynamoDB Local files
.dynamodb/
.vscode
+1 -1
View File
@@ -21,4 +21,4 @@ dist
npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*
+27321
View File
File diff suppressed because it is too large. Load diff
+4 -5
View File
@@ -28,19 +28,17 @@
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"@babel/runtime": "^7.11.2",
"@fullhuman/postcss-purgecss": "^3.0.0",
"@rollup/plugin-babel": "^5.2.1",
"@storybook/addon-actions": "^6.0.26",
"@storybook/addon-essentials": "^6.0.26",
"@storybook/addon-links": "^6.0.26",
"@storybook/react": "^6.0.26",
"@tailwindcss/custom-forms": "^0.2.1",
"@tailwindcss/ui": "^0.6.2",
"@tailwindcss/forms": "^0.2.1",
"@tailwindcssinjs/macro": "^0.10.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.0.4",
"@testing-library/user-event": "^12.1.7",
"autoprefixer": "^10.0.1",
"autoprefixer": "^9.8.6",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"babel-plugin-add-react-displayname": "^0.0.5",
@@ -48,6 +46,7 @@
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-prettier": "^3.1.4",
"npm-run-all": "^4.1.5",
"postcss": "^7.0.35",
"postcss-preset-env": "^6.7.0",
"prettier": "^2.1.2",
"react-is": "^16.13.1",
@@ -56,7 +55,7 @@
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-peer-deps-external": "^2.2.3",
"rollup-plugin-postcss": "^3.1.8",
"tailwindcss": "^1.8.11"
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.1"
},
"browserslist": {
"production": [
+1 -21
View File
@@ -1,23 +1,3 @@
const purgecss = require('@fullhuman/postcss-purgecss')({
// Specify the paths to all of the template files in your project
content: ['./src/**/*.js'],
// This is the function used to extract class names from your templates
defaultExtractor: (content) => {
// Capture as liberally as possible, including things like `h-(screen-1.5)`
const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || []
// Capture classes within other delimiters like .block(class="w-1/2") in Pug
const innerMatches = content.match(/[^<>"'`\s.()]*[^<>"'`\s.():]/g) || []
return broadMatches.concat(innerMatches)
},
})
module.exports = {
plugins: [
require('tailwindcss'),
require('postcss-flexbugs-fixes'),
...(process.env.NODE_ENV === 'production' ? [purgecss] : []),
],
plugins: [require('tailwindcss'), require('autoprefixer')],
}
+1 -1
View File
@@ -3,7 +3,7 @@
}
.btn:focus {
@apply outline-none shadow-outline;
@apply outline-none ring;
}
.btn:disabled {
+1 -1
View File
@@ -13,7 +13,7 @@ export default function ({ label }) {
onChange={setSwitchValue}
className={`${
switchValue ? 'bg-indigo-600' : 'bg-gray-200'
} p-0 relative inline-flex flex-shrink-0 h-6 transition-colors duration-200 ease-in-out border-2 border-transparent rounded-full cursor-pointer w-11 focus:outline-none focus:shadow-outline`}
} p-0 relative inline-flex flex-shrink-0 h-6 transition-colors duration-200 ease-in-out border-2 border-transparent rounded-full cursor-pointer w-11 focus:outline-none focus:ring`}
>
{({ checked }) => (
<span
+145 -19
View File
@@ -1,27 +1,153 @@
module.exports = {
future: {
removeDeprecatedGapUtilities: true,
purgeLayersByDefault: true,
theme: {
fontSize: {
xs: '0.75rem',
sm: '0.875rem',
base: '1rem',
lg: '1.125rem',
xl: '1.25rem',
'2xl': '1.5rem',
'3xl': '1.875rem',
'4xl': '2.25rem',
'5xl': '3rem',
'6xl': '4rem',
},
extend: {
colors: {
transparent: 'transparent',
current: 'currentColor',
black: '#000',
white: '#fff',
brand: {
100: '#7DDAB1',
200: '#67D4A3',
300: '#52CD96',
400: '#3DC688',
500: '#35B179',
600: '#2F9A6A',
700: '#29845B',
800: '#236E4C',
900: '#1C583D',
},
gray: {
100: '#f7fafc',
200: '#edf2f7',
300: '#e2e8f0',
400: '#cbd5e0',
500: '#a0aec0',
600: '#718096',
700: '#4a5568',
800: '#2d3748',
900: '#1a202c',
},
red: {
100: '#fff5f5',
200: '#fed7d7',
300: '#feb2b2',
400: '#fc8181',
500: '#f56565',
600: '#e53e3e',
700: '#c53030',
800: '#9b2c2c',
900: '#742a2a',
},
orange: {
100: '#fffaf0',
200: '#feebc8',
300: '#fbd38d',
400: '#f6ad55',
500: '#ed8936',
600: '#dd6b20',
700: '#c05621',
800: '#9c4221',
900: '#7b341e',
},
yellow: {
100: '#fffff0',
200: '#fefcbf',
300: '#faf089',
400: '#f6e05e',
500: '#ecc94b',
600: '#d69e2e',
700: '#b7791f',
800: '#975a16',
900: '#744210',
},
green: {
100: '#f0fff4',
200: '#c6f6d5',
300: '#9ae6b4',
400: '#68d391',
500: '#48bb78',
600: '#38a169',
700: '#2f855a',
800: '#276749',
900: '#22543d',
},
teal: {
100: '#e6fffa',
200: '#b2f5ea',
300: '#81e6d9',
400: '#4fd1c5',
500: '#38b2ac',
600: '#319795',
700: '#2c7a7b',
800: '#285e61',
900: '#234e52',
},
blue: {
100: '#ebf8ff',
200: '#bee3f8',
300: '#90cdf4',
400: '#63b3ed',
500: '#4299e1',
600: '#3182ce',
700: '#2b6cb0',
800: '#2c5282',
900: '#2a4365',
},
indigo: {
100: '#ebf4ff',
200: '#c3dafe',
300: '#a3bffa',
400: '#7f9cf5',
500: '#667eea',
600: '#5a67d8',
700: '#4c51bf',
800: '#434190',
900: '#3c366b',
},
purple: {
100: '#faf5ff',
200: '#e9d8fd',
300: '#d6bcfa',
400: '#b794f4',
500: '#9f7aea',
600: '#805ad5',
700: '#6b46c1',
800: '#553c9a',
900: '#44337a',
},
pink: {
100: '#fff5f7',
200: '#fed7e2',
300: '#fbb6ce',
400: '#f687b3',
500: '#ed64a6',
600: '#d53f8c',
700: '#b83280',
800: '#97266d',
900: '#702459',
},
},
},
},
purge: {
mode: 'all',
content: ['./src/components/**/*.js'],
},
theme: {
extend: {
colors: {
'brand-100': '#7DDAB1',
'brand-200': '#67D4A3',
'brand-300': '#52CD96',
'brand-400': '#3DC688',
'brand-500': '#35B179',
'brand-600': '#2F9A6A',
'brand-700': '#29845B',
'brand-800': '#236E4C',
'brand-900': '#1C583D',
},
},
},
variants: {},
plugins: [require('@tailwindcss/ui'), require('@tailwindcss/custom-forms')],
plugins: [require('@tailwindcss/forms')],
}