@bbki.ng/components 5.1.2 → 5.2.0

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.
@@ -3,7 +3,8 @@ export declare enum ButtonType {
3
3
  DANGER = "danger",
4
4
  PRIMARY = "primary",
5
5
  NORMAL = "normal",
6
- DISABLED = "disabled"
6
+ DISABLED = "disabled",
7
+ GHOST = "ghost"
7
8
  }
8
9
  export interface ButtonProps {
9
10
  className?: string;
@@ -1,19 +1,20 @@
1
1
  import m from "react";
2
2
  import u from "../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.mjs";
3
- import { jsx as p } from "../_virtual/jsx-runtime.mjs";
4
- var b = /* @__PURE__ */ ((t) => (t.DANGER = "danger", t.PRIMARY = "primary", t.NORMAL = "normal", t.DISABLED = "disabled", t))(b || {});
5
- function h(t) {
6
- const o = {
3
+ import { jsx as h } from "../_virtual/jsx-runtime.mjs";
4
+ var b = /* @__PURE__ */ ((t) => (t.DANGER = "danger", t.PRIMARY = "primary", t.NORMAL = "normal", t.DISABLED = "disabled", t.GHOST = "ghost", t))(b || {});
5
+ function p(t) {
6
+ const s = {
7
7
  danger: "text-red-500",
8
8
  primary: "text-blue-600",
9
9
  disabled: "text-gray-400 cursor-not-allowed",
10
- normal: "text-black"
10
+ normal: "text-black",
11
+ ghost: "text-black bg-transparent"
11
12
  }, [a, r] = m.useState(!1), {
12
13
  type: e = "normal",
13
- className: s = "",
14
+ className: o = "",
14
15
  onClick: n,
15
16
  btnType: l
16
- } = t, i = e === "disabled" ? "" : u("transition-all duration-200 ease-in-out shadow-button active:shadow-empty", {
17
+ } = t, i = e === "disabled" || e === "ghost" ? "" : u("transition-all duration-200 ease-in-out shadow-button active:shadow-empty", {
17
18
  "shadow-empty": a,
18
19
  "hover:shadow-button-hover": !a
19
20
  }), d = (c) => {
@@ -21,15 +22,15 @@ function h(t) {
21
22
  r(!1), n(c);
22
23
  }, 280));
23
24
  };
24
- return /* @__PURE__ */ p("button", {
25
- className: `${o[e]} ${s} ${i} py-8 px-16 transition-all duration-200 ease-in-out`,
25
+ return /* @__PURE__ */ h("button", {
26
+ className: `${s[e]} ${o} ${i} py-8 px-16 transition-all duration-200 ease-in-out`,
26
27
  onClick: d,
27
28
  type: l,
28
29
  children: t.children
29
30
  });
30
31
  }
31
- h.displayName = "Button";
32
+ p.displayName = "Button";
32
33
  export {
33
- h as Button,
34
+ p as Button,
34
35
  b as ButtonType
35
36
  };
@@ -2,15 +2,15 @@ import e from "../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/in
2
2
  import { jsxs as c, jsx as d } from "../_virtual/jsx-runtime.mjs";
3
3
  const t = (s) => {
4
4
  const {
5
- leftRenderer: o,
5
+ leftRenderer: i,
6
6
  middleRenderer: l,
7
- rightRenderer: i
8
- } = s, r = e("max-h-full overflow-auto xl:block! py-128 mx-auto max-w-[680px]");
7
+ rightRenderer: o
8
+ } = s, r = e("max-h-full overflow-auto xl:block! py-128 max-w-[580px]");
9
9
  return /* @__PURE__ */ c("div", {
10
10
  className: "grid grid-cols-1 xl:grid-cols-3 gap-4 h-full w-full",
11
11
  children: [/* @__PURE__ */ d("div", {
12
12
  className: e("hidden", r),
13
- children: o && o()
13
+ children: i && i()
14
14
  }), /* @__PURE__ */ d("div", {
15
15
  className: e(r, "no-scrollbar p-16", "relative", {
16
16
  hidden: !l
@@ -18,7 +18,7 @@ const t = (s) => {
18
18
  children: l && l()
19
19
  }), /* @__PURE__ */ d("div", {
20
20
  className: e("hidden", r),
21
- children: i && i()
21
+ children: o && o()
22
22
  })]
23
23
  });
24
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/components",
3
- "version": "5.1.2",
3
+ "version": "5.2.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -35,7 +35,7 @@
35
35
  "classnames": "2.3.1",
36
36
  "phenomenon": "^1.6.0",
37
37
  "react-hook-form": "7.54.2",
38
- "@bbki.ng/stylebase": "3.0.1"
38
+ "@bbki.ng/stylebase": "3.1.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/core": "^7.18.9",