m3-svelte 4.3.2 → 4.4.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.
@@ -144,11 +144,11 @@
144
144
  }
145
145
  }
146
146
  &.outlined {
147
- outline: 1px solid rgb(var(--m3-scheme-outline));
147
+ outline: 1px solid rgb(var(--m3-scheme-outline-variant));
148
148
  outline-offset: -1px;
149
149
  }
150
150
  &.outlined:not(:disabled, :global(input:disabled) + label) {
151
- outline-color: rgb(var(--m3-scheme-outline));
151
+ outline-color: rgb(var(--m3-scheme-outline-variant));
152
152
  color: rgb(var(--m3-scheme-on-surface-variant));
153
153
  &:is(:global(input:checked) + label) {
154
154
  outline-color: rgb(var(--m3-scheme-inverse-surface));
@@ -14,7 +14,7 @@
14
14
  };
15
15
 
16
16
  let {
17
- name,
17
+ label: _label,
18
18
  leadingIcon,
19
19
  trailingIcon,
20
20
  trailingClick,
@@ -25,7 +25,7 @@
25
25
  enter,
26
26
  ...extra
27
27
  }: {
28
- name: string;
28
+ label: string;
29
29
  leadingIcon?: IconifyIcon;
30
30
  disabled?: boolean;
31
31
  required?: boolean;
@@ -35,6 +35,8 @@
35
35
  } & TrailingProps &
36
36
  HTMLInputAttributes = $props();
37
37
  const id = crypto.randomUUID();
38
+
39
+ let label = $derived(_label || extra.name); // TODO: next breaking version, drop name backsupport
38
40
  </script>
39
41
 
40
42
  <div
@@ -53,7 +55,7 @@
53
55
  {required}
54
56
  {...extra}
55
57
  />
56
- <label class="m3-font-body-large" for={id}>{name}</label>
58
+ <label class="m3-font-body-large" for={id}>{label}</label>
57
59
  <div class="layer"></div>
58
60
  {#if leadingIcon}
59
61
  <Icon icon={leadingIcon} class="leading" />
@@ -8,7 +8,7 @@ type TrailingProps = {
8
8
  trailingClick?: undefined;
9
9
  };
10
10
  type $$ComponentProps = {
11
- name: string;
11
+ label: string;
12
12
  leadingIcon?: IconifyIcon;
13
13
  disabled?: boolean;
14
14
  required?: boolean;
@@ -4,7 +4,7 @@
4
4
  import type { HTMLTextareaAttributes } from "svelte/elements";
5
5
 
6
6
  let {
7
- name,
7
+ label: _label,
8
8
  leadingIcon,
9
9
  disabled = false,
10
10
  required = false,
@@ -12,7 +12,7 @@
12
12
  value = $bindable(""),
13
13
  ...extra
14
14
  }: {
15
- name: string;
15
+ label: string;
16
16
  leadingIcon?: IconifyIcon;
17
17
  disabled?: boolean;
18
18
  required?: boolean;
@@ -34,6 +34,8 @@
34
34
  },
35
35
  };
36
36
  };
37
+
38
+ let label = $derived(_label || extra.name); // TODO: next breaking version, drop name backsupport
37
39
  </script>
38
40
 
39
41
  <div class="m3-container" class:leading-icon={leadingIcon} class:error use:resize>
@@ -46,7 +48,7 @@
46
48
  {required}
47
49
  {...extra}
48
50
  ></textarea>
49
- <label class="m3-font-body-large" for={id}>{name}</label>
51
+ <label class="m3-font-body-large" for={id}>{label}</label>
50
52
  <div class="layer"></div>
51
53
  {#if leadingIcon}
52
54
  <Icon icon={leadingIcon} />
@@ -1,7 +1,7 @@
1
1
  import type { IconifyIcon } from "@iconify/types";
2
2
  import type { HTMLTextareaAttributes } from "svelte/elements";
3
3
  type $$ComponentProps = {
4
- name: string;
4
+ label: string;
5
5
  leadingIcon?: IconifyIcon;
6
6
  disabled?: boolean;
7
7
  required?: boolean;
@@ -14,7 +14,7 @@
14
14
  };
15
15
 
16
16
  let {
17
- name,
17
+ label: _label,
18
18
  leadingIcon,
19
19
  trailingIcon,
20
20
  trailingClick,
@@ -25,7 +25,7 @@
25
25
  enter,
26
26
  ...extra
27
27
  }: {
28
- name: string;
28
+ label: string;
29
29
  leadingIcon?: IconifyIcon;
30
30
  disabled?: boolean;
31
31
  required?: boolean;
@@ -35,6 +35,8 @@
35
35
  } & TrailingProps &
36
36
  HTMLInputAttributes = $props();
37
37
  const id = crypto.randomUUID();
38
+
39
+ let label = $derived(_label || extra.name); // TODO: next breaking version, drop name backsupport
38
40
  </script>
39
41
 
40
42
  <div
@@ -54,7 +56,7 @@
54
56
  {...extra}
55
57
  />
56
58
  <div class="layer"></div>
57
- <label class="m3-font-body-large" for={id}>{name}</label>
59
+ <label class="m3-font-body-large" for={id}>{label}</label>
58
60
  {#if leadingIcon}
59
61
  <Icon icon={leadingIcon} class="leading" />
60
62
  {/if}
@@ -8,7 +8,7 @@ type TrailingProps = {
8
8
  trailingClick?: undefined;
9
9
  };
10
10
  type $$ComponentProps = {
11
- name: string;
11
+ label: string;
12
12
  leadingIcon?: IconifyIcon;
13
13
  disabled?: boolean;
14
14
  required?: boolean;
@@ -4,7 +4,7 @@
4
4
  import type { HTMLTextareaAttributes } from "svelte/elements";
5
5
 
6
6
  let {
7
- name,
7
+ label: _label,
8
8
  leadingIcon,
9
9
  disabled = false,
10
10
  required = false,
@@ -12,7 +12,7 @@
12
12
  value = $bindable(""),
13
13
  ...extra
14
14
  }: {
15
- name: string;
15
+ label: string;
16
16
  leadingIcon?: IconifyIcon;
17
17
  disabled?: boolean;
18
18
  required?: boolean;
@@ -34,6 +34,8 @@
34
34
  },
35
35
  };
36
36
  };
37
+
38
+ let label = $derived(_label || extra.name); // TODO: next breaking version, drop name backsupport
37
39
  </script>
38
40
 
39
41
  <div class="m3-container" class:leading-icon={leadingIcon} class:error use:resize>
@@ -47,7 +49,7 @@
47
49
  {...extra}
48
50
  ></textarea>
49
51
  <div class="layer"></div>
50
- <label class="m3-font-body-large" for={id}>{name}</label>
52
+ <label class="m3-font-body-large" for={id}>{label}</label>
51
53
  {#if leadingIcon}
52
54
  <Icon icon={leadingIcon} />
53
55
  {/if}
@@ -1,7 +1,7 @@
1
1
  import type { IconifyIcon } from "@iconify/types";
2
2
  import type { HTMLTextareaAttributes } from "svelte/elements";
3
3
  type $$ComponentProps = {
4
- name: string;
4
+ label: string;
5
5
  leadingIcon?: IconifyIcon;
6
6
  disabled?: boolean;
7
7
  required?: boolean;
@@ -10,13 +10,13 @@
10
10
  import { easeEmphasized } from "../misc/easing";
11
11
 
12
12
  let {
13
- name,
13
+ label: _label,
14
14
  date = $bindable(""),
15
15
  required = false,
16
16
  disabled = false,
17
17
  ...extra
18
18
  }: {
19
- name: string;
19
+ label: string;
20
20
  date?: string;
21
21
  required?: boolean;
22
22
  disabled?: boolean;
@@ -52,6 +52,8 @@ transform: scaleY(${(t * 0.3 + 0.7) * 100}%);
52
52
  opacity: ${Math.min(t * 3, 1)};`,
53
53
  };
54
54
  };
55
+
56
+ let label = $derived(_label || extra.name); // TODO: next breaking version, drop name backsupport
55
57
  </script>
56
58
 
57
59
  <div class="m3-container" class:has-js={hasJs} class:disabled use:clickOutside>
@@ -64,7 +66,7 @@ opacity: ${Math.min(t * 3, 1)};`,
64
66
  bind:value={date}
65
67
  {...extra}
66
68
  />
67
- <label class="m3-font-body-small" for={id}>{name}</label>
69
+ <label class="m3-font-body-small" for={id}>{label}</label>
68
70
  <button type="button" {disabled} onclick={() => (picker = !picker)}>
69
71
  <Layer />
70
72
  <Icon icon={iconCalendar} />
@@ -1,6 +1,6 @@
1
1
  import type { HTMLInputAttributes } from "svelte/elements";
2
2
  type $$ComponentProps = {
3
- name: string;
3
+ label: string;
4
4
  date?: string;
5
5
  required?: boolean;
6
6
  disabled?: boolean;
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "m3-svelte",
3
- "version": "4.3.2",
3
+ "version": "4.4.0",
4
4
  "license": "Apache-2.0 OR GPL-3.0-only",
5
5
  "repository": "KTibow/m3-svelte",
6
6
  "author": {
7
7
  "name": "KTibow"
8
8
  },
9
9
  "homepage": "https://github.com/KTibow/m3-svelte",
10
+ "funding": "https://github.com/sponsors/KTibow",
10
11
  "files": [
11
12
  "package",
12
13
  "!package/**/*.test.*",
@@ -29,20 +30,20 @@
29
30
  },
30
31
  "dependencies": {
31
32
  "@iconify/types": "^2.0.0",
32
- "@ktibow/iconset-material-symbols": "^0.0.1749408756",
33
- "@ktibow/material-color-utilities-nightly": "^0.3.11749432490635",
34
- "svelte": "^5.33.18"
33
+ "@ktibow/iconset-material-symbols": "^0.0.1749705809",
34
+ "@ktibow/material-color-utilities-nightly": "^0.3.11750037236983",
35
+ "svelte": "^5.34.3"
35
36
  },
36
37
  "devDependencies": {
37
- "@eslint/compat": "^1.2.9",
38
- "@eslint/js": "^9.28.0",
38
+ "@eslint/compat": "^1.3.0",
39
+ "@eslint/js": "^9.29.0",
39
40
  "@sveltejs/adapter-static": "^3.0.8",
40
- "@sveltejs/kit": "^2.21.3",
41
+ "@sveltejs/kit": "^2.21.5",
41
42
  "@sveltejs/package": "^2.3.11",
42
43
  "@sveltejs/vite-plugin-svelte": "^5.1.0",
43
44
  "eslint": "^9.27.0",
44
45
  "eslint-config-prettier": "^10.1.5",
45
- "eslint-plugin-svelte": "^3.9.1",
46
+ "eslint-plugin-svelte": "^3.9.2",
46
47
  "fast-glob": "^3.3.3",
47
48
  "globals": "^16.2.0",
48
49
  "prettier": "^3.5.3",
@@ -51,7 +52,7 @@
51
52
  "svelte-check": "^4.2.1",
52
53
  "svelte-highlight": "^7.8.3",
53
54
  "typescript": "^5.8.3",
54
- "typescript-eslint": "^8.34.0",
55
+ "typescript-eslint": "^8.34.1",
55
56
  "vite": "^6.3.5"
56
57
  },
57
58
  "keywords": [