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,189 @@
|
|
|
1
|
+
/* Confirmation — an inline card that asks before a tool runs, then folds to one line with the answer. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-confirmation-padding: 14px;
|
|
5
|
+
--mb-confirmation-gap: 10px;
|
|
6
|
+
--mb-confirmation-radius: var(--mb-radius-lg);
|
|
7
|
+
--mb-confirmation-icon-size: 28px;
|
|
8
|
+
--mb-confirmation-icon-radius: 7px;
|
|
9
|
+
--mb-confirmation-icon-glyph: 16px;
|
|
10
|
+
--mb-confirmation-title-font: var(--mb-text-headline);
|
|
11
|
+
--mb-confirmation-description-font: var(--mb-text-body);
|
|
12
|
+
--mb-confirmation-outcome-font: var(--mb-text-body);
|
|
13
|
+
--mb-confirmation-actions-space: 14px;
|
|
14
|
+
--mb-confirmation-max-width: 480px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
18
|
+
--mb-confirmation-padding: 16px;
|
|
19
|
+
--mb-confirmation-gap: 12px;
|
|
20
|
+
--mb-confirmation-radius: var(--mb-group-radius);
|
|
21
|
+
--mb-confirmation-icon-size: 36px;
|
|
22
|
+
--mb-confirmation-icon-radius: 9px;
|
|
23
|
+
--mb-confirmation-icon-glyph: 20px;
|
|
24
|
+
--mb-confirmation-title-font: var(--mb-text-headline);
|
|
25
|
+
--mb-confirmation-description-font: var(--mb-text-subheadline);
|
|
26
|
+
--mb-confirmation-outcome-font: var(--mb-text-subheadline);
|
|
27
|
+
--mb-confirmation-actions-space: 16px;
|
|
28
|
+
--mb-confirmation-max-width: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.mb-confirmation {
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
display: grid;
|
|
34
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
35
|
+
column-gap: var(--mb-confirmation-gap);
|
|
36
|
+
align-items: start;
|
|
37
|
+
width: 100%;
|
|
38
|
+
max-width: var(--mb-confirmation-max-width);
|
|
39
|
+
min-width: 0;
|
|
40
|
+
padding: var(--mb-confirmation-padding);
|
|
41
|
+
border-radius: var(--mb-confirmation-radius);
|
|
42
|
+
background: var(--mb-fill-quaternary);
|
|
43
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator-strong);
|
|
44
|
+
color: var(--mb-label);
|
|
45
|
+
letter-spacing: var(--mb-tracking-body);
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@supports (corner-shape: squircle) {
|
|
50
|
+
.mb-confirmation,
|
|
51
|
+
.mb-confirmation-icon {
|
|
52
|
+
corner-shape: var(--mb-corner-shape);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.mb-confirmation {
|
|
56
|
+
border-radius: calc(var(--mb-confirmation-radius) * var(--mb-corner-factor));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.mb-confirmation-icon {
|
|
60
|
+
border-radius: calc(var(--mb-confirmation-icon-radius) * var(--mb-corner-factor));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.mb-confirmation:focus-visible {
|
|
65
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
66
|
+
outline-offset: var(--mb-focus-ring-offset);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Everything without a place of its own spans the card, under the icon and title. */
|
|
70
|
+
.mb-confirmation > * {
|
|
71
|
+
grid-column: 1 / -1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.mb-confirmation:has(> .mb-confirmation-icon) > :is(.mb-confirmation-title, .mb-confirmation-description) {
|
|
75
|
+
grid-column: 2;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.mb-confirmation-icon {
|
|
79
|
+
display: grid;
|
|
80
|
+
grid-column: 1;
|
|
81
|
+
grid-row: 1 / span 2;
|
|
82
|
+
place-items: center;
|
|
83
|
+
width: var(--mb-confirmation-icon-size);
|
|
84
|
+
height: var(--mb-confirmation-icon-size);
|
|
85
|
+
border-radius: var(--mb-confirmation-icon-radius);
|
|
86
|
+
background: var(--mb-accent);
|
|
87
|
+
color: var(--mb-on-accent);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.mb-confirmation-icon > :where(svg) {
|
|
91
|
+
width: var(--mb-confirmation-icon-glyph);
|
|
92
|
+
height: var(--mb-confirmation-icon-glyph);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.mb-confirmation-icon > :where(.mb-artwork, img) {
|
|
96
|
+
width: 100%;
|
|
97
|
+
height: 100%;
|
|
98
|
+
border-radius: inherit;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.mb-confirmation-title {
|
|
102
|
+
grid-row: 1;
|
|
103
|
+
align-self: center;
|
|
104
|
+
margin: 0;
|
|
105
|
+
color: var(--mb-label);
|
|
106
|
+
font: var(--mb-confirmation-title-font);
|
|
107
|
+
text-wrap: balance;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mb-confirmation-description {
|
|
111
|
+
grid-row: 2;
|
|
112
|
+
margin: 2px 0 0;
|
|
113
|
+
color: var(--mb-label-secondary);
|
|
114
|
+
font: var(--mb-confirmation-description-font);
|
|
115
|
+
text-wrap: pretty;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* With a description beside the icon, the title sits at the top instead of centered. */
|
|
119
|
+
.mb-confirmation:has(> .mb-confirmation-description) > .mb-confirmation-title {
|
|
120
|
+
align-self: end;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.mb-confirmation-details {
|
|
124
|
+
margin-block-start: var(--mb-confirmation-gap);
|
|
125
|
+
padding-block-start: var(--mb-confirmation-gap);
|
|
126
|
+
border-block-start: 1px solid var(--mb-separator);
|
|
127
|
+
min-width: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.mb-confirmation-actions {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-wrap: wrap;
|
|
133
|
+
justify-content: flex-end;
|
|
134
|
+
gap: var(--mb-space-4);
|
|
135
|
+
margin-block-start: var(--mb-confirmation-actions-space);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
139
|
+
/* As in a permission alert: full-width buttons, the last one (the default) on top. */
|
|
140
|
+
.mb-confirmation-actions {
|
|
141
|
+
flex-direction: column-reverse;
|
|
142
|
+
flex-wrap: nowrap;
|
|
143
|
+
gap: var(--mb-space-4);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.mb-confirmation-actions > * {
|
|
147
|
+
width: 100%;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* ── Answered ────────────────────────────────────────────────── */
|
|
152
|
+
|
|
153
|
+
.mb-confirmation:not([data-state="pending"]) {
|
|
154
|
+
display: block;
|
|
155
|
+
width: auto;
|
|
156
|
+
padding: 0;
|
|
157
|
+
background: none;
|
|
158
|
+
box-shadow: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.mb-confirmation-outcome {
|
|
162
|
+
display: inline-flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
gap: var(--mb-space-3);
|
|
165
|
+
margin: 0;
|
|
166
|
+
color: var(--mb-label-secondary);
|
|
167
|
+
font: var(--mb-confirmation-outcome-font);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.mb-confirmation-outcome-glyph {
|
|
171
|
+
flex: none;
|
|
172
|
+
width: 1.15em;
|
|
173
|
+
height: 1.15em;
|
|
174
|
+
fill: none;
|
|
175
|
+
stroke: currentColor;
|
|
176
|
+
stroke-width: 1.8;
|
|
177
|
+
stroke-linecap: round;
|
|
178
|
+
stroke-linejoin: round;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.mb-confirmation[data-state="allowed"] .mb-confirmation-outcome-glyph {
|
|
182
|
+
color: var(--mb-success);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (forced-colors: active) {
|
|
186
|
+
.mb-confirmation[data-state="pending"] {
|
|
187
|
+
border: 1px solid CanvasText;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/* Content unavailable — SwiftUI's ContentUnavailableView: an empty, offline or no-results state. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-content-unavailable-icon-sm: 28px;
|
|
5
|
+
--mb-content-unavailable-icon: 40px;
|
|
6
|
+
--mb-content-unavailable-icon-lg: 56px;
|
|
7
|
+
--mb-content-unavailable-title-sm: var(--mb-text-headline);
|
|
8
|
+
--mb-content-unavailable-title: var(--mb-text-title-3);
|
|
9
|
+
--mb-content-unavailable-title-lg: var(--mb-text-title-1);
|
|
10
|
+
--mb-content-unavailable-description-sm: var(--mb-text-callout);
|
|
11
|
+
--mb-content-unavailable-description: var(--mb-text-body);
|
|
12
|
+
--mb-content-unavailable-description-lg: 400 15px/20px var(--mb-font);
|
|
13
|
+
--mb-content-unavailable-max-width: 340px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
17
|
+
--mb-content-unavailable-icon-sm: 34px;
|
|
18
|
+
--mb-content-unavailable-icon: 48px;
|
|
19
|
+
--mb-content-unavailable-icon-lg: 64px;
|
|
20
|
+
--mb-content-unavailable-title-sm: var(--mb-text-headline);
|
|
21
|
+
--mb-content-unavailable-title: var(--mb-text-title-2);
|
|
22
|
+
--mb-content-unavailable-title-lg: var(--mb-text-title-1);
|
|
23
|
+
--mb-content-unavailable-description-sm: var(--mb-text-subheadline);
|
|
24
|
+
--mb-content-unavailable-description: var(--mb-text-subheadline);
|
|
25
|
+
--mb-content-unavailable-description-lg: var(--mb-text-body);
|
|
26
|
+
--mb-content-unavailable-max-width: 320px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mb-content-unavailable {
|
|
30
|
+
--mb-content-unavailable-icon-size: var(--mb-content-unavailable-icon);
|
|
31
|
+
--mb-content-unavailable-title-font: var(--mb-content-unavailable-title);
|
|
32
|
+
--mb-content-unavailable-description-font: var(--mb-content-unavailable-description);
|
|
33
|
+
--mb-content-unavailable-gap: var(--mb-space-3);
|
|
34
|
+
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex: 1 1 auto;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
align-self: stretch;
|
|
42
|
+
gap: var(--mb-content-unavailable-gap);
|
|
43
|
+
min-width: 0;
|
|
44
|
+
padding: var(--mb-space-8) var(--mb-space-7);
|
|
45
|
+
color: var(--mb-label);
|
|
46
|
+
text-align: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.mb-content-unavailable[data-size="sm"] {
|
|
50
|
+
--mb-content-unavailable-icon-size: var(--mb-content-unavailable-icon-sm);
|
|
51
|
+
--mb-content-unavailable-title-font: var(--mb-content-unavailable-title-sm);
|
|
52
|
+
--mb-content-unavailable-description-font: var(--mb-content-unavailable-description-sm);
|
|
53
|
+
--mb-content-unavailable-gap: var(--mb-space-2);
|
|
54
|
+
padding: var(--mb-space-6) var(--mb-space-5);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.mb-content-unavailable[data-size="lg"] {
|
|
58
|
+
--mb-content-unavailable-icon-size: var(--mb-content-unavailable-icon-lg);
|
|
59
|
+
--mb-content-unavailable-title-font: var(--mb-content-unavailable-title-lg);
|
|
60
|
+
--mb-content-unavailable-description-font: var(--mb-content-unavailable-description-lg);
|
|
61
|
+
--mb-content-unavailable-gap: var(--mb-space-4);
|
|
62
|
+
padding: var(--mb-space-10) var(--mb-space-8);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.mb-content-unavailable-icon {
|
|
66
|
+
display: inline-grid;
|
|
67
|
+
flex: none;
|
|
68
|
+
place-items: center;
|
|
69
|
+
width: var(--mb-content-unavailable-icon-size);
|
|
70
|
+
height: var(--mb-content-unavailable-icon-size);
|
|
71
|
+
margin-block-end: var(--mb-space-2);
|
|
72
|
+
color: var(--mb-label-secondary);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mb-content-unavailable-icon > :where(svg, img) {
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.mb-content-unavailable-title {
|
|
81
|
+
max-width: var(--mb-content-unavailable-max-width);
|
|
82
|
+
margin: 0;
|
|
83
|
+
color: var(--mb-label);
|
|
84
|
+
font: var(--mb-content-unavailable-title-font);
|
|
85
|
+
letter-spacing: var(--mb-tracking-title);
|
|
86
|
+
text-wrap: balance;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.mb-content-unavailable-description {
|
|
90
|
+
max-width: var(--mb-content-unavailable-max-width);
|
|
91
|
+
margin: 0;
|
|
92
|
+
color: var(--mb-label-secondary);
|
|
93
|
+
font: var(--mb-content-unavailable-description-font);
|
|
94
|
+
letter-spacing: var(--mb-tracking-body);
|
|
95
|
+
text-wrap: pretty;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.mb-content-unavailable-actions {
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-wrap: wrap;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
gap: var(--mb-space-4);
|
|
104
|
+
margin-block-start: var(--mb-space-4);
|
|
105
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* Context Menu — the menu, at the pointer on the Mac and lifted from a long press on touch. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-context-menu-enter-scale: 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
8
|
+
--mb-context-menu-enter-scale: 0.6;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mb-menu-content.mb-context-menu-content[data-starting-style] {
|
|
12
|
+
scale: var(--mb-context-menu-enter-scale);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.mb-context-menu-trigger {
|
|
16
|
+
border-radius: var(--mb-group-radius);
|
|
17
|
+
outline-offset: 2px;
|
|
18
|
+
transition:
|
|
19
|
+
scale var(--mb-spring-bouncy-duration) var(--mb-spring-bouncy),
|
|
20
|
+
box-shadow var(--mb-duration-base) var(--mb-ease-out),
|
|
21
|
+
outline-color var(--mb-duration-fast) var(--mb-ease-out);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Finder rings what you right-clicked while its menu is open. */
|
|
25
|
+
@scope (:root:not([data-platform]), [data-platform="macos"]) to (:scope [data-platform]) {
|
|
26
|
+
.mb-context-menu-trigger:not([data-closed]) {
|
|
27
|
+
outline: 2px solid var(--mb-accent);
|
|
28
|
+
outline-offset: -1px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* On touch, the area gives under the finger, then lifts once the menu opens. */
|
|
33
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
34
|
+
.mb-context-menu-trigger:active {
|
|
35
|
+
scale: 0.97;
|
|
36
|
+
transition-duration: var(--mb-duration-slow);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.mb-context-menu-trigger:not([data-closed]) {
|
|
40
|
+
scale: 1.03;
|
|
41
|
+
box-shadow: var(--mb-shadow-4);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Date Picker — the macOS date field: segments that type and step, with a
|
|
3
|
+
* calendar in a translucent popover. Compact is the iOS date button. Date Field
|
|
4
|
+
* and Time Field are the segments on their own.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:where(:root, [data-platform="macos"]) {
|
|
8
|
+
--mb-date-field-segment-radius: 3px;
|
|
9
|
+
--mb-date-field-segment-pad: 1px;
|
|
10
|
+
--mb-date-picker-button-bg: var(--mb-fill-tertiary);
|
|
11
|
+
--mb-date-picker-button-radius: var(--mb-radius-sm);
|
|
12
|
+
--mb-date-picker-button-pad: 8px;
|
|
13
|
+
--mb-date-picker-popover-pad: 10px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
17
|
+
--mb-date-field-segment-radius: 6px;
|
|
18
|
+
--mb-date-field-segment-pad: 2px;
|
|
19
|
+
--mb-date-picker-button-bg: var(--mb-fill-tertiary);
|
|
20
|
+
--mb-date-picker-button-radius: var(--mb-radius-md);
|
|
21
|
+
--mb-date-picker-button-pad: 11px;
|
|
22
|
+
--mb-date-picker-popover-pad: 14px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* The field's box: a text field holding segments. */
|
|
26
|
+
.mb-date-field,
|
|
27
|
+
.mb-date-picker-field {
|
|
28
|
+
--mb-date-field-h: var(--mb-control-height);
|
|
29
|
+
--mb-date-field-bg: var(--mb-text-field-auto-bg);
|
|
30
|
+
--mb-date-field-edge: var(--mb-text-field-auto-edge);
|
|
31
|
+
--mb-date-field-ring: var(--mb-focus-ring);
|
|
32
|
+
|
|
33
|
+
position: relative;
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
height: var(--mb-date-field-h);
|
|
38
|
+
padding-inline: calc(var(--mb-text-field-padding) - var(--mb-date-field-segment-pad));
|
|
39
|
+
border-radius: var(--mb-text-field-radius);
|
|
40
|
+
background: var(--mb-date-field-bg);
|
|
41
|
+
box-shadow: var(--mb-date-field-edge);
|
|
42
|
+
color: var(--mb-label);
|
|
43
|
+
font: var(--mb-text-field-font);
|
|
44
|
+
font-variant-numeric: tabular-nums;
|
|
45
|
+
letter-spacing: var(--mb-tracking-body);
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
outline: var(--mb-focus-ring-width) solid transparent;
|
|
48
|
+
outline-offset: 2px;
|
|
49
|
+
transition:
|
|
50
|
+
outline-color var(--mb-duration-fast) var(--mb-ease-out),
|
|
51
|
+
outline-offset var(--mb-duration-fast) var(--mb-ease-out);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:is(.mb-date-field, .mb-date-picker-field)[data-size="sm"] {
|
|
55
|
+
--mb-date-field-h: var(--mb-control-height-sm);
|
|
56
|
+
font: var(--mb-text-field-font-sm);
|
|
57
|
+
font-variant-numeric: tabular-nums;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:is(.mb-date-field, .mb-date-picker-field)[data-size="lg"] {
|
|
61
|
+
--mb-date-field-h: var(--mb-control-height-lg);
|
|
62
|
+
font: var(--mb-text-field-font-lg);
|
|
63
|
+
font-variant-numeric: tabular-nums;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.mb-date-field[data-variant="bordered"] {
|
|
67
|
+
--mb-date-field-bg: var(--mb-bg-field);
|
|
68
|
+
--mb-date-field-edge: inset 0 0 0 var(--mb-hairline) var(--mb-control-border),
|
|
69
|
+
inset 0 0.5px 1px light-dark(rgb(0 0 0 / 0.07), rgb(0 0 0 / 0.2));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.mb-date-field[data-variant="filled"] {
|
|
73
|
+
--mb-date-field-bg: var(--mb-fill-tertiary);
|
|
74
|
+
--mb-date-field-edge: inset 0 0 0 0 transparent;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.mb-date-field:focus-within,
|
|
78
|
+
.mb-date-picker-field:focus-within {
|
|
79
|
+
outline-color: var(--mb-date-field-ring);
|
|
80
|
+
outline-offset: 0px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.mb-date-field[data-invalid],
|
|
84
|
+
.mb-date-picker-field:has(.mb-date-picker-segments[data-invalid]),
|
|
85
|
+
.mb-date-picker[data-invalid] .mb-date-picker-field {
|
|
86
|
+
--mb-date-field-edge: inset 0 0 0 1px var(--mb-destructive);
|
|
87
|
+
--mb-date-field-ring: color-mix(in oklch, var(--mb-destructive) 60%, transparent);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.mb-date-field[data-disabled],
|
|
91
|
+
.mb-date-picker[data-disabled] .mb-date-picker-field {
|
|
92
|
+
--mb-date-field-bg: var(--mb-fill-quaternary);
|
|
93
|
+
--mb-date-field-edge: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
|
|
94
|
+
color: var(--mb-label-tertiary);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Inside the picker the segments sit in the field's box, beside the calendar button. */
|
|
98
|
+
.mb-date-picker-segments {
|
|
99
|
+
display: inline-flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
flex: 1 1 auto;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Segments: the focused one fills with the accent, the way a macOS date field selects a part. */
|
|
105
|
+
.mb-date-field-segment {
|
|
106
|
+
box-sizing: content-box;
|
|
107
|
+
min-width: 0;
|
|
108
|
+
height: calc(var(--mb-date-field-h) - 8px);
|
|
109
|
+
margin: 0;
|
|
110
|
+
padding: 0 var(--mb-date-field-segment-pad);
|
|
111
|
+
border: 0;
|
|
112
|
+
border-radius: var(--mb-date-field-segment-radius);
|
|
113
|
+
background: transparent;
|
|
114
|
+
color: inherit;
|
|
115
|
+
font: inherit;
|
|
116
|
+
font-variant-numeric: tabular-nums;
|
|
117
|
+
letter-spacing: 0;
|
|
118
|
+
text-align: center;
|
|
119
|
+
caret-color: transparent;
|
|
120
|
+
outline: none;
|
|
121
|
+
field-sizing: content;
|
|
122
|
+
appearance: none;
|
|
123
|
+
transition: background-color var(--mb-duration-instant) var(--mb-ease-out);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
span.mb-date-field-segment {
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
padding: 0;
|
|
130
|
+
white-space: pre;
|
|
131
|
+
color: var(--mb-label-secondary);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.mb-date-field-segment::placeholder {
|
|
135
|
+
color: var(--mb-placeholder);
|
|
136
|
+
opacity: 1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.mb-date-field-segment:focus {
|
|
140
|
+
background: var(--mb-accent);
|
|
141
|
+
color: var(--mb-on-accent);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.mb-date-field-segment:focus::placeholder {
|
|
145
|
+
color: color-mix(in oklch, var(--mb-on-accent) 70%, transparent);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.mb-date-field-segment[data-type="dayPeriod"] {
|
|
149
|
+
margin-inline-start: 3px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* The calendar button: a quiet glyph at the field's trailing edge. */
|
|
153
|
+
.mb-date-picker-trigger {
|
|
154
|
+
position: relative;
|
|
155
|
+
display: inline-flex;
|
|
156
|
+
flex: none;
|
|
157
|
+
align-items: center;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
width: calc(var(--mb-text-field-icon) + 6px);
|
|
160
|
+
height: calc(var(--mb-text-field-icon) + 6px);
|
|
161
|
+
margin: 0;
|
|
162
|
+
margin-inline: 4px -4px;
|
|
163
|
+
padding: 0;
|
|
164
|
+
border: 0;
|
|
165
|
+
border-radius: var(--mb-radius-xs);
|
|
166
|
+
background: transparent;
|
|
167
|
+
color: var(--mb-label-secondary);
|
|
168
|
+
cursor: default;
|
|
169
|
+
-webkit-tap-highlight-color: transparent;
|
|
170
|
+
transition:
|
|
171
|
+
background-color var(--mb-duration-fast) var(--mb-ease-out),
|
|
172
|
+
color var(--mb-duration-fast) var(--mb-ease-out);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.mb-date-picker-trigger::after {
|
|
176
|
+
content: "";
|
|
177
|
+
position: absolute;
|
|
178
|
+
inset: 50% auto auto 50%;
|
|
179
|
+
width: var(--mb-hit-target);
|
|
180
|
+
height: var(--mb-hit-target);
|
|
181
|
+
translate: -50% -50%;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.mb-date-picker-trigger :where(svg) {
|
|
185
|
+
width: var(--mb-text-field-icon);
|
|
186
|
+
height: var(--mb-text-field-icon);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@media (hover: hover) and (pointer: fine) {
|
|
190
|
+
.mb-date-picker-trigger:hover {
|
|
191
|
+
color: var(--mb-label);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.mb-date-picker-trigger:active,
|
|
196
|
+
.mb-date-picker-trigger[data-open] {
|
|
197
|
+
color: var(--mb-accent-text);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.mb-date-picker-trigger:focus-visible {
|
|
201
|
+
outline: 2px solid var(--mb-focus-ring);
|
|
202
|
+
outline-offset: 1px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* Compact: the date as a gray button, accent text while its calendar is open. */
|
|
206
|
+
.mb-date-picker-button {
|
|
207
|
+
position: relative;
|
|
208
|
+
display: inline-flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
height: var(--mb-control-height-sm);
|
|
211
|
+
margin: 0;
|
|
212
|
+
padding: 0 var(--mb-date-picker-button-pad);
|
|
213
|
+
border: 0;
|
|
214
|
+
border-radius: var(--mb-date-picker-button-radius);
|
|
215
|
+
background: var(--mb-date-picker-button-bg);
|
|
216
|
+
color: var(--mb-label);
|
|
217
|
+
font: var(--mb-text-body);
|
|
218
|
+
font-variant-numeric: tabular-nums;
|
|
219
|
+
letter-spacing: var(--mb-tracking-body);
|
|
220
|
+
white-space: nowrap;
|
|
221
|
+
cursor: default;
|
|
222
|
+
-webkit-tap-highlight-color: transparent;
|
|
223
|
+
transition:
|
|
224
|
+
background-color var(--mb-duration-fast) var(--mb-ease-out),
|
|
225
|
+
color var(--mb-duration-fast) var(--mb-ease-out),
|
|
226
|
+
scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.mb-date-picker-button::after {
|
|
230
|
+
content: "";
|
|
231
|
+
position: absolute;
|
|
232
|
+
inset: 50% auto auto 50%;
|
|
233
|
+
width: max(100%, var(--mb-hit-target));
|
|
234
|
+
height: max(100%, var(--mb-hit-target));
|
|
235
|
+
translate: -50% -50%;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.mb-date-picker-button[data-open] {
|
|
239
|
+
color: var(--mb-accent-text);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@media (hover: hover) and (pointer: fine) {
|
|
243
|
+
.mb-date-picker-button:hover {
|
|
244
|
+
background: var(--mb-fill-secondary);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.mb-date-picker-button:active {
|
|
249
|
+
background: var(--mb-fill);
|
|
250
|
+
transition-duration: 0ms;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.mb-date-picker[data-size="lg"] .mb-date-picker-button {
|
|
254
|
+
height: var(--mb-control-height);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.mb-date-picker[data-disabled] .mb-date-picker-button {
|
|
258
|
+
opacity: 0.45;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* The popover: a material that scales from the field. */
|
|
262
|
+
.mb-date-picker-content {
|
|
263
|
+
z-index: var(--mb-z-floating);
|
|
264
|
+
box-sizing: border-box;
|
|
265
|
+
padding: var(--mb-date-picker-popover-pad);
|
|
266
|
+
padding-block-start: calc(var(--mb-date-picker-popover-pad) - 4px);
|
|
267
|
+
border-radius: var(--mb-popup-radius);
|
|
268
|
+
background: var(--mb-material-regular);
|
|
269
|
+
-webkit-backdrop-filter: var(--mb-material-filter);
|
|
270
|
+
backdrop-filter: var(--mb-material-filter);
|
|
271
|
+
box-shadow: var(--mb-glass-rim), var(--mb-shadow-menu);
|
|
272
|
+
color: var(--mb-label);
|
|
273
|
+
transform-origin: var(--transform-origin);
|
|
274
|
+
transition:
|
|
275
|
+
scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy),
|
|
276
|
+
opacity var(--mb-duration-fast) var(--mb-ease-out);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.mb-date-picker-content[data-starting-style] {
|
|
280
|
+
scale: 0.94;
|
|
281
|
+
opacity: 0;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.mb-date-picker-content[data-ending-style] {
|
|
285
|
+
scale: 0.97;
|
|
286
|
+
opacity: 0;
|
|
287
|
+
transition-duration: var(--mb-duration-fast);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.mb-date-picker-content:focus-visible {
|
|
291
|
+
outline: none;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* On a small touch screen the calendar arrives in a sheet from the bottom edge. */
|
|
295
|
+
.mb-date-picker-content[data-presentation="sheet"] {
|
|
296
|
+
padding: 28px 16px calc(16px + env(safe-area-inset-bottom));
|
|
297
|
+
border-radius: var(--mb-sheet-radius) var(--mb-sheet-radius) 0 0;
|
|
298
|
+
background: var(--mb-material-thick);
|
|
299
|
+
transform-origin: 50% 100%;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.mb-date-picker-content[data-presentation="sheet"]::before {
|
|
303
|
+
content: "";
|
|
304
|
+
position: absolute;
|
|
305
|
+
inset-block-start: 6px;
|
|
306
|
+
inset-inline-start: 50%;
|
|
307
|
+
width: 36px;
|
|
308
|
+
height: 5px;
|
|
309
|
+
border-radius: 3px;
|
|
310
|
+
background: var(--mb-label-quaternary);
|
|
311
|
+
translate: -50% 0;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.mb-date-picker-content[data-presentation="sheet"] .mb-date-picker-calendar {
|
|
315
|
+
--mb-calendar-w: var(--mb-calendar-cell-width);
|
|
316
|
+
--mb-calendar-h: var(--mb-calendar-cell-height);
|
|
317
|
+
--mb-calendar-d: var(--mb-calendar-circle);
|
|
318
|
+
--mb-calendar-font: var(--mb-calendar-day-font);
|
|
319
|
+
display: flex;
|
|
320
|
+
width: min(100%, calc(var(--mb-calendar-cell-width) * 7));
|
|
321
|
+
margin-inline: auto;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
@media (prefers-reduced-motion: reduce) {
|
|
325
|
+
:where(:root:not([data-motion="full"])) {
|
|
326
|
+
.mb-date-picker-content[data-starting-style],
|
|
327
|
+
.mb-date-picker-content[data-ending-style] {
|
|
328
|
+
scale: 1;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* Filled fields and the compact button are a faint fill (about 1.2:1), as on iOS.
|
|
334
|
+
Increase Contrast gives them an edge. */
|
|
335
|
+
@media (prefers-contrast: more) {
|
|
336
|
+
.mb-date-picker .mb-date-picker-button {
|
|
337
|
+
box-shadow: inset 0 0 0 1px var(--mb-control-border);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.mb-date-field[data-variant]:not([data-invalid]),
|
|
341
|
+
.mb-date-picker:not([data-invalid]) .mb-date-picker-field:not(:has([data-invalid])) {
|
|
342
|
+
--mb-date-field-edge: inset 0 0 0 1px var(--mb-control-border);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/* Continuous corners on the popover and the sheet it becomes on touch. */
|
|
347
|
+
@supports (corner-shape: squircle) {
|
|
348
|
+
.mb-date-picker-content {
|
|
349
|
+
corner-shape: var(--mb-corner-shape);
|
|
350
|
+
border-radius: calc(var(--mb-popup-radius) * var(--mb-corner-factor));
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.mb-date-picker-content[data-presentation="sheet"] {
|
|
354
|
+
border-radius: calc(var(--mb-sheet-radius) * var(--mb-corner-factor)) calc(var(--mb-sheet-radius) * var(--mb-corner-factor)) 0 0;
|
|
355
|
+
}
|
|
356
|
+
}
|