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,290 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Select — the Mac's pop-up button (a bezel with an accent cap holding a
|
|
3
|
+
* double chevron) and the iOS menu picker (accent text and an up-and-down
|
|
4
|
+
* chevron). The list is a menu with a checkmark beside the chosen item.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:where(:root, [data-platform="macos"]) {
|
|
8
|
+
--mb-select-plain-fg: var(--mb-label);
|
|
9
|
+
--mb-select-padding-start: 10px;
|
|
10
|
+
--mb-select-cap-inset: 4px;
|
|
11
|
+
--mb-select-chevron-size: 12px;
|
|
12
|
+
--mb-select-font: 400 13px/16px var(--mb-font);
|
|
13
|
+
/* Lines the menu's text up with the button's, as the Mac does. */
|
|
14
|
+
--mb-select-content-shift: calc(var(--mb-select-padding-start) - var(--mb-menu-inset) - var(--mb-menu-row-padding) - var(--mb-menu-gutter));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
18
|
+
--mb-select-plain-fg: var(--mb-accent-text);
|
|
19
|
+
--mb-select-padding-start: 16px;
|
|
20
|
+
--mb-select-cap-inset: 6px;
|
|
21
|
+
--mb-select-chevron-size: 15px;
|
|
22
|
+
--mb-select-font: 400 17px/22px var(--mb-font);
|
|
23
|
+
--mb-select-content-shift: 0px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mb-select-trigger {
|
|
27
|
+
--mb-select-height: var(--mb-control-height);
|
|
28
|
+
--mb-select-bg: var(--mb-bg-control);
|
|
29
|
+
--mb-select-fg: var(--mb-label);
|
|
30
|
+
--mb-select-shadow: 0 0 0 var(--mb-hairline) var(--mb-control-border), 0 0.5px 1.5px var(--mb-shadow-color);
|
|
31
|
+
--mb-select-cap-bg: var(--mb-accent);
|
|
32
|
+
--mb-select-cap-fg: var(--mb-on-accent);
|
|
33
|
+
--mb-select-cap-size: calc(var(--mb-select-height) - var(--mb-select-cap-inset) * 2);
|
|
34
|
+
--mb-select-radius: var(--mb-control-radius);
|
|
35
|
+
|
|
36
|
+
position: relative;
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
flex: none;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: 8px;
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
height: var(--mb-select-height);
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding-block: 0;
|
|
45
|
+
padding-inline: var(--mb-select-padding-start) var(--mb-select-cap-inset);
|
|
46
|
+
border: 0;
|
|
47
|
+
border-radius: var(--mb-select-radius);
|
|
48
|
+
background: var(--mb-select-bg);
|
|
49
|
+
box-shadow: var(--mb-select-shadow);
|
|
50
|
+
color: var(--mb-select-fg);
|
|
51
|
+
font: var(--mb-select-font);
|
|
52
|
+
letter-spacing: var(--mb-tracking-body);
|
|
53
|
+
text-align: start;
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
cursor: default;
|
|
56
|
+
user-select: none;
|
|
57
|
+
-webkit-user-select: none;
|
|
58
|
+
touch-action: manipulation;
|
|
59
|
+
transition:
|
|
60
|
+
background-color var(--mb-duration-fast) var(--mb-ease-out),
|
|
61
|
+
opacity var(--mb-duration-fast) var(--mb-ease-out);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.mb-select-trigger::after {
|
|
65
|
+
content: "";
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset: 50% auto auto 50%;
|
|
68
|
+
width: max(100%, var(--mb-hit-target));
|
|
69
|
+
height: max(100%, var(--mb-hit-target));
|
|
70
|
+
translate: -50% -50%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.mb-select-trigger[data-size="sm"] {
|
|
74
|
+
--mb-select-height: var(--mb-control-height-sm);
|
|
75
|
+
--mb-select-cap-inset: 3px;
|
|
76
|
+
--mb-select-radius: var(--mb-control-radius-sm);
|
|
77
|
+
font: var(--mb-control-font-sm);
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.mb-select-trigger[data-size="lg"] {
|
|
82
|
+
--mb-select-height: var(--mb-control-height-lg);
|
|
83
|
+
--mb-select-radius: var(--mb-control-radius-lg);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.mb-select-value {
|
|
87
|
+
flex: 1 1 auto;
|
|
88
|
+
min-width: 0;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mb-select-value[data-placeholder] {
|
|
94
|
+
color: var(--mb-label-secondary);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.mb-select-value-icon {
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
flex: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mb-select-value-icon :where(svg) {
|
|
103
|
+
width: var(--mb-menu-icon-size);
|
|
104
|
+
height: var(--mb-menu-icon-size);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.mb-select-trigger-cap {
|
|
108
|
+
display: inline-flex;
|
|
109
|
+
flex: none;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
width: var(--mb-select-cap-size);
|
|
113
|
+
height: var(--mb-select-cap-size);
|
|
114
|
+
margin-inline-start: auto;
|
|
115
|
+
border-radius: max(3px, calc(var(--mb-select-radius) - var(--mb-select-cap-inset)));
|
|
116
|
+
background: var(--mb-select-cap-bg);
|
|
117
|
+
color: var(--mb-select-cap-fg);
|
|
118
|
+
box-shadow: inset 0 0.5px 0 rgb(255 255 255 / 0.28);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.mb-select-trigger-cap svg {
|
|
122
|
+
width: var(--mb-select-chevron-size);
|
|
123
|
+
height: var(--mb-select-chevron-size);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Plain: text and a chevron, for toolbars, forms and inline choices. */
|
|
127
|
+
.mb-select-trigger[data-variant="plain"] {
|
|
128
|
+
--mb-select-bg: transparent;
|
|
129
|
+
--mb-select-shadow: none;
|
|
130
|
+
--mb-select-fg: var(--mb-select-plain-fg);
|
|
131
|
+
--mb-select-cap-bg: transparent;
|
|
132
|
+
--mb-select-cap-fg: currentColor;
|
|
133
|
+
--mb-select-cap-size: var(--mb-select-chevron-size);
|
|
134
|
+
gap: 4px;
|
|
135
|
+
padding-inline: 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.mb-select-trigger[data-variant="plain"] .mb-select-trigger-cap {
|
|
139
|
+
box-shadow: none;
|
|
140
|
+
opacity: 0.85;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
144
|
+
.mb-select-trigger[data-variant="auto"] {
|
|
145
|
+
--mb-select-bg: transparent;
|
|
146
|
+
--mb-select-shadow: none;
|
|
147
|
+
--mb-select-fg: var(--mb-select-plain-fg);
|
|
148
|
+
--mb-select-cap-bg: transparent;
|
|
149
|
+
--mb-select-cap-fg: currentColor;
|
|
150
|
+
--mb-select-cap-size: var(--mb-select-chevron-size);
|
|
151
|
+
gap: 4px;
|
|
152
|
+
padding-inline: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.mb-select-trigger[data-variant="auto"] .mb-select-trigger-cap {
|
|
156
|
+
box-shadow: none;
|
|
157
|
+
opacity: 0.85;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.mb-select-trigger[data-variant="bezeled"] {
|
|
161
|
+
--mb-select-bg: var(--mb-fill-secondary);
|
|
162
|
+
--mb-select-shadow: none;
|
|
163
|
+
--mb-select-fg: var(--mb-accent-text);
|
|
164
|
+
--mb-select-cap-bg: transparent;
|
|
165
|
+
--mb-select-cap-fg: currentColor;
|
|
166
|
+
--mb-select-cap-size: var(--mb-select-chevron-size);
|
|
167
|
+
padding-inline-end: var(--mb-select-padding-start);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.mb-select-trigger:active:not([data-disabled]),
|
|
171
|
+
.mb-select-trigger[data-open] {
|
|
172
|
+
opacity: 0.45;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.mb-select-trigger[data-variant="bezeled"]:is(:active, [data-open]) {
|
|
176
|
+
opacity: 1;
|
|
177
|
+
--mb-select-bg: var(--mb-fill);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@media (hover: hover) and (pointer: fine) {
|
|
182
|
+
.mb-select-trigger:not([data-variant="plain"]):hover {
|
|
183
|
+
--mb-select-bg: color-mix(in oklch, var(--mb-bg-control), var(--mb-ink) 5%);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@scope (:root:not([data-platform]), [data-platform="macos"]) to (:scope [data-platform]) {
|
|
188
|
+
.mb-select-trigger:not([data-variant="plain"]):is(:active, [data-open]) {
|
|
189
|
+
--mb-select-bg: color-mix(in oklch, var(--mb-bg-control), var(--mb-ink) 10%);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.mb-select-trigger[data-variant="plain"]:is(:active, [data-open]) {
|
|
193
|
+
opacity: 0.7;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.mb-select-trigger:focus-visible {
|
|
198
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
199
|
+
outline-offset: var(--mb-focus-ring-offset);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.mb-select-trigger:where([data-disabled], :disabled) {
|
|
203
|
+
opacity: 0.4;
|
|
204
|
+
pointer-events: none;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.mb-select-trigger[data-readonly] .mb-select-trigger-cap {
|
|
208
|
+
visibility: hidden;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.mb-select-label {
|
|
212
|
+
color: var(--mb-label);
|
|
213
|
+
font: var(--mb-text-body);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.mb-select-label[data-disabled] {
|
|
217
|
+
color: var(--mb-label-tertiary);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/* ── The list ───────────────────────────────────────────────── */
|
|
221
|
+
|
|
222
|
+
/* A pop-up menu always keeps its check column, so choices don't shift as the value changes. */
|
|
223
|
+
.mb-menu-content.mb-select-content {
|
|
224
|
+
--mb-menu-lead: calc(var(--mb-menu-row-padding) + var(--mb-menu-gutter));
|
|
225
|
+
|
|
226
|
+
min-width: max(var(--mb-menu-min-width), calc(var(--anchor-width) - var(--mb-select-content-shift)));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* The sheet's translate belongs to its drag, so only the popover shifts. */
|
|
230
|
+
.mb-menu-content.mb-select-content:not([data-presentation="sheet"]) {
|
|
231
|
+
translate: var(--mb-select-content-shift) 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.mb-menu-content.mb-select-content:not([data-presentation="sheet"]):where([dir="rtl"] *) {
|
|
235
|
+
translate: calc(var(--mb-select-content-shift) * -1) 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* As a bottom sheet it spans the screen; menu.css draws the grabber and the scrim. */
|
|
239
|
+
.mb-menu-content.mb-select-content[data-presentation="sheet"] {
|
|
240
|
+
min-width: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.mb-select-item-indicator:not([data-selected]) {
|
|
244
|
+
visibility: hidden;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.mb-select-item-text mark,
|
|
248
|
+
.mb-select-item-text [data-matched] {
|
|
249
|
+
background: none;
|
|
250
|
+
color: inherit;
|
|
251
|
+
font-weight: 600;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.mb-select-input {
|
|
255
|
+
display: block;
|
|
256
|
+
width: calc(100% - var(--mb-menu-row-padding));
|
|
257
|
+
height: var(--mb-menu-item-height);
|
|
258
|
+
margin: 2px auto 4px;
|
|
259
|
+
padding-inline: 8px;
|
|
260
|
+
border: 0;
|
|
261
|
+
border-radius: var(--mb-menu-row-radius);
|
|
262
|
+
background: var(--mb-fill-tertiary);
|
|
263
|
+
color: var(--mb-label);
|
|
264
|
+
font: inherit;
|
|
265
|
+
outline: none;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.mb-select-input::placeholder {
|
|
269
|
+
color: var(--mb-placeholder);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.mb-select-input:focus-visible {
|
|
273
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
274
|
+
outline-offset: 0;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.mb-select-empty:not(:empty),
|
|
278
|
+
.mb-select-status:not(:empty) {
|
|
279
|
+
padding: 6px var(--mb-menu-row-padding);
|
|
280
|
+
color: var(--mb-label-secondary);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.mb-select-clear {
|
|
284
|
+
display: inline-flex;
|
|
285
|
+
align-items: center;
|
|
286
|
+
justify-content: center;
|
|
287
|
+
border: 0;
|
|
288
|
+
background: none;
|
|
289
|
+
color: var(--mb-label-secondary);
|
|
290
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/* Sensor readout — a reading in a row or a small tile. Warnings and alerts change the icon and value color, and the
|
|
2
|
+
value says what's wrong in words. */
|
|
3
|
+
|
|
4
|
+
:where(:root, [data-platform="macos"]) {
|
|
5
|
+
--mb-sensor-readout-min-height: 40px;
|
|
6
|
+
--mb-sensor-readout-padding: 8px 12px;
|
|
7
|
+
--mb-sensor-readout-inset: 12px;
|
|
8
|
+
--mb-sensor-readout-icon-size: 24px;
|
|
9
|
+
--mb-sensor-readout-glyph-size: 14px;
|
|
10
|
+
--mb-sensor-readout-label-font: 400 13px/16px var(--mb-font);
|
|
11
|
+
--mb-sensor-readout-detail-font: 400 11px/14px var(--mb-font);
|
|
12
|
+
--mb-sensor-readout-value-font: 600 13px/16px var(--mb-font);
|
|
13
|
+
--mb-sensor-readout-tile-value-font: 600 22px/26px var(--mb-font-rounded);
|
|
14
|
+
--mb-sensor-group-radius: 10px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
18
|
+
--mb-sensor-readout-min-height: 52px;
|
|
19
|
+
--mb-sensor-readout-padding: 10px 16px;
|
|
20
|
+
--mb-sensor-readout-inset: 16px;
|
|
21
|
+
--mb-sensor-readout-icon-size: 30px;
|
|
22
|
+
--mb-sensor-readout-glyph-size: 18px;
|
|
23
|
+
--mb-sensor-readout-label-font: 400 17px/22px var(--mb-font);
|
|
24
|
+
--mb-sensor-readout-detail-font: 400 13px/18px var(--mb-font);
|
|
25
|
+
--mb-sensor-readout-value-font: 400 17px/22px var(--mb-font);
|
|
26
|
+
--mb-sensor-readout-tile-value-font: 600 28px/34px var(--mb-font-rounded);
|
|
27
|
+
--mb-sensor-group-radius: 16px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.mb-sensor-readout {
|
|
31
|
+
--mb-sensor-readout-tone: var(--mb-label-secondary);
|
|
32
|
+
--mb-sensor-readout-value-color: var(--mb-label-secondary);
|
|
33
|
+
--mb-sensor-readout-fill: var(--mb-green);
|
|
34
|
+
|
|
35
|
+
display: grid;
|
|
36
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
37
|
+
grid-template-areas:
|
|
38
|
+
"icon text value"
|
|
39
|
+
"icon meter meter";
|
|
40
|
+
align-items: center;
|
|
41
|
+
column-gap: 12px;
|
|
42
|
+
row-gap: 6px;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
min-height: var(--mb-sensor-readout-min-height);
|
|
45
|
+
padding: var(--mb-sensor-readout-padding);
|
|
46
|
+
color: var(--mb-label);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.mb-sensor-readout:not(:has(> .mb-sensor-readout-meter)) {
|
|
50
|
+
grid-template-areas: "icon text value";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mb-sensor-readout:not(:has(> .mb-sensor-readout-icon)) {
|
|
54
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
55
|
+
grid-template-areas:
|
|
56
|
+
"text value"
|
|
57
|
+
"meter meter";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.mb-sensor-readout[data-level="warning"] {
|
|
61
|
+
--mb-sensor-readout-tone: light-dark(oklch(from var(--mb-orange) min(l, 0.58) c h), var(--mb-orange));
|
|
62
|
+
--mb-sensor-readout-value-color: var(--mb-sensor-readout-tone);
|
|
63
|
+
--mb-sensor-readout-fill: var(--mb-orange);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.mb-sensor-readout[data-level="alert"] {
|
|
67
|
+
--mb-sensor-readout-tone: var(--mb-destructive-text);
|
|
68
|
+
--mb-sensor-readout-value-color: var(--mb-destructive-text);
|
|
69
|
+
--mb-sensor-readout-fill: var(--mb-red);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.mb-sensor-readout-icon {
|
|
73
|
+
grid-area: icon;
|
|
74
|
+
display: grid;
|
|
75
|
+
place-items: center;
|
|
76
|
+
width: var(--mb-sensor-readout-icon-size);
|
|
77
|
+
height: var(--mb-sensor-readout-icon-size);
|
|
78
|
+
border-radius: var(--mb-radius-full);
|
|
79
|
+
background: var(--mb-fill-tertiary);
|
|
80
|
+
color: var(--mb-sensor-readout-tone);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.mb-sensor-readout[data-level="alert"] .mb-sensor-readout-icon {
|
|
84
|
+
background: oklch(from var(--mb-red) 0.6 0.21 h);
|
|
85
|
+
color: white;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mb-sensor-readout-icon > :where(svg) {
|
|
89
|
+
width: var(--mb-sensor-readout-glyph-size);
|
|
90
|
+
height: var(--mb-sensor-readout-glyph-size);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mb-sensor-readout-text {
|
|
94
|
+
grid-area: text;
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
min-width: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.mb-sensor-readout-label {
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
font: var(--mb-sensor-readout-label-font);
|
|
103
|
+
letter-spacing: var(--mb-tracking-body);
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
text-overflow: ellipsis;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.mb-sensor-readout-detail {
|
|
109
|
+
color: var(--mb-label-secondary);
|
|
110
|
+
font: var(--mb-sensor-readout-detail-font);
|
|
111
|
+
letter-spacing: var(--mb-tracking-caption);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.mb-sensor-readout-value {
|
|
115
|
+
grid-area: value;
|
|
116
|
+
color: var(--mb-sensor-readout-value-color);
|
|
117
|
+
font: var(--mb-sensor-readout-value-font);
|
|
118
|
+
letter-spacing: var(--mb-tracking-body);
|
|
119
|
+
font-variant-numeric: tabular-nums;
|
|
120
|
+
text-align: end;
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.mb-sensor-readout:is([data-level="warning"], [data-level="alert"]) .mb-sensor-readout-value {
|
|
125
|
+
font-weight: 600;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.mb-sensor-readout-meter {
|
|
129
|
+
grid-area: meter;
|
|
130
|
+
display: block;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.mb-sensor-readout-meter-track {
|
|
134
|
+
position: relative;
|
|
135
|
+
display: block;
|
|
136
|
+
height: 4px;
|
|
137
|
+
overflow: hidden;
|
|
138
|
+
border-radius: var(--mb-radius-full);
|
|
139
|
+
background: var(--mb-fill-secondary);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.mb-sensor-readout-meter-indicator {
|
|
143
|
+
position: absolute;
|
|
144
|
+
inset-block: 0;
|
|
145
|
+
inset-inline-start: 0;
|
|
146
|
+
border-radius: inherit;
|
|
147
|
+
background: var(--mb-sensor-readout-fill);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* A tile: icon, then the value large, then what it measures. */
|
|
151
|
+
.mb-sensor-readout[data-layout="tile"] {
|
|
152
|
+
grid-template-columns: minmax(0, 1fr);
|
|
153
|
+
grid-template-areas:
|
|
154
|
+
"icon"
|
|
155
|
+
"value"
|
|
156
|
+
"text"
|
|
157
|
+
"meter";
|
|
158
|
+
align-items: start;
|
|
159
|
+
align-content: start;
|
|
160
|
+
row-gap: 4px;
|
|
161
|
+
min-width: 0;
|
|
162
|
+
padding: 12px;
|
|
163
|
+
border-radius: var(--mb-sensor-group-radius);
|
|
164
|
+
background: var(--mb-fill-quaternary);
|
|
165
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.mb-sensor-readout[data-layout="tile"] .mb-sensor-readout-icon {
|
|
169
|
+
margin-block-end: 4px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.mb-sensor-readout[data-layout="tile"] .mb-sensor-readout-value {
|
|
173
|
+
color: var(--mb-label);
|
|
174
|
+
font: var(--mb-sensor-readout-tile-value-font);
|
|
175
|
+
text-align: start;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.mb-sensor-readout[data-layout="tile"]:is([data-level="warning"], [data-level="alert"]) .mb-sensor-readout-value {
|
|
179
|
+
color: var(--mb-sensor-readout-value-color);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.mb-sensor-readout[data-layout="tile"] .mb-sensor-readout-label {
|
|
183
|
+
color: var(--mb-label-secondary);
|
|
184
|
+
font: var(--mb-sensor-readout-detail-font);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.mb-sensor-readout[data-layout="tile"] .mb-sensor-readout-meter {
|
|
188
|
+
margin-block-start: 6px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* A group of rows on one rounded surface, with inset separators. */
|
|
192
|
+
.mb-sensor-group {
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
border-radius: var(--mb-sensor-group-radius);
|
|
197
|
+
background: var(--mb-bg-grouped-secondary);
|
|
198
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) light-dark(var(--mb-separator), transparent);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.mb-sensor-group > .mb-sensor-readout {
|
|
202
|
+
position: relative;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* The separator starts where the text does, as in an inset list. */
|
|
206
|
+
.mb-sensor-group > .mb-sensor-readout + .mb-sensor-readout::before {
|
|
207
|
+
content: "";
|
|
208
|
+
position: absolute;
|
|
209
|
+
inset-block-start: 0;
|
|
210
|
+
inset-inline: var(--mb-sensor-group-separator-start, var(--mb-sensor-readout-inset)) 0;
|
|
211
|
+
height: var(--mb-hairline);
|
|
212
|
+
background: var(--mb-separator);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.mb-sensor-group > .mb-sensor-readout + .mb-sensor-readout:has(> .mb-sensor-readout-icon) {
|
|
216
|
+
--mb-sensor-group-separator-start: calc(var(--mb-sensor-readout-inset) + var(--mb-sensor-readout-icon-size) + 12px);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@supports (corner-shape: squircle) {
|
|
220
|
+
.mb-sensor-group,
|
|
221
|
+
.mb-sensor-readout[data-layout="tile"] {
|
|
222
|
+
corner-shape: var(--mb-corner-shape);
|
|
223
|
+
border-radius: calc(var(--mb-sensor-group-radius) * var(--mb-corner-factor));
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@media (forced-colors: active) {
|
|
228
|
+
.mb-sensor-readout-meter-indicator {
|
|
229
|
+
background: Highlight;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* Separator — the HIG hairline between groups of content. */
|
|
2
|
+
|
|
3
|
+
.mb-separator {
|
|
4
|
+
--mb-separator-color: var(--mb-separator);
|
|
5
|
+
--mb-separator-inset: var(--mb-row-padding);
|
|
6
|
+
|
|
7
|
+
flex: none;
|
|
8
|
+
margin: 0;
|
|
9
|
+
border: 0 solid var(--mb-separator-color);
|
|
10
|
+
background: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Borders round to whole device pixels, so a 0.5px hairline is one physical pixel on any screen. */
|
|
14
|
+
.mb-separator[data-orientation="horizontal"] {
|
|
15
|
+
align-self: stretch;
|
|
16
|
+
height: 0;
|
|
17
|
+
border-block-start-width: var(--mb-hairline);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.mb-separator[data-orientation="vertical"] {
|
|
21
|
+
align-self: stretch;
|
|
22
|
+
width: 0;
|
|
23
|
+
min-height: 1em;
|
|
24
|
+
border-inline-start-width: var(--mb-hairline);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.mb-separator[data-orientation="horizontal"][data-inset="both"] {
|
|
28
|
+
margin-inline: var(--mb-separator-inset);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.mb-separator[data-orientation="horizontal"][data-inset="leading"] {
|
|
32
|
+
margin-inline-start: var(--mb-separator-inset);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.mb-separator[data-orientation="vertical"][data-inset] {
|
|
36
|
+
margin-block: var(--mb-space-2);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.mb-separator-labeled {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: var(--mb-space-5);
|
|
43
|
+
align-self: stretch;
|
|
44
|
+
min-width: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.mb-separator-labeled[data-inset="both"] {
|
|
48
|
+
padding-inline: var(--mb-row-padding);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mb-separator-labeled > .mb-separator {
|
|
52
|
+
flex: 1 1 0;
|
|
53
|
+
align-self: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.mb-separator-label {
|
|
57
|
+
flex: none;
|
|
58
|
+
font: var(--mb-text-footnote);
|
|
59
|
+
letter-spacing: var(--mb-tracking-caption);
|
|
60
|
+
color: var(--mb-label-secondary);
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* Setup code — the code printed on an accessory, shown in groups with tabular digits, a scanner frame, and the field
|
|
2
|
+
for typing the code by hand. Nothing here draws Apple's HomeKit or Apple Home marks; those are licensed artwork. */
|
|
3
|
+
|
|
4
|
+
:where(:root, [data-platform="macos"]) {
|
|
5
|
+
--mb-setup-code-font: 500 22px/28px var(--mb-font-mono);
|
|
6
|
+
--mb-setup-code-padding: 8px 14px;
|
|
7
|
+
--mb-setup-code-radius: 10px;
|
|
8
|
+
--mb-setup-code-scanner-size: 220px;
|
|
9
|
+
--mb-setup-code-scanner-radius: 16px;
|
|
10
|
+
--mb-setup-code-instruction-font: 400 13px/18px var(--mb-font);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
14
|
+
--mb-setup-code-font: 500 28px/34px var(--mb-font-mono);
|
|
15
|
+
--mb-setup-code-padding: 10px 18px;
|
|
16
|
+
--mb-setup-code-radius: 14px;
|
|
17
|
+
--mb-setup-code-scanner-size: 260px;
|
|
18
|
+
--mb-setup-code-scanner-radius: 24px;
|
|
19
|
+
--mb-setup-code-instruction-font: 400 15px/20px var(--mb-font);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.mb-setup-code {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: 0.5ch;
|
|
26
|
+
padding: var(--mb-setup-code-padding);
|
|
27
|
+
border-radius: var(--mb-setup-code-radius);
|
|
28
|
+
background: var(--mb-fill-tertiary);
|
|
29
|
+
box-shadow: inset 0 0 0 1px var(--mb-separator-strong);
|
|
30
|
+
color: var(--mb-label);
|
|
31
|
+
font: var(--mb-setup-code-font);
|
|
32
|
+
font-variant-numeric: tabular-nums;
|
|
33
|
+
letter-spacing: 0.08em;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
direction: ltr;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* A dash between groups, as on the accessory's label. */
|
|
39
|
+
.mb-setup-code-group + .mb-setup-code-group::before {
|
|
40
|
+
content: "-";
|
|
41
|
+
margin-inline-end: 0.5ch;
|
|
42
|
+
color: var(--mb-label-tertiary);
|
|
43
|
+
letter-spacing: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.mb-setup-code-scanner {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 16px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mb-setup-code-scanner-view {
|
|
54
|
+
position: relative;
|
|
55
|
+
display: grid;
|
|
56
|
+
place-items: center;
|
|
57
|
+
width: var(--mb-setup-code-scanner-size);
|
|
58
|
+
aspect-ratio: 1;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
border-radius: var(--mb-setup-code-scanner-radius);
|
|
61
|
+
/* A dark well with a faint lens vignette, standing in for the camera's picture. */
|
|
62
|
+
background:
|
|
63
|
+
radial-gradient(circle at 50% 45%, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0) 65%),
|
|
64
|
+
rgb(0 0 0 / 0.86);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.mb-setup-code-scanner-view > :where(video, img, canvas, svg:not(.mb-setup-code-scanner-frame)) {
|
|
68
|
+
position: absolute;
|
|
69
|
+
inset: 0;
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
object-fit: cover;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mb-setup-code-scanner-frame {
|
|
76
|
+
position: absolute;
|
|
77
|
+
inset: 18%;
|
|
78
|
+
width: 64%;
|
|
79
|
+
height: 64%;
|
|
80
|
+
fill: none;
|
|
81
|
+
stroke: white;
|
|
82
|
+
stroke-width: 3.5;
|
|
83
|
+
stroke-linecap: round;
|
|
84
|
+
pointer-events: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.mb-setup-code-scanner-instruction {
|
|
88
|
+
max-width: var(--mb-setup-code-scanner-size);
|
|
89
|
+
margin: 0;
|
|
90
|
+
color: var(--mb-label-secondary);
|
|
91
|
+
font: var(--mb-setup-code-instruction-font);
|
|
92
|
+
letter-spacing: var(--mb-tracking-body);
|
|
93
|
+
text-align: center;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Digits read left to right in every language. Eight or eleven cells fit an iPhone's width. */
|
|
97
|
+
.mb-setup-code-field {
|
|
98
|
+
direction: ltr;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
102
|
+
.mb-setup-code-field {
|
|
103
|
+
--mb-code-field-cell-width: 34px;
|
|
104
|
+
--mb-code-field-cell-ratio: 34 / 46;
|
|
105
|
+
--mb-code-field-cell-gap: 5px;
|
|
106
|
+
--mb-code-field-run-gap: 8px;
|
|
107
|
+
--mb-code-field-font: 600 24px/1 var(--mb-font);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mb-setup-code-field[data-format="matter"] {
|
|
111
|
+
--mb-code-field-cell-width: 26px;
|
|
112
|
+
--mb-code-field-cell-ratio: 26 / 40;
|
|
113
|
+
--mb-code-field-cell-gap: 3px;
|
|
114
|
+
--mb-code-field-font: 600 20px/1 var(--mb-font);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@supports (corner-shape: squircle) {
|
|
119
|
+
.mb-setup-code {
|
|
120
|
+
corner-shape: var(--mb-corner-shape);
|
|
121
|
+
border-radius: calc(var(--mb-setup-code-radius) * var(--mb-corner-factor));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.mb-setup-code-scanner-view {
|
|
125
|
+
corner-shape: var(--mb-corner-shape);
|
|
126
|
+
border-radius: calc(var(--mb-setup-code-scanner-radius) * var(--mb-corner-factor));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@media (forced-colors: active) {
|
|
131
|
+
.mb-setup-code {
|
|
132
|
+
border: 1px solid CanvasText;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.mb-setup-code-scanner-frame {
|
|
136
|
+
stroke: CanvasText;
|
|
137
|
+
}
|
|
138
|
+
}
|