@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/README.md +47 -34
- package/dist/{chunk-RZXHZWUB.mjs → chunk-VFTZXPXM.mjs} +30 -143
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -143
- package/dist/index.mjs +1 -1
- package/dist/suite.d.mts +19 -14
- package/dist/suite.d.ts +19 -14
- package/dist/suite.js +168 -96
- package/dist/suite.mjs +168 -96
- package/dist/ui.js +30 -143
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
- package/src/app/globals.css +1 -0
- package/src/components/ui/ThemeSwitcher.tsx +12 -3
- package/src/styles/suite-skin.css +71 -1
- package/src/styles/themes.css +445 -1656
- package/src/suite/components/suite-app-layout.tsx +31 -10
- package/src/suite/components/suite-sidebar.tsx +50 -42
- package/src/suite/components/suite-user-menu.tsx +48 -26
- package/src/suite/components/today-page-frame.tsx +1 -1
- package/src/suite/icons/app-accents.ts +38 -43
- package/src/suite/icons/glyph-parts.tsx +16 -9
- package/src/suite/icons/glyphs.ts +130 -99
- package/src/suite/lib/apps.ts +1 -1
- package/src/suite/lib/use-sidebar-width.ts +23 -8
package/dist/ui.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenide-io/the-old-ui-theme",
|
|
3
|
-
"version": "0.5.
|
|
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",
|
package/src/app/globals.css
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
|
-
import {
|
|
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>(
|
|
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">
|
|
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
|
|
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
|
}
|