@tulipfarm/sprout 0.0.0-stage → 0.2.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 (314) 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 +82 -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-input.d.ts +94 -0
  38. package/dist/components/chat-input.js +279 -0
  39. package/dist/components/chat-plan.d.ts +21 -0
  40. package/dist/components/chat-plan.js +35 -0
  41. package/dist/components/chat-sources.d.ts +64 -0
  42. package/dist/components/chat-sources.js +66 -0
  43. package/dist/components/checkbox.d.ts +16 -0
  44. package/dist/components/checkbox.js +17 -0
  45. package/dist/components/choice-list.d.ts +53 -0
  46. package/dist/components/choice-list.js +36 -0
  47. package/dist/components/code-block.d.ts +35 -0
  48. package/dist/components/code-block.js +64 -0
  49. package/dist/components/collapsible.d.ts +24 -0
  50. package/dist/components/collapsible.js +27 -0
  51. package/dist/components/combobox.d.ts +95 -0
  52. package/dist/components/combobox.js +106 -0
  53. package/dist/components/command.d.ts +94 -0
  54. package/dist/components/command.js +414 -0
  55. package/dist/components/context-menu.d.ts +57 -0
  56. package/dist/components/context-menu.js +60 -0
  57. package/dist/components/dialog.d.ts +60 -0
  58. package/dist/components/dialog.js +79 -0
  59. package/dist/components/direction.d.ts +6 -0
  60. package/dist/components/direction.js +6 -0
  61. package/dist/components/dropdown-menu.d.ts +62 -0
  62. package/dist/components/dropdown-menu.js +59 -0
  63. package/dist/components/field.d.ts +117 -0
  64. package/dist/components/field.js +150 -0
  65. package/dist/components/file-explorer.d.ts +27 -0
  66. package/dist/components/file-explorer.js +300 -0
  67. package/dist/components/file-viewer.d.ts +137 -0
  68. package/dist/components/file-viewer.js +400 -0
  69. package/dist/components/form.d.ts +87 -0
  70. package/dist/components/form.js +55 -0
  71. package/dist/components/glass-banner.d.ts +27 -0
  72. package/dist/components/glass-banner.js +116 -0
  73. package/dist/components/gradient-banner.d.ts +37 -0
  74. package/dist/components/gradient-banner.js +43 -0
  75. package/dist/components/hover-card.d.ts +27 -0
  76. package/dist/components/hover-card.js +26 -0
  77. package/dist/components/input-group.d.ts +68 -0
  78. package/dist/components/input-group.js +88 -0
  79. package/dist/components/input-otp.d.ts +38 -0
  80. package/dist/components/input-otp.js +43 -0
  81. package/dist/components/input.d.ts +16 -0
  82. package/dist/components/input.js +18 -0
  83. package/dist/components/kbd.d.ts +12 -0
  84. package/dist/components/kbd.js +11 -0
  85. package/dist/components/label.d.ts +8 -0
  86. package/dist/components/label.js +10 -0
  87. package/dist/components/mention-list.d.ts +54 -0
  88. package/dist/components/mention-list.js +31 -0
  89. package/dist/components/menubar.d.ts +64 -0
  90. package/dist/components/menubar.js +68 -0
  91. package/dist/components/message-actions.d.ts +34 -0
  92. package/dist/components/message-actions.js +68 -0
  93. package/dist/components/message-response.d.ts +20 -0
  94. package/dist/components/message-response.js +46 -0
  95. package/dist/components/message-scroller.d.ts +71 -0
  96. package/dist/components/message-scroller.js +217 -0
  97. package/dist/components/message.d.ts +49 -0
  98. package/dist/components/message.js +59 -0
  99. package/dist/components/navigation-menu.d.ts +45 -0
  100. package/dist/components/navigation-menu.js +54 -0
  101. package/dist/components/notice-banner.d.ts +14 -0
  102. package/dist/components/notice-banner.js +11 -0
  103. package/dist/components/page-content.d.ts +7 -0
  104. package/dist/components/page-content.js +9 -0
  105. package/dist/components/page-header.d.ts +37 -0
  106. package/dist/components/page-header.js +53 -0
  107. package/dist/components/pagination.d.ts +29 -0
  108. package/dist/components/pagination.js +29 -0
  109. package/dist/components/plan-outline.d.ts +60 -0
  110. package/dist/components/plan-outline.js +108 -0
  111. package/dist/components/popover.d.ts +34 -0
  112. package/dist/components/popover.js +35 -0
  113. package/dist/components/progress.d.ts +27 -0
  114. package/dist/components/progress.js +35 -0
  115. package/dist/components/prompt-list.d.ts +23 -0
  116. package/dist/components/prompt-list.js +11 -0
  117. package/dist/components/questionnaire.d.ts +148 -0
  118. package/dist/components/questionnaire.js +1002 -0
  119. package/dist/components/radio-group.d.ts +16 -0
  120. package/dist/components/radio-group.js +21 -0
  121. package/dist/components/reasoning-effort.d.ts +24 -0
  122. package/dist/components/reasoning-effort.js +269 -0
  123. package/dist/components/resizable.d.ts +67 -0
  124. package/dist/components/resizable.js +536 -0
  125. package/dist/components/result-card.d.ts +58 -0
  126. package/dist/components/result-card.js +88 -0
  127. package/dist/components/review-card.d.ts +62 -0
  128. package/dist/components/review-card.js +49 -0
  129. package/dist/components/rich-text-editor.d.ts +51 -0
  130. package/dist/components/rich-text-editor.js +248 -0
  131. package/dist/components/schema-diagram.d.ts +52 -0
  132. package/dist/components/schema-diagram.js +226 -0
  133. package/dist/components/scroll-area.d.ts +22 -0
  134. package/dist/components/scroll-area.js +19 -0
  135. package/dist/components/search-dialog.d.ts +103 -0
  136. package/dist/components/search-dialog.js +65 -0
  137. package/dist/components/search-field.d.ts +17 -0
  138. package/dist/components/search-field.js +27 -0
  139. package/dist/components/select.d.ts +57 -0
  140. package/dist/components/select.js +57 -0
  141. package/dist/components/selection-slot.d.ts +18 -0
  142. package/dist/components/selection-slot.js +53 -0
  143. package/dist/components/separator.d.ts +48 -0
  144. package/dist/components/separator.js +54 -0
  145. package/dist/components/settings-list.d.ts +26 -0
  146. package/dist/components/settings-list.js +17 -0
  147. package/dist/components/sheet.d.ts +70 -0
  148. package/dist/components/sheet.js +77 -0
  149. package/dist/components/sidebar.d.ts +70 -0
  150. package/dist/components/sidebar.js +187 -0
  151. package/dist/components/skeleton.d.ts +31 -0
  152. package/dist/components/skeleton.js +32 -0
  153. package/dist/components/slider.d.ts +17 -0
  154. package/dist/components/slider.js +24 -0
  155. package/dist/components/spinner.d.ts +37 -0
  156. package/dist/components/spinner.js +43 -0
  157. package/dist/components/state-panel-samples.d.ts +25 -0
  158. package/dist/components/state-panel-samples.js +423 -0
  159. package/dist/components/state-panel.d.ts +35 -0
  160. package/dist/components/state-panel.js +29 -0
  161. package/dist/components/state-sample.d.ts +63 -0
  162. package/dist/components/state-sample.js +42 -0
  163. package/dist/components/switch.d.ts +12 -0
  164. package/dist/components/switch.js +14 -0
  165. package/dist/components/table-nuqs.d.ts +16 -0
  166. package/dist/components/table-nuqs.js +59 -0
  167. package/dist/components/table.d.ts +120 -0
  168. package/dist/components/table.js +663 -0
  169. package/dist/components/tabs.d.ts +37 -0
  170. package/dist/components/tabs.js +36 -0
  171. package/dist/components/textarea.d.ts +18 -0
  172. package/dist/components/textarea.js +19 -0
  173. package/dist/components/toast.d.ts +45 -0
  174. package/dist/components/toast.js +83 -0
  175. package/dist/components/toggle-group.d.ts +30 -0
  176. package/dist/components/toggle-group.js +39 -0
  177. package/dist/components/toggle.d.ts +27 -0
  178. package/dist/components/toggle.js +21 -0
  179. package/dist/components/tool-activity.d.ts +79 -0
  180. package/dist/components/tool-activity.js +226 -0
  181. package/dist/components/toolbar-status.d.ts +21 -0
  182. package/dist/components/toolbar-status.js +14 -0
  183. package/dist/components/tooltip.d.ts +31 -0
  184. package/dist/components/tooltip.js +99 -0
  185. package/dist/components/typed-text.d.ts +17 -0
  186. package/dist/components/typed-text.js +56 -0
  187. package/dist/index.d.ts +90 -0
  188. package/dist/index.js +90 -0
  189. package/dist/internal/brand-glyphs.d.ts +370 -0
  190. package/dist/internal/brand-glyphs.js +262 -0
  191. package/dist/internal/classes.d.ts +3 -0
  192. package/dist/internal/classes.js +20 -0
  193. package/dist/internal/code-tokens.d.ts +4 -0
  194. package/dist/internal/code-tokens.js +34 -0
  195. package/dist/internal/fieldset.d.ts +6 -0
  196. package/dist/internal/fieldset.js +38 -0
  197. package/dist/internal/file-kind.d.ts +4 -0
  198. package/dist/internal/file-kind.js +62 -0
  199. package/dist/internal/languages.d.ts +7 -0
  200. package/dist/internal/languages.js +1010 -0
  201. package/dist/internal/message-scroller.d.ts +102 -0
  202. package/dist/internal/message-scroller.js +637 -0
  203. package/dist/internal/pressable.d.ts +2 -0
  204. package/dist/internal/pressable.js +29 -0
  205. package/dist/internal/syntax.d.ts +14 -0
  206. package/dist/internal/syntax.js +137 -0
  207. package/dist/styles/accordion.css +102 -0
  208. package/dist/styles/alert-dialog.css +198 -0
  209. package/dist/styles/alert.css +149 -0
  210. package/dist/styles/aspect-ratio.css +8 -0
  211. package/dist/styles/attachment.css +700 -0
  212. package/dist/styles/avatar.css +186 -0
  213. package/dist/styles/badge.css +178 -0
  214. package/dist/styles/brand-icon.css +104 -0
  215. package/dist/styles/breadcrumb.css +121 -0
  216. package/dist/styles/button-group.css +113 -0
  217. package/dist/styles/button.css +380 -0
  218. package/dist/styles/calendar.css +295 -0
  219. package/dist/styles/canvas.css +313 -0
  220. package/dist/styles/card.css +146 -0
  221. package/dist/styles/carousel.css +107 -0
  222. package/dist/styles/chart.css +227 -0
  223. package/dist/styles/chat-confirmation.css +29 -0
  224. package/dist/styles/chat-input.css +240 -0
  225. package/dist/styles/chat-plan.css +109 -0
  226. package/dist/styles/chat-sources.css +191 -0
  227. package/dist/styles/checkbox.css +122 -0
  228. package/dist/styles/choice-list.css +343 -0
  229. package/dist/styles/code-block.css +211 -0
  230. package/dist/styles/collapsible.css +72 -0
  231. package/dist/styles/combobox.css +347 -0
  232. package/dist/styles/command.css +233 -0
  233. package/dist/styles/context-menu.css +151 -0
  234. package/dist/styles/dialog.css +237 -0
  235. package/dist/styles/dropdown-menu.css +150 -0
  236. package/dist/styles/field.css +340 -0
  237. package/dist/styles/file-explorer.css +517 -0
  238. package/dist/styles/file-viewer.css +375 -0
  239. package/dist/styles/form.css +155 -0
  240. package/dist/styles/glass-banner.css +308 -0
  241. package/dist/styles/gradient-banner.css +256 -0
  242. package/dist/styles/hover-card.css +95 -0
  243. package/dist/styles/index.css +268 -0
  244. package/dist/styles/input-group.css +285 -0
  245. package/dist/styles/input-otp.css +138 -0
  246. package/dist/styles/input.css +98 -0
  247. package/dist/styles/kbd.css +59 -0
  248. package/dist/styles/label.css +89 -0
  249. package/dist/styles/mention-list.css +166 -0
  250. package/dist/styles/menubar.css +226 -0
  251. package/dist/styles/message-actions.css +83 -0
  252. package/dist/styles/message-response.css +176 -0
  253. package/dist/styles/message-scroller.css +136 -0
  254. package/dist/styles/message.css +310 -0
  255. package/dist/styles/navigation-menu.css +291 -0
  256. package/dist/styles/notice-banner.css +68 -0
  257. package/dist/styles/page-content.css +21 -0
  258. package/dist/styles/page-header.css +156 -0
  259. package/dist/styles/pagination.css +72 -0
  260. package/dist/styles/plan-outline.css +393 -0
  261. package/dist/styles/popover.css +140 -0
  262. package/dist/styles/progress.css +93 -0
  263. package/dist/styles/prompt-list.css +165 -0
  264. package/dist/styles/questionnaire.css +308 -0
  265. package/dist/styles/radio-group.css +119 -0
  266. package/dist/styles/reasoning-effort.css +157 -0
  267. package/dist/styles/resizable.css +108 -0
  268. package/dist/styles/result-card.css +215 -0
  269. package/dist/styles/review-card.css +235 -0
  270. package/dist/styles/rich-text-editor.css +169 -0
  271. package/dist/styles/schema-diagram.css +419 -0
  272. package/dist/styles/scroll-area.css +77 -0
  273. package/dist/styles/search-dialog.css +280 -0
  274. package/dist/styles/search-field.css +17 -0
  275. package/dist/styles/select.css +285 -0
  276. package/dist/styles/selection-slot.css +31 -0
  277. package/dist/styles/separator.css +206 -0
  278. package/dist/styles/settings-list.css +81 -0
  279. package/dist/styles/sheet.css +361 -0
  280. package/dist/styles/sidebar.css +363 -0
  281. package/dist/styles/skeleton.css +80 -0
  282. package/dist/styles/slider.css +142 -0
  283. package/dist/styles/spinner.css +39 -0
  284. package/dist/styles/state-panel-samples.css +41 -0
  285. package/dist/styles/state-panel.css +173 -0
  286. package/dist/styles/state-sample.css +285 -0
  287. package/dist/styles/switch.css +128 -0
  288. package/dist/styles/table.css +604 -0
  289. package/dist/styles/tabs.css +223 -0
  290. package/dist/styles/textarea.css +77 -0
  291. package/dist/styles/themes/chatgpt.css +125 -0
  292. package/dist/styles/themes/claude.css +125 -0
  293. package/dist/styles/themes/cloudflare.css +125 -0
  294. package/dist/styles/themes/discord.css +125 -0
  295. package/dist/styles/themes/github.css +125 -0
  296. package/dist/styles/themes/grok.css +125 -0
  297. package/dist/styles/themes/linear.css +126 -0
  298. package/dist/styles/themes/neutral.css +125 -0
  299. package/dist/styles/themes/notion.css +125 -0
  300. package/dist/styles/themes/perplexity.css +125 -0
  301. package/dist/styles/themes/raycast.css +125 -0
  302. package/dist/styles/themes/spotify.css +125 -0
  303. package/dist/styles/themes/stripe.css +125 -0
  304. package/dist/styles/themes/supabase.css +125 -0
  305. package/dist/styles/themes/tulipfarm.css +115 -0
  306. package/dist/styles/themes/vercel.css +126 -0
  307. package/dist/styles/toast.css +197 -0
  308. package/dist/styles/toggle-group.css +161 -0
  309. package/dist/styles/toggle.css +119 -0
  310. package/dist/styles/tool-activity.css +396 -0
  311. package/dist/styles/toolbar-status.css +52 -0
  312. package/dist/styles/tooltip.css +122 -0
  313. package/dist/styles/typed-text.css +17 -0
  314. package/package.json +452 -4
@@ -0,0 +1,604 @@
1
+ @layer components {
2
+ .sprout-table-container {
3
+ position: relative;
4
+ width: 100%;
5
+ overflow-x: auto;
6
+ }
7
+ .sprout-table-container:focus-visible {
8
+ outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
9
+ outline-offset: -1px;
10
+ }
11
+
12
+ .sprout-table {
13
+ --sprout-table-hover: color-mix(
14
+ in oklab,
15
+ var(--sprout-hover) 55%,
16
+ var(--sprout-surface)
17
+ );
18
+ --sprout-table-head-bg: color-mix(
19
+ in oklab,
20
+ var(--sprout-hover) 70%,
21
+ var(--sprout-surface)
22
+ );
23
+ width: 100%;
24
+ caption-side: bottom;
25
+ border-collapse: collapse;
26
+ font-size: var(--sprout-text-sm);
27
+ line-height: 1.25rem;
28
+ color: var(--sprout-text);
29
+ }
30
+
31
+ .sprout-table-row {
32
+ --sprout-table-row-bg: var(--sprout-surface);
33
+ border-bottom: 1px solid var(--sprout-line);
34
+ }
35
+ .sprout-table-body > .sprout-table-row:last-child,
36
+ .sprout-table-footer > .sprout-table-row:last-child {
37
+ border-bottom: 0;
38
+ }
39
+ .sprout-table-row[data-interactive] {
40
+ cursor: pointer;
41
+ }
42
+ @media (hover: hover) {
43
+ .sprout-table-body > .sprout-table-row:not([data-loading-row]):hover {
44
+ --sprout-table-row-bg: var(--sprout-table-hover);
45
+ background-color: var(--sprout-table-hover);
46
+ }
47
+ }
48
+ .sprout-table-row:has([aria-expanded="true"]),
49
+ .sprout-table-row[data-interactive]:has(:focus-visible) {
50
+ --sprout-table-row-bg: var(--sprout-table-hover);
51
+ background-color: var(--sprout-table-hover);
52
+ }
53
+ .sprout-table-row[data-state="selected"],
54
+ .sprout-table-body > .sprout-table-row[data-state="selected"]:hover {
55
+ --sprout-table-row-bg: var(--sprout-primary-subtle);
56
+ background-color: var(--sprout-primary-subtle);
57
+ }
58
+ .sprout-table-row[data-state="selected"] > td:first-child {
59
+ position: relative;
60
+ }
61
+ .sprout-table-row[data-state="selected"] > td:first-child::before {
62
+ content: "";
63
+ position: absolute;
64
+ inset-block: 0;
65
+ inset-inline-start: 0;
66
+ width: 4px;
67
+ background: var(--sprout-primary);
68
+ }
69
+
70
+ .sprout-table-footer {
71
+ border-top: 1px solid var(--sprout-line);
72
+ background: color-mix(in oklab, var(--sprout-hover) 50%, transparent);
73
+ font-weight: 500;
74
+ }
75
+
76
+ .sprout-table-head {
77
+ height: 40px;
78
+ padding: 0 8px;
79
+ vertical-align: middle;
80
+ font-weight: 500;
81
+ white-space: nowrap;
82
+ text-align: start;
83
+ color: var(--sprout-text);
84
+ }
85
+ .sprout-table-cell {
86
+ padding: 8px;
87
+ vertical-align: middle;
88
+ white-space: nowrap;
89
+ text-align: start;
90
+ }
91
+ .sprout-table-head[data-align="right"] {
92
+ text-align: end;
93
+ }
94
+ .sprout-table-cell[data-align="right"] {
95
+ text-align: end;
96
+ font-variant-numeric: tabular-nums;
97
+ }
98
+ .sprout-table-head[data-selection],
99
+ .sprout-table-cell[data-selection] {
100
+ width: 48px;
101
+ min-width: 48px;
102
+ }
103
+
104
+ .sprout-table-head[data-sticky-end],
105
+ .sprout-table-cell[data-sticky-end] {
106
+ position: sticky;
107
+ inset-inline-end: 0;
108
+ width: 1px;
109
+ }
110
+ .sprout-table-head[data-sticky-end] {
111
+ z-index: 20;
112
+ background: var(--sprout-table-head-bg);
113
+ }
114
+ .sprout-table-cell[data-sticky-end] {
115
+ z-index: 1;
116
+ background: var(--sprout-table-row-bg);
117
+ }
118
+ .sprout-table-head[data-sticky-end]::before,
119
+ .sprout-table-cell[data-sticky-end]::before {
120
+ content: "";
121
+ pointer-events: none;
122
+ position: absolute;
123
+ inset-block: 0;
124
+ inset-inline-start: 0;
125
+ width: 1px;
126
+ background: var(--sprout-input);
127
+ }
128
+
129
+ .sprout-table-caption {
130
+ margin-top: 16px;
131
+ font-size: var(--sprout-text-sm);
132
+ color: var(--sprout-muted);
133
+ }
134
+
135
+ .sprout-table[data-variant="grid"] .sprout-table-row {
136
+ border-color: var(--sprout-input);
137
+ }
138
+ .sprout-table[data-variant="grid"] > .sprout-table-header {
139
+ position: sticky;
140
+ top: 0;
141
+ z-index: 10;
142
+ background: var(--sprout-table-head-bg);
143
+ }
144
+ .sprout-table[data-variant="grid"]
145
+ > .sprout-table-header
146
+ > .sprout-table-row {
147
+ border-bottom: 0;
148
+ }
149
+ .sprout-table[data-variant="grid"] .sprout-table-head {
150
+ padding: 0 12px;
151
+ box-shadow: inset 0 -1px var(--sprout-input);
152
+ }
153
+ .sprout-table[data-variant="grid"] .sprout-table-cell {
154
+ padding: 10px 12px;
155
+ }
156
+ .sprout-table[data-variant="grid"] .sprout-table-head,
157
+ .sprout-table[data-variant="grid"] .sprout-table-cell {
158
+ border-inline-end: 1px solid var(--sprout-input);
159
+ }
160
+ .sprout-table[data-variant="grid"] .sprout-table-head:last-child,
161
+ .sprout-table[data-variant="grid"] .sprout-table-cell:last-child {
162
+ border-inline-end: 0;
163
+ }
164
+
165
+ .sprout-table-root {
166
+ display: flex;
167
+ flex-direction: column;
168
+ gap: 12px;
169
+ min-width: 0;
170
+ container: sprout-table / inline-size;
171
+ }
172
+
173
+ .sprout-table-toolbar {
174
+ display: flex;
175
+ flex-wrap: wrap;
176
+ align-items: center;
177
+ gap: 8px;
178
+ }
179
+ .sprout-table-toolbar-end {
180
+ display: flex;
181
+ gap: 4px;
182
+ margin-inline-start: auto;
183
+ }
184
+ .sprout-table-chip {
185
+ display: inline-flex;
186
+ align-items: center;
187
+ height: 28px;
188
+ border: 1px solid var(--sprout-input);
189
+ border-radius: 999px;
190
+ background: var(--sprout-surface);
191
+ font-size: var(--sprout-text-sm);
192
+ }
193
+ .sprout-table-chip-label,
194
+ .sprout-table-chip-remove {
195
+ display: inline-flex;
196
+ align-items: center;
197
+ height: 100%;
198
+ border: 0;
199
+ background: none;
200
+ color: inherit;
201
+ font: inherit;
202
+ cursor: pointer;
203
+ }
204
+ .sprout-table-chip-label {
205
+ padding: 0 4px 0 12px;
206
+ border-radius: 999px 0 0 999px;
207
+ }
208
+ .sprout-table-chip-remove {
209
+ padding: 0 8px 0 4px;
210
+ border-radius: 0 999px 999px 0;
211
+ color: var(--sprout-muted);
212
+ }
213
+ .sprout-table-chip-label:hover,
214
+ .sprout-table-chip-remove:hover {
215
+ background: var(--sprout-hover);
216
+ color: var(--sprout-text);
217
+ }
218
+ .sprout-table-chip-label:focus-visible,
219
+ .sprout-table-chip-remove:focus-visible {
220
+ outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
221
+ outline-offset: -1px;
222
+ }
223
+ .sprout-table-filter {
224
+ display: flex;
225
+ flex-direction: column;
226
+ gap: 8px;
227
+ min-width: 12rem;
228
+ margin: 0;
229
+ padding: 0;
230
+ border: 0;
231
+ }
232
+ .sprout-table-filter > legend {
233
+ margin-bottom: 8px;
234
+ font-weight: 500;
235
+ }
236
+ .sprout-table-filter-option {
237
+ display: flex;
238
+ align-items: center;
239
+ gap: 8px;
240
+ cursor: pointer;
241
+ }
242
+
243
+ .sprout-table-head {
244
+ position: relative;
245
+ }
246
+ .sprout-table-head-inner {
247
+ display: inline-flex;
248
+ align-items: center;
249
+ gap: 4px;
250
+ }
251
+ .sprout-table-head[data-align="right"] > .sprout-table-head-inner {
252
+ flex-direction: row-reverse;
253
+ }
254
+ .sprout-table-hint,
255
+ .sprout-table-handle,
256
+ .sprout-table-toggle {
257
+ display: inline-flex;
258
+ align-items: center;
259
+ margin: 0;
260
+ padding: 0;
261
+ border: 0;
262
+ border-radius: calc(var(--sprout-radius-control) - 2px);
263
+ background: none;
264
+ color: var(--sprout-muted);
265
+ font: inherit;
266
+ cursor: pointer;
267
+ }
268
+ .sprout-table-handle {
269
+ justify-content: center;
270
+ min-width: 24px;
271
+ min-height: 24px;
272
+ margin-block: -5px;
273
+ cursor: grab;
274
+ touch-action: none;
275
+ }
276
+ .sprout-table-handle + .sprout-button-size-column-header {
277
+ margin-inline-start: 0;
278
+ }
279
+ .sprout-table-handle + .sprout-button-size-column-header-end {
280
+ margin-inline-end: 0;
281
+ }
282
+ .sprout-table-handle:disabled {
283
+ cursor: not-allowed;
284
+ opacity: 0.4;
285
+ }
286
+ .sprout-table-hint:hover,
287
+ .sprout-table-handle:not(:disabled):hover,
288
+ .sprout-table-toggle:hover {
289
+ color: var(--sprout-text);
290
+ }
291
+ .sprout-table-hint:focus-visible,
292
+ .sprout-table-handle:focus-visible,
293
+ .sprout-table-toggle:focus-visible,
294
+ .sprout-table-resizer:focus-visible {
295
+ outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
296
+ outline-offset: 0;
297
+ }
298
+ .sprout-table-resizer {
299
+ position: absolute;
300
+ inset-block: 8px;
301
+ inset-inline-end: 0;
302
+ width: 6px;
303
+ cursor: col-resize;
304
+ touch-action: none;
305
+ user-select: none;
306
+ }
307
+ .sprout-table-resizer::after {
308
+ content: "";
309
+ position: absolute;
310
+ inset-block: 0;
311
+ inset-inline-end: 2px;
312
+ width: 2px;
313
+ border-radius: 1px;
314
+ background: var(--sprout-input);
315
+ opacity: 0;
316
+ }
317
+ .sprout-table-head:hover > .sprout-table-resizer::after,
318
+ .sprout-table-resizer[data-resizing]::after,
319
+ .sprout-table-resizer:focus-visible::after {
320
+ background: var(--sprout-primary);
321
+ opacity: 1;
322
+ }
323
+ .sprout-table[data-sized] {
324
+ table-layout: fixed;
325
+ }
326
+ .sprout-table[data-sized] .sprout-table-cell {
327
+ overflow: hidden;
328
+ text-overflow: ellipsis;
329
+ }
330
+
331
+ .sprout-table-head[data-pinned],
332
+ .sprout-table-cell[data-pinned] {
333
+ position: sticky;
334
+ z-index: 1;
335
+ background: var(--sprout-table-row-bg, var(--sprout-surface));
336
+ }
337
+ .sprout-table-head[data-pinned] {
338
+ z-index: 20;
339
+ background: var(--sprout-table-head-bg);
340
+ }
341
+ .sprout-table-head[data-pinned="start"],
342
+ .sprout-table-cell[data-pinned="start"] {
343
+ box-shadow: inset -1px 0 var(--sprout-input);
344
+ }
345
+ .sprout-table-head[data-pinned="end"],
346
+ .sprout-table-cell[data-pinned="end"] {
347
+ box-shadow: inset 1px 0 var(--sprout-input);
348
+ }
349
+ .sprout-table[data-pin-start]
350
+ :is(.sprout-table-head, .sprout-table-cell)[data-selection] {
351
+ position: sticky;
352
+ z-index: 1;
353
+ background: var(--sprout-table-row-bg, var(--sprout-surface));
354
+ }
355
+ .sprout-table[data-pin-start] .sprout-table-head[data-selection] {
356
+ z-index: 20;
357
+ background: var(--sprout-table-head-bg);
358
+ }
359
+ .sprout-table[data-pin-start] [data-selection]:first-child {
360
+ inset-inline-start: 0;
361
+ }
362
+ .sprout-table[data-pin-start] [data-selection] + [data-selection] {
363
+ inset-inline-start: var(--sprout-table-select-start, 48px);
364
+ }
365
+ .sprout-table-head[data-dragging],
366
+ .sprout-table-row[data-dragging] {
367
+ position: relative;
368
+ z-index: 30;
369
+ opacity: 0.8;
370
+ }
371
+
372
+ .sprout-table-row[data-group] {
373
+ --sprout-table-row-bg: var(--sprout-table-head-bg);
374
+ background: var(--sprout-table-head-bg);
375
+ font-weight: 500;
376
+ }
377
+ .sprout-table-toggle {
378
+ gap: 6px;
379
+ color: inherit;
380
+ }
381
+ .sprout-table-group-count {
382
+ padding: 0 6px;
383
+ border-radius: 999px;
384
+ background: var(--sprout-hover);
385
+ color: var(--sprout-muted);
386
+ font-size: var(--sprout-text-xs);
387
+ font-variant-numeric: tabular-nums;
388
+ }
389
+ .sprout-table-first {
390
+ display: inline-flex;
391
+ align-items: center;
392
+ gap: 6px;
393
+ min-width: 0;
394
+ }
395
+
396
+ .sprout-table-row[data-linked] {
397
+ position: relative;
398
+ }
399
+ .sprout-table-link {
400
+ margin: 0;
401
+ padding: 0;
402
+ border: 0;
403
+ background: none;
404
+ color: inherit;
405
+ font: inherit;
406
+ font-weight: 500;
407
+ text-align: start;
408
+ text-decoration: none;
409
+ cursor: pointer;
410
+ outline: none;
411
+ }
412
+ .sprout-table-link::after {
413
+ content: "";
414
+ position: absolute;
415
+ inset: 0;
416
+ }
417
+ .sprout-table-link:focus-visible {
418
+ text-decoration: underline;
419
+ text-underline-offset: 4px;
420
+ }
421
+ .sprout-table-row:has(.sprout-table-link:focus-visible) {
422
+ --sprout-table-row-bg: var(--sprout-table-hover);
423
+ background-color: var(--sprout-table-hover);
424
+ box-shadow: inset 0 0 0 var(--sprout-focus-width) var(--sprout-focus-ring);
425
+ }
426
+ .sprout-table-row[data-linked]
427
+ :is(
428
+ .sprout-table-handle,
429
+ [data-slot="checkbox"],
430
+ .sprout-table-toggle,
431
+ .sprout-table-hint
432
+ ),
433
+ .sprout-table-row[data-linked] > td[data-selection],
434
+ .sprout-table-row[data-linked] > td[data-sticky-end] {
435
+ position: relative;
436
+ z-index: 10;
437
+ }
438
+ .sprout-table-row[data-linked] > td[data-sticky-end],
439
+ .sprout-table[data-pin-start]
440
+ .sprout-table-row[data-linked]
441
+ > td[data-selection] {
442
+ position: sticky;
443
+ }
444
+ .sprout-table-row[data-drop-target] {
445
+ --sprout-table-row-bg: var(--sprout-primary-subtle);
446
+ background: var(--sprout-primary-subtle);
447
+ box-shadow: inset 0 0 0 var(--sprout-focus-width) var(--sprout-focus-ring);
448
+ }
449
+
450
+ .sprout-table-actions {
451
+ display: inline-flex;
452
+ align-items: center;
453
+ justify-content: flex-end;
454
+ gap: 4px;
455
+ }
456
+ .sprout-table-row[data-editing] > .sprout-table-cell {
457
+ padding-block: 4px;
458
+ }
459
+ .sprout-table-input {
460
+ min-width: 6rem;
461
+ }
462
+ .sprout-table-cell[data-align="right"] .sprout-table-input {
463
+ text-align: end;
464
+ }
465
+ .sprout-table-select {
466
+ height: 32px;
467
+ padding: 0 8px;
468
+ border: 1px solid var(--sprout-input);
469
+ border-radius: var(--sprout-radius-control);
470
+ background: var(--sprout-surface);
471
+ color: inherit;
472
+ font: inherit;
473
+ }
474
+ .sprout-table-select:focus-visible {
475
+ outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
476
+ outline-offset: 0;
477
+ }
478
+ .sprout-table-error {
479
+ color: var(--sprout-danger);
480
+ white-space: normal;
481
+ }
482
+ .sprout-table-empty {
483
+ padding: 32px 8px;
484
+ color: var(--sprout-muted);
485
+ text-align: center;
486
+ }
487
+
488
+ .sprout-table-pages {
489
+ display: flex;
490
+ align-items: center;
491
+ justify-content: flex-end;
492
+ gap: 8px;
493
+ color: var(--sprout-muted);
494
+ font-size: var(--sprout-text-sm);
495
+ }
496
+ .sprout-table-pages > span {
497
+ margin-inline-end: auto;
498
+ }
499
+
500
+ .sprout-table-container[data-virtual] {
501
+ max-height: 60dvh;
502
+ overflow: auto;
503
+ }
504
+ .sprout-table-container[data-virtual] .sprout-table-header {
505
+ position: sticky;
506
+ top: 0;
507
+ z-index: 10;
508
+ background: var(--sprout-table-head-bg);
509
+ }
510
+
511
+ .sprout-table-sr-only {
512
+ position: absolute;
513
+ width: 1px;
514
+ height: 1px;
515
+ overflow: hidden;
516
+ clip-path: inset(50%);
517
+ white-space: nowrap;
518
+ }
519
+
520
+ /* Stack layout: under 36rem each row becomes a card of label and value pairs. */
521
+ @container sprout-table (width < 36rem) {
522
+ .sprout-table[data-narrow="stack"],
523
+ .sprout-table[data-narrow="stack"] > :is(thead, tbody, tfoot),
524
+ .sprout-table[data-narrow="stack"] .sprout-table-row,
525
+ .sprout-table[data-narrow="stack"] .sprout-table-cell {
526
+ display: block;
527
+ }
528
+ .sprout-table[data-narrow="stack"] {
529
+ min-width: 0 !important;
530
+ }
531
+ .sprout-table[data-narrow="stack"] > thead {
532
+ position: absolute;
533
+ width: 1px;
534
+ height: 1px;
535
+ overflow: hidden;
536
+ clip-path: inset(50%);
537
+ }
538
+ .sprout-table[data-narrow="stack"] .sprout-table-row {
539
+ position: relative;
540
+ padding: 10px 8px;
541
+ }
542
+ .sprout-table[data-narrow="stack"] .sprout-table-cell {
543
+ display: flex;
544
+ gap: 12px;
545
+ padding: 2px 0;
546
+ white-space: normal;
547
+ text-align: start;
548
+ overflow-wrap: anywhere;
549
+ }
550
+ .sprout-table[data-narrow="stack"] .sprout-table-cell[data-label]::before {
551
+ content: attr(data-label);
552
+ flex: 0 0 40%;
553
+ color: var(--sprout-muted);
554
+ font-weight: 400;
555
+ }
556
+ .sprout-table[data-narrow="stack"]
557
+ .sprout-table-cell:first-of-type[data-label]::before,
558
+ .sprout-table[data-narrow="stack"]
559
+ .sprout-table-row[data-group]
560
+ .sprout-table-cell::before {
561
+ content: none;
562
+ }
563
+ .sprout-table[data-narrow="stack"] .sprout-table-cell:first-of-type {
564
+ font-weight: 500;
565
+ }
566
+ .sprout-table[data-narrow="stack"] .sprout-table-cell:empty,
567
+ .sprout-table[data-narrow="stack"]
568
+ .sprout-table-cell[data-selection]:empty {
569
+ display: none;
570
+ }
571
+ .sprout-table[data-narrow="stack"] .sprout-table-cell[data-selection] {
572
+ position: absolute;
573
+ inset-block-start: 10px;
574
+ inset-inline-start: auto;
575
+ inset-inline-end: 8px;
576
+ width: auto;
577
+ min-width: 0;
578
+ }
579
+ .sprout-table[data-narrow="stack"] .sprout-table-cell[data-sticky-end],
580
+ .sprout-table[data-narrow="stack"] .sprout-table-cell[data-pinned] {
581
+ position: static;
582
+ width: auto;
583
+ background: none;
584
+ box-shadow: none;
585
+ }
586
+ .sprout-table[data-narrow="stack"]
587
+ .sprout-table-cell[data-sticky-end]::before {
588
+ content: none;
589
+ }
590
+ .sprout-table[data-narrow="stack"]
591
+ .sprout-table-row[data-state="selected"]
592
+ > td:first-child::before {
593
+ content: none;
594
+ }
595
+ }
596
+
597
+ @media (prefers-reduced-motion: no-preference) {
598
+ .sprout-table-row,
599
+ .sprout-table-cell[data-sticky-end] {
600
+ transition: background-color var(--sprout-motion-fast)
601
+ var(--sprout-motion-ease);
602
+ }
603
+ }
604
+ }