@shiflo/ui 0.2.0 → 0.2.3

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.
@@ -1,5 +1,5 @@
1
1
  import { S as e } from "./line/calendar-line.svg-DHsuXoUL.js";
2
- import { S } from "./solid/calendar-days-solid.svg-CIj8vf6t.js";
2
+ import { S as a } from "./solid/calendar-days-solid.svg-CIj8vf6t.js";
3
3
  import { S as i } from "./solid/calendar-lines-solid.svg-D2qG_E7t.js";
4
4
  import { S as t } from "./solid/calendar-week-solid.svg-CVmrJtif.js";
5
5
  import { S as f } from "./solid/calendars-solid.svg-rClh_xBu.js";
@@ -8,31 +8,35 @@ import { S as n } from "./solid/grid-2-solid.svg-BRtzwK6Y.js";
8
8
  import { S as c } from "./solid/pen-to-square-solid.svg-DUdNcuTM.js";
9
9
  import { S as h } from "./solid/plus-solid.svg-piiaS3kO.js";
10
10
  import { S as L } from "./solid/rotate-right-solid.svg-CYW200XH.js";
11
- import { S as D } from "./solid/xmark-solid.svg-Ce8xHlZn.js";
12
- import { S as P } from "./solid/check-solid.svg-C41sTTzR.js";
11
+ import { S as B } from "./solid/xmark-solid.svg-Ce8xHlZn.js";
12
+ import { S as G } from "./solid/check-solid.svg-C41sTTzR.js";
13
13
  import { S as T } from "./solid/trash-solid.svg-iJSf_6Y3.js";
14
14
  import { S as q } from "./solid/minus-solid.svg-BBiGvc-2.js";
15
- import { S as y } from "./solid/briefcase-blank-solid.svg-6ppQL_Z4.js";
16
- import { S as A } from "./solid/chart-simple-horizontal-solid.svg-znTJSeQj.js";
17
- import { S as H } from "./solid/clock-desk-solid.svg-Dvm3Xip1.js";
18
- import { S as M } from "./solid/circle-check-solid.svg-D2Pv_oiO.js";
19
- import { S as X } from "./solid/arrow-left-solid.svg-C16XJbK9.js";
20
- import { S as j } from "./solid/circle-info-solid.svg-eMJtJJRm.js";
15
+ import { S as w } from "./solid/briefcase-blank-solid.svg-6ppQL_Z4.js";
16
+ import { S as z } from "./solid/chart-simple-horizontal-solid.svg-znTJSeQj.js";
17
+ import { S as E } from "./solid/clock-desk-solid.svg-Dvm3Xip1.js";
18
+ import { S as I } from "./solid/circle-check-solid.svg-D2Pv_oiO.js";
19
+ import { S as W } from "./solid/arrow-left-solid.svg-C16XJbK9.js";
20
+ import { S as b } from "./solid/circle-info-solid.svg-eMJtJJRm.js";
21
21
  import { S as F } from "./solid/circle-exclamation-solid.svg-CuZt_q4T.js";
22
+ import { S as K } from "./solid/circle-plus-solid.svg-wYCF_uVS.js";
23
+ import { S as O } from "./solid/chevron-left-solid.svg-CrKzZ71H.js";
22
24
  export {
23
- X as ArrowLeftSolid,
24
- y as BriefcaseBlankSolid,
25
- S as CalendarDaysSolid,
25
+ W as ArrowLeftSolid,
26
+ w as BriefcaseBlankSolid,
27
+ a as CalendarDaysSolid,
26
28
  e as CalendarLine,
27
29
  i as CalendarLinesSolid,
28
30
  t as CalendarWeekSolid,
29
31
  f as CalendarsSolid,
30
- A as ChartSimpleHorizontalSolid,
31
- P as CheckSolid,
32
- M as CircleCheckSolid,
32
+ z as ChartSimpleHorizontalSolid,
33
+ G as CheckSolid,
34
+ O as ChevronLeftSolid,
35
+ I as CircleCheckSolid,
33
36
  F as CircleExclamationSolid,
34
- j as CircleInfoSolid,
35
- H as ClockDeskSolid,
37
+ b as CircleInfoSolid,
38
+ K as CirclePlusSolid,
39
+ E as ClockDeskSolid,
36
40
  p as GearSolid,
37
41
  n as Grid2Solid,
38
42
  q as MinusSolid,
@@ -40,5 +44,5 @@ export {
40
44
  h as PlusSolid,
41
45
  L as RotateRightSolid,
42
46
  T as TrashSolid,
43
- D as XmarkSolid
47
+ B as XmarkSolid
44
48
  };
@@ -9,8 +9,8 @@ import { S as d } from "./solid/pen-to-square-solid.svg-DUdNcuTM.js";
9
9
  import { S as m } from "./solid/plus-solid.svg-piiaS3kO.js";
10
10
  import { S as t } from "./solid/rotate-right-solid.svg-CYW200XH.js";
11
11
  import { S as s } from "./solid/xmark-solid.svg-Ce8xHlZn.js";
12
- import { S as n } from "./solid/check-solid.svg-C41sTTzR.js";
13
- import { S as f } from "./solid/trash-solid.svg-iJSf_6Y3.js";
12
+ import { S as f } from "./solid/check-solid.svg-C41sTTzR.js";
13
+ import { S as n } from "./solid/trash-solid.svg-iJSf_6Y3.js";
14
14
  import { S as g } from "./solid/minus-solid.svg-BBiGvc-2.js";
15
15
  import { S as p } from "./solid/briefcase-blank-solid.svg-6ppQL_Z4.js";
16
16
  import { S as C } from "./solid/chart-simple-horizontal-solid.svg-znTJSeQj.js";
@@ -19,7 +19,9 @@ import { S as c } from "./solid/circle-check-solid.svg-D2Pv_oiO.js";
19
19
  import { S as k } from "./solid/arrow-left-solid.svg-C16XJbK9.js";
20
20
  import { S as h } from "./solid/circle-info-solid.svg-eMJtJJRm.js";
21
21
  import { S as u } from "./solid/circle-exclamation-solid.svg-CuZt_q4T.js";
22
- const W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22
+ import { S as L } from "./solid/circle-plus-solid.svg-wYCF_uVS.js";
23
+ import { S as P } from "./solid/chevron-left-solid.svg-CrKzZ71H.js";
24
+ const K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23
25
  __proto__: null,
24
26
  ArrowLeftSolid: k,
25
27
  BriefcaseBlankSolid: p,
@@ -29,10 +31,12 @@ const W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
29
31
  CalendarWeekSolid: r,
30
32
  CalendarsSolid: l,
31
33
  ChartSimpleHorizontalSolid: C,
32
- CheckSolid: n,
34
+ CheckSolid: f,
35
+ ChevronLeftSolid: P,
33
36
  CircleCheckSolid: c,
34
37
  CircleExclamationSolid: u,
35
38
  CircleInfoSolid: h,
39
+ CirclePlusSolid: L,
36
40
  ClockDeskSolid: v,
37
41
  GearSolid: a,
38
42
  Grid2Solid: e,
@@ -40,9 +44,9 @@ const W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
40
44
  PenToSquareSolid: d,
41
45
  PlusSolid: m,
42
46
  RotateRightSolid: t,
43
- TrashSolid: f,
47
+ TrashSolid: n,
44
48
  XmarkSolid: s
45
49
  }, Symbol.toStringTag, { value: "Module" }));
46
50
  export {
47
- W as S
51
+ K as S
48
52
  };
@@ -0,0 +1,5 @@
1
+ import * as e from "react";
2
+ const o = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", ...t }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" }));
3
+ export {
4
+ o as S
5
+ };
@@ -0,0 +1,5 @@
1
+ import * as e from "react";
2
+ const t = (l) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...l }, /* @__PURE__ */ e.createElement("path", { fill: "currentColor", d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z" }));
3
+ export {
4
+ t as S
5
+ };
@@ -18,3 +18,5 @@ export { default as CircleCheckSolid } from './circle-check-solid.svg';
18
18
  export { default as ArrowLeftSolid } from './arrow-left-solid.svg';
19
19
  export { default as CircleInfoSolid } from './circle-info-solid.svg';
20
20
  export { default as CircleExclamationSolid } from './circle-exclamation-solid.svg';
21
+ export { default as CirclePlusSolid } from './circle-plus-solid.svg';
22
+ export { default as ChevronLeftSolid } from './chevron-left-solid.svg';
@@ -1,42 +1,46 @@
1
- import { S } from "./calendar-days-solid.svg-CIj8vf6t.js";
1
+ import { S as e } from "./calendar-days-solid.svg-CIj8vf6t.js";
2
2
  import { S as a } from "./calendar-lines-solid.svg-D2qG_E7t.js";
3
3
  import { S as i } from "./calendar-week-solid.svg-CVmrJtif.js";
4
4
  import { S as t } from "./calendars-solid.svg-rClh_xBu.js";
5
5
  import { S as f } from "./gear-solid.svg-C6vEx0Wx.js";
6
6
  import { S as p } from "./grid-2-solid.svg-BRtzwK6Y.js";
7
- import { S as n } from "./pen-to-square-solid.svg-DUdNcuTM.js";
7
+ import { S as C } from "./pen-to-square-solid.svg-DUdNcuTM.js";
8
8
  import { S as c } from "./plus-solid.svg-piiaS3kO.js";
9
9
  import { S as h } from "./rotate-right-solid.svg-CYW200XH.js";
10
- import { S as B } from "./xmark-solid.svg-Ce8xHlZn.js";
11
- import { S as G } from "./check-solid.svg-C41sTTzR.js";
12
- import { S as P } from "./trash-solid.svg-iJSf_6Y3.js";
10
+ import { S as L } from "./xmark-solid.svg-Ce8xHlZn.js";
11
+ import { S as B } from "./check-solid.svg-C41sTTzR.js";
12
+ import { S as G } from "./trash-solid.svg-iJSf_6Y3.js";
13
13
  import { S as T } from "./minus-solid.svg-BBiGvc-2.js";
14
14
  import { S as q } from "./briefcase-blank-solid.svg-6ppQL_Z4.js";
15
- import { S as y } from "./chart-simple-horizontal-solid.svg-znTJSeQj.js";
16
- import { S as A } from "./clock-desk-solid.svg-Dvm3Xip1.js";
17
- import { S as H } from "./circle-check-solid.svg-D2Pv_oiO.js";
18
- import { S as M } from "./arrow-left-solid.svg-C16XJbK9.js";
19
- import { S as X } from "./circle-info-solid.svg-eMJtJJRm.js";
20
- import { S as j } from "./circle-exclamation-solid.svg-CuZt_q4T.js";
15
+ import { S as w } from "./chart-simple-horizontal-solid.svg-znTJSeQj.js";
16
+ import { S as z } from "./clock-desk-solid.svg-Dvm3Xip1.js";
17
+ import { S as E } from "./circle-check-solid.svg-D2Pv_oiO.js";
18
+ import { S as I } from "./arrow-left-solid.svg-C16XJbK9.js";
19
+ import { S as W } from "./circle-info-solid.svg-eMJtJJRm.js";
20
+ import { S as b } from "./circle-exclamation-solid.svg-CuZt_q4T.js";
21
+ import { S as F } from "./circle-plus-solid.svg-wYCF_uVS.js";
22
+ import { S as K } from "./chevron-left-solid.svg-CrKzZ71H.js";
21
23
  export {
22
- M as ArrowLeftSolid,
24
+ I as ArrowLeftSolid,
23
25
  q as BriefcaseBlankSolid,
24
- S as CalendarDaysSolid,
26
+ e as CalendarDaysSolid,
25
27
  a as CalendarLinesSolid,
26
28
  i as CalendarWeekSolid,
27
29
  t as CalendarsSolid,
28
- y as ChartSimpleHorizontalSolid,
29
- G as CheckSolid,
30
- H as CircleCheckSolid,
31
- j as CircleExclamationSolid,
32
- X as CircleInfoSolid,
33
- A as ClockDeskSolid,
30
+ w as ChartSimpleHorizontalSolid,
31
+ B as CheckSolid,
32
+ K as ChevronLeftSolid,
33
+ E as CircleCheckSolid,
34
+ b as CircleExclamationSolid,
35
+ W as CircleInfoSolid,
36
+ F as CirclePlusSolid,
37
+ z as ClockDeskSolid,
34
38
  f as GearSolid,
35
39
  p as Grid2Solid,
36
40
  T as MinusSolid,
37
- n as PenToSquareSolid,
41
+ C as PenToSquareSolid,
38
42
  c as PlusSolid,
39
43
  h as RotateRightSolid,
40
- P as TrashSolid,
41
- B as XmarkSolid
44
+ G as TrashSolid,
45
+ L as XmarkSolid
42
46
  };
@@ -1,3 +1,3 @@
1
1
  import { BottomSheetProps } from './BottomSheet.typing';
2
- declare function BottomSheet({ open, onClose, children, transitionDuration, maxWidth, onClick, ref, hideDragHandleBar, hideOverlay, style, ...props }: BottomSheetProps): import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare function BottomSheet({ open, onClose, children, transitionDuration, maxWidth, onClick, ref, hideDragHandleBar, hideOverlay, disablePortal, style, ...props }: BottomSheetProps): import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default BottomSheet;
@@ -1,8 +1,8 @@
1
- import { jsx as g, jsxs as V } from "@emotion/react/jsx-runtime";
2
- import { useState as z, useRef as o, useImperativeHandle as C, useEffect as M } from "react";
1
+ import { jsx as g, jsxs as z } from "@emotion/react/jsx-runtime";
2
+ import { useState as C, useRef as o, useImperativeHandle as G, useEffect as M } from "react";
3
3
  import y from "@emotion/styled";
4
- import G from "../Overlay/Overlay.mjs";
5
- const J = y.div`
4
+ import J from "../Overlay/Overlay.mjs";
5
+ const K = y.div`
6
6
  width: calc(100% - ${({ theme: { spacing: t } }) => t[800]});
7
7
  max-width: ${({ maxWidth: t = "375px" }) => t};
8
8
  max-height: calc(100% - ${({ theme: { spacing: t } }) => t[800]});
@@ -19,7 +19,7 @@ const J = y.div`
19
19
  transform ${({ transitionDuration: t }) => `${t}ms`}
20
20
  ${({ ease: t }) => t === "in" ? "ease-out" : "ease-in"},
21
21
  background-color 0.2s;
22
- `, K = y.div`
22
+ `, N = y.div`
23
23
  position: sticky;
24
24
  top: 0;
25
25
  left: 0;
@@ -34,7 +34,7 @@ const J = y.div`
34
34
  }
35
35
  }) => t.background};
36
36
  transition: background-color 0.2s;
37
- `, N = y.div`
37
+ `, Q = y.div`
38
38
  width: 24px;
39
39
  height: 4px;
40
40
  border-radius: ${({ theme: { radius: t } }) => t[100]};
@@ -45,7 +45,7 @@ const J = y.div`
45
45
  }) => t.main};
46
46
  transition: background-color 0.2s;
47
47
  `;
48
- function _({
48
+ function ee({
49
49
  open: t,
50
50
  onClose: d,
51
51
  children: S,
@@ -55,12 +55,13 @@ function _({
55
55
  ref: j,
56
56
  hideDragHandleBar: I,
57
57
  hideOverlay: O,
58
- style: A,
59
- ...F
58
+ disablePortal: A,
59
+ style: F,
60
+ ...W
60
61
  }) {
61
- const [E, $] = z(!1), m = o(null), L = o(null), c = o(null), u = o(!1), f = o(0), l = o(0), h = o(0), v = o(0), p = o(0), W = o(0.25);
62
- C(j, () => m.current);
63
- const q = (e) => {
62
+ const [E, $] = C(!1), m = o(null), L = o(null), c = o(null), u = o(!1), f = o(0), l = o(0), h = o(0), v = o(0), p = o(0), q = o(0.25);
63
+ G(j, () => m.current);
64
+ const P = (e) => {
64
65
  e.stopPropagation(), typeof b == "function" && b(e);
65
66
  };
66
67
  return M(() => {
@@ -80,46 +81,47 @@ function _({
80
81
  l.current = r;
81
82
  const B = Date.now(), D = B - p.current;
82
83
  if (D > 0) {
83
- const P = l.current;
84
- v.current = (r - P) / D, p.current = B;
84
+ const V = l.current;
85
+ v.current = (r - V) / D, p.current = B;
85
86
  }
86
87
  n && (n.style.opacity = `${Math.max(0, 1 - i / (h.current * 2))}`), e.style.transform = `translate3d(0, ${i}px, 0)`;
87
88
  }, s = () => {
88
89
  if (!e || !u.current) return;
89
90
  u.current = !1, e.style.cursor = "default", c.current && (c.current.style.cursor = "grab");
90
- const r = l.current - f.current, i = h.current * W.current;
91
+ const r = l.current - f.current, i = h.current * q.current;
91
92
  e.style.transition = `transform ${a}ms ease-out`, n && (n.style.transition = `opacity ${a}ms ease-out`), r > i || v.current > 0.5 && v.current > 0 ? (e.style.transform = "translate3d(0, 200%, 0)", n && (n.style.opacity = "0"), d?.()) : (e.style.transform = "translate3d(0, 0, 0)", n && (n.style.opacity = "1"));
92
93
  }, R = (r) => x(r.clientY), w = (r) => k(r.clientY), H = (r) => x(r.touches[0].clientY), Y = (r) => k(r.touches[0].clientY);
93
94
  return e?.addEventListener("mousedown", R), e?.addEventListener("mousemove", w), e?.addEventListener("mouseup", s), e?.addEventListener("mouseleave", s), e?.addEventListener("touchstart", H), e?.addEventListener("touchmove", Y), e?.addEventListener("touchend", s), e?.addEventListener("touchcancel", s), () => {
94
95
  e?.removeEventListener("mousedown", R), e?.removeEventListener("mousemove", w), e?.removeEventListener("mouseup", s), e?.removeEventListener("mouseleave", s), e?.removeEventListener("touchstart", H), e?.removeEventListener("touchmove", Y), e?.removeEventListener("touchend", s), e?.removeEventListener("touchcancel", s);
95
96
  };
96
97
  }, [E, d, a]), /* @__PURE__ */ g(
97
- G,
98
+ J,
98
99
  {
99
100
  ref: L,
100
101
  open: t,
101
102
  onClose: d,
102
103
  transitionDuration: a,
103
104
  placement: "center-bottom",
105
+ disablePortal: A,
104
106
  css: O ? {
105
107
  pointerEvents: "none",
106
108
  backgroundColor: "transparent !important"
107
109
  } : void 0,
108
- children: /* @__PURE__ */ V(
109
- J,
110
+ children: /* @__PURE__ */ z(
111
+ K,
110
112
  {
111
113
  ref: m,
112
114
  ease: t ? "in" : "out",
113
115
  transitionDuration: a,
114
116
  maxWidth: T,
115
- onClick: q,
116
- ...F,
117
+ onClick: P,
118
+ ...W,
117
119
  style: {
118
120
  transform: `translate3d(0, ${E ? "0" : "200%"}, 0)`,
119
- ...A
121
+ ...F
120
122
  },
121
123
  children: [
122
- !I && /* @__PURE__ */ g(K, { ref: c, children: /* @__PURE__ */ g(N, {}) }),
124
+ !I && /* @__PURE__ */ g(N, { ref: c, children: /* @__PURE__ */ g(Q, {}) }),
123
125
  S
124
126
  ]
125
127
  }
@@ -128,5 +130,5 @@ function _({
128
130
  );
129
131
  }
130
132
  export {
131
- _ as default
133
+ ee as default
132
134
  };
@@ -7,4 +7,5 @@ export interface BottomSheetProps extends ComponentPropsWithRef<"div">, Pick<Uti
7
7
  maxWidth?: string;
8
8
  hideDragHandleBar?: boolean;
9
9
  hideOverlay?: boolean;
10
+ disablePortal?: boolean;
10
11
  }
@@ -1,3 +1,3 @@
1
1
  import { DialogProps } from './Dialog.typing';
2
- declare function Dialog({ open, onClose, children, transitionDuration, onClick, style, maxWidth, ...props }: DialogProps): import("@emotion/react/jsx-runtime").JSX.Element;
2
+ declare function Dialog({ open, onClose, children, transitionDuration, onClick, style, maxWidth, disablePortal, ...props }: DialogProps): import("@emotion/react/jsx-runtime").JSX.Element;
3
3
  export default Dialog;
@@ -1,8 +1,8 @@
1
1
  import { jsx as s } from "@emotion/react/jsx-runtime";
2
- import { useState as $, useRef as p, useEffect as h } from "react";
3
- import g from "@emotion/styled";
4
- import y from "../Overlay/Overlay.mjs";
5
- const x = g.div`
2
+ import { useState as p, useRef as h, useEffect as g } from "react";
3
+ import y from "@emotion/styled";
4
+ import x from "../Overlay/Overlay.mjs";
5
+ const b = y.div`
6
6
  width: calc(100% - ${({ theme: { spacing: e } }) => e[800]});
7
7
  max-width: ${({ maxWidth: e = "375px" }) => e};
8
8
  max-height: calc(100% - ${({ theme: { spacing: e } }) => e[800]});
@@ -22,7 +22,7 @@ const x = g.div`
22
22
  ${({ ease: e }) => e === "in" ? "ease-out" : "ease-in"},
23
23
  background-color 0.2s;
24
24
  `;
25
- function O({
25
+ function A({
26
26
  open: e,
27
27
  onClose: n,
28
28
  children: m,
@@ -30,12 +30,13 @@ function O({
30
30
  onClick: o,
31
31
  style: l,
32
32
  maxWidth: c = "375px",
33
- ...f
33
+ disablePortal: f,
34
+ ...u
34
35
  }) {
35
- const [r, i] = $(!1), u = p(null), d = (t) => {
36
+ const [r, i] = p(!1), d = h(null), $ = (t) => {
36
37
  t.stopPropagation(), typeof o == "function" && o(t);
37
38
  };
38
- return h(() => {
39
+ return g(() => {
39
40
  let t;
40
41
  return e ? t = requestAnimationFrame(() => {
41
42
  i(!0);
@@ -43,21 +44,22 @@ function O({
43
44
  t && cancelAnimationFrame(t);
44
45
  };
45
46
  }, [e]), /* @__PURE__ */ s(
46
- y,
47
+ x,
47
48
  {
48
- ref: u,
49
+ ref: d,
49
50
  open: e,
50
51
  onClose: n,
51
52
  transitionDuration: a,
52
53
  placement: "center-middle",
54
+ disablePortal: f,
53
55
  children: /* @__PURE__ */ s(
54
- x,
56
+ b,
55
57
  {
56
58
  ease: e ? "in" : "out",
57
59
  transitionDuration: a,
58
60
  maxWidth: c,
59
- onClick: d,
60
- ...f,
61
+ onClick: $,
62
+ ...u,
61
63
  style: {
62
64
  transform: `scale(${r ? 1 : 0.9})`,
63
65
  opacity: r ? 1 : 0,
@@ -70,5 +72,5 @@ function O({
70
72
  );
71
73
  }
72
74
  export {
73
- O as default
75
+ A as default
74
76
  };
@@ -5,4 +5,5 @@ export interface DialogProps extends ComponentPropsWithRef<"div">, Pick<UtilityP
5
5
  onClose?: () => void;
6
6
  transitionDuration?: number;
7
7
  maxWidth?: string;
8
+ disablePortal?: boolean;
8
9
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "@emotion/react/jsx-runtime";
2
- import { S as i } from "../../assets/icons/index.ts-Cv-GsCPN.js";
2
+ import { S as i } from "../../assets/icons/index.ts-BhlTWUs_.js";
3
3
  import s from "@emotion/styled";
4
4
  import c from "../../utils/getValueByPath.mjs";
5
5
  const l = (o) => s(o)`
@@ -1,3 +1,3 @@
1
1
  import { OverlayProps } from './Overlay.typing';
2
- declare function Overlay({ children, open, onClose, transitionDuration, placement, style, ref, onClick, ...props }: OverlayProps): import('react').ReactPortal | null;
2
+ declare function Overlay({ children, open, onClose, transitionDuration, placement, style, ref, onClick, disablePortal, ...props }: OverlayProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
3
3
  export default Overlay;
@@ -1,13 +1,13 @@
1
- import { jsxs as k, jsx as l } from "@emotion/react/jsx-runtime";
2
- import { useState as f, useRef as j, useImperativeHandle as x, useLayoutEffect as E, useEffect as $ } from "react";
3
- import { createPortal as I } from "react-dom";
4
- import s from "@emotion/styled";
5
- const w = s.div`
1
+ import { jsxs as p, jsx as s } from "@emotion/react/jsx-runtime";
2
+ import { useState as y, useRef as C, useImperativeHandle as I, useLayoutEffect as w, useEffect as L } from "react";
3
+ import { createPortal as A } from "react-dom";
4
+ import o from "@emotion/styled";
5
+ const g = o.div`
6
6
  position: fixed;
7
7
  top: 0;
8
8
  left: 0;
9
9
  z-index: 1;
10
- `, C = s.div`
10
+ `, h = o.div`
11
11
  position: fixed;
12
12
  top: 0;
13
13
  left: 0;
@@ -15,135 +15,149 @@ const w = s.div`
15
15
  height: 100%;
16
16
  background-color: ${({
17
17
  theme: {
18
- palette: { common: e }
18
+ palette: { common: t }
19
19
  }
20
- }) => e.overlay};
20
+ }) => t.overlay};
21
21
  transition:
22
- opacity ${({ transitionDuration: e }) => `${e}ms`}
23
- ${({ ease: e }) => e === "in" ? "ease-in" : "ease-out"},
22
+ opacity ${({ transitionDuration: t }) => `${t}ms`}
23
+ ${({ ease: t }) => t === "in" ? "ease-in" : "ease-out"},
24
24
  background-color 0.2s;
25
- `, L = s.div`
25
+ `, O = o.div`
26
26
  position: fixed;
27
27
  width: 100%;
28
28
  display: flex;
29
29
  justify-content: center;
30
30
  align-items: center;
31
31
 
32
- ${({ placement: e }) => {
33
- const t = {};
34
- switch (e) {
32
+ ${({ placement: t }) => {
33
+ const e = {};
34
+ switch (t) {
35
35
  case "top-left":
36
- Object.assign(t, {
36
+ Object.assign(e, {
37
37
  top: 0,
38
38
  left: 0
39
39
  });
40
40
  break;
41
41
  case "top-right":
42
- Object.assign(t, {
42
+ Object.assign(e, {
43
43
  top: 0,
44
44
  right: 0
45
45
  });
46
46
  break;
47
47
  case "bottom-left":
48
- Object.assign(t, {
48
+ Object.assign(e, {
49
49
  bottom: 0,
50
50
  left: 0
51
51
  });
52
52
  break;
53
53
  case "bottom-right":
54
- Object.assign(t, {
54
+ Object.assign(e, {
55
55
  bottom: 0,
56
56
  right: 0
57
57
  });
58
58
  break;
59
59
  case "center-top":
60
- Object.assign(t, {
60
+ Object.assign(e, {
61
61
  top: 0,
62
62
  left: "50%",
63
63
  transform: "translate3d(-50%, 0, 0)"
64
64
  });
65
65
  break;
66
66
  case "center-bottom":
67
- Object.assign(t, {
67
+ Object.assign(e, {
68
68
  bottom: 0,
69
69
  left: "50%",
70
70
  transform: "translate3d(-50%, 0, 0)"
71
71
  });
72
72
  break;
73
73
  case "center-middle":
74
- Object.assign(t, {
74
+ Object.assign(e, {
75
75
  top: "50%",
76
76
  left: "50%",
77
77
  transform: "translate3d(-50%, -50%, 0)"
78
78
  });
79
79
  break;
80
80
  case "center-left":
81
- Object.assign(t, {
81
+ Object.assign(e, {
82
82
  top: "50%",
83
83
  left: 0,
84
84
  transform: "translate3d(0, -50%, 0)"
85
85
  });
86
86
  break;
87
87
  case "center-right":
88
- Object.assign(t, {
88
+ Object.assign(e, {
89
89
  top: "50%",
90
90
  right: 0,
91
91
  transform: "translate3d(0, -50%, 0)"
92
92
  });
93
93
  break;
94
94
  }
95
- return t;
95
+ return e;
96
96
  }}
97
97
  `;
98
- function U({
99
- children: e,
100
- open: t,
101
- onClose: d,
98
+ function q({
99
+ children: t,
100
+ open: e,
101
+ onClose: k,
102
102
  transitionDuration: a = 200,
103
- placement: m,
104
- style: u,
105
- ref: b,
106
- onClick: p,
107
- ...g
103
+ placement: i,
104
+ style: c,
105
+ ref: v,
106
+ onClick: j,
107
+ disablePortal: x = !0,
108
+ ...l
108
109
  }) {
109
- const [y, o] = f(!0), [h, i] = f(!1), n = j(null), O = (r) => {
110
- d?.(), p?.(r);
110
+ const [E, f] = y(!0), [d, m] = y(!1), n = C(null), u = (r) => {
111
+ k?.(), j?.(r);
111
112
  };
112
- return x(b, () => n.current), E(() => {
113
+ return I(v, () => n.current), w(() => {
113
114
  let r;
114
- return t ? (o(!1), r = requestAnimationFrame(() => {
115
- i(!0);
116
- })) : i(!1), () => {
115
+ return e ? (f(!1), r = requestAnimationFrame(() => {
116
+ m(!0);
117
+ })) : m(!1), () => {
117
118
  r && cancelAnimationFrame(r);
118
119
  };
119
- }, [t, a]), $(() => {
120
- const r = n.current, c = (v) => {
121
- t || v.propertyName === "opacity" && o(!0);
120
+ }, [e, a]), L(() => {
121
+ const r = n.current, b = ($) => {
122
+ e || $.propertyName === "opacity" && f(!0);
122
123
  };
123
- return r?.addEventListener("transitionend", c), () => {
124
- r?.removeEventListener("transitionend", c);
124
+ return r?.addEventListener("transitionend", b), () => {
125
+ r?.removeEventListener("transitionend", b);
125
126
  };
126
- }, [t]), y ? null : I(
127
- /* @__PURE__ */ k(w, { children: [
128
- /* @__PURE__ */ l(
129
- C,
127
+ }, [e]), E ? null : x ? /* @__PURE__ */ p(g, { children: [
128
+ /* @__PURE__ */ s(
129
+ h,
130
+ {
131
+ ref: n,
132
+ transitionDuration: a,
133
+ ease: e ? "in" : "out",
134
+ onClick: u,
135
+ style: { opacity: d ? 1 : 0, ...c },
136
+ ...l
137
+ }
138
+ ),
139
+ /* @__PURE__ */ s(O, { placement: i, children: t })
140
+ ] }) : A(
141
+ /* @__PURE__ */ p(g, { children: [
142
+ /* @__PURE__ */ s(
143
+ h,
130
144
  {
131
145
  ref: n,
132
146
  transitionDuration: a,
133
- ease: t ? "in" : "out",
134
- onClick: O,
147
+ ease: e ? "in" : "out",
148
+ onClick: u,
135
149
  style: {
136
- opacity: h ? 1 : 0,
137
- ...u
150
+ opacity: d ? 1 : 0,
151
+ ...c
138
152
  },
139
- ...g
153
+ ...l
140
154
  }
141
155
  ),
142
- /* @__PURE__ */ l(L, { placement: m, children: e })
156
+ /* @__PURE__ */ s(O, { placement: i, children: t })
143
157
  ] }),
144
158
  document.body
145
159
  );
146
160
  }
147
161
  export {
148
- U as default
162
+ q as default
149
163
  };
@@ -6,4 +6,5 @@ export interface OverlayProps extends ComponentPropsWithRef<"div">, Pick<Utility
6
6
  transitionDuration?: number;
7
7
  placement?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center-top" | "center-bottom" | "center-middle" | "center-left" | "center-right";
8
8
  hideOverlay?: boolean;
9
+ disablePortal?: boolean;
9
10
  }
@@ -34,6 +34,7 @@ function l() {
34
34
  color: e.primary,
35
35
  backgroundColor: o.background,
36
36
  transition: "background-color 0.3s, color 0.3s",
37
+ fontSmooth: "antialiased",
37
38
  fontFamily: `Spoqa Han Sans Neo, -apple-system, BlinkMacSystemFont, Helvetica Neue,
38
39
  Apple SD Gothic Neo, Malgun Gothic, 맑은 고딕, 나눔고딕, Nanum Gothic,
39
40
  Noto Sans KR, Noto Sans CJK KR, arial, 돋움, Dotum, Tahoma, Geneva, sans-serif`
@@ -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 e = {
4
+ const t = {
5
5
  mode: "dark",
6
6
  palette: {
7
7
  primary: {
@@ -65,9 +65,9 @@ const e = {
65
65
  dark: "#CCB77A"
66
66
  },
67
67
  error: {
68
- light: "#8C4F4F",
69
- main: "#F5A3A3",
70
- dark: "#C88585"
68
+ light: "#7F1D1D",
69
+ main: "#EF4444",
70
+ dark: "#C53030"
71
71
  },
72
72
  info: {
73
73
  light: "#446E9E",
@@ -99,5 +99,5 @@ const e = {
99
99
  radius: a
100
100
  };
101
101
  export {
102
- e as default
102
+ t as default
103
103
  };
@@ -65,9 +65,9 @@ const e = {
65
65
  dark: "#B89A4F"
66
66
  },
67
67
  error: {
68
- light: "#FBC7C7",
69
- main: "#D67C7C",
70
- dark: "#B85C5C"
68
+ light: "#FFD6D6",
69
+ main: "#DC2626",
70
+ dark: "#B91C1C"
71
71
  },
72
72
  info: {
73
73
  light: "#C7E0FA",
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.2.0",
4
+ "version": "0.2.3",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"