@plexui/styles 0.16.6 → 0.17.0
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 +74 -12
- package/dist/es/components/Alert/Alert.module.css +196 -0
- package/dist/es/components/Breadcrumb/Breadcrumb.module.css +32 -1
- package/dist/es/components/Button/Button.module.css +483 -5
- package/dist/es/components/Button/NavigationButton.module.css +195 -0
- package/dist/es/components/Checkbox/Checkbox.module.css +246 -0
- package/dist/es/components/CodeBlock/CodeBlock.module.css +15 -1
- package/dist/es/components/DatePicker/Calendar.module.css +216 -0
- package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +19 -0
- package/dist/es/components/DateRangePicker/Calendar.module.css +200 -0
- package/dist/es/components/DateRangePicker/Trigger.module.css +15 -1
- package/dist/es/components/Dialog/Dialog.module.css +456 -0
- package/dist/es/components/Field/Field.module.css +713 -0
- package/dist/es/components/FieldGroup/FieldGroup.module.css +272 -0
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +49 -0
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +81 -0
- package/dist/es/components/Input/Input.module.css +184 -0
- package/dist/es/components/InputGroup/InputGroup.module.css +17 -0
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +60 -0
- package/dist/es/components/Menu/Menu.module.css +244 -0
- package/dist/es/components/NavigationRow/NavigationRow.module.css +82 -0
- package/dist/es/components/Page/Page.module.css +278 -0
- package/dist/es/components/PageControl/PageControl.module.css +35 -0
- package/dist/es/components/Popover/Popover.module.css +20 -0
- package/dist/es/components/RadioGroup/RadioGroup.module.css +151 -0
- package/dist/es/components/Select/Select.module.css +315 -0
- package/dist/es/components/SelectControl/SelectControl.module.css +104 -0
- package/dist/es/components/Sidebar/Sidebar.module.css +169 -0
- package/dist/es/components/Skeleton/Skeleton.module.css +50 -0
- package/dist/es/components/Slider/Slider.module.css +12 -1
- package/dist/es/components/Switch/Switch.module.css +143 -0
- package/dist/es/components/TabBar/TabBar.module.css +354 -0
- package/dist/es/components/Tabs/Tabs.module.css +162 -0
- package/dist/es/components/Tip/Tip.module.css +225 -0
- package/dist/es/components/Toast/Toast.module.css +207 -0
- package/dist/es/components/Toolbar/Toolbar.module.css +1542 -0
- package/dist/es/components/Tooltip/Tooltip.module.css +44 -0
- package/dist/es/styles/android.css +882 -0
- package/dist/es/styles/touch.css +672 -0
- package/dist/es/styles/variables-components.css +4 -0
- package/dist/es/styles/variables-semantic.css +28 -0
- package/dist/es/tokens/index.js +5 -0
- package/dist/es/tokens/index.js.map +1 -0
- package/dist/es/tokens/resolve.js +746 -0
- package/dist/es/tokens/resolve.js.map +1 -0
- package/dist/es/tokens/tokens.generated.js +5872 -0
- package/dist/es/tokens/tokens.generated.js.map +1 -0
- package/dist/types/tokens/index.d.ts +19 -0
- package/dist/types/tokens/resolve.d.ts +145 -0
- package/dist/types/tokens/tokens.generated.d.ts +13 -0
- package/package.json +7 -2
|
@@ -156,6 +156,70 @@
|
|
|
156
156
|
.Thumb[data-disabled] {
|
|
157
157
|
background: var(--switch-thumb-color);
|
|
158
158
|
}
|
|
159
|
+
|
|
160
|
+
/* The Plex Android switch (@plexui/react-native on Android): a 37 x 20 view holding a 31 x 14 track (corners 7)
|
|
161
|
+
and a 20 thumb over it, a 2px ring of the track's color around a 16 knob of the card's color, its center 7 along
|
|
162
|
+
the track off and 24 on. Off the track is a mid gray, on the accent solid (Android's own
|
|
163
|
+
selection color, as the reference app); the color changes as the thumb moves, in Android's 200ms ease-in-out. A held switch shows no
|
|
164
|
+
lens (a row lights instead); disabled, it fades to half with its colors. The label is 16/24, 11 from the
|
|
165
|
+
switch, a description 13/16. At the end of a row with no text of its own it stands at the row's inset, 21 from
|
|
166
|
+
the card's edge. */
|
|
167
|
+
[data-platform="android"] .Container {
|
|
168
|
+
--android-switch-on: var(--color-background-accent-solid);
|
|
169
|
+
--android-switch-ease: cubic-bezier(0.37, 0, 0.63, 1);
|
|
170
|
+
--switch-track-width: 37px;
|
|
171
|
+
--switch-track-height: 20px;
|
|
172
|
+
--switch-thumb-width: 20px;
|
|
173
|
+
--switch-thumb-size: 20px;
|
|
174
|
+
--switch-thumb-offset: 0px;
|
|
175
|
+
--switch-thumb-color: var(--mobile-surface-grouped-secondary, var(--color-surface));
|
|
176
|
+
--switch-track-color: transparent;
|
|
177
|
+
--switch-track-color-hover: transparent;
|
|
178
|
+
--switch-track-color-checked: transparent;
|
|
179
|
+
--switch-track-color-checked-disabled: transparent;
|
|
180
|
+
--switch-track-color-disabled: transparent;
|
|
181
|
+
--switch-track-top-offset: 2px;
|
|
182
|
+
--switch-label-padding-top: 0px;
|
|
183
|
+
--switch-label-gap: 11px;
|
|
184
|
+
--switch-label-font-size: 16px;
|
|
185
|
+
--switch-label-line-height: 24px;
|
|
186
|
+
--switch-description-font-size: 13px;
|
|
187
|
+
--switch-description-line-height: 16px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
[data-platform="android"] .Container[data-color="accent"] {
|
|
191
|
+
--android-switch-on: var(--color-background-accent-solid);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
[data-platform="android"] .Track {
|
|
195
|
+
--android-switch-track: var(--android-switch-off);
|
|
196
|
+
--switch-thumb-shadow: inset 0 0 0 2px var(--android-switch-track);
|
|
197
|
+
--mobile-switch-knob-lens-scale: none;
|
|
198
|
+
--mobile-knob-lens-background: var(--switch-thumb-color);
|
|
199
|
+
--mobile-knob-lens-shadow: var(--switch-thumb-shadow);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
[data-platform="android"] .Track[data-state="checked"] {
|
|
203
|
+
--android-switch-track: var(--android-switch-on);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[data-platform="android"] .Track::before {
|
|
207
|
+
position: absolute;
|
|
208
|
+
inset: 3px;
|
|
209
|
+
border-radius: 7px;
|
|
210
|
+
background: var(--android-switch-track);
|
|
211
|
+
content: "";
|
|
212
|
+
transition: background-color 200ms var(--android-switch-ease);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
[data-platform="android"] .Thumb {
|
|
216
|
+
transition-timing-function: var(--android-switch-ease);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[data-platform="android"] .Thumb[data-disabled] {
|
|
220
|
+
box-shadow: var(--switch-thumb-shadow);
|
|
221
|
+
}
|
|
222
|
+
|
|
159
223
|
}
|
|
160
224
|
:where([data-plex-layout="phone"]) .Thumb {
|
|
161
225
|
transition:
|
|
@@ -183,4 +247,83 @@
|
|
|
183
247
|
:where([data-plex-layout="phone"]) .Thumb[data-disabled] {
|
|
184
248
|
background: var(--switch-thumb-color);
|
|
185
249
|
}
|
|
250
|
+
|
|
251
|
+
/* The Plex Android switch (@plexui/react-native on Android): a 37 x 20 view holding a 31 x 14 track (corners 7)
|
|
252
|
+
and a 20 thumb over it, a 2px ring of the track's color around a 16 knob of the card's color, its center 7 along
|
|
253
|
+
the track off and 24 on. Off the track is a mid gray, on the accent solid (Android's own
|
|
254
|
+
selection color, as the reference app); the color changes as the thumb moves, in Android's 200ms ease-in-out. A held switch shows no
|
|
255
|
+
lens (a row lights instead); disabled, it fades to half with its colors. The label is 16/24, 11 from the
|
|
256
|
+
switch, a description 13/16. At the end of a row with no text of its own it stands at the row's inset, 21 from
|
|
257
|
+
the card's edge. */
|
|
258
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Container {
|
|
259
|
+
--android-switch-on: var(--color-background-accent-solid);
|
|
260
|
+
--android-switch-ease: cubic-bezier(0.37, 0, 0.63, 1);
|
|
261
|
+
--switch-track-width: 37px;
|
|
262
|
+
--switch-track-height: 20px;
|
|
263
|
+
--switch-thumb-width: 20px;
|
|
264
|
+
--switch-thumb-size: 20px;
|
|
265
|
+
--switch-thumb-offset: 0px;
|
|
266
|
+
--switch-thumb-color: var(--mobile-surface-grouped-secondary, var(--color-surface));
|
|
267
|
+
--switch-track-color: transparent;
|
|
268
|
+
--switch-track-color-hover: transparent;
|
|
269
|
+
--switch-track-color-checked: transparent;
|
|
270
|
+
--switch-track-color-checked-disabled: transparent;
|
|
271
|
+
--switch-track-color-disabled: transparent;
|
|
272
|
+
--switch-track-top-offset: 2px;
|
|
273
|
+
--switch-label-padding-top: 0px;
|
|
274
|
+
--switch-label-gap: 11px;
|
|
275
|
+
--switch-label-font-size: 16px;
|
|
276
|
+
--switch-label-line-height: 24px;
|
|
277
|
+
--switch-description-font-size: 13px;
|
|
278
|
+
--switch-description-line-height: 16px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Container[data-color="accent"] {
|
|
282
|
+
--android-switch-on: var(--color-background-accent-solid);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Track {
|
|
286
|
+
--android-switch-track: var(--android-switch-off);
|
|
287
|
+
--switch-thumb-shadow: inset 0 0 0 2px var(--android-switch-track);
|
|
288
|
+
--mobile-switch-knob-lens-scale: none;
|
|
289
|
+
--mobile-knob-lens-background: var(--switch-thumb-color);
|
|
290
|
+
--mobile-knob-lens-shadow: var(--switch-thumb-shadow);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Track[data-state="checked"] {
|
|
294
|
+
--android-switch-track: var(--android-switch-on);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Track::before {
|
|
298
|
+
position: absolute;
|
|
299
|
+
inset: 3px;
|
|
300
|
+
border-radius: 7px;
|
|
301
|
+
background: var(--android-switch-track);
|
|
302
|
+
content: "";
|
|
303
|
+
transition: background-color 200ms var(--android-switch-ease);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Thumb {
|
|
307
|
+
transition-timing-function: var(--android-switch-ease);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Thumb[data-disabled] {
|
|
311
|
+
box-shadow: var(--switch-thumb-shadow);
|
|
312
|
+
}/* On a phone the label of a check, a switch or a radio is part of the control it presses: a long press or a double tap
|
|
313
|
+
does not select it nor call up the text menu. */@media (max-width: 767px) {
|
|
314
|
+
.Container > .Label,
|
|
315
|
+
.LabelGroup {
|
|
316
|
+
-webkit-touch-callout: none;
|
|
317
|
+
-webkit-user-select: none;
|
|
318
|
+
-moz-user-select: none;
|
|
319
|
+
user-select: none;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
:where([data-plex-layout="phone"]) .Container > .Label,
|
|
323
|
+
:where([data-plex-layout="phone"]) .LabelGroup {
|
|
324
|
+
-webkit-touch-callout: none;
|
|
325
|
+
-webkit-user-select: none;
|
|
326
|
+
-moz-user-select: none;
|
|
327
|
+
user-select: none;
|
|
328
|
+
}
|
|
186
329
|
}
|
|
@@ -322,6 +322,183 @@
|
|
|
322
322
|
flex: 1 1 0;
|
|
323
323
|
height: var(--tab-bar-minimized-size);
|
|
324
324
|
}
|
|
325
|
+
|
|
326
|
+
/* =============================================
|
|
327
|
+
The Plex Android look (`data-platform="android"`, android.css), after @plexui/react-native's TabBar on Android
|
|
328
|
+
(decision 0026): the tabs in a 56px capsule of the tabs' glass (the card at 76%, a thin rim, a tight shadow) 12
|
|
329
|
+
from the screen's sides and 8 over the gesture bar, 4 inside it; each tab 48 tall, a 24px symbol over a 12/16
|
|
330
|
+
Medium label (Bold when selected), as wide as its label and 16 a side, the tabs growing together to fill 320;
|
|
331
|
+
the selected one in the accent on its own pill of the accent at 9%. Search or a prominent tab is a 56px circle
|
|
332
|
+
8 beside the capsule. A badge is the accent's 16px capsule ringed in the card's color. No minimized state: a
|
|
333
|
+
minimized bar keeps its tabs. Soft is the screen's color at 81% fading in over 60px from the bar's top.
|
|
334
|
+
============================================= */
|
|
335
|
+
[data-platform="android"] .TabBar {
|
|
336
|
+
--tab-bar-gutter: 12px;
|
|
337
|
+
--tab-bar-gap: 8px;
|
|
338
|
+
--tab-bar-padding-top: 8px;
|
|
339
|
+
--tab-bar-padding-bottom: calc(var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) + 8px);
|
|
340
|
+
--tab-bar-capsule-padding-block: 4px;
|
|
341
|
+
--tab-bar-capsule-padding-inline: 4px;
|
|
342
|
+
--tab-bar-item-height: 48px;
|
|
343
|
+
--tab-bar-pill-outset: 0px;
|
|
344
|
+
--tab-bar-icon-box: 24px;
|
|
345
|
+
--tab-bar-icon-size: 24px;
|
|
346
|
+
--tab-bar-label-font-size: 12px;
|
|
347
|
+
--tab-bar-label-line-height: 16px;
|
|
348
|
+
--tab-bar-label-font-weight: var(--font-weight-medium);
|
|
349
|
+
--tab-bar-search-size: 56px;
|
|
350
|
+
--tab-bar-item-color: var(--color-text);
|
|
351
|
+
--tab-bar-item-color-selected: var(--android-tab-selected);
|
|
352
|
+
--tab-bar-item-background-selected: color-mix(in srgb, var(--color-background-accent-solid) 9%, transparent);
|
|
353
|
+
--tab-bar-badge-size: 16px;
|
|
354
|
+
--tab-bar-badge-padding-inline: 4px;
|
|
355
|
+
--tab-bar-badge-font-size: 12px;
|
|
356
|
+
--tab-bar-badge-font-weight: var(--font-weight-medium);
|
|
357
|
+
--tab-bar-badge-top: 0.67px;
|
|
358
|
+
--tab-bar-badge-start: 1.67px;
|
|
359
|
+
--tab-bar-badge-background: var(--color-background-accent-solid);
|
|
360
|
+
--tab-bar-badge-color: var(--color-text-accent-solid);
|
|
361
|
+
--tab-bar-accessory-height: 56px;
|
|
362
|
+
--mobile-glass-background: var(--android-tabs-glass);
|
|
363
|
+
--mobile-glass-sheen: none;
|
|
364
|
+
--mobile-glass-shadow: var(--android-tabs-shadow);
|
|
365
|
+
--mobile-glass-shadow-raised: var(--android-tabs-shadow);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
[data-platform="android"] .TabBar[data-minimized] {
|
|
369
|
+
padding: var(--tab-bar-padding-top) var(--tab-bar-gutter) var(--tab-bar-padding-bottom);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
[data-platform="android"] .TabBar:is([data-search], [data-prominent], [data-minimized]) {
|
|
373
|
+
justify-content: center;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
[data-platform="android"] .TabBar[data-background="soft"]::before {
|
|
377
|
+
display: block;
|
|
378
|
+
inset: 0;
|
|
379
|
+
background: color-mix(in srgb, var(--tab-bar-edge-background, var(--page-background)) 81.4%, transparent);
|
|
380
|
+
backdrop-filter: none;
|
|
381
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent, rgb(0 0 0 / 41.4%) 20px, rgb(0 0 0 / 75.9%) 40px, #000 60px);
|
|
382
|
+
mask-image: linear-gradient(to bottom, transparent, rgb(0 0 0 / 41.4%) 20px, rgb(0 0 0 / 75.9%) 40px, #000 60px);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
[data-platform="android"] .TabBar:is([data-background="hard"], [data-background="glass"])::before {
|
|
386
|
+
border-top-color: transparent;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
[data-platform="android"] .Tabs {
|
|
390
|
+
min-width: min(328px, 100%);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
[data-platform="android"] .Tabs > .Item {
|
|
394
|
+
flex: 1 1 auto;
|
|
395
|
+
justify-content: center;
|
|
396
|
+
gap: 0;
|
|
397
|
+
width: auto;
|
|
398
|
+
padding: 0 16px;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
[data-platform="android"] .Tabs > .Item[data-selected] > .Label {
|
|
402
|
+
font-weight: var(--font-weight-bold);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
[data-platform="android"] .Tabs > .Item[data-selected] > .Icon {
|
|
406
|
+
color: var(--color-background-accent-solid);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
[data-platform="android"] .Tabs > .Item[data-disabled] {
|
|
410
|
+
color: color-mix(in srgb, var(--color-text) 38%, transparent);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
[data-platform="android"] .Badge {
|
|
414
|
+
box-sizing: content-box;
|
|
415
|
+
border: 1.33px solid var(--android-card);
|
|
416
|
+
line-height: 16px;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
[data-platform="android"] .Item[data-selected] .Badge {
|
|
420
|
+
border-color: color-mix(in srgb, var(--color-background-accent-solid) 9%, var(--android-card));
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/* The circle beside the capsule: a symbol in the text color, the accent when selected; a prominent one the accent
|
|
424
|
+
with its ink. Held, it ripples as a bar's glass circle (android.css, Android press ripple): a circle of 20px round
|
|
425
|
+
its center in the list selector, a prominent one in its ink at 20%, as the reference's accent Done pill. */
|
|
426
|
+
[data-platform="android"] .Item:is(.Search, .Prominent) {
|
|
427
|
+
--android-ripple-radius: 20px;
|
|
428
|
+
color: var(--color-text);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
[data-platform="android"] .Item:is(.Search, .Prominent)::before {
|
|
432
|
+
inset: 0;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
[data-platform="android"] .Item:is(.Search, .Prominent)[data-selected] {
|
|
436
|
+
color: var(--color-background-accent-solid);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
[data-platform="android"] .Item:is(.Search, .Prominent)[data-selected]::before {
|
|
440
|
+
background: transparent;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
[data-platform="android"] .Item:is(.Search, .Prominent)[data-ripple]:not([data-disabled])::before {
|
|
444
|
+
background-image: var(--android-ripple-image);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
[data-platform="android"] .Item.Prominent {
|
|
448
|
+
--android-ripple-ink: color-mix(in srgb, var(--color-text-accent-solid) 20%, transparent);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
[data-platform="android"] .Item.Prominent:not([data-disabled]) {
|
|
452
|
+
background-color: var(--color-background-accent-solid);
|
|
453
|
+
color: var(--color-text-accent-solid);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/* Minimized, the Android bar keeps every tab with its label. */
|
|
457
|
+
[data-platform="android"] .TabBar[data-minimized] .Tabs {
|
|
458
|
+
flex: 0 1 auto;
|
|
459
|
+
padding: var(--tab-bar-capsule-padding-block) var(--tab-bar-capsule-padding-inline);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
[data-platform="android"] .TabBar[data-minimized] .Tabs > .Item,
|
|
463
|
+
[data-platform="android"] .TabBar[data-minimized] .Tabs > .Item[data-selected],
|
|
464
|
+
[data-platform="android"] .TabBar[data-minimized] .Tabs:not(:has(> .Item[data-selected])) > .Item:first-child {
|
|
465
|
+
display: flex;
|
|
466
|
+
flex: 1 1 auto;
|
|
467
|
+
width: auto;
|
|
468
|
+
height: var(--tab-bar-item-height);
|
|
469
|
+
padding: 0 16px;
|
|
470
|
+
color: var(--tab-bar-item-color);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
[data-platform="android"] .TabBar[data-minimized] .Tabs > .Item::before, [data-platform="android"] .TabBar[data-minimized] .Tabs > .Item[data-selected]::before, [data-platform="android"] .TabBar[data-minimized] .Tabs:not(:has(> .Item[data-selected])) > .Item:first-child::before {
|
|
474
|
+
background: transparent;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
[data-platform="android"] .TabBar[data-minimized] .Tabs > .Item[data-selected] {
|
|
478
|
+
color: var(--tab-bar-item-color-selected);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
[data-platform="android"] .TabBar[data-minimized] .Tabs > .Item[data-selected]::before {
|
|
482
|
+
background: var(--tab-bar-item-background-selected);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
[data-platform="android"] .TabBar[data-minimized] .Tabs .Badge {
|
|
486
|
+
top: var(--tab-bar-badge-top);
|
|
487
|
+
left: calc(50% + var(--tab-bar-badge-start));
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
[data-platform="android"] .TabBar[data-minimized] .Tabs .Label {
|
|
491
|
+
position: static;
|
|
492
|
+
width: auto;
|
|
493
|
+
height: auto;
|
|
494
|
+
overflow: hidden;
|
|
495
|
+
clip-path: none;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
[data-platform="android"] .TabBar[data-minimized] .Item:is(.Search, .Prominent) {
|
|
499
|
+
width: var(--tab-bar-search-size);
|
|
500
|
+
height: var(--tab-bar-search-size);
|
|
501
|
+
}
|
|
325
502
|
}
|
|
326
503
|
/* 402 x 95: the capsule 62 tall, 21px from the sides and the bottom, 12px below the top of the bar. */
|
|
327
504
|
:where([data-plex-layout="phone"]) .TabBar {
|
|
@@ -643,4 +820,181 @@
|
|
|
643
820
|
flex: 1 1 0;
|
|
644
821
|
height: var(--tab-bar-minimized-size);
|
|
645
822
|
}
|
|
823
|
+
|
|
824
|
+
/* =============================================
|
|
825
|
+
The Plex Android look (`data-platform="android"`, android.css), after @plexui/react-native's TabBar on Android
|
|
826
|
+
(decision 0026): the tabs in a 56px capsule of the tabs' glass (the card at 76%, a thin rim, a tight shadow) 12
|
|
827
|
+
from the screen's sides and 8 over the gesture bar, 4 inside it; each tab 48 tall, a 24px symbol over a 12/16
|
|
828
|
+
Medium label (Bold when selected), as wide as its label and 16 a side, the tabs growing together to fill 320;
|
|
829
|
+
the selected one in the accent on its own pill of the accent at 9%. Search or a prominent tab is a 56px circle
|
|
830
|
+
8 beside the capsule. A badge is the accent's 16px capsule ringed in the card's color. No minimized state: a
|
|
831
|
+
minimized bar keeps its tabs. Soft is the screen's color at 81% fading in over 60px from the bar's top.
|
|
832
|
+
============================================= */
|
|
833
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar {
|
|
834
|
+
--tab-bar-gutter: 12px;
|
|
835
|
+
--tab-bar-gap: 8px;
|
|
836
|
+
--tab-bar-padding-top: 8px;
|
|
837
|
+
--tab-bar-padding-bottom: calc(var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) + 8px);
|
|
838
|
+
--tab-bar-capsule-padding-block: 4px;
|
|
839
|
+
--tab-bar-capsule-padding-inline: 4px;
|
|
840
|
+
--tab-bar-item-height: 48px;
|
|
841
|
+
--tab-bar-pill-outset: 0px;
|
|
842
|
+
--tab-bar-icon-box: 24px;
|
|
843
|
+
--tab-bar-icon-size: 24px;
|
|
844
|
+
--tab-bar-label-font-size: 12px;
|
|
845
|
+
--tab-bar-label-line-height: 16px;
|
|
846
|
+
--tab-bar-label-font-weight: var(--font-weight-medium);
|
|
847
|
+
--tab-bar-search-size: 56px;
|
|
848
|
+
--tab-bar-item-color: var(--color-text);
|
|
849
|
+
--tab-bar-item-color-selected: var(--android-tab-selected);
|
|
850
|
+
--tab-bar-item-background-selected: color-mix(in srgb, var(--color-background-accent-solid) 9%, transparent);
|
|
851
|
+
--tab-bar-badge-size: 16px;
|
|
852
|
+
--tab-bar-badge-padding-inline: 4px;
|
|
853
|
+
--tab-bar-badge-font-size: 12px;
|
|
854
|
+
--tab-bar-badge-font-weight: var(--font-weight-medium);
|
|
855
|
+
--tab-bar-badge-top: 0.67px;
|
|
856
|
+
--tab-bar-badge-start: 1.67px;
|
|
857
|
+
--tab-bar-badge-background: var(--color-background-accent-solid);
|
|
858
|
+
--tab-bar-badge-color: var(--color-text-accent-solid);
|
|
859
|
+
--tab-bar-accessory-height: 56px;
|
|
860
|
+
--mobile-glass-background: var(--android-tabs-glass);
|
|
861
|
+
--mobile-glass-sheen: none;
|
|
862
|
+
--mobile-glass-shadow: var(--android-tabs-shadow);
|
|
863
|
+
--mobile-glass-shadow-raised: var(--android-tabs-shadow);
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] {
|
|
867
|
+
padding: var(--tab-bar-padding-top) var(--tab-bar-gutter) var(--tab-bar-padding-bottom);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar:is([data-search], [data-prominent], [data-minimized]) {
|
|
871
|
+
justify-content: center;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-background="soft"]::before {
|
|
875
|
+
display: block;
|
|
876
|
+
inset: 0;
|
|
877
|
+
background: color-mix(in srgb, var(--tab-bar-edge-background, var(--page-background)) 81.4%, transparent);
|
|
878
|
+
backdrop-filter: none;
|
|
879
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent, rgb(0 0 0 / 41.4%) 20px, rgb(0 0 0 / 75.9%) 40px, #000 60px);
|
|
880
|
+
mask-image: linear-gradient(to bottom, transparent, rgb(0 0 0 / 41.4%) 20px, rgb(0 0 0 / 75.9%) 40px, #000 60px);
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar:is([data-background="hard"], [data-background="glass"])::before {
|
|
884
|
+
border-top-color: transparent;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Tabs {
|
|
888
|
+
min-width: min(328px, 100%);
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Tabs > .Item {
|
|
892
|
+
flex: 1 1 auto;
|
|
893
|
+
justify-content: center;
|
|
894
|
+
gap: 0;
|
|
895
|
+
width: auto;
|
|
896
|
+
padding: 0 16px;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Tabs > .Item[data-selected] > .Label {
|
|
900
|
+
font-weight: var(--font-weight-bold);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Tabs > .Item[data-selected] > .Icon {
|
|
904
|
+
color: var(--color-background-accent-solid);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Tabs > .Item[data-disabled] {
|
|
908
|
+
color: color-mix(in srgb, var(--color-text) 38%, transparent);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Badge {
|
|
912
|
+
box-sizing: content-box;
|
|
913
|
+
border: 1.33px solid var(--android-card);
|
|
914
|
+
line-height: 16px;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Item[data-selected] .Badge {
|
|
918
|
+
border-color: color-mix(in srgb, var(--color-background-accent-solid) 9%, var(--android-card));
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
/* The circle beside the capsule: a symbol in the text color, the accent when selected; a prominent one the accent
|
|
922
|
+
with its ink. Held, it ripples as a bar's glass circle (android.css, Android press ripple): a circle of 20px round
|
|
923
|
+
its center in the list selector, a prominent one in its ink at 20%, as the reference's accent Done pill. */
|
|
924
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Item:is(.Search, .Prominent) {
|
|
925
|
+
--android-ripple-radius: 20px;
|
|
926
|
+
color: var(--color-text);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Item:is(.Search, .Prominent)::before {
|
|
930
|
+
inset: 0;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Item:is(.Search, .Prominent)[data-selected] {
|
|
934
|
+
color: var(--color-background-accent-solid);
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Item:is(.Search, .Prominent)[data-selected]::before {
|
|
938
|
+
background: transparent;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Item:is(.Search, .Prominent)[data-ripple]:not([data-disabled])::before {
|
|
942
|
+
background-image: var(--android-ripple-image);
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Item.Prominent {
|
|
946
|
+
--android-ripple-ink: color-mix(in srgb, var(--color-text-accent-solid) 20%, transparent);
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .Item.Prominent:not([data-disabled]) {
|
|
950
|
+
background-color: var(--color-background-accent-solid);
|
|
951
|
+
color: var(--color-text-accent-solid);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
/* Minimized, the Android bar keeps every tab with its label. */
|
|
955
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs {
|
|
956
|
+
flex: 0 1 auto;
|
|
957
|
+
padding: var(--tab-bar-capsule-padding-block) var(--tab-bar-capsule-padding-inline);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs > .Item,
|
|
961
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs > .Item[data-selected],
|
|
962
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs:not(:has(> .Item[data-selected])) > .Item:first-child {
|
|
963
|
+
display: flex;
|
|
964
|
+
flex: 1 1 auto;
|
|
965
|
+
width: auto;
|
|
966
|
+
height: var(--tab-bar-item-height);
|
|
967
|
+
padding: 0 16px;
|
|
968
|
+
color: var(--tab-bar-item-color);
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs > .Item::before, :where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs > .Item[data-selected]::before, :where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs:not(:has(> .Item[data-selected])) > .Item:first-child::before {
|
|
972
|
+
background: transparent;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs > .Item[data-selected] {
|
|
976
|
+
color: var(--tab-bar-item-color-selected);
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs > .Item[data-selected]::before {
|
|
980
|
+
background: var(--tab-bar-item-background-selected);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs .Badge {
|
|
984
|
+
top: var(--tab-bar-badge-top);
|
|
985
|
+
left: calc(50% + var(--tab-bar-badge-start));
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Tabs .Label {
|
|
989
|
+
position: static;
|
|
990
|
+
width: auto;
|
|
991
|
+
height: auto;
|
|
992
|
+
overflow: hidden;
|
|
993
|
+
clip-path: none;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
:where([data-plex-layout="phone"]) [data-platform="android"] .TabBar[data-minimized] .Item:is(.Search, .Prominent) {
|
|
997
|
+
width: var(--tab-bar-search-size);
|
|
998
|
+
height: var(--tab-bar-search-size);
|
|
999
|
+
}
|
|
646
1000
|
}
|