cherry-styled-components 0.1.0-27 → 0.1.0-29
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/.supermaven/config.json +1 -0
- package/dist/cherry.js +7 -7
- package/dist/cherry.umd.cjs +7 -7
- package/dist/lib/button.d.ts +1 -1
- package/package.json +3 -3
- package/src/lib/button.tsx +0 -2
- package/src/lib/toggle.tsx +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"api_key":"4e94fd92d9d3e56803d0d5340beb64a8","api_key_obtained_at":"2024-07-19T22:18:47+02:00","link_id":"bw4cwq4Og3aqUNwrefbPo9D016ptryeK","machine_id":"EgXOpDipQw6LbkqDKtbnec2TTIVC7Vg3"}
|
package/dist/cherry.js
CHANGED
|
@@ -2956,7 +2956,7 @@ const Qi = D(Ji)`
|
|
|
2956
2956
|
function Ba({ theme: e = et, ...t }) {
|
|
2957
2957
|
return /* @__PURE__ */ x.jsx(Qi, { ...t, theme: e, children: t.children });
|
|
2958
2958
|
}
|
|
2959
|
-
const ea = (e, t, r, n, i, a
|
|
2959
|
+
const ea = (e, t, r, n, i, a) => k`
|
|
2960
2960
|
${ue};
|
|
2961
2961
|
font-family: inherit;
|
|
2962
2962
|
display: inline-flex;
|
|
@@ -2979,7 +2979,7 @@ const ea = (e, t, r, n, i, a, s, l) => k`
|
|
|
2979
2979
|
min-width: 24px;
|
|
2980
2980
|
}
|
|
2981
2981
|
|
|
2982
|
-
${!
|
|
2982
|
+
${!a && t === "primary" && k`
|
|
2983
2983
|
color: ${n ? e.colors.primary : e.isDark ? e.colors.dark : e.colors.light};
|
|
2984
2984
|
background: ${n ? "transparent" : e.colors.primary};
|
|
2985
2985
|
border: solid 2px ${e.colors.primary};
|
|
@@ -3002,7 +3002,7 @@ const ea = (e, t, r, n, i, a, s, l) => k`
|
|
|
3002
3002
|
}
|
|
3003
3003
|
`}
|
|
3004
3004
|
|
|
3005
|
-
${!
|
|
3005
|
+
${!a && t === "secondary" && k`
|
|
3006
3006
|
color: ${n ? e.colors.secondary : e.isDark ? e.colors.dark : e.colors.light};
|
|
3007
3007
|
background: ${n ? "transparent" : e.colors.secondary};
|
|
3008
3008
|
border: solid 2px ${e.colors.secondary};
|
|
@@ -3025,7 +3025,7 @@ const ea = (e, t, r, n, i, a, s, l) => k`
|
|
|
3025
3025
|
}
|
|
3026
3026
|
`}
|
|
3027
3027
|
|
|
3028
|
-
${!
|
|
3028
|
+
${!a && t === "tertiary" && k`
|
|
3029
3029
|
color: ${n ? e.colors.tertiary : e.isDark ? e.colors.dark : e.colors.light};
|
|
3030
3030
|
background: ${n ? "transparent" : e.colors.tertiary};
|
|
3031
3031
|
border: solid 2px ${e.colors.tertiary};
|
|
@@ -3055,7 +3055,7 @@ const ea = (e, t, r, n, i, a, s, l) => k`
|
|
|
3055
3055
|
` : `font-size: ${e.fontSizes.button.lg};
|
|
3056
3056
|
line-height: ${e.lineHeights.button.lg};`}
|
|
3057
3057
|
|
|
3058
|
-
${
|
|
3058
|
+
${a && `
|
|
3059
3059
|
cursor: not-allowed;
|
|
3060
3060
|
background: ${e.colors.grayLight};
|
|
3061
3061
|
border-color: ${e.colors.grayLight};
|
|
@@ -3064,7 +3064,7 @@ const ea = (e, t, r, n, i, a, s, l) => k`
|
|
|
3064
3064
|
|
|
3065
3065
|
${i && "width: 100%;"}
|
|
3066
3066
|
`, ta = D.button`
|
|
3067
|
-
${({ theme: e, $variant: t, $size: r, $outline: n, $fullWidth: i, disabled: a }) => ea(e, t, r, n, i)}
|
|
3067
|
+
${({ theme: e, $variant: t, $size: r, $outline: n, $fullWidth: i, disabled: a }) => ea(e, t, r, n, i, a)}
|
|
3068
3068
|
`;
|
|
3069
3069
|
function qa({ $variant: e = "primary", ...t }) {
|
|
3070
3070
|
return /* @__PURE__ */ x.jsxs(ta, { $variant: e, ...t, children: [
|
|
@@ -3822,7 +3822,7 @@ const ba = D.span`
|
|
|
3822
3822
|
}`}
|
|
3823
3823
|
`;
|
|
3824
3824
|
function es({ type: e = "checkbox", ...t }) {
|
|
3825
|
-
return /* @__PURE__ */ x.jsxs(Qe, { $fullWidth: t.$fullWidth, children: [
|
|
3825
|
+
return /* @__PURE__ */ x.jsxs(Qe, { $fullWidth: t.$fullWidth, $label: t.$label, children: [
|
|
3826
3826
|
/* @__PURE__ */ x.jsxs(ba, { children: [
|
|
3827
3827
|
/* @__PURE__ */ x.jsx(xa, { ...t, type: e }),
|
|
3828
3828
|
/* @__PURE__ */ x.jsx(
|
package/dist/cherry.umd.cjs
CHANGED
|
@@ -374,7 +374,7 @@ b {
|
|
|
374
374
|
background: ${({theme:e})=>e.colors.light};
|
|
375
375
|
border-radius: ${({theme:e})=>e.spacing.radius.lg};
|
|
376
376
|
border: solid 1px ${({theme:e})=>e.colors.grayLight};
|
|
377
|
-
`;function Yi({theme:e=Fe,...t}){return x.jsx(Ui,{...t,theme:e,children:t.children})}const An=(e,t,r,n,i,a
|
|
377
|
+
`;function Yi({theme:e=Fe,...t}){return x.jsx(Ui,{...t,theme:e,children:t.children})}const An=(e,t,r,n,i,a)=>R`
|
|
378
378
|
${se};
|
|
379
379
|
font-family: inherit;
|
|
380
380
|
display: inline-flex;
|
|
@@ -397,7 +397,7 @@ b {
|
|
|
397
397
|
min-width: 24px;
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
${!
|
|
400
|
+
${!a&&t==="primary"&&R`
|
|
401
401
|
color: ${n?e.colors.primary:e.isDark?e.colors.dark:e.colors.light};
|
|
402
402
|
background: ${n?"transparent":e.colors.primary};
|
|
403
403
|
border: solid 2px ${e.colors.primary};
|
|
@@ -420,7 +420,7 @@ b {
|
|
|
420
420
|
}
|
|
421
421
|
`}
|
|
422
422
|
|
|
423
|
-
${!
|
|
423
|
+
${!a&&t==="secondary"&&R`
|
|
424
424
|
color: ${n?e.colors.secondary:e.isDark?e.colors.dark:e.colors.light};
|
|
425
425
|
background: ${n?"transparent":e.colors.secondary};
|
|
426
426
|
border: solid 2px ${e.colors.secondary};
|
|
@@ -443,7 +443,7 @@ b {
|
|
|
443
443
|
}
|
|
444
444
|
`}
|
|
445
445
|
|
|
446
|
-
${!
|
|
446
|
+
${!a&&t==="tertiary"&&R`
|
|
447
447
|
color: ${n?e.colors.tertiary:e.isDark?e.colors.dark:e.colors.light};
|
|
448
448
|
background: ${n?"transparent":e.colors.tertiary};
|
|
449
449
|
border: solid 2px ${e.colors.tertiary};
|
|
@@ -473,7 +473,7 @@ b {
|
|
|
473
473
|
`:`font-size: ${e.fontSizes.button.lg};
|
|
474
474
|
line-height: ${e.lineHeights.button.lg};`}
|
|
475
475
|
|
|
476
|
-
${
|
|
476
|
+
${a&&`
|
|
477
477
|
cursor: not-allowed;
|
|
478
478
|
background: ${e.colors.grayLight};
|
|
479
479
|
border-color: ${e.colors.grayLight};
|
|
@@ -482,7 +482,7 @@ b {
|
|
|
482
482
|
|
|
483
483
|
${i&&"width: 100%;"}
|
|
484
484
|
`,Xi=F.button`
|
|
485
|
-
${({theme:e,$variant:t,$size:r,$outline:n,$fullWidth:i,disabled:a})=>An(e,t,r,n,i)}
|
|
485
|
+
${({theme:e,$variant:t,$size:r,$outline:n,$fullWidth:i,disabled:a})=>An(e,t,r,n,i,a)}
|
|
486
486
|
`;function Ki({$variant:e="primary",...t}){return x.jsxs(Xi,{$variant:e,...t,children:[t.$iconPosition!=="right"&&t.$icon&&t.$icon,t.children,t.$iconPosition==="right"&&t.$icon&&t.$icon]})}const Ji=F.div`
|
|
487
487
|
${({$span:e})=>e&&`
|
|
488
488
|
grid-column: span ${e};
|
|
@@ -1147,4 +1147,4 @@ b {
|
|
|
1147
1147
|
background: ${t.colors.gray};
|
|
1148
1148
|
}
|
|
1149
1149
|
}`}
|
|
1150
|
-
`;function _a({type:e="checkbox",...t}){return x.jsxs(He,{$fullWidth:t.$fullWidth,children:[x.jsxs(Sa,{children:[x.jsx(wa,{...t,type:e}),x.jsx($a,{$error:t.$error,$success:t.$success,className:"fake-toggle",$size:t.$size})]}),t.$label&&x.jsx(Oe,{htmlFor:t.id,children:t.$label})]})}p.Box=Yi,p.Button=Ki,p.CherryThemeProvider=Gi,p.Col=Zi,p.Container=jn,p.Flex=ea,p.GlobalStyles=En,p.Grid=ra,p.IconArrow=Pn,p.IconCheck=Rn,p.Input=sa,p.MaxWidth=ua,p.Range=pa,p.Select=ha,p.Space=ba,p.StyledComponentsRegistry=ki,p.StyledIconWrapper=In,p.StyledInputWrapper=He,p.StyledLabel=Oe,p.Textarea=xa,p.ThemeContext=Tn,p.Toggle=_a,p.breakpoints=_t,p.buttonStyles=An,p.colors=Cn,p.colorsDark=On,p.fontSizes=mr,p.fonts=yr,p.formElementHeightStyles=Et,p.fullWidthStyles=ce,p.generateColSpanStyles=be,p.generateColsStyles=me,p.generateGapStyles=V,p.generateJustifyContentStyles=xe,p.generatePaddingStyles=ve,p.lineHeights=br,p.mq=N,p.resetButton=se,p.resetInput=kt,p.shadows=hr,p.spacing=gr,p.statusBorderStyles=ye,p.styledBlockquote=Mi,p.styledButton=Hi,p.styledButtonBig=Wi,p.styledCode=Fi,p.styledH1=Oi,p.styledH2=Ti,p.styledH3=ji,p.styledH4=Ai,p.styledH5=Li,p.styledH6=Ii,p.styledHero1=Ri,p.styledHero2=Pi,p.styledHero3=Ci,p.styledInput=Bi,p.styledInputBig=qi,p.styledSmall=zi,p.styledStrong=Di,p.styledText=Ni,p.theme=Fe,p.themeDark=Ei,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
1150
|
+
`;function _a({type:e="checkbox",...t}){return x.jsxs(He,{$fullWidth:t.$fullWidth,$label:t.$label,children:[x.jsxs(Sa,{children:[x.jsx(wa,{...t,type:e}),x.jsx($a,{$error:t.$error,$success:t.$success,className:"fake-toggle",$size:t.$size})]}),t.$label&&x.jsx(Oe,{htmlFor:t.id,children:t.$label})]})}p.Box=Yi,p.Button=Ki,p.CherryThemeProvider=Gi,p.Col=Zi,p.Container=jn,p.Flex=ea,p.GlobalStyles=En,p.Grid=ra,p.IconArrow=Pn,p.IconCheck=Rn,p.Input=sa,p.MaxWidth=ua,p.Range=pa,p.Select=ha,p.Space=ba,p.StyledComponentsRegistry=ki,p.StyledIconWrapper=In,p.StyledInputWrapper=He,p.StyledLabel=Oe,p.Textarea=xa,p.ThemeContext=Tn,p.Toggle=_a,p.breakpoints=_t,p.buttonStyles=An,p.colors=Cn,p.colorsDark=On,p.fontSizes=mr,p.fonts=yr,p.formElementHeightStyles=Et,p.fullWidthStyles=ce,p.generateColSpanStyles=be,p.generateColsStyles=me,p.generateGapStyles=V,p.generateJustifyContentStyles=xe,p.generatePaddingStyles=ve,p.lineHeights=br,p.mq=N,p.resetButton=se,p.resetInput=kt,p.shadows=hr,p.spacing=gr,p.statusBorderStyles=ye,p.styledBlockquote=Mi,p.styledButton=Hi,p.styledButtonBig=Wi,p.styledCode=Fi,p.styledH1=Oi,p.styledH2=Ti,p.styledH3=ji,p.styledH4=Ai,p.styledH5=Li,p.styledH6=Ii,p.styledHero1=Ri,p.styledHero2=Pi,p.styledHero3=Ci,p.styledInput=Bi,p.styledInputBig=qi,p.styledSmall=zi,p.styledStrong=Di,p.styledText=Ni,p.theme=Fe,p.themeDark=Ei,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
package/dist/lib/button.d.ts
CHANGED
|
@@ -11,6 +11,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
11
11
|
$iconPosition?: "left" | "right";
|
|
12
12
|
theme?: Theme;
|
|
13
13
|
}
|
|
14
|
-
export declare const buttonStyles: (theme: Theme, $variant?: "primary" | "secondary" | "tertiary", $size?: "default" | "big", $outline?: boolean, $fullWidth?: boolean,
|
|
14
|
+
export declare const buttonStyles: (theme: Theme, $variant?: "primary" | "secondary" | "tertiary", $size?: "default" | "big", $outline?: boolean, $fullWidth?: boolean, disabled?: boolean) => import('styled-components').RuleSet<object>;
|
|
15
15
|
declare function Button({ $variant, ...props }: ButtonProps): React.JSX.Element;
|
|
16
16
|
export { Button };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cherry-styled-components",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-29",
|
|
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",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@types/react-dom": "^18",
|
|
39
39
|
"@vitejs/plugin-react": "^4.3.1",
|
|
40
40
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
41
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
42
|
-
"next": "^14.2.
|
|
41
|
+
"eslint-plugin-react-refresh": "^0.4.8",
|
|
42
|
+
"next": "^14.2.5",
|
|
43
43
|
"polished": "^4.3.1",
|
|
44
44
|
"prettier": "^3.3.2",
|
|
45
45
|
"styled-components": "^6.1.11",
|
package/src/lib/button.tsx
CHANGED
package/src/lib/toggle.tsx
CHANGED
|
@@ -124,7 +124,7 @@ const StyledToggle = styled.input<ToggleProps>`
|
|
|
124
124
|
|
|
125
125
|
function Toggle({ type = "checkbox", ...props }: ToggleProps) {
|
|
126
126
|
return (
|
|
127
|
-
<StyledInputWrapper $fullWidth={props.$fullWidth}>
|
|
127
|
+
<StyledInputWrapper $fullWidth={props.$fullWidth} $label={props.$label}>
|
|
128
128
|
<StyledToggleWrapper>
|
|
129
129
|
<StyledToggle {...props} type={type} />
|
|
130
130
|
<StyledFakeToggle
|