@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
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
export type SuiteGlyphElement =
|
|
16
16
|
| {
|
|
17
|
-
kind:
|
|
17
|
+
kind: "path";
|
|
18
18
|
d: string;
|
|
19
19
|
accent?: boolean;
|
|
20
20
|
filled?: boolean;
|
|
21
|
+
transform?: string;
|
|
21
22
|
}
|
|
22
23
|
| {
|
|
23
|
-
kind:
|
|
24
|
+
kind: "circle";
|
|
24
25
|
cx: number;
|
|
25
26
|
cy: number;
|
|
26
27
|
r: number;
|
|
@@ -28,7 +29,7 @@ export type SuiteGlyphElement =
|
|
|
28
29
|
filled?: boolean;
|
|
29
30
|
}
|
|
30
31
|
| {
|
|
31
|
-
kind:
|
|
32
|
+
kind: "rect";
|
|
32
33
|
x: number;
|
|
33
34
|
y: number;
|
|
34
35
|
width: number;
|
|
@@ -50,120 +51,147 @@ export interface SuiteGlyph {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
export type SuiteIconName =
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
54
|
+
| "timer-shell"
|
|
55
|
+
| "kanban-wave"
|
|
56
|
+
| "squid-doc"
|
|
57
|
+
| "stack-hex"
|
|
58
|
+
| "crew-bot"
|
|
59
|
+
| "nakama-fist"
|
|
60
|
+
| "workspace"
|
|
61
|
+
| "organisation"
|
|
62
|
+
| "integration-plug"
|
|
63
|
+
| "suite-grid"
|
|
64
|
+
| "bell-wave"
|
|
65
|
+
| "today-sun";
|
|
64
66
|
|
|
65
67
|
export const SUITE_GLYPHS: Record<SuiteIconName, SuiteGlyph> = {
|
|
66
|
-
|
|
67
|
-
description:
|
|
68
|
+
"timer-shell": {
|
|
69
|
+
description: "TurtleTime — turtle-shell dome holding clock hands",
|
|
68
70
|
elements: [
|
|
69
|
-
{ kind:
|
|
70
|
-
{ kind:
|
|
71
|
-
{ kind:
|
|
72
|
-
{ kind:
|
|
73
|
-
{ kind:
|
|
71
|
+
{ kind: "path", d: "M3 17h18" },
|
|
72
|
+
{ kind: "path", d: "M6.5 17a5.5 5.5 0 0 1 11 0" },
|
|
73
|
+
{ kind: "circle", cx: 4, cy: 15.3, r: 1.5 },
|
|
74
|
+
{ kind: "path", d: "M12 17v-3.4", accent: true },
|
|
75
|
+
{ kind: "path", d: "M12 17l2.4-1.4", accent: true },
|
|
74
76
|
],
|
|
75
77
|
},
|
|
76
|
-
|
|
77
|
-
description:
|
|
78
|
+
"kanban-wave": {
|
|
79
|
+
description: "Tides — three kanban bars riding a wave",
|
|
78
80
|
elements: [
|
|
79
|
-
{ kind:
|
|
80
|
-
{ kind:
|
|
81
|
-
{ kind:
|
|
81
|
+
{ kind: "rect", x: 5.5, y: 8, width: 3, height: 8, rx: 1.5 },
|
|
82
|
+
{ kind: "rect", x: 10.5, y: 5.5, width: 3, height: 10.5, rx: 1.5 },
|
|
83
|
+
{ kind: "rect", x: 15.5, y: 9.5, width: 3, height: 6.5, rx: 1.5 },
|
|
82
84
|
{
|
|
83
|
-
kind:
|
|
84
|
-
d:
|
|
85
|
+
kind: "path",
|
|
86
|
+
d: "M3 19.5q2.25-2.4 4.5 0t4.5 0t4.5 0t4.5 0",
|
|
85
87
|
accent: true,
|
|
86
88
|
},
|
|
87
89
|
],
|
|
88
90
|
},
|
|
89
|
-
|
|
90
|
-
description:
|
|
91
|
+
"squid-doc": {
|
|
92
|
+
description: "Kraken — squid with a pen-nib centre tentacle",
|
|
91
93
|
elements: [
|
|
92
94
|
{
|
|
93
|
-
kind:
|
|
94
|
-
d:
|
|
95
|
+
kind: "path",
|
|
96
|
+
d: "M12 3.2c2.7 2.3 4.2 5.3 4.2 9.3H7.8c0-4 1.5-7 4.2-9.3Z",
|
|
95
97
|
},
|
|
96
|
-
{ kind:
|
|
97
|
-
{ kind:
|
|
98
|
-
{ kind:
|
|
99
|
-
{ kind:
|
|
100
|
-
{ kind:
|
|
98
|
+
{ kind: "circle", cx: 10.1, cy: 9, r: 0.9, filled: true },
|
|
99
|
+
{ kind: "circle", cx: 13.9, cy: 9, r: 0.9, filled: true },
|
|
100
|
+
{ kind: "path", d: "M9.4 12.4v4.8q0 2.3-2.3 2.3" },
|
|
101
|
+
{ kind: "path", d: "M14.6 12.4v4.8q0 2.3 2.3 2.3" },
|
|
102
|
+
{ kind: "path", d: "M12 12.4v7.1", accent: true },
|
|
101
103
|
],
|
|
102
104
|
},
|
|
103
|
-
|
|
104
|
-
description:
|
|
105
|
+
"stack-hex": {
|
|
106
|
+
description: "ShellStack — hexagon with the resolving spiral",
|
|
105
107
|
elements: [
|
|
106
|
-
{ kind:
|
|
107
|
-
{ kind:
|
|
108
|
+
{ kind: "path", d: "M18 12l-3 5.2H9l-3-5.2 3-5.2h6Z" },
|
|
109
|
+
{ kind: "path", d: "M14.2 9.3H9.8v5.4h4.4v-2.7h-2.2", accent: true },
|
|
108
110
|
],
|
|
109
111
|
},
|
|
110
|
-
|
|
111
|
-
description:
|
|
112
|
+
"crew-bot": {
|
|
113
|
+
description: "Crew — friendly robot head with antenna and smile",
|
|
112
114
|
elements: [
|
|
113
|
-
{ kind:
|
|
114
|
-
{ kind:
|
|
115
|
-
{ kind:
|
|
116
|
-
{ kind:
|
|
117
|
-
{ kind:
|
|
118
|
-
{ kind:
|
|
119
|
-
{ kind:
|
|
120
|
-
{ kind:
|
|
115
|
+
{ kind: "path", d: "M12 7.5V5" },
|
|
116
|
+
{ kind: "circle", cx: 12, cy: 4, r: 1, filled: true },
|
|
117
|
+
{ kind: "rect", x: 5, y: 8, width: 14, height: 9.5, rx: 3 },
|
|
118
|
+
{ kind: "path", d: "M5 11.8H3.4" },
|
|
119
|
+
{ kind: "path", d: "M19 11.8h1.6" },
|
|
120
|
+
{ kind: "circle", cx: 9.2, cy: 11.8, r: 1, filled: true },
|
|
121
|
+
{ kind: "circle", cx: 14.8, cy: 11.8, r: 1, filled: true },
|
|
122
|
+
{ kind: "path", d: "M9.6 14.6q2.4 1.7 4.8 0", accent: true },
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
"nakama-fist": {
|
|
126
|
+
description: "Nakama — raised fist with neon crew signal lines",
|
|
127
|
+
elements: [
|
|
128
|
+
{
|
|
129
|
+
kind: "path",
|
|
130
|
+
d: "M192 0c17.7 0 32 14.3 32 32v112h-64V32c0-17.7 14.3-32 32-32zM64 64c0-17.7-32-32 32-32s32 14.3 32 32v80H64V64zm192 0c0-17.7 14.3-32 32-32s32 14.3 32 32v96c0 17.7-14.3 32-32 32s-32-14.3-32-32V64zm96 64c0-17.7 14.3-32 32-32s32 14.3 32 32v64c0 17.7-14.3 32-32 32s-32-14.3-32-32v-64zm-96 88v-.6c9.4 5.4 20.3 8.6 32 8.6 13.2 0 25.4-4 35.6-10.8 8.7 24.9 32.5 42.8 60.4 42.8 11.7 0 22.6-3.1 32-8.6v8.6c0 52.3-25.1 98.8-64 128v96c0 17.7-14.3 32-32 32H160c-17.7 0-32-14.3-32-32v-78.4c-17.3-7.9-33.2-18.8-46.9-32.5L69.5 357.5C45.5 333.5 32 300.9 32 267v-27c0-35.3 28.7-64 64-64h88c22.1 0 40 17.9 40 40s-17.9 40-40 40h-56c-8.8 0-16 7.2-16 16s7.2 16 16 16h56c39.8 0 72-32.2 72-72z",
|
|
131
|
+
filled: true,
|
|
132
|
+
transform: "translate(2.5 1.75) scale(.0425 .0375)",
|
|
133
|
+
},
|
|
134
|
+
{ kind: "path", d: "M7 18h3.5M12.2 18h3M8.5 19.5h6", accent: true },
|
|
135
|
+
{
|
|
136
|
+
kind: "path",
|
|
137
|
+
d: "M4.8 5.8h2.7M4.8 7.4h1.4M18.5 17.1h1.7",
|
|
138
|
+
accent: true,
|
|
139
|
+
},
|
|
140
|
+
{ kind: "circle", cx: 18.5, cy: 4.5, r: 0.8, accent: true, filled: true },
|
|
121
141
|
],
|
|
122
142
|
},
|
|
123
143
|
workspace: {
|
|
124
|
-
description:
|
|
144
|
+
description: "Workspace container — panel with header bar and content",
|
|
125
145
|
elements: [
|
|
126
|
-
{ kind:
|
|
127
|
-
{ kind:
|
|
128
|
-
{ kind:
|
|
129
|
-
{ kind:
|
|
130
|
-
{ kind:
|
|
146
|
+
{ kind: "rect", x: 3.5, y: 4.5, width: 17, height: 15, rx: 2.5 },
|
|
147
|
+
{ kind: "path", d: "M3.5 8.7h17" },
|
|
148
|
+
{ kind: "circle", cx: 6.2, cy: 6.6, r: 0.9, accent: true, filled: true },
|
|
149
|
+
{ kind: "path", d: "M6.4 12.2h7" },
|
|
150
|
+
{ kind: "path", d: "M6.4 15.4h10.5" },
|
|
131
151
|
],
|
|
132
152
|
},
|
|
133
153
|
organisation: {
|
|
134
|
-
description:
|
|
154
|
+
description: "Organisation chart — root node with two members",
|
|
135
155
|
elements: [
|
|
136
|
-
{
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
156
|
+
{
|
|
157
|
+
kind: "rect",
|
|
158
|
+
x: 9.5,
|
|
159
|
+
y: 3.5,
|
|
160
|
+
width: 5,
|
|
161
|
+
height: 5,
|
|
162
|
+
rx: 1.4,
|
|
163
|
+
accent: true,
|
|
164
|
+
},
|
|
165
|
+
{ kind: "path", d: "M12 8.5v2.5" },
|
|
166
|
+
{ kind: "path", d: "M6.75 13.5v-2.5h10.5v2.5" },
|
|
167
|
+
{ kind: "rect", x: 4.25, y: 13.5, width: 5, height: 5, rx: 1.4 },
|
|
168
|
+
{ kind: "rect", x: 14.75, y: 13.5, width: 5, height: 5, rx: 1.4 },
|
|
141
169
|
],
|
|
142
170
|
},
|
|
143
|
-
|
|
144
|
-
description:
|
|
171
|
+
"integration-plug": {
|
|
172
|
+
description: "Integration — two plug halves meeting under a spark",
|
|
145
173
|
elements: [
|
|
146
|
-
{ kind:
|
|
147
|
-
{ kind:
|
|
148
|
-
{ kind:
|
|
149
|
-
{ kind:
|
|
150
|
-
{ kind:
|
|
151
|
-
{ kind:
|
|
152
|
-
{ kind:
|
|
153
|
-
{ kind:
|
|
154
|
-
{ kind:
|
|
155
|
-
{ kind:
|
|
156
|
-
{ kind:
|
|
174
|
+
{ kind: "rect", x: 3.2, y: 9.8, width: 5.6, height: 4.6, rx: 1.4 },
|
|
175
|
+
{ kind: "path", d: "M8.8 11h2.4" },
|
|
176
|
+
{ kind: "path", d: "M8.8 13.2h2.4" },
|
|
177
|
+
{ kind: "rect", x: 15.2, y: 9.8, width: 5.6, height: 4.6, rx: 1.4 },
|
|
178
|
+
{ kind: "path", d: "M15.2 11h-2.4" },
|
|
179
|
+
{ kind: "path", d: "M15.2 13.2h-2.4" },
|
|
180
|
+
{ kind: "path", d: "M6 14.4v2q0 1.4-1.4 1.4H3.4" },
|
|
181
|
+
{ kind: "path", d: "M18 14.4v2q0 1.4 1.4 1.4h1.2" },
|
|
182
|
+
{ kind: "path", d: "M12 4.4v2.4", accent: true },
|
|
183
|
+
{ kind: "path", d: "M10.4 5l3.2 1.2", accent: true },
|
|
184
|
+
{ kind: "path", d: "M13.6 5l-3.2 1.2", accent: true },
|
|
157
185
|
],
|
|
158
186
|
},
|
|
159
|
-
|
|
160
|
-
description:
|
|
187
|
+
"suite-grid": {
|
|
188
|
+
description: "Suite app switcher — four tiles, the active app filled",
|
|
161
189
|
elements: [
|
|
162
|
-
{ kind:
|
|
163
|
-
{ kind:
|
|
164
|
-
{ kind:
|
|
190
|
+
{ kind: "rect", x: 4, y: 4, width: 7, height: 7, rx: 2 },
|
|
191
|
+
{ kind: "rect", x: 13, y: 4, width: 7, height: 7, rx: 2 },
|
|
192
|
+
{ kind: "rect", x: 4, y: 13, width: 7, height: 7, rx: 2 },
|
|
165
193
|
{
|
|
166
|
-
kind:
|
|
194
|
+
kind: "rect",
|
|
167
195
|
x: 13,
|
|
168
196
|
y: 13,
|
|
169
197
|
width: 7,
|
|
@@ -174,28 +202,31 @@ export const SUITE_GLYPHS: Record<SuiteIconName, SuiteGlyph> = {
|
|
|
174
202
|
},
|
|
175
203
|
],
|
|
176
204
|
},
|
|
177
|
-
|
|
178
|
-
description:
|
|
205
|
+
"bell-wave": {
|
|
206
|
+
description: "Notifications — bell with sound waves",
|
|
179
207
|
elements: [
|
|
180
|
-
{
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
208
|
+
{
|
|
209
|
+
kind: "path",
|
|
210
|
+
d: "M7 9.2a5 5 0 0 1 10 0c0 5.3 2.4 7.3 2.4 7.3H4.6S7 14.5 7 9.2",
|
|
211
|
+
},
|
|
212
|
+
{ kind: "path", d: "M10.7 19.3a1.5 1.5 0 0 0 2.6 0" },
|
|
213
|
+
{ kind: "path", d: "M17.9 6.4a5.5 5.5 0 0 1 1.4 3.7", accent: true },
|
|
214
|
+
{ kind: "path", d: "M15.7 4a9.4 9.4 0 0 1 2.4 6", accent: true },
|
|
184
215
|
],
|
|
185
216
|
},
|
|
186
|
-
|
|
187
|
-
description:
|
|
217
|
+
"today-sun": {
|
|
218
|
+
description: "Today — sun with slowly turning rays (motion-safe)",
|
|
188
219
|
animatedAccent: true,
|
|
189
220
|
elements: [
|
|
190
|
-
{ kind:
|
|
191
|
-
{ kind:
|
|
192
|
-
{ kind:
|
|
193
|
-
{ kind:
|
|
194
|
-
{ kind:
|
|
195
|
-
{ kind:
|
|
196
|
-
{ kind:
|
|
197
|
-
{ kind:
|
|
198
|
-
{ kind:
|
|
221
|
+
{ kind: "circle", cx: 12, cy: 12, r: 4 },
|
|
222
|
+
{ kind: "path", d: "M12 2.8v2.4", accent: true },
|
|
223
|
+
{ kind: "path", d: "M12 18.8v2.4", accent: true },
|
|
224
|
+
{ kind: "path", d: "M2.8 12h2.4", accent: true },
|
|
225
|
+
{ kind: "path", d: "M18.8 12h2.4", accent: true },
|
|
226
|
+
{ kind: "path", d: "M5.5 5.5l1.7 1.7", accent: true },
|
|
227
|
+
{ kind: "path", d: "M16.8 16.8l1.7 1.7", accent: true },
|
|
228
|
+
{ kind: "path", d: "M5.5 18.5l1.7-1.7", accent: true },
|
|
229
|
+
{ kind: "path", d: "M16.8 7.2l1.7-1.7", accent: true },
|
|
199
230
|
],
|
|
200
231
|
},
|
|
201
232
|
};
|
package/src/suite/lib/apps.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface SuiteAppDefinition {
|
|
|
16
16
|
slug: SuiteAppSlug;
|
|
17
17
|
name: string;
|
|
18
18
|
description: string;
|
|
19
|
-
/** Public asset path — every app hosts
|
|
19
|
+
/** Public asset path — every app hosts its suite icon. */
|
|
20
20
|
icon: string;
|
|
21
21
|
/** Landing route used after cross-app SSO redirect. */
|
|
22
22
|
landing: string;
|
|
@@ -27,8 +27,12 @@ function snapWidth(width: number): number {
|
|
|
27
27
|
* Shared suite sidebar resizing: drag below the threshold to collapse,
|
|
28
28
|
* drag the rail edge out to expand, and double-click to reset.
|
|
29
29
|
*/
|
|
30
|
-
export function useSidebarWidth(
|
|
31
|
-
|
|
30
|
+
export function useSidebarWidth(
|
|
31
|
+
storageKey: string,
|
|
32
|
+
defaultWidth = SIDEBAR_DEFAULT_WIDTH,
|
|
33
|
+
) {
|
|
34
|
+
const fallbackWidth = snapWidth(clampWidth(defaultWidth));
|
|
35
|
+
const [width, setWidth] = useState(fallbackWidth);
|
|
32
36
|
const [narrowViewport, setNarrowViewport] = useState(false);
|
|
33
37
|
const collapsed = narrowViewport || width <= SIDEBAR_COLLAPSE_THRESHOLD;
|
|
34
38
|
|
|
@@ -71,19 +75,19 @@ export function useSidebarWidth(storageKey: string) {
|
|
|
71
75
|
const next = value
|
|
72
76
|
? SIDEBAR_RAIL_WIDTH
|
|
73
77
|
: current <= SIDEBAR_COLLAPSE_THRESHOLD
|
|
74
|
-
?
|
|
78
|
+
? fallbackWidth
|
|
75
79
|
: snapWidth(current);
|
|
76
80
|
persist(next);
|
|
77
81
|
return next;
|
|
78
82
|
});
|
|
79
83
|
},
|
|
80
|
-
[persist],
|
|
84
|
+
[fallbackWidth, persist],
|
|
81
85
|
);
|
|
82
86
|
|
|
83
87
|
const resetWidth = useCallback(() => {
|
|
84
|
-
setWidth(
|
|
85
|
-
persist(
|
|
86
|
-
}, [persist]);
|
|
88
|
+
setWidth(fallbackWidth);
|
|
89
|
+
persist(fallbackWidth);
|
|
90
|
+
}, [fallbackWidth, persist]);
|
|
87
91
|
|
|
88
92
|
const startResize = useCallback(
|
|
89
93
|
(event: ReactPointerEvent<HTMLDivElement>) => {
|
|
@@ -110,5 +114,16 @@ export function useSidebarWidth(storageKey: string) {
|
|
|
110
114
|
[persist, width],
|
|
111
115
|
);
|
|
112
116
|
|
|
113
|
-
|
|
117
|
+
const resizeBy = useCallback(
|
|
118
|
+
(delta: number) => {
|
|
119
|
+
setWidth((current) => {
|
|
120
|
+
const next = clampWidth(current + delta);
|
|
121
|
+
persist(next);
|
|
122
|
+
return next;
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
[persist],
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
return { width, collapsed, setCollapsed, resetWidth, startResize, resizeBy };
|
|
114
129
|
}
|