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.
Files changed (50) hide show
  1. package/dist/box.js +20 -11
  2. package/dist/button.js +80 -150
  3. package/dist/col.js +26 -18
  4. package/dist/container.js +32 -30
  5. package/dist/flex.js +39 -34
  6. package/dist/grid.js +36 -33
  7. package/dist/icon.js +14 -23
  8. package/dist/index.js +9 -76
  9. package/dist/input.js +136 -312
  10. package/dist/max-width.js +41 -26
  11. package/dist/range.js +74 -141
  12. package/dist/select.js +56 -100
  13. package/dist/space.js +38 -24
  14. package/dist/styled-components/registry.js +17 -19
  15. package/dist/styled-components/theme-provider.js +27 -31
  16. package/dist/textarea.js +49 -73
  17. package/dist/toggle.js +66 -121
  18. package/dist/utils/global.js +11 -92
  19. package/dist/utils/icons.js +66 -77
  20. package/dist/utils/mixins.js +41 -83
  21. package/dist/utils/theme.js +265 -142
  22. package/dist/utils/typography.js +31 -49
  23. package/package.json +10 -9
  24. /package/dist/{App.d.ts → src/App.d.ts} +0 -0
  25. /package/dist/{lib → src/lib}/box.d.ts +0 -0
  26. /package/dist/{lib → src/lib}/button.d.ts +0 -0
  27. /package/dist/{lib → src/lib}/col.d.ts +0 -0
  28. /package/dist/{lib → src/lib}/container.d.ts +0 -0
  29. /package/dist/{lib → src/lib}/flex.d.ts +0 -0
  30. /package/dist/{lib → src/lib}/grid.d.ts +0 -0
  31. /package/dist/{lib → src/lib}/icon.d.ts +0 -0
  32. /package/dist/{lib → src/lib}/index.d.ts +0 -0
  33. /package/dist/{lib → src/lib}/input.d.ts +0 -0
  34. /package/dist/{lib → src/lib}/max-width.d.ts +0 -0
  35. /package/dist/{lib → src/lib}/range.d.ts +0 -0
  36. /package/dist/{lib → src/lib}/select.d.ts +0 -0
  37. /package/dist/{lib → src/lib}/space.d.ts +0 -0
  38. /package/dist/{lib → src/lib}/styled-components/index.d.ts +0 -0
  39. /package/dist/{lib → src/lib}/styled-components/registry.d.ts +0 -0
  40. /package/dist/{lib → src/lib}/styled-components/theme-provider.d.ts +0 -0
  41. /package/dist/{lib → src/lib}/textarea.d.ts +0 -0
  42. /package/dist/{lib → src/lib}/toggle.d.ts +0 -0
  43. /package/dist/{lib → src/lib}/utils/global.d.ts +0 -0
  44. /package/dist/{lib → src/lib}/utils/icons.d.ts +0 -0
  45. /package/dist/{lib → src/lib}/utils/index.d.ts +0 -0
  46. /package/dist/{lib → src/lib}/utils/mixins.d.ts +0 -0
  47. /package/dist/{lib → src/lib}/utils/theme.d.ts +0 -0
  48. /package/dist/{lib → src/lib}/utils/typography.d.ts +0 -0
  49. /package/dist/{main.d.ts → src/main.d.ts} +0 -0
  50. /package/dist/{toggle-theme.d.ts → src/toggle-theme.d.ts} +0 -0
package/dist/box.js CHANGED
@@ -1,17 +1,26 @@
1
1
  "use client";
2
+ "use client";
3
+ import { Container } from "./container.js";
2
4
  import { jsx } from "react/jsx-runtime";
3
5
  import { forwardRef } from "react";
4
6
  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
- `;
7
+ //#region src/lib/box.tsx
8
+ var StyledBox = styled(Container).withConfig({
9
+ displayName: "box__StyledBox",
10
+ componentId: "sc-3e07b0c8-0"
11
+ })([
12
+ `background:`,
13
+ `;border-radius:`,
14
+ `;border:solid 1px `,
15
+ `;`
16
+ ], ({ theme }) => theme.colors.light, ({ theme }) => theme.spacing.radius.lg, ({ theme }) => theme.colors.grayLight);
11
17
  function LocalBox({ ...props }, ref) {
12
- return /* @__PURE__ */ jsx(StyledBox, { ...props, ref, children: props.children });
18
+ return /* @__PURE__ */ jsx(StyledBox, {
19
+ ...props,
20
+ ref,
21
+ children: props.children
22
+ });
13
23
  }
14
- const Box = forwardRef(LocalBox);
15
- export {
16
- Box
17
- };
24
+ var Box = /* @__PURE__ */ forwardRef(LocalBox);
25
+ //#endregion
26
+ export { Box };
package/dist/button.js CHANGED
@@ -1,167 +1,97 @@
1
1
  "use client";
2
+ "use client";
3
+ import { formElementHeightStyles, resetButton } from "./utils/mixins.js";
2
4
  import { jsxs } from "react/jsx-runtime";
3
5
  import { forwardRef } from "react";
4
6
  import styled, { css } from "styled-components";
5
7
  import { darken, lighten } from "polished";
6
- import { resetButton, formElementHeightStyles } from "./utils/mixins.js";
7
- const buttonStyles = (theme, $variant, $size, $outline, $fullWidth, $error, disabled) => css`
8
- ${resetButton};
9
- font-family: inherit;
10
- display: inline-flex;
11
- padding: 15px 30px;
12
- border-radius: 100px;
13
- font-weight: 600;
14
- white-space: nowrap;
15
- hyphens: auto;
16
- color: ${theme.isDark ? theme.colors.dark : theme.colors.light};
17
- text-decoration: none;
18
- transition: all 0.3s ease;
19
- text-align: center;
20
- gap: 10px;
21
- text-overflow: ellipsis;
22
- justify-content: center;
23
- align-items: center;
24
- min-height: fit-content;
25
-
26
- & .icon,
27
- & .lucide {
28
- margin: auto 0;
29
- }
30
-
31
- ${!disabled && $variant === "primary" && css`
32
- color: ${$outline ? theme.colors.primary : theme.isDark ? theme.colors.dark : theme.colors.light};
33
- background: ${$outline ? "transparent" : theme.colors.primary};
34
- border: solid 2px ${theme.colors.primary};
35
- box-shadow: 0 0 0 0px ${theme.colors.primary};
36
-
37
- &:hover {
38
- background: ${$outline ? "transparent" : theme.colors.primaryDark};
39
- border-color: ${theme.colors.primaryDark};
40
- ${$outline && `color: ${theme.colors.primaryDark}`};
41
- }
42
-
43
- &:focus {
44
- box-shadow: 0 0 0 4px ${theme.colors.primaryLight};
45
- }
46
-
47
- &:active {
48
- box-shadow: 0 0 0 2px ${theme.colors.primaryLight};
49
- }
50
- `}
51
-
52
- ${!disabled && $variant === "secondary" && css`
53
- color: ${$outline ? theme.colors.secondary : theme.isDark ? theme.colors.dark : theme.colors.light};
54
- background: ${$outline ? "transparent" : theme.colors.secondary};
55
- border: solid 2px ${theme.colors.secondary};
56
- box-shadow: 0 0 0 0px ${theme.colors.secondary};
57
-
58
- &:hover {
59
- background: ${$outline ? "transparent" : theme.colors.secondaryDark};
60
- border-color: ${theme.colors.secondaryDark};
61
- ${$outline && `color: ${theme.colors.secondaryDark}`};
62
- }
63
-
64
- &:focus {
65
- box-shadow: 0 0 0 4px ${theme.colors.secondaryLight};
66
- }
67
-
68
- &:active {
69
- box-shadow: 0 0 0 2px ${theme.colors.secondaryLight};
70
- }
71
- `}
72
-
73
- ${!disabled && $variant === "tertiary" && css`
74
- color: ${$outline ? theme.colors.tertiary : theme.isDark ? theme.colors.dark : theme.colors.light};
75
- background: ${$outline ? "transparent" : theme.colors.tertiary};
76
- border: solid 2px ${theme.colors.tertiary};
77
- box-shadow: 0 0 0 0px ${theme.colors.tertiary};
78
-
79
- &:hover {
80
- background: ${$outline ? "transparent" : theme.colors.tertiaryDark};
81
- border-color: ${theme.colors.tertiaryDark};
82
- ${$outline && `color: ${theme.colors.tertiaryDark}`};
83
- }
84
-
85
- &:focus {
86
- box-shadow: 0 0 0 4px ${theme.colors.tertiaryLight};
87
- }
88
-
89
- &:active {
90
- box-shadow: 0 0 0 2px ${theme.colors.tertiaryLight};
91
- }
92
- `}
93
-
94
- ${!disabled && $error && css`
95
- color: ${$outline ? theme.colors.error : theme.isDark ? theme.colors.dark : theme.colors.light};
96
- background: ${$outline ? "transparent" : theme.colors.error};
97
- border: solid 2px ${theme.colors.error};
98
- box-shadow: 0 0 0 0px ${theme.colors.error};
99
-
100
- &:hover {
101
- background: ${$outline ? "transparent" : darken(0.1, theme.colors.error)};
102
- border-color: ${darken(0.1, theme.colors.error)};
103
- ${$outline && `color: ${darken(0.1, theme.colors.error)}`};
104
- }
105
-
106
- &:focus {
107
- box-shadow: 0 0 0 4px ${lighten(0.1, theme.colors.error)};
108
- }
109
-
110
- &:active {
111
- box-shadow: 0 0 0 2px ${lighten(0.1, theme.colors.error)};
112
- }
113
- `}
114
-
115
-
116
- ${formElementHeightStyles($size)}
117
-
118
- ${$size === "big" ? `font-size: ${theme.fontSizes.buttonBig.lg};
8
+ //#region src/lib/button.tsx
9
+ var buttonStyles = (theme, $variant, $size, $outline, $fullWidth, $error, disabled) => css([
10
+ ``,
11
+ `;font-family:inherit;display:inline-flex;padding:15px 30px;border-radius:100px;font-weight:600;white-space:nowrap;hyphens:auto;color:`,
12
+ `;text-decoration:none;transition:all 0.3s ease;text-align:center;gap:10px;text-overflow:ellipsis;justify-content:center;align-items:center;min-height:fit-content;& .icon,& .lucide{margin:auto 0;}`,
13
+ ` `,
14
+ ` `,
15
+ ` `,
16
+ ` `,
17
+ ` `,
18
+ ` `,
19
+ ` `,
20
+ ``
21
+ ], resetButton, theme.isDark ? theme.colors.dark : theme.colors.light, !disabled && $variant === "primary" && css([
22
+ `color:`,
23
+ `;background:`,
24
+ `;border:solid 2px `,
25
+ `;box-shadow:0 0 0 0px `,
26
+ `;&:hover{background:`,
27
+ `;border-color:`,
28
+ `;`,
29
+ `;}&:focus{box-shadow:0 0 0 4px `,
30
+ `;}&:active{box-shadow:0 0 0 2px `,
31
+ `;}`
32
+ ], $outline ? theme.colors.primary : theme.isDark ? theme.colors.dark : theme.colors.light, $outline ? "transparent" : theme.colors.primary, theme.colors.primary, theme.colors.primary, $outline ? "transparent" : theme.colors.primaryDark, theme.colors.primaryDark, $outline && `color: ${theme.colors.primaryDark}`, theme.colors.primaryLight, theme.colors.primaryLight), !disabled && $variant === "secondary" && css([
33
+ `color:`,
34
+ `;background:`,
35
+ `;border:solid 2px `,
36
+ `;box-shadow:0 0 0 0px `,
37
+ `;&:hover{background:`,
38
+ `;border-color:`,
39
+ `;`,
40
+ `;}&:focus{box-shadow:0 0 0 4px `,
41
+ `;}&:active{box-shadow:0 0 0 2px `,
42
+ `;}`
43
+ ], $outline ? theme.colors.secondary : theme.isDark ? theme.colors.dark : theme.colors.light, $outline ? "transparent" : theme.colors.secondary, theme.colors.secondary, theme.colors.secondary, $outline ? "transparent" : theme.colors.secondaryDark, theme.colors.secondaryDark, $outline && `color: ${theme.colors.secondaryDark}`, theme.colors.secondaryLight, theme.colors.secondaryLight), !disabled && $variant === "tertiary" && css([
44
+ `color:`,
45
+ `;background:`,
46
+ `;border:solid 2px `,
47
+ `;box-shadow:0 0 0 0px `,
48
+ `;&:hover{background:`,
49
+ `;border-color:`,
50
+ `;`,
51
+ `;}&:focus{box-shadow:0 0 0 4px `,
52
+ `;}&:active{box-shadow:0 0 0 2px `,
53
+ `;}`
54
+ ], $outline ? theme.colors.tertiary : theme.isDark ? theme.colors.dark : theme.colors.light, $outline ? "transparent" : theme.colors.tertiary, theme.colors.tertiary, theme.colors.tertiary, $outline ? "transparent" : theme.colors.tertiaryDark, theme.colors.tertiaryDark, $outline && `color: ${theme.colors.tertiaryDark}`, theme.colors.tertiaryLight, theme.colors.tertiaryLight), !disabled && $error && css([
55
+ `color:`,
56
+ `;background:`,
57
+ `;border:solid 2px `,
58
+ `;box-shadow:0 0 0 0px `,
59
+ `;&:hover{background:`,
60
+ `;border-color:`,
61
+ `;`,
62
+ `;}&:focus{box-shadow:0 0 0 4px `,
63
+ `;}&:active{box-shadow:0 0 0 2px `,
64
+ `;}`
65
+ ], $outline ? theme.colors.error : theme.isDark ? theme.colors.dark : theme.colors.light, $outline ? "transparent" : theme.colors.error, theme.colors.error, theme.colors.error, $outline ? "transparent" : darken(.1, theme.colors.error), darken(.1, theme.colors.error), $outline && `color: ${darken(.1, theme.colors.error)}`, lighten(.1, theme.colors.error), lighten(.1, theme.colors.error)), formElementHeightStyles($size), $size === "big" ? `font-size: ${theme.fontSizes.buttonBig.lg};
119
66
  line-height: ${theme.lineHeights.buttonBig.lg};
120
67
  padding: 18px 30px;
121
68
  ` : $size === "small" ? `font-size: ${theme.fontSizes.buttonSmall.lg};
122
69
  line-height: ${theme.lineHeights.buttonSmall.lg};
123
70
  padding: 10px 20px;
124
71
  ` : `font-size: ${theme.fontSizes.button.lg};
125
- line-height: ${theme.lineHeights.button.lg};`}
126
-
127
- ${disabled && `
72
+ line-height: ${theme.lineHeights.button.lg};`, disabled && `
128
73
  cursor: not-allowed;
129
74
  background: ${theme.colors.grayLight};
130
75
  border: solid 2px ${theme.colors.grayLight};
131
76
  color: ${theme.colors.gray};
132
- `}
133
-
134
- ${$fullWidth && `width: 100%;`}
135
- `;
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
- )}
146
- `;
77
+ `, $fullWidth && `width: 100%;`);
78
+ var StyledButton = styled.button.withConfig({
79
+ displayName: "button__StyledButton",
80
+ componentId: "sc-f54d90ca-0"
81
+ })([``, ``], ({ theme, $variant, $error, $size, $outline, $fullWidth, disabled }) => buttonStyles(theme, $variant, $size, $outline, $fullWidth, $error, disabled));
147
82
  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
- }
161
- );
83
+ return /* @__PURE__ */ jsxs(StyledButton, {
84
+ $variant,
85
+ $error: props.$error,
86
+ ...props,
87
+ ref,
88
+ children: [
89
+ props.$iconPosition !== "right" && props.$icon && props.$icon,
90
+ props.children,
91
+ props.$iconPosition === "right" && props.$icon && props.$icon
92
+ ]
93
+ });
162
94
  }
163
- const Button = forwardRef(LocalButton);
164
- export {
165
- Button,
166
- buttonStyles
167
- };
95
+ var Button = /* @__PURE__ */ forwardRef(LocalButton);
96
+ //#endregion
97
+ export { Button, buttonStyles };
package/dist/col.js CHANGED
@@ -1,25 +1,33 @@
1
1
  "use client";
2
+ "use client";
3
+ import { generateColSpanStyles } from "./utils/mixins.js";
2
4
  import { jsx } from "react/jsx-runtime";
3
5
  import { forwardRef } from "react";
4
6
  import styled from "styled-components";
5
- import { generateColSpanStyles } from "./utils/mixins.js";
6
- const StyledCol = styled.div`
7
- ${({ $span }) => $span && `
7
+ //#region src/lib/col.tsx
8
+ var StyledCol = styled.div.withConfig({
9
+ displayName: "col__StyledCol",
10
+ componentId: "sc-23d5c96e-0"
11
+ })([
12
+ ``,
13
+ ` `,
14
+ ` `,
15
+ ` `,
16
+ ` `,
17
+ ` `,
18
+ ` `,
19
+ ` `,
20
+ ``
21
+ ], ({ $span }) => $span && `
8
22
  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
- `;
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));
19
24
  function LocalCol({ ...props }, ref) {
20
- return /* @__PURE__ */ jsx(StyledCol, { ...props, ref, children: props.children });
25
+ return /* @__PURE__ */ jsx(StyledCol, {
26
+ ...props,
27
+ ref,
28
+ children: props.children
29
+ });
21
30
  }
22
- const Col = forwardRef(LocalCol);
23
- export {
24
- Col
25
- };
31
+ var Col = /* @__PURE__ */ forwardRef(LocalCol);
32
+ //#endregion
33
+ export { Col };
package/dist/container.js CHANGED
@@ -1,36 +1,38 @@
1
1
  "use client";
2
+ "use client";
3
+ import { mq } from "./utils/theme.js";
4
+ import { generatePaddingStyles } from "./utils/mixins.js";
2
5
  import { jsx } from "react/jsx-runtime";
3
6
  import { forwardRef } from "react";
4
7
  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
- `;
8
+ //#region src/lib/container.tsx
9
+ var StyledContainer = styled.div.withConfig({
10
+ displayName: "container__StyledContainer",
11
+ componentId: "sc-1bc84909-0"
12
+ })([
13
+ `margin:auto;width:100%;max-width:`,
14
+ `;`,
15
+ `;padding:`,
16
+ `;`,
17
+ `{padding:`,
18
+ `;}`,
19
+ `{max-width:`,
20
+ `;}`,
21
+ ` `,
22
+ ` `,
23
+ ` `,
24
+ ` `,
25
+ ` `,
26
+ ` `,
27
+ ``
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));
30
29
  function LocalContainer({ ...props }, ref) {
31
- return /* @__PURE__ */ jsx(StyledContainer, { ...props, ref, children: props.children });
30
+ return /* @__PURE__ */ jsx(StyledContainer, {
31
+ ...props,
32
+ ref,
33
+ children: props.children
34
+ });
32
35
  }
33
- const Container = forwardRef(LocalContainer);
34
- export {
35
- Container
36
- };
36
+ var Container = /* @__PURE__ */ forwardRef(LocalContainer);
37
+ //#endregion
38
+ export { Container };
package/dist/flex.js CHANGED
@@ -1,40 +1,45 @@
1
1
  "use client";
2
+ "use client";
3
+ import { mq } from "./utils/theme.js";
4
+ import { fullWidthStyles, generateGapStyles, generateJustifyContentStyles } from "./utils/mixins.js";
2
5
  import { jsx } from "react/jsx-runtime";
3
6
  import { forwardRef } from "react";
4
7
  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
- `;
8
+ //#region src/lib/flex.tsx
9
+ var StyledFlex = styled.div.withConfig({
10
+ displayName: "flex__StyledFlex",
11
+ componentId: "sc-c58fa091-0"
12
+ })([
13
+ `display:flex;justify-content:`,
14
+ `;flex-wrap:`,
15
+ `;gap:`,
16
+ `;flex-direction:`,
17
+ `;`,
18
+ `{gap:`,
19
+ `;}`,
20
+ ` `,
21
+ ` `,
22
+ ` `,
23
+ ` `,
24
+ ` `,
25
+ ` `,
26
+ ` `,
27
+ ` `,
28
+ ` `,
29
+ ` `,
30
+ ` `,
31
+ ` `,
32
+ ` `,
33
+ ` `,
34
+ ``
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));
34
36
  function LocalFlex({ ...props }, ref) {
35
- return /* @__PURE__ */ jsx(StyledFlex, { ...props, ref, children: props.children });
37
+ return /* @__PURE__ */ jsx(StyledFlex, {
38
+ ...props,
39
+ ref,
40
+ children: props.children
41
+ });
36
42
  }
37
- const Flex = forwardRef(LocalFlex);
38
- export {
39
- Flex
40
- };
43
+ var Flex = /* @__PURE__ */ forwardRef(LocalFlex);
44
+ //#endregion
45
+ export { Flex };
package/dist/grid.js CHANGED
@@ -1,39 +1,42 @@
1
1
  "use client";
2
+ "use client";
3
+ import { mq } from "./utils/theme.js";
4
+ import { generateColsStyles, generateGapStyles } from "./utils/mixins.js";
2
5
  import { jsx } from "react/jsx-runtime";
3
6
  import { forwardRef } from "react";
4
7
  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
- `;
8
+ //#region src/lib/grid.tsx
9
+ var StyledGrid = styled.div.withConfig({
10
+ displayName: "grid__StyledGrid",
11
+ componentId: "sc-593ceaf6-0"
12
+ })([
13
+ `width:100%;display:grid;grid-template-columns:`,
14
+ `;gap:`,
15
+ `;`,
16
+ `{gap:`,
17
+ `;}`,
18
+ ` `,
19
+ ` `,
20
+ ` `,
21
+ ` `,
22
+ ` `,
23
+ ` `,
24
+ ` `,
25
+ ` `,
26
+ ` `,
27
+ ` `,
28
+ ` `,
29
+ ` `,
30
+ ` `,
31
+ ``
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 /* @__PURE__ */ jsx(StyledGrid, { ...props, ref, children: props.children });
34
+ return /* @__PURE__ */ jsx(StyledGrid, {
35
+ ...props,
36
+ ref,
37
+ children: props.children
38
+ });
35
39
  }
36
- const Grid = forwardRef(LocalGrid);
37
- export {
38
- Grid
39
- };
40
+ var Grid = /* @__PURE__ */ forwardRef(LocalGrid);
41
+ //#endregion
42
+ export { Grid };
package/dist/icon.js CHANGED
@@ -1,26 +1,17 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
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
3
+ //#region src/lib/icon.tsx
4
+ var Icon = ({ name, color, size, className, "aria-label": ariaLabel }) => {
5
+ const LucideIcon = icons[name];
6
+ if (!LucideIcon) return null;
7
+ return /* @__PURE__ */ jsx(LucideIcon, {
8
+ color,
9
+ size,
10
+ className,
11
+ "aria-label": ariaLabel,
12
+ "aria-hidden": !ariaLabel,
13
+ role: ariaLabel ? "img" : void 0
14
+ });
26
15
  };
16
+ //#endregion
17
+ export { Icon };