@equal-experts/kuat-react 0.15.0-beta.0 → 0.15.0-beta.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/agent-docs/AGENTS.md +1 -1
- package/agent-docs/README.md +1 -1
- package/agent-docs/components/callout.md +66 -0
- package/agent-docs/components/components.manifest.json +30 -0
- package/agent-docs/components/counter-badge.md +57 -0
- package/agent-docs/components/status-badge.md +68 -0
- package/agent-docs/components/tag-group.md +53 -0
- package/agent-docs/components/tag.md +72 -0
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/component-decision-tree.md +4 -0
- package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/component-registry.md +7 -0
- package/agent-docs/manifest.json +3 -3
- package/agent-docs/rules/LOADING-consumer.md +1 -1
- package/dist/badge-BFeIqSCP.js +25 -0
- package/dist/badge.js +1 -1
- package/dist/callout-DFmAtUwR.js +46 -0
- package/dist/callout.d.ts +3 -0
- package/dist/callout.js +7 -0
- package/dist/components/ui/badge/badge.d.ts +8 -1
- package/dist/components/ui/callout/callout.d.ts +19 -0
- package/dist/components/ui/callout/index.d.ts +2 -0
- package/dist/components/ui/counter-badge/counter-badge.d.ts +15 -0
- package/dist/components/ui/counter-badge/index.d.ts +2 -0
- package/dist/components/ui/status-badge/index.d.ts +2 -0
- package/dist/components/ui/status-badge/status-badge.d.ts +16 -0
- package/dist/components/ui/tag/index.d.ts +2 -0
- package/dist/components/ui/tag/tag.d.ts +25 -0
- package/dist/components/ui/tag-group/index.d.ts +4 -0
- package/dist/components/ui/tag-group/tag-group-context.d.ts +8 -0
- package/dist/components/ui/tag-group/tag-group.d.ts +7 -0
- package/dist/counter-badge-JLm2U18L.js +27 -0
- package/dist/counter-badge.d.ts +3 -0
- package/dist/counter-badge.js +8 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +319 -297
- package/dist/status-badge-Cqb6TNYB.js +43 -0
- package/dist/status-badge.d.ts +3 -0
- package/dist/status-badge.js +9 -0
- package/dist/style.css +1 -1
- package/dist/tag-CkE_Xgvs.js +89 -0
- package/dist/tag-group-context-D_b_R9lC.js +9 -0
- package/dist/tag-group-tBUBPRjX.js +26 -0
- package/dist/tag-group.d.ts +3 -0
- package/dist/tag-group.js +9 -0
- package/dist/tag.d.ts +3 -0
- package/dist/tag.js +9 -0
- package/package.json +22 -1
- package/dist/badge-BZgdEQSD.js +0 -22
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { jsx as u, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import * as N from "react";
|
|
3
|
+
import { Check as h, X as p } from "lucide-react";
|
|
4
|
+
import { c as _ } from "./utils-DLUjLwnh.js";
|
|
5
|
+
import { u as G } from "./tag-group-context-D_b_R9lC.js";
|
|
6
|
+
const A = [
|
|
7
|
+
"base",
|
|
8
|
+
"index-indigo",
|
|
9
|
+
"transform-teal",
|
|
10
|
+
"packet-plum",
|
|
11
|
+
"server-slate",
|
|
12
|
+
"logic-lime",
|
|
13
|
+
"signal-yellow",
|
|
14
|
+
"cursor-coral",
|
|
15
|
+
"patch-peach"
|
|
16
|
+
], k = ["display", "toggle", "dismiss"], O = N.forwardRef(function({
|
|
17
|
+
className: r,
|
|
18
|
+
color: s = "base",
|
|
19
|
+
mode: a = "display",
|
|
20
|
+
selected: e = !1,
|
|
21
|
+
onSelectedChange: l,
|
|
22
|
+
onDismiss: c,
|
|
23
|
+
onClick: g,
|
|
24
|
+
children: n,
|
|
25
|
+
...m
|
|
26
|
+
}, f) {
|
|
27
|
+
const i = G(), o = a !== "display", v = a === "dismiss" || a === "toggle" && e, y = _(
|
|
28
|
+
"tag",
|
|
29
|
+
`tag--${s}`,
|
|
30
|
+
o && "tag--interactive",
|
|
31
|
+
v && "tag--selected",
|
|
32
|
+
r
|
|
33
|
+
);
|
|
34
|
+
return o ? /* @__PURE__ */ x(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
ref: f,
|
|
38
|
+
type: "button",
|
|
39
|
+
"data-slot": "tag",
|
|
40
|
+
"data-color": s,
|
|
41
|
+
"data-mode": a,
|
|
42
|
+
"aria-pressed": a === "toggle" ? e : void 0,
|
|
43
|
+
className: y,
|
|
44
|
+
onClick: (d) => {
|
|
45
|
+
var T;
|
|
46
|
+
if (g == null || g(d), !d.defaultPrevented)
|
|
47
|
+
if (a === "toggle")
|
|
48
|
+
l == null || l(!e);
|
|
49
|
+
else {
|
|
50
|
+
const b = (T = d.currentTarget.textContent) == null ? void 0 : T.trim();
|
|
51
|
+
b && (i == null || i.announce(`${b} removed`)), c == null || c();
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
...m,
|
|
55
|
+
children: [
|
|
56
|
+
n,
|
|
57
|
+
a === "toggle" && e ? /* @__PURE__ */ u(h, { "aria-hidden": "true", className: "tag__icon", "data-slot": "tag-icon" }) : null,
|
|
58
|
+
a === "dismiss" ? /* @__PURE__ */ u(p, { "aria-hidden": "true", className: "tag__icon", "data-slot": "tag-icon" }) : null
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
) : /* @__PURE__ */ u(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
ref: f,
|
|
65
|
+
"data-slot": "tag",
|
|
66
|
+
"data-color": s,
|
|
67
|
+
"data-mode": a,
|
|
68
|
+
className: y,
|
|
69
|
+
...m,
|
|
70
|
+
children: n
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
});
|
|
74
|
+
O.displayName = "Tag";
|
|
75
|
+
function E(t) {
|
|
76
|
+
const r = (t == null ? void 0 : t.color) ?? "base", s = (t == null ? void 0 : t.mode) ?? "display", a = s === "dismiss" || s === "toggle" && !!(t != null && t.selected);
|
|
77
|
+
return _(
|
|
78
|
+
"tag",
|
|
79
|
+
`tag--${r}`,
|
|
80
|
+
s !== "display" && "tag--interactive",
|
|
81
|
+
a && "tag--selected"
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
O as T,
|
|
86
|
+
A as a,
|
|
87
|
+
k as b,
|
|
88
|
+
E as t
|
|
89
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { c as m } from "./utils-DLUjLwnh.js";
|
|
4
|
+
import { T as d } from "./tag-group-context-D_b_R9lC.js";
|
|
5
|
+
const f = a.forwardRef(function({ className: r, label: s, children: t, ...n }, l) {
|
|
6
|
+
const [i, p] = a.useState(""), o = a.useCallback((u) => p(u), []), c = a.useMemo(() => ({ announce: o }), [o]);
|
|
7
|
+
return /* @__PURE__ */ g(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
ref: l,
|
|
11
|
+
role: "group",
|
|
12
|
+
"aria-label": s,
|
|
13
|
+
"data-slot": "tag-group",
|
|
14
|
+
className: m("tag-group", r),
|
|
15
|
+
...n,
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ e(d.Provider, { value: c, children: t }),
|
|
18
|
+
/* @__PURE__ */ e("span", { "aria-live": "polite", className: "sr-only", "data-slot": "tag-group-live-region", children: i })
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
f.displayName = "TagGroup";
|
|
24
|
+
export {
|
|
25
|
+
f as T
|
|
26
|
+
};
|
package/dist/tag.d.ts
ADDED
package/dist/tag.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equal-experts/kuat-react",
|
|
3
|
-
"version": "0.15.0-beta.
|
|
3
|
+
"version": "0.15.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -26,10 +26,30 @@
|
|
|
26
26
|
"import": "./dist/badge.js",
|
|
27
27
|
"types": "./dist/badge.d.ts"
|
|
28
28
|
},
|
|
29
|
+
"./status-badge": {
|
|
30
|
+
"import": "./dist/status-badge.js",
|
|
31
|
+
"types": "./dist/status-badge.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./tag": {
|
|
34
|
+
"import": "./dist/tag.js",
|
|
35
|
+
"types": "./dist/tag.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./tag-group": {
|
|
38
|
+
"import": "./dist/tag-group.js",
|
|
39
|
+
"types": "./dist/tag-group.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./counter-badge": {
|
|
42
|
+
"import": "./dist/counter-badge.js",
|
|
43
|
+
"types": "./dist/counter-badge.d.ts"
|
|
44
|
+
},
|
|
29
45
|
"./button-group": {
|
|
30
46
|
"import": "./dist/button-group.js",
|
|
31
47
|
"types": "./dist/button-group.d.ts"
|
|
32
48
|
},
|
|
49
|
+
"./callout": {
|
|
50
|
+
"import": "./dist/callout.js",
|
|
51
|
+
"types": "./dist/callout.d.ts"
|
|
52
|
+
},
|
|
33
53
|
"./kuat-radial-progress": {
|
|
34
54
|
"import": "./dist/kuat-radial-progress.js",
|
|
35
55
|
"types": "./dist/kuat-radial-progress.d.ts"
|
|
@@ -128,6 +148,7 @@
|
|
|
128
148
|
},
|
|
129
149
|
"devDependencies": {
|
|
130
150
|
"@equal-experts/kuat-core": "workspace:*",
|
|
151
|
+
"@figma/code-connect": "^1.4.9",
|
|
131
152
|
"@tailwindcss/vite": "^4.0.0",
|
|
132
153
|
"@testing-library/jest-dom": "^6.6.0",
|
|
133
154
|
"@testing-library/react": "^16.0.0",
|
package/dist/badge-BZgdEQSD.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { c as r } from "./utils-DLUjLwnh.js";
|
|
3
|
-
const c = ["default", "secondary", "destructive", "outline", "ghost"], f = ["default", "round"];
|
|
4
|
-
function g({ className: a, variant: e = "default", roundness: d = "default", ...u }) {
|
|
5
|
-
return /* @__PURE__ */ t(
|
|
6
|
-
"div",
|
|
7
|
-
{
|
|
8
|
-
className: r("badge", `badge--${e}`, `badge--roundness-${d}`, a),
|
|
9
|
-
...u
|
|
10
|
-
}
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
function b(a) {
|
|
14
|
-
const e = (a == null ? void 0 : a.variant) ?? "default", d = (a == null ? void 0 : a.roundness) ?? "default";
|
|
15
|
-
return r("badge", `badge--${e}`, `badge--roundness-${d}`);
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
g as B,
|
|
19
|
-
c as a,
|
|
20
|
-
b,
|
|
21
|
-
f as c
|
|
22
|
-
};
|