@versini/ui-card 4.0.11 → 4.0.12
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/components/Card/Card.js +31 -36
- package/dist/index.js +3 -3
- package/package.json +4 -4
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useUniqueId as v } from "@versini/ui-hooks";
|
|
3
3
|
import u from "clsx";
|
|
4
|
-
const f = "av-card"
|
|
5
|
-
function A(d) {
|
|
6
|
-
const r = v();
|
|
7
|
-
return `${d}${r}`;
|
|
8
|
-
}
|
|
9
|
-
const C = ({
|
|
4
|
+
const f = "av-card", A = ({
|
|
10
5
|
className: d,
|
|
11
|
-
headerClassName:
|
|
6
|
+
headerClassName: e,
|
|
12
7
|
bodyClassName: c,
|
|
13
8
|
footerClassName: t,
|
|
14
|
-
mode:
|
|
9
|
+
mode: r,
|
|
15
10
|
compact: l,
|
|
16
11
|
noBorder: i
|
|
17
12
|
}) => {
|
|
@@ -23,19 +18,19 @@ const C = ({
|
|
|
23
18
|
"border-2": !i,
|
|
24
19
|
"p-4": !l,
|
|
25
20
|
"p-1 sm:p-2": l,
|
|
26
|
-
"border-border-accent bg-surface-darker text-copy-light":
|
|
27
|
-
"border-border-accent bg-surface-dark text-copy-light":
|
|
28
|
-
"border-border-dark bg-surface-lighter text-copy-dark":
|
|
29
|
-
"border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light":
|
|
30
|
-
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark":
|
|
21
|
+
"border-border-accent bg-surface-darker text-copy-light": r === "darker",
|
|
22
|
+
"border-border-accent bg-surface-dark text-copy-light": r === "dark",
|
|
23
|
+
"border-border-dark bg-surface-lighter text-copy-dark": r === "light",
|
|
24
|
+
"border-border-dark bg-surface-lighter text-copy-dark dark:border-border-accent dark:bg-surface-dark dark:text-copy-light": r === "system",
|
|
25
|
+
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": r === "alt-system"
|
|
31
26
|
},
|
|
32
27
|
d
|
|
33
|
-
), k =
|
|
34
|
-
"text-copy-light border-border-accent":
|
|
35
|
-
"border-border-accent":
|
|
36
|
-
"border-border-medium":
|
|
37
|
-
"border-border-medium dark:border-border-accent":
|
|
38
|
-
"border-border-accent dark:border-border-medium":
|
|
28
|
+
), k = e || u(`${f}__header mt-0 border-b-2`, {
|
|
29
|
+
"text-copy-light border-border-accent": r === "darker",
|
|
30
|
+
"border-border-accent": r === "dark",
|
|
31
|
+
"border-border-medium": r === "light",
|
|
32
|
+
"border-border-medium dark:border-border-accent": r === "system",
|
|
33
|
+
"border-border-accent dark:border-border-medium": r === "alt-system",
|
|
39
34
|
"mb-4": !l,
|
|
40
35
|
"mb-2": l
|
|
41
36
|
}), g = u(c), p = t || u(`${f}__footer pt-2`);
|
|
@@ -46,20 +41,20 @@ const C = ({
|
|
|
46
41
|
footer: p
|
|
47
42
|
};
|
|
48
43
|
};
|
|
49
|
-
function
|
|
44
|
+
function C({
|
|
50
45
|
id: d,
|
|
51
|
-
content:
|
|
46
|
+
content: e,
|
|
52
47
|
userAriaLabelledby: c,
|
|
53
48
|
className: t
|
|
54
49
|
}) {
|
|
55
|
-
return typeof
|
|
50
|
+
return typeof e == "string" ? /* @__PURE__ */ a("h2", { id: d, className: t, children: e }) : c ? /* @__PURE__ */ a("div", { className: t, children: e }) : e ? /* @__PURE__ */ a("div", { className: t, id: d, children: e }) : null;
|
|
56
51
|
}
|
|
57
52
|
const S = ({
|
|
58
53
|
header: d,
|
|
59
|
-
headerClassName:
|
|
54
|
+
headerClassName: e,
|
|
60
55
|
footer: c,
|
|
61
56
|
footerClassName: t,
|
|
62
|
-
children:
|
|
57
|
+
children: r,
|
|
63
58
|
className: l,
|
|
64
59
|
bodyClassName: i,
|
|
65
60
|
"aria-labelledby": s,
|
|
@@ -68,36 +63,36 @@ const S = ({
|
|
|
68
63
|
noBorder: p = !1,
|
|
69
64
|
...x
|
|
70
65
|
}) => {
|
|
71
|
-
let o = null,
|
|
72
|
-
const h = typeof d == "string", y =
|
|
66
|
+
let o = null, b = null;
|
|
67
|
+
const h = typeof d == "string", y = v(f), n = A({
|
|
73
68
|
className: l,
|
|
74
|
-
headerClassName:
|
|
69
|
+
headerClassName: e,
|
|
75
70
|
bodyClassName: i,
|
|
76
71
|
footerClassName: t,
|
|
77
72
|
mode: k,
|
|
78
73
|
compact: g,
|
|
79
74
|
noBorder: p
|
|
80
75
|
});
|
|
81
|
-
return h ? (o = y,
|
|
76
|
+
return h ? (o = y, b = o) : !h && d && s ? (o = null, b = s) : !h && d && !s ? (o = y, b = o) : (o = null, b = s || null), /* @__PURE__ */ a("div", { className: n.wrapper, children: /* @__PURE__ */ m(
|
|
82
77
|
"section",
|
|
83
78
|
{
|
|
84
|
-
...
|
|
85
|
-
"aria-labelledby":
|
|
79
|
+
...b && {
|
|
80
|
+
"aria-labelledby": b
|
|
86
81
|
},
|
|
87
|
-
className:
|
|
82
|
+
className: n.body,
|
|
88
83
|
...x,
|
|
89
84
|
children: [
|
|
90
85
|
/* @__PURE__ */ a(
|
|
91
|
-
|
|
86
|
+
C,
|
|
92
87
|
{
|
|
93
88
|
...o && { id: o },
|
|
94
89
|
content: d,
|
|
95
|
-
className:
|
|
90
|
+
className: n.header,
|
|
96
91
|
userAriaLabelledby: s
|
|
97
92
|
}
|
|
98
93
|
),
|
|
99
|
-
/* @__PURE__ */ a("div", { children:
|
|
100
|
-
c ? /* @__PURE__ */ a("div", { className:
|
|
94
|
+
/* @__PURE__ */ a("div", { children: r }),
|
|
95
|
+
c ? /* @__PURE__ */ a("div", { className: n.footer, children: c }) : null
|
|
101
96
|
]
|
|
102
97
|
}
|
|
103
98
|
) });
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CARD_CLASSNAME as o, Card as r } from "./components/Card/Card.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-card v4.0.
|
|
3
|
+
@versini/ui-card v4.0.12
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_CARD__ || (window.__VERSINI_UI_CARD__ = {
|
|
8
|
-
version: "4.0.
|
|
9
|
-
buildTime: "
|
|
8
|
+
version: "4.0.12",
|
|
9
|
+
buildTime: "09/01/2025 02:19 PM EDT",
|
|
10
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
11
11
|
license: "MIT"
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-card",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@testing-library/jest-dom": "6.8.0",
|
|
45
|
-
"@versini/ui-types": "
|
|
45
|
+
"@versini/ui-types": "5.0.7"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@tailwindcss/typography": "0.5.16",
|
|
49
|
-
"@versini/ui-hooks": "
|
|
49
|
+
"@versini/ui-hooks": "4.7.8",
|
|
50
50
|
"clsx": "2.1.1",
|
|
51
51
|
"tailwindcss": "4.1.12"
|
|
52
52
|
},
|
|
53
53
|
"sideEffects": [
|
|
54
54
|
"**/*.css"
|
|
55
55
|
],
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "c577149643ec36cad454587166e62410a77aed38"
|
|
57
57
|
}
|