@plexui/styles 0.1.33 → 0.1.34
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/dist/es/components/Accordion/Accordion.module.css +14 -0
- package/dist/es/components/Alert/Alert.module.css +112 -1
- package/dist/es/components/Breadcrumb/Breadcrumb.module.css +34 -0
- package/dist/es/components/Button/Button.module.css +70 -22
- package/dist/es/components/Card/Card.module.css +22 -6
- package/dist/es/components/Checkbox/Checkbox.module.css +26 -72
- package/dist/es/components/CodeBlock/CodeBlock.module.css +20 -0
- package/dist/es/components/ColorPicker/ColorPicker.module.css +396 -0
- package/dist/es/components/ContextMenu/ContextMenu.module.css +55 -0
- package/dist/es/components/DataTable/DataTable.module.css +4 -0
- package/dist/es/components/DatePicker/Calendar.module.css +18 -5
- package/dist/es/components/DateRangePicker/Calendar.module.css +20 -2
- package/dist/es/components/DateRangePicker/Trigger.module.css +29 -1
- package/dist/es/components/Dialog/Dialog.module.css +212 -77
- package/dist/es/components/EmptyMessage/EmptyMessage.module.css +31 -0
- package/dist/es/components/Field/Field.module.css +188 -23
- package/dist/es/components/FieldGroup/FieldGroup.module.css +59 -0
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +21 -0
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +16 -0
- package/dist/es/components/Indicator/LoadingIndicator.module.css +14 -7
- package/dist/es/components/Input/Input.module.css +69 -0
- package/dist/es/components/InputGroup/InputGroup.module.css +4 -0
- package/dist/es/components/Menu/Menu.module.css +278 -28
- package/dist/es/components/Page/Page.module.css +92 -24
- package/dist/es/components/PageControl/PageControl.module.css +81 -0
- package/dist/es/components/Popover/Popover.module.css +10 -1
- package/dist/es/components/Select/Select.module.css +53 -9
- package/dist/es/components/SelectControl/SelectControl.module.css +38 -3
- package/dist/es/components/Sidebar/Sidebar.module.css +276 -57
- package/dist/es/components/Slider/Slider.module.css +52 -45
- package/dist/es/components/Sortable/Sortable.module.css +7 -3
- package/dist/es/components/Stepper/Stepper.module.css +98 -0
- package/dist/es/components/TabBar/TabBar.module.css +233 -0
- package/dist/es/components/Tabs/Tabs.module.css +149 -2
- package/dist/es/components/Toast/Toast.module.css +50 -5
- package/dist/es/components/Toolbar/Toolbar.module.css +208 -18
- package/dist/es/styles/katex-fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/es/styles/katex-fonts/LICENSE +21 -0
- package/dist/es/styles/katex.min.css +666 -730
- package/dist/es/styles/mobile-materials.css +56 -14
- package/dist/es/styles/mobile-surfaces.css +39 -32
- package/dist/es/styles/touch.css +328 -90
- package/dist/es/styles/variables-components.css +232 -13
- package/package.json +1 -1
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
}.Title {
|
|
45
45
|
color: var(--color-text);
|
|
46
46
|
font-size: var(--font-text-sm-size);
|
|
47
|
-
line-height:
|
|
47
|
+
/* Sonner's unlayered [data-title] sets line-height: 1.5 (21px at 14px) */
|
|
48
|
+
line-height: var(--font-text-sm-line-height) !important;
|
|
48
49
|
/* Sonner pins font-weight: 500; keep that for title-only toasts and only
|
|
49
50
|
lift to semibold when a description sits alongside (so the title is
|
|
50
51
|
visually anchored against the secondary text). */
|
|
@@ -53,10 +54,13 @@
|
|
|
53
54
|
}.Content:has(.Description) .Title {
|
|
54
55
|
font-weight: var(--font-weight-semibold) !important;
|
|
55
56
|
}.Description {
|
|
56
|
-
|
|
57
|
+
/* Sonner's unlayered [data-description] sets line-height: 1.4 and its own gray (below) */
|
|
57
58
|
font-size: var(--font-text-sm-size);
|
|
58
|
-
line-height: var(--font-text-sm-line-height);
|
|
59
|
+
line-height: var(--font-text-sm-line-height) !important;
|
|
59
60
|
text-wrap: pretty;
|
|
61
|
+
}/* Sonner's unlayered stylesheet paints the description #3f3f3f (91% in dark); a toast with rich
|
|
62
|
+
colors keeps Sonner's inherited color. */.Toast:not([data-rich-colors="true"]) .Description {
|
|
63
|
+
color: var(--color-text-secondary) !important;
|
|
60
64
|
}.Content {
|
|
61
65
|
gap: 0 !important;
|
|
62
66
|
}.Icon {
|
|
@@ -107,8 +111,9 @@
|
|
|
107
111
|
outline-offset: 2px;
|
|
108
112
|
}.Toast :is([data-button], [data-close-button]):focus-visible {
|
|
109
113
|
box-shadow: none !important;
|
|
110
|
-
}/*
|
|
111
|
-
These targets and wrapping rules adapt Sonner's controls for
|
|
114
|
+
}/* A toast stays an in-app web message: it takes the look of an iOS notification banner on a phone
|
|
115
|
+
(below) but not its behavior. These targets and wrapping rules adapt Sonner's controls for touch:
|
|
116
|
+
an action stands under the message, which keeps the toast's width. */@media (max-width: 767px), (pointer: coarse) {
|
|
112
117
|
.Toast[data-styled="true"] {
|
|
113
118
|
flex-wrap: wrap;
|
|
114
119
|
}
|
|
@@ -165,5 +170,45 @@
|
|
|
165
170
|
left: auto !important;
|
|
166
171
|
right: 0 !important;
|
|
167
172
|
}
|
|
173
|
+
}/* On a phone a toast takes the corners, padding and text of the iOS notification banner, the
|
|
174
|
+
system's own message at the top of the screen (kit iOS 27, Notifications, Notification - Collapsed
|
|
175
|
+
Stack=1 0:11292): corners 24, padding 14, a 10px gap, the title at 15/17 semibold and the
|
|
176
|
+
description at 15/18. The kit's -0.23 tracking of 15pt text is left to the system font, which
|
|
177
|
+
tracks it itself. It keeps its own width and opaque surface, not the banner's glass and width. Its buttons are drawn as a medium phone Button (touch.css): a 34px capsule,
|
|
178
|
+
15/20 regular, gutter 14, centered in the 44px target above. */@media (max-width: 767px) {
|
|
179
|
+
.Toast[data-styled="true"] {
|
|
180
|
+
gap: 10px !important;
|
|
181
|
+
padding: 14px !important;
|
|
182
|
+
border-radius: 24px !important;
|
|
183
|
+
letter-spacing: normal;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.Toast[data-styled="true"] .Title,
|
|
187
|
+
.Toast[data-styled="true"] .Description {
|
|
188
|
+
font-size: 15px;
|
|
189
|
+
line-height: 18px !important;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.Toast[data-styled="true"] .Title {
|
|
193
|
+
line-height: 17px !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
|
|
197
|
+
position: relative;
|
|
198
|
+
min-height: 34px;
|
|
199
|
+
margin-block: 5px !important;
|
|
200
|
+
padding: 7px 14px !important;
|
|
201
|
+
border-radius: var(--radius-full) !important;
|
|
202
|
+
font-size: 15px !important;
|
|
203
|
+
font-weight: var(--font-weight-normal) !important;
|
|
204
|
+
line-height: 20px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* The 44px target reaches 5px past the capsule above and below */
|
|
208
|
+
.Toast[data-styled="true"] > :is(.ActionButton, .CancelButton)::after {
|
|
209
|
+
position: absolute;
|
|
210
|
+
inset: -5px 0;
|
|
211
|
+
content: "";
|
|
212
|
+
}
|
|
168
213
|
}
|
|
169
214
|
}
|
|
@@ -18,48 +18,103 @@
|
|
|
18
18
|
color: var(--color-text);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
/* Soft scroll edge: the canvas color
|
|
22
|
-
|
|
21
|
+
/* Soft scroll edge: the canvas color covers content scrolled under the bar down to its bottom and fades
|
|
22
|
+
out past it over --page-bar-soft-tail. Native iOS 26 bars hide content under the row almost entirely
|
|
23
|
+
(IMG_5484, 5503: text behind the title at 7-10% of its contrast) and keep that cover through the bar's
|
|
24
|
+
bottom padding (IMG_5503). */
|
|
23
25
|
.Toolbar::before {
|
|
24
26
|
position: absolute;
|
|
25
27
|
z-index: -1;
|
|
26
|
-
inset: 0 0 -
|
|
28
|
+
inset: 0 0 calc(-1 * var(--page-bar-soft-tail, 32px));
|
|
27
29
|
background: var(--toolbar-background, var(--dialog-panel-background, var(--page-background)));
|
|
28
30
|
backdrop-filter: blur(var(--toolbar-edge-blur));
|
|
29
31
|
content: "";
|
|
30
|
-
-webkit-mask-image: linear-gradient(to bottom, #000, transparent);
|
|
31
|
-
mask-image: linear-gradient(to bottom, #000, transparent);
|
|
32
|
+
-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--page-bar-soft-tail, 32px)), transparent);
|
|
33
|
+
mask-image: linear-gradient(to bottom, #000 calc(100% - var(--page-bar-soft-tail, 32px)), transparent);
|
|
32
34
|
pointer-events: none;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
|
-
.
|
|
37
|
+
/* The other backgrounds fill the bar itself (scroll edge styles of iOS 26, `BarBackground`). Hard and
|
|
38
|
+
solid are opaque: the kit's Hard edge (Materials 5661:26978) blurs under an opaque fill, which shows
|
|
39
|
+
nothing. Glass is the translucent, blurred bar of earlier iOS. Hard and glass draw a line once content
|
|
40
|
+
is under the bar, and glass shows itself only then. */
|
|
41
|
+
.Toolbar:not([data-background="soft"])::before {
|
|
36
42
|
inset: 0;
|
|
37
43
|
backdrop-filter: none;
|
|
38
44
|
-webkit-mask-image: none;
|
|
39
45
|
mask-image: none;
|
|
46
|
+
transition: opacity var(--transition-duration-basic), border-color var(--transition-duration-basic);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.Toolbar[data-background="glass"]::before {
|
|
50
|
+
background: color-mix(in srgb, var(--toolbar-background, var(--dialog-panel-background, var(--page-background))) var(--page-bar-veil-opacity), transparent);
|
|
51
|
+
backdrop-filter: var(--page-bar-glass-filter);
|
|
52
|
+
opacity: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* The line of a hard or glass bar faces the content: under a top bar, above a bottom one. */
|
|
56
|
+
.Toolbar[data-placement="top"][data-background="hard"]::before {
|
|
57
|
+
border-bottom: 1px solid transparent;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.Toolbar[data-placement="top"][data-background="glass"]::before {
|
|
61
|
+
border-bottom: 0.5px solid var(--page-bar-line);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.Toolbar[data-placement="top"][data-scrolled][data-background="hard"]::before {
|
|
65
|
+
border-bottom-color: var(--page-bar-hard-line);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.Toolbar[data-placement="top"][data-scrolled][data-background="glass"]::before {
|
|
69
|
+
opacity: 1;
|
|
40
70
|
}
|
|
41
71
|
|
|
42
72
|
.Toolbar[data-placement="bottom"] {
|
|
43
73
|
--toolbar-item-size: var(--toolbar-bottom-item-size);
|
|
44
74
|
--toolbar-item-gap: var(--toolbar-bottom-item-gap);
|
|
75
|
+
/* The space above the bar's items: the edge is measured from the items, so it moves with this space. */
|
|
76
|
+
--toolbar-bottom-item-top: var(--toolbar-bottom-padding-top);
|
|
45
77
|
grid-template-areas: "leading content trailing";
|
|
46
|
-
padding: var(--toolbar-bottom-
|
|
78
|
+
padding: var(--toolbar-bottom-item-top) var(--toolbar-bottom-gutter) var(--toolbar-bottom-padding-bottom);
|
|
47
79
|
}
|
|
48
80
|
|
|
81
|
+
/* The edge starts 27pt above the items, as on native iOS 26 (IMG_5491), and covers the content fully from the
|
|
82
|
+
items' top down to the bottom of the screen: no content shows through a soft or glass item (owner 07.11;
|
|
83
|
+
the native glass capsule hid 33pt more of the fade). */
|
|
49
84
|
.Toolbar[data-placement="bottom"]::before {
|
|
50
|
-
inset: -
|
|
51
|
-
-webkit-mask-image: linear-gradient(to
|
|
52
|
-
mask-image: linear-gradient(to
|
|
85
|
+
inset: calc(var(--toolbar-bottom-item-top) - 27px) 0 0;
|
|
86
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent, #000 27px);
|
|
87
|
+
mask-image: linear-gradient(to bottom, transparent, #000 27px);
|
|
53
88
|
}
|
|
54
89
|
|
|
55
|
-
|
|
90
|
+
/* The other backgrounds start at the top of the bar: the edge's place and mask, which come later than
|
|
91
|
+
the shared rule, go too. */
|
|
92
|
+
.Toolbar[data-placement="bottom"]:not([data-background="soft"])::before {
|
|
56
93
|
inset: 0;
|
|
94
|
+
-webkit-mask-image: none;
|
|
95
|
+
mask-image: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.Toolbar[data-placement="bottom"][data-background="hard"]::before {
|
|
99
|
+
border-top: 1px solid transparent;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.Toolbar[data-placement="bottom"][data-background="glass"]::before {
|
|
103
|
+
border-top: 0.5px solid var(--page-bar-line);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.Toolbar[data-placement="bottom"][data-content-below][data-background="hard"]::before {
|
|
107
|
+
border-top-color: var(--page-bar-hard-line);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.Toolbar[data-placement="bottom"][data-content-below][data-background="glass"]::before {
|
|
111
|
+
opacity: 1;
|
|
57
112
|
}
|
|
58
113
|
|
|
59
114
|
/* A single wide action (Apps 2.4 Fullsize) leaves 12px above it. */
|
|
60
115
|
.Toolbar[data-placement="bottom"]:has(> .Content[data-fill] > :where(button, a)) {
|
|
61
116
|
--toolbar-edge-blur: var(--toolbar-edge-blur-large);
|
|
62
|
-
|
|
117
|
+
--toolbar-bottom-item-top: var(--toolbar-bottom-fill-padding-top);
|
|
63
118
|
}
|
|
64
119
|
|
|
65
120
|
/* Apps 2.4 Toolbar Search: a flat bar of the canvas color, 14px below the field. */
|
|
@@ -67,7 +122,7 @@
|
|
|
67
122
|
--toolbar-padding-bottom: var(--toolbar-search-padding-bottom);
|
|
68
123
|
}
|
|
69
124
|
|
|
70
|
-
.Toolbar[data-placement="top"]:has(> .Content[data-fill])
|
|
125
|
+
.Toolbar[data-placement="top"]:has(> .Content[data-fill])[data-background="soft"]::before {
|
|
71
126
|
inset: 0;
|
|
72
127
|
background: color-mix(in srgb, var(--toolbar-background, var(--dialog-panel-background, var(--page-background))) var(--toolbar-flat-opacity), transparent);
|
|
73
128
|
backdrop-filter: blur(var(--toolbar-flat-blur));
|
|
@@ -203,7 +258,7 @@
|
|
|
203
258
|
--button-font-weight: var(--toolbar-label-font-weight);
|
|
204
259
|
}
|
|
205
260
|
|
|
206
|
-
/*
|
|
261
|
+
/* A bar symbol, sized by its drawn glyph (--toolbar-icon-size: the kit's 29pt box, about 22pt of ink). */
|
|
207
262
|
.Toolbar :is(.Leading, .Trailing, .Content, .Group) > :where(button, a):not([data-navigation-action]) {
|
|
208
263
|
--button-icon-size: var(--toolbar-icon-size);
|
|
209
264
|
}
|
|
@@ -227,6 +282,45 @@
|
|
|
227
282
|
--button-mobile-material-active: var(--mobile-glass-background-active);
|
|
228
283
|
}
|
|
229
284
|
|
|
285
|
+
/* Disabled (iOS 26 kit _Button - Symbol, Text and Back, State=Disabled): a bar button keeps the glass of its
|
|
286
|
+
capsule, which inside a Group is the Group's, and draws its symbol or label in the tertiary label color.
|
|
287
|
+
Button drops the material of a disabled button elsewhere; the extra attribute outweighs it and the shared
|
|
288
|
+
disabled color in any style sheet order. */
|
|
289
|
+
.Toolbar :is(.Leading, .Trailing, .Content, .Group) > :where(button, a)[data-disabled][data-variant]:where(:not([data-mobile-material="flat"])):where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
|
|
290
|
+
--button-text-color: var(--mobile-label-tertiary, var(--color-text-tertiary));
|
|
291
|
+
--button-mobile-material-background: var(--mobile-glass-background);
|
|
292
|
+
--button-mobile-material-sheen: var(--mobile-glass-sheen);
|
|
293
|
+
--button-mobile-material-shadow: var(--mobile-glass-shadow);
|
|
294
|
+
--button-mobile-material-backdrop-filter: var(--mobile-glass-backdrop-filter);
|
|
295
|
+
--button-mobile-material-opacity: 1;
|
|
296
|
+
--button-mobile-material-scale: 1;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* A prominent action (NavigationButton confirm, a solid Button) gives up its color when disabled. */
|
|
300
|
+
.Toolbar :is(.Leading, .Trailing, .Content, .Group) > :where(button, a)[data-disabled][data-variant="solid"] {
|
|
301
|
+
--button-background-color: var(--toolbar-prominent-disabled-background);
|
|
302
|
+
--button-text-color: var(--toolbar-prominent-disabled-color);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/* The gray capsule keeps the outline and the soft shadow of the bar's glass (Calendar, IMG_5433). */
|
|
306
|
+
.Toolbar :is(.Leading, .Trailing, .Content, .Group) > :where(button, a)[data-disabled][data-variant="solid"]::before {
|
|
307
|
+
box-shadow: var(--mobile-glass-shadow);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* An enabled prominent action takes the accent tint, with the edge of the glass (see the tokens). An info
|
|
311
|
+
action already is the accent and takes the same edge (View Options Done, owner 08.11). */
|
|
312
|
+
.Toolbar :is(.Leading, .Trailing, .Content, .Group) > :where(button, a)[data-variant="solid"]:where([data-color="primary"], [data-color="info"]):not([data-disabled]) {
|
|
313
|
+
--button-background-color: var(--toolbar-prominent-background);
|
|
314
|
+
--button-background-color-hover: var(--toolbar-prominent-background-hover);
|
|
315
|
+
--button-background-color-active: var(--toolbar-prominent-background-active);
|
|
316
|
+
--button-text-color: var(--toolbar-prominent-color);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.Toolbar :is(.Leading, .Trailing, .Content, .Group) > :where(button, a)[data-variant="solid"]:where([data-color="primary"], [data-color="info"]):not([data-disabled])::before {
|
|
320
|
+
background-image: var(--toolbar-prominent-sheen);
|
|
321
|
+
box-shadow: var(--toolbar-prominent-shadow);
|
|
322
|
+
}
|
|
323
|
+
|
|
230
324
|
/* A search field (iOS 26 kit Search Top and Bottom): the row height and the glass of the bar buttons.
|
|
231
325
|
The extra attribute outweighs the field's own focus and hover outlines, which a bar does not draw. */
|
|
232
326
|
.Toolbar :is(.Leading, .Trailing, .Content) > [data-slot="input"][data-variant] {
|
|
@@ -251,7 +345,8 @@
|
|
|
251
345
|
height: var(--toolbar-search-icon-size);
|
|
252
346
|
}
|
|
253
347
|
|
|
254
|
-
/* Title:
|
|
348
|
+
/* Title: centered in the 44px row. Native iOS 26 bars put its cap middle on the buttons' center
|
|
349
|
+
(IMG_5508/5511/5512/5514/5515, within 1px); the kit's text frame sits 2px lower. */
|
|
255
350
|
.Heading {
|
|
256
351
|
display: flex;
|
|
257
352
|
grid-area: heading;
|
|
@@ -261,7 +356,6 @@
|
|
|
261
356
|
min-width: 0;
|
|
262
357
|
min-height: var(--toolbar-item-size);
|
|
263
358
|
text-align: center;
|
|
264
|
-
transform: translateY(2px);
|
|
265
359
|
}
|
|
266
360
|
|
|
267
361
|
.Title {
|
|
@@ -288,12 +382,13 @@
|
|
|
288
382
|
white-space: nowrap;
|
|
289
383
|
}
|
|
290
384
|
|
|
291
|
-
/* Two lines: title 15/20 at 6px, subtitle 12/16 below it.
|
|
385
|
+
/* Two lines: title 15/20 at 6px, subtitle 12/16 below it. The title of a Dialog's bar can sit in a wrapper of
|
|
386
|
+
its own (one that takes focus when the Sheet opens). */
|
|
292
387
|
.Heading:has(> .Subtitle) {
|
|
293
388
|
transform: translateY(1px);
|
|
294
389
|
}
|
|
295
390
|
|
|
296
|
-
.Heading:has(> .Subtitle)
|
|
391
|
+
.Heading:has(> .Subtitle) .Title {
|
|
297
392
|
font-size: var(--toolbar-title-compact-font-size);
|
|
298
393
|
line-height: var(--toolbar-title-compact-line-height);
|
|
299
394
|
}
|
|
@@ -303,7 +398,10 @@
|
|
|
303
398
|
text-align: start;
|
|
304
399
|
}
|
|
305
400
|
|
|
401
|
+
/* The large title spans the columns of the row of controls above it, so a long one would widen their max-content
|
|
402
|
+
tracks and push the trailing button off the screen; with no width of its own it takes the row's and truncates. */
|
|
306
403
|
.Toolbar[data-title-style="large"] > .Heading {
|
|
404
|
+
contain: inline-size;
|
|
307
405
|
min-height: 0;
|
|
308
406
|
transform: none;
|
|
309
407
|
}
|
|
@@ -350,6 +448,98 @@
|
|
|
350
448
|
inset: 0 0 auto;
|
|
351
449
|
}
|
|
352
450
|
|
|
451
|
+
/* A large title on a page sits at the top of the content and scrolls up with it under the row of
|
|
452
|
+
controls, which then shows the title inline, as UIKit does in iOS 26 (WWDC25 "Build a UIKit app
|
|
453
|
+
with the new design": large titles scroll with the content underneath the bar). Page.Content
|
|
454
|
+
writes its scroll offset to --page-scroll-y and the Toolbar measures how far the title travels.
|
|
455
|
+
The title fades out over 8px as it passes under the row; the soft edge then covers the row only,
|
|
456
|
+
as it does for an inline title. */
|
|
457
|
+
.Toolbar[data-host="page"][data-title-style="large"] {
|
|
458
|
+
/* Until the Toolbar has measured how far the title travels (a server-rendered page before it hydrates), the
|
|
459
|
+
title has not gone: the large title shows, and the row's inline copy and the bar's line stay hidden. A
|
|
460
|
+
travel of 0 showed the inline title in the row for the first frames, then swapped it for the large one. */
|
|
461
|
+
--toolbar-large-title-travel: 100000;
|
|
462
|
+
--toolbar-edge-blur: var(--toolbar-edge-blur-small);
|
|
463
|
+
--toolbar-large-title-scroll: calc(min(var(--page-scroll-y, 0), var(--toolbar-large-title-travel, 0) + 16) * 1px);
|
|
464
|
+
grid-template-areas:
|
|
465
|
+
"leading collapsed trailing"
|
|
466
|
+
"heading heading heading";
|
|
467
|
+
grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
|
|
468
|
+
/* Content scrolled into the place of the title stays under the pointer. */
|
|
469
|
+
pointer-events: none;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.Toolbar[data-host="page"][data-title-style="large"]::before {
|
|
473
|
+
inset: 0 0 auto;
|
|
474
|
+
height: calc(var(--toolbar-padding-top, 0px) + var(--toolbar-item-size) + var(--toolbar-padding-bottom) + 16px);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.Toolbar[data-host="page"][data-title-style="large"]:not([data-background="soft"])::before {
|
|
478
|
+
height: calc(var(--toolbar-padding-top, 0px) + var(--toolbar-item-size) + var(--toolbar-padding-bottom));
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/* The large title is the content under the row until it has gone: a hard or glass bar shows its line
|
|
482
|
+
with the inline title, over the same last 8px. */
|
|
483
|
+
.Toolbar[data-host="page"][data-title-style="large"][data-scrolled][data-background="hard"]::before {
|
|
484
|
+
border-bottom-color: color-mix(in srgb, var(--page-bar-hard-line) calc(clamp(0, (var(--page-scroll-y, 0) - var(--toolbar-large-title-travel, 0) + 8) / 8, 1) * 100%), transparent);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.Toolbar[data-host="page"][data-title-style="large"][data-scrolled][data-background="glass"]::before {
|
|
488
|
+
opacity: clamp(0, (var(--page-scroll-y, 0) - var(--toolbar-large-title-travel, 0) + 8) / 8, 1);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.Toolbar[data-host="page"][data-title-style="large"] > :is(.Leading, .Trailing, .Content), .Toolbar[data-host="page"][data-title-style="large"]:not([data-scrolled]) > .Heading {
|
|
492
|
+
pointer-events: auto;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.Toolbar[data-host="page"][data-title-style="large"] > .Heading {
|
|
496
|
+
transform: translateY(calc(-1 * var(--toolbar-large-title-scroll)));
|
|
497
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--toolbar-large-title-scroll) - var(--toolbar-large-title-gap)), #000 calc(var(--toolbar-large-title-scroll) - var(--toolbar-large-title-gap) + 8px));
|
|
498
|
+
mask-image: linear-gradient(to bottom, transparent calc(var(--toolbar-large-title-scroll) - var(--toolbar-large-title-gap)), #000 calc(var(--toolbar-large-title-scroll) - var(--toolbar-large-title-gap) + 8px));
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/* The inline title fades in over the last 8px of the large title's way. */
|
|
502
|
+
.Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle {
|
|
503
|
+
grid-area: collapsed;
|
|
504
|
+
min-width: 0;
|
|
505
|
+
overflow: hidden;
|
|
506
|
+
color: var(--color-text);
|
|
507
|
+
font-size: var(--toolbar-title-font-size);
|
|
508
|
+
font-weight: var(--toolbar-title-font-weight);
|
|
509
|
+
line-height: var(--toolbar-title-line-height);
|
|
510
|
+
text-align: center;
|
|
511
|
+
text-overflow: ellipsis;
|
|
512
|
+
white-space: nowrap;
|
|
513
|
+
opacity: clamp(0, (var(--page-scroll-y, 0) - var(--toolbar-large-title-travel, 0) + 8) / 8, 1);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/* With a subtitle the inline copy takes two lines, as the inline title does: 15/20 and 12/16 in the
|
|
517
|
+
secondary label (iOS 26 kit Toolbar - Top - iPhone, Title 2 Line: 15 semibold over 12 medium). */
|
|
518
|
+
.Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle:has(> .CollapsedSubtitle) {
|
|
519
|
+
display: flex;
|
|
520
|
+
flex-direction: column;
|
|
521
|
+
align-items: center;
|
|
522
|
+
justify-content: center;
|
|
523
|
+
font-size: var(--toolbar-title-compact-font-size);
|
|
524
|
+
line-height: var(--toolbar-title-compact-line-height);
|
|
525
|
+
transform: translateY(1px);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle > :is(.CollapsedLine, .CollapsedSubtitle) {
|
|
529
|
+
max-width: 100%;
|
|
530
|
+
overflow: hidden;
|
|
531
|
+
text-overflow: ellipsis;
|
|
532
|
+
white-space: nowrap;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.Toolbar[data-host="page"][data-title-style="large"] > .CollapsedTitle > .CollapsedSubtitle {
|
|
536
|
+
margin-top: -2px;
|
|
537
|
+
color: var(--mobile-label-secondary, var(--color-text-secondary));
|
|
538
|
+
font-size: var(--toolbar-subtitle-font-size);
|
|
539
|
+
font-weight: var(--toolbar-subtitle-font-weight);
|
|
540
|
+
line-height: var(--toolbar-subtitle-line-height);
|
|
541
|
+
}
|
|
542
|
+
|
|
353
543
|
.Toolbar[data-host="dialog"][data-placement="top"] {
|
|
354
544
|
--toolbar-background: var(--dialog-panel-background);
|
|
355
545
|
--toolbar-padding-top: var(--toolbar-sheet-padding-top);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013-2020 Khan Academy and other contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|