@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
@@ -7,4 +7,4 @@ Rules for this install live under `agent-docs/` in `@equal-experts/kuat-core`, `
7
7
  3. Load component guides via `agent-docs/components/components.manifest.json`.
8
8
  4. Skills: `kuat-review`, `kuat-create` from [kuat-agent-docs](https://github.com/equalexperts/kuat-agent-docs).
9
9
 
10
- **Version:** 0.15.0-beta.1 · **Rules snapshot:** 038a985b57fe
10
+ **Version:** 0.15.0-beta.2 · **Rules snapshot:** bdf7dafd019a
@@ -14,4 +14,4 @@ Curated agent docs bundled with `@equal-experts/kuat-core`, `@equal-experts/kuat
14
14
  node scripts/agent-docs/bundle-for-core.mjs
15
15
  ```
16
16
 
17
- Built against upstream ref: `038a985b57fe`
17
+ Built against upstream ref: `bdf7dafd019a`
@@ -24,6 +24,30 @@
24
24
  "displayName": "Callout",
25
25
  "path": "components/callout.md",
26
26
  "sources": ["@equal-experts/kuat-react", "@equal-experts/kuat-vue"]
27
+ },
28
+ "kuat:status-badge": {
29
+ "slug": "status-badge",
30
+ "displayName": "StatusBadge",
31
+ "path": "components/status-badge.md",
32
+ "sources": ["@equal-experts/kuat-react", "@equal-experts/kuat-vue"]
33
+ },
34
+ "kuat:tag": {
35
+ "slug": "tag",
36
+ "displayName": "Tag",
37
+ "path": "components/tag.md",
38
+ "sources": ["@equal-experts/kuat-react", "@equal-experts/kuat-vue"]
39
+ },
40
+ "kuat:tag-group": {
41
+ "slug": "tag-group",
42
+ "displayName": "TagGroup",
43
+ "path": "components/tag-group.md",
44
+ "sources": ["@equal-experts/kuat-react", "@equal-experts/kuat-vue"]
45
+ },
46
+ "kuat:counter-badge": {
47
+ "slug": "counter-badge",
48
+ "displayName": "CounterBadge",
49
+ "path": "components/counter-badge.md",
50
+ "sources": ["@equal-experts/kuat-react", "@equal-experts/kuat-vue"]
27
51
  }
28
52
  }
29
53
  }
@@ -0,0 +1,57 @@
1
+ # CounterBadge (`kuat:counter-badge`)
2
+
3
+ ## Overview
4
+
5
+ Digits-only count pill designed to overlay the top-right of an icon or avatar: solid fill, white text, "{max}+" overflow above the cap (99 by default). Two types — `primary` (brand blue) and `attention` (destructive red). Exported from `@equal-experts/kuat-react` / `@equal-experts/kuat-vue`.
6
+
7
+ ## When to use
8
+
9
+ - Unread/notification counts on icons, tabs, or navigation items
10
+ - `attention` when the count demands action; `primary` for routine counts
11
+
12
+ ## When not to use
13
+
14
+ - Text labels of any kind — use `StatusBadge` or `Tag`
15
+ - Counts the user needs exactly beyond the cap — show the full number in content instead
16
+
17
+ ## Variants
18
+
19
+ - `primary` (default) — `--primary` fill (brand ee-blue)
20
+ - `attention` — `--destructive` fill (brand runtime-red)
21
+
22
+ Solid fill only. The published Figma component ships these two Type variants; a possible future solid/outlined axis is logged upstream but not designed, so it is deliberately not in this API.
23
+
24
+ ## States
25
+
26
+ None — non-interactive, digits only.
27
+
28
+ ## Content guidance
29
+
30
+ - Digits only; the component renders `count`, never child content.
31
+ - Counts above `max` render as "{max}+" (default "99+").
32
+
33
+ ## Behaviour
34
+
35
+ - Renders a `<span>` with tabular numerals; `min-width` keeps single digits circular.
36
+ - Overlay anchoring is the consumer's job (absolute positioning over the anchor icon/avatar) — see the Storybook `OverlayAnchoring` story.
37
+
38
+ ## Accessibility
39
+
40
+ - The count renders as real text, so it is announced as-is; when the badge overlays an icon, give the anchor an accessible name that includes the count context (e.g. `aria-label="Notifications, 3 unread"`).
41
+ - Fills use the same semantic tokens as primary/destructive Buttons, so the white-text pairing matches the established DS pairing in both modes.
42
+
43
+ ## API
44
+
45
+ Import from `@equal-experts/kuat-react` (subpath: `@equal-experts/kuat-react/counter-badge`) or `@equal-experts/kuat-vue` (subpath: `@equal-experts/kuat-vue/counter-badge`).
46
+
47
+ - `count: number` — required
48
+ - `max?: number` — default `99`
49
+ - `type?: "primary" | "attention"` — default `"primary"`
50
+
51
+ See Storybook (`Data Display/CounterBadge`) for overflow and overlay-anchoring examples.
52
+
53
+ ## Related components
54
+
55
+ - `kuat:status-badge` — status indication with a text label
56
+ - `kuat:tag` — categorisation labels
57
+ - `kuat:badge` — deprecated predecessor; see `kuat-docs/DEPRECATIONS.md`
@@ -0,0 +1,68 @@
1
+ # StatusBadge (`kuat:status-badge`)
2
+
3
+ ## Overview
4
+
5
+ Non-interactive status indicator: five semantic types (success, warning, error, info, neutral), two sizes, a built-in per-type icon, and a solid fill. Reuses Callout's bar colour vocabulary (the raw brand ramps) plus a server-slate neutral. Exported from `@equal-experts/kuat-react` / `@equal-experts/kuat-vue`. Supersedes the deprecated `Badge` for status indication.
6
+
7
+ ## When to use
8
+
9
+ - RAG/status states on rows, cards, or progress trackers — one per item
10
+ - Success = completed/positive, Warning = needs attention, Error = failure/destructive, Info = neutral informational
11
+ - Neutral = non-semantic metadata (e.g. "Archived") where no status colour applies
12
+
13
+ ## When not to use
14
+
15
+ - Decorative or promotional labels ("New feature", "Popular") — status colour is reserved for status, per the Figma Do/Don't guidance
16
+ - Categorisation a user filters by, or zero-to-many labels per item — use `Tag`
17
+ - Numeric counts — use `CounterBadge`
18
+ - Anything interactive — StatusBadge never takes an `onClick`; that is the dividing line from `Tag`
19
+
20
+ ## Variants
21
+
22
+ Five semantic `type` values, each a solid fill with white text (neutral: dark text):
23
+
24
+ - `success` (default) — uptime-green fill, `CheckCircle2` icon
25
+ - `warning` — equal-ember fill, `AlertCircle` icon
26
+ - `error` — runtime-red fill, `XCircle` icon
27
+ - `info` — ee-blue fill, `BadgeInfo` icon
28
+ - `neutral` — server-slate-200 fill, dark text, no icon
29
+
30
+ Solid fill only — no subtle/tint mode exists, by design.
31
+
32
+ ## States
33
+
34
+ - **Size** — `base` (12px text) or `large` (14px text); icon is 12px in both.
35
+ - Non-interactive: no hover, focus, or pressed states.
36
+
37
+ ## Content guidance
38
+
39
+ - Label is a single short word or phrase stating the status ("Complete", "Failed", "Needs attention").
40
+ - Status is never conveyed by colour alone: the icon shape and the label wording both carry the meaning.
41
+
42
+ ## Behaviour
43
+
44
+ - Renders a `<span>`; the per-type icon is chosen automatically and cannot be swapped.
45
+ - Renders identically in light and dark mode — the fills are raw brand ramps, not mode-flipping aliases, because no dark-mode spec exists yet.
46
+
47
+ ## Accessibility
48
+
49
+ - Icon is `aria-hidden="true"` — decorative reinforcement of the label text.
50
+ - Colour is always paired with icon + label (WCAG 1.4.1); neutral has no icon but also no status semantics.
51
+ - Note: white text on the warning (equal-ember) and info (ee-blue-500) fills follows the Figma spec and matches the existing primary Button pairing, but sits below 4.5:1 at Base size — flagged upstream as a design-token question, not deviated from in code.
52
+
53
+ ## API
54
+
55
+ Import from `@equal-experts/kuat-react` (subpath: `@equal-experts/kuat-react/status-badge`) or `@equal-experts/kuat-vue` (subpath: `@equal-experts/kuat-vue/status-badge`).
56
+
57
+ - `type?: "success" | "warning" | "error" | "info" | "neutral"` — default `"success"`
58
+ - `size?: "base" | "large"` — default `"base"`
59
+ - Label is the child content
60
+
61
+ See Storybook (`Data Display/StatusBadge`) for every type and size.
62
+
63
+ ## Related components
64
+
65
+ - `kuat:tag` — categorisation (zero-to-many per item, interactive, tint fill)
66
+ - `kuat:counter-badge` — numeric counts
67
+ - `kuat:callout` — status messages with title/description tied to a content section
68
+ - `kuat:badge` — deprecated predecessor; see `kuat-docs/DEPRECATIONS.md`
@@ -0,0 +1,53 @@
1
+ # TagGroup (`kuat:tag-group`)
2
+
3
+ ## Overview
4
+
5
+ Thin accessibility wrapper for a set of `Tag`s: a labelled `role="group"`, flex-wrap layout (8px gap in both axes), and a polite `aria-live` region that announces tag removal. Layout is plain CSS — the component exists for the behaviour a flex container doesn't give you for free. Exported from `@equal-experts/kuat-react` / `@equal-experts/kuat-vue`.
6
+
7
+ ## When to use
8
+
9
+ - Any set of related Tags — especially dismissible (applied filters) or toggle (filter) groups
10
+
11
+ ## When not to use
12
+
13
+ - A single standalone Tag
14
+ - Grouping anything other than Tags
15
+
16
+ ## Variants
17
+
18
+ None — a single presentation.
19
+
20
+ ## States
21
+
22
+ None of its own; tags inside carry their own states.
23
+
24
+ ## Content guidance
25
+
26
+ - `label` names what the group is, e.g. "Technology filters", "Applied filters" — it's the group's accessible name, read by screen readers on entry.
27
+
28
+ ## Behaviour
29
+
30
+ - Wrapping, spacing, and reflow after dismissal are plain `flex-wrap` — no layout logic.
31
+ - When a `Tag` with `mode="dismiss"` inside the group is dismissed, the group's live region announces "{label} removed".
32
+ - For 8–10+ tags, the Figma exploration recommends a "+N more" collapse — not built into this component; curate or collapse in the consumer.
33
+
34
+ ## Accessibility
35
+
36
+ - `role="group"` + `aria-label` from the required `label` prop.
37
+ - Dismissals are announced via a visually hidden `aria-live="polite"` region inside the group.
38
+ - Per-tag semantics (`aria-pressed`, hidden icons, touch targets) live on `Tag` itself.
39
+
40
+ ## API
41
+
42
+ Import from `@equal-experts/kuat-react` (subpath: `@equal-experts/kuat-react/tag-group`) or `@equal-experts/kuat-vue` (subpath: `@equal-experts/kuat-vue/tag-group`).
43
+
44
+ - `label: string` — required accessible name
45
+ - Children are the Tags
46
+
47
+ No Figma component mapping: TagGroup is a documented exception — the upstream exploration concluded "no component needed" for layout, so only this code wrapper exists (for the accessibility behaviour), with the Figma exploration frame as its design reference.
48
+
49
+ See Storybook (`Data Display/TagGroup`) for wrapping and dismissal examples.
50
+
51
+ ## Related components
52
+
53
+ - `kuat:tag` — the tags inside the group
@@ -0,0 +1,72 @@
1
+ # Tag (`kuat:tag`)
2
+
3
+ ## Overview
4
+
5
+ Categorisation pill on the extended Data/Digital palette: nine colour categories, full pill radius, and three interaction modes — display (non-interactive), toggle (multi-select filter), and dismiss (removable). Colours come from per-category `--tag-*` semantic tokens in `@equal-experts/kuat-core` (mirroring the Figma "semantic colors" collection) with dedicated light and dark values. Exported from `@equal-experts/kuat-react` / `@equal-experts/kuat-vue`.
6
+
7
+ ## When to use
8
+
9
+ - Zero-to-many category labels per item (skills, technologies, topics)
10
+ - Multi-select filter chips (`mode="toggle"`)
11
+ - Applied-filter chips the user can remove (`mode="dismiss"`)
12
+
13
+ ## When not to use
14
+
15
+ - Status indication — use `StatusBadge` (one per item, status colours)
16
+ - Mixing toggle and dismiss tags within the same group — pick one interaction model per group
17
+ - More than 8–10 tags per item without curation — collapse or curate instead
18
+
19
+ ## Variants
20
+
21
+ Nine `color` categories: `base` (EE neutral scale) plus the eight extended Data/Digital ramps — `index-indigo`, `transform-teal`, `packet-plum`, `server-slate`, `logic-lime`, `signal-yellow`, `cursor-coral`, `patch-peach`.
22
+
23
+ ## States
24
+
25
+ Each state uses its category's semantic token (light value → dark value in ramp steps):
26
+
27
+ - **Default** — `--tag-{category}-background` (`/50` → `/700`), text `--tag-{category}-foreground` (`/700` → `/100`)
28
+ - **Hover** (interactive modes) — `--tag-{category}-background-hover` (`/100` → `/600`) + 1px `--tag-{category}-border` (`/700` → `/100`)
29
+ - **Selected Toggle** — `--tag-{category}-background-selected` (`/200` → `/500`) + trailing check icon
30
+ - **Selected Dismiss** — same selected background + trailing x icon (dismiss tags always render this visual)
31
+ - **Disabled** — 50% opacity, no pointer events
32
+
33
+ `base` maps to the EE neutral ramp with the same steps (white background in light mode).
34
+
35
+ ## Content guidance
36
+
37
+ - One or two words per tag; the label names the category, not the action.
38
+ - For dismiss tags, consider passing `aria-label="Remove {label}"` when the surrounding context doesn't already make the action obvious.
39
+
40
+ ## Behaviour
41
+
42
+ - `mode="display"` renders a `<span>`; `toggle` and `dismiss` render a `<button type="button">` — a conditional element choice built into Tag, not a polymorphic base.
43
+ - Toggle: clicking calls `onSelectedChange(next)` (React) / emits `update:selected` (Vue); the consumer owns the state.
44
+ - Dismiss: clicking calls `onDismiss` (React) / emits `dismiss` (Vue) and, inside a `TagGroup`, announces "{label} removed" via the group's live region.
45
+ - Full light/dark support: the `--tag-*` semantic tokens flip with the `.dark` class, so tags invert (dark `/700` fills with `/100` text) without any component-level changes.
46
+
47
+ ## Accessibility
48
+
49
+ - 44px-tall invisible hit area extends beyond the 37px visual pill (WCAG 2.5.8 touch target).
50
+ - Toggle tags expose `aria-pressed`; check/dismiss icons are `aria-hidden="true"`.
51
+ - WCAG AA contrast confirmed per colour in the Figma spec (tightest: Transform Teal selected, 4.67:1).
52
+ - Keyboard-operable: real `<button>` semantics, visible focus ring.
53
+
54
+ ## API
55
+
56
+ Import from `@equal-experts/kuat-react` (subpath: `@equal-experts/kuat-react/tag`) or `@equal-experts/kuat-vue` (subpath: `@equal-experts/kuat-vue/tag`).
57
+
58
+ - `color?: TagColor` — default `"base"`
59
+ - `mode?: "display" | "toggle" | "dismiss"` — default `"display"`
60
+ - `selected?: boolean` — toggle mode only, default `false`
61
+ - `onSelectedChange?: (selected: boolean) => void` (React) / `@update:selected` (Vue)
62
+ - `onDismiss?: () => void` (React) / `@dismiss` (Vue)
63
+ - `disabled?: boolean`
64
+ - Label is the child content
65
+
66
+ See Storybook (`Data Display/Tag`) for all colours, modes, and states.
67
+
68
+ ## Related components
69
+
70
+ - `kuat:tag-group` — wrap every set of Tags in one for the group role, label, and dismissal announcements
71
+ - `kuat:status-badge` — status indication (one per item, status colours)
72
+ - `kuat:badge` — deprecated predecessor; see `kuat-docs/DEPRECATIONS.md`
@@ -36,6 +36,10 @@ Pre-built compositions that combine multiple components:
36
36
 
37
37
  Custom components unique to the design system:
38
38
  - `ButtonGroup` - Group of related buttons
39
+ - `StatusBadge` - Status indicator (success/warning/error/info/neutral, one per item, non-interactive)
40
+ - `Tag` - Categorisation pill (nine colours, zero-to-many per item, toggle or dismiss interaction)
41
+ - `TagGroup` - Accessibility wrapper for a set of Tags (group role, label, dismissal announcements)
42
+ - `CounterBadge` - Numeric count pill ("99+" overflow, overlays icons/avatars)
39
43
  - Other components not available in shadcn
40
44
 
41
45
  **Use when:** The component doesn't exist in shadcn but is needed across multiple applications.
@@ -11,9 +11,16 @@ Stable IDs link patterns and checklists to per-component guides in the implement
11
11
  | `shadcn:button` | Button | shadcn CLI + `kuat-core` theme | `components/button.md` | [complete a form](./patterns/complete-a-form.md), [sign in](./patterns/sign-in.md), [content/actions](./content/actions.md) |
12
12
  | `kuat:button-group` | ButtonGroup | `@equal-experts/kuat-react` / `kuat-vue` | `components/button-group.md` | [component-decision-tree](./component-decision-tree.md) |
13
13
  | `kuat:kuat-header` | KuatHeader | `@equal-experts/kuat-react` / `kuat-vue` block | `components/kuat-header.md` | [component-decision-tree](./component-decision-tree.md), [design](./design.md) |
14
+ | `kuat:callout` | Callout | `@equal-experts/kuat-react` / `kuat-vue` | `components/callout.md` | [component-decision-tree](./component-decision-tree.md) |
15
+ | `kuat:status-badge` | StatusBadge | `@equal-experts/kuat-react` / `kuat-vue` | `components/status-badge.md` | [component-decision-tree](./component-decision-tree.md) |
16
+ | `kuat:tag` | Tag | `@equal-experts/kuat-react` / `kuat-vue` | `components/tag.md` | [component-decision-tree](./component-decision-tree.md) |
17
+ | `kuat:tag-group` | TagGroup | `@equal-experts/kuat-react` / `kuat-vue` | `components/tag-group.md` | [component-decision-tree](./component-decision-tree.md) |
18
+ | `kuat:counter-badge` | CounterBadge | `@equal-experts/kuat-react` / `kuat-vue` | `components/counter-badge.md` | [component-decision-tree](./component-decision-tree.md) |
14
19
 
15
20
  Expand this table in `kuat-mono` as component docs are added. Keep IDs stable; add new rows rather than renaming IDs.
16
21
 
22
+ > `Badge` (the predecessor of StatusBadge/Tag/CounterBadge) is deprecated and intentionally has no registry row — see `kuat-docs/DEPRECATIONS.md` in `kuat-mono`.
23
+
17
24
  ---
18
25
 
19
26
  ## ID conventions
@@ -1,8 +1,8 @@
1
1
  {
2
- "packageVersion": "0.15.0-beta.1",
2
+ "packageVersion": "0.15.0-beta.2",
3
3
  "rules": {
4
- "snapshotRef": "038a985b57fe567a24d3a663277f4594d75b9a87",
5
- "snapshotDate": "2026-07-06T14:20:52.535Z",
4
+ "snapshotRef": "bdf7dafd019a6dadb8369bc4fd2d13964f6a111c",
5
+ "snapshotDate": "2026-07-14T10:57:49.931Z",
6
6
  "sourceRepo": "equalexperts/kuat-agent-docs",
7
7
  "loadingPath": "agent-docs/rules/LOADING-consumer.md"
8
8
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Package:** @equal-experts/kuat-core (and mirrored in kuat-react / kuat-vue agent-docs)
4
4
 
5
- **Snapshot:** 038a985b57fe
5
+ **Snapshot:** bdf7dafd019a
6
6
 
7
7
  ## Default load (web product / marketing UI)
8
8
 
@@ -0,0 +1,25 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { c as r } from "./utils-DLUjLwnh.js";
3
+ const g = ["default", "secondary", "destructive", "outline", "ghost"], f = ["default", "round"];
4
+ let t = !1;
5
+ function l({ className: e, variant: a = "default", roundness: d = "default", ...s }) {
6
+ return process.env.NODE_ENV !== "production" && !t && (t = !0, console.warn(
7
+ "[kuat-react] Badge is deprecated - use StatusBadge (status), Tag (categorisation), or CounterBadge (counts). See kuat-docs/DEPRECATIONS.md."
8
+ )), /* @__PURE__ */ u(
9
+ "div",
10
+ {
11
+ className: r("badge", `badge--${a}`, `badge--roundness-${d}`, e),
12
+ ...s
13
+ }
14
+ );
15
+ }
16
+ function o(e) {
17
+ const a = (e == null ? void 0 : e.variant) ?? "default", d = (e == null ? void 0 : e.roundness) ?? "default";
18
+ return r("badge", `badge--${a}`, `badge--roundness-${d}`);
19
+ }
20
+ export {
21
+ l as B,
22
+ g as a,
23
+ o as b,
24
+ f as c
25
+ };
package/dist/badge.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { c as e } from "./utils-DLUjLwnh.js";
2
- import { B as s, b as t } from "./badge-BZgdEQSD.js";
2
+ import { B as s, b as t } from "./badge-BFeIqSCP.js";
3
3
  export {
4
4
  s as Badge,
5
5
  t as badgeVariants,
@@ -7,8 +7,15 @@ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  variant?: BadgeVariant;
8
8
  roundness?: BadgeRoundness;
9
9
  }
10
+ /**
11
+ * @deprecated Use `StatusBadge` for status indication, `Tag` for categorisation, or
12
+ * `CounterBadge` for numeric counts. See kuat-docs/DEPRECATIONS.md. Removal target: next major.
13
+ */
10
14
  declare function Badge({ className, variant, roundness, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
11
- /** Returns class string for badge variant (backward compatibility). */
15
+ /**
16
+ * Returns class string for badge variant (backward compatibility).
17
+ * @deprecated Use `statusBadgeVariants`, `tagVariants`, or `counterBadgeVariants` instead.
18
+ */
12
19
  export declare function badgeVariants(options: {
13
20
  variant?: BadgeVariant;
14
21
  roundness?: BadgeRoundness;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ export declare const COUNTER_BADGE_TYPES: readonly ["primary", "attention"];
3
+ export type CounterBadgeType = (typeof COUNTER_BADGE_TYPES)[number];
4
+ export interface CounterBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
5
+ count: number;
6
+ /** Counts above this render as "{max}+". */
7
+ max?: number;
8
+ type?: CounterBadgeType;
9
+ }
10
+ declare const CounterBadge: React.ForwardRefExoticComponent<CounterBadgeProps & React.RefAttributes<HTMLSpanElement>>;
11
+ /** Returns class string for counter badge variant (backward compatibility). */
12
+ export declare function counterBadgeVariants(options?: {
13
+ type?: CounterBadgeType;
14
+ }): string;
15
+ export { CounterBadge };
@@ -0,0 +1,2 @@
1
+ export { CounterBadge, counterBadgeVariants, COUNTER_BADGE_TYPES, } from './counter-badge';
2
+ export type { CounterBadgeProps, CounterBadgeType } from './counter-badge';
@@ -0,0 +1,2 @@
1
+ export { StatusBadge, statusBadgeVariants, STATUS_BADGE_TYPES, STATUS_BADGE_SIZES, } from './status-badge';
2
+ export type { StatusBadgeProps, StatusBadgeType, StatusBadgeSize, } from './status-badge';
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ export declare const STATUS_BADGE_TYPES: readonly ["success", "warning", "error", "info", "neutral"];
3
+ export type StatusBadgeType = (typeof STATUS_BADGE_TYPES)[number];
4
+ export declare const STATUS_BADGE_SIZES: readonly ["base", "large"];
5
+ export type StatusBadgeSize = (typeof STATUS_BADGE_SIZES)[number];
6
+ export interface StatusBadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
7
+ type?: StatusBadgeType;
8
+ size?: StatusBadgeSize;
9
+ }
10
+ declare const StatusBadge: React.ForwardRefExoticComponent<StatusBadgeProps & React.RefAttributes<HTMLSpanElement>>;
11
+ /** Returns class string for status badge variant (backward compatibility). */
12
+ export declare function statusBadgeVariants(options?: {
13
+ type?: StatusBadgeType;
14
+ size?: StatusBadgeSize;
15
+ }): string;
16
+ export { StatusBadge };
@@ -0,0 +1,2 @@
1
+ export { Tag, tagVariants, TAG_COLORS, TAG_MODES } from './tag';
2
+ export type { TagProps, TagColor, TagMode } from './tag';
@@ -0,0 +1,25 @@
1
+ import * as React from "react";
2
+ export declare const TAG_COLORS: readonly ["base", "index-indigo", "transform-teal", "packet-plum", "server-slate", "logic-lime", "signal-yellow", "cursor-coral", "patch-peach"];
3
+ export type TagColor = (typeof TAG_COLORS)[number];
4
+ export declare const TAG_MODES: readonly ["display", "toggle", "dismiss"];
5
+ export type TagMode = (typeof TAG_MODES)[number];
6
+ export interface TagProps extends React.HTMLAttributes<HTMLElement> {
7
+ color?: TagColor;
8
+ /** One interaction model per group: display (non-interactive), toggle (multi-select filter), or dismiss (removable). Do not mix toggle and dismiss tags within the same group. */
9
+ mode?: TagMode;
10
+ /** Toggle mode only: whether the tag is selected. */
11
+ selected?: boolean;
12
+ /** Toggle mode only: called with the next selected state on click. */
13
+ onSelectedChange?: (selected: boolean) => void;
14
+ /** Dismiss mode only: called when the tag is dismissed. */
15
+ onDismiss?: () => void;
16
+ disabled?: boolean;
17
+ }
18
+ declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLElement>>;
19
+ /** Returns class string for tag variant (backward compatibility). */
20
+ export declare function tagVariants(options?: {
21
+ color?: TagColor;
22
+ mode?: TagMode;
23
+ selected?: boolean;
24
+ }): string;
25
+ export { Tag };
@@ -0,0 +1,4 @@
1
+ export { TagGroup } from './tag-group';
2
+ export type { TagGroupProps } from './tag-group';
3
+ export { TagGroupContext, useTagGroup } from './tag-group-context';
4
+ export type { TagGroupContextValue } from './tag-group-context';
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ export interface TagGroupContextValue {
3
+ /** Push a message to the group's aria-live region (e.g. "Design removed"). */
4
+ announce: (message: string) => void;
5
+ }
6
+ export declare const TagGroupContext: React.Context<TagGroupContextValue | null>;
7
+ /** Returns the enclosing TagGroup's context, or null outside a TagGroup. */
8
+ export declare function useTagGroup(): TagGroupContextValue | null;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export interface TagGroupProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** Accessible name for the group, e.g. "Technology filters". */
4
+ label: string;
5
+ }
6
+ declare const TagGroup: React.ForwardRefExoticComponent<TagGroupProps & React.RefAttributes<HTMLDivElement>>;
7
+ export { TagGroup };
@@ -0,0 +1,27 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import * as g from "react";
3
+ import { c } from "./utils-DLUjLwnh.js";
4
+ const p = ["primary", "attention"], i = g.forwardRef(function({ className: r, count: e, max: t = 99, type: n = "primary", ...o }, d) {
5
+ const s = e > t ? `${t}+` : String(e);
6
+ return /* @__PURE__ */ u(
7
+ "span",
8
+ {
9
+ ref: d,
10
+ "data-slot": "counter-badge",
11
+ "data-type": n,
12
+ className: c("counter-badge", `counter-badge--${n}`, r),
13
+ ...o,
14
+ children: s
15
+ }
16
+ );
17
+ });
18
+ i.displayName = "CounterBadge";
19
+ function y(a) {
20
+ const r = (a == null ? void 0 : a.type) ?? "primary";
21
+ return c("counter-badge", `counter-badge--${r}`);
22
+ }
23
+ export {
24
+ i as C,
25
+ p as a,
26
+ y as c
27
+ };
@@ -0,0 +1,3 @@
1
+ export { cn } from './lib/utils';
2
+ export { CounterBadge, counterBadgeVariants, COUNTER_BADGE_TYPES, } from './components/ui/counter-badge';
3
+ export type { CounterBadgeProps, CounterBadgeType } from './components/ui/counter-badge';
@@ -0,0 +1,8 @@
1
+ import { c as e } from "./utils-DLUjLwnh.js";
2
+ import { a as s, C as t, c } from "./counter-badge-JLm2U18L.js";
3
+ export {
4
+ s as COUNTER_BADGE_TYPES,
5
+ t as CounterBadge,
6
+ e as cn,
7
+ c as counterBadgeVariants
8
+ };
package/dist/index.d.ts CHANGED
@@ -25,6 +25,14 @@ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from '.
25
25
  export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './components/ui/alert-dialog';
26
26
  export { Badge, badgeVariants, BADGE_VARIANTS, BADGE_ROUNDNESS } from './components/ui/badge';
27
27
  export type { BadgeProps, BadgeVariant, BadgeRoundness } from './components/ui/badge';
28
+ export { StatusBadge, statusBadgeVariants, STATUS_BADGE_TYPES, STATUS_BADGE_SIZES, } from './components/ui/status-badge';
29
+ export type { StatusBadgeProps, StatusBadgeType, StatusBadgeSize, } from './components/ui/status-badge';
30
+ export { Tag, tagVariants, TAG_COLORS, TAG_MODES } from './components/ui/tag';
31
+ export type { TagProps, TagColor, TagMode } from './components/ui/tag';
32
+ export { TagGroup, TagGroupContext, useTagGroup } from './components/ui/tag-group';
33
+ export type { TagGroupProps, TagGroupContextValue } from './components/ui/tag-group';
34
+ export { CounterBadge, counterBadgeVariants, COUNTER_BADGE_TYPES, } from './components/ui/counter-badge';
35
+ export type { CounterBadgeProps, CounterBadgeType } from './components/ui/counter-badge';
28
36
  export { Breadcrumb, BreadcrumbRoot, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, } from './components/ui/breadcrumb';
29
37
  export type { BreadcrumbProps, BreadcrumbItemEntry, BreadcrumbLinkProps, } from './components/ui/breadcrumb';
30
38
  export { Button, buttonVariants, BUTTON_VARIANTS, BUTTON_SIZES, BUTTON_COLORS, } from './components/ui/button';