@shiflo/ui 0.0.19 → 0.1.1
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/dist/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/BottomSheet/BottomSheet.mjs +61 -76
- package/dist/components/BottomSheet/BottomSheet.typing.d.ts +4 -2
- package/dist/components/Box/Box.mjs +16 -21
- package/dist/components/Box/Box.typing.d.ts +4 -4
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.mjs +176 -86
- package/dist/components/Button/Button.typing.d.ts +7 -2
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.mjs +34 -32
- package/dist/components/Dialog/Dialog.typing.d.ts +3 -2
- package/dist/components/FPSMonitor/FPSMonitor.d.ts +11 -0
- package/dist/components/FPSMonitor/FPSMonitor.mjs +201 -0
- package/dist/components/FPSMonitor/FPSMonitor.utils.d.ts +69 -0
- package/dist/components/FPSMonitor/FPSMonitor.utils.mjs +116 -0
- package/dist/components/FPSMonitor/index.d.ts +3 -0
- package/dist/components/FPSMonitor/index.mjs +4 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.mjs +2 -2
- package/dist/components/Icon/Icon.typing.d.ts +4 -4
- package/dist/components/Overlay/Overlay.d.ts +1 -1
- package/dist/components/Overlay/Overlay.mjs +45 -42
- package/dist/components/Overlay/Overlay.typing.d.ts +2 -3
- package/dist/components/Snackbar/Snackbar.mjs +64 -60
- package/dist/components/Snackbar/Snackbar.typing.d.ts +3 -3
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.mjs +53 -40
- package/dist/components/Switch/Switch.typing.d.ts +3 -3
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.mjs +13 -14
- package/dist/components/Tag/Tag.typing.d.ts +2 -2
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.mjs +24 -30
- package/dist/components/TextField/TextField.typing.d.ts +3 -3
- package/dist/components/Typography/Typography.mjs +21 -26
- package/dist/components/Typography/Typography.typing.d.ts +4 -4
- package/dist/components/index.d.ts +23 -0
- package/dist/components/index.mjs +24 -0
- package/dist/theme/GlobalStyle.d.ts +1 -1
- package/dist/theme/GlobalStyle.mjs +69 -38
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/theme/ThemeProvider.mjs +10 -16
- package/dist/theme/dark.d.ts +2 -2
- package/dist/theme/dark.mjs +19 -2
- package/dist/theme/light.d.ts +2 -2
- package/dist/theme/light.mjs +28 -11
- package/dist/theme/typing.d.ts +87 -68
- package/dist/typings/utility.d.ts +3 -2
- package/dist/utils/getUtilityProps.mjs +9 -9
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.mjs +8 -0
- package/package.json +27 -24
|
@@ -1,46 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as c } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import f from "@emotion/styled";
|
|
3
|
+
import { motion as y } from "motion/react";
|
|
4
|
+
import d from "../../utils/getUtilityProps.mjs";
|
|
4
5
|
import r from "../../utils/getValueByPath.mjs";
|
|
5
|
-
const
|
|
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;
|
|
6
|
+
const h = f(y.div)`
|
|
7
|
+
transition: all 0.2s;
|
|
13
8
|
|
|
14
|
-
${({ theme: { typography:
|
|
15
|
-
const { fontSize:
|
|
16
|
-
fontSize:
|
|
17
|
-
lineHeight:
|
|
9
|
+
${({ theme: { typography: t, palette: i }, variant: s, color: n, fontWeight: l, borderColor: e, ...a }) => {
|
|
10
|
+
const { fontSize: p, lineHeight: m } = t[s || "body2"], o = {
|
|
11
|
+
fontSize: p,
|
|
12
|
+
lineHeight: m,
|
|
18
13
|
fontWeight: l
|
|
19
14
|
};
|
|
20
|
-
return Object.assign(
|
|
21
|
-
borderColor: r(
|
|
22
|
-
}), Object.assign(
|
|
23
|
-
color: r(
|
|
24
|
-
}),
|
|
15
|
+
return Object.assign(o, d(a)), e && Object.assign(o, {
|
|
16
|
+
borderColor: r(i, e) || "inherit"
|
|
17
|
+
}), Object.assign(o, {
|
|
18
|
+
color: r(i, n) || "inherit"
|
|
19
|
+
}), o;
|
|
25
20
|
}};
|
|
26
21
|
|
|
27
|
-
${({ textAlign:
|
|
28
|
-
textAlign:
|
|
22
|
+
${({ textAlign: t }) => t ? {
|
|
23
|
+
textAlign: t
|
|
29
24
|
} : {}};
|
|
30
25
|
|
|
31
|
-
${({ noWrap:
|
|
26
|
+
${({ noWrap: t }) => t ? {
|
|
32
27
|
whiteSpace: "nowrap",
|
|
33
28
|
overflow: "hidden",
|
|
34
29
|
textOverflow: "ellipsis"
|
|
35
30
|
} : {}};
|
|
36
31
|
|
|
37
|
-
${({ lineClamp:
|
|
32
|
+
${({ lineClamp: t }) => t ? {
|
|
38
33
|
display: "-webkit-box",
|
|
39
34
|
overflow: "hidden",
|
|
40
|
-
"-webkit-line-clamp":
|
|
35
|
+
"-webkit-line-clamp": t,
|
|
41
36
|
"-webkit-box-orient": "vertical"
|
|
42
37
|
} : {}};
|
|
43
|
-
`, u = (
|
|
38
|
+
`, u = (t) => /* @__PURE__ */ c(h, { ...t });
|
|
44
39
|
export {
|
|
45
40
|
u as default
|
|
46
41
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ReactNode, ElementType } from 'react';
|
|
2
|
+
import { ShifloTheme } from '../../theme/typing';
|
|
2
3
|
import { PolymorphicComponentProps } from '../../typings/component';
|
|
3
4
|
import { UtilityProps, RecursionPath } from '../../typings/utility';
|
|
4
|
-
import { BasicTheme } from 'basic-styled';
|
|
5
5
|
export interface BaseTypographyProps extends UtilityProps {
|
|
6
|
-
variant?: keyof
|
|
6
|
+
variant?: keyof ShifloTheme["typography"];
|
|
7
7
|
fontWeight?: 400 | 500 | 700;
|
|
8
|
-
color?: RecursionPath<
|
|
9
|
-
borderColor?: RecursionPath<
|
|
8
|
+
color?: RecursionPath<ShifloTheme["palette"]> | "inherit";
|
|
9
|
+
borderColor?: RecursionPath<ShifloTheme["palette"]>;
|
|
10
10
|
textAlign?: "left" | "center" | "right";
|
|
11
11
|
noWrap?: boolean;
|
|
12
12
|
lineClamp?: number;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as BottomSheet } from './BottomSheet';
|
|
2
|
+
import { default as Box } from './Box';
|
|
3
|
+
import { default as Button } from './Button';
|
|
4
|
+
import { default as Dialog } from './Dialog';
|
|
5
|
+
import { default as Icon } from './Icon';
|
|
6
|
+
import { default as Overlay } from './Overlay';
|
|
7
|
+
import { default as Snackbar } from './Snackbar';
|
|
8
|
+
import { default as Switch } from './Switch';
|
|
9
|
+
import { default as Tag } from './Tag';
|
|
10
|
+
import { default as TextField } from './TextField';
|
|
11
|
+
import { default as Typography } from './Typography';
|
|
12
|
+
export * from './BottomSheet';
|
|
13
|
+
export * from './Box';
|
|
14
|
+
export * from './Button';
|
|
15
|
+
export * from './Dialog';
|
|
16
|
+
export * from './Icon';
|
|
17
|
+
export * from './Overlay';
|
|
18
|
+
export * from './Snackbar';
|
|
19
|
+
export * from './Switch';
|
|
20
|
+
export * from './Tag';
|
|
21
|
+
export * from './TextField';
|
|
22
|
+
export * from './Typography';
|
|
23
|
+
export { Button, Box, Typography, TextField, Overlay, BottomSheet, Dialog, Icon, Snackbar, Switch, Tag };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as a } from "./BottomSheet/BottomSheet.mjs";
|
|
2
|
+
import { default as r } from "./Box/Box.mjs";
|
|
3
|
+
import { default as l } from "./Button/Button.mjs";
|
|
4
|
+
import { default as x } from "./Dialog/Dialog.mjs";
|
|
5
|
+
import { default as m } from "./Icon/Icon.mjs";
|
|
6
|
+
import { default as s } from "./Overlay/Overlay.mjs";
|
|
7
|
+
import { default as g } from "./Snackbar/Snackbar.mjs";
|
|
8
|
+
import { default as i } from "./Switch/Switch.mjs";
|
|
9
|
+
import { default as y } from "./Tag/Tag.mjs";
|
|
10
|
+
import { default as S } from "./TextField/TextField.mjs";
|
|
11
|
+
import { default as b } from "./Typography/Typography.mjs";
|
|
12
|
+
export {
|
|
13
|
+
a as BottomSheet,
|
|
14
|
+
r as Box,
|
|
15
|
+
l as Button,
|
|
16
|
+
x as Dialog,
|
|
17
|
+
m as Icon,
|
|
18
|
+
s as Overlay,
|
|
19
|
+
g as Snackbar,
|
|
20
|
+
i as Switch,
|
|
21
|
+
y as Tag,
|
|
22
|
+
S as TextField,
|
|
23
|
+
b as Typography
|
|
24
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function GlobalStyle(): import("react").JSX.Element;
|
|
1
|
+
declare function GlobalStyle(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default GlobalStyle;
|
|
@@ -1,41 +1,72 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
function
|
|
4
|
-
|
|
1
|
+
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useTheme as a, Global as r } from "@emotion/react";
|
|
3
|
+
function l() {
|
|
4
|
+
const {
|
|
5
|
+
palette: { common: o, text: e }
|
|
6
|
+
} = a();
|
|
7
|
+
return /* @__PURE__ */ t(
|
|
8
|
+
r,
|
|
9
|
+
{
|
|
10
|
+
styles: {
|
|
11
|
+
"*": {
|
|
12
|
+
margin: 0,
|
|
13
|
+
padding: 0,
|
|
14
|
+
font: "inherit",
|
|
15
|
+
color: "inherit",
|
|
16
|
+
WebkitTapHighlightColor: "transparent",
|
|
17
|
+
userSelect: "none"
|
|
18
|
+
},
|
|
19
|
+
"*, :after, :before": {
|
|
20
|
+
boxSizing: "border-box",
|
|
21
|
+
MozOsxFontSmoothing: "grayscale",
|
|
22
|
+
WebkitFontSmoothing: "antialiased"
|
|
23
|
+
},
|
|
24
|
+
":root": {
|
|
25
|
+
WebkitTextSizeAdjust: "100%",
|
|
26
|
+
textSizeAdjust: "100%",
|
|
27
|
+
cursor: "default",
|
|
28
|
+
overflowWrap: "break-word",
|
|
29
|
+
MozTabSize: 4,
|
|
30
|
+
tabSize: 4
|
|
31
|
+
},
|
|
32
|
+
"html, body": {
|
|
33
|
+
height: "100%",
|
|
34
|
+
color: e.primary,
|
|
35
|
+
backgroundColor: o.background,
|
|
36
|
+
transition: "background-color 0.2s, color 0.2s",
|
|
37
|
+
fontFamily: `Spoqa Han Sans Neo, -apple-system, BlinkMacSystemFont, Helvetica Neue,
|
|
38
|
+
Apple SD Gothic Neo, Malgun Gothic, 맑은 고딕, 나눔고딕, Nanum Gothic,
|
|
39
|
+
Noto Sans KR, Noto Sans CJK KR, arial, 돋움, Dotum, Tahoma, Geneva, sans-serif`
|
|
40
|
+
},
|
|
41
|
+
"input, textarea": {
|
|
42
|
+
userSelect: "text"
|
|
43
|
+
},
|
|
44
|
+
"picture, video, canvas": {
|
|
45
|
+
display: "block",
|
|
46
|
+
maxWidth: "100%"
|
|
47
|
+
},
|
|
48
|
+
"svg, img, video": {
|
|
49
|
+
verticalAlign: "middle"
|
|
50
|
+
},
|
|
51
|
+
button: {
|
|
52
|
+
background: "none",
|
|
53
|
+
border: 0,
|
|
54
|
+
cursor: "pointer"
|
|
55
|
+
},
|
|
56
|
+
a: {
|
|
57
|
+
textDecoration: "none"
|
|
58
|
+
},
|
|
59
|
+
table: {
|
|
60
|
+
borderCollapse: "collapse",
|
|
61
|
+
borderSpacing: 0
|
|
62
|
+
},
|
|
63
|
+
ul: {
|
|
64
|
+
listStyle: "none"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
);
|
|
5
69
|
}
|
|
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
70
|
export {
|
|
40
|
-
|
|
71
|
+
l as default
|
|
41
72
|
};
|
|
@@ -2,5 +2,5 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
interface ThemeProviderProps {
|
|
3
3
|
theme: "light" | "dark";
|
|
4
4
|
}
|
|
5
|
-
declare function ThemeProvider({ children, theme }: PropsWithChildren<ThemeProviderProps>): import("react").JSX.Element;
|
|
5
|
+
declare function ThemeProvider({ children, theme }: PropsWithChildren<ThemeProviderProps>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default ThemeProvider;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import i from "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
m({
|
|
9
|
-
|
|
10
|
-
});
|
|
11
|
-
function y({ 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
|
|
1
|
+
import { jsxs as o, jsx as m } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider as t } from "@emotion/react";
|
|
3
|
+
import i from "./dark.mjs";
|
|
4
|
+
import h from "./GlobalStyle.mjs";
|
|
5
|
+
import d from "./light.mjs";
|
|
6
|
+
function c({ children: r, theme: e }) {
|
|
7
|
+
return /* @__PURE__ */ o(t, { theme: e === "dark" ? i : d, children: [
|
|
8
|
+
/* @__PURE__ */ m(h, {}),
|
|
9
|
+
r
|
|
16
10
|
] });
|
|
17
11
|
}
|
|
18
12
|
export {
|
|
19
|
-
|
|
13
|
+
c as default
|
|
20
14
|
};
|
package/dist/theme/dark.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const dark:
|
|
1
|
+
import { ShifloTheme } from './typing';
|
|
2
|
+
declare const dark: ShifloTheme;
|
|
3
3
|
export default dark;
|
package/dist/theme/dark.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import a from "./radius.mjs";
|
|
2
2
|
import r from "./spacing.mjs";
|
|
3
3
|
import i from "./typography.mjs";
|
|
4
|
-
const
|
|
4
|
+
const C = {
|
|
5
5
|
mode: "dark",
|
|
6
6
|
palette: {
|
|
7
7
|
primary: {
|
|
@@ -10,6 +10,7 @@ const g = {
|
|
|
10
10
|
dark: "#004ECC",
|
|
11
11
|
hover: "#7EAFFF",
|
|
12
12
|
active: "#336DFF",
|
|
13
|
+
glow: "#1A80E6",
|
|
13
14
|
alpha: {
|
|
14
15
|
5: "rgba(90, 139, 255, 0.05)",
|
|
15
16
|
10: "rgba(90, 139, 255, 0.1)",
|
|
@@ -17,6 +18,19 @@ const g = {
|
|
|
17
18
|
30: "rgba(90, 139, 255, 0.3)"
|
|
18
19
|
}
|
|
19
20
|
},
|
|
21
|
+
accent: {
|
|
22
|
+
main: "#3399FF",
|
|
23
|
+
light: "#66B3FF",
|
|
24
|
+
dark: "#0066CC",
|
|
25
|
+
hover: "#4DA6FF",
|
|
26
|
+
active: "#0066CC",
|
|
27
|
+
alpha: {
|
|
28
|
+
5: "rgba(51, 153, 255, 0.05)",
|
|
29
|
+
10: "rgba(51, 153, 255, 0.1)",
|
|
30
|
+
20: "rgba(51, 153, 255, 0.2)",
|
|
31
|
+
30: "rgba(51, 153, 255, 0.3)"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
20
34
|
secondary: {
|
|
21
35
|
main: "#2D2F36",
|
|
22
36
|
light: "#40434A",
|
|
@@ -75,6 +89,9 @@ const g = {
|
|
|
75
89
|
light: "#52565D",
|
|
76
90
|
main: "#6C757D",
|
|
77
91
|
dark: "#A5ACB3"
|
|
92
|
+
},
|
|
93
|
+
gradient: {
|
|
94
|
+
primaryToAccent: "linear-gradient(135deg, #5A8BFF 0%, hsl(225 100% 60%) 100%)"
|
|
78
95
|
}
|
|
79
96
|
},
|
|
80
97
|
typography: i,
|
|
@@ -82,5 +99,5 @@ const g = {
|
|
|
82
99
|
radius: a
|
|
83
100
|
};
|
|
84
101
|
export {
|
|
85
|
-
|
|
102
|
+
C as default
|
|
86
103
|
};
|
package/dist/theme/light.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const light:
|
|
1
|
+
import { ShifloTheme } from './typing';
|
|
2
|
+
declare const light: ShifloTheme;
|
|
3
3
|
export default light;
|
package/dist/theme/light.mjs
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import a from "./radius.mjs";
|
|
2
2
|
import r from "./spacing.mjs";
|
|
3
3
|
import F from "./typography.mjs";
|
|
4
|
-
const
|
|
4
|
+
const e = {
|
|
5
5
|
mode: "light",
|
|
6
6
|
palette: {
|
|
7
7
|
primary: {
|
|
8
|
-
main: "#
|
|
9
|
-
light: "#
|
|
10
|
-
dark: "#
|
|
11
|
-
hover: "#
|
|
12
|
-
active: "#
|
|
8
|
+
main: "#0066CC",
|
|
9
|
+
light: "#3399FF",
|
|
10
|
+
dark: "#004499",
|
|
11
|
+
hover: "#1A80E6",
|
|
12
|
+
active: "#004499",
|
|
13
|
+
glow: "#1A80E6",
|
|
13
14
|
alpha: {
|
|
14
|
-
5: "rgba(0,
|
|
15
|
-
10: "rgba(0,
|
|
16
|
-
20: "rgba(0,
|
|
17
|
-
30: "rgba(0,
|
|
15
|
+
5: "rgba(0, 102, 204, 0.05)",
|
|
16
|
+
10: "rgba(0, 102, 204, 0.1)",
|
|
17
|
+
20: "rgba(0, 102, 204, 0.2)",
|
|
18
|
+
30: "rgba(0, 102, 204, 0.3)"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
accent: {
|
|
22
|
+
main: "#3399FF",
|
|
23
|
+
light: "#66B3FF",
|
|
24
|
+
dark: "#0066CC",
|
|
25
|
+
hover: "#4DA6FF",
|
|
26
|
+
active: "#0066CC",
|
|
27
|
+
alpha: {
|
|
28
|
+
5: "rgba(51, 153, 255, 0.05)",
|
|
29
|
+
10: "rgba(51, 153, 255, 0.1)",
|
|
30
|
+
20: "rgba(51, 153, 255, 0.2)",
|
|
31
|
+
30: "rgba(51, 153, 255, 0.3)"
|
|
18
32
|
}
|
|
19
33
|
},
|
|
20
34
|
secondary: {
|
|
@@ -75,6 +89,9 @@ const C = {
|
|
|
75
89
|
light: "#DEE2E6",
|
|
76
90
|
main: "#ADB5BD",
|
|
77
91
|
dark: "#6C757D"
|
|
92
|
+
},
|
|
93
|
+
gradient: {
|
|
94
|
+
primaryToAccent: "linear-gradient(135deg, hsl(225 100% 40%) 0%, hsl(225 100% 60%) 100%)"
|
|
78
95
|
}
|
|
79
96
|
},
|
|
80
97
|
typography: F,
|
|
@@ -82,5 +99,5 @@ const C = {
|
|
|
82
99
|
radius: a
|
|
83
100
|
};
|
|
84
101
|
export {
|
|
85
|
-
|
|
102
|
+
e as default
|
|
86
103
|
};
|
package/dist/theme/typing.d.ts
CHANGED
|
@@ -1,85 +1,104 @@
|
|
|
1
1
|
import { default as radius } from './radius';
|
|
2
2
|
import { default as spacing } from './spacing';
|
|
3
3
|
import { default as typography } from './typography';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export interface ShifloTheme {
|
|
5
|
+
mode: "light" | "dark";
|
|
6
|
+
palette: {
|
|
7
|
+
primary: {
|
|
8
|
+
main: string;
|
|
9
|
+
light: string;
|
|
10
|
+
dark: string;
|
|
11
|
+
hover: string;
|
|
12
|
+
active: string;
|
|
13
|
+
glow: string;
|
|
14
|
+
alpha: {
|
|
15
|
+
5: string;
|
|
16
|
+
10: string;
|
|
17
|
+
20: string;
|
|
18
|
+
30: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
accent: {
|
|
22
|
+
main: string;
|
|
23
|
+
light: string;
|
|
24
|
+
dark: string;
|
|
25
|
+
hover: string;
|
|
26
|
+
active: string;
|
|
27
|
+
alpha: {
|
|
28
|
+
5: string;
|
|
29
|
+
10: string;
|
|
30
|
+
20: string;
|
|
31
|
+
30: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
secondary: {
|
|
35
|
+
main: string;
|
|
36
|
+
light: string;
|
|
37
|
+
dark: string;
|
|
38
|
+
alpha: {
|
|
39
|
+
5: string;
|
|
40
|
+
10: string;
|
|
41
|
+
20: string;
|
|
42
|
+
30: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
neutral: {
|
|
46
|
+
100: string;
|
|
47
|
+
200: string;
|
|
48
|
+
300: string;
|
|
49
|
+
400: string;
|
|
50
|
+
500: string;
|
|
51
|
+
600: string;
|
|
52
|
+
700: string;
|
|
53
|
+
800: string;
|
|
54
|
+
900: string;
|
|
55
|
+
};
|
|
56
|
+
feedback: {
|
|
57
|
+
success: {
|
|
10
58
|
light: string;
|
|
59
|
+
main: string;
|
|
11
60
|
dark: string;
|
|
12
|
-
hover: string;
|
|
13
|
-
active: string;
|
|
14
|
-
alpha: {
|
|
15
|
-
5: string;
|
|
16
|
-
10: string;
|
|
17
|
-
20: string;
|
|
18
|
-
30: string;
|
|
19
|
-
};
|
|
20
61
|
};
|
|
21
|
-
|
|
22
|
-
main: string;
|
|
62
|
+
warning: {
|
|
23
63
|
light: string;
|
|
64
|
+
main: string;
|
|
24
65
|
dark: string;
|
|
25
|
-
alpha: {
|
|
26
|
-
5: string;
|
|
27
|
-
10: string;
|
|
28
|
-
20: string;
|
|
29
|
-
30: string;
|
|
30
|
-
};
|
|
31
66
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
overlay: string;
|
|
69
|
-
};
|
|
70
|
-
text: {
|
|
71
|
-
primary: string;
|
|
72
|
-
secondary: string;
|
|
73
|
-
disabled: string;
|
|
67
|
+
error: {
|
|
68
|
+
light: string;
|
|
69
|
+
main: string;
|
|
70
|
+
dark: string;
|
|
74
71
|
};
|
|
75
|
-
|
|
72
|
+
info: {
|
|
76
73
|
light: string;
|
|
77
74
|
main: string;
|
|
78
75
|
dark: string;
|
|
79
76
|
};
|
|
80
77
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
common: {
|
|
79
|
+
background: string;
|
|
80
|
+
surface: string;
|
|
81
|
+
overlay: string;
|
|
82
|
+
};
|
|
83
|
+
text: {
|
|
84
|
+
primary: string;
|
|
85
|
+
secondary: string;
|
|
86
|
+
disabled: string;
|
|
87
|
+
};
|
|
88
|
+
border: {
|
|
89
|
+
light: string;
|
|
90
|
+
main: string;
|
|
91
|
+
dark: string;
|
|
92
|
+
};
|
|
93
|
+
gradient: {
|
|
94
|
+
primaryToAccent: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
typography: typeof typography;
|
|
98
|
+
spacing: typeof spacing;
|
|
99
|
+
radius: typeof radius;
|
|
100
|
+
}
|
|
101
|
+
declare module "@emotion/react" {
|
|
102
|
+
interface Theme extends ShifloTheme {
|
|
84
103
|
}
|
|
85
104
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Interpolation } from '@emotion/serialize';
|
|
2
2
|
import { default as radius } from '../theme/radius';
|
|
3
3
|
import { default as spacing } from '../theme/spacing';
|
|
4
|
+
import { ShifloTheme } from '../theme/typing';
|
|
4
5
|
import { Properties } from 'csstype';
|
|
5
6
|
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" | "gap", keyof typeof spacing> & Record<"br" | "brtl" | "brtr" | "brml" | "brmr", keyof typeof radius>> & {
|
|
6
|
-
css?:
|
|
7
|
+
css?: Interpolation<ShifloTheme>;
|
|
7
8
|
};
|
|
8
9
|
export type RecursionPath<T, Prefix extends string = ""> = Exclude<{
|
|
9
10
|
[K in keyof T & (string | number)]: T[K] extends object ? `${Prefix}${K}` | RecursionPath<T[K], `${Prefix}${K}.`> : `${Prefix}${K}`;
|
|
@@ -12,15 +12,15 @@ function Q({
|
|
|
12
12
|
justifyContent: b,
|
|
13
13
|
alignItems: d,
|
|
14
14
|
m: o,
|
|
15
|
-
mt:
|
|
16
|
-
mr:
|
|
15
|
+
mt: u,
|
|
16
|
+
mr: R,
|
|
17
17
|
mb: p,
|
|
18
|
-
ml:
|
|
19
|
-
p:
|
|
20
|
-
pt:
|
|
21
|
-
pr:
|
|
22
|
-
pb:
|
|
23
|
-
pl:
|
|
18
|
+
ml: m,
|
|
19
|
+
p: L,
|
|
20
|
+
pt: T,
|
|
21
|
+
pr: h,
|
|
22
|
+
pb: B,
|
|
23
|
+
pl: r,
|
|
24
24
|
border: P,
|
|
25
25
|
borderTop: U,
|
|
26
26
|
borderBottom: q,
|
|
@@ -34,7 +34,7 @@ function Q({
|
|
|
34
34
|
gap: K
|
|
35
35
|
}) {
|
|
36
36
|
const i = {};
|
|
37
|
-
return g && Object.assign(i, { display: g }), 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 }), o && Object.assign(i, { margin: s[o] }),
|
|
37
|
+
return g && Object.assign(i, { display: g }), 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 }), o && Object.assign(i, { margin: s[o] }), u && Object.assign(i, { marginTop: s[u] }), p && Object.assign(i, { marginBottom: s[p] }), m && Object.assign(i, { marginLeft: s[m] }), R && Object.assign(i, { marginRight: s[R] }), L && Object.assign(i, { padding: s[L] }), T && Object.assign(i, { paddingTop: s[T] }), B && Object.assign(i, { paddingBottom: s[B] }), r && Object.assign(i, { paddingLeft: s[r] }), h && Object.assign(i, { paddingRight: s[h] }), K && Object.assign(i, { gap: s[K] }), P && Object.assign(i, { border: P }), U && Object.assign(i, { borderTop: U }), q && Object.assign(i, { borderBottom: q }), v && Object.assign(i, { borderRight: v }), y && Object.assign(i, { borderLeft: y }), z && Object.assign(i, { borderRadius: a[z] }), A && Object.assign(i, { borderTopLeftRadius: a[A] }), E && Object.assign(i, { borderTopRightRadius: a[E] }), H && Object.assign(i, { borderBottomLeftRadius: a[H] }), J && Object.assign(i, { borderBottomRightRadius: a[J] }), i;
|
|
38
38
|
}
|
|
39
39
|
export {
|
|
40
40
|
Q as default
|