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,164 @@
|
|
|
1
|
+
/* Lock control — the tall button of a lock's control sheet, with the state in words under it.
|
|
2
|
+
Unlocked is the bright, "on" look, as a lit accessory tile is: it's the state that wants attention. */
|
|
3
|
+
|
|
4
|
+
:where(:root, [data-platform="macos"]) {
|
|
5
|
+
--mb-lock-control-width: 88px;
|
|
6
|
+
--mb-lock-control-height: 168px;
|
|
7
|
+
--mb-lock-control-radius: 24px;
|
|
8
|
+
--mb-lock-control-glyph: 44px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
12
|
+
--mb-lock-control-width: 124px;
|
|
13
|
+
--mb-lock-control-height: 240px;
|
|
14
|
+
--mb-lock-control-radius: 34px;
|
|
15
|
+
--mb-lock-control-glyph: 64px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mb-lock-control {
|
|
19
|
+
--mb-lock-control-bg: light-dark(
|
|
20
|
+
color-mix(in oklch, var(--mb-ink) 58%, transparent),
|
|
21
|
+
color-mix(in oklch, var(--mb-ink) 20%, transparent)
|
|
22
|
+
);
|
|
23
|
+
--mb-lock-control-fg: light-dark(rgb(255 255 255 / 0.95), rgb(255 255 255 / 0.85));
|
|
24
|
+
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: var(--mb-space-3);
|
|
29
|
+
color: var(--mb-label);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.mb-lock-control[data-position="unlocked"] {
|
|
33
|
+
--mb-lock-control-bg: #ffffff;
|
|
34
|
+
--mb-lock-control-fg: oklch(from var(--mb-teal) 0.5 c h);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mb-lock-control[data-state="jammed"] {
|
|
38
|
+
--mb-lock-control-bg: var(--mb-yellow);
|
|
39
|
+
--mb-lock-control-fg: rgb(0 0 0 / 0.75);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mb-lock-control-button {
|
|
43
|
+
position: relative;
|
|
44
|
+
display: grid;
|
|
45
|
+
place-items: center;
|
|
46
|
+
width: var(--mb-lock-control-width);
|
|
47
|
+
height: var(--mb-lock-control-height);
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
border: 0;
|
|
51
|
+
border-radius: var(--mb-lock-control-radius);
|
|
52
|
+
background: var(--mb-lock-control-bg);
|
|
53
|
+
-webkit-backdrop-filter: var(--mb-material-filter);
|
|
54
|
+
backdrop-filter: var(--mb-material-filter);
|
|
55
|
+
box-shadow: var(--mb-glass-rim);
|
|
56
|
+
color: var(--mb-lock-control-fg);
|
|
57
|
+
cursor: default;
|
|
58
|
+
-webkit-tap-highlight-color: transparent;
|
|
59
|
+
transition:
|
|
60
|
+
background-color var(--mb-duration-base) var(--mb-ease-out),
|
|
61
|
+
color var(--mb-duration-base) var(--mb-ease-out),
|
|
62
|
+
scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.mb-lock-control-button:active {
|
|
66
|
+
scale: 0.96;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.mb-lock-control-button:focus-visible {
|
|
70
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
71
|
+
outline-offset: var(--mb-focus-ring-offset);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.mb-lock-control-button[data-disabled] {
|
|
75
|
+
opacity: 0.45;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.mb-lock-control-glyph {
|
|
79
|
+
width: var(--mb-lock-control-glyph);
|
|
80
|
+
height: var(--mb-lock-control-glyph);
|
|
81
|
+
overflow: visible;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.mb-lock-control-body {
|
|
85
|
+
fill: currentColor;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mb-lock-control-shackle {
|
|
89
|
+
fill: none;
|
|
90
|
+
stroke: currentColor;
|
|
91
|
+
stroke-width: 4.5;
|
|
92
|
+
stroke-linecap: round;
|
|
93
|
+
transform-box: fill-box;
|
|
94
|
+
transform-origin: 100% 100%;
|
|
95
|
+
transition: translate var(--mb-spring-bouncy-duration) var(--mb-spring-bouncy);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Unlocked: the shackle lifts out of the body. */
|
|
99
|
+
.mb-lock-control[data-position="unlocked"] .mb-lock-control-shackle {
|
|
100
|
+
translate: 0 -5px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* While it works, the glyph breathes. The words say what's happening, so this is decoration. */
|
|
104
|
+
.mb-lock-control[data-pending] .mb-lock-control-glyph {
|
|
105
|
+
animation: mb-lock-control-pending 1.2s var(--mb-ease-in-out) infinite alternate;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes mb-lock-control-pending {
|
|
109
|
+
to {
|
|
110
|
+
opacity: 0.45;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.mb-lock-control-status {
|
|
115
|
+
font: var(--mb-text-headline);
|
|
116
|
+
text-align: center;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.mb-lock-control[data-state="jammed"] .mb-lock-control-status {
|
|
120
|
+
color: light-dark(oklch(from var(--mb-orange) 0.5 c h), oklch(from var(--mb-yellow) max(l, 0.82) c h));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.mb-lock-control[data-pending] .mb-lock-control-status {
|
|
124
|
+
color: var(--mb-label-secondary);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@supports (corner-shape: squircle) {
|
|
128
|
+
.mb-lock-control-button {
|
|
129
|
+
corner-shape: var(--mb-corner-shape);
|
|
130
|
+
border-radius: calc(var(--mb-lock-control-radius) * var(--mb-corner-factor));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@media (prefers-contrast: more) {
|
|
135
|
+
.mb-lock-control-button {
|
|
136
|
+
-webkit-backdrop-filter: none;
|
|
137
|
+
backdrop-filter: none;
|
|
138
|
+
box-shadow: 0 0 0 var(--mb-hairline) var(--mb-control-border);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
143
|
+
:where(:root:not([data-transparency="full"])) {
|
|
144
|
+
.mb-lock-control:not([data-position="unlocked"], [data-state="jammed"]) {
|
|
145
|
+
--mb-lock-control-bg: light-dark(
|
|
146
|
+
color-mix(in oklch, var(--mb-ink) 58%, var(--mb-bg)),
|
|
147
|
+
color-mix(in oklch, var(--mb-ink) 20%, var(--mb-bg))
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.mb-lock-control-button {
|
|
152
|
+
-webkit-backdrop-filter: none;
|
|
153
|
+
backdrop-filter: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@media (forced-colors: active) {
|
|
159
|
+
.mb-lock-control-button {
|
|
160
|
+
border: 1px solid ButtonText;
|
|
161
|
+
background: ButtonFace;
|
|
162
|
+
color: ButtonText;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* Menu Bar — the Mac's translucent strip of menu titles; iPadOS shows it when you pull down from the top. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-menu-bar-height: 24px;
|
|
5
|
+
--mb-menu-bar-item-height: 22px;
|
|
6
|
+
--mb-menu-bar-item-padding: 9px;
|
|
7
|
+
--mb-menu-bar-padding: 6px;
|
|
8
|
+
--mb-menu-bar-font: 400 13px/16px var(--mb-font);
|
|
9
|
+
--mb-menu-bar-radius: var(--mb-radius-xs);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
13
|
+
--mb-menu-bar-height: 44px;
|
|
14
|
+
--mb-menu-bar-item-height: 34px;
|
|
15
|
+
--mb-menu-bar-item-padding: 12px;
|
|
16
|
+
--mb-menu-bar-padding: 10px;
|
|
17
|
+
--mb-menu-bar-font: 400 17px/22px var(--mb-font);
|
|
18
|
+
--mb-menu-bar-radius: var(--mb-radius-full);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.mb-menu-bar {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 0;
|
|
25
|
+
height: var(--mb-menu-bar-height);
|
|
26
|
+
padding-inline: var(--mb-menu-bar-padding);
|
|
27
|
+
background: var(--mb-material-chrome);
|
|
28
|
+
-webkit-backdrop-filter: var(--mb-material-filter);
|
|
29
|
+
backdrop-filter: var(--mb-material-filter);
|
|
30
|
+
box-shadow: inset 0 calc(var(--mb-hairline) * -1) 0 var(--mb-glass-border);
|
|
31
|
+
color: var(--mb-label);
|
|
32
|
+
font: var(--mb-menu-bar-font);
|
|
33
|
+
letter-spacing: var(--mb-tracking-body);
|
|
34
|
+
user-select: none;
|
|
35
|
+
-webkit-user-select: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.mb-menu-bar[data-orientation="vertical"] {
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: stretch;
|
|
41
|
+
height: auto;
|
|
42
|
+
padding: var(--mb-menu-bar-padding) 4px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mb-menu-bar-trigger {
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
flex: none;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 6px;
|
|
50
|
+
height: var(--mb-menu-bar-item-height);
|
|
51
|
+
margin: 0;
|
|
52
|
+
padding: 0 var(--mb-menu-bar-item-padding);
|
|
53
|
+
border: 0;
|
|
54
|
+
border-radius: var(--mb-menu-bar-radius);
|
|
55
|
+
background: transparent;
|
|
56
|
+
color: inherit;
|
|
57
|
+
font: inherit;
|
|
58
|
+
letter-spacing: inherit;
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
cursor: default;
|
|
61
|
+
outline: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.mb-menu-bar-trigger :where(svg) {
|
|
65
|
+
width: 15px;
|
|
66
|
+
height: 15px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.mb-menu-bar-trigger[data-app] {
|
|
70
|
+
font-weight: 700;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.mb-menu-bar-trigger[data-open] {
|
|
74
|
+
background: var(--mb-fill);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.mb-menu-bar-trigger:focus-visible {
|
|
78
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
79
|
+
outline-offset: -1px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.mb-menu-bar-trigger[aria-disabled="true"],
|
|
83
|
+
.mb-menu-bar-trigger:disabled {
|
|
84
|
+
color: var(--mb-label-tertiary);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Menus hang from the bar; they don't grow out of it. */
|
|
88
|
+
.mb-menu-content.mb-menu-bar-content[data-starting-style] {
|
|
89
|
+
scale: 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.mb-menu-content.mb-menu-bar-content[data-ending-style] {
|
|
93
|
+
scale: 1;
|
|
94
|
+
}
|
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Menu — compact rows with a solid accent highlight on macOS; the roomy
|
|
3
|
+
* pull-down menu with trailing icons and row separators on iOS and iPadOS.
|
|
4
|
+
* Select, Combo Box and Context Menu popups reuse these parts.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:where(:root, [data-platform="macos"]) {
|
|
8
|
+
--mb-menu-inset: var(--mb-menu-padding);
|
|
9
|
+
--mb-menu-row-padding: 9px;
|
|
10
|
+
--mb-menu-row-padding-block: 2px;
|
|
11
|
+
--mb-menu-row-radius: var(--mb-row-radius);
|
|
12
|
+
--mb-menu-gutter: 13px;
|
|
13
|
+
--mb-menu-icon-size: 15px;
|
|
14
|
+
--mb-menu-icon-gap: 7px;
|
|
15
|
+
--mb-menu-icon-align: 1;
|
|
16
|
+
--mb-menu-min-width: 180px;
|
|
17
|
+
--mb-menu-label-font: 600 11px/14px var(--mb-font);
|
|
18
|
+
--mb-menu-label-padding: 6px 9px 3px;
|
|
19
|
+
--mb-menu-check-size: 11px;
|
|
20
|
+
--mb-menu-chevron-size: 11px;
|
|
21
|
+
--mb-menu-highlight: var(--mb-accent);
|
|
22
|
+
--mb-menu-on-highlight: var(--mb-on-accent);
|
|
23
|
+
--mb-menu-enter-scale: 0.98;
|
|
24
|
+
--mb-menu-enter-duration: var(--mb-duration-fast);
|
|
25
|
+
--mb-menu-enter-easing: var(--mb-ease-out);
|
|
26
|
+
--mb-menu-exit-duration: var(--mb-duration-instant);
|
|
27
|
+
--mb-menu-exit-scale: 1;
|
|
28
|
+
--mb-menu-nested-enter-scale: 1;
|
|
29
|
+
--mb-menu-shortcut-display: inline;
|
|
30
|
+
/*
|
|
31
|
+
* Menus open over anything, so they run denser than the thick material to keep
|
|
32
|
+
* text and the highlight legible. Mixing toward the opaque surface keeps the
|
|
33
|
+
* reduced-transparency collapse intact.
|
|
34
|
+
*/
|
|
35
|
+
--mb-menu-material: color-mix(in oklch, var(--mb-material-thick) 50%, var(--mb-bg-elevated));
|
|
36
|
+
/* A dark menu over a white window greys out; lift destructive red enough to hold 4.5:1. */
|
|
37
|
+
--mb-menu-destructive-text: light-dark(
|
|
38
|
+
var(--mb-destructive-text),
|
|
39
|
+
oklch(from var(--mb-destructive-text) max(l, 0.76) c h)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
44
|
+
--mb-menu-inset: 0px;
|
|
45
|
+
--mb-menu-row-padding: 16px;
|
|
46
|
+
--mb-menu-row-padding-block: 11px;
|
|
47
|
+
--mb-menu-row-radius: 0px;
|
|
48
|
+
--mb-menu-gutter: 24px;
|
|
49
|
+
--mb-menu-icon-size: 20px;
|
|
50
|
+
--mb-menu-icon-gap: 12px;
|
|
51
|
+
--mb-menu-icon-align: 0;
|
|
52
|
+
--mb-menu-min-width: 250px;
|
|
53
|
+
--mb-menu-label-font: 400 13px/18px var(--mb-font);
|
|
54
|
+
--mb-menu-label-padding: 11px 16px 8px;
|
|
55
|
+
--mb-menu-check-size: 15px;
|
|
56
|
+
--mb-menu-chevron-size: 15px;
|
|
57
|
+
--mb-menu-highlight: light-dark(
|
|
58
|
+
color-mix(in oklch, var(--mb-ink) 14%, transparent),
|
|
59
|
+
color-mix(in oklch, var(--mb-ink) 20%, transparent)
|
|
60
|
+
);
|
|
61
|
+
--mb-menu-on-highlight: var(--mb-label);
|
|
62
|
+
/* The menu grows out of its button on a critically damped spring: menus don't bounce. */
|
|
63
|
+
--mb-menu-enter-scale: 0.5;
|
|
64
|
+
--mb-menu-enter-duration: var(--mb-spring-snappy-duration);
|
|
65
|
+
--mb-menu-enter-easing: var(--mb-spring-snappy);
|
|
66
|
+
--mb-menu-exit-duration: var(--mb-duration-fast);
|
|
67
|
+
--mb-menu-exit-scale: 0.9;
|
|
68
|
+
--mb-menu-nested-enter-scale: 0.6;
|
|
69
|
+
--mb-menu-thick-separator: light-dark(rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.3));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:where([data-platform="ipados"]) {
|
|
73
|
+
--mb-menu-shortcut-display: inline;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:where([data-platform="ios"]) {
|
|
77
|
+
--mb-menu-shortcut-display: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* ── The popup ───────────────────────────────────────────────── */
|
|
81
|
+
|
|
82
|
+
.mb-menu-content {
|
|
83
|
+
--mb-menu-lead: var(--mb-menu-row-padding);
|
|
84
|
+
--mb-menu-icon-space: 0px;
|
|
85
|
+
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
min-width: var(--mb-menu-min-width);
|
|
88
|
+
max-width: calc(100vw - 16px);
|
|
89
|
+
max-height: var(--available-height);
|
|
90
|
+
margin: 0;
|
|
91
|
+
padding: var(--mb-menu-inset);
|
|
92
|
+
overflow-x: hidden;
|
|
93
|
+
overflow-y: auto;
|
|
94
|
+
overscroll-behavior: contain;
|
|
95
|
+
border: 0;
|
|
96
|
+
border-radius: var(--mb-menu-radius);
|
|
97
|
+
background: var(--mb-menu-material);
|
|
98
|
+
-webkit-backdrop-filter: var(--mb-material-filter);
|
|
99
|
+
backdrop-filter: var(--mb-material-filter);
|
|
100
|
+
box-shadow: var(--mb-glass-rim), var(--mb-shadow-menu);
|
|
101
|
+
color: var(--mb-label);
|
|
102
|
+
font: var(--mb-menu-font);
|
|
103
|
+
letter-spacing: var(--mb-tracking-body);
|
|
104
|
+
outline: none;
|
|
105
|
+
user-select: none;
|
|
106
|
+
-webkit-user-select: none;
|
|
107
|
+
-webkit-touch-callout: none;
|
|
108
|
+
transform-origin: var(--transform-origin);
|
|
109
|
+
transition:
|
|
110
|
+
opacity var(--mb-duration-fast) var(--mb-ease-out),
|
|
111
|
+
scale var(--mb-menu-enter-duration) var(--mb-menu-enter-easing);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* The leading check column appears only in a menu that has something to check. */
|
|
115
|
+
.mb-menu-content:has(> .mb-menu-checkable, > :not(.mb-menu-content) > .mb-menu-checkable) {
|
|
116
|
+
--mb-menu-lead: calc(var(--mb-menu-row-padding) + var(--mb-menu-gutter));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.mb-menu-content[data-has-icons] {
|
|
120
|
+
--mb-menu-icon-space: calc((var(--mb-menu-icon-size) + var(--mb-menu-icon-gap)) * var(--mb-menu-icon-align));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.mb-menu-content[data-starting-style] {
|
|
124
|
+
opacity: 0;
|
|
125
|
+
scale: var(--mb-menu-enter-scale);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.mb-menu-content[data-ending-style] {
|
|
129
|
+
opacity: 0;
|
|
130
|
+
scale: var(--mb-menu-exit-scale);
|
|
131
|
+
transition-duration: var(--mb-menu-exit-duration);
|
|
132
|
+
transition-timing-function: var(--mb-ease-out);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.mb-menu-content[data-nested][data-starting-style] {
|
|
136
|
+
scale: var(--mb-menu-nested-enter-scale);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* As a sheet, ui-sdk slides the menu up and follows the finger; this only shapes it. */
|
|
140
|
+
.mb-menu-content[data-presentation="sheet"] {
|
|
141
|
+
--sheet-backdrop: var(--mb-scrim);
|
|
142
|
+
|
|
143
|
+
width: 100%;
|
|
144
|
+
max-width: none;
|
|
145
|
+
max-height: 85dvh;
|
|
146
|
+
padding: 20px 0 max(8px, env(safe-area-inset-bottom));
|
|
147
|
+
border-radius: var(--mb-sheet-radius) var(--mb-sheet-radius) 0 0;
|
|
148
|
+
background: var(--mb-material-thick);
|
|
149
|
+
box-shadow: var(--mb-glass-rim), var(--mb-shadow-window);
|
|
150
|
+
transform-origin: 50% 0;
|
|
151
|
+
/* A sheet opened on top of this one pushes it back. */
|
|
152
|
+
scale: calc(1 - var(--drawer-stack, 0) * 0.05);
|
|
153
|
+
transition: scale var(--mb-spring-sheet-duration) var(--mb-spring-sheet);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.mb-menu-content[data-presentation="sheet"]:is([data-starting-style], [data-ending-style]) {
|
|
157
|
+
opacity: 1;
|
|
158
|
+
scale: calc(1 - var(--drawer-stack, 0) * 0.05);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* The grabber. */
|
|
162
|
+
.mb-menu-content[data-presentation="sheet"]:not([data-nested])::before {
|
|
163
|
+
content: "";
|
|
164
|
+
position: absolute;
|
|
165
|
+
inset-block-start: 6px;
|
|
166
|
+
inset-inline-start: calc(50% - 18px);
|
|
167
|
+
width: 36px;
|
|
168
|
+
height: 5px;
|
|
169
|
+
border-radius: var(--mb-radius-full);
|
|
170
|
+
background: var(--mb-label-tertiary);
|
|
171
|
+
pointer-events: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* A submenu opens in place inside the sheet: no second surface, just its rows under the trigger. */
|
|
175
|
+
.mb-menu-content[data-presentation="sheet"][data-nested] {
|
|
176
|
+
min-width: 0;
|
|
177
|
+
max-height: none;
|
|
178
|
+
padding: 0;
|
|
179
|
+
overflow: visible;
|
|
180
|
+
border-radius: 0;
|
|
181
|
+
border-block-start: var(--mb-hairline) solid var(--mb-separator);
|
|
182
|
+
background: none;
|
|
183
|
+
-webkit-backdrop-filter: none;
|
|
184
|
+
backdrop-filter: none;
|
|
185
|
+
box-shadow: none;
|
|
186
|
+
scale: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.mb-menu-content[data-presentation="sheet"] .mb-menu-sub-trigger-indicator {
|
|
190
|
+
transition: rotate var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.mb-menu-content[data-presentation="sheet"] .mb-menu-sub-trigger[data-open] .mb-menu-sub-trigger-indicator {
|
|
194
|
+
rotate: 90deg;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* The chevron is mirrored in right to left, so it turns the other way to point down. */
|
|
198
|
+
.mb-menu-content[data-presentation="sheet"] .mb-menu-sub-trigger[data-open] .mb-menu-sub-trigger-indicator:where([dir="rtl"] *) {
|
|
199
|
+
rotate: -90deg;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.mb-menu-content[data-presentation="sheet"] .mb-menu-sub-trigger[data-open]:not([data-highlighted]) {
|
|
203
|
+
background: none;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* ── Rows ───────────────────────────────────────────────────── */
|
|
207
|
+
|
|
208
|
+
.mb-menu-item {
|
|
209
|
+
position: relative;
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: center;
|
|
212
|
+
gap: var(--mb-menu-icon-gap);
|
|
213
|
+
min-height: var(--mb-menu-item-height);
|
|
214
|
+
margin: 0;
|
|
215
|
+
padding-block: var(--mb-menu-row-padding-block);
|
|
216
|
+
padding-inline: var(--mb-menu-lead) var(--mb-menu-row-padding);
|
|
217
|
+
border-radius: var(--mb-menu-row-radius);
|
|
218
|
+
color: var(--mb-label);
|
|
219
|
+
white-space: nowrap;
|
|
220
|
+
outline: none;
|
|
221
|
+
cursor: default;
|
|
222
|
+
scroll-margin-block: var(--mb-menu-inset);
|
|
223
|
+
touch-action: manipulation;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.mb-menu-item:not([data-has-icon]) {
|
|
227
|
+
padding-inline-start: calc(var(--mb-menu-lead) + var(--mb-menu-icon-space));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.mb-menu-item:focus-visible {
|
|
231
|
+
outline: none;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.mb-menu-item[data-highlighted]:not([data-disabled]),
|
|
235
|
+
.mb-menu-sub-trigger[data-open]:not([data-disabled]) {
|
|
236
|
+
background: var(--mb-menu-highlight);
|
|
237
|
+
color: var(--mb-menu-on-highlight);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.mb-menu-item[data-disabled] {
|
|
241
|
+
color: var(--mb-label-tertiary);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.mb-menu-item[data-destructive] {
|
|
245
|
+
color: var(--mb-menu-destructive-text);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.mb-menu-item[data-destructive][data-highlighted]:not([data-disabled]) {
|
|
249
|
+
--mb-menu-highlight: var(--mb-destructive);
|
|
250
|
+
--mb-menu-on-highlight: var(--mb-on-destructive);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.mb-menu-item[data-pending] {
|
|
254
|
+
opacity: 0.6;
|
|
255
|
+
cursor: progress;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.mb-menu-item-icon {
|
|
259
|
+
display: inline-flex;
|
|
260
|
+
flex: none;
|
|
261
|
+
align-items: center;
|
|
262
|
+
justify-content: center;
|
|
263
|
+
width: var(--mb-menu-icon-size);
|
|
264
|
+
height: var(--mb-menu-icon-size);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.mb-menu-item-icon :where(svg) {
|
|
268
|
+
width: 100%;
|
|
269
|
+
height: 100%;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.mb-menu-item-icon[data-mirror]:where([dir="rtl"] *) {
|
|
273
|
+
scale: -1 1;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.mb-menu-item-indicator {
|
|
277
|
+
position: absolute;
|
|
278
|
+
inset-inline-start: calc(var(--mb-menu-row-padding) - 1px);
|
|
279
|
+
top: 50%;
|
|
280
|
+
display: flex;
|
|
281
|
+
width: var(--mb-menu-check-size);
|
|
282
|
+
height: var(--mb-menu-check-size);
|
|
283
|
+
translate: 0 -50%;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.mb-menu-item-indicator :where(svg) {
|
|
287
|
+
width: 100%;
|
|
288
|
+
height: 100%;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.mb-menu-item-indicator[data-unchecked] {
|
|
292
|
+
visibility: hidden;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.mb-menu-item > :is(.mb-menu-shortcut, [data-slot="menu-shortcut"]) {
|
|
296
|
+
display: var(--mb-menu-shortcut-display);
|
|
297
|
+
margin-inline-start: auto;
|
|
298
|
+
padding-inline-start: 24px;
|
|
299
|
+
color: var(--mb-label-secondary);
|
|
300
|
+
font-variant-numeric: tabular-nums;
|
|
301
|
+
letter-spacing: 0.02em;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.mb-menu-item[data-highlighted]:not([data-disabled]) > :is(.mb-menu-shortcut, [data-slot="menu-shortcut"]) {
|
|
305
|
+
color: inherit;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.mb-menu-item[data-disabled] > :is(.mb-menu-shortcut, [data-slot="menu-shortcut"]) {
|
|
309
|
+
color: var(--mb-label-quaternary);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.mb-menu-sub-trigger-indicator {
|
|
313
|
+
display: inline-flex;
|
|
314
|
+
flex: none;
|
|
315
|
+
width: var(--mb-menu-chevron-size);
|
|
316
|
+
height: var(--mb-menu-chevron-size);
|
|
317
|
+
margin-inline: auto -2px;
|
|
318
|
+
padding-inline-start: 0;
|
|
319
|
+
color: var(--mb-label-secondary);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.mb-menu-sub-trigger-indicator :where(svg) {
|
|
323
|
+
width: 100%;
|
|
324
|
+
height: 100%;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.mb-menu-sub-trigger-indicator:where([dir="rtl"] *) {
|
|
328
|
+
scale: -1 1;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.mb-menu-sub-trigger:is([data-highlighted], [data-open]):not([data-disabled]) .mb-menu-sub-trigger-indicator {
|
|
332
|
+
color: inherit;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/* ── Groups and separators ──────────────────────────────────── */
|
|
336
|
+
|
|
337
|
+
.mb-menu-group {
|
|
338
|
+
display: block;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.mb-menu-group-label {
|
|
342
|
+
padding: var(--mb-menu-label-padding);
|
|
343
|
+
padding-inline-start: calc(var(--mb-menu-lead) + var(--mb-menu-icon-space));
|
|
344
|
+
color: var(--mb-label-secondary);
|
|
345
|
+
font: var(--mb-menu-label-font);
|
|
346
|
+
letter-spacing: var(--mb-tracking-caption);
|
|
347
|
+
white-space: nowrap;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.mb-menu-separator {
|
|
351
|
+
height: 1px;
|
|
352
|
+
margin: 5px var(--mb-menu-row-padding);
|
|
353
|
+
background: var(--mb-separator);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/* ── iOS and iPadOS: flush rows, hairlines between them, a thick band between groups ── */
|
|
357
|
+
|
|
358
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
359
|
+
.mb-menu-item::before {
|
|
360
|
+
content: "";
|
|
361
|
+
position: absolute;
|
|
362
|
+
inset: 0 0 auto;
|
|
363
|
+
height: var(--mb-hairline);
|
|
364
|
+
background: var(--mb-separator);
|
|
365
|
+
pointer-events: none;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.mb-menu-content > .mb-menu-item:first-child::before,
|
|
369
|
+
.mb-menu-content > .mb-menu-group:first-child > .mb-menu-item:first-child::before,
|
|
370
|
+
.mb-menu-separator + .mb-menu-item::before,
|
|
371
|
+
.mb-menu-separator + .mb-menu-group > .mb-menu-item:first-child::before,
|
|
372
|
+
.mb-menu-item[data-highlighted]::before,
|
|
373
|
+
.mb-menu-item[data-highlighted] + .mb-menu-item::before {
|
|
374
|
+
content: none;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.mb-menu-separator {
|
|
378
|
+
height: 8px;
|
|
379
|
+
margin: 0;
|
|
380
|
+
background: var(--mb-menu-thick-separator);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.mb-menu-item-icon {
|
|
384
|
+
order: 3;
|
|
385
|
+
margin-inline-start: auto;
|
|
386
|
+
padding-inline-start: 16px;
|
|
387
|
+
box-sizing: content-box;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.mb-menu-item-icon ~ .mb-menu-sub-trigger-indicator {
|
|
391
|
+
order: 4;
|
|
392
|
+
margin-inline-start: 0;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.mb-menu-item[data-destructive] .mb-menu-item-icon {
|
|
396
|
+
color: var(--mb-menu-destructive-text);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.mb-menu-item:active:not([data-disabled]) {
|
|
400
|
+
background: var(--mb-menu-highlight);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* ── The pull-down button ───────────────────────────────────── */
|
|
405
|
+
|
|
406
|
+
.mb-menu-trigger-indicator {
|
|
407
|
+
display: inline-flex;
|
|
408
|
+
flex: none;
|
|
409
|
+
width: calc(var(--mb-icon-size) * 0.7);
|
|
410
|
+
height: calc(var(--mb-icon-size) * 0.7);
|
|
411
|
+
margin-inline-end: -2px;
|
|
412
|
+
opacity: 0.8;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.mb-menu-trigger-indicator svg {
|
|
416
|
+
width: 100%;
|
|
417
|
+
height: 100%;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.mb-menu-trigger[data-open][data-variant="bezeled"] {
|
|
421
|
+
--mb-button-bg: color-mix(in oklch, var(--mb-bg-control), var(--mb-ink) 10%);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.mb-menu-trigger[data-open][data-variant="plain"] {
|
|
425
|
+
--mb-button-bg: var(--mb-fill-tertiary);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.mb-menu-trigger[data-open][data-variant="filled"] {
|
|
429
|
+
--mb-button-bg: var(--mb-accent-pressed);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/* ── Context areas ──────────────────────────────────────────── */
|
|
433
|
+
|
|
434
|
+
.mb-menu-context-trigger {
|
|
435
|
+
-webkit-touch-callout: none;
|
|
436
|
+
-webkit-user-select: none;
|
|
437
|
+
user-select: none;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* Continuous corners on the menu, and on the sheet it becomes on touch. Rows keep their small round radius. */
|
|
441
|
+
@supports (corner-shape: squircle) {
|
|
442
|
+
.mb-menu-content {
|
|
443
|
+
corner-shape: var(--mb-corner-shape);
|
|
444
|
+
border-radius: calc(var(--mb-menu-radius) * var(--mb-corner-factor));
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.mb-menu-content[data-presentation="sheet"] {
|
|
448
|
+
border-radius: calc(var(--mb-sheet-radius) * var(--mb-corner-factor)) calc(var(--mb-sheet-radius) * var(--mb-corner-factor)) 0 0;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.mb-menu-content[data-presentation="sheet"][data-nested] {
|
|
452
|
+
border-radius: 0;
|
|
453
|
+
}
|
|
454
|
+
}
|