@devalok/shilp-sutra 0.28.0 → 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 (242) 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 +5 -5
  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 +73 -73
  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.js +134 -134
  141. package/dist/ui/color-swatch.js +11 -11
  142. package/dist/ui/combobox.d.ts.map +1 -1
  143. package/dist/ui/combobox.js +74 -80
  144. package/dist/ui/context-menu.d.ts.map +1 -1
  145. package/dist/ui/context-menu.js +86 -85
  146. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  147. package/dist/ui/data-table-toolbar.js +51 -57
  148. package/dist/ui/data-table.d.ts.map +1 -1
  149. package/dist/ui/data-table.js +268 -296
  150. package/dist/ui/devalok-grain.d.ts +81 -0
  151. package/dist/ui/devalok-grain.d.ts.map +1 -0
  152. package/dist/ui/devalok-grain.js +69 -0
  153. package/dist/ui/dialog.d.ts.map +1 -1
  154. package/dist/ui/dialog.js +73 -72
  155. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  156. package/dist/ui/dropdown-menu.js +93 -92
  157. package/dist/ui/file-upload.d.ts.map +1 -1
  158. package/dist/ui/file-upload.js +82 -82
  159. package/dist/ui/hover-card.js +29 -29
  160. package/dist/ui/icon-button.d.ts +7 -7
  161. package/dist/ui/icon-button.d.ts.map +1 -1
  162. package/dist/ui/icon-context.d.ts +15 -0
  163. package/dist/ui/icon-context.d.ts.map +1 -0
  164. package/dist/ui/icon-context.js +20 -0
  165. package/dist/ui/icon-group.d.ts +22 -0
  166. package/dist/ui/icon-group.d.ts.map +1 -0
  167. package/dist/ui/icon-group.js +32 -0
  168. package/dist/ui/icon.d.ts +57 -0
  169. package/dist/ui/icon.d.ts.map +1 -0
  170. package/dist/ui/icon.js +122 -0
  171. package/dist/ui/index.d.ts +8 -1
  172. package/dist/ui/index.d.ts.map +1 -1
  173. package/dist/ui/index.js +351 -329
  174. package/dist/ui/input-otp.d.ts.map +1 -1
  175. package/dist/ui/input-otp.js +21 -20
  176. package/dist/ui/input.d.ts +32 -11
  177. package/dist/ui/input.d.ts.map +1 -1
  178. package/dist/ui/input.js +149 -44
  179. package/dist/ui/lib/motion.d.ts +2 -0
  180. package/dist/ui/lib/motion.d.ts.map +1 -1
  181. package/dist/ui/lib/motion.js +13 -11
  182. package/dist/ui/lib/utils.js +1 -1
  183. package/dist/ui/menubar.d.ts.map +1 -1
  184. package/dist/ui/menubar.js +87 -86
  185. package/dist/ui/navigation-menu.d.ts.map +1 -1
  186. package/dist/ui/navigation-menu.js +23 -28
  187. package/dist/ui/number-input.d.ts.map +1 -1
  188. package/dist/ui/number-input.js +54 -53
  189. package/dist/ui/pagination.d.ts.map +1 -1
  190. package/dist/ui/pagination.js +45 -44
  191. package/dist/ui/popover.js +28 -28
  192. package/dist/ui/progress.d.ts +3 -1
  193. package/dist/ui/progress.d.ts.map +1 -1
  194. package/dist/ui/progress.js +43 -39
  195. package/dist/ui/search-input.d.ts.map +1 -1
  196. package/dist/ui/search-input.js +47 -60
  197. package/dist/ui/segmented-control.js +1 -1
  198. package/dist/ui/select.d.ts.map +1 -1
  199. package/dist/ui/select.js +54 -53
  200. package/dist/ui/sheet.d.ts.map +1 -1
  201. package/dist/ui/sheet.js +46 -45
  202. package/dist/ui/sidebar.d.ts.map +1 -1
  203. package/dist/ui/sidebar.js +196 -193
  204. package/dist/ui/skeleton.js +1 -1
  205. package/dist/ui/spinner.js +74 -74
  206. package/dist/ui/stat-card.d.ts.map +1 -1
  207. package/dist/ui/stat-card.js +85 -86
  208. package/dist/ui/switch.d.ts +3 -0
  209. package/dist/ui/switch.d.ts.map +1 -1
  210. package/dist/ui/switch.js +41 -27
  211. package/dist/ui/tabs.js +43 -43
  212. package/dist/ui/text.js +1 -1
  213. package/dist/ui/textarea.js +10 -10
  214. package/dist/ui/toast.d.ts.map +1 -1
  215. package/dist/ui/toast.js +169 -169
  216. package/dist/ui/toggle.js +4 -4
  217. package/dist/ui/tooltip.js +40 -40
  218. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  219. package/docs/components/_header.md +4 -4
  220. package/docs/components/composed/activity-feed.md +7 -0
  221. package/docs/components/composed/avatar-group.md +8 -5
  222. package/docs/components/composed/status-badge.md +14 -1
  223. package/docs/components/ui/accordion.md +5 -2
  224. package/docs/components/ui/badge-group.md +38 -0
  225. package/docs/components/ui/badge-indicator.md +40 -0
  226. package/docs/components/ui/badge.md +36 -5
  227. package/docs/components/ui/button-processing.md +15 -0
  228. package/docs/components/ui/button.md +40 -11
  229. package/docs/components/ui/chat.md +214 -0
  230. package/docs/components/ui/data-table.md +3 -0
  231. package/docs/components/ui/devalok-grain.md +55 -0
  232. package/docs/components/ui/icon-button.md +12 -5
  233. package/docs/components/ui/icon-context.md +38 -0
  234. package/docs/components/ui/icon-group.md +36 -0
  235. package/docs/components/ui/icon.md +47 -0
  236. package/docs/components/ui/input.md +32 -6
  237. package/docs/components/ui/progress.md +5 -0
  238. package/docs/components/ui/spinner.md +3 -0
  239. package/docs/components/ui/switch.md +13 -0
  240. package/llms-full.txt +666 -40
  241. package/llms.txt +37 -18
  242. package/package.json +7 -2
package/dist/ui/toggle.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { jsx as i } from "react/jsx-runtime";
3
3
  import * as n from "react";
4
4
  import { aI as e } from "../_chunks/primitives.js";
5
- import { c as d } from "../_chunks/vendor-utils.js";
5
+ import { a as d } from "../_chunks/vendor-utils.js";
6
6
  import { springs as m, motionProps as c } from "./lib/motion.js";
7
7
  import { cn as f } from "./lib/utils.js";
8
8
  import { m as l } from "../_chunks/framer.js";
@@ -25,14 +25,14 @@ const p = l.create(e), g = d(
25
25
  size: "md"
26
26
  }
27
27
  }
28
- ), u = n.forwardRef(({ className: t, variant: s, size: o, ...r }, a) => /* @__PURE__ */ i(
28
+ ), u = n.forwardRef(({ className: t, variant: s, size: o, ...a }, r) => /* @__PURE__ */ i(
29
29
  p,
30
30
  {
31
- ref: a,
31
+ ref: r,
32
32
  whileTap: { scale: 0.95 },
33
33
  transition: m.snappy,
34
34
  className: f(g({ variant: s, size: o }), t),
35
- ...c(r)
35
+ ...c(a)
36
36
  }
37
37
  ));
38
38
  u.displayName = e.displayName;
@@ -1,69 +1,69 @@
1
1
  "use client";
2
- import { jsx as t, Fragment as y } from "react/jsx-runtime";
2
+ import { jsx as e, Fragment as h } from "react/jsx-runtime";
3
3
  import * as o from "react";
4
- import { aL as P, aM as p, aN as h, aO as u, aP as T } from "../_chunks/primitives.js";
5
- import { cn as C } from "./lib/utils.js";
6
- import { tweens as g, springs as N } from "./lib/motion.js";
7
- import { A as b, m as w } from "../_chunks/framer.js";
4
+ import { aL as y, aM as f, aN as C, aO as u, aP as g } from "../_chunks/primitives.js";
5
+ import { cn as P } from "./lib/utils.js";
6
+ import { tweens as T, springs as O } from "./lib/motion.js";
7
+ import { A as N, m as b } from "../_chunks/framer.js";
8
8
  const d = o.createContext(!1), F = ({
9
- children: e,
10
- ...i
11
- }) => /* @__PURE__ */ t(d.Provider, { value: !0, children: /* @__PURE__ */ t(u, { ...i, children: e }) });
12
- function M({ children: e }) {
13
- return o.useContext(d) ? /* @__PURE__ */ t(y, { children: e }) : /* @__PURE__ */ t(d.Provider, { value: !0, children: /* @__PURE__ */ t(u, { delayDuration: 300, children: e }) });
9
+ children: t,
10
+ ...r
11
+ }) => /* @__PURE__ */ e(d.Provider, { value: !0, children: /* @__PURE__ */ e(u, { ...r, children: t }) });
12
+ function w({ children: t }) {
13
+ return o.useContext(d) ? /* @__PURE__ */ e(h, { children: t }) : /* @__PURE__ */ e(d.Provider, { value: !0, children: /* @__PURE__ */ e(u, { delayDuration: 300, children: t }) });
14
14
  }
15
- const m = o.createContext({ open: !1 }), A = ({
16
- open: e,
17
- defaultOpen: i,
18
- onOpenChange: r,
19
- ...n
15
+ const m = o.createContext({ open: !1 }), M = ({
16
+ open: t,
17
+ defaultOpen: r,
18
+ onOpenChange: i,
19
+ ...a
20
20
  }) => {
21
- const [l, c] = o.useState(i ?? !1), a = e !== void 0, s = a ? e : l, v = o.useCallback(
22
- (f) => {
23
- a || c(f), r == null || r(f);
21
+ const [l, c] = o.useState(r ?? !1), s = t !== void 0, n = s ? t : l, v = o.useCallback(
22
+ (p) => {
23
+ s || c(p), i?.(p);
24
24
  },
25
- [a, r]
26
- ), x = o.useMemo(() => ({ open: s }), [s]);
27
- return /* @__PURE__ */ t(M, { children: /* @__PURE__ */ t(m.Provider, { value: x, children: /* @__PURE__ */ t(T, { open: s, onOpenChange: v, ...n }) }) });
25
+ [s, i]
26
+ ), x = o.useMemo(() => ({ open: n }), [n]);
27
+ return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(m.Provider, { value: x, children: /* @__PURE__ */ e(g, { open: n, onOpenChange: v, ...a }) }) });
28
28
  };
29
- A.displayName = "Tooltip";
30
- const L = h, R = {
29
+ M.displayName = "Tooltip";
30
+ const L = C, A = {
31
31
  top: { y: 4 },
32
32
  bottom: { y: -4 },
33
33
  left: { x: 4 },
34
34
  right: { x: -4 }
35
- }, I = o.forwardRef(({ className: e, sideOffset: i = 4, side: r = "top", children: n, ...l }, c) => {
36
- const { open: a } = o.useContext(m), s = R[r] ?? {};
37
- return /* @__PURE__ */ t(b, { children: a && /* @__PURE__ */ t(P, { forceMount: !0, children: /* @__PURE__ */ t(
38
- p,
35
+ }, R = o.forwardRef(({ className: t, sideOffset: r = 4, side: i = "top", children: a, ...l }, c) => {
36
+ const { open: s } = o.useContext(m), n = A[i] ?? {};
37
+ return /* @__PURE__ */ e(N, { children: s && /* @__PURE__ */ e(y, { forceMount: !0, children: /* @__PURE__ */ e(
38
+ f,
39
39
  {
40
40
  ref: c,
41
41
  forceMount: !0,
42
- sideOffset: i,
43
- side: r,
42
+ sideOffset: r,
43
+ side: i,
44
44
  ...l,
45
45
  asChild: !0,
46
- children: /* @__PURE__ */ t(
47
- w.div,
46
+ children: /* @__PURE__ */ e(
47
+ b.div,
48
48
  {
49
- initial: { opacity: 0, scale: 0.95, ...s },
49
+ initial: { opacity: 0, scale: 0.95, ...n },
50
50
  animate: { opacity: 1, scale: 1, x: 0, y: 0 },
51
- exit: { opacity: 0, scale: 0.95, ...s },
52
- transition: { ...N.snappy, opacity: g.fade },
53
- className: C(
51
+ exit: { opacity: 0, scale: 0.95, ...n },
52
+ transition: { ...O.snappy, opacity: T.fade },
53
+ className: P(
54
54
  "z-tooltip overflow-hidden rounded-ds-md bg-surface-inverted px-ds-04 py-ds-02b text-ds-sm text-surface-inverted-fg shadow-floating",
55
- e
55
+ t
56
56
  ),
57
- children: n
57
+ children: a
58
58
  }
59
59
  )
60
60
  }
61
61
  ) }) });
62
62
  });
63
- I.displayName = p.displayName;
63
+ R.displayName = f.displayName;
64
64
  export {
65
- A as Tooltip,
66
- I as TooltipContent,
65
+ M as Tooltip,
66
+ R as TooltipContent,
67
67
  F as TooltipProvider,
68
68
  L as TooltipTrigger
69
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"tree-item.d.ts","sourceRoot":"","sources":["../../../src/ui/tree-view/tree-item.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,4BAA4B;IAC5B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,uDAAuD;IACvD,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,oDAAoD;IACpD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,QAAQ,qFAoMb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"tree-item.d.ts","sourceRoot":"","sources":["../../../src/ui/tree-view/tree-item.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,4BAA4B;IAC5B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,uDAAuD;IACvD,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,oDAAoD;IACpD,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wBAAwB;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,QAAQ,qFAqMb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -54,15 +54,15 @@ Color tokens use OKLCH (perceptually uniform) with 12 functional steps per palet
54
54
  Semantic layer:
55
55
  - Accent (swappable): --color-accent-{1-12} + --color-accent-fg
56
56
  - Secondary: --color-secondary-{1-12} + --color-secondary-fg
57
- - Surface: --color-surface-{1-4} + --color-surface-fg / fg-muted / fg-subtle / border / border-strong
58
- - Border mapping: light mode border=step5, border-strong=step6; dark mode border=step3, border-strong=step4
59
- - Shell chrome (sidebar, topbar, bottom nav) uses surface-2 for elevation above surface-1 app background
57
+ - Surface: --color-surface-{base,raised,sunken} + --color-surface-fg / fg-muted / fg-subtle / border / border-subtle
58
+ - Border mapping: light mode border=step5, border-subtle=step3; dark mode border=step3, border-subtle=step2
59
+ - Shell chrome (sidebar, topbar, bottom nav) uses surface-sunken with brand tint for recessed chrome
60
60
  - Status: --color-{error,success,warning,info}-{3,7,9,11}
61
61
  - Category: --color-category-{teal,amber,slate,indigo,cyan,orange,emerald}
62
62
 
63
63
  Consumer rebranding: Override accent scale CSS vars or use generateScale(options) utility.
64
64
 
65
- Tailwind utilities: accent-1..12, secondary-1..12, surface-1..4, plus fg/border variants.
65
+ Tailwind utilities: accent-1..12, secondary-1..12, surface-base/raised/sunken, plus fg/border variants.
66
66
 
67
67
  ### Toast Setup Pattern
68
68
 
@@ -14,6 +14,7 @@
14
14
  maxInitialItems: number — truncate with "Show all (N)" toggle
15
15
  groupBy?: 'time' | 'none' — group items by time buckets (today, yesterday, this week, older)
16
16
  groupLabels?: GroupLabels — custom labels for time groups: { today?, yesterday?, thisWeek?, older? }
17
+ renderItem?: (item: ActivityItem, index: number) => ReactNode | undefined — custom renderer per item; return undefined to fall back to default ActivityEntry
17
18
 
18
19
  ## Defaults
19
20
  loading=false, compact=false, hasMore=false, groupBy='none'
@@ -41,8 +42,14 @@
41
42
  - `maxInitialItems` truncates with a "Show all (N)" toggle button
42
43
  - `maxInitialItems` applies to the flat list BEFORE grouping — items are sliced first, then grouped
43
44
  - Empty time groups are automatically skipped
45
+ - `renderItem` receives the item and index; return `undefined` to use the default ActivityEntry rendering
46
+ - Custom `renderItem` content is wrapped in the same dot + layout container as default entries for consistent vertical rhythm
44
47
 
45
48
  ## Changes
49
+ ### v0.29.0
50
+ - **Added** `renderItem` prop — custom render function per item; return ReactNode for custom rendering, return `undefined` to fall back to default ActivityEntry
51
+ - **Added** Internal `CustomEntry` wrapper that keeps dot + layout consistent with default entries
52
+
46
53
  ### v0.20.0
47
54
  - **Added** `groupBy="time"` prop — groups items into Today, Yesterday, This Week, Older with section headers
48
55
  - **Added** `groupLabels` prop for custom group label text
@@ -9,7 +9,7 @@
9
9
  max: number (default: 4, overflow shows "+N" badge)
10
10
  size: "xs" | "sm" | "md" | "lg" | "xl"
11
11
  showTooltip: boolean (default: true)
12
- borderColor: "surface-1" | "surface-2" (default: "surface-2") — overlap border color
12
+ borderColor: "surface-base" | "surface-raised" (default: "surface-raised") — overlap border color
13
13
  onOverflowClick: () => void — makes the "+N" badge interactive (button)
14
14
  renderAvatar: (user: AvatarUser, index: number) => ReactNode — custom avatar render
15
15
  expandDirection: "left" | "right" (default: "right") — direction group expands on hover
@@ -19,9 +19,10 @@
19
19
  name: string (REQUIRED)
20
20
  image?: string | null
21
21
  ring?: "none" | "lead" | "admin" | "client" — role ring per user in group
22
+ indicator?: "lead" | "admin" | ReactNode — small dot indicator at top-right of avatar
22
23
 
23
24
  ## Defaults
24
- size="md", max=4, showTooltip=true, borderColor="surface-2", expandDirection="right", expandAmount="default"
25
+ size="md", max=4, showTooltip=true, borderColor="surface-raised", expandDirection="right", expandAmount="default"
25
26
 
26
27
  ## Example
27
28
  ```jsx
@@ -32,7 +33,7 @@
32
33
  ]}
33
34
  max={3}
34
35
  size="md"
35
- borderColor="surface-1"
36
+ borderColor="surface-base"
36
37
  onOverflowClick={() => setShowAll(true)}
37
38
  />
38
39
  ```
@@ -42,10 +43,13 @@
42
43
  - Users beyond `max` are collapsed into a "+N" overflow badge
43
44
  - Missing `image` falls back to initials derived from `name`
44
45
  - Hover expand animation uses CSS `group-hover` — parent must not clip overflow
45
- - `borderColor` should match the surface context the group sits on (e.g., `surface-1` on cards)
46
+ - `borderColor` should match the surface the group sits on (`surface-base` on page bg, `surface-raised` on cards)
46
47
  - `renderAvatar` wrapper is positioning-only — pass `size` directly to your Avatar (do NOT use `className="h-full w-full"`)
47
48
 
48
49
  ## Changes
50
+ ### v0.29.0
51
+ - **Added** `indicator` prop on AvatarUser: `"lead"` (warning dot) | `"admin"` (accent dot) | ReactNode (custom indicator) — animated dot at the top-right corner of each avatar
52
+
49
53
  ### v0.22.3
50
54
  - **Fixed** `renderAvatar` wrapper no longer clips consumer Avatar content (removed overflow-hidden, border, and size classes from wrapper)
51
55
  - **Fixed** Removed redundant text-size classes from wrapper — Avatar handles font scaling internally
@@ -54,7 +58,6 @@
54
58
  - **Added** `xs` and `xl` size variants
55
59
  - **Added** `borderColor` prop for overlap border matching surface context
56
60
  - **Added** `onOverflowClick` prop making the overflow badge an interactive button
57
- - **Added** `overflowContent` prop for popover content on overflow click
58
61
  - **Added** `renderAvatar` prop for custom per-avatar rendering
59
62
  - **Added** `AvatarUser.ring` field for per-user role rings in groups
60
63
 
@@ -7,11 +7,13 @@
7
7
  Note: StatusBadge was server-safe prior to v0.18.0 but is NO LONGER server-safe due to Framer Motion dependency.
8
8
 
9
9
  ## Props
10
- status: "active" | "pending" | "approved" | "rejected" | "completed" | "blocked" | "cancelled" | "draft"
10
+ status: "active" | "pending" | "approved" | "rejected" | "completed" | "blocked" | "in-progress" | "review" | "cancelled" | "draft"
11
11
  color: "success" | "warning" | "error" | "info" | "neutral" (overrides status styling when set)
12
12
  size: "sm" | "md"
13
13
  label: string (auto-derived from status/color if omitted)
14
14
  hideDot: boolean (default: false)
15
+ onClick: () => void (makes badge clickable — renders as button with chevron)
16
+ icon: ReactNode (custom trailing icon — replaces default chevron when clickable)
15
17
 
16
18
  ## Defaults
17
19
  size="md", hideDot=false
@@ -20,15 +22,26 @@ Note: StatusBadge was server-safe prior to v0.18.0 but is NO LONGER server-safe
20
22
  ## Example
21
23
  ```jsx
22
24
  <StatusBadge status="active" />
25
+ <StatusBadge status="in-progress" />
26
+ <StatusBadge status="review" label="Needs Review" />
23
27
  <StatusBadge color="warning" label="In Review" size="sm" />
28
+ <StatusBadge status="active" onClick={() => openStatusPicker()} />
24
29
  ```
25
30
 
26
31
  ## Gotchas
27
32
  - When `color` is set, it takes priority over `status` for styling
28
33
  - Props use a discriminated union — pass either `status` or `color`, not both
29
34
  - As of v0.18.0, StatusBadge is NOT server-safe (Framer Motion dependency)
35
+ - When `onClick` is provided, badge renders as a `<button>` with a trailing chevron icon
36
+ - Pass `icon` to replace the default chevron with a custom trailing icon
30
37
 
31
38
  ## Changes
39
+ ### v0.29.0
40
+ - **Added** `in-progress` status (accent/blue styling)
41
+ - **Added** `review` status (info styling)
42
+ - **Added** `onClick` prop — renders as a `<button>` with trailing chevron and hover opacity
43
+ - **Added** `icon` prop — custom trailing icon (replaces the default chevron when clickable)
44
+
32
45
  ### v0.18.0
33
46
  - **Changed** No longer server-safe due to Framer Motion dependency
34
47
 
@@ -14,11 +14,11 @@
14
14
  ## Compound Components
15
15
  Accordion (root)
16
16
  AccordionItem (value: string, REQUIRED)
17
- AccordionTrigger (clickable header, chevron auto-renders)
17
+ AccordionTrigger (clickable header, chevron auto-renders; chevronPosition: "left" | "right")
18
18
  AccordionContent (collapsible body)
19
19
 
20
20
  ## Defaults
21
- none (type is required)
21
+ none (type is required); AccordionTrigger: chevronPosition="right"
22
22
 
23
23
  ## Example
24
24
  ```jsx
@@ -35,6 +35,9 @@
35
35
  - collapsible only works with type="single"
36
36
 
37
37
  ## Changes
38
+ ### v0.29.0
39
+ - **Added** `chevronPosition` prop on AccordionTrigger: `"left"` | `"right"` (default: `"right"`) — controls which side the chevron icon renders
40
+
38
41
  ### v0.18.0
39
42
  - **Changed** Accordion content fade animation migrated to Framer Motion (height animation still uses CSS keyframes)
40
43
 
@@ -0,0 +1,38 @@
1
+ # BadgeGroup
2
+
3
+ - Import: @devalok/shilp-sutra/ui (as Badge.Group)
4
+ - Server-safe: Yes
5
+ - Category: ui
6
+
7
+ ## Props
8
+ max: number — Show at most N badges, rest collapsed into "+N" overflow
9
+ gap: "tight" | "default" | "loose" (default: "default")
10
+ size: BadgeProps["size"] — Size passed to the overflow "+N" badge
11
+ onOverflowClick: () => void — Click handler for the overflow "+N" badge
12
+ className: string
13
+ children: ReactNode (REQUIRED)
14
+
15
+ ## Defaults
16
+ gap="default", max=undefined (show all), size="sm" (overflow badge)
17
+
18
+ ## Example
19
+ ```jsx
20
+ <Badge.Group max={3} size="sm" onOverflowClick={() => setShowAll(true)}>
21
+ <Badge>React</Badge>
22
+ <Badge>TypeScript</Badge>
23
+ <Badge>Tailwind</Badge>
24
+ <Badge>Vite</Badge>
25
+ <Badge>Vitest</Badge>
26
+ </Badge.Group>
27
+ {/* Renders: React, TypeScript, Tailwind, +2 */}
28
+ ```
29
+
30
+ ## Gotchas
31
+ - Overflow badge is always `variant="outline" color="neutral"`
32
+ - `size` only applies to the overflow badge — child badges keep their own size
33
+ - Gap values: tight=4px, default=6px, loose=8px
34
+ - Without `onOverflowClick`, the overflow badge is not interactive
35
+
36
+ ## Changes
37
+ ### v0.29.0
38
+ - **Added** Initial release — badge grouping with overflow collapse and click handler
@@ -0,0 +1,40 @@
1
+ # BadgeIndicator
2
+
3
+ - Import: @devalok/shilp-sutra/ui (as Badge.Indicator)
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Props
8
+ count: number — Numeric value to display
9
+ max: number (default: 99) — Cap display at this value, shows "99+" when exceeded
10
+ dot: boolean (default: false) — Show a small dot instead of count
11
+ color: "error" | "success" | "warning" | "accent" | "info" (default: "error")
12
+ invisible: boolean (default: false) — Hide the indicator while keeping layout
13
+ showZero: boolean (default: false) — Show indicator when count is 0
14
+ placement: "top-right" | "top-left" | "bottom-right" | "bottom-left" (default: "top-right")
15
+ className: string
16
+ children: ReactNode (REQUIRED) — The element to attach the indicator to
17
+
18
+ ## Defaults
19
+ max=99, dot=false, color="error", invisible=false, showZero=false, placement="top-right"
20
+
21
+ ## Example
22
+ ```jsx
23
+ <Badge.Indicator count={5}>
24
+ <IconButton icon={IconBell} variant="ghost" />
25
+ </Badge.Indicator>
26
+
27
+ <Badge.Indicator dot color="success">
28
+ <Avatar src={user.avatar} fallback={user.name} />
29
+ </Badge.Indicator>
30
+ ```
31
+
32
+ ## Gotchas
33
+ - Wraps children in `position: relative` span — the indicator is absolutely positioned
34
+ - Animation uses spring physics, respects `prefers-reduced-motion`
35
+ - When `count > max`, displays `${max}+` (e.g., "99+")
36
+ - `invisible` keeps the layout but hides the dot/count (useful for transitions)
37
+
38
+ ## Changes
39
+ ### v0.29.0
40
+ - **Added** Initial release — animated notification indicator with count, dot, placement, and color
@@ -5,13 +5,25 @@
5
5
  - Category: ui
6
6
 
7
7
  ## Props
8
- variant: "subtle" | "solid" | "outline" | "secondary" (alias->subtle) | "destructive" (alias->solid+error)
9
- color: "default" | "info" | "success" | "error" | "warning" | "brand" | "accent" | "teal" | "amber" | "slate" | "indigo" | "cyan" | "orange" | "emerald"
8
+ variant: "subtle" | "solid" | "outline" | "soft"
9
+ color: "default" | "accent" | "error" | "success" | "warning" | "info" | "neutral" | "teal" | "amber" | "slate" | "indigo" | "cyan" | "orange" | "emerald" | "custom"
10
10
  size: "xs" | "sm" | "md" | "lg"
11
- dot: boolean (shows leading dot indicator)
12
- onDismiss: () => void (shows X button when provided)
11
+ startIcon: ReactElement | null
12
+ endIcon: ReactElement | null
13
+ dot: boolean (shows animated leading dot indicator)
14
+ onClick: () => void (makes badge interactive as button)
15
+ selected: boolean (toggle state — shows check icon when true)
16
+ disabled: boolean
17
+ onDismiss: () => void (shows dismiss X button)
18
+ maxWidth: number (enables truncation with title tooltip)
19
+ circle: boolean (square aspect-ratio, centered content)
20
+ asChild: boolean
13
21
  children: ReactNode
14
22
 
23
+ ## Compound Components
24
+ Badge.Indicator — status indicator sub-component
25
+ Badge.Group — layout wrapper for badge collections
26
+
15
27
  ## Defaults
16
28
  variant="subtle", color="default", size="md"
17
29
 
@@ -19,13 +31,32 @@
19
31
  ```jsx
20
32
  <Badge variant="solid" color="success">Active</Badge>
21
33
  <Badge color="teal" onDismiss={() => removeFilter('teal')}>Teal team</Badge>
34
+ <Badge onClick={() => toggle()} selected={isSelected}>Filterable</Badge>
35
+ <Badge color="custom" style={{ '--badge-color': '#8b5cf6' }}>Custom</Badge>
22
36
  ```
23
37
 
24
38
  ## Gotchas
25
39
  - DO NOT use variant="destructive" — use variant="solid" color="error"
26
- - Badge is display-only; for interactive tags use Chip
40
+ - Badge is now interactive when `onClick` is provided (renders as `<button>`)
41
+ - When both `onClick` and `onDismiss` are provided, renders as `div[role="button"]` to avoid nested buttons
42
+ - Chip is deprecated — use Badge with `onClick` for interactive tags
43
+ - `color="custom"` requires `--badge-color` CSS variable (and optionally `--badge-fg-color` for solid variant)
27
44
 
28
45
  ## Changes
46
+ ### v0.29.0
47
+ - **Changed** (BREAKING) v2 rewrite — Badge is now a full interactive component
48
+ - **Added** `soft` variant (tinted bg, no border — completes the 4-variant set: subtle/solid/outline/soft)
49
+ - **Added** `custom` color with CSS variable `--badge-color` (and `--badge-fg-color` for solid)
50
+ - **Added** Interactive mode: `onClick` makes Badge a clickable button, `selected` shows animated check icon
51
+ - **Added** `disabled` prop with reduced opacity and pointer-events-none
52
+ - **Added** `startIcon` / `endIcon` props (auto-sized per badge size)
53
+ - **Added** `maxWidth` prop for truncation with title tooltip
54
+ - **Added** `circle` prop for square aspect-ratio badges
55
+ - **Added** `asChild` prop for Slot composition
56
+ - **Added** `Badge.Indicator` and `Badge.Group` compound sub-components
57
+ - **Deprecated** Chip component — use Badge with `onClick` instead
58
+ - **Changed** Dot animation now uses Framer Motion spring entrance + continuous pulse
59
+
29
60
  ### v0.18.0
30
61
  - **Changed** Pulse-ring animation migrated to Framer Motion
31
62
  - **Fixed** Accent color variants — `text-accent-9` changed to `text-accent-11`, `border-accent-9` changed to `border-accent-7`
@@ -0,0 +1,15 @@
1
+ # ButtonProcessing (Internal)
2
+
3
+ - Import: Internal — not exported from barrel. Used only by Button.
4
+ - Server-safe: No
5
+ - Category: ui
6
+
7
+ ## Description
8
+
9
+ Internal component that renders the processing animation overlay for Button. Consumers use the `processing` prop on Button, not this component directly.
10
+
11
+ See `Button` docs for the public API.
12
+
13
+ ## Changes
14
+ ### v0.29.0
15
+ - **Added** Initial release — marching ants processing overlay (SVG dashed rect with animated stroke-dashoffset). Speed tiers: ambient (3s), working (2s), urgent (1s). Color maps to step-11 tokens for visibility on all variants.
@@ -5,37 +5,66 @@
5
5
  - Category: ui
6
6
 
7
7
  ## Props
8
- variant: "solid" | "default" (alias->solid) | "outline" | "ghost" | "link" | "destructive" (alias->solid+error)
9
- color: "default" | "error"
10
- size: "sm" | "md" | "lg" | "icon" | "icon-sm" | "icon-md" | "icon-lg"
11
- startIcon: ReactNode
12
- endIcon: ReactNode
8
+ variant: "solid" | "soft" | "outline" | "ghost" | "link" | "default" (alias->solid) | "destructive" (alias->solid+error)
9
+ color: "accent" | "error" | "success" | "warning" | "neutral" | "default" (alias->accent)
10
+ size: "xs" | "sm" | "md" | "lg" | "compact-xs" | "compact-sm" | "compact-md" | "icon" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg"
11
+ weight: "semibold" | "normal"
12
+ shape: "default" | "pill"
13
+ startIcon: ReactElement (use <Icon icon={...} />) | null
14
+ endIcon: ReactElement (use <Icon icon={...} />) | null
13
15
  loading: boolean (disables button, shows spinner)
14
16
  loadingPosition: "start" | "end" | "center" (default: "start")
15
17
  fullWidth: boolean
16
18
  asChild: boolean
17
- onClickAsync: (e: MouseEvent) => Promise<void> (auto loading->success/error->idle)
19
+ processing: boolean | 'ambient' | 'working' | 'urgent' (marching ants SVG border)
20
+ processingColor: 'accent' | 'error' | 'success' | 'warning' | 'neutral' (override animation color)
21
+ processingDisabled: boolean (disable button during processing, default: true)
22
+ onClickAsync: (e: MouseEvent) => Promise<void> (auto loading->success/error->idle, auto-activates processing)
18
23
  asyncFeedbackDuration: number (ms, default 1500)
19
24
 
20
25
  ## Defaults
21
- variant="solid", color="default", size="md"
26
+ variant="solid", color="accent", weight="semibold", size="md", shape="default"
22
27
 
23
28
  ## Example
24
29
  ```jsx
25
- <Button variant="solid" color="error" startIcon={<IconTrash />} loading={isDeleting}>
30
+ <Button variant="solid" color="error" startIcon={<Icon icon={IconTrash} />} loading={isDeleting}>
26
31
  Delete project
27
32
  </Button>
33
+ <Button variant="soft" color="success" startIcon={<Icon icon={IconCheck} />}>Approved</Button>
34
+ <Button variant="soft" color="warning" size="compact-sm" shape="pill">Overdue</Button>
28
35
  ```
29
36
 
30
37
  ## Gotchas
31
38
  - DO NOT use variant="destructive" — use variant="solid" color="error"
32
39
  - DO NOT use variant="secondary" — use variant="outline" or variant="ghost"
33
40
  - DO NOT use size="default" — use size="md"
34
- - DO NOT use color="danger" — use color="error"
35
- - Inherits variant/color/size from ButtonGroup context if present
36
- - onClickAsync overrides onClick and loading when active
41
+ - DO NOT use color="danger" or color="default" — use color="error" or color="accent"
42
+ - startIcon/endIcon now expect `<Icon icon={...} />` wrapper, not bare icon components
43
+ - Inherits variant/color/size/weight/shape from ButtonGroup context if present
44
+ - onClickAsync overrides onClick and loading when active; also auto-activates processing='working' during loading phase
45
+ - processing forces soft variant so marching ants pop against the background
46
+ - processingDisabled=true (default) makes button aria-disabled and pointer-events-none during processing
47
+ - Grain children (DevalokGrain) are auto-separated and rendered as direct button children for absolute positioning
37
48
 
38
49
  ## Changes
50
+ ### v0.29.0
51
+ - **Added** `soft` variant — tinted background, colored text (new middle ground between solid and ghost)
52
+ - **Added** 5 color options: `accent` (default), `error`, `success`, `warning`, `neutral` (replaces old `default`/`error`-only axis)
53
+ - **Added** `shape` prop: `"default"` | `"pill"` (rounded-full with extra horizontal padding)
54
+ - **Added** compact sizes: `compact-xs`, `compact-sm`, `compact-md` (height-less inline buttons)
55
+ - **Added** `xs` size and `icon-xs` size
56
+ - **Added** `weight` prop: `"semibold"` (default) | `"normal"` for lighter labels
57
+ - **Changed** `startIcon`/`endIcon` now accept `<Icon icon={...} />` wrapper (auto-sized via IconProvider context per button size)
58
+ - **Changed** Default color is now `"accent"` (was `"default"`)
59
+ - **Changed** Solid hover adds tinted shadows per color (e.g., `hover:shadow-brand`, `hover:shadow-error`)
60
+ - **Changed** Icon slots get negative-margin inset to tighten padding against button edges
61
+ - **Added** DevalokGrain support — grain children are auto-separated and rendered for texture overlays
62
+ - **Added** `processing` prop — marching ants SVG border while content stays visible (`"ambient"` (3s) | `"working"` (2s) | `"urgent"` (1s) | boolean). Forces soft variant so ants pop.
63
+ - **Added** `processingColor` — override processing animation color independently of button color
64
+ - **Added** `processingDisabled` — disable button during processing (default: true). Set false for cancel-by-click patterns.
65
+ - **Added** Auto-processing during `onClickAsync` — loading phase auto-activates `processing='working'` when no explicit `processing` prop is set
66
+ - **Added** Always-on layout animation — smooth width/height transitions via Framer Motion FLIP
67
+
39
68
  ### v0.22.0
40
69
  - **Changed** Active/pressed scale from `0.97` to `0.95` for snappier press feedback.
41
70
  - **Fixed** Ghost/outline hover not fading — `transition-transform` in base overrode `transition-colors` from variant. Combined into single `transition-[color,background-color,border-color,box-shadow,transform]`.