cherry-styled-components 0.1.11 → 0.1.12
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 +2 -0
- package/dist/box.js +17 -0
- package/{src/lib/button.tsx → dist/button.js} +45 -98
- package/dist/col.js +25 -0
- package/dist/container.js +36 -0
- package/dist/flex.js +40 -0
- package/dist/grid.js +39 -0
- package/dist/icon.js +26 -0
- package/dist/index.js +89 -0
- package/{src/lib/input.tsx → dist/input.js} +95 -151
- package/dist/lib/button.d.ts +2 -3
- package/dist/lib/col.d.ts +0 -2
- package/dist/lib/container.d.ts +0 -2
- package/dist/lib/flex.d.ts +1 -3
- package/dist/lib/grid.d.ts +0 -2
- package/dist/lib/icon.d.ts +2 -1
- package/dist/lib/input.d.ts +0 -3
- package/dist/lib/range.d.ts +0 -2
- package/dist/lib/select.d.ts +0 -2
- package/dist/lib/styled-components/theme-provider.d.ts +1 -1
- package/dist/lib/textarea.d.ts +0 -2
- package/dist/lib/toggle.d.ts +0 -2
- package/dist/lib/utils/mixins.d.ts +2 -2
- package/dist/lib/utils/theme.d.ts +1 -2
- package/dist/lib/utils/typography.d.ts +3 -2
- package/dist/max-width.js +35 -0
- package/{src/lib/range.tsx → dist/range.js} +44 -71
- package/dist/select.js +108 -0
- package/dist/space.js +37 -0
- package/dist/styled-components/registry.js +25 -0
- package/dist/styled-components/theme-provider.js +35 -0
- package/dist/textarea.js +86 -0
- package/{src/lib/toggle.tsx → dist/toggle.js} +41 -67
- package/{src/lib/utils/global.tsx → dist/utils/global.js} +4 -5
- package/dist/utils/icons.js +86 -0
- package/{src/lib/utils/mixins.tsx → dist/utils/mixins.js} +23 -51
- package/dist/utils/theme.js +156 -0
- package/dist/utils/typography.js +51 -0
- package/package.json +25 -7
- package/.claude/settings.local.json +0 -21
- package/.eslintrc.cjs +0 -18
- package/.prettierignore +0 -5
- package/.prettierrc +0 -11
- package/.supermaven/config.json +0 -6
- package/CLAUDE.md +0 -70
- package/dist/cherry.js +0 -22802
- package/dist/cherry.umd.cjs +0 -1424
- package/index.html +0 -13
- package/pnpm-workspace.yaml +0 -3
- package/src/App.tsx +0 -311
- package/src/lib/box.tsx +0 -26
- package/src/lib/col.tsx +0 -48
- package/src/lib/container.tsx +0 -69
- package/src/lib/flex.tsx +0 -99
- package/src/lib/grid.tsx +0 -76
- package/src/lib/icon.tsx +0 -19
- package/src/lib/index.ts +0 -16
- package/src/lib/max-width.tsx +0 -53
- package/src/lib/select.tsx +0 -136
- package/src/lib/space.tsx +0 -55
- package/src/lib/styled-components/index.ts +0 -2
- package/src/lib/styled-components/registry.tsx +0 -29
- package/src/lib/styled-components/theme-provider.tsx +0 -50
- package/src/lib/textarea.tsx +0 -118
- package/src/lib/utils/icons.tsx +0 -84
- package/src/lib/utils/index.ts +0 -5
- package/src/lib/utils/theme.ts +0 -297
- package/src/lib/utils/typography.tsx +0 -204
- package/src/main.tsx +0 -19
- package/src/toggle-theme.tsx +0 -25
- package/src/vite-env.d.ts +0 -8
- package/tsconfig.json +0 -24
- package/vite.config.js +0 -24
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Cherry React Library
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/cherry-styled-components)
|
|
4
|
+
|
|
3
5
|
## Introduction
|
|
4
6
|
|
|
5
7
|
Cherry Design System is a versatile foundation for projects. It offers a white label base, ready-to-use Figma designs, open-source React components, built-in support for theming and dark mode. Explore the [docs](https://cherry.al/) to create delightful user interfaces.
|
package/dist/box.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { Container } from "./container.js";
|
|
6
|
+
const StyledBox = styled(Container)`
|
|
7
|
+
background: ${({ theme }) => theme.colors.light};
|
|
8
|
+
border-radius: ${({ theme }) => theme.spacing.radius.lg};
|
|
9
|
+
border: solid 1px ${({ theme }) => theme.colors.grayLight};
|
|
10
|
+
`;
|
|
11
|
+
function LocalBox({ ...props }, ref) {
|
|
12
|
+
return /* @__PURE__ */ jsx(StyledBox, { ...props, ref, children: props.children });
|
|
13
|
+
}
|
|
14
|
+
const Box = forwardRef(LocalBox);
|
|
15
|
+
export {
|
|
16
|
+
Box
|
|
17
|
+
};
|
|
@@ -1,31 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import { jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import styled, { css } from "styled-components";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
$variant?: "primary" | "secondary" | "tertiary";
|
|
11
|
-
$size?: "default" | "big" | "small";
|
|
12
|
-
$outline?: boolean;
|
|
13
|
-
$fullWidth?: boolean;
|
|
14
|
-
$icon?: React.ReactNode;
|
|
15
|
-
$iconPosition?: "left" | "right";
|
|
16
|
-
$isError?: boolean;
|
|
17
|
-
theme?: Theme;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const buttonStyles = (
|
|
21
|
-
theme: Theme,
|
|
22
|
-
$variant?: "primary" | "secondary" | "tertiary",
|
|
23
|
-
$size?: "default" | "big" | "small",
|
|
24
|
-
$outline?: boolean,
|
|
25
|
-
$fullWidth?: boolean,
|
|
26
|
-
$isError?: boolean,
|
|
27
|
-
disabled?: boolean,
|
|
28
|
-
) => css`
|
|
5
|
+
import { darken, lighten } from "polished";
|
|
6
|
+
import { resetButton, formElementHeightStyles } from "./utils/mixins.js";
|
|
7
|
+
const buttonStyles = (theme, $variant, $size, $outline, $fullWidth, $error, disabled) => css`
|
|
29
8
|
${resetButton};
|
|
30
9
|
font-family: inherit;
|
|
31
10
|
display: inline-flex;
|
|
@@ -49,14 +28,8 @@ export const buttonStyles = (
|
|
|
49
28
|
margin: auto 0;
|
|
50
29
|
}
|
|
51
30
|
|
|
52
|
-
${!disabled &&
|
|
53
|
-
|
|
54
|
-
css`
|
|
55
|
-
color: ${$outline
|
|
56
|
-
? theme.colors.primary
|
|
57
|
-
: theme.isDark
|
|
58
|
-
? theme.colors.dark
|
|
59
|
-
: theme.colors.light};
|
|
31
|
+
${!disabled && $variant === "primary" && css`
|
|
32
|
+
color: ${$outline ? theme.colors.primary : theme.isDark ? theme.colors.dark : theme.colors.light};
|
|
60
33
|
background: ${$outline ? "transparent" : theme.colors.primary};
|
|
61
34
|
border: solid 2px ${theme.colors.primary};
|
|
62
35
|
box-shadow: 0 0 0 0px ${theme.colors.primary};
|
|
@@ -76,14 +49,8 @@ export const buttonStyles = (
|
|
|
76
49
|
}
|
|
77
50
|
`}
|
|
78
51
|
|
|
79
|
-
${!disabled &&
|
|
80
|
-
|
|
81
|
-
css`
|
|
82
|
-
color: ${$outline
|
|
83
|
-
? theme.colors.secondary
|
|
84
|
-
: theme.isDark
|
|
85
|
-
? theme.colors.dark
|
|
86
|
-
: theme.colors.light};
|
|
52
|
+
${!disabled && $variant === "secondary" && css`
|
|
53
|
+
color: ${$outline ? theme.colors.secondary : theme.isDark ? theme.colors.dark : theme.colors.light};
|
|
87
54
|
background: ${$outline ? "transparent" : theme.colors.secondary};
|
|
88
55
|
border: solid 2px ${theme.colors.secondary};
|
|
89
56
|
box-shadow: 0 0 0 0px ${theme.colors.secondary};
|
|
@@ -103,14 +70,8 @@ export const buttonStyles = (
|
|
|
103
70
|
}
|
|
104
71
|
`}
|
|
105
72
|
|
|
106
|
-
${!disabled &&
|
|
107
|
-
|
|
108
|
-
css`
|
|
109
|
-
color: ${$outline
|
|
110
|
-
? theme.colors.tertiary
|
|
111
|
-
: theme.isDark
|
|
112
|
-
? theme.colors.dark
|
|
113
|
-
: theme.colors.light};
|
|
73
|
+
${!disabled && $variant === "tertiary" && css`
|
|
74
|
+
color: ${$outline ? theme.colors.tertiary : theme.isDark ? theme.colors.dark : theme.colors.light};
|
|
114
75
|
background: ${$outline ? "transparent" : theme.colors.tertiary};
|
|
115
76
|
border: solid 2px ${theme.colors.tertiary};
|
|
116
77
|
box-shadow: 0 0 0 0px ${theme.colors.tertiary};
|
|
@@ -130,14 +91,8 @@ export const buttonStyles = (
|
|
|
130
91
|
}
|
|
131
92
|
`}
|
|
132
93
|
|
|
133
|
-
${!disabled &&
|
|
134
|
-
|
|
135
|
-
css`
|
|
136
|
-
color: ${$outline
|
|
137
|
-
? theme.colors.error
|
|
138
|
-
: theme.isDark
|
|
139
|
-
? theme.colors.dark
|
|
140
|
-
: theme.colors.light};
|
|
94
|
+
${!disabled && $error && css`
|
|
95
|
+
color: ${$outline ? theme.colors.error : theme.isDark ? theme.colors.dark : theme.colors.light};
|
|
141
96
|
background: ${$outline ? "transparent" : theme.colors.error};
|
|
142
97
|
border: solid 2px ${theme.colors.error};
|
|
143
98
|
box-shadow: 0 0 0 0px ${theme.colors.error};
|
|
@@ -160,21 +115,16 @@ export const buttonStyles = (
|
|
|
160
115
|
|
|
161
116
|
${formElementHeightStyles($size)}
|
|
162
117
|
|
|
163
|
-
${$size === "big"
|
|
164
|
-
? `font-size: ${theme.fontSizes.buttonBig.lg};
|
|
118
|
+
${$size === "big" ? `font-size: ${theme.fontSizes.buttonBig.lg};
|
|
165
119
|
line-height: ${theme.lineHeights.buttonBig.lg};
|
|
166
120
|
padding: 18px 30px;
|
|
167
|
-
`
|
|
168
|
-
: $size === "small"
|
|
169
|
-
? `font-size: ${theme.fontSizes.buttonSmall.lg};
|
|
121
|
+
` : $size === "small" ? `font-size: ${theme.fontSizes.buttonSmall.lg};
|
|
170
122
|
line-height: ${theme.lineHeights.buttonSmall.lg};
|
|
171
123
|
padding: 10px 20px;
|
|
172
|
-
`
|
|
173
|
-
: `font-size: ${theme.fontSizes.button.lg};
|
|
124
|
+
` : `font-size: ${theme.fontSizes.button.lg};
|
|
174
125
|
line-height: ${theme.lineHeights.button.lg};`}
|
|
175
126
|
|
|
176
|
-
${disabled &&
|
|
177
|
-
`
|
|
127
|
+
${disabled && `
|
|
178
128
|
cursor: not-allowed;
|
|
179
129
|
background: ${theme.colors.grayLight};
|
|
180
130
|
border: solid 2px ${theme.colors.grayLight};
|
|
@@ -183,38 +133,35 @@ export const buttonStyles = (
|
|
|
183
133
|
|
|
184
134
|
${$fullWidth && `width: 100%;`}
|
|
185
135
|
`;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
disabled,
|
|
197
|
-
)}
|
|
136
|
+
const StyledButton = styled.button`
|
|
137
|
+
${({ theme, $variant, $error, $size, $outline, $fullWidth, disabled }) => buttonStyles(
|
|
138
|
+
theme,
|
|
139
|
+
$variant,
|
|
140
|
+
$size,
|
|
141
|
+
$outline,
|
|
142
|
+
$fullWidth,
|
|
143
|
+
$error,
|
|
144
|
+
disabled
|
|
145
|
+
)}
|
|
198
146
|
`;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
{props.$iconPosition === "right" && props.$icon && props.$icon}
|
|
214
|
-
</StyledButton>
|
|
147
|
+
function LocalButton({ $variant = "primary", ...props }, ref) {
|
|
148
|
+
return /* @__PURE__ */ jsxs(
|
|
149
|
+
StyledButton,
|
|
150
|
+
{
|
|
151
|
+
$variant,
|
|
152
|
+
$error: props.$error,
|
|
153
|
+
...props,
|
|
154
|
+
ref,
|
|
155
|
+
children: [
|
|
156
|
+
props.$iconPosition !== "right" && props.$icon && props.$icon,
|
|
157
|
+
props.children,
|
|
158
|
+
props.$iconPosition === "right" && props.$icon && props.$icon
|
|
159
|
+
]
|
|
160
|
+
}
|
|
215
161
|
);
|
|
216
162
|
}
|
|
217
|
-
|
|
218
163
|
const Button = forwardRef(LocalButton);
|
|
219
|
-
|
|
220
|
-
|
|
164
|
+
export {
|
|
165
|
+
Button,
|
|
166
|
+
buttonStyles
|
|
167
|
+
};
|
package/dist/col.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { generateColSpanStyles } from "./utils/mixins.js";
|
|
6
|
+
const StyledCol = styled.div`
|
|
7
|
+
${({ $span }) => $span && `
|
|
8
|
+
grid-column: span ${$span};
|
|
9
|
+
`}
|
|
10
|
+
|
|
11
|
+
${({ $xsSpan }) => $xsSpan && generateColSpanStyles("xs", $xsSpan)}
|
|
12
|
+
${({ $smSpan }) => $smSpan && generateColSpanStyles("sm", $smSpan)}
|
|
13
|
+
${({ $mdSpan }) => $mdSpan && generateColSpanStyles("md", $mdSpan)}
|
|
14
|
+
${({ $lgSpan }) => $lgSpan && generateColSpanStyles("lg", $lgSpan)}
|
|
15
|
+
${({ $xlSpan }) => $xlSpan && generateColSpanStyles("xl", $xlSpan)}
|
|
16
|
+
${({ $xxlSpan }) => $xxlSpan && generateColSpanStyles("xxl", $xxlSpan)}
|
|
17
|
+
${({ $xxxlSpan }) => $xxxlSpan && generateColSpanStyles("xxxl", $xxxlSpan)}
|
|
18
|
+
`;
|
|
19
|
+
function LocalCol({ ...props }, ref) {
|
|
20
|
+
return /* @__PURE__ */ jsx(StyledCol, { ...props, ref, children: props.children });
|
|
21
|
+
}
|
|
22
|
+
const Col = forwardRef(LocalCol);
|
|
23
|
+
export {
|
|
24
|
+
Col
|
|
25
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { mq } from "./utils/theme.js";
|
|
6
|
+
import { generatePaddingStyles } from "./utils/mixins.js";
|
|
7
|
+
const StyledContainer = styled.div`
|
|
8
|
+
margin: auto;
|
|
9
|
+
width: 100%;
|
|
10
|
+
max-width: ${({ theme, $fluid }) => $fluid ? `100%` : theme.spacing.maxWidth.xs};
|
|
11
|
+
${({ $textAlign }) => $textAlign && `text-align: ${$textAlign}`};
|
|
12
|
+
padding: ${({ $padding, theme }) => $padding && `${$padding}px` || theme.spacing.padding.xs};
|
|
13
|
+
|
|
14
|
+
${mq("lg")} {
|
|
15
|
+
padding: ${({ $padding, theme }) => $padding && `${$padding}px` || theme.spacing.padding.lg};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
${mq("xxxl")} {
|
|
19
|
+
max-width: ${({ theme, $fluid }) => $fluid ? `100%` : theme.spacing.maxWidth.xxxl};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
${({ $xsPadding }) => $xsPadding && generatePaddingStyles("xs", $xsPadding)}
|
|
23
|
+
${({ $smPadding }) => $smPadding && generatePaddingStyles("sm", $smPadding)}
|
|
24
|
+
${({ $mdPadding }) => $mdPadding && generatePaddingStyles("md", $mdPadding)}
|
|
25
|
+
${({ $lgPadding }) => $lgPadding && generatePaddingStyles("lg", $lgPadding)}
|
|
26
|
+
${({ $xlPadding }) => $xlPadding && generatePaddingStyles("xl", $xlPadding)}
|
|
27
|
+
${({ $xxlPadding }) => $xxlPadding && generatePaddingStyles("xxl", $xxlPadding)}
|
|
28
|
+
${({ $xxxlPadding }) => $xxxlPadding && generatePaddingStyles("xxxl", $xxxlPadding)}
|
|
29
|
+
`;
|
|
30
|
+
function LocalContainer({ ...props }, ref) {
|
|
31
|
+
return /* @__PURE__ */ jsx(StyledContainer, { ...props, ref, children: props.children });
|
|
32
|
+
}
|
|
33
|
+
const Container = forwardRef(LocalContainer);
|
|
34
|
+
export {
|
|
35
|
+
Container
|
|
36
|
+
};
|
package/dist/flex.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { generateGapStyles, generateJustifyContentStyles, fullWidthStyles } from "./utils/mixins.js";
|
|
6
|
+
import { mq } from "./utils/theme.js";
|
|
7
|
+
const StyledFlex = styled.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: ${({ $justifyContent }) => $justifyContent || "flex-start"};
|
|
10
|
+
flex-wrap: ${({ $wrap }) => $wrap || "wrap"};
|
|
11
|
+
gap: ${({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.xs};
|
|
12
|
+
flex-direction: ${({ $direction }) => $direction || "row"};
|
|
13
|
+
|
|
14
|
+
${mq("lg")} {
|
|
15
|
+
gap: ${({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.lg};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
${({ $xsGap }) => $xsGap !== void 0 && generateGapStyles("xs", $xsGap)}
|
|
19
|
+
${({ $xsJustifyContent }) => $xsJustifyContent && generateJustifyContentStyles("xs", $xsJustifyContent)}
|
|
20
|
+
${({ $smGap }) => $smGap !== void 0 && generateGapStyles("sm", $smGap)}
|
|
21
|
+
${({ $smJustifyContent }) => $smJustifyContent && generateJustifyContentStyles("sm", $smJustifyContent)}
|
|
22
|
+
${({ $mdGap }) => $mdGap !== void 0 && generateGapStyles("md", $mdGap)}
|
|
23
|
+
${({ $mdJustifyContent }) => $mdJustifyContent && generateJustifyContentStyles("md", $mdJustifyContent)}
|
|
24
|
+
${({ $lgGap }) => $lgGap !== void 0 && generateGapStyles("lg", $lgGap)}
|
|
25
|
+
${({ $lgJustifyContent }) => $lgJustifyContent && generateJustifyContentStyles("lg", $lgJustifyContent)}
|
|
26
|
+
${({ $xlGap }) => $xlGap !== void 0 && generateGapStyles("xl", $xlGap)}
|
|
27
|
+
${({ $xlJustifyContent }) => $xlJustifyContent && generateJustifyContentStyles("xl", $xlJustifyContent)}
|
|
28
|
+
${({ $xxlGap }) => $xxlGap !== void 0 && generateGapStyles("xxl", $xxlGap)}
|
|
29
|
+
${({ $xxlJustifyContent }) => $xxlJustifyContent && generateJustifyContentStyles("xxl", $xxlJustifyContent)}
|
|
30
|
+
${({ $xxxlGap }) => $xxxlGap !== void 0 && generateGapStyles("xxxl", $xxxlGap)}
|
|
31
|
+
${({ $xxxlJustifyContent }) => $xxxlJustifyContent && generateJustifyContentStyles("xxxl", $xxxlJustifyContent)}
|
|
32
|
+
${({ $fullWidth }) => fullWidthStyles($fullWidth)}
|
|
33
|
+
`;
|
|
34
|
+
function LocalFlex({ ...props }, ref) {
|
|
35
|
+
return /* @__PURE__ */ jsx(StyledFlex, { ...props, ref, children: props.children });
|
|
36
|
+
}
|
|
37
|
+
const Flex = forwardRef(LocalFlex);
|
|
38
|
+
export {
|
|
39
|
+
Flex
|
|
40
|
+
};
|
package/dist/grid.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { generateGapStyles, generateColsStyles } from "./utils/mixins.js";
|
|
6
|
+
import { mq } from "./utils/theme.js";
|
|
7
|
+
const StyledGrid = styled.div`
|
|
8
|
+
width: 100%;
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: ${({ $cols }) => `repeat(${$cols || 3}, minmax(0, 1fr))`};
|
|
11
|
+
gap: ${({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.xs};
|
|
12
|
+
|
|
13
|
+
${mq("lg")} {
|
|
14
|
+
gap: ${({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.lg};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
${({ $xsGap }) => $xsGap !== void 0 && generateGapStyles("xs", $xsGap)}
|
|
18
|
+
${({ $smGap }) => $smGap !== void 0 && generateGapStyles("sm", $smGap)}
|
|
19
|
+
${({ $mdGap }) => $mdGap !== void 0 && generateGapStyles("md", $mdGap)}
|
|
20
|
+
${({ $lgGap }) => $lgGap !== void 0 && generateGapStyles("lg", $lgGap)}
|
|
21
|
+
${({ $xlGap }) => $xlGap !== void 0 && generateGapStyles("xl", $xlGap)}
|
|
22
|
+
${({ $xxlGap }) => $xxlGap !== void 0 && generateGapStyles("xxl", $xxlGap)}
|
|
23
|
+
${({ $xxxlGap }) => $xxxlGap !== void 0 && generateGapStyles("xxxl", $xxxlGap)}
|
|
24
|
+
|
|
25
|
+
${({ $xsCols }) => $xsCols && generateColsStyles("xs", $xsCols)}
|
|
26
|
+
${({ $smCols }) => $smCols && generateColsStyles("sm", $smCols)}
|
|
27
|
+
${({ $mdCols }) => $mdCols && generateColsStyles("md", $mdCols)}
|
|
28
|
+
${({ $lgCols }) => $lgCols && generateColsStyles("lg", $lgCols)}
|
|
29
|
+
${({ $xlCols }) => $xlCols && generateColsStyles("xl", $xlCols)}
|
|
30
|
+
${({ $xxlCols }) => $xxlCols && generateColsStyles("xxl", $xxlCols)}
|
|
31
|
+
${({ $xxxlCols }) => $xxxlCols && generateColsStyles("xxxl", $xxxlCols)}
|
|
32
|
+
`;
|
|
33
|
+
function LocalGrid({ ...props }, ref) {
|
|
34
|
+
return /* @__PURE__ */ jsx(StyledGrid, { ...props, ref, children: props.children });
|
|
35
|
+
}
|
|
36
|
+
const Grid = forwardRef(LocalGrid);
|
|
37
|
+
export {
|
|
38
|
+
Grid
|
|
39
|
+
};
|
package/dist/icon.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { icons } from "lucide-react";
|
|
3
|
+
const Icon = ({
|
|
4
|
+
name,
|
|
5
|
+
color,
|
|
6
|
+
size,
|
|
7
|
+
className,
|
|
8
|
+
"aria-label": ariaLabel
|
|
9
|
+
}) => {
|
|
10
|
+
const LucideIcon = icons[name];
|
|
11
|
+
if (!LucideIcon) return null;
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
LucideIcon,
|
|
14
|
+
{
|
|
15
|
+
color,
|
|
16
|
+
size,
|
|
17
|
+
className,
|
|
18
|
+
"aria-label": ariaLabel,
|
|
19
|
+
"aria-hidden": !ariaLabel,
|
|
20
|
+
role: ariaLabel ? "img" : void 0
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
Icon
|
|
26
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Box } from "./box.js";
|
|
2
|
+
import { Button, buttonStyles } from "./button.js";
|
|
3
|
+
import { Col } from "./col.js";
|
|
4
|
+
import { Container } from "./container.js";
|
|
5
|
+
import { Flex } from "./flex.js";
|
|
6
|
+
import { Grid } from "./grid.js";
|
|
7
|
+
import { Icon } from "./icon.js";
|
|
8
|
+
import { Input, StyledInputWrapper, StyledLabel } from "./input.js";
|
|
9
|
+
import { MaxWidth } from "./max-width.js";
|
|
10
|
+
import { Range } from "./range.js";
|
|
11
|
+
import { Select, StyledIconWrapper } from "./select.js";
|
|
12
|
+
import { Space } from "./space.js";
|
|
13
|
+
import { Textarea } from "./textarea.js";
|
|
14
|
+
import { Toggle } from "./toggle.js";
|
|
15
|
+
import { CherryThemeProvider, ThemeContext } from "./styled-components/theme-provider.js";
|
|
16
|
+
import { GlobalStyles } from "./utils/global.js";
|
|
17
|
+
import { IconArrow, IconCalendar, IconCheck } from "./utils/icons.js";
|
|
18
|
+
import { StyledComponentsRegistry } from "./styled-components/registry.js";
|
|
19
|
+
import { breakpoints, colors, colorsDark, fontSizes, fonts, lineHeights, mq, shadows, shadowsDark, spacing, theme, themeDark } from "./utils/theme.js";
|
|
20
|
+
import { createTypographyStyle, styledBlockquote, styledButton, styledButtonBig, styledCode, styledH1, styledH2, styledH3, styledH4, styledH5, styledH6, styledHero1, styledHero2, styledHero3, styledInput, styledInputBig, styledSmall, styledStrong, styledText } from "./utils/typography.js";
|
|
21
|
+
import { formElementHeightStyles, fullWidthStyles, generateColSpanStyles, generateColsStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, resetButton, resetInput, statusBorderStyles } from "./utils/mixins.js";
|
|
22
|
+
export {
|
|
23
|
+
Box,
|
|
24
|
+
Button,
|
|
25
|
+
CherryThemeProvider,
|
|
26
|
+
Col,
|
|
27
|
+
Container,
|
|
28
|
+
Flex,
|
|
29
|
+
GlobalStyles,
|
|
30
|
+
Grid,
|
|
31
|
+
Icon,
|
|
32
|
+
IconArrow,
|
|
33
|
+
IconCalendar,
|
|
34
|
+
IconCheck,
|
|
35
|
+
Input,
|
|
36
|
+
MaxWidth,
|
|
37
|
+
Range,
|
|
38
|
+
Select,
|
|
39
|
+
Space,
|
|
40
|
+
StyledComponentsRegistry,
|
|
41
|
+
StyledIconWrapper,
|
|
42
|
+
StyledInputWrapper,
|
|
43
|
+
StyledLabel,
|
|
44
|
+
Textarea,
|
|
45
|
+
ThemeContext,
|
|
46
|
+
Toggle,
|
|
47
|
+
breakpoints,
|
|
48
|
+
buttonStyles,
|
|
49
|
+
colors,
|
|
50
|
+
colorsDark,
|
|
51
|
+
createTypographyStyle,
|
|
52
|
+
fontSizes,
|
|
53
|
+
fonts,
|
|
54
|
+
formElementHeightStyles,
|
|
55
|
+
fullWidthStyles,
|
|
56
|
+
generateColSpanStyles,
|
|
57
|
+
generateColsStyles,
|
|
58
|
+
generateGapStyles,
|
|
59
|
+
generateJustifyContentStyles,
|
|
60
|
+
generatePaddingStyles,
|
|
61
|
+
lineHeights,
|
|
62
|
+
mq,
|
|
63
|
+
resetButton,
|
|
64
|
+
resetInput,
|
|
65
|
+
shadows,
|
|
66
|
+
shadowsDark,
|
|
67
|
+
spacing,
|
|
68
|
+
statusBorderStyles,
|
|
69
|
+
styledBlockquote,
|
|
70
|
+
styledButton,
|
|
71
|
+
styledButtonBig,
|
|
72
|
+
styledCode,
|
|
73
|
+
styledH1,
|
|
74
|
+
styledH2,
|
|
75
|
+
styledH3,
|
|
76
|
+
styledH4,
|
|
77
|
+
styledH5,
|
|
78
|
+
styledH6,
|
|
79
|
+
styledHero1,
|
|
80
|
+
styledHero2,
|
|
81
|
+
styledHero3,
|
|
82
|
+
styledInput,
|
|
83
|
+
styledInputBig,
|
|
84
|
+
styledSmall,
|
|
85
|
+
styledStrong,
|
|
86
|
+
styledText,
|
|
87
|
+
theme,
|
|
88
|
+
themeDark
|
|
89
|
+
};
|