@bexis2/bexis2-core-ui 0.2.11 → 0.2.13
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 +273 -214
- package/dist/components/Table/Table.svelte +85 -85
- package/dist/components/Table/TableFilter.svelte +8 -8
- 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 +8 -8
- 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 +57 -67
- package/dist/components/page/Page.svelte.d.ts +2 -2
- package/dist/components/page/PageCaller.js +19 -21
- package/dist/components/page/Spinner.svelte +9 -10
- 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 +48 -22
- package/dist/components/page/menu/MenuBar.svelte +8 -14
- package/dist/components/page/menu/MenuBar.svelte.d.ts +1 -1
- package/dist/components/page/menu/MenuDataCaller.js +10 -11
- package/dist/components/page/menu/MenuItem.svelte +28 -15
- package/dist/components/page/menu/MenuItem.svelte.d.ts +2 -1
- package/dist/components/page/menu/MenuSublist.svelte +14 -16
- package/dist/components/page/menu/MenuSublist.svelte.d.ts +2 -3
- package/dist/components/page/menu/SettingsBar.svelte +22 -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 +3 -5
- package/dist/index.js +5 -5
- package/dist/models/Enums.d.ts +18 -0
- package/dist/models/Enums.js +22 -0
- package/dist/models/Models.d.ts +18 -0
- package/dist/models/Models.js +1 -2
- 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 +8 -8
- 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 -12
- 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 -109
- package/src/lib/components/page/PageCaller.js +19 -21
- package/src/lib/components/page/Spinner.svelte +13 -15
- package/src/lib/components/page/breadcrumb/Breadcrumb.svelte +31 -43
- package/src/lib/components/page/menu/Menu.svelte +61 -43
- package/src/lib/components/page/menu/MenuBar.svelte +18 -29
- package/src/lib/components/page/menu/MenuDataCaller.js +10 -11
- package/src/lib/components/page/menu/MenuItem.svelte +45 -34
- package/src/lib/components/page/menu/MenuSublist.svelte +33 -41
- package/src/lib/components/page/menu/SettingsBar.svelte +39 -37
- package/src/lib/css/core.ui.postcss +10 -7
- package/src/lib/css/themes/theme-bexis2.css +12 -13
- package/src/lib/index.ts +78 -77
- package/src/lib/models/Enums.ts +32 -11
- package/src/lib/models/Models.ts +136 -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,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,65 @@
|
|
|
1
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
|
-
|
|
2
|
+
import { onMount } from 'svelte';
|
|
3
|
+
import { getMenuItems } from './MenuDataCaller';
|
|
4
|
+
import { menuStore } from '$store/pageStores';
|
|
5
|
+
|
|
6
|
+
import MenuBar from './MenuBar.svelte';
|
|
7
|
+
import SettingsBar from './SettingsBar.svelte';
|
|
8
|
+
import Fa from 'svelte-fa/src/fa.svelte';
|
|
9
|
+
import { faBars } from '@fortawesome/free-solid-svg-icons';
|
|
10
|
+
import { Accordion } from '@skeletonlabs/skeleton';
|
|
11
|
+
|
|
12
|
+
onMount(async () => {
|
|
13
|
+
let m = await getMenuItems();
|
|
14
|
+
menuStore.set(m);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
let hamburger = true;
|
|
23
18
|
</script>
|
|
24
|
-
{#if $menuStore!== undefined}
|
|
25
|
-
|
|
26
|
-
<div class="flex flex-row md:flex px-3 py-2 bg-tertiary-50 text-surface-800 z-50 shadow-md">
|
|
27
|
-
|
|
28
|
-
<div class="basis-8">
|
|
29
|
-
{#if $menuStore.Logo}
|
|
30
|
-
<img src='data:{$menuStore.Logo.Mime};charset=utf-8;base64, {$menuStore.Logo.Data}' alt='{$menuStore.Logo.Name}' style='height:40px;' />
|
|
31
|
-
{/if}
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<div class="flex items-center md:space-x-5 px-3 text-lg justify-start">
|
|
36
|
-
<MenuBar menuBar={$menuStore.MenuBar} />
|
|
37
|
-
<MenuBar menuBar={$menuStore.Extended} />
|
|
38
|
-
</div>
|
|
39
|
-
<div class="flex-auto w-64 flex items-left md:space-x-3 justify-end">
|
|
40
|
-
<MenuBar menuBar={$menuStore.AccountBar} />
|
|
41
|
-
<MenuBar menuBar={$menuStore.LaunchBar} />
|
|
42
|
-
<SettingsBar menuBar={$menuStore.Settings} />
|
|
43
|
-
</div>
|
|
44
19
|
|
|
45
|
-
</div>
|
|
46
20
|
|
|
47
|
-
{
|
|
21
|
+
{#if $menuStore !== undefined}
|
|
22
|
+
<div
|
|
23
|
+
class="sm:flex h-min flex-row w-full justify-between items-center md:flex px-3 py-2 bg-tertiary-50 text-surface-800 z-50 shadow-md"
|
|
24
|
+
>
|
|
25
|
+
<div class="flex justify-between gap-5">
|
|
26
|
+
<div class="basis-8">
|
|
27
|
+
{#if $menuStore.Logo}
|
|
28
|
+
<img
|
|
29
|
+
src="data:{$menuStore.Logo.Mime};charset=utf-8;base64, {$menuStore.Logo.Data}"
|
|
30
|
+
alt={$menuStore.Logo.Name}
|
|
31
|
+
style="height:40px;"
|
|
32
|
+
/>
|
|
33
|
+
{/if}
|
|
34
|
+
</div>
|
|
35
|
+
<button
|
|
36
|
+
class="w-min h-min variant-ghost-surface aspect-square p-3 rounded-lg sm:hidden justify-end btn"
|
|
37
|
+
on:click|preventDefault={() => (hamburger = !hamburger)}
|
|
38
|
+
>
|
|
39
|
+
<Fa icon={faBars} />
|
|
40
|
+
</button>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="sm:flex w-full h-full sm:h-10" class:hidden={hamburger}>
|
|
44
|
+
<div class="sm:flex justify-between w-full">
|
|
45
|
+
<Accordion>
|
|
46
|
+
<div class="sm:flex w-full justify-between">
|
|
47
|
+
<!-- <div class="sm:flex items-center sm:gap-5 px-1 text-lg justify-start gap-2 py-0"> -->
|
|
48
|
+
<MenuBar menuBar={$menuStore.MenuBar} />
|
|
49
|
+
<MenuBar menuBar={$menuStore.Extended} />
|
|
50
|
+
<!-- </div> -->
|
|
51
|
+
<!-- <div class="sm:flex items-center sm:gap-5 px-1 text-lg justify-end gap-2"> -->
|
|
52
|
+
<div class="grid w-full sm:flex gap-2 justify-auto sm:justify-end">
|
|
53
|
+
<MenuBar menuBar={$menuStore.AccountBar} />
|
|
54
|
+
<MenuBar menuBar={$menuStore.LaunchBar} />
|
|
55
|
+
<SettingsBar menuBar={$menuStore.Settings} />
|
|
56
|
+
<!-- </div> -->
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</Accordion>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
{:else}
|
|
64
|
+
<div class="placeholder h-14 bg-tertiary-50 shadow-md" />
|
|
65
|
+
{/if}
|
|
@@ -1,31 +1,20 @@
|
|
|
1
|
-
|
|
2
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 { MenuItem } from './menu';
|
|
7
|
+
import Item from './MenuItem.svelte';
|
|
8
|
+
|
|
9
|
+
export let menuBar: MenuItem[];
|
|
10
|
+
|
|
11
|
+
let comboboxValue: string;
|
|
12
|
+
</script>
|
|
3
13
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export let menuBar:MenuItem [];
|
|
12
|
-
|
|
13
|
-
let comboboxValue: string;
|
|
14
|
-
|
|
15
|
-
let radomNumber = Math.floor(Math.random() * 100);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{#if menuBar}
|
|
23
|
-
{#each menuBar as menubarItem}
|
|
24
|
-
|
|
25
|
-
<Item {menubarItem}{comboboxValue}/>
|
|
26
|
-
|
|
27
|
-
{/each}
|
|
28
|
-
{/if}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
{#if menuBar}
|
|
15
|
+
<div class="h-full place-self-center sm:flex gap-2 w-full sm:w-auto">
|
|
16
|
+
{#each menuBar as menubarItem}
|
|
17
|
+
<Item {menubarItem} {comboboxValue} />
|
|
18
|
+
{/each}
|
|
19
|
+
</div>
|
|
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,55 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
import { Accordion, AccordionItem, 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-start',
|
|
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
|
+
<div class="p-2">
|
|
29
|
+
<button class="grid" use:popup={popupCombobox} on:click={() => goTo(menubarItem.Url)}>
|
|
30
|
+
<span class="capitalize">{comboboxValue ?? menubarItem.Title}</span>
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
34
33
|
{:else}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
</button
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
34
|
+
<div class="sm:hidden block">
|
|
35
|
+
<AccordionItem padding="p-2">
|
|
36
|
+
<svelte:fragment slot="summary"
|
|
37
|
+
><button class="flex items-center gap-x-1">
|
|
38
|
+
<span class="capitalize">{menubarItem.Title}</span>
|
|
39
|
+
</button></svelte:fragment
|
|
40
|
+
>
|
|
41
|
+
<svelte:fragment slot="content"
|
|
42
|
+
><MenuSublist {id} items={menubarItem.Items} /></svelte:fragment
|
|
43
|
+
></AccordionItem
|
|
44
|
+
>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="hidden sm:block place-self-center" use:popup={popupCombobox}>
|
|
47
|
+
<button class="flex items-center gap-x-1 px-2">
|
|
48
|
+
<span class="capitalize">{menubarItem.Title}▾</span>
|
|
49
|
+
</button>
|
|
50
|
+
|
|
51
|
+
<div class="z-50 w-max" data-popup={id}>
|
|
52
|
+
<MenuSublist {id} items={menubarItem.Items} />
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
44
55
|
{/if}
|
|
@@ -1,48 +1,40 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
3
|
-
import type {
|
|
4
|
-
import { goTo } from '$services/BaseCaller';
|
|
2
|
+
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
3
|
+
import type { menuItemType } from '$models/Page';
|
|
4
|
+
import { goTo } from '$services/BaseCaller';
|
|
5
5
|
|
|
6
|
-
export let
|
|
7
|
-
export let items:MenuItem[];
|
|
6
|
+
export let items: menuItemType[];
|
|
8
7
|
|
|
8
|
+
let lastModule = '';
|
|
9
|
+
let first = true;
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
lastModule = module;
|
|
22
|
-
if(first)
|
|
23
|
-
{
|
|
24
|
-
first = false;
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
11
|
+
// store last module
|
|
12
|
+
function isNewModule(module) {
|
|
13
|
+
if (module === lastModule) {
|
|
14
|
+
return false;
|
|
15
|
+
} else {
|
|
16
|
+
lastModule = module;
|
|
17
|
+
if (first) {
|
|
18
|
+
first = false;
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
31
21
|
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
32
25
|
</script>
|
|
33
26
|
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</div>
|
|
27
|
+
<ListBox class="sm:bg-white sm:border">
|
|
28
|
+
{#each items as item}
|
|
29
|
+
{#if isNewModule(item.Module)}<hr class="text-surface-800" />{/if}
|
|
30
|
+
<ListBoxItem
|
|
31
|
+
class="text-md sm:text-sm text-surface-800 py-1 hover:text-secondary-500 bg-transparent hover:bg-surface-200"
|
|
32
|
+
bind:group={item.Title}
|
|
33
|
+
name="medium"
|
|
34
|
+
value={item.Title}
|
|
35
|
+
on:click={() => goTo(item.Url)}
|
|
36
|
+
>
|
|
37
|
+
{item.Title}
|
|
38
|
+
</ListBoxItem>
|
|
39
|
+
{/each}
|
|
40
|
+
</ListBox>
|
|
@@ -1,40 +1,42 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
import { ListBox, ListBoxItem } from '@skeletonlabs/skeleton';
|
|
4
|
-
|
|
5
|
-
import type { PopupSettings } from '@skeletonlabs/skeleton';
|
|
6
|
-
import type { MenuItem } from "./menu";
|
|
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:MenuItem [];
|
|
13
|
-
//uicomponents
|
|
14
|
-
import MenuSublist from './MenuSublist.svelte';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
let popupCombobox: PopupSettings = {
|
|
20
|
-
event: 'click',
|
|
21
|
-
target: 'settings',
|
|
22
|
-
placement: 'bottom',
|
|
23
|
-
// Close the popup when the item is clicked
|
|
24
|
-
closeQuery: '.listbox-item'
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
{#if menuBar}
|
|
30
|
-
<button class="flex items-center gap-x-1 text-sm text-surface-800" use:popup={popupCombobox}>
|
|
31
|
-
<span class="capitalize"><Fa icon={faCog} /></span>
|
|
32
|
-
|
|
33
|
-
</button>
|
|
2
|
+
import { popup } from '@skeletonlabs/skeleton';
|
|
34
3
|
|
|
35
|
-
|
|
36
|
-
|
|
4
|
+
import { AccordionItem, type PopupSettings } from '@skeletonlabs/skeleton';
|
|
5
|
+
import type { menuItemType } from '$models/Page';
|
|
6
|
+
import Fa from 'svelte-fa/src/fa.svelte';
|
|
7
|
+
import { faCog } from '@fortawesome/free-solid-svg-icons';
|
|
37
8
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
9
|
+
export let menuBar: menuItemType[];
|
|
10
|
+
//uicomponents
|
|
11
|
+
import MenuSublist from './MenuSublist.svelte';
|
|
12
|
+
|
|
13
|
+
let popupCombobox: PopupSettings = {
|
|
14
|
+
event: 'click',
|
|
15
|
+
target: 'settings',
|
|
16
|
+
placement: 'bottom',
|
|
17
|
+
// Close the popup when the item is clicked
|
|
18
|
+
closeQuery: '.listbox-item'
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
{#if menuBar}
|
|
23
|
+
<div class="sm:hidden">
|
|
24
|
+
<AccordionItem padding="p-2">
|
|
25
|
+
<svelte:fragment slot="summary"
|
|
26
|
+
><button class="flex items-center gap-x-1 text-sm text-surface-800 w-5 h-full">
|
|
27
|
+
<span class="capitalize"><Fa icon={faCog} /></span>
|
|
28
|
+
</button></svelte:fragment
|
|
29
|
+
>
|
|
30
|
+
<svelte:fragment slot="content"><MenuSublist items={menuBar} /></svelte:fragment>
|
|
31
|
+
</AccordionItem>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="hidden sm:block place-self-center" use:popup={popupCombobox}>
|
|
34
|
+
<button class="flex items-center gap-x-1">
|
|
35
|
+
<div class="hidden sm:block" />
|
|
36
|
+
<span class="capitalize"><Fa icon={faCog} /></span>
|
|
37
|
+
</button>
|
|
38
|
+
<div class="z-50 w-max" data-popup="settings">
|
|
39
|
+
<MenuSublist items={menuBar} />
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
{/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 | #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
|
-
|
|
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
|
+
}
|