@bbki.ng/components 5.0.3 → 5.1.2

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,31 +1,34 @@
1
- import s from "../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.mjs";
2
- import { Link as y } from "react-router-dom";
1
+ import n from "../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.mjs";
2
+ import { Link as p } from "react-router-dom";
3
3
  import { BlinkDot as l } from "../blink-dot/BlinkDot.mjs";
4
- import { jsx as t, jsxs as c, Fragment as d } from "../_virtual/jsx-runtime.mjs";
4
+ import { jsx as r, jsxs as c, Fragment as i } from "../_virtual/jsx-runtime.mjs";
5
5
  var x = /* @__PURE__ */ ((e) => (e.BLUE = "blue", e.RED = "red", e.GRAY = "gray", e))(x || {});
6
6
  const h = {
7
7
  blue: "text-blue-600",
8
- red: "text-red-500",
8
+ red: "text-yy-pink-150",
9
9
  gray: "text-gray-400"
10
- }, p = {
10
+ }, N = {
11
11
  blue: "md:not-focus:hover:bg-blue-100 md:not-focus:hover:text-blue-600",
12
- red: "md:not-focus:hover:bg-red-100 md:not-focus:hover:text-red-500",
12
+ red: "md:not-focus:hover:bg-yy-pink-50 md:not-focus:hover:text-yy-pink-150",
13
13
  gray: "md:not-focus:hover:bg-gray-100 md:not-focus:hover:text-gray-400"
14
- }, N = {
14
+ }, k = {
15
15
  blue: "focus:bg-blue-100",
16
- red: "focus:bg-red-100",
16
+ red: "focus:bg-yy-pink-50",
17
17
  gray: "focus:bg-gray-100"
18
18
  }, R = (e) => {
19
19
  const {
20
- color: o = "blue",
21
- external: u,
22
- className: i,
23
- children: r,
24
- status: n,
25
- readonly: m,
26
- ...f
27
- } = e, a = s(
28
- i,
20
+ color: u = "blue",
21
+ external: d,
22
+ className: f,
23
+ children: t,
24
+ status: s,
25
+ readonly: g,
26
+ ...m
27
+ } = e;
28
+ let o = u;
29
+ typeof t == "string" && t.includes("小乌鸦") && (o = "red");
30
+ const a = n(
31
+ f,
29
32
  "rounded-sm",
30
33
  "no-underline!",
31
34
  "inline-block",
@@ -33,11 +36,11 @@ const h = {
33
36
  "active:scale-[0.97]",
34
37
  // "focus:text-white",
35
38
  h[o],
36
- p[o],
37
- N[o]
39
+ N[o],
40
+ k[o]
38
41
  );
39
- if (u)
40
- return /* @__PURE__ */ t("a", {
42
+ if (d)
43
+ return /* @__PURE__ */ r("a", {
41
44
  href: e.to,
42
45
  className: a,
43
46
  target: "_blank",
@@ -45,35 +48,35 @@ const h = {
45
48
  style: {
46
49
  padding: 4
47
50
  },
48
- children: r
51
+ children: t
49
52
  });
50
- if (m) {
51
- const g = !/^[a-zA-Z~]+$/.test(r), b = s({
52
- "relative top-[2px]": g
53
+ if (g) {
54
+ const y = !/^[a-zA-Z~]+$/.test(t), b = n({
55
+ "relative top-[2px]": y
53
56
  });
54
- return /* @__PURE__ */ c(d, {
55
- children: [/* @__PURE__ */ t("span", {
56
- className: s("text-gray-400", b),
57
+ return /* @__PURE__ */ c(i, {
58
+ children: [/* @__PURE__ */ r("span", {
59
+ className: n("text-gray-400", b),
57
60
  style: {
58
61
  padding: 4
59
62
  },
60
- children: r
61
- }), /* @__PURE__ */ t(l, {
62
- status: n
63
+ children: t
64
+ }), /* @__PURE__ */ r(l, {
65
+ status: s
63
66
  })]
64
67
  });
65
68
  }
66
- return /* @__PURE__ */ c(d, {
67
- children: [/* @__PURE__ */ t(y, {
68
- ...f,
69
+ return /* @__PURE__ */ c(i, {
70
+ children: [/* @__PURE__ */ r(p, {
71
+ ...m,
69
72
  className: a,
70
73
  style: {
71
74
  padding: 4
72
75
  },
73
- children: r
74
- }), /* @__PURE__ */ t(l, {
76
+ children: t
77
+ }), /* @__PURE__ */ r(l, {
75
78
  className: "-top-3 left-1",
76
- status: n
79
+ status: s
77
80
  })]
78
81
  });
79
82
  };
@@ -7,6 +7,7 @@ export interface listProps {
7
7
  itemRenderer: (itemProps: any, index: number) => ReactElement;
8
8
  horizontal?: boolean;
9
9
  footer?: ReactNode;
10
+ spaceBetween?: boolean;
10
11
  }
11
12
  export declare const List: FunctionComponent<listProps>;
12
13
  export interface TitledListProps extends listProps {
@@ -1,76 +1,78 @@
1
1
  import a from "../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.mjs";
2
- import { Link as f } from "../link/Link.mjs";
3
- import { Article as h } from "../article/Article.mjs";
4
- import { jsxs as k, jsx as e } from "../_virtual/jsx-runtime.mjs";
5
- const p = (i) => {
2
+ import { Link as h } from "../link/Link.mjs";
3
+ import { Article as u } from "../article/Article.mjs";
4
+ import { jsxs as k, jsx as t } from "../_virtual/jsx-runtime.mjs";
5
+ const p = (n) => {
6
6
  const {
7
- items: t,
8
- itemRenderer: n,
7
+ items: r,
8
+ itemRenderer: c,
9
9
  className: s,
10
- horizontal: r,
10
+ horizontal: e,
11
11
  compact: d,
12
- footer: o
13
- } = i, c = d ? "" : r ? "mr-3" : "mb-16";
12
+ footer: i,
13
+ spaceBetween: l
14
+ } = n, m = d ? "" : e ? "mr-3" : "mb-16";
14
15
  return /* @__PURE__ */ k("ul", {
15
16
  className: a(s, "list-style-none", {
16
- flex: r,
17
- "items-center": r
17
+ flex: e,
18
+ "items-center": e,
19
+ "flex flex-col justify-between": !e && i && l
18
20
  }),
19
- children: [t.map((l, m) => /* @__PURE__ */ e("li", {
20
- className: a(c, "shrink-0", {
21
- "my-0!": r
21
+ children: [r.map((o, f) => /* @__PURE__ */ t("li", {
22
+ className: a(m, "shrink-0", {
23
+ "my-0!": e
22
24
  }),
23
- children: n(l, m)
24
- }, l.id || m)), o && /* @__PURE__ */ e("li", {
25
- className: a(c, "shrink-0", {
26
- "my-0!": r
25
+ children: c(o, f)
26
+ }, o.id || f)), i && /* @__PURE__ */ t("li", {
27
+ className: a("shrink-0", {
28
+ "my-0!": e
27
29
  }),
28
- children: o
30
+ children: i
29
31
  }, "footer")]
30
32
  });
31
- }, u = (i) => {
33
+ }, L = (n) => {
32
34
  const {
33
- title: t,
34
- description: n,
35
+ title: r,
36
+ description: c,
35
37
  ...s
36
- } = i;
37
- return t ? /* @__PURE__ */ e(h, {
38
- title: t,
39
- description: n,
38
+ } = n;
39
+ return r ? /* @__PURE__ */ t(u, {
40
+ title: r,
41
+ description: c,
40
42
  className: "w-fit",
41
- children: /* @__PURE__ */ e(p, {
43
+ children: /* @__PURE__ */ t(p, {
42
44
  ...s
43
45
  })
44
- }) : /* @__PURE__ */ e(p, {
46
+ }) : /* @__PURE__ */ t(p, {
45
47
  ...s
46
48
  });
47
- }, j = (i) => {
49
+ }, w = (n) => {
48
50
  const {
49
- title: t,
50
- description: n,
51
+ title: r,
52
+ description: c,
51
53
  links: s,
52
- ...r
53
- } = i;
54
- return /* @__PURE__ */ e(u, {
55
- title: t,
56
- description: n,
54
+ ...e
55
+ } = n;
56
+ return /* @__PURE__ */ t(L, {
57
+ title: r,
58
+ description: c,
57
59
  items: s,
58
60
  itemRenderer: ({
59
- name: o,
60
- to: c,
61
- external: l,
62
- ...m
63
- }) => /* @__PURE__ */ e(f, {
64
- to: c,
65
- external: l,
66
- ...m,
67
- children: o
68
- }, o),
69
- ...r
61
+ name: i,
62
+ to: l,
63
+ external: m,
64
+ ...o
65
+ }) => /* @__PURE__ */ t(h, {
66
+ to: l,
67
+ external: m,
68
+ ...o,
69
+ children: i
70
+ }, i),
71
+ ...e
70
72
  });
71
73
  };
72
74
  export {
73
- j as LinkList,
75
+ w as LinkList,
74
76
  p as List,
75
- u as TitledList
77
+ L as TitledList
76
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbki.ng/components",
3
- "version": "5.0.3",
3
+ "version": "5.1.2",
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.0"
38
+ "@bbki.ng/stylebase": "3.0.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/core": "^7.18.9",