@bexis2/bexis2-core-ui 0.2.10 → 0.2.12
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 +263 -207
- package/dist/components/Table/Table.svelte +85 -85
- package/dist/components/Table/TableFilter.svelte +109 -109
- package/dist/components/Table/TablePagination.svelte +38 -38
- package/dist/components/file/FileUploader.svelte +34 -34
- package/dist/components/form/Checkbox.svelte.d.ts +1 -1
- package/dist/components/form/DropdownKvP.svelte +5 -11
- package/dist/components/form/InputContainer.svelte +20 -19
- package/dist/components/form/MultiSelect.svelte +163 -178
- package/dist/components/form/TextArea.svelte +13 -13
- package/dist/components/form/TextInput.svelte +0 -2
- package/dist/components/page/Alert.svelte +28 -30
- package/dist/components/page/BackToTop.svelte +30 -30
- package/dist/components/page/Docs.svelte +22 -19
- package/dist/components/page/Docs.svelte.d.ts +1 -1
- package/dist/components/page/ErrorMessage.svelte +9 -0
- package/dist/components/page/ErrorMessage.svelte.d.ts +16 -0
- package/dist/components/page/Footer.svelte +5 -5
- package/dist/components/page/Header.svelte +5 -4
- package/dist/components/page/HelpPopUp.svelte +31 -25
- package/dist/components/page/HelpPopUp.svelte.d.ts +5 -12
- package/dist/components/page/Page.svelte +56 -66
- package/dist/components/page/Page.svelte.d.ts +2 -2
- package/dist/components/page/PageCaller.js +19 -21
- package/dist/components/page/Spinner.svelte +12 -13
- package/dist/components/page/Spinner.svelte.d.ts +1 -1
- package/dist/components/page/breadcrumb/Breadcrumb.svelte +19 -23
- package/dist/components/page/menu/Menu.svelte +25 -25
- package/dist/components/page/menu/MenuBar.svelte +7 -14
- package/dist/components/page/menu/MenuBar.svelte.d.ts +2 -2
- package/dist/components/page/menu/MenuDataCaller.js +10 -11
- package/dist/components/page/menu/MenuItem.svelte +9 -13
- package/dist/components/page/menu/MenuItem.svelte.d.ts +2 -1
- package/dist/components/page/menu/MenuSublist.svelte +18 -17
- package/dist/components/page/menu/MenuSublist.svelte.d.ts +2 -2
- package/dist/components/page/menu/SettingsBar.svelte +9 -14
- package/dist/components/page/menu/SettingsBar.svelte.d.ts +2 -2
- package/dist/css/core.ui.postcss +10 -7
- package/dist/css/themes/theme-bexis2.css +12 -13
- package/dist/index.d.ts +2 -3
- package/dist/index.js +5 -4
- package/dist/models/Models.js +0 -1
- package/dist/models/Page.d.ts +31 -0
- package/dist/services/BaseCaller.js +16 -21
- package/dist/stores/pageStores.d.ts +4 -4
- package/dist/stores/pageStores.js +27 -27
- package/package.json +2 -2
- package/src/lib/components/Table/Table.svelte +246 -246
- package/src/lib/components/Table/TableFilter.svelte +222 -222
- package/src/lib/components/Table/TablePagination.svelte +61 -61
- package/src/lib/components/Table/filter.ts +141 -141
- package/src/lib/components/file/FileUploader.svelte +184 -184
- package/src/lib/components/form/Checkbox.svelte +1 -1
- package/src/lib/components/form/DateInput.svelte +0 -1
- package/src/lib/components/form/DropdownKvP.svelte +5 -11
- package/src/lib/components/form/InputContainer.svelte +36 -44
- package/src/lib/components/form/MultiSelect.svelte +163 -178
- package/src/lib/components/form/NumberInput.svelte +3 -5
- package/src/lib/components/form/TextArea.svelte +26 -27
- package/src/lib/components/form/TextInput.svelte +2 -5
- package/src/lib/components/page/Alert.svelte +41 -45
- package/src/lib/components/page/BackToTop.svelte +30 -30
- package/src/lib/components/page/Docs.svelte +46 -44
- package/src/lib/components/page/ErrorMessage.svelte +10 -0
- package/src/lib/components/page/Footer.svelte +18 -22
- package/src/lib/components/page/Header.svelte +18 -21
- package/src/lib/components/page/HelpPopUp.svelte +72 -66
- package/src/lib/components/page/Page.svelte +96 -108
- package/src/lib/components/page/PageCaller.js +19 -21
- package/src/lib/components/page/Spinner.svelte +14 -16
- package/src/lib/components/page/breadcrumb/Breadcrumb.svelte +31 -43
- package/src/lib/components/page/menu/Menu.svelte +40 -47
- package/src/lib/components/page/menu/MenuBar.svelte +20 -31
- package/src/lib/components/page/menu/MenuDataCaller.js +10 -11
- package/src/lib/components/page/menu/MenuItem.svelte +27 -33
- package/src/lib/components/page/menu/MenuSublist.svelte +43 -48
- package/src/lib/components/page/menu/SettingsBar.svelte +31 -40
- package/src/lib/css/core.ui.postcss +10 -7
- package/src/lib/css/themes/theme-bexis2.css +12 -13
- package/src/lib/index.ts +75 -76
- package/src/lib/models/Enums.ts +10 -11
- package/src/lib/models/Models.ts +113 -113
- package/src/lib/models/Page.ts +40 -41
- package/src/lib/services/BaseCaller.js +16 -21
- package/src/lib/stores/apiStores.ts +31 -32
- package/src/lib/stores/pageStores.ts +121 -126
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export let textCss = "text-secundary-500"
|
|
5
|
-
export let label = "";
|
|
6
|
-
export let position:positionType = positionType.start;
|
|
2
|
+
import { positionType } from '$lib/models/Enums';
|
|
7
3
|
|
|
4
|
+
export let textCss = 'text-surface-600';
|
|
5
|
+
export let label = '';
|
|
6
|
+
export let position: positionType = positionType.center;
|
|
8
7
|
</script>
|
|
9
8
|
|
|
10
|
-
<div class="flex justify-{position} items-{position} h-full w-full gap-5 pt-2">
|
|
11
|
-
<div
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
>
|
|
15
|
-
<span
|
|
16
|
-
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
|
17
|
-
>Loading...</span
|
|
9
|
+
<div class="flex justify-{position} items-{position} h-full w-full gap-5 pt-2 {textCss}">
|
|
10
|
+
<div
|
|
11
|
+
class="inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]"
|
|
12
|
+
role="status"
|
|
18
13
|
>
|
|
14
|
+
<span
|
|
15
|
+
class="!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"
|
|
16
|
+
>Loading...</span
|
|
17
|
+
>
|
|
18
|
+
</div>
|
|
19
|
+
<span>{label}</span>
|
|
19
20
|
</div>
|
|
20
|
-
<span>{label}</span>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
@@ -1,43 +1,31 @@
|
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<!-- If crumb index is less than the breadcrumb length minus 1 -->
|
|
33
|
-
{#if i < list.length - 1}
|
|
34
|
-
<li class="crumb"><a class="anchor" href={crumb.link}>{crumb.label}</a></li>
|
|
35
|
-
<li class="crumb-separator" aria-hidden>›</li>
|
|
36
|
-
{:else}
|
|
37
|
-
<li class="crumb">{crumb.label}</li>
|
|
38
|
-
{/if}
|
|
39
|
-
{/each}
|
|
40
|
-
</ol>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { breadcrumbStore } from '$store/pageStores';
|
|
3
|
+
import type { breadcrumbItemType } from '$models/Page';
|
|
4
|
+
|
|
5
|
+
export let title;
|
|
6
|
+
|
|
7
|
+
let list: breadcrumbItemType[] = [];
|
|
8
|
+
$: list;
|
|
9
|
+
|
|
10
|
+
$: breadcrumbStore.subscribe((value) => {
|
|
11
|
+
list = value?.items;
|
|
12
|
+
});
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div class="px-5 py-2">
|
|
16
|
+
<ol class="breadcrumb -p50">
|
|
17
|
+
<!--default home-->
|
|
18
|
+
<li class="crumb"><a class="anchor" href={'/'}>Home</a></li>
|
|
19
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
20
|
+
|
|
21
|
+
{#each list as crumb, i}
|
|
22
|
+
<!-- If crumb index is less than the breadcrumb length minus 1 -->
|
|
23
|
+
{#if i < list.length - 1}
|
|
24
|
+
<li class="crumb"><a class="anchor" href={crumb.link}>{crumb.label}</a></li>
|
|
25
|
+
<li class="crumb-separator" aria-hidden>›</li>
|
|
26
|
+
{:else}
|
|
27
|
+
<li class="crumb">{crumb.label}</li>
|
|
28
|
+
{/if}
|
|
29
|
+
{/each}
|
|
30
|
+
</ol>
|
|
31
|
+
</div>
|
|
@@ -1,47 +1,40 @@
|
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<MenuBar menuBar={$menuStore.LaunchBar} />
|
|
42
|
-
<SettingsBar menuBar={$menuStore.Settings} />
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import { get } from 'svelte/store';
|
|
4
|
+
import { getMenuItems } from './MenuDataCaller';
|
|
5
|
+
import { menuStore } from '$store/pageStores';
|
|
6
|
+
|
|
7
|
+
import type { MenuModel } from '$models/Page';
|
|
8
|
+
|
|
9
|
+
import MenuBar from './MenuBar.svelte';
|
|
10
|
+
import SettingsBar from './SettingsBar.svelte';
|
|
11
|
+
|
|
12
|
+
onMount(async () => {
|
|
13
|
+
let m = await getMenuItems();
|
|
14
|
+
menuStore.set(m);
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
{#if $menuStore !== undefined}
|
|
19
|
+
<div class="flex flex-row md:flex px-3 py-2 bg-tertiary-50 text-surface-800 z-50 shadow-md">
|
|
20
|
+
<div class="basis-8">
|
|
21
|
+
{#if $menuStore.Logo}
|
|
22
|
+
<img
|
|
23
|
+
src="data:{$menuStore.Logo.Mime};charset=utf-8;base64, {$menuStore.Logo.Data}"
|
|
24
|
+
alt={$menuStore.Logo.Name}
|
|
25
|
+
style="height:40px;"
|
|
26
|
+
/>
|
|
27
|
+
{/if}
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="flex items-center md:space-x-5 px-3 text-lg justify-start">
|
|
31
|
+
<MenuBar menuBar={$menuStore.MenuBar} />
|
|
32
|
+
<MenuBar menuBar={$menuStore.Extended} />
|
|
33
|
+
</div>
|
|
34
|
+
<div class="flex-auto w-64 flex items-left md:space-x-3 justify-end">
|
|
35
|
+
<MenuBar menuBar={$menuStore.AccountBar} />
|
|
36
|
+
<MenuBar menuBar={$menuStore.LaunchBar} />
|
|
37
|
+
<SettingsBar menuBar={$menuStore.Settings} />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
{/if}
|
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{#if menuBar}
|
|
23
|
-
{#each menuBar as menubarItem}
|
|
24
|
-
|
|
25
|
-
<Item {menubarItem}{comboboxValue}/>
|
|
26
|
-
|
|
27
|
-
{/each}
|
|
28
|
-
{/if}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
|
|
3
|
+
import { storePopup } from '@skeletonlabs/skeleton';
|
|
4
|
+
storePopup.set({ computePosition, autoUpdate, offset, shift, flip, arrow });
|
|
5
|
+
|
|
6
|
+
import type { menuItemType } from '$models/Page';
|
|
7
|
+
import Item from './MenuItem.svelte';
|
|
8
|
+
|
|
9
|
+
export let menuBar: menuItemType[];
|
|
10
|
+
|
|
11
|
+
let comboboxValue: string;
|
|
12
|
+
|
|
13
|
+
let radomNumber = Math.floor(Math.random() * 100);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
{#if menuBar}
|
|
17
|
+
{#each menuBar as menubarItem}
|
|
18
|
+
<Item {menubarItem} {comboboxValue} />
|
|
19
|
+
{/each}
|
|
20
|
+
{/if}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {Api} from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
1
|
+
import { Api } from '$lib/services/Api';
|
|
2
|
+
|
|
3
|
+
export const getMenuItems = async () => {
|
|
4
|
+
try {
|
|
5
|
+
const response = await Api.get('/menu');
|
|
6
|
+
return response.data;
|
|
7
|
+
} catch (error) {
|
|
8
|
+
console.error(error);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
@@ -1,44 +1,38 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
import { popup } from '@skeletonlabs/skeleton';
|
|
3
3
|
|
|
4
|
-
//uicomponents
|
|
5
|
-
import MenuSublist from './MenuSublist.svelte';
|
|
4
|
+
//uicomponents
|
|
5
|
+
import MenuSublist from './MenuSublist.svelte';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
//types
|
|
8
|
+
import type { PopupSettings } from '@skeletonlabs/skeleton';
|
|
9
|
+
import type { menuItemType } from '$models/Page';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
import { goTo } from '$services/BaseCaller';
|
|
12
12
|
|
|
13
|
+
export let menubarItem: menuItemType;
|
|
14
|
+
export let comboboxValue;
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
export let comboboxValue;
|
|
16
|
+
let id = Math.floor(Math.random() * 100).toString();
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
</script>
|
|
28
|
-
{#if menubarItem.Items.length<1}
|
|
29
|
-
|
|
30
|
-
<button use:popup={popupCombobox} on:click={()=> goTo(menubarItem.Url)}>
|
|
31
|
-
<span class="capitalize">{comboboxValue ?? menubarItem.Title}</span>
|
|
32
|
-
</button>
|
|
18
|
+
let popupCombobox: PopupSettings = {
|
|
19
|
+
event: 'click',
|
|
20
|
+
target: id,
|
|
21
|
+
placement: 'bottom',
|
|
22
|
+
// Close the popup when the item is clicked
|
|
23
|
+
closeQuery: '.listbox-item'
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
33
26
|
|
|
27
|
+
{#if menubarItem.Items.length < 1}
|
|
28
|
+
<button use:popup={popupCombobox} on:click={() => goTo(menubarItem.Url)}>
|
|
29
|
+
<span class="capitalize">{comboboxValue ?? menubarItem.Title}</span>
|
|
30
|
+
</button>
|
|
34
31
|
{:else}
|
|
32
|
+
<button class="flex items-center gap-x-1" use:popup={popupCombobox}>
|
|
33
|
+
<span class="capitalize">{menubarItem.Title}</span>
|
|
34
|
+
<div class="before:content-['▾']" />
|
|
35
|
+
</button>
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
<button class="flex items-center gap-x-1 " use:popup={popupCombobox}>
|
|
38
|
-
<span class="capitalize">{menubarItem.Title}</span>
|
|
39
|
-
<div class="before:content-['▾']"></div>
|
|
40
|
-
</button>
|
|
41
|
-
|
|
42
|
-
<MenuSublist {id} items={menubarItem.Items} />
|
|
43
|
-
|
|
37
|
+
<MenuSublist {id} items={menubarItem.Items} />
|
|
44
38
|
{/if}
|
|
@@ -1,48 +1,43 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
3
|
-
import type {
|
|
4
|
-
import { goTo } from '$services/BaseCaller';
|
|
5
|
-
|
|
6
|
-
export let id;
|
|
7
|
-
export let items:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let
|
|
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
|
-
{item.Title}
|
|
45
|
-
</ListBoxItem>
|
|
46
|
-
{/each}
|
|
47
|
-
</ListBox>
|
|
48
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
3
|
+
import type { menuItemType } from '$models/Page';
|
|
4
|
+
import { goTo } from '$services/BaseCaller';
|
|
5
|
+
|
|
6
|
+
export let id;
|
|
7
|
+
export let items: menuItemType[];
|
|
8
|
+
|
|
9
|
+
let lastModule = '';
|
|
10
|
+
let first = true;
|
|
11
|
+
|
|
12
|
+
// store last module
|
|
13
|
+
function isNewModule(module) {
|
|
14
|
+
if (module === lastModule) {
|
|
15
|
+
return false;
|
|
16
|
+
} else {
|
|
17
|
+
lastModule = module;
|
|
18
|
+
if (first) {
|
|
19
|
+
first = false;
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div class="z-50 w-max" data-popup={id}>
|
|
29
|
+
<ListBox class="bg-white border-solid border border-surface-500">
|
|
30
|
+
{#each items as item}
|
|
31
|
+
{#if isNewModule(item.Module)}<hr class="text-surface-800" />{/if}
|
|
32
|
+
<ListBoxItem
|
|
33
|
+
class="bg-white text-sm text-surface-800 py-1 hover:bg-surface-100 hover:text-secondary-500"
|
|
34
|
+
bind:group={item.Title}
|
|
35
|
+
name="medium"
|
|
36
|
+
value={item.Title}
|
|
37
|
+
on:click={() => goTo(item.Url)}
|
|
38
|
+
>
|
|
39
|
+
{item.Title}
|
|
40
|
+
</ListBoxItem>
|
|
41
|
+
{/each}
|
|
42
|
+
</ListBox>
|
|
43
|
+
</div>
|
|
@@ -1,40 +1,31 @@
|
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</button>
|
|
34
|
-
|
|
35
|
-
<MenuSublist id="settings" items={menuBar} />
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{/if}
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { popup } from '@skeletonlabs/skeleton';
|
|
3
|
+
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
4
|
+
|
|
5
|
+
import type { PopupSettings } from '@skeletonlabs/skeleton';
|
|
6
|
+
import type { menuItemType } from '$models/Page';
|
|
7
|
+
import Fa from 'svelte-fa/src/fa.svelte';
|
|
8
|
+
import { faCog } from '@fortawesome/free-solid-svg-icons';
|
|
9
|
+
|
|
10
|
+
import { goTo } from '$services/BaseCaller';
|
|
11
|
+
|
|
12
|
+
export let menuBar: menuItemType[];
|
|
13
|
+
//uicomponents
|
|
14
|
+
import MenuSublist from './MenuSublist.svelte';
|
|
15
|
+
|
|
16
|
+
let popupCombobox: PopupSettings = {
|
|
17
|
+
event: 'click',
|
|
18
|
+
target: 'settings',
|
|
19
|
+
placement: 'bottom',
|
|
20
|
+
// Close the popup when the item is clicked
|
|
21
|
+
closeQuery: '.listbox-item'
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
{#if menuBar}
|
|
26
|
+
<button class="flex items-center gap-x-1 text-sm text-surface-800" use:popup={popupCombobox}>
|
|
27
|
+
<span class="capitalize"><Fa icon={faCog} /></span>
|
|
28
|
+
</button>
|
|
29
|
+
|
|
30
|
+
<MenuSublist id="settings" items={menuBar} />
|
|
31
|
+
{/if}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/*place global styles here */
|
|
2
|
-
html,
|
|
2
|
+
html,
|
|
3
|
+
body {
|
|
4
|
+
@apply h-full;
|
|
5
|
+
}
|
|
3
6
|
|
|
4
|
-
h1{
|
|
5
|
-
|
|
7
|
+
h1 {
|
|
8
|
+
@apply text-primary-500;
|
|
6
9
|
}
|
|
7
10
|
|
|
8
11
|
:root {
|
|
9
|
-
--background:rgb(var(--color-surface-200))
|
|
10
|
-
|
|
12
|
+
--background: rgb(var(--color-surface-200));
|
|
13
|
+
}
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
--tw-ring-color
|
|
15
|
+
[type='text']:focus {
|
|
16
|
+
--tw-ring-color: #00000;
|
|
14
17
|
}
|
|
@@ -82,16 +82,15 @@
|
|
|
82
82
|
--color-error-700: 191 0 0; /* ⬅ #bf0000 */
|
|
83
83
|
--color-error-800: 153 0 0; /* ⬅ #990000 */
|
|
84
84
|
--color-error-900: 125 0 0; /* ⬅ #7d0000 */
|
|
85
|
-
/* surface | #
|
|
86
|
-
--color-surface-50:
|
|
87
|
-
--color-surface-100:
|
|
88
|
-
--color-surface-200:
|
|
89
|
-
--color-surface-300:
|
|
90
|
-
--color-surface-400:
|
|
91
|
-
--color-surface-500:
|
|
92
|
-
--color-surface-600:
|
|
93
|
-
--color-surface-700:
|
|
94
|
-
--color-surface-800:
|
|
95
|
-
--color-surface-900:
|
|
96
|
-
|
|
97
|
-
}
|
|
85
|
+
/* surface | #c7c7c7 */
|
|
86
|
+
--color-surface-50: 247 247 247; /* ⬅ #f7f7f7 */
|
|
87
|
+
--color-surface-100: 244 244 244; /* ⬅ #f4f4f4 */
|
|
88
|
+
--color-surface-200: 241 241 241; /* ⬅ #f1f1f1 */
|
|
89
|
+
--color-surface-300: 233 233 233; /* ⬅ #e9e9e9 */
|
|
90
|
+
--color-surface-400: 216 216 216; /* ⬅ #d8d8d8 */
|
|
91
|
+
--color-surface-500: 199 199 199; /* ⬅ #c7c7c7 */
|
|
92
|
+
--color-surface-600: 179 179 179; /* ⬅ #b3b3b3 */
|
|
93
|
+
--color-surface-700: 149 149 149; /* ⬅ #959595 */
|
|
94
|
+
--color-surface-800: 119 119 119; /* ⬅ #777777 */
|
|
95
|
+
--color-surface-900: 98 98 98; /* ⬅ #626262 */
|
|
96
|
+
}
|