The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
updated tailwind config files
Jonathan Summers-Muir58789855a3a5
diff --git a/packages/config/tailwind.config.js b/packages/config/tailwind.config.jsindex 6abad39c83d..88a974d5243 100644--- a/packages/config/tailwind.config.js+++ b/packages/config/tailwind.config.js@@ -4,7 +4,7 @@ const svgToDataUri = require('mini-svg-data-uri')const twConfigRef = require('./tw-config-ref')const color = require('./../ui/styles/tw-extend/color')-function generateTwClasses(globalKey, twAttributes) {+function generateTwColorClasses(globalKey, twAttributes) {let classes = {}Object.values(twAttributes).map((attr, i) => {const attrKey = Object.keys(twAttributes)[i]@@ -18,7 +18,7 @@ function generateTwClasses(globalKey, twAttributes) {return classes}-module.exports = ui({+const uiConfig = ui({mode: 'JIT',content: ['../../packages/common/**/*.{ts,tsx}',@@ -36,47 +36,47 @@ module.exports = ui({theme: {accentColor: (theme) => ({...theme('colors'),- ...generateTwClasses('accentColor', color),+ ...generateTwColorClasses('accentColor', color),}),backgroundColor: (theme) => ({...theme('colors'),- ...generateTwClasses('backgroundColor', color),+ ...generateTwColorClasses('backgroundColor', color),}),borderColor: (theme) => ({...theme('colors'),- ...generateTwClasses('borderColor', color),+ ...generateTwColorClasses('borderColor', color),}),boxShadowColor: (theme) => ({...theme('colors'),- ...generateTwClasses('boxShadowColor', color),+ ...generateTwColorClasses('boxShadowColor', color),}),caretColor: (theme) => ({...theme('colors'),- ...generateTwClasses('caretColor', color),+ ...generateTwColorClasses('caretColor', color),}),divideColor: (theme) => ({...theme('colors'),- ...generateTwClasses('divideColor', color),+ ...generateTwColorClasses('divideColor', color),}),outlineColor: (theme) => ({...theme('colors'),- ...generateTwClasses('outlineColor', color),+ ...generateTwColorClasses('outlineColor', color),}),ringColor: (theme) => ({...theme('colors'),- ...generateTwClasses('ringColor', color),+ ...generateTwColorClasses('ringColor', color),}),ringOffsetColor: (theme) => ({...theme('colors'),- ...generateTwClasses('ringOffsetColor', color),+ ...generateTwColorClasses('ringOffsetColor', color),}),textColor: (theme) => ({...theme('colors'),- ...generateTwClasses('textColor', color),+ ...generateTwColorClasses('textColor', color),}),textDecorationColor: (theme) => ({...theme('colors'),- ...generateTwClasses('textDecorationColor', color),+ ...generateTwColorClasses('textDecorationColor', color),}),extend: {typography: ({ theme }) => ({@@ -255,89 +255,11 @@ module.exports = ui({}),screens: {xs: '480px',- // sm: '640px',- // // => @media (min-width: 640px) { ... }- // md: '768px',- // // => @media (min-width: 768px) { ... }- // lg: '1024px',- // // => @media (min-width: 1024px) { ... }- // xl: '1280px',- // // => @media (min-width: 1280px) { ... }- // '2xl': '1536px',- // // => @media (min-width: 1536px) { ... }},- // colors: {- // 'gray-light': '#7B7F86',- // 'gray-dark': '#7B7F86',- // 'accent-1': '#FAFAFA',- // 'accent-2': '#EAEAEA',- // 'accent-7': '#333',- // success: '#0070f3',- // cyan: '#79FFE1',- // // brand: {- // // 100: '#82dab0',- // // 200: '#69d3a0',- // // 300: '#50cb90',- // // 400: '#C5F1DD',- // // 500: '#9FE7C7',- // // 600: '#65D9A5',- // // 700: '#3ECF8E',- // // 800: '#38BC81',- // // 900: '#10633E',- // // },- // // Joshen TODO: At the end just rearrange the values- // dark: {- // 100: '#eeeeee',- // 200: '#e0e0e0',- // 300: '#bbbbbb',- // 400: '#666666',- // 500: '#444444',- // 600: '#2a2a2a',- // 700: '#1f1f1f',- // 800: '#181818',- // 900: '#0f0f0f',- // },- // // gray: {- // // 100: '#eeeeee',- // // 200: '#e0e0e0',- // // 300: '#bbbbbb',- // // 400: '#666666',- // // 500: '#444444',- // // 600: '#2a2a2a',- // // 700: '#1f1f1f',- // // 800: '#181818',- // // 900: '#0f0f0f',- // // },- // },- // spacing: {- // 28: '7rem',- // },- // letterSpacing: {- // tighter: '-.04em',- // },- // lineHeight: {- // tight: 1.2,- // },- // fontSize: {- // '5xl': '2.5rem',- // '6xl': '2.75rem',- // '7xl': '4.5rem',- // '8xl': '6.25rem',- // },- // boxShadow: {- // 'light-small': '0px 4px 8px 2px rgba(107, 114, 128, 0.08)',- // small: '0 5px 10px rgba(0, 0, 0, 0.12)',- // medium: '0 8px 30px rgba(0, 0, 0, 0.12)',- // override: '0px 0px 0px rgba(0, 0, 0, 0)',- // },fontFamily: {sans: ['custom-font', 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif'],mono: ['Office Code Pro', 'Source Code Pro', 'Menlo', 'monospace'],},- // stroke: (theme) => ({- // white: theme('colors.white'),- // black: theme('colors.black'),- // }),backgroundImage: (theme) => ({squiggle: `url("${svgToDataUri(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 3" enable-background="new 0 0 6 3" width="6" height="3" fill="${theme(@@ -357,12 +279,26 @@ module.exports = ui({},},},- // variants: {- // extend: {- // inset: ['group-hover'],- // stroke: ['dark'],- // height: ['hover'],- // },- // },plugins: [require('@tailwindcss/typography')],})++/**+ * Merge Supabase UI and Tailwind CSS configurations+ * @param {object} tailwindConfig - Tailwind config object+ * @return {object} new config object+ */+function wrapper(tailwindConfig) {+ let purge+ if (Array.isArray(tailwindConfig.purge)) {+ purge = {+ content: tailwindConfig.purge,+ }+ } else {+ purge = tailwindConfig.purge+ }+ return deepMerge({ ...tailwindConfig, purge }, uiConfig, {+ arrayMerge: arrayMergeFn,+ })+}++module.exports = wrapperdiff --git a/packages/ui/tailwind.config.js b/packages/ui/tailwind.config.jsdeleted file mode 100644index c1a046ced35..00000000000--- a/packages/ui/tailwind.config.js+++ /dev/null@@ -1,477 +0,0 @@-const gray = {- 100: '#eeeeee',- 200: '#e0e0e0',- 300: '#bbbbbb',- 400: '#666666',- 500: '#444444',- 650: '#333',- 600: '#2a2a2a',- 700: '#1f1f1f',- 800: '#181818',- 900: '#0f0f0f',-}-const brand = {- 100: '#c5f1dd',- 200: '#c5f1dd',- 300: '#9fe7c7',- 400: '#65d9a5',- 500: '#24b47e',- 600: '#38bc81',- 700: '#1c8656',- 800: '#10633e',- 900: '#10633e',-}--const blueGray = {- 50: '#F8FAFC',- 100: '#F1F5F9',- 200: '#E2E8F0',- 300: '#CBD5E1',- 400: '#94A3B8',- 500: '#64748B',- 600: '#475569',- 700: '#334155',- 800: '#1E293B',- 900: '#0F172A',-}--const coolGray = {- 50: '#F9FAFB',- 100: '#F3F4F6',- 200: '#E5E7EB',- 300: '#D1D5DB',- 400: '#9CA3AF',- 500: '#6B7280',- 600: '#4B5563',- 700: '#374151',- 800: '#1F2937',- 900: '#111827',-}--const colors = {- // transparent: 'transparent',- // white: '#ffffff',- // black: '#000000',- // gray: {- // '50': '#f9fafb',- // '100': '#f4f5f7',- // '200': '#e5e7eb',- // '300': '#d5d6d7',- // '400': '#9e9e9e',- // '500': '#707275',- // '600': '#4c4f52',- // '700': '#24262d',- // '800': '#1a1c23',- // '900': '#121317',- // // default values from Tailwind UI palette- // // '300': '#d2d6dc',- // // '400': '#9fa6b2',- // // '500': '#6b7280',- // // '600': '#4b5563',- // // '700': '#374151',- // // '800': '#252f3f',- // // '900': '#161e2e',- // },- red: {- 50: '#fdf2f2',- 100: '#fde8e8',- 200: '#fbd5d5',- 300: '#f8b4b4',- 400: '#f98080',- 500: '#f05252',- 600: '#e02424',- 700: '#c81e1e',- 800: '#9b1c1c',- 900: '#771d1d',- },- orange: {- 50: '#fff8f1',- 100: '#feecdc',- 200: '#fcd9bd',- 300: '#fdba8c',- 400: '#ff8a4c',- 500: '#ff5a1f',- 600: '#d03801',- 700: '#b43403',- 800: '#8a2c0d',- 900: '#771d1d',- },- yellow: {- 50: '#fdfdea',- 100: '#fdf6b2',- 200: '#fce96a',- 300: '#faca15',- 400: '#e3a008',- 500: '#c27803',- 600: '#9f580a',- 700: '#8e4b10',- 800: '#723b13',- 900: '#633112',- },- green: {- 50: '#f3faf7',- 100: '#def7ec',- 200: '#bcf0da',- 300: '#84e1bc',- 400: '#31c48d',- 500: '#0e9f6e',- 600: '#057a55',- 700: '#046c4e',- 800: '#03543f',- 900: '#014737',- },- teal: {- 50: '#edfafa',- 100: '#d5f5f6',- 200: '#afecef',- 300: '#7edce2',- 400: '#16bdca',- 500: '#0694a2',- 600: '#047481',- 700: '#036672',- 800: '#05505c',- 900: '#014451',- },- blue: {- 50: '#ebf5ff',- 100: '#e1effe',- 200: '#c3ddfd',- 300: '#a4cafe',- 400: '#76a9fa',- 500: '#3f83f8',- 600: '#1c64f2',- 700: '#1a56db',- 800: '#1e429f',- 900: '#233876',- },- indigo: {- 50: '#f0f5ff',- 100: '#e5edff',- 200: '#cddbfe',- 300: '#b4c6fc',- 400: '#8da2fb',- 500: '#6875f5',- 600: '#5850ec',- 700: '#5145cd',- 800: '#42389d',- 900: '#362f78',- },- purple: {- 50: '#f6f5ff',- 100: '#edebfe',- 200: '#dcd7fe',- 300: '#cabffd',- 400: '#ac94fa',- 500: '#9061f9',- 600: '#7e3af2',- 700: '#6c2bd9',- 800: '#5521b5',- 900: '#4a1d96',- },- pink: {- 50: '#fdf2f8',- 100: '#fce8f3',- 200: '#fad1e8',- 300: '#f8b4d9',- 400: '#f17eb8',- 500: '#e74694',- 600: '#d61f69',- 700: '#bf125d',- 800: '#99154b',- 900: '#751a3d',- },-}--const dark = {- 50: '#eeeeee',- 100: '#eeeeee',- 200: '#e0e0e0',- 300: '#bbbbbb',- 400: '#666666',- 500: '#444444',- 600: '#2a2a2a',- 700: '#1f1f1f',- 800: '#181818',- 900: '#0f0f0f',-}--const sbui_border = {- 100: 'var(--border-1)',- 200: 'var(--border-2)',- 300: 'var(--border-3)',- 400: 'var(--border-4)',- 500: 'var(--border-5)',- 600: 'var(--border-6)',- 700: 'var(--border-7)',- 800: 'var(--border-8)',- 900: 'var(--border-9)',- 1000: 'var(--border-10)',- 1100: 'var(--border-11)',- 1200: 'var(--border-12)',-}--const sbui_background = {- 100: 'var(--background-1)',- 200: 'var(--background-2)',- 300: 'var(--background-3)',- 400: 'var(--background-4)',- 500: 'var(--background-5)',- 600: 'var(--background-6)',- 700: 'var(--background-7)',- 800: 'var(--background-8)',- 900: 'var(--background-9)',- 1000: 'var(--background-10)',- 1100: 'var(--background-11)',- 1200: 'var(--background-12)',-}--const sbui_brand = {- 100: 'var(--brand-1)',- 200: 'var(--brand-2)',- 300: 'var(--brand-3)',- 400: 'var(--brand-4)',- 500: 'var(--brand-5)',- 600: 'var(--brand-6)',- 700: 'var(--brand-7)',- 800: 'var(--brand-8)',- 900: 'var(--brand-9)',- 1000: 'var(--brand-10)',- 1100: 'var(--brand-11)',- 1200: 'var(--brand-12)',-}--const sbui_brand_fixed = {- 100: 'var(--brand-fixed-1)',- 200: 'var(--brand-fixed-2)',- 300: 'var(--brand-fixed-3)',- 400: 'var(--brand-fixed-4)',- 500: 'var(--brand-fixed-5)',- 600: 'var(--brand-fixed-6)',- 700: 'var(--brand-fixed-7)',- 800: 'var(--brand-fixed-8)',- 900: 'var(--brand-fixed-9)',- 1000: 'var(--brand-fixed-10)',- 1100: 'var(--brand-fixed-11)',- 1200: 'var(--brand-fixed-12)',-}--function generateRadixVariables() {- const colors = [- 'brand',- 'brand-fixed',- 'scale',- 'tomato',- 'red',- 'crimson',- 'pink',- 'plum',- 'purple',- 'violet',- 'indigo',- 'blue',- 'cyan',- 'teal',- 'green',- 'grass',- 'brown',- 'orange',- 'sky',- 'mint',- 'lime',- 'yellow',- 'amber',- 'gold',- 'bronze',- 'gray',- 'mauve',- 'slate',- 'sage',- 'olive',- 'sand',- ]-- let mappedColors = {}-- colors.map((x) => {- mappedColors[x] = {}- })-- colors.map((x) => {- for (let index = 0; index < 12; index++) {- const step = index + 1- mappedColors[x][step * 100] = `var(--colors-${x}${step})`- }- })-- return mappedColors-}--const custom_colors = generateRadixVariables()--// console.log('radix colors', custom_colors)--const ui = require('./ui.config.js')--module.exports = ui({- content: {- // enabled: true,- content: [- './src/**/**/*.{js,ts,jsx,tsx,html,mdx}',- './src/**/*.{js,ts,jsx,tsx,html,mdx}',- './src/**/*.{js,ts,jsx,tsx,html,mdx}',- './src/lib/theme/defaultTheme.ts',- ],- // safelist: ['space-x-1'],- },- darkMode: 'class',- theme: {- // colors: {- // gray: { ...custom_colors.gray },- // slate: { ...custom_colors.slate },- // },- extend: {- typography: {- DEFAULT: {- css: {- 'code::before': {- content: '""',- },- 'code::after': {- content: '""',- },- },- },- },- colors: {- /*- main- */- ['brandColor']: '#EC6F0D',-- ['brandScale']: { ...sbui_brand },- ['brandScaleFixed']: { ...sbui_brand_fixed },-- // used for backgrounds- ['bgScale']: { ...sbui_background },- ['bgScaleDark']: { ...dark },-- // used for borders, inputs and text- ['grayScale']: { ...sbui_border },- ['grayScaleDark']: { ...gray },-- /*- typography- */- 'typography-body': {- light: coolGray[600],- dark: gray[100],- },- 'typography-body-secondary': {- light: coolGray[500],- dark: gray[300],- },- 'typography-body-strong': {- light: coolGray[100],- dark: 'white',- },- 'typography-body-faded': {- light: coolGray[400],- dark: gray[400],- },-- /*- app backgrounds- */- 'bg-primary': {- light: 'white',- dark: gray[800],- },- 'bg-secondary': {- light: blueGray[100],- dark: gray[700],- },- 'bg-alt': {- light: blueGray[50], // gray[100],- dark: gray[600],- },-- /*- Forms- */- 'input-value': {- light: coolGray[600],- dark: gray[200],- },- 'input-placeholder': {- light: coolGray[300],- dark: gray[400],- },- 'input-border': {- light: coolGray[300],- dark: gray[500],- },- 'input-label': {- light: coolGray[600],- dark: gray[200],- },- 'input-border-hover': {- light: coolGray[400],- dark: gray[400],- },- 'input-border-focus': {- light: brand[300],- dark: brand[300],- },-- // ['brandColor']: '#7c3aed',- transparent: 'transparent',- current: 'currentColor',-- black: '#000',- white: '#fff',-- // gray: { ...gray },- // brand: { ...brand },- // blueGray: { ...blueGray },- // coolGray: { ...coolGray },-- dark: {- 100: '#eeeeee',- 200: '#e0e0e0',- 300: '#bbbbbb',- 400: '#666666',- 500: '#444444',- 600: '#2a2a2a',- 700: '#1f1f1f',- 800: '#181818',- 900: '#0f0f0f',- },-- 'secondary-text': {- light: '#71767F',- dark: '#878787',- },-- // brand: {- // 50: '#82dab0',- // 100: '#82dab0',- // 200: '#69d3a0',- // 300: '#50cb90',- // 400: '#C5F1DD',- // 500: '#9FE7C7',- // 600: '#65D9A5',- // 700: '#3ECF8E',- // 800: '#24b47e', // green-500 in dashboard- // 900: '#2c9c6a',- // },-- // ...custom_colors,- },-- // transitionProperty: {- // 'max-height': 'max-height',- // },- },- },- plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],-})