anentrypoint-design 0.0.153 → 0.0.155
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/colors_and_type.css +4 -4
- package/dist/247420.css +4 -4
- package/dist/247420.js +9 -9
- package/package.json +1 -1
- package/src/components/shell.js +1 -1
- package/src/components/theme-toggle.js +6 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anentrypoint-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.155",
|
|
4
4
|
"description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/247420.js",
|
package/src/components/shell.js
CHANGED
|
@@ -120,7 +120,7 @@ export function Crumb({ trail = [], leaf = '', right } = {}) {
|
|
|
120
120
|
const parts = [];
|
|
121
121
|
trail.forEach((t, i) => {
|
|
122
122
|
parts.push(h('span', { key: 't' + i }, t));
|
|
123
|
-
parts.push(h('span', { key: 's' + i, class: 'sep' }, '
|
|
123
|
+
parts.push(h('span', { key: 's' + i, class: 'sep' }, '/'));
|
|
124
124
|
});
|
|
125
125
|
parts.push(h('span', { key: 'leaf', class: 'leaf' }, leaf));
|
|
126
126
|
if (right) parts.push(h('span', { key: 'r', class: 'crumb-right' }, ...(Array.isArray(right) ? right : [right])));
|
|
@@ -14,9 +14,9 @@ import { applyTheme, getTheme, resolvedTheme, onThemeChange } from '../theme.js'
|
|
|
14
14
|
const h = webjsx.createElement;
|
|
15
15
|
|
|
16
16
|
const MODES = [
|
|
17
|
-
['auto', '
|
|
18
|
-
['paper', '
|
|
19
|
-
['ink', '
|
|
17
|
+
['auto', 'auto'],
|
|
18
|
+
['paper', 'light'],
|
|
19
|
+
['ink', 'dark'],
|
|
20
20
|
];
|
|
21
21
|
|
|
22
22
|
// Track instances so an OS-theme change while in 'auto' re-renders the
|
|
@@ -35,7 +35,6 @@ export function ThemeToggle({ compact = false, onChange } = {}) {
|
|
|
35
35
|
|
|
36
36
|
if (compact) {
|
|
37
37
|
const resolved = resolvedTheme();
|
|
38
|
-
const glyph = current === 'auto' ? '⌗' : (resolved === 'ink' ? '☾' : '☀');
|
|
39
38
|
const label = current === 'auto' ? `auto (${resolved})` : (current === 'ink' ? 'dark' : 'light');
|
|
40
39
|
return h('button', {
|
|
41
40
|
class: 'btn ds-theme-toggle',
|
|
@@ -47,14 +46,14 @@ export function ThemeToggle({ compact = false, onChange } = {}) {
|
|
|
47
46
|
applyTheme(next);
|
|
48
47
|
if (onChange) try { onChange(next); } catch {}
|
|
49
48
|
}
|
|
50
|
-
},
|
|
49
|
+
}, label);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
return h('div', {
|
|
54
53
|
class: 'ds-theme-toggle ds-segmented',
|
|
55
54
|
role: 'radiogroup',
|
|
56
55
|
'aria-label': 'theme'
|
|
57
|
-
}, ...MODES.map(([mode,
|
|
56
|
+
}, ...MODES.map(([mode, label]) =>
|
|
58
57
|
h('button', {
|
|
59
58
|
key: mode,
|
|
60
59
|
type: 'button',
|
|
@@ -65,6 +64,6 @@ export function ThemeToggle({ compact = false, onChange } = {}) {
|
|
|
65
64
|
applyTheme(mode);
|
|
66
65
|
if (onChange) try { onChange(mode); } catch {}
|
|
67
66
|
}
|
|
68
|
-
},
|
|
67
|
+
}, label)
|
|
69
68
|
));
|
|
70
69
|
}
|