@celestia-island/hikari 0.40.21 → 0.40.22
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
CHANGED
|
@@ -47,9 +47,24 @@
|
|
|
47
47
|
flex-direction: column;
|
|
48
48
|
gap: var(--space-4, 0.25rem);
|
|
49
49
|
min-width: 13rem;
|
|
50
|
+
max-width: 22rem;
|
|
50
51
|
padding: var(--space-8, 0.5rem);
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
/*
|
|
55
|
+
* The anchored popover panel is shrink-to-fit (width: max-content, #421),
|
|
56
|
+
* so any long-form prose in a host slot (mode-extra hint paragraphs) would
|
|
57
|
+
* otherwise set the panel's PREFERRED width — the menu once opened at the
|
|
58
|
+
* hint's single-line ideal width (~870px), stretching the segmented mode
|
|
59
|
+
* group full-bleed and leaving a wide void right of every row. The cap
|
|
60
|
+
* above clamps the menu's max-content contribution instead. The sheet
|
|
61
|
+
* branch is excluded: it stretches to the viewport by design, and its
|
|
62
|
+
* width never derives from content.
|
|
63
|
+
*/
|
|
64
|
+
.hk-popover-panel.hk-is-sheet .s-theme-menu {
|
|
65
|
+
max-width: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
53
68
|
.s-theme-menu-label {
|
|
54
69
|
font-size: var(--text-xs, 0.75rem);
|
|
55
70
|
font-weight: 600;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, defineComponent, onUnmounted, ref, watch, type PropType } from "vue";
|
|
2
|
-
import { Check, ChevronDown, Monitor,
|
|
2
|
+
import { Check, ChevronDown, Monitor, MoonStar, Palette, Sun, Trash as Trash2 } from "lucide-vue-next";
|
|
3
3
|
import {
|
|
4
4
|
HDivider,
|
|
5
5
|
HPopover,
|
|
@@ -159,9 +159,9 @@ export const HkThemeToggle = defineComponent({
|
|
|
159
159
|
function modeOptions(): TabItem[] {
|
|
160
160
|
const auto = isAutoMode.value;
|
|
161
161
|
return [
|
|
162
|
-
{ key: "system", label: t("hikari::theme.modeAuto"), icon: <Monitor size={
|
|
163
|
-
{ key: "light", label: t("hikari::theme.modeLight"), icon: <Sun size={
|
|
164
|
-
{ key: "dark", label: t("hikari::theme.modeDark"), icon: <
|
|
162
|
+
{ key: "system", label: t("hikari::theme.modeAuto"), icon: <Monitor size={16} /> },
|
|
163
|
+
{ key: "light", label: t("hikari::theme.modeLight"), icon: <Sun size={16} />, disabled: auto },
|
|
164
|
+
{ key: "dark", label: t("hikari::theme.modeDark"), icon: <MoonStar size={16} />, disabled: auto },
|
|
165
165
|
];
|
|
166
166
|
}
|
|
167
167
|
|
|
@@ -205,11 +205,11 @@ export const HkThemeToggle = defineComponent({
|
|
|
205
205
|
aria-label={t("hikari::theme.mode")}
|
|
206
206
|
>
|
|
207
207
|
{currentMode.value === "system" ? (
|
|
208
|
-
<Monitor size={
|
|
208
|
+
<Monitor size={16} />
|
|
209
209
|
) : effectiveMode.value === "dark" ? (
|
|
210
|
-
<
|
|
210
|
+
<MoonStar size={16} />
|
|
211
211
|
) : (
|
|
212
|
-
<Sun size={
|
|
212
|
+
<Sun size={16} />
|
|
213
213
|
)}
|
|
214
214
|
</button>
|
|
215
215
|
<button
|
|
@@ -252,7 +252,7 @@ export const HkThemeToggle = defineComponent({
|
|
|
252
252
|
aria-label={t("hikari::theme.autoAltitudeTip")}
|
|
253
253
|
onClick={resolveAutoToManual}
|
|
254
254
|
>
|
|
255
|
-
{altitudeNight.value ? <
|
|
255
|
+
{altitudeNight.value ? <MoonStar size={16} /> : <Sun size={16} />}
|
|
256
256
|
<span class="s-theme-mode-autoalt-value">{altitudeText.value}</span>
|
|
257
257
|
</button>
|
|
258
258
|
),
|