@shiflo/ui 0.1.5 → 0.1.6
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.
|
@@ -6,7 +6,7 @@ import { motion as k } from "motion/react";
|
|
|
6
6
|
const A = n(k.div)`
|
|
7
7
|
position: fixed;
|
|
8
8
|
left: 50%;
|
|
9
|
-
bottom: ${({ theme: { spacing: e } }) => `calc(${e[800]} + var(--safe-area-inset-bottom, 0px))`};
|
|
9
|
+
bottom: ${({ theme: { spacing: e }, bottom: t }) => `calc(${t || e[800]} + var(--safe-area-inset-bottom, 0px))`};
|
|
10
10
|
display: flex;
|
|
11
11
|
align-items: center;
|
|
12
12
|
gap: ${({ theme: { spacing: e } }) => e[400]};
|
|
@@ -1,74 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { motion as
|
|
4
|
-
|
|
1
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import a from "@emotion/styled";
|
|
3
|
+
import { motion as m } from "motion/react";
|
|
4
|
+
import o from "../../utils/getValueByPath.mjs";
|
|
5
|
+
const s = a(m.span)`
|
|
5
6
|
transition: all 0.3s;
|
|
6
7
|
cursor: default;
|
|
7
8
|
|
|
8
|
-
padding: ${({ theme: { spacing:
|
|
9
|
-
border-radius: ${({ theme: { radius:
|
|
9
|
+
padding: ${({ theme: { spacing: t } }) => t[100]};
|
|
10
|
+
border-radius: ${({ theme: { radius: t } }) => t[200]};
|
|
10
11
|
|
|
11
|
-
${({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
text: i,
|
|
18
|
-
feedback: { warning: n, error: t, info: s, success: c }
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
color: m
|
|
22
|
-
}) => {
|
|
23
|
-
const a = {};
|
|
24
|
-
switch (m) {
|
|
25
|
-
case "warning":
|
|
26
|
-
Object.assign(a, {
|
|
27
|
-
backgroundColor: n.main,
|
|
28
|
-
color: r === "dark" ? o.main : i.primary
|
|
29
|
-
});
|
|
30
|
-
break;
|
|
31
|
-
case "error":
|
|
32
|
-
Object.assign(a, {
|
|
33
|
-
backgroundColor: t.main,
|
|
34
|
-
color: r === "dark" ? o.main : i.primary
|
|
35
|
-
});
|
|
36
|
-
break;
|
|
37
|
-
case "info":
|
|
38
|
-
Object.assign(a, {
|
|
39
|
-
backgroundColor: s.main,
|
|
40
|
-
color: r === "dark" ? o.main : i.primary
|
|
41
|
-
});
|
|
42
|
-
break;
|
|
43
|
-
case "success":
|
|
44
|
-
Object.assign(a, {
|
|
45
|
-
backgroundColor: c.main,
|
|
46
|
-
color: r === "dark" ? o.main : i.primary
|
|
47
|
-
});
|
|
48
|
-
break;
|
|
49
|
-
default:
|
|
50
|
-
Object.assign(a, {
|
|
51
|
-
backgroundColor: e.main,
|
|
52
|
-
color: o.main
|
|
53
|
-
});
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
return a;
|
|
12
|
+
${({ theme: { palette: t }, color: r, textColor: i }) => {
|
|
13
|
+
const e = {};
|
|
14
|
+
return Object.assign(e, {
|
|
15
|
+
backgroundColor: o(t, r) || "inherit",
|
|
16
|
+
color: o(t, i) || "inherit"
|
|
17
|
+
}), e;
|
|
57
18
|
}}
|
|
58
19
|
|
|
59
20
|
${({
|
|
60
21
|
theme: {
|
|
61
|
-
typography: { small2:
|
|
22
|
+
typography: { small2: t }
|
|
62
23
|
}
|
|
63
24
|
}) => ({
|
|
64
|
-
fontSize:
|
|
25
|
+
fontSize: t.fontSize,
|
|
65
26
|
fontWeight: 700,
|
|
66
|
-
lineHeight:
|
|
27
|
+
lineHeight: t.lineHeight
|
|
67
28
|
})};
|
|
68
29
|
`;
|
|
69
|
-
function
|
|
70
|
-
return /* @__PURE__ */
|
|
30
|
+
function l(t) {
|
|
31
|
+
return /* @__PURE__ */ n(s, { ...t });
|
|
71
32
|
}
|
|
72
33
|
export {
|
|
73
|
-
|
|
34
|
+
l as default
|
|
74
35
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShifloTheme } from '../../theme/typing';
|
|
2
|
+
import { RecursionPath, UtilityProps } from '../../typings/utility';
|
|
2
3
|
import { HTMLMotionProps } from 'motion/react';
|
|
3
4
|
export interface TagProps extends HTMLMotionProps<"span">, Pick<UtilityProps, "css"> {
|
|
4
|
-
color?: "
|
|
5
|
+
color?: RecursionPath<ShifloTheme["palette"]> | "inherit";
|
|
6
|
+
textColor?: RecursionPath<ShifloTheme["palette"]> | "inherit";
|
|
5
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shiflo/ui",
|
|
3
3
|
"description": "Shiflo React UI Components",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"prepublishOnly": "pnpm build"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@chromatic-com/storybook": "^4.1.
|
|
54
|
+
"@chromatic-com/storybook": "^4.1.2",
|
|
55
55
|
"@emotion/react": "^11.14.0",
|
|
56
56
|
"@emotion/serialize": "^1.3.3",
|
|
57
57
|
"@emotion/styled": "^11.14.1",
|
|
58
58
|
"@eslint/js": "^9.22.0",
|
|
59
|
-
"@storybook/addon-docs": "^
|
|
60
|
-
"@storybook/addon-onboarding": "^
|
|
61
|
-
"@storybook/react-vite": "^
|
|
59
|
+
"@storybook/addon-docs": "^10.0.2",
|
|
60
|
+
"@storybook/addon-onboarding": "^10.0.2",
|
|
61
|
+
"@storybook/react-vite": "^10.0.2",
|
|
62
62
|
"@types/node": "^24.5.2",
|
|
63
63
|
"@types/react": "^19.1.13",
|
|
64
64
|
"@types/react-dom": "^19.1.9",
|
|
@@ -71,14 +71,14 @@
|
|
|
71
71
|
"eslint-plugin-prettier": "^5.5.4",
|
|
72
72
|
"eslint-plugin-react": "^7.37.5",
|
|
73
73
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
74
|
-
"eslint-plugin-storybook": "^
|
|
74
|
+
"eslint-plugin-storybook": "^10.0.2",
|
|
75
75
|
"glob": "^11.0.1",
|
|
76
76
|
"globals": "^16.0.0",
|
|
77
77
|
"husky": "^9.1.7",
|
|
78
78
|
"lint-staged": "^15.4.3",
|
|
79
79
|
"motion": "^12.23.12",
|
|
80
80
|
"prettier": "^3.5.3",
|
|
81
|
-
"storybook": "^
|
|
81
|
+
"storybook": "^10.0.2",
|
|
82
82
|
"typescript": "^5.7.3",
|
|
83
83
|
"typescript-eslint": "^8.26.0",
|
|
84
84
|
"vite": "^7.1.6",
|