@versini/ui-pill 4.0.1 → 4.0.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.
- package/dist/components/Pill/Pill.js +44 -3
- package/dist/index.js +6 -48
- package/package.json +4 -4
|
@@ -1,5 +1,46 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as l, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import e from "clsx";
|
|
3
|
+
const i = "av-pill", a = ({ variant: r }) => e("rounded-xs border", {
|
|
4
|
+
"border-border-information": r === "information",
|
|
5
|
+
"border-border-warning": r === "warning",
|
|
6
|
+
"border-border-success": r === "success",
|
|
7
|
+
"border-border-error": r === "error"
|
|
8
|
+
}), u = ({ variant: r }) => e("not-prose", {
|
|
9
|
+
"text-copy-information": r === "information",
|
|
10
|
+
"text-copy-warning": r === "warning",
|
|
11
|
+
"text-copy-success": r === "success",
|
|
12
|
+
"text-copy-error": r === "error"
|
|
13
|
+
}), d = ({ variant: r }) => e({
|
|
14
|
+
"bg-surface-information": r === "information",
|
|
15
|
+
"bg-surface-warning": r === "warning",
|
|
16
|
+
"bg-surface-success": r === "success",
|
|
17
|
+
"bg-surface-error": r === "error"
|
|
18
|
+
}), g = (r) => {
|
|
19
|
+
const { className: o, variant: s } = r;
|
|
20
|
+
return e(
|
|
21
|
+
i,
|
|
22
|
+
"px-2 py-0.5 text-xs",
|
|
23
|
+
a({ variant: s }),
|
|
24
|
+
u({ variant: s }),
|
|
25
|
+
d(r),
|
|
26
|
+
o
|
|
27
|
+
);
|
|
28
|
+
}, f = ({
|
|
29
|
+
label: r,
|
|
30
|
+
className: o,
|
|
31
|
+
variant: s = "information",
|
|
32
|
+
description: n
|
|
33
|
+
}) => {
|
|
34
|
+
const t = g({
|
|
35
|
+
className: o,
|
|
36
|
+
variant: s
|
|
37
|
+
});
|
|
38
|
+
return /* @__PURE__ */ l("div", { role: "text", className: t, children: [
|
|
39
|
+
n && /* @__PURE__ */ c("span", { className: "sr-only", children: n }),
|
|
40
|
+
/* @__PURE__ */ c("span", { children: r })
|
|
41
|
+
] });
|
|
42
|
+
};
|
|
3
43
|
export {
|
|
4
|
-
|
|
44
|
+
i as PILL_CLASSNAME,
|
|
45
|
+
f as Pill
|
|
5
46
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,60 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import s from "clsx";
|
|
1
|
+
import { PILL_CLASSNAME as o, Pill as I } from "./components/Pill/Pill.js";
|
|
3
2
|
/*!
|
|
4
|
-
@versini/ui-pill v4.0.
|
|
3
|
+
@versini/ui-pill v4.0.2
|
|
5
4
|
© 2025 gizmette.com
|
|
6
5
|
*/
|
|
7
6
|
try {
|
|
8
7
|
window.__VERSINI_UI_PILL__ || (window.__VERSINI_UI_PILL__ = {
|
|
9
|
-
version: "4.0.
|
|
10
|
-
buildTime: "04/
|
|
8
|
+
version: "4.0.2",
|
|
9
|
+
buildTime: "04/12/2025 09:18 AM EDT",
|
|
11
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
12
11
|
license: "MIT"
|
|
13
12
|
});
|
|
14
13
|
} catch {
|
|
15
14
|
}
|
|
16
|
-
const l = "av-pill", u = ({ variant: r }) => s("rounded-xs border", {
|
|
17
|
-
"border-border-information": r === "information",
|
|
18
|
-
"border-border-warning": r === "warning",
|
|
19
|
-
"border-border-success": r === "success",
|
|
20
|
-
"border-border-error": r === "error"
|
|
21
|
-
}), a = ({ variant: r }) => s("not-prose", {
|
|
22
|
-
"text-copy-information": r === "information",
|
|
23
|
-
"text-copy-warning": r === "warning",
|
|
24
|
-
"text-copy-success": r === "success",
|
|
25
|
-
"text-copy-error": r === "error"
|
|
26
|
-
}), d = ({ variant: r }) => s({
|
|
27
|
-
"bg-surface-information": r === "information",
|
|
28
|
-
"bg-surface-warning": r === "warning",
|
|
29
|
-
"bg-surface-success": r === "success",
|
|
30
|
-
"bg-surface-error": r === "error"
|
|
31
|
-
}), m = (r) => {
|
|
32
|
-
const { className: o, variant: e } = r;
|
|
33
|
-
return s(
|
|
34
|
-
l,
|
|
35
|
-
"px-2 py-0.5 text-xs",
|
|
36
|
-
u({ variant: e }),
|
|
37
|
-
a({ variant: e }),
|
|
38
|
-
d(r),
|
|
39
|
-
o
|
|
40
|
-
);
|
|
41
|
-
}, b = ({
|
|
42
|
-
label: r,
|
|
43
|
-
className: o,
|
|
44
|
-
variant: e = "information",
|
|
45
|
-
description: n
|
|
46
|
-
}) => {
|
|
47
|
-
const t = m({
|
|
48
|
-
label: r,
|
|
49
|
-
className: o,
|
|
50
|
-
variant: e
|
|
51
|
-
});
|
|
52
|
-
return /* @__PURE__ */ i("div", { role: "text", className: t, children: [
|
|
53
|
-
n && /* @__PURE__ */ c("span", { className: "sr-only", children: n }),
|
|
54
|
-
/* @__PURE__ */ c("span", { children: r })
|
|
55
|
-
] });
|
|
56
|
-
};
|
|
57
15
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
16
|
+
o as PILL_CLASSNAME,
|
|
17
|
+
I as Pill
|
|
60
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-pill",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"react-dom": "^18.3.1 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@versini/ui-types": "5.0.
|
|
42
|
+
"@versini/ui-types": "5.0.2"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@tailwindcss/typography": "0.5.16",
|
|
46
46
|
"clsx": "2.1.1",
|
|
47
|
-
"tailwindcss": "4.1.
|
|
47
|
+
"tailwindcss": "4.1.3"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": [
|
|
50
50
|
"**/*.css"
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "1bc09c4f0904bd8c01a22b1a32299fdd7598ae32"
|
|
53
53
|
}
|