cherry-styled-components 0.1.8 → 0.1.9
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/.claude/settings.local.json +10 -1
- package/dist/cherry.js +2 -5
- package/dist/cherry.umd.cjs +2 -5
- package/package.json +4 -4
- package/src/App.tsx +6 -1
- package/src/lib/space.tsx +7 -7
- package/src/lib/toggle.tsx +10 -5
|
@@ -5,7 +5,16 @@
|
|
|
5
5
|
"Bash(pnpm run build:*)",
|
|
6
6
|
"Bash(git add:*)",
|
|
7
7
|
"Bash(git commit:*)",
|
|
8
|
-
"Bash(git push:*)"
|
|
8
|
+
"Bash(git push:*)",
|
|
9
|
+
"Bash(git -C /Users/luan/Developer/cherry-styled-components status)",
|
|
10
|
+
"Bash(git -C /Users/luan/Developer/cherry-styled-components diff)",
|
|
11
|
+
"Bash(git -C /Users/luan/Developer/cherry-styled-components diff --staged)",
|
|
12
|
+
"Bash(pnpm run format:*)",
|
|
13
|
+
"Bash(git -C /Users/luan/Developer/cherry-styled-components diff src/App.tsx src/lib/toggle.tsx)",
|
|
14
|
+
"Bash(git -C /Users/luan/Developer/cherry-styled-components add:*)",
|
|
15
|
+
"Bash(\" directly instead of interpolating \"none\" into pixel\nvalues \\(e.g. \"nonepx)",
|
|
16
|
+
"Bash(\"\\). This also fixes responsiveStyles\\(\\), which\npreviously had no \"none\" guard at all.\nEOF\n\\)\")",
|
|
17
|
+
"Bash(git -C /Users/luan/Developer/cherry-styled-components push)"
|
|
9
18
|
]
|
|
10
19
|
}
|
|
11
20
|
}
|
package/dist/cherry.js
CHANGED
|
@@ -22489,7 +22489,7 @@ function yo1({ ...t }, a) {
|
|
|
22489
22489
|
}
|
|
22490
22490
|
);
|
|
22491
22491
|
}
|
|
22492
|
-
const Qo1 = e1(yo1), aa = (t, a) => a ? `display: inline-block;
|
|
22492
|
+
const Qo1 = e1(yo1), aa = (t, a) => t === "none" ? "display: none;" : a ? `display: inline-block;
|
|
22493
22493
|
max-height: 0;
|
|
22494
22494
|
min-width: ${t}px;
|
|
22495
22495
|
max-width: ${t}px;` : `display: block;
|
|
@@ -22502,10 +22502,7 @@ function po1(t) {
|
|
|
22502
22502
|
}).join("");
|
|
22503
22503
|
}
|
|
22504
22504
|
const ko1 = W.span`
|
|
22505
|
-
${({ $horizontal: t, $size: a }) =>
|
|
22506
|
-
${a && a !== "none" && aa(a, t || !1)};
|
|
22507
|
-
${a === "none" && "display: none;"};
|
|
22508
|
-
`}
|
|
22505
|
+
${({ $horizontal: t, $size: a }) => a ? aa(a, t || !1) : ""}
|
|
22509
22506
|
${(t) => po1(t)}
|
|
22510
22507
|
`;
|
|
22511
22508
|
function lo1({ ...t }, a) {
|
package/dist/cherry.umd.cjs
CHANGED
|
@@ -1265,16 +1265,13 @@ To pass a single animation please supply them in simple values, e.g. animation('
|
|
|
1265
1265
|
& select:focus:not([disabled]) ~ svg {
|
|
1266
1266
|
transform: translateY(-50%) rotate(180deg);
|
|
1267
1267
|
}
|
|
1268
|
-
`;function Oq({...t},o){return b.jsxs(ae,{$fullWidth:t.$fullWidth,$label:t.$label,className:t.$wrapperClassName,children:[t.$label&&b.jsx(U1,{htmlFor:t.id,children:t.$label}),b.jsxs(po,{$fullWidth:t.$fullWidth,children:[b.jsx(Tq,{...t,ref:o,children:t.children}),b.jsx(W0,{})]})]})}const Dq=$.forwardRef(Oq),ko=(t,o)=>o?`display: inline-block;
|
|
1268
|
+
`;function Oq({...t},o){return b.jsxs(ae,{$fullWidth:t.$fullWidth,$label:t.$label,className:t.$wrapperClassName,children:[t.$label&&b.jsx(U1,{htmlFor:t.id,children:t.$label}),b.jsxs(po,{$fullWidth:t.$fullWidth,children:[b.jsx(Tq,{...t,ref:o,children:t.children}),b.jsx(W0,{})]})]})}const Dq=$.forwardRef(Oq),ko=(t,o)=>t==="none"?"display: none;":o?`display: inline-block;
|
|
1269
1269
|
max-height: 0;
|
|
1270
1270
|
min-width: ${t}px;
|
|
1271
1271
|
max-width: ${t}px;`:`display: block;
|
|
1272
1272
|
min-height: ${t}px;
|
|
1273
1273
|
max-height: ${t}px;`;function Iq(t){return Object.keys(t).filter(o=>o.startsWith("$")).map(o=>{const a=o.substring(1);return t[o]&&T(a)+`{ ${ko(t[o],t.$horizontal||!1)} }`}).join("")}const Fq=Z.span`
|
|
1274
|
-
${({$horizontal:t,$size:o})
|
|
1275
|
-
${o&&o!=="none"&&ko(o,t||!1)};
|
|
1276
|
-
${o==="none"&&"display: none;"};
|
|
1277
|
-
`}
|
|
1274
|
+
${({$horizontal:t,$size:o})=>o?ko(o,t||!1):""}
|
|
1278
1275
|
${t=>Iq(t)}
|
|
1279
1276
|
`;function Bq({...t},o){return b.jsx(Fq,{...t,ref:o})}const Uq=$.forwardRef(Bq),Wq=Z.textarea`
|
|
1280
1277
|
${l1};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cherry-styled-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
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",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"polished": "^4.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "^25.2.
|
|
39
|
-
"@types/react": "^19.2.
|
|
38
|
+
"@types/node": "^25.2.3",
|
|
39
|
+
"@types/react": "^19.2.14",
|
|
40
40
|
"@types/react-dom": "^19.2.3",
|
|
41
|
-
"@vitejs/plugin-react": "^5.1.
|
|
41
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
42
42
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
43
43
|
"eslint-plugin-react-refresh": "^0.5.0",
|
|
44
44
|
"next": "^16.1.6",
|
package/src/App.tsx
CHANGED
|
@@ -118,7 +118,12 @@ function App() {
|
|
|
118
118
|
$label="Input Big"
|
|
119
119
|
id="input-big"
|
|
120
120
|
/>
|
|
121
|
-
<Select
|
|
121
|
+
<Select
|
|
122
|
+
$size="big"
|
|
123
|
+
$fullWidth
|
|
124
|
+
$label="Select Big"
|
|
125
|
+
id="select-big"
|
|
126
|
+
>
|
|
122
127
|
<option>Select</option>
|
|
123
128
|
</Select>
|
|
124
129
|
<Col $lgSpan={2}>
|
package/src/lib/space.tsx
CHANGED
|
@@ -16,12 +16,14 @@ interface SpaceProps {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const styles = ($size: number | "none", $horizontal: boolean) =>
|
|
19
|
-
$
|
|
20
|
-
? `display:
|
|
19
|
+
$size === "none"
|
|
20
|
+
? `display: none;`
|
|
21
|
+
: $horizontal
|
|
22
|
+
? `display: inline-block;
|
|
21
23
|
max-height: 0;
|
|
22
24
|
min-width: ${$size}px;
|
|
23
25
|
max-width: ${$size}px;`
|
|
24
|
-
|
|
26
|
+
: `display: block;
|
|
25
27
|
min-height: ${$size}px;
|
|
26
28
|
max-height: ${$size}px;`;
|
|
27
29
|
|
|
@@ -39,10 +41,8 @@ function responsiveStyles(props: any) {
|
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
const StyledSpace = styled.span<SpaceProps>`
|
|
42
|
-
${({ $horizontal, $size }) =>
|
|
43
|
-
|
|
44
|
-
${$size === "none" && `display: none;`};
|
|
45
|
-
`}
|
|
44
|
+
${({ $horizontal, $size }) =>
|
|
45
|
+
$size ? styles($size, $horizontal || false) : ""}
|
|
46
46
|
${(props) => responsiveStyles(props)}
|
|
47
47
|
`;
|
|
48
48
|
|
package/src/lib/toggle.tsx
CHANGED
|
@@ -32,8 +32,10 @@ const StyledFakeToggle = styled.span<ToggleProps>`
|
|
|
32
32
|
transition: all 0.3s ease;
|
|
33
33
|
box-shadow: 0 0 0 0 ${({ theme }) => theme.colors.primaryLight};
|
|
34
34
|
transform: none;
|
|
35
|
-
width: ${({ $size }) =>
|
|
36
|
-
|
|
35
|
+
width: ${({ $size }) =>
|
|
36
|
+
$size === "big" ? "56px" : $size === "small" ? "38px" : "46px"};
|
|
37
|
+
height: ${({ $size }) =>
|
|
38
|
+
$size === "big" ? "32px" : $size === "small" ? "18px" : "22px"};
|
|
37
39
|
|
|
38
40
|
${({ $error, $success, theme }) => {
|
|
39
41
|
return statusBorderStyles(
|
|
@@ -68,8 +70,10 @@ const StyledFakeToggle = styled.span<ToggleProps>`
|
|
|
68
70
|
transition: all 0.3s ease;
|
|
69
71
|
transform: translateX(0);
|
|
70
72
|
background: ${({ theme }) => theme.colors.primary};
|
|
71
|
-
width: ${({ $size }) =>
|
|
72
|
-
|
|
73
|
+
width: ${({ $size }) =>
|
|
74
|
+
$size === "big" ? "32px" : $size === "small" ? "18px" : "22px"};
|
|
75
|
+
height: ${({ $size }) =>
|
|
76
|
+
$size === "big" ? "32px" : $size === "small" ? "18px" : "22px"};
|
|
73
77
|
}
|
|
74
78
|
`;
|
|
75
79
|
|
|
@@ -91,7 +95,8 @@ const StyledToggle = styled.input<ToggleProps>`
|
|
|
91
95
|
|
|
92
96
|
&::after {
|
|
93
97
|
transform: translateX(
|
|
94
|
-
${({ $size }) =>
|
|
98
|
+
${({ $size }) =>
|
|
99
|
+
$size === "big" ? "25px" : $size === "small" ? "20px" : "25px"}
|
|
95
100
|
);
|
|
96
101
|
}
|
|
97
102
|
}
|