@equal-experts/kuat-react 0.15.0-beta.1 → 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.
Files changed (41) hide show
  1. package/agent-docs/AGENTS.md +1 -1
  2. package/agent-docs/README.md +1 -1
  3. package/agent-docs/components/components.manifest.json +24 -0
  4. package/agent-docs/components/counter-badge.md +57 -0
  5. package/agent-docs/components/status-badge.md +68 -0
  6. package/agent-docs/components/tag-group.md +53 -0
  7. package/agent-docs/components/tag.md +72 -0
  8. package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/component-decision-tree.md +4 -0
  9. package/agent-docs/external/kuat-agent-rules/reference/media-types/web-product/component-registry.md +7 -0
  10. package/agent-docs/manifest.json +3 -3
  11. package/agent-docs/rules/LOADING-consumer.md +1 -1
  12. package/dist/badge-BFeIqSCP.js +25 -0
  13. package/dist/badge.js +1 -1
  14. package/dist/components/ui/badge/badge.d.ts +8 -1
  15. package/dist/components/ui/counter-badge/counter-badge.d.ts +15 -0
  16. package/dist/components/ui/counter-badge/index.d.ts +2 -0
  17. package/dist/components/ui/status-badge/index.d.ts +2 -0
  18. package/dist/components/ui/status-badge/status-badge.d.ts +16 -0
  19. package/dist/components/ui/tag/index.d.ts +2 -0
  20. package/dist/components/ui/tag/tag.d.ts +25 -0
  21. package/dist/components/ui/tag-group/index.d.ts +4 -0
  22. package/dist/components/ui/tag-group/tag-group-context.d.ts +8 -0
  23. package/dist/components/ui/tag-group/tag-group.d.ts +7 -0
  24. package/dist/counter-badge-JLm2U18L.js +27 -0
  25. package/dist/counter-badge.d.ts +3 -0
  26. package/dist/counter-badge.js +8 -0
  27. package/dist/index.d.ts +8 -0
  28. package/dist/index.js +219 -200
  29. package/dist/status-badge-Cqb6TNYB.js +43 -0
  30. package/dist/status-badge.d.ts +3 -0
  31. package/dist/status-badge.js +9 -0
  32. package/dist/style.css +1 -1
  33. package/dist/tag-CkE_Xgvs.js +89 -0
  34. package/dist/tag-group-context-D_b_R9lC.js +9 -0
  35. package/dist/tag-group-tBUBPRjX.js +26 -0
  36. package/dist/tag-group.d.ts +3 -0
  37. package/dist/tag-group.js +9 -0
  38. package/dist/tag.d.ts +3 -0
  39. package/dist/tag.js +9 -0
  40. package/package.json +18 -1
  41. 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,9 @@
1
+ import * as t from "react";
2
+ const e = t.createContext(null);
3
+ function o() {
4
+ return t.useContext(e);
5
+ }
6
+ export {
7
+ e as T,
8
+ o as u
9
+ };
@@ -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
+ };
@@ -0,0 +1,3 @@
1
+ export { cn } from './lib/utils';
2
+ export { TagGroup, TagGroupContext, useTagGroup } from './components/ui/tag-group';
3
+ export type { TagGroupProps, TagGroupContextValue } from './components/ui/tag-group';
@@ -0,0 +1,9 @@
1
+ import { c as a } from "./utils-DLUjLwnh.js";
2
+ import { T as e } from "./tag-group-tBUBPRjX.js";
3
+ import { T as t, u } from "./tag-group-context-D_b_R9lC.js";
4
+ export {
5
+ e as TagGroup,
6
+ t as TagGroupContext,
7
+ a as cn,
8
+ u as useTagGroup
9
+ };
package/dist/tag.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { cn } from './lib/utils';
2
+ export { Tag, tagVariants, TAG_COLORS, TAG_MODES } from './components/ui/tag';
3
+ export type { TagProps, TagColor, TagMode } from './components/ui/tag';
package/dist/tag.js ADDED
@@ -0,0 +1,9 @@
1
+ import { c as r } from "./utils-DLUjLwnh.js";
2
+ import { a as o, b as T, T as O, t as c } from "./tag-CkE_Xgvs.js";
3
+ export {
4
+ o as TAG_COLORS,
5
+ T as TAG_MODES,
6
+ O as Tag,
7
+ r as cn,
8
+ c as tagVariants
9
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equal-experts/kuat-react",
3
- "version": "0.15.0-beta.1",
3
+ "version": "0.15.0-beta.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -26,6 +26,22 @@
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"
@@ -132,6 +148,7 @@
132
148
  },
133
149
  "devDependencies": {
134
150
  "@equal-experts/kuat-core": "workspace:*",
151
+ "@figma/code-connect": "^1.4.9",
135
152
  "@tailwindcss/vite": "^4.0.0",
136
153
  "@testing-library/jest-dom": "^6.6.0",
137
154
  "@testing-library/react": "^16.0.0",
@@ -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
- };