@xenide-io/the-old-ui-theme 0.5.2 → 0.5.3

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.
package/dist/ui.mjs CHANGED
@@ -108,7 +108,7 @@ import {
108
108
  ToggleButton,
109
109
  ToggleGroup,
110
110
  Widget
111
- } from "./chunk-RZXHZWUB.mjs";
111
+ } from "./chunk-VFTZXPXM.mjs";
112
112
  import {
113
113
  ButtonChrome,
114
114
  DropdownButton,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenide-io/the-old-ui-theme",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Props-driven React components and theme tokens inspired by classic interface design \u2014 optimized for Next.js apps and internal tools.",
5
5
  "author": "Xenide",
6
6
  "license": "MIT",
@@ -1,5 +1,6 @@
1
1
  @import "../styles/themes.css";
2
2
  @import "../styles/typography.css";
3
+ @import "../styles/suite-skin.css";
3
4
 
4
5
  @tailwind base;
5
6
  @tailwind components;
@@ -1,7 +1,14 @@
1
1
  "use client";
2
2
 
3
3
  import { useEffect, useState } from "react";
4
- import { persistTheme, readStoredTheme, THEME_GROUPS, THEMES, type ThemeId } from "@/themes";
4
+ import {
5
+ DEFAULT_THEME_ID,
6
+ persistTheme,
7
+ readStoredTheme,
8
+ THEME_GROUPS,
9
+ THEMES,
10
+ type ThemeId,
11
+ } from "@/themes";
5
12
  import { cn } from "@/lib/cn";
6
13
 
7
14
  export interface ThemeSwitcherProps {
@@ -10,7 +17,7 @@ export interface ThemeSwitcherProps {
10
17
 
11
18
  /** Colour-only theme picker — persists to localStorage and sets html[data-theme]. */
12
19
  export function ThemeSwitcher({ className }: ThemeSwitcherProps) {
13
- const [themeId, setThemeId] = useState<ThemeId>("hedgehog-light");
20
+ const [themeId, setThemeId] = useState<ThemeId>(DEFAULT_THEME_ID);
14
21
 
15
22
  useEffect(() => {
16
23
  const id = readStoredTheme() as ThemeId;
@@ -20,7 +27,9 @@ export function ThemeSwitcher({ className }: ThemeSwitcherProps) {
20
27
 
21
28
  return (
22
29
  <label className={cn("flex min-w-0 items-center gap-2", className)}>
23
- <span className="shrink-0 text-xs font-medium text-ph-mutedtext sm:text-sm">Theme</span>
30
+ <span className="shrink-0 text-xs font-medium text-ph-mutedtext sm:text-sm">
31
+ Theme
32
+ </span>
24
33
  <select
25
34
  className="ph-select max-w-[11rem] !min-h-[2rem] py-1 pl-2.5 pr-8 text-xs sm:max-w-[14rem] sm:text-sm"
26
35
  value={themeId}
@@ -51,6 +51,76 @@ body {
51
51
  -webkit-font-smoothing: antialiased;
52
52
  }
53
53
 
54
+ /* Shared app canvas. Dense workspaces do not paint a decorative background. */
55
+ .suite-app-layout {
56
+ background: var(--ph-canvas);
57
+ }
58
+
59
+ .suite-app-layout > aside {
60
+ display: none;
61
+ }
62
+
63
+ @media (min-width: 64rem) {
64
+ .suite-app-layout > aside {
65
+ display: flex;
66
+ }
67
+ }
68
+
69
+ .suite-app-layout > aside {
70
+ position: relative;
71
+ z-index: 2;
72
+ }
73
+
74
+ .suite-app-layout > div {
75
+ position: relative;
76
+ z-index: 1;
77
+ }
78
+
79
+ .suite-app-layout__main {
80
+ background: color-mix(in oklab, var(--ph-canvas) 94%, transparent);
81
+ }
82
+
83
+ /* The demo intentionally renders a large component catalogue. Let the
84
+ browser skip layout and paint for sections outside the viewport while
85
+ preserving their anchors for sidebar navigation. */
86
+ .suite-app-layout__main > div > div > * {
87
+ content-visibility: auto;
88
+ contain-intrinsic-size: 0 560px;
89
+ }
90
+
91
+ @media print {
92
+ .suite-app-layout__main > div > div > * {
93
+ content-visibility: visible;
94
+ }
95
+ }
96
+
97
+ .suite-app-layout aside [data-test="nav-link"] {
98
+ position: relative;
99
+ transition:
100
+ color 160ms ease,
101
+ background-color 160ms ease,
102
+ box-shadow 160ms ease;
103
+ }
104
+
105
+ .suite-app-layout aside [data-test="nav-link"][aria-current="page"] {
106
+ background: linear-gradient(
107
+ 90deg,
108
+ color-mix(in oklab, var(--ph-accent) 14%, var(--ph-muted)),
109
+ color-mix(in oklab, var(--ph-muted) 60%, transparent)
110
+ );
111
+ box-shadow: inset 2px 0 0 var(--ph-accent);
112
+ }
113
+
114
+ .suite-app-layout aside [data-test="nav-link"][aria-current="page"] svg {
115
+ color: var(--ph-accent);
116
+ }
117
+
118
+ @supports not (background: color-mix(in oklab, white, transparent)) {
119
+ .suite-app-layout__main {
120
+ background: var(--ph-canvas);
121
+ }
122
+ }
123
+
54
124
  /* Shared page inset — SuitePage + TodayPageFrame (one source of truth). */
55
125
  .suite-page-inset {
56
126
  padding-left: var(--suite-page-pad-x);
@@ -95,7 +165,7 @@ body {
95
165
  }
96
166
  }
97
167
 
98
- /* Today atmosphere — shared geometry, colours supplied by each app theme. */
168
+ /* Today visual treatment — shared geometry, colours supplied by each app theme. */
99
169
  .today-page-frame {
100
170
  background-color: var(--ph-canvas);
101
171
  }