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/range.js CHANGED
@@ -1,110 +1,59 @@
1
1
  "use client";
2
- import { jsxs, jsx } from "react/jsx-runtime";
2
+ "use client";
3
+ import { fullWidthStyles, resetButton, statusBorderStyles } from "./utils/mixins.js";
4
+ import { StyledLabel } from "./input.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
3
6
  import { forwardRef } from "react";
4
7
  import styled from "styled-components";
5
- import { StyledLabel } from "./input.js";
6
- import { fullWidthStyles, resetButton, statusBorderStyles } from "./utils/mixins.js";
7
- const StyledInputWrapper = styled.span`
8
- display: inline-flex;
9
- flex-wrap: ${({ type }) => type === "checkbox" || type === "radio" ? "nowrap" : "wrap"};
10
- gap: 10px;
11
- align-items: center;
12
-
13
- ${({ $fullWidth }) => fullWidthStyles($fullWidth)}
14
- `;
15
- const StyledInput = styled.input`
16
- ${resetButton};
17
- padding: 0;
18
- height: 10px;
19
- font-size: 0;
20
- background: transparent;
21
- min-width: 100px;
22
-
23
- &::-webkit-slider-runnable-track {
24
- width: 100%;
25
- cursor: pointer;
26
- border-radius: ${({ theme }) => theme.spacing.radius.xl};
27
- background: ${({ theme }) => theme.colors.light};
28
- border: solid 2px ${({ theme }) => theme.colors.grayLight};
29
- box-shadow: 0 0 0 0 ${({ theme }) => theme.colors.primaryLight};
30
- transition: all 0.3s ease;
31
- ${({ $error, $success, theme }) => {
32
- return statusBorderStyles($error, $success, theme);
33
- }}
34
- }
35
-
36
- &::-moz-range-track {
37
- width: 100%;
38
- cursor: pointer;
39
- border-radius: ${({ theme }) => theme.spacing.radius.xl};
40
- background: ${({ theme }) => theme.colors.light};
41
- border: solid 2px ${({ theme }) => theme.colors.grayLight};
42
- box-shadow: 0 0 0 0 ${({ theme }) => theme.colors.primaryLight};
43
- transition: all 0.3s ease;
44
- ${({ $error, $success, theme }) => {
45
- return statusBorderStyles($error, $success, theme);
46
- }}
47
- }
48
-
49
- &::-webkit-slider-thumb {
50
- ${resetButton};
51
- background: ${({ theme }) => theme.colors.primary};
52
- border: 0 solid transparent;
53
- border-radius: 50%;
54
- transition: all 0.3s ease;
55
- }
56
-
57
- &::-moz-range-thumb {
58
- ${resetButton};
59
- background: ${({ theme }) => theme.colors.primary};
60
- border: 0 solid transparent;
61
- border-radius: 50%;
62
- transition: all 0.3s ease;
63
- }
64
-
65
- &:hover:not([disabled]) {
66
- &::-webkit-slider-runnable-track {
67
- border: solid 2px ${({ theme }) => theme.colors.primary};
68
- }
69
-
70
- &::-moz-range-track {
71
- border: solid 2px ${({ theme }) => theme.colors.primary};
72
- }
73
- }
74
-
75
- &:focus:not([disabled]) {
76
- &::-webkit-slider-runnable-track {
77
- border: solid 2px ${({ theme }) => theme.colors.primary};
78
- box-shadow: 0 0 0 4px ${({ theme }) => theme.colors.primaryLight};
79
- }
80
- &::-webkit-slider-thumb {
81
- box-shadow: 0 0 0 4px ${({ theme }) => theme.colors.primaryLight};
82
- }
83
- &::-moz-range-track {
84
- border: solid 2px ${({ theme }) => theme.colors.primary};
85
- box-shadow: 0 0 0 4px ${({ theme }) => theme.colors.primaryLight};
86
- }
87
- &::-moz-range-thumb {
88
- box-shadow: 0 0 0 4px ${({ theme }) => theme.colors.primaryLight};
89
- }
90
- }
91
-
92
- &:active:not([disabled]) {
93
- &::-webkit-slider-runnable-track {
94
- box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};
95
- }
96
- &::-webkit-slider-thumb {
97
- box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};
98
- }
99
- &::-moz-range-track {
100
- box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};
101
- }
102
- &::-moz-range-thumb {
103
- box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};
104
- }
105
- }
106
-
107
- ${({ disabled, theme }) => disabled && `
8
+ //#region src/lib/range.tsx
9
+ var StyledInputWrapper = styled.span.withConfig({
10
+ displayName: "range__StyledInputWrapper",
11
+ componentId: "sc-cb330c1b-0"
12
+ })([
13
+ `display:inline-flex;flex-wrap:`,
14
+ `;gap:10px;align-items:center;`,
15
+ ``
16
+ ], ({ type }) => type === "checkbox" || type === "radio" ? "nowrap" : "wrap", ({ $fullWidth }) => fullWidthStyles($fullWidth));
17
+ var StyledInput = styled.input.withConfig({
18
+ displayName: "range__StyledInput",
19
+ componentId: "sc-cb330c1b-1"
20
+ })([
21
+ ``,
22
+ `;padding:0;height:10px;font-size:0;background:transparent;min-width:100px;&::-webkit-slider-runnable-track{width:100%;cursor:pointer;border-radius:`,
23
+ `;background:`,
24
+ `;border:solid 2px `,
25
+ `;box-shadow:0 0 0 0 `,
26
+ `;transition:all 0.3s ease;`,
27
+ `}&::-moz-range-track{width:100%;cursor:pointer;border-radius:`,
28
+ `;background:`,
29
+ `;border:solid 2px `,
30
+ `;box-shadow:0 0 0 0 `,
31
+ `;transition:all 0.3s ease;`,
32
+ `}&::-webkit-slider-thumb{`,
33
+ `;background:`,
34
+ `;border:0 solid transparent;border-radius:50%;transition:all 0.3s ease;}&::-moz-range-thumb{`,
35
+ `;background:`,
36
+ `;border:0 solid transparent;border-radius:50%;transition:all 0.3s ease;}&:hover:not([disabled]){&::-webkit-slider-runnable-track{border:solid 2px `,
37
+ `;}&::-moz-range-track{border:solid 2px `,
38
+ `;}}&:focus:not([disabled]){&::-webkit-slider-runnable-track{border:solid 2px `,
39
+ `;box-shadow:0 0 0 4px `,
40
+ `;}&::-webkit-slider-thumb{box-shadow:0 0 0 4px `,
41
+ `;}&::-moz-range-track{border:solid 2px `,
42
+ `;box-shadow:0 0 0 4px `,
43
+ `;}&::-moz-range-thumb{box-shadow:0 0 0 4px `,
44
+ `;}}&:active:not([disabled]){&::-webkit-slider-runnable-track{box-shadow:0 0 0 2px `,
45
+ `;}&::-webkit-slider-thumb{box-shadow:0 0 0 2px `,
46
+ `;}&::-moz-range-track{box-shadow:0 0 0 2px `,
47
+ `;}&::-moz-range-thumb{box-shadow:0 0 0 2px `,
48
+ `;}}`,
49
+ ` `,
50
+ ` `,
51
+ ``
52
+ ], resetButton, ({ theme }) => theme.spacing.radius.xl, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.primaryLight, ({ $error, $success, theme }) => {
53
+ return statusBorderStyles($error, $success, theme);
54
+ }, ({ theme }) => theme.spacing.radius.xl, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.primaryLight, ({ $error, $success, theme }) => {
55
+ return statusBorderStyles($error, $success, theme);
56
+ }, resetButton, ({ theme }) => theme.colors.primary, resetButton, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primaryLight, ({ disabled, theme }) => disabled && `
108
57
  cursor: not-allowed;
109
58
 
110
59
  &::-webkit-slider-runnable-track {
@@ -126,13 +75,8 @@ const StyledInput = styled.input`
126
75
  background: ${theme.colors.gray};
127
76
  cursor: not-allowed;
128
77
  }
129
- `}
130
-
131
- ${({ $fullWidth }) => fullWidthStyles($fullWidth)}
132
-
133
- ${({ $size }) => {
134
- if ($size === "big") {
135
- return `
78
+ `, ({ $fullWidth }) => fullWidthStyles($fullWidth), ({ $size }) => {
79
+ if ($size === "big") return `
136
80
  height: 32px;
137
81
 
138
82
  &::-webkit-slider-runnable-track {
@@ -154,8 +98,7 @@ const StyledInput = styled.input`
154
98
  height: 32px;
155
99
  }
156
100
  `;
157
- } else if ($size === "small") {
158
- return `
101
+ else if ($size === "small") return `
159
102
  height: 18px;
160
103
 
161
104
  &::-webkit-slider-runnable-track {
@@ -177,8 +120,7 @@ const StyledInput = styled.input`
177
120
  height: 18px;
178
121
  }
179
122
  `;
180
- } else {
181
- return `
123
+ else return `
182
124
  height: 22px;
183
125
 
184
126
  &::-webkit-slider-runnable-track {
@@ -200,31 +142,22 @@ const StyledInput = styled.input`
200
142
  height: 22px;
201
143
  }
202
144
  `;
203
- }
204
- }}
205
- `;
145
+ });
206
146
  function LocalRange({ ...props }, ref) {
207
- return /* @__PURE__ */ jsxs(
208
- StyledInputWrapper,
209
- {
210
- $fullWidth: props.$fullWidth,
211
- className: props.$wrapperClassName,
212
- children: [
213
- props.$label && /* @__PURE__ */ jsx(StyledLabel, { htmlFor: props.id, children: props.$label }),
214
- /* @__PURE__ */ jsx(
215
- StyledInput,
216
- {
217
- ...props,
218
- "aria-invalid": props.$error || void 0,
219
- type: "range",
220
- ref
221
- }
222
- )
223
- ]
224
- }
225
- );
147
+ return /* @__PURE__ */ jsxs(StyledInputWrapper, {
148
+ $fullWidth: props.$fullWidth,
149
+ className: props.$wrapperClassName,
150
+ children: [props.$label && /* @__PURE__ */ jsx(StyledLabel, {
151
+ htmlFor: props.id,
152
+ children: props.$label
153
+ }), /* @__PURE__ */ jsx(StyledInput, {
154
+ ...props,
155
+ "aria-invalid": props.$error || void 0,
156
+ type: "range",
157
+ ref
158
+ })]
159
+ });
226
160
  }
227
- const Range = forwardRef(LocalRange);
228
- export {
229
- Range
230
- };
161
+ var Range = /* @__PURE__ */ forwardRef(LocalRange);
162
+ //#endregion
163
+ export { Range };
package/dist/select.js CHANGED
@@ -1,108 +1,64 @@
1
1
  "use client";
2
- import { jsxs, jsx } from "react/jsx-runtime";
2
+ "use client";
3
+ import { IconArrow } from "./utils/icons.js";
4
+ import { formElementHeightStyles, fullWidthStyles, resetButton, resetInput, statusBorderStyles } from "./utils/mixins.js";
5
+ import { StyledInputWrapper, StyledLabel } from "./input.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
3
7
  import { forwardRef } from "react";
4
8
  import styled from "styled-components";
5
- import { StyledInputWrapper, StyledLabel } from "./input.js";
6
- import { IconArrow } from "./utils/icons.js";
7
- import { fullWidthStyles, resetButton, resetInput, formElementHeightStyles, statusBorderStyles } from "./utils/mixins.js";
8
- const StyledSelect = styled.select`
9
- ${resetButton};
10
- ${resetInput};
11
- font-family: inherit;
12
- display: inline-block;
13
- padding: 0 15px;
14
- border-radius: ${({ theme }) => theme.spacing.radius.xs};
15
- font-weight: 400;
16
- white-space: nowrap;
17
- hyphens: auto;
18
- color: ${({ theme }) => theme.colors.dark};
19
- background: ${({ theme }) => theme.colors.light};
20
- border: solid 2px ${({ theme }) => theme.colors.grayLight};
21
- box-shadow: 0 0 0 0px ${({ theme }) => theme.colors.primaryLight};
22
- transition: all 0.3s ease;
23
-
24
- &::placeholder {
25
- color: ${({ theme }) => theme.colors.gray};
26
- }
27
-
28
- &:hover:not([disabled]) {
29
- border-color: ${({ theme }) => theme.colors.primary};
30
- }
31
-
32
- &:focus:not([disabled]) {
33
- box-shadow: 0 0 0 4px ${({ theme }) => theme.colors.primaryLight};
34
- border-color: ${({ theme }) => theme.colors.primary};
35
- }
36
-
37
- &:active:not([disabled]) {
38
- box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primaryLight};
39
- }
40
-
41
- ${({ $size }) => formElementHeightStyles($size)}
42
-
43
- ${({ $size, theme }) => $size === "big" ? `font-size: ${theme.fontSizes.inputBig.lg};` : $size === "small" ? `font-size: ${theme.fontSizes.inputSmall.lg}; padding: 0 12px;` : `font-size: ${theme.fontSizes.input.lg};`}
44
-
45
- ${({ $error, $success, theme }) => {
46
- return statusBorderStyles($error, $success, theme);
47
- }}
48
-
49
- ${({ disabled, theme }) => disabled && `cursor: not-allowed;
9
+ //#region src/lib/select.tsx
10
+ var StyledSelect = styled.select.withConfig({
11
+ displayName: "select__StyledSelect",
12
+ componentId: "sc-b63bf03d-0"
13
+ })([
14
+ ``,
15
+ `;`,
16
+ `;font-family:inherit;display:inline-block;padding:0 15px;border-radius:`,
17
+ `;font-weight:400;white-space:nowrap;hyphens:auto;color:`,
18
+ `;background:`,
19
+ `;border:solid 2px `,
20
+ `;box-shadow:0 0 0 0px `,
21
+ `;transition:all 0.3s ease;&::placeholder{color:`,
22
+ `;}&:hover:not([disabled]){border-color:`,
23
+ `;}&:focus:not([disabled]){box-shadow:0 0 0 4px `,
24
+ `;border-color:`,
25
+ `;}&:active:not([disabled]){box-shadow:0 0 0 2px `,
26
+ `;}`,
27
+ ` `,
28
+ ` `,
29
+ ` `,
30
+ ` `,
31
+ ``
32
+ ], resetButton, resetInput, ({ theme }) => theme.spacing.radius.xs, ({ theme }) => theme.colors.dark, ({ theme }) => theme.colors.light, ({ theme }) => theme.colors.grayLight, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.gray, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ theme }) => theme.colors.primary, ({ theme }) => theme.colors.primaryLight, ({ $size }) => formElementHeightStyles($size), ({ $size, theme }) => $size === "big" ? `font-size: ${theme.fontSizes.inputBig.lg};` : $size === "small" ? `font-size: ${theme.fontSizes.inputSmall.lg}; padding: 0 12px;` : `font-size: ${theme.fontSizes.input.lg};`, ({ $error, $success, theme }) => {
33
+ return statusBorderStyles($error, $success, theme);
34
+ }, ({ disabled, theme }) => disabled && `cursor: not-allowed;
50
35
  background: ${theme.colors.grayLight};
51
36
  border-color: ${theme.colors.gray};
52
37
  color: ${theme.colors.gray};
53
- `}
54
-
55
- ${({ $fullWidth }) => fullWidthStyles($fullWidth)}
56
- `;
57
- const StyledIconWrapper = styled.span`
58
- position: relative;
59
- ${({ $fullWidth }) => fullWidthStyles($fullWidth)}
60
-
61
- & svg {
62
- position: absolute;
63
- top: 50%;
64
- right: 15px;
65
- transform: translateY(-50%) rotate(0);
66
- transition: all 0.3s ease;
67
- pointer-events: none;
68
- }
69
-
70
- & select {
71
- padding-right: 40px;
72
- }
73
-
74
- & select:active:not([disabled]) ~ svg,
75
- & select:focus:not([disabled]) ~ svg {
76
- transform: translateY(-50%) rotate(180deg);
77
- }
78
- `;
38
+ `, ({ $fullWidth }) => fullWidthStyles($fullWidth));
39
+ var StyledIconWrapper = styled.span.withConfig({
40
+ displayName: "select__StyledIconWrapper",
41
+ componentId: "sc-b63bf03d-1"
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));
79
43
  function LocalSelect({ ...props }, ref) {
80
- return /* @__PURE__ */ jsxs(
81
- StyledInputWrapper,
82
- {
83
- $fullWidth: props.$fullWidth,
84
- $label: props.$label,
85
- className: props.$wrapperClassName,
86
- children: [
87
- props.$label && /* @__PURE__ */ jsx(StyledLabel, { htmlFor: props.id, children: props.$label }),
88
- /* @__PURE__ */ jsxs(StyledIconWrapper, { $fullWidth: props.$fullWidth, children: [
89
- /* @__PURE__ */ jsx(
90
- StyledSelect,
91
- {
92
- ...props,
93
- "aria-invalid": props.$error || void 0,
94
- ref,
95
- children: props.children
96
- }
97
- ),
98
- /* @__PURE__ */ jsx(IconArrow, { "aria-hidden": "true" })
99
- ] })
100
- ]
101
- }
102
- );
44
+ return /* @__PURE__ */ jsxs(StyledInputWrapper, {
45
+ $fullWidth: props.$fullWidth,
46
+ $label: props.$label,
47
+ className: props.$wrapperClassName,
48
+ children: [props.$label && /* @__PURE__ */ jsx(StyledLabel, {
49
+ htmlFor: props.id,
50
+ children: props.$label
51
+ }), /* @__PURE__ */ jsxs(StyledIconWrapper, {
52
+ $fullWidth: props.$fullWidth,
53
+ children: [/* @__PURE__ */ jsx(StyledSelect, {
54
+ ...props,
55
+ "aria-invalid": props.$error || void 0,
56
+ ref,
57
+ children: props.children
58
+ }), /* @__PURE__ */ jsx(IconArrow, { "aria-hidden": "true" })]
59
+ })]
60
+ });
103
61
  }
104
- const Select = forwardRef(LocalSelect);
105
- export {
106
- Select,
107
- StyledIconWrapper
108
- };
62
+ var Select = /* @__PURE__ */ forwardRef(LocalSelect);
63
+ //#endregion
64
+ export { Select, StyledIconWrapper };
package/dist/space.js CHANGED
@@ -1,37 +1,51 @@
1
1
  "use client";
2
+ "use client";
3
+ import { mq } from "./utils/theme.js";
2
4
  import { jsx } from "react/jsx-runtime";
3
5
  import { forwardRef } from "react";
4
6
  import styled from "styled-components";
5
- import { mq } from "./utils/theme.js";
6
- const styles = ($size, $horizontal) => $size === "none" ? `display: none;` : $horizontal ? `display: inline-block;
7
+ //#region src/lib/space.tsx
8
+ var styles = ($size, $horizontal) => $size === "none" ? `display: none;` : $horizontal ? `display: inline-block;
7
9
  max-height: 0;
8
10
  min-width: ${$size}px;
9
11
  max-width: ${$size}px;` : `display: block;
10
12
  min-height: ${$size}px;
11
13
  max-height: ${$size}px;`;
12
- const breakpointKeys = ["xs", "sm", "md", "lg", "xl", "xxl", "xxxl"];
14
+ var breakpointKeys = [
15
+ "xs",
16
+ "sm",
17
+ "md",
18
+ "lg",
19
+ "xl",
20
+ "xxl",
21
+ "xxxl"
22
+ ];
13
23
  function responsiveStyles(props) {
14
- const propMap = {
15
- xs: props.$xs,
16
- sm: props.$sm,
17
- md: props.$md,
18
- lg: props.$lg,
19
- xl: props.$xl,
20
- xxl: props.$xxl,
21
- xxxl: props.$xxxl
22
- };
23
- return breakpointKeys.filter((key) => propMap[key] !== void 0).map(
24
- (key) => mq(key) + `{ ${styles(propMap[key], props.$horizontal || false)} }`
25
- ).join("");
24
+ const propMap = {
25
+ xs: props.$xs,
26
+ sm: props.$sm,
27
+ md: props.$md,
28
+ lg: props.$lg,
29
+ xl: props.$xl,
30
+ xxl: props.$xxl,
31
+ xxxl: props.$xxxl
32
+ };
33
+ return breakpointKeys.filter((key) => propMap[key] !== void 0).map((key) => mq(key) + `{ ${styles(propMap[key], props.$horizontal || false)} }`).join("");
26
34
  }
27
- const StyledSpace = styled.span`
28
- ${({ $horizontal, $size }) => $size ? styles($size, $horizontal || false) : ""}
29
- ${(props) => responsiveStyles(props)}
30
- `;
35
+ var StyledSpace = styled.span.withConfig({
36
+ displayName: "space__StyledSpace",
37
+ componentId: "sc-d047ac9d-0"
38
+ })([
39
+ ``,
40
+ ` `,
41
+ ``
42
+ ], ({ $horizontal, $size }) => $size ? styles($size, $horizontal || false) : "", (props) => responsiveStyles(props));
31
43
  function LocalSpace({ ...props }, ref) {
32
- return /* @__PURE__ */ jsx(StyledSpace, { ...props, ref });
44
+ return /* @__PURE__ */ jsx(StyledSpace, {
45
+ ...props,
46
+ ref
47
+ });
33
48
  }
34
- const Space = forwardRef(LocalSpace);
35
- export {
36
- Space
37
- };
49
+ var Space = /* @__PURE__ */ forwardRef(LocalSpace);
50
+ //#endregion
51
+ export { Space };
@@ -1,25 +1,23 @@
1
1
  "use client";
2
- import { jsx, Fragment } from "react/jsx-runtime";
2
+ "use client";
3
+ import { Fragment, jsx } from "react/jsx-runtime";
3
4
  import { useState } from "react";
4
5
  import { useServerInsertedHTML } from "next/navigation";
5
6
  import { ServerStyleSheet, StyleSheetManager } from "styled-components";
7
+ //#region src/lib/styled-components/registry.tsx
6
8
  function StyledComponentsRegistry({ children }) {
7
- const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet());
8
- const isServer = typeof window === "undefined";
9
- useServerInsertedHTML(() => {
10
- const styles = styledComponentsStyleSheet.getStyleElement();
11
- styledComponentsStyleSheet.instance.clearTag();
12
- return /* @__PURE__ */ jsx(Fragment, { children: styles });
13
- });
14
- return /* @__PURE__ */ jsx(
15
- StyleSheetManager,
16
- {
17
- sheet: isServer ? styledComponentsStyleSheet.instance : void 0,
18
- enableVendorPrefixes: true,
19
- children
20
- }
21
- );
9
+ const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet());
10
+ const isServer = typeof window === "undefined";
11
+ useServerInsertedHTML(() => {
12
+ const styles = styledComponentsStyleSheet.getStyleElement();
13
+ styledComponentsStyleSheet.instance.clearTag();
14
+ return /* @__PURE__ */ jsx(Fragment, { children: styles });
15
+ });
16
+ return /* @__PURE__ */ jsx(StyleSheetManager, {
17
+ sheet: isServer ? styledComponentsStyleSheet.instance : void 0,
18
+ enableVendorPrefixes: true,
19
+ children
20
+ });
22
21
  }
23
- export {
24
- StyledComponentsRegistry
25
- };
22
+ //#endregion
23
+ export { StyledComponentsRegistry };
@@ -1,35 +1,31 @@
1
1
  "use client";
2
+ "use client";
3
+ import { GlobalStyles } from "../utils/global.js";
2
4
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useState, useEffect, createContext } from "react";
5
+ import { createContext, useEffect, useState } from "react";
4
6
  import { ThemeProvider } from "styled-components";
5
- import { GlobalStyles } from "../utils/global.js";
6
- const ThemeContext = createContext({
7
- setTheme: () => {
8
- }
9
- });
10
- function CherryThemeProvider({
11
- children,
12
- theme,
13
- themeDark
14
- }) {
15
- const [currentTheme, setTheme] = useState(theme);
16
- useEffect(() => {
17
- if (!themeDark) return setTheme(theme);
18
- if (localStorage.theme === "dark" || !("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches) {
19
- document.documentElement.classList.add("dark");
20
- setTheme(themeDark);
21
- } else {
22
- document.documentElement.classList.remove("dark");
23
- setTheme(theme);
24
- }
25
- }, [theme, themeDark]);
26
- const GlobalStylesComponent = GlobalStyles(currentTheme);
27
- return /* @__PURE__ */ jsx(ThemeProvider, { theme: currentTheme, children: /* @__PURE__ */ jsxs(ThemeContext.Provider, { value: { setTheme }, children: [
28
- /* @__PURE__ */ jsx(GlobalStylesComponent, {}),
29
- children
30
- ] }) });
7
+ //#region src/lib/styled-components/theme-provider.tsx
8
+ var ThemeContext = /* @__PURE__ */ createContext({ setTheme: () => {} });
9
+ function CherryThemeProvider({ children, theme, themeDark }) {
10
+ const [currentTheme, setTheme] = useState(theme);
11
+ useEffect(() => {
12
+ if (!themeDark) return setTheme(theme);
13
+ if (localStorage.theme === "dark" || !("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches) {
14
+ document.documentElement.classList.add("dark");
15
+ setTheme(themeDark);
16
+ } else {
17
+ document.documentElement.classList.remove("dark");
18
+ setTheme(theme);
19
+ }
20
+ }, [theme, themeDark]);
21
+ const GlobalStylesComponent = GlobalStyles(currentTheme);
22
+ return /* @__PURE__ */ jsx(ThemeProvider, {
23
+ theme: currentTheme,
24
+ children: /* @__PURE__ */ jsxs(ThemeContext.Provider, {
25
+ value: { setTheme },
26
+ children: [/* @__PURE__ */ jsx(GlobalStylesComponent, {}), children]
27
+ })
28
+ });
31
29
  }
32
- export {
33
- CherryThemeProvider,
34
- ThemeContext
35
- };
30
+ //#endregion
31
+ export { CherryThemeProvider, ThemeContext };