@immich/ui 0.30.0 → 0.31.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.
Files changed (71) hide show
  1. package/README.md +9 -17
  2. package/dist/actions/shortcut.js +1 -1
  3. package/dist/components/Alert/Alert.svelte +92 -94
  4. package/dist/components/AppShell/AppShell.svelte +26 -26
  5. package/dist/components/AppShell/AppShellHeader.svelte +8 -8
  6. package/dist/components/AppShell/AppShellSidebar.svelte +20 -20
  7. package/dist/components/AppShell/PageLayout.svelte +29 -35
  8. package/dist/components/Avatar/Avatar.svelte +45 -55
  9. package/dist/components/Button/Button.svelte +3 -3
  10. package/dist/components/Card/Card.svelte +131 -135
  11. package/dist/components/Card/CardBody.svelte +9 -9
  12. package/dist/components/Card/CardDescription.svelte +9 -9
  13. package/dist/components/Card/CardFooter.svelte +9 -9
  14. package/dist/components/Card/CardHeader.svelte +9 -9
  15. package/dist/components/Card/CardTitle.svelte +14 -14
  16. package/dist/components/Checkbox/Checkbox.svelte +109 -110
  17. package/dist/components/CloseButton/CloseButton.svelte +12 -17
  18. package/dist/components/Code/Code.svelte +72 -65
  19. package/dist/components/Code/Code.svelte.d.ts +1 -1
  20. package/dist/components/CodeBlock/CodeBlock.svelte +74 -0
  21. package/dist/components/CodeBlock/CodeBlock.svelte.d.ts +14 -0
  22. package/dist/components/CommandPalette/CommandPalette.svelte +126 -131
  23. package/dist/components/CommandPalette/CommandPaletteItem.svelte +61 -61
  24. package/dist/components/ConfirmModal/ConfirmModal.svelte +48 -48
  25. package/dist/components/Container/Container.svelte +25 -25
  26. package/dist/components/Field/Field.svelte +21 -21
  27. package/dist/components/FormatBytes/FormatBytes.svelte +9 -9
  28. package/dist/components/Heading/Heading.svelte +41 -47
  29. package/dist/components/HelperText/HelperText.svelte +17 -17
  30. package/dist/components/Icon/Icon.svelte +37 -42
  31. package/dist/components/IconButton/IconButton.svelte +6 -13
  32. package/dist/components/Input/Input.svelte +149 -152
  33. package/dist/components/Kbd/Kbd.svelte +25 -25
  34. package/dist/components/Label/Label.svelte +6 -6
  35. package/dist/components/Link/Link.svelte +18 -25
  36. package/dist/components/LoadingSpinner/LoadingSpinner.svelte +46 -46
  37. package/dist/components/Logo/Logo.svelte +53 -53
  38. package/dist/components/Modal/Modal.svelte +110 -114
  39. package/dist/components/Modal/ModalBody.svelte +8 -8
  40. package/dist/components/Modal/ModalFooter.svelte +8 -8
  41. package/dist/components/Modal/ModalHeader.svelte +8 -8
  42. package/dist/components/MultiSelect/MultiSelect.svelte +7 -7
  43. package/dist/components/Navbar/NavbarGroup.svelte +5 -5
  44. package/dist/components/Navbar/NavbarItem.svelte +59 -61
  45. package/dist/components/PasswordInput/PasswordInput.svelte +29 -31
  46. package/dist/components/Scrollable/Scrollable.svelte +49 -49
  47. package/dist/components/Select/Select.svelte +9 -9
  48. package/dist/components/Stack/HStack.svelte +4 -4
  49. package/dist/components/Stack/Stack.svelte +62 -62
  50. package/dist/components/Stack/VStack.svelte +4 -4
  51. package/dist/components/SupporterBadge/SupporterBadge.svelte +80 -80
  52. package/dist/components/Switch/Switch.svelte +95 -96
  53. package/dist/components/Text/Text.svelte +27 -34
  54. package/dist/components/Textarea/Textarea.svelte +103 -104
  55. package/dist/components/ThemeSwitcher/ThemeSwitcher.svelte +30 -43
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.js +1 -0
  58. package/dist/internal/Button.svelte +177 -177
  59. package/dist/internal/Child.svelte +21 -21
  60. package/dist/internal/Select.svelte +151 -158
  61. package/dist/internal/Text.svelte +50 -50
  62. package/dist/internal/Text.svelte.d.ts +2 -1
  63. package/dist/services/translation.svelte.d.ts +2 -0
  64. package/dist/services/translation.svelte.js +4 -0
  65. package/dist/site/SiteFooter.svelte +60 -76
  66. package/dist/site/SiteFooterLink.svelte +14 -14
  67. package/dist/site/constants.d.ts +7 -3
  68. package/dist/site/constants.js +17 -3
  69. package/dist/theme/default.css +40 -40
  70. package/dist/utilities/byte-units.js +2 -13
  71. package/package.json +77 -77
@@ -15,12 +15,15 @@ export declare const Constants: {
15
15
  };
16
16
  Sites: {
17
17
  Api: string;
18
- Demo: string;
19
- My: string;
20
18
  Buy: string;
21
- Get: string;
19
+ Data: string;
20
+ Datasets: string;
21
+ Demo: string;
22
22
  Docs: string;
23
+ Get: string;
24
+ My: string;
23
25
  Store: string;
26
+ Ui: string;
24
27
  };
25
28
  Pages: {
26
29
  CursedKnowledge: string;
@@ -28,6 +31,7 @@ export declare const Constants: {
28
31
  };
29
32
  Npm: {
30
33
  Sdk: string;
34
+ Ui: string;
31
35
  };
32
36
  };
33
37
  export declare const siteCommands: {
@@ -17,12 +17,15 @@ export const Constants = {
17
17
  },
18
18
  Sites: {
19
19
  Api: 'https://api.immich.app/',
20
- Demo: 'https://demo.immich.app/',
21
- My: 'https://my.immich.app/',
22
20
  Buy: 'https://buy.immich.app/',
23
- Get: 'https://get.immich.app/',
21
+ Data: 'https://data.immich.app/',
22
+ Datasets: 'https://datasets.immich.app/',
23
+ Demo: 'https://demo.immich.app/',
24
24
  Docs: 'https://docs.immich.app/',
25
+ Get: 'https://get.immich.app/',
26
+ My: 'https://my.immich.app/',
25
27
  Store: 'https://immich.store/',
28
+ Ui: 'https://ui.immich.app/',
26
29
  },
27
30
  Pages: {
28
31
  CursedKnowledge: 'https://immich.app/cursed-knowledge',
@@ -30,6 +33,7 @@ export const Constants = {
30
33
  },
31
34
  Npm: {
32
35
  Sdk: 'https://www.npmjs.com/package/@immich/sdk',
36
+ Ui: 'https://www.npmjs.com/package/@immich/ui',
33
37
  },
34
38
  };
35
39
  export const siteCommands = [
@@ -73,6 +77,16 @@ export const siteCommands = [
73
77
  description: 'Support the project by purchasing Immich merchandise',
74
78
  href: Constants.Sites.Store,
75
79
  },
80
+ {
81
+ title: 'Immich Datasets',
82
+ description: 'Help improve Immich by contributing your own files',
83
+ href: Constants.Sites.Datasets,
84
+ },
85
+ {
86
+ title: 'Immich UI',
87
+ description: 'View our Svelte component library, @immich/ui',
88
+ href: Constants.Sites.Ui,
89
+ },
76
90
  {
77
91
  title: 'Cursed Knowledge',
78
92
  description: 'View our collection of cursed knowledge',
@@ -1,53 +1,53 @@
1
1
  @import 'tailwindcss';
2
2
 
3
3
  @theme inline {
4
- --color-primary: rgb(var(--immich-ui-primary));
5
- --color-light: rgb(var(--immich-ui-light));
6
- --color-dark: rgb(var(--immich-ui-dark));
7
- --color-success: rgb(var(--immich-ui-success));
8
- --color-danger: rgb(var(--immich-ui-danger));
9
- --color-warning: rgb(var(--immich-ui-warning));
10
- --color-info: rgb(var(--immich-ui-info));
11
- --color-subtle: rgb(var(--immich-ui-gray));
4
+ --color-primary: rgb(var(--immich-ui-primary));
5
+ --color-light: rgb(var(--immich-ui-light));
6
+ --color-dark: rgb(var(--immich-ui-dark));
7
+ --color-success: rgb(var(--immich-ui-success));
8
+ --color-danger: rgb(var(--immich-ui-danger));
9
+ --color-warning: rgb(var(--immich-ui-warning));
10
+ --color-info: rgb(var(--immich-ui-info));
11
+ --color-subtle: rgb(var(--immich-ui-gray));
12
12
  }
13
13
 
14
14
  @custom-variant dark (&:where(.dark, .dark *):not(.light));
15
15
 
16
16
  @layer base {
17
- :root,
18
- .light {
19
- /* light */
20
- --immich-ui-primary: 66 80 175;
21
- --immich-ui-dark: 20 22 26;
22
- --immich-ui-light: 255 255 255;
23
- --immich-ui-success: 16 188 99;
24
- --immich-ui-danger: 200 60 60;
25
- --immich-ui-warning: 216 143 64;
26
- --immich-ui-info: 8 111 230;
27
- --immich-ui-gray: 246 246 246;
17
+ :root,
18
+ .light {
19
+ /* light */
20
+ --immich-ui-primary: 66 80 175;
21
+ --immich-ui-dark: 20 22 26;
22
+ --immich-ui-light: 255 255 255;
23
+ --immich-ui-success: 16 188 99;
24
+ --immich-ui-danger: 200 60 60;
25
+ --immich-ui-warning: 216 143 64;
26
+ --immich-ui-info: 8 111 230;
27
+ --immich-ui-gray: 246 246 246;
28
28
 
29
- --immich-ui-default-border: 209 213 219;
30
- }
29
+ --immich-ui-default-border: 209 213 219;
30
+ }
31
31
 
32
- .dark {
33
- /* dark */
34
- --immich-ui-primary: 172 203 250;
35
- --immich-ui-light: 0 0 0;
36
- --immich-ui-dark: 229 231 235;
37
- --immich-ui-success: 72 237 152;
38
- --immich-ui-danger: 246 125 125;
39
- --immich-ui-warning: 254 197 132;
40
- --immich-ui-info: 121 183 254;
41
- --immich-ui-gray: 33 33 33;
32
+ .dark {
33
+ /* dark */
34
+ --immich-ui-primary: 172 203 250;
35
+ --immich-ui-light: 0 0 0;
36
+ --immich-ui-dark: 229 231 235;
37
+ --immich-ui-success: 72 237 152;
38
+ --immich-ui-danger: 246 125 125;
39
+ --immich-ui-warning: 254 197 132;
40
+ --immich-ui-info: 121 183 254;
41
+ --immich-ui-gray: 33 33 33;
42
42
 
43
- --immich-ui-default-border: 33 33 33;
44
- }
43
+ --immich-ui-default-border: 33 33 33;
44
+ }
45
45
 
46
- *,
47
- ::after,
48
- ::before,
49
- ::backdrop,
50
- ::file-selector-button {
51
- border-color: rgb(var(--immich-ui-default-border));
52
- }
46
+ *,
47
+ ::after,
48
+ ::before,
49
+ ::backdrop,
50
+ ::file-selector-button {
51
+ border-color: rgb(var(--immich-ui-default-border));
52
+ }
53
53
  }
@@ -8,15 +8,7 @@ export var ByteUnit;
8
8
  ByteUnit["PiB"] = "PiB";
9
9
  ByteUnit["EiB"] = "EiB";
10
10
  })(ByteUnit || (ByteUnit = {}));
11
- const byteUnits = [
12
- ByteUnit.B,
13
- ByteUnit.KiB,
14
- ByteUnit.MiB,
15
- ByteUnit.GiB,
16
- ByteUnit.TiB,
17
- ByteUnit.PiB,
18
- ByteUnit.EiB,
19
- ];
11
+ const byteUnits = [ByteUnit.B, ByteUnit.KiB, ByteUnit.MiB, ByteUnit.GiB, ByteUnit.TiB, ByteUnit.PiB, ByteUnit.EiB];
20
12
  /**
21
13
  * Convert bytes to best human readable unit and number of that unit.
22
14
  *
@@ -29,10 +21,7 @@ const byteUnits = [
29
21
  */
30
22
  export function getBytesWithUnit(bytes, maxPrecision = 1) {
31
23
  const magnitude = Math.floor(Math.log(bytes === 0 ? 1 : bytes) / Math.log(1024));
32
- return [
33
- Number.parseFloat((bytes / 1024 ** magnitude).toFixed(maxPrecision)),
34
- byteUnits[magnitude],
35
- ];
24
+ return [Number.parseFloat((bytes / 1024 ** magnitude).toFixed(maxPrecision)), byteUnits[magnitude]];
36
25
  }
37
26
  /**
38
27
  * Localized number of bytes with a unit.
package/package.json CHANGED
@@ -1,79 +1,79 @@
1
1
  {
2
- "name": "@immich/ui",
3
- "version": "0.30.0",
4
- "license": "GNU Affero General Public License version 3",
5
- "scripts": {
6
- "create": "node scripts/create.js",
7
- "start": "npm run start:dev",
8
- "start:dev": "vite dev",
9
- "watch": "vite build --watch",
10
- "build": "vite build && npm run package",
11
- "preview": "vite preview",
12
- "package": "npm run sync && svelte-package && publint",
13
- "check": "npm run sync && svelte-check --tsconfig ./tsconfig.json",
14
- "check:watch": "npm run sync && svelte-check --tsconfig ./tsconfig.json --watch",
15
- "lint": "eslint . --max-warnings 0",
16
- "lint:fix": "npm run lint -- --fix",
17
- "format": "prettier --check .",
18
- "format:fix": "prettier --write .",
19
- "test": "vitest",
20
- "sync": "svelte-kit sync"
21
- },
22
- "files": [
23
- "dist",
24
- "!dist/**/*.test.*",
25
- "!dist/**/*.spec.*"
26
- ],
27
- "sideEffects": [
28
- "**/*.css"
29
- ],
30
- "svelte": "./dist/index.js",
31
- "types": "./dist/index.d.ts",
32
- "type": "module",
33
- "exports": {
34
- ".": {
35
- "types": "./dist/index.d.ts",
36
- "svelte": "./dist/index.js"
37
- },
38
- "./theme/default.css": "./dist/theme/default.css"
39
- },
40
- "peerDependencies": {
41
- "svelte": "^5.0.0"
42
- },
43
- "devDependencies": {
44
- "@sveltejs/adapter-static": "^3.0.6",
45
- "@sveltejs/kit": "^2.13.0",
46
- "@sveltejs/package": "^2.0.0",
47
- "@sveltejs/vite-plugin-svelte": "^6.0.0",
48
- "@tailwindcss/postcss": "^4.1.7",
49
- "@tailwindcss/vite": "^4.1.7",
50
- "@types/eslint": "^9.6.0",
51
- "autoprefixer": "^10.4.20",
52
- "eslint": "^9.7.0",
53
- "eslint-config-prettier": "^10.0.0",
54
- "eslint-plugin-svelte": "^3.9.3",
55
- "globals": "^16.0.0",
56
- "prettier": "^3.3.2",
57
- "prettier-plugin-svelte": "^3.2.6",
58
- "prettier-plugin-tailwindcss": "^0.6.11",
59
- "publint": "^0.3.0",
60
- "svelte": "^5.37.0",
61
- "svelte-check": "^4.0.0",
62
- "svelte-highlight": "^7.8.0",
63
- "tailwindcss": "^4.1.7",
64
- "typescript": "^5.0.0",
65
- "typescript-eslint": "^8.34.1",
66
- "vite": "^7.0.0",
67
- "vitest": "^3.0.0"
68
- },
69
- "dependencies": {
70
- "@mdi/js": "^7.4.47",
71
- "bits-ui": "^2.9.8",
72
- "simple-icons": "^15.14.0",
73
- "tailwind-merge": "^3.0.0",
74
- "tailwind-variants": "^3.0.0"
75
- },
76
- "volta": {
77
- "node": "22.19.0"
78
- }
2
+ "name": "@immich/ui",
3
+ "version": "0.31.0",
4
+ "license": "GNU Affero General Public License version 3",
5
+ "scripts": {
6
+ "create": "node scripts/create.js",
7
+ "start": "npm run start:dev",
8
+ "start:dev": "vite dev",
9
+ "watch": "vite build --watch",
10
+ "build": "vite build && npm run package",
11
+ "preview": "vite preview",
12
+ "package": "npm run sync && svelte-package && publint",
13
+ "check": "npm run sync && svelte-check --tsconfig ./tsconfig.json",
14
+ "check:watch": "npm run sync && svelte-check --tsconfig ./tsconfig.json --watch",
15
+ "lint": "eslint . --max-warnings 0",
16
+ "lint:fix": "npm run lint -- --fix",
17
+ "format": "prettier --check .",
18
+ "format:fix": "prettier --write .",
19
+ "test": "vitest",
20
+ "sync": "svelte-kit sync"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "!dist/**/*.test.*",
25
+ "!dist/**/*.spec.*"
26
+ ],
27
+ "sideEffects": [
28
+ "**/*.css"
29
+ ],
30
+ "svelte": "./dist/index.js",
31
+ "types": "./dist/index.d.ts",
32
+ "type": "module",
33
+ "exports": {
34
+ ".": {
35
+ "types": "./dist/index.d.ts",
36
+ "svelte": "./dist/index.js"
37
+ },
38
+ "./theme/default.css": "./dist/theme/default.css"
39
+ },
40
+ "peerDependencies": {
41
+ "svelte": "^5.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@sveltejs/adapter-static": "^3.0.6",
45
+ "@sveltejs/kit": "^2.13.0",
46
+ "@sveltejs/package": "^2.0.0",
47
+ "@sveltejs/vite-plugin-svelte": "^6.0.0",
48
+ "@tailwindcss/postcss": "^4.1.7",
49
+ "@tailwindcss/vite": "^4.1.7",
50
+ "@types/eslint": "^9.6.0",
51
+ "autoprefixer": "^10.4.20",
52
+ "eslint": "^9.7.0",
53
+ "eslint-config-prettier": "^10.0.0",
54
+ "eslint-plugin-svelte": "^3.9.3",
55
+ "globals": "^16.0.0",
56
+ "prettier": "^3.3.2",
57
+ "prettier-plugin-svelte": "^3.2.6",
58
+ "prettier-plugin-tailwindcss": "^0.6.11",
59
+ "publint": "^0.3.0",
60
+ "svelte": "^5.37.0",
61
+ "svelte-check": "^4.0.0",
62
+ "svelte-highlight": "^7.8.4",
63
+ "tailwindcss": "^4.1.7",
64
+ "typescript": "^5.0.0",
65
+ "typescript-eslint": "^8.34.1",
66
+ "vite": "^7.0.0",
67
+ "vitest": "^3.0.0"
68
+ },
69
+ "dependencies": {
70
+ "@mdi/js": "^7.4.47",
71
+ "bits-ui": "^2.9.8",
72
+ "simple-icons": "^15.14.0",
73
+ "tailwind-merge": "^3.0.0",
74
+ "tailwind-variants": "^3.0.0"
75
+ },
76
+ "volta": {
77
+ "node": "22.19.0"
78
+ }
79
79
  }