@plexui/styles 0.17.8 → 0.17.9

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.
@@ -875,7 +875,7 @@
875
875
  line starts to the card's edge. A card's last row, where no separator runs, ends 8 lower (a clear border, so its
876
876
  padding and the line's place are the rows' above): its line stands as far under its text as theirs and 7 over
877
877
  the card's edge (on the edge it read as the card's border), to where the card's 16 corner has curved in at that
878
- height. An input card's field draws its own line. */
878
+ height, as far in from its end as from its start. An input card's field draws its own line. */
879
879
  [data-platform="android"] .Field:where([data-row]:not(:has(> .Content > .Control [data-row]))):has(> .Content > .Control :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="color"], [aria-hidden="true"]), textarea)) {
880
880
  position: relative;
881
881
  }
@@ -899,8 +899,10 @@
899
899
  border-block-end: 8px solid transparent;
900
900
  }
901
901
 
902
+ /* Inside the card, off its rounded corner: as far in from its end as from its start, under the row's
903
+ content, not a bar that runs into the corner */
902
904
  [data-platform="android"] .Field:where([data-row]:not(:has(> .Content > .Control [data-row]))):has(> .Content > .Control :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="color"], [aria-hidden="true"]), textarea)):last-child::before {
903
- inset-inline-end: 3px;
905
+ inset-inline-end: var(--field-group-separator-inset-start, var(--field-group-separator-inset, var(--field-row-padding-inline, 0px)));
904
906
  }
905
907
 
906
908
  [data-platform="android"] .Field:where([data-row]:not(:has(> .Content > .Control [data-row]))):has(> .Content > .Control :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="color"], [aria-hidden="true"]), textarea)):has(> .Content > .Control :is(input:not([type="checkbox"], [type="radio"], [type="range"], [aria-hidden="true"]), textarea):focus:not([readonly]))::before {
@@ -1012,14 +1014,14 @@
1012
1014
 
1013
1015
  [data-platform="android"] .Field:where([data-row][data-orientation="vertical"]:not([data-label-hidden])):has(> .Content > .Control > :is([data-slot="input"], [data-slot="textarea"])[data-variant] > :is(input, textarea)):not(:has(> .Icon, > .Action, > .LabelGroup > .Description, > .LabelGroup > .LabelRow)):not(:focus-within):has(> .Content > .Control > [data-variant] > :is(input, textarea):-moz-placeholder-shown) > .LabelGroup > .Label {
1014
1016
  width: 100%;
1015
- color: var(--android-hint);
1017
+ color: var(--android-on-surface-variant);
1016
1018
  translate: 0 0;
1017
1019
  scale: 1;
1018
1020
  }
1019
1021
 
1020
1022
  [data-platform="android"] .Field:where([data-row][data-orientation="vertical"]:not([data-label-hidden])):has(> .Content > .Control > :is([data-slot="input"], [data-slot="textarea"])[data-variant] > :is(input, textarea)):not(:has(> .Icon, > .Action, > .LabelGroup > .Description, > .LabelGroup > .LabelRow)):not(:focus-within):has(> .Content > .Control > [data-variant] > :is(input, textarea):placeholder-shown) > .LabelGroup > .Label {
1021
1023
  width: 100%;
1022
- color: var(--android-hint);
1024
+ color: var(--android-on-surface-variant);
1023
1025
  translate: 0 0;
1024
1026
  scale: 1;
1025
1027
  }
@@ -1642,7 +1644,7 @@
1642
1644
  line starts to the card's edge. A card's last row, where no separator runs, ends 8 lower (a clear border, so its
1643
1645
  padding and the line's place are the rows' above): its line stands as far under its text as theirs and 7 over
1644
1646
  the card's edge (on the edge it read as the card's border), to where the card's 16 corner has curved in at that
1645
- height. An input card's field draws its own line. */
1647
+ height, as far in from its end as from its start. An input card's field draws its own line. */
1646
1648
  :where([data-plex-layout="phone"]) [data-platform="android"] .Field:where([data-row]:not(:has(> .Content > .Control [data-row]))):has(> .Content > .Control :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="color"], [aria-hidden="true"]), textarea)) {
1647
1649
  position: relative;
1648
1650
  }
@@ -1666,8 +1668,10 @@
1666
1668
  border-block-end: 8px solid transparent;
1667
1669
  }
1668
1670
 
1671
+ /* Inside the card, off its rounded corner: as far in from its end as from its start, under the row's
1672
+ content, not a bar that runs into the corner */
1669
1673
  :where([data-plex-layout="phone"]) [data-platform="android"] .Field:where([data-row]:not(:has(> .Content > .Control [data-row]))):has(> .Content > .Control :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="color"], [aria-hidden="true"]), textarea)):last-child::before {
1670
- inset-inline-end: 3px;
1674
+ inset-inline-end: var(--field-group-separator-inset-start, var(--field-group-separator-inset, var(--field-row-padding-inline, 0px)));
1671
1675
  }
1672
1676
 
1673
1677
  :where([data-plex-layout="phone"]) [data-platform="android"] .Field:where([data-row]:not(:has(> .Content > .Control [data-row]))):has(> .Content > .Control :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="hidden"], [type="file"], [type="color"], [aria-hidden="true"]), textarea)):has(> .Content > .Control :is(input:not([type="checkbox"], [type="radio"], [type="range"], [aria-hidden="true"]), textarea):focus:not([readonly]))::before {
@@ -1776,14 +1780,14 @@
1776
1780
 
1777
1781
  :where([data-plex-layout="phone"]) [data-platform="android"] .Field:where([data-row][data-orientation="vertical"]:not([data-label-hidden])):has(> .Content > .Control > :is([data-slot="input"], [data-slot="textarea"])[data-variant] > :is(input, textarea)):not(:has(> .Icon, > .Action, > .LabelGroup > .Description, > .LabelGroup > .LabelRow)):not(:focus-within):has(> .Content > .Control > [data-variant] > :is(input, textarea):-moz-placeholder-shown) > .LabelGroup > .Label {
1778
1782
  width: 100%;
1779
- color: var(--android-hint);
1783
+ color: var(--android-on-surface-variant);
1780
1784
  translate: 0 0;
1781
1785
  scale: 1;
1782
1786
  }
1783
1787
 
1784
1788
  :where([data-plex-layout="phone"]) [data-platform="android"] .Field:where([data-row][data-orientation="vertical"]:not([data-label-hidden])):has(> .Content > .Control > :is([data-slot="input"], [data-slot="textarea"])[data-variant] > :is(input, textarea)):not(:has(> .Icon, > .Action, > .LabelGroup > .Description, > .LabelGroup > .LabelRow)):not(:focus-within):has(> .Content > .Control > [data-variant] > :is(input, textarea):placeholder-shown) > .LabelGroup > .Label {
1785
1789
  width: 100%;
1786
- color: var(--android-hint);
1790
+ color: var(--android-on-surface-variant);
1787
1791
  translate: 0 0;
1788
1792
  scale: 1;
1789
1793
  }
@@ -154,6 +154,12 @@
154
154
  .ClearButton:last-child {
155
155
  margin-inline-end: calc(var(--floating-input-height) / 2 - var(--floating-input-clear-size, 1em) / 2 - var(--floating-input-gutter) - 1px);
156
156
  }
157
+
158
+ /* The Plex Android look: the clear button shows while the field has focus and text, as Material Components'
159
+ clear-text end icon (ClearTextEndIconDelegate) */
160
+ [data-platform="android"] .Root:not(:focus-within) .ClearButton {
161
+ display: none;
162
+ }
157
163
  }
158
164
  /* On a phone the clear button is the filled circle with a cross of iOS (xmark.circle.fill, a 17px circle in
159
165
  the tertiary label: kit iOS 27 Text Fields 5433:15635), drawn with the PlexUI XCircleFilled icon, whose
@@ -172,6 +178,12 @@
172
178
 
173
179
  :where([data-plex-layout="phone"]) .ClearButton:last-child {
174
180
  margin-inline-end: calc(var(--floating-input-height) / 2 - var(--floating-input-clear-size, 1em) / 2 - var(--floating-input-gutter) - 1px);
181
+ }
182
+
183
+ /* The Plex Android look: the clear button shows while the field has focus and text, as Material Components'
184
+ clear-text end icon (ClearTextEndIconDelegate) */
185
+ :where([data-plex-layout="phone"]) [data-platform="android"] .Root:not(:focus-within) .ClearButton {
186
+ display: none;
175
187
  }/* Password reveal toggle — circular ghost button hugging the right edge */.RevealButton {
176
188
  display: flex;
177
189
  align-items: center;
@@ -749,8 +749,12 @@
749
749
  --input-gap: 12px;
750
750
  --input-font-size: 16px;
751
751
  --input-adornment-offset: 0px;
752
- --input-outline-border-color: var(--android-field-line);
753
- --input-outline-border-color-hover: var(--android-field-line);
752
+ --input-outline-border-color: var(--android-outline);
753
+ --input-outline-border-color-hover: var(--android-outline);
754
+ /* The clear-text icon: Material's mtrl_ic_cancel, a filled 24px circle in onSurfaceVariant (XCircleFilled draws
755
+ its circle 20 of 24) */
756
+ --input-clear-glyph-size: 20px;
757
+ --input-clear-glyph-color: var(--android-on-surface-variant);
754
758
  --input-outline-border-color-focus: var(--android-accent-text);
755
759
  --input-border-color-invalid: var(--android-danger-text);
756
760
  --input-soft-background-color: color-mix(in srgb, var(--color-text) 5%, transparent);
@@ -766,6 +770,12 @@
766
770
  caret-color: var(--color-text);
767
771
  }
768
772
 
773
+ /* The clear button shows while the field has focus and text, as Material Components' clear-text end icon
774
+ (ClearTextEndIconDelegate); the search field (soft, led by its magnifier) keeps it with the text */
775
+ [data-platform="android"] .Container:not(:where([data-row] *, [data-toolbar] *)):not(:focus-within):not([data-variant="soft"][data-has-start-adornment]) > .Clear {
776
+ display: none;
777
+ }
778
+
769
779
  [data-platform="android"] .Container:not(:where([data-row] *, [data-toolbar] *))[data-variant="outline"]:not([data-disabled])[data-focused="true"] {
770
780
  box-shadow: 0 0 0 1.5px var(--input-outline-border-color-focus) inset;
771
781
  }
@@ -985,8 +995,12 @@
985
995
  --input-gap: 12px;
986
996
  --input-font-size: 16px;
987
997
  --input-adornment-offset: 0px;
988
- --input-outline-border-color: var(--android-field-line);
989
- --input-outline-border-color-hover: var(--android-field-line);
998
+ --input-outline-border-color: var(--android-outline);
999
+ --input-outline-border-color-hover: var(--android-outline);
1000
+ /* The clear-text icon: Material's mtrl_ic_cancel, a filled 24px circle in onSurfaceVariant (XCircleFilled draws
1001
+ its circle 20 of 24) */
1002
+ --input-clear-glyph-size: 20px;
1003
+ --input-clear-glyph-color: var(--android-on-surface-variant);
990
1004
  --input-outline-border-color-focus: var(--android-accent-text);
991
1005
  --input-border-color-invalid: var(--android-danger-text);
992
1006
  --input-soft-background-color: color-mix(in srgb, var(--color-text) 5%, transparent);
@@ -1002,6 +1016,12 @@
1002
1016
  caret-color: var(--color-text);
1003
1017
  }
1004
1018
 
1019
+ /* The clear button shows while the field has focus and text, as Material Components' clear-text end icon
1020
+ (ClearTextEndIconDelegate); the search field (soft, led by its magnifier) keeps it with the text */
1021
+ :where([data-plex-layout="phone"]) [data-platform="android"] .Container:not(:where([data-row] *, [data-toolbar] *)):not(:focus-within):not([data-variant="soft"][data-has-start-adornment]) > .Clear {
1022
+ display: none;
1023
+ }
1024
+
1005
1025
  :where([data-plex-layout="phone"]) [data-platform="android"] .Container:not(:where([data-row] *, [data-toolbar] *))[data-variant="outline"]:not([data-disabled])[data-focused="true"] {
1006
1026
  box-shadow: 0 0 0 1.5px var(--input-outline-border-color-focus) inset;
1007
1027
  }
@@ -168,6 +168,9 @@
168
168
  /* A field's hint: a light gray, a dim one at night. A field's idle outline: a light gray, the text at 24% at
169
169
  night. A search field in the content: the text at 5%, 7% at
170
170
  night. */
171
+ /* Material 3's roles for a field, as @plexui/react-native's Material theme computes them for Plex's grays:
172
+ `outline` (tone 50, 60 at night) for an outlined field's line at rest, at least 3:1 on the surface, and
173
+ `onSurfaceVariant` (tone 30, 80) for its label and the clear-text icon, at least 4.5:1 */
171
174
  --list-row-inset: 21px;
172
175
  --field-row-min-height: 50px;
173
176
  --field-row-text-padding-block: 12px;
@@ -199,6 +202,8 @@
199
202
  --android-button-solid-press: rgb(0 0 0 / 5.9%);
200
203
  --android-hint: #a8a8a8;
201
204
  --android-field-line: #dbdbdb;
205
+ --android-outline: #777;
206
+ --android-on-surface-variant: #474747;
202
207
  --android-search-fill: color-mix(in srgb, var(--color-text) 5%, transparent);
203
208
  }
204
209
  :root[data-platform="android"]:where([data-theme="dark"]) {
@@ -210,6 +215,8 @@
210
215
  --android-button-solid-press: rgb(255 255 255 / 5.1%);
211
216
  --android-hint: #7d7d7d;
212
217
  --android-field-line: color-mix(in srgb, var(--color-text) 24%, transparent);
218
+ --android-outline: #919191;
219
+ --android-on-surface-variant: #c6c6c6;
213
220
  --android-search-fill: color-mix(in srgb, var(--color-text) 7%, transparent);
214
221
  }
215
222
 
@@ -224,14 +231,17 @@
224
231
  --floating-input-box-radius: 8px;
225
232
  --floating-input-box-gutter: 14px;
226
233
  --floating-input-font-size: 16px;
227
- --floating-input-border-color: var(--android-field-line);
228
- --floating-input-border-color-hover: var(--android-field-line);
234
+ --floating-input-border-color: var(--android-outline);
235
+ --floating-input-border-color-hover: var(--android-outline);
229
236
  --floating-input-border-color-focus: var(--android-accent-text);
230
237
  --floating-input-border-color-invalid: var(--android-danger-text);
231
- --floating-input-label-color: var(--android-hint);
238
+ --floating-input-label-color: var(--android-on-surface-variant);
232
239
  --floating-input-label-color-focus: var(--android-accent-text);
233
240
  --floating-input-label-color-invalid: var(--android-danger-text);
234
- --floating-input-inside-label-color: var(--android-hint);
241
+ --floating-input-inside-label-color: var(--android-on-surface-variant);
242
+ /* The clear-text icon: Material's mtrl_ic_cancel, a filled 24px circle (XCircleFilled draws its circle 20 of 24) */
243
+ --floating-input-clear-glyph-size: 20px;
244
+ --floating-input-clear-glyph-color: var(--android-on-surface-variant);
235
245
  --floating-input-label-scale: 0.75;
236
246
  --floating-input-inside-label-scale: 0.75;
237
247
  --floating-input-inside-label-shift: -12px;
@@ -489,6 +499,9 @@
489
499
  /* A field's hint: a light gray, a dim one at night. A field's idle outline: a light gray, the text at 24% at
490
500
  night. A search field in the content: the text at 5%, 7% at
491
501
  night. */
502
+ /* Material 3's roles for a field, as @plexui/react-native's Material theme computes them for Plex's grays:
503
+ `outline` (tone 50, 60 at night) for an outlined field's line at rest, at least 3:1 on the surface, and
504
+ `onSurfaceVariant` (tone 30, 80) for its label and the clear-text icon, at least 4.5:1 */
492
505
  --list-row-inset: 21px;
493
506
  --field-row-min-height: 50px;
494
507
  --field-row-text-padding-block: 12px;
@@ -520,6 +533,8 @@
520
533
  --android-button-solid-press: rgb(0 0 0 / 5.9%);
521
534
  --android-hint: #a8a8a8;
522
535
  --android-field-line: #dbdbdb;
536
+ --android-outline: #777;
537
+ --android-on-surface-variant: #474747;
523
538
  --android-search-fill: color-mix(in srgb, var(--color-text) 5%, transparent);
524
539
  }
525
540
  :root[data-platform="android"]:where([data-theme="dark"]) :where([data-plex-layout="phone"]), :root[data-platform="android"] :where([data-theme="dark"]) :where([data-plex-layout="phone"]) {
@@ -531,6 +546,8 @@
531
546
  --android-button-solid-press: rgb(255 255 255 / 5.1%);
532
547
  --android-hint: #7d7d7d;
533
548
  --android-field-line: color-mix(in srgb, var(--color-text) 24%, transparent);
549
+ --android-outline: #919191;
550
+ --android-on-surface-variant: #c6c6c6;
534
551
  --android-search-fill: color-mix(in srgb, var(--color-text) 7%, transparent);
535
552
  }
536
553
  /* A field with a floating label (FloatingLabelInput, FloatingLabelSelect; @plexui/react-native's on Android): an
@@ -544,14 +561,17 @@
544
561
  --floating-input-box-radius: 8px;
545
562
  --floating-input-box-gutter: 14px;
546
563
  --floating-input-font-size: 16px;
547
- --floating-input-border-color: var(--android-field-line);
548
- --floating-input-border-color-hover: var(--android-field-line);
564
+ --floating-input-border-color: var(--android-outline);
565
+ --floating-input-border-color-hover: var(--android-outline);
549
566
  --floating-input-border-color-focus: var(--android-accent-text);
550
567
  --floating-input-border-color-invalid: var(--android-danger-text);
551
- --floating-input-label-color: var(--android-hint);
568
+ --floating-input-label-color: var(--android-on-surface-variant);
552
569
  --floating-input-label-color-focus: var(--android-accent-text);
553
570
  --floating-input-label-color-invalid: var(--android-danger-text);
554
- --floating-input-inside-label-color: var(--android-hint);
571
+ --floating-input-inside-label-color: var(--android-on-surface-variant);
572
+ /* The clear-text icon: Material's mtrl_ic_cancel, a filled 24px circle (XCircleFilled draws its circle 20 of 24) */
573
+ --floating-input-clear-glyph-size: 20px;
574
+ --floating-input-clear-glyph-color: var(--android-on-surface-variant);
555
575
  --floating-input-label-scale: 0.75;
556
576
  --floating-input-inside-label-scale: 0.75;
557
577
  --floating-input-inside-label-shift: -12px;
@@ -296,6 +296,8 @@
296
296
  --android-button-solid-press: rgb(0 0 0 / 5.9%);
297
297
  --android-hint: #a8a8a8;
298
298
  --android-field-line: #dbdbdb;
299
+ --android-outline: #777;
300
+ --android-on-surface-variant: #474747;
299
301
  --android-search-fill: color-mix(in srgb, var(--color-text) 5%, transparent);
300
302
  }
301
303
  :root[data-platform="android"]:where([data-theme="dark"]) {
@@ -307,6 +309,8 @@
307
309
  --android-button-solid-press: rgb(255 255 255 / 5.1%);
308
310
  --android-hint: #7d7d7d;
309
311
  --android-field-line: color-mix(in srgb, var(--color-text) 24%, transparent);
312
+ --android-outline: #919191;
313
+ --android-on-surface-variant: #c6c6c6;
310
314
  --android-search-fill: color-mix(in srgb, var(--color-text) 7%, transparent);
311
315
  }
312
316
  :root[data-platform="android"] {
@@ -315,14 +319,16 @@
315
319
  --floating-input-box-radius: 8px;
316
320
  --floating-input-box-gutter: 14px;
317
321
  --floating-input-font-size: 16px;
318
- --floating-input-border-color: var(--android-field-line);
319
- --floating-input-border-color-hover: var(--android-field-line);
322
+ --floating-input-border-color: var(--android-outline);
323
+ --floating-input-border-color-hover: var(--android-outline);
320
324
  --floating-input-border-color-focus: var(--android-accent-text);
321
325
  --floating-input-border-color-invalid: var(--android-danger-text);
322
- --floating-input-label-color: var(--android-hint);
326
+ --floating-input-label-color: var(--android-on-surface-variant);
323
327
  --floating-input-label-color-focus: var(--android-accent-text);
324
328
  --floating-input-label-color-invalid: var(--android-danger-text);
325
- --floating-input-inside-label-color: var(--android-hint);
329
+ --floating-input-inside-label-color: var(--android-on-surface-variant);
330
+ --floating-input-clear-glyph-size: 20px;
331
+ --floating-input-clear-glyph-color: var(--android-on-surface-variant);
326
332
  --floating-input-label-scale: 0.75;
327
333
  --floating-input-inside-label-scale: 0.75;
328
334
  --floating-input-inside-label-shift: -12px;
@@ -550,6 +556,8 @@
550
556
  --android-button-solid-press: rgb(0 0 0 / 5.9%);
551
557
  --android-hint: #a8a8a8;
552
558
  --android-field-line: #dbdbdb;
559
+ --android-outline: #777;
560
+ --android-on-surface-variant: #474747;
553
561
  --android-search-fill: color-mix(in srgb, var(--color-text) 5%, transparent);
554
562
  }
555
563
  :root[data-platform="android"]:where([data-theme="dark"]) :where([data-plex-layout="phone"]), :root[data-platform="android"] :where([data-theme="dark"]) :where([data-plex-layout="phone"]) {
@@ -561,6 +569,8 @@
561
569
  --android-button-solid-press: rgb(255 255 255 / 5.1%);
562
570
  --android-hint: #7d7d7d;
563
571
  --android-field-line: color-mix(in srgb, var(--color-text) 24%, transparent);
572
+ --android-outline: #919191;
573
+ --android-on-surface-variant: #c6c6c6;
564
574
  --android-search-fill: color-mix(in srgb, var(--color-text) 7%, transparent);
565
575
  }
566
576
  :root[data-platform="android"] :where([data-plex-layout="phone"]) {
@@ -569,14 +579,16 @@
569
579
  --floating-input-box-radius: 8px;
570
580
  --floating-input-box-gutter: 14px;
571
581
  --floating-input-font-size: 16px;
572
- --floating-input-border-color: var(--android-field-line);
573
- --floating-input-border-color-hover: var(--android-field-line);
582
+ --floating-input-border-color: var(--android-outline);
583
+ --floating-input-border-color-hover: var(--android-outline);
574
584
  --floating-input-border-color-focus: var(--android-accent-text);
575
585
  --floating-input-border-color-invalid: var(--android-danger-text);
576
- --floating-input-label-color: var(--android-hint);
586
+ --floating-input-label-color: var(--android-on-surface-variant);
577
587
  --floating-input-label-color-focus: var(--android-accent-text);
578
588
  --floating-input-label-color-invalid: var(--android-danger-text);
579
- --floating-input-inside-label-color: var(--android-hint);
589
+ --floating-input-inside-label-color: var(--android-on-surface-variant);
590
+ --floating-input-clear-glyph-size: 20px;
591
+ --floating-input-clear-glyph-color: var(--android-on-surface-variant);
580
592
  --floating-input-label-scale: 0.75;
581
593
  --floating-input-inside-label-scale: 0.75;
582
594
  --floating-input-inside-label-shift: -12px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/styles",
3
- "version": "0.17.8",
3
+ "version": "0.17.9",
4
4
  "description": "Framework-agnostic CSS for Plex UI: design tokens, globals and component styles",
5
5
  "type": "module",
6
6
  "license": "MIT",