@wrnrlr/prelude 0.2.27 → 0.2.29
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.
- package/deno.jsonc +1 -1
- package/example/widget.html +6 -1
- package/package.json +1 -1
- package/src/form.js +8 -3
- package/src/mod.ts +1 -1
package/deno.jsonc
CHANGED
package/example/widget.html
CHANGED
@@ -68,7 +68,7 @@ import { h, signal, render, Input } from '../src/mod.ts'
|
|
68
68
|
|
69
69
|
function InputExample() {
|
70
70
|
const name = signal('Bob')
|
71
|
-
return h(Input, {value:()=>name})
|
71
|
+
return [h(Input, {value:()=>name}), name]
|
72
72
|
}
|
73
73
|
|
74
74
|
render(InputExample, document.getElementById('input_autosize'))
|
@@ -135,4 +135,9 @@ label {
|
|
135
135
|
}
|
136
136
|
}
|
137
137
|
|
138
|
+
input {
|
139
|
+
border: 1px solid gray;
|
140
|
+
padding: 0.5rem;
|
141
|
+
}
|
142
|
+
|
138
143
|
</style>
|
package/package.json
CHANGED
package/src/form.js
CHANGED
@@ -12,11 +12,16 @@ export function Form(props) {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
export function Input(props) {
|
15
|
-
props.onInput = ((e) => props.value((e?.target)?.value))
|
16
|
-
|
15
|
+
// props.onInput = ((e) => props.value((e?.target)?.value))
|
16
|
+
// const autocomplete = props.autocomplete || 'off'
|
17
17
|
// const onInput = ((e) => props.value((e?.target)?.value))
|
18
18
|
if (props.autosize) props.ref = (r) => props.autosize(r, props)
|
19
|
-
return h('input',
|
19
|
+
return h('input', {
|
20
|
+
// value: props.value,
|
21
|
+
onInput: ((e) => props.value((e?.target)?.value)),
|
22
|
+
// autocomplete,
|
23
|
+
...props
|
24
|
+
})
|
20
25
|
}
|
21
26
|
|
22
27
|
export function autosize(r, props) {
|
package/src/mod.ts
CHANGED
@@ -7,7 +7,7 @@ export {r, type Runtime} from './runtime.ts'
|
|
7
7
|
export type * from './hyperscript.ts'
|
8
8
|
export {hyperscript} from './hyperscript.ts'
|
9
9
|
export {h} from './web.ts'
|
10
|
-
export {Router} from './router.js'
|
10
|
+
export {useNavigate, useParams, useSearch, Router} from './router.js'
|
11
11
|
export {Switch, Match} from './switch.ts'
|
12
12
|
export {resource,makeAbortable,abortable} from './resource.js'
|
13
13
|
import {r} from './runtime.ts'
|