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,411 @@
1
+ /* List — iOS Settings and macOS System Settings: grouped rows with icon tiles, values and accessories. */
2
+
3
+ :where(:root, [data-platform="macos"]) {
4
+ --mb-list-inset: 20px;
5
+ --mb-list-padding-block: 20px;
6
+ --mb-list-section-gap: 22px;
7
+ --mb-list-row-height: 36px;
8
+ --mb-list-row-height-icon: 40px;
9
+ --mb-list-row-padding-block: 6px;
10
+ --mb-list-row-padding-inline: 10px;
11
+ --mb-list-icon-size: 20px;
12
+ --mb-list-icon-radius: 5px;
13
+ --mb-list-icon-glyph: 13px;
14
+ --mb-list-icon-gap: 8px;
15
+ --mb-list-trailing-gap: 8px;
16
+ --mb-list-group-radius: var(--mb-radius-md);
17
+ --mb-list-chevron-width: 5.5px;
18
+ --mb-list-chevron-height: 10px;
19
+ --mb-list-chevron-stroke: 1.6;
20
+ --mb-list-check-width: 12px;
21
+ --mb-list-info-size: 16px;
22
+ --mb-list-title-font: 400 13px/16px var(--mb-font);
23
+ --mb-list-subtitle-font: 400 11px/14px var(--mb-font);
24
+ --mb-list-header-font: 600 13px/16px var(--mb-font);
25
+ --mb-list-header-color: var(--mb-label);
26
+ --mb-list-header-gap: 8px;
27
+ --mb-list-footer-font: 400 11px/14px var(--mb-font);
28
+ --mb-list-bg: var(--mb-bg);
29
+ --mb-list-group-bg: var(--mb-fill-quaternary);
30
+ --mb-list-group-edge: var(--mb-separator);
31
+ --mb-list-pressed: var(--mb-fill-tertiary);
32
+ /* macOS insets separators from both edges and doesn't skip the icon. */
33
+ --mb-list-separator-start: var(--mb-list-row-padding-inline);
34
+ --mb-list-separator-start-icon: var(--mb-list-row-padding-inline);
35
+ --mb-list-separator-end: var(--mb-list-row-padding-inline);
36
+ }
37
+
38
+ :where([data-platform="ios"], [data-platform="ipados"]) {
39
+ --mb-list-inset: 16px;
40
+ --mb-list-padding-block: 16px;
41
+ --mb-list-section-gap: 32px;
42
+ --mb-list-row-height: 48px;
43
+ --mb-list-row-height-icon: 48px;
44
+ --mb-list-row-padding-block: 11px;
45
+ --mb-list-row-padding-inline: 16px;
46
+ --mb-list-icon-size: 30px;
47
+ --mb-list-icon-radius: 7.5px;
48
+ --mb-list-icon-glyph: 19px;
49
+ --mb-list-icon-gap: 14px;
50
+ --mb-list-trailing-gap: 8px;
51
+ --mb-list-group-radius: var(--mb-group-radius);
52
+ --mb-list-chevron-width: 7px;
53
+ --mb-list-chevron-height: 12.5px;
54
+ --mb-list-chevron-stroke: 2.1;
55
+ --mb-list-check-width: 16px;
56
+ --mb-list-info-size: 22px;
57
+ --mb-list-title-font: 400 17px/22px var(--mb-font);
58
+ --mb-list-subtitle-font: 400 15px/20px var(--mb-font);
59
+ --mb-list-header-font: 400 13px/18px var(--mb-font);
60
+ --mb-list-header-color: var(--mb-label-secondary);
61
+ --mb-list-header-gap: 7px;
62
+ --mb-list-footer-font: 400 13px/18px var(--mb-font);
63
+ --mb-list-bg: var(--mb-bg-grouped);
64
+ --mb-list-group-bg: var(--mb-bg-grouped-secondary);
65
+ --mb-list-group-edge: transparent;
66
+ --mb-list-pressed: var(--mb-fill);
67
+ /* iOS starts the separator under the title, past the icon, and runs it to the edge. */
68
+ --mb-list-separator-start: var(--mb-list-row-padding-inline);
69
+ --mb-list-separator-start-icon: calc(
70
+ var(--mb-list-row-padding-inline) + var(--mb-list-icon-size) + var(--mb-list-icon-gap)
71
+ );
72
+ --mb-list-separator-end: 0px;
73
+ }
74
+
75
+ .mb-list {
76
+ display: flex;
77
+ flex-direction: column;
78
+ gap: var(--mb-list-section-gap);
79
+ padding-block: var(--mb-list-padding-block);
80
+ background: var(--mb-list-bg);
81
+ color: var(--mb-label);
82
+ font: var(--mb-list-title-font);
83
+ letter-spacing: var(--mb-tracking-body);
84
+ }
85
+
86
+ .mb-list[data-variant="plain"] {
87
+ --mb-list-bg: var(--mb-bg);
88
+ --mb-list-group-bg: transparent;
89
+ --mb-list-group-edge: transparent;
90
+ --mb-list-separator-end: 0px;
91
+ gap: 0;
92
+ padding-block: 0;
93
+ }
94
+
95
+ .mb-list-section {
96
+ display: flex;
97
+ flex-direction: column;
98
+ min-width: 0;
99
+ }
100
+
101
+ .mb-list[data-variant="inset-grouped"] .mb-list-section {
102
+ margin-inline: var(--mb-list-inset);
103
+ }
104
+
105
+ .mb-list-section-header {
106
+ margin-block-end: var(--mb-list-header-gap);
107
+ padding-inline: var(--mb-list-row-padding-inline);
108
+ color: var(--mb-list-header-color);
109
+ font: var(--mb-list-header-font);
110
+ letter-spacing: var(--mb-tracking-caption);
111
+ }
112
+
113
+ .mb-list[data-variant="plain"] .mb-list-section-header {
114
+ position: sticky;
115
+ z-index: 1;
116
+ /* A NavigationStack sets the inset, so headers pin below its bar instead of under it. */
117
+ top: var(--mb-content-inset-top, 0px);
118
+ margin: 0;
119
+ padding-block: 6px;
120
+ background: var(--mb-bg-secondary);
121
+ color: var(--mb-label);
122
+ font: var(--mb-text-headline);
123
+ }
124
+
125
+ .mb-list-section-footer {
126
+ margin-block-start: var(--mb-list-header-gap);
127
+ padding-inline: var(--mb-list-row-padding-inline);
128
+ color: var(--mb-label-secondary);
129
+ font: var(--mb-list-footer-font);
130
+ letter-spacing: var(--mb-tracking-caption);
131
+ text-wrap: pretty;
132
+ }
133
+
134
+ .mb-list-group {
135
+ display: flex;
136
+ flex-direction: column;
137
+ margin: 0;
138
+ padding: 0;
139
+ overflow: hidden;
140
+ list-style: none;
141
+ background: var(--mb-list-group-bg);
142
+ }
143
+
144
+ .mb-list[data-variant="inset-grouped"] .mb-list-group {
145
+ --mb-list-row-radius: var(--mb-list-group-radius);
146
+ border-radius: var(--mb-list-group-radius);
147
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-list-group-edge);
148
+ }
149
+
150
+ .mb-list[data-variant="grouped"] .mb-list-group {
151
+ box-shadow:
152
+ inset 0 var(--mb-hairline) 0 var(--mb-separator),
153
+ inset 0 calc(var(--mb-hairline) * -1) 0 var(--mb-separator);
154
+ }
155
+
156
+ .mb-list-item {
157
+ display: block;
158
+ margin: 0;
159
+ padding: 0;
160
+ }
161
+
162
+ .mb-list-row {
163
+ position: relative;
164
+ box-sizing: border-box;
165
+ display: grid;
166
+ grid-template-columns: auto minmax(0, 1fr) auto auto;
167
+ grid-template-rows: 1fr auto auto 1fr;
168
+ align-items: center;
169
+ justify-items: start;
170
+ width: 100%;
171
+ min-height: var(--mb-list-row-height);
172
+ margin: 0;
173
+ padding: var(--mb-list-row-padding-block) var(--mb-list-row-padding-inline);
174
+ border: 0;
175
+ border-radius: 0;
176
+ background: transparent;
177
+ color: inherit;
178
+ font: inherit;
179
+ letter-spacing: inherit;
180
+ text-align: start;
181
+ text-decoration: none;
182
+ cursor: default;
183
+ -webkit-tap-highlight-color: transparent;
184
+ touch-action: manipulation;
185
+ user-select: none;
186
+ -webkit-user-select: none;
187
+ transition: background-color var(--mb-duration-base) var(--mb-ease-out);
188
+ }
189
+
190
+ .mb-list-row:has(> .mb-list-row-icon) {
191
+ min-height: var(--mb-list-row-height-icon);
192
+ }
193
+
194
+ .mb-list-item:first-child > .mb-list-row {
195
+ border-start-start-radius: var(--mb-list-row-radius, 0);
196
+ border-start-end-radius: var(--mb-list-row-radius, 0);
197
+ }
198
+
199
+ .mb-list-item:last-child > .mb-list-row {
200
+ border-end-start-radius: var(--mb-list-row-radius, 0);
201
+ border-end-end-radius: var(--mb-list-row-radius, 0);
202
+ }
203
+
204
+ /* The hairline sits on top of every row but the first, so it never doubles against the group's edge. */
205
+ .mb-list-item + .mb-list-item > .mb-list-row::before {
206
+ content: "";
207
+ position: absolute;
208
+ inset-block-start: 0;
209
+ inset-inline: var(--mb-list-separator-start) var(--mb-list-separator-end);
210
+ height: var(--mb-hairline);
211
+ background: var(--mb-separator);
212
+ pointer-events: none;
213
+ }
214
+
215
+ .mb-list-item + .mb-list-item > .mb-list-row:has(> .mb-list-row-icon)::before {
216
+ inset-inline-start: var(--mb-list-separator-start-icon);
217
+ }
218
+
219
+ /*
220
+ * iOS starts the hairline at the title, past any leading icon, artwork or avatar.
221
+ * It hangs off the title at the title's own inline position and runs to the group's clipped edge.
222
+ */
223
+ @scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
224
+ .mb-list-item + .mb-list-item > .mb-list-row:has(> .mb-list-row-title)::before {
225
+ content: none;
226
+ }
227
+
228
+ .mb-list-item + .mb-list-item > .mb-list-row > .mb-list-row-title::before {
229
+ content: "";
230
+ position: absolute;
231
+ inset-block-start: 0;
232
+ inline-size: 100vw;
233
+ block-size: var(--mb-hairline);
234
+ background: var(--mb-separator);
235
+ pointer-events: none;
236
+ }
237
+ }
238
+
239
+ /* A pressed row fills edge to edge, so the hairlines around it step aside, as UIKit's do. */
240
+ .mb-list-row[data-interactive]:active {
241
+ background: var(--mb-list-pressed);
242
+ transition-duration: 0ms;
243
+ }
244
+
245
+ .mb-list-item > .mb-list-row[data-interactive]:active::before,
246
+ .mb-list-item > .mb-list-row[data-interactive]:active > .mb-list-row-title::before,
247
+ .mb-list-item:has(> .mb-list-row[data-interactive]:active) + .mb-list-item > .mb-list-row::before,
248
+ .mb-list-item:has(> .mb-list-row[data-interactive]:active) + .mb-list-item > .mb-list-row > .mb-list-row-title::before {
249
+ opacity: 0;
250
+ }
251
+
252
+ .mb-list-row:focus-visible {
253
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
254
+ outline-offset: calc(var(--mb-focus-ring-width) * -1);
255
+ }
256
+
257
+ .mb-list-row-icon {
258
+ grid-column: 1;
259
+ grid-row: 1 / -1;
260
+ display: grid;
261
+ place-items: center;
262
+ width: var(--mb-list-icon-size);
263
+ height: var(--mb-list-icon-size);
264
+ margin-inline-end: var(--mb-list-icon-gap);
265
+ border-radius: var(--mb-list-icon-radius);
266
+ background:
267
+ linear-gradient(to bottom, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0) 60%),
268
+ var(--mb-list-icon-bg, var(--mb-tint));
269
+ color: var(--mb-list-icon-fg, #ffffff);
270
+ box-shadow: inset 0 0 0 var(--mb-hairline) rgb(0 0 0 / 0.06);
271
+ }
272
+
273
+ /* Continuous corners: the Settings icon tile, and the inset group with its first and last rows' press fill. */
274
+ @supports (corner-shape: squircle) {
275
+ .mb-list-row-icon {
276
+ corner-shape: var(--mb-corner-shape);
277
+ border-radius: calc(var(--mb-list-icon-radius) * var(--mb-corner-factor));
278
+ }
279
+
280
+ .mb-list[data-variant="inset-grouped"] .mb-list-group {
281
+ --mb-list-row-radius: calc(var(--mb-list-group-radius) * var(--mb-corner-factor));
282
+ corner-shape: var(--mb-corner-shape);
283
+ border-radius: calc(var(--mb-list-group-radius) * var(--mb-corner-factor));
284
+ }
285
+
286
+ .mb-list-item:is(:first-child, :last-child) > .mb-list-row {
287
+ corner-shape: var(--mb-corner-shape);
288
+ }
289
+ }
290
+
291
+ .mb-list-row-icon :where(svg) {
292
+ width: var(--mb-list-icon-glyph);
293
+ height: var(--mb-list-icon-glyph);
294
+ stroke-width: 2.25;
295
+ }
296
+
297
+ .mb-list-row-icon[data-color="red"] { --mb-list-icon-bg: var(--mb-red); }
298
+ .mb-list-row-icon[data-color="orange"] { --mb-list-icon-bg: var(--mb-orange); }
299
+ .mb-list-row-icon[data-color="yellow"] { --mb-list-icon-bg: var(--mb-yellow); }
300
+ .mb-list-row-icon[data-color="green"] { --mb-list-icon-bg: var(--mb-green); }
301
+ .mb-list-row-icon[data-color="mint"] { --mb-list-icon-bg: var(--mb-mint); }
302
+ .mb-list-row-icon[data-color="teal"] { --mb-list-icon-bg: var(--mb-teal); }
303
+ .mb-list-row-icon[data-color="cyan"] { --mb-list-icon-bg: var(--mb-cyan); }
304
+ .mb-list-row-icon[data-color="blue"] { --mb-list-icon-bg: var(--mb-blue); }
305
+ .mb-list-row-icon[data-color="indigo"] { --mb-list-icon-bg: var(--mb-indigo); }
306
+ .mb-list-row-icon[data-color="purple"] { --mb-list-icon-bg: var(--mb-purple); }
307
+ .mb-list-row-icon[data-color="pink"] { --mb-list-icon-bg: var(--mb-pink); }
308
+ .mb-list-row-icon[data-color="brown"] { --mb-list-icon-bg: var(--mb-brown); }
309
+ .mb-list-row-icon[data-color="gray"] {
310
+ --mb-list-icon-bg: light-dark(var(--mb-tint), oklch(from var(--mb-tint) calc(l - 0.14) calc(c * 0.8) h));
311
+ }
312
+ .mb-list-row-icon[data-color="accent"] {
313
+ --mb-list-icon-bg: var(--mb-accent);
314
+ --mb-list-icon-fg: var(--mb-on-accent);
315
+ }
316
+
317
+ .mb-list-row-title {
318
+ grid-column: 2;
319
+ grid-row: 2;
320
+ min-width: 0;
321
+ max-width: 100%;
322
+ overflow-wrap: anywhere;
323
+ }
324
+
325
+ .mb-list-row-subtitle {
326
+ grid-column: 2;
327
+ grid-row: 3;
328
+ min-width: 0;
329
+ max-width: 100%;
330
+ color: var(--mb-label-secondary);
331
+ font: var(--mb-list-subtitle-font);
332
+ letter-spacing: var(--mb-tracking-caption);
333
+ }
334
+
335
+ .mb-list-row-value {
336
+ grid-column: 3;
337
+ grid-row: 1 / -1;
338
+ justify-self: end;
339
+ max-width: 14em;
340
+ margin-inline-start: var(--mb-list-trailing-gap);
341
+ overflow: hidden;
342
+ color: var(--mb-label-secondary);
343
+ text-align: end;
344
+ text-overflow: ellipsis;
345
+ white-space: nowrap;
346
+ }
347
+
348
+ .mb-list-row-accessory {
349
+ grid-column: 4;
350
+ grid-row: 1 / -1;
351
+ justify-self: end;
352
+ display: inline-flex;
353
+ align-items: center;
354
+ margin-inline-start: var(--mb-list-trailing-gap);
355
+ }
356
+
357
+ .mb-list-row-accessory :where(svg) {
358
+ display: block;
359
+ fill: none;
360
+ stroke: currentColor;
361
+ stroke-linecap: round;
362
+ stroke-linejoin: round;
363
+ }
364
+
365
+ .mb-list-row-accessory[data-type="disclosure"] {
366
+ color: var(--mb-label-tertiary);
367
+ }
368
+
369
+ .mb-list-row-accessory[data-type="disclosure"] svg {
370
+ width: var(--mb-list-chevron-width);
371
+ height: var(--mb-list-chevron-height);
372
+ stroke-width: var(--mb-list-chevron-stroke);
373
+ overflow: visible;
374
+ }
375
+
376
+ :where([dir="rtl"]) .mb-list-row-accessory[data-type="disclosure"] svg {
377
+ scale: -1 1;
378
+ }
379
+
380
+ .mb-list-row-accessory[data-type="checkmark"] {
381
+ color: var(--mb-accent-text);
382
+ }
383
+
384
+ .mb-list-row-accessory[data-type="checkmark"] svg {
385
+ width: var(--mb-list-check-width);
386
+ height: calc(var(--mb-list-check-width) * 0.875);
387
+ stroke-width: 2.4;
388
+ overflow: visible;
389
+ }
390
+
391
+ .mb-list-row-accessory[data-type="info"] {
392
+ color: var(--mb-accent-text);
393
+ }
394
+
395
+ .mb-list-row-accessory[data-type="info"] svg {
396
+ width: var(--mb-list-info-size);
397
+ height: var(--mb-list-info-size);
398
+ stroke-width: 1.5;
399
+ }
400
+
401
+ .mb-list-row-accessory[data-type="info"] svg circle:last-child {
402
+ fill: currentColor;
403
+ }
404
+
405
+ .mb-list-item[data-disabled] > .mb-list-row > * {
406
+ opacity: 0.45;
407
+ }
408
+
409
+ .mb-list-item[data-disabled] > .mb-list-row {
410
+ pointer-events: none;
411
+ }
@@ -0,0 +1,168 @@
1
+ /*
2
+ * Listbox — a list that stays on screen. On the Mac it's a bordered table:
3
+ * the selection is a solid accent fill that turns gray when the list loses
4
+ * focus. On iOS and iPadOS it's an inset grouped list with a trailing checkmark.
5
+ */
6
+
7
+ :where(:root, [data-platform="macos"]) {
8
+ --mb-listbox-padding: 5px;
9
+ --mb-listbox-radius: var(--mb-control-radius);
10
+ --mb-listbox-row-height: var(--mb-menu-item-height);
11
+ --mb-listbox-row-padding: 8px;
12
+ --mb-listbox-row-radius: var(--mb-radius-xs);
13
+ --mb-listbox-check-display: none;
14
+ }
15
+
16
+ :where([data-platform="ios"], [data-platform="ipados"]) {
17
+ --mb-listbox-padding: 0px;
18
+ --mb-listbox-radius: var(--mb-group-radius);
19
+ --mb-listbox-row-height: var(--mb-row-height);
20
+ --mb-listbox-row-padding: var(--mb-row-padding);
21
+ --mb-listbox-row-radius: 0px;
22
+ --mb-listbox-check-display: inline-flex;
23
+ }
24
+
25
+ .mb-listbox {
26
+ display: flex;
27
+ flex-direction: column;
28
+ min-width: 200px;
29
+ max-height: 100%;
30
+ margin: 0;
31
+ padding: var(--mb-listbox-padding);
32
+ overflow-y: auto;
33
+ overscroll-behavior: contain;
34
+ border-radius: var(--mb-listbox-radius);
35
+ background: var(--mb-bg-field);
36
+ box-shadow: 0 0 0 var(--mb-hairline) var(--mb-control-border);
37
+ color: var(--mb-label);
38
+ font: var(--mb-text-body);
39
+ letter-spacing: var(--mb-tracking-body);
40
+ outline: none;
41
+ user-select: none;
42
+ -webkit-user-select: none;
43
+ }
44
+
45
+ .mb-listbox[data-orientation="horizontal"] {
46
+ flex-direction: row;
47
+ overflow-x: auto;
48
+ }
49
+
50
+ .mb-listbox-item {
51
+ position: relative;
52
+ display: flex;
53
+ flex: none;
54
+ align-items: center;
55
+ gap: 8px;
56
+ min-height: var(--mb-listbox-row-height);
57
+ padding-inline: var(--mb-listbox-row-padding);
58
+ border-radius: var(--mb-listbox-row-radius);
59
+ white-space: nowrap;
60
+ outline: none;
61
+ cursor: default;
62
+ touch-action: manipulation;
63
+ }
64
+
65
+ .mb-listbox-item[data-selected] {
66
+ background: var(--mb-accent);
67
+ color: var(--mb-on-accent);
68
+ }
69
+
70
+ /* The Mac's unemphasized selection: gray while another control has focus. */
71
+ .mb-listbox:not(:focus-within) .mb-listbox-item[data-selected] {
72
+ background: var(--mb-fill);
73
+ color: var(--mb-label);
74
+ }
75
+
76
+ .mb-listbox-item[data-highlighted]:not([data-selected]) {
77
+ background: var(--mb-fill-quaternary);
78
+ }
79
+
80
+ .mb-listbox:focus-within .mb-listbox-item[data-highlighted]:focus-visible {
81
+ outline: 2px solid var(--mb-focus-ring);
82
+ outline-offset: -2px;
83
+ }
84
+
85
+ .mb-listbox-item[data-disabled] {
86
+ color: var(--mb-label-tertiary);
87
+ }
88
+
89
+ .mb-listbox-item-icon {
90
+ display: inline-flex;
91
+ flex: none;
92
+ width: var(--mb-menu-icon-size, 16px);
93
+ height: var(--mb-menu-icon-size, 16px);
94
+ }
95
+
96
+ .mb-listbox-item-icon :where(svg) {
97
+ width: 100%;
98
+ height: 100%;
99
+ }
100
+
101
+ .mb-listbox-item-indicator {
102
+ display: var(--mb-listbox-check-display);
103
+ flex: none;
104
+ width: 15px;
105
+ height: 15px;
106
+ margin-inline-start: auto;
107
+ color: var(--mb-accent-text);
108
+ }
109
+
110
+ .mb-listbox-item-indicator :where(svg) {
111
+ width: 100%;
112
+ height: 100%;
113
+ }
114
+
115
+ .mb-listbox-item-indicator:not([data-selected]) {
116
+ visibility: hidden;
117
+ }
118
+
119
+ .mb-listbox-group-label {
120
+ padding: 8px var(--mb-listbox-row-padding) 3px;
121
+ color: var(--mb-label-secondary);
122
+ font: var(--mb-text-subheadline);
123
+ font-weight: 600;
124
+ }
125
+
126
+ .mb-listbox-separator {
127
+ height: 1px;
128
+ margin: 4px var(--mb-listbox-row-padding);
129
+ background: var(--mb-separator);
130
+ }
131
+
132
+ /* iOS: selection is the checkmark, rows are divided by inset hairlines, and a tap darkens the row. */
133
+ @scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
134
+ .mb-listbox {
135
+ background: var(--mb-bg-grouped-secondary);
136
+ box-shadow: 0 0 0 var(--mb-hairline) var(--mb-separator);
137
+ }
138
+
139
+ .mb-listbox-item[data-selected],
140
+ .mb-listbox:not(:focus-within) .mb-listbox-item[data-selected] {
141
+ background: transparent;
142
+ color: var(--mb-label);
143
+ }
144
+
145
+ .mb-listbox-item + .mb-listbox-item::before {
146
+ content: "";
147
+ position: absolute;
148
+ inset: 0 0 auto var(--mb-listbox-row-padding);
149
+ height: var(--mb-hairline);
150
+ background: var(--mb-separator);
151
+ }
152
+
153
+ .mb-listbox-item[data-highlighted]:not([data-selected]) {
154
+ background: transparent;
155
+ }
156
+
157
+ .mb-listbox-item:active:not([data-disabled]) {
158
+ background: var(--mb-fill-tertiary);
159
+ }
160
+ }
161
+
162
+ /* Continuous corners on the box. Rows keep their small round radius. */
163
+ @supports (corner-shape: squircle) {
164
+ .mb-listbox {
165
+ corner-shape: var(--mb-corner-shape);
166
+ border-radius: calc(var(--mb-listbox-radius) * var(--mb-corner-factor));
167
+ }
168
+ }