@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,206 @@
1
+ @layer components {
2
+ .sprout-separator {
3
+ flex-shrink: 0;
4
+ border: 0;
5
+ background: var(--sprout-line);
6
+ }
7
+ .sprout-separator[data-orientation="horizontal"] {
8
+ width: 100%;
9
+ height: 1px;
10
+ }
11
+ .sprout-separator[data-orientation="vertical"] {
12
+ width: 1px;
13
+ min-height: 1rem;
14
+ align-self: stretch;
15
+ }
16
+ .sprout-separator[data-tone="input"] {
17
+ background: var(--sprout-input);
18
+ }
19
+
20
+ .sprout-separator-label {
21
+ display: flex;
22
+ align-items: center;
23
+ gap: 8px;
24
+ min-width: 0;
25
+ min-height: 20px;
26
+ color: var(--sprout-muted);
27
+ font-size: var(--sprout-text-sm);
28
+ line-height: 1.25rem;
29
+ }
30
+ .sprout-separator-label-line {
31
+ flex: 1 1 0;
32
+ width: auto;
33
+ min-width: 12px;
34
+ }
35
+ .sprout-separator-label-content {
36
+ flex: 0 1 auto;
37
+ min-width: 0;
38
+ max-width: calc(100% - 40px);
39
+ overflow: hidden;
40
+ text-align: center;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
43
+ }
44
+
45
+ @media (prefers-reduced-motion: no-preference) {
46
+ .sprout-separator {
47
+ transition: background-color var(--sprout-motion-fast)
48
+ var(--sprout-motion-ease);
49
+ }
50
+ }
51
+
52
+ .sprout-separator-fade,
53
+ .sprout-separator-fade-shine {
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 12px;
57
+ min-width: 0;
58
+ }
59
+ .sprout-separator-fade {
60
+ position: relative;
61
+ width: 100%;
62
+ color: var(--sprout-muted);
63
+ font-size: var(--sprout-text-xs);
64
+ line-height: 1rem;
65
+ }
66
+ .sprout-separator-fade::before,
67
+ .sprout-separator-fade::after,
68
+ .sprout-separator-fade-shine::before,
69
+ .sprout-separator-fade-shine::after {
70
+ content: "";
71
+ flex: 1 1 0;
72
+ min-width: 12px;
73
+ height: 1px;
74
+ }
75
+ .sprout-separator-fade::before {
76
+ background: linear-gradient(to right, transparent, var(--sprout-line));
77
+ }
78
+ .sprout-separator-fade::after {
79
+ background: linear-gradient(to left, transparent, var(--sprout-line));
80
+ }
81
+ .sprout-separator-fade-label {
82
+ flex: 0 1 auto;
83
+ min-width: 0;
84
+ overflow: hidden;
85
+ text-overflow: ellipsis;
86
+ white-space: nowrap;
87
+ }
88
+
89
+ .sprout-separator-fade-shine {
90
+ position: absolute;
91
+ inset: 0;
92
+ color: var(--sprout-text);
93
+ opacity: 0;
94
+ pointer-events: none;
95
+ mask-image: linear-gradient(to right, transparent, black, transparent);
96
+ mask-size: 25% 100%;
97
+ mask-repeat: no-repeat;
98
+ mask-position: -34% 0;
99
+ }
100
+ .sprout-separator-fade-shine::before,
101
+ .sprout-separator-fade-shine::after {
102
+ background: var(--sprout-text);
103
+ }
104
+
105
+ @keyframes sprout-separator-fade-shine {
106
+ 0% {
107
+ mask-position: -34% 0;
108
+ opacity: 0;
109
+ }
110
+ 20%,
111
+ 80% {
112
+ opacity: 0.7;
113
+ }
114
+ 100% {
115
+ mask-position: 134% 0;
116
+ opacity: 0;
117
+ }
118
+ }
119
+
120
+ @media (hover: hover) and (prefers-reduced-motion: no-preference) {
121
+ .sprout-separator-fade:hover > .sprout-separator-fade-shine {
122
+ animation: sprout-separator-fade-shine 650ms ease-out both;
123
+ }
124
+ }
125
+
126
+ .sprout-separator-marker {
127
+ box-sizing: border-box;
128
+ position: relative;
129
+ display: flex;
130
+ align-items: center;
131
+ gap: 8px;
132
+ width: 100%;
133
+ min-width: 0;
134
+ min-height: 16px;
135
+ color: var(--sprout-muted);
136
+ font-family: var(--sprout-font);
137
+ font-size: var(--sprout-text-sm);
138
+ line-height: 1.25rem;
139
+ text-align: left;
140
+ }
141
+ .sprout-separator-marker :where(svg:not([class*="size-"])) {
142
+ width: 16px;
143
+ height: 16px;
144
+ }
145
+
146
+ .sprout-separator-marker-border {
147
+ padding-bottom: 8px;
148
+ border-bottom: 1px solid var(--sprout-line);
149
+ }
150
+
151
+ .sprout-separator-icon {
152
+ display: inline-flex;
153
+ align-items: center;
154
+ justify-content: center;
155
+ flex-shrink: 0;
156
+ width: 16px;
157
+ height: 16px;
158
+ }
159
+ .sprout-separator-icon :where(svg:not([class*="size-"])) {
160
+ width: 16px;
161
+ height: 16px;
162
+ }
163
+
164
+ .sprout-separator-content {
165
+ min-width: 0;
166
+ overflow-wrap: anywhere;
167
+ }
168
+
169
+ a.sprout-separator-marker,
170
+ .sprout-separator-content > a {
171
+ text-decoration-line: underline;
172
+ text-underline-offset: 3px;
173
+ border-radius: 2px;
174
+ }
175
+ .sprout-separator-content > a {
176
+ color: inherit;
177
+ }
178
+ a.sprout-separator-marker:hover,
179
+ .sprout-separator-content > a:hover {
180
+ color: var(--sprout-text);
181
+ }
182
+ a.sprout-separator-marker:focus-visible,
183
+ .sprout-separator-content > a:focus-visible {
184
+ outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
185
+ outline-offset: 0;
186
+ color: var(--sprout-text);
187
+ }
188
+
189
+ @media (forced-colors: active) {
190
+ .sprout-separator-marker-border {
191
+ border-bottom-color: CanvasText;
192
+ }
193
+ }
194
+
195
+ @media (prefers-reduced-motion: no-preference) {
196
+ .sprout-separator-marker,
197
+ .sprout-separator-content > a {
198
+ transition: color var(--sprout-motion-fast) var(--sprout-motion-ease);
199
+ }
200
+ }
201
+
202
+ .sprout-separator-label-content > .sprout-separator-icon {
203
+ margin-inline-end: 6px;
204
+ vertical-align: -3px;
205
+ }
206
+ }
@@ -0,0 +1,81 @@
1
+ @layer components {
2
+ .sprout-settings-group {
3
+ --sprout-settings-row-inline: 1rem;
4
+ --sprout-settings-row-block: 0.75rem;
5
+ display: grid;
6
+ gap: 0.5rem;
7
+ min-width: 0;
8
+ color: var(--sprout-text);
9
+ font-family: var(--sprout-font);
10
+ }
11
+ .sprout-settings-group-title {
12
+ margin: 0;
13
+ color: var(--sprout-text);
14
+ font-size: var(--sprout-text-sm);
15
+ font-weight: 500;
16
+ line-height: 1.25rem;
17
+ letter-spacing: normal;
18
+ }
19
+ .sprout-settings-group-content {
20
+ container: sprout-settings / inline-size;
21
+ min-width: 0;
22
+ border: 1px solid var(--sprout-line);
23
+ border-radius: var(--sprout-radius-panel);
24
+ background: var(--sprout-surface);
25
+ }
26
+ /* Zero specificity so a child's own border utilities still win. */
27
+ :where(.sprout-settings-group-content > :not([hidden]) ~ :not([hidden])) {
28
+ border-top: 1px solid var(--sprout-line);
29
+ }
30
+
31
+ .sprout-settings-row {
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: 0.75rem;
35
+ min-width: 0;
36
+ padding: var(--sprout-settings-row-block, 0.75rem)
37
+ var(--sprout-settings-row-inline, 1rem);
38
+ }
39
+ .sprout-settings-row-text {
40
+ display: grid;
41
+ gap: 0.125rem;
42
+ min-width: 0;
43
+ overflow-wrap: anywhere;
44
+ }
45
+ .sprout-settings-row-label {
46
+ display: block;
47
+ margin: 0;
48
+ color: var(--sprout-text);
49
+ font-size: var(--sprout-text-sm);
50
+ font-weight: 500;
51
+ line-height: 1.25rem;
52
+ }
53
+ .sprout-settings-row-description {
54
+ color: var(--sprout-muted);
55
+ font-size: var(--sprout-text-xs);
56
+ line-height: 1rem;
57
+ }
58
+ .sprout-settings-row-control {
59
+ display: flex;
60
+ flex-wrap: wrap;
61
+ flex-shrink: 0;
62
+ align-items: center;
63
+ gap: 0.5rem;
64
+ min-width: 0;
65
+ color: var(--sprout-text);
66
+ font-size: var(--sprout-text-sm);
67
+ line-height: 1.25rem;
68
+ }
69
+
70
+ @container sprout-settings (min-width: 36rem) {
71
+ .sprout-settings-row {
72
+ flex-direction: row;
73
+ align-items: center;
74
+ justify-content: space-between;
75
+ }
76
+ .sprout-settings-row-control {
77
+ max-width: 60%;
78
+ justify-content: flex-end;
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,361 @@
1
+ @layer components {
2
+ .sprout-sheet-overlay {
3
+ position: fixed;
4
+ inset: 0;
5
+ z-index: 50;
6
+ isolation: isolate;
7
+ background: var(--sprout-overlay);
8
+ opacity: calc(1 - var(--drawer-swipe-progress, 0));
9
+ }
10
+
11
+ .sprout-sheet-viewport {
12
+ position: fixed;
13
+ inset: 0;
14
+ z-index: 50;
15
+ pointer-events: none;
16
+ }
17
+
18
+ .sprout-sheet-content {
19
+ position: fixed;
20
+ z-index: 50;
21
+ display: flex;
22
+ flex-direction: column;
23
+ box-sizing: border-box;
24
+ min-width: 0;
25
+ background: var(--sprout-surface);
26
+ color: var(--sprout-text);
27
+ box-shadow: var(--sprout-shadow-overlay);
28
+ font-family: inherit;
29
+ font-size: var(--sprout-text-sm);
30
+ line-height: 1.25rem;
31
+ overflow-x: hidden;
32
+ overflow-y: auto;
33
+ overscroll-behavior: contain;
34
+ overflow-wrap: break-word;
35
+ outline: none;
36
+ pointer-events: auto;
37
+ }
38
+ .sprout-sheet-content:is([data-side="left"], [data-side="right"]) {
39
+ transform: translate3d(var(--drawer-swipe-movement-x, 0px), 0, 0);
40
+ }
41
+ .sprout-sheet-content:is([data-side="top"], [data-side="bottom"]) {
42
+ transform: translate3d(0, var(--drawer-swipe-movement-y, 0px), 0);
43
+ }
44
+ .sprout-sheet-content[data-swiping] {
45
+ user-select: none;
46
+ }
47
+ /* Header, body, and footer stay flex items of the panel. */
48
+ .sprout-sheet-inner {
49
+ display: contents;
50
+ }
51
+ .sprout-sheet-overlay[hidden],
52
+ .sprout-sheet-content[hidden] {
53
+ display: none;
54
+ }
55
+
56
+ .sprout-sheet-content:is([data-side="left"], [data-side="right"]) {
57
+ top: 0;
58
+ bottom: 0;
59
+ width: 75%;
60
+ height: 100dvh;
61
+ }
62
+ .sprout-sheet-content[data-side="right"] {
63
+ right: 0;
64
+ border-left: 1px solid var(--sprout-line);
65
+ }
66
+ .sprout-sheet-content[data-side="left"] {
67
+ left: 0;
68
+ border-right: 1px solid var(--sprout-line);
69
+ }
70
+ .sprout-sheet-content:is([data-side="left"], [data-side="right"]):is(
71
+ [data-size="lg"],
72
+ [data-size="xl"]
73
+ ) {
74
+ width: 100%;
75
+ }
76
+
77
+ .sprout-sheet-content:is([data-side="top"], [data-side="bottom"]) {
78
+ left: 0;
79
+ right: 0;
80
+ max-height: 85dvh;
81
+ }
82
+ .sprout-sheet-content[data-side="top"] {
83
+ top: 0;
84
+ border-bottom: 1px solid var(--sprout-line);
85
+ border-end-start-radius: var(--sprout-radius-panel);
86
+ border-end-end-radius: var(--sprout-radius-panel);
87
+ padding-top: env(safe-area-inset-top);
88
+ }
89
+ .sprout-sheet-content[data-side="bottom"] {
90
+ bottom: 0;
91
+ border-top: 1px solid var(--sprout-line);
92
+ border-start-start-radius: var(--sprout-radius-panel);
93
+ border-start-end-radius: var(--sprout-radius-panel);
94
+ padding-bottom: env(safe-area-inset-bottom);
95
+ }
96
+
97
+ .sprout-sheet-content[data-size="full"] {
98
+ inset: 0;
99
+ width: 100%;
100
+ max-width: none;
101
+ height: 100dvh;
102
+ max-height: none;
103
+ padding-top: env(safe-area-inset-top);
104
+ padding-bottom: env(safe-area-inset-bottom);
105
+ border: 0;
106
+ border-radius: 0;
107
+ box-shadow: none;
108
+ }
109
+
110
+ .sprout-sheet-header {
111
+ display: flex;
112
+ flex-direction: column;
113
+ gap: 2px;
114
+ min-width: 0;
115
+ padding: 16px;
116
+ }
117
+ .sprout-sheet-content:has(> .sprout-sheet-close)
118
+ > .sprout-sheet-inner
119
+ > .sprout-sheet-header {
120
+ padding-inline-end: 48px;
121
+ }
122
+
123
+ .sprout-sheet-title {
124
+ margin: 0;
125
+ min-width: 0;
126
+ font-size: var(--sprout-text-base);
127
+ font-weight: 550;
128
+ line-height: 1.375rem;
129
+ letter-spacing: -0.005em;
130
+ overflow-wrap: anywhere;
131
+ }
132
+ .sprout-sheet-title[data-size="lg"] {
133
+ font-size: 1.25rem;
134
+ font-weight: 600;
135
+ line-height: 1.75rem;
136
+ letter-spacing: -0.015em;
137
+ }
138
+ .sprout-sheet-title[tabindex="-1"]:focus {
139
+ outline: none;
140
+ }
141
+ .sprout-sheet-title[tabindex="-1"]:focus-visible {
142
+ border-radius: 2px;
143
+ outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
144
+ outline-offset: 0;
145
+ }
146
+
147
+ .sprout-sheet-description {
148
+ margin: 0;
149
+ min-width: 0;
150
+ color: var(--sprout-muted);
151
+ font-size: var(--sprout-text-sm);
152
+ line-height: 1.25rem;
153
+ text-wrap: pretty;
154
+ }
155
+
156
+ .sprout-sheet-body {
157
+ display: flex;
158
+ flex: 1 1 auto;
159
+ flex-direction: column;
160
+ gap: 16px;
161
+ min-width: 0;
162
+ min-height: 0;
163
+ padding: 0 16px 24px;
164
+ overflow-y: auto;
165
+ overscroll-behavior: contain;
166
+ }
167
+
168
+ .sprout-sheet-footer {
169
+ display: flex;
170
+ flex-direction: column;
171
+ gap: 8px;
172
+ margin-top: auto;
173
+ padding: 16px;
174
+ }
175
+
176
+ .sprout-sheet-swipe-handle {
177
+ position: relative;
178
+ z-index: 1;
179
+ display: flex;
180
+ flex-shrink: 0;
181
+ align-items: center;
182
+ justify-content: center;
183
+ cursor: grab;
184
+ touch-action: none;
185
+ }
186
+ .sprout-sheet-swipe-handle:active {
187
+ cursor: grabbing;
188
+ }
189
+ .sprout-sheet-swipe-handle::after {
190
+ content: "";
191
+ border-radius: 999px;
192
+ background: var(--sprout-input);
193
+ }
194
+ .sprout-sheet-swipe-handle:hover::after {
195
+ background: var(--sprout-border);
196
+ }
197
+ .sprout-sheet-content:is([data-side="top"], [data-side="bottom"])
198
+ > .sprout-sheet-swipe-handle {
199
+ height: 20px;
200
+ }
201
+ .sprout-sheet-content:is([data-side="top"], [data-side="bottom"])
202
+ > .sprout-sheet-swipe-handle::after {
203
+ width: 3rem;
204
+ height: 4px;
205
+ }
206
+ .sprout-sheet-content[data-side="bottom"] > .sprout-sheet-swipe-handle {
207
+ margin-bottom: -12px;
208
+ }
209
+ .sprout-sheet-content[data-side="top"] > .sprout-sheet-swipe-handle {
210
+ order: 1;
211
+ margin-top: -12px;
212
+ }
213
+ .sprout-sheet-content:is([data-side="left"], [data-side="right"])
214
+ > .sprout-sheet-swipe-handle {
215
+ position: absolute;
216
+ top: 0;
217
+ bottom: 0;
218
+ z-index: 1;
219
+ width: 16px;
220
+ }
221
+ .sprout-sheet-content:is([data-side="left"], [data-side="right"])
222
+ > .sprout-sheet-swipe-handle::after {
223
+ width: 4px;
224
+ height: 3rem;
225
+ }
226
+ .sprout-sheet-content[data-side="right"] > .sprout-sheet-swipe-handle {
227
+ left: 0;
228
+ }
229
+ .sprout-sheet-content[data-side="left"] > .sprout-sheet-swipe-handle {
230
+ right: 0;
231
+ }
232
+
233
+ .sprout-sheet-close {
234
+ position: absolute;
235
+ top: 12px;
236
+ right: 12px;
237
+ }
238
+ .sprout-sheet-content[data-size="full"] > .sprout-sheet-close {
239
+ top: calc(12px + env(safe-area-inset-top));
240
+ }
241
+
242
+ @media (min-width: 40rem) {
243
+ .sprout-sheet-content:is([data-side="left"], [data-side="right"]) {
244
+ max-width: 24rem;
245
+ }
246
+ .sprout-sheet-content:is(
247
+ [data-side="left"],
248
+ [data-side="right"]
249
+ )[data-size="lg"] {
250
+ max-width: 32rem;
251
+ }
252
+ .sprout-sheet-content:is(
253
+ [data-side="left"],
254
+ [data-side="right"]
255
+ )[data-size="xl"] {
256
+ max-width: 42rem;
257
+ }
258
+ .sprout-sheet-content[data-size="full"] {
259
+ max-width: none;
260
+ }
261
+ .sprout-sheet-content:is([data-side="top"], [data-side="bottom"])
262
+ > .sprout-sheet-inner
263
+ > .sprout-sheet-footer {
264
+ flex-direction: row;
265
+ flex-wrap: wrap;
266
+ justify-content: flex-end;
267
+ }
268
+ }
269
+
270
+ @media (prefers-reduced-motion: no-preference) {
271
+ .sprout-sheet-overlay {
272
+ transition: opacity var(--sprout-motion-normal) var(--sprout-motion-ease);
273
+ }
274
+ .sprout-sheet-overlay[data-starting-style],
275
+ .sprout-sheet-overlay[data-ending-style] {
276
+ opacity: 0;
277
+ }
278
+ .sprout-sheet-content {
279
+ transition:
280
+ opacity var(--sprout-motion-normal) var(--sprout-motion-ease),
281
+ translate var(--sprout-motion-normal) var(--sprout-motion-ease),
282
+ transform var(--sprout-motion-normal) var(--sprout-motion-ease);
283
+ }
284
+ .sprout-sheet-overlay[data-swiping],
285
+ .sprout-sheet-content[data-swiping] {
286
+ transition-duration: 0ms;
287
+ }
288
+ .sprout-sheet-content[data-ending-style],
289
+ .sprout-sheet-overlay[data-ending-style] {
290
+ transition-duration: var(--sprout-motion-fast);
291
+ }
292
+ .sprout-sheet-content[data-starting-style],
293
+ .sprout-sheet-content[data-ending-style] {
294
+ opacity: 0;
295
+ }
296
+ .sprout-sheet-content[data-side="right"]:is(
297
+ [data-starting-style],
298
+ [data-ending-style]
299
+ ) {
300
+ translate: 2.5rem 0;
301
+ }
302
+ .sprout-sheet-content[data-side="left"]:is(
303
+ [data-starting-style],
304
+ [data-ending-style]
305
+ ) {
306
+ translate: -2.5rem 0;
307
+ }
308
+ .sprout-sheet-content[data-side="bottom"]:is(
309
+ [data-starting-style],
310
+ [data-ending-style]
311
+ ) {
312
+ translate: 0 2.5rem;
313
+ }
314
+ .sprout-sheet-content[data-side="top"]:is(
315
+ [data-starting-style],
316
+ [data-ending-style]
317
+ ) {
318
+ translate: 0 -2.5rem;
319
+ }
320
+ /* A swipe that closes the sheet carries it the rest of the way off screen. */
321
+ .sprout-sheet-content[data-swipe-dismiss][data-ending-style] {
322
+ opacity: 1;
323
+ transition-duration: calc(
324
+ var(--drawer-swipe-strength, 1) * var(--sprout-motion-normal)
325
+ );
326
+ }
327
+ .sprout-sheet-content[data-swipe-dismiss][data-side="right"][data-ending-style] {
328
+ translate: 100% 0;
329
+ }
330
+ .sprout-sheet-content[data-swipe-dismiss][data-side="left"][data-ending-style] {
331
+ translate: -100% 0;
332
+ }
333
+ .sprout-sheet-content[data-swipe-dismiss][data-side="bottom"][data-ending-style] {
334
+ translate: 0 100%;
335
+ }
336
+ .sprout-sheet-content[data-swipe-dismiss][data-side="top"][data-ending-style] {
337
+ translate: 0 -100%;
338
+ }
339
+ /* Sections settle one after another while the panel slides in. */
340
+ .sprout-sheet-inner
341
+ > :is(.sprout-sheet-header, .sprout-sheet-body, .sprout-sheet-footer) {
342
+ animation: sprout-sheet-section-in var(--sprout-motion-normal)
343
+ var(--sprout-motion-ease) both;
344
+ }
345
+ .sprout-sheet-inner > .sprout-sheet-header {
346
+ animation-delay: 30ms;
347
+ }
348
+ .sprout-sheet-inner > .sprout-sheet-body {
349
+ animation-delay: 60ms;
350
+ }
351
+ .sprout-sheet-inner > .sprout-sheet-footer {
352
+ animation-delay: 90ms;
353
+ }
354
+ }
355
+ @keyframes sprout-sheet-section-in {
356
+ from {
357
+ opacity: 0;
358
+ translate: 0 4px;
359
+ }
360
+ }
361
+ }