@apliteni/apliteni-ui 0.6.0 → 0.6.1
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/package.json +1 -1
- package/src/components/topbar.js +3 -1
- package/src/styles/topbar.css +8 -11
package/package.json
CHANGED
package/src/components/topbar.js
CHANGED
|
@@ -8,7 +8,9 @@ import { wireDropdown } from './dropdown.js';
|
|
|
8
8
|
const THEME_KEY = 'apliteni-strategy-theme';
|
|
9
9
|
|
|
10
10
|
export function themeToggle() {
|
|
11
|
-
|
|
11
|
+
// Single icon-only switch (sun in dark, moon in light). Icon pre-filled so it
|
|
12
|
+
// renders before applyTheme() runs; aria-label carries the accessible name.
|
|
13
|
+
return `<button class="toggle" data-theme-toggle aria-label="Toggle theme" title="Toggle light / dark"><span class="ic" data-theme-icon>${sun}</span></button>`;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
export function deckTextSwitch(active = 'deck') {
|
package/src/styles/topbar.css
CHANGED
|
@@ -64,24 +64,21 @@
|
|
|
64
64
|
.dtsw a:hover { color: var(--text); }
|
|
65
65
|
.dtsw a.cur { color: var(--strong); background: var(--surface); box-shadow: var(--shadow-sm); }
|
|
66
66
|
|
|
67
|
-
/* Theme toggle */
|
|
67
|
+
/* Theme toggle — a single icon-only switch (no label). */
|
|
68
68
|
.toggle {
|
|
69
|
-
display: inline-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
display: inline-grid;
|
|
70
|
+
place-items: center;
|
|
71
|
+
width: 34px;
|
|
72
|
+
height: 34px;
|
|
72
73
|
cursor: pointer;
|
|
73
74
|
background: var(--surface);
|
|
74
75
|
color: var(--text);
|
|
75
76
|
border: 1px solid var(--border);
|
|
76
|
-
border-radius:
|
|
77
|
-
padding: 7px 12px;
|
|
78
|
-
font-family: var(--font-sans);
|
|
79
|
-
font-size: 12px;
|
|
80
|
-
font-weight: 500;
|
|
77
|
+
border-radius: 10px;
|
|
81
78
|
transition: transform 0.15s ease, background 0.35s ease, border-color 0.35s ease;
|
|
82
79
|
}
|
|
83
|
-
.toggle:hover { transform: translateY(-1px); }
|
|
84
|
-
.toggle .ic { width:
|
|
80
|
+
.toggle:hover { transform: translateY(-1px); border-color: var(--border-strong); }
|
|
81
|
+
.toggle .ic { width: 17px; height: 17px; display: inline-block; color: var(--accent); }
|
|
85
82
|
.toggle .ic svg { display: block; width: 100%; height: 100%; }
|
|
86
83
|
|
|
87
84
|
/* Version switcher */
|