@tuspe/components 1.8.5 → 1.8.6

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.
@@ -7,17 +7,18 @@
7
7
  onchange?: () => void
8
8
  checked?: boolean
9
9
  disabled?: boolean
10
+ group?: boolean
10
11
  id?: string
11
12
  outerClass?: string
12
13
  required?: boolean
13
- value?: string
14
+ value?: number | string
14
15
  }
15
16
 
16
- let {children, onchange, checked = $bindable(false), disabled, id, outerClass, required, value}: Props = $props()
17
+ let {children, onchange, checked = $bindable(false), disabled, group = $bindable(), id, outerClass, required, value, ...props}: Props = $props()
17
18
  </script>
18
19
 
19
20
  <label class={outerClass}>
20
- <input bind:checked disabled={disabled || $loading} {id} {onchange} {required} type="checkbox" {value} />
21
+ <input bind:checked disabled={disabled || $loading} {id} {onchange} {required} type="checkbox" {value} {...props} />
21
22
  <span>
22
23
  {@render children?.()}
23
24
  {#if required}<sup>*</sup>{/if}
@@ -4,11 +4,12 @@ interface Props {
4
4
  onchange?: () => void;
5
5
  checked?: boolean;
6
6
  disabled?: boolean;
7
+ group?: boolean;
7
8
  id?: string;
8
9
  outerClass?: string;
9
10
  required?: boolean;
10
- value?: string;
11
+ value?: number | string;
11
12
  }
12
- declare const Checkbox: import("svelte").Component<Props, {}, "checked">;
13
+ declare const Checkbox: import("svelte").Component<Props, {}, "checked" | "group">;
13
14
  type Checkbox = ReturnType<typeof Checkbox>;
14
15
  export default Checkbox;
package/dist/Input.svelte CHANGED
@@ -35,7 +35,8 @@
35
35
  required = false,
36
36
  step,
37
37
  type = 'text',
38
- value = $bindable()
38
+ value = $bindable(),
39
+ ...props
39
40
  }: Props = $props()
40
41
 
41
42
  let classes = $state('')
@@ -63,9 +64,23 @@
63
64
  {required}
64
65
  {placeholder}
65
66
  rows={4}
67
+ {...props}
66
68
  ></textarea>
67
69
  {:else if ['date', 'number'].includes(type)}
68
- <input bind:value class={classes} disabled={disabled || $loading} lang="fi-FI" {max} {min} {onchange} {required} {step} {type} {placeholder} />
70
+ <input
71
+ bind:value
72
+ class={classes}
73
+ disabled={disabled || $loading}
74
+ lang="fi-FI"
75
+ {max}
76
+ {min}
77
+ {onchange}
78
+ {required}
79
+ {step}
80
+ {type}
81
+ {placeholder}
82
+ {...props}
83
+ />
69
84
  {:else}
70
85
  <input
71
86
  bind:value
@@ -78,6 +93,7 @@
78
93
  maxlength={max ? Number(max) : undefined}
79
94
  minlength={min ? Number(min) : undefined}
80
95
  onkeyup={onchange}
96
+ {...props}
81
97
  />
82
98
  {#if type === 'search'}
83
99
  <svg
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuspe/components",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description": "A reusable SvelteKit component library for form elements, breadcrumbs, prices and images.",
5
5
  "keywords": [
6
6
  "svelteKit",
@@ -61,22 +61,22 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@eslint/compat": "^1.2.8",
64
- "@eslint/js": "^9.24.0",
64
+ "@eslint/js": "^9.25.1",
65
65
  "@sveltejs/adapter-static": "^3.0.8",
66
- "@sveltejs/kit": "^2.20.5",
67
- "@sveltejs/package": "^2.3.10",
66
+ "@sveltejs/kit": "^2.20.7",
67
+ "@sveltejs/package": "^2.3.11",
68
68
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
69
69
  "eslint-config-prettier": "^10.1.2",
70
70
  "eslint-plugin-svelte": "^3.5.1",
71
- "eslint": "^9.24.0",
71
+ "eslint": "^9.25.1",
72
72
  "globals": "^16.0.0",
73
73
  "prettier-plugin-svelte": "^3.3.3",
74
74
  "prettier": "^3.5.3",
75
- "publint": "^0.3.11",
76
- "svelte-check": "^4.1.5",
77
- "svelte": "^5.25.12",
78
- "typescript-eslint": "^8.29.1",
75
+ "publint": "^0.3.12",
76
+ "svelte-check": "^4.1.6",
77
+ "svelte": "^5.28.2",
78
+ "typescript-eslint": "^8.31.0",
79
79
  "typescript": "^5.8.3",
80
- "vite": "^6.2.6"
80
+ "vite": "^6.3.3"
81
81
  }
82
- }
82
+ }