cherry-styled-components 0.1.13 → 0.1.14
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/dist/box.js +20 -11
- package/dist/button.js +80 -150
- package/dist/col.js +26 -18
- package/dist/container.js +32 -30
- package/dist/flex.js +39 -34
- package/dist/grid.js +36 -33
- package/dist/icon.js +14 -23
- package/dist/index.js +9 -76
- package/dist/input.js +136 -312
- package/dist/max-width.js +41 -26
- package/dist/range.js +74 -141
- package/dist/select.js +56 -100
- package/dist/space.js +38 -24
- package/dist/styled-components/registry.js +17 -19
- package/dist/styled-components/theme-provider.js +27 -31
- package/dist/textarea.js +49 -73
- package/dist/toggle.js +66 -121
- package/dist/utils/global.js +11 -92
- package/dist/utils/icons.js +66 -77
- package/dist/utils/mixins.js +41 -83
- package/dist/utils/theme.js +265 -142
- package/dist/utils/typography.js +31 -49
- package/package.json +10 -9
- /package/dist/{App.d.ts → src/App.d.ts} +0 -0
- /package/dist/{lib → src/lib}/box.d.ts +0 -0
- /package/dist/{lib → src/lib}/button.d.ts +0 -0
- /package/dist/{lib → src/lib}/col.d.ts +0 -0
- /package/dist/{lib → src/lib}/container.d.ts +0 -0
- /package/dist/{lib → src/lib}/flex.d.ts +0 -0
- /package/dist/{lib → src/lib}/grid.d.ts +0 -0
- /package/dist/{lib → src/lib}/icon.d.ts +0 -0
- /package/dist/{lib → src/lib}/index.d.ts +0 -0
- /package/dist/{lib → src/lib}/input.d.ts +0 -0
- /package/dist/{lib → src/lib}/max-width.d.ts +0 -0
- /package/dist/{lib → src/lib}/range.d.ts +0 -0
- /package/dist/{lib → src/lib}/select.d.ts +0 -0
- /package/dist/{lib → src/lib}/space.d.ts +0 -0
- /package/dist/{lib → src/lib}/styled-components/index.d.ts +0 -0
- /package/dist/{lib → src/lib}/styled-components/registry.d.ts +0 -0
- /package/dist/{lib → src/lib}/styled-components/theme-provider.d.ts +0 -0
- /package/dist/{lib → src/lib}/textarea.d.ts +0 -0
- /package/dist/{lib → src/lib}/toggle.d.ts +0 -0
- /package/dist/{lib → src/lib}/utils/global.d.ts +0 -0
- /package/dist/{lib → src/lib}/utils/icons.d.ts +0 -0
- /package/dist/{lib → src/lib}/utils/index.d.ts +0 -0
- /package/dist/{lib → src/lib}/utils/mixins.d.ts +0 -0
- /package/dist/{lib → src/lib}/utils/theme.d.ts +0 -0
- /package/dist/{lib → src/lib}/utils/typography.d.ts +0 -0
- /package/dist/{main.d.ts → src/main.d.ts} +0 -0
- /package/dist/{toggle-theme.d.ts → src/toggle-theme.d.ts} +0 -0
package/dist/utils/mixins.js
CHANGED
|
@@ -1,88 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
"use client";
|
|
3
3
|
import { mq } from "./theme.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
margin: 0;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
outline: none;
|
|
13
|
-
`;
|
|
14
|
-
const resetInput = css`
|
|
15
|
-
cursor: text;
|
|
16
|
-
min-width: 100px;
|
|
17
|
-
`;
|
|
18
|
-
const fullWidthStyles = (fullWidth) => {
|
|
19
|
-
if (fullWidth) {
|
|
20
|
-
return css`
|
|
21
|
-
width: 100%;
|
|
22
|
-
`;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
const statusBorderStyles = ($error, $success, theme) => {
|
|
26
|
-
if ($error) {
|
|
27
|
-
return css`
|
|
28
|
-
border-color: ${theme?.colors.error};
|
|
29
|
-
`;
|
|
30
|
-
}
|
|
31
|
-
if ($success) {
|
|
32
|
-
return css`
|
|
33
|
-
border-color: ${theme?.colors.success};
|
|
34
|
-
`;
|
|
35
|
-
}
|
|
4
|
+
import { css } from "styled-components";
|
|
5
|
+
//#region src/lib/utils/mixins.tsx
|
|
6
|
+
var resetButton = css([`box-sizing:border-box;appearance:none;border:none;background:none;padding:0;margin:0;cursor:pointer;outline:none;`]);
|
|
7
|
+
var resetInput = css([`cursor:text;min-width:100px;`]);
|
|
8
|
+
var fullWidthStyles = (fullWidth) => {
|
|
9
|
+
if (fullWidth) return css([`width:100%;`]);
|
|
36
10
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
height: 60px;
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
if ($size === "small") {
|
|
44
|
-
return css`
|
|
45
|
-
height: 40px;
|
|
46
|
-
`;
|
|
47
|
-
}
|
|
48
|
-
return css`
|
|
49
|
-
height: 50px;
|
|
50
|
-
`;
|
|
11
|
+
var statusBorderStyles = ($error, $success, theme) => {
|
|
12
|
+
if ($error) return css([`border-color:`, `;`], theme?.colors.error);
|
|
13
|
+
if ($success) return css([`border-color:`, `;`], theme?.colors.success);
|
|
51
14
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
`;
|
|
57
|
-
const generateColsStyles = (size, cols) => css`
|
|
58
|
-
${mq(size)} {
|
|
59
|
-
grid-template-columns: repeat(${cols || 3}, minmax(0, 1fr));
|
|
60
|
-
}
|
|
61
|
-
`;
|
|
62
|
-
const generateColSpanStyles = (size, span) => css`
|
|
63
|
-
${mq(size)} {
|
|
64
|
-
grid-column: span ${span};
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
const generatePaddingStyles = (size, padding) => css`
|
|
68
|
-
${mq(size)} {
|
|
69
|
-
padding: ${padding === "none" ? "0" : `${padding}px`};
|
|
70
|
-
}
|
|
71
|
-
`;
|
|
72
|
-
const generateJustifyContentStyles = (size, justifyContent) => css`
|
|
73
|
-
${mq(size)} {
|
|
74
|
-
justify-content: ${justifyContent && `${justifyContent}`};
|
|
75
|
-
}
|
|
76
|
-
`;
|
|
77
|
-
export {
|
|
78
|
-
formElementHeightStyles,
|
|
79
|
-
fullWidthStyles,
|
|
80
|
-
generateColSpanStyles,
|
|
81
|
-
generateColsStyles,
|
|
82
|
-
generateGapStyles,
|
|
83
|
-
generateJustifyContentStyles,
|
|
84
|
-
generatePaddingStyles,
|
|
85
|
-
resetButton,
|
|
86
|
-
resetInput,
|
|
87
|
-
statusBorderStyles
|
|
15
|
+
var formElementHeightStyles = ($size) => {
|
|
16
|
+
if ($size === "big") return css([`height:60px;`]);
|
|
17
|
+
if ($size === "small") return css([`height:40px;`]);
|
|
18
|
+
return css([`height:50px;`]);
|
|
88
19
|
};
|
|
20
|
+
var generateGapStyles = (size, gap) => css([
|
|
21
|
+
``,
|
|
22
|
+
`{gap:`,
|
|
23
|
+
`;}`
|
|
24
|
+
], mq(size), gap === "none" ? "0" : `${gap}px`);
|
|
25
|
+
var generateColsStyles = (size, cols) => css([
|
|
26
|
+
``,
|
|
27
|
+
`{grid-template-columns:repeat(`,
|
|
28
|
+
`,minmax(0,1fr));}`
|
|
29
|
+
], mq(size), cols || 3);
|
|
30
|
+
var generateColSpanStyles = (size, span) => css([
|
|
31
|
+
``,
|
|
32
|
+
`{grid-column:span `,
|
|
33
|
+
`;}`
|
|
34
|
+
], mq(size), span);
|
|
35
|
+
var generatePaddingStyles = (size, padding) => css([
|
|
36
|
+
``,
|
|
37
|
+
`{padding:`,
|
|
38
|
+
`;}`
|
|
39
|
+
], mq(size), padding === "none" ? "0" : `${padding}px`);
|
|
40
|
+
var generateJustifyContentStyles = (size, justifyContent) => css([
|
|
41
|
+
``,
|
|
42
|
+
`{justify-content:`,
|
|
43
|
+
`;}`
|
|
44
|
+
], mq(size), justifyContent && `${justifyContent}`);
|
|
45
|
+
//#endregion
|
|
46
|
+
export { formElementHeightStyles, fullWidthStyles, generateColSpanStyles, generateColsStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, resetButton, resetInput, statusBorderStyles };
|
package/dist/utils/theme.js
CHANGED
|
@@ -1,156 +1,279 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
"use client";
|
|
3
|
+
//#region src/lib/utils/theme.ts
|
|
4
|
+
var breakpoints = {
|
|
5
|
+
xs: 0,
|
|
6
|
+
sm: 576,
|
|
7
|
+
md: 768,
|
|
8
|
+
lg: 992,
|
|
9
|
+
xl: 1200,
|
|
10
|
+
xxl: 1440,
|
|
11
|
+
xxxl: 1920
|
|
10
12
|
};
|
|
11
13
|
function mq(minWidth) {
|
|
12
|
-
|
|
14
|
+
return `@media screen and (min-width: ${breakpoints[minWidth]}px)`;
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
grayDark: "#4b5563",
|
|
33
|
-
success: "#84cc16",
|
|
34
|
-
error: "#ef4444",
|
|
35
|
-
warning: "#eab308",
|
|
36
|
-
info: "#06b6d4",
|
|
37
|
-
dark: "#000000",
|
|
38
|
-
light: "#ffffff"
|
|
16
|
+
var spacing = {
|
|
17
|
+
maxWidth: {
|
|
18
|
+
xs: "1280px",
|
|
19
|
+
xxxl: "1440px"
|
|
20
|
+
},
|
|
21
|
+
padding: {
|
|
22
|
+
xs: "20px",
|
|
23
|
+
lg: "40px"
|
|
24
|
+
},
|
|
25
|
+
radius: {
|
|
26
|
+
xs: "6px",
|
|
27
|
+
lg: "12px",
|
|
28
|
+
xl: "30px"
|
|
29
|
+
},
|
|
30
|
+
gridGap: {
|
|
31
|
+
xs: "20px",
|
|
32
|
+
lg: "40px"
|
|
33
|
+
}
|
|
39
34
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
35
|
+
var colors = {
|
|
36
|
+
primaryLight: "#91aec4",
|
|
37
|
+
primary: "#4d6f8b",
|
|
38
|
+
primaryDark: "#194569",
|
|
39
|
+
secondaryLight: "#a4b17b",
|
|
40
|
+
secondary: "#5c6e46",
|
|
41
|
+
secondaryDark: "#354c2b",
|
|
42
|
+
tertiaryLight: "#ebccb9",
|
|
43
|
+
tertiary: "#816b5a",
|
|
44
|
+
tertiaryDark: "#675445",
|
|
45
|
+
grayLight: "#e5e7eb",
|
|
46
|
+
gray: "#9ca3af",
|
|
47
|
+
grayDark: "#4b5563",
|
|
48
|
+
success: "#84cc16",
|
|
49
|
+
error: "#ef4444",
|
|
50
|
+
warning: "#eab308",
|
|
51
|
+
info: "#06b6d4",
|
|
52
|
+
dark: "#000000",
|
|
53
|
+
light: "#ffffff"
|
|
59
54
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
var colorsDark = {
|
|
56
|
+
primaryLight: "#79C5FF",
|
|
57
|
+
primary: "#6198C6",
|
|
58
|
+
primaryDark: "#339DF4",
|
|
59
|
+
secondaryLight: "#a4b17b",
|
|
60
|
+
secondary: "#5c6e46",
|
|
61
|
+
secondaryDark: "#354c2b",
|
|
62
|
+
tertiaryLight: "#ebccb9",
|
|
63
|
+
tertiary: "#816b5a",
|
|
64
|
+
tertiaryDark: "#675445",
|
|
65
|
+
grayLight: "#1a1a1a",
|
|
66
|
+
gray: "#454444",
|
|
67
|
+
grayDark: "#808080",
|
|
68
|
+
success: "#84cc16",
|
|
69
|
+
error: "#ef4444",
|
|
70
|
+
warning: "#eab308",
|
|
71
|
+
info: "#06b6d4",
|
|
72
|
+
dark: "#ffffff",
|
|
73
|
+
light: "#000000"
|
|
66
74
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
var shadows = {
|
|
76
|
+
xs: "0px 4px 4px 0px rgba(18, 18, 18, 0.04), 0px 1px 3px 0px rgba(39, 41, 45, 0.02)",
|
|
77
|
+
sm: "0px 4px 4px 0px rgba(18, 18, 18, 0.08), 0px 1px 3px 0px rgba(39, 41, 45, 0.04)",
|
|
78
|
+
md: "0px 8px 8px 0px rgba(18, 18, 18, 0.16), 0px 2px 3px 0px rgba(39, 41, 45, 0.06)",
|
|
79
|
+
lg: "0px 16px 24px 0px rgba(18, 18, 18, 0.20), 0px 2px 3px 0px rgba(39, 41, 45, 0.08)",
|
|
80
|
+
xl: "0px 24px 32px 0px rgba(18, 18, 18, 0.24), 0px 2px 3px 0px rgba(39, 41, 45, 0.12)"
|
|
73
81
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
var shadowsDark = {
|
|
83
|
+
xs: "0px 4px 4px 0px rgba(255, 255, 255, 0.04), 0px 1px 3px 0px rgba(255, 255, 255, 0.02)",
|
|
84
|
+
sm: "0px 4px 4px 0px rgba(255, 255, 255, 0.08), 0px 1px 3px 0px rgba(255, 255, 255, 0.04)",
|
|
85
|
+
md: "0px 8px 8px 0px rgba(255, 255, 255, 0.16), 0px 2px 3px 0px rgba(255, 255, 255, 0.06)",
|
|
86
|
+
lg: "0px 16px 24px 0px rgba(255, 255, 255, 0.20), 0px 2px 3px 0px rgba(255, 255, 255, 0.08)",
|
|
87
|
+
xl: "0px 24px 32px 0px rgba(255, 255, 255, 0.24), 0px 2px 3px 0px rgba(255, 255, 255, 0.12)"
|
|
78
88
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
h1: { xs: "40px", lg: "60px" },
|
|
84
|
-
h2: { xs: "30px", lg: "36px" },
|
|
85
|
-
h3: { xs: "28px", lg: "30px" },
|
|
86
|
-
h4: { xs: "26px", lg: "24px" },
|
|
87
|
-
h5: { xs: "18px", lg: "20px" },
|
|
88
|
-
h6: { xs: "16px", lg: "18px" },
|
|
89
|
-
text: { xs: "14px", lg: "16px" },
|
|
90
|
-
strong: { xs: "14px", lg: "16px" },
|
|
91
|
-
small: { xs: "12px", lg: "14px" },
|
|
92
|
-
blockquote: { xs: "16px", lg: "18px" },
|
|
93
|
-
code: { xs: "14px", lg: "16px" },
|
|
94
|
-
button: { xs: "16px", lg: "16px" },
|
|
95
|
-
buttonBig: { xs: "18px", lg: "18px" },
|
|
96
|
-
buttonSmall: { xs: "14px", lg: "14px" },
|
|
97
|
-
input: { xs: "16px", lg: "16px" },
|
|
98
|
-
inputBig: { xs: "18px", lg: "18px" },
|
|
99
|
-
inputSmall: { xs: "14px", lg: "14px" }
|
|
89
|
+
var fonts = {
|
|
90
|
+
text: "Inter",
|
|
91
|
+
head: "Inter",
|
|
92
|
+
mono: "monospace"
|
|
100
93
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
94
|
+
var fontSizes = {
|
|
95
|
+
hero1: {
|
|
96
|
+
xs: "72px",
|
|
97
|
+
lg: "128px"
|
|
98
|
+
},
|
|
99
|
+
hero2: {
|
|
100
|
+
xs: "60px",
|
|
101
|
+
lg: "96px"
|
|
102
|
+
},
|
|
103
|
+
hero3: {
|
|
104
|
+
xs: "36px",
|
|
105
|
+
lg: "72px"
|
|
106
|
+
},
|
|
107
|
+
h1: {
|
|
108
|
+
xs: "40px",
|
|
109
|
+
lg: "60px"
|
|
110
|
+
},
|
|
111
|
+
h2: {
|
|
112
|
+
xs: "30px",
|
|
113
|
+
lg: "36px"
|
|
114
|
+
},
|
|
115
|
+
h3: {
|
|
116
|
+
xs: "28px",
|
|
117
|
+
lg: "30px"
|
|
118
|
+
},
|
|
119
|
+
h4: {
|
|
120
|
+
xs: "26px",
|
|
121
|
+
lg: "24px"
|
|
122
|
+
},
|
|
123
|
+
h5: {
|
|
124
|
+
xs: "18px",
|
|
125
|
+
lg: "20px"
|
|
126
|
+
},
|
|
127
|
+
h6: {
|
|
128
|
+
xs: "16px",
|
|
129
|
+
lg: "18px"
|
|
130
|
+
},
|
|
131
|
+
text: {
|
|
132
|
+
xs: "14px",
|
|
133
|
+
lg: "16px"
|
|
134
|
+
},
|
|
135
|
+
strong: {
|
|
136
|
+
xs: "14px",
|
|
137
|
+
lg: "16px"
|
|
138
|
+
},
|
|
139
|
+
small: {
|
|
140
|
+
xs: "12px",
|
|
141
|
+
lg: "14px"
|
|
142
|
+
},
|
|
143
|
+
blockquote: {
|
|
144
|
+
xs: "16px",
|
|
145
|
+
lg: "18px"
|
|
146
|
+
},
|
|
147
|
+
code: {
|
|
148
|
+
xs: "14px",
|
|
149
|
+
lg: "16px"
|
|
150
|
+
},
|
|
151
|
+
button: {
|
|
152
|
+
xs: "16px",
|
|
153
|
+
lg: "16px"
|
|
154
|
+
},
|
|
155
|
+
buttonBig: {
|
|
156
|
+
xs: "18px",
|
|
157
|
+
lg: "18px"
|
|
158
|
+
},
|
|
159
|
+
buttonSmall: {
|
|
160
|
+
xs: "14px",
|
|
161
|
+
lg: "14px"
|
|
162
|
+
},
|
|
163
|
+
input: {
|
|
164
|
+
xs: "16px",
|
|
165
|
+
lg: "16px"
|
|
166
|
+
},
|
|
167
|
+
inputBig: {
|
|
168
|
+
xs: "18px",
|
|
169
|
+
lg: "18px"
|
|
170
|
+
},
|
|
171
|
+
inputSmall: {
|
|
172
|
+
xs: "14px",
|
|
173
|
+
lg: "14px"
|
|
174
|
+
}
|
|
122
175
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
176
|
+
var lineHeights = {
|
|
177
|
+
hero1: {
|
|
178
|
+
xs: "1.10",
|
|
179
|
+
lg: "1.10"
|
|
180
|
+
},
|
|
181
|
+
hero2: {
|
|
182
|
+
xs: "1.10",
|
|
183
|
+
lg: "1.10"
|
|
184
|
+
},
|
|
185
|
+
hero3: {
|
|
186
|
+
xs: "1.20",
|
|
187
|
+
lg: "1.10"
|
|
188
|
+
},
|
|
189
|
+
h1: {
|
|
190
|
+
xs: "1.50",
|
|
191
|
+
lg: "1.40"
|
|
192
|
+
},
|
|
193
|
+
h2: {
|
|
194
|
+
xs: "1.50",
|
|
195
|
+
lg: "1.50"
|
|
196
|
+
},
|
|
197
|
+
h3: {
|
|
198
|
+
xs: "1.30",
|
|
199
|
+
lg: "1.50"
|
|
200
|
+
},
|
|
201
|
+
h4: {
|
|
202
|
+
xs: "1.30",
|
|
203
|
+
lg: "1.50"
|
|
204
|
+
},
|
|
205
|
+
h5: {
|
|
206
|
+
xs: "1.60",
|
|
207
|
+
lg: "1.50"
|
|
208
|
+
},
|
|
209
|
+
h6: {
|
|
210
|
+
xs: "1.60",
|
|
211
|
+
lg: "1.60"
|
|
212
|
+
},
|
|
213
|
+
text: {
|
|
214
|
+
xs: "1.70",
|
|
215
|
+
lg: "1.70"
|
|
216
|
+
},
|
|
217
|
+
strong: {
|
|
218
|
+
xs: "1.70",
|
|
219
|
+
lg: "1.70"
|
|
220
|
+
},
|
|
221
|
+
small: {
|
|
222
|
+
xs: "1.70",
|
|
223
|
+
lg: "1.70"
|
|
224
|
+
},
|
|
225
|
+
blockquote: {
|
|
226
|
+
xs: "1.70",
|
|
227
|
+
lg: "1.70"
|
|
228
|
+
},
|
|
229
|
+
code: {
|
|
230
|
+
xs: "1.70",
|
|
231
|
+
lg: "1.70"
|
|
232
|
+
},
|
|
233
|
+
button: {
|
|
234
|
+
xs: "1.00",
|
|
235
|
+
lg: "1.00"
|
|
236
|
+
},
|
|
237
|
+
buttonBig: {
|
|
238
|
+
xs: "1.00",
|
|
239
|
+
lg: "1.00"
|
|
240
|
+
},
|
|
241
|
+
buttonSmall: {
|
|
242
|
+
xs: "1.00",
|
|
243
|
+
lg: "1.00"
|
|
244
|
+
},
|
|
245
|
+
input: {
|
|
246
|
+
xs: "1.00",
|
|
247
|
+
lg: "1.00"
|
|
248
|
+
},
|
|
249
|
+
inputBig: {
|
|
250
|
+
xs: "1.00",
|
|
251
|
+
lg: "1.00"
|
|
252
|
+
},
|
|
253
|
+
inputSmall: {
|
|
254
|
+
xs: "1.00",
|
|
255
|
+
lg: "1.00"
|
|
256
|
+
}
|
|
132
257
|
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
258
|
+
var theme = {
|
|
259
|
+
breakpoints,
|
|
260
|
+
spacing,
|
|
261
|
+
colors,
|
|
262
|
+
shadows,
|
|
263
|
+
fonts,
|
|
264
|
+
fontSizes,
|
|
265
|
+
lineHeights,
|
|
266
|
+
isDark: false
|
|
142
267
|
};
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
shadowsDark,
|
|
153
|
-
spacing,
|
|
154
|
-
theme,
|
|
155
|
-
themeDark
|
|
268
|
+
var themeDark = {
|
|
269
|
+
breakpoints,
|
|
270
|
+
spacing,
|
|
271
|
+
colors: colorsDark,
|
|
272
|
+
shadows: shadowsDark,
|
|
273
|
+
fonts,
|
|
274
|
+
fontSizes,
|
|
275
|
+
lineHeights,
|
|
276
|
+
isDark: true
|
|
156
277
|
};
|
|
278
|
+
//#endregion
|
|
279
|
+
export { breakpoints, colors, colorsDark, fontSizes, fonts, lineHeights, mq, shadows, shadowsDark, spacing, theme, themeDark };
|
package/dist/utils/typography.js
CHANGED
|
@@ -1,51 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
"use client";
|
|
3
3
|
import { mq } from "./theme.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
styledButton,
|
|
35
|
-
styledButtonBig,
|
|
36
|
-
styledCode,
|
|
37
|
-
styledH1,
|
|
38
|
-
styledH2,
|
|
39
|
-
styledH3,
|
|
40
|
-
styledH4,
|
|
41
|
-
styledH5,
|
|
42
|
-
styledH6,
|
|
43
|
-
styledHero1,
|
|
44
|
-
styledHero2,
|
|
45
|
-
styledHero3,
|
|
46
|
-
styledInput,
|
|
47
|
-
styledInputBig,
|
|
48
|
-
styledSmall,
|
|
49
|
-
styledStrong,
|
|
50
|
-
styledText
|
|
51
|
-
};
|
|
4
|
+
import { css } from "styled-components";
|
|
5
|
+
//#region src/lib/utils/typography.tsx
|
|
6
|
+
var createTypographyStyle = (key) => (theme) => css([
|
|
7
|
+
`font-size:`,
|
|
8
|
+
`;line-height:`,
|
|
9
|
+
`;`,
|
|
10
|
+
`{font-size:`,
|
|
11
|
+
`;line-height:`,
|
|
12
|
+
`;}`
|
|
13
|
+
], theme.fontSizes[key].xs, theme.lineHeights[key].xs, mq("lg"), theme.fontSizes[key].lg, theme.lineHeights[key].lg);
|
|
14
|
+
var styledHero1 = createTypographyStyle("hero1");
|
|
15
|
+
var styledHero2 = createTypographyStyle("hero2");
|
|
16
|
+
var styledHero3 = createTypographyStyle("hero3");
|
|
17
|
+
var styledH1 = createTypographyStyle("h1");
|
|
18
|
+
var styledH2 = createTypographyStyle("h2");
|
|
19
|
+
var styledH3 = createTypographyStyle("h3");
|
|
20
|
+
var styledH4 = createTypographyStyle("h4");
|
|
21
|
+
var styledH5 = createTypographyStyle("h5");
|
|
22
|
+
var styledH6 = createTypographyStyle("h6");
|
|
23
|
+
var styledText = createTypographyStyle("text");
|
|
24
|
+
var styledStrong = createTypographyStyle("strong");
|
|
25
|
+
var styledSmall = createTypographyStyle("small");
|
|
26
|
+
var styledBlockquote = createTypographyStyle("blockquote");
|
|
27
|
+
var styledCode = createTypographyStyle("code");
|
|
28
|
+
var styledButton = createTypographyStyle("button");
|
|
29
|
+
var styledButtonBig = createTypographyStyle("buttonBig");
|
|
30
|
+
var styledInput = createTypographyStyle("input");
|
|
31
|
+
var styledInputBig = createTypographyStyle("inputBig");
|
|
32
|
+
//#endregion
|
|
33
|
+
export { createTypographyStyle, styledBlockquote, styledButton, styledButtonBig, styledCode, styledH1, styledH2, styledH3, styledH4, styledH5, styledH6, styledHero1, styledHero2, styledHero3, styledInput, styledInputBig, styledSmall, styledStrong, styledText };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cherry-styled-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "Cherry is a design system for the modern web. Designed in Figma, built in React using Typescript.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"format": "prettier --write ."
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"lucide-react": "^
|
|
44
|
+
"lucide-react": "^1.7.0",
|
|
45
45
|
"polished": "^4.3.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
@@ -50,20 +50,21 @@
|
|
|
50
50
|
"styled-components": "^6.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@
|
|
53
|
+
"@swc/plugin-styled-components": "^12.7.0",
|
|
54
|
+
"@types/node": "^25.5.0",
|
|
54
55
|
"@types/react": "^19.2.14",
|
|
55
56
|
"@types/react-dom": "^19.2.3",
|
|
56
|
-
"@vitejs/plugin-react": "^
|
|
57
|
+
"@vitejs/plugin-react-swc": "^4.3.0",
|
|
57
58
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
58
|
-
"eslint-plugin-react-refresh": "^0.5.
|
|
59
|
-
"next": "^16.1
|
|
59
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
60
|
+
"next": "^16.2.1",
|
|
60
61
|
"prettier": "^3.8.1",
|
|
61
62
|
"react": "^19.2.4",
|
|
62
63
|
"react-dom": "^19.2.4",
|
|
63
64
|
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
64
|
-
"styled-components": "^6.3.
|
|
65
|
-
"typescript": "^
|
|
66
|
-
"vite": "^
|
|
65
|
+
"styled-components": "^6.3.12",
|
|
66
|
+
"typescript": "^6.0.2",
|
|
67
|
+
"vite": "^8.0.3",
|
|
67
68
|
"vite-plugin-dts": "^4.5.4"
|
|
68
69
|
}
|
|
69
70
|
}
|