cherry-styled-components 0.1.0 → 0.1.2
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 +5 -0
- package/.eslintrc.cjs +18 -0
- package/.prettierignore +5 -0
- package/.prettierrc +11 -0
- package/.supermaven/config.json +6 -0
- package/README.md +33 -11
- package/dist/App.d.ts +2 -0
- package/dist/cherry.js +5258 -0
- package/dist/cherry.umd.cjs +1217 -0
- package/dist/lib/box.d.ts +4 -0
- package/dist/lib/button.d.ts +15 -0
- package/dist/lib/col.d.ts +16 -0
- package/dist/lib/container.d.ts +19 -0
- package/dist/lib/flex.d.ts +29 -0
- package/dist/lib/grid.d.ts +24 -0
- package/dist/lib/index.d.ts +15 -0
- package/dist/lib/input.d.ts +27 -0
- package/dist/lib/max-width.d.ts +14 -0
- package/dist/lib/range.d.ts +14 -0
- package/dist/lib/select.d.ts +16 -0
- package/dist/lib/space.d.ts +14 -0
- package/dist/lib/styled-components/index.d.ts +2 -0
- package/dist/lib/styled-components/registry.d.ts +5 -0
- package/dist/lib/styled-components/theme-provider.d.ts +12 -0
- package/dist/lib/textarea.d.ts +15 -0
- package/dist/lib/toggle.d.ts +15 -0
- package/dist/lib/utils/global.d.ts +3 -0
- package/dist/lib/utils/icons.d.ts +9 -0
- package/dist/lib/utils/index.d.ts +5 -0
- package/dist/lib/utils/mixins.d.ts +11 -0
- package/dist/lib/utils/theme.d.ts +231 -0
- package/dist/lib/utils/typography.d.ts +20 -0
- package/dist/main.d.ts +1 -0
- package/dist/toggle-theme.d.ts +3 -0
- package/index.html +13 -0
- package/package.json +38 -25
- package/pnpm-workspace.yaml +3 -0
- package/src/App.tsx +101 -0
- package/src/lib/box.tsx +26 -0
- package/src/lib/button.tsx +162 -0
- package/src/lib/col.tsx +48 -0
- package/src/lib/container.tsx +69 -0
- package/src/lib/flex.tsx +99 -0
- package/src/lib/grid.tsx +76 -0
- package/src/{app/components/cherry → lib}/index.ts +1 -1
- package/src/lib/input.tsx +418 -0
- package/src/lib/max-width.tsx +53 -0
- package/src/lib/range.tsx +234 -0
- package/src/lib/select.tsx +136 -0
- package/src/lib/space.tsx +55 -0
- package/src/lib/styled-components/registry.tsx +29 -0
- package/src/lib/styled-components/theme-provider.tsx +50 -0
- package/src/lib/textarea.tsx +115 -0
- package/src/lib/toggle.tsx +158 -0
- package/src/{app/components/cherry → lib}/utils/global.tsx +20 -3
- package/src/lib/utils/icons.tsx +84 -0
- package/src/lib/utils/mixins.tsx +108 -0
- package/src/lib/utils/theme.ts +289 -0
- package/src/lib/utils/typography.tsx +204 -0
- package/src/main.tsx +19 -0
- package/src/toggle-theme.tsx +25 -0
- package/src/vite-env.d.ts +8 -0
- package/tsconfig.json +24 -0
- package/vite.config.js +24 -0
- package/src/app/components/cherry/box.tsx +0 -16
- package/src/app/components/cherry/button.tsx +0 -177
- package/src/app/components/cherry/col.tsx +0 -39
- package/src/app/components/cherry/container.tsx +0 -55
- package/src/app/components/cherry/flex.tsx +0 -90
- package/src/app/components/cherry/grid.tsx +0 -60
- package/src/app/components/cherry/input.tsx +0 -254
- package/src/app/components/cherry/max-width.tsx +0 -43
- package/src/app/components/cherry/range.tsx +0 -223
- package/src/app/components/cherry/select.tsx +0 -122
- package/src/app/components/cherry/space.tsx +0 -54
- package/src/app/components/cherry/styled-components/registry.tsx +0 -26
- package/src/app/components/cherry/styled-components/theme-provider.tsx +0 -21
- package/src/app/components/cherry/textarea.tsx +0 -98
- package/src/app/components/cherry/toggle.tsx +0 -148
- package/src/app/components/cherry/utils/icons.tsx +0 -168
- package/src/app/components/cherry/utils/mixins.tsx +0 -107
- package/src/app/components/cherry/utils/theme.ts +0 -241
- package/src/app/components/cherry/utils/typography.tsx +0 -204
- /package/src/{app/components/cherry → lib}/styled-components/index.ts +0 -0
- /package/src/{app/components/cherry → lib}/utils/index.ts +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from './utils';
|
|
3
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
$variant?: "primary" | "secondary" | "tertiary";
|
|
6
|
+
$size?: "default" | "big";
|
|
7
|
+
$outline?: boolean;
|
|
8
|
+
$fullWidth?: boolean;
|
|
9
|
+
$icon?: React.ReactNode;
|
|
10
|
+
$iconPosition?: "left" | "right";
|
|
11
|
+
theme?: Theme;
|
|
12
|
+
}
|
|
13
|
+
export declare const buttonStyles: (theme: Theme, $variant?: "primary" | "secondary" | "tertiary", $size?: "default" | "big", $outline?: boolean, $fullWidth?: boolean, disabled?: boolean) => import('styled-components').RuleSet<object>;
|
|
14
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
export { Button };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from './utils';
|
|
3
|
+
interface ColProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
$span?: number;
|
|
6
|
+
$xsSpan?: number;
|
|
7
|
+
$smSpan?: number;
|
|
8
|
+
$mdSpan?: number;
|
|
9
|
+
$lgSpan?: number;
|
|
10
|
+
$xlSpan?: number;
|
|
11
|
+
$xxlSpan?: number;
|
|
12
|
+
$xxxlSpan?: number;
|
|
13
|
+
theme?: Theme;
|
|
14
|
+
}
|
|
15
|
+
declare const Col: React.ForwardRefExoticComponent<ColProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export { Col };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from './utils';
|
|
3
|
+
export interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
$fluid?: boolean;
|
|
7
|
+
$textAlign?: "right" | "left" | "center";
|
|
8
|
+
$padding?: number | "none";
|
|
9
|
+
$xsPadding?: number | "none";
|
|
10
|
+
$smPadding?: number | "none";
|
|
11
|
+
$mdPadding?: number | "none";
|
|
12
|
+
$lgPadding?: number | "none";
|
|
13
|
+
$xlPadding?: number | "none";
|
|
14
|
+
$xxlPadding?: number | "none";
|
|
15
|
+
$xxxlPadding?: number | "none";
|
|
16
|
+
theme?: Theme;
|
|
17
|
+
}
|
|
18
|
+
declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export { Container };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from './utils';
|
|
3
|
+
type JustifyContentType = "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
|
|
4
|
+
type GapType = number | "none";
|
|
5
|
+
interface FlexProps extends React.AllHTMLAttributes<FlexProps> {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
$justifyContent?: JustifyContentType;
|
|
8
|
+
$xsJustifyContent?: JustifyContentType;
|
|
9
|
+
$smJustifyContent?: JustifyContentType;
|
|
10
|
+
$mdJustifyContent?: JustifyContentType;
|
|
11
|
+
$lgJustifyContent?: JustifyContentType;
|
|
12
|
+
$xlJustifyContent?: JustifyContentType;
|
|
13
|
+
$xxlJustifyContent?: JustifyContentType;
|
|
14
|
+
$xxxlJustifyContent?: JustifyContentType;
|
|
15
|
+
$wrap?: "wrap" | "nowrap" | "wrap-reverse";
|
|
16
|
+
$gap?: GapType;
|
|
17
|
+
$xsGap?: GapType;
|
|
18
|
+
$smGap?: GapType;
|
|
19
|
+
$mdGap?: GapType;
|
|
20
|
+
$lgGap?: GapType;
|
|
21
|
+
$xlGap?: GapType;
|
|
22
|
+
$xxlGap?: GapType;
|
|
23
|
+
$xxxlGap?: GapType;
|
|
24
|
+
$direction?: "row" | "column" | "row-reverse" | "column-reverse";
|
|
25
|
+
$fullWidth?: boolean;
|
|
26
|
+
theme?: Theme;
|
|
27
|
+
}
|
|
28
|
+
declare const Flex: React.ForwardRefExoticComponent<FlexProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export { Flex };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from './utils';
|
|
3
|
+
interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
$gap?: number | "none";
|
|
6
|
+
$xsGap?: number | "none";
|
|
7
|
+
$smGap?: number | "none";
|
|
8
|
+
$mdGap?: number | "none";
|
|
9
|
+
$lgGap?: number | "none";
|
|
10
|
+
$xlGap?: number | "none";
|
|
11
|
+
$xxlGap?: number | "none";
|
|
12
|
+
$xxxlGap?: number | "none";
|
|
13
|
+
$cols?: number;
|
|
14
|
+
$xsCols?: number;
|
|
15
|
+
$smCols?: number;
|
|
16
|
+
$mdCols?: number;
|
|
17
|
+
$lgCols?: number;
|
|
18
|
+
$xlCols?: number;
|
|
19
|
+
$xxlCols?: number;
|
|
20
|
+
$xxxlCols?: number;
|
|
21
|
+
theme?: Theme;
|
|
22
|
+
}
|
|
23
|
+
declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export { Grid };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './styled-components';
|
|
2
|
+
export * from './utils';
|
|
3
|
+
export * from './box';
|
|
4
|
+
export * from './button';
|
|
5
|
+
export * from './col';
|
|
6
|
+
export * from './container';
|
|
7
|
+
export * from './flex';
|
|
8
|
+
export * from './grid';
|
|
9
|
+
export * from './input';
|
|
10
|
+
export * from './max-width';
|
|
11
|
+
export * from './range';
|
|
12
|
+
export * from './select';
|
|
13
|
+
export * from './space';
|
|
14
|
+
export * from './textarea';
|
|
15
|
+
export * from './toggle';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IStyledComponent } from 'styled-components';
|
|
3
|
+
import { Theme } from './utils';
|
|
4
|
+
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
$wrapperClassName?: string;
|
|
7
|
+
$label?: string;
|
|
8
|
+
$size?: "default" | "big";
|
|
9
|
+
$error?: boolean;
|
|
10
|
+
$success?: boolean;
|
|
11
|
+
$fullWidth?: boolean;
|
|
12
|
+
$icon?: React.ReactNode;
|
|
13
|
+
$iconPosition?: "left" | "right";
|
|
14
|
+
theme?: Theme;
|
|
15
|
+
}
|
|
16
|
+
interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
17
|
+
$label?: string;
|
|
18
|
+
$size?: "default" | "big";
|
|
19
|
+
$error?: boolean;
|
|
20
|
+
$success?: boolean;
|
|
21
|
+
$fullWidth?: boolean;
|
|
22
|
+
theme?: Theme;
|
|
23
|
+
}
|
|
24
|
+
export declare const StyledInputWrapper: IStyledComponent<"web", React.HTMLAttributes<HTMLSpanElement> & Pick<InputProps, "$label" | "$fullWidth" | "type">>;
|
|
25
|
+
export declare const StyledLabel: IStyledComponent<"web", LabelProps>;
|
|
26
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
27
|
+
export { Input };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface MaxWidthProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
$size?: number;
|
|
4
|
+
$xs?: number;
|
|
5
|
+
$sm?: number;
|
|
6
|
+
$md?: number;
|
|
7
|
+
$lg?: number;
|
|
8
|
+
$xl?: number;
|
|
9
|
+
$xxl?: number;
|
|
10
|
+
$xxxl?: number;
|
|
11
|
+
$m0?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const MaxWidth: React.ForwardRefExoticComponent<MaxWidthProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export { MaxWidth };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from './utils';
|
|
3
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
4
|
+
className?: string;
|
|
5
|
+
$wrapperClassName?: string;
|
|
6
|
+
$label?: string;
|
|
7
|
+
$size?: "default" | "big";
|
|
8
|
+
$error?: boolean;
|
|
9
|
+
$success?: boolean;
|
|
10
|
+
$fullWidth?: boolean;
|
|
11
|
+
theme?: Theme;
|
|
12
|
+
}
|
|
13
|
+
declare const Range: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
export { Range };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IStyledComponent } from 'styled-components';
|
|
3
|
+
import { Theme } from './utils';
|
|
4
|
+
interface SelectProps extends React.InputHTMLAttributes<HTMLSelectElement> {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
$wrapperClassName?: string;
|
|
7
|
+
$label?: string;
|
|
8
|
+
$size?: "default" | "big";
|
|
9
|
+
$error?: boolean;
|
|
10
|
+
$success?: boolean;
|
|
11
|
+
$fullWidth?: boolean;
|
|
12
|
+
theme?: Theme;
|
|
13
|
+
}
|
|
14
|
+
export declare const StyledIconWrapper: IStyledComponent<"web", SelectProps>;
|
|
15
|
+
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
16
|
+
export { Select };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface SpaceProps {
|
|
3
|
+
$size?: number | "none";
|
|
4
|
+
$xs?: number | "none";
|
|
5
|
+
$sm?: number | "none";
|
|
6
|
+
$md?: number | "none";
|
|
7
|
+
$lg?: number | "none";
|
|
8
|
+
$xl?: number | "none";
|
|
9
|
+
$xxl?: number | "none";
|
|
10
|
+
$xxxl?: number | "none";
|
|
11
|
+
$horizontal?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const Space: React.ForwardRefExoticComponent<SpaceProps & React.RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
export { Space };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from '../utils';
|
|
3
|
+
interface ThemeContextProps {
|
|
4
|
+
setTheme: any;
|
|
5
|
+
}
|
|
6
|
+
export declare const ThemeContext: React.Context<ThemeContextProps>;
|
|
7
|
+
declare function CherryThemeProvider({ children, theme, themeDark, }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
theme: Theme;
|
|
10
|
+
themeDark?: Theme;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
export { CherryThemeProvider };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from './utils';
|
|
3
|
+
interface TextareaProps extends Omit<React.InputHTMLAttributes<HTMLTextAreaElement>, "size"> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
$wrapperClassName?: string;
|
|
6
|
+
$label?: string;
|
|
7
|
+
$size?: "default" | "big";
|
|
8
|
+
$error?: boolean;
|
|
9
|
+
$success?: boolean;
|
|
10
|
+
$fullWidth?: boolean;
|
|
11
|
+
theme?: Theme;
|
|
12
|
+
rows?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
15
|
+
export { Textarea };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from './utils';
|
|
3
|
+
interface ToggleProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
type?: "checkbox" | "radio";
|
|
6
|
+
$wrapperClassName?: string;
|
|
7
|
+
$label?: string;
|
|
8
|
+
$size?: "default" | "big";
|
|
9
|
+
$error?: boolean;
|
|
10
|
+
$success?: boolean;
|
|
11
|
+
$fullWidth?: boolean;
|
|
12
|
+
theme?: Theme;
|
|
13
|
+
}
|
|
14
|
+
declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLInputElement>>;
|
|
15
|
+
export { Toggle };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Theme } from './theme';
|
|
3
|
+
interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
4
|
+
theme?: Theme;
|
|
5
|
+
}
|
|
6
|
+
declare function IconCheck({ ...props }: IconProps): React.JSX.Element;
|
|
7
|
+
declare function IconArrow({ ...props }: IconProps): React.JSX.Element;
|
|
8
|
+
declare function IconCalendar({ ...props }: IconProps): React.JSX.Element;
|
|
9
|
+
export { IconCheck, IconArrow, IconCalendar };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Breakpoints, Theme } from './theme';
|
|
2
|
+
export declare const resetButton: import('styled-components').RuleSet<object>;
|
|
3
|
+
export declare const resetInput: import('styled-components').RuleSet<object>;
|
|
4
|
+
export declare const fullWidthStyles: (fullWidth: boolean) => import('styled-components').RuleSet<object> | undefined;
|
|
5
|
+
export declare const statusBorderStyles: ($error: boolean, $success: boolean, theme: Theme) => import('styled-components').RuleSet<object> | undefined;
|
|
6
|
+
export declare const formElementHeightStyles: ($size?: "default" | "big") => import('styled-components').RuleSet<object>;
|
|
7
|
+
export declare const generateGapStyles: (size: keyof Breakpoints<number>, gap: number | "none") => import('styled-components').RuleSet<object>;
|
|
8
|
+
export declare const generateColsStyles: (size: keyof Breakpoints<number>, cols: number) => import('styled-components').RuleSet<object>;
|
|
9
|
+
export declare const generateColSpanStyles: (size: keyof Breakpoints<number>, span: number) => import('styled-components').RuleSet<object>;
|
|
10
|
+
export declare const generatePaddingStyles: (size: keyof Breakpoints<number>, padding: number | "none") => import('styled-components').RuleSet<object>;
|
|
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>;
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
export declare const breakpoints: Breakpoints;
|
|
2
|
+
export declare function mq(minWidth: keyof Breakpoints): string;
|
|
3
|
+
export declare const spacing: Spacing;
|
|
4
|
+
export declare const colors: Colors;
|
|
5
|
+
export declare const colorsDark: Colors;
|
|
6
|
+
export declare const shadows: Shadows;
|
|
7
|
+
export declare const shadowsDark: Shadows;
|
|
8
|
+
export declare const fonts: Fonts;
|
|
9
|
+
export declare const fontSizes: FontSizes;
|
|
10
|
+
export declare const lineHeights: LineHeights;
|
|
11
|
+
export declare const theme: Theme;
|
|
12
|
+
export declare const themeDark: Theme;
|
|
13
|
+
export interface Breakpoints<TNumber = number> {
|
|
14
|
+
xs: TNumber;
|
|
15
|
+
sm: TNumber;
|
|
16
|
+
md: TNumber;
|
|
17
|
+
lg: TNumber;
|
|
18
|
+
xl: TNumber;
|
|
19
|
+
xxl: TNumber;
|
|
20
|
+
xxxl: TNumber;
|
|
21
|
+
}
|
|
22
|
+
export interface Spacing<TString = string> {
|
|
23
|
+
maxWidth: {
|
|
24
|
+
xs: TString;
|
|
25
|
+
xxxl: TString;
|
|
26
|
+
};
|
|
27
|
+
padding: {
|
|
28
|
+
xs: TString;
|
|
29
|
+
lg: TString;
|
|
30
|
+
};
|
|
31
|
+
radius: {
|
|
32
|
+
xs: TString;
|
|
33
|
+
lg: TString;
|
|
34
|
+
xl: TString;
|
|
35
|
+
};
|
|
36
|
+
gridGap: {
|
|
37
|
+
xs: TString;
|
|
38
|
+
lg: TString;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface Colors<TString = string> {
|
|
42
|
+
primaryLight: TString;
|
|
43
|
+
primary: TString;
|
|
44
|
+
primaryDark: TString;
|
|
45
|
+
secondaryLight: TString;
|
|
46
|
+
secondary: TString;
|
|
47
|
+
secondaryDark: TString;
|
|
48
|
+
tertiaryLight: TString;
|
|
49
|
+
tertiary: TString;
|
|
50
|
+
tertiaryDark: TString;
|
|
51
|
+
grayLight: TString;
|
|
52
|
+
gray: TString;
|
|
53
|
+
grayDark: TString;
|
|
54
|
+
success: TString;
|
|
55
|
+
error: TString;
|
|
56
|
+
warning: TString;
|
|
57
|
+
info: TString;
|
|
58
|
+
dark: TString;
|
|
59
|
+
light: TString;
|
|
60
|
+
}
|
|
61
|
+
interface Shadows<TString = string> {
|
|
62
|
+
xs: TString;
|
|
63
|
+
sm: TString;
|
|
64
|
+
md: TString;
|
|
65
|
+
lg: TString;
|
|
66
|
+
xl: TString;
|
|
67
|
+
}
|
|
68
|
+
export interface Fonts<TString = string> {
|
|
69
|
+
head: TString;
|
|
70
|
+
text: TString;
|
|
71
|
+
mono: TString;
|
|
72
|
+
}
|
|
73
|
+
export interface FontSizes<TString = string> {
|
|
74
|
+
hero1: {
|
|
75
|
+
xs: TString;
|
|
76
|
+
lg: TString;
|
|
77
|
+
};
|
|
78
|
+
hero2: {
|
|
79
|
+
xs: TString;
|
|
80
|
+
lg: TString;
|
|
81
|
+
};
|
|
82
|
+
hero3: {
|
|
83
|
+
xs: TString;
|
|
84
|
+
lg: TString;
|
|
85
|
+
};
|
|
86
|
+
h1: {
|
|
87
|
+
xs: TString;
|
|
88
|
+
lg: TString;
|
|
89
|
+
};
|
|
90
|
+
h2: {
|
|
91
|
+
xs: TString;
|
|
92
|
+
lg: TString;
|
|
93
|
+
};
|
|
94
|
+
h3: {
|
|
95
|
+
xs: TString;
|
|
96
|
+
lg: TString;
|
|
97
|
+
};
|
|
98
|
+
h4: {
|
|
99
|
+
xs: TString;
|
|
100
|
+
lg: TString;
|
|
101
|
+
};
|
|
102
|
+
h5: {
|
|
103
|
+
xs: TString;
|
|
104
|
+
lg: TString;
|
|
105
|
+
};
|
|
106
|
+
h6: {
|
|
107
|
+
xs: TString;
|
|
108
|
+
lg: TString;
|
|
109
|
+
};
|
|
110
|
+
text: {
|
|
111
|
+
xs: TString;
|
|
112
|
+
lg: TString;
|
|
113
|
+
};
|
|
114
|
+
strong: {
|
|
115
|
+
xs: TString;
|
|
116
|
+
lg: TString;
|
|
117
|
+
};
|
|
118
|
+
small: {
|
|
119
|
+
xs: TString;
|
|
120
|
+
lg: TString;
|
|
121
|
+
};
|
|
122
|
+
blockquote: {
|
|
123
|
+
xs: TString;
|
|
124
|
+
lg: TString;
|
|
125
|
+
};
|
|
126
|
+
code: {
|
|
127
|
+
xs: TString;
|
|
128
|
+
lg: TString;
|
|
129
|
+
};
|
|
130
|
+
button: {
|
|
131
|
+
xs: TString;
|
|
132
|
+
lg: TString;
|
|
133
|
+
};
|
|
134
|
+
buttonBig: {
|
|
135
|
+
xs: TString;
|
|
136
|
+
lg: TString;
|
|
137
|
+
};
|
|
138
|
+
input: {
|
|
139
|
+
xs: TString;
|
|
140
|
+
lg: TString;
|
|
141
|
+
};
|
|
142
|
+
inputBig: {
|
|
143
|
+
xs: TString;
|
|
144
|
+
lg: TString;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
export interface LineHeights<TString = string> {
|
|
148
|
+
hero1: {
|
|
149
|
+
xs: TString;
|
|
150
|
+
lg: TString;
|
|
151
|
+
};
|
|
152
|
+
hero2: {
|
|
153
|
+
xs: TString;
|
|
154
|
+
lg: TString;
|
|
155
|
+
};
|
|
156
|
+
hero3: {
|
|
157
|
+
xs: TString;
|
|
158
|
+
lg: TString;
|
|
159
|
+
};
|
|
160
|
+
h1: {
|
|
161
|
+
xs: TString;
|
|
162
|
+
lg: TString;
|
|
163
|
+
};
|
|
164
|
+
h2: {
|
|
165
|
+
xs: TString;
|
|
166
|
+
lg: TString;
|
|
167
|
+
};
|
|
168
|
+
h3: {
|
|
169
|
+
xs: TString;
|
|
170
|
+
lg: TString;
|
|
171
|
+
};
|
|
172
|
+
h4: {
|
|
173
|
+
xs: TString;
|
|
174
|
+
lg: TString;
|
|
175
|
+
};
|
|
176
|
+
h5: {
|
|
177
|
+
xs: TString;
|
|
178
|
+
lg: TString;
|
|
179
|
+
};
|
|
180
|
+
h6: {
|
|
181
|
+
xs: TString;
|
|
182
|
+
lg: TString;
|
|
183
|
+
};
|
|
184
|
+
text: {
|
|
185
|
+
xs: TString;
|
|
186
|
+
lg: TString;
|
|
187
|
+
};
|
|
188
|
+
strong: {
|
|
189
|
+
xs: TString;
|
|
190
|
+
lg: TString;
|
|
191
|
+
};
|
|
192
|
+
small: {
|
|
193
|
+
xs: TString;
|
|
194
|
+
lg: TString;
|
|
195
|
+
};
|
|
196
|
+
blockquote: {
|
|
197
|
+
xs: TString;
|
|
198
|
+
lg: TString;
|
|
199
|
+
};
|
|
200
|
+
code: {
|
|
201
|
+
xs: TString;
|
|
202
|
+
lg: TString;
|
|
203
|
+
};
|
|
204
|
+
button: {
|
|
205
|
+
xs: TString;
|
|
206
|
+
lg: TString;
|
|
207
|
+
};
|
|
208
|
+
buttonBig: {
|
|
209
|
+
xs: TString;
|
|
210
|
+
lg: TString;
|
|
211
|
+
};
|
|
212
|
+
input: {
|
|
213
|
+
xs: TString;
|
|
214
|
+
lg: TString;
|
|
215
|
+
};
|
|
216
|
+
inputBig: {
|
|
217
|
+
xs: TString;
|
|
218
|
+
lg: TString;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
export interface Theme {
|
|
222
|
+
breakpoints: Breakpoints;
|
|
223
|
+
spacing: Spacing;
|
|
224
|
+
colors: Colors;
|
|
225
|
+
shadows: Shadows;
|
|
226
|
+
fonts: Fonts;
|
|
227
|
+
fontSizes: FontSizes;
|
|
228
|
+
lineHeights: LineHeights;
|
|
229
|
+
isDark: boolean;
|
|
230
|
+
}
|
|
231
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Theme } from './theme';
|
|
2
|
+
declare const styledHero1: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
3
|
+
declare const styledHero2: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
4
|
+
declare const styledHero3: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
5
|
+
declare const styledH1: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
6
|
+
declare const styledH2: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
7
|
+
declare const styledH3: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
8
|
+
declare const styledH4: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
9
|
+
declare const styledH5: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
10
|
+
declare const styledH6: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
11
|
+
declare const styledText: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
12
|
+
declare const styledStrong: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
13
|
+
declare const styledSmall: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
14
|
+
declare const styledBlockquote: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
15
|
+
declare const styledCode: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
16
|
+
declare const styledButton: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
17
|
+
declare const styledButtonBig: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
18
|
+
declare const styledInput: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
19
|
+
declare const styledInputBig: (theme: Theme) => import('styled-components').RuleSet<object>;
|
|
20
|
+
export { styledHero1, styledHero2, styledHero3, styledH1, styledH2, styledH3, styledH4, styledH5, styledH6, styledText, styledStrong, styledSmall, styledBlockquote, styledCode, styledButton, styledButtonBig, styledInput, styledInputBig, };
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Vite + React + TS</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,37 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cherry-styled-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Cherry is a design system for the modern web. Designed in Figma, built in React using Typescript.",
|
|
4
5
|
"private": false,
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/cherry.umd.cjs",
|
|
8
|
+
"module": "./dist/cherry.js",
|
|
9
|
+
"types": "./dist/lib/index.d.ts",
|
|
10
|
+
"author": "Luan Gjokaj <luan@riangle.com>",
|
|
11
|
+
"homepage": "https://cherry.design",
|
|
12
|
+
"repository": "https://github.com/cherry-design-system/styled-components",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"cherry",
|
|
16
|
+
"react",
|
|
17
|
+
"figma",
|
|
18
|
+
"components",
|
|
19
|
+
"ui",
|
|
20
|
+
"css",
|
|
21
|
+
"framework",
|
|
22
|
+
"design",
|
|
23
|
+
"design system",
|
|
24
|
+
"styled-components"
|
|
8
25
|
],
|
|
9
26
|
"scripts": {
|
|
10
|
-
"dev": "
|
|
11
|
-
"build": "
|
|
12
|
-
"
|
|
13
|
-
"lint": "next lint",
|
|
14
|
-
"format": "prettier --write \"./src/**/*.{js,json,ts,tsx}\" \"!.node_modules/**\""
|
|
27
|
+
"dev": "vite dev",
|
|
28
|
+
"build": "vite build",
|
|
29
|
+
"format": "prettier --write \"./**/*.{js,json,ts,tsx}\""
|
|
15
30
|
},
|
|
16
31
|
"dependencies": {
|
|
17
|
-
"
|
|
18
|
-
"react": "^
|
|
19
|
-
"react-dom": "^18"
|
|
32
|
+
"react": "^19",
|
|
33
|
+
"react-dom": "^19"
|
|
20
34
|
},
|
|
21
35
|
"devDependencies": {
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"@types/
|
|
25
|
-
"@
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"eslint-config-next": "14.1.3",
|
|
36
|
+
"@types/node": "^25",
|
|
37
|
+
"@types/react": "^19",
|
|
38
|
+
"@types/react-dom": "^19",
|
|
39
|
+
"@vitejs/plugin-react": "^5.1.3",
|
|
40
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
41
|
+
"eslint-plugin-react-refresh": "^0.5.0",
|
|
42
|
+
"next": "^16.1.6",
|
|
30
43
|
"polished": "^4.3.1",
|
|
31
|
-
"prettier": "^3.
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
44
|
+
"prettier": "^3.8.1",
|
|
45
|
+
"styled-components": "^6.3.8",
|
|
46
|
+
"typescript": "^5",
|
|
47
|
+
"vite": "^7.3.1",
|
|
48
|
+
"vite-plugin-dts": "^4.5.4"
|
|
36
49
|
}
|
|
37
50
|
}
|