@plexui/styles 0.1.44 → 0.1.46
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.
|
@@ -109,6 +109,20 @@
|
|
|
109
109
|
.Thumb[data-disabled] {
|
|
110
110
|
cursor: default;
|
|
111
111
|
pointer-events: none;
|
|
112
|
+
}/* Disabled, the fill takes the track's color and both lighten to 60% of the track, as the accent leaves a
|
|
113
|
+
disabled macOS slider (macOS 27 kit, Slider, State=Disabled 8536:112: the track and its filled part both
|
|
114
|
+
the label color at 6%, where Idle has the track at 10% and the filled part in the accent; the filled part
|
|
115
|
+
lies over the track, so it stays a shade darker; the knob as Idle). The knob's ring is the fill's color,
|
|
116
|
+
so it lightens with it. On a phone the iOS kit's half opacity stands instead (below). */.Slider[data-disabled] {
|
|
117
|
+
--slider-disabled-color: color-mix(in srgb, var(--slider-track-color) 60%, transparent);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.Slider[data-disabled] :is(.Track, .Range) {
|
|
121
|
+
background: var(--slider-disabled-color);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.Slider[data-disabled] .Thumb {
|
|
125
|
+
box-shadow: var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-disabled-color));
|
|
112
126
|
}.SliderLabel {
|
|
113
127
|
display: flex;
|
|
114
128
|
align-items: center;
|
|
@@ -273,10 +287,22 @@
|
|
|
273
287
|
box-shadow: var(--mobile-knob-lens-shadow, var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color)));
|
|
274
288
|
}
|
|
275
289
|
|
|
276
|
-
/* Disabled, the track, its fill and the knob show at half opacity (State=Disabled). */
|
|
290
|
+
/* Disabled, the track, its fill and the knob show at half opacity (State=Disabled), in their own colors. */
|
|
277
291
|
.Slider[data-disabled] {
|
|
278
292
|
opacity: 0.5;
|
|
279
293
|
}
|
|
294
|
+
|
|
295
|
+
.Slider[data-disabled] .Track {
|
|
296
|
+
background: var(--slider-track-color);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.Slider[data-disabled] .Range {
|
|
300
|
+
background: var(--slider-range-color);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.Slider[data-disabled] .Thumb {
|
|
304
|
+
box-shadow: var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color));
|
|
305
|
+
}
|
|
280
306
|
}
|
|
281
307
|
:where([data-plex-layout="phone"]) .SliderValue {
|
|
282
308
|
height: auto;
|
|
@@ -324,8 +350,20 @@
|
|
|
324
350
|
box-shadow: var(--mobile-knob-lens-shadow, var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color)));
|
|
325
351
|
}
|
|
326
352
|
|
|
327
|
-
/* Disabled, the track, its fill and the knob show at half opacity (State=Disabled). */
|
|
353
|
+
/* Disabled, the track, its fill and the knob show at half opacity (State=Disabled), in their own colors. */
|
|
328
354
|
:where([data-plex-layout="phone"]) .Slider[data-disabled] {
|
|
329
355
|
opacity: 0.5;
|
|
330
356
|
}
|
|
357
|
+
|
|
358
|
+
:where([data-plex-layout="phone"]) .Slider[data-disabled] .Track {
|
|
359
|
+
background: var(--slider-track-color);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
:where([data-plex-layout="phone"]) .Slider[data-disabled] .Range {
|
|
363
|
+
background: var(--slider-range-color);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
:where([data-plex-layout="phone"]) .Slider[data-disabled] .Thumb {
|
|
367
|
+
box-shadow: var(--slider-thumb-shadow, inset 0 0 0 2px var(--slider-range-color));
|
|
368
|
+
}
|
|
331
369
|
}
|
|
@@ -145,17 +145,40 @@
|
|
|
145
145
|
}.Toast :is([data-button], [data-close-button]):focus-visible {
|
|
146
146
|
box-shadow: none !important;
|
|
147
147
|
}/* A toast stays an in-app web message: it takes the look of an iOS notification banner on a phone
|
|
148
|
-
(below) but not its behavior. These targets and wrapping rules adapt Sonner's controls for touch
|
|
149
|
-
|
|
148
|
+
(below) but not its behavior. These targets and wrapping rules adapt Sonner's controls for touch.
|
|
149
|
+
One button stands at the trailing end of the message's row, where the kit's banner keeps its
|
|
150
|
+
one trailing item, the time (Notification - Collapsed Stack=1 0:11292), and the message wraps in
|
|
151
|
+
its own column. Beside a button the message keeps some room, and a button that would leave it
|
|
152
|
+
less wraps under it: half the row where the toast fills the width (a phone, below); 8em in a
|
|
153
|
+
toast as wide as its content, as half of a width the message itself sets would push a short
|
|
154
|
+
message off its row. Neither floor passes the row but the icon's 28px, so the message never
|
|
155
|
+
leaves the icon alone. Two buttons stand together under the message, as the banner keeps one
|
|
156
|
+
item at its end and Sonner draws them as two separate children. A button is whatever follows
|
|
157
|
+
the message: the renderers put only the cancel and the action there, theirs or the caller's own
|
|
158
|
+
element. */@media (max-width: 767px), (pointer: coarse) {
|
|
150
159
|
.Toast[data-styled="true"] {
|
|
151
160
|
flex-wrap: wrap;
|
|
152
161
|
}
|
|
153
162
|
|
|
154
163
|
.Toast[data-styled="true"] > .Content {
|
|
155
|
-
flex: 1 1
|
|
164
|
+
flex: 1 1 0;
|
|
156
165
|
min-width: 0;
|
|
157
166
|
}
|
|
158
167
|
|
|
168
|
+
.Toast[data-styled="true"]:has(> .Content ~ *) > .Content {
|
|
169
|
+
min-width: min(8em, 100% - 28px);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@media (width <= 600px) {
|
|
173
|
+
.Toast[data-styled="true"]:not(.Compact):has(> .Content ~ *) > .Content {
|
|
174
|
+
min-width: 50%;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.Toast[data-styled="true"]:has(> .Content ~ * ~ *) > .Content {
|
|
179
|
+
flex-basis: calc(100% - 28px);
|
|
180
|
+
}
|
|
181
|
+
|
|
159
182
|
.Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
|
|
160
183
|
box-sizing: border-box;
|
|
161
184
|
flex: 0 1 auto !important;
|
|
@@ -173,6 +196,8 @@
|
|
|
173
196
|
/* The 20px close face stays compact inside a separate 44px target. Reserve
|
|
174
197
|
the leading space so neither its target nor its ring covers the message. */
|
|
175
198
|
.Toast[data-styled="true"]:has([data-close-button]) {
|
|
199
|
+
/* The 44px target inside the padding box and Sonner's 1px border above and below */
|
|
200
|
+
min-height: 46px;
|
|
176
201
|
padding-inline-start: 56px !important;
|
|
177
202
|
}
|
|
178
203
|
|
|
@@ -219,10 +244,24 @@
|
|
|
219
244
|
}
|
|
220
245
|
|
|
221
246
|
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > .Content {
|
|
222
|
-
flex: 1 1
|
|
247
|
+
flex: 1 1 0;
|
|
223
248
|
min-width: 0;
|
|
224
249
|
}
|
|
225
250
|
|
|
251
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"]:has(> .Content ~ *) > .Content {
|
|
252
|
+
min-width: min(8em, 100% - 28px);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@media (width <= 600px) {
|
|
256
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"]:not(.Compact):has(> .Content ~ *) > .Content {
|
|
257
|
+
min-width: 50%;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
:where([data-plex-layout="phone"]) .Toast[data-styled="true"]:has(> .Content ~ * ~ *) > .Content {
|
|
262
|
+
flex-basis: calc(100% - 28px);
|
|
263
|
+
}
|
|
264
|
+
|
|
226
265
|
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
|
|
227
266
|
box-sizing: border-box;
|
|
228
267
|
flex: 0 1 auto !important;
|
|
@@ -240,6 +279,8 @@
|
|
|
240
279
|
/* The 20px close face stays compact inside a separate 44px target. Reserve
|
|
241
280
|
the leading space so neither its target nor its ring covers the message. */
|
|
242
281
|
:where([data-plex-layout="phone"]) .Toast[data-styled="true"]:has([data-close-button]) {
|
|
282
|
+
/* The 44px target inside the padding box and Sonner's 1px border above and below */
|
|
283
|
+
min-height: 46px;
|
|
243
284
|
padding-inline-start: 56px !important;
|
|
244
285
|
}
|
|
245
286
|
|
|
@@ -281,13 +322,15 @@
|
|
|
281
322
|
right: 0 !important;
|
|
282
323
|
}/* On a phone a toast takes the corners, padding and text of the iOS notification banner, the
|
|
283
324
|
system's own message at the top of the screen (kit iOS 27, Notifications, Notification - Collapsed
|
|
284
|
-
Stack=1 0:11292): corners 24, padding
|
|
285
|
-
description at 15/18. The kit's -0.23 tracking of 15pt text is
|
|
286
|
-
tracks it itself. It keeps its own width and opaque surface, not
|
|
287
|
-
|
|
325
|
+
Stack=1 0:11292): corners 24, padding 12 above and below and 14 at the sides, a 10px gap, the
|
|
326
|
+
title at 15/17 semibold and the description at 15/18. The kit's -0.23 tracking of 15pt text is
|
|
327
|
+
left to the system font, which tracks it itself. It keeps its own width and opaque surface, not
|
|
328
|
+
the banner's glass and width. Its buttons are drawn as a medium phone Button (touch.css): a 34px
|
|
329
|
+
capsule, 15/20 regular, gutter 14, its 44px target reaching 5px past it into the padding, so a
|
|
330
|
+
one-line toast with a button is 58 high. */@media (max-width: 767px) {
|
|
288
331
|
.Toast[data-styled="true"] {
|
|
289
332
|
gap: 10px !important;
|
|
290
|
-
padding: 14px !important;
|
|
333
|
+
padding: 12px 14px !important;
|
|
291
334
|
border-radius: 24px !important;
|
|
292
335
|
letter-spacing: normal;
|
|
293
336
|
}
|
|
@@ -305,7 +348,6 @@
|
|
|
305
348
|
.Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
|
|
306
349
|
position: relative;
|
|
307
350
|
min-height: 34px;
|
|
308
|
-
margin-block: 5px !important;
|
|
309
351
|
padding: 7px 14px !important;
|
|
310
352
|
border-radius: var(--radius-full) !important;
|
|
311
353
|
font-size: 15px !important;
|
|
@@ -322,7 +364,7 @@
|
|
|
322
364
|
}
|
|
323
365
|
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] {
|
|
324
366
|
gap: 10px !important;
|
|
325
|
-
padding: 14px !important;
|
|
367
|
+
padding: 12px 14px !important;
|
|
326
368
|
border-radius: 24px !important;
|
|
327
369
|
letter-spacing: normal;
|
|
328
370
|
}
|
|
@@ -340,7 +382,6 @@
|
|
|
340
382
|
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
|
|
341
383
|
position: relative;
|
|
342
384
|
min-height: 34px;
|
|
343
|
-
margin-block: 5px !important;
|
|
344
385
|
padding: 7px 14px !important;
|
|
345
386
|
border-radius: var(--radius-full) !important;
|
|
346
387
|
font-size: 15px !important;
|