@svadmin/ui 0.32.0 → 0.32.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { t } from '@svadmin/core/i18n';
|
|
3
|
-
import { getTheme, setTheme, getResolvedTheme,
|
|
3
|
+
import { getTheme, setTheme, getResolvedTheme, getColorThemes, getColorTheme, setColorTheme, getColorPresets } from '@svadmin/core';
|
|
4
4
|
import { getLocale, setLocale, getAvailableLocales } from '@svadmin/core/i18n';
|
|
5
5
|
import * as Card from './ui/card/index.js';
|
|
6
6
|
import { Button } from './ui/button/index.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { navigate } from '@svadmin/core/router';
|
|
5
5
|
import { getPath } from '../router-state.svelte.js';
|
|
6
6
|
import { t, getLocale, setLocale, getAvailableLocales } from '@svadmin/core/i18n';
|
|
7
|
-
import { toggleTheme, getResolvedTheme,
|
|
7
|
+
import { toggleTheme, getResolvedTheme, getColorThemes, getColorTheme, setColorTheme } from '@svadmin/core';
|
|
8
8
|
import { Button } from './ui/button/index.js';
|
|
9
9
|
import TooltipButton from './TooltipButton.svelte';
|
|
10
10
|
import * as Tooltip from './ui/tooltip/index.js';
|
|
@@ -331,12 +331,12 @@
|
|
|
331
331
|
<span class="flex-1 text-left text-xs">{t('common.toggleTheme')}</span>
|
|
332
332
|
<span
|
|
333
333
|
class="h-3.5 w-3.5 rounded-full ring-1 ring-offset-1 ring-offset-sidebar"
|
|
334
|
-
style="background-color: {
|
|
334
|
+
style="background-color: {getColorThemes().find(c => c.id === getColorTheme())?.color ?? '#6366f1'}; --tw-ring-color: {getColorThemes().find(c => c.id === getColorTheme())?.color ?? '#6366f1'}"
|
|
335
335
|
></span>
|
|
336
336
|
</Button>
|
|
337
337
|
{#if colorPickerOpen}
|
|
338
338
|
<div class="absolute bottom-full left-0 mb-1 z-50 w-40 rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg animate-in fade-in-0 zoom-in-95">
|
|
339
|
-
{#each
|
|
339
|
+
{#each getColorThemes() as ct}
|
|
340
340
|
<button
|
|
341
341
|
class="flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground transition-colors"
|
|
342
342
|
onclick={() => { setColorTheme(ct.id as typeof ct.id & import('@svadmin/core').ColorTheme); colorPickerOpen = false; }}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svadmin/ui",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"description": "Pre-built admin UI components — AdminApp, AutoTable, AutoForm, Sidebar, Layout",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"./components/*": "./dist/components/*"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@svadmin/core": "^0.23.
|
|
28
|
+
"@svadmin/core": "^0.23.1",
|
|
29
29
|
"@tanstack/svelte-query": "^6.0.0",
|
|
30
30
|
"highlight.js": "^11.11.1",
|
|
31
31
|
"isomorphic-dompurify": "^3.7.1",
|