paradiego

This commit is contained in:
2024-09-18 13:34:19 -03:00
commit 3f0e204289
12510 changed files with 1486101 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
export { default } from './palette';
export * from './palette';
+2
View File
@@ -0,0 +1,2 @@
export { default } from "./palette.js";
export * from "./palette.js";
+6
View File
@@ -0,0 +1,6 @@
{
"sideEffects": false,
"module": "./index.js",
"main": "../node/palette/index.js",
"types": "./index.d.ts"
}
+5
View File
@@ -0,0 +1,5 @@
import { PropsFor, SimpleStyleFunction, palette } from '../Box';
export const color: SimpleStyleFunction<'color'>;
export const bgcolor: SimpleStyleFunction<'bgcolor'>;
export type PaletteProps = PropsFor<typeof palette>;
+26
View File
@@ -0,0 +1,26 @@
import style from "../style/index.js";
import compose from "../compose/index.js";
export function paletteTransform(value, userValue) {
if (userValue === 'grey') {
return userValue;
}
return value;
}
export const color = style({
prop: 'color',
themeKey: 'palette',
transform: paletteTransform
});
export const bgcolor = style({
prop: 'bgcolor',
cssProperty: 'backgroundColor',
themeKey: 'palette',
transform: paletteTransform
});
export const backgroundColor = style({
prop: 'backgroundColor',
themeKey: 'palette',
transform: paletteTransform
});
const palette = compose(color, bgcolor, backgroundColor);
export default palette;