@plexui/styles 0.2.0 → 0.3.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.
Files changed (50) hide show
  1. package/dist/es/components/DatePicker/Calendar.module.css +1 -1
  2. package/dist/es/components/DateRangePicker/Calendar.module.css +1 -1
  3. package/dist/es/components/Dialog/Dialog.module.css +71 -11
  4. package/dist/es/components/EmptyMessage/EmptyMessage.module.css +12 -8
  5. package/dist/es/components/FieldGroup/FieldGroup.module.css +5 -5
  6. package/dist/es/components/FileUpload/FileUpload.module.css +2 -2
  7. package/dist/es/components/Menu/Menu.module.css +8 -8
  8. package/dist/es/components/Select/Select.module.css +6 -6
  9. package/dist/es/components/Sidebar/Sidebar.module.css +2 -2
  10. package/dist/es/components/Tabs/Tabs.module.css +4 -4
  11. package/dist/es/components/Toast/Toast.module.css +43 -21
  12. package/dist/es/components/Toolbar/Toolbar.module.css +28 -4
  13. package/dist/es/styles/geist-mono-fonts/LICENSE +93 -0
  14. package/dist/es/styles/geist-mono-fonts/geist-mono-cyrillic-ext-wght-italic.woff2 +0 -0
  15. package/dist/es/styles/geist-mono-fonts/geist-mono-cyrillic-ext-wght-normal.woff2 +0 -0
  16. package/dist/es/styles/geist-mono-fonts/geist-mono-cyrillic-wght-italic.woff2 +0 -0
  17. package/dist/es/styles/geist-mono-fonts/geist-mono-cyrillic-wght-normal.woff2 +0 -0
  18. package/dist/es/styles/geist-mono-fonts/geist-mono-latin-ext-wght-italic.woff2 +0 -0
  19. package/dist/es/styles/geist-mono-fonts/geist-mono-latin-ext-wght-normal.woff2 +0 -0
  20. package/dist/es/styles/geist-mono-fonts/geist-mono-latin-wght-italic.woff2 +0 -0
  21. package/dist/es/styles/geist-mono-fonts/geist-mono-latin-wght-normal.woff2 +0 -0
  22. package/dist/es/styles/geist-mono-fonts/geist-mono-symbols2-wght-italic.woff2 +0 -0
  23. package/dist/es/styles/geist-mono-fonts/geist-mono-symbols2-wght-normal.woff2 +0 -0
  24. package/dist/es/styles/geist-mono-fonts/geist-mono-vietnamese-wght-italic.woff2 +0 -0
  25. package/dist/es/styles/geist-mono-fonts/geist-mono-vietnamese-wght-normal.woff2 +0 -0
  26. package/dist/es/styles/geist-mono.css +124 -0
  27. package/dist/es/styles/index.css +3 -0
  28. package/dist/es/styles/inter-fonts/LICENSE +93 -0
  29. package/dist/es/styles/inter-fonts/inter-cyrillic-ext-opsz-italic.woff2 +0 -0
  30. package/dist/es/styles/inter-fonts/inter-cyrillic-ext-opsz-normal.woff2 +0 -0
  31. package/dist/es/styles/inter-fonts/inter-cyrillic-opsz-italic.woff2 +0 -0
  32. package/dist/es/styles/inter-fonts/inter-cyrillic-opsz-normal.woff2 +0 -0
  33. package/dist/es/styles/inter-fonts/inter-greek-ext-opsz-italic.woff2 +0 -0
  34. package/dist/es/styles/inter-fonts/inter-greek-ext-opsz-normal.woff2 +0 -0
  35. package/dist/es/styles/inter-fonts/inter-greek-opsz-italic.woff2 +0 -0
  36. package/dist/es/styles/inter-fonts/inter-greek-opsz-normal.woff2 +0 -0
  37. package/dist/es/styles/inter-fonts/inter-latin-ext-opsz-italic.woff2 +0 -0
  38. package/dist/es/styles/inter-fonts/inter-latin-ext-opsz-normal.woff2 +0 -0
  39. package/dist/es/styles/inter-fonts/inter-latin-opsz-italic.woff2 +0 -0
  40. package/dist/es/styles/inter-fonts/inter-latin-opsz-normal.woff2 +0 -0
  41. package/dist/es/styles/inter-fonts/inter-vietnamese-opsz-italic.woff2 +0 -0
  42. package/dist/es/styles/inter-fonts/inter-vietnamese-opsz-normal.woff2 +0 -0
  43. package/dist/es/styles/inter.css +142 -0
  44. package/dist/es/styles/tailwind-utilities.css +8 -0
  45. package/dist/es/styles/touch.css +50 -62
  46. package/dist/es/styles/variables-components.css +20 -15
  47. package/dist/es/styles/variables-semantic.css +30 -5
  48. package/dist/es/styles/variables-tailwind-theme.css +2 -4
  49. package/dist/es/styles/variables-tokens-root.css +70 -4
  50. package/package.json +1 -1
@@ -194,10 +194,11 @@
194
194
  }
195
195
  html:root {
196
196
  --mobile-layout-margin: 16px;
197
- --mobile-list-inset: 20px;
197
+ --list-row-inset: 20px;
198
+ --mobile-list-inset: var(--list-row-inset);
198
199
  --page-gutter: var(--mobile-layout-margin);
199
200
  --toolbar-gutter: var(--mobile-layout-margin);
200
- --field-row-padding-inline: var(--mobile-list-inset);
201
+ --field-row-padding-inline: var(--list-row-inset);
201
202
  --control-size-sm: 44px;
202
203
  --control-size-md: 44px;
203
204
  --control-size-lg: 44px;
@@ -279,9 +280,9 @@
279
280
  --sortable-phone-grip-ink-height: 11px;
280
281
  --sortable-handle-inset: 4px;
281
282
  --sortable-handle-order: 1;
282
- --sortable-handle-margin-end: calc(var(--mobile-list-inset) - 9.83px);
283
+ --sortable-handle-margin-end: calc(var(--list-row-inset) - 9.83px);
283
284
  --sortable-handle-margin-start: 0px;
284
- --sortable-handle-field-margin-start: calc(1px - var(--mobile-list-inset));
285
+ --sortable-handle-field-margin-start: calc(1px - var(--list-row-inset));
285
286
  --sortable-handle-color: var(--mobile-label-tertiary);
286
287
  --sortable-handle-color-hover: var(--mobile-label-tertiary);
287
288
  --menu-item-highlight-opacity: 0;
@@ -367,7 +368,7 @@
367
368
  --card-padding-lg: 20px;
368
369
  --card-title-font-size: 17px;
369
370
  --card-title-line-height: 22px;
370
- --card-title-letter-spacing: normal;
371
+ --card-title-letter-spacing: var(--font-sans-tracking);
371
372
  --card-description-font-size: 15px;
372
373
  --card-description-line-height: 20px;
373
374
  --card-description-color: var(--color-text-secondary);
@@ -522,20 +523,20 @@
522
523
  --slider-thumb-background: var(--white);
523
524
  --slider-thumb-shadow: 0 0.5px 4px rgb(0 0 0 / 12%), 0 6px 13px rgb(0 0 0 / 12%);
524
525
  --empty-message-title-size: 22px;
525
- --empty-message-title-leading: 26px;
526
- --empty-message-title-gap: 0px;
526
+ --empty-message-title-leading: 28px;
527
+ --empty-message-title-gap: 4px;
527
528
  --empty-message-title-only-gap: 0px;
528
- --empty-message-title-weight: var(--font-weight-semibold);
529
- --empty-message-title-tracking: normal;
530
- --empty-message-description-size: 22px;
531
- --empty-message-description-leading: 26px;
532
- --empty-message-description-weight: var(--font-weight-medium);
529
+ --empty-message-title-weight: var(--font-weight-bold);
530
+ --empty-message-title-tracking: var(--font-sans-tracking);
531
+ --empty-message-description-size: 17px;
532
+ --empty-message-description-leading: 22px;
533
+ --empty-message-description-weight: var(--font-weight-normal);
533
534
  --empty-message-description-color: var(--mobile-label-secondary, var(--color-text-secondary));
534
535
  --empty-message-compact-description-size: 15px;
535
536
  --empty-message-compact-description-leading: 20px;
536
- --empty-message-padding-inline: 36px;
537
- --empty-message-text-inset: 16px;
538
- --empty-message-padding-bottom: 36px;
537
+ --empty-message-padding-inline: 40px;
538
+ --empty-message-text-inset: 0px;
539
+ --empty-message-padding-bottom: 40px;
539
540
  --empty-message-action-spacing: 24px;
540
541
  --empty-message-action-gap: 12px;
541
542
  --empty-message-fill-action-inset: 24px;
@@ -546,14 +547,15 @@
546
547
  --empty-message-multi-direction: column;
547
548
  --empty-message-multi-align: stretch;
548
549
  --empty-message-multi-action-width: 100%;
549
- --empty-message-action-size: 52px;
550
+ --empty-message-action-size: 50px;
550
551
  --empty-message-action-font-size: 17px;
551
552
  --empty-message-action-line-height: 22px;
553
+ --empty-message-action-font-weight: 510;
552
554
  --empty-message-action-gutter: 16px;
553
- --empty-message-icon-badge-size: 50px;
554
- --empty-message-icon-size: 22px;
555
+ --empty-message-icon-badge-size: 64px;
556
+ --empty-message-icon-size: 28px;
555
557
  --empty-message-icon-radius: var(--radius-full);
556
- --empty-message-icon-gap: 16px;
558
+ --empty-message-icon-gap: 24px;
557
559
  --indicator-default-size: 20px;
558
560
  --indicator-container-type: size;
559
561
  --indicator-ring-display: none;
@@ -575,7 +577,7 @@
575
577
  --mobile-field-error-font-size: 15px;
576
578
  --mobile-field-error-line-height: 20px;
577
579
  --mobile-field-error-font-weight: var(--font-weight-normal);
578
- --mobile-field-error-letter-spacing: normal;
580
+ --mobile-field-error-letter-spacing: var(--font-sans-tracking);
579
581
  --mobile-field-error-offset: 4px;
580
582
  --mobile-field-error-icon-size: 16px;
581
583
  --mobile-field-error-icon-gap: 4px;
@@ -607,7 +609,7 @@
607
609
  --field-row-action-font-weight: var(--font-weight-normal);
608
610
  --badge-size-xl: 36px;
609
611
  --field-group-radius: 26px;
610
- --field-group-separator-inset: var(--mobile-list-inset);
612
+ --field-group-separator-inset: var(--list-row-inset);
611
613
  --field-group-border-width: 0px;
612
614
  --field-group-background: var(--mobile-surface-plain-secondary, var(--color-background-secondary-soft-alpha));
613
615
  --field-group-title-color: var(--color-text-secondary);
@@ -620,8 +622,8 @@
620
622
  --field-group-footer-font-size: 13px;
621
623
  --field-group-footer-line-height: 16px;
622
624
  --field-group-footer-paragraph-gap: 16px;
623
- --field-group-footer-padding: 8px var(--mobile-list-inset) 6px;
624
- --field-group-title-padding-inline: var(--mobile-list-inset);
625
+ --field-group-footer-padding: 8px var(--list-row-inset) 6px;
626
+ --field-group-title-padding-inline: var(--list-row-inset);
625
627
  --field-group-description-font-size: 15px;
626
628
  --field-group-description-line-height: 20px;
627
629
  }
@@ -645,14 +647,6 @@
645
647
  inset 0 -0.67px 0 var(--mobile-glass-rim, transparent);
646
648
  --menu-horizontal-selected-background: var(--alpha-15);
647
649
  }
648
- html [data-mobile-placement="bottom"]:not([data-mobile-variant]) {
649
- --dialog-panel-radius: 38px 38px 0 0;
650
- --dialog-panel-max-height: calc(100dvh - 10px);
651
- }
652
- html [data-mobile-placement="center"]:not([data-mobile-variant]) {
653
- --dialog-panel-width: 300px;
654
- --dialog-panel-radius: 34px;
655
- }
656
650
  @layer components {
657
651
  html :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"] {
658
652
  --segmented-control-size: 32px;
@@ -853,10 +847,11 @@
853
847
  }
854
848
  html:root :where([data-plex-layout="phone"]) {
855
849
  --mobile-layout-margin: 16px;
856
- --mobile-list-inset: 20px;
850
+ --list-row-inset: 20px;
851
+ --mobile-list-inset: var(--list-row-inset);
857
852
  --page-gutter: var(--mobile-layout-margin);
858
853
  --toolbar-gutter: var(--mobile-layout-margin);
859
- --field-row-padding-inline: var(--mobile-list-inset);
854
+ --field-row-padding-inline: var(--list-row-inset);
860
855
  --control-size-sm: 44px;
861
856
  --control-size-md: 44px;
862
857
  --control-size-lg: 44px;
@@ -938,9 +933,9 @@ html:root :where([data-plex-layout="phone"]) {
938
933
  --sortable-phone-grip-ink-height: 11px;
939
934
  --sortable-handle-inset: 4px;
940
935
  --sortable-handle-order: 1;
941
- --sortable-handle-margin-end: calc(var(--mobile-list-inset) - 9.83px);
936
+ --sortable-handle-margin-end: calc(var(--list-row-inset) - 9.83px);
942
937
  --sortable-handle-margin-start: 0px;
943
- --sortable-handle-field-margin-start: calc(1px - var(--mobile-list-inset));
938
+ --sortable-handle-field-margin-start: calc(1px - var(--list-row-inset));
944
939
  --sortable-handle-color: var(--mobile-label-tertiary);
945
940
  --sortable-handle-color-hover: var(--mobile-label-tertiary);
946
941
  --menu-item-highlight-opacity: 0;
@@ -1026,7 +1021,7 @@ html:root :where([data-plex-layout="phone"]) {
1026
1021
  --card-padding-lg: 20px;
1027
1022
  --card-title-font-size: 17px;
1028
1023
  --card-title-line-height: 22px;
1029
- --card-title-letter-spacing: normal;
1024
+ --card-title-letter-spacing: var(--font-sans-tracking);
1030
1025
  --card-description-font-size: 15px;
1031
1026
  --card-description-line-height: 20px;
1032
1027
  --card-description-color: var(--color-text-secondary);
@@ -1181,20 +1176,20 @@ html:root :where([data-plex-layout="phone"]) {
1181
1176
  --slider-thumb-background: var(--white);
1182
1177
  --slider-thumb-shadow: 0 0.5px 4px rgb(0 0 0 / 12%), 0 6px 13px rgb(0 0 0 / 12%);
1183
1178
  --empty-message-title-size: 22px;
1184
- --empty-message-title-leading: 26px;
1185
- --empty-message-title-gap: 0px;
1179
+ --empty-message-title-leading: 28px;
1180
+ --empty-message-title-gap: 4px;
1186
1181
  --empty-message-title-only-gap: 0px;
1187
- --empty-message-title-weight: var(--font-weight-semibold);
1188
- --empty-message-title-tracking: normal;
1189
- --empty-message-description-size: 22px;
1190
- --empty-message-description-leading: 26px;
1191
- --empty-message-description-weight: var(--font-weight-medium);
1182
+ --empty-message-title-weight: var(--font-weight-bold);
1183
+ --empty-message-title-tracking: var(--font-sans-tracking);
1184
+ --empty-message-description-size: 17px;
1185
+ --empty-message-description-leading: 22px;
1186
+ --empty-message-description-weight: var(--font-weight-normal);
1192
1187
  --empty-message-description-color: var(--mobile-label-secondary, var(--color-text-secondary));
1193
1188
  --empty-message-compact-description-size: 15px;
1194
1189
  --empty-message-compact-description-leading: 20px;
1195
- --empty-message-padding-inline: 36px;
1196
- --empty-message-text-inset: 16px;
1197
- --empty-message-padding-bottom: 36px;
1190
+ --empty-message-padding-inline: 40px;
1191
+ --empty-message-text-inset: 0px;
1192
+ --empty-message-padding-bottom: 40px;
1198
1193
  --empty-message-action-spacing: 24px;
1199
1194
  --empty-message-action-gap: 12px;
1200
1195
  --empty-message-fill-action-inset: 24px;
@@ -1205,14 +1200,15 @@ html:root :where([data-plex-layout="phone"]) {
1205
1200
  --empty-message-multi-direction: column;
1206
1201
  --empty-message-multi-align: stretch;
1207
1202
  --empty-message-multi-action-width: 100%;
1208
- --empty-message-action-size: 52px;
1203
+ --empty-message-action-size: 50px;
1209
1204
  --empty-message-action-font-size: 17px;
1210
1205
  --empty-message-action-line-height: 22px;
1206
+ --empty-message-action-font-weight: 510;
1211
1207
  --empty-message-action-gutter: 16px;
1212
- --empty-message-icon-badge-size: 50px;
1213
- --empty-message-icon-size: 22px;
1208
+ --empty-message-icon-badge-size: 64px;
1209
+ --empty-message-icon-size: 28px;
1214
1210
  --empty-message-icon-radius: var(--radius-full);
1215
- --empty-message-icon-gap: 16px;
1211
+ --empty-message-icon-gap: 24px;
1216
1212
  --indicator-default-size: 20px;
1217
1213
  --indicator-container-type: size;
1218
1214
  --indicator-ring-display: none;
@@ -1234,7 +1230,7 @@ html:root :where([data-plex-layout="phone"]) {
1234
1230
  --mobile-field-error-font-size: 15px;
1235
1231
  --mobile-field-error-line-height: 20px;
1236
1232
  --mobile-field-error-font-weight: var(--font-weight-normal);
1237
- --mobile-field-error-letter-spacing: normal;
1233
+ --mobile-field-error-letter-spacing: var(--font-sans-tracking);
1238
1234
  --mobile-field-error-offset: 4px;
1239
1235
  --mobile-field-error-icon-size: 16px;
1240
1236
  --mobile-field-error-icon-gap: 4px;
@@ -1266,7 +1262,7 @@ html:root :where([data-plex-layout="phone"]) {
1266
1262
  --field-row-action-font-weight: var(--font-weight-normal);
1267
1263
  --badge-size-xl: 36px;
1268
1264
  --field-group-radius: 26px;
1269
- --field-group-separator-inset: var(--mobile-list-inset);
1265
+ --field-group-separator-inset: var(--list-row-inset);
1270
1266
  --field-group-border-width: 0px;
1271
1267
  --field-group-background: var(--mobile-surface-plain-secondary, var(--color-background-secondary-soft-alpha));
1272
1268
  --field-group-title-color: var(--color-text-secondary);
@@ -1279,8 +1275,8 @@ html:root :where([data-plex-layout="phone"]) {
1279
1275
  --field-group-footer-font-size: 13px;
1280
1276
  --field-group-footer-line-height: 16px;
1281
1277
  --field-group-footer-paragraph-gap: 16px;
1282
- --field-group-footer-padding: 8px var(--mobile-list-inset) 6px;
1283
- --field-group-title-padding-inline: var(--mobile-list-inset);
1278
+ --field-group-footer-padding: 8px var(--list-row-inset) 6px;
1279
+ --field-group-title-padding-inline: var(--list-row-inset);
1284
1280
  --field-group-description-font-size: 15px;
1285
1281
  --field-group-description-line-height: 20px;
1286
1282
  }
@@ -1304,14 +1300,6 @@ html:root:where([data-theme="dark"]) :where([data-plex-layout="phone"]), html:ro
1304
1300
  inset 0 -0.67px 0 var(--mobile-glass-rim, transparent);
1305
1301
  --menu-horizontal-selected-background: var(--alpha-15);
1306
1302
  }
1307
- html :where([data-plex-layout="phone"]) [data-mobile-placement="bottom"]:not([data-mobile-variant]) {
1308
- --dialog-panel-radius: 38px 38px 0 0;
1309
- --dialog-panel-max-height: calc(100dvh - 10px);
1310
- }
1311
- html :where([data-plex-layout="phone"]) [data-mobile-placement="center"]:not([data-mobile-variant]) {
1312
- --dialog-panel-width: 300px;
1313
- --dialog-panel-radius: 34px;
1314
- }
1315
1303
  @layer components {
1316
1304
  html :where([data-plex-layout="phone"]) :is([data-variant="segmented"], [data-variant="underline"])[data-orientation="horizontal"] {
1317
1305
  --segmented-control-size: 32px;
@@ -260,10 +260,10 @@
260
260
  --sortable-handle-color: var(--color-text-tertiary);
261
261
  --sortable-handle-color-hover: var(--color-text-secondary);
262
262
  --sortable-line-size: 2px;
263
- --sortable-line-color: var(--color-background-info-solid);
263
+ --sortable-line-color: var(--color-background-accent-solid);
264
264
  --sortable-slot-inset: 8px;
265
265
  --sortable-slot-radius: 12px;
266
- --sortable-slot-background: var(--color-background-info-soft);
266
+ --sortable-slot-background: var(--color-background-accent-soft);
267
267
  --sortable-slot-background-away: var(--color-surface-tertiary);
268
268
 
269
269
  /* =============================================
@@ -272,7 +272,12 @@
272
272
  --field-row-min-height: 52px;
273
273
  --field-row-padding-block: 10px;
274
274
  --field-row-text-padding-block: 10px;
275
- --field-row-padding-inline: 16px;
275
+ /* The inset of a row's content from the edge of its group, on every width: 16px here, 20px on a phone
276
+ (touch.css, the iOS cell inset). An app's own rows in a FieldGroup take it, so they line up with the kit's;
277
+ the edge of a screen or a sheet is --page-gutter. Tailwind: px-list-inset, px-layout-margin. The tokens drawn
278
+ from it resolve here, on the root: override it on :root to move the kit's rows too. */
279
+ --list-row-inset: 16px;
280
+ --field-row-padding-inline: var(--list-row-inset);
276
281
  --field-row-gap: 24px;
277
282
  --field-row-control-width: 160px;
278
283
  --field-row-text-width: 240px;
@@ -569,15 +574,15 @@
569
574
  under a 131/131/133 glyph, 30% white: alpha-20 and alpha-30. */
570
575
  /* A prominent bar button (NavigationButton confirm, a solid primary or info Button) is tinted with the accent: the
571
576
  kit's Symbol and Text - Prominent (iOS 27 Buttons - 44pt, 5720:29596) lay accents/blue #08f under a
572
- #f5f5f5 symbol or label, and native glass shows 0/133/251 (Photos checkmark, IMG_5453): the info solid
573
- of PlexUI, blue-400, under white (owner, 08.11). Its edge is the glass's: the sides darkened (kit, 25
577
+ #f5f5f5 symbol or label, and native glass shows 0/133/251 (Photos checkmark, IMG_5453): --color-accent,
578
+ blue-400 by default, under white (owner, 08.11). Its edge is the glass's: the sides darkened (kit, 25
574
579
  levels; native, 0/113/217) and light along the top and the bottom (kit Glass Effect, a +40 dodge 10px
575
580
  deep at both; native 187 at the top and 205 at the bottom on 133, 152 on the diagonals, none at the sides).
576
581
  Set the background to --color-background-primary-solid to keep the PlexUI primary. */
577
- --toolbar-prominent-background: var(--color-background-info-solid);
578
- --toolbar-prominent-background-hover: var(--color-background-info-solid-hover);
579
- --toolbar-prominent-background-active: var(--color-background-info-solid-active);
580
- --toolbar-prominent-color: var(--color-text-info-solid);
582
+ --toolbar-prominent-background: var(--color-background-accent-solid);
583
+ --toolbar-prominent-background-hover: var(--color-background-accent-solid-hover);
584
+ --toolbar-prominent-background-active: var(--color-background-accent-solid-active);
585
+ --toolbar-prominent-color: var(--color-text-accent-solid);
581
586
  --toolbar-prominent-sheen: linear-gradient(rgb(255 255 255 / 16%), transparent 6px, transparent calc(100% - 8px), rgb(255 255 255 / 16%));
582
587
 
583
588
  /* =============================================
@@ -806,7 +811,7 @@
806
811
  letters A to V carry the ink of native ones (515 against 515pt²; medium gave 453). In a 14.67px column each
807
812
  letter centres where its native one does (7.4px from the edge on average). The country list of a sheet
808
813
  (IMG_5491: 15pt apart, 10pt from the edge) is the exception. iOS tints them systemBlue (0088ff); PlexUI
809
- draws that tint as info, as it does the prominent toolbar button. A drag along the letters highlights
814
+ draws that tint with --color-accent, as it does the prominent toolbar button. A drag along the letters highlights
810
815
  nothing, as on iOS. The target reaches 30px in from the edge (the native frames show no target). A list
811
816
  keeps its margins beside the index, whose letters sit in the trailing one (Contacts rows end 16pt from the
812
817
  edge). */
@@ -815,7 +820,7 @@
815
820
  --index-bar-font-size: 11px;
816
821
  --index-bar-line-height: 13.79px;
817
822
  --index-bar-font-weight: 590;
818
- --index-bar-color: var(--color-text-info);
823
+ --index-bar-color: var(--color-text-accent);
819
824
  --index-bar-target-width: 30px;
820
825
 
821
826
  /* =============================================
@@ -1164,8 +1169,8 @@
1164
1169
  --floating-input-border-color: rgb(0 0 0 / 15%);
1165
1170
  --floating-input-border-color-hover: rgb(0 0 0 / 20%);
1166
1171
  --file-upload-separator-color: rgb(0 0 0 / 8%);
1167
- --link-primary-text-color: var(--blue-500);
1168
- --link-primary-text-color-hover: var(--blue-600);
1172
+ --link-primary-text-color: var(--accent-500);
1173
+ --link-primary-text-color-hover: var(--accent-600);
1169
1174
  --user-message-background-color: var(--alpha-05);
1170
1175
  --codeblock-background-color: #f9f9f9;
1171
1176
  --codeblock-syntax-1: #c0660d;
@@ -1229,8 +1234,8 @@
1229
1234
  --floating-input-border-color: rgb(255 255 255 / 16%);
1230
1235
  --floating-input-border-color-hover: rgb(255 255 255 / 24%);
1231
1236
  --file-upload-separator-color: rgb(255 255 255 / 8%);
1232
- --link-primary-text-color: var(--blue-300);
1233
- --link-primary-text-color-hover: var(--blue-400);
1237
+ --link-primary-text-color: var(--accent-300);
1238
+ --link-primary-text-color-hover: var(--color-accent);
1234
1239
  --user-message-background-color: var(--alpha-08);
1235
1240
  --codeblock-background-color: #161616;
1236
1241
  --codeblock-syntax-1: var(--yellow-100);
@@ -9,6 +9,26 @@
9
9
  --color-text: var(--gray-1000);
10
10
  --color-text-inverse: var(--gray-0);
11
11
 
12
+ /* =============================================
13
+ Accent: the steps of --color-accent (variables-tokens-root.css), lighter by white and darker by black
14
+ as the blue scale is drawn from blue-400, so the default accent keeps the blue of Plex UI
15
+ ============================================= */
16
+ --accent-50: color-mix(in srgb, var(--color-accent), white 90%);
17
+ --accent-75: color-mix(in srgb, var(--color-accent), white 80%);
18
+ --accent-200: color-mix(in srgb, var(--color-accent), white 40%);
19
+ --accent-300: color-mix(in srgb, var(--color-accent), white 20%);
20
+ --accent-500: color-mix(in srgb, var(--color-accent), black 20%);
21
+ --accent-600: color-mix(in srgb, var(--color-accent), black 40%);
22
+ --accent-700: color-mix(in srgb, var(--color-accent), black 52%);
23
+ --accent-a25: color-mix(in oklab, var(--color-accent) 4%, transparent);
24
+ --accent-a50: color-mix(in oklab, var(--color-accent) 13%, transparent);
25
+ --accent-a75: color-mix(in oklab, var(--color-accent) 25%, transparent);
26
+ /* Accent roles: the iOS tint and the kit's own accent uses read these; the info status keeps its blue. */
27
+ --color-background-accent-solid: var(--color-accent);
28
+ --color-background-accent-solid-hover: var(--accent-500);
29
+ --color-background-accent-solid-active: var(--accent-500);
30
+ --color-text-accent-solid: var(--white);
31
+
12
32
  /* =============================================
13
33
  Ring colors
14
34
  ============================================= */
@@ -270,9 +290,10 @@
270
290
  Typography
271
291
  ============================================= */
272
292
  /* Tracking */
273
- --font-tracking-wide: 0em;
274
- --font-tracking-normal: 0em;
275
- --font-tracking-tight: 0em;
293
+ /* The tracking of --font-sans by size (variables-tokens-root.css), resolved at each text's own size. */
294
+ --font-tracking-wide: var(--font-sans-tracking);
295
+ --font-tracking-normal: var(--font-sans-tracking);
296
+ --font-tracking-tight: var(--font-sans-tracking);
276
297
  /* Sizes */
277
298
  --font-heading-5xl-size: 4.5rem; /* 72px */
278
299
  --font-heading-5xl-line-height: 4.5rem; /* 72px */
@@ -429,7 +450,9 @@
429
450
  :where(:root), :where([data-theme="light"]) {
430
451
  --color-text-secondary: var(--gray-500);
431
452
  --color-text-tertiary: var(--gray-400);
432
- --color-ring: var(--blue-500);
453
+ --color-text-accent: var(--accent-500);
454
+ --color-background-accent-soft: var(--accent-50);
455
+ --color-ring: var(--accent-500);
433
456
  --color-background-primary-soft: var(--gray-100);
434
457
  --color-background-primary-soft-hover: var(--gray-150);
435
458
  --color-background-primary-soft-active: var(--gray-200);
@@ -534,7 +557,9 @@
534
557
  :where([data-theme="dark"]) {
535
558
  --color-text-secondary: var(--gray-700);
536
559
  --color-text-tertiary: var(--gray-600);
537
- --color-ring: var(--blue-400);
560
+ --color-text-accent: var(--accent-200);
561
+ --color-background-accent-soft: color-mix(in oklab, var(--color-accent) 25%, var(--gray-100));
562
+ --color-ring: var(--color-accent);
538
563
  --color-background-primary-soft: var(--gray-300);
539
564
  --color-background-primary-soft-hover: var(--gray-350);
540
565
  --color-background-primary-soft-active: var(--gray-400);
@@ -7,10 +7,8 @@
7
7
  --breakpoint-2xl: 1536px;
8
8
 
9
9
  --font-serif: initial;
10
- --font-sans: ui-sans-serif, -apple-system, system-ui, "Segoe UI", "Noto Sans", "Helvetica",
11
- "Arial", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
12
- --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", "Menlo", "Monaco", "Consolas",
13
- "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;
10
+ /* --font-sans and --font-mono are set once, in variables-tokens-root.css: outside any layer, they win over
11
+ Tailwind's theme, so font-sans and font-mono draw the Plex faces. */
14
12
 
15
13
  --font-weight-*: initial;
16
14
  --font-weight-normal: 400;
@@ -25,12 +25,47 @@
25
25
  --radius-4xl: 1.5rem; /* 24px */
26
26
  --radius-full: 9999px;
27
27
 
28
+ /* Theme. These four are the place to restyle the whole kit: override them on :root, after the Plex UI
29
+ stylesheet, and every component, React and Vue, desktop and phone, follows.
30
+
31
+ --font-sans: the typeface of every text. Inter 4 by default, shipped with the kit (inter.css), on the
32
+ desktop as in the Figma kit and on a phone too. Apple's San Francisco may not be shipped on the web, and
33
+ a system stack would show it only on Apple devices.
34
+ --font-mono: the typeface of code, ids and other monospace text. Geist Mono by default, the Figma kit's
35
+ font/font-mono, shipped with the kit (geist-mono.css). It keeps its own spacing: no tracking is set on it.
36
+ --font-sans-tracking: the letter-spacing of --font-sans by size, set on every element so it follows each
37
+ text's own size. The Plex UI Figma kit's Inter tracking (Apps 2.4, 3. Typography, mode Android & Web), exact
38
+ at every size of its scale: 0 up to 12px, -0.05px at 13, -0.10px at 14 and 15, -0.15px at 16 and 17,
39
+ -0.10px at 18, -0.15px from 20 to 24, -0.20px from 28 to 48, -0.30px at 60, -0.36px at 72; a size between
40
+ takes the value between. With another typeface set what it asks, normal for one that tracks itself.
41
+ --color-accent: the accent of the kit, the iOS tint: links, focus rings, info buttons, badges and alerts,
42
+ the prominent bar button and a phone sheet's tinted actions. Their lighter and darker steps are drawn
43
+ from it in both themes. Primary stays the neutral ink of Plex UI. */
44
+ --font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, "Segoe UI", "Noto Sans", "Helvetica", "Arial",
45
+ "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
46
+ --font-sans-tracking: max(
47
+ min(
48
+ max(
49
+ min(
50
+ max(
51
+ min(max(min(0px, calc(0.6px - 0.05em)), -0.1px), calc(0.65px - 0.05em)),
52
+ -0.15px,
53
+ min(calc(0.05em - 1px), calc(0.35px - 0.025em))
54
+ ),
55
+ calc(0.15px - 0.0125em)
56
+ ),
57
+ -0.2px
58
+ ),
59
+ calc(0.2px - 0.0083333em)
60
+ ),
61
+ min(-0.005em, -0.3px)
62
+ );
63
+ --font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, "Menlo", "Consolas", "Liberation Mono",
64
+ "DejaVu Sans Mono", "Courier New", monospace;
65
+ --color-accent: #0285ff;
66
+
28
67
  /* Font stacks */
29
- --font-sans: ui-sans-serif, -apple-system, system-ui, "Segoe UI", "Noto Sans", "Helvetica",
30
- "Arial", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
31
68
  --font-serif: ui-serif, Georgia, "Times New Roman", serif;
32
- --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", "Menlo", "Monaco", "Consolas",
33
- "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;
34
69
 
35
70
  /* Font weights */
36
71
  --font-weight-normal: 400;
@@ -38,3 +73,34 @@
38
73
  --font-weight-semibold: 600;
39
74
  --font-weight-bold: 700;
40
75
  }
76
+
77
+ /* Every element takes the tracking of --font-sans at its own size: letter-spacing inherits as a length, so a
78
+ value set once on the page would keep the page's size in a smaller label and a larger title. In the base
79
+ layer, so a component or a utility that sets its own wins. The form controls are named as well: Tailwind's
80
+ preflight gives them `letter-spacing: inherit` by their element names, which a zero-specificity rule would
81
+ not beat, and a 14px button inside 16px text would take the 16px tracking.
82
+ A tracking set on an element by a utility (`tracking-wide`) or a style reaches the text inside it, a Button's
83
+ label among it. A monospace text keeps its face's spacing, by its tag, a font-mono utility or a style. */
84
+ @layer base {
85
+ :where(*, ::before, ::after),
86
+ button,
87
+ input,
88
+ select,
89
+ optgroup,
90
+ textarea,
91
+ ::file-selector-button {
92
+ letter-spacing: var(--font-sans-tracking);
93
+ }
94
+
95
+ :where([class*="tracking-"], [style*="letter-spacing"]) :where(*, ::before, ::after),
96
+ :where([class*="tracking-"], [style*="letter-spacing"]) :is(button, input, select, optgroup, textarea) {
97
+ letter-spacing: inherit;
98
+ }
99
+
100
+ :where(code, kbd, samp, pre, [class*="font-mono"], [style*="font-mono"]),
101
+ :where(code, kbd, samp, pre, [class*="font-mono"], [style*="font-mono"]) :where(*, ::before, ::after),
102
+ :where(code, kbd, samp, pre, [class*="font-mono"], [style*="font-mono"]) :is(button, input, select, optgroup, textarea),
103
+ :is(button, input, select, optgroup, textarea):where([class*="font-mono"], [style*="font-mono"]) {
104
+ letter-spacing: normal;
105
+ }
106
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/styles",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Framework-agnostic CSS for Plex UI: design tokens, globals and component styles",
5
5
  "type": "module",
6
6
  "license": "MIT",