cherry-styled-components 0.1.16 → 0.1.18
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 +2 -2
- package/dist/button.js +3 -3
- package/dist/col.js +2 -2
- package/dist/container.js +2 -2
- package/dist/flex.d.ts +53 -0
- package/dist/flex.js +28 -5
- package/dist/grid.js +2 -2
- package/dist/icon.js +1 -1
- package/dist/index.js +2 -2
- package/dist/input.js +18 -18
- package/dist/max-width.js +2 -2
- package/dist/range.js +4 -4
- package/dist/select.js +6 -6
- package/dist/space.js +2 -2
- package/dist/styled-components/registry.js +2 -2
- package/dist/styled-components/theme-provider.js +4 -4
- package/dist/textarea.js +4 -4
- package/dist/toggle.js +5 -5
- package/dist/utils/icons.js +15 -15
- package/dist/{src/lib/utils → utils}/mixins.d.ts +3 -0
- package/dist/utils/mixins.js +16 -1
- package/package.json +16 -16
- package/dist/src/lib/flex.d.ts +0 -27
- /package/dist/{src/lib/box.d.ts → box.d.ts} +0 -0
- /package/dist/{src/lib/button.d.ts → button.d.ts} +0 -0
- /package/dist/{src/lib/col.d.ts → col.d.ts} +0 -0
- /package/dist/{src/lib/container.d.ts → container.d.ts} +0 -0
- /package/dist/{src/lib/grid.d.ts → grid.d.ts} +0 -0
- /package/dist/{src/lib/icon.d.ts → icon.d.ts} +0 -0
- /package/dist/{src/lib/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/lib/input.d.ts → input.d.ts} +0 -0
- /package/dist/{src/lib/max-width.d.ts → max-width.d.ts} +0 -0
- /package/dist/{src/lib/range.d.ts → range.d.ts} +0 -0
- /package/dist/{src/lib/select.d.ts → select.d.ts} +0 -0
- /package/dist/{src/lib/space.d.ts → space.d.ts} +0 -0
- /package/dist/{src/lib/styled-components → styled-components}/index.d.ts +0 -0
- /package/dist/{src/lib/styled-components → styled-components}/registry.d.ts +0 -0
- /package/dist/{src/lib/styled-components → styled-components}/theme-provider.d.ts +0 -0
- /package/dist/{src/lib/textarea.d.ts → textarea.d.ts} +0 -0
- /package/dist/{src/lib/toggle.d.ts → toggle.d.ts} +0 -0
- /package/dist/{src/lib/utils → utils}/global.d.ts +0 -0
- /package/dist/{src/lib/utils → utils}/icons.d.ts +0 -0
- /package/dist/{src/lib/utils → utils}/index.d.ts +0 -0
- /package/dist/{src/lib/utils → utils}/theme.d.ts +0 -0
- /package/dist/{src/lib/utils → utils}/typography.d.ts +0 -0
package/dist/box.js
CHANGED
|
@@ -15,12 +15,12 @@ var StyledBox = styled(Container).withConfig({
|
|
|
15
15
|
`;`
|
|
16
16
|
], ({ theme }) => theme.colors.light, ({ theme }) => theme.spacing.radius.lg, ({ theme }) => theme.colors.grayLight);
|
|
17
17
|
function LocalBox({ ...props }, ref) {
|
|
18
|
-
return
|
|
18
|
+
return /*#__PURE__*/ jsx(StyledBox, {
|
|
19
19
|
...props,
|
|
20
20
|
ref,
|
|
21
21
|
children: props.children
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
var Box =
|
|
24
|
+
var Box = /*#__PURE__*/ forwardRef(LocalBox);
|
|
25
25
|
//#endregion
|
|
26
26
|
export { Box };
|
package/dist/button.js
CHANGED
|
@@ -77,10 +77,10 @@ var buttonStyles = (theme, $variant, $size, $outline, $fullWidth, $error, disabl
|
|
|
77
77
|
`, $fullWidth && `width: 100%;`);
|
|
78
78
|
var StyledButton = styled.button.withConfig({
|
|
79
79
|
displayName: "button__StyledButton",
|
|
80
|
-
componentId: "sc-
|
|
80
|
+
componentId: "sc-86ae8105-0"
|
|
81
81
|
})([``, ``], ({ theme, $variant, $error, $size, $outline, $fullWidth, disabled }) => buttonStyles(theme, $variant, $size, $outline, $fullWidth, $error, disabled));
|
|
82
82
|
function LocalButton({ $variant = "primary", ...props }, ref) {
|
|
83
|
-
return
|
|
83
|
+
return /*#__PURE__*/ jsxs(StyledButton, {
|
|
84
84
|
$variant,
|
|
85
85
|
$error: props.$error,
|
|
86
86
|
...props,
|
|
@@ -92,6 +92,6 @@ function LocalButton({ $variant = "primary", ...props }, ref) {
|
|
|
92
92
|
]
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
var Button =
|
|
95
|
+
var Button = /*#__PURE__*/ forwardRef(LocalButton);
|
|
96
96
|
//#endregion
|
|
97
97
|
export { Button, buttonStyles };
|
package/dist/col.js
CHANGED
|
@@ -22,12 +22,12 @@ var StyledCol = styled.div.withConfig({
|
|
|
22
22
|
grid-column: span ${$span};
|
|
23
23
|
`, ({ $xsSpan }) => $xsSpan && generateColSpanStyles("xs", $xsSpan), ({ $smSpan }) => $smSpan && generateColSpanStyles("sm", $smSpan), ({ $mdSpan }) => $mdSpan && generateColSpanStyles("md", $mdSpan), ({ $lgSpan }) => $lgSpan && generateColSpanStyles("lg", $lgSpan), ({ $xlSpan }) => $xlSpan && generateColSpanStyles("xl", $xlSpan), ({ $xxlSpan }) => $xxlSpan && generateColSpanStyles("xxl", $xxlSpan), ({ $xxxlSpan }) => $xxxlSpan && generateColSpanStyles("xxxl", $xxxlSpan));
|
|
24
24
|
function LocalCol({ ...props }, ref) {
|
|
25
|
-
return
|
|
25
|
+
return /*#__PURE__*/ jsx(StyledCol, {
|
|
26
26
|
...props,
|
|
27
27
|
ref,
|
|
28
28
|
children: props.children
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
var Col =
|
|
31
|
+
var Col = /*#__PURE__*/ forwardRef(LocalCol);
|
|
32
32
|
//#endregion
|
|
33
33
|
export { Col };
|
package/dist/container.js
CHANGED
|
@@ -27,12 +27,12 @@ var StyledContainer = styled.div.withConfig({
|
|
|
27
27
|
``
|
|
28
28
|
], ({ theme, $fluid }) => $fluid ? `100%` : theme.spacing.maxWidth.xs, ({ $textAlign }) => $textAlign && `text-align: ${$textAlign}`, ({ $padding, theme }) => $padding && `${$padding}px` || theme.spacing.padding.xs, mq("lg"), ({ $padding, theme }) => $padding && `${$padding}px` || theme.spacing.padding.lg, mq("xxxl"), ({ theme, $fluid }) => $fluid ? `100%` : theme.spacing.maxWidth.xxxl, ({ $xsPadding }) => $xsPadding && generatePaddingStyles("xs", $xsPadding), ({ $smPadding }) => $smPadding && generatePaddingStyles("sm", $smPadding), ({ $mdPadding }) => $mdPadding && generatePaddingStyles("md", $mdPadding), ({ $lgPadding }) => $lgPadding && generatePaddingStyles("lg", $lgPadding), ({ $xlPadding }) => $xlPadding && generatePaddingStyles("xl", $xlPadding), ({ $xxlPadding }) => $xxlPadding && generatePaddingStyles("xxl", $xxlPadding), ({ $xxxlPadding }) => $xxxlPadding && generatePaddingStyles("xxxl", $xxxlPadding));
|
|
29
29
|
function LocalContainer({ ...props }, ref) {
|
|
30
|
-
return
|
|
30
|
+
return /*#__PURE__*/ jsx(StyledContainer, {
|
|
31
31
|
...props,
|
|
32
32
|
ref,
|
|
33
33
|
children: props.children
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
var Container =
|
|
36
|
+
var Container = /*#__PURE__*/ forwardRef(LocalContainer);
|
|
37
37
|
//#endregion
|
|
38
38
|
export { Container };
|
package/dist/flex.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type JustifyContentType = "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
|
|
3
|
+
type AlignItemsType = "stretch" | "center" | "flex-start" | "flex-end" | "baseline";
|
|
4
|
+
type AlignContentType = "stretch" | "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
|
|
5
|
+
type DirectionType = "row" | "column" | "row-reverse" | "column-reverse";
|
|
6
|
+
type GapType = number | "none";
|
|
7
|
+
interface FlexProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
$justifyContent?: JustifyContentType;
|
|
10
|
+
$xsJustifyContent?: JustifyContentType;
|
|
11
|
+
$smJustifyContent?: JustifyContentType;
|
|
12
|
+
$mdJustifyContent?: JustifyContentType;
|
|
13
|
+
$lgJustifyContent?: JustifyContentType;
|
|
14
|
+
$xlJustifyContent?: JustifyContentType;
|
|
15
|
+
$xxlJustifyContent?: JustifyContentType;
|
|
16
|
+
$xxxlJustifyContent?: JustifyContentType;
|
|
17
|
+
$alignItems?: AlignItemsType;
|
|
18
|
+
$xsAlignItems?: AlignItemsType;
|
|
19
|
+
$smAlignItems?: AlignItemsType;
|
|
20
|
+
$mdAlignItems?: AlignItemsType;
|
|
21
|
+
$lgAlignItems?: AlignItemsType;
|
|
22
|
+
$xlAlignItems?: AlignItemsType;
|
|
23
|
+
$xxlAlignItems?: AlignItemsType;
|
|
24
|
+
$xxxlAlignItems?: AlignItemsType;
|
|
25
|
+
$alignContent?: AlignContentType;
|
|
26
|
+
$xsAlignContent?: AlignContentType;
|
|
27
|
+
$smAlignContent?: AlignContentType;
|
|
28
|
+
$mdAlignContent?: AlignContentType;
|
|
29
|
+
$lgAlignContent?: AlignContentType;
|
|
30
|
+
$xlAlignContent?: AlignContentType;
|
|
31
|
+
$xxlAlignContent?: AlignContentType;
|
|
32
|
+
$xxxlAlignContent?: AlignContentType;
|
|
33
|
+
$wrap?: "wrap" | "nowrap" | "wrap-reverse";
|
|
34
|
+
$gap?: GapType;
|
|
35
|
+
$xsGap?: GapType;
|
|
36
|
+
$smGap?: GapType;
|
|
37
|
+
$mdGap?: GapType;
|
|
38
|
+
$lgGap?: GapType;
|
|
39
|
+
$xlGap?: GapType;
|
|
40
|
+
$xxlGap?: GapType;
|
|
41
|
+
$xxxlGap?: GapType;
|
|
42
|
+
$direction?: DirectionType;
|
|
43
|
+
$xsDirection?: DirectionType;
|
|
44
|
+
$smDirection?: DirectionType;
|
|
45
|
+
$mdDirection?: DirectionType;
|
|
46
|
+
$lgDirection?: DirectionType;
|
|
47
|
+
$xlDirection?: DirectionType;
|
|
48
|
+
$xxlDirection?: DirectionType;
|
|
49
|
+
$xxxlDirection?: DirectionType;
|
|
50
|
+
$fullWidth?: boolean;
|
|
51
|
+
}
|
|
52
|
+
declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
export { Flex };
|
package/dist/flex.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { mq } from "./utils/theme.js";
|
|
4
|
-
import { fullWidthStyles, generateGapStyles, generateJustifyContentStyles } from "./utils/mixins.js";
|
|
4
|
+
import { fullWidthStyles, generateAlignContentStyles, generateAlignItemsStyles, generateDirectionStyles, generateGapStyles, generateJustifyContentStyles } from "./utils/mixins.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { forwardRef } from "react";
|
|
7
7
|
import styled from "styled-components";
|
|
8
8
|
//#region src/lib/flex.tsx
|
|
9
9
|
var StyledFlex = styled.div.withConfig({
|
|
10
10
|
displayName: "flex__StyledFlex",
|
|
11
|
-
componentId: "sc-
|
|
11
|
+
componentId: "sc-5d254fa1-0"
|
|
12
12
|
})([
|
|
13
13
|
`display:flex;justify-content:`,
|
|
14
|
+
`;align-items:`,
|
|
15
|
+
`;align-content:`,
|
|
14
16
|
`;flex-wrap:`,
|
|
15
17
|
`;gap:`,
|
|
16
18
|
`;flex-direction:`,
|
|
@@ -31,15 +33,36 @@ var StyledFlex = styled.div.withConfig({
|
|
|
31
33
|
` `,
|
|
32
34
|
` `,
|
|
33
35
|
` `,
|
|
36
|
+
` `,
|
|
37
|
+
` `,
|
|
38
|
+
` `,
|
|
39
|
+
` `,
|
|
40
|
+
` `,
|
|
41
|
+
` `,
|
|
42
|
+
` `,
|
|
43
|
+
` `,
|
|
44
|
+
` `,
|
|
45
|
+
` `,
|
|
46
|
+
` `,
|
|
47
|
+
` `,
|
|
48
|
+
` `,
|
|
49
|
+
` `,
|
|
50
|
+
` `,
|
|
51
|
+
` `,
|
|
52
|
+
` `,
|
|
53
|
+
` `,
|
|
54
|
+
` `,
|
|
55
|
+
` `,
|
|
56
|
+
` `,
|
|
34
57
|
``
|
|
35
|
-
], ({ $justifyContent }) => $justifyContent || "flex-start", ({ $wrap }) => $wrap || "wrap", ({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.xs, ({ $direction }) => $direction || "row", mq("lg"), ({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.lg, ({ $xsGap }) => $xsGap !== void 0 && generateGapStyles("xs", $xsGap), ({ $xsJustifyContent }) => $xsJustifyContent && generateJustifyContentStyles("xs", $xsJustifyContent), ({ $smGap }) => $smGap !== void 0 && generateGapStyles("sm", $smGap), ({ $smJustifyContent }) => $smJustifyContent && generateJustifyContentStyles("sm", $smJustifyContent), ({ $mdGap }) => $mdGap !== void 0 && generateGapStyles("md", $mdGap), ({ $mdJustifyContent }) => $mdJustifyContent && generateJustifyContentStyles("md", $mdJustifyContent), ({ $lgGap }) => $lgGap !== void 0 && generateGapStyles("lg", $lgGap), ({ $lgJustifyContent }) => $lgJustifyContent && generateJustifyContentStyles("lg", $lgJustifyContent), ({ $xlGap }) => $xlGap !== void 0 && generateGapStyles("xl", $xlGap), ({ $xlJustifyContent }) => $xlJustifyContent && generateJustifyContentStyles("xl", $xlJustifyContent), ({ $xxlGap }) => $xxlGap !== void 0 && generateGapStyles("xxl", $xxlGap), ({ $xxlJustifyContent }) => $xxlJustifyContent && generateJustifyContentStyles("xxl", $xxlJustifyContent), ({ $xxxlGap }) => $xxxlGap !== void 0 && generateGapStyles("xxxl", $xxxlGap), ({ $xxxlJustifyContent }) => $xxxlJustifyContent && generateJustifyContentStyles("xxxl", $xxxlJustifyContent), ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
58
|
+
], ({ $justifyContent }) => $justifyContent || "flex-start", ({ $alignItems }) => $alignItems || "stretch", ({ $alignContent }) => $alignContent || "stretch", ({ $wrap }) => $wrap || "wrap", ({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.xs, ({ $direction }) => $direction || "row", mq("lg"), ({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.lg, ({ $xsGap }) => $xsGap !== void 0 && generateGapStyles("xs", $xsGap), ({ $xsJustifyContent }) => $xsJustifyContent && generateJustifyContentStyles("xs", $xsJustifyContent), ({ $xsAlignItems }) => $xsAlignItems && generateAlignItemsStyles("xs", $xsAlignItems), ({ $xsAlignContent }) => $xsAlignContent && generateAlignContentStyles("xs", $xsAlignContent), ({ $xsDirection }) => $xsDirection && generateDirectionStyles("xs", $xsDirection), ({ $smGap }) => $smGap !== void 0 && generateGapStyles("sm", $smGap), ({ $smJustifyContent }) => $smJustifyContent && generateJustifyContentStyles("sm", $smJustifyContent), ({ $smAlignItems }) => $smAlignItems && generateAlignItemsStyles("sm", $smAlignItems), ({ $smAlignContent }) => $smAlignContent && generateAlignContentStyles("sm", $smAlignContent), ({ $smDirection }) => $smDirection && generateDirectionStyles("sm", $smDirection), ({ $mdGap }) => $mdGap !== void 0 && generateGapStyles("md", $mdGap), ({ $mdJustifyContent }) => $mdJustifyContent && generateJustifyContentStyles("md", $mdJustifyContent), ({ $mdAlignItems }) => $mdAlignItems && generateAlignItemsStyles("md", $mdAlignItems), ({ $mdAlignContent }) => $mdAlignContent && generateAlignContentStyles("md", $mdAlignContent), ({ $mdDirection }) => $mdDirection && generateDirectionStyles("md", $mdDirection), ({ $lgGap }) => $lgGap !== void 0 && generateGapStyles("lg", $lgGap), ({ $lgJustifyContent }) => $lgJustifyContent && generateJustifyContentStyles("lg", $lgJustifyContent), ({ $lgAlignItems }) => $lgAlignItems && generateAlignItemsStyles("lg", $lgAlignItems), ({ $lgAlignContent }) => $lgAlignContent && generateAlignContentStyles("lg", $lgAlignContent), ({ $lgDirection }) => $lgDirection && generateDirectionStyles("lg", $lgDirection), ({ $xlGap }) => $xlGap !== void 0 && generateGapStyles("xl", $xlGap), ({ $xlJustifyContent }) => $xlJustifyContent && generateJustifyContentStyles("xl", $xlJustifyContent), ({ $xlAlignItems }) => $xlAlignItems && generateAlignItemsStyles("xl", $xlAlignItems), ({ $xlAlignContent }) => $xlAlignContent && generateAlignContentStyles("xl", $xlAlignContent), ({ $xlDirection }) => $xlDirection && generateDirectionStyles("xl", $xlDirection), ({ $xxlGap }) => $xxlGap !== void 0 && generateGapStyles("xxl", $xxlGap), ({ $xxlJustifyContent }) => $xxlJustifyContent && generateJustifyContentStyles("xxl", $xxlJustifyContent), ({ $xxlAlignItems }) => $xxlAlignItems && generateAlignItemsStyles("xxl", $xxlAlignItems), ({ $xxlAlignContent }) => $xxlAlignContent && generateAlignContentStyles("xxl", $xxlAlignContent), ({ $xxlDirection }) => $xxlDirection && generateDirectionStyles("xxl", $xxlDirection), ({ $xxxlGap }) => $xxxlGap !== void 0 && generateGapStyles("xxxl", $xxxlGap), ({ $xxxlJustifyContent }) => $xxxlJustifyContent && generateJustifyContentStyles("xxxl", $xxxlJustifyContent), ({ $xxxlAlignItems }) => $xxxlAlignItems && generateAlignItemsStyles("xxxl", $xxxlAlignItems), ({ $xxxlAlignContent }) => $xxxlAlignContent && generateAlignContentStyles("xxxl", $xxxlAlignContent), ({ $xxxlDirection }) => $xxxlDirection && generateDirectionStyles("xxxl", $xxxlDirection), ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
36
59
|
function LocalFlex({ ...props }, ref) {
|
|
37
|
-
return
|
|
60
|
+
return /*#__PURE__*/ jsx(StyledFlex, {
|
|
38
61
|
...props,
|
|
39
62
|
ref,
|
|
40
63
|
children: props.children
|
|
41
64
|
});
|
|
42
65
|
}
|
|
43
|
-
var Flex =
|
|
66
|
+
var Flex = /*#__PURE__*/ forwardRef(LocalFlex);
|
|
44
67
|
//#endregion
|
|
45
68
|
export { Flex };
|
package/dist/grid.js
CHANGED
|
@@ -31,12 +31,12 @@ var StyledGrid = styled.div.withConfig({
|
|
|
31
31
|
``
|
|
32
32
|
], ({ $cols }) => `repeat(${$cols || 3}, minmax(0, 1fr))`, ({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.xs, mq("lg"), ({ $gap, theme }) => $gap !== void 0 && $gap !== "none" ? `${$gap}px` : theme.spacing.gridGap.lg, ({ $xsGap }) => $xsGap !== void 0 && generateGapStyles("xs", $xsGap), ({ $smGap }) => $smGap !== void 0 && generateGapStyles("sm", $smGap), ({ $mdGap }) => $mdGap !== void 0 && generateGapStyles("md", $mdGap), ({ $lgGap }) => $lgGap !== void 0 && generateGapStyles("lg", $lgGap), ({ $xlGap }) => $xlGap !== void 0 && generateGapStyles("xl", $xlGap), ({ $xxlGap }) => $xxlGap !== void 0 && generateGapStyles("xxl", $xxlGap), ({ $xxxlGap }) => $xxxlGap !== void 0 && generateGapStyles("xxxl", $xxxlGap), ({ $xsCols }) => $xsCols && generateColsStyles("xs", $xsCols), ({ $smCols }) => $smCols && generateColsStyles("sm", $smCols), ({ $mdCols }) => $mdCols && generateColsStyles("md", $mdCols), ({ $lgCols }) => $lgCols && generateColsStyles("lg", $lgCols), ({ $xlCols }) => $xlCols && generateColsStyles("xl", $xlCols), ({ $xxlCols }) => $xxlCols && generateColsStyles("xxl", $xxlCols), ({ $xxxlCols }) => $xxxlCols && generateColsStyles("xxxl", $xxxlCols));
|
|
33
33
|
function LocalGrid({ ...props }, ref) {
|
|
34
|
-
return
|
|
34
|
+
return /*#__PURE__*/ jsx(StyledGrid, {
|
|
35
35
|
...props,
|
|
36
36
|
ref,
|
|
37
37
|
children: props.children
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
var Grid =
|
|
40
|
+
var Grid = /*#__PURE__*/ forwardRef(LocalGrid);
|
|
41
41
|
//#endregion
|
|
42
42
|
export { Grid };
|
package/dist/icon.js
CHANGED
|
@@ -4,7 +4,7 @@ import { icons } from "lucide-react";
|
|
|
4
4
|
var Icon = ({ name, color, size, className, "aria-label": ariaLabel }) => {
|
|
5
5
|
const LucideIcon = icons[name];
|
|
6
6
|
if (!LucideIcon) return null;
|
|
7
|
-
return
|
|
7
|
+
return /*#__PURE__*/ jsx(LucideIcon, {
|
|
8
8
|
color,
|
|
9
9
|
size,
|
|
10
10
|
className,
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { StyledComponentsRegistry } from "./styled-components/registry.js";
|
|
|
2
2
|
import { GlobalStyles } from "./utils/global.js";
|
|
3
3
|
import { IconArrow, IconCalendar, IconCheck } from "./utils/icons.js";
|
|
4
4
|
import { breakpoints, colors, colorsDark, fontSizes, fonts, lineHeights, mq, shadows, shadowsDark, spacing, theme, themeDark } from "./utils/theme.js";
|
|
5
|
-
import { formElementHeightStyles, fullWidthStyles, generateColSpanStyles, generateColsStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, resetButton, resetInput, statusBorderStyles } from "./utils/mixins.js";
|
|
5
|
+
import { formElementHeightStyles, fullWidthStyles, generateAlignContentStyles, generateAlignItemsStyles, generateColSpanStyles, generateColsStyles, generateDirectionStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, resetButton, resetInput, statusBorderStyles } from "./utils/mixins.js";
|
|
6
6
|
import { createTypographyStyle, styledBlockquote, styledButton, styledButtonBig, styledCode, styledH1, styledH2, styledH3, styledH4, styledH5, styledH6, styledHero1, styledHero2, styledHero3, styledInput, styledInputBig, styledSmall, styledStrong, styledText } from "./utils/typography.js";
|
|
7
7
|
import { CherryThemeProvider, ThemeContext } from "./styled-components/theme-provider.js";
|
|
8
8
|
import { Container } from "./container.js";
|
|
@@ -19,4 +19,4 @@ import { Select, StyledIconWrapper } from "./select.js";
|
|
|
19
19
|
import { Space } from "./space.js";
|
|
20
20
|
import { Textarea } from "./textarea.js";
|
|
21
21
|
import { Toggle } from "./toggle.js";
|
|
22
|
-
export { Box, Button, CherryThemeProvider, Col, Container, Flex, GlobalStyles, Grid, Icon, IconArrow, IconCalendar, IconCheck, Input, MaxWidth, Range, Select, Space, StyledComponentsRegistry, StyledIconWrapper, StyledInputWrapper, StyledLabel, Textarea, ThemeContext, Toggle, breakpoints, buttonStyles, colors, colorsDark, createTypographyStyle, fontSizes, fonts, formElementHeightStyles, fullWidthStyles, generateColSpanStyles, generateColsStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, lineHeights, mq, resetButton, resetInput, shadows, shadowsDark, spacing, statusBorderStyles, styledBlockquote, styledButton, styledButtonBig, styledCode, styledH1, styledH2, styledH3, styledH4, styledH5, styledH6, styledHero1, styledHero2, styledHero3, styledInput, styledInputBig, styledSmall, styledStrong, styledText, theme, themeDark };
|
|
22
|
+
export { Box, Button, CherryThemeProvider, Col, Container, Flex, GlobalStyles, Grid, Icon, IconArrow, IconCalendar, IconCheck, Input, MaxWidth, Range, Select, Space, StyledComponentsRegistry, StyledIconWrapper, StyledInputWrapper, StyledLabel, Textarea, ThemeContext, Toggle, breakpoints, buttonStyles, colors, colorsDark, createTypographyStyle, fontSizes, fonts, formElementHeightStyles, fullWidthStyles, generateAlignContentStyles, generateAlignItemsStyles, generateColSpanStyles, generateColsStyles, generateDirectionStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, lineHeights, mq, resetButton, resetInput, shadows, shadowsDark, spacing, statusBorderStyles, styledBlockquote, styledButton, styledButtonBig, styledCode, styledH1, styledH2, styledH3, styledH4, styledH5, styledH6, styledHero1, styledHero2, styledHero3, styledInput, styledInputBig, styledSmall, styledStrong, styledText, theme, themeDark };
|
package/dist/input.js
CHANGED
|
@@ -8,16 +8,16 @@ import styled, { css } from "styled-components";
|
|
|
8
8
|
//#region src/lib/input.tsx
|
|
9
9
|
var StyledInputWrapper = styled.span.withConfig({
|
|
10
10
|
displayName: "input__StyledInputWrapper",
|
|
11
|
-
componentId: "sc-
|
|
11
|
+
componentId: "sc-df1aa532-0"
|
|
12
12
|
})([
|
|
13
13
|
`display:inline-flex;flex-wrap:`,
|
|
14
14
|
`;align-items:center;`,
|
|
15
15
|
` & .icon-calendar{position:absolute;top:50%;right:17px;left:initial;transform:translateY(-50%);pointer-events:none;width:24px;height:24px;@supports (-moz-appearance:none){display:none;}}`,
|
|
16
16
|
``
|
|
17
|
-
], ({ type }) => type === "checkbox" || type === "radio" ? "nowrap" : "wrap", ({ $label }) => $label && css([`gap:5px;align-items:flex-start;`]), ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
17
|
+
], ({ type }) => type === "checkbox" || type === "radio" ? "nowrap" : "wrap", ({ $label }) => $label && css([`gap:5px;align-items:flex-start;align-content:flex-start;`]), ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
18
18
|
var StyledLabel = styled.label.withConfig({
|
|
19
19
|
displayName: "input__StyledLabel",
|
|
20
|
-
componentId: "sc-
|
|
20
|
+
componentId: "sc-df1aa532-1"
|
|
21
21
|
})([
|
|
22
22
|
`display:inline-block;color:`,
|
|
23
23
|
`;font-size:`,
|
|
@@ -26,7 +26,7 @@ var StyledLabel = styled.label.withConfig({
|
|
|
26
26
|
], ({ theme }) => theme.colors.grayDark, ({ theme }) => theme.fontSizes.small.lg, ({ theme }) => theme.lineHeights.small.lg);
|
|
27
27
|
var StyledInput = styled.input.withConfig({
|
|
28
28
|
displayName: "input__StyledInput",
|
|
29
|
-
componentId: "sc-
|
|
29
|
+
componentId: "sc-df1aa532-2"
|
|
30
30
|
})([
|
|
31
31
|
``,
|
|
32
32
|
`;`,
|
|
@@ -35,7 +35,7 @@ var StyledInput = styled.input.withConfig({
|
|
|
35
35
|
`;background:`,
|
|
36
36
|
`;border:solid 2px `,
|
|
37
37
|
`;box-shadow:0 0 0 0px `,
|
|
38
|
-
`;transition:all 0.3s ease;word-break:keep-all;white-space:nowrap;display:inline-flex
|
|
38
|
+
`;transition:all 0.3s ease;word-break:keep-all;white-space:nowrap;display:inline-flex;&::-webkit-datetime-edit{padding:0;margin:0;vertical-align:middle;}&::-webkit-datetime-edit-fields-wrapper{padding:4px 0;margin:0;vertical-align:middle;}&::-webkit-calendar-picker-indicator{background:transparent;cursor:pointer;position:absolute;right:15px;top:50%;transform:translateY(-50%);width:24px;height:24px;}&::-webkit-datetime-edit-text{color:`,
|
|
39
39
|
`;}&::-webkit-datetime-edit-month-field{&:focus{background:`,
|
|
40
40
|
`;color:`,
|
|
41
41
|
`;border-radius:4px;}}&::-webkit-datetime-edit-day-field{&:focus{background:`,
|
|
@@ -76,11 +76,11 @@ var StyledInput = styled.input.withConfig({
|
|
|
76
76
|
`, ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
77
77
|
var StyledIconWrapper = styled.span.withConfig({
|
|
78
78
|
displayName: "input__StyledIconWrapper",
|
|
79
|
-
componentId: "sc-
|
|
79
|
+
componentId: "sc-df1aa532-3"
|
|
80
80
|
})([`display:inline-flex;position:relative;line-height:0;min-width:fit-content;& em{display:block;border-radius:50%;background:`, `;}& svg,& em{object-fit:contain;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(0.7);opacity:0;pointer-events:none;transition:all 0.3s ease;}`], ({ theme }) => theme.colors.primary);
|
|
81
81
|
var StyledRadioCheckboxInput = styled.input.withConfig({
|
|
82
82
|
displayName: "input__StyledRadioCheckboxInput",
|
|
83
|
-
componentId: "sc-
|
|
83
|
+
componentId: "sc-df1aa532-4"
|
|
84
84
|
})([
|
|
85
85
|
``,
|
|
86
86
|
`;display:inline-block;background:`,
|
|
@@ -165,53 +165,53 @@ var StyledRadioCheckboxInput = styled.input.withConfig({
|
|
|
165
165
|
});
|
|
166
166
|
var StyledCustomIconWrapper = styled.span.withConfig({
|
|
167
167
|
displayName: "input__StyledCustomIconWrapper",
|
|
168
|
-
componentId: "sc-
|
|
168
|
+
componentId: "sc-df1aa532-5"
|
|
169
169
|
})([
|
|
170
170
|
`position:relative;`,
|
|
171
171
|
`;& svg{position:absolute;top:50%;transform:translateY(-50%);pointer-events:none;width:24px;height:24px;object-fit:contain;color:`,
|
|
172
172
|
`;}`,
|
|
173
|
-
|
|
173
|
+
` &:has(.icon-calendar) > input{padding-right:45px;@supports (-moz-appearance:none){padding-right:15px;}}`
|
|
174
174
|
], ({ $fullWidth }) => fullWidthStyles($fullWidth), ({ theme }) => theme.colors.primary, ({ $icon, $iconPosition }) => $icon && $iconPosition === "right" ? css([`& svg{right:16px;}& input{padding-right:50px;}`]) : css([`& svg{left:16px;}& svg ~ input{padding-left:50px;}`]));
|
|
175
175
|
function LocalInput({ ...props }, ref) {
|
|
176
|
-
if (props.type === "checkbox" || props.type === "radio") return
|
|
176
|
+
if (props.type === "checkbox" || props.type === "radio") return /*#__PURE__*/ jsxs(StyledInputWrapper, {
|
|
177
177
|
$fullWidth: props.$fullWidth,
|
|
178
178
|
type: props.type,
|
|
179
179
|
$label: props.$label,
|
|
180
180
|
className: props.$wrapperClassName,
|
|
181
|
-
children: [
|
|
181
|
+
children: [/*#__PURE__*/ jsxs(StyledIconWrapper, { children: [/*#__PURE__*/ jsx(StyledRadioCheckboxInput, {
|
|
182
182
|
...props,
|
|
183
183
|
"aria-invalid": props.$error || void 0,
|
|
184
184
|
ref
|
|
185
|
-
}), !props.disabled && props.type === "checkbox" ?
|
|
185
|
+
}), !props.disabled && props.type === "checkbox" ? /*#__PURE__*/ jsx(IconCheck, {}) : /*#__PURE__*/ jsx("em", {})] }), props.$label && /*#__PURE__*/ jsx(StyledLabel, {
|
|
186
186
|
htmlFor: props.id,
|
|
187
187
|
children: props.$label
|
|
188
188
|
})]
|
|
189
189
|
});
|
|
190
|
-
return
|
|
190
|
+
return /*#__PURE__*/ jsxs(StyledInputWrapper, {
|
|
191
191
|
$fullWidth: props.$fullWidth,
|
|
192
192
|
type: props.type,
|
|
193
193
|
$label: props.$label,
|
|
194
194
|
className: props.$wrapperClassName,
|
|
195
|
-
children: [props.$label &&
|
|
195
|
+
children: [props.$label && /*#__PURE__*/ jsx(StyledLabel, {
|
|
196
196
|
htmlFor: props.id,
|
|
197
197
|
children: props.$label
|
|
198
|
-
}),
|
|
198
|
+
}), /*#__PURE__*/ jsxs(StyledCustomIconWrapper, {
|
|
199
199
|
$fullWidth: props.$fullWidth,
|
|
200
200
|
$iconPosition: props.$iconPosition,
|
|
201
201
|
$icon: props.$icon,
|
|
202
202
|
children: [
|
|
203
203
|
props.$iconPosition !== "right" && props.$icon && props.$icon,
|
|
204
|
-
|
|
204
|
+
/*#__PURE__*/ jsx(StyledInput, {
|
|
205
205
|
...props,
|
|
206
206
|
"aria-invalid": props.$error || void 0,
|
|
207
207
|
ref
|
|
208
208
|
}),
|
|
209
209
|
props.$iconPosition === "right" && props.$icon && props.$icon,
|
|
210
|
-
(props.type === "date" || props.type === "datetime-local" || props.type === "month" || props.type === "week" || props.type === "time") &&
|
|
210
|
+
(props.type === "date" || props.type === "datetime-local" || props.type === "month" || props.type === "week" || props.type === "time") && /*#__PURE__*/ jsx(IconCalendar, { className: "icon-calendar" })
|
|
211
211
|
]
|
|
212
212
|
})]
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
|
-
var Input =
|
|
215
|
+
var Input = /*#__PURE__*/ forwardRef(LocalInput);
|
|
216
216
|
//#endregion
|
|
217
217
|
export { Input, StyledInputWrapper, StyledLabel };
|
package/dist/max-width.js
CHANGED
|
@@ -39,12 +39,12 @@ var StyledMaxWidth = styled.div.withConfig({
|
|
|
39
39
|
${$size && styles($size)};
|
|
40
40
|
`, (props) => responsiveStyles(props));
|
|
41
41
|
function LocalMaxWidth({ ...props }, ref) {
|
|
42
|
-
return
|
|
42
|
+
return /*#__PURE__*/ jsx(StyledMaxWidth, {
|
|
43
43
|
...props,
|
|
44
44
|
ref,
|
|
45
45
|
children: props.children
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
var MaxWidth =
|
|
48
|
+
var MaxWidth = /*#__PURE__*/ forwardRef(LocalMaxWidth);
|
|
49
49
|
//#endregion
|
|
50
50
|
export { MaxWidth };
|
package/dist/range.js
CHANGED
|
@@ -144,13 +144,13 @@ var StyledInput = styled.input.withConfig({
|
|
|
144
144
|
`;
|
|
145
145
|
});
|
|
146
146
|
function LocalRange({ ...props }, ref) {
|
|
147
|
-
return
|
|
147
|
+
return /*#__PURE__*/ jsxs(StyledInputWrapper, {
|
|
148
148
|
$fullWidth: props.$fullWidth,
|
|
149
149
|
className: props.$wrapperClassName,
|
|
150
|
-
children: [props.$label &&
|
|
150
|
+
children: [props.$label && /*#__PURE__*/ jsx(StyledLabel, {
|
|
151
151
|
htmlFor: props.id,
|
|
152
152
|
children: props.$label
|
|
153
|
-
}),
|
|
153
|
+
}), /*#__PURE__*/ jsx(StyledInput, {
|
|
154
154
|
...props,
|
|
155
155
|
"aria-invalid": props.$error || void 0,
|
|
156
156
|
type: "range",
|
|
@@ -158,6 +158,6 @@ function LocalRange({ ...props }, ref) {
|
|
|
158
158
|
})]
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
|
-
var Range =
|
|
161
|
+
var Range = /*#__PURE__*/ forwardRef(LocalRange);
|
|
162
162
|
//#endregion
|
|
163
163
|
export { Range };
|
package/dist/select.js
CHANGED
|
@@ -41,24 +41,24 @@ var StyledIconWrapper = styled.span.withConfig({
|
|
|
41
41
|
componentId: "sc-b63bf03d-1"
|
|
42
42
|
})([`position:relative;`, ` & svg{position:absolute;top:50%;right:15px;transform:translateY(-50%) rotate(0);transition:all 0.3s ease;pointer-events:none;}& select{padding-right:40px;}& select:active:not([disabled]) ~ svg,& select:focus:not([disabled]) ~ svg{transform:translateY(-50%) rotate(180deg);}`], ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
43
43
|
function LocalSelect({ ...props }, ref) {
|
|
44
|
-
return
|
|
44
|
+
return /*#__PURE__*/ jsxs(StyledInputWrapper, {
|
|
45
45
|
$fullWidth: props.$fullWidth,
|
|
46
46
|
$label: props.$label,
|
|
47
47
|
className: props.$wrapperClassName,
|
|
48
|
-
children: [props.$label &&
|
|
48
|
+
children: [props.$label && /*#__PURE__*/ jsx(StyledLabel, {
|
|
49
49
|
htmlFor: props.id,
|
|
50
50
|
children: props.$label
|
|
51
|
-
}),
|
|
51
|
+
}), /*#__PURE__*/ jsxs(StyledIconWrapper, {
|
|
52
52
|
$fullWidth: props.$fullWidth,
|
|
53
|
-
children: [
|
|
53
|
+
children: [/*#__PURE__*/ jsx(StyledSelect, {
|
|
54
54
|
...props,
|
|
55
55
|
"aria-invalid": props.$error || void 0,
|
|
56
56
|
ref,
|
|
57
57
|
children: props.children
|
|
58
|
-
}),
|
|
58
|
+
}), /*#__PURE__*/ jsx(IconArrow, { "aria-hidden": "true" })]
|
|
59
59
|
})]
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
var Select =
|
|
62
|
+
var Select = /*#__PURE__*/ forwardRef(LocalSelect);
|
|
63
63
|
//#endregion
|
|
64
64
|
export { Select, StyledIconWrapper };
|
package/dist/space.js
CHANGED
|
@@ -41,11 +41,11 @@ var StyledSpace = styled.span.withConfig({
|
|
|
41
41
|
``
|
|
42
42
|
], ({ $horizontal, $size }) => $size ? styles($size, $horizontal || false) : "", (props) => responsiveStyles(props));
|
|
43
43
|
function LocalSpace({ ...props }, ref) {
|
|
44
|
-
return
|
|
44
|
+
return /*#__PURE__*/ jsx(StyledSpace, {
|
|
45
45
|
...props,
|
|
46
46
|
ref
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
var Space =
|
|
49
|
+
var Space = /*#__PURE__*/ forwardRef(LocalSpace);
|
|
50
50
|
//#endregion
|
|
51
51
|
export { Space };
|
|
@@ -11,9 +11,9 @@ function StyledComponentsRegistry({ children }) {
|
|
|
11
11
|
useServerInsertedHTML(() => {
|
|
12
12
|
const styles = styledComponentsStyleSheet.getStyleElement();
|
|
13
13
|
styledComponentsStyleSheet.instance.clearTag();
|
|
14
|
-
return
|
|
14
|
+
return /*#__PURE__*/ jsx(Fragment, { children: styles });
|
|
15
15
|
});
|
|
16
|
-
return
|
|
16
|
+
return /*#__PURE__*/ jsx(StyleSheetManager, {
|
|
17
17
|
sheet: isServer ? styledComponentsStyleSheet.instance : void 0,
|
|
18
18
|
enableVendorPrefixes: true,
|
|
19
19
|
children
|
|
@@ -5,7 +5,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { createContext, useEffect, useState } from "react";
|
|
6
6
|
import { ThemeProvider } from "styled-components";
|
|
7
7
|
//#region src/lib/styled-components/theme-provider.tsx
|
|
8
|
-
var ThemeContext =
|
|
8
|
+
var ThemeContext = /*#__PURE__*/ createContext({ setTheme: () => {} });
|
|
9
9
|
function CherryThemeProvider({ children, theme, themeDark }) {
|
|
10
10
|
const [currentTheme, setTheme] = useState(theme);
|
|
11
11
|
useEffect(() => {
|
|
@@ -19,11 +19,11 @@ function CherryThemeProvider({ children, theme, themeDark }) {
|
|
|
19
19
|
}
|
|
20
20
|
}, [theme, themeDark]);
|
|
21
21
|
const GlobalStylesComponent = GlobalStyles(currentTheme);
|
|
22
|
-
return
|
|
22
|
+
return /*#__PURE__*/ jsx(ThemeProvider, {
|
|
23
23
|
theme: currentTheme,
|
|
24
|
-
children:
|
|
24
|
+
children: /*#__PURE__*/ jsxs(ThemeContext.Provider, {
|
|
25
25
|
value: { setTheme },
|
|
26
|
-
children: [
|
|
26
|
+
children: [/*#__PURE__*/ jsx(GlobalStylesComponent, {}), children]
|
|
27
27
|
})
|
|
28
28
|
});
|
|
29
29
|
}
|
package/dist/textarea.js
CHANGED
|
@@ -41,15 +41,15 @@ var StyledTextarea = styled.textarea.withConfig({
|
|
|
41
41
|
color: ${theme.colors.gray};
|
|
42
42
|
`, ({ $fullWidth }) => fullWidthStyles($fullWidth));
|
|
43
43
|
function LocalTextarea({ ...props }, ref) {
|
|
44
|
-
return
|
|
44
|
+
return /*#__PURE__*/ jsxs(StyledInputWrapper, {
|
|
45
45
|
$fullWidth: props.$fullWidth,
|
|
46
46
|
$label: props.$label,
|
|
47
47
|
className: props.$wrapperClassName,
|
|
48
|
-
children: [props.$label &&
|
|
48
|
+
children: [props.$label && /*#__PURE__*/ jsx(StyledLabel, {
|
|
49
49
|
htmlFor: props.id,
|
|
50
50
|
$label: props.$label,
|
|
51
51
|
children: props.$label
|
|
52
|
-
}),
|
|
52
|
+
}), /*#__PURE__*/ jsx(StyledTextarea, {
|
|
53
53
|
...props,
|
|
54
54
|
"aria-invalid": props.$error || void 0,
|
|
55
55
|
ref,
|
|
@@ -57,6 +57,6 @@ function LocalTextarea({ ...props }, ref) {
|
|
|
57
57
|
})]
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
var Textarea =
|
|
60
|
+
var Textarea = /*#__PURE__*/ forwardRef(LocalTextarea);
|
|
61
61
|
//#endregion
|
|
62
62
|
export { Textarea };
|
package/dist/toggle.js
CHANGED
|
@@ -57,26 +57,26 @@ var StyledToggle = styled.input.withConfig({
|
|
|
57
57
|
}
|
|
58
58
|
}`);
|
|
59
59
|
function LocalToggle({ type = "checkbox", ...props }, ref) {
|
|
60
|
-
return
|
|
60
|
+
return /*#__PURE__*/ jsxs(StyledInputWrapper, {
|
|
61
61
|
$fullWidth: props.$fullWidth,
|
|
62
62
|
$label: props.$label,
|
|
63
63
|
className: props.$wrapperClassName,
|
|
64
|
-
children: [
|
|
64
|
+
children: [/*#__PURE__*/ jsxs(StyledToggleWrapper, { children: [/*#__PURE__*/ jsx(StyledToggle, {
|
|
65
65
|
...props,
|
|
66
66
|
type,
|
|
67
67
|
role: "switch",
|
|
68
68
|
ref
|
|
69
|
-
}),
|
|
69
|
+
}), /*#__PURE__*/ jsx(StyledFakeToggle, {
|
|
70
70
|
$error: props.$error,
|
|
71
71
|
$success: props.$success,
|
|
72
72
|
className: "fake-toggle",
|
|
73
73
|
$size: props.$size
|
|
74
|
-
})] }), props.$label &&
|
|
74
|
+
})] }), props.$label && /*#__PURE__*/ jsx(StyledLabel, {
|
|
75
75
|
htmlFor: props.id,
|
|
76
76
|
children: props.$label
|
|
77
77
|
})]
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
var Toggle =
|
|
80
|
+
var Toggle = /*#__PURE__*/ forwardRef(LocalToggle);
|
|
81
81
|
//#endregion
|
|
82
82
|
export { Toggle };
|
package/dist/utils/icons.js
CHANGED
|
@@ -5,14 +5,14 @@ import { useTheme } from "styled-components";
|
|
|
5
5
|
//#region src/lib/utils/icons.tsx
|
|
6
6
|
function IconCheck({ ...props }) {
|
|
7
7
|
const theme = useTheme();
|
|
8
|
-
return
|
|
8
|
+
return /*#__PURE__*/ jsx("svg", {
|
|
9
9
|
width: "12",
|
|
10
10
|
height: "10",
|
|
11
11
|
viewBox: "0 0 12 10",
|
|
12
12
|
fill: "none",
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
...props,
|
|
15
|
-
children:
|
|
15
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
16
16
|
d: "M10 2L4.4 8L2 5.75",
|
|
17
17
|
stroke: theme.colors.primary,
|
|
18
18
|
strokeWidth: "3",
|
|
@@ -23,14 +23,14 @@ function IconCheck({ ...props }) {
|
|
|
23
23
|
}
|
|
24
24
|
function IconArrow({ ...props }) {
|
|
25
25
|
const theme = useTheme();
|
|
26
|
-
return
|
|
26
|
+
return /*#__PURE__*/ jsx("svg", {
|
|
27
27
|
width: "16",
|
|
28
28
|
height: "10",
|
|
29
29
|
viewBox: "0 0 16 10",
|
|
30
30
|
fill: "none",
|
|
31
31
|
xmlns: "http://www.w3.org/2000/svg",
|
|
32
32
|
...props,
|
|
33
|
-
children:
|
|
33
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
34
34
|
d: "M2 2L8 8L14 2",
|
|
35
35
|
stroke: theme.colors.primary,
|
|
36
36
|
strokeWidth: "3",
|
|
@@ -40,7 +40,7 @@ function IconArrow({ ...props }) {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
function IconCalendar({ ...props }) {
|
|
43
|
-
return
|
|
43
|
+
return /*#__PURE__*/ jsxs("svg", {
|
|
44
44
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45
45
|
width: "24",
|
|
46
46
|
height: "24",
|
|
@@ -52,22 +52,22 @@ function IconCalendar({ ...props }) {
|
|
|
52
52
|
strokeLinejoin: "round",
|
|
53
53
|
...props,
|
|
54
54
|
children: [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
/*#__PURE__*/ jsx("path", { d: "M8 2v4" }),
|
|
56
|
+
/*#__PURE__*/ jsx("path", { d: "M16 2v4" }),
|
|
57
|
+
/*#__PURE__*/ jsx("rect", {
|
|
58
58
|
width: "18",
|
|
59
59
|
height: "18",
|
|
60
60
|
x: "3",
|
|
61
61
|
y: "4",
|
|
62
62
|
rx: "2"
|
|
63
63
|
}),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
/*#__PURE__*/ jsx("path", { d: "M3 10h18" }),
|
|
65
|
+
/*#__PURE__*/ jsx("path", { d: "M8 14h.01" }),
|
|
66
|
+
/*#__PURE__*/ jsx("path", { d: "M12 14h.01" }),
|
|
67
|
+
/*#__PURE__*/ jsx("path", { d: "M16 14h.01" }),
|
|
68
|
+
/*#__PURE__*/ jsx("path", { d: "M8 18h.01" }),
|
|
69
|
+
/*#__PURE__*/ jsx("path", { d: "M12 18h.01" }),
|
|
70
|
+
/*#__PURE__*/ jsx("path", { d: "M16 18h.01" })
|
|
71
71
|
]
|
|
72
72
|
});
|
|
73
73
|
}
|
|
@@ -9,3 +9,6 @@ export declare const generateColsStyles: (size: keyof Breakpoints<number>, cols:
|
|
|
9
9
|
export declare const generateColSpanStyles: (size: keyof Breakpoints<number>, span: number) => import('styled-components').RuleSet<object>;
|
|
10
10
|
export declare const generatePaddingStyles: (size: keyof Breakpoints<number>, padding: number | "none") => import('styled-components').RuleSet<object>;
|
|
11
11
|
export declare const generateJustifyContentStyles: (size: keyof Breakpoints<number>, justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly") => import('styled-components').RuleSet<object>;
|
|
12
|
+
export declare const generateAlignItemsStyles: (size: keyof Breakpoints<number>, alignItems?: "stretch" | "center" | "flex-start" | "flex-end" | "baseline") => import('styled-components').RuleSet<object>;
|
|
13
|
+
export declare const generateAlignContentStyles: (size: keyof Breakpoints<number>, alignContent?: "stretch" | "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly") => import('styled-components').RuleSet<object>;
|
|
14
|
+
export declare const generateDirectionStyles: (size: keyof Breakpoints<number>, direction?: "row" | "column" | "row-reverse" | "column-reverse") => import('styled-components').RuleSet<object>;
|
package/dist/utils/mixins.js
CHANGED
|
@@ -42,5 +42,20 @@ var generateJustifyContentStyles = (size, justifyContent) => css([
|
|
|
42
42
|
`{justify-content:`,
|
|
43
43
|
`;}`
|
|
44
44
|
], mq(size), justifyContent && `${justifyContent}`);
|
|
45
|
+
var generateAlignItemsStyles = (size, alignItems) => css([
|
|
46
|
+
``,
|
|
47
|
+
`{align-items:`,
|
|
48
|
+
`;}`
|
|
49
|
+
], mq(size), alignItems && `${alignItems}`);
|
|
50
|
+
var generateAlignContentStyles = (size, alignContent) => css([
|
|
51
|
+
``,
|
|
52
|
+
`{align-content:`,
|
|
53
|
+
`;}`
|
|
54
|
+
], mq(size), alignContent && `${alignContent}`);
|
|
55
|
+
var generateDirectionStyles = (size, direction) => css([
|
|
56
|
+
``,
|
|
57
|
+
`{flex-direction:`,
|
|
58
|
+
`;}`
|
|
59
|
+
], mq(size), direction && `${direction}`);
|
|
45
60
|
//#endregion
|
|
46
|
-
export { formElementHeightStyles, fullWidthStyles, generateColSpanStyles, generateColsStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, resetButton, resetInput, statusBorderStyles };
|
|
61
|
+
export { formElementHeightStyles, fullWidthStyles, generateAlignContentStyles, generateAlignItemsStyles, generateColSpanStyles, generateColsStyles, generateDirectionStyles, generateGapStyles, generateJustifyContentStyles, generatePaddingStyles, resetButton, resetInput, statusBorderStyles };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cherry-styled-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
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": "^1.
|
|
44
|
+
"lucide-react": "^1.21.0",
|
|
45
45
|
"polished": "^4.3.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
@@ -50,21 +50,21 @@
|
|
|
50
50
|
"styled-components": "^6.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@swc/plugin-styled-components": "^12.
|
|
54
|
-
"@types/node": "^
|
|
55
|
-
"@types/react": "^19.2.
|
|
53
|
+
"@swc/plugin-styled-components": "^12.14.0",
|
|
54
|
+
"@types/node": "^26.0.1",
|
|
55
|
+
"@types/react": "^19.2.17",
|
|
56
56
|
"@types/react-dom": "^19.2.3",
|
|
57
|
-
"@vitejs/plugin-react-swc": "^4.3.
|
|
58
|
-
"eslint-plugin-react-hooks": "^7.
|
|
59
|
-
"eslint-plugin-react-refresh": "^0.5.
|
|
60
|
-
"next": "^16.2.
|
|
61
|
-
"prettier": "^3.
|
|
62
|
-
"react": "^19.2.
|
|
63
|
-
"react-dom": "^19.2.
|
|
57
|
+
"@vitejs/plugin-react-swc": "^4.3.1",
|
|
58
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
59
|
+
"eslint-plugin-react-refresh": "^0.5.3",
|
|
60
|
+
"next": "^16.2.9",
|
|
61
|
+
"prettier": "^3.9.1",
|
|
62
|
+
"react": "^19.2.7",
|
|
63
|
+
"react-dom": "^19.2.7",
|
|
64
64
|
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
65
|
-
"styled-components": "^6.3
|
|
66
|
-
"typescript": "^6.0.
|
|
67
|
-
"vite": "^8.0
|
|
68
|
-
"vite-plugin-dts": "^
|
|
65
|
+
"styled-components": "^6.4.3",
|
|
66
|
+
"typescript": "^6.0.3",
|
|
67
|
+
"vite": "^8.1.0",
|
|
68
|
+
"vite-plugin-dts": "^5.0.3"
|
|
69
69
|
}
|
|
70
70
|
}
|
package/dist/src/lib/flex.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
type JustifyContentType = "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
|
|
3
|
-
type GapType = number | "none";
|
|
4
|
-
interface FlexProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
$justifyContent?: JustifyContentType;
|
|
7
|
-
$xsJustifyContent?: JustifyContentType;
|
|
8
|
-
$smJustifyContent?: JustifyContentType;
|
|
9
|
-
$mdJustifyContent?: JustifyContentType;
|
|
10
|
-
$lgJustifyContent?: JustifyContentType;
|
|
11
|
-
$xlJustifyContent?: JustifyContentType;
|
|
12
|
-
$xxlJustifyContent?: JustifyContentType;
|
|
13
|
-
$xxxlJustifyContent?: JustifyContentType;
|
|
14
|
-
$wrap?: "wrap" | "nowrap" | "wrap-reverse";
|
|
15
|
-
$gap?: GapType;
|
|
16
|
-
$xsGap?: GapType;
|
|
17
|
-
$smGap?: GapType;
|
|
18
|
-
$mdGap?: GapType;
|
|
19
|
-
$lgGap?: GapType;
|
|
20
|
-
$xlGap?: GapType;
|
|
21
|
-
$xxlGap?: GapType;
|
|
22
|
-
$xxxlGap?: GapType;
|
|
23
|
-
$direction?: "row" | "column" | "row-reverse" | "column-reverse";
|
|
24
|
-
$fullWidth?: boolean;
|
|
25
|
-
}
|
|
26
|
-
declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
-
export { Flex };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|