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.
- package/LICENSE +201 -0
- package/README.md +92 -2
- package/dist/components/accessory-tile.d.ts +50 -0
- package/dist/components/accessory-tile.js +46 -0
- package/dist/components/activity-indicator.d.ts +15 -0
- package/dist/components/activity-indicator.js +15 -0
- package/dist/components/alert.d.ts +29 -0
- package/dist/components/alert.js +30 -0
- package/dist/components/artifact-card.d.ts +41 -0
- package/dist/components/artifact-card.js +57 -0
- package/dist/components/artwork.d.ts +44 -0
- package/dist/components/artwork.js +935 -0
- package/dist/components/attachment.d.ts +48 -0
- package/dist/components/attachment.js +65 -0
- package/dist/components/automation-row.d.ts +24 -0
- package/dist/components/automation-row.js +12 -0
- package/dist/components/avatar.d.ts +33 -0
- package/dist/components/avatar.js +45 -0
- package/dist/components/badge.d.ts +24 -0
- package/dist/components/badge.js +19 -0
- package/dist/components/button.d.ts +20 -0
- package/dist/components/button.js +10 -0
- package/dist/components/calendar.d.ts +30 -0
- package/dist/components/calendar.js +47 -0
- package/dist/components/camera-view.d.ts +40 -0
- package/dist/components/camera-view.js +44 -0
- package/dist/components/card.d.ts +14 -0
- package/dist/components/card.js +21 -0
- package/dist/components/carousel.d.ts +18 -0
- package/dist/components/carousel.js +33 -0
- package/dist/components/chat.d.ts +29 -0
- package/dist/components/chat.js +29 -0
- package/dist/components/checkbox.d.ts +13 -0
- package/dist/components/checkbox.js +16 -0
- package/dist/components/code-block.d.ts +39 -0
- package/dist/components/code-block.js +65 -0
- package/dist/components/code-field.d.ts +16 -0
- package/dist/components/code-field.js +29 -0
- package/dist/components/color-well.d.ts +23 -0
- package/dist/components/color-well.js +27 -0
- package/dist/components/combo-box.d.ts +42 -0
- package/dist/components/combo-box.js +102 -0
- package/dist/components/command-palette.d.ts +33 -0
- package/dist/components/command-palette.js +55 -0
- package/dist/components/confirmation.d.ts +24 -0
- package/dist/components/confirmation.js +50 -0
- package/dist/components/content-unavailable.d.ts +19 -0
- package/dist/components/content-unavailable.js +21 -0
- package/dist/components/context-menu.d.ts +9 -0
- package/dist/components/context-menu.js +15 -0
- package/dist/components/date-picker.d.ts +53 -0
- package/dist/components/date-picker.js +86 -0
- package/dist/components/description-list.d.ts +18 -0
- package/dist/components/description-list.js +17 -0
- package/dist/components/device-frame.d.ts +18 -0
- package/dist/components/device-frame.js +16 -0
- package/dist/components/dialog.d.ts +27 -0
- package/dist/components/dialog.js +35 -0
- package/dist/components/disclosure.d.ts +32 -0
- package/dist/components/disclosure.js +35 -0
- package/dist/components/dock.d.ts +28 -0
- package/dist/components/dock.js +80 -0
- package/dist/components/door-control.d.ts +20 -0
- package/dist/components/door-control.js +43 -0
- package/dist/components/energy-readout.d.ts +32 -0
- package/dist/components/energy-readout.js +27 -0
- package/dist/components/field.d.ts +28 -0
- package/dist/components/field.js +32 -0
- package/dist/components/gauge.d.ts +25 -0
- package/dist/components/gauge.js +42 -0
- package/dist/components/generated-image.d.ts +39 -0
- package/dist/components/generated-image.js +47 -0
- package/dist/components/glass.d.ts +34 -0
- package/dist/components/glass.js +31 -0
- package/dist/components/home-backdrop.d.ts +23 -0
- package/dist/components/home-backdrop.js +12 -0
- package/dist/components/home-section.d.ts +19 -0
- package/dist/components/home-section.js +21 -0
- package/dist/components/home-status.d.ts +24 -0
- package/dist/components/home-status.js +14 -0
- package/dist/components/hover-card.d.ts +14 -0
- package/dist/components/hover-card.js +16 -0
- package/dist/components/inspector.d.ts +29 -0
- package/dist/components/inspector.js +40 -0
- package/dist/components/level-control.d.ts +19 -0
- package/dist/components/level-control.js +13 -0
- package/dist/components/light-color-picker.d.ts +33 -0
- package/dist/components/light-color-picker.js +56 -0
- package/dist/components/list.d.ts +42 -0
- package/dist/components/list.js +42 -0
- package/dist/components/listbox.d.ts +16 -0
- package/dist/components/listbox.js +28 -0
- package/dist/components/lock-control.d.ts +20 -0
- package/dist/components/lock-control.js +35 -0
- package/dist/components/menu-bar.d.ts +14 -0
- package/dist/components/menu-bar.js +16 -0
- package/dist/components/menu.d.ts +40 -0
- package/dist/components/menu.js +54 -0
- package/dist/components/message.d.ts +65 -0
- package/dist/components/message.js +69 -0
- package/dist/components/model-picker.d.ts +61 -0
- package/dist/components/model-picker.js +59 -0
- package/dist/components/navigation-bar.d.ts +24 -0
- package/dist/components/navigation-bar.js +54 -0
- package/dist/components/outline.d.ts +21 -0
- package/dist/components/outline.js +40 -0
- package/dist/components/page-control.d.ts +10 -0
- package/dist/components/page-control.js +8 -0
- package/dist/components/plan.d.ts +25 -0
- package/dist/components/plan.js +43 -0
- package/dist/components/popover.d.ts +16 -0
- package/dist/components/popover.js +24 -0
- package/dist/components/progress.d.ts +27 -0
- package/dist/components/progress.js +27 -0
- package/dist/components/prompt-input.d.ts +93 -0
- package/dist/components/prompt-input.js +172 -0
- package/dist/components/radio.d.ts +16 -0
- package/dist/components/radio.js +13 -0
- package/dist/components/rating.d.ts +10 -0
- package/dist/components/rating.js +12 -0
- package/dist/components/reasoning.d.ts +28 -0
- package/dist/components/reasoning.js +52 -0
- package/dist/components/response.d.ts +14 -0
- package/dist/components/response.js +14 -0
- package/dist/components/scene-tile.d.ts +22 -0
- package/dist/components/scene-tile.js +13 -0
- package/dist/components/scroll-view.d.ts +21 -0
- package/dist/components/scroll-view.js +13 -0
- package/dist/components/search-field.d.ts +16 -0
- package/dist/components/search-field.js +12 -0
- package/dist/components/secure-field.d.ts +23 -0
- package/dist/components/secure-field.js +21 -0
- package/dist/components/segmented-control.d.ts +12 -0
- package/dist/components/segmented-control.js +10 -0
- package/dist/components/select.d.ts +45 -0
- package/dist/components/select.js +79 -0
- package/dist/components/sensor-readout.d.ts +29 -0
- package/dist/components/sensor-readout.js +12 -0
- package/dist/components/separator.d.ts +14 -0
- package/dist/components/separator.js +11 -0
- package/dist/components/setup-code.d.ts +29 -0
- package/dist/components/setup-code.js +47 -0
- package/dist/components/sheet.d.ts +31 -0
- package/dist/components/sheet.js +51 -0
- package/dist/components/shimmer.d.ts +18 -0
- package/dist/components/shimmer.js +17 -0
- package/dist/components/sidebar.d.ts +30 -0
- package/dist/components/sidebar.js +26 -0
- package/dist/components/slider.d.ts +27 -0
- package/dist/components/slider.js +43 -0
- package/dist/components/sources.d.ts +51 -0
- package/dist/components/sources.js +46 -0
- package/dist/components/split-view.d.ts +11 -0
- package/dist/components/split-view.js +13 -0
- package/dist/components/squircle.d.ts +41 -0
- package/dist/components/squircle.js +63 -0
- package/dist/components/stepper.d.ts +30 -0
- package/dist/components/stepper.js +28 -0
- package/dist/components/suggestion.d.ts +23 -0
- package/dist/components/suggestion.js +29 -0
- package/dist/components/switch.d.ts +10 -0
- package/dist/components/switch.js +10 -0
- package/dist/components/tab-bar.d.ts +20 -0
- package/dist/components/tab-bar.js +17 -0
- package/dist/components/table.d.ts +49 -0
- package/dist/components/table.js +179 -0
- package/dist/components/tabs.d.ts +16 -0
- package/dist/components/tabs.js +19 -0
- package/dist/components/text-area.d.ts +14 -0
- package/dist/components/text-area.js +9 -0
- package/dist/components/text-field.d.ts +26 -0
- package/dist/components/text-field.js +23 -0
- package/dist/components/thermostat-control.d.ts +30 -0
- package/dist/components/thermostat-control.js +139 -0
- package/dist/components/toast.d.ts +30 -0
- package/dist/components/toast.js +114 -0
- package/dist/components/toggle.d.ts +21 -0
- package/dist/components/toggle.js +19 -0
- package/dist/components/token-field.d.ts +31 -0
- package/dist/components/token-field.js +78 -0
- package/dist/components/tool-call.d.ts +48 -0
- package/dist/components/tool-call.js +77 -0
- package/dist/components/toolbar.d.ts +27 -0
- package/dist/components/toolbar.js +39 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +18 -0
- package/dist/components/window.d.ts +56 -0
- package/dist/components/window.js +61 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +98 -0
- package/dist/lib/agent-glyphs.d.ts +10 -0
- package/dist/lib/agent-glyphs.js +19 -0
- package/dist/lib/cx.d.ts +9 -0
- package/dist/lib/cx.js +14 -0
- package/dist/lib/derive.d.ts +53 -0
- package/dist/lib/derive.js +255 -0
- package/dist/lib/field-glyphs.d.ts +13 -0
- package/dist/lib/field-glyphs.js +28 -0
- package/dist/lib/menu-glyphs.d.ts +6 -0
- package/dist/lib/menu-glyphs.js +15 -0
- package/dist/lib/platform.d.ts +18 -0
- package/dist/lib/platform.js +17 -0
- package/dist/lib/squircle.d.ts +23 -0
- package/dist/lib/squircle.js +69 -0
- package/dist/lib/theme.d.ts +42 -0
- package/dist/lib/theme.js +62 -0
- package/dist/styles/base.css +115 -0
- package/dist/styles/components/accessory-tile.css +461 -0
- package/dist/styles/components/activity-indicator.css +63 -0
- package/dist/styles/components/alert.css +433 -0
- package/dist/styles/components/artifact-card.css +238 -0
- package/dist/styles/components/artwork.css +380 -0
- package/dist/styles/components/attachment.css +540 -0
- package/dist/styles/components/automation-row.css +52 -0
- package/dist/styles/components/avatar.css +230 -0
- package/dist/styles/components/badge.css +204 -0
- package/dist/styles/components/button.css +298 -0
- package/dist/styles/components/calendar.css +287 -0
- package/dist/styles/components/camera-view.css +239 -0
- package/dist/styles/components/card.css +100 -0
- package/dist/styles/components/carousel.css +210 -0
- package/dist/styles/components/chat.css +209 -0
- package/dist/styles/components/checkbox.css +212 -0
- package/dist/styles/components/code-block.css +162 -0
- package/dist/styles/components/code-field.css +163 -0
- package/dist/styles/components/color-well.css +452 -0
- package/dist/styles/components/combo-box.css +222 -0
- package/dist/styles/components/command-palette.css +379 -0
- package/dist/styles/components/confirmation.css +189 -0
- package/dist/styles/components/content-unavailable.css +105 -0
- package/dist/styles/components/context-menu.css +43 -0
- package/dist/styles/components/date-picker.css +356 -0
- package/dist/styles/components/description-list.css +92 -0
- package/dist/styles/components/device-frame.css +202 -0
- package/dist/styles/components/dialog.css +366 -0
- package/dist/styles/components/disclosure.css +197 -0
- package/dist/styles/components/dock.css +404 -0
- package/dist/styles/components/door-control.css +187 -0
- package/dist/styles/components/energy-readout.css +161 -0
- package/dist/styles/components/field.css +175 -0
- package/dist/styles/components/gauge.css +239 -0
- package/dist/styles/components/generated-image.css +248 -0
- package/dist/styles/components/glass.css +113 -0
- package/dist/styles/components/home-backdrop.css +81 -0
- package/dist/styles/components/home-section.css +100 -0
- package/dist/styles/components/home-status.css +215 -0
- package/dist/styles/components/hover-card.css +145 -0
- package/dist/styles/components/index.css +94 -0
- package/dist/styles/components/inspector.css +236 -0
- package/dist/styles/components/level-control.css +247 -0
- package/dist/styles/components/light-color-picker.css +94 -0
- package/dist/styles/components/list.css +411 -0
- package/dist/styles/components/listbox.css +168 -0
- package/dist/styles/components/lock-control.css +164 -0
- package/dist/styles/components/menu-bar.css +94 -0
- package/dist/styles/components/menu.css +454 -0
- package/dist/styles/components/message.css +236 -0
- package/dist/styles/components/model-picker.css +64 -0
- package/dist/styles/components/navigation-bar.css +249 -0
- package/dist/styles/components/outline.css +248 -0
- package/dist/styles/components/page-control.css +127 -0
- package/dist/styles/components/plan.css +212 -0
- package/dist/styles/components/popover.css +186 -0
- package/dist/styles/components/progress.css +228 -0
- package/dist/styles/components/prompt-input.css +503 -0
- package/dist/styles/components/radio.css +281 -0
- package/dist/styles/components/rating.css +122 -0
- package/dist/styles/components/reasoning.css +214 -0
- package/dist/styles/components/response.css +303 -0
- package/dist/styles/components/scene-tile.css +295 -0
- package/dist/styles/components/scroll-view.css +195 -0
- package/dist/styles/components/search-field.css +128 -0
- package/dist/styles/components/secure-field.css +189 -0
- package/dist/styles/components/segmented-control.css +183 -0
- package/dist/styles/components/select.css +290 -0
- package/dist/styles/components/sensor-readout.css +231 -0
- package/dist/styles/components/separator.css +62 -0
- package/dist/styles/components/setup-code.css +138 -0
- package/dist/styles/components/sheet.css +345 -0
- package/dist/styles/components/shimmer.css +60 -0
- package/dist/styles/components/sidebar.css +261 -0
- package/dist/styles/components/slider.css +208 -0
- package/dist/styles/components/sources.css +349 -0
- package/dist/styles/components/split-view.css +75 -0
- package/dist/styles/components/squircle.css +44 -0
- package/dist/styles/components/stepper.css +278 -0
- package/dist/styles/components/suggestion.css +203 -0
- package/dist/styles/components/switch.css +115 -0
- package/dist/styles/components/tab-bar.css +223 -0
- package/dist/styles/components/table.css +313 -0
- package/dist/styles/components/tabs.css +262 -0
- package/dist/styles/components/text-area.css +94 -0
- package/dist/styles/components/text-field.css +294 -0
- package/dist/styles/components/thermostat-control.css +214 -0
- package/dist/styles/components/toast.css +418 -0
- package/dist/styles/components/toggle.css +312 -0
- package/dist/styles/components/token-field.css +193 -0
- package/dist/styles/components/tool-call.css +391 -0
- package/dist/styles/components/toolbar.css +370 -0
- package/dist/styles/components/tooltip.css +69 -0
- package/dist/styles/components/window.css +428 -0
- package/dist/styles/index.css +17 -0
- package/dist/styles/materials.css +263 -0
- package/dist/styles/platforms.css +214 -0
- package/dist/styles/themes/ember.css +24 -0
- package/dist/styles/themes/graphite.css +16 -0
- package/dist/styles/themes/nebula.css +16 -0
- package/dist/styles/themes/system.css +28 -0
- package/dist/styles/tokens.css +299 -0
- package/package.json +82 -3
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/* Base: what every macbetter surface shares. */
|
|
2
|
+
|
|
3
|
+
:where(.mb-root, [data-macbetter]) {
|
|
4
|
+
background: var(--mb-bg);
|
|
5
|
+
color: var(--mb-label);
|
|
6
|
+
font: var(--mb-text-body);
|
|
7
|
+
letter-spacing: var(--mb-tracking-body);
|
|
8
|
+
-webkit-font-smoothing: antialiased;
|
|
9
|
+
-moz-osx-font-smoothing: grayscale;
|
|
10
|
+
text-rendering: optimizeLegibility;
|
|
11
|
+
font-optical-sizing: auto;
|
|
12
|
+
-webkit-tap-highlight-color: transparent;
|
|
13
|
+
accent-color: var(--mb-accent);
|
|
14
|
+
scrollbar-color: var(--mb-label-quaternary) transparent;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.mb-root, [data-macbetter]) ::selection {
|
|
18
|
+
background: var(--mb-selection);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where([class^="mb-"], [class*=" mb-"]) {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:where([class^="mb-"], [class*=" mb-"])::before,
|
|
26
|
+
:where([class^="mb-"], [class*=" mb-"])::after {
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Closed popups stay hidden before ui-sdk's own CSS arrives on hydration. */
|
|
31
|
+
:where([data-slot][hidden]:not([hidden="until-found"])) {
|
|
32
|
+
display: none !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* One focus ring everywhere: the HIG's accent-colored halo. */
|
|
36
|
+
:where([class^="mb-"], [class*=" mb-"]):focus-visible {
|
|
37
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
38
|
+
outline-offset: var(--mb-focus-ring-offset);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/*
|
|
42
|
+
* Continuous corners. A component opts in inside @supports, multiplying its
|
|
43
|
+
* nominal radius by --mb-corner-factor so the corner keeps its apparent size:
|
|
44
|
+
*
|
|
45
|
+
* .mb-card { border-radius: var(--mb-card-radius) }
|
|
46
|
+
* @supports (corner-shape: squircle) {
|
|
47
|
+
* .mb-card {
|
|
48
|
+
* corner-shape: var(--mb-corner-shape);
|
|
49
|
+
* border-radius: calc(var(--mb-card-radius) * var(--mb-corner-factor));
|
|
50
|
+
* }
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* Never on a full radius: a superellipse turns a capsule into a lozenge and a
|
|
54
|
+
* circle into a squircle. The factor drops to 1 when a theme sets the shape to
|
|
55
|
+
* round; it's worked out on every element, so a nested theme can switch it.
|
|
56
|
+
*/
|
|
57
|
+
:where([class^="mb-"], [class*=" mb-"]) {
|
|
58
|
+
--mb-corner-factor: var(--mb-corner-smoothing);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@supports (top: if(else: 0px)) {
|
|
62
|
+
:where([class^="mb-"], [class*=" mb-"]) {
|
|
63
|
+
--mb-corner-factor: if(style(--mb-corner-shape: round): 1; else: var(--mb-corner-smoothing));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Text styles. */
|
|
68
|
+
.mb-text-large-title { font: var(--mb-text-large-title); letter-spacing: var(--mb-tracking-large-title); }
|
|
69
|
+
.mb-text-title-1 { font: var(--mb-text-title-1); letter-spacing: var(--mb-tracking-title); }
|
|
70
|
+
.mb-text-title-2 { font: var(--mb-text-title-2); letter-spacing: var(--mb-tracking-title); }
|
|
71
|
+
.mb-text-title-3 { font: var(--mb-text-title-3); letter-spacing: var(--mb-tracking-title); }
|
|
72
|
+
.mb-text-headline { font: var(--mb-text-headline); letter-spacing: var(--mb-tracking-body); }
|
|
73
|
+
.mb-text-body { font: var(--mb-text-body); letter-spacing: var(--mb-tracking-body); }
|
|
74
|
+
.mb-text-callout { font: var(--mb-text-callout); letter-spacing: var(--mb-tracking-body); }
|
|
75
|
+
.mb-text-subheadline { font: var(--mb-text-subheadline); letter-spacing: var(--mb-tracking-body); }
|
|
76
|
+
.mb-text-footnote { font: var(--mb-text-footnote); letter-spacing: var(--mb-tracking-caption); }
|
|
77
|
+
.mb-text-caption { font: var(--mb-text-caption); letter-spacing: var(--mb-tracking-caption); }
|
|
78
|
+
.mb-text-mono { font-family: var(--mb-font-mono); letter-spacing: 0; }
|
|
79
|
+
.mb-text-rounded { font-family: var(--mb-font-rounded); }
|
|
80
|
+
|
|
81
|
+
.mb-label { color: var(--mb-label); }
|
|
82
|
+
.mb-label-secondary { color: var(--mb-label-secondary); }
|
|
83
|
+
.mb-label-tertiary { color: var(--mb-label-tertiary); }
|
|
84
|
+
.mb-label-accent { color: var(--mb-accent-text); }
|
|
85
|
+
|
|
86
|
+
.mb-visually-hidden {
|
|
87
|
+
position: absolute;
|
|
88
|
+
width: 1px;
|
|
89
|
+
height: 1px;
|
|
90
|
+
margin: -1px;
|
|
91
|
+
padding: 0;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
clip-path: inset(50%);
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
border: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/*
|
|
99
|
+
* Reduce Motion shortens everything, unless <html> carries data-motion="full"
|
|
100
|
+
* (for a page that exists to show the motion). Motion that carries meaning (a spinner)
|
|
101
|
+
* opts out with data-motion="essential" and supplies its own calmer version:
|
|
102
|
+
* an !important here can't be beaten from the components layer.
|
|
103
|
+
*/
|
|
104
|
+
@media (prefers-reduced-motion: reduce) {
|
|
105
|
+
:where(:root:not([data-motion="full"])) {
|
|
106
|
+
:where([class^="mb-"], [class*=" mb-"]):not([data-motion="essential"]),
|
|
107
|
+
:where([class^="mb-"], [class*=" mb-"]):not([data-motion="essential"])::before,
|
|
108
|
+
:where([class^="mb-"], [class*=" mb-"]):not([data-motion="essential"])::after {
|
|
109
|
+
transition-duration: 0.01ms !important;
|
|
110
|
+
transition-delay: 0ms !important;
|
|
111
|
+
animation-duration: 0.01ms !important;
|
|
112
|
+
animation-iteration-count: 1 !important;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
/* Accessory tile — the Home app's tile. The icon side switches the accessory; the rest of the tile opens its controls.
|
|
2
|
+
Off is a dim translucent tile; on is a bright tile with dark text and a tinted icon, in both color schemes. */
|
|
3
|
+
|
|
4
|
+
:where(:root, [data-platform="macos"]) {
|
|
5
|
+
--mb-accessory-tile-height: 60px;
|
|
6
|
+
--mb-accessory-tile-radius: 12px;
|
|
7
|
+
--mb-accessory-tile-padding: 10px;
|
|
8
|
+
--mb-accessory-tile-icon-size: 32px;
|
|
9
|
+
--mb-accessory-tile-glyph-size: 18px;
|
|
10
|
+
--mb-accessory-tile-name-font: 600 13px/16px var(--mb-font);
|
|
11
|
+
--mb-accessory-tile-status-font: 400 12px/15px var(--mb-font);
|
|
12
|
+
--mb-accessory-grid-gap: 10px;
|
|
13
|
+
--mb-accessory-grid-track: 80px;
|
|
14
|
+
--mb-accessory-tile-md-span: 2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
18
|
+
--mb-accessory-tile-height: 72px;
|
|
19
|
+
--mb-accessory-tile-radius: 18px;
|
|
20
|
+
--mb-accessory-tile-padding: 12px;
|
|
21
|
+
--mb-accessory-tile-icon-size: 38px;
|
|
22
|
+
--mb-accessory-tile-glyph-size: 22px;
|
|
23
|
+
--mb-accessory-tile-name-font: 600 15px/18px var(--mb-font);
|
|
24
|
+
--mb-accessory-tile-status-font: 400 14px/17px var(--mb-font);
|
|
25
|
+
--mb-accessory-grid-gap: 10px;
|
|
26
|
+
--mb-accessory-grid-track: 76px;
|
|
27
|
+
--mb-accessory-tile-md-span: 2;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.mb-accessory-tile {
|
|
31
|
+
/* The tint is the icon's color when on. Each is darkened in light mode so the glyph holds 3:1 on the bright tile. */
|
|
32
|
+
--mb-accessory-tile-tint: var(--mb-accent);
|
|
33
|
+
/* Off: a translucent fill without a blur, since a Home screen holds dozens of tiles. */
|
|
34
|
+
--mb-accessory-tile-bg: light-dark(
|
|
35
|
+
color-mix(in oklch, var(--mb-ink) 7%, rgb(255 255 255 / 0.3)),
|
|
36
|
+
color-mix(in oklch, var(--mb-bg-elevated) 58%, transparent)
|
|
37
|
+
);
|
|
38
|
+
--mb-accessory-tile-fg: var(--mb-label);
|
|
39
|
+
--mb-accessory-tile-fg-secondary: var(--mb-label-secondary);
|
|
40
|
+
--mb-accessory-tile-icon-bg: var(--mb-fill-secondary);
|
|
41
|
+
--mb-accessory-tile-icon-fg: var(--mb-label-secondary);
|
|
42
|
+
/* On: nearly white, warmed a little by the theme's tint. Text is dark in both schemes. */
|
|
43
|
+
--mb-accessory-tile-on-bg: light-dark(
|
|
44
|
+
rgb(255 255 255 / 0.97),
|
|
45
|
+
color-mix(in oklch, var(--mb-tint) 8%, rgb(246 246 248))
|
|
46
|
+
);
|
|
47
|
+
--mb-accessory-tile-on-fg: rgb(0 0 0 / 0.88);
|
|
48
|
+
--mb-accessory-tile-on-fg-secondary: rgb(0 0 0 / 0.62);
|
|
49
|
+
--mb-accessory-tile-edge: light-dark(rgb(0 0 0 / 0.06), rgb(255 255 255 / 0.08));
|
|
50
|
+
|
|
51
|
+
position: relative;
|
|
52
|
+
display: block;
|
|
53
|
+
box-sizing: border-box;
|
|
54
|
+
min-width: 0;
|
|
55
|
+
height: var(--mb-accessory-tile-height);
|
|
56
|
+
container-type: inline-size;
|
|
57
|
+
border-radius: var(--mb-accessory-tile-radius);
|
|
58
|
+
background: var(--mb-accessory-tile-bg);
|
|
59
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-accessory-tile-edge);
|
|
60
|
+
color: var(--mb-accessory-tile-fg);
|
|
61
|
+
isolation: isolate;
|
|
62
|
+
user-select: none;
|
|
63
|
+
-webkit-user-select: none;
|
|
64
|
+
-webkit-tap-highlight-color: transparent;
|
|
65
|
+
transition:
|
|
66
|
+
background-color var(--mb-duration-base) var(--mb-ease-out),
|
|
67
|
+
color var(--mb-duration-base) var(--mb-ease-out),
|
|
68
|
+
scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mb-accessory-tile[data-size="md"] {
|
|
72
|
+
width: auto;
|
|
73
|
+
min-width: 150px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.mb-accessory-tile[data-size="sm"] {
|
|
77
|
+
width: var(--mb-accessory-tile-height);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.mb-accessory-tile[data-size="lg"] {
|
|
81
|
+
width: calc(var(--mb-accessory-tile-height) * 2 + var(--mb-accessory-grid-gap));
|
|
82
|
+
height: calc(var(--mb-accessory-tile-height) * 2 + var(--mb-accessory-grid-gap));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.mb-accessory-tile[data-tint="yellow"] { --mb-accessory-tile-tint: light-dark(oklch(from var(--mb-yellow) 0.68 0.16 h), oklch(from var(--mb-yellow) 0.72 0.17 h)); }
|
|
86
|
+
.mb-accessory-tile[data-tint="orange"] { --mb-accessory-tile-tint: oklch(from var(--mb-orange) min(l, 0.66) c h); }
|
|
87
|
+
.mb-accessory-tile[data-tint="red"] { --mb-accessory-tile-tint: oklch(from var(--mb-red) min(l, 0.58) c h); }
|
|
88
|
+
.mb-accessory-tile[data-tint="green"] { --mb-accessory-tile-tint: oklch(from var(--mb-green) min(l, 0.6) c h); }
|
|
89
|
+
.mb-accessory-tile[data-tint="teal"] { --mb-accessory-tile-tint: oklch(from var(--mb-teal) min(l, 0.6) c h); }
|
|
90
|
+
.mb-accessory-tile[data-tint="blue"] { --mb-accessory-tile-tint: oklch(from var(--mb-blue) min(l, 0.58) c h); }
|
|
91
|
+
.mb-accessory-tile[data-tint="indigo"] { --mb-accessory-tile-tint: oklch(from var(--mb-indigo) min(l, 0.55) c h); }
|
|
92
|
+
.mb-accessory-tile[data-tint="purple"] { --mb-accessory-tile-tint: oklch(from var(--mb-purple) min(l, 0.56) c h); }
|
|
93
|
+
.mb-accessory-tile[data-tint="accent"] { --mb-accessory-tile-tint: oklch(from var(--mb-accent) min(l, 0.62) c h); }
|
|
94
|
+
.mb-accessory-tile[data-tint="neutral"] { --mb-accessory-tile-tint: rgb(0 0 0 / 0.72); }
|
|
95
|
+
|
|
96
|
+
/* On. */
|
|
97
|
+
.mb-accessory-tile:is([data-active], [data-partial], :has(> .mb-accessory-tile-toggle[data-pressed])) {
|
|
98
|
+
--mb-accessory-tile-bg: var(--mb-accessory-tile-on-bg);
|
|
99
|
+
--mb-accessory-tile-fg: var(--mb-accessory-tile-on-fg);
|
|
100
|
+
--mb-accessory-tile-fg-secondary: var(--mb-accessory-tile-on-fg-secondary);
|
|
101
|
+
--mb-accessory-tile-icon-bg: color-mix(in oklch, var(--mb-accessory-tile-tint) 18%, transparent);
|
|
102
|
+
--mb-accessory-tile-icon-fg: var(--mb-accessory-tile-tint);
|
|
103
|
+
--mb-accessory-tile-edge: rgb(0 0 0 / 0.04);
|
|
104
|
+
box-shadow:
|
|
105
|
+
inset 0 0 0 var(--mb-hairline) var(--mb-accessory-tile-edge),
|
|
106
|
+
0 1px 3px rgb(0 0 0 / 0.12);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Some members of a group on: half of the icon's circle filled. */
|
|
110
|
+
.mb-accessory-tile[data-partial]:not(:has(> .mb-accessory-tile-toggle[data-pressed])) {
|
|
111
|
+
--mb-accessory-tile-icon-bg: linear-gradient(
|
|
112
|
+
to top,
|
|
113
|
+
color-mix(in oklch, var(--mb-accessory-tile-tint) 22%, transparent) 50%,
|
|
114
|
+
rgb(0 0 0 / 0.06) 50%
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* A sensor alert reads as an alert in words and in red, on or off. */
|
|
119
|
+
.mb-accessory-tile[data-state="alert"] {
|
|
120
|
+
--mb-accessory-tile-bg: light-dark(
|
|
121
|
+
color-mix(in oklch, var(--mb-red) 12%, rgb(255 255 255 / 0.97)),
|
|
122
|
+
color-mix(in oklch, var(--mb-red) 14%, rgb(250 246 246))
|
|
123
|
+
);
|
|
124
|
+
--mb-accessory-tile-fg: rgb(0 0 0 / 0.88);
|
|
125
|
+
--mb-accessory-tile-fg-secondary: oklch(from var(--mb-red) 0.5 0.19 h);
|
|
126
|
+
--mb-accessory-tile-icon-bg: oklch(from var(--mb-red) 0.6 0.21 h);
|
|
127
|
+
--mb-accessory-tile-icon-fg: white;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.mb-accessory-tile[data-state="alert"] .mb-accessory-tile-status {
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* No Response: the tile stays where it is, dimmed, with the words in place of the state. */
|
|
135
|
+
.mb-accessory-tile[data-state="unreachable"] {
|
|
136
|
+
--mb-accessory-tile-icon-fg: var(--mb-label-tertiary);
|
|
137
|
+
--mb-accessory-tile-icon-bg: var(--mb-fill-tertiary);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.mb-accessory-tile[data-state="unreachable"] .mb-accessory-tile-name {
|
|
141
|
+
color: var(--mb-accessory-tile-fg-secondary);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* The name side: a button over the whole tile, padded clear of the icon. */
|
|
145
|
+
.mb-accessory-tile-detail {
|
|
146
|
+
position: absolute;
|
|
147
|
+
inset: 0;
|
|
148
|
+
z-index: 0;
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
justify-content: center;
|
|
152
|
+
box-sizing: border-box;
|
|
153
|
+
min-width: 0;
|
|
154
|
+
margin: 0;
|
|
155
|
+
padding: 6px var(--mb-accessory-tile-padding);
|
|
156
|
+
padding-inline-start: calc(var(--mb-accessory-tile-padding) * 2 + var(--mb-accessory-tile-icon-size) - 4px);
|
|
157
|
+
border: 0;
|
|
158
|
+
border-radius: inherit;
|
|
159
|
+
background: none;
|
|
160
|
+
color: inherit;
|
|
161
|
+
font: inherit;
|
|
162
|
+
text-align: start;
|
|
163
|
+
text-decoration: none;
|
|
164
|
+
overflow: hidden;
|
|
165
|
+
cursor: default;
|
|
166
|
+
-webkit-tap-highlight-color: transparent;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.mb-accessory-tile-name,
|
|
170
|
+
.mb-accessory-tile-room,
|
|
171
|
+
.mb-accessory-tile-status {
|
|
172
|
+
display: block;
|
|
173
|
+
overflow: hidden;
|
|
174
|
+
font: var(--mb-accessory-tile-status-font);
|
|
175
|
+
letter-spacing: var(--mb-tracking-caption);
|
|
176
|
+
white-space: nowrap;
|
|
177
|
+
text-overflow: ellipsis;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.mb-accessory-tile-name {
|
|
181
|
+
/* Names wrap to a second line before they truncate, as in the Home app. */
|
|
182
|
+
display: -webkit-box;
|
|
183
|
+
-webkit-box-orient: vertical;
|
|
184
|
+
-webkit-line-clamp: 2;
|
|
185
|
+
line-clamp: 2;
|
|
186
|
+
white-space: normal;
|
|
187
|
+
overflow-wrap: break-word;
|
|
188
|
+
hyphens: auto;
|
|
189
|
+
color: var(--mb-accessory-tile-fg);
|
|
190
|
+
font: var(--mb-accessory-tile-name-font);
|
|
191
|
+
letter-spacing: var(--mb-tracking-body);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.mb-accessory-tile-room,
|
|
195
|
+
.mb-accessory-tile-status {
|
|
196
|
+
color: var(--mb-accessory-tile-fg-secondary);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Three lines at most: the room or a second line of the name, never both. An alert's words get the second line instead. */
|
|
200
|
+
.mb-accessory-tile-detail:has(> .mb-accessory-tile-room) > .mb-accessory-tile-name,
|
|
201
|
+
.mb-accessory-tile[data-state="alert"] .mb-accessory-tile-name {
|
|
202
|
+
-webkit-line-clamp: 1;
|
|
203
|
+
line-clamp: 1;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.mb-accessory-tile[data-state="alert"] .mb-accessory-tile-status {
|
|
207
|
+
display: -webkit-box;
|
|
208
|
+
-webkit-box-orient: vertical;
|
|
209
|
+
-webkit-line-clamp: 2;
|
|
210
|
+
line-clamp: 2;
|
|
211
|
+
white-space: normal;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* The room comes first in the Home app ("Kitchen", then "Pendant lights"). */
|
|
215
|
+
.mb-accessory-tile-room {
|
|
216
|
+
order: -1;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* The icon side. */
|
|
220
|
+
.mb-accessory-tile-toggle,
|
|
221
|
+
.mb-accessory-tile-icon {
|
|
222
|
+
position: absolute;
|
|
223
|
+
z-index: 1;
|
|
224
|
+
inset-block-start: 50%;
|
|
225
|
+
inset-inline-start: var(--mb-accessory-tile-padding);
|
|
226
|
+
display: grid;
|
|
227
|
+
place-items: center;
|
|
228
|
+
width: var(--mb-accessory-tile-icon-size);
|
|
229
|
+
height: var(--mb-accessory-tile-icon-size);
|
|
230
|
+
margin: 0;
|
|
231
|
+
padding: 0;
|
|
232
|
+
border: 0;
|
|
233
|
+
border-radius: var(--mb-radius-full);
|
|
234
|
+
background: var(--mb-accessory-tile-icon-bg);
|
|
235
|
+
color: var(--mb-accessory-tile-icon-fg);
|
|
236
|
+
translate: 0 -50%;
|
|
237
|
+
cursor: default;
|
|
238
|
+
-webkit-tap-highlight-color: transparent;
|
|
239
|
+
transition:
|
|
240
|
+
background-color var(--mb-duration-base) var(--mb-ease-out),
|
|
241
|
+
color var(--mb-duration-base) var(--mb-ease-out),
|
|
242
|
+
scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* The hit area reaches the platform minimum and the tile's edge on the leading side. */
|
|
246
|
+
.mb-accessory-tile-toggle::after {
|
|
247
|
+
content: "";
|
|
248
|
+
position: absolute;
|
|
249
|
+
inset: 50% auto auto 50%;
|
|
250
|
+
width: max(100%, var(--mb-hit-target));
|
|
251
|
+
height: max(100%, var(--mb-hit-target));
|
|
252
|
+
translate: -50% -50%;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.mb-accessory-tile-glyph {
|
|
256
|
+
display: grid;
|
|
257
|
+
place-items: center;
|
|
258
|
+
width: var(--mb-accessory-tile-glyph-size);
|
|
259
|
+
height: var(--mb-accessory-tile-glyph-size);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.mb-accessory-tile-glyph > :where(svg) {
|
|
263
|
+
width: 100%;
|
|
264
|
+
height: 100%;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.mb-accessory-tile-toggle[data-disabled] {
|
|
268
|
+
cursor: not-allowed;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* Square tiles show the icon alone: the name stays readable to assistive tech. */
|
|
272
|
+
.mb-accessory-tile[data-size="sm"] .mb-accessory-tile-toggle,
|
|
273
|
+
.mb-accessory-tile[data-size="sm"] .mb-accessory-tile-icon {
|
|
274
|
+
inset: 50% auto auto 50%;
|
|
275
|
+
translate: -50% -50%;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.mb-accessory-tile[data-size="sm"] .mb-accessory-tile-detail {
|
|
279
|
+
padding: 0;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.mb-accessory-tile[data-size="sm"] .mb-accessory-tile-detail > * {
|
|
283
|
+
position: absolute;
|
|
284
|
+
width: 1px;
|
|
285
|
+
height: 1px;
|
|
286
|
+
overflow: hidden;
|
|
287
|
+
clip-path: inset(50%);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* Large tiles stack: the icon at the top, the words at the bottom. */
|
|
291
|
+
.mb-accessory-tile[data-size="lg"] .mb-accessory-tile-toggle,
|
|
292
|
+
.mb-accessory-tile[data-size="lg"] .mb-accessory-tile-icon {
|
|
293
|
+
inset-block-start: var(--mb-accessory-tile-padding);
|
|
294
|
+
translate: none;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.mb-accessory-tile[data-size="lg"] .mb-accessory-tile-detail {
|
|
298
|
+
justify-content: flex-end;
|
|
299
|
+
padding-inline-start: var(--mb-accessory-tile-padding);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.mb-accessory-tile-spinner {
|
|
303
|
+
position: absolute;
|
|
304
|
+
z-index: 2;
|
|
305
|
+
inset-block-start: 6px;
|
|
306
|
+
inset-inline-end: 6px;
|
|
307
|
+
color: var(--mb-accessory-tile-fg-secondary);
|
|
308
|
+
pointer-events: none;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* Focus: each part shows its own halo. */
|
|
312
|
+
.mb-accessory-tile-toggle:focus-visible {
|
|
313
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
314
|
+
outline-offset: 2px;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.mb-accessory-tile-detail:focus-visible {
|
|
318
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
319
|
+
outline-offset: var(--mb-focus-ring-offset);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.mb-accessory-tile[data-size="sm"] .mb-accessory-tile-detail:focus-visible {
|
|
323
|
+
outline-offset: 2px;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
@media (hover: hover) and (pointer: fine) {
|
|
327
|
+
.mb-accessory-tile:not([data-active], [data-partial], [data-state="alert"], :has(> .mb-accessory-tile-toggle[data-pressed])):has(
|
|
328
|
+
> .mb-accessory-tile-detail:hover
|
|
329
|
+
) {
|
|
330
|
+
--mb-accessory-tile-bg: light-dark(
|
|
331
|
+
color-mix(in oklch, var(--mb-ink) 4%, rgb(255 255 255 / 0.5)),
|
|
332
|
+
color-mix(in oklch, var(--mb-bg-elevated) 68%, transparent)
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.mb-accessory-tile-toggle:not([data-disabled]):hover {
|
|
337
|
+
scale: 1.06;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* Touch: the whole tile gives under the finger, on pointer-down. */
|
|
342
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
343
|
+
.mb-accessory-tile:has(> .mb-accessory-tile-detail:active, > .mb-accessory-tile-toggle:not([data-disabled]):active) {
|
|
344
|
+
scale: 0.96;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@scope ([data-platform="macos"]) to (:scope [data-platform]) {
|
|
349
|
+
.mb-accessory-tile-toggle:not([data-disabled]):active {
|
|
350
|
+
scale: 0.92;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* A narrow wide tile, as on a small phone: a smaller icon leaves the name room. */
|
|
355
|
+
@container (max-width: 150px) {
|
|
356
|
+
.mb-accessory-tile-toggle,
|
|
357
|
+
.mb-accessory-tile-icon {
|
|
358
|
+
--mb-accessory-tile-icon-size: 30px;
|
|
359
|
+
--mb-accessory-tile-glyph-size: 18px;
|
|
360
|
+
inset-inline-start: 10px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.mb-accessory-tile-detail {
|
|
364
|
+
padding-inline: 46px 8px;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.mb-accessory-tile-name {
|
|
368
|
+
font-size: 14px;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* The grid. */
|
|
373
|
+
.mb-accessory-grid {
|
|
374
|
+
display: grid;
|
|
375
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--mb-accessory-grid-track), 1fr));
|
|
376
|
+
grid-auto-flow: row dense;
|
|
377
|
+
grid-auto-rows: var(--mb-accessory-tile-height);
|
|
378
|
+
gap: var(--mb-accessory-grid-gap);
|
|
379
|
+
min-width: 0;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.mb-accessory-grid > .mb-accessory-tile {
|
|
383
|
+
width: auto;
|
|
384
|
+
min-width: 0;
|
|
385
|
+
height: auto;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.mb-accessory-grid > .mb-accessory-tile[data-size="md"] {
|
|
389
|
+
grid-column: span var(--mb-accessory-tile-md-span);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.mb-accessory-grid > .mb-accessory-tile[data-size="lg"] {
|
|
393
|
+
grid-column: span var(--mb-accessory-tile-md-span);
|
|
394
|
+
grid-row: span 2;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* iPhone: four columns, so two wide tiles or four square tiles to a row. Rows are as tall as a column is wide. */
|
|
398
|
+
@scope ([data-platform="ios"]) to (:scope [data-platform]) {
|
|
399
|
+
.mb-accessory-grid {
|
|
400
|
+
container-type: inline-size;
|
|
401
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
402
|
+
grid-auto-rows: auto;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.mb-accessory-grid > .mb-accessory-tile {
|
|
406
|
+
height: clamp(60px, calc((100cqi - 3 * var(--mb-accessory-grid-gap)) / 4), 96px);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.mb-accessory-grid > .mb-accessory-tile[data-size="lg"] {
|
|
410
|
+
height: auto;
|
|
411
|
+
aspect-ratio: 1;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Continuous corners on the tile; the icon stays a circle. */
|
|
416
|
+
@supports (corner-shape: squircle) {
|
|
417
|
+
.mb-accessory-tile {
|
|
418
|
+
corner-shape: var(--mb-corner-shape);
|
|
419
|
+
border-radius: calc(var(--mb-accessory-tile-radius) * var(--mb-corner-factor));
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/* corner-shape isn't inherited, so the detail button's focus ring restates it to follow the tile's curve. */
|
|
423
|
+
.mb-accessory-tile-detail {
|
|
424
|
+
corner-shape: inherit;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
@media (prefers-contrast: more) {
|
|
429
|
+
.mb-accessory-tile {
|
|
430
|
+
--mb-accessory-tile-edge: var(--mb-control-border);
|
|
431
|
+
--mb-accessory-tile-bg: var(--mb-bg-elevated);
|
|
432
|
+
-webkit-backdrop-filter: none;
|
|
433
|
+
backdrop-filter: none;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.mb-accessory-tile:is([data-active], [data-partial], :has(> .mb-accessory-tile-toggle[data-pressed])) {
|
|
437
|
+
--mb-accessory-tile-bg: var(--mb-accessory-tile-on-bg);
|
|
438
|
+
box-shadow: inset 0 0 0 2px var(--mb-accessory-tile-tint);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
443
|
+
:where(:root:not([data-transparency="full"])) {
|
|
444
|
+
.mb-accessory-tile:not([data-active], [data-partial], [data-state="alert"], :has(> .mb-accessory-tile-toggle[data-pressed])) {
|
|
445
|
+
background-color: var(--mb-bg-elevated);
|
|
446
|
+
-webkit-backdrop-filter: none;
|
|
447
|
+
backdrop-filter: none;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
@media (forced-colors: active) {
|
|
453
|
+
.mb-accessory-tile {
|
|
454
|
+
border: 1px solid CanvasText;
|
|
455
|
+
background: Canvas;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.mb-accessory-tile:is([data-active], :has(> .mb-accessory-tile-toggle[data-pressed])) {
|
|
459
|
+
border: 3px solid Highlight;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* Activity indicator — eight spokes that light in turn around the circle, as on every Apple platform. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-activity-indicator-size-sm: 12px;
|
|
5
|
+
--mb-activity-indicator-size: 16px;
|
|
6
|
+
--mb-activity-indicator-size-lg: 32px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
10
|
+
--mb-activity-indicator-size-sm: 16px;
|
|
11
|
+
--mb-activity-indicator-size: 20px;
|
|
12
|
+
--mb-activity-indicator-size-lg: 37px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.mb-activity-indicator {
|
|
16
|
+
--mb-activity-indicator-current: var(--mb-activity-indicator-size);
|
|
17
|
+
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
flex: none;
|
|
20
|
+
width: var(--mb-activity-indicator-current);
|
|
21
|
+
height: var(--mb-activity-indicator-current);
|
|
22
|
+
vertical-align: middle;
|
|
23
|
+
color: inherit;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mb-activity-indicator[data-size="sm"] {
|
|
27
|
+
--mb-activity-indicator-current: var(--mb-activity-indicator-size-sm);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.mb-activity-indicator[data-size="lg"] {
|
|
31
|
+
--mb-activity-indicator-current: var(--mb-activity-indicator-size-lg);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mb-activity-indicator-spokes {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
fill: currentColor;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
* The chase: each spoke lights fully, then fades until its turn comes round
|
|
42
|
+
* again. A negative delay per spoke (set inline) starts them an eighth of a
|
|
43
|
+
* turn apart, so the bright one travels clockwise with a fading tail.
|
|
44
|
+
* The spokes carry no mb- class, so the reduced-motion reset leaves them
|
|
45
|
+
* turning, as the system spinner does.
|
|
46
|
+
*/
|
|
47
|
+
.mb-activity-indicator {
|
|
48
|
+
--mb-activity-indicator-duration: 0.8s;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mb-activity-indicator-spokes rect {
|
|
52
|
+
opacity: 0.25;
|
|
53
|
+
animation: mb-activity-indicator-chase var(--mb-activity-indicator-duration) linear infinite;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@keyframes mb-activity-indicator-chase {
|
|
57
|
+
0% {
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
100% {
|
|
61
|
+
opacity: 0.25;
|
|
62
|
+
}
|
|
63
|
+
}
|