@devalok/shilp-sutra 0.25.0 → 0.26.0

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 (103) hide show
  1. package/dist/_chunks/framer.js +2 -2
  2. package/dist/_chunks/primitives.js +39 -39
  3. package/dist/_chunks/vendor-client.js +1 -1
  4. package/dist/_chunks/vendor-utils.js +83484 -3535
  5. package/dist/ai/index.js +1 -1
  6. package/dist/composed/bulk-action-bar.d.ts +29 -0
  7. package/dist/composed/bulk-action-bar.d.ts.map +1 -0
  8. package/dist/composed/bulk-action-bar.js +123 -0
  9. package/dist/composed/deadline-indicator.d.ts +18 -0
  10. package/dist/composed/deadline-indicator.d.ts.map +1 -0
  11. package/dist/composed/deadline-indicator.js +75 -0
  12. package/dist/composed/emoji-picker.d.ts +26 -0
  13. package/dist/composed/emoji-picker.d.ts.map +1 -0
  14. package/dist/composed/emoji-picker.js +104 -0
  15. package/dist/composed/file-preview.d.ts +22 -0
  16. package/dist/composed/file-preview.d.ts.map +1 -0
  17. package/dist/composed/file-preview.js +675 -0
  18. package/dist/composed/filter-bar.d.ts +38 -0
  19. package/dist/composed/filter-bar.d.ts.map +1 -0
  20. package/dist/composed/filter-bar.js +133 -0
  21. package/dist/composed/form-section.d.ts +12 -0
  22. package/dist/composed/form-section.d.ts.map +1 -0
  23. package/dist/composed/form-section.js +45 -0
  24. package/dist/composed/index.d.ts +22 -0
  25. package/dist/composed/index.d.ts.map +1 -1
  26. package/dist/composed/index.js +61 -36
  27. package/dist/composed/inline-edit.d.ts +16 -0
  28. package/dist/composed/inline-edit.d.ts.map +1 -0
  29. package/dist/composed/inline-edit.js +107 -0
  30. package/dist/composed/markdown-viewer.d.ts +14 -0
  31. package/dist/composed/markdown-viewer.d.ts.map +1 -0
  32. package/dist/composed/markdown-viewer.js +143 -0
  33. package/dist/composed/master-detail.d.ts +35 -0
  34. package/dist/composed/master-detail.d.ts.map +1 -0
  35. package/dist/composed/master-detail.js +124 -0
  36. package/dist/composed/member-picker.d.ts.map +1 -1
  37. package/dist/composed/member-picker.js +41 -88
  38. package/dist/composed/multi-select-popover.d.ts +44 -0
  39. package/dist/composed/multi-select-popover.d.ts.map +1 -0
  40. package/dist/composed/multi-select-popover.js +185 -0
  41. package/dist/composed/responsive-overlay.d.ts +15 -0
  42. package/dist/composed/responsive-overlay.d.ts.map +1 -0
  43. package/dist/composed/responsive-overlay.js +45 -0
  44. package/dist/ui/alert-dialog.js +10 -10
  45. package/dist/ui/avatar.js +1 -1
  46. package/dist/ui/button.d.ts +1 -1
  47. package/dist/ui/button.d.ts.map +1 -1
  48. package/dist/ui/button.js +42 -36
  49. package/dist/ui/card.d.ts +6 -48
  50. package/dist/ui/card.d.ts.map +1 -1
  51. package/dist/ui/card.js +92 -49
  52. package/dist/ui/checkbox.js +1 -1
  53. package/dist/ui/collapsible.js +1 -1
  54. package/dist/ui/color-swatch.d.ts +27 -0
  55. package/dist/ui/color-swatch.d.ts.map +1 -0
  56. package/dist/ui/color-swatch.js +91 -0
  57. package/dist/ui/data-table.d.ts +7 -1
  58. package/dist/ui/data-table.d.ts.map +1 -1
  59. package/dist/ui/data-table.js +221 -215
  60. package/dist/ui/dialog.js +4 -4
  61. package/dist/ui/dropdown-menu.js +31 -31
  62. package/dist/ui/index.d.ts +3 -0
  63. package/dist/ui/index.d.ts.map +1 -1
  64. package/dist/ui/index.js +187 -180
  65. package/dist/ui/input.d.ts +1 -1
  66. package/dist/ui/input.d.ts.map +1 -1
  67. package/dist/ui/input.js +10 -9
  68. package/dist/ui/label.js +1 -1
  69. package/dist/ui/progress-ring.d.ts +46 -0
  70. package/dist/ui/progress-ring.d.ts.map +1 -0
  71. package/dist/ui/progress-ring.js +144 -0
  72. package/dist/ui/search-input.d.ts +1 -1
  73. package/dist/ui/search-input.d.ts.map +1 -1
  74. package/dist/ui/search-input.js +9 -8
  75. package/dist/ui/select.d.ts +1 -1
  76. package/dist/ui/select.d.ts.map +1 -1
  77. package/dist/ui/select.js +28 -27
  78. package/dist/ui/sheet.js +1 -1
  79. package/dist/ui/sidebar.d.ts.map +1 -1
  80. package/dist/ui/sidebar.js +15 -15
  81. package/dist/ui/status-dot.d.ts +27 -0
  82. package/dist/ui/status-dot.d.ts.map +1 -0
  83. package/dist/ui/status-dot.js +64 -0
  84. package/dist/ui/textarea.d.ts +1 -1
  85. package/dist/ui/textarea.d.ts.map +1 -1
  86. package/dist/ui/textarea.js +13 -12
  87. package/docs/components/composed/bulk-action-bar.md +40 -0
  88. package/docs/components/composed/deadline-indicator.md +27 -0
  89. package/docs/components/composed/emoji-picker.md +43 -0
  90. package/docs/components/composed/file-preview.md +40 -0
  91. package/docs/components/composed/filter-bar.md +57 -0
  92. package/docs/components/composed/form-section.md +31 -0
  93. package/docs/components/composed/inline-edit.md +35 -0
  94. package/docs/components/composed/markdown-viewer.md +27 -0
  95. package/docs/components/composed/master-detail.md +48 -0
  96. package/docs/components/composed/multi-select-popover.md +53 -0
  97. package/docs/components/composed/responsive-overlay.md +34 -0
  98. package/docs/components/ui/color-swatch.md +25 -0
  99. package/docs/components/ui/progress-ring.md +41 -0
  100. package/docs/components/ui/status-dot.md +26 -0
  101. package/llms-full.txt +528 -1
  102. package/llms.txt +37 -9
  103. package/package.json +808 -733
@@ -0,0 +1,185 @@
1
+ "use client";
2
+ import { jsxs as l, jsx as n, Fragment as H } from "react/jsx-runtime";
3
+ import * as r from "react";
4
+ import { cn as L } from "../ui/lib/utils.js";
5
+ import { Popover as J, PopoverTrigger as Q, PopoverContent as V } from "../ui/popover.js";
6
+ import { IconSearch as W, IconCheck as X } from "@tabler/icons-react";
7
+ import { springs as P } from "../ui/lib/motion.js";
8
+ import { Spinner as Y } from "../ui/spinner.js";
9
+ import { m as A } from "../_chunks/framer.js";
10
+ const Z = r.forwardRef(
11
+ ({
12
+ items: g,
13
+ groups: o,
14
+ value: d,
15
+ onValueChange: w,
16
+ searchPlaceholder: T = "Search...",
17
+ onSearch: c,
18
+ searchDebounce: v = 300,
19
+ renderItem: N,
20
+ emptyMessage: j = "No results found",
21
+ maxSelections: k,
22
+ align: q = "start",
23
+ width: F,
24
+ children: O,
25
+ className: K,
26
+ ...$
27
+ }, z) => {
28
+ const [f, G] = r.useState(!1), [a, C] = r.useState(""), [u, m] = r.useState(null), [S, h] = r.useState(!1), [i, p] = r.useState(-1), y = r.useRef(), I = r.useRef(null);
29
+ r.useEffect(() => {
30
+ f || (C(""), m(null), p(-1));
31
+ }, [f]), r.useEffect(() => {
32
+ if (!(!c || !f)) {
33
+ if (!a.trim()) {
34
+ m(null), h(!1);
35
+ return;
36
+ }
37
+ return h(!0), clearTimeout(y.current), y.current = setTimeout(() => {
38
+ c(a).then((e) => m(e)).catch(() => m([])).finally(() => h(!1));
39
+ }, v), () => clearTimeout(y.current);
40
+ }
41
+ }, [a, c, v, f]);
42
+ const b = r.useMemo(() => u || (o ? o.flatMap((e) => e.items) : g ?? []), [g, o, u]), x = r.useMemo(() => {
43
+ if (c) return b;
44
+ const e = a.toLowerCase();
45
+ return e ? b.filter((s) => s.label.toLowerCase().includes(e)) : b;
46
+ }, [b, a, c]), R = r.useMemo(() => {
47
+ if (!o || c || u) return null;
48
+ const e = a.toLowerCase();
49
+ return o.map((s) => ({
50
+ ...s,
51
+ items: e ? s.items.filter((t) => t.label.toLowerCase().includes(e)) : s.items
52
+ })).filter((s) => s.items.length > 0);
53
+ }, [o, a, c, u]);
54
+ function M(e) {
55
+ if (d.includes(e))
56
+ w(d.filter((t) => t !== e));
57
+ else {
58
+ if (k && d.length >= k) return;
59
+ w([...d, e]);
60
+ }
61
+ }
62
+ r.useEffect(() => {
63
+ p(-1);
64
+ }, [a]), r.useEffect(() => {
65
+ var t;
66
+ if (i < 0) return;
67
+ const e = I.current;
68
+ if (!e) return;
69
+ (t = e.querySelectorAll("[data-multiselect-item]")[i]) == null || t.scrollIntoView({ block: "nearest" });
70
+ }, [i]);
71
+ function U(e) {
72
+ const s = x.length;
73
+ if (s !== 0) {
74
+ if (e.key === "ArrowDown")
75
+ e.preventDefault(), p((t) => t < s - 1 ? t + 1 : 0);
76
+ else if (e.key === "ArrowUp")
77
+ e.preventDefault(), p((t) => t <= 0 ? s - 1 : t - 1);
78
+ else if (e.key === "Enter" && i >= 0) {
79
+ e.preventDefault();
80
+ const t = x[i];
81
+ t && !t.disabled && M(t.id);
82
+ }
83
+ }
84
+ }
85
+ let B = 0;
86
+ function D(e) {
87
+ const s = d.includes(e.id), t = B++, E = t === i;
88
+ return /* @__PURE__ */ l(
89
+ A.button,
90
+ {
91
+ id: `msp-item-${t}`,
92
+ type: "button",
93
+ disabled: e.disabled,
94
+ "data-multiselect-item": "",
95
+ "data-focused": E ? "" : void 0,
96
+ initial: { opacity: 0, x: -8 },
97
+ animate: { opacity: 1, x: 0 },
98
+ transition: { ...P.snappy, delay: t * 0.02 },
99
+ onClick: () => M(e.id),
100
+ className: L(
101
+ "flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left transition-colors duration-fast-01 ease-productive-standard",
102
+ "hover:bg-surface-raised-hover",
103
+ "disabled:opacity-action-disabled disabled:cursor-not-allowed",
104
+ s && "bg-accent-2 text-accent-11",
105
+ E && "bg-surface-raised-hover"
106
+ ),
107
+ children: [
108
+ N ? /* @__PURE__ */ n("span", { className: "flex-1 min-w-0", children: N(e, s) }) : /* @__PURE__ */ l(H, { children: [
109
+ e.image && /* @__PURE__ */ n(
110
+ "img",
111
+ {
112
+ src: e.image,
113
+ alt: "",
114
+ className: "h-ico-md w-ico-md rounded-full object-cover shrink-0"
115
+ }
116
+ ),
117
+ /* @__PURE__ */ l("span", { className: "flex-1 min-w-0", children: [
118
+ /* @__PURE__ */ n("span", { className: "block truncate text-ds-md font-body text-surface-fg", children: e.label }),
119
+ e.description && /* @__PURE__ */ n("span", { className: "block truncate text-ds-xs text-surface-fg-subtle", children: e.description })
120
+ ] })
121
+ ] }),
122
+ s && /* @__PURE__ */ n(
123
+ A.span,
124
+ {
125
+ initial: { scale: 0 },
126
+ animate: { scale: 1 },
127
+ transition: P.bouncy,
128
+ className: "inline-flex shrink-0",
129
+ children: /* @__PURE__ */ n(X, { className: "h-ico-sm w-ico-sm text-accent-11" })
130
+ }
131
+ )
132
+ ]
133
+ },
134
+ e.id
135
+ );
136
+ }
137
+ return /* @__PURE__ */ l(J, { open: f, onOpenChange: G, children: [
138
+ /* @__PURE__ */ n(Q, { asChild: !0, children: O }),
139
+ /* @__PURE__ */ l(
140
+ V,
141
+ {
142
+ ref: z,
143
+ ...$,
144
+ className: L(
145
+ "border-surface-border-strong bg-surface-overlay p-0",
146
+ K
147
+ ),
148
+ style: { width: F ?? 240 },
149
+ align: q,
150
+ sideOffset: 4,
151
+ children: [
152
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-ds-03 border-b border-surface-border-strong px-ds-04 py-ds-03", children: [
153
+ /* @__PURE__ */ n(W, { className: "h-ico-sm w-ico-sm shrink-0 text-surface-fg-subtle", stroke: 1.5 }),
154
+ /* @__PURE__ */ n(
155
+ "input",
156
+ {
157
+ type: "text",
158
+ placeholder: T,
159
+ value: a,
160
+ onChange: (e) => C(e.target.value),
161
+ onKeyDown: U,
162
+ "aria-label": "Search",
163
+ "aria-activedescendant": i >= 0 ? `msp-item-${i}` : void 0,
164
+ className: "w-full bg-transparent text-ds-md font-body text-surface-fg placeholder:text-surface-fg-subtle outline-none"
165
+ }
166
+ ),
167
+ S && /* @__PURE__ */ n(Y, { size: "sm" })
168
+ ] }),
169
+ /* @__PURE__ */ l("div", { ref: I, className: "max-h-[240px] overflow-y-auto py-ds-02", children: [
170
+ R ? R.map((e) => /* @__PURE__ */ l("div", { children: [
171
+ /* @__PURE__ */ n("div", { className: "px-ds-04 py-ds-02 text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: e.label }),
172
+ e.items.map(D)
173
+ ] }, e.label)) : x.map(D),
174
+ !S && x.length === 0 && /* @__PURE__ */ n("p", { className: "px-ds-04 py-ds-05 text-center text-ds-sm font-body text-surface-fg-subtle", children: j })
175
+ ] })
176
+ ]
177
+ }
178
+ )
179
+ ] });
180
+ }
181
+ );
182
+ Z.displayName = "MultiSelectPopover";
183
+ export {
184
+ Z as MultiSelectPopover
185
+ };
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ export interface ResponsiveOverlayProps {
4
+ open: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ title?: string;
7
+ description?: string;
8
+ /** Below this breakpoint renders as bottom Sheet @default 'md' */
9
+ breakpoint?: 'sm' | 'md';
10
+ children: React.ReactNode;
11
+ className?: string;
12
+ }
13
+ declare function ResponsiveOverlay({ open, onOpenChange, title, description, breakpoint, children, className, }: ResponsiveOverlayProps): import("react/jsx-runtime").JSX.Element;
14
+ export { ResponsiveOverlay };
15
+ //# sourceMappingURL=responsive-overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responsive-overlay.d.ts","sourceRoot":"","sources":["../../src/composed/responsive-overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAoB9B,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA8BD,iBAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAiB,EACjB,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,2CAgCxB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import { jsx as n, jsxs as l } from "react/jsx-runtime";
3
+ import * as h from "react";
4
+ import { Dialog as c, DialogContent as d, DialogHeader as m, DialogTitle as f, DialogDescription as u } from "../ui/dialog.js";
5
+ import { Sheet as D, SheetContent as b, SheetHeader as g, SheetTitle as v, SheetDescription as x } from "../ui/sheet.js";
6
+ const M = {
7
+ sm: "640px",
8
+ md: "768px"
9
+ };
10
+ function S(t) {
11
+ const [i, r] = h.useState(!1);
12
+ return h.useEffect(() => {
13
+ if (typeof window > "u") return;
14
+ const e = window.matchMedia(`(max-width: ${M[t]})`);
15
+ r(e.matches);
16
+ const o = (s) => r(s.matches);
17
+ return e.addEventListener("change", o), () => e.removeEventListener("change", o);
18
+ }, [t]), i;
19
+ }
20
+ function j({
21
+ open: t,
22
+ onOpenChange: i,
23
+ title: r,
24
+ description: e,
25
+ breakpoint: o = "md",
26
+ children: s,
27
+ className: a
28
+ }) {
29
+ return S(o) ? /* @__PURE__ */ n(D, { open: t, onOpenChange: i, children: /* @__PURE__ */ l(b, { side: "bottom", className: a, children: [
30
+ (r || e) && /* @__PURE__ */ l(g, { children: [
31
+ r && /* @__PURE__ */ n(v, { children: r }),
32
+ e && /* @__PURE__ */ n(x, { children: e })
33
+ ] }),
34
+ s
35
+ ] }) }) : /* @__PURE__ */ n(c, { open: t, onOpenChange: i, children: /* @__PURE__ */ l(d, { className: a, children: [
36
+ (r || e) && /* @__PURE__ */ l(m, { children: [
37
+ r && /* @__PURE__ */ n(f, { children: r }),
38
+ e && /* @__PURE__ */ n(u, { children: e })
39
+ ] }),
40
+ s
41
+ ] }) });
42
+ }
43
+ export {
44
+ j as ResponsiveOverlay
45
+ };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as s, jsxs as h } from "react/jsx-runtime";
3
3
  import * as o from "react";
4
- import { O as p, w as R, x as u, y as g, D as y, A as x, z as b, B as C, E as j } from "../_chunks/primitives.js";
4
+ import { O as p, v as R, w as u, x as g, D as y, A as x, y as b, z as C, B as j } from "../_chunks/primitives.js";
5
5
  import { cn as i } from "./lib/utils.js";
6
6
  import { tweens as f, springs as M } from "./lib/motion.js";
7
7
  import { A as T, m } from "../_chunks/framer.js";
@@ -111,7 +111,7 @@ const B = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
111
111
  }
112
112
  ));
113
113
  B.displayName = g.displayName;
114
- const E = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
114
+ const I = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
115
115
  y,
116
116
  {
117
117
  ref: e,
@@ -119,8 +119,8 @@ const E = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
119
119
  ...a
120
120
  }
121
121
  ));
122
- E.displayName = y.displayName;
123
- const I = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
122
+ I.displayName = y.displayName;
123
+ const S = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
124
124
  x,
125
125
  {
126
126
  ref: e,
@@ -131,8 +131,8 @@ const I = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
131
131
  ...a
132
132
  }
133
133
  ));
134
- I.displayName = x.displayName;
135
- const S = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
134
+ S.displayName = x.displayName;
135
+ const V = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
136
136
  b,
137
137
  {
138
138
  ref: e,
@@ -143,13 +143,13 @@ const S = o.forwardRef(({ className: t, ...a }, e) => /* @__PURE__ */ s(
143
143
  ...a
144
144
  }
145
145
  ));
146
- S.displayName = b.displayName;
146
+ V.displayName = b.displayName;
147
147
  export {
148
148
  P as AlertDialog,
149
- I as AlertDialogAction,
150
- S as AlertDialogCancel,
149
+ S as AlertDialogAction,
150
+ V as AlertDialogCancel,
151
151
  H as AlertDialogContent,
152
- E as AlertDialogDescription,
152
+ I as AlertDialogDescription,
153
153
  k as AlertDialogFooter,
154
154
  O as AlertDialogHeader,
155
155
  N as AlertDialogOverlay,
package/dist/ui/avatar.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as a, jsxs as R } from "react/jsx-runtime";
3
3
  import * as l from "react";
4
- import { F as v, J as N, K as C } from "../_chunks/primitives.js";
4
+ import { E as v, F as N, J as C } from "../_chunks/primitives.js";
5
5
  import { ay as F } from "../_chunks/vendor-utils.js";
6
6
  import { springs as k } from "./lib/motion.js";
7
7
  import { cn as n } from "./lib/utils.js";
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  export declare const buttonVariants: (props?: ({
5
5
  variant?: "link" | "outline" | "default" | "solid" | "destructive" | "ghost" | null | undefined;
6
6
  color?: "default" | "error" | null | undefined;
7
- size?: "sm" | "md" | "icon" | "lg" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
7
+ size?: "xs" | "sm" | "md" | "icon" | "lg" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
9
  /**
10
10
  * Props for Button — the primary action component with a two-axis variant system,
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,eAAO,MAAM,cAAc;;;;8EAoD1B,CAAA;AAwBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAClE,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;IAC5C,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACxE,oFAAoF;IACpF,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B;AAED,QAAA,MAAM,MAAM,uFA8KX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,eAAO,MAAM,cAAc;;;;8EAsD1B,CAAA;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAClE,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;IAC5C,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACxE,oFAAoF;IACpF,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B;AAED,QAAA,MAAM,MAAM,uFA8KX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,CAAA"}
package/dist/ui/button.js CHANGED
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as C } from "react/jsx-runtime";
3
- import { ay as K } from "../_chunks/vendor-utils.js";
3
+ import { ay as J } from "../_chunks/vendor-utils.js";
4
4
  import { IconCheck as L, IconX as O } from "@tabler/icons-react";
5
- import { S as P, M as Q } from "../_chunks/primitives.js";
5
+ import { S as P, K as Q } from "../_chunks/primitives.js";
6
6
  import * as a from "react";
7
7
  import { useButtonGroup as U } from "./button-group.js";
8
8
  import { springs as Y } from "./lib/motion.js";
9
9
  import { cn as c } from "./lib/utils.js";
10
10
  import { Spinner as Z } from "./spinner.js";
11
11
  import { A as _, m as $ } from "../_chunks/framer.js";
12
- const R = K(
12
+ const R = J(
13
13
  "inline-flex items-center justify-center gap-ds-03 whitespace-nowrap font-sans font-semibold select-none border border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-action-disabled disabled:cursor-not-allowed",
14
14
  {
15
15
  variants: {
@@ -28,11 +28,13 @@ const R = K(
28
28
  error: ""
29
29
  },
30
30
  size: {
31
+ xs: "h-ds-xs-plus rounded-ds-sm px-ds-03 text-ds-sm",
31
32
  sm: "h-ds-sm rounded-ds-md px-ds-04 text-ds-sm",
32
33
  md: "h-ds-md rounded-ds-md px-ds-05 text-ds-md",
33
34
  lg: "h-ds-lg rounded-ds-lg px-ds-06 text-ds-base",
34
35
  icon: "h-ds-md w-ds-md rounded-ds-md",
35
36
  // alias → icon-md
37
+ "icon-xs": "h-ds-xs-plus w-ds-xs-plus rounded-ds-sm",
36
38
  "icon-sm": "h-ds-sm w-ds-sm rounded-ds-md",
37
39
  "icon-md": "h-ds-md w-ds-md rounded-ds-md",
38
40
  "icon-lg": "h-ds-lg w-ds-lg rounded-ds-lg"
@@ -43,12 +45,12 @@ const R = K(
43
45
  { variant: "solid", color: "default", className: "bg-accent-9 text-accent-fg hover:bg-accent-10 active:bg-accent-10 shadow-raised hover:shadow-brand" },
44
46
  // "default" alias → same as solid + default
45
47
  { variant: "default", color: "default", className: "bg-accent-9 text-accent-fg hover:bg-accent-10 active:bg-accent-10 shadow-raised hover:shadow-brand" },
46
- { variant: "default", color: "error", className: "bg-error-9 text-accent-fg hover:bg-error-9 active:bg-error-9 shadow-raised" },
48
+ { variant: "default", color: "error", className: "bg-error-9 text-accent-fg hover:bg-error-10 active:bg-error-10 shadow-raised" },
47
49
  // "destructive" alias → solid + error
48
- { variant: "destructive", color: "default", className: "bg-error-9 text-accent-fg hover:bg-error-9 active:bg-error-9 shadow-raised" },
49
- { variant: "destructive", color: "error", className: "bg-error-9 text-accent-fg hover:bg-error-9 active:bg-error-9 shadow-raised" },
50
+ { variant: "destructive", color: "default", className: "bg-error-9 text-accent-fg hover:bg-error-10 active:bg-error-10 shadow-raised" },
51
+ { variant: "destructive", color: "error", className: "bg-error-9 text-accent-fg hover:bg-error-10 active:bg-error-10 shadow-raised" },
50
52
  // solid + error
51
- { variant: "solid", color: "error", className: "bg-error-9 text-accent-fg hover:bg-error-9 active:bg-error-9 shadow-raised" },
53
+ { variant: "solid", color: "error", className: "bg-error-9 text-accent-fg hover:bg-error-10 active:bg-error-10 shadow-raised" },
52
54
  // outline + default (secondary)
53
55
  { variant: "outline", color: "default", className: "bg-transparent text-accent-11 border-accent-7 hover:bg-accent-2 active:bg-surface-raised-active" },
54
56
  // outline + error (error-ghost)
@@ -65,35 +67,39 @@ const R = K(
65
67
  }
66
68
  }
67
69
  ), W = {
70
+ xs: "h-3.5 w-3.5 [&>svg]:h-3.5 [&>svg]:w-3.5",
68
71
  sm: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
69
72
  md: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
70
73
  lg: "h-ico-md w-ico-md [&>svg]:h-ico-md [&>svg]:w-ico-md",
71
74
  icon: "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
75
+ "icon-xs": "h-3.5 w-3.5 [&>svg]:h-3.5 [&>svg]:w-3.5",
72
76
  "icon-sm": "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
73
77
  "icon-md": "h-ico-sm w-ico-sm [&>svg]:h-ico-sm [&>svg]:w-ico-sm",
74
78
  "icon-lg": "h-ico-md w-ico-md [&>svg]:h-ico-md [&>svg]:w-ico-md"
75
79
  }, ee = {
80
+ xs: "sm",
76
81
  sm: "sm",
77
82
  md: "sm",
78
83
  lg: "md",
79
84
  icon: "sm",
85
+ "icon-xs": "sm",
80
86
  "icon-sm": "sm",
81
87
  "icon-md": "sm",
82
88
  "icon-lg": "md"
83
- }, re = a.forwardRef(
89
+ }, se = a.forwardRef(
84
90
  ({
85
- className: b,
91
+ className: h,
86
92
  variant: A,
87
93
  color: V,
88
94
  size: B,
89
- asChild: M = !1,
90
- startIcon: h,
95
+ asChild: E = !1,
96
+ startIcon: b,
91
97
  endIcon: p,
92
- loading: E = !1,
98
+ loading: F = !1,
93
99
  loadingPosition: l = "start",
94
- fullWidth: w = !1,
95
- disabled: x,
96
- onClick: F,
100
+ fullWidth: x = !1,
101
+ disabled: w,
102
+ onClick: M,
97
103
  onClickAsync: m,
98
104
  asyncFeedbackDuration: T = 1500,
99
105
  children: n,
@@ -113,25 +119,25 @@ const R = K(
113
119
  o.current && d("idle");
114
120
  }, T));
115
121
  }));
116
- }, j = !!m, r = j ? t === "loading" : E, s = t === "success" || t === "error", g = r ? /* @__PURE__ */ e(Z, { size: G }) : null;
117
- if (M) {
122
+ }, j = !!m, s = j ? t === "loading" : F, r = t === "success" || t === "error", g = s ? /* @__PURE__ */ e(Z, { size: G }) : null;
123
+ if (E) {
118
124
  const v = {
119
125
  className: c(
120
126
  R({ variant: S, color: z, size: i }),
121
- w && "w-full",
122
- b
127
+ x && "w-full",
128
+ h
123
129
  ),
124
130
  ref: N,
125
- disabled: x || r,
126
- "aria-busy": r || void 0,
131
+ disabled: w || s,
132
+ "aria-busy": s || void 0,
127
133
  ...y
128
134
  };
129
135
  return /* @__PURE__ */ e(P, { ...v, children: /* @__PURE__ */ e(Q, { children: n }) });
130
136
  }
131
- const X = () => r && l === "start" ? g : h ? /* @__PURE__ */ e("span", { className: c("inline-flex shrink-0 items-center justify-center", f), children: h }) : null, q = () => r && l === "end" ? g : p ? /* @__PURE__ */ e("span", { className: c("inline-flex shrink-0 items-center justify-center", f), children: p }) : null, D = () => r && l === "center" ? /* @__PURE__ */ C("span", { className: "relative inline-flex items-center justify-center", children: [
137
+ const K = () => s && l === "start" ? g : b ? /* @__PURE__ */ e("span", { className: c("inline-flex shrink-0 items-center justify-center", f), children: b }) : null, X = () => s && l === "end" ? g : p ? /* @__PURE__ */ e("span", { className: c("inline-flex shrink-0 items-center justify-center", f), children: p }) : null, q = () => s && l === "center" ? /* @__PURE__ */ C("span", { className: "relative inline-flex items-center justify-center", children: [
132
138
  /* @__PURE__ */ e("span", { className: "invisible", children: n }),
133
139
  /* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center", children: g })
134
- ] }) : n, H = s ? t === "success" ? "bg-success-9 text-accent-fg border-transparent hover:bg-success-9" : "bg-error-9 text-accent-fg border-transparent hover:bg-error-9" : void 0, J = s ? /* @__PURE__ */ e(_, { mode: "wait", children: /* @__PURE__ */ e(
140
+ ] }) : n, D = r ? t === "success" ? "bg-success-9 text-accent-fg border-transparent hover:bg-success-9" : "bg-error-9 text-accent-fg border-transparent hover:bg-error-9" : void 0, H = r ? /* @__PURE__ */ e(_, { mode: "wait", children: /* @__PURE__ */ e(
135
141
  $.span,
136
142
  {
137
143
  initial: { opacity: 0, scale: 0.5 },
@@ -149,27 +155,27 @@ const R = K(
149
155
  ...y,
150
156
  className: c(
151
157
  R({ variant: S, color: z, size: i }),
152
- w && "w-full",
153
- !r && !s && "active:scale-[0.95] transition-[color,background-color,border-color,box-shadow,transform] duration-fast-01 ease-productive-standard",
154
- H,
155
- s && "transition-colors duration-moderate-01 ease-productive-standard",
156
- b
158
+ x && "w-full",
159
+ !s && !r && "active:scale-[0.95] transition-[color,background-color,border-color,box-shadow,transform] duration-fast-01 ease-productive-standard",
160
+ D,
161
+ r && "transition-colors duration-moderate-01 ease-productive-standard",
162
+ h
157
163
  ),
158
164
  ref: N,
159
- disabled: x || r || s,
160
- "aria-busy": r || void 0,
161
- onClick: j ? I : F,
165
+ disabled: w || s || r,
166
+ "aria-busy": s || void 0,
167
+ onClick: j ? I : M,
162
168
  children: [
163
- s ? J : X(),
164
- s ? n : D(),
165
- s ? null : q()
169
+ r ? H : K(),
170
+ r ? n : q(),
171
+ r ? null : X()
166
172
  ]
167
173
  }
168
174
  );
169
175
  }
170
176
  );
171
- re.displayName = "Button";
177
+ se.displayName = "Button";
172
178
  export {
173
- re as Button,
179
+ se as Button,
174
180
  R as buttonVariants
175
181
  };
package/dist/ui/card.d.ts CHANGED
@@ -4,56 +4,14 @@ import * as React from 'react';
4
4
  declare const cardVariants: (props?: ({
5
5
  variant?: "flat" | "outline" | "default" | "elevated" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
- /**
8
- * Props for Card — a general-purpose content container with 4 elevation/style variants and
9
- * an optional interactive hover state.
10
- *
11
- * **Variants:** `default` (subtle border + shadow-raised) | `elevated` (stronger shadow-raised-hover) |
12
- * `outline` (2px solid border, no shadow) | `flat` (filled background, no shadow)
13
- *
14
- * **Composition:** Use sub-components `<CardHeader>`, `<CardTitle>`, `<CardDescription>`,
15
- * `<CardContent>`, and `<CardFooter>` for consistent internal spacing.
16
- *
17
- * **Interactive:** Pass `interactive` to enable hover shadow lift and pointer cursor —
18
- * useful for clickable cards in grids.
19
- *
20
- * @example
21
- * // Standard content card with header and body:
22
- * <Card>
23
- * <CardHeader>
24
- * <CardTitle>Project Alpha</CardTitle>
25
- * <CardDescription>Last updated 2 hours ago</CardDescription>
26
- * </CardHeader>
27
- * <CardContent>
28
- * <p>Sprint 4 is in progress with 12 open tasks.</p>
29
- * </CardContent>
30
- * </Card>
31
- *
32
- * @example
33
- * // Elevated card for a dashboard stat widget:
34
- * <Card variant="elevated">
35
- * <CardContent>
36
- * <StatCard label="Revenue" value="$12,400" delta={{ value: "+8%", direction: "up" }} />
37
- * </CardContent>
38
- * </Card>
39
- *
40
- * @example
41
- * // Clickable card in a project grid (interactive hover effect):
42
- * <Card interactive onClick={() => router.push(`/projects/${id}`)}>
43
- * <CardHeader>
44
- * <CardTitle>{project.name}</CardTitle>
45
- * </CardHeader>
46
- * </Card>
47
- *
48
- * @example
49
- * // Flat card for a sidebar panel section (no shadow):
50
- * <Card variant="flat" className="p-ds-05">
51
- * <p className="text-surface-fg-muted text-ds-sm">No recent activity</p>
52
- * </Card>
53
- * // These are just a few ways — feel free to combine props creatively!
54
- */
55
7
  export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
56
8
  interactive?: boolean;
9
+ /** Position of the accent border strip */
10
+ accent?: 'left' | 'top' | 'right' | 'bottom';
11
+ /** Semantic color key or any CSS color string for the accent strip. Requires `accent` to be set. @default 'default' */
12
+ accentColor?: 'default' | 'secondary' | 'error' | 'success' | 'warning' | 'info' | (string & {});
13
+ /** Width of the accent strip in pixels @default 3 */
14
+ accentWidth?: 2 | 3 | 4 | 6;
57
15
  }
58
16
  declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
59
17
  declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/ui/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAMjE,QAAA,MAAM,YAAY;;8EAajB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,QAAA,MAAM,IAAI,kFAuBT,CAAA;AAGD,QAAA,MAAM,UAAU,6GASd,CAAA;AAGF,QAAA,MAAM,SAAS,6GASb,CAAA;AAGF,QAAA,MAAM,eAAe,6GASnB,CAAA;AAGF,QAAA,MAAM,WAAW,6GAKf,CAAA;AAGF,QAAA,MAAM,UAAU,6GASd,CAAA;AAGF,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/ui/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAMjE,QAAA,MAAM,YAAY;;8EAajB,CAAA;AA2DD,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;IAC5C,uHAAuH;IACvH,WAAW,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAChG,qDAAqD;IACrD,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAC5B;AAwBD,QAAA,MAAM,IAAI,kFA2CT,CAAA;AAGD,QAAA,MAAM,UAAU,6GASd,CAAA;AAGF,QAAA,MAAM,SAAS,6GASb,CAAA;AAGF,QAAA,MAAM,eAAe,6GASnB,CAAA;AAGF,QAAA,MAAM,WAAW,6GAKf,CAAA;AAGF,QAAA,MAAM,UAAU,6GASd,CAAA;AAGF,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA"}