@spacego/fe-components 0.0.1-alpha.3 → 0.0.1-alpha.4

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.
@@ -16,9 +16,9 @@ import "antd";
16
16
  import { useGlobal as C } from "../context/context.js";
17
17
  /* empty css */
18
18
  import "../basics-layout/index.js";
19
- function A() {
20
- const { appName: s, logo: n } = C(), { theme: o, themeColor: c, TOGGLE_THEME: m, SET_THEME_COLOR: f } = T(p(["theme", "themeColor", "TOGGLE_THEME", "SET_THEME_COLOR"])), [a, l] = u(!1), d = (r) => {
21
- const i = r.currentTarget.getBoundingClientRect(), h = i.left + i.width / 2, x = i.top + i.height / 2;
19
+ function q() {
20
+ const { appName: s, logo: n } = C(), { theme: o, themeColor: c, TOGGLE_THEME: m, SET_THEME_COLOR: f } = T(p(["theme", "themeColor", "TOGGLE_THEME", "SET_THEME_COLOR"])), [a, i] = u(!1), d = (r) => {
21
+ const l = r.currentTarget.getBoundingClientRect(), h = l.left + l.width / 2, x = l.top + l.height / 2;
22
22
  k(o === "light" ? "dark" : "light", h, x).then(() => {
23
23
  m();
24
24
  });
@@ -40,8 +40,8 @@ function A() {
40
40
  opacity: a ? 1 : 0,
41
41
  transition: "transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
42
42
  },
43
- onMouseEnter: () => l(!0),
44
- onMouseLeave: () => l(!1),
43
+ onMouseEnter: () => i(!0),
44
+ onMouseLeave: () => i(!1),
45
45
  children: E.map((r) => /* @__PURE__ */ e(
46
46
  "div",
47
47
  {
@@ -59,8 +59,8 @@ function A() {
59
59
  "div",
60
60
  {
61
61
  className: "w-8 h-8 flex items-center justify-center cursor-pointer hover-scale-animation",
62
- onMouseEnter: () => l(!0),
63
- onMouseLeave: () => l(!1),
62
+ onMouseEnter: () => i(!0),
63
+ onMouseLeave: () => i(!1),
64
64
  children: /* @__PURE__ */ e(N, { className: "h-[16px] w-[16px] text-(--color-primary)" })
65
65
  }
66
66
  ),
@@ -91,5 +91,5 @@ function A() {
91
91
  ] });
92
92
  }
93
93
  export {
94
- A as default
94
+ q as default
95
95
  };
@@ -1,19 +1,19 @@
1
1
  import { jsx as r, jsxs as i, Fragment as u } from "react/jsx-runtime";
2
2
  import { classnames as s } from "@spacego/turbo-utils";
3
3
  import { Divider as x } from "antd";
4
- import { useRef as b, useState as v, useEffect as k } from "react";
5
- import { MdClear as g } from "react-icons/md";
4
+ import { useRef as v, useState as b, useEffect as g } from "react";
5
+ import { MdClear as k } from "react-icons/md";
6
6
  import y from "../../../../assets/svg/chrome-bg-after.svg.js";
7
7
  import w from "../../../../assets/svg/chrome-bg-before.svg.js";
8
8
  function z(c) {
9
- const { tabs: o, activeKey: d, onChange: f, onClose: h } = c, n = b(null), [l, m] = v(!1), a = () => {
9
+ const { tabs: o, activeKey: d, onChange: f, onClose: h } = c, n = v(null), [l, m] = b(!1), a = () => {
10
10
  const e = n.current;
11
11
  if (e) {
12
12
  const t = e.scrollWidth > e.clientWidth;
13
13
  m(t);
14
14
  }
15
15
  };
16
- return k(() => (a(), window.addEventListener("resize", a), () => {
16
+ return g(() => (a(), window.addEventListener("resize", a), () => {
17
17
  window.removeEventListener("resize", a);
18
18
  }), [o]), /* @__PURE__ */ r(
19
19
  "div",
@@ -43,7 +43,7 @@ function z(c) {
43
43
  onClick: (p) => {
44
44
  p.stopPropagation(), h(e.key);
45
45
  },
46
- children: /* @__PURE__ */ r(g, { className: "text-xs text-[#333333] dark:text-[#cfd0d0] hover:text-black dark:hover:text-white transition-all" })
46
+ children: /* @__PURE__ */ r(k, { className: "text-xs text-[#333333] dark:text-[#cfd0d0] hover:text-black dark:hover:text-white transition-all" })
47
47
  }
48
48
  )
49
49
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spacego/fe-components",
3
- "version": "0.0.1-alpha.3",
3
+ "version": "0.0.1-alpha.4",
4
4
  "description": "🚀 A component library for fe to use.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",