@bbki.ng/components 5.1.3 → 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.
- package/dist/button/Button.d.ts +2 -1
- package/dist/button/Button.mjs +12 -11
- package/package.json +2 -2
package/dist/button/Button.d.ts
CHANGED
package/dist/button/Button.mjs
CHANGED
|
@@ -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
|
|
4
|
-
var b = /* @__PURE__ */ ((t) => (t.DANGER = "danger", t.PRIMARY = "primary", t.NORMAL = "normal", t.DISABLED = "disabled", t))(b || {});
|
|
5
|
-
function
|
|
6
|
-
const
|
|
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:
|
|
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__ */
|
|
25
|
-
className: `${
|
|
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
|
-
|
|
32
|
+
p.displayName = "Button";
|
|
32
33
|
export {
|
|
33
|
-
|
|
34
|
+
p as Button,
|
|
34
35
|
b as ButtonType
|
|
35
36
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bbki.ng/components",
|
|
3
|
-
"version": "5.
|
|
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
|
|
38
|
+
"@bbki.ng/stylebase": "3.1.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/core": "^7.18.9",
|