@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
@@ -0,0 +1,299 @@
1
+ "use client";
2
+ import { jsxs as p, jsx as a } from "react/jsx-runtime";
3
+ import * as S from "react";
4
+ import { cn as b } from "../ui/lib/utils.js";
5
+ import { IconCheck as D, IconX as E } from "@tabler/icons-react";
6
+ import { a as I } from "./vendor-utils.js";
7
+ import { springs as O } from "../ui/lib/motion.js";
8
+ import { S as T } from "./primitives.js";
9
+ import { Icon as C } from "../ui/icon.js";
10
+ import { BadgeIndicator as q } from "../ui/badge-indicator.js";
11
+ import { A as M, m as w } from "./framer.js";
12
+ const X = I(
13
+ "relative inline-flex items-center rounded-full font-sans font-medium overflow-hidden isolate transition-[color,background-color,border-color,padding] duration-fast-02 ease-productive-standard select-none [&>span:not([data-grain])]:relative [&>span:not([data-grain])]:z-[2]",
14
+ {
15
+ variants: {
16
+ variant: {
17
+ subtle: "border",
18
+ solid: "border border-transparent",
19
+ outline: "border",
20
+ soft: "border border-transparent"
21
+ },
22
+ color: {
23
+ default: "",
24
+ accent: "",
25
+ error: "",
26
+ success: "",
27
+ warning: "",
28
+ info: "",
29
+ neutral: "",
30
+ teal: "",
31
+ amber: "",
32
+ slate: "",
33
+ indigo: "",
34
+ cyan: "",
35
+ orange: "",
36
+ emerald: "",
37
+ custom: ""
38
+ },
39
+ size: {
40
+ xs: "h-4 px-1.5 text-[10px] gap-1",
41
+ sm: "h-5 px-2 text-ds-xs gap-1",
42
+ md: "h-6 px-2.5 text-ds-xs gap-1.5",
43
+ lg: "h-7 px-3 text-ds-sm gap-1.5"
44
+ }
45
+ },
46
+ compoundVariants: [
47
+ // ── subtle × colors ──────────────────────────────────────────
48
+ { variant: "subtle", color: "default", className: "bg-surface-raised-hover text-surface-fg-muted border-surface-border-strong" },
49
+ { variant: "subtle", color: "accent", className: "bg-accent-3 text-accent-11 border-accent-7" },
50
+ { variant: "subtle", color: "error", className: "bg-error-3 text-error-11 border-error-7" },
51
+ { variant: "subtle", color: "success", className: "bg-success-3 text-success-11 border-success-7" },
52
+ { variant: "subtle", color: "warning", className: "bg-warning-3 text-warning-11 border-warning-7" },
53
+ { variant: "subtle", color: "info", className: "bg-info-3 text-info-11 border-info-7" },
54
+ { variant: "subtle", color: "neutral", className: "bg-surface-raised-hover text-surface-fg-muted border-surface-border-strong" },
55
+ { variant: "subtle", color: "teal", className: "bg-category-teal-3 text-category-teal-11 border-category-teal-7" },
56
+ { variant: "subtle", color: "amber", className: "bg-category-amber-3 text-category-amber-11 border-category-amber-7" },
57
+ { variant: "subtle", color: "slate", className: "bg-category-slate-3 text-category-slate-11 border-category-slate-7" },
58
+ { variant: "subtle", color: "indigo", className: "bg-category-indigo-3 text-category-indigo-11 border-category-indigo-7" },
59
+ { variant: "subtle", color: "cyan", className: "bg-category-cyan-3 text-category-cyan-11 border-category-cyan-7" },
60
+ { variant: "subtle", color: "orange", className: "bg-category-orange-3 text-category-orange-11 border-category-orange-7" },
61
+ { variant: "subtle", color: "emerald", className: "bg-category-emerald-3 text-category-emerald-11 border-category-emerald-7" },
62
+ // ── solid × colors ───────────────────────────────────────────
63
+ { variant: "solid", color: "default", className: "bg-neutral-5 text-surface-fg border-transparent" },
64
+ { variant: "solid", color: "accent", className: "bg-accent-9 text-accent-fg border-transparent" },
65
+ { variant: "solid", color: "error", className: "bg-error-9 text-error-fg border-transparent" },
66
+ { variant: "solid", color: "success", className: "bg-success-9 text-success-fg border-transparent" },
67
+ { variant: "solid", color: "warning", className: "bg-warning-9 text-warning-fg border-transparent" },
68
+ { variant: "solid", color: "info", className: "bg-info-9 text-info-fg border-transparent" },
69
+ { variant: "solid", color: "neutral", className: "bg-neutral-5 text-surface-fg border-transparent" },
70
+ { variant: "solid", color: "teal", className: "bg-category-teal-9 text-white border-transparent" },
71
+ { variant: "solid", color: "amber", className: "bg-category-amber-9 text-white border-transparent" },
72
+ { variant: "solid", color: "slate", className: "bg-category-slate-9 text-white border-transparent" },
73
+ { variant: "solid", color: "indigo", className: "bg-category-indigo-9 text-white border-transparent" },
74
+ { variant: "solid", color: "cyan", className: "bg-category-cyan-9 text-white border-transparent" },
75
+ { variant: "solid", color: "orange", className: "bg-category-orange-9 text-white border-transparent" },
76
+ { variant: "solid", color: "emerald", className: "bg-category-emerald-9 text-white border-transparent" },
77
+ // ── outline × colors ─────────────────────────────────────────
78
+ { variant: "outline", color: "default", className: "bg-transparent text-surface-fg-muted border-surface-border-strong" },
79
+ { variant: "outline", color: "accent", className: "bg-transparent text-accent-11 border-accent-7" },
80
+ { variant: "outline", color: "error", className: "bg-transparent text-error-11 border-error-7" },
81
+ { variant: "outline", color: "success", className: "bg-transparent text-success-11 border-success-7" },
82
+ { variant: "outline", color: "warning", className: "bg-transparent text-warning-11 border-warning-7" },
83
+ { variant: "outline", color: "info", className: "bg-transparent text-info-11 border-info-7" },
84
+ { variant: "outline", color: "neutral", className: "bg-transparent text-surface-fg-muted border-surface-border-strong" },
85
+ { variant: "outline", color: "teal", className: "bg-transparent text-category-teal-11 border-category-teal-7" },
86
+ { variant: "outline", color: "amber", className: "bg-transparent text-category-amber-11 border-category-amber-7" },
87
+ { variant: "outline", color: "slate", className: "bg-transparent text-category-slate-11 border-category-slate-7" },
88
+ { variant: "outline", color: "indigo", className: "bg-transparent text-category-indigo-11 border-category-indigo-7" },
89
+ { variant: "outline", color: "cyan", className: "bg-transparent text-category-cyan-11 border-category-cyan-7" },
90
+ { variant: "outline", color: "orange", className: "bg-transparent text-category-orange-11 border-category-orange-7" },
91
+ { variant: "outline", color: "emerald", className: "bg-transparent text-category-emerald-11 border-category-emerald-7" },
92
+ // ── soft × colors ────────────────────────────────────────────
93
+ { variant: "soft", color: "default", className: "bg-surface-raised-hover text-surface-fg-muted border-transparent" },
94
+ { variant: "soft", color: "accent", className: "bg-accent-3 text-accent-11 border-transparent" },
95
+ { variant: "soft", color: "error", className: "bg-error-3 text-error-11 border-transparent" },
96
+ { variant: "soft", color: "success", className: "bg-success-3 text-success-11 border-transparent" },
97
+ { variant: "soft", color: "warning", className: "bg-warning-3 text-warning-11 border-transparent" },
98
+ { variant: "soft", color: "info", className: "bg-info-3 text-info-11 border-transparent" },
99
+ { variant: "soft", color: "neutral", className: "bg-surface-raised-hover text-surface-fg-muted border-transparent" },
100
+ { variant: "soft", color: "teal", className: "bg-category-teal-3 text-category-teal-11 border-transparent" },
101
+ { variant: "soft", color: "amber", className: "bg-category-amber-3 text-category-amber-11 border-transparent" },
102
+ { variant: "soft", color: "slate", className: "bg-category-slate-3 text-category-slate-11 border-transparent" },
103
+ { variant: "soft", color: "indigo", className: "bg-category-indigo-3 text-category-indigo-11 border-transparent" },
104
+ { variant: "soft", color: "cyan", className: "bg-category-cyan-3 text-category-cyan-11 border-transparent" },
105
+ { variant: "soft", color: "orange", className: "bg-category-orange-3 text-category-orange-11 border-transparent" },
106
+ { variant: "soft", color: "emerald", className: "bg-category-emerald-3 text-category-emerald-11 border-transparent" }
107
+ ],
108
+ defaultVariants: {
109
+ variant: "subtle",
110
+ color: "default",
111
+ size: "md"
112
+ }
113
+ }
114
+ ), z = {
115
+ xs: "[&>svg]:h-2.5 [&>svg]:w-2.5",
116
+ sm: "[&>svg]:h-3 [&>svg]:w-3",
117
+ md: "[&>svg]:h-3 [&>svg]:w-3",
118
+ lg: "[&>svg]:h-3.5 [&>svg]:w-3.5"
119
+ }, _ = {
120
+ xs: "pl-1",
121
+ sm: "pl-1.5",
122
+ md: "pl-2",
123
+ lg: "pl-2.5"
124
+ }, $ = {
125
+ xs: "pr-0.5",
126
+ sm: "pr-1",
127
+ md: "pr-1",
128
+ lg: "pr-1.5"
129
+ }, B = S.forwardRef(
130
+ ({
131
+ className: c,
132
+ variant: v,
133
+ color: f,
134
+ size: y,
135
+ asChild: x,
136
+ startIcon: t,
137
+ endIcon: o,
138
+ dot: n,
139
+ onDismiss: e,
140
+ onClick: r,
141
+ selected: l,
142
+ disabled: u,
143
+ maxWidth: N,
144
+ circle: A,
145
+ children: i,
146
+ style: j,
147
+ ...h
148
+ }, G) => {
149
+ const d = v ?? "subtle", k = f ?? "default", g = y ?? "md", m = x ? T : r && e ? "div" : r ? "button" : "span", K = k === "custom" ? {
150
+ ...d === "subtle" && {
151
+ backgroundColor: "color-mix(in oklch, var(--badge-color) 15%, transparent)",
152
+ color: "var(--badge-color)",
153
+ borderColor: "color-mix(in oklch, var(--badge-color) 40%, transparent)"
154
+ },
155
+ ...d === "solid" && {
156
+ backgroundColor: "var(--badge-color)",
157
+ color: "var(--badge-fg-color, white)",
158
+ borderColor: "transparent"
159
+ },
160
+ ...d === "outline" && {
161
+ backgroundColor: "transparent",
162
+ color: "var(--badge-color)",
163
+ borderColor: "color-mix(in oklch, var(--badge-color) 50%, transparent)"
164
+ },
165
+ ...d === "soft" && {
166
+ backgroundColor: "color-mix(in oklch, var(--badge-color) 12%, transparent)",
167
+ color: "var(--badge-color)",
168
+ borderColor: "transparent"
169
+ }
170
+ } : void 0, V = r && e ? (s) => {
171
+ (s.key === "Enter" || s.key === " ") && (s.preventDefault(), u || r(s)), h.onKeyDown?.(s);
172
+ } : h.onKeyDown, L = !!(n || t || r && l && !t && !n), P = !!(e || o);
173
+ return /* @__PURE__ */ p(
174
+ m,
175
+ {
176
+ ref: G,
177
+ className: b(
178
+ X({ variant: d, color: k, size: g }),
179
+ L && _[g],
180
+ P && $[g],
181
+ r && "cursor-pointer hover:brightness-[0.97] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-1 transition-[color,background-color,border-color,transform,filter] duration-moderate-01 ease-productive-exit hover:duration-fast-02 hover:ease-productive-entrance active:scale-[0.95] active:brightness-[0.92] active:duration-[0ms]",
182
+ l && "ring-1 ring-current/20 transition-shadow duration-fast-02",
183
+ u && "opacity-action-disabled pointer-events-none saturate-[0.3]",
184
+ A && "justify-center px-0 aspect-square",
185
+ c
186
+ ),
187
+ style: { ...j, ...K, ...N ? { maxWidth: N } : void 0 },
188
+ onClick: u ? void 0 : r,
189
+ onKeyDown: V,
190
+ ...m === "button" && { type: "button" },
191
+ ...m === "button" && u ? { disabled: !0 } : {},
192
+ ...m === "div" && r ? { role: "button", tabIndex: 0 } : {},
193
+ ...h,
194
+ children: [
195
+ /* @__PURE__ */ a(M, { children: n && /* @__PURE__ */ p(
196
+ w.span,
197
+ {
198
+ initial: { scale: 0 },
199
+ animate: { scale: 1 },
200
+ exit: { scale: 0 },
201
+ transition: O.snappy,
202
+ className: "relative inline-flex h-1.5 w-1.5 shrink-0",
203
+ "aria-hidden": "true",
204
+ children: [
205
+ /* @__PURE__ */ a(
206
+ w.span,
207
+ {
208
+ className: "absolute inset-0 rounded-full bg-current",
209
+ animate: { scale: [1, 2.5], opacity: [0.35, 0] },
210
+ transition: { repeat: 1 / 0, repeatDelay: 0.3, duration: 1.2, ease: [0, 0, 0.58, 1] }
211
+ }
212
+ ),
213
+ /* @__PURE__ */ a("span", { className: "relative h-1.5 w-1.5 rounded-full bg-current" })
214
+ ]
215
+ },
216
+ "dot"
217
+ ) }),
218
+ r && !t && !n && /* @__PURE__ */ a(
219
+ w.span,
220
+ {
221
+ initial: !1,
222
+ animate: l ? { opacity: 1, scale: 1, width: "auto", marginRight: 0 } : { opacity: 0, scale: 0.5, width: 0, marginRight: -4 },
223
+ transition: { type: "tween", duration: 0.15, ease: [0.2, 0, 0.38, 0.9] },
224
+ className: "inline-flex shrink-0 overflow-hidden",
225
+ "aria-hidden": !l,
226
+ children: /* @__PURE__ */ a(C, { icon: D, size: "xs" })
227
+ }
228
+ ),
229
+ t && /* @__PURE__ */ a("span", { className: b("shrink-0", z[g]), children: t }),
230
+ N ? /* @__PURE__ */ a(
231
+ "span",
232
+ {
233
+ className: "truncate",
234
+ title: typeof i == "string" ? i : void 0,
235
+ children: i
236
+ }
237
+ ) : i,
238
+ o && /* @__PURE__ */ a("span", { className: b("shrink-0", z[g]), children: o }),
239
+ e && /* @__PURE__ */ a(
240
+ "button",
241
+ {
242
+ type: "button",
243
+ onClick: (s) => {
244
+ s.stopPropagation(), e();
245
+ },
246
+ className: b(
247
+ "shrink-0 rounded-full text-current/60 hover:text-current hover:bg-current/10 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent-9",
248
+ g === "xs" ? "p-0 -mr-0.5 min-w-[16px] min-h-[16px]" : "p-px"
249
+ ),
250
+ "aria-label": `Remove ${typeof i == "string" ? i : ""}`.trim() || "Remove",
251
+ children: /* @__PURE__ */ a(C, { icon: E, size: "xs" })
252
+ }
253
+ )
254
+ ]
255
+ }
256
+ );
257
+ }
258
+ );
259
+ B.displayName = "Badge";
260
+ const F = Object.assign(B, {
261
+ Indicator: q,
262
+ Group: R
263
+ }), H = {
264
+ tight: "gap-1",
265
+ default: "gap-1.5",
266
+ loose: "gap-2"
267
+ };
268
+ function R({
269
+ max: c,
270
+ gap: v = "default",
271
+ size: f,
272
+ onOverflowClick: y,
273
+ className: x,
274
+ children: t
275
+ }) {
276
+ const o = S.Children.toArray(t), n = o.length, e = c !== void 0 && n > c, r = e ? o.slice(0, c) : o, l = e ? n - c : 0;
277
+ return /* @__PURE__ */ p("div", { className: b("flex flex-wrap items-center", H[v], x), children: [
278
+ r,
279
+ e && /* @__PURE__ */ p(
280
+ F,
281
+ {
282
+ variant: "outline",
283
+ color: "neutral",
284
+ size: f ?? "sm",
285
+ onClick: y,
286
+ children: [
287
+ "+",
288
+ l
289
+ ]
290
+ }
291
+ )
292
+ ] });
293
+ }
294
+ R.displayName = "BadgeGroup";
295
+ export {
296
+ F as B,
297
+ R as a,
298
+ X as b
299
+ };