@plexui/styles 0.1.34 → 0.1.35

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.
Files changed (50) hide show
  1. package/dist/es/components/Accordion/Accordion.module.css +12 -1
  2. package/dist/es/components/Alert/Alert.module.css +101 -0
  3. package/dist/es/components/Badge/Badge.module.css +37 -0
  4. package/dist/es/components/Breadcrumb/Breadcrumb.module.css +29 -0
  5. package/dist/es/components/Button/Button.module.css +53 -0
  6. package/dist/es/components/Button/NavigationButton.module.css +17 -0
  7. package/dist/es/components/ButtonGroup/ButtonGroup.module.css +227 -20
  8. package/dist/es/components/Card/Card.module.css +9 -0
  9. package/dist/es/components/CodeBlock/CodeBlock.module.css +14 -1
  10. package/dist/es/components/ColorPicker/ColorPicker.module.css +19 -1
  11. package/dist/es/components/DatePicker/Calendar.module.css +262 -2
  12. package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +10 -0
  13. package/dist/es/components/DateRangePicker/Calendar.module.css +207 -3
  14. package/dist/es/components/DateRangePicker/Trigger.module.css +17 -2
  15. package/dist/es/components/Dialog/Dialog.module.css +660 -13
  16. package/dist/es/components/EmptyMessage/EmptyMessage.module.css +21 -0
  17. package/dist/es/components/Field/Field.module.css +387 -2
  18. package/dist/es/components/FieldGroup/FieldGroup.module.css +129 -3
  19. package/dist/es/components/FileUpload/FileUpload.module.css +74 -1
  20. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +19 -1
  21. package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +12 -1
  22. package/dist/es/components/IndexBar/IndexBar.module.css +146 -0
  23. package/dist/es/components/Input/Input.module.css +129 -1
  24. package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +18 -0
  25. package/dist/es/components/Menu/Menu.module.css +267 -7
  26. package/dist/es/components/OTPInput/OTPInput.module.css +6 -1
  27. package/dist/es/components/Page/Page.module.css +302 -10
  28. package/dist/es/components/PhoneLayout/PhoneLayout.module.css +10 -0
  29. package/dist/es/components/Popover/Popover.module.css +7 -0
  30. package/dist/es/components/Select/Select.module.css +148 -0
  31. package/dist/es/components/SelectControl/SelectControl.module.css +113 -1
  32. package/dist/es/components/Sidebar/Sidebar.module.css +354 -20
  33. package/dist/es/components/Slider/Slider.module.css +80 -0
  34. package/dist/es/components/SwipeActions/SwipeActions.module.css +166 -0
  35. package/dist/es/components/Switch/Switch.module.css +59 -4
  36. package/dist/es/components/TabBar/TabBar.module.css +255 -10
  37. package/dist/es/components/Tabs/Tabs.module.css +166 -1
  38. package/dist/es/components/TagInput/TagInput.module.css +50 -9
  39. package/dist/es/components/Textarea/Textarea.module.css +6 -0
  40. package/dist/es/components/Tip/Tip.module.css +456 -0
  41. package/dist/es/components/Toast/Toast.module.css +148 -5
  42. package/dist/es/components/Toolbar/Toolbar.module.css +642 -3
  43. package/dist/es/styles/mobile-materials.css +94 -5
  44. package/dist/es/styles/mobile-surfaces.css +43 -0
  45. package/dist/es/styles/touch.css +618 -8
  46. package/dist/es/styles/variables-components.css +125 -5
  47. package/package.json +1 -1
  48. package/postcss/parseLightDark.mjs +20 -2
  49. package/postcss/phoneLayoutScope.mjs +134 -0
  50. package/postcss.config.mjs +3 -0
@@ -0,0 +1,456 @@
1
+ @layer components {/* A tip after TipKit (kit TipKit Community: macOS Mini Tip 118:5175, iOS Mini Tip 41:1351; tokens in
2
+ variables-components.css). The kit's three styles: an inline tip (Hint), an inline tip with an arrow at one
3
+ edge (Annotation, `arrowEdge`) and a tip anchored to a control (Popover, `Tip.Popover`). An optional symbol
4
+ leads the message, Close sits in the trailing corner and the actions take a line of their own below. */.Transition {
5
+ /* CSS Modules requires a top-level class to create the string map entry */
6
+ }.Tip {
7
+ position: relative;
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ align-items: flex-start;
11
+ -moz-column-gap: 12px;
12
+ column-gap: 12px;
13
+ row-gap: var(--tip-gap);
14
+ box-sizing: border-box;
15
+ padding: var(--tip-padding-top) var(--tip-padding-inline) var(--tip-padding-bottom);
16
+ border-radius: var(--tip-radius);
17
+ background: var(--tip-background);
18
+ color: var(--color-text);
19
+ text-align: start;
20
+ }
21
+
22
+ .Tip:not(:has(> .Actions)) {
23
+ padding-bottom: var(--tip-padding-top);
24
+ }/* The symbol: 6 in from the padding in a 44 by 54 frame, 12 from the text, in the description's color */.Icon {
25
+ display: flex;
26
+ flex-shrink: 0;
27
+ align-items: center;
28
+ justify-content: center;
29
+ width: var(--tip-icon-frame-width);
30
+ height: var(--tip-icon-frame-height);
31
+ margin-inline-start: 6px;
32
+ color: var(--tip-description-color);
33
+ }
34
+
35
+ .Icon > svg {
36
+ width: var(--tip-icon-size);
37
+ height: var(--tip-icon-size);
38
+ }.Message {
39
+ flex: 1;
40
+ min-width: 0;
41
+ }
42
+
43
+ /* Next to a symbol the whole message stops short of Close (the kit's 172 of 206) */
44
+ .Tip:has(> .Icon):has(> .Close) .Message {
45
+ padding-inline-end: calc(var(--tip-close-size) + var(--tip-close-offset) - var(--tip-padding-inline) + 1px);
46
+ }.Title {
47
+ margin: 0;
48
+ font-size: var(--tip-title-font-size);
49
+ font-weight: var(--font-weight-semibold);
50
+ line-height: var(--tip-title-line-height);
51
+ text-wrap: pretty;
52
+ }
53
+
54
+ /* The kit's title stops short of Close (234 of 268); the description runs under it */
55
+ .Tip:has(> .Close):not(:has(> .Icon)) .Title {
56
+ padding-inline-end: calc(var(--tip-close-size) + var(--tip-close-offset) - var(--tip-padding-inline) + 1px);
57
+ }
58
+
59
+ .Title ~ .Description {
60
+ margin-top: var(--tip-description-gap);
61
+ }.Description {
62
+ margin: 0;
63
+ color: var(--tip-description-color);
64
+ font-size: var(--tip-description-font-size);
65
+ line-height: var(--tip-description-line-height);
66
+ text-wrap: pretty;
67
+ }/* Side by side, each as wide as the others (the kit's 128 and 128 in 268) */.Actions {
68
+ display: flex;
69
+ flex: 1 0 100%;
70
+ flex-flow: row wrap;
71
+ gap: 10px var(--tip-action-gap);
72
+ }
73
+
74
+ .Actions > * {
75
+ flex: 1 0 0;
76
+ min-width: calc(50% - var(--tip-action-gap) / 2);
77
+ max-width: 100%;
78
+ }/* Two classes: over the Button's own size and position, whichever stylesheet loads first */.Tip > .Close {
79
+ --button-uniform-size: var(--tip-close-size);
80
+ --button-icon-size: var(--tip-close-icon-size);
81
+ position: absolute;
82
+ top: var(--tip-close-offset);
83
+ inset-inline-end: var(--tip-close-offset);
84
+ }/* =============================================
85
+ Annotation: the arrow at one edge of an inline tip, in its fill. The tip leaves room for it.
86
+ ============================================= */.Tip[data-arrow-edge]::before {
87
+ position: absolute;
88
+ width: var(--tip-arrow-width);
89
+ height: var(--tip-arrow-height);
90
+ background: inherit;
91
+ /* The kit's arrow (47 by 13), pointing down */
92
+ clip-path: path("M0 0C1.71 0 3.42 -.01 5.14 .01C6.78 .03 8.61 .06 10.21 .66C11.93 1.31 13.07 2.44 14.22 3.78C15.04 4.74 16.67 6.8 17.46 7.79C18.1 8.6 19.37 10.21 20.06 10.98C20.93 11.96 22.01 13 23.5 13C24.99 13 26.07 11.96 26.94 10.98C27.63 10.21 28.9 8.6 29.54 7.79C30.33 6.8 31.96 4.74 32.78 3.78C33.93 2.44 35.07 1.31 36.79 .66C38.39 .06 40.22 .03 41.86 .01C43.58 -.01 45.29 0 47 0Z");
93
+ content: "";
94
+ }.Tip[data-arrow-edge="top"] {
95
+ margin-top: var(--tip-arrow-height);
96
+ }
97
+
98
+ .Tip[data-arrow-edge="top"]::before {
99
+ bottom: 100%;
100
+ left: calc(50% - var(--tip-arrow-width) / 2);
101
+ transform: rotate(180deg);
102
+ }.Tip[data-arrow-edge="bottom"] {
103
+ margin-bottom: var(--tip-arrow-height);
104
+ }
105
+
106
+ .Tip[data-arrow-edge="bottom"]::before {
107
+ top: 100%;
108
+ left: calc(50% - var(--tip-arrow-width) / 2);
109
+ }/* A sideways arrow turns about its own center, so it is moved by half its length less half its height */.Tip[data-arrow-edge="left"] {
110
+ margin-left: var(--tip-arrow-height);
111
+ }
112
+
113
+ .Tip[data-arrow-edge="left"]::before {
114
+ top: calc(50% - var(--tip-arrow-height) / 2);
115
+ right: calc(100% - (var(--tip-arrow-width) - var(--tip-arrow-height)) / 2);
116
+ transform: rotate(90deg);
117
+ }.Tip[data-arrow-edge="right"] {
118
+ margin-right: var(--tip-arrow-height);
119
+ }
120
+
121
+ .Tip[data-arrow-edge="right"]::before {
122
+ top: calc(50% - var(--tip-arrow-height) / 2);
123
+ left: calc(100% - (var(--tip-arrow-width) - var(--tip-arrow-height)) / 2);
124
+ transform: rotate(-90deg);
125
+ }/* =============================================
126
+ Popover: the tip and its arrow, which Radix places at the anchor and turns to face it
127
+ ============================================= */.Popover {
128
+ z-index: 50;
129
+ position: relative;
130
+ width: min(var(--tip-popover-width), var(--radix-popover-content-available-width, var(--reka-popover-content-available-width, 100vw)));
131
+ /* One shadow around the tip and its arrow (there is no glass to keep on a desktop) */
132
+ filter: drop-shadow(0 0 var(--shadow-hairline-width) var(--shadow-hairline-color)) drop-shadow(var(--tip-popover-shadow));
133
+ transform-origin: var(--radix-popover-content-transform-origin, var(--reka-popover-content-transform-origin));
134
+ will-change: transform;
135
+ }
136
+
137
+ .Popover:focus {
138
+ outline: none;
139
+ }
140
+
141
+ .Popover > .Tip {
142
+ background: var(--tip-popover-background);
143
+ }
144
+
145
+ /* Visibility transitions: the scale on the popover, the fade on the tip and the arrow themselves (a fading
146
+ parent would hide the backdrop from their glass on a phone) */
147
+ .Transition[data-entering] .Popover {
148
+ transform: scale(0.95);
149
+ }
150
+
151
+ .Transition[data-entering] .Popover :is(.Tip, .Arrow) {
152
+ opacity: 0;
153
+ }
154
+
155
+ .Transition[data-entering-active] .Popover,
156
+ .Transition[data-entering][data-interrupted] .Popover {
157
+ transform: scale(1);
158
+ transition: transform var(--motion-enter) var(--cubic-enter);
159
+ }
160
+
161
+ .Transition[data-entering-active] .Popover :is(.Tip, .Arrow), .Transition[data-entering][data-interrupted] .Popover :is(.Tip, .Arrow) {
162
+ opacity: 1;
163
+ transition: opacity var(--motion-enter) var(--cubic-enter);
164
+ }
165
+
166
+ .Transition[data-exiting-active] .Popover,
167
+ .Transition[data-exiting][data-interrupted] .Popover {
168
+ transform: scale(0.95);
169
+ transition: transform var(--motion-exit) var(--cubic-exit-snappy);
170
+ }
171
+
172
+ .Transition[data-exiting-active] .Popover :is(.Tip, .Arrow), .Transition[data-exiting][data-interrupted] .Popover :is(.Tip, .Arrow) {
173
+ opacity: 0;
174
+ transition: opacity var(--motion-exit) var(--cubic-exit-snappy);
175
+ }/* Drawn pointing down; Radix turns it toward the anchor */.Arrow {
176
+ display: block;
177
+ width: var(--tip-arrow-width);
178
+ height: var(--tip-arrow-height);
179
+ background: var(--tip-popover-background);
180
+ clip-path: path("M0 0C1.71 0 3.42 -.01 5.14 .01C6.78 .03 8.61 .06 10.21 .66C11.93 1.31 13.07 2.44 14.22 3.78C15.04 4.74 16.67 6.8 17.46 7.79C18.1 8.6 19.37 10.21 20.06 10.98C20.93 11.96 22.01 13 23.5 13C24.99 13 26.07 11.96 26.94 10.98C27.63 10.21 28.9 8.6 29.54 7.79C30.33 6.8 31.96 4.74 32.78 3.78C33.93 2.44 35.07 1.31 36.79 .66C38.39 .06 40.22 .03 41.86 .01C43.58 -.01 45.29 0 47 0Z");
181
+ }/* iPhone (plan 171, owner 08.11, comments 46 to 50). Apple's cards differ from app to app (IMG_5723, 5725,
182
+ 5726, 5728, 5729, 5730); a tip takes the shape TipKit's own tip and most of them share. It is the card of a
183
+ grouped list: opaque as a grouped cell, 26 corners, no shadow (white on 242,242,246), its content at the iOS
184
+ layout margin (20 at 430pt). The symbol is a 36 tile at the margin and the text starts 12 after it (IMG_5726);
185
+ the title line starts 14 down, the 15/20 description right under it in the secondary label, and the whole
186
+ message stops short of Close. Close is a bare 12pt glyph in the tertiary label (197,197,199), its center 28
187
+ from the trailing edge and 23 from the top, in a 44 target (IMG_5726, 5730). Actions are rows under a
188
+ separator that runs from the text to the trailing margin, as in iOS 26 lists (IMG_5729, 5730): 17 regular
189
+ text in the action's color, 46 tall, one under another. A popover tip has the same content in the iOS 27
190
+ alert's glass with the kit's popover shadow (0 10 30, black at 20%), its arrow the same glass. */@media (max-width: 767px) {
191
+ .Tip {
192
+ --tip-padding-top: 14px;
193
+ --tip-padding-inline: var(--mobile-layout-margin, 16px);
194
+ --tip-padding-bottom: 0px;
195
+ --tip-gap: 11px;
196
+ --tip-description-gap: 0px;
197
+ --tip-icon-size: 36px;
198
+ --tip-icon-frame-width: 36px;
199
+ --tip-icon-frame-height: 36px;
200
+ --tip-close-size: 22px;
201
+ --tip-close-offset: 17px;
202
+ --tip-close-icon-size: 22px;
203
+ border-radius: 26px;
204
+ background: var(--mobile-surface-grouped-secondary, var(--tip-background));
205
+ }
206
+
207
+ .Icon {
208
+ margin-inline-start: 0;
209
+ }
210
+
211
+ /* The whole message stops short of Close, with or without a symbol */
212
+ .Tip:has(> .Close) > .Message {
213
+ padding-inline-end: calc(var(--tip-close-size) + var(--tip-close-offset) - var(--tip-padding-inline) + 1px);
214
+ }
215
+
216
+ .Tip:has(> .Close):not(:has(> .Icon)) .Title {
217
+ padding-inline-end: 0;
218
+ }
219
+
220
+ /* [data-variant]: over the Button's own soft fill and label. The glyph sits in a 44 target. */
221
+ .Tip > .Close[data-variant] {
222
+ --tip-close-target-inset: calc((44px - var(--tip-close-size)) / 2);
223
+ --button-uniform-size: 44px;
224
+ --button-background-color: transparent;
225
+ --button-background-color-hover: transparent;
226
+ --button-background-color-active: transparent;
227
+ --button-text-color: var(--mobile-label-tertiary, var(--color-text-tertiary));
228
+ --button-text-color-hover: var(--mobile-label-tertiary, var(--color-text-tertiary));
229
+ top: calc(12px - var(--tip-close-target-inset));
230
+ inset-inline-end: calc(var(--tip-close-offset) - var(--tip-close-target-inset));
231
+ }
232
+
233
+ .Tip > .Close[data-variant]::before,
234
+ .Tip > .Close[data-variant]::after {
235
+ inset: var(--tip-close-target-inset);
236
+ }
237
+
238
+ /* The actions reach the bottom edge; beside a symbol they start under the text */
239
+ .Tip > .Actions {
240
+ flex-flow: column nowrap;
241
+ gap: 0;
242
+ }
243
+
244
+ .Tip:not([data-mobile-actions="buttons"]):has(> .Icon) > .Actions {
245
+ padding-inline-start: calc(var(--tip-icon-frame-width) + 12px);
246
+ }
247
+
248
+ /* Each action is a row of text in its own color under a separator ([data-variant]: over the Button's own) */
249
+ .Tip:not([data-mobile-actions="buttons"]) > .Actions > [data-variant] {
250
+ --button-size: auto;
251
+ --button-gutter: 0px;
252
+ --button-radius: 0;
253
+ --button-font-size: 17px;
254
+ --button-font-weight: var(--font-weight-normal);
255
+ --button-line-height: 22px;
256
+ --button-justify-content: flex-start;
257
+ --button-background-color: transparent;
258
+ --button-background-color-hover: transparent;
259
+ --button-background-color-active: transparent;
260
+ --button-text-color: var(--tip-action-color, var(--color-text));
261
+ --button-text-color-hover: var(--tip-action-color, var(--color-text));
262
+ flex: none;
263
+ width: 100%;
264
+ min-width: 0;
265
+ max-width: none;
266
+ min-height: 46px;
267
+ padding: 12px 0;
268
+ border-top: 1px solid var(--color-border);
269
+ /* Set on the row as well: touch.css sets the variable on the button itself (as Toolbar does) */
270
+ font-weight: var(--font-weight-normal);
271
+ text-align: start;
272
+ white-space: normal;
273
+ }
274
+
275
+ .Tip > .Actions > [data-color="primary"] { --tip-action-color: var(--color-text-primary-ghost); }
276
+ .Tip > .Actions > [data-color="secondary"] { --tip-action-color: var(--color-text-secondary-ghost); }
277
+ .Tip > .Actions > [data-color="danger"] { --tip-action-color: var(--color-text-danger-ghost); }
278
+ .Tip > .Actions > [data-color="success"] { --tip-action-color: var(--color-text-success-ghost); }
279
+ .Tip > .Actions > [data-color="warning"] { --tip-action-color: var(--color-text-warning-ghost); }
280
+ .Tip > .Actions > [data-color="caution"] { --tip-action-color: var(--color-text-caution-ghost); }
281
+ .Tip > .Actions > [data-color="info"] { --tip-action-color: var(--color-text-info-ghost); }
282
+ .Tip > .Actions > [data-color="discovery"] { --tip-action-color: var(--color-text-discovery-ghost); }
283
+
284
+ /* mobileActions="buttons": each action keeps its Button's color and variant as a full-width capsule under the
285
+ message, as the card in Settings that opens the Support app (IMG_5728, at 430pt): the tinted capsule spans the
286
+ card's content from the symbol's edge, 48 tall, 16 under the text and 16 above the card's edge, its label 17.
287
+ Several stand 10 apart, as the stacked actions of a phone Dialog. [data-variant]: over the Button's own size. */
288
+ .Tip[data-mobile-actions="buttons"] {
289
+ --tip-padding-bottom: 16px;
290
+ --tip-gap: 16px;
291
+ }
292
+
293
+ .Tip[data-mobile-actions="buttons"] > .Actions {
294
+ gap: 10px;
295
+ }
296
+
297
+ .Tip[data-mobile-actions="buttons"] > .Actions > [data-variant] {
298
+ --button-size: 48px;
299
+ --button-font-size: 17px;
300
+ --button-line-height: 22px;
301
+ /* A capsule without `pill` or touch.css too */
302
+ --button-radius: var(--radius-full);
303
+ flex: none;
304
+ width: 100%;
305
+ min-width: 0;
306
+ max-width: none;
307
+ }
308
+
309
+ .Popover {
310
+ filter: none;
311
+ }
312
+
313
+ .Popover > .Tip {
314
+ background: var(--dialog-alert-background, var(--tip-popover-background));
315
+ box-shadow: var(--tip-popover-shadow);
316
+ backdrop-filter: var(--dialog-alert-backdrop-filter, none);
317
+ }
318
+
319
+ .Arrow {
320
+ background: var(--dialog-alert-background, var(--tip-popover-background));
321
+ backdrop-filter: var(--dialog-alert-backdrop-filter, none);
322
+ }
323
+ }
324
+ :where([data-plex-layout="phone"]) .Tip {
325
+ --tip-padding-top: 14px;
326
+ --tip-padding-inline: var(--mobile-layout-margin, 16px);
327
+ --tip-padding-bottom: 0px;
328
+ --tip-gap: 11px;
329
+ --tip-description-gap: 0px;
330
+ --tip-icon-size: 36px;
331
+ --tip-icon-frame-width: 36px;
332
+ --tip-icon-frame-height: 36px;
333
+ --tip-close-size: 22px;
334
+ --tip-close-offset: 17px;
335
+ --tip-close-icon-size: 22px;
336
+ border-radius: 26px;
337
+ background: var(--mobile-surface-grouped-secondary, var(--tip-background));
338
+ }
339
+
340
+ :where([data-plex-layout="phone"]) .Icon {
341
+ margin-inline-start: 0;
342
+ }
343
+
344
+ /* The whole message stops short of Close, with or without a symbol */
345
+ :where([data-plex-layout="phone"]) .Tip:has(> .Close) > .Message {
346
+ padding-inline-end: calc(var(--tip-close-size) + var(--tip-close-offset) - var(--tip-padding-inline) + 1px);
347
+ }
348
+
349
+ :where([data-plex-layout="phone"]) .Tip:has(> .Close):not(:has(> .Icon)) .Title {
350
+ padding-inline-end: 0;
351
+ }
352
+
353
+ /* [data-variant]: over the Button's own soft fill and label. The glyph sits in a 44 target. */
354
+ :where([data-plex-layout="phone"]) .Tip > .Close[data-variant] {
355
+ --tip-close-target-inset: calc((44px - var(--tip-close-size)) / 2);
356
+ --button-uniform-size: 44px;
357
+ --button-background-color: transparent;
358
+ --button-background-color-hover: transparent;
359
+ --button-background-color-active: transparent;
360
+ --button-text-color: var(--mobile-label-tertiary, var(--color-text-tertiary));
361
+ --button-text-color-hover: var(--mobile-label-tertiary, var(--color-text-tertiary));
362
+ top: calc(12px - var(--tip-close-target-inset));
363
+ inset-inline-end: calc(var(--tip-close-offset) - var(--tip-close-target-inset));
364
+ }
365
+
366
+ :where([data-plex-layout="phone"]) .Tip > .Close[data-variant]::before,
367
+ :where([data-plex-layout="phone"]) .Tip > .Close[data-variant]::after {
368
+ inset: var(--tip-close-target-inset);
369
+ }
370
+
371
+ /* The actions reach the bottom edge; beside a symbol they start under the text */
372
+ :where([data-plex-layout="phone"]) .Tip > .Actions {
373
+ flex-flow: column nowrap;
374
+ gap: 0;
375
+ }
376
+
377
+ :where([data-plex-layout="phone"]) .Tip:not([data-mobile-actions="buttons"]):has(> .Icon) > .Actions {
378
+ padding-inline-start: calc(var(--tip-icon-frame-width) + 12px);
379
+ }
380
+
381
+ /* Each action is a row of text in its own color under a separator ([data-variant]: over the Button's own) */
382
+ :where([data-plex-layout="phone"]) .Tip:not([data-mobile-actions="buttons"]) > .Actions > [data-variant] {
383
+ --button-size: auto;
384
+ --button-gutter: 0px;
385
+ --button-radius: 0;
386
+ --button-font-size: 17px;
387
+ --button-font-weight: var(--font-weight-normal);
388
+ --button-line-height: 22px;
389
+ --button-justify-content: flex-start;
390
+ --button-background-color: transparent;
391
+ --button-background-color-hover: transparent;
392
+ --button-background-color-active: transparent;
393
+ --button-text-color: var(--tip-action-color, var(--color-text));
394
+ --button-text-color-hover: var(--tip-action-color, var(--color-text));
395
+ flex: none;
396
+ width: 100%;
397
+ min-width: 0;
398
+ max-width: none;
399
+ min-height: 46px;
400
+ padding: 12px 0;
401
+ border-top: 1px solid var(--color-border);
402
+ /* Set on the row as well: touch.css sets the variable on the button itself (as Toolbar does) */
403
+ font-weight: var(--font-weight-normal);
404
+ text-align: start;
405
+ white-space: normal;
406
+ }
407
+
408
+ :where([data-plex-layout="phone"]) .Tip > .Actions > [data-color="primary"] { --tip-action-color: var(--color-text-primary-ghost); }
409
+ :where([data-plex-layout="phone"]) .Tip > .Actions > [data-color="secondary"] { --tip-action-color: var(--color-text-secondary-ghost); }
410
+ :where([data-plex-layout="phone"]) .Tip > .Actions > [data-color="danger"] { --tip-action-color: var(--color-text-danger-ghost); }
411
+ :where([data-plex-layout="phone"]) .Tip > .Actions > [data-color="success"] { --tip-action-color: var(--color-text-success-ghost); }
412
+ :where([data-plex-layout="phone"]) .Tip > .Actions > [data-color="warning"] { --tip-action-color: var(--color-text-warning-ghost); }
413
+ :where([data-plex-layout="phone"]) .Tip > .Actions > [data-color="caution"] { --tip-action-color: var(--color-text-caution-ghost); }
414
+ :where([data-plex-layout="phone"]) .Tip > .Actions > [data-color="info"] { --tip-action-color: var(--color-text-info-ghost); }
415
+ :where([data-plex-layout="phone"]) .Tip > .Actions > [data-color="discovery"] { --tip-action-color: var(--color-text-discovery-ghost); }
416
+
417
+ /* mobileActions="buttons": each action keeps its Button's color and variant as a full-width capsule under the
418
+ message, as the card in Settings that opens the Support app (IMG_5728, at 430pt): the tinted capsule spans the
419
+ card's content from the symbol's edge, 48 tall, 16 under the text and 16 above the card's edge, its label 17.
420
+ Several stand 10 apart, as the stacked actions of a phone Dialog. [data-variant]: over the Button's own size. */
421
+ :where([data-plex-layout="phone"]) .Tip[data-mobile-actions="buttons"] {
422
+ --tip-padding-bottom: 16px;
423
+ --tip-gap: 16px;
424
+ }
425
+
426
+ :where([data-plex-layout="phone"]) .Tip[data-mobile-actions="buttons"] > .Actions {
427
+ gap: 10px;
428
+ }
429
+
430
+ :where([data-plex-layout="phone"]) .Tip[data-mobile-actions="buttons"] > .Actions > [data-variant] {
431
+ --button-size: 48px;
432
+ --button-font-size: 17px;
433
+ --button-line-height: 22px;
434
+ /* A capsule without `pill` or touch.css too */
435
+ --button-radius: var(--radius-full);
436
+ flex: none;
437
+ width: 100%;
438
+ min-width: 0;
439
+ max-width: none;
440
+ }
441
+
442
+ :where([data-plex-layout="phone"]) .Popover {
443
+ filter: none;
444
+ }
445
+
446
+ :where([data-plex-layout="phone"]) .Popover > .Tip {
447
+ background: var(--dialog-alert-background, var(--tip-popover-background));
448
+ box-shadow: var(--tip-popover-shadow);
449
+ backdrop-filter: var(--dialog-alert-backdrop-filter, none);
450
+ }
451
+
452
+ :where([data-plex-layout="phone"]) .Arrow {
453
+ background: var(--dialog-alert-background, var(--tip-popover-background));
454
+ backdrop-filter: var(--dialog-alert-backdrop-filter, none);
455
+ }
456
+ }
@@ -2,6 +2,10 @@
2
2
  value. Consumers can lower it via `--z-toast` if their app pushes something
3
3
  legitimately higher (rare — toasts should sit above modals and headers). */.Toaster:where([data-sonner-toaster]) {
4
4
  z-index: var(--z-toast, 100000) !important;
5
+ /* A modal Dialog turns pointer events off on the body; the region stays a
6
+ layer of its own above it, so its toasts take presses (the renderer also
7
+ keeps the Dialog from reading them as presses outside) */
8
+ pointer-events: auto;
5
9
  }/* Sonner reads --normal-bg / --normal-text / --normal-border / --border-radius
6
10
  from the Toaster element (wired up in Toaster.tsx). The rules below only
7
11
  layer on things sonner's stylesheet doesn't cover on its own. */.Toast {
@@ -32,13 +36,24 @@
32
36
  Same shadow + hairline combo as Menu / Popover for visual parity. */
33
37
  box-shadow: var(--shadow), var(--shadow-hairline) !important;
34
38
  }/* On a phone Sonner makes the toaster as wide as the screen and shifts it by
35
- the inset, so part of it is off screen: center the toast in the rest */@media (width <= 600px) {
39
+ the inset, so part of it is off screen: the toast fills the rest, between the
40
+ side gutters, as a notification banner fills a phone's width (iOS 27 kit,
41
+ Notification - Collapsed - List 135:73247: 374 of 402, 14 each side, the
42
+ Toaster's default mobile gutters). A compact toast keeps its own width. */@media (width <= 600px) {
36
43
  .Toast {
37
- right: calc(var(--mobile-offset-left, 16px) + var(--mobile-offset-right, 16px)) !important;
44
+ width: auto !important;
45
+ max-width: none !important;
46
+ right: calc(var(--mobile-offset-left, 14px) + var(--mobile-offset-right, 14px)) !important;
47
+ }
48
+
49
+ .Toast.Compact {
50
+ width: -moz-max-content !important;
51
+ width: max-content !important;
52
+ max-width: calc(100vw - var(--mobile-offset-left, 14px) - var(--mobile-offset-right, 14px)) !important;
38
53
  }
39
54
 
40
55
  .Toaster[dir="rtl"] .Toast {
41
- left: calc(var(--mobile-offset-left, 16px) + var(--mobile-offset-right, 16px)) !important;
56
+ left: calc(var(--mobile-offset-left, 14px) + var(--mobile-offset-right, 14px)) !important;
42
57
  right: 0 !important;
43
58
  }
44
59
  }.Title {
@@ -84,6 +99,24 @@
84
99
  }.CancelButton {
85
100
  color: var(--color-text-secondary) !important;
86
101
  font-weight: var(--font-weight-medium);
102
+ }/* The close face: 20 across at the toast's corner, its X in the text color and a
103
+ ring an outline Button draws, which shows on the dark surface too (Sonner's
104
+ dark ring takes --normal-border, transparent here). An invisible 4px rim
105
+ around its 18px inner box makes the target 26, past the 24 of WCAG 2.5.8.
106
+ A toast with rich colors keeps Sonner's tinted face. */.Toast[data-styled="true"]:not([data-rich-colors="true"]) > [data-close-button] {
107
+ border-color: var(--color-border-secondary-outline) !important;
108
+ color: var(--color-text) !important;
109
+ }
110
+
111
+ @media (hover: hover) and (pointer: fine) {
112
+ .Toast[data-styled="true"]:not([data-rich-colors="true"]) > [data-close-button]:hover:where(:not(:root[data-input="touch"] *)) {
113
+ border-color: var(--color-border-secondary-outline-hover) !important;
114
+ }
115
+ }.Toast[data-styled="true"] > [data-close-button]::after {
116
+ position: absolute;
117
+ inset: -4px;
118
+ border-radius: 50%;
119
+ content: "";
87
120
  }.Toast :is([data-button], [data-close-button]):disabled {
88
121
  cursor: not-allowed;
89
122
  opacity: 0.5;
@@ -159,18 +192,94 @@
159
192
  z-index: -1;
160
193
  inset: 12px;
161
194
  box-sizing: border-box;
162
- border: 1px solid var(--gray4);
195
+ border: 1px solid var(--color-border-secondary-outline);
163
196
  border-radius: 50%;
164
197
  background: var(--normal-bg);
165
198
  content: "";
166
199
  pointer-events: none;
167
200
  }
168
201
 
202
+ /* The 44 target is the button itself */
203
+ .Toast[data-styled="true"] > [data-close-button]::after {
204
+ content: none;
205
+ }
206
+
207
+ /* Only the face answers a hover: the whole target stays clear */
208
+ .Toast[data-styled="true"] > [data-close-button]:hover::before {
209
+ border-color: var(--color-border-secondary-outline-hover);
210
+ }
211
+
169
212
  .Toaster[dir="rtl"] .Toast[data-styled="true"] > [data-close-button] {
170
213
  left: auto !important;
171
214
  right: 0 !important;
172
215
  }
173
- }/* On a phone a toast takes the corners, padding and text of the iOS notification banner, the
216
+ }
217
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] {
218
+ flex-wrap: wrap;
219
+ }
220
+
221
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] > .Content {
222
+ flex: 1 1 calc(100% - 28px);
223
+ min-width: 0;
224
+ }
225
+
226
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
227
+ box-sizing: border-box;
228
+ flex: 0 1 auto !important;
229
+ min-width: 44px;
230
+ max-width: 100%;
231
+ min-height: 44px;
232
+ height: auto !important;
233
+ padding: 8px 10px !important;
234
+ margin-inline: 0 !important;
235
+ line-height: var(--font-text-sm-line-height);
236
+ white-space: normal;
237
+ overflow-wrap: anywhere;
238
+ }
239
+
240
+ /* The 20px close face stays compact inside a separate 44px target. Reserve
241
+ the leading space so neither its target nor its ring covers the message. */
242
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"]:has([data-close-button]) {
243
+ padding-inline-start: 56px !important;
244
+ }
245
+
246
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button] {
247
+ top: 0 !important;
248
+ left: 0 !important;
249
+ right: auto !important;
250
+ width: 44px !important;
251
+ height: 44px !important;
252
+ border: 0 !important;
253
+ background: transparent !important;
254
+ transform: none !important;
255
+ }
256
+
257
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button]::before {
258
+ position: absolute;
259
+ z-index: -1;
260
+ inset: 12px;
261
+ box-sizing: border-box;
262
+ border: 1px solid var(--color-border-secondary-outline);
263
+ border-radius: 50%;
264
+ background: var(--normal-bg);
265
+ content: "";
266
+ pointer-events: none;
267
+ }
268
+
269
+ /* The 44 target is the button itself */
270
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button]::after {
271
+ content: none;
272
+ }
273
+
274
+ /* Only the face answers a hover: the whole target stays clear */
275
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button]:hover::before {
276
+ border-color: var(--color-border-secondary-outline-hover);
277
+ }
278
+
279
+ :where([data-plex-layout="phone"]) .Toaster[dir="rtl"] .Toast[data-styled="true"] > [data-close-button] {
280
+ left: auto !important;
281
+ right: 0 !important;
282
+ }/* On a phone a toast takes the corners, padding and text of the iOS notification banner, the
174
283
  system's own message at the top of the screen (kit iOS 27, Notifications, Notification - Collapsed
175
284
  Stack=1 0:11292): corners 24, padding 14, a 10px gap, the title at 15/17 semibold and the
176
285
  description at 15/18. The kit's -0.23 tracking of 15pt text is left to the system font, which
@@ -211,4 +320,38 @@
211
320
  content: "";
212
321
  }
213
322
  }
323
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] {
324
+ gap: 10px !important;
325
+ padding: 14px !important;
326
+ border-radius: 24px !important;
327
+ letter-spacing: normal;
328
+ }
329
+
330
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] .Title,
331
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] .Description {
332
+ font-size: 15px;
333
+ line-height: 18px !important;
334
+ }
335
+
336
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] .Title {
337
+ line-height: 17px !important;
338
+ }
339
+
340
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] > :is(.ActionButton, .CancelButton) {
341
+ position: relative;
342
+ min-height: 34px;
343
+ margin-block: 5px !important;
344
+ padding: 7px 14px !important;
345
+ border-radius: var(--radius-full) !important;
346
+ font-size: 15px !important;
347
+ font-weight: var(--font-weight-normal) !important;
348
+ line-height: 20px;
349
+ }
350
+
351
+ /* The 44px target reaches 5px past the capsule above and below */
352
+ :where([data-plex-layout="phone"]) .Toast[data-styled="true"] > :is(.ActionButton, .CancelButton)::after {
353
+ position: absolute;
354
+ inset: -5px 0;
355
+ content: "";
356
+ }
214
357
  }