File tree Expand file tree Collapse file tree 3 files changed +500
-247
lines changed Expand file tree Collapse file tree 3 files changed +500
-247
lines changed Original file line number Diff line number Diff line change 13
13
},
14
14
"type" : " module" ,
15
15
"devDependencies" : {
16
- "@lokalise/node-api" : " ^13.0.0 " ,
16
+ "@lokalise/node-api" : " ^13.2.1 " ,
17
17
"@sveltejs/adapter-static" : " ^3.0.8" ,
18
- "@sveltejs/kit" : " ^2.16.0 " ,
18
+ "@sveltejs/kit" : " ^2.17.3 " ,
19
19
"@sveltejs/vite-plugin-svelte" : " ^5.0.3" ,
20
20
"@zerodevx/svelte-toast" : " ^0.9.6" ,
21
21
"adm-zip" : " ^0.5.16" ,
22
22
"dotenv" : " ^16.4.7" ,
23
- "svelte" : " ^5.19.0 " ,
23
+ "svelte" : " ^5.20.5 " ,
24
24
"svelte-check" : " ^4.1.4" ,
25
25
"svelte-intl-precompile" : " ^0.12.3" ,
26
26
"tslib" : " ^2.8.1" ,
27
27
"typescript" : " ^5.7.3" ,
28
- "vite" : " ^6.0.9 "
28
+ "vite" : " ^6.2.0 "
29
29
},
30
30
"dependencies" : {
31
31
"@fontsource/fira-mono" : " ^5.1.1" ,
Original file line number Diff line number Diff line change 21
21
... rest
22
22
}: HTMLInputAttributes & Props = $props ()
23
23
24
- const initialType = rest .type
24
+ const initialType = $state ( rest .type )
25
25
const isPassword = initialType === ' password'
26
26
let hidden = $state (true )
27
27
28
28
let valid = $derived (validate (value ))
29
-
30
- $effect (() => {
31
- if (isPassword ) {
32
- value
33
- rest .type = hidden ? initialType : ' text'
34
- }
35
- })
29
+ let type = $derived (isPassword ? (hidden ? ' password' : ' text' ) : rest .type )
36
30
37
31
function toggle() {
32
+ console .debug (' toggle' )
38
33
hidden = ! hidden
39
34
}
40
35
50
45
<span class ="error-text" >{valid }</span >
51
46
{/if }
52
47
</small >
53
- <input bind:value {...rest } class:valid ={valid === true } />
48
+ <input bind:value {...rest } { type } autocomplete = "off" class:valid ={valid === true } />
54
49
<div class =" icons" >
55
50
{#if isPassword }
56
51
<Icon
You can’t perform that action at this time.
0 commit comments