@svadmin/ui 0.38.7 → 0.39.0
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/dist/components/AdminApp.svelte +3 -2
- package/dist/components/ApiSettings.svelte +86 -1
- package/dist/components/ForgotPasswordPage.svelte +5 -8
- package/dist/components/LoginPage.svelte +5 -8
- package/dist/components/RegisterPage.svelte +5 -8
- package/dist/components/Sidebar.svelte +10 -4
- package/dist/components/SvadminLogo.svelte +16 -0
- package/dist/components/SvadminLogo.svelte.d.ts +7 -0
- package/dist/components/UpdatePasswordPage.svelte +5 -8
- package/dist/components/account/CompanyProfilePage.svelte +56 -1
- package/dist/components/account/ImportMembersPage.svelte +31 -0
- package/dist/components/account/SettingsEnterprisePage.svelte +172 -19
- package/dist/components/account/SettingsPlainPage.svelte +121 -17
- package/dist/components/account/SettingsSidebarPage.svelte +282 -70
- package/dist/components/account/TeamMembersPage.svelte +68 -2
- package/dist/components/account/UserProfilePage.svelte +206 -0
- package/dist/components/account/UserProfilePage.svelte.d.ts +4 -0
- package/dist/components/network/TeamCrewTablePage.svelte +17 -1
- package/dist/components/network/UserCardsNFTPage.svelte +5 -0
- package/dist/components/profile/ActivityTimeline.svelte +24 -2
- package/dist/components/profile/ActivityTimeline.svelte.d.ts +1 -0
- package/dist/components/profile/ProfileVariantSections.svelte +452 -0
- package/dist/components/profile/ProfileVariantSections.svelte.d.ts +8 -0
- package/dist/components/profile/ProjectsGrid.svelte +20 -6
- package/dist/components/profile/PublicProfilePage.svelte +42 -21
- package/dist/components/profile/PublicProfilePage.svelte.d.ts +1 -0
- package/dist/components/profile/TeamsShowcase.svelte +31 -12
- package/dist/components/profile/TeamsShowcase.svelte.d.ts +1 -0
- package/dist/components/ui/alert/alert.svelte.d.ts +14 -14
- package/dist/components/ui/avatar/avatar.svelte.d.ts +14 -14
- package/dist/components/ui/badge/badge.svelte.d.ts +20 -20
- package/dist/components/ui/button/button.svelte.d.ts +44 -44
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/package.json +13 -13
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useTranslation } from '@svadmin/core/i18n';
|
|
3
3
|
import * as Card from '../ui/card/index.js';
|
|
4
|
-
import { Badge } from '../ui/badge/index.js';
|
|
5
4
|
import { Button } from '../ui/button/index.js';
|
|
6
5
|
import { Avatar } from '../ui/avatar/index.js';
|
|
7
|
-
import {
|
|
6
|
+
import { Input } from '../ui/input/index.js';
|
|
7
|
+
import { Users, ArrowRight, Search, Star } from '@lucide/svelte';
|
|
8
8
|
|
|
9
9
|
const i18n = useTranslation();
|
|
10
10
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
members: TeamMember[];
|
|
22
22
|
totalMembers: number;
|
|
23
23
|
color?: string;
|
|
24
|
+
rating?: number;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
interface Props {
|
|
@@ -29,19 +30,32 @@
|
|
|
29
30
|
|
|
30
31
|
let { teams = [] }: Props = $props();
|
|
31
32
|
|
|
33
|
+
let searchQuery = $state('');
|
|
34
|
+
const filtered = $derived(
|
|
35
|
+
searchQuery
|
|
36
|
+
? teams.filter(t => t.name.toLowerCase().includes(searchQuery.toLowerCase()) || t.description.toLowerCase().includes(searchQuery.toLowerCase()))
|
|
37
|
+
: teams
|
|
38
|
+
);
|
|
39
|
+
|
|
32
40
|
const initials = (name: string) => name.split(' ').map(n => n[0]).join('').toUpperCase().slice(0, 2);
|
|
33
41
|
</script>
|
|
34
42
|
|
|
35
43
|
<div class="space-y-4">
|
|
36
|
-
<
|
|
44
|
+
<div class="flex flex-wrap items-center justify-between gap-3">
|
|
45
|
+
<h3 class="text-lg font-semibold text-foreground">{i18n.t('publicProfile.teamsCount', { count: filtered.length })}</h3>
|
|
46
|
+
<div class="relative">
|
|
47
|
+
<Search class="absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
|
|
48
|
+
<Input placeholder={i18n.t('publicProfile.searchTeams')} bind:value={searchQuery} class="w-48 pl-9" />
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
37
51
|
|
|
38
|
-
{#if
|
|
52
|
+
{#if filtered.length === 0}
|
|
39
53
|
<div class="rounded-xl border border-dashed border-border/60 p-8 text-center">
|
|
40
54
|
<p class="text-sm text-muted-foreground">{i18n.t('publicProfile.noTeams')}</p>
|
|
41
55
|
</div>
|
|
42
56
|
{:else}
|
|
43
|
-
<div class="grid gap-4 sm:grid-cols-1 md:grid-cols-2">
|
|
44
|
-
{#each
|
|
57
|
+
<div class="grid gap-4 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
|
|
58
|
+
{#each filtered as team (team.id)}
|
|
45
59
|
<Card.Card class="border-border/60 hover:border-primary/30 transition-colors">
|
|
46
60
|
<Card.CardContent class="p-4 space-y-3">
|
|
47
61
|
<div class="flex items-start justify-between gap-2">
|
|
@@ -57,12 +71,14 @@
|
|
|
57
71
|
{/if}
|
|
58
72
|
<div>
|
|
59
73
|
<h4 class="font-semibold text-foreground">{team.name}</h4>
|
|
60
|
-
<p class="text-xs text-muted-foreground">{
|
|
74
|
+
<p class="text-xs text-muted-foreground">{i18n.t('publicProfile.projectMembers', { count: team.totalMembers })}</p>
|
|
61
75
|
</div>
|
|
62
76
|
</div>
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
77
|
+
{#if team.rating}
|
|
78
|
+
<span class="flex shrink-0 items-center gap-1 text-xs font-semibold text-amber-500">
|
|
79
|
+
<Star class="h-3.5 w-3.5 fill-amber-400 text-amber-400" />{team.rating}
|
|
80
|
+
</span>
|
|
81
|
+
{/if}
|
|
66
82
|
</div>
|
|
67
83
|
|
|
68
84
|
<p class="text-sm text-muted-foreground line-clamp-2">{team.description}</p>
|
|
@@ -87,8 +103,11 @@
|
|
|
87
103
|
{/if}
|
|
88
104
|
</div>
|
|
89
105
|
|
|
90
|
-
<div class="pt-2 border-t">
|
|
91
|
-
<Button variant="
|
|
106
|
+
<div class="flex gap-2 pt-2 border-t">
|
|
107
|
+
<Button variant="outline" size="sm" class="flex-1">
|
|
108
|
+
{i18n.t('publicProfile.join')}
|
|
109
|
+
</Button>
|
|
110
|
+
<Button variant="ghost" size="sm" class="flex-1">
|
|
92
111
|
{i18n.t('publicProfile.viewProfile')} <ArrowRight class="h-3.5 w-3.5 ml-1" />
|
|
93
112
|
</Button>
|
|
94
113
|
</div>
|
|
@@ -3,26 +3,26 @@ import type { HTMLAttributes } from "svelte/elements";
|
|
|
3
3
|
import { type VariantProps } from "tailwind-variants";
|
|
4
4
|
export declare const alertVariants: import("tailwind-variants").TVReturnType<{
|
|
5
5
|
variant: {
|
|
6
|
-
default:
|
|
7
|
-
destructive:
|
|
8
|
-
warning:
|
|
9
|
-
success:
|
|
6
|
+
default: "bg-card text-foreground";
|
|
7
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90";
|
|
8
|
+
warning: "border-warning/50 text-warning-foreground bg-warning/10 [&>svg]:text-current";
|
|
9
|
+
success: "border-success/50 text-success bg-success/10 [&>svg]:text-current";
|
|
10
10
|
};
|
|
11
11
|
}, undefined, "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
12
12
|
variant: {
|
|
13
|
-
default:
|
|
14
|
-
destructive:
|
|
15
|
-
warning:
|
|
16
|
-
success:
|
|
13
|
+
default: "bg-card text-foreground";
|
|
14
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90";
|
|
15
|
+
warning: "border-warning/50 text-warning-foreground bg-warning/10 [&>svg]:text-current";
|
|
16
|
+
success: "border-success/50 text-success bg-success/10 [&>svg]:text-current";
|
|
17
17
|
};
|
|
18
|
-
}, undefined, import("tailwind-variants").
|
|
18
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
19
19
|
variant: {
|
|
20
|
-
default:
|
|
21
|
-
destructive:
|
|
22
|
-
warning:
|
|
23
|
-
success:
|
|
20
|
+
default: "bg-card text-foreground";
|
|
21
|
+
destructive: "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90";
|
|
22
|
+
warning: "border-warning/50 text-warning-foreground bg-warning/10 [&>svg]:text-current";
|
|
23
|
+
success: "border-success/50 text-success bg-success/10 [&>svg]:text-current";
|
|
24
24
|
};
|
|
25
|
-
}, undefined
|
|
25
|
+
}, undefined>>;
|
|
26
26
|
export type AlertVariant = VariantProps<typeof alertVariants>["variant"];
|
|
27
27
|
type Props = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
28
28
|
variant?: AlertVariant;
|
|
@@ -7,26 +7,26 @@ declare const Avatar: import("svelte").Component<HTMLImgAttributes & {
|
|
|
7
7
|
}, {
|
|
8
8
|
avatarVariants: import("tailwind-variants").TVReturnType<{
|
|
9
9
|
size: {
|
|
10
|
-
default:
|
|
11
|
-
sm:
|
|
12
|
-
lg:
|
|
13
|
-
xl:
|
|
10
|
+
default: "size-10";
|
|
11
|
+
sm: "size-8";
|
|
12
|
+
lg: "size-12";
|
|
13
|
+
xl: "size-16";
|
|
14
14
|
};
|
|
15
15
|
}, undefined, "relative flex shrink-0 overflow-hidden rounded-full", {
|
|
16
16
|
size: {
|
|
17
|
-
default:
|
|
18
|
-
sm:
|
|
19
|
-
lg:
|
|
20
|
-
xl:
|
|
17
|
+
default: "size-10";
|
|
18
|
+
sm: "size-8";
|
|
19
|
+
lg: "size-12";
|
|
20
|
+
xl: "size-16";
|
|
21
21
|
};
|
|
22
|
-
}, undefined, import("tailwind-variants").
|
|
22
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
23
23
|
size: {
|
|
24
|
-
default:
|
|
25
|
-
sm:
|
|
26
|
-
lg:
|
|
27
|
-
xl:
|
|
24
|
+
default: "size-10";
|
|
25
|
+
sm: "size-8";
|
|
26
|
+
lg: "size-12";
|
|
27
|
+
xl: "size-16";
|
|
28
28
|
};
|
|
29
|
-
}, undefined
|
|
29
|
+
}, undefined>>;
|
|
30
30
|
}, "ref">;
|
|
31
31
|
type Avatar = ReturnType<typeof Avatar>;
|
|
32
32
|
export default Avatar;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { type VariantProps } from "tailwind-variants";
|
|
2
2
|
export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
3
3
|
variant: {
|
|
4
|
-
default:
|
|
5
|
-
secondary:
|
|
6
|
-
destructive:
|
|
7
|
-
outline:
|
|
8
|
-
ghost:
|
|
9
|
-
link:
|
|
4
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
|
|
5
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80";
|
|
6
|
+
destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20";
|
|
7
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground";
|
|
8
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50";
|
|
9
|
+
link: "text-primary underline-offset-4 hover:underline";
|
|
10
10
|
};
|
|
11
11
|
}, undefined, "h-5 gap-1 rounded-[min(var(--radius-sm),10px)] border border-transparent px-2.5 py-0.5 text-xs font-semibold transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap transition-colors focus-visible:ring-[3px] [&>svg]:pointer-events-none", {
|
|
12
12
|
variant: {
|
|
13
|
-
default:
|
|
14
|
-
secondary:
|
|
15
|
-
destructive:
|
|
16
|
-
outline:
|
|
17
|
-
ghost:
|
|
18
|
-
link:
|
|
13
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
|
|
14
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80";
|
|
15
|
+
destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20";
|
|
16
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground";
|
|
17
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50";
|
|
18
|
+
link: "text-primary underline-offset-4 hover:underline";
|
|
19
19
|
};
|
|
20
|
-
}, undefined, import("tailwind-variants").
|
|
20
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
21
21
|
variant: {
|
|
22
|
-
default:
|
|
23
|
-
secondary:
|
|
24
|
-
destructive:
|
|
25
|
-
outline:
|
|
26
|
-
ghost:
|
|
27
|
-
link:
|
|
22
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
|
|
23
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80";
|
|
24
|
+
destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20";
|
|
25
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground";
|
|
26
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50";
|
|
27
|
+
link: "text-primary underline-offset-4 hover:underline";
|
|
28
28
|
};
|
|
29
|
-
}, undefined
|
|
29
|
+
}, undefined>>;
|
|
30
30
|
export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
|
|
31
31
|
import type { HTMLAnchorAttributes } from "svelte/elements";
|
|
32
32
|
import { type WithElementRef } from "../../../utils.js";
|
|
@@ -3,62 +3,62 @@ import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements
|
|
|
3
3
|
import { type VariantProps } from "tailwind-variants";
|
|
4
4
|
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
5
|
variant: {
|
|
6
|
-
default:
|
|
7
|
-
outline:
|
|
8
|
-
secondary:
|
|
9
|
-
ghost:
|
|
10
|
-
destructive:
|
|
11
|
-
link:
|
|
6
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
|
|
7
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground";
|
|
8
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground";
|
|
9
|
+
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground";
|
|
10
|
+
destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30";
|
|
11
|
+
link: "text-primary underline-offset-4 hover:underline";
|
|
12
12
|
};
|
|
13
13
|
size: {
|
|
14
|
-
default:
|
|
15
|
-
xs:
|
|
16
|
-
sm:
|
|
17
|
-
lg:
|
|
18
|
-
icon:
|
|
19
|
-
"icon-xs":
|
|
20
|
-
"icon-sm":
|
|
21
|
-
"icon-lg":
|
|
14
|
+
default: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5";
|
|
15
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3";
|
|
16
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3.5";
|
|
17
|
+
lg: "h-10 gap-2 px-4 has-data-[icon=inline-end]:pr-3.5 has-data-[icon=inline-start]:pl-3.5";
|
|
18
|
+
icon: "size-9";
|
|
19
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3";
|
|
20
|
+
"icon-sm": "size-8 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg";
|
|
21
|
+
"icon-lg": "size-10";
|
|
22
22
|
};
|
|
23
23
|
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
24
24
|
variant: {
|
|
25
|
-
default:
|
|
26
|
-
outline:
|
|
27
|
-
secondary:
|
|
28
|
-
ghost:
|
|
29
|
-
destructive:
|
|
30
|
-
link:
|
|
25
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
|
|
26
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground";
|
|
27
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground";
|
|
28
|
+
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground";
|
|
29
|
+
destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30";
|
|
30
|
+
link: "text-primary underline-offset-4 hover:underline";
|
|
31
31
|
};
|
|
32
32
|
size: {
|
|
33
|
-
default:
|
|
34
|
-
xs:
|
|
35
|
-
sm:
|
|
36
|
-
lg:
|
|
37
|
-
icon:
|
|
38
|
-
"icon-xs":
|
|
39
|
-
"icon-sm":
|
|
40
|
-
"icon-lg":
|
|
33
|
+
default: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5";
|
|
34
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3";
|
|
35
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3.5";
|
|
36
|
+
lg: "h-10 gap-2 px-4 has-data-[icon=inline-end]:pr-3.5 has-data-[icon=inline-start]:pl-3.5";
|
|
37
|
+
icon: "size-9";
|
|
38
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3";
|
|
39
|
+
"icon-sm": "size-8 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg";
|
|
40
|
+
"icon-lg": "size-10";
|
|
41
41
|
};
|
|
42
|
-
}, undefined, import("tailwind-variants").
|
|
42
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
43
43
|
variant: {
|
|
44
|
-
default:
|
|
45
|
-
outline:
|
|
46
|
-
secondary:
|
|
47
|
-
ghost:
|
|
48
|
-
destructive:
|
|
49
|
-
link:
|
|
44
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80";
|
|
45
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground";
|
|
46
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground";
|
|
47
|
+
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground";
|
|
48
|
+
destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30";
|
|
49
|
+
link: "text-primary underline-offset-4 hover:underline";
|
|
50
50
|
};
|
|
51
51
|
size: {
|
|
52
|
-
default:
|
|
53
|
-
xs:
|
|
54
|
-
sm:
|
|
55
|
-
lg:
|
|
56
|
-
icon:
|
|
57
|
-
"icon-xs":
|
|
58
|
-
"icon-sm":
|
|
59
|
-
"icon-lg":
|
|
52
|
+
default: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5";
|
|
53
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3";
|
|
54
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3.5";
|
|
55
|
+
lg: "h-10 gap-2 px-4 has-data-[icon=inline-end]:pr-3.5 has-data-[icon=inline-start]:pl-3.5";
|
|
56
|
+
icon: "size-9";
|
|
57
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3";
|
|
58
|
+
"icon-sm": "size-8 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg";
|
|
59
|
+
"icon-lg": "size-10";
|
|
60
60
|
};
|
|
61
|
-
}, undefined
|
|
61
|
+
}, undefined>>;
|
|
62
62
|
export type ButtonVariant = VariantProps<typeof buttonVariants>["variant"];
|
|
63
63
|
export type ButtonSize = VariantProps<typeof buttonVariants>["size"];
|
|
64
64
|
export type ButtonProps = WithElementRef<HTMLButtonAttributes, HTMLButtonElement> & WithElementRef<HTMLAnchorAttributes, HTMLAnchorElement> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { default as ConfirmDialog } from './components/ConfirmDialog.svelte';
|
|
|
6
6
|
export { default as Sidebar } from './components/Sidebar.svelte';
|
|
7
7
|
export { default as Layout } from './components/Layout.svelte';
|
|
8
8
|
export { default as Header } from './components/Header.svelte';
|
|
9
|
+
export { default as SvadminLogo } from './components/SvadminLogo.svelte';
|
|
9
10
|
export { default as ErrorBoundary } from './components/ErrorBoundary.svelte';
|
|
10
11
|
export { default as Toast } from './components/Toast.svelte';
|
|
11
12
|
export { default as Breadcrumbs } from './components/Breadcrumbs.svelte';
|
|
@@ -136,7 +137,9 @@ export { default as ProjectsGrid } from './components/profile/ProjectsGrid.svelt
|
|
|
136
137
|
export { default as ActivityTimeline } from './components/profile/ActivityTimeline.svelte';
|
|
137
138
|
export { default as TeamsShowcase } from './components/profile/TeamsShowcase.svelte';
|
|
138
139
|
export { default as PublicProfilePage } from './components/profile/PublicProfilePage.svelte';
|
|
140
|
+
export { default as ProfileVariantSections } from './components/profile/ProfileVariantSections.svelte';
|
|
139
141
|
export { default as GetStartedPage } from './components/account/GetStartedPage.svelte';
|
|
142
|
+
export { default as UserProfilePage } from './components/account/UserProfilePage.svelte';
|
|
140
143
|
export { default as CompanyProfilePage } from './components/account/CompanyProfilePage.svelte';
|
|
141
144
|
export { default as SettingsPlainPage } from './components/account/SettingsPlainPage.svelte';
|
|
142
145
|
export { default as SettingsSidebarPage } from './components/account/SettingsSidebarPage.svelte';
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { default as ConfirmDialog } from './components/ConfirmDialog.svelte';
|
|
|
9
9
|
export { default as Sidebar } from './components/Sidebar.svelte';
|
|
10
10
|
export { default as Layout } from './components/Layout.svelte';
|
|
11
11
|
export { default as Header } from './components/Header.svelte';
|
|
12
|
+
export { default as SvadminLogo } from './components/SvadminLogo.svelte';
|
|
12
13
|
export { default as ErrorBoundary } from './components/ErrorBoundary.svelte';
|
|
13
14
|
export { default as Toast } from './components/Toast.svelte';
|
|
14
15
|
export { default as Breadcrumbs } from './components/Breadcrumbs.svelte';
|
|
@@ -148,8 +149,10 @@ export { default as ProjectsGrid } from './components/profile/ProjectsGrid.svelt
|
|
|
148
149
|
export { default as ActivityTimeline } from './components/profile/ActivityTimeline.svelte';
|
|
149
150
|
export { default as TeamsShowcase } from './components/profile/TeamsShowcase.svelte';
|
|
150
151
|
export { default as PublicProfilePage } from './components/profile/PublicProfilePage.svelte';
|
|
152
|
+
export { default as ProfileVariantSections } from './components/profile/ProfileVariantSections.svelte';
|
|
151
153
|
// Account extensions
|
|
152
154
|
export { default as GetStartedPage } from './components/account/GetStartedPage.svelte';
|
|
155
|
+
export { default as UserProfilePage } from './components/account/UserProfilePage.svelte';
|
|
153
156
|
export { default as CompanyProfilePage } from './components/account/CompanyProfilePage.svelte';
|
|
154
157
|
export { default as SettingsPlainPage } from './components/account/SettingsPlainPage.svelte';
|
|
155
158
|
export { default as SettingsSidebarPage } from './components/account/SettingsSidebarPage.svelte';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svadmin/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "Pre-built admin UI components — AdminApp, AutoTable, AutoForm, Sidebar, Layout",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"./components/*": "./dist/components/*"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@svadmin/core": "^0.
|
|
43
|
-
"@tanstack/svelte-query": "^6.1.
|
|
42
|
+
"@svadmin/core": "^0.33.0",
|
|
43
|
+
"@tanstack/svelte-query": "^6.1.38",
|
|
44
44
|
"highlight.js": "^11.11.1",
|
|
45
|
-
"isomorphic-dompurify": "^3.
|
|
46
|
-
"marked": "^18.0.
|
|
47
|
-
"marked-highlight": "^2.2.
|
|
48
|
-
"svelte": "^5.
|
|
45
|
+
"isomorphic-dompurify": "^3.20.0",
|
|
46
|
+
"marked": "^18.0.7",
|
|
47
|
+
"marked-highlight": "^2.2.4",
|
|
48
|
+
"svelte": "^5.56.8"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|
|
51
51
|
"marked": {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@floating-ui/dom": "^1.8.0",
|
|
78
|
-
"@lucide/svelte": "^1.
|
|
78
|
+
"@lucide/svelte": "^1.28.0",
|
|
79
79
|
"@tanstack/svelte-store": "^0.12.0",
|
|
80
80
|
"@tanstack/svelte-table": "9.0.0-alpha.53",
|
|
81
81
|
"@tanstack/table-core": "9.0.0-alpha.53",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"clsx": "^2.1.1",
|
|
84
84
|
"svelte-sonner": "^1.1.1",
|
|
85
85
|
"tailwind-merge": "^3.6.0",
|
|
86
|
-
"tailwind-variants": "^3.
|
|
86
|
+
"tailwind-variants": "^3.3.0"
|
|
87
87
|
},
|
|
88
88
|
"license": "MIT",
|
|
89
89
|
"author": "zuohuadong",
|
|
@@ -97,16 +97,16 @@
|
|
|
97
97
|
"url": "https://github.com/zuohuadong/svadmin/issues"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
|
-
"@happy-dom/global-registrator": "^20.11.
|
|
100
|
+
"@happy-dom/global-registrator": "^20.11.1",
|
|
101
101
|
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
|
102
102
|
"@testing-library/dom": "^10.4.1",
|
|
103
103
|
"@testing-library/svelte": "^5.4.2",
|
|
104
104
|
"@testing-library/user-event": "^14.6.1",
|
|
105
|
-
"happy-dom": "^20.11.
|
|
106
|
-
"vitest": "^4.1.
|
|
105
|
+
"happy-dom": "^20.11.1",
|
|
106
|
+
"vitest": "^4.1.10"
|
|
107
107
|
},
|
|
108
108
|
"scripts": {
|
|
109
|
-
"build": "svelte-package -i src -o dist && node scripts/postbuild-css.mjs",
|
|
109
|
+
"build": "node ../../node_modules/@sveltejs/package/svelte-package.js -i src -o dist && node scripts/postbuild-css.mjs",
|
|
110
110
|
"test": "vitest run --config ./vitest.config.ts"
|
|
111
111
|
}
|
|
112
112
|
}
|