@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.
Files changed (52) hide show
  1. package/dist/components/BottomSheet/BottomSheet.d.ts +1 -1
  2. package/dist/components/BottomSheet/BottomSheet.mjs +61 -76
  3. package/dist/components/BottomSheet/BottomSheet.typing.d.ts +4 -2
  4. package/dist/components/Box/Box.mjs +16 -21
  5. package/dist/components/Box/Box.typing.d.ts +4 -4
  6. package/dist/components/Button/Button.d.ts +1 -1
  7. package/dist/components/Button/Button.mjs +176 -86
  8. package/dist/components/Button/Button.typing.d.ts +7 -2
  9. package/dist/components/Dialog/Dialog.d.ts +1 -1
  10. package/dist/components/Dialog/Dialog.mjs +34 -32
  11. package/dist/components/Dialog/Dialog.typing.d.ts +3 -2
  12. package/dist/components/FPSMonitor/FPSMonitor.d.ts +11 -0
  13. package/dist/components/FPSMonitor/FPSMonitor.mjs +201 -0
  14. package/dist/components/FPSMonitor/FPSMonitor.utils.d.ts +69 -0
  15. package/dist/components/FPSMonitor/FPSMonitor.utils.mjs +116 -0
  16. package/dist/components/FPSMonitor/index.d.ts +3 -0
  17. package/dist/components/FPSMonitor/index.mjs +4 -0
  18. package/dist/components/Icon/Icon.d.ts +1 -1
  19. package/dist/components/Icon/Icon.mjs +2 -2
  20. package/dist/components/Icon/Icon.typing.d.ts +4 -4
  21. package/dist/components/Overlay/Overlay.d.ts +1 -1
  22. package/dist/components/Overlay/Overlay.mjs +45 -42
  23. package/dist/components/Overlay/Overlay.typing.d.ts +2 -3
  24. package/dist/components/Snackbar/Snackbar.mjs +64 -60
  25. package/dist/components/Snackbar/Snackbar.typing.d.ts +3 -3
  26. package/dist/components/Switch/Switch.d.ts +1 -1
  27. package/dist/components/Switch/Switch.mjs +53 -40
  28. package/dist/components/Switch/Switch.typing.d.ts +3 -3
  29. package/dist/components/Tag/Tag.d.ts +1 -1
  30. package/dist/components/Tag/Tag.mjs +13 -14
  31. package/dist/components/Tag/Tag.typing.d.ts +2 -2
  32. package/dist/components/TextField/TextField.d.ts +1 -1
  33. package/dist/components/TextField/TextField.mjs +24 -30
  34. package/dist/components/TextField/TextField.typing.d.ts +3 -3
  35. package/dist/components/Typography/Typography.mjs +21 -26
  36. package/dist/components/Typography/Typography.typing.d.ts +4 -4
  37. package/dist/components/index.d.ts +23 -0
  38. package/dist/components/index.mjs +24 -0
  39. package/dist/theme/GlobalStyle.d.ts +1 -1
  40. package/dist/theme/GlobalStyle.mjs +69 -38
  41. package/dist/theme/ThemeProvider.d.ts +1 -1
  42. package/dist/theme/ThemeProvider.mjs +10 -16
  43. package/dist/theme/dark.d.ts +2 -2
  44. package/dist/theme/dark.mjs +19 -2
  45. package/dist/theme/light.d.ts +2 -2
  46. package/dist/theme/light.mjs +28 -11
  47. package/dist/theme/typing.d.ts +87 -68
  48. package/dist/typings/utility.d.ts +3 -2
  49. package/dist/utils/getUtilityProps.mjs +9 -9
  50. package/dist/utils/index.d.ts +3 -0
  51. package/dist/utils/index.mjs +8 -0
  52. package/package.json +27 -24
@@ -1,13 +1,15 @@
1
- import { jsxs as v, jsx as d } from "react/jsx-runtime";
2
- import { useState as m, useRef as k, useImperativeHandle as x, useLayoutEffect as $, useEffect as I } from "react";
3
- import { createPortal as w } from "react-dom";
4
- import i from "basic-styled";
5
- const L = i.div`
1
+ import { jsxs as x, jsx as f } from "@emotion/react/jsx-runtime";
2
+ import { useState as m, useRef as E, useImperativeHandle as I, useLayoutEffect as C, useEffect as w } from "react";
3
+ import { createPortal as L } from "react-dom";
4
+ import { useTheme as A } from "@emotion/react";
5
+ import a from "@emotion/styled";
6
+ import { motion as o } from "motion/react";
7
+ const F = a(o.div)`
6
8
  position: fixed;
7
9
  top: 0;
8
10
  left: 0;
9
11
  z-index: 1;
10
- `, A = i.div`
12
+ `, R = a(o.div)`
11
13
  position: fixed;
12
14
  top: 0;
13
15
  left: 0;
@@ -18,11 +20,7 @@ const L = i.div`
18
20
  palette: { common: r }
19
21
  }
20
22
  }) => r.overlay};
21
- transition:
22
- opacity ${({ transitionDuration: r }) => `${r}ms`}
23
- ${({ ease: r }) => r === "in" ? "ease-in" : "ease-out"},
24
- background-color 0.2s;
25
- `, E = i.div`
23
+ `, S = a(o.div)`
26
24
  position: fixed;
27
25
  width: 100%;
28
26
  display: flex;
@@ -95,55 +93,60 @@ const L = i.div`
95
93
  return t;
96
94
  }}
97
95
  `;
98
- function q({
96
+ function N({
99
97
  children: r,
100
98
  open: t,
101
- onClose: s,
102
- transitionDuration: o = 200,
103
- placement: u,
104
- style: b,
105
- ref: p,
106
- onClick: a,
107
- ...g
99
+ onClose: d,
100
+ transitionDuration: s = 0.2,
101
+ placement: p,
102
+ ref: u,
103
+ onClick: b,
104
+ hideOverlay: g,
105
+ ...y
108
106
  }) {
109
- const [h, c] = m(!0), [y, f] = m(!1), n = k(null), O = (e) => {
110
- s == null || s(), a == null || a(e);
107
+ const {
108
+ palette: { common: h }
109
+ } = A(), [O, i] = m(!0), [v, c] = m(!1), n = E(null), k = (e) => {
110
+ d?.(), b?.(e);
111
111
  };
112
- return x(p, () => n.current), $(() => {
112
+ return I(u, () => n.current), C(() => {
113
113
  let e;
114
- return t ? (c(!1), e = requestAnimationFrame(() => {
115
- f(!0);
116
- })) : f(!1), () => {
114
+ return t ? (i(!1), e = requestAnimationFrame(() => {
115
+ c(!0);
116
+ })) : c(!1), () => {
117
117
  e && cancelAnimationFrame(e);
118
118
  };
119
- }, [t, o]), I(() => {
119
+ }, [t, s]), w(() => {
120
120
  const e = n.current, l = (j) => {
121
- t || j.propertyName === "opacity" && c(!0);
121
+ t || j.propertyName === "opacity" && i(!0);
122
122
  };
123
- return e == null || e.addEventListener("transitionend", l), () => {
124
- e == null || e.removeEventListener("transitionend", l);
123
+ return e?.addEventListener("transitionend", l), () => {
124
+ e?.removeEventListener("transitionend", l);
125
125
  };
126
- }, [t]), h ? null : w(
127
- /* @__PURE__ */ v(L, { children: [
128
- /* @__PURE__ */ d(
129
- A,
126
+ }, [t]), O ? null : L(
127
+ /* @__PURE__ */ x(F, { children: [
128
+ /* @__PURE__ */ f(
129
+ R,
130
130
  {
131
131
  ref: n,
132
- transitionDuration: o,
133
- ease: t ? "in" : "out",
134
- onClick: O,
135
- style: {
136
- opacity: y ? 1 : 0,
137
- ...b
132
+ initial: { opacity: 0 },
133
+ animate: {
134
+ opacity: v ? 1 : 0,
135
+ backgroundColor: g ? "rgba(0, 0, 0, 0)" : h.overlay
138
136
  },
139
- ...g
137
+ transition: {
138
+ duration: s,
139
+ ease: t ? "easeIn" : "easeOut"
140
+ },
141
+ onClick: k,
142
+ ...y
140
143
  }
141
144
  ),
142
- /* @__PURE__ */ d(E, { placement: u, children: r })
145
+ /* @__PURE__ */ f(S, { placement: p, children: r })
143
146
  ] }),
144
147
  document.body
145
148
  );
146
149
  }
147
150
  export {
148
- q as default
151
+ N as default
149
152
  };
@@ -1,6 +1,5 @@
1
- import { ComponentPropsWithRef } from 'react';
2
- import { UtilityProps } from '../../typings/utility';
3
- export interface OverlayProps extends ComponentPropsWithRef<"div">, Pick<UtilityProps, "css"> {
1
+ import { HTMLMotionProps } from 'motion/react';
2
+ export interface OverlayProps extends HTMLMotionProps<"div"> {
4
3
  open?: boolean;
5
4
  onClose?: () => void;
6
5
  transitionDuration?: number;
@@ -1,11 +1,12 @@
1
- import { jsxs as A, jsx as c } from "react/jsx-runtime";
2
- import { useState as $, useRef as y, useImperativeHandle as I, useLayoutEffect as L, useEffect as v } from "react";
3
- import { createPortal as R } from "react-dom";
4
- import a from "basic-styled";
5
- const T = a.div`
1
+ import { jsxs as E, jsx as c } from "@emotion/react/jsx-runtime";
2
+ import { useState as y, useRef as b, useImperativeHandle as z, useLayoutEffect as A, useEffect as g } from "react";
3
+ import { createPortal as I } from "react-dom";
4
+ import i from "@emotion/styled";
5
+ import { motion as L } from "motion/react";
6
+ const R = i(L.div)`
6
7
  position: fixed;
7
- bottom: ${({ theme: { spacing: e } }) => `calc(${e[800]} + var(--safe-area-inset-bottom, 0px))`};
8
8
  left: 50%;
9
+ bottom: ${({ theme: { spacing: e } }) => `calc(${e[800]} + var(--safe-area-inset-bottom, 0px))`};
9
10
  display: flex;
10
11
  align-items: center;
11
12
  gap: ${({ theme: { spacing: e } }) => e[400]};
@@ -20,15 +21,9 @@ const T = a.div`
20
21
  }) => e[900]};
21
22
  border-radius: ${({ theme: { radius: e } }) => e[400]};
22
23
  z-index: 1;
23
-
24
- transition:
25
- opacity ${({ transitionDuration: e }) => `${e}ms`}
26
- ${({ ease: e }) => e === "in" ? "ease-in" : "ease-out"},
27
- transform ${({ transitionDuration: e }) => `${e}ms`},
28
- background-color 0.2s;
29
- `, j = a.div`
24
+ `, T = i.div`
30
25
  white-space: nowrap;
31
- `, E = a.div`
26
+ `, j = i.div`
32
27
  flex-grow: 1;
33
28
  display: -webkit-box;
34
29
  overflow: hidden;
@@ -38,70 +33,79 @@ const T = a.div`
38
33
  ${({
39
34
  theme: {
40
35
  palette: { common: e },
41
- typography: { body2: r }
36
+ typography: { body2: t }
42
37
  }
43
38
  }) => ({
44
- fontSize: r.fontSize,
45
- lineHeight: r.lineHeight,
39
+ fontSize: t.fontSize,
40
+ lineHeight: t.lineHeight,
46
41
  color: e.surface
47
42
  })}
48
- `, F = a.div`
43
+ `, F = i.div`
49
44
  white-space: nowrap;
50
45
  `;
51
- function N({
46
+ function B({
52
47
  children: e,
53
- open: r,
54
- onClose: n,
55
- transitionDuration: l = 200,
56
- style: w,
57
- ref: g,
58
- startIcon: f,
59
- action: m,
60
- maxWidth: b = "375px",
48
+ open: t,
49
+ onClose: l,
50
+ transitionDuration: a = 0.2,
51
+ style: O,
52
+ ref: v,
53
+ startIcon: m,
54
+ action: f,
55
+ maxWidth: w = "375px",
61
56
  autoHideDuration: d = 3e3,
62
- disableAutoHide: u,
63
- ...S
57
+ disableAutoHide: p,
58
+ ...$
64
59
  }) {
65
- const [k, p] = $(!0), [i, h] = $(!1), s = y(null), o = y(null);
66
- return I(g, () => s.current), L(() => {
67
- let t;
68
- return r ? (p(!1), t = requestAnimationFrame(() => {
60
+ const [k, u] = y(!0), [r, h] = y(!1), o = b(null), s = b(null);
61
+ return z(v, () => o.current), A(() => {
62
+ let n;
63
+ return t ? (u(!1), n = requestAnimationFrame(() => {
69
64
  h(!0);
70
65
  })) : h(!1), () => {
71
- t && cancelAnimationFrame(t);
66
+ n && cancelAnimationFrame(n);
72
67
  };
73
- }, [r, l]), v(() => {
74
- const t = s.current, x = (z) => {
75
- r || z.propertyName === "opacity" && p(!0);
68
+ }, [t, a]), g(() => {
69
+ const n = o.current, x = (S) => {
70
+ t || S.propertyName === "opacity" && u(!0);
76
71
  };
77
- return t == null || t.addEventListener("transitionend", x), () => {
78
- t == null || t.removeEventListener("transitionend", x);
72
+ return n?.addEventListener("transitionend", x), () => {
73
+ n?.removeEventListener("transitionend", x);
79
74
  };
80
- }, [r]), v(() => {
81
- if (!(u || !i))
82
- return o.current = setTimeout(() => {
83
- n == null || n();
75
+ }, [t]), g(() => {
76
+ if (!(p || !r))
77
+ return s.current = setTimeout(() => {
78
+ l?.();
84
79
  }, d), () => {
85
- o.current && clearTimeout(o.current);
80
+ s.current && clearTimeout(s.current);
86
81
  };
87
- }, [u, d, i, n]), k ? null : R(
88
- /* @__PURE__ */ A(
89
- T,
82
+ }, [p, d, r, l]), k ? null : I(
83
+ /* @__PURE__ */ E(
84
+ R,
90
85
  {
91
- ref: s,
92
- transitionDuration: l,
93
- ease: r ? "in" : "out",
94
- maxWidth: b,
95
- style: {
96
- opacity: i ? 1 : 0,
97
- transform: i ? "translate3d(-50%, 0, 0) scale(1)" : "translate3d(-50%, 0, 0) scale(0.97)",
98
- ...w
86
+ ref: o,
87
+ transitionDuration: a,
88
+ maxWidth: w,
89
+ initial: {
90
+ x: "-50%",
91
+ scale: 0.97,
92
+ opacity: 0
93
+ },
94
+ animate: {
95
+ x: "-50%",
96
+ scale: r ? 1 : 0.97,
97
+ opacity: r ? 1 : 0
98
+ },
99
+ transition: {
100
+ type: "spring",
101
+ duration: a,
102
+ damping: 10
99
103
  },
100
- ...S,
104
+ ...$,
101
105
  children: [
102
- f && /* @__PURE__ */ c(j, { children: f }),
103
- /* @__PURE__ */ c(E, { children: e }),
104
- m && /* @__PURE__ */ c(F, { children: m })
106
+ m && /* @__PURE__ */ c(T, { children: m }),
107
+ /* @__PURE__ */ c(j, { children: e }),
108
+ f && /* @__PURE__ */ c(F, { children: f })
105
109
  ]
106
110
  }
107
111
  ),
@@ -109,5 +113,5 @@ function N({
109
113
  );
110
114
  }
111
115
  export {
112
- N as default
116
+ B as default
113
117
  };
@@ -1,6 +1,6 @@
1
- import { ReactNode, ComponentPropsWithRef } from 'react';
2
- import { UtilityProps } from '../../typings/utility';
3
- export interface SnackbarProps extends ComponentPropsWithRef<"div">, UtilityProps {
1
+ import { ReactNode, PropsWithChildren } from 'react';
2
+ import { HTMLMotionProps } from 'motion/react';
3
+ export interface SnackbarProps extends PropsWithChildren<HTMLMotionProps<"div">> {
4
4
  open?: boolean;
5
5
  onClose?: () => void;
6
6
  transitionDuration?: number;
@@ -1,3 +1,3 @@
1
1
  import { SwitchProps } from './Switch.typing';
2
- declare function Switch({ checked, disabled, size, onChange, onClick, ...props }: SwitchProps): import("react").JSX.Element;
2
+ declare function Switch({ checked, disabled, size, onChange, onClick, ...props }: SwitchProps): import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default Switch;
@@ -1,17 +1,18 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import l from "basic-styled";
3
- const c = l.button`
1
+ import { jsx as n } from "@emotion/react/jsx-runtime";
2
+ import s from "@emotion/styled";
3
+ import { motion as l } from "motion/react";
4
+ const d = s(l.button)`
4
5
  position: relative;
6
+ display: flex;
7
+ align-items: center;
8
+ padding: 0 ${({ theme: { spacing: t } }) => t[100]};
5
9
  border-radius: 9999px;
6
- transition:
7
- width 0.2s,
8
- height 0.2s,
9
- background-color 0.2s;
10
+ transition: background-color 0.2s;
10
11
  cursor: pointer;
11
12
 
12
- ${({ theme: { palette: t }, checked: r, disabled: o, size: i }) => {
13
+ ${({ theme: { palette: t }, checked: i, disabled: r, size: a }) => {
13
14
  const e = {};
14
- switch (i) {
15
+ switch (a) {
15
16
  case "small":
16
17
  Object.assign(e, {
17
18
  width: "40px",
@@ -43,60 +44,72 @@ const c = l.button`
43
44
  });
44
45
  break;
45
46
  }
46
- return r ? Object.assign(e, {
47
+ return i ? Object.assign(e, {
47
48
  backgroundColor: t.primary.main
48
49
  }) : Object.assign(e, {
49
50
  backgroundColor: t.neutral[300]
50
- }), o && Object.assign(e, {
51
+ }), r && Object.assign(e, {
51
52
  backgroundColor: t.neutral[200]
52
53
  }), e;
53
54
  }};
54
55
 
55
- &::after {
56
- content: "";
57
- position: absolute;
58
- top: 50%;
59
- left: 0;
60
- background-color: ${({
56
+ &:disabled {
57
+ cursor: not-allowed;
58
+ }
59
+ `, c = s(l.div)`
60
+ background-color: ${({
61
61
  theme: {
62
62
  palette: { common: t }
63
63
  }
64
64
  }) => t.background};
65
- border-radius: 50%;
66
- transition:
67
- width 0.2s,
68
- height 0.2s,
69
- background-color 0.2s,
70
- transform 0.2s ${({ ease: t }) => t === "in" ? "ease-in" : "ease-out"};
71
- transform: ${({ theme: { spacing: t }, checked: r }) => r ? `translate3d(calc(100% + ${t[100]}), -50%, 0)` : `translate3d(${t[100]}, -50%, 0)`};
72
- }
65
+ border-radius: 50%;
73
66
 
74
- &:disabled {
75
- cursor: not-allowed;
67
+ ${({ size: t }) => {
68
+ switch (t) {
69
+ case "small":
70
+ return {
71
+ width: "16px",
72
+ height: "16px"
73
+ };
74
+ case "large":
75
+ return {
76
+ width: "24px",
77
+ height: "24px"
78
+ };
79
+ default:
80
+ return {
81
+ width: "20px",
82
+ height: "20px"
83
+ };
76
84
  }
85
+ }}
77
86
  `;
78
- function f({
87
+ function x({
79
88
  checked: t = !1,
80
- disabled: r = !1,
81
- size: o = "medium",
82
- onChange: i,
89
+ disabled: i = !1,
90
+ size: r = "medium",
91
+ onChange: a,
83
92
  onClick: e,
84
- ...s
93
+ ...h
85
94
  }) {
86
95
  return /* @__PURE__ */ n(
87
- c,
96
+ d,
88
97
  {
89
- size: o,
98
+ size: r,
90
99
  checked: t,
91
- disabled: r,
92
- ease: t ? "in" : "out",
93
- onClick: (a) => {
94
- !r && typeof i == "function" && i(a, !t), typeof e == "function" && e(a);
100
+ disabled: i,
101
+ onClick: (o) => {
102
+ !i && typeof a == "function" && a(o, !t), typeof e == "function" && e(o);
103
+ },
104
+ layout: !0,
105
+ style: {
106
+ justifyContent: t ? "flex-end" : "flex-start"
95
107
  },
96
- ...s
108
+ ...h,
109
+ children: /* @__PURE__ */ n(c, { layout: !0, size: r })
97
110
  }
98
111
  );
99
112
  }
100
113
  export {
101
- f as default
114
+ x as default
102
115
  };
@@ -1,6 +1,6 @@
1
- import { ComponentPropsWithRef, MouseEvent } from 'react';
2
- import { UtilityProps } from '../../typings/utility';
3
- export interface SwitchProps extends Omit<ComponentPropsWithRef<"button">, "onChange">, Pick<UtilityProps, "css"> {
1
+ import { MouseEvent } from 'react';
2
+ import { HTMLMotionProps } from 'motion/react';
3
+ export interface SwitchProps extends Omit<HTMLMotionProps<"button">, "onChange"> {
4
4
  checked?: boolean;
5
5
  disabled?: boolean;
6
6
  size?: "small" | "medium" | "large";
@@ -1,3 +1,3 @@
1
1
  import { TagProps } from './Tag.typing';
2
- declare function Tag(props: TagProps): import("react").JSX.Element;
2
+ declare function Tag(props: TagProps): import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default Tag;
@@ -1,9 +1,8 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import b from "basic-styled";
3
- const m = b.span`
4
- transition:
5
- background-color 0.2s,
6
- color 0.2s;
1
+ import { jsx as l } from "@emotion/react/jsx-runtime";
2
+ import g from "@emotion/styled";
3
+ import { motion as b } from "motion/react";
4
+ const k = g(b.span)`
5
+ transition: all 0.2s;
7
6
  cursor: default;
8
7
 
9
8
  padding: ${({ theme: { spacing: r } }) => r[100]};
@@ -16,13 +15,13 @@ const m = b.span`
16
15
  primary: e,
17
16
  secondary: o,
18
17
  text: i,
19
- feedback: { warning: n, error: t, info: c, success: s }
18
+ feedback: { warning: n, error: t, info: s, success: c }
20
19
  }
21
20
  },
22
- color: g
21
+ color: m
23
22
  }) => {
24
23
  const a = {};
25
- switch (g) {
24
+ switch (m) {
26
25
  case "warning":
27
26
  Object.assign(a, {
28
27
  backgroundColor: n.main,
@@ -37,13 +36,13 @@ const m = b.span`
37
36
  break;
38
37
  case "info":
39
38
  Object.assign(a, {
40
- backgroundColor: c.main,
39
+ backgroundColor: s.main,
41
40
  color: r === "dark" ? o.main : i.primary
42
41
  });
43
42
  break;
44
43
  case "success":
45
44
  Object.assign(a, {
46
- backgroundColor: s.main,
45
+ backgroundColor: c.main,
47
46
  color: r === "dark" ? o.main : i.primary
48
47
  });
49
48
  break;
@@ -67,9 +66,9 @@ const m = b.span`
67
66
  lineHeight: r.lineHeight
68
67
  })};
69
68
  `;
70
- function d(r) {
71
- return /* @__PURE__ */ l(m, { ...r });
69
+ function f(r) {
70
+ return /* @__PURE__ */ l(k, { ...r });
72
71
  }
73
72
  export {
74
- d as default
73
+ f as default
75
74
  };
@@ -1,5 +1,5 @@
1
- import { ComponentPropsWithRef } from 'react';
2
1
  import { UtilityProps } from '../../typings/utility';
3
- export interface TagProps extends ComponentPropsWithRef<"span">, Pick<UtilityProps, "css"> {
2
+ import { HTMLMotionProps } from 'motion/react';
3
+ export interface TagProps extends HTMLMotionProps<"span">, Pick<UtilityProps, "css"> {
4
4
  color?: "primary" | "warning" | "error" | "info" | "success";
5
5
  }
@@ -1,3 +1,3 @@
1
1
  import { TextFieldProps } from './TextField.typing';
2
- declare function TextField({ variant, size, fullWidth, disabled, startIcon, endIcon, css, onFocus, onBlur, ...props }: TextFieldProps): import("react").JSX.Element;
2
+ declare function TextField({ variant, size, fullWidth, disabled, startIcon, endIcon, onFocus, onBlur, ...props }: TextFieldProps): import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default TextField;
@@ -1,19 +1,14 @@
1
- import { jsxs as p, jsx as c } from "react/jsx-runtime";
2
- import { useState as m } from "react";
3
- import s from "basic-styled";
4
- const b = s.div`
1
+ import { jsxs as m, jsx as a } from "@emotion/react/jsx-runtime";
2
+ import { useState as p } from "react";
3
+ import l from "@emotion/styled";
4
+ import { motion as c } from "motion/react";
5
+ const b = l(c.div)`
5
6
  display: flex;
6
7
  align-items: center;
7
8
  gap: ${({ theme: { spacing: e } }) => e[200]};
8
9
  border: 1px solid transparent;
9
10
  border-radius: ${({ theme: { radius: e } }) => e[200]};
10
- transition:
11
- background-color 0.2s,
12
- border-color 0.2s,
13
- padding 0.2s,
14
- font-size 0.2s,
15
- font-weight 0.2s,
16
- color 0.2s;
11
+ transition: all 0.2s;
17
12
  background-color: ${({
18
13
  theme: {
19
14
  palette: { common: e }
@@ -124,7 +119,7 @@ const b = s.div`
124
119
  color: e[500],
125
120
  cursor: "not-allowed"
126
121
  } : {}};
127
- `, w = s.input`
122
+ `, w = l(c.input)`
128
123
  flex-grow: 1;
129
124
  border: none;
130
125
  outline: none;
@@ -141,51 +136,50 @@ const b = s.div`
141
136
  &:disabled {
142
137
  cursor: not-allowed;
143
138
  }
144
- `, S = s.div`
139
+ `, S = l.div`
145
140
  display: flex;
146
141
  align-items: center;
147
142
  justify-content: center;
148
143
  white-space: nowrap;
149
- `, $ = s.div`
144
+ `, $ = l.div`
150
145
  display: flex;
151
146
  align-items: center;
152
147
  justify-content: center;
153
148
  white-space: nowrap;
154
149
  `;
155
- function H({
150
+ function y({
156
151
  variant: e = "outlined",
157
152
  size: n = "medium",
158
153
  fullWidth: o,
159
154
  disabled: t,
160
155
  startIcon: r,
161
156
  endIcon: i,
162
- css: f,
163
- onFocus: l,
164
- onBlur: a,
165
- ...g
157
+ onFocus: h,
158
+ onBlur: u,
159
+ ...f
166
160
  }) {
167
- const [u, h] = m(!1);
168
- return /* @__PURE__ */ p(
161
+ const [g, d] = p(!1);
162
+ return /* @__PURE__ */ m(
169
163
  b,
170
164
  {
171
165
  variant: e,
172
166
  size: n,
173
- focused: u,
167
+ focused: g,
174
168
  fullWidth: o,
175
169
  disabled: t,
176
- css: f,
170
+ layout: !0,
177
171
  children: [
178
- r && /* @__PURE__ */ c(S, { children: r }),
179
- /* @__PURE__ */ c(w, { ...g, onFocus: (d) => {
180
- h(!0), l == null || l(d);
181
- }, onBlur: (d) => {
182
- h(!1), a == null || a(d);
172
+ r && /* @__PURE__ */ a(S, { children: r }),
173
+ /* @__PURE__ */ a(w, { ...f, onFocus: (s) => {
174
+ d(!0), h?.(s);
175
+ }, onBlur: (s) => {
176
+ d(!1), u?.(s);
183
177
  }, disabled: t }),
184
- i && /* @__PURE__ */ c($, { children: i })
178
+ i && /* @__PURE__ */ a($, { children: i })
185
179
  ]
186
180
  }
187
181
  );
188
182
  }
189
183
  export {
190
- H as default
184
+ y as default
191
185
  };
@@ -1,6 +1,6 @@
1
- import { ComponentPropsWithRef, ReactNode } from 'react';
2
- import { UtilityProps } from '../../typings/utility';
3
- export interface TextFieldProps extends Omit<ComponentPropsWithRef<"input">, "children" | "size">, Pick<UtilityProps, "css"> {
1
+ import { ReactNode } from 'react';
2
+ import { HTMLMotionProps } from 'motion/react';
3
+ export interface TextFieldProps extends Omit<HTMLMotionProps<"input">, "size"> {
4
4
  variant?: "contained" | "outlined";
5
5
  startIcon?: ReactNode;
6
6
  endIcon?: ReactNode;