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,345 @@
1
+ /*
2
+ * Sheet — the iOS bottom sheet with a grabber and detents, and edge
3
+ * inspectors on iPad and Mac. ui-sdk moves the sheet with its own spring and
4
+ * follows the finger 1:1; this file only shapes it.
5
+ */
6
+
7
+ :where(:root, [data-platform="macos"]) {
8
+ --mb-sheet-width: 560px;
9
+ --mb-sheet-inspector-width: 300px;
10
+ --mb-sheet-inspector-inset: 8px;
11
+ --mb-sheet-inspector-radius: var(--mb-popup-radius);
12
+ --mb-sheet-top-gap: 40px;
13
+ --mb-sheet-header-height: 44px;
14
+ }
15
+
16
+ :where([data-platform="ipados"]) {
17
+ --mb-sheet-width: 620px;
18
+ --mb-sheet-inspector-width: 340px;
19
+ --mb-sheet-inspector-inset: 10px;
20
+ --mb-sheet-inspector-radius: var(--mb-radius-3xl);
21
+ --mb-sheet-top-gap: 40px;
22
+ --mb-sheet-header-height: 56px;
23
+ }
24
+
25
+ :where([data-platform="ios"]) {
26
+ --mb-sheet-width: 440px;
27
+ --mb-sheet-inspector-width: min(340px, 85vw);
28
+ --mb-sheet-inspector-inset: 0px;
29
+ --mb-sheet-inspector-radius: var(--mb-sheet-radius);
30
+ --mb-sheet-top-gap: calc(max(env(safe-area-inset-top), 20px) + 10px);
31
+ --mb-sheet-header-height: 56px;
32
+ }
33
+
34
+ /* The backdrop is a popover in the top layer; undo the UA's fit-content box. */
35
+ .mb-sheet-backdrop {
36
+ position: fixed;
37
+ inset: 0;
38
+ width: auto;
39
+ height: auto;
40
+ margin: 0;
41
+ padding: 0;
42
+ border: 0;
43
+ background: var(--mb-scrim);
44
+ }
45
+
46
+ .mb-sheet-backdrop[data-hidden] {
47
+ display: none;
48
+ }
49
+
50
+ .mb-sheet {
51
+ position: relative;
52
+ display: flex;
53
+ flex-direction: column;
54
+ width: 100%;
55
+ max-height: calc(100dvh - var(--mb-sheet-top-gap));
56
+ margin: 0;
57
+ padding: 0;
58
+ border: 0;
59
+ background: var(--mb-material-thick);
60
+ -webkit-backdrop-filter: var(--mb-material-filter);
61
+ backdrop-filter: var(--mb-material-filter);
62
+ box-shadow: var(--mb-glass-rim), var(--mb-shadow-window);
63
+ color: var(--mb-label);
64
+ font: var(--mb-text-body);
65
+ letter-spacing: var(--mb-tracking-body);
66
+ outline: none;
67
+ /* A sheet opened on top of this one pushes it back. */
68
+ scale: calc(1 - var(--drawer-stack, 0) * 0.05);
69
+ transition: scale var(--mb-spring-sheet-duration) var(--mb-spring-sheet);
70
+ }
71
+
72
+ /* Covers the gap a drag past the edge would open. */
73
+ .mb-sheet::after {
74
+ content: "";
75
+ position: absolute;
76
+ background: inherit;
77
+ pointer-events: none;
78
+ }
79
+
80
+ .mb-sheet:is([data-side="bottom"], [data-side="top"]) {
81
+ max-width: var(--mb-sheet-width);
82
+ height: fit-content;
83
+ margin-inline: auto;
84
+ }
85
+
86
+ .mb-sheet:is([data-side="bottom"], [data-side="top"])::after {
87
+ inset-inline: 0;
88
+ height: 6rem;
89
+ }
90
+
91
+ .mb-sheet[data-side="bottom"] {
92
+ padding-block-end: env(safe-area-inset-bottom);
93
+ border-start-start-radius: var(--mb-sheet-radius);
94
+ border-start-end-radius: var(--mb-sheet-radius);
95
+ transform-origin: 50% 0;
96
+ }
97
+
98
+ .mb-sheet[data-side="bottom"]::after {
99
+ top: 100%;
100
+ }
101
+
102
+ .mb-sheet[data-side="top"] {
103
+ border-end-start-radius: var(--mb-sheet-radius);
104
+ border-end-end-radius: var(--mb-sheet-radius);
105
+ }
106
+
107
+ .mb-sheet[data-side="top"]::after {
108
+ bottom: 100%;
109
+ }
110
+
111
+ /* With a large detent the sheet is as tall as the screen allows; detents show part of it. */
112
+ .mb-sheet[data-side="bottom"][data-large] {
113
+ height: calc(100dvh - var(--mb-sheet-top-gap));
114
+ }
115
+
116
+ /* Inspectors: a floating panel along the leading or trailing edge. */
117
+ .mb-sheet:is([data-side="left"], [data-side="right"]) {
118
+ width: var(--mb-sheet-inspector-width);
119
+ max-width: calc(100vw - 32px);
120
+ height: calc(100% - var(--mb-sheet-inspector-inset) * 2);
121
+ max-height: none;
122
+ margin-block: var(--mb-sheet-inspector-inset);
123
+ border-radius: var(--mb-sheet-inspector-radius);
124
+ background: var(--mb-material-regular);
125
+ }
126
+
127
+ .mb-sheet[data-side="left"] {
128
+ margin-left: var(--mb-sheet-inspector-inset);
129
+ }
130
+
131
+ .mb-sheet[data-side="right"] {
132
+ margin-right: var(--mb-sheet-inspector-inset);
133
+ }
134
+
135
+ .mb-sheet:is([data-side="left"], [data-side="right"])::after {
136
+ inset-block: 0;
137
+ width: 6rem;
138
+ }
139
+
140
+ .mb-sheet[data-side="left"]::after {
141
+ right: 100%;
142
+ }
143
+
144
+ .mb-sheet[data-side="right"]::after {
145
+ left: 100%;
146
+ }
147
+
148
+ @scope ([data-platform="ios"]) to (:scope [data-platform]) {
149
+ .mb-sheet:is([data-side="left"], [data-side="right"]) {
150
+ height: 100%;
151
+ margin-block: 0;
152
+ }
153
+
154
+ /* data-side is physical, so these corners are too (logical ones flip in right to left). */
155
+ .mb-sheet[data-side="left"] {
156
+ border-top-left-radius: 0;
157
+ border-bottom-left-radius: 0;
158
+ }
159
+
160
+ .mb-sheet[data-side="right"] {
161
+ border-top-right-radius: 0;
162
+ border-bottom-right-radius: 0;
163
+ }
164
+ }
165
+
166
+ /* Grabber: 36 × 5 at the top. As a button it steps between detents. */
167
+ .mb-sheet-grabber {
168
+ position: absolute;
169
+ inset-block-start: 5px;
170
+ inset-inline-start: 50%;
171
+ z-index: 1;
172
+ width: 36px;
173
+ height: 5px;
174
+ margin: 0;
175
+ padding: 0;
176
+ border: 0;
177
+ border-radius: var(--mb-radius-full);
178
+ background: var(--mb-label-quaternary);
179
+ translate: -50% 0;
180
+ cursor: grab;
181
+ touch-action: none;
182
+ }
183
+
184
+ :where([dir="rtl"]) .mb-sheet-grabber {
185
+ translate: 50% 0;
186
+ }
187
+
188
+ /* As a control it needs a 3:1 edge; the decorative bar keeps the system's lighter fill. */
189
+ button.mb-sheet-grabber {
190
+ background: color-mix(in oklch, var(--mb-ink) 45%, transparent);
191
+ }
192
+
193
+ button.mb-sheet-grabber::after {
194
+ content: "";
195
+ position: absolute;
196
+ inset: -12px -20px;
197
+ }
198
+
199
+ .mb-sheet-grabber:focus-visible {
200
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
201
+ outline-offset: 3px;
202
+ }
203
+
204
+ .mb-sheet[data-dragging] .mb-sheet-grabber {
205
+ cursor: grabbing;
206
+ }
207
+
208
+ .mb-sheet-header {
209
+ display: grid;
210
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
211
+ align-items: center;
212
+ flex: none;
213
+ min-height: var(--mb-sheet-header-height);
214
+ padding: 8px 16px 0;
215
+ }
216
+
217
+ .mb-sheet-header > .mb-sheet-title {
218
+ grid-column: 2;
219
+ }
220
+
221
+ .mb-sheet-header > .mb-sheet-close:first-child {
222
+ grid-column: 1;
223
+ justify-self: start;
224
+ }
225
+
226
+ .mb-sheet-header > .mb-sheet-close:last-child {
227
+ grid-column: 3;
228
+ justify-self: end;
229
+ }
230
+
231
+ .mb-sheet-title {
232
+ margin: 0;
233
+ overflow: hidden;
234
+ text-overflow: ellipsis;
235
+ white-space: nowrap;
236
+ font: var(--mb-text-headline);
237
+ letter-spacing: var(--mb-tracking-body);
238
+ text-align: center;
239
+ }
240
+
241
+ .mb-sheet-description {
242
+ margin: 0;
243
+ padding: 4px 16px 0;
244
+ color: var(--mb-label-secondary);
245
+ font: var(--mb-text-footnote);
246
+ letter-spacing: var(--mb-tracking-caption);
247
+ text-align: center;
248
+ }
249
+
250
+ .mb-sheet-body {
251
+ flex: 1 1 auto;
252
+ min-height: 0;
253
+ padding: 12px 16px 16px;
254
+ overflow-y: auto;
255
+ overscroll-behavior: contain;
256
+ }
257
+
258
+ .mb-sheet-close {
259
+ position: relative;
260
+ display: inline-flex;
261
+ align-items: center;
262
+ justify-content: center;
263
+ height: var(--mb-control-height);
264
+ margin: 0 -8px;
265
+ padding: 0 8px;
266
+ border: 0;
267
+ border-radius: var(--mb-control-radius);
268
+ background: transparent;
269
+ color: var(--mb-accent-text);
270
+ font: var(--mb-control-font);
271
+ font-weight: 400;
272
+ letter-spacing: var(--mb-tracking-body);
273
+ white-space: nowrap;
274
+ cursor: default;
275
+ user-select: none;
276
+ -webkit-user-select: none;
277
+ touch-action: manipulation;
278
+ transition:
279
+ background-color var(--mb-duration-fast) var(--mb-ease-out),
280
+ opacity var(--mb-duration-fast) var(--mb-ease-out);
281
+ }
282
+
283
+ .mb-sheet-close::after {
284
+ content: "";
285
+ position: absolute;
286
+ inset: 50% auto auto 50%;
287
+ width: max(100%, var(--mb-hit-target));
288
+ height: max(100%, var(--mb-hit-target));
289
+ translate: -50% -50%;
290
+ }
291
+
292
+ .mb-sheet-close[data-variant="primary"] {
293
+ font-weight: 600;
294
+ }
295
+
296
+ @media (hover: hover) and (pointer: fine) {
297
+ .mb-sheet-close:hover {
298
+ background: var(--mb-fill-tertiary);
299
+ }
300
+ }
301
+
302
+ .mb-sheet-close:active {
303
+ opacity: 0.45;
304
+ transition-duration: 0ms;
305
+ }
306
+
307
+ .mb-sheet-outlet {
308
+ transform-origin: 50% 0;
309
+ }
310
+
311
+ /* An inset grouped list fills the body edge to edge, as in a Settings sheet. */
312
+ .mb-sheet-body:has(> .mb-list) {
313
+ padding-inline: 0;
314
+ }
315
+
316
+ /* The list paints no backdrop of its own, so header and body read as one surface. */
317
+ .mb-sheet-body > .mb-list {
318
+ --mb-list-bg: transparent;
319
+ }
320
+
321
+ /* A bottom sheet holding a grouped list takes the grouped background throughout, as iOS does. */
322
+ .mb-sheet:is([data-side="bottom"], [data-side="top"]):has(> .mb-sheet-body > .mb-list:not([data-variant="plain"])) {
323
+ background: var(--mb-list-bg);
324
+ }
325
+
326
+ /* Continuous corners on whichever corners the side leaves rounded. */
327
+ @supports (corner-shape: squircle) {
328
+ .mb-sheet {
329
+ corner-shape: var(--mb-corner-shape);
330
+ }
331
+
332
+ .mb-sheet[data-side="bottom"] {
333
+ border-start-start-radius: calc(var(--mb-sheet-radius) * var(--mb-corner-factor));
334
+ border-start-end-radius: calc(var(--mb-sheet-radius) * var(--mb-corner-factor));
335
+ }
336
+
337
+ .mb-sheet[data-side="top"] {
338
+ border-end-start-radius: calc(var(--mb-sheet-radius) * var(--mb-corner-factor));
339
+ border-end-end-radius: calc(var(--mb-sheet-radius) * var(--mb-corner-factor));
340
+ }
341
+
342
+ .mb-sheet:is([data-side="left"], [data-side="right"]) {
343
+ border-radius: calc(var(--mb-sheet-inspector-radius) * var(--mb-corner-factor));
344
+ }
345
+ }
@@ -0,0 +1,60 @@
1
+ /* Shimmer — secondary text with a brighter band sweeping along it while work is in progress. */
2
+
3
+ .mb-shimmer {
4
+ --mb-shimmer-duration: 2s;
5
+ /* The band only moves toward the label color, so every frame holds the secondary label's 4.5:1. */
6
+ --mb-shimmer-base: var(--mb-label-secondary);
7
+ --mb-shimmer-highlight: var(--mb-label);
8
+
9
+ color: var(--mb-shimmer-base);
10
+ }
11
+
12
+ .mb-shimmer[data-active] {
13
+ background-image: linear-gradient(
14
+ 90deg,
15
+ var(--mb-shimmer-base) 0% 38%,
16
+ var(--mb-shimmer-highlight) 50%,
17
+ var(--mb-shimmer-base) 62% 100%
18
+ );
19
+ background-size: 300% 100%;
20
+ background-repeat: no-repeat;
21
+ -webkit-background-clip: text;
22
+ background-clip: text;
23
+ -webkit-text-fill-color: transparent;
24
+ color: transparent;
25
+ animation: mb-shimmer var(--mb-shimmer-duration) linear infinite;
26
+ }
27
+
28
+ :where([dir="rtl"]) .mb-shimmer[data-active] {
29
+ animation-direction: reverse;
30
+ }
31
+
32
+ @keyframes mb-shimmer {
33
+ from {
34
+ background-position: 100% 0;
35
+ }
36
+ to {
37
+ background-position: 0% 0;
38
+ }
39
+ }
40
+
41
+ /* Reduce Motion: the band stops and the text is plain secondary text, not a frozen gradient. */
42
+ @media (prefers-reduced-motion: reduce) {
43
+ :where(:root:not([data-motion="full"])) {
44
+ .mb-shimmer[data-active] {
45
+ animation: none;
46
+ background-image: none;
47
+ -webkit-text-fill-color: currentColor;
48
+ color: var(--mb-shimmer-base);
49
+ }
50
+ }
51
+ }
52
+
53
+ @media (forced-colors: active) {
54
+ .mb-shimmer[data-active] {
55
+ animation: none;
56
+ background-image: none;
57
+ -webkit-text-fill-color: currentColor;
58
+ color: CanvasText;
59
+ }
60
+ }
@@ -0,0 +1,261 @@
1
+ /* Sidebar — the macOS and iPadOS source list: section headers, rows with tinted icons, a filled selection. */
2
+
3
+ :where(:root, [data-platform="macos"]) {
4
+ --mb-sidebar-row-height: 28px;
5
+ --mb-sidebar-row-gap: 1px;
6
+ --mb-sidebar-row-padding: 8px;
7
+ --mb-sidebar-row-radius: var(--mb-radius-md);
8
+ --mb-sidebar-icon-size: 16px;
9
+ --mb-sidebar-inset: 10px;
10
+ --mb-sidebar-font: 400 13px/16px var(--mb-font);
11
+ --mb-sidebar-header-font: 600 11px/14px var(--mb-font);
12
+ /* Secondary, not tertiary: 11px headers need 4.5:1 over the sidebar material in light mode. */
13
+ --mb-sidebar-header-color: var(--mb-label-secondary);
14
+ --mb-sidebar-header-height: 26px;
15
+ }
16
+
17
+ :where([data-platform="ios"], [data-platform="ipados"]) {
18
+ --mb-sidebar-row-height: 44px;
19
+ --mb-sidebar-row-gap: 2px;
20
+ --mb-sidebar-row-padding: 12px;
21
+ --mb-sidebar-row-radius: var(--mb-radius-lg);
22
+ --mb-sidebar-icon-size: 22px;
23
+ --mb-sidebar-inset: 16px;
24
+ --mb-sidebar-font: 400 17px/22px var(--mb-font);
25
+ --mb-sidebar-header-font: 700 20px/25px var(--mb-font-display);
26
+ --mb-sidebar-header-color: var(--mb-label);
27
+ --mb-sidebar-header-height: 44px;
28
+ }
29
+
30
+ .mb-sidebar {
31
+ --mb-sidebar-selected-bg: var(--mb-accent);
32
+ --mb-sidebar-selected-fg: var(--mb-on-accent);
33
+ --mb-sidebar-selected-icon: var(--mb-on-accent);
34
+
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: var(--mb-space-3);
38
+ min-height: 0;
39
+ overflow-y: auto;
40
+ overscroll-behavior: contain;
41
+ padding: var(--mb-sidebar-padding-top, var(--mb-space-4)) var(--mb-sidebar-inset) var(--mb-space-6);
42
+ background: var(--mb-sidebar-bg, var(--mb-material-sidebar));
43
+ -webkit-backdrop-filter: var(--mb-sidebar-filter, var(--mb-material-filter));
44
+ backdrop-filter: var(--mb-sidebar-filter, var(--mb-material-filter));
45
+ color: var(--mb-label);
46
+ font: var(--mb-sidebar-font);
47
+ letter-spacing: var(--mb-tracking-body);
48
+ user-select: none;
49
+ -webkit-user-select: none;
50
+ scrollbar-width: thin;
51
+ }
52
+
53
+ .mb-sidebar[data-selection="gray"] {
54
+ --mb-sidebar-selected-bg: var(--mb-fill);
55
+ --mb-sidebar-selected-fg: var(--mb-label);
56
+ --mb-sidebar-selected-icon: var(--mb-sidebar-icon-color, var(--mb-accent-text));
57
+ }
58
+
59
+ /* Behind the key window, the selection goes gray, as it does on the Mac. */
60
+ :where(.mb-window[data-inactive]) .mb-sidebar[data-selection] {
61
+ --mb-sidebar-selected-bg: var(--mb-fill-secondary);
62
+ --mb-sidebar-selected-fg: var(--mb-label);
63
+ --mb-sidebar-selected-icon: var(--mb-label-secondary);
64
+ }
65
+
66
+ /* Sections */
67
+ .mb-sidebar-section {
68
+ display: flex;
69
+ flex-direction: column;
70
+ }
71
+
72
+ .mb-sidebar-section-header {
73
+ display: flex;
74
+ align-items: center;
75
+ gap: var(--mb-space-2);
76
+ width: 100%;
77
+ min-height: var(--mb-sidebar-header-height);
78
+ margin: 0;
79
+ padding: var(--mb-space-3) var(--mb-sidebar-row-padding) var(--mb-space-1);
80
+ border: 0;
81
+ border-radius: var(--mb-sidebar-row-radius);
82
+ background: transparent;
83
+ color: var(--mb-sidebar-header-color);
84
+ font: var(--mb-sidebar-header-font);
85
+ letter-spacing: var(--mb-tracking-caption);
86
+ text-align: start;
87
+ cursor: default;
88
+ }
89
+
90
+ .mb-sidebar-section:first-child > .mb-sidebar-section-header {
91
+ padding-top: var(--mb-space-1);
92
+ }
93
+
94
+ .mb-sidebar-section-title {
95
+ flex: 1 1 auto;
96
+ min-width: 0;
97
+ overflow: hidden;
98
+ text-overflow: ellipsis;
99
+ white-space: nowrap;
100
+ }
101
+
102
+ .mb-sidebar-section-chevron {
103
+ flex: none;
104
+ width: 12px;
105
+ height: 12px;
106
+ fill: none;
107
+ stroke: currentColor;
108
+ stroke-width: 2;
109
+ stroke-linecap: round;
110
+ stroke-linejoin: round;
111
+ opacity: 0;
112
+ rotate: 0deg;
113
+ transition:
114
+ rotate var(--mb-spring-snappy-duration) var(--mb-spring-snappy),
115
+ opacity var(--mb-duration-fast) var(--mb-ease-out);
116
+ }
117
+
118
+ .mb-sidebar-section-header[data-open] .mb-sidebar-section-chevron {
119
+ rotate: 90deg;
120
+ }
121
+
122
+ :where([dir="rtl"]) .mb-sidebar-section-header:not([data-open]) .mb-sidebar-section-chevron {
123
+ rotate: 180deg;
124
+ }
125
+
126
+ /* macOS shows the chevron only under the pointer; touch keeps it visible, in the accent color. */
127
+ .mb-sidebar-section-header:is(:focus-visible, [data-closed]) .mb-sidebar-section-chevron,
128
+ .mb-sidebar-section:hover .mb-sidebar-section-chevron {
129
+ opacity: 1;
130
+ }
131
+
132
+ @scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
133
+ .mb-sidebar-section-chevron {
134
+ width: 16px;
135
+ height: 16px;
136
+ opacity: 1;
137
+ color: var(--mb-accent-text);
138
+ }
139
+ }
140
+
141
+ .mb-sidebar-section-header:focus-visible {
142
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
143
+ outline-offset: -2px;
144
+ }
145
+
146
+ .mb-sidebar-section-panel {
147
+ height: var(--collapsible-panel-height);
148
+ overflow: hidden;
149
+ transition: height var(--mb-spring-smooth-duration) var(--mb-spring-smooth);
150
+ }
151
+
152
+ .mb-sidebar-section-panel[data-starting-style],
153
+ .mb-sidebar-section-panel[data-ending-style] {
154
+ height: 0;
155
+ }
156
+
157
+ .mb-sidebar-section-panel[data-ending-style] {
158
+ transition-duration: var(--mb-duration-base);
159
+ transition-timing-function: var(--mb-ease-out);
160
+ }
161
+
162
+ .mb-sidebar-list {
163
+ display: flex;
164
+ flex-direction: column;
165
+ gap: var(--mb-sidebar-row-gap);
166
+ margin: 0;
167
+ padding: 0;
168
+ list-style: none;
169
+ }
170
+
171
+ .mb-sidebar-list-item {
172
+ display: block;
173
+ }
174
+
175
+ /* Rows */
176
+ .mb-sidebar-item {
177
+ position: relative;
178
+ display: flex;
179
+ align-items: center;
180
+ gap: var(--mb-space-3);
181
+ width: 100%;
182
+ min-height: var(--mb-sidebar-row-height);
183
+ margin: 0;
184
+ padding: 0 var(--mb-sidebar-row-padding);
185
+ border: 0;
186
+ border-radius: var(--mb-sidebar-row-radius);
187
+ background: transparent;
188
+ color: var(--mb-label);
189
+ font: inherit;
190
+ letter-spacing: inherit;
191
+ text-align: start;
192
+ text-decoration: none;
193
+ cursor: default;
194
+ -webkit-tap-highlight-color: transparent;
195
+ }
196
+
197
+ .mb-sidebar-item-icon {
198
+ display: inline-grid;
199
+ place-items: center;
200
+ flex: none;
201
+ width: calc(var(--mb-sidebar-icon-size) + 4px);
202
+ height: var(--mb-sidebar-icon-size);
203
+ color: var(--mb-sidebar-icon-color, var(--mb-accent-text));
204
+ }
205
+
206
+ .mb-sidebar-item-icon :where(svg) {
207
+ width: var(--mb-sidebar-icon-size);
208
+ height: var(--mb-sidebar-icon-size);
209
+ stroke-width: 1.8;
210
+ }
211
+
212
+ .mb-sidebar-item-label {
213
+ flex: 1 1 auto;
214
+ min-width: 0;
215
+ overflow: hidden;
216
+ text-overflow: ellipsis;
217
+ white-space: nowrap;
218
+ }
219
+
220
+ .mb-sidebar-item-badge {
221
+ flex: none;
222
+ color: var(--mb-label-secondary);
223
+ font: var(--mb-text-callout);
224
+ font-variant-numeric: tabular-nums;
225
+ }
226
+
227
+ .mb-sidebar-item:active {
228
+ background: var(--mb-fill-tertiary);
229
+ }
230
+
231
+ .mb-sidebar-item[data-current] {
232
+ background: var(--mb-sidebar-selected-bg);
233
+ color: var(--mb-sidebar-selected-fg);
234
+ }
235
+
236
+ .mb-sidebar-item[data-current] .mb-sidebar-item-icon {
237
+ color: var(--mb-sidebar-selected-icon);
238
+ }
239
+
240
+ .mb-sidebar-item[data-current] .mb-sidebar-item-badge {
241
+ color: color-mix(in oklch, var(--mb-sidebar-selected-fg) 72%, transparent);
242
+ }
243
+
244
+ .mb-sidebar-item:focus-visible {
245
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
246
+ outline-offset: -1px;
247
+ }
248
+
249
+ .mb-sidebar-item[data-current]:focus-visible {
250
+ outline-offset: 1px;
251
+ }
252
+
253
+ @scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
254
+ .mb-sidebar-item:active:not([data-current]) {
255
+ background: var(--mb-fill-secondary);
256
+ }
257
+
258
+ .mb-sidebar-item-badge {
259
+ font: var(--mb-text-body);
260
+ }
261
+ }