@bexis2/bexis2-core-ui 0.3.3 → 0.3.5
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 +11 -0
- package/dist/components/form/InputContainer.svelte +1 -1
- package/dist/components/page/Docs.svelte +1 -1
- package/dist/components/page/Footer.svelte +0 -2
- package/dist/components/page/GoToTop.svelte +25 -0
- package/dist/components/page/GoToTop.svelte.d.ts +23 -0
- package/dist/components/page/Page.svelte +11 -0
- package/package.json +1 -1
- package/src/lib/components/form/InputContainer.svelte +1 -1
- package/src/lib/components/page/Docs.svelte +1 -1
- package/src/lib/components/page/Footer.svelte +0 -3
- package/src/lib/components/page/GoToTop.svelte +25 -0
- package/src/lib/components/page/Page.svelte +17 -0
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ function onMouseOut() {
|
|
|
13
13
|
}
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
|
-
<div id="{id}-container" on:mouseover={onMouseOver} on:mouseout={onMouseOut}>
|
|
16
|
+
<div id="{id}-container" on:mouseover={onMouseOver} on:focus={onMouseOver} on:mouseout={onMouseOut} on:blur={onMouseOut}>
|
|
17
17
|
<label class="label">
|
|
18
18
|
<span
|
|
19
19
|
>{label}
|
|
@@ -29,7 +29,7 @@ const noteSettings = {
|
|
|
29
29
|
{/if}
|
|
30
30
|
|
|
31
31
|
{#each links as link}
|
|
32
|
-
<span class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)}>
|
|
32
|
+
<span class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)} on:keypress={() => goTo(link.url, false)}>
|
|
33
33
|
<span>{link.label}</span>
|
|
34
34
|
</span>
|
|
35
35
|
{/each}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
import Fa from 'svelte-fa/src/fa.svelte';
|
|
4
|
+
import { faAngleUp } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
|
|
6
|
+
export let showAtPixel = 1000;
|
|
7
|
+
|
|
8
|
+
let scrollHeight = 0;
|
|
9
|
+
|
|
10
|
+
const gotoTop = () => {
|
|
11
|
+
window.scrollTo({ top: 0, behavior: 'smooth' })
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
$: showGotoTop = scrollHeight > showAtPixel;
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
{#if showGotoTop}
|
|
18
|
+
<button
|
|
19
|
+
id="gotToTop"
|
|
20
|
+
class="chip variant-filled-warning fixed bottom-5 right-20 shadow-md"
|
|
21
|
+
on:click={gotoTop}
|
|
22
|
+
><Fa icon={faAngleUp}/></button >
|
|
23
|
+
{/if}
|
|
24
|
+
|
|
25
|
+
<svelte:window bind:scrollY={scrollHeight} />
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} GoToTopProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} GoToTopEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} GoToTopSlots */
|
|
4
|
+
export default class GoToTop extends SvelteComponentTyped<{
|
|
5
|
+
showAtPixel?: number | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type GoToTopProps = typeof __propDef.props;
|
|
11
|
+
export type GoToTopEvents = typeof __propDef.events;
|
|
12
|
+
export type GoToTopSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponentTyped } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
showAtPixel?: number | undefined;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -12,6 +12,7 @@ import { storePopup } from "@skeletonlabs/skeleton";
|
|
|
12
12
|
import { breadcrumbStore } from "../../stores/pageStores";
|
|
13
13
|
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
|
|
14
14
|
import Docs from "./Docs.svelte";
|
|
15
|
+
import GoToTop from "./GoToTop.svelte";
|
|
15
16
|
export let title = "";
|
|
16
17
|
export let note = "";
|
|
17
18
|
export let links = [];
|
|
@@ -25,8 +26,13 @@ onMount(async () => {
|
|
|
25
26
|
breadcrumbStore.clean();
|
|
26
27
|
breadcrumbStore.addItem({ label: title, link: window.location.pathname });
|
|
27
28
|
});
|
|
29
|
+
let app;
|
|
30
|
+
function scrollToTop() {
|
|
31
|
+
app.scrollIntoView();
|
|
32
|
+
}
|
|
28
33
|
</script>
|
|
29
34
|
|
|
35
|
+
<div class="app" bind:this={app}>
|
|
30
36
|
<AppShell>
|
|
31
37
|
<!--header-->
|
|
32
38
|
<svelte:fragment slot="header">
|
|
@@ -79,6 +85,11 @@ onMount(async () => {
|
|
|
79
85
|
{/if}
|
|
80
86
|
</div>
|
|
81
87
|
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
<GoToTop/>
|
|
82
91
|
<HelpPopUp active={help} />
|
|
83
92
|
<Notification />
|
|
84
93
|
</AppShell>
|
|
94
|
+
</div>
|
|
95
|
+
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
function onMouseOut() {}
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<div id="{id}-container" on:mouseover={onMouseOver} on:mouseout={onMouseOut}>
|
|
19
|
+
<div id="{id}-container" on:mouseover={onMouseOver} on:focus={onMouseOver} on:mouseout={onMouseOut} on:blur={onMouseOut}>
|
|
20
20
|
<label class="label">
|
|
21
21
|
<span
|
|
22
22
|
>{label}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
{/if}
|
|
40
40
|
|
|
41
41
|
{#each links as link}
|
|
42
|
-
<span class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)}>
|
|
42
|
+
<span class="chip variant-soft hover:variant-filled" on:click={() => goTo(link.url, false)} on:keypress={() => goTo(link.url, false)}>
|
|
43
43
|
<span>{link.label}</span>
|
|
44
44
|
</span>
|
|
45
45
|
{/each}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
|
|
3
|
+
import Fa from 'svelte-fa/src/fa.svelte';
|
|
4
|
+
import { faAngleUp } from '@fortawesome/free-solid-svg-icons';
|
|
5
|
+
|
|
6
|
+
export let showAtPixel = 1000;
|
|
7
|
+
|
|
8
|
+
let scrollHeight = 0;
|
|
9
|
+
|
|
10
|
+
const gotoTop = () => {
|
|
11
|
+
window.scrollTo({ top: 0, behavior: 'smooth' })
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
$: showGotoTop = scrollHeight > showAtPixel;
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
{#if showGotoTop}
|
|
18
|
+
<button
|
|
19
|
+
id="gotToTop"
|
|
20
|
+
class="chip variant-filled-warning fixed bottom-5 right-20 shadow-md"
|
|
21
|
+
on:click={gotoTop}
|
|
22
|
+
><Fa icon={faAngleUp}/></button >
|
|
23
|
+
{/if}
|
|
24
|
+
|
|
25
|
+
<svelte:window bind:scrollY={scrollHeight} />
|
|
@@ -20,7 +20,12 @@
|
|
|
20
20
|
|
|
21
21
|
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
|
|
22
22
|
|
|
23
|
+
// icons
|
|
24
|
+
import type { helpItemType, helpStoreType } from '$models/Models';
|
|
25
|
+
|
|
26
|
+
|
|
23
27
|
import Docs from './Docs.svelte';
|
|
28
|
+
import GoToTop from './GoToTop.svelte';
|
|
24
29
|
|
|
25
30
|
export let title = '';
|
|
26
31
|
export let note = '';
|
|
@@ -38,8 +43,15 @@
|
|
|
38
43
|
breadcrumbStore.clean();
|
|
39
44
|
breadcrumbStore.addItem({ label: title, link: window.location.pathname });
|
|
40
45
|
});
|
|
46
|
+
|
|
47
|
+
let app;
|
|
48
|
+
function scrollToTop() {
|
|
49
|
+
app.scrollIntoView();
|
|
50
|
+
}
|
|
51
|
+
|
|
41
52
|
</script>
|
|
42
53
|
|
|
54
|
+
<div class="app" bind:this={app}>
|
|
43
55
|
<AppShell>
|
|
44
56
|
<!--header-->
|
|
45
57
|
<svelte:fragment slot="header">
|
|
@@ -92,6 +104,11 @@
|
|
|
92
104
|
{/if}
|
|
93
105
|
</div>
|
|
94
106
|
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<GoToTop/>
|
|
95
110
|
<HelpPopUp active={help} />
|
|
96
111
|
<Notification />
|
|
97
112
|
</AppShell>
|
|
113
|
+
</div>
|
|
114
|
+
|