@immich/ui 0.11.0 → 0.12.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/Card/Card.svelte +1 -1
- package/dist/components/Code/Code.svelte +2 -2
- package/dist/components/Form/Input.svelte +3 -3
- package/dist/components/Heading/Heading.svelte +4 -3
- package/dist/components/Heading/Heading.svelte.d.ts +2 -1
- package/dist/components/IconButton/IconButton.svelte +1 -1
- package/dist/components/ThemeSwitcher/ThemeSwitcher.svelte +10 -3
- package/dist/components/ThemeSwitcher/ThemeSwitcher.svelte.d.ts +2 -1
- package/dist/internal/Button.svelte +5 -5
- package/package.json +1 -1
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
variants: {
|
|
49
49
|
color: {
|
|
50
50
|
primary: 'bg-primary/25 dark:bg-primary/25',
|
|
51
|
-
secondary: 'bg-
|
|
51
|
+
secondary: 'bg-gray-50 text-dark dark:bg-neutral-900 dark:text-white',
|
|
52
52
|
success: 'bg-success/15 dark:bg-success/30',
|
|
53
53
|
danger: 'bg-danger/15 dark:bg-danger/50',
|
|
54
54
|
warning: 'bg-warning/25 dark:bg-warning/50',
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
filledColor: {
|
|
34
34
|
false: '',
|
|
35
35
|
muted: 'bg-gray-600 text-light dark:bg-gray-800',
|
|
36
|
-
primary: 'bg-
|
|
37
|
-
secondary: 'bg-
|
|
36
|
+
primary: 'bg-gray-200 text-primary dark:bg-gray-700',
|
|
37
|
+
secondary: 'bg-gray-700 text-light dark:bg-gray-200',
|
|
38
38
|
success: 'bg-success text-light',
|
|
39
39
|
danger: 'bg-danger text-light',
|
|
40
40
|
warning: 'bg-warning text-light',
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
round: 'rounded-full',
|
|
45
45
|
},
|
|
46
46
|
padding: {
|
|
47
|
-
base: 'px-
|
|
48
|
-
round: 'px-
|
|
47
|
+
base: 'px-4 py-3',
|
|
48
|
+
round: 'px-5 py-3',
|
|
49
49
|
},
|
|
50
50
|
roundedSize: {
|
|
51
51
|
tiny: 'rounded-xl',
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
<label id={labelId} for={inputId} class={labelStyles({ size })}>{label}</label>
|
|
79
79
|
{/if}
|
|
80
80
|
|
|
81
|
-
<div class="relative">
|
|
81
|
+
<div class="relative mt-1.5">
|
|
82
82
|
<input
|
|
83
83
|
id={label && inputId}
|
|
84
84
|
aria-labelledby={label && labelId}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { HeadingColor, HeadingSize } from '../../types.js';
|
|
3
3
|
import { cleanClass } from '../../utils.js';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
5
6
|
import { tv } from 'tailwind-variants';
|
|
6
7
|
|
|
7
8
|
type Props = {
|
|
@@ -10,9 +11,9 @@
|
|
|
10
11
|
class?: string;
|
|
11
12
|
|
|
12
13
|
children: Snippet;
|
|
13
|
-
}
|
|
14
|
+
} & HTMLAttributes<HTMLHeadingElement>;
|
|
14
15
|
|
|
15
|
-
const { color, size = 'medium', class: className, children }: Props = $props();
|
|
16
|
+
const { color, size = 'medium', class: className, children, ...restProps }: Props = $props();
|
|
16
17
|
|
|
17
18
|
const sizes = {
|
|
18
19
|
title: 'h1',
|
|
@@ -50,6 +51,6 @@
|
|
|
50
51
|
const classList = $derived(cleanClass(styles({ color, size }), className));
|
|
51
52
|
</script>
|
|
52
53
|
|
|
53
|
-
<svelte:element this={tag} class={classList} role="heading">
|
|
54
|
+
<svelte:element this={tag} class={classList} role="heading" {...restProps}>
|
|
54
55
|
{@render children()}
|
|
55
56
|
</svelte:element>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { HeadingColor, HeadingSize } from '../../types.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
4
|
declare const Heading: import("svelte").Component<{
|
|
4
5
|
size: HeadingSize;
|
|
5
6
|
color?: HeadingColor;
|
|
6
7
|
class?: string;
|
|
7
8
|
children: Snippet;
|
|
8
|
-
}
|
|
9
|
+
} & HTMLAttributes<HTMLHeadingElement>, {}, "">;
|
|
9
10
|
export default Heading;
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import IconButton from '../IconButton/IconButton.svelte';
|
|
3
3
|
import { theme } from '../../services/theme.svelte.js';
|
|
4
|
-
import { Theme, type Size, type Variants } from '../../types.js';
|
|
4
|
+
import { Theme, type Color, type Size, type Variants } from '../../types.js';
|
|
5
5
|
import { cleanClass } from '../../utils.js';
|
|
6
6
|
import { mdiWeatherNight, mdiWeatherSunny } from '@mdi/js';
|
|
7
7
|
|
|
8
8
|
type Props = {
|
|
9
9
|
size?: Size;
|
|
10
10
|
class?: string;
|
|
11
|
+
color?: Color;
|
|
11
12
|
variant?: Variants;
|
|
12
13
|
onChange?: (theme: Theme) => void;
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
const {
|
|
16
|
+
const {
|
|
17
|
+
color = 'primary',
|
|
18
|
+
variant = 'ghost',
|
|
19
|
+
size,
|
|
20
|
+
class: className,
|
|
21
|
+
onChange,
|
|
22
|
+
}: Props = $props();
|
|
16
23
|
|
|
17
24
|
const handleToggleTheme = () => {
|
|
18
25
|
theme.value = theme.value === Theme.Dark ? Theme.Light : Theme.Dark;
|
|
@@ -24,7 +31,7 @@
|
|
|
24
31
|
|
|
25
32
|
<IconButton
|
|
26
33
|
shape="round"
|
|
27
|
-
color
|
|
34
|
+
{color}
|
|
28
35
|
{size}
|
|
29
36
|
{variant}
|
|
30
37
|
icon={themeIcon}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Theme, type Size, type Variants } from '../../types.js';
|
|
1
|
+
import { Theme, type Color, type Size, type Variants } from '../../types.js';
|
|
2
2
|
declare const ThemeSwitcher: import("svelte").Component<{
|
|
3
3
|
size?: Size;
|
|
4
4
|
class?: string;
|
|
5
|
+
color?: Color;
|
|
5
6
|
variant?: Variants;
|
|
6
7
|
onChange?: (theme: Theme) => void;
|
|
7
8
|
}, {}, "">;
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
true: 'w-full',
|
|
42
42
|
},
|
|
43
43
|
textPadding: {
|
|
44
|
-
tiny: 'px-
|
|
45
|
-
small: 'px-
|
|
46
|
-
medium: 'px-
|
|
47
|
-
large: 'px-
|
|
48
|
-
giant: 'px-
|
|
44
|
+
tiny: 'px-3 py-1',
|
|
45
|
+
small: 'px-4 py-1.5',
|
|
46
|
+
medium: 'px-5 py-2',
|
|
47
|
+
large: 'px-8 py-2.5',
|
|
48
|
+
giant: 'px-10 py-3',
|
|
49
49
|
},
|
|
50
50
|
textSize: {
|
|
51
51
|
tiny: 'text-xs',
|