@bexis2/bexis2-core-ui 0.3.0 → 0.3.2
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 +5 -0
- package/dist/TableView.svelte +1 -1
- package/dist/components/File/FileIcon.svelte +45 -45
- package/dist/components/File/FileInfo.svelte +13 -13
- package/dist/components/ListView.svelte +5 -5
- package/dist/components/form/Checkbox.svelte +13 -13
- package/dist/components/form/CheckboxKvPList.svelte +16 -16
- package/dist/components/form/CheckboxList.svelte +10 -10
- package/dist/components/form/DateInput.svelte +14 -14
- package/dist/components/form/DropdownKvP.svelte +54 -54
- package/dist/components/form/NumberInput.svelte +15 -15
- package/dist/components/form/TextArea.svelte +14 -14
- package/dist/components/form/TextInput.svelte +15 -15
- package/dist/components/page/Alert.svelte +28 -28
- package/dist/components/page/BackToTop.svelte +30 -30
- package/dist/components/page/Docs.svelte +22 -22
- package/dist/components/page/ErrorMessage.svelte +8 -8
- package/dist/components/page/Footer.svelte +5 -5
- package/dist/components/page/Header.svelte +5 -5
- package/dist/components/page/HelpPopUp.svelte +30 -30
- package/dist/components/page/PageCaller.js +19 -19
- package/dist/components/page/Spinner.svelte +14 -14
- package/dist/components/page/menu/MenuDataCaller.js +10 -10
- package/dist/css/core.ui.postcss +17 -17
- package/dist/css/themes/theme-bexis2.css +96 -96
- package/dist/css/themes/theme-crimson.css +101 -101
- package/dist/css/themes/theme-gold-nouveau.css +140 -140
- package/dist/css/themes/theme-hamlindigo.css +112 -112
- package/dist/css/themes/theme-modern.css +127 -127
- package/dist/css/themes/theme-rocket.css +119 -119
- package/dist/css/themes/theme-sahara.css +128 -128
- package/dist/css/themes/theme-seafoam.css +122 -122
- package/dist/css/themes/theme-seasonal.css +115 -115
- package/dist/css/themes/theme-skeleton.css +118 -118
- package/dist/css/themes/theme-vintage.css +125 -125
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/services/BaseCaller.js +16 -16
- package/dist/stores/pageStores.js +1 -1
- package/dist/themes/theme-bexis2.d.ts +1 -1
- package/dist/themes/theme-bexis2.js +93 -93
- package/package.json +1 -1
- package/src/lib/TableView.svelte +1 -1
- package/src/lib/components/CodeEditor/CodeEditor.svelte +1 -1
- package/src/lib/components/ListView.svelte +11 -11
- package/src/lib/components/Table/filter.ts +141 -141
- package/src/lib/components/file/FileIcon.svelte +45 -45
- package/src/lib/components/file/FileInfo.svelte +13 -13
- package/src/lib/components/form/Checkbox.svelte +24 -24
- package/src/lib/components/form/CheckboxKvPList.svelte +29 -29
- package/src/lib/components/form/CheckboxList.svelte +21 -21
- package/src/lib/components/form/DateInput.svelte +27 -27
- package/src/lib/components/form/DropdownKvP.svelte +54 -54
- package/src/lib/components/form/NumberInput.svelte +30 -30
- package/src/lib/components/form/TextArea.svelte +28 -28
- package/src/lib/components/form/TextInput.svelte +28 -28
- package/src/lib/components/page/Alert.svelte +41 -41
- package/src/lib/components/page/BackToTop.svelte +30 -30
- package/src/lib/components/page/Docs.svelte +46 -46
- package/src/lib/components/page/ErrorMessage.svelte +10 -10
- package/src/lib/components/page/Footer.svelte +18 -18
- package/src/lib/components/page/Header.svelte +18 -18
- package/src/lib/components/page/HelpPopUp.svelte +72 -72
- package/src/lib/components/page/Notification.svelte +42 -47
- package/src/lib/components/page/Page.svelte +0 -1
- package/src/lib/components/page/PageCaller.js +19 -19
- package/src/lib/components/page/Spinner.svelte +20 -20
- package/src/lib/components/page/menu/MenuDataCaller.js +10 -10
- package/src/lib/css/core.ui.postcss +17 -17
- package/src/lib/css/themes/theme-bexis2.css +96 -96
- package/src/lib/css/themes/theme-crimson.css +101 -101
- package/src/lib/css/themes/theme-gold-nouveau.css +140 -140
- package/src/lib/css/themes/theme-hamlindigo.css +112 -112
- package/src/lib/css/themes/theme-modern.css +127 -127
- package/src/lib/css/themes/theme-rocket.css +119 -119
- package/src/lib/css/themes/theme-sahara.css +128 -128
- package/src/lib/css/themes/theme-seafoam.css +122 -122
- package/src/lib/css/themes/theme-seasonal.css +115 -115
- package/src/lib/css/themes/theme-skeleton.css +118 -118
- package/src/lib/css/themes/theme-vintage.css +125 -125
- package/src/lib/index.ts +5 -0
- package/src/lib/models/Page.ts +40 -40
- package/src/lib/services/Api.ts +55 -55
- package/src/lib/services/BaseCaller.js +16 -16
- package/src/lib/stores/apiStores.ts +34 -34
- package/src/lib/stores/pageStores.ts +4 -3
- package/src/lib/themes/theme-bexis2.ts +95 -97
package/README.md
CHANGED
package/dist/TableView.svelte
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<h1>table</h1>
|
|
1
|
+
<h1>table</h1>
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import Fa from 'svelte-fa';
|
|
3
|
-
import { faFileAudio } from '@fortawesome/free-regular-svg-icons';
|
|
4
|
-
import { faFileVideo } from '@fortawesome/free-regular-svg-icons';
|
|
5
|
-
import { faFileWord } from '@fortawesome/free-regular-svg-icons';
|
|
6
|
-
import { faFilePdf } from '@fortawesome/free-regular-svg-icons';
|
|
7
|
-
import { faFileExcel } from '@fortawesome/free-regular-svg-icons';
|
|
8
|
-
import { faFileAlt } from '@fortawesome/free-regular-svg-icons';
|
|
9
|
-
import { faFileImage } from '@fortawesome/free-regular-svg-icons';
|
|
10
|
-
import { faFileArchive } from '@fortawesome/free-regular-svg-icons';
|
|
11
|
-
|
|
12
|
-
export let type = '';
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
{#if type.includes('excel') || type.includes('spreadsheetml')}
|
|
16
|
-
<Fa icon={faFileExcel} />
|
|
17
|
-
{/if}
|
|
18
|
-
|
|
19
|
-
{#if type.includes('text')}
|
|
20
|
-
<Fa icon={faFileAlt} />
|
|
21
|
-
{/if}
|
|
22
|
-
|
|
23
|
-
{#if type.includes('image')}
|
|
24
|
-
<Fa icon={faFileImage} />
|
|
25
|
-
{/if}
|
|
26
|
-
|
|
27
|
-
{#if type.includes('audio')}
|
|
28
|
-
<Fa icon={faFileAudio} />
|
|
29
|
-
{/if}
|
|
30
|
-
|
|
31
|
-
{#if type.includes('video')}
|
|
32
|
-
<Fa icon={faFileVideo} />
|
|
33
|
-
{/if}
|
|
34
|
-
|
|
35
|
-
{#if type.includes('word')}
|
|
36
|
-
<Fa icon={faFileWord} />
|
|
37
|
-
{/if}
|
|
38
|
-
|
|
39
|
-
{#if type.includes('pdf')}
|
|
40
|
-
<Fa icon={faFilePdf} />
|
|
41
|
-
{/if}
|
|
42
|
-
|
|
43
|
-
{#if type.includes('zip')}
|
|
44
|
-
<Fa icon={faFileArchive} />
|
|
45
|
-
{/if}
|
|
1
|
+
<script>
|
|
2
|
+
import Fa from 'svelte-fa';
|
|
3
|
+
import { faFileAudio } from '@fortawesome/free-regular-svg-icons';
|
|
4
|
+
import { faFileVideo } from '@fortawesome/free-regular-svg-icons';
|
|
5
|
+
import { faFileWord } from '@fortawesome/free-regular-svg-icons';
|
|
6
|
+
import { faFilePdf } from '@fortawesome/free-regular-svg-icons';
|
|
7
|
+
import { faFileExcel } from '@fortawesome/free-regular-svg-icons';
|
|
8
|
+
import { faFileAlt } from '@fortawesome/free-regular-svg-icons';
|
|
9
|
+
import { faFileImage } from '@fortawesome/free-regular-svg-icons';
|
|
10
|
+
import { faFileArchive } from '@fortawesome/free-regular-svg-icons';
|
|
11
|
+
|
|
12
|
+
export let type = '';
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
{#if type.includes('excel') || type.includes('spreadsheetml')}
|
|
16
|
+
<Fa icon={faFileExcel} />
|
|
17
|
+
{/if}
|
|
18
|
+
|
|
19
|
+
{#if type.includes('text')}
|
|
20
|
+
<Fa icon={faFileAlt} />
|
|
21
|
+
{/if}
|
|
22
|
+
|
|
23
|
+
{#if type.includes('image')}
|
|
24
|
+
<Fa icon={faFileImage} />
|
|
25
|
+
{/if}
|
|
26
|
+
|
|
27
|
+
{#if type.includes('audio')}
|
|
28
|
+
<Fa icon={faFileAudio} />
|
|
29
|
+
{/if}
|
|
30
|
+
|
|
31
|
+
{#if type.includes('video')}
|
|
32
|
+
<Fa icon={faFileVideo} />
|
|
33
|
+
{/if}
|
|
34
|
+
|
|
35
|
+
{#if type.includes('word')}
|
|
36
|
+
<Fa icon={faFileWord} />
|
|
37
|
+
{/if}
|
|
38
|
+
|
|
39
|
+
{#if type.includes('pdf')}
|
|
40
|
+
<Fa icon={faFilePdf} />
|
|
41
|
+
{/if}
|
|
42
|
+
|
|
43
|
+
{#if type.includes('zip')}
|
|
44
|
+
<Fa icon={faFileArchive} />
|
|
45
|
+
{/if}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import FileIcon from './FileIcon.svelte';
|
|
3
|
-
|
|
4
|
-
export let name = '';
|
|
5
|
-
export let type = '';
|
|
6
|
-
// export let description;
|
|
7
|
-
export let size = '';
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<div style="font-size:{size}">
|
|
11
|
-
<FileIcon {type} />
|
|
12
|
-
{name}
|
|
13
|
-
</div>
|
|
1
|
+
<script>
|
|
2
|
+
import FileIcon from './FileIcon.svelte';
|
|
3
|
+
|
|
4
|
+
export let name = '';
|
|
5
|
+
export let type = '';
|
|
6
|
+
// export let description;
|
|
7
|
+
export let size = '';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div style="font-size:{size}">
|
|
11
|
+
<FileIcon {type} />
|
|
12
|
+
{name}
|
|
13
|
+
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>let result = { name: "david" };
|
|
2
|
-
</script>
|
|
3
|
-
|
|
4
|
-
<h1>MyList</h1>
|
|
5
|
-
{result.name}
|
|
6
|
-
<b>from bexis-lib</b>
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<h1>MyList</h1>
|
|
5
|
+
{result.name}
|
|
6
|
+
<b>from bexis-lib</b>
|
|
@@ -6,16 +6,16 @@ export let valid;
|
|
|
6
6
|
export let invalid;
|
|
7
7
|
export let required;
|
|
8
8
|
export let feedback;
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<InputContainer {label} {feedback} {required}>
|
|
12
|
-
<input
|
|
13
|
-
{id}
|
|
14
|
-
class="input variant-form-material"
|
|
15
|
-
type="checkbox"
|
|
16
|
-
class:input-success={valid}
|
|
17
|
-
class:input-error={invalid}
|
|
18
|
-
bind:checked
|
|
19
|
-
on:input
|
|
20
|
-
/>
|
|
21
|
-
</InputContainer>
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<InputContainer {label} {feedback} {required}>
|
|
12
|
+
<input
|
|
13
|
+
{id}
|
|
14
|
+
class="input variant-form-material"
|
|
15
|
+
type="checkbox"
|
|
16
|
+
class:input-success={valid}
|
|
17
|
+
class:input-error={invalid}
|
|
18
|
+
bind:checked
|
|
19
|
+
on:input
|
|
20
|
+
/>
|
|
21
|
+
</InputContainer>
|
|
@@ -8,19 +8,19 @@ export let key;
|
|
|
8
8
|
export let help = false;
|
|
9
9
|
let required = false;
|
|
10
10
|
let feedback;
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
14
|
-
{#each source as item}
|
|
15
|
-
<label class="flex items-center space-x-2" for={key}>
|
|
16
|
-
<input
|
|
17
|
-
class="checkbox"
|
|
18
|
-
type="checkbox"
|
|
19
|
-
bind:group={target}
|
|
20
|
-
checked={item.key}
|
|
21
|
-
value={item.key}
|
|
22
|
-
/>
|
|
23
|
-
<p>{item.value}</p>
|
|
24
|
-
</label>
|
|
25
|
-
{/each}
|
|
26
|
-
</InputContainer>
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
14
|
+
{#each source as item}
|
|
15
|
+
<label class="flex items-center space-x-2" for={key}>
|
|
16
|
+
<input
|
|
17
|
+
class="checkbox"
|
|
18
|
+
type="checkbox"
|
|
19
|
+
bind:group={target}
|
|
20
|
+
checked={item.key}
|
|
21
|
+
value={item.key}
|
|
22
|
+
/>
|
|
23
|
+
<p>{item.value}</p>
|
|
24
|
+
</label>
|
|
25
|
+
{/each}
|
|
26
|
+
</InputContainer>
|
|
@@ -6,13 +6,13 @@ export let description = "";
|
|
|
6
6
|
export let key;
|
|
7
7
|
let required = false;
|
|
8
8
|
let feedback;
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<InputContainer label={title} {feedback} {required}>
|
|
12
|
-
{#each source as item}
|
|
13
|
-
<label class="flex items-center space-x-2" for={key}>
|
|
14
|
-
<input class="checkbox" type="checkbox" bind:group={target} value={item} />
|
|
15
|
-
<p>{item}</p>
|
|
16
|
-
</label>
|
|
17
|
-
{/each}
|
|
18
|
-
</InputContainer>
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<InputContainer label={title} {feedback} {required}>
|
|
12
|
+
{#each source as item}
|
|
13
|
+
<label class="flex items-center space-x-2" for={key}>
|
|
14
|
+
<input class="checkbox" type="checkbox" bind:group={target} value={item} />
|
|
15
|
+
<p>{item}</p>
|
|
16
|
+
</label>
|
|
17
|
+
{/each}
|
|
18
|
+
</InputContainer>
|
|
@@ -8,17 +8,17 @@ export let required = false;
|
|
|
8
8
|
export let feedback = [""];
|
|
9
9
|
export let help = false;
|
|
10
10
|
export let disabled = false;
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
14
|
-
<input
|
|
15
|
-
{id}
|
|
16
|
-
class="input variant-form-material"
|
|
17
|
-
type="date"
|
|
18
|
-
class:input-success={valid}
|
|
19
|
-
class:input-error={invalid}
|
|
20
|
-
bind:value
|
|
21
|
-
on:input
|
|
22
|
-
{disabled}
|
|
23
|
-
/>
|
|
24
|
-
</InputContainer>
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
14
|
+
<input
|
|
15
|
+
{id}
|
|
16
|
+
class="input variant-form-material"
|
|
17
|
+
type="date"
|
|
18
|
+
class:input-success={valid}
|
|
19
|
+
class:input-error={invalid}
|
|
20
|
+
bind:value
|
|
21
|
+
on:input
|
|
22
|
+
{disabled}
|
|
23
|
+
/>
|
|
24
|
+
</InputContainer>
|
|
@@ -1,54 +1,54 @@
|
|
|
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 = false;
|
|
9
|
-
export let invalid = false;
|
|
10
|
-
export let feedback = [''];
|
|
11
|
-
export let required = false;
|
|
12
|
-
export let complexTarget = false;
|
|
13
|
-
export let help = false;
|
|
14
|
-
|
|
15
|
-
$: selected = null;
|
|
16
|
-
|
|
17
|
-
$: updatedSelectedValue(target);
|
|
18
|
-
$: updatedTarget(selected);
|
|
19
|
-
|
|
20
|
-
function updatedSelectedValue(selection) {
|
|
21
|
-
if (selection != null) {
|
|
22
|
-
if (complexTarget) {
|
|
23
|
-
selected = selection.id;
|
|
24
|
-
} else {
|
|
25
|
-
selected = selection;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function updatedTarget(id) {
|
|
31
|
-
if (complexTarget) {
|
|
32
|
-
target = source.find((opt) => opt.id === id);
|
|
33
|
-
} else {
|
|
34
|
-
target = id;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
40
|
-
<select
|
|
41
|
-
{id}
|
|
42
|
-
class="select variant-form-material"
|
|
43
|
-
class:input-success={valid}
|
|
44
|
-
class:input-error={invalid}
|
|
45
|
-
bind:value={selected}
|
|
46
|
-
on:change
|
|
47
|
-
on:select
|
|
48
|
-
>
|
|
49
|
-
<option value={null}>-- Please select --</option>
|
|
50
|
-
{#each source as e}
|
|
51
|
-
<option value={e.id}>{e.text}</option>
|
|
52
|
-
{/each}
|
|
53
|
-
</select>
|
|
54
|
-
</InputContainer>
|
|
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 = false;
|
|
9
|
+
export let invalid = false;
|
|
10
|
+
export let feedback = [''];
|
|
11
|
+
export let required = false;
|
|
12
|
+
export let complexTarget = false;
|
|
13
|
+
export let help = false;
|
|
14
|
+
|
|
15
|
+
$: selected = null;
|
|
16
|
+
|
|
17
|
+
$: updatedSelectedValue(target);
|
|
18
|
+
$: updatedTarget(selected);
|
|
19
|
+
|
|
20
|
+
function updatedSelectedValue(selection) {
|
|
21
|
+
if (selection != null) {
|
|
22
|
+
if (complexTarget) {
|
|
23
|
+
selected = selection.id;
|
|
24
|
+
} else {
|
|
25
|
+
selected = selection;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function updatedTarget(id) {
|
|
31
|
+
if (complexTarget) {
|
|
32
|
+
target = source.find((opt) => opt.id === id);
|
|
33
|
+
} else {
|
|
34
|
+
target = id;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
40
|
+
<select
|
|
41
|
+
{id}
|
|
42
|
+
class="select variant-form-material"
|
|
43
|
+
class:input-success={valid}
|
|
44
|
+
class:input-error={invalid}
|
|
45
|
+
bind:value={selected}
|
|
46
|
+
on:change
|
|
47
|
+
on:select
|
|
48
|
+
>
|
|
49
|
+
<option value={null}>-- Please select --</option>
|
|
50
|
+
{#each source as e}
|
|
51
|
+
<option value={e.id}>{e.text}</option>
|
|
52
|
+
{/each}
|
|
53
|
+
</select>
|
|
54
|
+
</InputContainer>
|
|
@@ -10,18 +10,18 @@ export let feedback = [""];
|
|
|
10
10
|
export let placeholder = "";
|
|
11
11
|
export let help = false;
|
|
12
12
|
export let disabled = false;
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
16
|
-
<input
|
|
17
|
-
{id}
|
|
18
|
-
class="input variant-form-material"
|
|
19
|
-
type="number"
|
|
20
|
-
class:input-success={valid}
|
|
21
|
-
class:input-error={invalid}
|
|
22
|
-
bind:value
|
|
23
|
-
on:input
|
|
24
|
-
{placeholder}
|
|
25
|
-
{disabled}
|
|
26
|
-
/>
|
|
27
|
-
</InputContainer>
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
16
|
+
<input
|
|
17
|
+
{id}
|
|
18
|
+
class="input variant-form-material"
|
|
19
|
+
type="number"
|
|
20
|
+
class:input-success={valid}
|
|
21
|
+
class:input-error={invalid}
|
|
22
|
+
bind:value
|
|
23
|
+
on:input
|
|
24
|
+
{placeholder}
|
|
25
|
+
{disabled}
|
|
26
|
+
/>
|
|
27
|
+
</InputContainer>
|
|
@@ -9,17 +9,17 @@ export let feedback = [""];
|
|
|
9
9
|
export let placeholder = "";
|
|
10
10
|
export let help = false;
|
|
11
11
|
export let disabled = false;
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
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
|
-
{placeholder}
|
|
23
|
-
{disabled}
|
|
24
|
-
/>
|
|
25
|
-
</InputContainer>
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
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
|
+
{placeholder}
|
|
23
|
+
{disabled}
|
|
24
|
+
/>
|
|
25
|
+
</InputContainer>
|
|
@@ -9,18 +9,18 @@ export let feedback = [""];
|
|
|
9
9
|
export let placeholder = "";
|
|
10
10
|
export let help = false;
|
|
11
11
|
export let disabled = false;
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
15
|
-
<input
|
|
16
|
-
{id}
|
|
17
|
-
class="input variant-form-material"
|
|
18
|
-
type="text"
|
|
19
|
-
class:input-success={valid}
|
|
20
|
-
class:input-error={invalid}
|
|
21
|
-
bind:value
|
|
22
|
-
on:input
|
|
23
|
-
{placeholder}
|
|
24
|
-
{disabled}
|
|
25
|
-
/>
|
|
26
|
-
</InputContainer>
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
15
|
+
<input
|
|
16
|
+
{id}
|
|
17
|
+
class="input variant-form-material"
|
|
18
|
+
type="text"
|
|
19
|
+
class:input-success={valid}
|
|
20
|
+
class:input-error={invalid}
|
|
21
|
+
bind:value
|
|
22
|
+
on:input
|
|
23
|
+
{placeholder}
|
|
24
|
+
{disabled}
|
|
25
|
+
/>
|
|
26
|
+
</InputContainer>
|
|
@@ -7,31 +7,31 @@ export let cssClass = "";
|
|
|
7
7
|
export let deleteBtn = true;
|
|
8
8
|
$:
|
|
9
9
|
show = true;
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
{#if show}
|
|
13
|
-
<aside class="alert {cssClass}" transition:fade|local={{ duration: 100 }}>
|
|
14
|
-
<!-- Icon -->
|
|
15
|
-
<!-- <div>(icon)</div> -->
|
|
16
|
-
<!-- Message -->
|
|
17
|
-
<div class="alert-message">
|
|
18
|
-
{#if title}
|
|
19
|
-
<h3 class="h3">{title}</h3>
|
|
20
|
-
{/if}
|
|
21
|
-
<p>
|
|
22
|
-
{message}
|
|
23
|
-
<slot />
|
|
24
|
-
</p>
|
|
25
|
-
</div>
|
|
26
|
-
<!-- Actions -->
|
|
27
|
-
<div class="alert-actions">
|
|
28
|
-
<slot name="actions" />
|
|
29
|
-
|
|
30
|
-
{#if deleteBtn}
|
|
31
|
-
<button class="btn hover:text-primary-100" on:click={() => (show = false)}>
|
|
32
|
-
<Fa icon={faXmark} />
|
|
33
|
-
</button>
|
|
34
|
-
{/if}
|
|
35
|
-
</div>
|
|
36
|
-
</aside>
|
|
37
|
-
{/if}
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
{#if show}
|
|
13
|
+
<aside class="alert {cssClass}" transition:fade|local={{ duration: 100 }}>
|
|
14
|
+
<!-- Icon -->
|
|
15
|
+
<!-- <div>(icon)</div> -->
|
|
16
|
+
<!-- Message -->
|
|
17
|
+
<div class="alert-message">
|
|
18
|
+
{#if title}
|
|
19
|
+
<h3 class="h3">{title}</h3>
|
|
20
|
+
{/if}
|
|
21
|
+
<p>
|
|
22
|
+
{message}
|
|
23
|
+
<slot />
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
|
26
|
+
<!-- Actions -->
|
|
27
|
+
<div class="alert-actions">
|
|
28
|
+
<slot name="actions" />
|
|
29
|
+
|
|
30
|
+
{#if deleteBtn}
|
|
31
|
+
<button class="btn hover:text-primary-100" on:click={() => (show = false)}>
|
|
32
|
+
<Fa icon={faXmark} />
|
|
33
|
+
</button>
|
|
34
|
+
{/if}
|
|
35
|
+
</div>
|
|
36
|
+
</aside>
|
|
37
|
+
{/if}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let showOnPx = 150;
|
|
3
|
-
let hidden = true;
|
|
4
|
-
|
|
5
|
-
function goTop() {
|
|
6
|
-
document.body.scrollIntoView();
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function scrollContainer() {
|
|
10
|
-
return document.documentElement || document.body;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function handleOnScroll() {
|
|
14
|
-
if (!scrollContainer()) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (scrollContainer().scrollTop > showOnPx) {
|
|
19
|
-
hidden = false;
|
|
20
|
-
} else {
|
|
21
|
-
hidden = true;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<svelte:window on:scroll={handleOnScroll} />
|
|
27
|
-
|
|
28
|
-
<div class="w-full items-center">
|
|
29
|
-
<button class="btn ring back-to-top" on:click={goTop} class:hidden>Back to top</button>
|
|
30
|
-
</div>
|
|
1
|
+
<script>
|
|
2
|
+
export let showOnPx = 150;
|
|
3
|
+
let hidden = true;
|
|
4
|
+
|
|
5
|
+
function goTop() {
|
|
6
|
+
document.body.scrollIntoView();
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function scrollContainer() {
|
|
10
|
+
return document.documentElement || document.body;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function handleOnScroll() {
|
|
14
|
+
if (!scrollContainer()) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (scrollContainer().scrollTop > showOnPx) {
|
|
19
|
+
hidden = false;
|
|
20
|
+
} else {
|
|
21
|
+
hidden = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<svelte:window on:scroll={handleOnScroll} />
|
|
27
|
+
|
|
28
|
+
<div class="w-full items-center">
|
|
29
|
+
<button class="btn ring back-to-top" on:click={goTop} class:hidden>Back to top</button>
|
|
30
|
+
</div>
|
|
@@ -12,25 +12,25 @@ const noteSettings = {
|
|
|
12
12
|
target: "noteTarget",
|
|
13
13
|
placement: "bottom"
|
|
14
14
|
};
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<div class="text-right p-2">
|
|
18
|
-
{#if note}
|
|
19
|
-
<span class="chip variant-soft hover:variant-filled" use:popup={noteSettings}>
|
|
20
|
-
<span><Fa icon={faQuestion} /></span>
|
|
21
|
-
</span>
|
|
22
|
-
|
|
23
|
-
<div
|
|
24
|
-
class="card p-4 variant-filled-primary w-60 z-50 text-left shadow-md"
|
|
25
|
-
data-popup="noteTarget"
|
|
26
|
-
>
|
|
27
|
-
{note}
|
|
28
|
-
</div>
|
|
29
|
-
{/if}
|
|
30
|
-
|
|
31
|
-
{#each links as link}
|
|
32
|
-
<span class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)}>
|
|
33
|
-
<span>{link.label}</span>
|
|
34
|
-
</span>
|
|
35
|
-
{/each}
|
|
36
|
-
</div>
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div class="text-right p-2">
|
|
18
|
+
{#if note}
|
|
19
|
+
<span class="chip variant-soft hover:variant-filled" use:popup={noteSettings}>
|
|
20
|
+
<span><Fa icon={faQuestion} /></span>
|
|
21
|
+
</span>
|
|
22
|
+
|
|
23
|
+
<div
|
|
24
|
+
class="card p-4 variant-filled-primary w-60 z-50 text-left shadow-md"
|
|
25
|
+
data-popup="noteTarget"
|
|
26
|
+
>
|
|
27
|
+
{note}
|
|
28
|
+
</div>
|
|
29
|
+
{/if}
|
|
30
|
+
|
|
31
|
+
{#each links as link}
|
|
32
|
+
<span class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)}>
|
|
33
|
+
<span>{link.label}</span>
|
|
34
|
+
</span>
|
|
35
|
+
{/each}
|
|
36
|
+
</div>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script>export let error;
|
|
2
|
-
</script>
|
|
3
|
-
|
|
4
|
-
<div class="card bg-error-300 border-solid border-2 border-error-500 shadow-md max-w-md">
|
|
5
|
-
<div class="p-5 space-y-4">
|
|
6
|
-
<h3 class="h3">{error.name}</h3>
|
|
7
|
-
<p>{error.message}</p>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<div class="card bg-error-300 border-solid border-2 border-error-500 shadow-md max-w-md">
|
|
5
|
+
<div class="p-5 space-y-4">
|
|
6
|
+
<h3 class="h3">{error.name}</h3>
|
|
7
|
+
<p>{error.message}</p>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|