@tulipfarm/sprout 0.0.0-stage → 0.1.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 (306) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +183 -2
  3. package/dist/components/accordion.d.ts +28 -0
  4. package/dist/components/accordion.js +26 -0
  5. package/dist/components/alert-dialog.d.ts +60 -0
  6. package/dist/components/alert-dialog.js +69 -0
  7. package/dist/components/alert.d.ts +30 -0
  8. package/dist/components/alert.js +35 -0
  9. package/dist/components/aspect-ratio.d.ts +7 -0
  10. package/dist/components/aspect-ratio.js +6 -0
  11. package/dist/components/attachment.d.ts +118 -0
  12. package/dist/components/attachment.js +285 -0
  13. package/dist/components/avatar.d.ts +32 -0
  14. package/dist/components/avatar.js +73 -0
  15. package/dist/components/badge.d.ts +21 -0
  16. package/dist/components/badge.js +27 -0
  17. package/dist/components/brand-icon.d.ts +28 -0
  18. package/dist/components/brand-icon.js +78 -0
  19. package/dist/components/breadcrumb.d.ts +29 -0
  20. package/dist/components/breadcrumb.js +44 -0
  21. package/dist/components/button-group.d.ts +28 -0
  22. package/dist/components/button-group.js +36 -0
  23. package/dist/components/button.d.ts +79 -0
  24. package/dist/components/button.js +93 -0
  25. package/dist/components/calendar.d.ts +27 -0
  26. package/dist/components/calendar.js +107 -0
  27. package/dist/components/canvas.d.ts +78 -0
  28. package/dist/components/canvas.js +180 -0
  29. package/dist/components/card.d.ts +43 -0
  30. package/dist/components/card.js +42 -0
  31. package/dist/components/carousel.d.ts +57 -0
  32. package/dist/components/carousel.js +422 -0
  33. package/dist/components/chart.d.ts +112 -0
  34. package/dist/components/chart.js +172 -0
  35. package/dist/components/chat-confirmation.d.ts +42 -0
  36. package/dist/components/chat-confirmation.js +62 -0
  37. package/dist/components/chat-plan.d.ts +21 -0
  38. package/dist/components/chat-plan.js +35 -0
  39. package/dist/components/chat-sources.d.ts +64 -0
  40. package/dist/components/chat-sources.js +66 -0
  41. package/dist/components/checkbox.d.ts +16 -0
  42. package/dist/components/checkbox.js +17 -0
  43. package/dist/components/choice-list.d.ts +53 -0
  44. package/dist/components/choice-list.js +36 -0
  45. package/dist/components/code-block.d.ts +35 -0
  46. package/dist/components/code-block.js +95 -0
  47. package/dist/components/collapsible.d.ts +24 -0
  48. package/dist/components/collapsible.js +27 -0
  49. package/dist/components/combobox.d.ts +95 -0
  50. package/dist/components/combobox.js +106 -0
  51. package/dist/components/command.d.ts +94 -0
  52. package/dist/components/command.js +414 -0
  53. package/dist/components/context-menu.d.ts +57 -0
  54. package/dist/components/context-menu.js +60 -0
  55. package/dist/components/dialog.d.ts +60 -0
  56. package/dist/components/dialog.js +79 -0
  57. package/dist/components/direction.d.ts +6 -0
  58. package/dist/components/direction.js +6 -0
  59. package/dist/components/dropdown-menu.d.ts +62 -0
  60. package/dist/components/dropdown-menu.js +59 -0
  61. package/dist/components/field.d.ts +117 -0
  62. package/dist/components/field.js +150 -0
  63. package/dist/components/file-viewer.d.ts +120 -0
  64. package/dist/components/file-viewer.js +373 -0
  65. package/dist/components/form.d.ts +87 -0
  66. package/dist/components/form.js +55 -0
  67. package/dist/components/glass-banner.d.ts +27 -0
  68. package/dist/components/glass-banner.js +116 -0
  69. package/dist/components/gradient-banner.d.ts +37 -0
  70. package/dist/components/gradient-banner.js +43 -0
  71. package/dist/components/hover-card.d.ts +27 -0
  72. package/dist/components/hover-card.js +26 -0
  73. package/dist/components/input-group.d.ts +68 -0
  74. package/dist/components/input-group.js +88 -0
  75. package/dist/components/input-otp.d.ts +38 -0
  76. package/dist/components/input-otp.js +43 -0
  77. package/dist/components/input.d.ts +16 -0
  78. package/dist/components/input.js +18 -0
  79. package/dist/components/kbd.d.ts +12 -0
  80. package/dist/components/kbd.js +11 -0
  81. package/dist/components/label.d.ts +8 -0
  82. package/dist/components/label.js +10 -0
  83. package/dist/components/mention-list.d.ts +54 -0
  84. package/dist/components/mention-list.js +31 -0
  85. package/dist/components/menubar.d.ts +64 -0
  86. package/dist/components/menubar.js +68 -0
  87. package/dist/components/message-actions.d.ts +34 -0
  88. package/dist/components/message-actions.js +68 -0
  89. package/dist/components/message-response.d.ts +20 -0
  90. package/dist/components/message-response.js +46 -0
  91. package/dist/components/message-scroller.d.ts +71 -0
  92. package/dist/components/message-scroller.js +217 -0
  93. package/dist/components/message.d.ts +49 -0
  94. package/dist/components/message.js +59 -0
  95. package/dist/components/navigation-menu.d.ts +45 -0
  96. package/dist/components/navigation-menu.js +54 -0
  97. package/dist/components/notice-banner.d.ts +14 -0
  98. package/dist/components/notice-banner.js +11 -0
  99. package/dist/components/page-content.d.ts +7 -0
  100. package/dist/components/page-content.js +9 -0
  101. package/dist/components/page-header.d.ts +37 -0
  102. package/dist/components/page-header.js +53 -0
  103. package/dist/components/pagination.d.ts +29 -0
  104. package/dist/components/pagination.js +29 -0
  105. package/dist/components/plan-outline.d.ts +60 -0
  106. package/dist/components/plan-outline.js +108 -0
  107. package/dist/components/popover.d.ts +34 -0
  108. package/dist/components/popover.js +35 -0
  109. package/dist/components/progress.d.ts +27 -0
  110. package/dist/components/progress.js +35 -0
  111. package/dist/components/prompt-list.d.ts +23 -0
  112. package/dist/components/prompt-list.js +11 -0
  113. package/dist/components/questionnaire.d.ts +148 -0
  114. package/dist/components/questionnaire.js +1001 -0
  115. package/dist/components/radio-group.d.ts +16 -0
  116. package/dist/components/radio-group.js +21 -0
  117. package/dist/components/reasoning-effort.d.ts +24 -0
  118. package/dist/components/reasoning-effort.js +269 -0
  119. package/dist/components/resizable.d.ts +67 -0
  120. package/dist/components/resizable.js +536 -0
  121. package/dist/components/result-card.d.ts +58 -0
  122. package/dist/components/result-card.js +88 -0
  123. package/dist/components/review-card.d.ts +62 -0
  124. package/dist/components/review-card.js +49 -0
  125. package/dist/components/rich-text-editor.d.ts +51 -0
  126. package/dist/components/rich-text-editor.js +248 -0
  127. package/dist/components/schema-diagram.d.ts +52 -0
  128. package/dist/components/schema-diagram.js +226 -0
  129. package/dist/components/scroll-area.d.ts +22 -0
  130. package/dist/components/scroll-area.js +19 -0
  131. package/dist/components/search-dialog.d.ts +103 -0
  132. package/dist/components/search-dialog.js +64 -0
  133. package/dist/components/search-field.d.ts +17 -0
  134. package/dist/components/search-field.js +27 -0
  135. package/dist/components/select.d.ts +57 -0
  136. package/dist/components/select.js +57 -0
  137. package/dist/components/selection-slot.d.ts +18 -0
  138. package/dist/components/selection-slot.js +53 -0
  139. package/dist/components/separator.d.ts +48 -0
  140. package/dist/components/separator.js +54 -0
  141. package/dist/components/settings-list.d.ts +26 -0
  142. package/dist/components/settings-list.js +17 -0
  143. package/dist/components/sheet.d.ts +70 -0
  144. package/dist/components/sheet.js +77 -0
  145. package/dist/components/sidebar.d.ts +70 -0
  146. package/dist/components/sidebar.js +187 -0
  147. package/dist/components/skeleton.d.ts +31 -0
  148. package/dist/components/skeleton.js +32 -0
  149. package/dist/components/slider.d.ts +17 -0
  150. package/dist/components/slider.js +24 -0
  151. package/dist/components/spinner.d.ts +37 -0
  152. package/dist/components/spinner.js +43 -0
  153. package/dist/components/state-panel-samples.d.ts +25 -0
  154. package/dist/components/state-panel-samples.js +423 -0
  155. package/dist/components/state-panel.d.ts +35 -0
  156. package/dist/components/state-panel.js +29 -0
  157. package/dist/components/state-sample.d.ts +63 -0
  158. package/dist/components/state-sample.js +42 -0
  159. package/dist/components/switch.d.ts +12 -0
  160. package/dist/components/switch.js +14 -0
  161. package/dist/components/table-nuqs.d.ts +16 -0
  162. package/dist/components/table-nuqs.js +59 -0
  163. package/dist/components/table.d.ts +120 -0
  164. package/dist/components/table.js +663 -0
  165. package/dist/components/tabs.d.ts +37 -0
  166. package/dist/components/tabs.js +36 -0
  167. package/dist/components/textarea.d.ts +18 -0
  168. package/dist/components/textarea.js +19 -0
  169. package/dist/components/toast.d.ts +45 -0
  170. package/dist/components/toast.js +83 -0
  171. package/dist/components/toggle-group.d.ts +30 -0
  172. package/dist/components/toggle-group.js +39 -0
  173. package/dist/components/toggle.d.ts +27 -0
  174. package/dist/components/toggle.js +21 -0
  175. package/dist/components/tool-activity.d.ts +79 -0
  176. package/dist/components/tool-activity.js +226 -0
  177. package/dist/components/toolbar-status.d.ts +21 -0
  178. package/dist/components/toolbar-status.js +14 -0
  179. package/dist/components/tooltip.d.ts +31 -0
  180. package/dist/components/tooltip.js +99 -0
  181. package/dist/components/typed-text.d.ts +17 -0
  182. package/dist/components/typed-text.js +56 -0
  183. package/dist/index.d.ts +88 -0
  184. package/dist/index.js +88 -0
  185. package/dist/internal/brand-glyphs.d.ts +342 -0
  186. package/dist/internal/brand-glyphs.js +238 -0
  187. package/dist/internal/classes.d.ts +3 -0
  188. package/dist/internal/classes.js +20 -0
  189. package/dist/internal/fieldset.d.ts +6 -0
  190. package/dist/internal/fieldset.js +38 -0
  191. package/dist/internal/file-kind.d.ts +4 -0
  192. package/dist/internal/file-kind.js +62 -0
  193. package/dist/internal/languages.d.ts +7 -0
  194. package/dist/internal/languages.js +1010 -0
  195. package/dist/internal/message-scroller.d.ts +102 -0
  196. package/dist/internal/message-scroller.js +637 -0
  197. package/dist/internal/pressable.d.ts +2 -0
  198. package/dist/internal/pressable.js +29 -0
  199. package/dist/internal/syntax.d.ts +14 -0
  200. package/dist/internal/syntax.js +137 -0
  201. package/dist/styles/accordion.css +102 -0
  202. package/dist/styles/alert-dialog.css +198 -0
  203. package/dist/styles/alert.css +149 -0
  204. package/dist/styles/aspect-ratio.css +8 -0
  205. package/dist/styles/attachment.css +720 -0
  206. package/dist/styles/avatar.css +186 -0
  207. package/dist/styles/badge.css +178 -0
  208. package/dist/styles/brand-icon.css +104 -0
  209. package/dist/styles/breadcrumb.css +121 -0
  210. package/dist/styles/button-group.css +113 -0
  211. package/dist/styles/button.css +380 -0
  212. package/dist/styles/calendar.css +295 -0
  213. package/dist/styles/canvas.css +327 -0
  214. package/dist/styles/card.css +146 -0
  215. package/dist/styles/carousel.css +107 -0
  216. package/dist/styles/chart.css +227 -0
  217. package/dist/styles/chat-confirmation.css +29 -0
  218. package/dist/styles/chat-plan.css +109 -0
  219. package/dist/styles/chat-sources.css +191 -0
  220. package/dist/styles/checkbox.css +123 -0
  221. package/dist/styles/choice-list.css +343 -0
  222. package/dist/styles/code-block.css +211 -0
  223. package/dist/styles/collapsible.css +72 -0
  224. package/dist/styles/combobox.css +347 -0
  225. package/dist/styles/command.css +233 -0
  226. package/dist/styles/context-menu.css +151 -0
  227. package/dist/styles/dialog.css +237 -0
  228. package/dist/styles/dropdown-menu.css +150 -0
  229. package/dist/styles/field.css +341 -0
  230. package/dist/styles/file-viewer.css +278 -0
  231. package/dist/styles/form.css +155 -0
  232. package/dist/styles/glass-banner.css +308 -0
  233. package/dist/styles/gradient-banner.css +256 -0
  234. package/dist/styles/hover-card.css +95 -0
  235. package/dist/styles/index.css +262 -0
  236. package/dist/styles/input-group.css +290 -0
  237. package/dist/styles/input-otp.css +138 -0
  238. package/dist/styles/input.css +99 -0
  239. package/dist/styles/kbd.css +59 -0
  240. package/dist/styles/label.css +89 -0
  241. package/dist/styles/mention-list.css +166 -0
  242. package/dist/styles/menubar.css +226 -0
  243. package/dist/styles/message-actions.css +83 -0
  244. package/dist/styles/message-response.css +176 -0
  245. package/dist/styles/message-scroller.css +136 -0
  246. package/dist/styles/message.css +310 -0
  247. package/dist/styles/navigation-menu.css +291 -0
  248. package/dist/styles/notice-banner.css +68 -0
  249. package/dist/styles/page-content.css +21 -0
  250. package/dist/styles/page-header.css +156 -0
  251. package/dist/styles/pagination.css +72 -0
  252. package/dist/styles/plan-outline.css +393 -0
  253. package/dist/styles/popover.css +140 -0
  254. package/dist/styles/progress.css +93 -0
  255. package/dist/styles/prompt-list.css +165 -0
  256. package/dist/styles/questionnaire.css +323 -0
  257. package/dist/styles/radio-group.css +120 -0
  258. package/dist/styles/reasoning-effort.css +157 -0
  259. package/dist/styles/resizable.css +108 -0
  260. package/dist/styles/result-card.css +215 -0
  261. package/dist/styles/review-card.css +235 -0
  262. package/dist/styles/rich-text-editor.css +169 -0
  263. package/dist/styles/schema-diagram.css +419 -0
  264. package/dist/styles/scroll-area.css +77 -0
  265. package/dist/styles/search-dialog.css +363 -0
  266. package/dist/styles/search-field.css +17 -0
  267. package/dist/styles/select.css +285 -0
  268. package/dist/styles/selection-slot.css +31 -0
  269. package/dist/styles/separator.css +206 -0
  270. package/dist/styles/settings-list.css +81 -0
  271. package/dist/styles/sheet.css +361 -0
  272. package/dist/styles/sidebar.css +363 -0
  273. package/dist/styles/skeleton.css +80 -0
  274. package/dist/styles/slider.css +142 -0
  275. package/dist/styles/spinner.css +39 -0
  276. package/dist/styles/state-panel-samples.css +41 -0
  277. package/dist/styles/state-panel.css +182 -0
  278. package/dist/styles/state-sample.css +285 -0
  279. package/dist/styles/switch.css +128 -0
  280. package/dist/styles/table.css +604 -0
  281. package/dist/styles/tabs.css +223 -0
  282. package/dist/styles/textarea.css +78 -0
  283. package/dist/styles/themes/chatgpt.css +125 -0
  284. package/dist/styles/themes/claude.css +125 -0
  285. package/dist/styles/themes/cloudflare.css +125 -0
  286. package/dist/styles/themes/discord.css +125 -0
  287. package/dist/styles/themes/github.css +125 -0
  288. package/dist/styles/themes/grok.css +125 -0
  289. package/dist/styles/themes/linear.css +126 -0
  290. package/dist/styles/themes/neutral.css +125 -0
  291. package/dist/styles/themes/notion.css +125 -0
  292. package/dist/styles/themes/perplexity.css +125 -0
  293. package/dist/styles/themes/raycast.css +125 -0
  294. package/dist/styles/themes/spotify.css +125 -0
  295. package/dist/styles/themes/stripe.css +125 -0
  296. package/dist/styles/themes/supabase.css +125 -0
  297. package/dist/styles/themes/tulipfarm.css +125 -0
  298. package/dist/styles/themes/vercel.css +126 -0
  299. package/dist/styles/toast.css +197 -0
  300. package/dist/styles/toggle-group.css +161 -0
  301. package/dist/styles/toggle.css +119 -0
  302. package/dist/styles/tool-activity.css +396 -0
  303. package/dist/styles/toolbar-status.css +52 -0
  304. package/dist/styles/tooltip.css +122 -0
  305. package/dist/styles/typed-text.css +17 -0
  306. package/package.json +443 -4
@@ -0,0 +1,720 @@
1
+ @layer base {
2
+ :root,
3
+ .light {
4
+ --sprout-file-paper: #ffffff;
5
+ --sprout-file-edge: #d4d4da;
6
+ --sprout-file-generic: #8e8f97;
7
+ --sprout-file-pdf: #e2463f;
8
+ --sprout-file-sheet: #1f8f4a;
9
+ --sprout-file-document: #2b67d1;
10
+ --sprout-file-slides: #d9622b;
11
+ --sprout-file-image: #a8d4f7;
12
+ --sprout-file-label: #ffffff;
13
+ }
14
+
15
+ .dark {
16
+ --sprout-file-paper: #2a2b30;
17
+ --sprout-file-edge: #4a4b52;
18
+ --sprout-file-image: #4d7ea8;
19
+ }
20
+
21
+ @media (prefers-color-scheme: dark) {
22
+ :root:not(.light):not(.dark) {
23
+ --sprout-file-paper: #2a2b30;
24
+ --sprout-file-edge: #4a4b52;
25
+ --sprout-file-image: #4d7ea8;
26
+ }
27
+ }
28
+ }
29
+
30
+ @layer components {
31
+ /* Attachment */
32
+ .sprout-attachment {
33
+ position: relative;
34
+ display: flex;
35
+ flex-wrap: wrap;
36
+ flex-shrink: 0;
37
+ box-sizing: border-box;
38
+ width: fit-content;
39
+ max-width: 100%;
40
+ min-width: 0;
41
+ border: 1px solid var(--sprout-line);
42
+ border-radius: 12px;
43
+ background: var(--sprout-surface);
44
+ color: var(--sprout-text);
45
+ font-family: inherit;
46
+ }
47
+ .sprout-attachment:has(> a, > button):hover {
48
+ background: color-mix(
49
+ in oklab,
50
+ var(--sprout-hover) 50%,
51
+ var(--sprout-surface)
52
+ );
53
+ }
54
+ .sprout-attachment:has(> .sprout-attachment-trigger:focus-visible) {
55
+ outline: 2px solid var(--sprout-focus);
56
+ outline-offset: 2px;
57
+ }
58
+ .sprout-attachment[data-state="idle"] {
59
+ border-style: dashed;
60
+ }
61
+ .sprout-attachment[data-state="error"] {
62
+ border-color: color-mix(in oklab, var(--sprout-danger) 35%, transparent);
63
+ }
64
+
65
+ .sprout-attachment-size-default {
66
+ gap: 8px;
67
+ font-size: var(--sprout-text-sm);
68
+ }
69
+ .sprout-attachment-size-default:has([data-slot="attachment-content"]) {
70
+ padding: 8px 10px;
71
+ }
72
+ .sprout-attachment-size-default:has([data-slot="attachment-media"]) {
73
+ padding: 8px;
74
+ }
75
+ .sprout-attachment-size-sm {
76
+ gap: 10px;
77
+ font-size: var(--sprout-text-xs);
78
+ }
79
+ .sprout-attachment-size-sm:has([data-slot="attachment-content"]) {
80
+ padding: 6px 8px;
81
+ }
82
+ .sprout-attachment-size-sm:has([data-slot="attachment-media"]) {
83
+ padding: 6px;
84
+ }
85
+ .sprout-attachment-size-xs {
86
+ gap: 6px;
87
+ border-radius: 8px;
88
+ font-size: var(--sprout-text-xs);
89
+ }
90
+ .sprout-attachment-size-xs:has([data-slot="attachment-content"]) {
91
+ padding: 4px 6px;
92
+ }
93
+ .sprout-attachment-size-xs:has([data-slot="attachment-media"]) {
94
+ padding: 4px;
95
+ }
96
+
97
+ .sprout-attachment-horizontal {
98
+ min-width: 10rem;
99
+ align-items: center;
100
+ }
101
+ .sprout-attachment-vertical {
102
+ width: 6rem;
103
+ flex-direction: column;
104
+ }
105
+ .sprout-attachment-vertical:has([data-slot="attachment-content"]) {
106
+ width: 7.5rem;
107
+ }
108
+
109
+ .sprout-attachment-media {
110
+ position: relative;
111
+ display: flex;
112
+ flex-shrink: 0;
113
+ align-items: center;
114
+ justify-content: center;
115
+ width: 40px;
116
+ aspect-ratio: 1;
117
+ overflow: hidden;
118
+ border-radius: 8px;
119
+ background: var(--sprout-hover);
120
+ color: var(--sprout-text);
121
+ }
122
+ .sprout-attachment-size-sm .sprout-attachment-media {
123
+ width: 32px;
124
+ }
125
+ .sprout-attachment-size-xs .sprout-attachment-media {
126
+ width: 28px;
127
+ border-radius: 6px;
128
+ }
129
+ .sprout-attachment-vertical .sprout-attachment-media {
130
+ width: 100%;
131
+ }
132
+ .sprout-attachment[data-state="error"] .sprout-attachment-media {
133
+ background: var(--sprout-danger-subtle);
134
+ color: var(--sprout-danger);
135
+ }
136
+ .sprout-attachment-media svg {
137
+ pointer-events: none;
138
+ }
139
+ .sprout-attachment-media svg:not([class*="size-"]) {
140
+ width: 16px;
141
+ height: 16px;
142
+ }
143
+ .sprout-attachment-vertical
144
+ .sprout-attachment-media
145
+ svg:not([class*="size-"]),
146
+ .sprout-attachment-vertical .sprout-attachment-media > [data-slot="spinner"] {
147
+ width: 24px;
148
+ height: 24px;
149
+ }
150
+ .sprout-attachment-size-xs
151
+ .sprout-attachment-media
152
+ svg:not([class*="size-"]) {
153
+ width: 14px;
154
+ height: 14px;
155
+ }
156
+ .sprout-attachment-media[data-variant="image"] {
157
+ opacity: 0.6;
158
+ }
159
+ .sprout-attachment:is([data-state="done"], [data-state="idle"])
160
+ .sprout-attachment-media[data-variant="image"] {
161
+ opacity: 1;
162
+ }
163
+ .sprout-attachment-media[data-variant="image"] > img {
164
+ width: 100%;
165
+ aspect-ratio: 1;
166
+ object-fit: cover;
167
+ }
168
+
169
+ .sprout-attachment-content {
170
+ flex: 1 1 0%;
171
+ max-width: 100%;
172
+ min-width: 0;
173
+ line-height: 1.25;
174
+ }
175
+ .sprout-attachment-vertical .sprout-attachment-content {
176
+ padding-inline: 4px;
177
+ }
178
+ .sprout-attachment-title {
179
+ display: block;
180
+ max-width: 100%;
181
+ min-width: 0;
182
+ overflow: hidden;
183
+ font-weight: 500;
184
+ text-overflow: ellipsis;
185
+ white-space: nowrap;
186
+ }
187
+ .sprout-attachment-description {
188
+ display: block;
189
+ max-width: 100%;
190
+ min-width: 0;
191
+ margin-top: 2px;
192
+ overflow: hidden;
193
+ color: var(--sprout-muted);
194
+ font-size: var(--sprout-text-xs);
195
+ text-overflow: ellipsis;
196
+ white-space: nowrap;
197
+ }
198
+ .sprout-attachment[data-state="error"] .sprout-attachment-description {
199
+ color: var(--sprout-danger);
200
+ }
201
+
202
+ .sprout-attachment-actions {
203
+ position: relative;
204
+ z-index: 2;
205
+ display: flex;
206
+ flex-shrink: 0;
207
+ align-items: center;
208
+ }
209
+ .sprout-attachment-vertical .sprout-attachment-actions {
210
+ position: absolute;
211
+ top: 12px;
212
+ right: 12px;
213
+ gap: 4px;
214
+ }
215
+ .sprout-attachment-vertical .sprout-attachment-actions .sprout-button {
216
+ background: color-mix(in oklab, var(--sprout-surface) 88%, transparent);
217
+ }
218
+ .sprout-attachment-size-xs.sprout-attachment-vertical
219
+ .sprout-attachment-actions {
220
+ top: 6px;
221
+ right: 6px;
222
+ }
223
+
224
+ .sprout-attachment-trigger {
225
+ position: absolute;
226
+ inset: 0;
227
+ z-index: 1;
228
+ margin: 0;
229
+ padding: 0;
230
+ border: 0;
231
+ border-radius: inherit;
232
+ background: transparent;
233
+ cursor: pointer;
234
+ outline: none;
235
+ }
236
+
237
+ /* The name shimmers while the file uploads or processes. */
238
+ .sprout-attachment:is([data-state="uploading"], [data-state="processing"])
239
+ .sprout-attachment-title,
240
+ .sprout-file-attachment:is(
241
+ [data-state="uploading"],
242
+ [data-state="processing"]
243
+ )
244
+ .sprout-file-attachment-name {
245
+ color: var(--sprout-muted);
246
+ }
247
+
248
+ /* Groups */
249
+ .sprout-attachment-group {
250
+ min-width: 0;
251
+ }
252
+ .sprout-attachment-group-grid {
253
+ display: grid;
254
+ grid-template-columns: repeat(2, minmax(0, 1fr));
255
+ gap: 12px;
256
+ }
257
+ @media (min-width: 40rem) {
258
+ .sprout-attachment-group-grid {
259
+ grid-template-columns: repeat(3, minmax(0, 1fr));
260
+ }
261
+ }
262
+ .sprout-attachment-group-list {
263
+ display: flex;
264
+ flex-direction: column;
265
+ gap: 8px;
266
+ }
267
+ .sprout-attachment-group-inline {
268
+ display: flex;
269
+ flex-wrap: wrap;
270
+ gap: 8px;
271
+ }
272
+
273
+ .sprout-attachment-group-carousel {
274
+ --sprout-attachment-fade: var(--sprout-surface);
275
+ position: relative;
276
+ }
277
+ .sprout-attachment-carousel-viewport {
278
+ overflow-x: auto;
279
+ overflow-y: hidden;
280
+ overscroll-behavior-x: contain;
281
+ scrollbar-width: none;
282
+ scroll-padding-inline: 32px;
283
+ }
284
+ .sprout-attachment-carousel-viewport::-webkit-scrollbar {
285
+ display: none;
286
+ }
287
+ .sprout-attachment-carousel-track {
288
+ display: flex;
289
+ gap: 8px;
290
+ width: max-content;
291
+ padding: 4px 3px;
292
+ }
293
+ .sprout-attachment-carousel-item {
294
+ flex-shrink: 0;
295
+ min-width: 0;
296
+ }
297
+ .sprout-attachment-carousel-edge {
298
+ position: absolute;
299
+ inset-block: 0;
300
+ display: flex;
301
+ align-items: center;
302
+ pointer-events: none;
303
+ }
304
+ .sprout-attachment-carousel-edge[data-side="start"] {
305
+ left: 0;
306
+ padding-right: 32px;
307
+ background: linear-gradient(
308
+ to right,
309
+ var(--sprout-attachment-fade),
310
+ transparent
311
+ );
312
+ }
313
+ .sprout-attachment-carousel-edge[data-side="end"] {
314
+ right: 0;
315
+ padding-left: 32px;
316
+ background: linear-gradient(
317
+ to left,
318
+ var(--sprout-attachment-fade),
319
+ transparent
320
+ );
321
+ }
322
+ .sprout-attachment-carousel-arrow {
323
+ display: flex;
324
+ align-items: center;
325
+ justify-content: center;
326
+ width: 24px;
327
+ height: 24px;
328
+ padding: 0;
329
+ border: 1px solid var(--sprout-line);
330
+ border-radius: 8px;
331
+ background: var(--sprout-surface);
332
+ box-shadow: var(--sprout-shadow-control);
333
+ color: var(--sprout-muted);
334
+ cursor: pointer;
335
+ opacity: 0;
336
+ pointer-events: auto;
337
+ }
338
+ .sprout-attachment-group-carousel:hover .sprout-attachment-carousel-arrow,
339
+ .sprout-attachment-group-carousel:focus-within
340
+ .sprout-attachment-carousel-arrow,
341
+ .sprout-attachment-carousel-arrow:focus-visible {
342
+ opacity: 1;
343
+ }
344
+ @media (pointer: coarse) {
345
+ .sprout-attachment-carousel-arrow {
346
+ opacity: 1;
347
+ }
348
+ }
349
+ .sprout-attachment-carousel-arrow:hover {
350
+ background: var(--sprout-hover);
351
+ color: var(--sprout-text);
352
+ }
353
+ .sprout-attachment-carousel-arrow:focus-visible {
354
+ outline: 2px solid var(--sprout-focus);
355
+ outline-offset: 1px;
356
+ }
357
+
358
+ /* File type icon */
359
+ .sprout-file-type-icon {
360
+ flex-shrink: 0;
361
+ }
362
+ .sprout-file-type-icon-size-sm {
363
+ width: 20px;
364
+ height: 24px;
365
+ }
366
+ .sprout-file-type-icon-size-lg {
367
+ width: 30px;
368
+ height: 36px;
369
+ }
370
+ .sprout-file-type-icon-paper {
371
+ fill: var(--sprout-file-paper);
372
+ stroke: var(--sprout-file-edge);
373
+ }
374
+ .sprout-file-type-icon-fold {
375
+ fill: none;
376
+ stroke: var(--sprout-file-edge);
377
+ }
378
+ .sprout-file-type-icon-lines {
379
+ stroke: var(--sprout-file-edge);
380
+ }
381
+ .sprout-file-type-icon-badge {
382
+ fill: var(--sprout-file-generic);
383
+ }
384
+ .sprout-file-type-icon[data-kind="pdf"] .sprout-file-type-icon-badge {
385
+ fill: var(--sprout-file-pdf);
386
+ }
387
+ .sprout-file-type-icon[data-kind="sheet"] .sprout-file-type-icon-badge {
388
+ fill: var(--sprout-file-sheet);
389
+ }
390
+ .sprout-file-type-icon:is([data-kind="document"], [data-kind="google"])
391
+ .sprout-file-type-icon-badge {
392
+ fill: var(--sprout-file-document);
393
+ }
394
+ .sprout-file-type-icon[data-kind="slides"] .sprout-file-type-icon-badge {
395
+ fill: var(--sprout-file-slides);
396
+ }
397
+ .sprout-file-type-icon[data-kind="image"] .sprout-file-type-icon-badge {
398
+ fill: var(--sprout-file-image);
399
+ }
400
+ .sprout-file-type-icon-label {
401
+ fill: var(--sprout-file-label);
402
+ font-family: inherit;
403
+ }
404
+
405
+ /* File attachment */
406
+ .sprout-file-attachment {
407
+ position: relative;
408
+ box-sizing: border-box;
409
+ min-width: 0;
410
+ border: 1px solid var(--sprout-line);
411
+ border-radius: 12px;
412
+ background: var(--sprout-surface);
413
+ color: var(--sprout-text);
414
+ font-family: inherit;
415
+ }
416
+ .sprout-file-attachment[data-state="error"] {
417
+ border-color: var(--sprout-danger);
418
+ }
419
+ .sprout-file-attachment[data-variant="list"] {
420
+ display: flex;
421
+ align-items: center;
422
+ gap: 8px;
423
+ padding: 8px;
424
+ }
425
+ .sprout-file-attachment[data-variant="inline"] {
426
+ display: flex;
427
+ align-items: center;
428
+ gap: 4px;
429
+ max-width: 100%;
430
+ padding-left: 8px;
431
+ }
432
+ .sprout-file-attachment[data-variant="inline"]:not(
433
+ :has(.sprout-file-attachment-actions)
434
+ ) {
435
+ padding-right: 10px;
436
+ }
437
+ .sprout-file-attachment[data-variant="grid"] {
438
+ display: flex;
439
+ flex-direction: column;
440
+ }
441
+ .sprout-file-attachment[data-variant="chip"] {
442
+ display: flex;
443
+ flex-shrink: 0;
444
+ align-items: center;
445
+ gap: 4px;
446
+ height: 36px;
447
+ max-width: 12rem;
448
+ padding: 0 12px 0 10px;
449
+ box-shadow: var(--sprout-shadow-control);
450
+ }
451
+ .sprout-file-attachment[data-variant="chip"][data-removable] {
452
+ padding-right: 4px;
453
+ }
454
+
455
+ .sprout-file-attachment-open {
456
+ display: block;
457
+ flex: 1 1 0%;
458
+ min-width: 0;
459
+ margin: 0;
460
+ padding: 4px 0;
461
+ border: 0;
462
+ border-radius: 6px;
463
+ background: transparent;
464
+ color: inherit;
465
+ font: inherit;
466
+ text-align: left;
467
+ }
468
+ button.sprout-file-attachment-open {
469
+ cursor: pointer;
470
+ }
471
+ button.sprout-file-attachment-open:disabled {
472
+ cursor: default;
473
+ }
474
+ .sprout-file-attachment[data-variant="grid"] .sprout-file-attachment-open {
475
+ padding: 12px;
476
+ }
477
+ .sprout-file-attachment[data-variant="chip"] .sprout-file-attachment-open {
478
+ display: flex;
479
+ align-items: center;
480
+ gap: 8px;
481
+ padding: 0;
482
+ }
483
+ .sprout-file-attachment-peek {
484
+ width: 22rem;
485
+ padding: 4px;
486
+ }
487
+ .sprout-file-attachment-open:focus-visible,
488
+ .sprout-file-attachment-preview:focus-visible {
489
+ outline: 2px solid var(--sprout-focus);
490
+ outline-offset: 2px;
491
+ }
492
+ .sprout-file-attachment:has(
493
+ button.sprout-file-attachment-open:not(:disabled)
494
+ ):hover {
495
+ background: color-mix(
496
+ in oklab,
497
+ var(--sprout-hover) 50%,
498
+ var(--sprout-surface)
499
+ );
500
+ }
501
+
502
+ .sprout-file-attachment-name {
503
+ display: block;
504
+ min-width: 0;
505
+ overflow: hidden;
506
+ font-size: var(--sprout-text-sm);
507
+ font-weight: 500;
508
+ line-height: 1.25rem;
509
+ text-overflow: ellipsis;
510
+ white-space: nowrap;
511
+ }
512
+ .sprout-file-attachment[data-variant="chip"] .sprout-file-attachment-name {
513
+ font-size: var(--sprout-text-xs);
514
+ line-height: 1rem;
515
+ }
516
+ .sprout-file-attachment-status {
517
+ display: flex;
518
+ align-items: center;
519
+ gap: 4px;
520
+ margin-top: 2px;
521
+ color: var(--sprout-muted);
522
+ font-size: var(--sprout-text-xs);
523
+ line-height: 1rem;
524
+ }
525
+ .sprout-file-attachment[data-state="error"] .sprout-file-attachment-status,
526
+ .sprout-file-attachment-failed {
527
+ color: var(--sprout-danger);
528
+ }
529
+ .sprout-file-attachment-failed {
530
+ flex-shrink: 0;
531
+ font-size: var(--sprout-text-xs);
532
+ }
533
+
534
+ .sprout-file-attachment-media {
535
+ display: flex;
536
+ flex-shrink: 0;
537
+ color: var(--sprout-muted);
538
+ }
539
+ .sprout-file-attachment[data-variant="list"] .sprout-file-attachment-media {
540
+ align-items: center;
541
+ justify-content: center;
542
+ width: 40px;
543
+ height: 40px;
544
+ overflow: hidden;
545
+ border-radius: 6px;
546
+ background: var(--sprout-hover);
547
+ }
548
+ .sprout-file-attachment-media > .sprout-attachment-image {
549
+ width: 100%;
550
+ height: 100%;
551
+ object-fit: cover;
552
+ }
553
+
554
+ .sprout-file-attachment-preview {
555
+ display: flex;
556
+ align-items: center;
557
+ justify-content: center;
558
+ width: 100%;
559
+ aspect-ratio: 16 / 9;
560
+ margin: 0;
561
+ padding: 0;
562
+ overflow: hidden;
563
+ border: 0;
564
+ border-radius: 11px 11px 0 0;
565
+ background: var(--sprout-hover);
566
+ color: var(--sprout-muted);
567
+ font: inherit;
568
+ }
569
+ button.sprout-file-attachment-preview {
570
+ cursor: pointer;
571
+ }
572
+ .sprout-file-attachment-preview > .sprout-attachment-image {
573
+ width: 100%;
574
+ height: 100%;
575
+ object-fit: cover;
576
+ }
577
+
578
+ .sprout-file-attachment-thumb {
579
+ display: flex;
580
+ flex-shrink: 0;
581
+ align-items: center;
582
+ justify-content: center;
583
+ width: 22px;
584
+ height: 22px;
585
+ overflow: hidden;
586
+ border-radius: 6px;
587
+ background: var(--sprout-file-image);
588
+ }
589
+ .sprout-file-attachment-thumb > .sprout-attachment-image {
590
+ width: 100%;
591
+ height: 100%;
592
+ object-fit: cover;
593
+ }
594
+ .sprout-file-attachment-thumb > .sprout-attachment-image-failed {
595
+ padding: 0;
596
+ font-size: 0;
597
+ }
598
+ .sprout-file-attachment-thumb > .sprout-attachment-image-failed svg {
599
+ width: 12px;
600
+ height: 12px;
601
+ }
602
+
603
+ .sprout-file-attachment-actions {
604
+ display: flex;
605
+ flex-shrink: 0;
606
+ align-items: center;
607
+ }
608
+ .sprout-file-attachment[data-variant="grid"] .sprout-file-attachment-actions {
609
+ position: absolute;
610
+ top: 4px;
611
+ right: 4px;
612
+ border-radius: 6px;
613
+ background: var(--sprout-surface);
614
+ }
615
+
616
+ .sprout-attachment-image-failed {
617
+ display: flex;
618
+ align-items: center;
619
+ gap: 8px;
620
+ padding: 8px;
621
+ color: var(--sprout-muted);
622
+ font-size: var(--sprout-text-xs);
623
+ }
624
+
625
+ /* Dropzone */
626
+ .sprout-attachment-dropzone {
627
+ box-sizing: border-box;
628
+ padding: 20px;
629
+ border: 1px dashed var(--sprout-input);
630
+ border-radius: 12px;
631
+ background: color-mix(
632
+ in oklab,
633
+ var(--sprout-hover) 30%,
634
+ var(--sprout-surface)
635
+ );
636
+ color: var(--sprout-text);
637
+ text-align: center;
638
+ }
639
+ .sprout-attachment-dropzone[data-dragging] {
640
+ border-color: var(--sprout-focus);
641
+ background: var(--sprout-primary-subtle);
642
+ }
643
+ .sprout-attachment-dropzone[data-disabled] {
644
+ cursor: not-allowed;
645
+ }
646
+ .sprout-attachment-dropzone[data-disabled] .sprout-attachment-dropzone-icon {
647
+ opacity: 0.5;
648
+ }
649
+ .sprout-attachment-dropzone-icon {
650
+ display: block;
651
+ margin: 0 auto 8px;
652
+ color: var(--sprout-muted);
653
+ }
654
+ .sprout-attachment-dropzone-text {
655
+ margin: 0 0 12px;
656
+ color: var(--sprout-muted);
657
+ font-size: var(--sprout-text-sm);
658
+ line-height: 1.25rem;
659
+ }
660
+
661
+ @media (prefers-reduced-motion: no-preference) {
662
+ .sprout-attachment,
663
+ .sprout-file-attachment,
664
+ .sprout-attachment-dropzone {
665
+ transition:
666
+ background-color var(--sprout-motion-normal) var(--sprout-motion-ease),
667
+ border-color var(--sprout-motion-normal) var(--sprout-motion-ease);
668
+ }
669
+ .sprout-attachment-media[data-variant="image"] {
670
+ transition: opacity var(--sprout-motion-normal) var(--sprout-motion-ease);
671
+ }
672
+ .sprout-attachment-carousel-arrow {
673
+ transition:
674
+ opacity var(--sprout-motion-fast) var(--sprout-motion-ease),
675
+ background-color var(--sprout-motion-fast) var(--sprout-motion-ease),
676
+ color var(--sprout-motion-fast) var(--sprout-motion-ease);
677
+ }
678
+ .sprout-attachment-carousel-viewport {
679
+ scroll-behavior: smooth;
680
+ }
681
+ .sprout-attachment:is([data-state="uploading"], [data-state="processing"])
682
+ .sprout-attachment-title,
683
+ .sprout-file-attachment:is(
684
+ [data-state="uploading"],
685
+ [data-state="processing"]
686
+ )
687
+ .sprout-file-attachment-name {
688
+ background: linear-gradient(
689
+ 90deg,
690
+ var(--sprout-muted) 0%,
691
+ var(--sprout-muted) 40%,
692
+ var(--sprout-text) 50%,
693
+ var(--sprout-muted) 60%,
694
+ var(--sprout-muted) 100%
695
+ )
696
+ 0 0 / 250% 100%;
697
+ -webkit-background-clip: text;
698
+ background-clip: text;
699
+ -webkit-text-fill-color: transparent;
700
+ animation: sprout-attachment-shimmer 1.8s linear infinite;
701
+ }
702
+ }
703
+
704
+ @media (forced-colors: active) {
705
+ .sprout-attachment-title,
706
+ .sprout-file-attachment-name {
707
+ background: none !important;
708
+ -webkit-text-fill-color: currentColor !important;
709
+ }
710
+ }
711
+ }
712
+
713
+ @keyframes sprout-attachment-shimmer {
714
+ from {
715
+ background-position: 100% 0;
716
+ }
717
+ to {
718
+ background-position: 0% 0;
719
+ }
720
+ }