@equal-experts/kuat-vue 0.15.0-beta.1 → 0.15.1

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 (42) 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/TagGroup-DoAD4JQc.js +34 -0
  13. package/dist/badge.js +1 -1
  14. package/dist/components/ui/counter-badge/CounterBadge.vue.d.ts +43 -0
  15. package/dist/components/ui/counter-badge/constants.d.ts +2 -0
  16. package/dist/components/ui/counter-badge/index.d.ts +12 -0
  17. package/dist/components/ui/{badge/Badge.vue.d.ts → status-badge/StatusBadge.vue.d.ts} +17 -18
  18. package/dist/components/ui/status-badge/constants.d.ts +4 -0
  19. package/dist/components/ui/status-badge/index.d.ts +14 -0
  20. package/dist/components/ui/tag/Tag.vue.d.ts +68 -0
  21. package/dist/components/ui/tag/constants.d.ts +4 -0
  22. package/dist/components/ui/tag/index.d.ts +16 -0
  23. package/dist/components/ui/tag-group/TagGroup.vue.d.ts +30 -0
  24. package/dist/components/ui/tag-group/constants.d.ts +7 -0
  25. package/dist/components/ui/tag-group/index.d.ts +3 -0
  26. package/dist/constants-C7FSWs1k.js +4 -0
  27. package/dist/counter-badge.d.ts +3 -0
  28. package/dist/counter-badge.js +8 -0
  29. package/dist/index-BMnFWBPu.js +96 -0
  30. package/dist/index-DMDbjdfX.js +59 -0
  31. package/dist/{index-C3VyxnTa.js → index-DgHHiJiZ.js} +2 -2
  32. package/dist/index-Mf68zkuJ.js +31 -0
  33. package/dist/index.d.ts +8 -0
  34. package/dist/index.js +472 -454
  35. package/dist/status-badge.d.ts +3 -0
  36. package/dist/status-badge.js +9 -0
  37. package/dist/style.css +1 -1
  38. package/dist/tag-group.d.ts +3 -0
  39. package/dist/tag-group.js +8 -0
  40. package/dist/tag.d.ts +3 -0
  41. package/dist/tag.js +9 -0
  42. package/package.json +17 -1
@@ -0,0 +1,7 @@
1
+ import { InjectionKey } from 'vue';
2
+
3
+ export interface TagGroupContextValue {
4
+ /** Push a message to the group's aria-live region (e.g. "Design removed"). */
5
+ announce: (message: string) => void;
6
+ }
7
+ export declare const TAG_GROUP_INJECTION_KEY: InjectionKey<TagGroupContextValue>;
@@ -0,0 +1,3 @@
1
+ export { default as TagGroup } from './TagGroup.vue';
2
+ export { TAG_GROUP_INJECTION_KEY } from './constants';
3
+ export type { TagGroupContextValue } from './constants';
@@ -0,0 +1,4 @@
1
+ const o = Symbol("KuatTagGroup");
2
+ export {
3
+ o as T
4
+ };
@@ -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 { CounterBadgeVariants, 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 "./index-Mf68zkuJ.js";
3
+ export {
4
+ s as COUNTER_BADGE_TYPES,
5
+ t as CounterBadge,
6
+ e as cn,
7
+ c as counterBadgeVariants
8
+ };
@@ -0,0 +1,96 @@
1
+ import { defineComponent as h, inject as C, computed as r, createElementBlock as u, openBlock as d, normalizeClass as g, renderSlot as f, createBlock as _, createCommentVNode as p, unref as v } from "vue";
2
+ import { Check as T, X as B } from "lucide-vue-next";
3
+ import { c as y } from "./utils-DLUjLwnh.js";
4
+ import { T as O } from "./constants-C7FSWs1k.js";
5
+ import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const E = ["data-color", "data-mode", "aria-pressed", "disabled"], G = ["data-color", "data-mode"], V = /* @__PURE__ */ h({
7
+ __name: "Tag",
8
+ props: {
9
+ class: {},
10
+ color: { default: "base" },
11
+ mode: { default: "display" },
12
+ selected: { type: Boolean, default: !1 },
13
+ disabled: { type: Boolean, default: !1 }
14
+ },
15
+ emits: ["update:selected", "dismiss"],
16
+ setup(a, { emit: l }) {
17
+ const e = a, t = l, o = C(O, null), i = r(() => e.mode !== "display"), b = r(
18
+ () => e.mode === "dismiss" || e.mode === "toggle" && e.selected
19
+ ), m = r(
20
+ () => y(
21
+ "tag",
22
+ `tag--${e.color}`,
23
+ i.value && "tag--interactive",
24
+ b.value && "tag--selected",
25
+ e.class
26
+ )
27
+ );
28
+ function k(s) {
29
+ var c;
30
+ if (e.mode === "toggle")
31
+ t("update:selected", !e.selected);
32
+ else if (e.mode === "dismiss") {
33
+ const n = (c = s.currentTarget.textContent) == null ? void 0 : c.trim();
34
+ n && (o == null || o.announce(`${n} removed`)), t("dismiss");
35
+ }
36
+ }
37
+ return (s, c) => i.value ? (d(), u("button", {
38
+ key: 0,
39
+ type: "button",
40
+ "data-slot": "tag",
41
+ "data-color": e.color,
42
+ "data-mode": e.mode,
43
+ "aria-pressed": e.mode === "toggle" ? e.selected : void 0,
44
+ disabled: e.disabled,
45
+ class: g(m.value),
46
+ onClick: k
47
+ }, [
48
+ f(s.$slots, "default", {}, void 0, !0),
49
+ e.mode === "toggle" && e.selected ? (d(), _(v(T), {
50
+ key: 0,
51
+ "aria-hidden": "true",
52
+ class: "tag__icon",
53
+ "data-slot": "tag-icon"
54
+ })) : p("", !0),
55
+ e.mode === "dismiss" ? (d(), _(v(B), {
56
+ key: 1,
57
+ "aria-hidden": "true",
58
+ class: "tag__icon",
59
+ "data-slot": "tag-icon"
60
+ })) : p("", !0)
61
+ ], 10, E)) : (d(), u("span", {
62
+ key: 1,
63
+ "data-slot": "tag",
64
+ "data-color": e.color,
65
+ "data-mode": e.mode,
66
+ class: g(m.value)
67
+ }, [
68
+ f(s.$slots, "default", {}, void 0, !0)
69
+ ], 10, G));
70
+ }
71
+ }), R = /* @__PURE__ */ $(V, [["__scopeId", "data-v-610adeff"]]), j = [
72
+ "base",
73
+ "index-indigo",
74
+ "transform-teal",
75
+ "packet-plum",
76
+ "server-slate",
77
+ "logic-lime",
78
+ "signal-yellow",
79
+ "cursor-coral",
80
+ "patch-peach"
81
+ ], w = ["display", "toggle", "dismiss"];
82
+ function z(a) {
83
+ const l = (a == null ? void 0 : a.color) ?? "base", e = (a == null ? void 0 : a.mode) ?? "display", t = e === "dismiss" || e === "toggle" && !!(a != null && a.selected);
84
+ return y(
85
+ "tag",
86
+ `tag--${l}`,
87
+ e !== "display" && "tag--interactive",
88
+ t && "tag--selected"
89
+ );
90
+ }
91
+ export {
92
+ R as T,
93
+ j as a,
94
+ w as b,
95
+ z as t
96
+ };
@@ -0,0 +1,59 @@
1
+ import { defineComponent as n, computed as u, createElementBlock as d, openBlock as s, normalizeClass as o, unref as l, createBlock as i, createCommentVNode as m, renderSlot as _, resolveDynamicComponent as f } from "vue";
2
+ import { CheckCircle2 as g, BadgeInfo as p, XCircle as b, AlertCircle as S } from "lucide-vue-next";
3
+ import { c as r } from "./utils-DLUjLwnh.js";
4
+ import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const z = ["data-type", "data-size"], B = /* @__PURE__ */ n({
6
+ __name: "StatusBadge",
7
+ props: {
8
+ class: {},
9
+ type: { default: "success" },
10
+ size: { default: "base" }
11
+ },
12
+ setup(e) {
13
+ const a = e, t = u(() => {
14
+ switch (a.type) {
15
+ case "warning":
16
+ return S;
17
+ case "error":
18
+ return b;
19
+ case "info":
20
+ return p;
21
+ case "neutral":
22
+ return null;
23
+ default:
24
+ return g;
25
+ }
26
+ });
27
+ return (c, C) => (s(), d("span", {
28
+ "data-slot": "status-badge",
29
+ "data-type": a.type,
30
+ "data-size": a.size,
31
+ class: o(
32
+ l(r)(
33
+ "status-badge",
34
+ `status-badge--${a.type}`,
35
+ `status-badge--size-${a.size}`,
36
+ a.class
37
+ )
38
+ )
39
+ }, [
40
+ t.value ? (s(), i(f(t.value), {
41
+ key: 0,
42
+ "aria-hidden": "true",
43
+ class: "status-badge__icon",
44
+ "data-slot": "status-badge-icon"
45
+ })) : m("", !0),
46
+ _(c.$slots, "default", {}, void 0, !0)
47
+ ], 10, z));
48
+ }
49
+ }), E = /* @__PURE__ */ y(B, [["__scopeId", "data-v-7e65acae"]]), T = ["success", "warning", "error", "info", "neutral"], $ = ["base", "large"];
50
+ function w(e) {
51
+ const a = (e == null ? void 0 : e.type) ?? "success", t = (e == null ? void 0 : e.size) ?? "base";
52
+ return r("status-badge", `status-badge--${a}`, `status-badge--size-${t}`);
53
+ }
54
+ export {
55
+ E as S,
56
+ T as a,
57
+ $ as b,
58
+ w as s
59
+ };
@@ -13,7 +13,7 @@ const m = /* @__PURE__ */ t({
13
13
  },
14
14
  setup(a) {
15
15
  const e = a;
16
- return (s, g) => (l(), n(d(o), {
16
+ return (s, b) => (l(), n(d(o), {
17
17
  as: a.as,
18
18
  "as-child": a.asChild,
19
19
  class: c(d(r)("badge", `badge--${e.variant}`, `badge--roundness-${e.roundness}`, e.class))
@@ -24,7 +24,7 @@ const m = /* @__PURE__ */ t({
24
24
  _: 3
25
25
  }, 8, ["as", "as-child", "class"]));
26
26
  }
27
- }), B = /* @__PURE__ */ i(m, [["__scopeId", "data-v-3daa11ff"]]);
27
+ }), B = /* @__PURE__ */ i(m, [["__scopeId", "data-v-5e44abdb"]]);
28
28
  function C(a) {
29
29
  const e = (a == null ? void 0 : a.variant) ?? "default", s = (a == null ? void 0 : a.roundness) ?? "default";
30
30
  return r("badge", `badge--${e}`, `badge--roundness-${s}`);
@@ -0,0 +1,31 @@
1
+ import { defineComponent as r, computed as n, createElementBlock as o, openBlock as s, normalizeClass as p, unref as u, toDisplayString as d } from "vue";
2
+ import { c as a } from "./utils-DLUjLwnh.js";
3
+ import { _ as m } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const _ = ["data-type"], l = /* @__PURE__ */ r({
5
+ __name: "CounterBadge",
6
+ props: {
7
+ class: {},
8
+ count: {},
9
+ max: { default: 99 },
10
+ type: { default: "primary" }
11
+ },
12
+ setup(e) {
13
+ const t = e, c = n(
14
+ () => t.count > t.max ? `${t.max}+` : String(t.count)
15
+ );
16
+ return (i, y) => (s(), o("span", {
17
+ "data-slot": "counter-badge",
18
+ "data-type": t.type,
19
+ class: p(u(a)("counter-badge", `counter-badge--${t.type}`, t.class))
20
+ }, d(c.value), 11, _));
21
+ }
22
+ }), B = /* @__PURE__ */ m(l, [["__scopeId", "data-v-c703dc4c"]]), C = ["primary", "attention"];
23
+ function b(e) {
24
+ const t = (e == null ? void 0 : e.type) ?? "primary";
25
+ return a("counter-badge", `counter-badge--${t}`);
26
+ }
27
+ export {
28
+ B as C,
29
+ C as a,
30
+ b as c
31
+ };
package/dist/index.d.ts CHANGED
@@ -22,6 +22,14 @@ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from '.
22
22
  export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from './components/ui/alert-dialog';
23
23
  export { Badge, badgeVariants, BADGE_VARIANTS, BADGE_ROUNDNESS } from './components/ui/badge';
24
24
  export type { BadgeVariants, BadgeVariant, BadgeRoundness } from './components/ui/badge';
25
+ export { StatusBadge, statusBadgeVariants, STATUS_BADGE_TYPES, STATUS_BADGE_SIZES, } from './components/ui/status-badge';
26
+ export type { StatusBadgeVariants, StatusBadgeType, StatusBadgeSize, } from './components/ui/status-badge';
27
+ export { Tag, tagVariants, TAG_COLORS, TAG_MODES } from './components/ui/tag';
28
+ export type { TagVariants, TagColor, TagMode } from './components/ui/tag';
29
+ export { TagGroup, TAG_GROUP_INJECTION_KEY } from './components/ui/tag-group';
30
+ export type { TagGroupContextValue } from './components/ui/tag-group';
31
+ export { CounterBadge, counterBadgeVariants, COUNTER_BADGE_TYPES, } from './components/ui/counter-badge';
32
+ export type { CounterBadgeVariants, CounterBadgeType } from './components/ui/counter-badge';
25
33
  export { Breadcrumb } from './components/ui/breadcrumb';
26
34
  export type { BreadcrumbItemEntry } from './components/ui/breadcrumb';
27
35
  export { Button, buttonVariants, BUTTON_VARIANTS, BUTTON_SIZES, BUTTON_COLORS, } from './components/ui/button';