@caspeco/casper-ui-library 5.5.0 → 5.5.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.
@@ -1 +1 @@
1
- {"version":3,"file":"inline-drawer.d.ts","sourceRoot":"","sources":["../../../lib/components/drawer/inline-drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAK3C,wBAAgB,YAAY,CAAC,EAC5B,QAAQ,EACR,MAAM,EACN,OAAO,EACP,UAAiB,EACjB,IAAW,EACX,MAAU,EACV,GAAG,KAAK,EACR,EAAE,WAAW,2CAsEb"}
1
+ {"version":3,"file":"inline-drawer.d.ts","sourceRoot":"","sources":["../../../lib/components/drawer/inline-drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAK3C,wBAAgB,YAAY,CAAC,EAC5B,QAAQ,EACR,MAAM,EACN,OAAO,EACP,UAAiB,EACjB,IAAW,EACX,MAAU,EACV,GAAG,KAAK,EACR,EAAE,WAAW,2CA8Db"}
@@ -1,23 +1,23 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { Box as x } from "@chakra-ui/react";
3
- import { useReducedMotion as y, motion as n } from "framer-motion";
4
- import { useRef as I, useMemo as S, useState as A } from "react";
5
- import { useInlineDrawerKeydown as M } from "./use-drawer-key-down.js";
6
- import { ThemeShadowVariable as R, ThemeColorVariable as s } from "../../theme/theme-types.js";
7
- const d = 0.3;
8
- function N({
9
- children: u,
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { Box as p } from "@chakra-ui/react";
3
+ import { motion as a } from "framer-motion";
4
+ import { useRef as x, useMemo as I, useState as y } from "react";
5
+ import { useInlineDrawerKeydown as S } from "./use-drawer-key-down.js";
6
+ import { ThemeShadowVariable as A, ThemeColorVariable as i } from "../../theme/theme-types.js";
7
+ const n = 0.3;
8
+ function M({
9
+ children: s,
10
10
  isOpen: e,
11
- onClose: l,
12
- closeOnEsc: c = !0,
13
- size: r = "xs",
14
- zIndex: m = 1,
15
- ...h
11
+ onClose: d,
12
+ closeOnEsc: m = !0,
13
+ size: o = "xs",
14
+ zIndex: u = 1,
15
+ ...l
16
16
  }) {
17
- const f = I(null);
18
- M({ isOpen: e, onClose: l, closeOnEsc: c });
19
- const w = S(() => {
20
- switch (r) {
17
+ const c = x(null);
18
+ S({ isOpen: e, onClose: d, closeOnEsc: m });
19
+ const h = I(() => {
20
+ switch (o) {
21
21
  case "xs":
22
22
  return 320;
23
23
  case "sm":
@@ -31,44 +31,43 @@ function N({
31
31
  default:
32
32
  return 320;
33
33
  }
34
- }, [r]), [p, i] = A(!e), a = y();
35
- let t;
36
- return e ? t = a ? { opacity: 1 } : { width: w } : t = a ? { opacity: 0 } : { width: 0 }, /* @__PURE__ */ o(
37
- n.aside,
34
+ }, [o]), [f, r] = y(!e), w = { width: e ? h : 0 };
35
+ return /* @__PURE__ */ t(
36
+ a.aside,
38
37
  {
39
- ref: f,
40
- hidden: p,
38
+ ref: c,
39
+ hidden: f,
41
40
  initial: !1,
42
- onAnimationStart: () => i(!1),
43
- onAnimationComplete: () => i(!e),
44
- animate: t,
41
+ onAnimationStart: () => r(!1),
42
+ onAnimationComplete: () => r(!e),
43
+ animate: w,
45
44
  transition: {
46
- duration: d,
45
+ duration: n,
47
46
  ease: "easeInOut"
48
47
  },
49
48
  style: {
50
- backgroundColor: s.Surface,
51
- color: s.OnSurface,
49
+ backgroundColor: i.Surface,
50
+ color: i.OnSurface,
52
51
  overflow: "hidden",
53
- boxShadow: R.Medium,
52
+ boxShadow: A.Medium,
54
53
  height: "100dvh",
55
54
  top: "0",
56
- zIndex: m
55
+ zIndex: u
57
56
  },
58
- children: /* @__PURE__ */ o(
59
- n.div,
57
+ children: /* @__PURE__ */ t(
58
+ a.div,
60
59
  {
61
60
  initial: { opacity: 0 },
62
61
  animate: { opacity: e ? 1 : 0 },
63
62
  exit: { opacity: 0 },
64
- transition: { duration: d, ease: "easeInOut" },
63
+ transition: { duration: n, ease: "easeInOut" },
65
64
  style: { height: "100%", width: "100%" },
66
- children: /* @__PURE__ */ o(x, { h: "100%", w: "100%", overflowY: "auto", ...h, children: u })
65
+ children: /* @__PURE__ */ t(p, { h: "100%", w: "100%", overflowY: "auto", ...l, children: s })
67
66
  }
68
67
  )
69
68
  }
70
69
  );
71
70
  }
72
71
  export {
73
- N as InlineDrawer
72
+ M as InlineDrawer
74
73
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caspeco/casper-ui-library",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "prettier": "@caspeco/prettier-config",
5
5
  "type": "module",
6
6
  "sideEffects": false,