@bexis2/bexis2-core-ui 0.0.23 → 0.0.25
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/README.md +8 -7
- package/dist/TableView.svelte +1 -1
- package/dist/components/ListView.svelte +5 -5
- package/dist/components/Table/Table.svelte +167 -0
- package/dist/components/Table/Table.svelte.d.ts +17 -0
- package/dist/components/Table/TableFilter.svelte +168 -0
- package/dist/components/Table/TableFilter.svelte.d.ts +21 -0
- package/dist/components/Table/TablePagination.svelte +60 -0
- package/dist/components/Table/TablePagination.svelte.d.ts +17 -0
- package/dist/components/Table/filter.d.ts +4 -0
- package/dist/components/Table/filter.js +83 -0
- package/dist/components/file/FileIcon.svelte +45 -49
- package/dist/components/file/FileInfo.svelte +13 -14
- package/dist/components/file/FileUploader.svelte +34 -37
- package/dist/components/form/Checkbox.svelte +13 -17
- package/dist/components/form/CheckboxKvPList.svelte +10 -12
- package/dist/components/form/CheckboxList.svelte +10 -10
- package/dist/components/form/DateInput.svelte +17 -18
- package/dist/components/form/DateInput.svelte.d.ts +4 -4
- package/dist/components/form/DropdownKvP.svelte +44 -52
- package/dist/components/form/InputContainer.svelte +18 -20
- package/dist/components/form/InputContainer.svelte.d.ts +1 -1
- package/dist/components/form/MultiSelect.svelte +89 -101
- package/dist/components/form/NumberInput.svelte +17 -18
- package/dist/components/form/NumberInput.svelte.d.ts +4 -4
- package/dist/components/form/TextArea.svelte +16 -18
- package/dist/components/form/TextArea.svelte.d.ts +4 -5
- package/dist/components/form/TextInput.svelte +17 -21
- package/dist/components/form/TextInput.svelte.d.ts +4 -4
- package/dist/components/spinner/Spinner.svelte +9 -8
- package/dist/css/core.ui.css +5 -2
- package/dist/css/themes/theme-bexis2.css +96 -100
- package/dist/css/themes/theme-crimson.css +3 -2
- package/dist/css/themes/theme-hamlindigo.css +3 -2
- package/dist/css/themes/theme-seafoam.css +3 -2
- package/dist/models/Models.d.ts +28 -0
- package/dist/services/Api.js +12 -11
- package/dist/stores/apistore.js +13 -13
- package/package.json +101 -86
- package/src/lib/TableView.svelte +1 -1
- package/src/lib/components/ListView.svelte +11 -13
- package/src/lib/components/Table/Table.svelte +184 -0
- package/src/lib/components/Table/TableFilter.svelte +176 -0
- package/src/lib/components/Table/TablePagination.svelte +61 -0
- package/src/lib/components/Table/filter.ts +94 -0
- package/src/lib/components/file/FileIcon.svelte +45 -49
- package/src/lib/components/file/FileInfo.svelte +13 -14
- package/src/lib/components/file/FileUploader.svelte +184 -217
- package/src/lib/components/form/Checkbox.svelte +24 -32
- package/src/lib/components/form/CheckboxKvPList.svelte +21 -24
- package/src/lib/components/form/CheckboxList.svelte +21 -22
- package/src/lib/components/form/DateInput.svelte +24 -30
- package/src/lib/components/form/DropdownKvP.svelte +44 -52
- package/src/lib/components/form/InputContainer.svelte +22 -27
- package/src/lib/components/form/MultiSelect.svelte +89 -101
- package/src/lib/components/form/NumberInput.svelte +24 -30
- package/src/lib/components/form/TextArea.svelte +23 -28
- package/src/lib/components/form/TextInput.svelte +24 -33
- package/src/lib/components/spinner/Spinner.svelte +9 -8
- package/src/lib/css/core.ui.css +5 -2
- package/src/lib/css/themes/theme-bexis2.css +96 -100
- package/src/lib/css/themes/theme-crimson.css +3 -2
- package/src/lib/css/themes/theme-hamlindigo.css +3 -2
- package/src/lib/css/themes/theme-seafoam.css +3 -2
- package/src/lib/index.ts +31 -23
- package/src/lib/models/Models.ts +70 -39
- package/src/lib/services/Api.ts +55 -58
- package/src/lib/stores/apistore.ts +28 -32
|
@@ -1,32 +1,24 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
bind:checked={checked}
|
|
26
|
-
on:input
|
|
27
|
-
/>
|
|
28
|
-
</InputContainer>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let id: string = '';
|
|
5
|
+
export let label: string = '';
|
|
6
|
+
export let checked: bool = false;
|
|
7
|
+
|
|
8
|
+
export let valid: boolean;
|
|
9
|
+
export let invalid: boolean;
|
|
10
|
+
export let required: boolean;
|
|
11
|
+
export let feedback: [];
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputContainer {label} {feedback} {required}>
|
|
15
|
+
<input
|
|
16
|
+
{id}
|
|
17
|
+
class="input variant-form-material"
|
|
18
|
+
type="checkbox"
|
|
19
|
+
class:input-success={valid}
|
|
20
|
+
class:input-error={invalid}
|
|
21
|
+
bind:checked
|
|
22
|
+
on:input
|
|
23
|
+
/>
|
|
24
|
+
</InputContainer>
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</InputContainer>
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let source;
|
|
5
|
+
export let target;
|
|
6
|
+
export let title;
|
|
7
|
+
export let description = '';
|
|
8
|
+
export let key;
|
|
9
|
+
|
|
10
|
+
let required = false;
|
|
11
|
+
let feedback: [];
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputContainer label={title} {feedback} {required}>
|
|
15
|
+
{#each source as item}
|
|
16
|
+
<label class="flex items-center space-x-2" for={key}>
|
|
17
|
+
<input class="checkbox" type="checkbox" bind:group={target} checked={item.key} />
|
|
18
|
+
<p>{item.value}</p>
|
|
19
|
+
</label>
|
|
20
|
+
{/each}
|
|
21
|
+
</InputContainer>
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</InputContainer>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let source;
|
|
5
|
+
export let target;
|
|
6
|
+
export let title;
|
|
7
|
+
export let description = '';
|
|
8
|
+
export let key;
|
|
9
|
+
|
|
10
|
+
let required = false;
|
|
11
|
+
let feedback: [];
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputContainer label={title} {feedback} {required}>
|
|
15
|
+
{#each source as item}
|
|
16
|
+
<label class="flex items-center space-x-2" for={key}>
|
|
17
|
+
<input class="checkbox" type="checkbox" bind:group={target} value={item} />
|
|
18
|
+
<p>{item}</p>
|
|
19
|
+
</label>
|
|
20
|
+
{/each}
|
|
21
|
+
</InputContainer>
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class:input-error="{invalid}"
|
|
26
|
-
bind:value={value}
|
|
27
|
-
on:input
|
|
28
|
-
/>
|
|
29
|
-
</InputContainer>
|
|
30
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let id: string = '';
|
|
5
|
+
export let label: string = '';
|
|
6
|
+
export let value: string = '';
|
|
7
|
+
|
|
8
|
+
export let valid: boolean = false;
|
|
9
|
+
export let invalid: boolean = false;
|
|
10
|
+
export let required: boolean = false;
|
|
11
|
+
export let feedback: string[] = [''];
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputContainer {label} {feedback} {required}>
|
|
15
|
+
<input
|
|
16
|
+
{id}
|
|
17
|
+
class="input variant-form-material"
|
|
18
|
+
type="date"
|
|
19
|
+
class:input-success={valid}
|
|
20
|
+
class:input-error={invalid}
|
|
21
|
+
bind:value
|
|
22
|
+
on:input
|
|
23
|
+
/>
|
|
24
|
+
</InputContainer>
|
|
@@ -1,52 +1,44 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
$:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
>
|
|
46
|
-
<option value={null}>-- Please select --</option>
|
|
47
|
-
{#each source as e}
|
|
48
|
-
<option value={e.id} >{e.text}</option>
|
|
49
|
-
{/each}
|
|
50
|
-
</select>
|
|
51
|
-
</InputContainer>
|
|
52
|
-
|
|
1
|
+
<script>
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let id;
|
|
5
|
+
export let source;
|
|
6
|
+
export let target;
|
|
7
|
+
export let title;
|
|
8
|
+
export let valid;
|
|
9
|
+
export let invalid;
|
|
10
|
+
export let feedback;
|
|
11
|
+
export let required;
|
|
12
|
+
|
|
13
|
+
$: selected = null;
|
|
14
|
+
|
|
15
|
+
$: updatedSelectedValue(target);
|
|
16
|
+
$: updatedTarget(selected);
|
|
17
|
+
|
|
18
|
+
function updatedSelectedValue(selection) {
|
|
19
|
+
if (selection != null) {
|
|
20
|
+
selected = selection.id;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function updatedTarget(id) {
|
|
25
|
+
target = source.find((opt) => opt.id === id);
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<InputContainer label={title} {feedback} {required}>
|
|
30
|
+
<select
|
|
31
|
+
{id}
|
|
32
|
+
class="select variant-form-material"
|
|
33
|
+
class:input-success={valid}
|
|
34
|
+
class:input-error={invalid}
|
|
35
|
+
bind:value={selected}
|
|
36
|
+
on:change
|
|
37
|
+
on:select
|
|
38
|
+
>
|
|
39
|
+
<option value={null}>-- Please select --</option>
|
|
40
|
+
{#each source as e}
|
|
41
|
+
<option value={e.id}>{e.text}</option>
|
|
42
|
+
{/each}
|
|
43
|
+
</select>
|
|
44
|
+
</InputContainer>
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{/if}
|
|
24
|
-
</label>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let label: string = '';
|
|
3
|
+
export let required: boolean;
|
|
4
|
+
export let feedback: string[];
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<label class="label">
|
|
8
|
+
<span
|
|
9
|
+
>{label}
|
|
10
|
+
{#if required} <span class="text-sm text-red-600">*</span> {/if}
|
|
11
|
+
</span>
|
|
12
|
+
<slot />
|
|
13
|
+
{#if feedback}
|
|
14
|
+
<span class="text-sm text-error-600">
|
|
15
|
+
<ul>
|
|
16
|
+
{#each feedback as message}
|
|
17
|
+
<li>{message}</li>
|
|
18
|
+
{/each}
|
|
19
|
+
</ul>
|
|
20
|
+
</span>
|
|
21
|
+
{/if}
|
|
22
|
+
</label>
|
|
@@ -1,101 +1,89 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
items={source}
|
|
91
|
-
{itemId}
|
|
92
|
-
{label}
|
|
93
|
-
multiple={isMulti}
|
|
94
|
-
bind:value
|
|
95
|
-
placeholder="-- Please select --"
|
|
96
|
-
|
|
97
|
-
>
|
|
98
|
-
</Select>
|
|
99
|
-
</InputContainer>
|
|
100
|
-
|
|
101
|
-
|
|
1
|
+
<script>
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
import Select from 'svelte-select';
|
|
5
|
+
import { onMount } from 'svelte';
|
|
6
|
+
|
|
7
|
+
export let source;
|
|
8
|
+
export let target;
|
|
9
|
+
export let title;
|
|
10
|
+
export let itemId = 'value';
|
|
11
|
+
export let label = 'label';
|
|
12
|
+
export let isMulti = true;
|
|
13
|
+
export let isComplex = false;
|
|
14
|
+
export let isTargetComplex = false;
|
|
15
|
+
export let required = false;
|
|
16
|
+
export let feedback = [];
|
|
17
|
+
|
|
18
|
+
let isLoaded = false;
|
|
19
|
+
|
|
20
|
+
$: value = null;
|
|
21
|
+
$: updateTarget(value);
|
|
22
|
+
|
|
23
|
+
function updateTarget(selection) {
|
|
24
|
+
//diffrent cases
|
|
25
|
+
//onsole.log("------");
|
|
26
|
+
|
|
27
|
+
//a) source is complex model is simple
|
|
28
|
+
if (isComplex && !isTargetComplex && isLoaded) {
|
|
29
|
+
target = [];
|
|
30
|
+
for (let i in selection) {
|
|
31
|
+
let item = selection[i];
|
|
32
|
+
target.push(item.key);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!isComplex && !isTargetComplex && isLoaded) {
|
|
37
|
+
target = [];
|
|
38
|
+
for (let i in selection) {
|
|
39
|
+
target.push(selection[i].value);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//console.log("selection "+title,selection);
|
|
43
|
+
//console.log("target "+title,target);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
onMount(async () => {
|
|
47
|
+
//console.log("on mount multiselect");
|
|
48
|
+
//console.log(source);
|
|
49
|
+
|
|
50
|
+
//a) source is complex model is simple
|
|
51
|
+
if (isComplex && !isTargetComplex) {
|
|
52
|
+
let items = [];
|
|
53
|
+
// event.detail will be null unless isMulti is true and user has removed a single item
|
|
54
|
+
for (let i in target) {
|
|
55
|
+
let t = target[i];
|
|
56
|
+
items.push(source.find((item) => item.key === t));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
isLoaded = true;
|
|
60
|
+
if (items.length > 0) {
|
|
61
|
+
value = items;
|
|
62
|
+
}
|
|
63
|
+
//console.log(value);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//b) simple liust and simple model
|
|
67
|
+
if (!isComplex && !isTargetComplex) {
|
|
68
|
+
//console.log("source", source);
|
|
69
|
+
//console.log("target",target);
|
|
70
|
+
isLoaded = true;
|
|
71
|
+
//set target only if its nit empty
|
|
72
|
+
if (target != null && target !== undefined && target != '') {
|
|
73
|
+
value = target;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<InputContainer label={title} {feedback} {required}>
|
|
80
|
+
<Select
|
|
81
|
+
class="select variant-form-material"
|
|
82
|
+
items={source}
|
|
83
|
+
{itemId}
|
|
84
|
+
{label}
|
|
85
|
+
multiple={isMulti}
|
|
86
|
+
bind:value
|
|
87
|
+
placeholder="-- Please select --"
|
|
88
|
+
/>
|
|
89
|
+
</InputContainer>
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class:input-error="{invalid}"
|
|
26
|
-
bind:value={value}
|
|
27
|
-
on:input
|
|
28
|
-
/>
|
|
29
|
-
</InputContainer>
|
|
30
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let id: string = '';
|
|
5
|
+
export let label: string = '';
|
|
6
|
+
export let value: string = '';
|
|
7
|
+
|
|
8
|
+
export let valid: boolean = false;
|
|
9
|
+
export let invalid: boolean = false;
|
|
10
|
+
export let required: boolean = false;
|
|
11
|
+
export let feedback: string[] = [''];
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputContainer {label} {feedback} {required}>
|
|
15
|
+
<input
|
|
16
|
+
{id}
|
|
17
|
+
class="input variant-form-material"
|
|
18
|
+
type="number"
|
|
19
|
+
class:input-success={valid}
|
|
20
|
+
class:input-error={invalid}
|
|
21
|
+
bind:value
|
|
22
|
+
on:input
|
|
23
|
+
/>
|
|
24
|
+
</InputContainer>
|
|
@@ -1,28 +1,23 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export let
|
|
6
|
-
export let
|
|
7
|
-
|
|
8
|
-
export let
|
|
9
|
-
|
|
10
|
-
export let
|
|
11
|
-
export let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
bind:value={value}
|
|
25
|
-
on:input/>
|
|
26
|
-
</InputContainer>
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import InputContainer from './InputContainer.svelte';
|
|
3
|
+
|
|
4
|
+
export let id: string = '';
|
|
5
|
+
export let label: string = '';
|
|
6
|
+
export let value: string = '';
|
|
7
|
+
|
|
8
|
+
export let valid: boolean = false;
|
|
9
|
+
export let invalid: boolean = false;
|
|
10
|
+
export let required: boolean = false;
|
|
11
|
+
export let feedback: string[] = [''];
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputContainer {label} {feedback} {required}>
|
|
15
|
+
<textarea
|
|
16
|
+
{id}
|
|
17
|
+
class="textarea variant-form-material"
|
|
18
|
+
class:input-success={valid}
|
|
19
|
+
class:input-error={invalid}
|
|
20
|
+
bind:value
|
|
21
|
+
on:input
|
|
22
|
+
/>
|
|
23
|
+
</InputContainer>
|