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