@budibase/bbui 1.0.159-alpha.2 → 1.0.159-alpha.3
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/dist/bbui.es.js +1 -1
- package/dist/bbui.es.js.map +1 -1
- package/package.json +3 -3
- package/src/Form/Core/TextField.svelte +10 -1
- package/src/Form/Input.svelte +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/bbui",
|
|
3
3
|
"description": "A UI solution used in the different Budibase projects.",
|
|
4
|
-
"version": "1.0.159-alpha.
|
|
4
|
+
"version": "1.0.159-alpha.3",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.js",
|
|
7
7
|
"module": "dist/bbui.es.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
|
41
|
-
"@budibase/string-templates": "^1.0.159-alpha.
|
|
41
|
+
"@budibase/string-templates": "^1.0.159-alpha.3",
|
|
42
42
|
"@spectrum-css/actionbutton": "^1.0.1",
|
|
43
43
|
"@spectrum-css/actiongroup": "^1.0.1",
|
|
44
44
|
"@spectrum-css/avatar": "^3.0.2",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"svelte-flatpickr": "^3.2.3",
|
|
85
85
|
"svelte-portal": "^1.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "be33930ae32dd38fda77a87f8e21e4209035a68b"
|
|
88
88
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import "@spectrum-css/textfield/dist/index-vars.css"
|
|
3
|
-
import { createEventDispatcher } from "svelte"
|
|
3
|
+
import { createEventDispatcher, onMount } from "svelte"
|
|
4
4
|
|
|
5
5
|
export let value = null
|
|
6
6
|
export let placeholder = null
|
|
@@ -13,8 +13,11 @@
|
|
|
13
13
|
export let quiet = false
|
|
14
14
|
export let dataCy
|
|
15
15
|
export let align
|
|
16
|
+
export let autofocus = false
|
|
16
17
|
|
|
17
18
|
const dispatch = createEventDispatcher()
|
|
19
|
+
|
|
20
|
+
let field
|
|
18
21
|
let focus = false
|
|
19
22
|
|
|
20
23
|
const updateValue = newValue => {
|
|
@@ -58,6 +61,11 @@
|
|
|
58
61
|
updateValue(event.target.value)
|
|
59
62
|
}
|
|
60
63
|
}
|
|
64
|
+
|
|
65
|
+
onMount(() => {
|
|
66
|
+
focus = autofocus
|
|
67
|
+
if (focus) field.focus()
|
|
68
|
+
})
|
|
61
69
|
</script>
|
|
62
70
|
|
|
63
71
|
<div
|
|
@@ -77,6 +85,7 @@
|
|
|
77
85
|
</svg>
|
|
78
86
|
{/if}
|
|
79
87
|
<input
|
|
88
|
+
bind:this={field}
|
|
80
89
|
{disabled}
|
|
81
90
|
{readonly}
|
|
82
91
|
{id}
|
package/src/Form/Input.svelte
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
export let updateOnChange = true
|
|
15
15
|
export let quiet = false
|
|
16
16
|
export let dataCy
|
|
17
|
+
export let autofocus
|
|
17
18
|
|
|
18
19
|
const dispatch = createEventDispatcher()
|
|
19
20
|
const onChange = e => {
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
{placeholder}
|
|
34
35
|
{type}
|
|
35
36
|
{quiet}
|
|
37
|
+
{autofocus}
|
|
36
38
|
on:change={onChange}
|
|
37
39
|
on:click
|
|
38
40
|
on:input
|