@plexui/styles 0.1.33 → 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 (80) hide show
  1. package/dist/es/components/Accordion/Accordion.module.css +26 -1
  2. package/dist/es/components/Alert/Alert.module.css +213 -1
  3. package/dist/es/components/Badge/Badge.module.css +37 -0
  4. package/dist/es/components/Breadcrumb/Breadcrumb.module.css +63 -0
  5. package/dist/es/components/Button/Button.module.css +123 -22
  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 +31 -6
  9. package/dist/es/components/Checkbox/Checkbox.module.css +26 -72
  10. package/dist/es/components/CodeBlock/CodeBlock.module.css +34 -1
  11. package/dist/es/components/ColorPicker/ColorPicker.module.css +414 -0
  12. package/dist/es/components/ContextMenu/ContextMenu.module.css +55 -0
  13. package/dist/es/components/DataTable/DataTable.module.css +4 -0
  14. package/dist/es/components/DatePicker/Calendar.module.css +279 -6
  15. package/dist/es/components/DatePicker/CalendarNavigationIcon.module.css +10 -0
  16. package/dist/es/components/DateRangePicker/Calendar.module.css +226 -4
  17. package/dist/es/components/DateRangePicker/Trigger.module.css +45 -2
  18. package/dist/es/components/Dialog/Dialog.module.css +871 -89
  19. package/dist/es/components/EmptyMessage/EmptyMessage.module.css +52 -0
  20. package/dist/es/components/Field/Field.module.css +574 -24
  21. package/dist/es/components/FieldGroup/FieldGroup.module.css +188 -3
  22. package/dist/es/components/FileUpload/FileUpload.module.css +74 -1
  23. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +40 -1
  24. package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +28 -1
  25. package/dist/es/components/IndexBar/IndexBar.module.css +146 -0
  26. package/dist/es/components/Indicator/LoadingIndicator.module.css +14 -7
  27. package/dist/es/components/Input/Input.module.css +198 -1
  28. package/dist/es/components/InputGroup/InputGroup.module.css +4 -0
  29. package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +18 -0
  30. package/dist/es/components/Menu/Menu.module.css +544 -34
  31. package/dist/es/components/OTPInput/OTPInput.module.css +6 -1
  32. package/dist/es/components/Page/Page.module.css +391 -31
  33. package/dist/es/components/PageControl/PageControl.module.css +81 -0
  34. package/dist/es/components/PhoneLayout/PhoneLayout.module.css +10 -0
  35. package/dist/es/components/Popover/Popover.module.css +17 -1
  36. package/dist/es/components/Select/Select.module.css +201 -9
  37. package/dist/es/components/SelectControl/SelectControl.module.css +151 -4
  38. package/dist/es/components/Sidebar/Sidebar.module.css +624 -71
  39. package/dist/es/components/Slider/Slider.module.css +132 -45
  40. package/dist/es/components/Sortable/Sortable.module.css +7 -3
  41. package/dist/es/components/Stepper/Stepper.module.css +98 -0
  42. package/dist/es/components/SwipeActions/SwipeActions.module.css +166 -0
  43. package/dist/es/components/Switch/Switch.module.css +59 -4
  44. package/dist/es/components/TabBar/TabBar.module.css +478 -0
  45. package/dist/es/components/Tabs/Tabs.module.css +315 -3
  46. package/dist/es/components/TagInput/TagInput.module.css +50 -9
  47. package/dist/es/components/Textarea/Textarea.module.css +6 -0
  48. package/dist/es/components/Tip/Tip.module.css +456 -0
  49. package/dist/es/components/Toast/Toast.module.css +197 -9
  50. package/dist/es/components/Toolbar/Toolbar.module.css +850 -21
  51. package/dist/es/styles/katex-fonts/KaTeX_AMS-Regular.woff2 +0 -0
  52. package/dist/es/styles/katex-fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  53. package/dist/es/styles/katex-fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  54. package/dist/es/styles/katex-fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  55. package/dist/es/styles/katex-fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  56. package/dist/es/styles/katex-fonts/KaTeX_Main-Bold.woff2 +0 -0
  57. package/dist/es/styles/katex-fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  58. package/dist/es/styles/katex-fonts/KaTeX_Main-Italic.woff2 +0 -0
  59. package/dist/es/styles/katex-fonts/KaTeX_Main-Regular.woff2 +0 -0
  60. package/dist/es/styles/katex-fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  61. package/dist/es/styles/katex-fonts/KaTeX_Math-Italic.woff2 +0 -0
  62. package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  63. package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  64. package/dist/es/styles/katex-fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  65. package/dist/es/styles/katex-fonts/KaTeX_Script-Regular.woff2 +0 -0
  66. package/dist/es/styles/katex-fonts/KaTeX_Size1-Regular.woff2 +0 -0
  67. package/dist/es/styles/katex-fonts/KaTeX_Size2-Regular.woff2 +0 -0
  68. package/dist/es/styles/katex-fonts/KaTeX_Size3-Regular.woff2 +0 -0
  69. package/dist/es/styles/katex-fonts/KaTeX_Size4-Regular.woff2 +0 -0
  70. package/dist/es/styles/katex-fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  71. package/dist/es/styles/katex-fonts/LICENSE +21 -0
  72. package/dist/es/styles/katex.min.css +666 -730
  73. package/dist/es/styles/mobile-materials.css +145 -14
  74. package/dist/es/styles/mobile-surfaces.css +82 -32
  75. package/dist/es/styles/touch.css +940 -92
  76. package/dist/es/styles/variables-components.css +356 -17
  77. package/package.json +1 -1
  78. package/postcss/parseLightDark.mjs +20 -2
  79. package/postcss/phoneLayoutScope.mjs +134 -0
  80. package/postcss.config.mjs +3 -0
@@ -92,7 +92,32 @@
92
92
  to {
93
93
  height: 0;
94
94
  }
95
- }@media (prefers-reduced-motion: reduce) {
95
+ }/* On a phone, with touch.css, the chevron of a closed item points to the end, as the iOS disclosure chevron
96
+ (chevron.right) does, and turns down when the item opens: --accordion-chevron-closed-angle -90deg (mirrored for
97
+ right to left) and --accordion-chevron-open-angle 0deg. Without touch.css it keeps the desktop turn. */@media (max-width: 767px) {
98
+ .Chevron {
99
+ transform: rotate(var(--accordion-chevron-closed-angle, 0deg));
100
+ }
101
+
102
+ .Chevron:dir(rtl) {
103
+ transform: rotate(calc(var(--accordion-chevron-closed-angle, 0deg) * -1));
104
+ }
105
+
106
+ .Trigger[data-state="open"] .Chevron {
107
+ transform: rotate(var(--accordion-chevron-open-angle, 180deg));
108
+ }
109
+ }
110
+ :where([data-plex-layout="phone"]) .Chevron {
111
+ transform: rotate(var(--accordion-chevron-closed-angle, 0deg));
112
+ }
113
+
114
+ :where([data-plex-layout="phone"]) .Chevron:dir(rtl) {
115
+ transform: rotate(calc(var(--accordion-chevron-closed-angle, 0deg) * -1));
116
+ }
117
+
118
+ :where([data-plex-layout="phone"]) .Trigger[data-state="open"] .Chevron {
119
+ transform: rotate(var(--accordion-chevron-open-angle, 180deg));
120
+ }@media (prefers-reduced-motion: reduce) {
96
121
  .Trigger,
97
122
  .Chevron {
98
123
  transition: none;
@@ -206,5 +206,217 @@
206
206
 
207
207
  :where(.Alert[data-actions-placement="bottom"]) .Actions {
208
208
  margin-top: var(--alert-gutter);
209
+ }/* The close button of a phone alert (below) */.Alert > .CloseButton {
210
+ display: none;
211
+ }/* On a phone an Alert takes the shape and text of an iOS inline tip (TipKit), the system's message
212
+ inside a screen (kit TipKit, iOS Mini Tip Style=Hint 41:4207): 26 corners, 22 above and 16 at the
213
+ sides and below (22 below as well when no action shows), the icon 22 from the edge and 12 from the message, the title at 17/22 semibold and
214
+ the description at 15/20 4 under it, 22 to the actions, and the actions as 50px capsules with 17/22
215
+ semibold labels (a phone xl Button in touch.css), side by side 12 apart, each at least half the width,
216
+ wrapping when a label needs more. A dismissible alert closes with a 30px button in its corner, 19 from
217
+ the edges, in a 44px target, instead of a Dismiss action. The alert keeps its icon, colors and variants; a banner keeps
218
+ its square strip. */@media (max-width: 767px) {
219
+ .Alert {
220
+ position: relative;
221
+ flex-wrap: wrap;
222
+ align-items: flex-start;
223
+ -moz-column-gap: 12px;
224
+ column-gap: 12px;
225
+ row-gap: 22px;
226
+ padding: 22px 16px;
227
+ border-radius: 26px;
228
+ --alert-indicator-size: 28px;
229
+ }
230
+
231
+ .Alert:has(> .Content > .Actions > :not(.DismissButton)) {
232
+ padding-bottom: 16px;
233
+ }
234
+
235
+ .Alert[data-banner] {
236
+ border-radius: 0;
237
+ }
238
+
239
+ /* The actions take a line of their own under the icon and the message */
240
+ .Content {
241
+ display: contents;
242
+ }
243
+
244
+ .Indicator {
245
+ padding-inline-start: 6px;
246
+ }
247
+
248
+ .Indicator::before {
249
+ content: none;
250
+ }
251
+
252
+ .Message {
253
+ padding-inline-start: 6px;
254
+ }
255
+
256
+ .Indicator + .Content > .Message {
257
+ padding-inline-start: 0;
258
+ }
259
+
260
+ .Alert:has(> .CloseButton) .Message {
261
+ padding-inline-end: 34px;
209
262
  }
210
- }
263
+
264
+ .Title {
265
+ font-size: 17px;
266
+ line-height: 22px;
267
+ }
268
+
269
+ .Title ~ .Description {
270
+ margin-top: 4px;
271
+ }
272
+
273
+ .Actions {
274
+ flex: 1 0 100%;
275
+ flex-flow: row wrap;
276
+ gap: 10px 12px;
277
+ align-self: stretch;
278
+ margin: 0;
279
+ }
280
+
281
+ .Actions:not(:has(> :not(.DismissButton))) {
282
+ display: none;
283
+ }
284
+
285
+ .Alert .Actions > :where(button, a, [role="link"]) {
286
+ --button-size: var(--button-size-xl, 50px);
287
+ --button-font-size: var(--button-font-size-xl, 17px);
288
+ --button-font-weight: var(--font-weight-semibold);
289
+ --button-gutter: var(--button-gutter-xl, 20px);
290
+ --button-radius: var(--radius-full);
291
+ flex: 1 0 auto;
292
+ min-width: calc(50% - 6px);
293
+ max-width: 100%;
294
+ min-height: var(--button-size-xl, 50px);
295
+ height: auto;
296
+ padding-block: 14px;
297
+ line-height: var(--button-line-height-xl, 22px);
298
+ white-space: normal;
299
+ overflow-wrap: anywhere;
300
+ }
301
+
302
+ .Alert .Actions > .DismissButton {
303
+ display: none;
304
+ }
305
+
306
+ /* A 44px target with its 30px circle (the background and the focus ring) 19 from the edges */
307
+ .Alert > .CloseButton {
308
+ --button-uniform-size: 44px;
309
+ --button-icon-size: 16px;
310
+ position: absolute;
311
+ top: 12px;
312
+ inset-inline-end: 12px;
313
+ display: inline-flex;
314
+ }
315
+
316
+ .Alert > .CloseButton::before,
317
+ .Alert > .CloseButton::after {
318
+ inset: 7px;
319
+ }
320
+ }
321
+ :where([data-plex-layout="phone"]) .Alert {
322
+ position: relative;
323
+ flex-wrap: wrap;
324
+ align-items: flex-start;
325
+ -moz-column-gap: 12px;
326
+ column-gap: 12px;
327
+ row-gap: 22px;
328
+ padding: 22px 16px;
329
+ border-radius: 26px;
330
+ --alert-indicator-size: 28px;
331
+ }
332
+
333
+ :where([data-plex-layout="phone"]) .Alert:has(> .Content > .Actions > :not(.DismissButton)) {
334
+ padding-bottom: 16px;
335
+ }
336
+
337
+ :where([data-plex-layout="phone"]) .Alert[data-banner] {
338
+ border-radius: 0;
339
+ }
340
+
341
+ /* The actions take a line of their own under the icon and the message */
342
+ :where([data-plex-layout="phone"]) .Content {
343
+ display: contents;
344
+ }
345
+
346
+ :where([data-plex-layout="phone"]) .Indicator {
347
+ padding-inline-start: 6px;
348
+ }
349
+
350
+ :where([data-plex-layout="phone"]) .Indicator::before {
351
+ content: none;
352
+ }
353
+
354
+ :where([data-plex-layout="phone"]) .Message {
355
+ padding-inline-start: 6px;
356
+ }
357
+
358
+ :where([data-plex-layout="phone"]) .Indicator + .Content > .Message {
359
+ padding-inline-start: 0;
360
+ }
361
+
362
+ :where([data-plex-layout="phone"]) .Alert:has(> .CloseButton) .Message {
363
+ padding-inline-end: 34px;
364
+ }
365
+
366
+ :where([data-plex-layout="phone"]) .Title {
367
+ font-size: 17px;
368
+ line-height: 22px;
369
+ }
370
+
371
+ :where([data-plex-layout="phone"]) .Title ~ .Description {
372
+ margin-top: 4px;
373
+ }
374
+
375
+ :where([data-plex-layout="phone"]) .Actions {
376
+ flex: 1 0 100%;
377
+ flex-flow: row wrap;
378
+ gap: 10px 12px;
379
+ align-self: stretch;
380
+ margin: 0;
381
+ }
382
+
383
+ :where([data-plex-layout="phone"]) .Actions:not(:has(> :not(.DismissButton))) {
384
+ display: none;
385
+ }
386
+
387
+ :where([data-plex-layout="phone"]) .Alert .Actions > :where(button, a, [role="link"]) {
388
+ --button-size: var(--button-size-xl, 50px);
389
+ --button-font-size: var(--button-font-size-xl, 17px);
390
+ --button-font-weight: var(--font-weight-semibold);
391
+ --button-gutter: var(--button-gutter-xl, 20px);
392
+ --button-radius: var(--radius-full);
393
+ flex: 1 0 auto;
394
+ min-width: calc(50% - 6px);
395
+ max-width: 100%;
396
+ min-height: var(--button-size-xl, 50px);
397
+ height: auto;
398
+ padding-block: 14px;
399
+ line-height: var(--button-line-height-xl, 22px);
400
+ white-space: normal;
401
+ overflow-wrap: anywhere;
402
+ }
403
+
404
+ :where([data-plex-layout="phone"]) .Alert .Actions > .DismissButton {
405
+ display: none;
406
+ }
407
+
408
+ /* A 44px target with its 30px circle (the background and the focus ring) 19 from the edges */
409
+ :where([data-plex-layout="phone"]) .Alert > .CloseButton {
410
+ --button-uniform-size: 44px;
411
+ --button-icon-size: 16px;
412
+ position: absolute;
413
+ top: 12px;
414
+ inset-inline-end: 12px;
415
+ display: inline-flex;
416
+ }
417
+
418
+ :where([data-plex-layout="phone"]) .Alert > .CloseButton::before,
419
+ :where([data-plex-layout="phone"]) .Alert > .CloseButton::after {
420
+ inset: 7px;
421
+ }
422
+ }
@@ -287,4 +287,41 @@
287
287
  display: none;
288
288
  }
289
289
  }
290
+ :where([data-plex-layout="phone"]) .Badge:has(> button.Remove) {
291
+ position: relative;
292
+ isolation: isolate;
293
+ height: 44px;
294
+ padding-inline-end: 0;
295
+ background-color: transparent;
296
+ box-shadow: none;
297
+ }
298
+
299
+ /* The face stays compact; its complete remove target belongs to this row. */
300
+ :where([data-plex-layout="phone"]) .Badge:has(> button.Remove)::before {
301
+ content: "";
302
+ position: absolute;
303
+ z-index: -1;
304
+ inset: 6px 0;
305
+ border-radius: inherit;
306
+ pointer-events: none;
307
+ }
308
+
309
+ :where([data-plex-layout="phone"]) .Badge:has(> button.Remove)[data-variant="soft"]::before,
310
+ :where([data-plex-layout="phone"]) .Badge:has(> button.Remove)[data-variant="solid"]::before {
311
+ background-color: var(--badge-background-color);
312
+ }
313
+
314
+ :where([data-plex-layout="phone"]) .Badge:has(> button.Remove)[data-variant="outline"]::before {
315
+ box-shadow: 0 0 0 1px var(--badge-border-color) inset;
316
+ }
317
+
318
+ :where([data-plex-layout="phone"]) .Badge:has(> button.Remove) > button.Remove {
319
+ width: 44px;
320
+ height: 44px;
321
+ margin-inline: 0;
322
+ }
323
+
324
+ :where([data-plex-layout="phone"]) .Badge:has(> button.Remove) > button.Remove::after {
325
+ display: none;
326
+ }
290
327
  }
@@ -55,5 +55,68 @@
55
55
  }.Current {
56
56
  color: var(--color-text);
57
57
  overflow-wrap: anywhere;
58
+ }/* iOS has no breadcrumb: a phone screen goes back with the back button of its bar (Toolbar). A trail
59
+ kept on a phone takes the iOS Subheadline, 15/20, at either size (14 and 12 are not iOS text styles),
60
+ as the secondary text of phone rows does, and each link the 44pt touch target of iOS. A link keeps its
61
+ text width in the line; its target reaches 44px wide around a short word, so the gaps stay those of
62
+ the text. Lines of a wrapping trail stand 44px apart, one target each. */@media (max-width: 767px) {
63
+ .Breadcrumb,
64
+ .Breadcrumb[data-size="sm"] {
65
+ --breadcrumb-font-size: 15px;
66
+ --breadcrumb-line-height: 20px;
67
+ --breadcrumb-gap: 6px;
68
+ }
69
+
70
+ .List {
71
+ row-gap: 0;
72
+ }
73
+
74
+ /* Every line of a wrapping trail is a 44px line, also one without a link */
75
+ .Item {
76
+ min-height: 44px;
77
+ }
78
+
79
+ .Item > .Link {
80
+ position: relative;
81
+ display: inline-flex;
82
+ align-items: center;
83
+ min-height: 44px;
84
+ }
85
+
86
+ .Item > .Link::after {
87
+ position: absolute;
88
+ inset-block: 0;
89
+ inset-inline: min(0px, (100% - 44px) / 2);
90
+ content: "";
91
+ }
58
92
  }
93
+ :where([data-plex-layout="phone"]) .Breadcrumb,
94
+ :where([data-plex-layout="phone"]) .Breadcrumb[data-size="sm"] {
95
+ --breadcrumb-font-size: 15px;
96
+ --breadcrumb-line-height: 20px;
97
+ --breadcrumb-gap: 6px;
98
+ }
99
+
100
+ :where([data-plex-layout="phone"]) .List {
101
+ row-gap: 0;
102
+ }
103
+
104
+ /* Every line of a wrapping trail is a 44px line, also one without a link */
105
+ :where([data-plex-layout="phone"]) .Item {
106
+ min-height: 44px;
107
+ }
108
+
109
+ :where([data-plex-layout="phone"]) .Item > .Link {
110
+ position: relative;
111
+ display: inline-flex;
112
+ align-items: center;
113
+ min-height: 44px;
114
+ }
115
+
116
+ :where([data-plex-layout="phone"]) .Item > .Link::after {
117
+ position: absolute;
118
+ inset-block: 0;
119
+ inset-inline: min(0px, (100% - 44px) / 2);
120
+ content: "";
121
+ }
59
122
  }
@@ -111,54 +111,54 @@
111
111
  ============================================= */
112
112
  .Button:where([data-size="3xs"]) {
113
113
  --button-size: var(--button-size-3xs, var(--control-size-3xs));
114
- --button-uniform-size: var(--control-size-3xs);
114
+ --button-uniform-size: var(--button-uniform-size-3xs, var(--button-size-3xs, var(--control-size-3xs)));
115
115
  --button-line-height: var(--button-line-height-3xs, 1);
116
116
  --button-gutter: var(--button-gutter-3xs, var(--control-gutter-2xs));
117
117
  --button-font-size: var(--button-font-size-3xs, var(--control-font-size-sm));
118
- --button-icon-size: var(--control-icon-size-xs);
118
+ --button-icon-size: var(--button-icon-size-3xs, var(--control-icon-size-xs));
119
119
  --button-gap: var(--button-gap-sm);
120
120
  --button-radius: var(--button-touch-radius, var(--control-radius-sm));
121
121
  --button-icon-offset: -1px;
122
- --indicator-size: 11px;
123
- --circular-progress-size: 11px;
122
+ --indicator-size: var(--button-indicator-size-3xs, 11px);
123
+ --circular-progress-size: var(--button-indicator-size-3xs, 11px);
124
124
  }
125
125
 
126
126
  .Button:where([data-size="2xs"]) {
127
127
  --button-size: var(--button-size-2xs, var(--control-size-2xs));
128
- --button-uniform-size: var(--control-size-2xs);
128
+ --button-uniform-size: var(--button-uniform-size-2xs, var(--button-size-2xs, var(--control-size-2xs)));
129
129
  --button-line-height: var(--button-line-height-2xs, 1);
130
130
  --button-gutter: var(--button-gutter-2xs, var(--control-gutter-xs));
131
131
  --button-font-size: var(--button-font-size-2xs, var(--control-font-size-sm));
132
- --button-icon-size: var(--control-icon-size-sm);
133
- --button-gap: var(--button-gap-md);
132
+ --button-icon-size: var(--button-icon-size-2xs, var(--control-icon-size-sm));
133
+ --button-gap: var(--button-touch-gap-sm, var(--button-gap-md));
134
134
  --button-radius: var(--button-touch-radius, var(--control-radius-sm));
135
135
  --button-icon-offset: -1px;
136
- --indicator-size: 12px;
137
- --circular-progress-size: 12px;
136
+ --indicator-size: var(--button-indicator-size-2xs, 12px);
137
+ --circular-progress-size: var(--button-indicator-size-2xs, 12px);
138
138
  }
139
139
 
140
140
  .Button:where([data-size="xs"]) {
141
141
  --button-size: var(--button-size-xs, var(--control-size-xs));
142
- --button-uniform-size: var(--control-size-xs);
142
+ --button-uniform-size: var(--button-uniform-size-xs, var(--button-size-xs, var(--control-size-xs)));
143
143
  --button-line-height: var(--button-line-height-xs, 1);
144
144
  --button-gutter: var(--button-gutter-xs, var(--control-gutter-xs));
145
145
  --button-font-size: var(--button-font-size-xs, var(--control-font-size-md));
146
- --button-icon-size: var(--control-icon-size-sm);
147
- --button-gap: var(--button-gap-md);
146
+ --button-icon-size: var(--button-icon-size-xs, var(--control-icon-size-sm));
147
+ --button-gap: var(--button-touch-gap-sm, var(--button-gap-md));
148
148
  --button-radius: var(--button-touch-radius, var(--control-radius-sm));
149
149
  --button-icon-offset: -1px;
150
- --indicator-size: 13px;
151
- --circular-progress-size: 14px;
150
+ --indicator-size: var(--button-indicator-size-xs, 13px);
151
+ --circular-progress-size: var(--button-indicator-size-xs, 14px);
152
152
  }
153
153
 
154
154
  .Button:where([data-size="sm"]) {
155
155
  --button-size: var(--button-size-sm, var(--control-size-sm));
156
- --button-uniform-size: var(--control-size-sm);
156
+ --button-uniform-size: var(--button-uniform-size-sm, var(--button-size-sm, var(--control-size-sm)));
157
157
  --button-line-height: var(--button-line-height-sm, 1);
158
158
  --button-gutter: var(--button-gutter-sm, var(--control-gutter-sm));
159
159
  --button-font-size: var(--button-font-size-sm, var(--control-font-size-md));
160
160
  --button-icon-size: var(--control-icon-size-md);
161
- --button-gap: var(--button-gap-md);
161
+ --button-gap: var(--button-touch-gap-sm, var(--button-gap-md));
162
162
  --button-radius: var(--button-touch-radius, var(--control-radius-sm));
163
163
  --button-icon-offset: -1px;
164
164
  --indicator-size: 15px;
@@ -167,7 +167,7 @@
167
167
 
168
168
  .Button:where([data-size="md"]) {
169
169
  --button-size: var(--button-size-md, var(--control-size-md));
170
- --button-uniform-size: var(--control-size-md);
170
+ --button-uniform-size: var(--button-uniform-size-md, var(--button-size-md, var(--control-size-md)));
171
171
  --button-line-height: var(--button-line-height-md, 1);
172
172
  --button-gutter: var(--button-gutter-md, var(--control-gutter-md));
173
173
  --button-font-size: var(--button-font-size-md, var(--control-font-size-md));
@@ -181,7 +181,7 @@
181
181
 
182
182
  .Button:where([data-size="lg"]) {
183
183
  --button-size: var(--button-size-lg, var(--control-size-lg));
184
- --button-uniform-size: var(--control-size-lg);
184
+ --button-uniform-size: var(--button-uniform-size-lg, var(--button-size-lg, var(--control-size-lg)));
185
185
  --button-line-height: var(--button-line-height-lg, 1);
186
186
  --button-gutter: var(--button-gutter-lg, var(--control-gutter-md));
187
187
  --button-font-size: var(--button-font-size-lg, var(--control-font-size-md));
@@ -195,11 +195,11 @@
195
195
 
196
196
  .Button:where([data-size="xl"]) {
197
197
  --button-size: var(--button-size-xl, var(--control-size-xl));
198
- --button-uniform-size: var(--control-size-xl);
198
+ --button-uniform-size: var(--button-uniform-size-xl, var(--button-size-xl, var(--control-size-xl)));
199
199
  --button-line-height: var(--button-line-height-xl, 1);
200
200
  --button-gutter: var(--button-gutter-xl, var(--control-gutter-lg));
201
201
  --button-font-size: var(--button-font-size-xl, var(--control-font-size-md));
202
- --button-icon-size: var(--control-icon-size-md);
202
+ --button-icon-size: var(--button-icon-size-xl, var(--control-icon-size-md));
203
203
  --button-gap: var(--button-gap-lg);
204
204
  --button-radius: var(--button-touch-radius, var(--control-radius-xl));
205
205
  --button-icon-offset: -1px;
@@ -209,7 +209,7 @@
209
209
 
210
210
  .Button:where([data-size="2xl"]) {
211
211
  --button-size: var(--button-size-2xl, var(--control-size-2xl));
212
- --button-uniform-size: var(--control-size-2xl);
212
+ --button-uniform-size: var(--button-uniform-size-2xl, var(--button-size-2xl, var(--control-size-2xl)));
213
213
  --button-line-height: var(--button-line-height-2xl, 1);
214
214
  --button-gutter: var(--button-gutter-2xl, var(--control-gutter-lg));
215
215
  --button-font-size: var(--button-font-size-2xl, var(--control-font-size-lg));
@@ -223,7 +223,7 @@
223
223
 
224
224
  .Button:where([data-size="3xl"]) {
225
225
  --button-size: var(--button-size-3xl, var(--control-size-3xl));
226
- --button-uniform-size: var(--control-size-3xl);
226
+ --button-uniform-size: var(--button-uniform-size-3xl, var(--button-size-3xl, var(--control-size-3xl)));
227
227
  --button-line-height: var(--button-line-height-3xl, 1);
228
228
  --button-gutter: var(--button-gutter-3xl, var(--control-gutter-xl));
229
229
  --button-font-size: var(--button-font-size-3xl, var(--control-font-size-lg));
@@ -315,6 +315,42 @@
315
315
  width: var(--button-size);
316
316
  }
317
317
 
318
+ /* A lone icon without `uniform` keeps the gutters of a text button. touch.css makes it the kit's symbol
319
+ button on a phone instead (Button - Content Area 40:58696, Label Type=Symbol): no gutters and at least as
320
+ wide as it is tall, a circle of 28, 34 or 50px; a component that makes it wider (a full-width action) keeps
321
+ its width. A literal label beside the icon is wrapped in a span, so it is never taken for a lone icon; a label
322
+ that a component renders as bare text is, so wrap such a label in an element. The rule weighs as .Button
323
+ alone, so a component that sets the padding of its icon button keeps it. */
324
+ .Button:where(:not([data-uniform]):has(> .ButtonInner > svg:only-child)) {
325
+ /* What stands between the edge and the icon: the gutter, or on a phone half of what the circle leaves
326
+ around the icon, as for a uniform button */
327
+ --button-icon-only-inset: max(
328
+ calc(var(--button-gutter) * var(--button-icon-only-gutter-scale, 1)),
329
+ calc((var(--button-size) - var(--button-icon-size)) / 2 * (1 - var(--button-icon-only-gutter-scale, 1)))
330
+ );
331
+
332
+ min-width: var(--button-icon-only-min-width, auto);
333
+ padding-inline: calc(var(--button-gutter) * var(--button-icon-only-gutter-scale, 1));
334
+ }
335
+
336
+ .Button:where(:not([data-uniform]):has(> .ButtonInner > svg:only-child)):where([data-pill]) {
337
+ --button-icon-only-inset: max(
338
+ calc(var(--button-gutter) * var(--control-gutter-pill-scaling) * var(--button-icon-only-gutter-scale, 1)),
339
+ calc((var(--button-size) - var(--button-icon-size)) / 2 * (1 - var(--button-icon-only-gutter-scale, 1)))
340
+ );
341
+
342
+ padding-inline: calc(var(--button-gutter) * var(--control-gutter-pill-scaling) * var(--button-icon-only-gutter-scale, 1));
343
+ }
344
+
345
+ /* Outweighs the optical alignment of a text button above, pill included */
346
+ .Button:where(:not([data-uniform]):has(> .ButtonInner > svg:only-child))[data-optically-align="start"] {
347
+ margin-inline-start: calc(var(--button-icon-only-inset) * -1);
348
+ }
349
+
350
+ .Button:where(:not([data-uniform]):has(> .ButtonInner > svg:only-child))[data-optically-align="end"] {
351
+ margin-inline-end: calc(var(--button-icon-only-inset) * -1);
352
+ }
353
+
318
354
  /* =============================================
319
355
  Ghost variant
320
356
  ============================================= */
@@ -902,6 +938,26 @@
902
938
  --button-mobile-material-scale: 1;
903
939
  }
904
940
 
941
+ /* A glass text button is the Liquid Glass text button of the iOS 27 kit (Button - Liquid Glass - Text 5473:21667):
942
+ its label is Medium, and 17px from the medium (34px) size up, where a content-area button keeps Regular 15px
943
+ at 28 and 34 (Button - Content Area 40:58696). With touch.css, as the glass itself; disabled ones keep it. */
944
+ .Button[data-mobile-material="glass"]:where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
945
+ font-weight: var(--button-glass-font-weight, var(--button-font-weight));
946
+ }
947
+
948
+ .Button[data-mobile-material="glass"]:where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]):where([data-size="md"], [data-size="lg"]) {
949
+ font-size: var(--button-glass-font-size, var(--button-font-size));
950
+ line-height: var(--button-glass-line-height, var(--button-line-height, 1));
951
+ }
952
+
953
+ /* A disabled button labels in the tertiary label, as the iOS 27 kit's content-area button (Button - Content Area
954
+ 40:58696, Is Enabled=False: 60,60,67 at 30%, 196 on white, in every style, destructive too), where the desktop
955
+ gray-400 read 143. Its fill stays the disabled fill (the kit's 118,118,128 at 12% is 239 on white, alpha-05
956
+ 242) and a borderless one has none. Toolbar actions keep the colors of their bar (Toolbar.module.css). */
957
+ .Button[data-disabled][data-variant] {
958
+ --button-text-color: var(--mobile-label-tertiary, var(--color-text-disabled));
959
+ }
960
+
905
961
  .Button:is([data-mobile-material="flat"], [data-disabled]) {
906
962
  --button-mobile-material-background: initial;
907
963
  --button-mobile-material-hover: initial;
@@ -913,4 +969,49 @@
913
969
  --button-mobile-material-scale: initial;
914
970
  }
915
971
  }
972
+ :where([data-plex-layout="phone"]) .Button[data-variant="outline"]:where([data-color="primary"], [data-color="secondary"]) {
973
+ --button-outline-context-background: var(--mobile-neutral-outline-background, var(--button-outline-background));
974
+ }
975
+
976
+ :where([data-plex-layout="phone"]) .Button[data-mobile-material="glass"]:where(:not([data-disabled])):where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
977
+ --button-mobile-material-background: var(--mobile-glass-background);
978
+ --button-mobile-material-hover: var(--mobile-glass-background-hover);
979
+ --button-mobile-material-active: var(--mobile-glass-background-active);
980
+ --button-mobile-material-sheen: var(--mobile-glass-sheen);
981
+ --button-mobile-material-shadow: var(--mobile-glass-shadow);
982
+ --button-mobile-material-backdrop-filter: var(--mobile-glass-backdrop-filter);
983
+ --button-mobile-material-opacity: 1;
984
+ --button-mobile-material-scale: 1;
985
+ }
986
+
987
+ /* A glass text button is the Liquid Glass text button of the iOS 27 kit (Button - Liquid Glass - Text 5473:21667):
988
+ its label is Medium, and 17px from the medium (34px) size up, where a content-area button keeps Regular 15px
989
+ at 28 and 34 (Button - Content Area 40:58696). With touch.css, as the glass itself; disabled ones keep it. */
990
+ :where([data-plex-layout="phone"]) .Button[data-mobile-material="glass"]:where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]) {
991
+ font-weight: var(--button-glass-font-weight, var(--button-font-weight));
992
+ }
993
+
994
+ :where([data-plex-layout="phone"]) .Button[data-mobile-material="glass"]:where([data-color="primary"], [data-color="secondary"]):where([data-variant="soft"], [data-variant="ghost"]):where([data-size="md"], [data-size="lg"]) {
995
+ font-size: var(--button-glass-font-size, var(--button-font-size));
996
+ line-height: var(--button-glass-line-height, var(--button-line-height, 1));
997
+ }
998
+
999
+ /* A disabled button labels in the tertiary label, as the iOS 27 kit's content-area button (Button - Content Area
1000
+ 40:58696, Is Enabled=False: 60,60,67 at 30%, 196 on white, in every style, destructive too), where the desktop
1001
+ gray-400 read 143. Its fill stays the disabled fill (the kit's 118,118,128 at 12% is 239 on white, alpha-05
1002
+ 242) and a borderless one has none. Toolbar actions keep the colors of their bar (Toolbar.module.css). */
1003
+ :where([data-plex-layout="phone"]) .Button[data-disabled][data-variant] {
1004
+ --button-text-color: var(--mobile-label-tertiary, var(--color-text-disabled));
1005
+ }
1006
+
1007
+ :where([data-plex-layout="phone"]) .Button:is([data-mobile-material="flat"], [data-disabled]) {
1008
+ --button-mobile-material-background: initial;
1009
+ --button-mobile-material-hover: initial;
1010
+ --button-mobile-material-active: initial;
1011
+ --button-mobile-material-sheen: initial;
1012
+ --button-mobile-material-shadow: initial;
1013
+ --button-mobile-material-backdrop-filter: initial;
1014
+ --button-mobile-material-opacity: initial;
1015
+ --button-mobile-material-scale: initial;
1016
+ }
916
1017
  }
@@ -24,4 +24,21 @@
24
24
  --navigation-button-icon-size: var(--navigation-button-confirm-icon-size);
25
25
  }
26
26
  }
27
+ :where([data-plex-layout="phone"]) .NavigationButton[data-navigation-action] {
28
+ --button-size: var(--navigation-button-size);
29
+ --button-uniform-size: var(--navigation-button-size);
30
+ }
31
+
32
+ /* SVG boxes normalize visible ink, rather than sizing unrelated icons. */
33
+ :where([data-plex-layout="phone"]) .NavigationButton[data-navigation-action="back"] {
34
+ --navigation-button-icon-size: var(--navigation-button-back-icon-size);
35
+ }
36
+
37
+ :where([data-plex-layout="phone"]) .NavigationButton[data-navigation-action="close"] {
38
+ --navigation-button-icon-size: var(--navigation-button-close-icon-size);
39
+ }
40
+
41
+ :where([data-plex-layout="phone"]) .NavigationButton[data-navigation-action="confirm"] {
42
+ --navigation-button-icon-size: var(--navigation-button-confirm-icon-size);
43
+ }
27
44
  }