@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.
@@ -48,7 +48,7 @@
48
48
  variants: {
49
49
  color: {
50
50
  primary: 'bg-primary/25 dark:bg-primary/25',
51
- secondary: 'bg-dark/5 text-dark dark:bg-dark/25',
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-primary text-light',
37
- secondary: 'bg-dark text-light',
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-3 py-2',
48
- round: 'px-4 py-2',
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;
@@ -7,5 +7,5 @@
7
7
  </script>
8
8
 
9
9
  <Button icon {...buttonProps}>
10
- <Icon {icon} {flipped} {flopped} size="66%"></Icon>
10
+ <Icon {icon} {flipped} {flopped} size="45%"></Icon>
11
11
  </Button>
@@ -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 { variant = 'ghost', size, class: className, onChange }: Props = $props();
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="primary"
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-2 py-1',
45
- small: 'px-2 py-1',
46
- medium: 'px-4 py-2',
47
- large: 'px-4 py-2',
48
- giant: 'px-8 py-4',
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',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@immich/ui",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "license": "GNU Affero General Public License version 3",
5
5
  "scripts": {
6
6
  "create": "node scripts/create.js",