@devalok/shilp-sutra 0.27.2 → 0.29.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 (250) hide show
  1. package/dist/_chunks/badge-group.js +299 -0
  2. package/dist/_chunks/framer.js +1915 -1980
  3. package/dist/_chunks/keybinding.js +4 -5
  4. package/dist/_chunks/primitives.js +3198 -3272
  5. package/dist/_chunks/sonner.js +29 -31
  6. package/dist/_chunks/stat-row.js +110 -131
  7. package/dist/_chunks/tiptap.js +42 -78
  8. package/dist/_chunks/tree-view.js +138 -149
  9. package/dist/_chunks/typing-indicator.js +565 -0
  10. package/dist/_chunks/use-calendar.js +416 -439
  11. package/dist/_chunks/vendor-client.js +977 -814
  12. package/dist/_chunks/vendor-utils.js +5 -5
  13. package/dist/ai/block-renderer.js +22 -22
  14. package/dist/ai/blocks/loading.d.ts.map +1 -1
  15. package/dist/ai/command-bar.d.ts.map +1 -1
  16. package/dist/ai/command-bar.js +241 -263
  17. package/dist/ai/conversation.d.ts.map +1 -1
  18. package/dist/ai/conversation.js +87 -107
  19. package/dist/composed/activity-feed.d.ts +2 -0
  20. package/dist/composed/activity-feed.d.ts.map +1 -1
  21. package/dist/composed/activity-feed.js +118 -90
  22. package/dist/composed/avatar-group.d.ts +1 -0
  23. package/dist/composed/avatar-group.d.ts.map +1 -1
  24. package/dist/composed/avatar-group.js +91 -67
  25. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  26. package/dist/composed/bulk-action-bar.js +29 -28
  27. package/dist/composed/command-palette.d.ts.map +1 -1
  28. package/dist/composed/command-palette.js +99 -113
  29. package/dist/composed/content-card.js +1 -1
  30. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  31. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  32. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  33. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  34. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  35. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  36. package/dist/composed/deadline-indicator.js +29 -28
  37. package/dist/composed/error-boundary.d.ts.map +1 -1
  38. package/dist/composed/error-boundary.js +30 -27
  39. package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
  40. package/dist/composed/file-preview.d.ts.map +1 -1
  41. package/dist/composed/file-preview.js +261 -271
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +49 -48
  44. package/dist/composed/form-section.d.ts.map +1 -1
  45. package/dist/composed/form-section.js +12 -11
  46. package/dist/composed/global-loading.js +1 -1
  47. package/dist/composed/index.js +63 -63
  48. package/dist/composed/inline-edit.d.ts.map +1 -1
  49. package/dist/composed/inline-edit.js +55 -54
  50. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  51. package/dist/composed/markdown-viewer.js +44 -43
  52. package/dist/composed/master-detail.d.ts.map +1 -1
  53. package/dist/composed/master-detail.js +35 -34
  54. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  55. package/dist/composed/multi-select-popover.js +64 -64
  56. package/dist/composed/page-header.d.ts.map +1 -1
  57. package/dist/composed/page-header.js +31 -37
  58. package/dist/composed/priority-indicator.d.ts.map +1 -1
  59. package/dist/composed/priority-indicator.js +37 -36
  60. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  61. package/dist/composed/rich-text-editor.js +287 -306
  62. package/dist/composed/schedule-view.js +62 -62
  63. package/dist/composed/status-badge.d.ts +4 -2
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +58 -45
  66. package/dist/shell/app-command-palette.d.ts.map +1 -1
  67. package/dist/shell/app-command-palette.js +93 -93
  68. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  69. package/dist/shell/bottom-navbar.js +21 -20
  70. package/dist/shell/index.js +18 -18
  71. package/dist/shell/notification-center.d.ts.map +1 -1
  72. package/dist/shell/notification-center.js +96 -95
  73. package/dist/shell/notification-preferences.d.ts.map +1 -1
  74. package/dist/shell/notification-preferences.js +82 -85
  75. package/dist/shell/sidebar.js +59 -60
  76. package/dist/shell/top-bar.d.ts.map +1 -1
  77. package/dist/shell/top-bar.js +103 -103
  78. package/dist/tailwind/index.cjs +37 -4
  79. package/dist/tailwind/preset.d.ts.map +1 -1
  80. package/dist/tailwind/preset.js +38 -5
  81. package/dist/tokens/primitives.css +10 -0
  82. package/dist/tokens/semantic.css +70 -7
  83. package/dist/ui/accordion.d.ts +5 -2
  84. package/dist/ui/accordion.d.ts.map +1 -1
  85. package/dist/ui/accordion.js +44 -39
  86. package/dist/ui/alert-dialog.js +57 -57
  87. package/dist/ui/alert.d.ts +1 -1
  88. package/dist/ui/alert.d.ts.map +1 -1
  89. package/dist/ui/alert.js +30 -29
  90. package/dist/ui/aspect-ratio.js +4 -4
  91. package/dist/ui/autocomplete.js +56 -56
  92. package/dist/ui/avatar.js +2 -2
  93. package/dist/ui/badge-group.d.ts +22 -0
  94. package/dist/ui/badge-group.d.ts.map +1 -0
  95. package/dist/ui/badge-group.js +8 -0
  96. package/dist/ui/badge-indicator.d.ts +32 -0
  97. package/dist/ui/badge-indicator.d.ts.map +1 -0
  98. package/dist/ui/badge-indicator.js +54 -0
  99. package/dist/ui/badge.d.ts +27 -24
  100. package/dist/ui/badge.d.ts.map +1 -1
  101. package/dist/ui/badge.js +13 -129
  102. package/dist/ui/banner.d.ts +1 -1
  103. package/dist/ui/banner.d.ts.map +1 -1
  104. package/dist/ui/banner.js +27 -26
  105. package/dist/ui/breadcrumb.d.ts.map +1 -1
  106. package/dist/ui/breadcrumb.js +37 -36
  107. package/dist/ui/button-group.d.ts +12 -6
  108. package/dist/ui/button-group.d.ts.map +1 -1
  109. package/dist/ui/button-group.js +18 -18
  110. package/dist/ui/button-processing.d.ts +15 -0
  111. package/dist/ui/button-processing.d.ts.map +1 -0
  112. package/dist/ui/button-processing.js +77 -0
  113. package/dist/ui/button.d.ts +50 -25
  114. package/dist/ui/button.d.ts.map +1 -1
  115. package/dist/ui/button.js +243 -127
  116. package/dist/ui/card.js +20 -21
  117. package/dist/ui/charts/index.js +499 -508
  118. package/dist/ui/chat/date-separator.d.ts +12 -0
  119. package/dist/ui/chat/date-separator.d.ts.map +1 -0
  120. package/dist/ui/chat/index.d.ts +9 -0
  121. package/dist/ui/chat/index.d.ts.map +1 -0
  122. package/dist/ui/chat/index.js +12 -0
  123. package/dist/ui/chat/message-input.d.ts +16 -0
  124. package/dist/ui/chat/message-input.d.ts.map +1 -0
  125. package/dist/ui/chat/message-list.d.ts +24 -0
  126. package/dist/ui/chat/message-list.d.ts.map +1 -0
  127. package/dist/ui/chat/message.d.ts +108 -0
  128. package/dist/ui/chat/message.d.ts.map +1 -0
  129. package/dist/ui/chat/system-message.d.ts +11 -0
  130. package/dist/ui/chat/system-message.d.ts.map +1 -0
  131. package/dist/ui/chat/typing-indicator.d.ts +14 -0
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
  133. package/dist/ui/chat/unread-separator.d.ts +12 -0
  134. package/dist/ui/chat/unread-separator.d.ts.map +1 -0
  135. package/dist/ui/checkbox.js +18 -18
  136. package/dist/ui/chip.d.ts +13 -62
  137. package/dist/ui/chip.d.ts.map +1 -1
  138. package/dist/ui/chip.js +10 -109
  139. package/dist/ui/collapsible.js +4 -4
  140. package/dist/ui/color-input.d.ts +19 -5
  141. package/dist/ui/color-input.d.ts.map +1 -1
  142. package/dist/ui/color-input.js +371 -79
  143. package/dist/ui/color-swatch.js +11 -11
  144. package/dist/ui/combobox.d.ts.map +1 -1
  145. package/dist/ui/combobox.js +74 -80
  146. package/dist/ui/context-menu.d.ts.map +1 -1
  147. package/dist/ui/context-menu.js +86 -85
  148. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  149. package/dist/ui/data-table-toolbar.js +51 -57
  150. package/dist/ui/data-table.d.ts.map +1 -1
  151. package/dist/ui/data-table.js +268 -296
  152. package/dist/ui/devalok-grain.d.ts +81 -0
  153. package/dist/ui/devalok-grain.d.ts.map +1 -0
  154. package/dist/ui/devalok-grain.js +69 -0
  155. package/dist/ui/dialog.d.ts.map +1 -1
  156. package/dist/ui/dialog.js +73 -72
  157. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  158. package/dist/ui/dropdown-menu.js +93 -92
  159. package/dist/ui/file-upload.d.ts.map +1 -1
  160. package/dist/ui/file-upload.js +82 -82
  161. package/dist/ui/hover-card.js +29 -29
  162. package/dist/ui/icon-button.d.ts +7 -7
  163. package/dist/ui/icon-button.d.ts.map +1 -1
  164. package/dist/ui/icon-context.d.ts +15 -0
  165. package/dist/ui/icon-context.d.ts.map +1 -0
  166. package/dist/ui/icon-context.js +20 -0
  167. package/dist/ui/icon-group.d.ts +22 -0
  168. package/dist/ui/icon-group.d.ts.map +1 -0
  169. package/dist/ui/icon-group.js +32 -0
  170. package/dist/ui/icon.d.ts +57 -0
  171. package/dist/ui/icon.d.ts.map +1 -0
  172. package/dist/ui/icon.js +122 -0
  173. package/dist/ui/index.d.ts +8 -1
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +351 -329
  176. package/dist/ui/input-otp.d.ts.map +1 -1
  177. package/dist/ui/input-otp.js +21 -20
  178. package/dist/ui/input.d.ts +32 -11
  179. package/dist/ui/input.d.ts.map +1 -1
  180. package/dist/ui/input.js +149 -44
  181. package/dist/ui/label.js +1 -1
  182. package/dist/ui/lib/motion.d.ts +2 -0
  183. package/dist/ui/lib/motion.d.ts.map +1 -1
  184. package/dist/ui/lib/motion.js +13 -11
  185. package/dist/ui/lib/utils.js +1 -1
  186. package/dist/ui/menubar.d.ts.map +1 -1
  187. package/dist/ui/menubar.js +87 -86
  188. package/dist/ui/navigation-menu.d.ts.map +1 -1
  189. package/dist/ui/navigation-menu.js +23 -28
  190. package/dist/ui/number-input.d.ts.map +1 -1
  191. package/dist/ui/number-input.js +54 -53
  192. package/dist/ui/pagination.d.ts.map +1 -1
  193. package/dist/ui/pagination.js +45 -44
  194. package/dist/ui/popover.js +30 -30
  195. package/dist/ui/progress.d.ts +3 -1
  196. package/dist/ui/progress.d.ts.map +1 -1
  197. package/dist/ui/progress.js +43 -39
  198. package/dist/ui/radio.js +1 -1
  199. package/dist/ui/search-input.d.ts.map +1 -1
  200. package/dist/ui/search-input.js +47 -60
  201. package/dist/ui/segmented-control.js +1 -1
  202. package/dist/ui/select.d.ts.map +1 -1
  203. package/dist/ui/select.js +54 -53
  204. package/dist/ui/separator.js +5 -5
  205. package/dist/ui/sheet.d.ts.map +1 -1
  206. package/dist/ui/sheet.js +46 -45
  207. package/dist/ui/sidebar.d.ts.map +1 -1
  208. package/dist/ui/sidebar.js +196 -193
  209. package/dist/ui/skeleton.js +1 -1
  210. package/dist/ui/slider.js +1 -1
  211. package/dist/ui/spinner.js +74 -74
  212. package/dist/ui/stat-card.d.ts.map +1 -1
  213. package/dist/ui/stat-card.js +85 -86
  214. package/dist/ui/switch.d.ts +3 -0
  215. package/dist/ui/switch.d.ts.map +1 -1
  216. package/dist/ui/switch.js +40 -26
  217. package/dist/ui/tabs.js +43 -43
  218. package/dist/ui/text.js +1 -1
  219. package/dist/ui/textarea.js +10 -10
  220. package/dist/ui/toast.d.ts.map +1 -1
  221. package/dist/ui/toast.js +169 -169
  222. package/dist/ui/toggle-group.js +1 -1
  223. package/dist/ui/toggle.js +5 -5
  224. package/dist/ui/tooltip.js +41 -41
  225. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  226. package/docs/components/_header.md +4 -4
  227. package/docs/components/composed/activity-feed.md +7 -0
  228. package/docs/components/composed/avatar-group.md +8 -5
  229. package/docs/components/composed/status-badge.md +14 -1
  230. package/docs/components/ui/accordion.md +5 -2
  231. package/docs/components/ui/badge-group.md +38 -0
  232. package/docs/components/ui/badge-indicator.md +40 -0
  233. package/docs/components/ui/badge.md +36 -5
  234. package/docs/components/ui/button-processing.md +15 -0
  235. package/docs/components/ui/button.md +40 -11
  236. package/docs/components/ui/chat.md +214 -0
  237. package/docs/components/ui/color-input.md +58 -4
  238. package/docs/components/ui/data-table.md +3 -0
  239. package/docs/components/ui/devalok-grain.md +55 -0
  240. package/docs/components/ui/icon-button.md +12 -5
  241. package/docs/components/ui/icon-context.md +38 -0
  242. package/docs/components/ui/icon-group.md +36 -0
  243. package/docs/components/ui/icon.md +47 -0
  244. package/docs/components/ui/input.md +32 -6
  245. package/docs/components/ui/progress.md +5 -0
  246. package/docs/components/ui/spinner.md +3 -0
  247. package/docs/components/ui/switch.md +13 -0
  248. package/llms-full.txt +724 -44
  249. package/llms.txt +38 -19
  250. package/package.json +8 -2
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ export type ProcessingSpeed = 'ambient' | 'working' | 'urgent';
3
+ export interface ProcessingOverlayProps {
4
+ active: boolean;
5
+ speed: ProcessingSpeed;
6
+ /** Resolved color name — maps to CSS token `--color-{name}-9` */
7
+ color: string;
8
+ }
9
+ /**
10
+ * Internal overlay component for button processing state.
11
+ * Renders marching ants (SVG dashed rect with animated stroke-dashoffset).
12
+ * Not exported from the barrel — used only by Button.
13
+ */
14
+ export declare function ProcessingOverlay({ active, speed, color }: ProcessingOverlayProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=button-processing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-processing.d.ts","sourceRoot":"","sources":["../../src/ui/button-processing.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE9D,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,eAAe,CAAA;IACtB,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAA;CACd;AAwBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,sBAAsB,2CA6EjF"}
@@ -0,0 +1,77 @@
1
+ "use client";
2
+ import { jsx as i } from "react/jsx-runtime";
3
+ import * as e from "react";
4
+ import { A as k, m as w } from "../_chunks/framer.js";
5
+ const v = {
6
+ accent: "var(--color-accent-11)",
7
+ error: "var(--color-error-11)",
8
+ success: "var(--color-success-11)",
9
+ warning: "var(--color-warning-11)",
10
+ neutral: "var(--color-surface-fg)"
11
+ }, C = {
12
+ ambient: 3,
13
+ working: 2,
14
+ urgent: 1
15
+ };
16
+ function N({ active: t, speed: d, color: r }) {
17
+ const n = v[r] ?? v.accent, s = D(), x = C[d], l = e.useRef(null), [u, R] = e.useState(8), [f, E] = e.useState({ array: "8 6", cycle: 14 });
18
+ return e.useEffect(() => {
19
+ const o = l.current?.closest("span")?.previousElementSibling;
20
+ if (!o) return;
21
+ const b = getComputedStyle(o), M = parseFloat(b.borderRadius) || 8, p = o.offsetWidth - 2, h = o.offsetHeight - 2, a = Math.min(M, h / 2, p / 2);
22
+ R(a);
23
+ const m = 2 * (p - 2 * a) + 2 * (h - 2 * a) + 2 * Math.PI * a, c = 8, P = c + 6, y = Math.round(m / P), S = (m - y * c) / y, g = Math.max(2, S);
24
+ E({ array: `${c} ${g.toFixed(1)}`, cycle: c + g });
25
+ }, [t]), /* @__PURE__ */ i(k, { children: t && /* @__PURE__ */ i(
26
+ w.span,
27
+ {
28
+ initial: { opacity: 0 },
29
+ animate: { opacity: 1 },
30
+ exit: { opacity: 0 },
31
+ transition: { duration: 0.2 },
32
+ "aria-hidden": "true",
33
+ className: "absolute inset-0 pointer-events-none",
34
+ children: /* @__PURE__ */ i(
35
+ "svg",
36
+ {
37
+ className: "absolute inset-0 w-full h-full",
38
+ style: { overflow: "visible" },
39
+ children: /* @__PURE__ */ i(
40
+ w.rect,
41
+ {
42
+ ref: l,
43
+ x: "1",
44
+ y: "1",
45
+ width: "calc(100% - 2px)",
46
+ height: "calc(100% - 2px)",
47
+ rx: u,
48
+ ry: u,
49
+ fill: "none",
50
+ stroke: n,
51
+ strokeWidth: "2",
52
+ strokeDasharray: f.array,
53
+ style: { transition: "stroke 0.3s ease" },
54
+ animate: s ? {} : { strokeDashoffset: [0, -f.cycle] },
55
+ transition: s ? {} : {
56
+ duration: x,
57
+ ease: "linear",
58
+ repeat: 1 / 0
59
+ }
60
+ }
61
+ )
62
+ }
63
+ )
64
+ },
65
+ "processing-ants"
66
+ ) });
67
+ }
68
+ function D() {
69
+ const [t, d] = e.useState(() => typeof window > "u" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches);
70
+ return e.useEffect(() => {
71
+ const r = window.matchMedia("(prefers-reduced-motion: reduce)"), n = (s) => d(s.matches);
72
+ return r.addEventListener("change", n), () => r.removeEventListener("change", n);
73
+ }, []), t;
74
+ }
75
+ export {
76
+ N as ProcessingOverlay
77
+ };
@@ -2,21 +2,31 @@
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import * as React from 'react';
4
4
  export declare const buttonVariants: (props?: ({
5
- variant?: "link" | "outline" | "default" | "solid" | "destructive" | "ghost" | null | undefined;
6
- color?: "default" | "error" | null | undefined;
7
- size?: "xs" | "sm" | "md" | "icon" | "lg" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
5
+ variant?: "link" | "outline" | "default" | "solid" | "soft" | "ghost" | "destructive" | null | undefined;
6
+ color?: "default" | "accent" | "success" | "error" | "warning" | "neutral" | null | undefined;
7
+ weight?: "normal" | "semibold" | null | undefined;
8
+ size?: "xs" | "sm" | "md" | "lg" | "icon" | "compact-xs" | "compact-sm" | "compact-md" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | null | undefined;
8
9
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
10
  /**
10
11
  * Props for Button — the primary action component with a two-axis variant system,
11
- * 6 size options, icon slots, and a built-in loading state.
12
+ * multiple size options, icon slots, and a built-in loading state.
12
13
  *
13
14
  * **Two axes:**
14
- * - `variant` controls **visual style**: `"solid"` (default, filled brand) | `"outline"` (bordered) |
15
- * `"ghost"` (transparent, for toolbars) | `"link"` (underline, inline text actions)
16
- * - `color` controls **semantic intent**: `"default"` (brand interactive) | `"error"` (destructive)
15
+ * - `variant` controls **visual style**: `"solid"` (default, filled) | `"soft"` (tinted bg) |
16
+ * `"outline"` (bordered) | `"ghost"` (transparent, for toolbars) | `"link"` (underline, inline)
17
+ * - `color` controls **semantic intent**: `"accent"` (default, brand) | `"error"` (destructive) |
18
+ * `"success"` | `"warning"` | `"neutral"` (subdued)
17
19
  *
18
- * **Sizes:** `sm` | `md` (default) | `lg` for text buttons;
19
- * `icon-sm` | `icon-md` | `icon-lg` for square icon-only buttons (prefer `IconButton` for icon-only).
20
+ * **Sizes:** `xs` | `sm` | `md` (default) | `lg` for text buttons;
21
+ * `compact-xs` | `compact-sm` | `compact-md` for height-less inline buttons;
22
+ * `icon` | `icon-xs` | `icon-sm` | `icon-md` | `icon-lg` for square icon-only buttons.
23
+ *
24
+ * **Shape:** `"default"` uses per-size border-radius; `"pill"` applies `rounded-full`.
25
+ *
26
+ * **Weight:** `"semibold"` (default) | `"normal"` for lighter labels.
27
+ *
28
+ * **Note:** `ghost` + `accent` renders with neutral styling for backward compat —
29
+ * most ghost buttons are toolbar/icon actions where neutral is expected.
20
30
  *
21
31
  * **Loading:** When `loading={true}` the button is disabled and aria-busy is set.
22
32
  * Use `loadingPosition` to control where the spinner appears.
@@ -26,34 +36,37 @@ export declare const buttonVariants: (props?: ({
26
36
  * <Button onClick={handleSave}>Save changes</Button>
27
37
  *
28
38
  * @example
29
- * // Destructive delete with confirmation icon and loading state:
30
- * <Button variant="solid" color="error" startIcon={<IconTrash />} loading={isDeleting}>
31
- * Delete project
39
+ * // Soft success feedback:
40
+ * <Button variant="soft" color="success" startIcon={<Icon icon={IconCheck} />}>
41
+ * Approved
32
42
  * </Button>
33
43
  *
34
44
  * @example
35
- * // Ghost toolbar action (compact icon-adjacent button):
36
- * <Button variant="ghost" size="sm" startIcon={<IconEdit />}>
37
- * Edit
45
+ * // Destructive delete with loading state:
46
+ * <Button variant="solid" color="error" startIcon={<Icon icon={IconTrash} />} loading={isDeleting}>
47
+ * Delete project
38
48
  * </Button>
39
49
  *
40
50
  * @example
41
- * // Full-width form submit with centered loading spinner:
42
- * <Button fullWidth loading={isPending} loadingPosition="center">
43
- * Sign in
51
+ * // Compact pill tag:
52
+ * <Button variant="soft" color="warning" size="compact-sm" shape="pill">
53
+ * Overdue
44
54
  * </Button>
45
55
  *
46
56
  * @example
47
- * // Link variant for inline text actions (renders as a <button>):
48
- * <Button variant="link" onClick={openTerms}>View terms of service</Button>
49
- * // These are just a few ways — feel free to combine props creatively!
57
+ * // Ghost toolbar action:
58
+ * <Button variant="ghost" size="sm" startIcon={<Icon icon={IconEdit} />}>
59
+ * Edit
60
+ * </Button>
50
61
  */
51
62
  export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, VariantProps<typeof buttonVariants> {
52
63
  asChild?: boolean;
53
- /** Icon element rendered before children */
54
- startIcon?: React.ReactNode;
55
- /** Icon element rendered after children */
56
- endIcon?: React.ReactNode;
64
+ /** Button shape 'pill' applies rounded-full for chip/tag-like buttons */
65
+ shape?: 'default' | 'pill';
66
+ /** Icon element rendered before children — use <Icon icon={...} /> */
67
+ startIcon?: React.ReactElement | null;
68
+ /** Icon element rendered after children — use <Icon icon={...} /> */
69
+ endIcon?: React.ReactElement | null;
57
70
  /** Show loading spinner and disable button */
58
71
  loading?: boolean;
59
72
  /** Where to render the spinner: replaces startIcon, endIcon, or centers over children */
@@ -69,6 +82,18 @@ export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonE
69
82
  onClickAsync?: (e: React.MouseEvent<HTMLButtonElement>) => Promise<void>;
70
83
  /** How long (ms) to show the success/error state before reverting. Default: 1500 */
71
84
  asyncFeedbackDuration?: number;
85
+ /**
86
+ * Show processing animation — animated border/glow while content stays visible.
87
+ * `true` = "working" speed. Semantic speeds:
88
+ * - `"ambient"` (3s) — background sync, file upload
89
+ * - `"working"` (2s) — standard API call, generation
90
+ * - `"urgent"` (1s) — retry, nearly done
91
+ */
92
+ processing?: boolean | 'ambient' | 'working' | 'urgent';
93
+ /** Override processing animation color. Defaults to button's own color. */
94
+ processingColor?: 'accent' | 'error' | 'success' | 'warning' | 'neutral';
95
+ /** Disable button during processing. Default: true. Set false for cancel-by-click patterns. */
96
+ processingDisabled?: boolean;
72
97
  }
73
98
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
74
99
  export { Button };
@@ -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;;;;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"}
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;AAW9B,eAAO,MAAM,cAAc;;;;;8EAsG1B,CAAA;AAoDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;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,2EAA2E;IAC3E,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC1B,sEAAsE;IACtE,SAAS,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;IACrC,qEAAqE;IACrE,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;IACnC,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;IAE9B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;IAEvD,2EAA2E;IAC3E,eAAe,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;IAExE,+FAA+F;IAC/F,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,QAAA,MAAM,MAAM,uFAkRX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,CAAA"}