macbetter 0.0.0-stage → 0.1.0-beta.1

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 (251) 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/artwork.d.ts +44 -0
  10. package/dist/components/artwork.js +935 -0
  11. package/dist/components/automation-row.d.ts +24 -0
  12. package/dist/components/automation-row.js +12 -0
  13. package/dist/components/avatar.d.ts +33 -0
  14. package/dist/components/avatar.js +45 -0
  15. package/dist/components/badge.d.ts +24 -0
  16. package/dist/components/badge.js +19 -0
  17. package/dist/components/button.d.ts +20 -0
  18. package/dist/components/button.js +10 -0
  19. package/dist/components/calendar.d.ts +30 -0
  20. package/dist/components/calendar.js +47 -0
  21. package/dist/components/camera-view.d.ts +40 -0
  22. package/dist/components/camera-view.js +44 -0
  23. package/dist/components/card.d.ts +14 -0
  24. package/dist/components/card.js +21 -0
  25. package/dist/components/carousel.d.ts +18 -0
  26. package/dist/components/carousel.js +33 -0
  27. package/dist/components/checkbox.d.ts +13 -0
  28. package/dist/components/checkbox.js +16 -0
  29. package/dist/components/code-field.d.ts +16 -0
  30. package/dist/components/code-field.js +29 -0
  31. package/dist/components/color-well.d.ts +23 -0
  32. package/dist/components/color-well.js +27 -0
  33. package/dist/components/combo-box.d.ts +42 -0
  34. package/dist/components/combo-box.js +102 -0
  35. package/dist/components/command-palette.d.ts +33 -0
  36. package/dist/components/command-palette.js +55 -0
  37. package/dist/components/context-menu.d.ts +9 -0
  38. package/dist/components/context-menu.js +15 -0
  39. package/dist/components/date-picker.d.ts +53 -0
  40. package/dist/components/date-picker.js +86 -0
  41. package/dist/components/device-frame.d.ts +18 -0
  42. package/dist/components/device-frame.js +16 -0
  43. package/dist/components/dialog.d.ts +27 -0
  44. package/dist/components/dialog.js +35 -0
  45. package/dist/components/disclosure.d.ts +32 -0
  46. package/dist/components/disclosure.js +35 -0
  47. package/dist/components/dock.d.ts +28 -0
  48. package/dist/components/dock.js +80 -0
  49. package/dist/components/door-control.d.ts +20 -0
  50. package/dist/components/door-control.js +43 -0
  51. package/dist/components/energy-readout.d.ts +32 -0
  52. package/dist/components/energy-readout.js +27 -0
  53. package/dist/components/field.d.ts +28 -0
  54. package/dist/components/field.js +32 -0
  55. package/dist/components/gauge.d.ts +25 -0
  56. package/dist/components/gauge.js +42 -0
  57. package/dist/components/glass.d.ts +34 -0
  58. package/dist/components/glass.js +31 -0
  59. package/dist/components/home-backdrop.d.ts +23 -0
  60. package/dist/components/home-backdrop.js +12 -0
  61. package/dist/components/home-section.d.ts +19 -0
  62. package/dist/components/home-section.js +21 -0
  63. package/dist/components/home-status.d.ts +24 -0
  64. package/dist/components/home-status.js +14 -0
  65. package/dist/components/hover-card.d.ts +14 -0
  66. package/dist/components/hover-card.js +16 -0
  67. package/dist/components/level-control.d.ts +19 -0
  68. package/dist/components/level-control.js +13 -0
  69. package/dist/components/light-color-picker.d.ts +33 -0
  70. package/dist/components/light-color-picker.js +56 -0
  71. package/dist/components/list.d.ts +42 -0
  72. package/dist/components/list.js +42 -0
  73. package/dist/components/listbox.d.ts +16 -0
  74. package/dist/components/listbox.js +28 -0
  75. package/dist/components/lock-control.d.ts +20 -0
  76. package/dist/components/lock-control.js +35 -0
  77. package/dist/components/menu-bar.d.ts +14 -0
  78. package/dist/components/menu-bar.js +16 -0
  79. package/dist/components/menu.d.ts +40 -0
  80. package/dist/components/menu.js +54 -0
  81. package/dist/components/navigation-bar.d.ts +24 -0
  82. package/dist/components/navigation-bar.js +54 -0
  83. package/dist/components/outline.d.ts +21 -0
  84. package/dist/components/outline.js +40 -0
  85. package/dist/components/page-control.d.ts +10 -0
  86. package/dist/components/page-control.js +8 -0
  87. package/dist/components/popover.d.ts +16 -0
  88. package/dist/components/popover.js +24 -0
  89. package/dist/components/progress.d.ts +27 -0
  90. package/dist/components/progress.js +27 -0
  91. package/dist/components/radio.d.ts +16 -0
  92. package/dist/components/radio.js +13 -0
  93. package/dist/components/rating.d.ts +10 -0
  94. package/dist/components/rating.js +12 -0
  95. package/dist/components/scene-tile.d.ts +22 -0
  96. package/dist/components/scene-tile.js +13 -0
  97. package/dist/components/scroll-view.d.ts +21 -0
  98. package/dist/components/scroll-view.js +13 -0
  99. package/dist/components/search-field.d.ts +16 -0
  100. package/dist/components/search-field.js +12 -0
  101. package/dist/components/secure-field.d.ts +23 -0
  102. package/dist/components/secure-field.js +21 -0
  103. package/dist/components/segmented-control.d.ts +12 -0
  104. package/dist/components/segmented-control.js +10 -0
  105. package/dist/components/select.d.ts +45 -0
  106. package/dist/components/select.js +79 -0
  107. package/dist/components/sensor-readout.d.ts +29 -0
  108. package/dist/components/sensor-readout.js +12 -0
  109. package/dist/components/separator.d.ts +14 -0
  110. package/dist/components/separator.js +11 -0
  111. package/dist/components/setup-code.d.ts +29 -0
  112. package/dist/components/setup-code.js +47 -0
  113. package/dist/components/sheet.d.ts +31 -0
  114. package/dist/components/sheet.js +51 -0
  115. package/dist/components/sidebar.d.ts +30 -0
  116. package/dist/components/sidebar.js +26 -0
  117. package/dist/components/slider.d.ts +27 -0
  118. package/dist/components/slider.js +43 -0
  119. package/dist/components/split-view.d.ts +11 -0
  120. package/dist/components/split-view.js +13 -0
  121. package/dist/components/squircle.d.ts +41 -0
  122. package/dist/components/squircle.js +63 -0
  123. package/dist/components/stepper.d.ts +30 -0
  124. package/dist/components/stepper.js +28 -0
  125. package/dist/components/switch.d.ts +10 -0
  126. package/dist/components/switch.js +10 -0
  127. package/dist/components/tab-bar.d.ts +20 -0
  128. package/dist/components/tab-bar.js +17 -0
  129. package/dist/components/table.d.ts +49 -0
  130. package/dist/components/table.js +179 -0
  131. package/dist/components/tabs.d.ts +16 -0
  132. package/dist/components/tabs.js +19 -0
  133. package/dist/components/text-area.d.ts +14 -0
  134. package/dist/components/text-area.js +9 -0
  135. package/dist/components/text-field.d.ts +26 -0
  136. package/dist/components/text-field.js +23 -0
  137. package/dist/components/thermostat-control.d.ts +30 -0
  138. package/dist/components/thermostat-control.js +139 -0
  139. package/dist/components/toast.d.ts +30 -0
  140. package/dist/components/toast.js +114 -0
  141. package/dist/components/toggle.d.ts +21 -0
  142. package/dist/components/toggle.js +19 -0
  143. package/dist/components/token-field.d.ts +31 -0
  144. package/dist/components/token-field.js +78 -0
  145. package/dist/components/toolbar.d.ts +27 -0
  146. package/dist/components/toolbar.js +39 -0
  147. package/dist/components/tooltip.d.ts +11 -0
  148. package/dist/components/tooltip.js +18 -0
  149. package/dist/components/window.d.ts +56 -0
  150. package/dist/components/window.js +61 -0
  151. package/dist/index.d.ts +78 -0
  152. package/dist/index.js +79 -0
  153. package/dist/lib/cx.d.ts +9 -0
  154. package/dist/lib/cx.js +14 -0
  155. package/dist/lib/derive.d.ts +53 -0
  156. package/dist/lib/derive.js +255 -0
  157. package/dist/lib/field-glyphs.d.ts +13 -0
  158. package/dist/lib/field-glyphs.js +28 -0
  159. package/dist/lib/menu-glyphs.d.ts +6 -0
  160. package/dist/lib/menu-glyphs.js +15 -0
  161. package/dist/lib/platform.d.ts +18 -0
  162. package/dist/lib/platform.js +17 -0
  163. package/dist/lib/squircle.d.ts +23 -0
  164. package/dist/lib/squircle.js +69 -0
  165. package/dist/lib/theme.d.ts +42 -0
  166. package/dist/lib/theme.js +62 -0
  167. package/dist/styles/base.css +115 -0
  168. package/dist/styles/components/accessory-tile.css +461 -0
  169. package/dist/styles/components/activity-indicator.css +63 -0
  170. package/dist/styles/components/alert.css +433 -0
  171. package/dist/styles/components/artwork.css +380 -0
  172. package/dist/styles/components/automation-row.css +52 -0
  173. package/dist/styles/components/avatar.css +230 -0
  174. package/dist/styles/components/badge.css +204 -0
  175. package/dist/styles/components/button.css +298 -0
  176. package/dist/styles/components/calendar.css +287 -0
  177. package/dist/styles/components/camera-view.css +239 -0
  178. package/dist/styles/components/card.css +100 -0
  179. package/dist/styles/components/carousel.css +210 -0
  180. package/dist/styles/components/checkbox.css +212 -0
  181. package/dist/styles/components/code-field.css +163 -0
  182. package/dist/styles/components/color-well.css +452 -0
  183. package/dist/styles/components/combo-box.css +222 -0
  184. package/dist/styles/components/command-palette.css +379 -0
  185. package/dist/styles/components/context-menu.css +43 -0
  186. package/dist/styles/components/date-picker.css +356 -0
  187. package/dist/styles/components/device-frame.css +194 -0
  188. package/dist/styles/components/dialog.css +366 -0
  189. package/dist/styles/components/disclosure.css +197 -0
  190. package/dist/styles/components/dock.css +404 -0
  191. package/dist/styles/components/door-control.css +187 -0
  192. package/dist/styles/components/energy-readout.css +161 -0
  193. package/dist/styles/components/field.css +175 -0
  194. package/dist/styles/components/gauge.css +239 -0
  195. package/dist/styles/components/glass.css +113 -0
  196. package/dist/styles/components/home-backdrop.css +81 -0
  197. package/dist/styles/components/home-section.css +100 -0
  198. package/dist/styles/components/home-status.css +215 -0
  199. package/dist/styles/components/hover-card.css +145 -0
  200. package/dist/styles/components/index.css +75 -0
  201. package/dist/styles/components/level-control.css +247 -0
  202. package/dist/styles/components/light-color-picker.css +94 -0
  203. package/dist/styles/components/list.css +411 -0
  204. package/dist/styles/components/listbox.css +168 -0
  205. package/dist/styles/components/lock-control.css +164 -0
  206. package/dist/styles/components/menu-bar.css +94 -0
  207. package/dist/styles/components/menu.css +454 -0
  208. package/dist/styles/components/navigation-bar.css +248 -0
  209. package/dist/styles/components/outline.css +248 -0
  210. package/dist/styles/components/page-control.css +127 -0
  211. package/dist/styles/components/popover.css +186 -0
  212. package/dist/styles/components/progress.css +228 -0
  213. package/dist/styles/components/radio.css +281 -0
  214. package/dist/styles/components/rating.css +122 -0
  215. package/dist/styles/components/scene-tile.css +295 -0
  216. package/dist/styles/components/scroll-view.css +195 -0
  217. package/dist/styles/components/search-field.css +128 -0
  218. package/dist/styles/components/secure-field.css +189 -0
  219. package/dist/styles/components/segmented-control.css +183 -0
  220. package/dist/styles/components/select.css +290 -0
  221. package/dist/styles/components/sensor-readout.css +231 -0
  222. package/dist/styles/components/separator.css +62 -0
  223. package/dist/styles/components/setup-code.css +138 -0
  224. package/dist/styles/components/sheet.css +345 -0
  225. package/dist/styles/components/sidebar.css +261 -0
  226. package/dist/styles/components/slider.css +208 -0
  227. package/dist/styles/components/split-view.css +75 -0
  228. package/dist/styles/components/squircle.css +44 -0
  229. package/dist/styles/components/stepper.css +278 -0
  230. package/dist/styles/components/switch.css +115 -0
  231. package/dist/styles/components/tab-bar.css +223 -0
  232. package/dist/styles/components/table.css +313 -0
  233. package/dist/styles/components/tabs.css +262 -0
  234. package/dist/styles/components/text-area.css +94 -0
  235. package/dist/styles/components/text-field.css +294 -0
  236. package/dist/styles/components/thermostat-control.css +214 -0
  237. package/dist/styles/components/toast.css +418 -0
  238. package/dist/styles/components/toggle.css +312 -0
  239. package/dist/styles/components/token-field.css +193 -0
  240. package/dist/styles/components/toolbar.css +370 -0
  241. package/dist/styles/components/tooltip.css +69 -0
  242. package/dist/styles/components/window.css +428 -0
  243. package/dist/styles/index.css +17 -0
  244. package/dist/styles/materials.css +263 -0
  245. package/dist/styles/platforms.css +214 -0
  246. package/dist/styles/themes/ember.css +24 -0
  247. package/dist/styles/themes/graphite.css +16 -0
  248. package/dist/styles/themes/nebula.css +16 -0
  249. package/dist/styles/themes/system.css +28 -0
  250. package/dist/styles/tokens.css +299 -0
  251. package/package.json +82 -3
@@ -0,0 +1,370 @@
1
+ /* Toolbar — the macOS unified toolbar and the iOS floating toolbar of glass capsules. */
2
+
3
+ :where(:root, [data-platform="macos"]) {
4
+ --mb-toolbar-item-height: 28px;
5
+ --mb-toolbar-item-min-width: 32px;
6
+ --mb-toolbar-item-radius: var(--mb-radius-md);
7
+ --mb-toolbar-icon-size: 16px;
8
+ --mb-toolbar-gap: 6px;
9
+ --mb-toolbar-floating-height: 40px;
10
+ }
11
+
12
+ :where([data-platform="ios"], [data-platform="ipados"]) {
13
+ --mb-toolbar-item-height: 44px;
14
+ --mb-toolbar-item-min-width: 44px;
15
+ --mb-toolbar-item-radius: var(--mb-radius-full);
16
+ --mb-toolbar-icon-size: 22px;
17
+ --mb-toolbar-gap: 8px;
18
+ --mb-toolbar-floating-height: 48px;
19
+ }
20
+
21
+ .mb-toolbar {
22
+ display: flex;
23
+ flex: 1 1 auto;
24
+ align-items: center;
25
+ gap: var(--mb-toolbar-gap);
26
+ min-width: 0;
27
+ color: var(--mb-label-secondary);
28
+ font: var(--mb-control-font);
29
+ letter-spacing: var(--mb-tracking-body);
30
+ user-select: none;
31
+ -webkit-user-select: none;
32
+ }
33
+
34
+ .mb-toolbar[data-orientation="vertical"] {
35
+ flex-direction: column;
36
+ flex: none;
37
+ }
38
+
39
+ /* Buttons */
40
+ .mb-toolbar-button {
41
+ position: relative;
42
+ display: inline-flex;
43
+ flex: none;
44
+ align-items: center;
45
+ justify-content: center;
46
+ gap: var(--mb-space-3);
47
+ min-width: var(--mb-toolbar-item-min-width);
48
+ height: var(--mb-toolbar-item-height);
49
+ margin: 0;
50
+ padding: 0 var(--mb-space-4);
51
+ border: 0;
52
+ border-radius: var(--mb-toolbar-item-radius);
53
+ background: transparent;
54
+ color: inherit;
55
+ font: inherit;
56
+ letter-spacing: inherit;
57
+ white-space: nowrap;
58
+ text-decoration: none;
59
+ cursor: default;
60
+ touch-action: manipulation;
61
+ transition:
62
+ background-color var(--mb-duration-fast) var(--mb-ease-out),
63
+ color var(--mb-duration-fast) var(--mb-ease-out),
64
+ scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
65
+ }
66
+
67
+ .mb-toolbar-button:has(> svg:only-child) {
68
+ padding: 0;
69
+ }
70
+
71
+ .mb-toolbar-button :where(svg) {
72
+ flex: none;
73
+ width: var(--mb-toolbar-icon-size);
74
+ height: var(--mb-toolbar-icon-size);
75
+ stroke-width: 1.75;
76
+ }
77
+
78
+ /* A directional icon, like Back or Forward, marked data-mirror, points the other way in right to left. */
79
+ .mb-toolbar-button > svg[data-mirror]:where([dir="rtl"] *) {
80
+ scale: -1 1;
81
+ }
82
+
83
+ @media (hover: hover) and (pointer: fine) {
84
+ .mb-toolbar-button:hover {
85
+ background: var(--mb-fill-tertiary);
86
+ color: var(--mb-label);
87
+ }
88
+ }
89
+
90
+ .mb-toolbar-button:active {
91
+ background: var(--mb-fill-secondary);
92
+ color: var(--mb-label);
93
+ transition-duration: 0ms;
94
+ }
95
+
96
+ .mb-toolbar-button[data-pressed] {
97
+ background: var(--mb-fill-secondary);
98
+ color: var(--mb-label);
99
+ }
100
+
101
+ .mb-toolbar-button:focus-visible {
102
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
103
+ outline-offset: 0;
104
+ }
105
+
106
+ .mb-toolbar-button[data-disabled] {
107
+ opacity: 0.35;
108
+ }
109
+
110
+ /* Groups: a capsule that clusters related buttons. */
111
+ .mb-toolbar-group {
112
+ display: inline-flex;
113
+ flex: none;
114
+ align-items: stretch;
115
+ gap: 0;
116
+ padding: 0;
117
+ border-radius: var(--mb-radius-full);
118
+ background: var(--mb-fill-quaternary);
119
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
120
+ }
121
+
122
+ /*
123
+ * Each button owns its slot, so its hover, press and pressed fills run edge to
124
+ * edge: the first and last take the capsule's curve, the ones between stay square.
125
+ */
126
+ .mb-toolbar-group > .mb-toolbar-button {
127
+ border-radius: 0;
128
+ }
129
+
130
+ .mb-toolbar-group > .mb-toolbar-button:first-child {
131
+ border-start-start-radius: var(--mb-radius-full);
132
+ border-end-start-radius: var(--mb-radius-full);
133
+ padding-inline-start: 3px;
134
+ }
135
+
136
+ .mb-toolbar-group > .mb-toolbar-button:last-child {
137
+ border-start-end-radius: var(--mb-radius-full);
138
+ border-end-end-radius: var(--mb-radius-full);
139
+ padding-inline-end: 3px;
140
+ }
141
+
142
+ .mb-toolbar-group > .mb-toolbar-button:focus-visible {
143
+ outline-offset: calc(var(--mb-focus-ring-width) * -1);
144
+ }
145
+
146
+ .mb-toolbar-group > .mb-toolbar-button[data-pressed] {
147
+ background: light-dark(#ffffff, color-mix(in oklch, var(--mb-tint) 46%, var(--mb-bg)));
148
+ color: var(--mb-label);
149
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
150
+ }
151
+
152
+ .mb-toolbar-separator {
153
+ flex: none;
154
+ align-self: center;
155
+ width: 1px;
156
+ height: calc(var(--mb-toolbar-item-height) * 0.6);
157
+ margin-inline: var(--mb-space-1);
158
+ background: var(--mb-separator);
159
+ }
160
+
161
+ .mb-toolbar-separator[data-orientation="horizontal"] {
162
+ width: calc(var(--mb-toolbar-item-height) * 0.6);
163
+ height: 1px;
164
+ }
165
+
166
+ .mb-toolbar-spacer {
167
+ flex: 1 1 auto;
168
+ min-width: var(--mb-space-4);
169
+ }
170
+
171
+ /* Title */
172
+ .mb-toolbar-title {
173
+ display: flex;
174
+ flex-direction: column;
175
+ justify-content: center;
176
+ /* Shrinks only once the search field has folded to a magnifying glass. The factor is tiny, not 0,
177
+ so it can still give way then; a factor of 1 would shave a fraction of a pixel and ellipsize early. */
178
+ flex: 0 0.01 auto;
179
+ min-width: 3em;
180
+ max-width: 40%;
181
+ padding-inline: var(--mb-space-2) var(--mb-space-4);
182
+ }
183
+
184
+ .mb-toolbar-title-text {
185
+ overflow: hidden;
186
+ color: var(--mb-label);
187
+ font: var(--mb-text-headline);
188
+ font-size: 15px;
189
+ line-height: 18px;
190
+ font-weight: 700;
191
+ letter-spacing: var(--mb-tracking-title);
192
+ white-space: nowrap;
193
+ text-overflow: ellipsis;
194
+ }
195
+
196
+ .mb-toolbar-subtitle {
197
+ overflow: hidden;
198
+ color: var(--mb-label-secondary);
199
+ font: var(--mb-text-subheadline);
200
+ white-space: nowrap;
201
+ text-overflow: ellipsis;
202
+ }
203
+
204
+ :where(.mb-window[data-inactive]) .mb-toolbar {
205
+ color: var(--mb-label-tertiary);
206
+ }
207
+
208
+ /* Search field */
209
+ .mb-toolbar-search {
210
+ position: relative;
211
+ display: inline-flex;
212
+ flex: 0 1000 180px;
213
+ align-items: center;
214
+ min-width: var(--mb-toolbar-item-min-width);
215
+ height: var(--mb-toolbar-item-height);
216
+ color: var(--mb-label-secondary);
217
+ container: mb-toolbar-search / inline-size;
218
+ }
219
+
220
+ .mb-toolbar-search-icon {
221
+ position: absolute;
222
+ inset-inline-start: 9px;
223
+ width: 14px;
224
+ height: 14px;
225
+ fill: none;
226
+ stroke: currentColor;
227
+ stroke-width: 1.6;
228
+ stroke-linecap: round;
229
+ pointer-events: none;
230
+ }
231
+
232
+ .mb-toolbar-search-input {
233
+ width: 100%;
234
+ height: 100%;
235
+ margin: 0;
236
+ padding-block: 0;
237
+ padding-inline: 28px var(--mb-space-5);
238
+ border: 0;
239
+ border-radius: var(--mb-radius-full);
240
+ background: var(--mb-fill-tertiary);
241
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
242
+ color: var(--mb-label);
243
+ font: var(--mb-text-body);
244
+ letter-spacing: var(--mb-tracking-body);
245
+ outline: none;
246
+ appearance: none;
247
+ -webkit-appearance: none;
248
+ }
249
+
250
+ .mb-toolbar-search-input::placeholder {
251
+ color: var(--mb-label-secondary);
252
+ }
253
+
254
+ /* Too narrow for its placeholder, the field folds into a magnifying glass, as a macOS toolbar's does,
255
+ rather than clipping the word. */
256
+ @container mb-toolbar-search (width < 104px) {
257
+ .mb-toolbar-search-input:placeholder-shown:not(:focus) {
258
+ padding-inline: 0;
259
+ color: transparent;
260
+ }
261
+
262
+ .mb-toolbar-search-input:placeholder-shown:not(:focus)::placeholder {
263
+ color: transparent;
264
+ }
265
+
266
+ .mb-toolbar-search-icon:has(+ .mb-toolbar-search-input:placeholder-shown:not(:focus)) {
267
+ inset-inline-start: calc(50% - 7px);
268
+ }
269
+ }
270
+
271
+ .mb-toolbar-search-input::-webkit-search-decoration {
272
+ -webkit-appearance: none;
273
+ }
274
+
275
+ .mb-toolbar-search-input:focus {
276
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
277
+ outline-offset: 0;
278
+ }
279
+
280
+ /* Floating: each control and cluster is its own capsule of glass over the content. */
281
+ .mb-toolbar[data-variant="floating"] {
282
+ --mb-toolbar-item-height: var(--mb-toolbar-floating-height);
283
+ --mb-toolbar-item-min-width: var(--mb-toolbar-floating-height);
284
+ --mb-toolbar-item-radius: var(--mb-radius-full);
285
+ gap: var(--mb-space-5);
286
+ color: var(--mb-label);
287
+ }
288
+
289
+ :where(.mb-toolbar[data-variant="floating"]) > :is(.mb-toolbar-button, .mb-toolbar-group, .mb-toolbar-search) {
290
+ border-radius: var(--mb-radius-full);
291
+ background-color: color-mix(in oklch, var(--mb-bg-elevated) 46%, transparent);
292
+ background-image: linear-gradient(
293
+ to bottom,
294
+ light-dark(rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.09)),
295
+ light-dark(rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.02)) 60%
296
+ );
297
+ -webkit-backdrop-filter: blur(18px) saturate(190%) brightness(1.04);
298
+ backdrop-filter: blur(18px) saturate(190%) brightness(1.04);
299
+ box-shadow:
300
+ inset 0 1px 0 0 var(--mb-glass-edge),
301
+ inset 0 -0.5px 0 0 var(--mb-glass-edge-soft),
302
+ 0 0 0 var(--mb-hairline) var(--mb-glass-border),
303
+ var(--mb-shadow-3);
304
+ }
305
+
306
+ :where(.mb-toolbar[data-variant="floating"]) > .mb-toolbar-group {
307
+ gap: 0;
308
+ padding: 0;
309
+ }
310
+
311
+ :where(.mb-toolbar[data-variant="floating"]) > .mb-toolbar-group > .mb-toolbar-button {
312
+ --mb-toolbar-item-height: var(--mb-toolbar-floating-height);
313
+ }
314
+
315
+ :where(.mb-toolbar[data-variant="floating"]) > .mb-toolbar-search {
316
+ flex: 1 1 auto;
317
+ }
318
+
319
+ :where(.mb-toolbar[data-variant="floating"]) .mb-toolbar-search-input {
320
+ background: transparent;
321
+ box-shadow: none;
322
+ padding-inline-start: 36px;
323
+ font: var(--mb-text-body);
324
+ }
325
+
326
+ :where(.mb-toolbar[data-variant="floating"]) .mb-toolbar-search-icon {
327
+ inset-inline-start: 14px;
328
+ width: 17px;
329
+ height: 17px;
330
+ }
331
+
332
+ :where(.mb-toolbar[data-variant="floating"]) .mb-toolbar-separator {
333
+ display: none;
334
+ }
335
+
336
+ @scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
337
+ .mb-toolbar-button:active {
338
+ background: transparent;
339
+ scale: 0.92;
340
+ opacity: 0.6;
341
+ }
342
+
343
+ .mb-toolbar-button {
344
+ color: var(--mb-accent-text);
345
+ }
346
+
347
+ :where(.mb-toolbar[data-variant="floating"]) .mb-toolbar-button {
348
+ color: var(--mb-label);
349
+ }
350
+ }
351
+
352
+ @media (prefers-contrast: more) {
353
+ :where(.mb-toolbar[data-variant="floating"]) > :is(.mb-toolbar-button, .mb-toolbar-group, .mb-toolbar-search) {
354
+ background-color: var(--mb-bg-elevated);
355
+ background-image: none;
356
+ -webkit-backdrop-filter: none;
357
+ backdrop-filter: none;
358
+ }
359
+ }
360
+
361
+ @media (prefers-reduced-transparency: reduce) {
362
+ :where(:root:not([data-transparency="full"])) {
363
+ :where(.mb-toolbar[data-variant="floating"]) > :is(.mb-toolbar-button, .mb-toolbar-group, .mb-toolbar-search) {
364
+ background-color: var(--mb-bg-elevated);
365
+ background-image: none;
366
+ -webkit-backdrop-filter: none;
367
+ backdrop-filter: none;
368
+ }
369
+ }
370
+ }
@@ -0,0 +1,69 @@
1
+ /* Tooltip — the macOS help tag: small, quiet, no arrow, a beat after the pointer rests. */
2
+
3
+ :where(:root, [data-platform="macos"]) {
4
+ --mb-tooltip-font: 400 11px/14px var(--mb-font);
5
+ --mb-tooltip-padding: 3px 7px;
6
+ }
7
+
8
+ :where([data-platform="ios"], [data-platform="ipados"]) {
9
+ --mb-tooltip-font: 400 13px/18px var(--mb-font);
10
+ --mb-tooltip-padding: 5px 9px;
11
+ }
12
+
13
+ .mb-tooltip {
14
+ display: flex;
15
+ align-items: baseline;
16
+ gap: 8px;
17
+ max-width: min(280px, var(--available-width, 100vw));
18
+ margin: 0;
19
+ padding: var(--mb-tooltip-padding);
20
+ overflow: visible;
21
+ border: var(--mb-hairline) solid var(--mb-glass-border);
22
+ border-radius: var(--mb-radius-sm);
23
+ background: var(--mb-material-thick);
24
+ -webkit-backdrop-filter: var(--mb-material-filter);
25
+ backdrop-filter: var(--mb-material-filter);
26
+ background-clip: padding-box;
27
+ box-shadow: var(--mb-glass-rim), var(--mb-shadow-2);
28
+ color: var(--mb-label);
29
+ font: var(--mb-tooltip-font);
30
+ letter-spacing: var(--mb-tracking-caption);
31
+ text-wrap: pretty;
32
+ pointer-events: none;
33
+ transform-origin: var(--transform-origin);
34
+ transition:
35
+ opacity var(--mb-duration-fast) var(--mb-ease-out),
36
+ scale var(--mb-duration-fast) var(--mb-ease-out);
37
+ }
38
+
39
+ .mb-tooltip:is([data-starting-style], [data-ending-style]) {
40
+ opacity: 0;
41
+ scale: 0.97;
42
+ }
43
+
44
+ .mb-tooltip[data-ending-style] {
45
+ transition-duration: var(--mb-duration-instant);
46
+ }
47
+
48
+ /* Moving along a toolbar, the next tag replaces the last without animating. */
49
+ .mb-tooltip[data-instant] {
50
+ transition: none;
51
+ }
52
+
53
+ .mb-tooltip-shortcut {
54
+ color: var(--mb-label-secondary);
55
+ font-feature-settings: "tnum";
56
+ white-space: nowrap;
57
+ }
58
+
59
+ .mb-tooltip-shortcut:empty {
60
+ display: none;
61
+ }
62
+
63
+ @media (prefers-reduced-motion: reduce) {
64
+ :where(:root:not([data-motion="full"])) {
65
+ .mb-tooltip:is([data-starting-style], [data-ending-style]) {
66
+ scale: none;
67
+ }
68
+ }
69
+ }