macbetter 0.0.0-stage → 0.1.0-beta.2

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 (310) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +92 -2
  3. package/dist/components/accessory-tile.d.ts +50 -0
  4. package/dist/components/accessory-tile.js +46 -0
  5. package/dist/components/activity-indicator.d.ts +15 -0
  6. package/dist/components/activity-indicator.js +15 -0
  7. package/dist/components/alert.d.ts +29 -0
  8. package/dist/components/alert.js +30 -0
  9. package/dist/components/artifact-card.d.ts +41 -0
  10. package/dist/components/artifact-card.js +57 -0
  11. package/dist/components/artwork.d.ts +44 -0
  12. package/dist/components/artwork.js +935 -0
  13. package/dist/components/attachment.d.ts +48 -0
  14. package/dist/components/attachment.js +65 -0
  15. package/dist/components/automation-row.d.ts +24 -0
  16. package/dist/components/automation-row.js +12 -0
  17. package/dist/components/avatar.d.ts +33 -0
  18. package/dist/components/avatar.js +45 -0
  19. package/dist/components/badge.d.ts +24 -0
  20. package/dist/components/badge.js +19 -0
  21. package/dist/components/button.d.ts +20 -0
  22. package/dist/components/button.js +10 -0
  23. package/dist/components/calendar.d.ts +30 -0
  24. package/dist/components/calendar.js +47 -0
  25. package/dist/components/camera-view.d.ts +40 -0
  26. package/dist/components/camera-view.js +44 -0
  27. package/dist/components/card.d.ts +14 -0
  28. package/dist/components/card.js +21 -0
  29. package/dist/components/carousel.d.ts +18 -0
  30. package/dist/components/carousel.js +33 -0
  31. package/dist/components/chat.d.ts +29 -0
  32. package/dist/components/chat.js +29 -0
  33. package/dist/components/checkbox.d.ts +13 -0
  34. package/dist/components/checkbox.js +16 -0
  35. package/dist/components/code-block.d.ts +39 -0
  36. package/dist/components/code-block.js +65 -0
  37. package/dist/components/code-field.d.ts +16 -0
  38. package/dist/components/code-field.js +29 -0
  39. package/dist/components/color-well.d.ts +23 -0
  40. package/dist/components/color-well.js +27 -0
  41. package/dist/components/combo-box.d.ts +42 -0
  42. package/dist/components/combo-box.js +102 -0
  43. package/dist/components/command-palette.d.ts +33 -0
  44. package/dist/components/command-palette.js +55 -0
  45. package/dist/components/confirmation.d.ts +24 -0
  46. package/dist/components/confirmation.js +50 -0
  47. package/dist/components/content-unavailable.d.ts +19 -0
  48. package/dist/components/content-unavailable.js +21 -0
  49. package/dist/components/context-menu.d.ts +9 -0
  50. package/dist/components/context-menu.js +15 -0
  51. package/dist/components/date-picker.d.ts +53 -0
  52. package/dist/components/date-picker.js +86 -0
  53. package/dist/components/description-list.d.ts +18 -0
  54. package/dist/components/description-list.js +17 -0
  55. package/dist/components/device-frame.d.ts +18 -0
  56. package/dist/components/device-frame.js +16 -0
  57. package/dist/components/dialog.d.ts +27 -0
  58. package/dist/components/dialog.js +35 -0
  59. package/dist/components/disclosure.d.ts +32 -0
  60. package/dist/components/disclosure.js +35 -0
  61. package/dist/components/dock.d.ts +28 -0
  62. package/dist/components/dock.js +80 -0
  63. package/dist/components/door-control.d.ts +20 -0
  64. package/dist/components/door-control.js +43 -0
  65. package/dist/components/energy-readout.d.ts +32 -0
  66. package/dist/components/energy-readout.js +27 -0
  67. package/dist/components/field.d.ts +28 -0
  68. package/dist/components/field.js +32 -0
  69. package/dist/components/gauge.d.ts +25 -0
  70. package/dist/components/gauge.js +42 -0
  71. package/dist/components/generated-image.d.ts +39 -0
  72. package/dist/components/generated-image.js +47 -0
  73. package/dist/components/glass.d.ts +34 -0
  74. package/dist/components/glass.js +31 -0
  75. package/dist/components/home-backdrop.d.ts +23 -0
  76. package/dist/components/home-backdrop.js +12 -0
  77. package/dist/components/home-section.d.ts +19 -0
  78. package/dist/components/home-section.js +21 -0
  79. package/dist/components/home-status.d.ts +24 -0
  80. package/dist/components/home-status.js +14 -0
  81. package/dist/components/hover-card.d.ts +14 -0
  82. package/dist/components/hover-card.js +16 -0
  83. package/dist/components/inspector.d.ts +29 -0
  84. package/dist/components/inspector.js +40 -0
  85. package/dist/components/level-control.d.ts +19 -0
  86. package/dist/components/level-control.js +13 -0
  87. package/dist/components/light-color-picker.d.ts +33 -0
  88. package/dist/components/light-color-picker.js +56 -0
  89. package/dist/components/list.d.ts +42 -0
  90. package/dist/components/list.js +42 -0
  91. package/dist/components/listbox.d.ts +16 -0
  92. package/dist/components/listbox.js +28 -0
  93. package/dist/components/lock-control.d.ts +20 -0
  94. package/dist/components/lock-control.js +35 -0
  95. package/dist/components/menu-bar.d.ts +14 -0
  96. package/dist/components/menu-bar.js +16 -0
  97. package/dist/components/menu.d.ts +40 -0
  98. package/dist/components/menu.js +54 -0
  99. package/dist/components/message.d.ts +65 -0
  100. package/dist/components/message.js +69 -0
  101. package/dist/components/model-picker.d.ts +61 -0
  102. package/dist/components/model-picker.js +59 -0
  103. package/dist/components/navigation-bar.d.ts +24 -0
  104. package/dist/components/navigation-bar.js +54 -0
  105. package/dist/components/outline.d.ts +21 -0
  106. package/dist/components/outline.js +40 -0
  107. package/dist/components/page-control.d.ts +10 -0
  108. package/dist/components/page-control.js +8 -0
  109. package/dist/components/plan.d.ts +25 -0
  110. package/dist/components/plan.js +43 -0
  111. package/dist/components/popover.d.ts +16 -0
  112. package/dist/components/popover.js +24 -0
  113. package/dist/components/progress.d.ts +27 -0
  114. package/dist/components/progress.js +27 -0
  115. package/dist/components/prompt-input.d.ts +93 -0
  116. package/dist/components/prompt-input.js +172 -0
  117. package/dist/components/radio.d.ts +16 -0
  118. package/dist/components/radio.js +13 -0
  119. package/dist/components/rating.d.ts +10 -0
  120. package/dist/components/rating.js +12 -0
  121. package/dist/components/reasoning.d.ts +28 -0
  122. package/dist/components/reasoning.js +52 -0
  123. package/dist/components/response.d.ts +14 -0
  124. package/dist/components/response.js +14 -0
  125. package/dist/components/scene-tile.d.ts +22 -0
  126. package/dist/components/scene-tile.js +13 -0
  127. package/dist/components/scroll-view.d.ts +21 -0
  128. package/dist/components/scroll-view.js +13 -0
  129. package/dist/components/search-field.d.ts +16 -0
  130. package/dist/components/search-field.js +12 -0
  131. package/dist/components/secure-field.d.ts +23 -0
  132. package/dist/components/secure-field.js +21 -0
  133. package/dist/components/segmented-control.d.ts +12 -0
  134. package/dist/components/segmented-control.js +10 -0
  135. package/dist/components/select.d.ts +45 -0
  136. package/dist/components/select.js +79 -0
  137. package/dist/components/sensor-readout.d.ts +29 -0
  138. package/dist/components/sensor-readout.js +12 -0
  139. package/dist/components/separator.d.ts +14 -0
  140. package/dist/components/separator.js +11 -0
  141. package/dist/components/setup-code.d.ts +29 -0
  142. package/dist/components/setup-code.js +47 -0
  143. package/dist/components/sheet.d.ts +31 -0
  144. package/dist/components/sheet.js +51 -0
  145. package/dist/components/shimmer.d.ts +18 -0
  146. package/dist/components/shimmer.js +17 -0
  147. package/dist/components/sidebar.d.ts +30 -0
  148. package/dist/components/sidebar.js +26 -0
  149. package/dist/components/slider.d.ts +27 -0
  150. package/dist/components/slider.js +43 -0
  151. package/dist/components/sources.d.ts +51 -0
  152. package/dist/components/sources.js +46 -0
  153. package/dist/components/split-view.d.ts +11 -0
  154. package/dist/components/split-view.js +13 -0
  155. package/dist/components/squircle.d.ts +41 -0
  156. package/dist/components/squircle.js +63 -0
  157. package/dist/components/stepper.d.ts +30 -0
  158. package/dist/components/stepper.js +28 -0
  159. package/dist/components/suggestion.d.ts +23 -0
  160. package/dist/components/suggestion.js +29 -0
  161. package/dist/components/switch.d.ts +10 -0
  162. package/dist/components/switch.js +10 -0
  163. package/dist/components/tab-bar.d.ts +20 -0
  164. package/dist/components/tab-bar.js +17 -0
  165. package/dist/components/table.d.ts +49 -0
  166. package/dist/components/table.js +179 -0
  167. package/dist/components/tabs.d.ts +16 -0
  168. package/dist/components/tabs.js +19 -0
  169. package/dist/components/text-area.d.ts +14 -0
  170. package/dist/components/text-area.js +9 -0
  171. package/dist/components/text-field.d.ts +26 -0
  172. package/dist/components/text-field.js +23 -0
  173. package/dist/components/thermostat-control.d.ts +30 -0
  174. package/dist/components/thermostat-control.js +139 -0
  175. package/dist/components/toast.d.ts +30 -0
  176. package/dist/components/toast.js +114 -0
  177. package/dist/components/toggle.d.ts +21 -0
  178. package/dist/components/toggle.js +19 -0
  179. package/dist/components/token-field.d.ts +31 -0
  180. package/dist/components/token-field.js +78 -0
  181. package/dist/components/tool-call.d.ts +48 -0
  182. package/dist/components/tool-call.js +77 -0
  183. package/dist/components/toolbar.d.ts +27 -0
  184. package/dist/components/toolbar.js +39 -0
  185. package/dist/components/tooltip.d.ts +11 -0
  186. package/dist/components/tooltip.js +18 -0
  187. package/dist/components/window.d.ts +56 -0
  188. package/dist/components/window.js +61 -0
  189. package/dist/index.d.ts +97 -0
  190. package/dist/index.js +98 -0
  191. package/dist/lib/agent-glyphs.d.ts +10 -0
  192. package/dist/lib/agent-glyphs.js +19 -0
  193. package/dist/lib/cx.d.ts +9 -0
  194. package/dist/lib/cx.js +14 -0
  195. package/dist/lib/derive.d.ts +53 -0
  196. package/dist/lib/derive.js +255 -0
  197. package/dist/lib/field-glyphs.d.ts +13 -0
  198. package/dist/lib/field-glyphs.js +28 -0
  199. package/dist/lib/menu-glyphs.d.ts +6 -0
  200. package/dist/lib/menu-glyphs.js +15 -0
  201. package/dist/lib/platform.d.ts +18 -0
  202. package/dist/lib/platform.js +17 -0
  203. package/dist/lib/squircle.d.ts +23 -0
  204. package/dist/lib/squircle.js +69 -0
  205. package/dist/lib/theme.d.ts +42 -0
  206. package/dist/lib/theme.js +62 -0
  207. package/dist/styles/base.css +115 -0
  208. package/dist/styles/components/accessory-tile.css +461 -0
  209. package/dist/styles/components/activity-indicator.css +63 -0
  210. package/dist/styles/components/alert.css +433 -0
  211. package/dist/styles/components/artifact-card.css +238 -0
  212. package/dist/styles/components/artwork.css +380 -0
  213. package/dist/styles/components/attachment.css +540 -0
  214. package/dist/styles/components/automation-row.css +52 -0
  215. package/dist/styles/components/avatar.css +230 -0
  216. package/dist/styles/components/badge.css +204 -0
  217. package/dist/styles/components/button.css +298 -0
  218. package/dist/styles/components/calendar.css +287 -0
  219. package/dist/styles/components/camera-view.css +239 -0
  220. package/dist/styles/components/card.css +100 -0
  221. package/dist/styles/components/carousel.css +210 -0
  222. package/dist/styles/components/chat.css +209 -0
  223. package/dist/styles/components/checkbox.css +212 -0
  224. package/dist/styles/components/code-block.css +162 -0
  225. package/dist/styles/components/code-field.css +163 -0
  226. package/dist/styles/components/color-well.css +452 -0
  227. package/dist/styles/components/combo-box.css +222 -0
  228. package/dist/styles/components/command-palette.css +379 -0
  229. package/dist/styles/components/confirmation.css +189 -0
  230. package/dist/styles/components/content-unavailable.css +105 -0
  231. package/dist/styles/components/context-menu.css +43 -0
  232. package/dist/styles/components/date-picker.css +356 -0
  233. package/dist/styles/components/description-list.css +92 -0
  234. package/dist/styles/components/device-frame.css +202 -0
  235. package/dist/styles/components/dialog.css +366 -0
  236. package/dist/styles/components/disclosure.css +197 -0
  237. package/dist/styles/components/dock.css +404 -0
  238. package/dist/styles/components/door-control.css +187 -0
  239. package/dist/styles/components/energy-readout.css +161 -0
  240. package/dist/styles/components/field.css +175 -0
  241. package/dist/styles/components/gauge.css +239 -0
  242. package/dist/styles/components/generated-image.css +248 -0
  243. package/dist/styles/components/glass.css +113 -0
  244. package/dist/styles/components/home-backdrop.css +81 -0
  245. package/dist/styles/components/home-section.css +100 -0
  246. package/dist/styles/components/home-status.css +215 -0
  247. package/dist/styles/components/hover-card.css +145 -0
  248. package/dist/styles/components/index.css +94 -0
  249. package/dist/styles/components/inspector.css +236 -0
  250. package/dist/styles/components/level-control.css +247 -0
  251. package/dist/styles/components/light-color-picker.css +94 -0
  252. package/dist/styles/components/list.css +411 -0
  253. package/dist/styles/components/listbox.css +168 -0
  254. package/dist/styles/components/lock-control.css +164 -0
  255. package/dist/styles/components/menu-bar.css +94 -0
  256. package/dist/styles/components/menu.css +454 -0
  257. package/dist/styles/components/message.css +236 -0
  258. package/dist/styles/components/model-picker.css +64 -0
  259. package/dist/styles/components/navigation-bar.css +249 -0
  260. package/dist/styles/components/outline.css +248 -0
  261. package/dist/styles/components/page-control.css +127 -0
  262. package/dist/styles/components/plan.css +212 -0
  263. package/dist/styles/components/popover.css +186 -0
  264. package/dist/styles/components/progress.css +228 -0
  265. package/dist/styles/components/prompt-input.css +503 -0
  266. package/dist/styles/components/radio.css +281 -0
  267. package/dist/styles/components/rating.css +122 -0
  268. package/dist/styles/components/reasoning.css +214 -0
  269. package/dist/styles/components/response.css +303 -0
  270. package/dist/styles/components/scene-tile.css +295 -0
  271. package/dist/styles/components/scroll-view.css +195 -0
  272. package/dist/styles/components/search-field.css +128 -0
  273. package/dist/styles/components/secure-field.css +189 -0
  274. package/dist/styles/components/segmented-control.css +183 -0
  275. package/dist/styles/components/select.css +290 -0
  276. package/dist/styles/components/sensor-readout.css +231 -0
  277. package/dist/styles/components/separator.css +62 -0
  278. package/dist/styles/components/setup-code.css +138 -0
  279. package/dist/styles/components/sheet.css +345 -0
  280. package/dist/styles/components/shimmer.css +60 -0
  281. package/dist/styles/components/sidebar.css +261 -0
  282. package/dist/styles/components/slider.css +208 -0
  283. package/dist/styles/components/sources.css +349 -0
  284. package/dist/styles/components/split-view.css +75 -0
  285. package/dist/styles/components/squircle.css +44 -0
  286. package/dist/styles/components/stepper.css +278 -0
  287. package/dist/styles/components/suggestion.css +203 -0
  288. package/dist/styles/components/switch.css +115 -0
  289. package/dist/styles/components/tab-bar.css +223 -0
  290. package/dist/styles/components/table.css +313 -0
  291. package/dist/styles/components/tabs.css +262 -0
  292. package/dist/styles/components/text-area.css +94 -0
  293. package/dist/styles/components/text-field.css +294 -0
  294. package/dist/styles/components/thermostat-control.css +214 -0
  295. package/dist/styles/components/toast.css +418 -0
  296. package/dist/styles/components/toggle.css +312 -0
  297. package/dist/styles/components/token-field.css +193 -0
  298. package/dist/styles/components/tool-call.css +391 -0
  299. package/dist/styles/components/toolbar.css +370 -0
  300. package/dist/styles/components/tooltip.css +69 -0
  301. package/dist/styles/components/window.css +428 -0
  302. package/dist/styles/index.css +17 -0
  303. package/dist/styles/materials.css +263 -0
  304. package/dist/styles/platforms.css +214 -0
  305. package/dist/styles/themes/ember.css +24 -0
  306. package/dist/styles/themes/graphite.css +16 -0
  307. package/dist/styles/themes/nebula.css +16 -0
  308. package/dist/styles/themes/system.css +28 -0
  309. package/dist/styles/tokens.css +299 -0
  310. package/package.json +82 -3
@@ -0,0 +1,281 @@
1
+ /* Radio — one choice from a few. macOS: a small circle that fills with the accent around a white dot.
2
+ Touch: a larger circle, or a list of rows with a trailing checkmark, as in iOS Settings. */
3
+
4
+ :where(:root, [data-platform="macos"]) {
5
+ --mb-radio-size: 14px;
6
+ --mb-radio-dot: 6px;
7
+ --mb-radio-label-gap: var(--mb-space-3);
8
+ --mb-radio-group-gap: var(--mb-space-3);
9
+ }
10
+
11
+ :where([data-platform="ios"], [data-platform="ipados"]) {
12
+ --mb-radio-size: 22px;
13
+ --mb-radio-dot: 9px;
14
+ --mb-radio-label-gap: var(--mb-space-5);
15
+ --mb-radio-group-gap: var(--mb-space-6);
16
+ }
17
+
18
+ .mb-radio-group {
19
+ display: flex;
20
+ flex-direction: column;
21
+ align-items: flex-start;
22
+ gap: var(--mb-radio-group-gap);
23
+ }
24
+
25
+ .mb-radio {
26
+ position: relative;
27
+ display: inline-flex;
28
+ flex: none;
29
+ align-items: center;
30
+ justify-content: center;
31
+ width: var(--mb-radio-size);
32
+ height: var(--mb-radio-size);
33
+ margin: 0;
34
+ padding: 0;
35
+ border: 0;
36
+ border-radius: var(--mb-radius-full);
37
+ background: var(--mb-bg-control);
38
+ box-shadow:
39
+ inset 0 0 0 var(--mb-hairline) var(--mb-control-border),
40
+ 0 0.5px 1px var(--mb-shadow-color);
41
+ font: inherit;
42
+ cursor: default;
43
+ touch-action: manipulation;
44
+ -webkit-tap-highlight-color: transparent;
45
+ transition:
46
+ background-color var(--mb-duration-fast) var(--mb-ease-out),
47
+ box-shadow var(--mb-duration-fast) var(--mb-ease-out),
48
+ scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
49
+ }
50
+
51
+ .mb-radio::after {
52
+ content: "";
53
+ position: absolute;
54
+ inset: 50% auto auto 50%;
55
+ width: max(100%, var(--mb-hit-target));
56
+ height: max(100%, var(--mb-hit-target));
57
+ translate: -50% -50%;
58
+ }
59
+
60
+ .mb-radio[data-checked] {
61
+ background: var(--mb-accent);
62
+ box-shadow:
63
+ inset 0 0 0 var(--mb-hairline) color-mix(in oklch, var(--mb-accent-pressed), transparent 30%),
64
+ inset 0 0.5px 0 rgb(255 255 255 / 0.28),
65
+ 0 0.5px 1px var(--mb-shadow-color);
66
+ }
67
+
68
+ .mb-radio:active:not([data-disabled], [data-readonly]) {
69
+ background: color-mix(in oklch, var(--mb-bg-control), var(--mb-ink) 12%);
70
+ transition-duration: 0ms;
71
+ }
72
+
73
+ .mb-radio[data-checked]:active:not([data-disabled], [data-readonly]) {
74
+ background: var(--mb-accent-pressed);
75
+ }
76
+
77
+ .mb-radio[data-disabled] {
78
+ opacity: 0.4;
79
+ }
80
+
81
+ /* ui-sdk marks the group, not each radio, when a Field shows it invalid. */
82
+ .mb-radio-group[data-invalid]:not([data-variant="list"]) .mb-radio:not([data-checked]) {
83
+ box-shadow: inset 0 0 0 1.5px var(--mb-destructive);
84
+ }
85
+
86
+ .mb-radio-indicator {
87
+ display: block;
88
+ width: var(--mb-radio-dot);
89
+ height: var(--mb-radio-dot);
90
+ border-radius: var(--mb-radius-full);
91
+ /* White on the system blue, as AppKit draws it; a brand whose accent needs dark ink gets a dark dot. */
92
+ background: var(--mb-on-accent);
93
+ box-shadow: 0 0.5px 1px rgb(0 0 0 / 0.18);
94
+ scale: 0;
95
+ transition: scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
96
+ }
97
+
98
+ .mb-radio-indicator[data-checked] {
99
+ scale: 1;
100
+ }
101
+
102
+ .mb-radio-check {
103
+ display: none;
104
+ }
105
+
106
+ /* A radio with a title. */
107
+ .mb-radio-label {
108
+ display: inline-flex;
109
+ align-items: flex-start;
110
+ gap: var(--mb-radio-label-gap);
111
+ color: var(--mb-label);
112
+ font: var(--mb-text-body);
113
+ letter-spacing: var(--mb-tracking-body);
114
+ cursor: default;
115
+ user-select: none;
116
+ -webkit-user-select: none;
117
+ }
118
+
119
+ .mb-radio-label > .mb-radio {
120
+ margin-block-start: calc((1lh - var(--mb-radio-size)) / 2);
121
+ }
122
+
123
+ .mb-radio-label:has(> .mb-radio[data-disabled]) {
124
+ color: var(--mb-label-tertiary);
125
+ }
126
+
127
+ .mb-radio-text {
128
+ display: flex;
129
+ flex-direction: column;
130
+ gap: var(--mb-space-1);
131
+ min-width: 0;
132
+ }
133
+
134
+ .mb-radio-description {
135
+ color: var(--mb-label-secondary);
136
+ font: var(--mb-text-callout);
137
+ }
138
+
139
+ /* List: rows in an inset group, the chosen one marked with a checkmark at the end. */
140
+ .mb-radio-group[data-variant="list"] {
141
+ align-items: stretch;
142
+ gap: 0;
143
+ min-width: min(100%, 280px);
144
+ padding: 0;
145
+ border-radius: var(--mb-group-radius);
146
+ background: var(--mb-bg-grouped-secondary);
147
+ box-shadow: 0 0 0 var(--mb-hairline) var(--mb-separator);
148
+ overflow: clip;
149
+ }
150
+
151
+ .mb-radio-group[data-variant="list"] .mb-radio-label {
152
+ position: relative;
153
+ flex-direction: row-reverse;
154
+ align-items: center;
155
+ justify-content: space-between;
156
+ min-height: var(--mb-row-height);
157
+ padding: var(--mb-space-3) var(--mb-row-padding);
158
+ transition: background-color var(--mb-duration-fast) var(--mb-ease-out);
159
+ }
160
+
161
+ .mb-radio-group[data-variant="list"] .mb-radio-label + .mb-radio-label::before {
162
+ content: "";
163
+ position: absolute;
164
+ inset: 0 0 auto var(--mb-row-padding);
165
+ border-top: var(--mb-hairline) solid var(--mb-separator);
166
+ }
167
+
168
+ .mb-radio-group[data-variant="list"] .mb-radio-label:active {
169
+ background: var(--mb-fill-tertiary);
170
+ transition-duration: 0ms;
171
+ }
172
+
173
+ .mb-radio-group[data-variant="list"] .mb-radio-label:has(.mb-radio:focus-visible) {
174
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
175
+ outline-offset: calc(var(--mb-focus-ring-width) * -1);
176
+ border-radius: inherit;
177
+ }
178
+
179
+ .mb-radio-group[data-variant="list"] .mb-radio,
180
+ .mb-radio-group[data-variant="list"] .mb-radio[data-checked]:active {
181
+ width: var(--mb-icon-size);
182
+ height: var(--mb-icon-size);
183
+ margin: 0;
184
+ background: transparent;
185
+ box-shadow: none;
186
+ color: var(--mb-accent-text);
187
+ }
188
+
189
+ .mb-radio-group[data-variant="list"] .mb-radio:focus-visible {
190
+ outline: none;
191
+ }
192
+
193
+ .mb-radio-group[data-variant="list"] .mb-radio-indicator {
194
+ width: 100%;
195
+ height: 100%;
196
+ background: none;
197
+ box-shadow: none;
198
+ scale: 1;
199
+ opacity: 0;
200
+ transition: opacity var(--mb-duration-instant) var(--mb-ease-out);
201
+ }
202
+
203
+ .mb-radio-group[data-variant="list"] .mb-radio-indicator[data-checked] {
204
+ opacity: 1;
205
+ }
206
+
207
+ .mb-radio-group[data-variant="list"] .mb-radio-check {
208
+ display: block;
209
+ width: 100%;
210
+ height: 100%;
211
+ fill: none;
212
+ stroke: currentColor;
213
+ stroke-width: 2;
214
+ stroke-linecap: round;
215
+ stroke-linejoin: round;
216
+ }
217
+
218
+ @media (hover: hover) and (pointer: fine) {
219
+ .mb-radio-group[data-variant="list"] .mb-radio-label:hover {
220
+ background: var(--mb-fill-quaternary);
221
+ }
222
+ }
223
+
224
+ @scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
225
+ .mb-radio {
226
+ background: transparent;
227
+ box-shadow: inset 0 0 0 1.5px var(--mb-control-border);
228
+ }
229
+
230
+ .mb-radio[data-checked] {
231
+ background: var(--mb-accent);
232
+ box-shadow: none;
233
+ }
234
+
235
+ .mb-radio:active:not([data-disabled], [data-readonly]) {
236
+ background: var(--mb-fill-tertiary);
237
+ scale: 0.92;
238
+ }
239
+
240
+ .mb-radio[data-checked]:active:not([data-disabled], [data-readonly]) {
241
+ background: var(--mb-accent-pressed);
242
+ }
243
+
244
+ .mb-radio-group[data-variant="list"] .mb-radio,
245
+ .mb-radio-group[data-variant="list"] .mb-radio[data-checked]:active {
246
+ background: transparent;
247
+ box-shadow: none;
248
+ scale: 1;
249
+ }
250
+
251
+ .mb-radio-group[data-variant="list"] .mb-radio-check {
252
+ stroke-width: 2.2;
253
+ }
254
+ }
255
+
256
+ @scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
257
+ @media (prefers-reduced-motion: reduce) {
258
+ :where(:root:not([data-motion="full"])) {
259
+ .mb-radio:active:not([data-disabled], [data-readonly]) {
260
+ scale: none;
261
+ }
262
+ }
263
+ }
264
+ }
265
+
266
+ /* Choices with descriptions need more room between them to stay distinct. */
267
+ .mb-radio-group:not([data-variant="list"]):has(.mb-radio-description) {
268
+ gap: calc(var(--mb-radio-group-gap) + var(--mb-space-3));
269
+ }
270
+
271
+ /* Continuous corners on the inset-grouped list, and the focus ring inside it. */
272
+ @supports (corner-shape: squircle) {
273
+ .mb-radio-group[data-variant="list"] {
274
+ corner-shape: var(--mb-corner-shape);
275
+ border-radius: calc(var(--mb-group-radius) * var(--mb-corner-factor));
276
+ }
277
+
278
+ .mb-radio-group[data-variant="list"] .mb-radio-label:has(.mb-radio:focus-visible) {
279
+ corner-shape: inherit;
280
+ }
281
+ }
@@ -0,0 +1,122 @@
1
+ /* Rating — a row of stars, filled with the accent up to the score. A pointer previews the score
2
+ it's over; touch picks at once. Half stars fill halfway. */
3
+
4
+ :where(:root, [data-platform="macos"]) {
5
+ --mb-rating-size: 16px;
6
+ --mb-rating-size-sm: 12px;
7
+ --mb-rating-size-lg: 22px;
8
+ --mb-rating-gap: 2px;
9
+ }
10
+
11
+ :where([data-platform="ios"], [data-platform="ipados"]) {
12
+ --mb-rating-size: 24px;
13
+ --mb-rating-size-sm: 14px;
14
+ --mb-rating-size-lg: 32px;
15
+ --mb-rating-gap: 4px;
16
+ }
17
+
18
+ .mb-rating {
19
+ --mb-rating-s: var(--mb-rating-size);
20
+ --mb-rating-color: var(--mb-accent);
21
+ --mb-rating-empty: var(--mb-label-tertiary);
22
+
23
+ display: inline-flex;
24
+ flex: none;
25
+ align-items: center;
26
+ gap: var(--mb-rating-gap);
27
+ -webkit-tap-highlight-color: transparent;
28
+ }
29
+
30
+ .mb-rating[data-size="sm"] {
31
+ --mb-rating-s: var(--mb-rating-size-sm);
32
+ --mb-rating-gap: 1px;
33
+ }
34
+
35
+ .mb-rating[data-size="lg"] {
36
+ --mb-rating-s: var(--mb-rating-size-lg);
37
+ }
38
+
39
+ /* A read-only score is a picture of a number; it doesn't need to look pressable. */
40
+ .mb-rating[data-readonly] {
41
+ --mb-rating-empty: var(--mb-label-quaternary);
42
+ }
43
+
44
+ .mb-rating-item {
45
+ position: relative;
46
+ display: inline-flex;
47
+ width: var(--mb-rating-s);
48
+ height: var(--mb-rating-s);
49
+ border-radius: var(--mb-radius-xs);
50
+ transition: scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
51
+ }
52
+
53
+ .mb-rating-symbol {
54
+ position: absolute;
55
+ inset: 0;
56
+ width: 100%;
57
+ height: 100%;
58
+ pointer-events: none;
59
+ }
60
+
61
+ .mb-rating-symbol[data-part="empty"] {
62
+ fill: none;
63
+ stroke: var(--mb-rating-empty);
64
+ stroke-width: 1.6;
65
+ stroke-linejoin: round;
66
+ }
67
+
68
+ .mb-rating[data-readonly] .mb-rating-symbol[data-part="empty"] {
69
+ fill: var(--mb-rating-empty);
70
+ stroke: none;
71
+ }
72
+
73
+ .mb-rating-symbol[data-part="fill"] {
74
+ fill: var(--mb-rating-color);
75
+ clip-path: inset(0 calc((1 - var(--rating-fill, 0)) * 100%) 0 0);
76
+ transition: clip-path var(--mb-duration-fast) var(--mb-ease-out);
77
+ }
78
+
79
+ :where([dir="rtl"]) .mb-rating-symbol[data-part="fill"] {
80
+ clip-path: inset(0 0 0 calc((1 - var(--rating-fill, 0)) * 100%));
81
+ }
82
+
83
+ /* The radios sit over the star; the ring goes around the star they belong to. */
84
+ .mb-rating-item :where([data-slot="rating-radio"]) {
85
+ cursor: default;
86
+ outline: none;
87
+ }
88
+
89
+ /* Stars are smaller than a fingertip: each radio reaches the hit target vertically and
90
+ meets its neighbour across the gap. */
91
+ .mb-rating-item :where([data-slot="rating-radio"])::after {
92
+ content: "";
93
+ position: absolute;
94
+ inset-block: min(0px, calc((var(--mb-rating-s) - var(--mb-hit-target)) / 2));
95
+ inset-inline: calc(var(--mb-rating-gap) / -2);
96
+ }
97
+
98
+ .mb-rating-item:has([data-slot="rating-radio"]:focus-visible) {
99
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
100
+ outline-offset: 1px;
101
+ }
102
+
103
+ /* A previewed score is a little lighter than a chosen one, so the difference reads. */
104
+ .mb-rating:has(.mb-rating-item[data-highlighted]) .mb-rating-symbol[data-part="fill"] {
105
+ fill: color-mix(in oklch, var(--mb-rating-color) 72%, transparent);
106
+ }
107
+
108
+ .mb-rating-item:active:not([data-disabled], [data-readonly]) {
109
+ scale: 0.88;
110
+ }
111
+
112
+ .mb-rating[data-disabled] {
113
+ opacity: 0.4;
114
+ }
115
+
116
+ @media (prefers-reduced-motion: reduce) {
117
+ :where(:root:not([data-motion="full"])) {
118
+ .mb-rating-item:active {
119
+ scale: 1 !important;
120
+ }
121
+ }
122
+ }
@@ -0,0 +1,214 @@
1
+ /* Reasoning — a quiet line that says what the model is doing, and opens to show how it got there. */
2
+
3
+ :where(:root, [data-platform="macos"]) {
4
+ --mb-reasoning-font: var(--mb-text-body);
5
+ --mb-reasoning-content-font: var(--mb-text-body);
6
+ --mb-reasoning-content-leading: 18px;
7
+ --mb-reasoning-min-height: 22px;
8
+ --mb-reasoning-gap: 4px;
9
+ --mb-reasoning-chevron-width: 5px;
10
+ --mb-reasoning-chevron-height: 9px;
11
+ --mb-reasoning-chevron-stroke: 1.8;
12
+ --mb-reasoning-content-indent: 12px;
13
+ --mb-reasoning-content-space: 6px;
14
+ }
15
+
16
+ :where([data-platform="ios"], [data-platform="ipados"]) {
17
+ --mb-reasoning-font: var(--mb-text-subheadline);
18
+ --mb-reasoning-content-font: var(--mb-text-subheadline);
19
+ --mb-reasoning-content-leading: 21px;
20
+ --mb-reasoning-min-height: 28px;
21
+ --mb-reasoning-gap: 5px;
22
+ --mb-reasoning-chevron-width: 6px;
23
+ --mb-reasoning-chevron-height: 11px;
24
+ --mb-reasoning-chevron-stroke: 2;
25
+ --mb-reasoning-content-indent: 14px;
26
+ --mb-reasoning-content-space: 8px;
27
+ }
28
+
29
+ .mb-reasoning {
30
+ position: relative;
31
+ isolation: isolate;
32
+ display: flex;
33
+ flex-direction: column;
34
+ align-items: flex-start;
35
+ min-width: 0;
36
+ color: var(--mb-label-secondary);
37
+ font: var(--mb-reasoning-font);
38
+ letter-spacing: var(--mb-tracking-body);
39
+ }
40
+
41
+ .mb-reasoning-trigger {
42
+ position: relative;
43
+ display: inline-flex;
44
+ align-items: center;
45
+ gap: var(--mb-reasoning-gap);
46
+ max-width: 100%;
47
+ min-height: var(--mb-reasoning-min-height);
48
+ margin: 0;
49
+ padding: 0;
50
+ border: 0;
51
+ border-radius: var(--mb-radius-xs);
52
+ background: transparent;
53
+ color: var(--mb-label-secondary);
54
+ font: inherit;
55
+ letter-spacing: inherit;
56
+ text-align: start;
57
+ cursor: default;
58
+ -webkit-tap-highlight-color: transparent;
59
+ touch-action: manipulation;
60
+ user-select: none;
61
+ -webkit-user-select: none;
62
+ transition: color var(--mb-duration-fast) var(--mb-ease-out);
63
+ }
64
+
65
+ /* The line is short; its hit area still meets the platform minimum. */
66
+ .mb-reasoning-trigger::after {
67
+ content: "";
68
+ position: absolute;
69
+ inset: 50% -4px auto;
70
+ height: max(100%, var(--mb-hit-target));
71
+ translate: 0 -50%;
72
+ }
73
+
74
+ .mb-reasoning-trigger:focus-visible {
75
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
76
+ outline-offset: var(--mb-focus-ring-offset);
77
+ }
78
+
79
+ .mb-reasoning-label {
80
+ min-width: 0;
81
+ overflow: hidden;
82
+ white-space: nowrap;
83
+ text-overflow: ellipsis;
84
+ }
85
+
86
+ .mb-reasoning-chevron {
87
+ flex: none;
88
+ box-sizing: content-box;
89
+ width: var(--mb-reasoning-chevron-width);
90
+ height: var(--mb-reasoning-chevron-height);
91
+ /* A square box, so the turn pivots on the chevron's center. */
92
+ padding-inline: calc((var(--mb-reasoning-chevron-height) - var(--mb-reasoning-chevron-width)) / 2);
93
+ fill: none;
94
+ stroke: currentColor;
95
+ stroke-width: var(--mb-reasoning-chevron-stroke);
96
+ stroke-linecap: round;
97
+ stroke-linejoin: round;
98
+ transition: rotate var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
99
+ }
100
+
101
+ .mb-reasoning-trigger[data-open] .mb-reasoning-chevron {
102
+ rotate: 90deg;
103
+ }
104
+
105
+ :where([dir="rtl"]) .mb-reasoning-chevron {
106
+ scale: -1 1;
107
+ }
108
+
109
+ :where([dir="rtl"]) .mb-reasoning-trigger[data-open] .mb-reasoning-chevron {
110
+ rotate: -90deg;
111
+ }
112
+
113
+ @media (hover: hover) and (pointer: fine) {
114
+ .mb-reasoning-trigger:hover {
115
+ color: var(--mb-label);
116
+ }
117
+
118
+ .mb-reasoning-trigger:hover .mb-reasoning-label:not([data-active]) {
119
+ color: var(--mb-label);
120
+ }
121
+ }
122
+
123
+ .mb-reasoning-trigger:active {
124
+ color: var(--mb-label);
125
+ transition-duration: 0ms;
126
+ }
127
+
128
+ .mb-reasoning-trigger:active .mb-reasoning-label:not([data-active]) {
129
+ color: var(--mb-label);
130
+ }
131
+
132
+ .mb-reasoning-panel {
133
+ align-self: stretch;
134
+ height: var(--collapsible-panel-height, auto);
135
+ overflow: hidden;
136
+ transition: height var(--mb-spring-smooth-duration) var(--mb-spring-smooth);
137
+ }
138
+
139
+ .mb-reasoning-panel:is([data-starting-style], [data-ending-style]) {
140
+ height: 0;
141
+ }
142
+
143
+ .mb-reasoning-panel[data-ending-style] {
144
+ transition-duration: var(--mb-duration-slow);
145
+ transition-timing-function: var(--mb-ease-out);
146
+ }
147
+
148
+ .mb-reasoning-content {
149
+ margin-block: var(--mb-reasoning-content-space) var(--mb-space-2);
150
+ padding-inline-start: var(--mb-reasoning-content-indent);
151
+ border-inline-start: 1px solid var(--mb-separator-strong);
152
+ color: var(--mb-label-secondary);
153
+ font: var(--mb-reasoning-content-font);
154
+ line-height: var(--mb-reasoning-content-leading);
155
+ text-wrap: pretty;
156
+ overflow-wrap: break-word;
157
+ }
158
+
159
+ .mb-reasoning-content > :where(p, ul, ol) {
160
+ margin: 0;
161
+ }
162
+
163
+ .mb-reasoning-content > :where(p, ul, ol) + :where(p, ul, ol) {
164
+ margin-block-start: var(--mb-reasoning-content-space);
165
+ }
166
+
167
+ .mb-reasoning-content :where(ul, ol) {
168
+ padding-inline-start: 1.25em;
169
+ }
170
+
171
+ /* Glow: a soft wash of the theme's colors drifting behind the line while the model works. */
172
+ .mb-reasoning[data-glow][data-state="running"]::before {
173
+ content: "";
174
+ position: absolute;
175
+ z-index: -1;
176
+ inset-block-start: calc(var(--mb-reasoning-min-height) / 2 - 18px);
177
+ inset-inline-start: -18px;
178
+ width: min(260px, calc(100% + 36px));
179
+ height: 36px;
180
+ border-radius: var(--mb-radius-full);
181
+ background:
182
+ radial-gradient(closest-side at 20% 50%, color-mix(in oklch, var(--mb-accent) 55%, transparent), transparent),
183
+ radial-gradient(closest-side at 55% 50%, color-mix(in oklch, var(--mb-purple) 45%, transparent), transparent),
184
+ radial-gradient(closest-side at 85% 50%, color-mix(in oklch, var(--mb-pink) 40%, transparent), transparent);
185
+ background-size: 200% 100%;
186
+ filter: blur(14px);
187
+ opacity: 0.38;
188
+ pointer-events: none;
189
+ animation: mb-reasoning-glow 5s var(--mb-ease-in-out) infinite alternate;
190
+ }
191
+
192
+ @keyframes mb-reasoning-glow {
193
+ from {
194
+ background-position: 0% 50%;
195
+ }
196
+ to {
197
+ background-position: 100% 50%;
198
+ }
199
+ }
200
+
201
+ @media (prefers-reduced-motion: reduce) {
202
+ :where(:root:not([data-motion="full"])) {
203
+ .mb-reasoning[data-glow][data-state="running"]::before {
204
+ animation: none;
205
+ background-position: 50% 50%;
206
+ }
207
+ }
208
+ }
209
+
210
+ @media (forced-colors: active) {
211
+ .mb-reasoning[data-glow]::before {
212
+ display: none;
213
+ }
214
+ }