fluent-styles 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -0
- package/lib/commonjs/assets/img/doctor.png +0 -0
- package/lib/commonjs/index.js +248 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package/badge/index.js +159 -0
- package/lib/commonjs/package/badge/index.js.map +1 -0
- package/lib/commonjs/package/button/index.js +96 -0
- package/lib/commonjs/package/button/index.js.map +1 -0
- package/lib/commonjs/package/card/index.js +32 -0
- package/lib/commonjs/package/card/index.js.map +1 -0
- package/lib/commonjs/package/checkBox/index.js +84 -0
- package/lib/commonjs/package/checkBox/index.js.map +1 -0
- package/lib/commonjs/package/cycle/index.js +28 -0
- package/lib/commonjs/package/cycle/index.js.map +1 -0
- package/lib/commonjs/package/dialog/index.js +192 -0
- package/lib/commonjs/package/dialog/index.js.map +1 -0
- package/lib/commonjs/package/dropdown/index.js +116 -0
- package/lib/commonjs/package/dropdown/index.js.map +1 -0
- package/lib/commonjs/package/form/index.js +184 -0
- package/lib/commonjs/package/form/index.js.map +1 -0
- package/lib/commonjs/package/header/index.js +89 -0
- package/lib/commonjs/package/header/index.js.map +1 -0
- package/lib/commonjs/package/image/index.js +123 -0
- package/lib/commonjs/package/image/index.js.map +1 -0
- package/lib/commonjs/package/radioButton/index.js +84 -0
- package/lib/commonjs/package/radioButton/index.js.map +1 -0
- package/lib/commonjs/package/safeAreaView/index.js +16 -0
- package/lib/commonjs/package/safeAreaView/index.js.map +1 -0
- package/lib/commonjs/package/scrollView/index.js +16 -0
- package/lib/commonjs/package/scrollView/index.js.map +1 -0
- package/lib/commonjs/package/separator/index.js +33 -0
- package/lib/commonjs/package/separator/index.js.map +1 -0
- package/lib/commonjs/package/spacer/index.js +18 -0
- package/lib/commonjs/package/spacer/index.js.map +1 -0
- package/lib/commonjs/package/spinner/index.js +43 -0
- package/lib/commonjs/package/spinner/index.js.map +1 -0
- package/lib/commonjs/package/stack/__test__/index.test.js +91 -0
- package/lib/commonjs/package/stack/__test__/index.test.js.map +1 -0
- package/lib/commonjs/package/stack/index.js +41 -0
- package/lib/commonjs/package/stack/index.js.map +1 -0
- package/lib/commonjs/package/styled/__test__/index.test.js +161 -0
- package/lib/commonjs/package/styled/__test__/index.test.js.map +1 -0
- package/lib/commonjs/package/styled/index.js +42 -0
- package/lib/commonjs/package/styled/index.js.map +1 -0
- package/lib/commonjs/package/switch/index.js +43 -0
- package/lib/commonjs/package/switch/index.js.map +1 -0
- package/lib/commonjs/package/text/index.js +73 -0
- package/lib/commonjs/package/text/index.js.map +1 -0
- package/lib/commonjs/package/theme.js +384 -0
- package/lib/commonjs/package/theme.js.map +1 -0
- package/lib/commonjs/package/utils/index.js +130 -0
- package/lib/commonjs/package/utils/index.js.map +1 -0
- package/lib/commonjs/styled.code-workspace +9 -0
- package/lib/module/assets/img/doctor.png +0 -0
- package/lib/module/index.js +23 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package/badge/index.js +151 -0
- package/lib/module/package/badge/index.js.map +1 -0
- package/lib/module/package/button/index.js +89 -0
- package/lib/module/package/button/index.js.map +1 -0
- package/lib/module/package/card/index.js +25 -0
- package/lib/module/package/card/index.js.map +1 -0
- package/lib/module/package/checkBox/index.js +75 -0
- package/lib/module/package/checkBox/index.js.map +1 -0
- package/lib/module/package/cycle/index.js +21 -0
- package/lib/module/package/cycle/index.js.map +1 -0
- package/lib/module/package/dialog/index.js +182 -0
- package/lib/module/package/dialog/index.js.map +1 -0
- package/lib/module/package/dropdown/index.js +106 -0
- package/lib/module/package/dropdown/index.js.map +1 -0
- package/lib/module/package/form/index.js +176 -0
- package/lib/module/package/form/index.js.map +1 -0
- package/lib/module/package/header/index.js +83 -0
- package/lib/module/package/header/index.js.map +1 -0
- package/lib/module/package/image/index.js +115 -0
- package/lib/module/package/image/index.js.map +1 -0
- package/lib/module/package/radioButton/index.js +75 -0
- package/lib/module/package/radioButton/index.js.map +1 -0
- package/lib/module/package/safeAreaView/index.js +11 -0
- package/lib/module/package/safeAreaView/index.js.map +1 -0
- package/lib/module/package/scrollView/index.js +11 -0
- package/lib/module/package/scrollView/index.js.map +1 -0
- package/lib/module/package/separator/index.js +26 -0
- package/lib/module/package/separator/index.js.map +1 -0
- package/lib/module/package/spacer/index.js +11 -0
- package/lib/module/package/spacer/index.js.map +1 -0
- package/lib/module/package/spinner/index.js +36 -0
- package/lib/module/package/spinner/index.js.map +1 -0
- package/lib/module/package/stack/__test__/index.test.js +89 -0
- package/lib/module/package/stack/__test__/index.test.js.map +1 -0
- package/lib/module/package/stack/index.js +36 -0
- package/lib/module/package/stack/index.js.map +1 -0
- package/lib/module/package/styled/__test__/index.test.js +158 -0
- package/lib/module/package/styled/__test__/index.test.js.map +1 -0
- package/lib/module/package/styled/index.js +35 -0
- package/lib/module/package/styled/index.js.map +1 -0
- package/lib/module/package/switch/index.js +36 -0
- package/lib/module/package/switch/index.js.map +1 -0
- package/lib/module/package/text/index.js +68 -0
- package/lib/module/package/text/index.js.map +1 -0
- package/lib/module/package/theme.js +379 -0
- package/lib/module/package/theme.js.map +1 -0
- package/lib/module/package/utils/index.js +120 -0
- package/lib/module/package/utils/index.js.map +1 -0
- package/lib/module/styled.code-workspace +9 -0
- package/package.json +85 -0
- package/src/assets/img/doctor.png +0 -0
- package/src/index.js +23 -0
- package/src/package/badge/index.jsx +133 -0
- package/src/package/button/index.jsx +80 -0
- package/src/package/card/index.jsx +38 -0
- package/src/package/checkBox/index.jsx +80 -0
- package/src/package/cycle/index.jsx +23 -0
- package/src/package/dialog/index.jsx +214 -0
- package/src/package/dropdown/index.jsx +102 -0
- package/src/package/form/index.jsx +145 -0
- package/src/package/header/index.jsx +92 -0
- package/src/package/image/index.jsx +93 -0
- package/src/package/radioButton/index.jsx +81 -0
- package/src/package/safeAreaView/index.jsx +12 -0
- package/src/package/scrollView/index.jsx +12 -0
- package/src/package/separator/index.jsx +26 -0
- package/src/package/spacer/index.jsx +13 -0
- package/src/package/spinner/index.jsx +33 -0
- package/src/package/stack/__test__/index.test.js +68 -0
- package/src/package/stack/index.jsx +37 -0
- package/src/package/styled/__test__/index.test.js +132 -0
- package/src/package/styled/index.js +32 -0
- package/src/package/switch/index.jsx +33 -0
- package/src/package/text/index.jsx +61 -0
- package/src/package/theme.js +376 -0
- package/src/package/utils/index.js +108 -0
- package/src/styled.code-workspace +9 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render } from "@testing-library/react-native";
|
|
4
|
+
import { expect } from '@jest/globals';
|
|
5
|
+
import {styled} from "..";
|
|
6
|
+
import { Text } from "react-native";
|
|
7
|
+
import { theme } from "../../theme";
|
|
8
|
+
|
|
9
|
+
const StyledText = React.forwardRef((props, ref) => <Text {...props} ref={ref} />)
|
|
10
|
+
describe("Fluent Styles", () => {
|
|
11
|
+
it("Base style should render correctly", () => {
|
|
12
|
+
const base = {
|
|
13
|
+
backgroundColor: theme.colors.gray[50],
|
|
14
|
+
paddingHorizontal: 20,
|
|
15
|
+
paddingVertical: 10
|
|
16
|
+
}
|
|
17
|
+
const Text = styled(StyledText, { base, variants: {} });
|
|
18
|
+
const { getByText } = render(<Text>Hello</Text>)
|
|
19
|
+
|
|
20
|
+
expect(getByText("Hello")).toHaveStyle({
|
|
21
|
+
backgroundColor: theme.colors.gray[50],
|
|
22
|
+
paddingHorizontal: 20,
|
|
23
|
+
paddingVertical: 10
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it("Variants style should render correctly", () => {
|
|
28
|
+
const variants = {
|
|
29
|
+
border: {
|
|
30
|
+
true: {
|
|
31
|
+
borderColor: theme.colors.gray[50],
|
|
32
|
+
borderWidth: 1,
|
|
33
|
+
borderRadius: 8
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const Text = styled(StyledText, { base: {}, variants });
|
|
38
|
+
const { getByText } = render(<Text border>Hello</Text>)
|
|
39
|
+
|
|
40
|
+
expect(getByText("Hello")).toHaveStyle({
|
|
41
|
+
borderColor: theme.colors.gray[50],
|
|
42
|
+
borderWidth: 1,
|
|
43
|
+
borderRadius: 8
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("Variants style should not render correctly when variant is not enable", () => {
|
|
48
|
+
const variants = {
|
|
49
|
+
border: {
|
|
50
|
+
true: {
|
|
51
|
+
borderColor: theme.colors.gray[50],
|
|
52
|
+
borderWidth: 1,
|
|
53
|
+
borderRadius: 8
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const Text = styled(StyledText, { base: {}, variants });
|
|
58
|
+
const { getByText } = render(<Text>Hello</Text>)
|
|
59
|
+
|
|
60
|
+
expect(getByText("Hello")).not.toHaveStyle({
|
|
61
|
+
borderColor: theme.colors.gray[50],
|
|
62
|
+
borderWidth: 1,
|
|
63
|
+
borderRadius: 8
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("Variants styles should render correctly with function variant", () => {
|
|
68
|
+
const variants = {
|
|
69
|
+
fontSize: (size) => ({
|
|
70
|
+
fontSize: size
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
const Text = styled(StyledText, { base: {}, variants });
|
|
74
|
+
const { getByText } = render(<Text fontSize={24}>Hello</Text>)
|
|
75
|
+
|
|
76
|
+
expect(getByText("Hello")).toHaveStyle({
|
|
77
|
+
fontSize: 24
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("Variants styles should render correctly with nested variant", () => {
|
|
82
|
+
const base = {
|
|
83
|
+
backgroundColor: theme.colors.blueGray[100]
|
|
84
|
+
};
|
|
85
|
+
const variants = {
|
|
86
|
+
fontsize: (size) => ({
|
|
87
|
+
fontSize: size
|
|
88
|
+
}),
|
|
89
|
+
color: theme.colors
|
|
90
|
+
};
|
|
91
|
+
const Text = styled(StyledText, { base, variants });
|
|
92
|
+
const { getByText } = render(
|
|
93
|
+
<Text fontsize={24} color="gray.100">
|
|
94
|
+
Hello
|
|
95
|
+
</Text>
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
expect(getByText('Hello')).toHaveStyle({
|
|
99
|
+
fontSize: 24,
|
|
100
|
+
color: theme.colors.gray[100],
|
|
101
|
+
backgroundColor: theme.colors.blueGray[100]
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it("Should render prop style correctly", () => {
|
|
106
|
+
const Text = styled(StyledText, { base :{}, variants :{} });
|
|
107
|
+
const { getByText } = render(
|
|
108
|
+
<Text style={{ color: theme.colors.gray[100] }}>
|
|
109
|
+
Hello
|
|
110
|
+
</Text>
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
expect(getByText('Hello')).toHaveStyle({
|
|
114
|
+
color: theme.colors.gray[100]
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it("Should render forwardRef as expected", () => {
|
|
119
|
+
const Text = styled(StyledText, { base: { color: theme.colors.gray[200]}, variants: {} });
|
|
120
|
+
const ref = React.createRef()
|
|
121
|
+
const { getByText } = render(
|
|
122
|
+
<Text ref={ref}>
|
|
123
|
+
Hello
|
|
124
|
+
</Text>
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
const helloText = getByText('Hello');
|
|
128
|
+
expect(helloText).toBeTruthy();
|
|
129
|
+
expect(ref.current).toBeTruthy();
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
const styled = (Component, { base, variants } = {}) => {
|
|
5
|
+
return forwardRef((props, ref) => {
|
|
6
|
+
const styles = { ...(base || {}) };
|
|
7
|
+
const options = props;
|
|
8
|
+
|
|
9
|
+
Object.keys(variants || {}).forEach((category) => {
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
const variantSelected = options[category];
|
|
12
|
+
const variantValue = variants[category];
|
|
13
|
+
|
|
14
|
+
if (typeof variantValue === "function") {
|
|
15
|
+
const style = variantValue(variantSelected, options);
|
|
16
|
+
if (style) {
|
|
17
|
+
Object.assign(styles, style);
|
|
18
|
+
}
|
|
19
|
+
} else if (variantValue && variantValue[variantSelected]) {
|
|
20
|
+
const value = variantValue[variantSelected];
|
|
21
|
+
Object.assign(
|
|
22
|
+
styles,
|
|
23
|
+
typeof value === "function" ? value(options) : value
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return <Component {...props} style={styles} ref={ref} />;
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { styled }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Switch as SwitchSource } from 'react-native'
|
|
3
|
+
import { styled } from '../styled'
|
|
4
|
+
import { theme } from '../theme'
|
|
5
|
+
|
|
6
|
+
const Switch = styled(SwitchSource, {
|
|
7
|
+
base: {
|
|
8
|
+
transform: [{ scaleX: 2 }, { scaleY: 2 }]
|
|
9
|
+
}
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
const StyledSwitch = ({
|
|
13
|
+
trackColorOff = theme.colors.gray[400],
|
|
14
|
+
trackColorOn = theme.colors.green[500],
|
|
15
|
+
thumbColorOff = theme.colors.gray[400],
|
|
16
|
+
thumbColorOn = theme.colors.pink[500],
|
|
17
|
+
isEnabled,
|
|
18
|
+
onChange,
|
|
19
|
+
...rest
|
|
20
|
+
}) => {
|
|
21
|
+
return (
|
|
22
|
+
<Switch
|
|
23
|
+
trackColor={{ false: trackColorOff, true: trackColorOn }}
|
|
24
|
+
thumbColor={isEnabled ? thumbColorOn : thumbColorOff}
|
|
25
|
+
ios_backgroundColor={theme.colors.gray[800]}
|
|
26
|
+
onValueChange={onChange}
|
|
27
|
+
value={isEnabled}
|
|
28
|
+
{...rest}
|
|
29
|
+
/>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { StyledSwitch }
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Text } from 'react-native'
|
|
2
|
+
import { styled } from '../styled'
|
|
3
|
+
import { theme } from '../theme'
|
|
4
|
+
import { isValidColor, isValidNumber, isValidString } from '../utils'
|
|
5
|
+
|
|
6
|
+
const StyledText = styled(Text, {
|
|
7
|
+
base: {
|
|
8
|
+
fontSize: theme.fontSize.normal,
|
|
9
|
+
color: theme.colors.gray[800],
|
|
10
|
+
fontWeight: theme.fontWeight.normal
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
fontWeight: (size = theme.fontWeight.normal) => {
|
|
14
|
+
if (!isValidString(size)) {
|
|
15
|
+
throw new Error('Invalid fontWeight value')
|
|
16
|
+
}
|
|
17
|
+
return { fontWeight: size }
|
|
18
|
+
},
|
|
19
|
+
color: (color = theme.colors.gray[800]) => {
|
|
20
|
+
if (!isValidColor(color)) {
|
|
21
|
+
throw new Error('Invalid color value')
|
|
22
|
+
}
|
|
23
|
+
return { color: color }
|
|
24
|
+
},
|
|
25
|
+
fontSize: (size = theme.fontSize.normal) => {
|
|
26
|
+
if (!isValidNumber(size)) {
|
|
27
|
+
throw new Error('Invalid fontSize value')
|
|
28
|
+
}
|
|
29
|
+
return { fontSize: size }
|
|
30
|
+
},
|
|
31
|
+
textDecorationLine: {
|
|
32
|
+
true: {
|
|
33
|
+
textDecorationLine: 'underline'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
flexWrap: 'wrap',
|
|
37
|
+
selected: {
|
|
38
|
+
true: {
|
|
39
|
+
color: theme.colors.gray[1]
|
|
40
|
+
},
|
|
41
|
+
false: {
|
|
42
|
+
color: theme.colors.gray[800]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
fontFamily: font => {
|
|
46
|
+
if (!font) return
|
|
47
|
+
return {
|
|
48
|
+
fontFamily: font
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
textAlign: (align = 'left') => {
|
|
52
|
+
const validAlignments = ['auto', 'left', 'right', 'center', 'justify']
|
|
53
|
+
if (!validAlignments.includes(align)) {
|
|
54
|
+
throw new Error('Invalid textAlign value')
|
|
55
|
+
}
|
|
56
|
+
return { textAlign: align }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
export { StyledText }
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
/* eslint-disable prettier/prettier */
|
|
2
|
+
|
|
3
|
+
const palettes = {
|
|
4
|
+
white: '#FFFFFF',
|
|
5
|
+
black: '#000000',
|
|
6
|
+
lightText: '#FFFFFF',
|
|
7
|
+
darkText: '#000000',
|
|
8
|
+
transparent: 'rgba(0, 0, 0, 0)',
|
|
9
|
+
rose: {
|
|
10
|
+
50: '#fff1f2',
|
|
11
|
+
100: '#ffe4e6',
|
|
12
|
+
200: '#fecdd3',
|
|
13
|
+
300: '#fda4af',
|
|
14
|
+
400: '#fb7185',
|
|
15
|
+
500: '#f43f5e',
|
|
16
|
+
600: '#e11d48',
|
|
17
|
+
700: '#be123c',
|
|
18
|
+
800: '#9f1239',
|
|
19
|
+
900: '#881337'
|
|
20
|
+
},
|
|
21
|
+
pink: {
|
|
22
|
+
50: '#fdf2f8',
|
|
23
|
+
100: '#fce7f3',
|
|
24
|
+
200: '#fbcfe8',
|
|
25
|
+
300: '#f9a8d4',
|
|
26
|
+
400: '#f472b6',
|
|
27
|
+
500: '#ec4899',
|
|
28
|
+
600: '#db2777',
|
|
29
|
+
700: '#be185d',
|
|
30
|
+
800: '#9d174d',
|
|
31
|
+
900: '#831843'
|
|
32
|
+
},
|
|
33
|
+
fuchsia: {
|
|
34
|
+
50: '#fdf4ff',
|
|
35
|
+
100: '#fae8ff',
|
|
36
|
+
200: '#f5d0fe',
|
|
37
|
+
300: '#f0abfc',
|
|
38
|
+
400: '#e879f9',
|
|
39
|
+
500: '#d946ef',
|
|
40
|
+
600: '#c026d3',
|
|
41
|
+
700: '#a21caf',
|
|
42
|
+
800: '#86198f',
|
|
43
|
+
900: '#701a75'
|
|
44
|
+
},
|
|
45
|
+
purple: {
|
|
46
|
+
50: '#faf5ff',
|
|
47
|
+
100: '#f3e8ff',
|
|
48
|
+
200: '#e9d5ff',
|
|
49
|
+
300: '#d8b4fe',
|
|
50
|
+
400: '#c084fc',
|
|
51
|
+
500: '#a855f7',
|
|
52
|
+
600: '#9333ea',
|
|
53
|
+
700: '#7e22ce',
|
|
54
|
+
800: '#6b21a8',
|
|
55
|
+
900: '#581c87'
|
|
56
|
+
},
|
|
57
|
+
violet: {
|
|
58
|
+
50: '#f5f3ff',
|
|
59
|
+
100: '#ede9fe',
|
|
60
|
+
200: '#ddd6fe',
|
|
61
|
+
300: '#c4b5fd',
|
|
62
|
+
400: '#a78bfa',
|
|
63
|
+
500: '#8b5cf6',
|
|
64
|
+
600: '#7c3aed',
|
|
65
|
+
700: '#6d28d9',
|
|
66
|
+
800: '#5b21b6',
|
|
67
|
+
900: '#4c1d95'
|
|
68
|
+
},
|
|
69
|
+
indigo: {
|
|
70
|
+
50: '#eef2ff',
|
|
71
|
+
100: '#e0e7ff',
|
|
72
|
+
200: '#c7d2fe',
|
|
73
|
+
300: '#a5b4fc',
|
|
74
|
+
400: '#818cf8',
|
|
75
|
+
500: '#6366f1',
|
|
76
|
+
600: '#4f46e5',
|
|
77
|
+
700: '#4338ca',
|
|
78
|
+
800: '#3730a3',
|
|
79
|
+
900: '#312e81'
|
|
80
|
+
},
|
|
81
|
+
blue: {
|
|
82
|
+
50: '#eff6ff',
|
|
83
|
+
100: '#dbeafe',
|
|
84
|
+
200: '#bfdbfe',
|
|
85
|
+
300: '#93c5fd',
|
|
86
|
+
400: '#60a5fa',
|
|
87
|
+
500: '#3b82f6',
|
|
88
|
+
600: '#2563eb',
|
|
89
|
+
700: '#1d4ed8',
|
|
90
|
+
800: '#1e40af',
|
|
91
|
+
900: '#1e3a8a'
|
|
92
|
+
},
|
|
93
|
+
lightBlue: {
|
|
94
|
+
50: '#f0f9ff',
|
|
95
|
+
100: '#e0f2fe',
|
|
96
|
+
200: '#bae6fd',
|
|
97
|
+
300: '#7dd3fc',
|
|
98
|
+
400: '#38bdf8',
|
|
99
|
+
500: '#0ea5e9',
|
|
100
|
+
600: '#0284c7',
|
|
101
|
+
700: '#0369a1',
|
|
102
|
+
800: '#075985',
|
|
103
|
+
900: '#0c4a6e'
|
|
104
|
+
},
|
|
105
|
+
darkBlue: {
|
|
106
|
+
50: '#dbf4ff',
|
|
107
|
+
100: '#addbff',
|
|
108
|
+
200: '#7cc2ff',
|
|
109
|
+
300: '#4aa9ff',
|
|
110
|
+
400: '#1a91ff',
|
|
111
|
+
500: '#0077e6',
|
|
112
|
+
600: '#005db4',
|
|
113
|
+
700: '#004282',
|
|
114
|
+
800: '#002851',
|
|
115
|
+
900: '#000e21'
|
|
116
|
+
},
|
|
117
|
+
cyan: {
|
|
118
|
+
50: '#ecfeff',
|
|
119
|
+
100: '#cffafe',
|
|
120
|
+
200: '#a5f3fc',
|
|
121
|
+
300: '#67e8f9',
|
|
122
|
+
400: '#22d3ee',
|
|
123
|
+
500: '#06b6d4',
|
|
124
|
+
600: '#0891b2',
|
|
125
|
+
700: '#0e7490',
|
|
126
|
+
800: '#155e75',
|
|
127
|
+
900: '#164e63'
|
|
128
|
+
},
|
|
129
|
+
teal: {
|
|
130
|
+
50: '#f0fdfa',
|
|
131
|
+
100: '#ccfbf1',
|
|
132
|
+
200: '#99f6e4',
|
|
133
|
+
300: '#5eead4',
|
|
134
|
+
400: '#2dd4bf',
|
|
135
|
+
500: '#14b8a6',
|
|
136
|
+
600: '#0d9488',
|
|
137
|
+
700: '#0f766e',
|
|
138
|
+
800: '#115e59',
|
|
139
|
+
900: '#134e4a'
|
|
140
|
+
},
|
|
141
|
+
emerald: {
|
|
142
|
+
50: '#ecfdf5',
|
|
143
|
+
100: '#d1fae5',
|
|
144
|
+
200: '#a7f3d0',
|
|
145
|
+
300: '#6ee7b7',
|
|
146
|
+
400: '#34d399',
|
|
147
|
+
500: '#10b981',
|
|
148
|
+
600: '#059669',
|
|
149
|
+
700: '#047857',
|
|
150
|
+
800: '#065f46',
|
|
151
|
+
900: '#064e3b'
|
|
152
|
+
},
|
|
153
|
+
green: {
|
|
154
|
+
50: '#f0fdf4',
|
|
155
|
+
100: '#dcfce7',
|
|
156
|
+
200: '#bbf7d0',
|
|
157
|
+
300: '#86efac',
|
|
158
|
+
400: '#4ade80',
|
|
159
|
+
500: '#22c55e',
|
|
160
|
+
600: '#16a34a',
|
|
161
|
+
700: '#15803d',
|
|
162
|
+
800: '#166534',
|
|
163
|
+
900: '#14532d'
|
|
164
|
+
},
|
|
165
|
+
lime: {
|
|
166
|
+
50: '#f7fee7',
|
|
167
|
+
100: '#ecfccb',
|
|
168
|
+
200: '#d9f99d',
|
|
169
|
+
300: '#bef264',
|
|
170
|
+
400: '#a3e635',
|
|
171
|
+
500: '#84cc16',
|
|
172
|
+
600: '#65a30d',
|
|
173
|
+
700: '#4d7c0f',
|
|
174
|
+
800: '#3f6212',
|
|
175
|
+
900: '#365314'
|
|
176
|
+
},
|
|
177
|
+
yellow: {
|
|
178
|
+
50: '#fefce8',
|
|
179
|
+
100: '#fef9c3',
|
|
180
|
+
200: '#fef08a',
|
|
181
|
+
300: '#fde047',
|
|
182
|
+
400: '#facc15',
|
|
183
|
+
500: '#eab308',
|
|
184
|
+
600: '#ca8a04',
|
|
185
|
+
700: '#a16207',
|
|
186
|
+
800: '#854d0e',
|
|
187
|
+
900: '#713f12'
|
|
188
|
+
},
|
|
189
|
+
amber: {
|
|
190
|
+
50: '#fffbeb',
|
|
191
|
+
100: '#fef3c7',
|
|
192
|
+
200: '#fde68a',
|
|
193
|
+
300: '#fcd34d',
|
|
194
|
+
400: '#fbbf24',
|
|
195
|
+
500: '#f59e0b',
|
|
196
|
+
600: '#d97706',
|
|
197
|
+
700: '#b45309',
|
|
198
|
+
800: '#92400e',
|
|
199
|
+
900: '#78350f'
|
|
200
|
+
},
|
|
201
|
+
orange: {
|
|
202
|
+
50: '#fff7ed',
|
|
203
|
+
100: '#ffedd5',
|
|
204
|
+
200: '#fed7aa',
|
|
205
|
+
300: '#fdba74',
|
|
206
|
+
400: '#fb923c',
|
|
207
|
+
500: '#f97316',
|
|
208
|
+
600: '#ea580c',
|
|
209
|
+
700: '#c2410c',
|
|
210
|
+
800: '#9a3412',
|
|
211
|
+
900: '#7c2d12'
|
|
212
|
+
},
|
|
213
|
+
red: {
|
|
214
|
+
50: '#fef2f2',
|
|
215
|
+
100: '#fee2e2',
|
|
216
|
+
200: '#fecaca',
|
|
217
|
+
300: '#fca5a5',
|
|
218
|
+
400: '#f87171',
|
|
219
|
+
500: '#ef4444',
|
|
220
|
+
600: '#dc2626',
|
|
221
|
+
700: '#b91c1c',
|
|
222
|
+
800: '#991b1b',
|
|
223
|
+
900: '#7f1d1d'
|
|
224
|
+
},
|
|
225
|
+
warmGray: {
|
|
226
|
+
50: '#fafaf9',
|
|
227
|
+
100: '#f5f5f4',
|
|
228
|
+
200: '#e7e5e4',
|
|
229
|
+
300: '#d6d3d1',
|
|
230
|
+
400: '#a8a29e',
|
|
231
|
+
500: '#78716c',
|
|
232
|
+
600: '#57534e',
|
|
233
|
+
700: '#44403c',
|
|
234
|
+
800: '#292524',
|
|
235
|
+
900: '#1c1917'
|
|
236
|
+
},
|
|
237
|
+
trueGray: {
|
|
238
|
+
50: '#fafafa',
|
|
239
|
+
100: '#f5f5f5',
|
|
240
|
+
200: '#e5e5e5',
|
|
241
|
+
300: '#d4d4d4',
|
|
242
|
+
400: '#a3a3a3',
|
|
243
|
+
500: '#737373',
|
|
244
|
+
600: '#525252',
|
|
245
|
+
700: '#404040',
|
|
246
|
+
800: '#262626',
|
|
247
|
+
900: '#171717'
|
|
248
|
+
},
|
|
249
|
+
gray: {
|
|
250
|
+
1: '#FFFFFF',
|
|
251
|
+
50: '#fafafa',
|
|
252
|
+
100: '#f4f4f5',
|
|
253
|
+
200: '#e4e4e7',
|
|
254
|
+
300: '#d4d4d8',
|
|
255
|
+
400: '#a1a1aa',
|
|
256
|
+
500: '#71717a',
|
|
257
|
+
600: '#52525b',
|
|
258
|
+
700: '#3f3f46',
|
|
259
|
+
800: '#27272a',
|
|
260
|
+
900: '#18181b'
|
|
261
|
+
},
|
|
262
|
+
coolGray: {
|
|
263
|
+
50: '#f9fafb',
|
|
264
|
+
100: '#f3f4f6',
|
|
265
|
+
200: '#e5e7eb',
|
|
266
|
+
300: '#d1d5db',
|
|
267
|
+
400: '#9ca3af',
|
|
268
|
+
500: '#6b7280',
|
|
269
|
+
600: '#4b5563',
|
|
270
|
+
700: '#374151',
|
|
271
|
+
800: '#1f2937',
|
|
272
|
+
900: '#111827'
|
|
273
|
+
},
|
|
274
|
+
blueGray: {
|
|
275
|
+
50: '#f8fafc',
|
|
276
|
+
100: '#f1f5f9',
|
|
277
|
+
200: '#e2e8f0',
|
|
278
|
+
300: '#cbd5e1',
|
|
279
|
+
400: '#94a3b8',
|
|
280
|
+
500: '#64748b',
|
|
281
|
+
600: '#475569',
|
|
282
|
+
700: '#334155',
|
|
283
|
+
800: '#1e293b',
|
|
284
|
+
900: '#0f172a'
|
|
285
|
+
},
|
|
286
|
+
dark: {
|
|
287
|
+
50: '#18181b',
|
|
288
|
+
100: '#27272a',
|
|
289
|
+
200: '#3f3f46',
|
|
290
|
+
300: '#52525b',
|
|
291
|
+
400: '#71717a',
|
|
292
|
+
500: '#a1a1aa',
|
|
293
|
+
600: '#d4d4d8',
|
|
294
|
+
700: '#e4e4e7',
|
|
295
|
+
800: '#f4f4f5',
|
|
296
|
+
900: '#fafafa'
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const darkColors = {
|
|
301
|
+
button_hover: palettes.indigo[600],
|
|
302
|
+
button_primary: palettes.indigo[500],
|
|
303
|
+
cardBg: palettes.coolGray[800],
|
|
304
|
+
textColor: palettes.coolGray[50],
|
|
305
|
+
borderColor: palettes.coolGray[50],
|
|
306
|
+
shadowColor: palettes.coolGray[50],
|
|
307
|
+
hover: palettes.blue[800],
|
|
308
|
+
pressed: palettes.blue[900],
|
|
309
|
+
pressed_secondary: palettes.blue[400],
|
|
310
|
+
|
|
311
|
+
primary: palettes.blue[400]
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
const lightColors = {
|
|
315
|
+
primary: palettes.amber[500],
|
|
316
|
+
|
|
317
|
+
button_hover: palettes.indigo[700],
|
|
318
|
+
button_primary: palettes.indigo[600],
|
|
319
|
+
cardBg: palettes.coolGray[50],
|
|
320
|
+
textColor: palettes.coolGray[900],
|
|
321
|
+
borderColor: palettes.coolGray[900],
|
|
322
|
+
shadowColor: palettes.coolGray[900],
|
|
323
|
+
hover: palettes.blue[100],
|
|
324
|
+
pressed: palettes.blue[200],
|
|
325
|
+
pressed_secondary: palettes.blue[400]
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
const theme = {
|
|
329
|
+
colors: {
|
|
330
|
+
...palettes,
|
|
331
|
+
...lightColors
|
|
332
|
+
},
|
|
333
|
+
space: {
|
|
334
|
+
'0': 0,
|
|
335
|
+
'1': 1,
|
|
336
|
+
'2': 2,
|
|
337
|
+
'4': 4,
|
|
338
|
+
'8': 8,
|
|
339
|
+
'16': 16,
|
|
340
|
+
'32': 32,
|
|
341
|
+
'64': 64,
|
|
342
|
+
'128': 128
|
|
343
|
+
},
|
|
344
|
+
fontWeight: {
|
|
345
|
+
thin: '100',
|
|
346
|
+
extraLight: '200',
|
|
347
|
+
light: '300',
|
|
348
|
+
normal: '400',
|
|
349
|
+
medium: '500',
|
|
350
|
+
semiBold: '600',
|
|
351
|
+
bold: '700',
|
|
352
|
+
extraBold: '800',
|
|
353
|
+
black: '900'
|
|
354
|
+
},
|
|
355
|
+
fontSize: {
|
|
356
|
+
base: 8,
|
|
357
|
+
nano: 10,
|
|
358
|
+
micro: 12,
|
|
359
|
+
small: 14,
|
|
360
|
+
medium: 16,
|
|
361
|
+
normal: 18,
|
|
362
|
+
large: 20,
|
|
363
|
+
xlarge: 22,
|
|
364
|
+
xxlarge: 26,
|
|
365
|
+
xxxlarge: 30,
|
|
366
|
+
splash: 40
|
|
367
|
+
},
|
|
368
|
+
textAlign: {
|
|
369
|
+
left: { textAlign: 'left' },
|
|
370
|
+
right: { textAlign: 'right' },
|
|
371
|
+
center: { textAlign: 'center' },
|
|
372
|
+
justify: { textAlign: 'justify' }
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export { theme, lightColors, darkColors, palettes }
|