Skip to content

Commit

Permalink
chore: DataInputs now use transparent bg color
Browse files Browse the repository at this point in the history
  • Loading branch information
MildTomato committed Feb 23, 2022
1 parent dc7e6d1 commit 5f6b305
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
29 changes: 28 additions & 1 deletion default-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,20 @@ module.exports = {
scale11: 'var(--colors-slate11)',
scale12: 'var(--colors-slate12)',
},

scaleA: {
scaleA1: 'var(--colors-slatea1)',
scaleA2: 'var(--colors-slatea2)',
scaleA3: 'var(--colors-slatea3)',
scaleA4: 'var(--colors-slatea4)',
scaleA5: 'var(--colors-slatea5)',
scaleA6: 'var(--colors-slatea6)',
scaleA7: 'var(--colors-slatea7)',
scaleA8: 'var(--colors-slatea8)',
scaleA9: 'var(--colors-slatea9)',
scaleA10: 'var(--colors-slatea10)',
scaleA11: 'var(--colors-slatea11)',
scaleA12: 'var(--colors-slatea12)',
},
scaleDark: {
scale1: 'var(--colors-gray1)',
scale2: 'var(--colors-gray2)',
Expand All @@ -60,4 +73,18 @@ module.exports = {
scale11: 'var(--colors-gray11)',
scale12: 'var(--colors-gray12)',
},
scaleADark: {
scaleA1: 'var(--colors-graya1)',
scaleA2: 'var(--colors-graya2)',
scaleA3: 'var(--colors-graya3)',
scaleA4: 'var(--colors-graya4)',
scaleA5: 'var(--colors-graya5)',
scaleA6: 'var(--colors-graya6)',
scaleA7: 'var(--colors-graya7)',
scaleA8: 'var(--colors-graya8)',
scaleA9: 'var(--colors-graya9)',
scaleA10: 'var(--colors-graya10)',
scaleA11: 'var(--colors-graya11)',
scaleA12: 'var(--colors-graya12)',
},
}
8 changes: 4 additions & 4 deletions src/lib/theme/defaultTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ export default {
`,
variants: {
standard: `
bg-scale-200 dark:bg-scale-200
bg-scaleA-200
border border-scale-700
`,
error: `
Expand Down Expand Up @@ -569,7 +569,7 @@ export default {
`,
variants: {
standard: `
bg-scale-200 dark:bg-scale-200
bg-scaleA-200
border border-scale-700
`,
error: `
Expand Down Expand Up @@ -617,7 +617,7 @@ export default {
`,
variants: {
standard: `
bg-scale-200 dark:bg-scale-200
bg-scaleA-200
border border-scale-700
`,
error: `
Expand Down Expand Up @@ -1471,7 +1471,7 @@ export default {
label: `truncate`,
variants: {
standard: `
bg-scale-200 dark:bg-scale-200
bg-scaleA-200
border border-scale-700
aria-expanded:border-scale-900
Expand Down
8 changes: 4 additions & 4 deletions ui.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const brandColors = require('./default-colors')

// generates fixed scales
// based on the root/light mode version
const fixedOptions = ['scale', 'brand']
const fixedOptions = ['scale', 'scaleA', 'brand']

function radixColorKeys() {
let keys = Object.keys(radixUiColors)
Expand All @@ -29,7 +29,7 @@ function radixColorKeys() {
}

function generateColorClasses() {
const brandColors = ['brand', 'scale']
const brandColors = ['brand', 'scale', 'scaleA']
const colors = [...radixColorKeys(), ...brandColors]

let mappedColors = {}
Expand All @@ -51,7 +51,7 @@ function generateColorClasses() {
colors.map((x) => {
for (let index = 0; index < 12; index++) {
const step = index + 1
mappedColors[x][step * 100] = `var(--colors-${x}${step})`
mappedColors[x][step * 100] = `var(--colors-${x.toLowerCase()}${step})`

if (
fixedOptions.some(function (v) {
Expand Down Expand Up @@ -125,7 +125,7 @@ function generateCssVariables() {

const variables = generateCssVariables()

// console.log(variables)
// console.log('variables', variables)

const uiConfig = {
theme: {
Expand Down

0 comments on commit 5f6b305

Please sign in to comment.