@ecopages/radiant-themes 0.2.0 → 0.2.2

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 (42) hide show
  1. package/README.md +37 -17
  2. package/dist/compiled/themes/cloudflare/compact.css +56 -14
  3. package/dist/compiled/themes/cloudflare.css +56 -14
  4. package/dist/compiled/themes/github/compact.css +310 -65
  5. package/dist/compiled/themes/github.css +310 -65
  6. package/dist/compiled/themes/high-contrast/compact.css +108 -11
  7. package/dist/compiled/themes/high-contrast.css +108 -11
  8. package/dist/compiled/themes/macos/compact.css +698 -272
  9. package/dist/compiled/themes/macos-classic/compact.css +455 -16
  10. package/dist/compiled/themes/macos-classic.css +455 -16
  11. package/dist/compiled/themes/macos.css +698 -272
  12. package/dist/compiled/themes/material/compact.css +461 -136
  13. package/dist/compiled/themes/material.css +461 -136
  14. package/dist/compiled/themes/vercel/compact.css +118 -66
  15. package/dist/compiled/themes/vercel.css +118 -66
  16. package/dist/compiled/themes/vscode/compact.css +310 -40
  17. package/dist/compiled/themes/vscode.css +310 -40
  18. package/dist/compiled/themes/windows95/compact.css +408 -22
  19. package/dist/compiled/themes/windows95.css +408 -22
  20. package/dist/foundation.css +13 -0
  21. package/dist/tokens/colors/cloudflare.css +1 -1
  22. package/dist/tokens/colors/github.css +32 -0
  23. package/dist/tokens/colors/macos.css +65 -25
  24. package/dist/tokens/colors/material.css +61 -20
  25. package/dist/tokens/colors/vercel.css +43 -39
  26. package/dist/tokens/colors/vscode.css +48 -4
  27. package/dist/tokens/colors/windows95.css +10 -5
  28. package/dist/tokens/components/cloudflare.css +63 -7
  29. package/dist/tokens/components/github.css +287 -39
  30. package/dist/tokens/components/high-contrast.css +106 -11
  31. package/dist/tokens/components/macos-classic.css +549 -15
  32. package/dist/tokens/components/macos.css +555 -96
  33. package/dist/tokens/components/material.css +360 -29
  34. package/dist/tokens/components/vercel.css +83 -19
  35. package/dist/tokens/components/vscode.css +280 -27
  36. package/dist/tokens/components/windows95.css +470 -18
  37. package/dist/tokens/roles/cloudflare.css +1 -1
  38. package/dist/tokens/roles/github.css +12 -12
  39. package/dist/tokens/roles/macos.css +97 -93
  40. package/dist/tokens/roles/material.css +65 -65
  41. package/dist/tokens/roles/vercel.css +3 -3
  42. package/package.json +3 -3
package/README.md CHANGED
@@ -37,40 +37,60 @@ Compact variants have their own export, for example:
37
37
  Each compact entry applies the theme's shared compact spacing composition while keeping the same theme-owned palette,
38
38
  font stacks, shape, and component treatment. The full and compact entries follow the document's `.dark` class.
39
39
 
40
+ Treegrid surfaces follow the same file-browser treatments: VS Code is flat and compact, GitHub and macOS use quiet
41
+ list separators, and Mac OS Classic and Windows 95 use their native-style triangle or square disclosure affordances.
42
+
40
43
  Radiant Default (`@ecopages/radiant-ui/themes/default`) uses three OKLCH seed colors plus density, corner radius, and
41
44
  border opacity inputs. The docs tuner shows the six values and produces copyable CSS. Those controls only apply to
42
45
  Radiant Default; branded themes keep their own values.
43
46
 
44
47
  High Contrast targets at least 7:1 contrast for published semantic text pairs in both modes and uses prominent focus
45
- indicators. Radiant UI's shared foundation supports reduced motion, increased contrast, visible keyboard focus, and
46
- Windows forced colors. Verify non-text boundaries and application content after custom overrides.
48
+ indicators. Its control surfaces, including switch tracks and thumbs, use square corners, radios stay round with a checked
49
+ dot, and muted text stays above 7:1. Radiant UI's shared foundation
50
+ supports reduced motion, increased contrast, visible keyboard focus, and Windows forced colors. Verify non-text
51
+ boundaries and application content after custom overrides.
47
52
 
48
53
  Windows 95 draws every control with the two-tone 2px bevel: gray push buttons with a black frame on the default
49
54
  action, sunken white fields, check boxes, and radio wells, raised property tabs joined to their page, navy title bars,
50
- and navy selection. Mac OS Classic is Mac OS 9 Platinum, built from the Mac OS 8 Human Interface Guidelines and the Appearance Manager's
55
+ navy selection, flat menu bars with navy menu highlights, trackbars with a sunken channel and raised pointer,
56
+ drop-down lists and combo boxes with a raised arrow button, sunken list boxes and tree views with dotted lines and
57
+ plus/minus boxes, and pale yellow tooltips. Mac OS Classic is Mac OS 9 Platinum, built from the Mac OS 8 Human Interface Guidelines and the Appearance Manager's
51
58
  default theme: the seven system greys `#eeeeee` to `#202020`, grey push buttons with a black outline and a two-pixel
52
59
  bevel, a three-layer ring around the default button, 12px bevelled check boxes, shaded radio spheres, sunken white
53
60
  fields, trapezoid tabs that merge into a black-framed page, and 1px striped title bars. Selection and focus use the
54
- default `#6666cc` accent. Both
55
- dark modes keep the same bevel structure on darker faces and fields, since neither system shipped one. macOS uses
56
- moderate control corners, grouped tab segments, softer layered surfaces, and accent-blue push buttons with white text
57
- in dark mode. Material Design uses tonal surfaces, a purple accent family, and rounded action
58
- controls. These are original implementations written with Radiant semantic roles, Tailwind `@apply`, and catalog
61
+ default `#6666cc` accent. Menus and the menu bar highlight items in that accent, list views are black-framed white
62
+ wells with bevelled column headers, tooltips are outlined help balloons, and disclosures use the Platinum triangle. Both
63
+ dark modes keep the same bevel structure on darker faces and fields, since neither system shipped one. macOS follows Sonoma AppKit:
64
+ the SF Pro system font at 13px, 6px push buttons outlined by a hairline shadow, accent-filled default buttons, check
65
+ boxes, and radio buttons, pop-up buttons with an accent arrow well, segmented tabs centered above a group box, white
66
+ slider knobs, translucent menus and popovers, and accent row selection with white text. Destructive buttons use red
67
+ text, as AppKit alerts do. Windows 95 also provides a full-size dithered scrollbar with raised arrow buttons and a bevelled thumb;
68
+ Mac OS Classic provides Platinum's grey bevelled track, end-positioned arrow buttons, and striped blue scroll box.
69
+ Chrome and Safari receive the detailed WebKit scrollbar treatment; Firefox receives the standard `scrollbar-width` and
70
+ `scrollbar-color` fallback, whose native API does not expose classic arrow buttons, bevels, or stripe images.
71
+ Material Design uses the Material 3 baseline scheme: full-radius
72
+ buttons, 4px outlined fields and menus, 8px chips, 28px dialogs, tonal surface-container overlays, inverse-surface
73
+ tooltips and toasts, and a 3px secondary focus indicator. These are original implementations written with Radiant semantic roles, Tailwind `@apply`, and catalog
59
74
  selectors; they do not copy third-party CSS.
60
75
 
61
76
  The Cloudflare theme leads with Cloudflare orange on restrained neutral layers inspired by Cloudflare Kumo. Its
62
- semantic primary role uses deeper orange `#cc3a00` in light mode and brighter orange `#ff5e1e` in dark mode. Filled
63
- primary buttons use the contrast-safe `#cc3a00` with white text in both modes. Links and focus stay blue, and warnings
64
- use a yellow amber that stays distinct from the primary.
65
- GitHub maps Primer's functional roles: green marks the primary action, blue is for links and focus, the selected tab
66
- uses Primer's coral underline, and neutral surfaces are used for secondary actions.
77
+ semantic primary role uses the same contrast-safe orange `#cc3a00` in both modes. Filled primary buttons use that
78
+ orange with white text in both modes. Links and focus stay blue, and warnings use a yellow amber that stays distinct
79
+ from the primary. Chosen options, menu items, and active navigation use Kumo's neutral grey, so they no longer use orange;
80
+ breadcrumb links are blue, dark mode uses a brighter orange for orange text, and controls are 26, 36, and 40px tall.
81
+ GitHub maps Primer's functional roles: green is limited to the primary button, the meter, and success states, blue marks links, focus, and
82
+ selected, checked, or current states, the selected tab uses Primer's coral underline, and secondary actions use
83
+ Primer's grey default button.
67
84
 
68
85
  The Vercel theme uses Background 2 for the light canvas and Background 1 for primary surfaces. Its component colors
69
86
  drive hover and active fills, Colors 4–6 drive default, hover, and active borders, and blue stays focused on links and
70
- keyboard focus. Control boundaries are strengthened for visibility. VS Code maps editor surfaces and accent states,
71
- with Dark Modern's `#0078d4` fill for dark-mode filled buttons. Button treatments vary by theme: Cloudflare uses a
72
- contrast-safe orange primary fill, while Cloudflare, GitHub, and Vercel use saturated fills with white text for
73
- dark-mode destructive buttons. Other variants follow each theme's semantic roles. These palettes adapt product cues to
87
+ keyboard focus. Control boundaries are strengthened for visibility. VS Code follows Light Modern and Dark Modern: 26px
88
+ controls with 2px corners, filled buttons in `#005fb8` (light) or `#0078d4` (dark) with white text, grey secondary
89
+ buttons for the outline variant, a 1px blue focus outline, blue menu highlights, editor-style boxed tabs with a blue top
90
+ border, and see-through square scrollbars. Button treatments vary by theme: Cloudflare uses a
91
+ contrast-safe orange primary fill, Cloudflare and Vercel use saturated fills with white text for dark-mode
92
+ destructive buttons, and GitHub uses Primer's danger button: red text on the default button face, filling red on
93
+ hover. Other variants follow each theme's semantic roles. These palettes adapt product cues to
74
94
  Radiant UI roles without reproducing the products pixel for pixel.
75
95
 
76
96
  ## Design references
@@ -27,8 +27,6 @@
27
27
  --font-weight-medium: var(--weight-medium);
28
28
  --opacity-disabled: var(--opacity-disabled);
29
29
  --opacity-muted: var(--opacity-muted);
30
- --color-primary-container: var(--primary-container);
31
- --color-on-primary-container: var(--on-primary-container);
32
30
  --color-secondary: var(--secondary);
33
31
  --color-on-secondary: var(--on-secondary);
34
32
  --color-surface: var(--surface);
@@ -248,6 +246,14 @@
248
246
  --radius-container: var(--border-radius-lg);
249
247
  --radius-pill: var(--border-radius-full);
250
248
  }
249
+ @layer components {
250
+ :root .rui-input-group .rui-input {
251
+ border-width: 0;
252
+ border-radius: 0;
253
+ background-color: transparent;
254
+ box-shadow: none;
255
+ }
256
+ }
251
257
  :where(:root) {
252
258
  color-scheme: light;
253
259
  }
@@ -296,7 +302,7 @@
296
302
  --color-cloudflare-muted-fg: oklch(72% 0 0);
297
303
  --color-cloudflare-blue: oklch(70.7% 0.165 254.624);
298
304
  --color-cloudflare-blue-bright: oklch(80% 0.13 255);
299
- --color-cloudflare-orange: #ff5e1e;
305
+ --color-cloudflare-orange: #cc3a00;
300
306
  --color-cloudflare-orange-bright: #ff8a5c;
301
307
  --color-cloudflare-orange-deep: #cc3a00;
302
308
  --color-cloudflare-orange-fill: #cc3a00;
@@ -524,7 +530,7 @@
524
530
  }
525
531
  --gray-950: var(--color-cloudflare-canvas);
526
532
  --primary: var(--color-cloudflare-orange);
527
- --on-primary: #1a1a1a;
533
+ --on-primary: white;
528
534
  --primary-light: var(--color-cloudflare-orange-bright);
529
535
  --primary-dark: var(--color-cloudflare-orange-deep);
530
536
  --primary-container: oklch(30% 0.07 55);
@@ -595,6 +601,9 @@
595
601
  --border-radius-3xl: 1.25rem;
596
602
  --radius-control: var(--border-radius-lg);
597
603
  --radius-container: var(--border-radius-xl);
604
+ --size-control-sm: 1.625rem;
605
+ --size-control-md: 2.25rem;
606
+ --size-control-lg: 2.5rem;
598
607
  }
599
608
  @layer components {
600
609
  :root .rui-button--filled {
@@ -654,6 +663,12 @@
654
663
  :root .rui-button--outline,
655
664
  :root .rui-input,
656
665
  :root .rui-textarea,
666
+ :root .rui-combobox__control,
667
+ :root .rui-date-field__group,
668
+ :root .rui-date-range-picker__group,
669
+ :root .rui-input-group,
670
+ :root .rui-number-field__group,
671
+ :root rui-date-input:where(:not([data-date-field-input], [data-range-start], [data-range-end])),
657
672
  :root .rui-select__control {
658
673
  border-color: var(--color-border);
659
674
  background-color: var(--color-surface);
@@ -669,9 +684,12 @@
669
684
  border-color: var(--rui-control-border-color);
670
685
  }
671
686
  :root .rui-dialog__surface,
672
- :root .rui-popover-host,
687
+ :root .rui-popover:where(:not(.rui-popover--listbox)),
673
688
  :root .rui-hover-card__content,
674
689
  :root .rui-select__listbox,
690
+ :root .rui-combobox__listbox,
691
+ :root .rui-menu-button__menu,
692
+ :root .rui-menubar__menu,
675
693
  :root .rui-calendar {
676
694
  border-radius: var(--radius-container);
677
695
  border-style: var(--tw-border-style);
@@ -680,6 +698,14 @@
680
698
  box-shadow: 0 0 0 1px var(--color-cloudflare-shadow-edge),
681
699
  0 4px 12px var(--color-cloudflare-shadow-drop);
682
700
  }
701
+ :root .rui-menu-button__menu,
702
+ :root .rui-menubar__menu {
703
+ --rui-menu-item-hover: var(--color-cloudflare-tint);
704
+ }
705
+ :root .rui-select__listbox .rui-listbox,
706
+ :root .rui-combobox__listbox .rui-listbox {
707
+ background-color: transparent;
708
+ }
683
709
  :root rui-tabs[variant='boxed'] {
684
710
  border-radius: var(--radius-container);
685
711
  border-style: var(--tw-border-style);
@@ -708,25 +734,41 @@
708
734
  border-bottom-color: var(--primary);
709
735
  }
710
736
  :root .rui-listbox__option[aria-selected='true'],
737
+ :root .rui-listbox__option[aria-selected='true']:focus-visible,
711
738
  :root .rui-menu-button__item[aria-checked='true'],
712
- :root .rui-sidebar__menu-button--active {
713
- background-color: var(--color-primary-container);
714
- color: var(--color-on-primary-container);
739
+ :root .rui-sidebar__menu-button[aria-current='page'],
740
+ :root .rui-sidebar__menu-button--active,
741
+ :root .rui-tree__node[aria-selected='true'],
742
+ :root .rui-treegrid__cell[aria-selected='true'] {
743
+ background-color: var(--color-cloudflare-tint);
744
+ background-image: none;
745
+ color: var(--color-cloudflare-fg);
746
+ }
747
+ :root .rui-listbox__option[aria-selected='true'][data-active]:not([aria-disabled='true']) {
748
+ --tw-ring-color: var(--rui-control-border-color);
749
+ }
750
+ :root .rui-listbox__option[aria-selected='true'] .rui-listbox__option-indicator {
751
+ color: var(--color-cloudflare-fg);
752
+ }
753
+ :root .rui-breadcrumb__link {
754
+ color: var(--link);
755
+ }
756
+ :root.dark .rui-heading__eyebrow,
757
+ :root.dark .rui-toc__link--active,
758
+ :root.dark .rui-calendar__today,
759
+ :root.dark .rui-feed__rating-stars {
760
+ color: var(--color-cloudflare-orange-bright);
715
761
  }
716
762
  :root .rui-alert {
717
763
  border-radius: var(--radius-control);
718
764
  --tw-shadow: 0 0 #0000;
719
765
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
720
766
  }
721
- :root .rui-toast__content {
767
+ :root .rui-toast {
722
768
  border-radius: var(--radius-control);
723
- border-style: var(--tw-border-style);
724
- border-width: 1px;
725
- border-color: var(--color-border);
726
- background-color: var(--color-surface);
727
- color: var(--color-on-surface);
728
769
  --tw-shadow: 0 0 #0000;
729
770
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
771
+ background-image: none;
730
772
  }
731
773
  :root .rui-separator,
732
774
  :root .rui-sidebar__separator {
@@ -27,8 +27,6 @@
27
27
  --font-weight-medium: var(--weight-medium);
28
28
  --opacity-disabled: var(--opacity-disabled);
29
29
  --opacity-muted: var(--opacity-muted);
30
- --color-primary-container: var(--primary-container);
31
- --color-on-primary-container: var(--on-primary-container);
32
30
  --color-secondary: var(--secondary);
33
31
  --color-on-secondary: var(--on-secondary);
34
32
  --color-surface: var(--surface);
@@ -248,6 +246,14 @@
248
246
  --radius-container: var(--border-radius-lg);
249
247
  --radius-pill: var(--border-radius-full);
250
248
  }
249
+ @layer components {
250
+ :root .rui-input-group .rui-input {
251
+ border-width: 0;
252
+ border-radius: 0;
253
+ background-color: transparent;
254
+ box-shadow: none;
255
+ }
256
+ }
251
257
  :where(:root) {
252
258
  color-scheme: light;
253
259
  }
@@ -296,7 +302,7 @@
296
302
  --color-cloudflare-muted-fg: oklch(72% 0 0);
297
303
  --color-cloudflare-blue: oklch(70.7% 0.165 254.624);
298
304
  --color-cloudflare-blue-bright: oklch(80% 0.13 255);
299
- --color-cloudflare-orange: #ff5e1e;
305
+ --color-cloudflare-orange: #cc3a00;
300
306
  --color-cloudflare-orange-bright: #ff8a5c;
301
307
  --color-cloudflare-orange-deep: #cc3a00;
302
308
  --color-cloudflare-orange-fill: #cc3a00;
@@ -524,7 +530,7 @@
524
530
  }
525
531
  --gray-950: var(--color-cloudflare-canvas);
526
532
  --primary: var(--color-cloudflare-orange);
527
- --on-primary: #1a1a1a;
533
+ --on-primary: white;
528
534
  --primary-light: var(--color-cloudflare-orange-bright);
529
535
  --primary-dark: var(--color-cloudflare-orange-deep);
530
536
  --primary-container: oklch(30% 0.07 55);
@@ -595,6 +601,9 @@
595
601
  --border-radius-3xl: 1.25rem;
596
602
  --radius-control: var(--border-radius-lg);
597
603
  --radius-container: var(--border-radius-xl);
604
+ --size-control-sm: 1.625rem;
605
+ --size-control-md: 2.25rem;
606
+ --size-control-lg: 2.5rem;
598
607
  }
599
608
  @layer components {
600
609
  :root .rui-button--filled {
@@ -654,6 +663,12 @@
654
663
  :root .rui-button--outline,
655
664
  :root .rui-input,
656
665
  :root .rui-textarea,
666
+ :root .rui-combobox__control,
667
+ :root .rui-date-field__group,
668
+ :root .rui-date-range-picker__group,
669
+ :root .rui-input-group,
670
+ :root .rui-number-field__group,
671
+ :root rui-date-input:where(:not([data-date-field-input], [data-range-start], [data-range-end])),
657
672
  :root .rui-select__control {
658
673
  border-color: var(--color-border);
659
674
  background-color: var(--color-surface);
@@ -669,9 +684,12 @@
669
684
  border-color: var(--rui-control-border-color);
670
685
  }
671
686
  :root .rui-dialog__surface,
672
- :root .rui-popover-host,
687
+ :root .rui-popover:where(:not(.rui-popover--listbox)),
673
688
  :root .rui-hover-card__content,
674
689
  :root .rui-select__listbox,
690
+ :root .rui-combobox__listbox,
691
+ :root .rui-menu-button__menu,
692
+ :root .rui-menubar__menu,
675
693
  :root .rui-calendar {
676
694
  border-radius: var(--radius-container);
677
695
  border-style: var(--tw-border-style);
@@ -680,6 +698,14 @@
680
698
  box-shadow: 0 0 0 1px var(--color-cloudflare-shadow-edge),
681
699
  0 4px 12px var(--color-cloudflare-shadow-drop);
682
700
  }
701
+ :root .rui-menu-button__menu,
702
+ :root .rui-menubar__menu {
703
+ --rui-menu-item-hover: var(--color-cloudflare-tint);
704
+ }
705
+ :root .rui-select__listbox .rui-listbox,
706
+ :root .rui-combobox__listbox .rui-listbox {
707
+ background-color: transparent;
708
+ }
683
709
  :root rui-tabs[variant='boxed'] {
684
710
  border-radius: var(--radius-container);
685
711
  border-style: var(--tw-border-style);
@@ -708,25 +734,41 @@
708
734
  border-bottom-color: var(--primary);
709
735
  }
710
736
  :root .rui-listbox__option[aria-selected='true'],
737
+ :root .rui-listbox__option[aria-selected='true']:focus-visible,
711
738
  :root .rui-menu-button__item[aria-checked='true'],
712
- :root .rui-sidebar__menu-button--active {
713
- background-color: var(--color-primary-container);
714
- color: var(--color-on-primary-container);
739
+ :root .rui-sidebar__menu-button[aria-current='page'],
740
+ :root .rui-sidebar__menu-button--active,
741
+ :root .rui-tree__node[aria-selected='true'],
742
+ :root .rui-treegrid__cell[aria-selected='true'] {
743
+ background-color: var(--color-cloudflare-tint);
744
+ background-image: none;
745
+ color: var(--color-cloudflare-fg);
746
+ }
747
+ :root .rui-listbox__option[aria-selected='true'][data-active]:not([aria-disabled='true']) {
748
+ --tw-ring-color: var(--rui-control-border-color);
749
+ }
750
+ :root .rui-listbox__option[aria-selected='true'] .rui-listbox__option-indicator {
751
+ color: var(--color-cloudflare-fg);
752
+ }
753
+ :root .rui-breadcrumb__link {
754
+ color: var(--link);
755
+ }
756
+ :root.dark .rui-heading__eyebrow,
757
+ :root.dark .rui-toc__link--active,
758
+ :root.dark .rui-calendar__today,
759
+ :root.dark .rui-feed__rating-stars {
760
+ color: var(--color-cloudflare-orange-bright);
715
761
  }
716
762
  :root .rui-alert {
717
763
  border-radius: var(--radius-control);
718
764
  --tw-shadow: 0 0 #0000;
719
765
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
720
766
  }
721
- :root .rui-toast__content {
767
+ :root .rui-toast {
722
768
  border-radius: var(--radius-control);
723
- border-style: var(--tw-border-style);
724
- border-width: 1px;
725
- border-color: var(--color-border);
726
- background-color: var(--color-surface);
727
- color: var(--color-on-surface);
728
769
  --tw-shadow: 0 0 #0000;
729
770
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
771
+ background-image: none;
730
772
  }
731
773
  :root .rui-separator,
732
774
  :root .rui-sidebar__separator {