gasp-components 1.0.28 → 1.0.29

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,41 +1,44 @@
1
- import { jsxs as m, Fragment as p, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as m, Fragment as p, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as h, useEffect as x } from "react";
3
3
  import { Tab as u } from "./tab.js";
4
4
  import k from "classnames";
5
5
  import { tabsContext as b } from "./context.js";
6
6
  const w = ({
7
- items: l,
7
+ items: a,
8
8
  current: o,
9
- onChange: r,
9
+ onChange: l,
10
10
  className: n,
11
11
  tabClassName: d
12
12
  }) => {
13
- const [c, t] = h(), f = l.reduce((e, a) => ({
13
+ const [c, s] = h(), f = a.reduce((e, r) => ({
14
14
  ...e,
15
- [a.key]: a.content
15
+ [r.key]: r.content
16
16
  }), {});
17
17
  x(() => {
18
- o && t(o);
19
- }, [o, t]);
18
+ o && s(o);
19
+ }, [o, s]);
20
20
  const i = (e) => {
21
- t(e), r && r(e);
21
+ s(e), l && l(e);
22
22
  };
23
23
  return /* @__PURE__ */ m(p, { children: [
24
- /* @__PURE__ */ s(
24
+ /* @__PURE__ */ t(
25
25
  "div",
26
26
  {
27
- className: k(n, "flex gap-x-1 lg:gap-x-0 bg-white overflow-x-auto scrollbar-hide"),
28
- children: l.map((e) => /* @__PURE__ */ s(
27
+ className: k(
28
+ n,
29
+ "flex gap-x-1 lg:gap-x-0 bg-white overflow-x-auto scrollbar-hide"
30
+ ),
31
+ children: a.map((e) => /* @__PURE__ */ t(
29
32
  b.Provider,
30
33
  {
31
34
  value: {
32
35
  selected: c === e.key,
33
36
  checked: e.checked || !1
34
37
  },
35
- children: /* @__PURE__ */ s(
38
+ children: /* @__PURE__ */ t(
36
39
  u,
37
40
  {
38
- className: d,
41
+ className: e.className || d,
39
42
  icon: e.icon,
40
43
  count: e.count,
41
44
  title: e.title,
@@ -1,21 +1,21 @@
1
- import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
- import n, { useContext as f } from "react";
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import a, { useContext as f } from "react";
3
3
  import { tabsContext as g } from "./context.js";
4
4
  import s from "classnames";
5
- import { Grid as b, theme as h, Typography as c } from "antd";
5
+ import { Grid as b, theme as h, Typography as i } from "antd";
6
6
  import { libTheme as y } from "../../theme.js";
7
7
  const G = ({
8
- className: p,
9
- icon: i,
8
+ className: c,
9
+ icon: d,
10
10
  count: r,
11
11
  title: l,
12
- onClick: a
12
+ onClick: n
13
13
  }) => {
14
- const x = b.useBreakpoint().lg, { selected: e, checked: o } = f(g), u = i && n.cloneElement(i, {
14
+ const x = b.useBreakpoint().lg, { selected: e, checked: o } = f(g), u = d && a.cloneElement(d, {
15
15
  color: o ? h.getDesignToken(y).colorSuccess : "#BDBDBD"
16
- }), d = typeof l == "string" ? n.cloneElement(
16
+ }), m = typeof l == "string" ? a.cloneElement(
17
17
  /* @__PURE__ */ t(
18
- c.Text,
18
+ i.Text,
19
19
  {
20
20
  className: s({
21
21
  "text-dodgerBlue font-semibold": e || o,
@@ -24,20 +24,20 @@ const G = ({
24
24
  children: l
25
25
  }
26
26
  )
27
- ) : n.cloneElement(l, {
27
+ ) : a.cloneElement(l, {
28
28
  className: s(l.props.className, {
29
29
  "text-dodgerBlue font-semibold": e || o,
30
30
  "text-slateGray font-normal": !(e || o)
31
31
  })
32
32
  });
33
- return x ? /* @__PURE__ */ t(() => /* @__PURE__ */ m(
33
+ return x ? /* @__PURE__ */ t(() => /* @__PURE__ */ p(
34
34
  "div",
35
35
  {
36
- className: s(
37
- p,
38
- "relative py-2 pb-7 px-4 flex gap-x-2 hover:cursor-pointer min-w-max items-center"
39
- ),
40
- onClick: a && a,
36
+ className: s([
37
+ "relative py-2 pb-7 px-4 flex gap-x-2 hover:cursor-pointer min-w-max items-center",
38
+ c
39
+ ]),
40
+ onClick: n && n,
41
41
  children: [
42
42
  u,
43
43
  r && /* @__PURE__ */ t(
@@ -51,7 +51,7 @@ const G = ({
51
51
  }
52
52
  ]),
53
53
  children: /* @__PURE__ */ t(
54
- c.Text,
54
+ i.Text,
55
55
  {
56
56
  className: s([
57
57
  "text-steelBlue text-[10px]",
@@ -62,7 +62,7 @@ const G = ({
62
62
  )
63
63
  }
64
64
  ),
65
- d,
65
+ m,
66
66
  /* @__PURE__ */ t(
67
67
  "div",
68
68
  {
@@ -76,12 +76,13 @@ const G = ({
76
76
  )
77
77
  ]
78
78
  }
79
- ), {}) : /* @__PURE__ */ t(() => /* @__PURE__ */ t("div", { className: "flex gap-x-1 min-w-max", onClick: a && a, children: /* @__PURE__ */ m(
79
+ ), {}) : /* @__PURE__ */ t(() => /* @__PURE__ */ t("div", { className: "flex gap-x-1 min-w-max", onClick: n && n, children: /* @__PURE__ */ p(
80
80
  "div",
81
81
  {
82
82
  className: s([
83
83
  "flex items-center justify-center gap-x-[6px] rounded-full px-[22px] py-[10px]",
84
- { "bg-ghostWhite": e }
84
+ { "bg-ghostWhite": e },
85
+ c
85
86
  ]),
86
87
  children: [
87
88
  r && /* @__PURE__ */ t(
@@ -93,7 +94,7 @@ const G = ({
93
94
  { "bg-gainsboro": !e }
94
95
  ]),
95
96
  children: /* @__PURE__ */ t(
96
- c.Text,
97
+ i.Text,
97
98
  {
98
99
  className: s([
99
100
  "text-steelBlue text-[9px] leading-none",
@@ -106,7 +107,7 @@ const G = ({
106
107
  )
107
108
  }
108
109
  ),
109
- d
110
+ m
110
111
  ]
111
112
  }
112
113
  ) }), {});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gasp-components",
3
3
  "private": false,
4
- "version": "1.0.28",
4
+ "version": "1.0.29",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "npm run storybook",