Skip to content

Commit

Permalink
Improve: Move Master Colors's mode variables in
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Jun 16, 2024
1 parent 627cabd commit ce56501
Show file tree
Hide file tree
Showing 8 changed files with 933 additions and 90 deletions.
2 changes: 1 addition & 1 deletion internal
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"provenance": true
},
"dependencies": {
"@master/colors": "^2.0.0",
"@master/normal.css": "^3.0.0",
"@techor/extend": "^3.0.22",
"@master/colors": "^2.1.0",
"@master/normal.css": "^3.1.0",
"@techor/extend": "^3.0.23",
"csstype": "^3.1.3"
},
"devDependencies": {
Expand Down
216 changes: 213 additions & 3 deletions packages/core/src/config/variables.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import colors from '@master/colors'
import extend from '@techor/extend'

const variables = {
const variables = extend(colors, {
full: '100%',
fit: 'fit-content',
max: 'max-content',
Expand Down Expand Up @@ -119,7 +120,216 @@ const variables = {
view: 'view-box'
},
current: 'currentColor',
...colors
}
white: '#ffffff',
black: '#000000',
base: {
'@light': '$(white)',
'@dark': '$(gray-95)',
},
canvas: {
'@light': '$(slate-5)',
'@dark': '$(gray-90)',
},
surface: {
'@light': '$(white)',
'@dark': '$(gray-80)',
},
invert: {
'@light': '$(black)',
'@dark': '$(white)',
},
line: {
neutral: {
'@light': '$(slate-60)',
'@dark': '$(gray-30)',
},
},
gray: {
'@light': '$(gray-30)',
'@dark': '$(gray-40)',
},
slate: {
'@light': '$(slate-30)',
'@dark': '$(slate-40)',
},
brown: {
'@light': '$(brown-40)',
'@dark': '$(brown-50)',
},
orange: {
'@light': '$(orange-40)',
'@dark': '$(orange-50)',
},
amber: {
'@light': '$(amber-40)',
'@dark': '$(amber-50)',
},
yellow: {
'@light': '$(yellow-40)',
'@dark': '$(yellow-50)',
},
lime: {
'@light': '$(lime-40)',
'@dark': '$(lime-50)',
},
green: {
'@light': '$(green-40)',
'@dark': '$(green-50)',
},
beryl: {
'@light': '$(beryl-40)',
'@dark': '$(beryl-50)',
},
teal: {
'@light': '$(teal-40)',
'@dark': '$(teal-50)',
},
cyan: {
'@light': '$(cyan-40)',
'@dark': '$(cyan-50)',
},
sky: {
'@light': '$(sky-60)',
'@dark': '$(sky-50)',
},
blue: {
'@light': '$(blue-60)',
'@dark': '$(blue-50)',
},
indigo: {
'@light': '$(indigo-60)',
'@dark': '$(indigo-50)',
},
violet: {
'@light': '$(violet-60)',
'@dark': '$(violet-50)',
},
purple: {
'@light': '$(purple-60)',
'@dark': '$(purple-50)',
},
fuchsia: {
'@light': '$(fuchsia-60)',
'@dark': '$(fuchsia-50)',
},
pink: {
'@light': '$(pink-60)',
'@dark': '$(pink-50)',
},
crimson: {
'@light': '$(crimson-60)',
'@dark': '$(crimson-50)',
},
red: {
'@light': '$(red-60)',
'@dark': '$(red-50)',
},
text: {
invert: {
'@light': '$(black)',
'@dark': '$(white)',
},
strong: {
'@light': '$(slate-95)',
'@dark': '$(gray-10)',
},
neutral: {
'@light': '$(slate-70)',
'@dark': '$(gray-30)',
},
lightest: {
'@light': '$(slate-30)',
'@dark': '$(gray-60)',
},
lighter: {
'@light': '$(slate-40)',
'@dark': '$(gray-50)',
},
light: {
'@light': '$(slate-50)',
'@dark': '$(gray-40)',
},
gray: {
'@light': '$(gray-60)',
'@dark': '$(gray-30)',
},
slate: {
'@light': '$(slate-60)',
'@dark': '$(slate-30)',
},
brown: {
'@light': '$(brown-60)',
'@dark': '$(brown-30)',
},
orange: {
'@light': '$(orange-60)',
'@dark': '$(orange-30)',
},
amber: {
'@light': '$(amber-60)',
'@dark': '$(amber-40)',
},
yellow: {
'@light': '$(yellow-60)',
'@dark': '$(yellow-40)',
},
lime: {
'@light': '$(lime-70)',
'@dark': '$(lime-40)',
},
green: {
'@light': '$(green-70)',
'@dark': '$(green-40)',
},
beryl: {
'@light': '$(beryl-70)',
'@dark': '$(beryl-40)',
},
teal: {
'@light': '$(teal-70)',
'@dark': '$(teal-40)',
},
cyan: {
'@light': '$(cyan-70)',
'@dark': '$(cyan-40)',
},
sky: {
'@light': '$(sky-70)',
'@dark': '$(sky-30)',
},
blue: {
'@light': '$(blue-60)',
'@dark': '$(blue-30)',
},
indigo: {
'@light': '$(indigo-60)',
'@dark': '$(indigo-30)',
},
violet: {
'@light': '$(violet-60)',
'@dark': '$(violet-30)',
},
purple: {
'@light': '$(purple-60)',
'@dark': '$(purple-30)',
},
fuchsia: {
'@light': '$(fuchsia-60)',
'@dark': '$(fuchsia-30)',
},
pink: {
'@light': '$(pink-60)',
'@dark': '$(pink-30)',
},
crimson: {
'@light': '$(crimson-60)',
'@dark': '$(crimson-30)',
},
red: {
'@light': '$(red-60)',
'@dark': '$(red-30)',
},
},
})

export default variables
Loading

0 comments on commit ce56501

Please sign in to comment.