@shiflo/ui 0.0.0
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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/assets/icons/index.d.ts +2 -0
- package/dist/assets/icons/index.mjs +18 -0
- package/dist/assets/icons/index.ts-BL4wFg6B.js +22 -0
- package/dist/assets/icons/line/calendar-line.svg-DHsuXoUL.js +5 -0
- package/dist/assets/icons/line/index.d.ts +1 -0
- package/dist/assets/icons/line/index.mjs +4 -0
- package/dist/assets/icons/solid/calendar-days-solid.svg-CIj8vf6t.js +5 -0
- package/dist/assets/icons/solid/calendar-lines-solid.svg-D2qG_E7t.js +5 -0
- package/dist/assets/icons/solid/calendar-week-solid.svg-CVmrJtif.js +5 -0
- package/dist/assets/icons/solid/calendars-solid.svg-rClh_xBu.js +5 -0
- package/dist/assets/icons/solid/gear-solid.svg-C6vEx0Wx.js +5 -0
- package/dist/assets/icons/solid/grid-2-solid.svg-BRtzwK6Y.js +5 -0
- package/dist/assets/icons/solid/index.d.ts +7 -0
- package/dist/assets/icons/solid/index.mjs +16 -0
- package/dist/assets/icons/solid/pen-to-square-solid.svg-DUdNcuTM.js +5 -0
- package/dist/components/Box/Box.d.ts +3 -0
- package/dist/components/Box/Box.mjs +29 -0
- package/dist/components/Box/Box.typing.d.ts +8 -0
- package/dist/components/Box/index.d.ts +4 -0
- package/dist/components/Box/index.mjs +4 -0
- package/dist/components/Button/Button.d.ts +3 -0
- package/dist/components/Button/Button.mjs +202 -0
- package/dist/components/Button/Button.typing.d.ts +19 -0
- package/dist/components/Button/index.d.ts +4 -0
- package/dist/components/Button/index.mjs +4 -0
- package/dist/components/Icon/Icon.d.ts +3 -0
- package/dist/components/Icon/Icon.mjs +27 -0
- package/dist/components/Icon/Icon.typing.d.ts +8 -0
- package/dist/components/Icon/index.d.ts +4 -0
- package/dist/components/Icon/index.mjs +4 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.mjs +75 -0
- package/dist/components/Tag/Tag.typing.d.ts +4 -0
- package/dist/components/Tag/index.d.ts +4 -0
- package/dist/components/Tag/index.mjs +4 -0
- package/dist/components/Typography/Typography.d.ts +3 -0
- package/dist/components/Typography/Typography.mjs +45 -0
- package/dist/components/Typography/Typography.typing.d.ts +12 -0
- package/dist/components/Typography/index.d.ts +4 -0
- package/dist/components/Typography/index.mjs +4 -0
- package/dist/theme/GlobalStyle.d.ts +2 -0
- package/dist/theme/GlobalStyle.mjs +41 -0
- package/dist/theme/ThemeProvider.d.ts +6 -0
- package/dist/theme/ThemeProvider.mjs +20 -0
- package/dist/theme/dark.d.ts +3 -0
- package/dist/theme/dark.mjs +85 -0
- package/dist/theme/light.d.ts +3 -0
- package/dist/theme/light.mjs +85 -0
- package/dist/theme/radius.d.ts +18 -0
- package/dist/theme/radius.mjs +20 -0
- package/dist/theme/spacing.d.ts +19 -0
- package/dist/theme/spacing.mjs +21 -0
- package/dist/theme/typing.d.ts +84 -0
- package/dist/theme/typography.d.ts +43 -0
- package/dist/theme/typography.mjs +45 -0
- package/dist/typings/utility.d.ts +7 -0
- package/dist/typings/utility.mjs +1 -0
- package/dist/utils/getObjectPaths.d.ts +1 -0
- package/dist/utils/getObjectPaths.mjs +9 -0
- package/dist/utils/getUtilityProps.d.ts +2 -0
- package/dist/utils/getUtilityProps.mjs +40 -0
- package/dist/utils/getValueByPath.d.ts +1 -0
- package/dist/utils/getValueByPath.mjs +7 -0
- package/package.json +96 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import p from "basic-styled";
|
|
3
|
+
import f from "../../utils/getUtilityProps.mjs";
|
|
4
|
+
import n from "../../utils/getValueByPath.mjs";
|
|
5
|
+
const y = p.div`
|
|
6
|
+
transition:
|
|
7
|
+
font-size 0.2s,
|
|
8
|
+
line-height 0.2s,
|
|
9
|
+
border-width 0.2s,
|
|
10
|
+
border-radius 0.2s,
|
|
11
|
+
border-color 0.2s,
|
|
12
|
+
color 0.2s;
|
|
13
|
+
|
|
14
|
+
${({ theme: { typography: o, palette: t }, variant: i, color: r, fontWeight: l, borderColor: s, ...d }) => {
|
|
15
|
+
const { fontSize: a, lineHeight: b } = o[i || "body2"], e = {
|
|
16
|
+
fontSize: a,
|
|
17
|
+
lineHeight: b,
|
|
18
|
+
fontWeight: l
|
|
19
|
+
};
|
|
20
|
+
return Object.assign(e, f(d)), s && Object.assign(e, {
|
|
21
|
+
borderColor: n(t, s)
|
|
22
|
+
}), Object.assign(e, {
|
|
23
|
+
color: n(t, r)
|
|
24
|
+
}), e;
|
|
25
|
+
}};
|
|
26
|
+
|
|
27
|
+
${({ noWrap: o }) => o ? {
|
|
28
|
+
whiteSpace: "nowrap",
|
|
29
|
+
overflow: "hidden",
|
|
30
|
+
textOverflow: "ellipsis"
|
|
31
|
+
} : {}};
|
|
32
|
+
|
|
33
|
+
${({ lineClamp: o }) => o ? {
|
|
34
|
+
display: "-webkit-box",
|
|
35
|
+
overflow: "hidden",
|
|
36
|
+
"-webkit-line-clamp": o,
|
|
37
|
+
"-webkit-box-orient": "vertical"
|
|
38
|
+
} : {}};
|
|
39
|
+
`;
|
|
40
|
+
function u({ ref: o, variant: t = "body2", fontWeight: i = 400, ...r }) {
|
|
41
|
+
return /* @__PURE__ */ c(y, { ref: o, variant: t, fontWeight: i, ...r });
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
u as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { UtilityProps, RecursionPath } from '../../typings/utility';
|
|
3
|
+
import { BasicTheme } from 'basic-styled';
|
|
4
|
+
export interface TypographyProps extends ComponentPropsWithRef<"div">, UtilityProps {
|
|
5
|
+
variant?: keyof BasicTheme["typography"];
|
|
6
|
+
fontWeight?: 400 | 500 | 700;
|
|
7
|
+
color?: RecursionPath<BasicTheme["palette"]> | "inherit";
|
|
8
|
+
borderColor?: RecursionPath<BasicTheme["palette"]>;
|
|
9
|
+
textAlign?: "left" | "center" | "right";
|
|
10
|
+
noWrap?: boolean;
|
|
11
|
+
lineClamp?: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import e from "basic-styled";
|
|
3
|
+
function r() {
|
|
4
|
+
return /* @__PURE__ */ t(a, { globalStyle: !0 });
|
|
5
|
+
}
|
|
6
|
+
const a = e.style`
|
|
7
|
+
html,
|
|
8
|
+
body {
|
|
9
|
+
background-color: ${({
|
|
10
|
+
theme: {
|
|
11
|
+
palette: { common: o }
|
|
12
|
+
}
|
|
13
|
+
}) => o.background};
|
|
14
|
+
color: ${({
|
|
15
|
+
theme: {
|
|
16
|
+
palette: { text: o }
|
|
17
|
+
}
|
|
18
|
+
}) => o.primary};
|
|
19
|
+
font-family:
|
|
20
|
+
Spoqa Han Sans Neo,
|
|
21
|
+
-apple-system-,
|
|
22
|
+
BlinkMacSystemFont,
|
|
23
|
+
Helvetica Neue,
|
|
24
|
+
Apple SD Gothic Neo,
|
|
25
|
+
Malgun Gothic,
|
|
26
|
+
Nanum Gothic,
|
|
27
|
+
Noto Sans KR,
|
|
28
|
+
Noto Sans CJK KR,
|
|
29
|
+
arial,
|
|
30
|
+
Dotum,
|
|
31
|
+
Tahoma,
|
|
32
|
+
Geneva,
|
|
33
|
+
sans-serif;
|
|
34
|
+
transition:
|
|
35
|
+
background-color 0.2s,
|
|
36
|
+
color 0.2s;
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
export {
|
|
40
|
+
r as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import m from "basic-styled/setup/createBuilder";
|
|
3
|
+
import i from "basic-styled/setup/ResetStyle";
|
|
4
|
+
import f from "basic-styled/setup/ThemeProvider";
|
|
5
|
+
import l from "./dark.mjs";
|
|
6
|
+
import p from "./GlobalStyle.mjs";
|
|
7
|
+
import h from "./light.mjs";
|
|
8
|
+
m({
|
|
9
|
+
prefix: "shiflo-ui"
|
|
10
|
+
});
|
|
11
|
+
function j({ children: e, theme: o }) {
|
|
12
|
+
return /* @__PURE__ */ t(f, { theme: o === "dark" ? l : h, children: [
|
|
13
|
+
/* @__PURE__ */ r(i, {}),
|
|
14
|
+
/* @__PURE__ */ r(p, {}),
|
|
15
|
+
e
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
j as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import a from "./radius.mjs";
|
|
2
|
+
import r from "./spacing.mjs";
|
|
3
|
+
import i from "./typography.mjs";
|
|
4
|
+
const t = {
|
|
5
|
+
mode: "dark",
|
|
6
|
+
palette: {
|
|
7
|
+
primary: {
|
|
8
|
+
main: "#5A8BFF",
|
|
9
|
+
light: "#A5C0FF",
|
|
10
|
+
dark: "#004ECC",
|
|
11
|
+
hover: "#7EAFFF",
|
|
12
|
+
active: "#336DFF",
|
|
13
|
+
alpha: {
|
|
14
|
+
5: "rgba(90, 139, 255, 0.05)",
|
|
15
|
+
10: "rgba(90, 139, 255, 0.1)",
|
|
16
|
+
20: "rgba(90, 139, 255, 0.2)",
|
|
17
|
+
30: "rgba(90, 139, 255, 0.3)"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
secondary: {
|
|
21
|
+
main: "#2D2F36",
|
|
22
|
+
light: "#40434A",
|
|
23
|
+
dark: "#1F2024",
|
|
24
|
+
alpha: {
|
|
25
|
+
5: "rgba(45, 47, 54, 0.05)",
|
|
26
|
+
10: "rgba(45, 47, 54, 0.1)",
|
|
27
|
+
20: "rgba(45, 47, 54, 0.2)",
|
|
28
|
+
30: "rgba(45, 47, 54, 0.3)"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
neutral: {
|
|
32
|
+
100: "#2D2F36",
|
|
33
|
+
200: "#40434A",
|
|
34
|
+
300: "#52565D",
|
|
35
|
+
400: "#6C757D",
|
|
36
|
+
500: "#889096",
|
|
37
|
+
600: "#A5ACB3",
|
|
38
|
+
700: "#C0C7CE",
|
|
39
|
+
800: "#D5DBE0",
|
|
40
|
+
900: "#EAECEF"
|
|
41
|
+
},
|
|
42
|
+
feedback: {
|
|
43
|
+
success: {
|
|
44
|
+
light: "#508A5A",
|
|
45
|
+
main: "#6CBF73",
|
|
46
|
+
dark: "#9FD8A1"
|
|
47
|
+
},
|
|
48
|
+
warning: {
|
|
49
|
+
light: "#A47B14",
|
|
50
|
+
main: "#E5C67C",
|
|
51
|
+
dark: "#FFE59A"
|
|
52
|
+
},
|
|
53
|
+
error: {
|
|
54
|
+
light: "#8C4F4F",
|
|
55
|
+
main: "#D67C7C",
|
|
56
|
+
dark: "#F5A3A3"
|
|
57
|
+
},
|
|
58
|
+
info: {
|
|
59
|
+
light: "#446E9E",
|
|
60
|
+
main: "#74A8DD",
|
|
61
|
+
dark: "#A3CFF5"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
common: {
|
|
65
|
+
background: "#22252A",
|
|
66
|
+
surface: "#30333A"
|
|
67
|
+
},
|
|
68
|
+
text: {
|
|
69
|
+
primary: "#EAECEF",
|
|
70
|
+
secondary: "#C0C7CE",
|
|
71
|
+
disabled: "#6C757D"
|
|
72
|
+
},
|
|
73
|
+
border: {
|
|
74
|
+
light: "#52565D",
|
|
75
|
+
main: "#6C757D",
|
|
76
|
+
dark: "#A5ACB3"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
typography: i,
|
|
80
|
+
spacing: r,
|
|
81
|
+
radius: a
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
t as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import a from "./radius.mjs";
|
|
2
|
+
import F from "./spacing.mjs";
|
|
3
|
+
import r from "./typography.mjs";
|
|
4
|
+
const C = {
|
|
5
|
+
mode: "light",
|
|
6
|
+
palette: {
|
|
7
|
+
primary: {
|
|
8
|
+
main: "#004ECC",
|
|
9
|
+
light: "#5A8BFF",
|
|
10
|
+
dark: "#003699",
|
|
11
|
+
hover: "#336DFF",
|
|
12
|
+
active: "#003699",
|
|
13
|
+
alpha: {
|
|
14
|
+
5: "rgba(0, 78, 204, 0.05)",
|
|
15
|
+
10: "rgba(0, 78, 204, 0.1)",
|
|
16
|
+
20: "rgba(0, 78, 204, 0.2)",
|
|
17
|
+
30: "rgba(0, 78, 204, 0.3)"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
secondary: {
|
|
21
|
+
main: "#F8F9FA",
|
|
22
|
+
light: "#FFFFFF",
|
|
23
|
+
dark: "#CED4DA",
|
|
24
|
+
alpha: {
|
|
25
|
+
5: "rgba(248, 249, 250, 0.05)",
|
|
26
|
+
10: "rgba(248, 249, 250, 0.1)",
|
|
27
|
+
20: "rgba(248, 249, 250, 0.2)",
|
|
28
|
+
30: "rgba(248, 249, 250, 0.3)"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
neutral: {
|
|
32
|
+
100: "#F8F9FA",
|
|
33
|
+
200: "#E9ECEF",
|
|
34
|
+
300: "#DEE2E6",
|
|
35
|
+
400: "#BCC0C4",
|
|
36
|
+
500: "#ADB5BD",
|
|
37
|
+
600: "#6C757D",
|
|
38
|
+
700: "#495057",
|
|
39
|
+
800: "#343A40",
|
|
40
|
+
900: "#212529"
|
|
41
|
+
},
|
|
42
|
+
feedback: {
|
|
43
|
+
success: {
|
|
44
|
+
light: "#C7EFC8",
|
|
45
|
+
main: "#A3D9A5",
|
|
46
|
+
dark: "#6CBF73"
|
|
47
|
+
},
|
|
48
|
+
warning: {
|
|
49
|
+
light: "#FFF2C2",
|
|
50
|
+
main: "#FFE59A",
|
|
51
|
+
dark: "#E5C67C"
|
|
52
|
+
},
|
|
53
|
+
error: {
|
|
54
|
+
light: "#FBC7C7",
|
|
55
|
+
main: "#F5A3A3",
|
|
56
|
+
dark: "#D67C7C"
|
|
57
|
+
},
|
|
58
|
+
info: {
|
|
59
|
+
light: "#C7E0FA",
|
|
60
|
+
main: "#A3CFF5",
|
|
61
|
+
dark: "#74A8DD"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
common: {
|
|
65
|
+
background: "#FFFFFF",
|
|
66
|
+
surface: "#FFFFFF"
|
|
67
|
+
},
|
|
68
|
+
text: {
|
|
69
|
+
primary: "#212529",
|
|
70
|
+
secondary: "#495057",
|
|
71
|
+
disabled: "#ADB5BD"
|
|
72
|
+
},
|
|
73
|
+
border: {
|
|
74
|
+
light: "#DEE2E6",
|
|
75
|
+
main: "#ADB5BD",
|
|
76
|
+
dark: "#6C757D"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
typography: r,
|
|
80
|
+
spacing: F,
|
|
81
|
+
radius: a
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
C as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const radius: {
|
|
2
|
+
"100": string;
|
|
3
|
+
"150": string;
|
|
4
|
+
"200": string;
|
|
5
|
+
"250": string;
|
|
6
|
+
"300": string;
|
|
7
|
+
"350": string;
|
|
8
|
+
"400": string;
|
|
9
|
+
"450": string;
|
|
10
|
+
"500": string;
|
|
11
|
+
"550": string;
|
|
12
|
+
"600": string;
|
|
13
|
+
"650": string;
|
|
14
|
+
"700": string;
|
|
15
|
+
"750": string;
|
|
16
|
+
"800": string;
|
|
17
|
+
};
|
|
18
|
+
export default radius;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const p = {
|
|
2
|
+
100: "4px",
|
|
3
|
+
150: "6px",
|
|
4
|
+
200: "8px",
|
|
5
|
+
250: "10px",
|
|
6
|
+
300: "12px",
|
|
7
|
+
350: "14px",
|
|
8
|
+
400: "16px",
|
|
9
|
+
450: "18px",
|
|
10
|
+
500: "20px",
|
|
11
|
+
550: "22px",
|
|
12
|
+
600: "24px",
|
|
13
|
+
650: "26px",
|
|
14
|
+
700: "28px",
|
|
15
|
+
750: "30px",
|
|
16
|
+
800: "32px"
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
p as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const spacing: {
|
|
2
|
+
"50": string;
|
|
3
|
+
"100": string;
|
|
4
|
+
"150": string;
|
|
5
|
+
"200": string;
|
|
6
|
+
"250": string;
|
|
7
|
+
"300": string;
|
|
8
|
+
"350": string;
|
|
9
|
+
"400": string;
|
|
10
|
+
"450": string;
|
|
11
|
+
"500": string;
|
|
12
|
+
"550": string;
|
|
13
|
+
"600": string;
|
|
14
|
+
"650": string;
|
|
15
|
+
"700": string;
|
|
16
|
+
"750": string;
|
|
17
|
+
"800": string;
|
|
18
|
+
};
|
|
19
|
+
export default spacing;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const p = {
|
|
2
|
+
50: "2px",
|
|
3
|
+
100: "4px",
|
|
4
|
+
150: "6px",
|
|
5
|
+
200: "8px",
|
|
6
|
+
250: "10px",
|
|
7
|
+
300: "12px",
|
|
8
|
+
350: "14px",
|
|
9
|
+
400: "16px",
|
|
10
|
+
450: "18px",
|
|
11
|
+
500: "20px",
|
|
12
|
+
550: "22px",
|
|
13
|
+
600: "24px",
|
|
14
|
+
650: "26px",
|
|
15
|
+
700: "28px",
|
|
16
|
+
750: "30px",
|
|
17
|
+
800: "32px"
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
p as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { default as radius } from './radius';
|
|
2
|
+
import { default as spacing } from './spacing';
|
|
3
|
+
import { default as typography } from './typography';
|
|
4
|
+
declare module "basic-styled" {
|
|
5
|
+
interface BasicTheme {
|
|
6
|
+
mode: "light" | "dark";
|
|
7
|
+
palette: {
|
|
8
|
+
primary: {
|
|
9
|
+
main: string;
|
|
10
|
+
light: string;
|
|
11
|
+
dark: string;
|
|
12
|
+
hover: string;
|
|
13
|
+
active: string;
|
|
14
|
+
alpha: {
|
|
15
|
+
5: string;
|
|
16
|
+
10: string;
|
|
17
|
+
20: string;
|
|
18
|
+
30: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
secondary: {
|
|
22
|
+
main: string;
|
|
23
|
+
light: string;
|
|
24
|
+
dark: string;
|
|
25
|
+
alpha: {
|
|
26
|
+
5: string;
|
|
27
|
+
10: string;
|
|
28
|
+
20: string;
|
|
29
|
+
30: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
neutral: {
|
|
33
|
+
100: string;
|
|
34
|
+
200: string;
|
|
35
|
+
300: string;
|
|
36
|
+
400: string;
|
|
37
|
+
500: string;
|
|
38
|
+
600: string;
|
|
39
|
+
700: string;
|
|
40
|
+
800: string;
|
|
41
|
+
900: string;
|
|
42
|
+
};
|
|
43
|
+
feedback: {
|
|
44
|
+
success: {
|
|
45
|
+
light: string;
|
|
46
|
+
main: string;
|
|
47
|
+
dark: string;
|
|
48
|
+
};
|
|
49
|
+
warning: {
|
|
50
|
+
light: string;
|
|
51
|
+
main: string;
|
|
52
|
+
dark: string;
|
|
53
|
+
};
|
|
54
|
+
error: {
|
|
55
|
+
light: string;
|
|
56
|
+
main: string;
|
|
57
|
+
dark: string;
|
|
58
|
+
};
|
|
59
|
+
info: {
|
|
60
|
+
light: string;
|
|
61
|
+
main: string;
|
|
62
|
+
dark: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
common: {
|
|
66
|
+
background: string;
|
|
67
|
+
surface: string;
|
|
68
|
+
};
|
|
69
|
+
text: {
|
|
70
|
+
primary: string;
|
|
71
|
+
secondary: string;
|
|
72
|
+
disabled: string;
|
|
73
|
+
};
|
|
74
|
+
border: {
|
|
75
|
+
light: string;
|
|
76
|
+
main: string;
|
|
77
|
+
dark: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
typography: typeof typography;
|
|
81
|
+
spacing: typeof spacing;
|
|
82
|
+
radius: typeof radius;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare const typography: {
|
|
2
|
+
heading1: {
|
|
3
|
+
tag: string;
|
|
4
|
+
fontSize: string;
|
|
5
|
+
lineHeight: string;
|
|
6
|
+
};
|
|
7
|
+
heading2: {
|
|
8
|
+
tag: string;
|
|
9
|
+
fontSize: string;
|
|
10
|
+
lineHeight: string;
|
|
11
|
+
};
|
|
12
|
+
heading3: {
|
|
13
|
+
tag: string;
|
|
14
|
+
fontSize: string;
|
|
15
|
+
lineHeight: string;
|
|
16
|
+
};
|
|
17
|
+
body1: {
|
|
18
|
+
tag: string;
|
|
19
|
+
fontSize: string;
|
|
20
|
+
lineHeight: string;
|
|
21
|
+
};
|
|
22
|
+
body2: {
|
|
23
|
+
tag: string;
|
|
24
|
+
fontSize: string;
|
|
25
|
+
lineHeight: string;
|
|
26
|
+
};
|
|
27
|
+
small1: {
|
|
28
|
+
tag: string;
|
|
29
|
+
fontSize: string;
|
|
30
|
+
lineHeight: string;
|
|
31
|
+
};
|
|
32
|
+
small2: {
|
|
33
|
+
tag: string;
|
|
34
|
+
fontSize: string;
|
|
35
|
+
lineHeight: string;
|
|
36
|
+
};
|
|
37
|
+
small3: {
|
|
38
|
+
tag: string;
|
|
39
|
+
fontSize: string;
|
|
40
|
+
lineHeight: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export default typography;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
heading1: {
|
|
3
|
+
tag: "h1",
|
|
4
|
+
fontSize: "24px",
|
|
5
|
+
lineHeight: "32px"
|
|
6
|
+
},
|
|
7
|
+
heading2: {
|
|
8
|
+
tag: "h2",
|
|
9
|
+
fontSize: "22px",
|
|
10
|
+
lineHeight: "30px"
|
|
11
|
+
},
|
|
12
|
+
heading3: {
|
|
13
|
+
tag: "h3",
|
|
14
|
+
fontSize: "18px",
|
|
15
|
+
lineHeight: "24px"
|
|
16
|
+
},
|
|
17
|
+
body1: {
|
|
18
|
+
tag: "div",
|
|
19
|
+
fontSize: "16px",
|
|
20
|
+
lineHeight: "20px"
|
|
21
|
+
},
|
|
22
|
+
body2: {
|
|
23
|
+
tag: "div",
|
|
24
|
+
fontSize: "14px",
|
|
25
|
+
lineHeight: "18px"
|
|
26
|
+
},
|
|
27
|
+
small1: {
|
|
28
|
+
tag: "p",
|
|
29
|
+
fontSize: "12px",
|
|
30
|
+
lineHeight: "16px"
|
|
31
|
+
},
|
|
32
|
+
small2: {
|
|
33
|
+
tag: "p",
|
|
34
|
+
fontSize: "10.5px",
|
|
35
|
+
lineHeight: "14px"
|
|
36
|
+
},
|
|
37
|
+
small3: {
|
|
38
|
+
tag: "p",
|
|
39
|
+
fontSize: "8px",
|
|
40
|
+
lineHeight: "12px"
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
e as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as radius } from '../theme/radius';
|
|
2
|
+
import { default as spacing } from '../theme/spacing';
|
|
3
|
+
import { Properties } from 'csstype';
|
|
4
|
+
export type UtilityProps = Partial<Pick<Properties, "display" | "alignItems" | "justifyContent" | "flex" | "flexWrap" | "flexDirection" | "flexGrow" | "flexFlow" | "flexBasis" | "flexShrink" | "border" | "borderTop" | "borderBottom" | "borderRight" | "borderLeft"> & Record<"m" | "mt" | "mb" | "mr" | "ml" | "p" | "pt" | "pb" | "pl" | "pr", keyof typeof spacing> & Record<"br" | "brtl" | "brtr" | "brml" | "brmr", keyof typeof radius>>;
|
|
5
|
+
export type RecursionPath<T, Prefix extends string = ""> = Exclude<{
|
|
6
|
+
[K in keyof T & (string | number)]: T[K] extends object ? `${Prefix}${K}` | RecursionPath<T[K], `${Prefix}${K}.`> : `${Prefix}${K}`;
|
|
7
|
+
}[keyof T & (string | number)], "primary" | "secondary">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getObjectPaths<T extends object>(obj: T, prefix?: string): string[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { UtilityProps } from '../typings/utility';
|
|
2
|
+
export default function getUtilityProps<T>({ display, flex, flexBasis, flexDirection, flexFlow, flexGrow, flexShrink, flexWrap, justifyContent, alignItems, m, mt, mr, mb, ml, p, pt, pr, pb, pl, border, borderTop, borderBottom, borderRight, borderLeft, br, brtl, brtr, brml, brmr }: T & UtilityProps): {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import g from "../theme/radius.mjs";
|
|
2
|
+
import s from "../theme/spacing.mjs";
|
|
3
|
+
function N({
|
|
4
|
+
display: a,
|
|
5
|
+
flex: t,
|
|
6
|
+
flexBasis: n,
|
|
7
|
+
flexDirection: c,
|
|
8
|
+
flexFlow: O,
|
|
9
|
+
flexGrow: f,
|
|
10
|
+
flexShrink: j,
|
|
11
|
+
flexWrap: e,
|
|
12
|
+
justifyContent: b,
|
|
13
|
+
alignItems: d,
|
|
14
|
+
m: R,
|
|
15
|
+
mt: o,
|
|
16
|
+
mr: u,
|
|
17
|
+
mb: p,
|
|
18
|
+
ml: h,
|
|
19
|
+
p: L,
|
|
20
|
+
pt: T,
|
|
21
|
+
pr: m,
|
|
22
|
+
pb: r,
|
|
23
|
+
pl: P,
|
|
24
|
+
border: U,
|
|
25
|
+
borderTop: q,
|
|
26
|
+
borderBottom: v,
|
|
27
|
+
borderRight: y,
|
|
28
|
+
borderLeft: z,
|
|
29
|
+
br: A,
|
|
30
|
+
brtl: B,
|
|
31
|
+
brtr: E,
|
|
32
|
+
brml: H,
|
|
33
|
+
brmr: J
|
|
34
|
+
}) {
|
|
35
|
+
const i = {};
|
|
36
|
+
return a && Object.assign(i, { display: a }), t && Object.assign(i, { flex: t }), n && Object.assign(i, { flexBasis: n }), c && Object.assign(i, { flexDirection: c }), O && Object.assign(i, { flexFlow: O }), f && Object.assign(i, { flexGrow: f }), j && Object.assign(i, { flexShrink: j }), e && Object.assign(i, { flexWrap: e }), b && Object.assign(i, { justifyContent: b }), d && Object.assign(i, { alignItems: d }), R && Object.assign(i, { margin: s[R] }), o && Object.assign(i, { marginTop: s[o] }), p && Object.assign(i, { marginRight: s[p] }), h && Object.assign(i, { marginLeft: s[h] }), u && Object.assign(i, { marginRight: s[u] }), L && Object.assign(i, { padding: s[L] }), T && Object.assign(i, { paddingTop: s[T] }), r && Object.assign(i, { paddingRight: s[r] }), P && Object.assign(i, { paddingLeft: s[P] }), m && Object.assign(i, { paddingRight: s[m] }), U && Object.assign(i, { border: U }), q && Object.assign(i, { borderTop: q }), v && Object.assign(i, { borderBottom: v }), y && Object.assign(i, { borderRight: y }), z && Object.assign(i, { borderLeft: z }), A && Object.assign(i, { borderRadius: g[A] }), B && Object.assign(i, { borderTopLeftRadius: g[B] }), E && Object.assign(i, { borderTopRightRadius: g[E] }), H && Object.assign(i, { borderBottomLeftRadius: g[H] }), J && Object.assign(i, { borderBottomRightRadius: g[J] }), i;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
N as default
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getValueByPath<T extends object>(object: T, path?: string): string | undefined;
|