@immich/ui 0.39.0 → 0.39.2

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.
@@ -41,15 +41,16 @@
41
41
  });
42
42
 
43
43
  const container2Styles = tv({
44
+ base: 'py-1.5',
44
45
  variants: {
45
46
  filled: {
46
- primary: 'bg-primary/20 dark:bg-primary/25',
47
- secondary: 'bg-dark/20 dark:bg-dark/25',
47
+ primary: 'bg-primary/10 dark:bg-primary/25',
48
+ secondary: 'bg-dark/10 dark:bg-dark/25',
48
49
  muted: 'bg-subtle dark:bg-subtle',
49
- info: 'bg-info/20 dark:bg-info/25',
50
- warning: 'bg-warning/20 dark:bg-warning/25',
51
- danger: 'bg-danger/20 dark:bg-danger/25',
52
- success: 'bg-success/20 dark:bg-success/25',
50
+ info: 'bg-info/10 dark:bg-info/25',
51
+ warning: 'bg-warning/10 dark:bg-warning/25',
52
+ danger: 'bg-danger/10 dark:bg-danger/25',
53
+ success: 'bg-success/10 dark:bg-success/25',
53
54
  },
54
55
  outline: {
55
56
  primary: 'bg-primary/10 text-primary hover:bg-primary/20',
@@ -6,10 +6,10 @@ declare class ToastManager {
6
6
  custom(item: ToastCustom, options?: ToastOptions): void;
7
7
  open(item: ToastItem, options?: ToastOptions): void;
8
8
  unmount(): Promise<void>;
9
- success(item: string | ToastShow): void;
10
- info(item: string | ToastShow): void;
11
- warning(item: string | ToastShow): void;
12
- danger(item: string | ToastShow): void;
9
+ success(item?: string | ToastShow, options?: ToastOptions): void;
10
+ info(item?: string | ToastShow, options?: ToastOptions): void;
11
+ warning(item?: string | ToastShow, options?: ToastOptions): void;
12
+ danger(item?: string | ToastShow, options?: ToastOptions): void;
13
13
  mount(): Promise<void>;
14
14
  private remove;
15
15
  }
@@ -3,7 +3,7 @@ import { t } from './translation.svelte.js';
3
3
  import { generateId } from '../utilities/internal.js';
4
4
  import { mount, unmount } from 'svelte';
5
5
  export const isCustomToast = (item) => !!item.component;
6
- const expand = (item) => (typeof item === 'string' ? { description: item } : item);
6
+ const expand = (item) => typeof item === 'string' ? { description: item } : (item ?? {});
7
7
  class ToastManager {
8
8
  #ref;
9
9
  #props = $state({ items: [] });
@@ -37,17 +37,17 @@ class ToastManager {
37
37
  await unmount(this.#ref);
38
38
  }
39
39
  }
40
- success(item) {
41
- this.show({ title: t('toast_success_title'), color: 'success', ...expand(item) });
40
+ success(item, options) {
41
+ this.show({ title: t('toast_success_title'), color: 'success', ...expand(item) }, options);
42
42
  }
43
- info(item) {
44
- this.show({ title: t('toast_info_title'), color: 'info', ...expand(item) });
43
+ info(item, options) {
44
+ this.show({ title: t('toast_info_title'), color: 'info', ...expand(item) }, options);
45
45
  }
46
- warning(item) {
47
- this.show({ title: t('toast_warning_title'), color: 'warning', ...expand(item) });
46
+ warning(item, options) {
47
+ this.show({ title: t('toast_warning_title'), color: 'warning', ...expand(item) }, options);
48
48
  }
49
- danger(item) {
50
- this.show({ title: t('toast_danger_title'), color: 'danger', ...expand(item) });
49
+ danger(item, options) {
50
+ this.show({ title: t('toast_danger_title'), color: 'danger', ...expand(item) }, options);
51
51
  }
52
52
  async mount() {
53
53
  if (!this.#ref) {
@@ -50,6 +50,7 @@
50
50
  aria-label="GitHub"
51
51
  variant="ghost"
52
52
  color="secondary"
53
+ size="small"
53
54
  />
54
55
  <IconButton
55
56
  href={Constants.Socials.Discord}
@@ -57,6 +58,7 @@
57
58
  aria-label="Discord"
58
59
  variant="ghost"
59
60
  color="secondary"
61
+ size="small"
60
62
  />
61
63
  <IconButton
62
64
  href={Constants.Socials.Reddit}
@@ -64,6 +66,7 @@
64
66
  aria-label="reddit"
65
67
  variant="ghost"
66
68
  color="secondary"
69
+ size="small"
67
70
  />
68
71
  <IconButton href={Constants.Socials.X} icon={siX} aria-label="X" variant="ghost" color="secondary" />
69
72
  <IconButton
@@ -72,6 +75,7 @@
72
75
  aria-label="YouTube"
73
76
  variant="ghost"
74
77
  color="secondary"
78
+ size="small"
75
79
  />
76
80
  <IconButton
77
81
  href={Constants.Socials.Weblate}
@@ -79,6 +83,7 @@
79
83
  aria-label="Weblate"
80
84
  variant="ghost"
81
85
  color="secondary"
86
+ size="small"
82
87
  />
83
88
  <IconButton href={Constants.Socials.Rss} icon={siRss} aria-label="RSS" variant="ghost" color="secondary" />
84
89
  </HStack>
package/dist/types.d.ts CHANGED
@@ -184,6 +184,7 @@ export type ToastShow = {
184
184
  description?: string;
185
185
  color?: Color;
186
186
  shape?: Shape;
187
+ icon?: IconLike | false;
187
188
  size?: ContainerSize;
188
189
  variant?: ToastVariant;
189
190
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immich/ui",
3
- "version": "0.39.0",
3
+ "version": "0.39.2",
4
4
  "license": "GNU Affero General Public License version 3",
5
5
  "repository": {
6
6
  "type": "git",