@enki-tek/fms-web-components 0.0.10 → 0.0.11
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.
@@ -12,22 +12,13 @@
|
|
12
12
|
align-items: center;
|
13
13
|
justify-content: flex-end;
|
14
14
|
align-self: stretch;
|
15
|
-
gap: 7rem;
|
16
15
|
height: 19px;
|
17
16
|
}
|
18
17
|
|
19
18
|
.header .title {
|
20
19
|
font-family: $bodyFonts;
|
21
|
-
margin-right: 5rem;
|
22
20
|
}
|
23
21
|
|
24
|
-
.close-icon {
|
25
|
-
color: $black;
|
26
|
-
position: absolute;
|
27
|
-
top: 15%;
|
28
|
-
right: 1rem;
|
29
|
-
transform: translateY(-50%);
|
30
|
-
}
|
31
22
|
|
32
23
|
:global(.secondaryOutlineBtnMedium) {
|
33
24
|
font-weight: 600;
|
@@ -1,59 +1,54 @@
|
|
1
|
-
<script>
|
2
|
-
import
|
3
|
-
import
|
4
|
-
|
5
|
-
export let
|
6
|
-
export let
|
7
|
-
export let
|
8
|
-
export let
|
9
|
-
export let
|
10
|
-
export 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
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
</ModalFooter>
|
53
|
-
</Modal>
|
54
|
-
</div>
|
55
|
-
|
56
|
-
<style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
|
1
|
+
<script>
|
2
|
+
import Button from '../Button/Button.svelte';
|
3
|
+
import { Modal, ModalBody, ModalFooter, ModalHeader } from 'sveltestrap';
|
4
|
+
|
5
|
+
export let content = '';
|
6
|
+
export let header = '';
|
7
|
+
export let closeBtn = '';
|
8
|
+
export let saveBtn = '';
|
9
|
+
export let isOpen = false;
|
10
|
+
export let toggle = () => (isOpen = !isOpen);
|
11
|
+
export let size = ' ';
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<Modal {isOpen} backdrop={false} {size} {toggle}>
|
15
|
+
<ModalHeader {toggle}>
|
16
|
+
<div class="header">
|
17
|
+
<div class="title">
|
18
|
+
<slot name="header">
|
19
|
+
{#if header}
|
20
|
+
{header}
|
21
|
+
{:else}
|
22
|
+
<slot name="header"/>
|
23
|
+
{/if}
|
24
|
+
</slot>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</ModalHeader>
|
28
|
+
<ModalBody>
|
29
|
+
<div class="content">
|
30
|
+
<slot name="body">
|
31
|
+
{#if content}
|
32
|
+
{content}
|
33
|
+
{:else}
|
34
|
+
<slot name="body" />
|
35
|
+
{/if}
|
36
|
+
</slot>
|
37
|
+
</div>
|
38
|
+
</ModalBody>
|
39
|
+
<ModalFooter>
|
40
|
+
<slot name="footer">
|
41
|
+
{#if closeBtn || saveBtn}
|
42
|
+
<Button config="secondaryOutlineBtnMedium" on:click={toggle}>{closeBtn}</Button>
|
43
|
+
<Button config="successBtnMedium" on:click={toggle}>{saveBtn}</Button>
|
44
|
+
{:else}
|
45
|
+
<slot name="footer" />
|
46
|
+
{/if}
|
47
|
+
</slot>
|
48
|
+
</ModalFooter>
|
49
|
+
</Modal>
|
50
|
+
|
51
|
+
<style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
|
57
52
|
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
|
58
53
|
@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap");
|
59
54
|
@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
|
@@ -637,20 +632,12 @@ export let size = " ";
|
|
637
632
|
align-items: center;
|
638
633
|
justify-content: flex-end;
|
639
634
|
align-self: stretch;
|
640
|
-
gap: 7rem;
|
641
635
|
height: 19px;
|
642
636
|
}
|
643
637
|
.header .title {
|
644
638
|
font-family: Roboto;
|
645
|
-
margin-right: 5rem;
|
646
|
-
}
|
647
|
-
.close-icon {
|
648
|
-
color: #000000;
|
649
|
-
position: absolute;
|
650
|
-
top: 15%;
|
651
|
-
right: 1rem;
|
652
|
-
transform: translateY(-50%);
|
653
639
|
}
|
654
640
|
:global(.secondaryOutlineBtnMedium) {
|
655
641
|
font-weight: 600;
|
656
642
|
}</style>
|
643
|
+
|
@@ -1,27 +1,43 @@
|
|
1
|
+
/** @typedef {typeof __propDef.props} ModalProps */
|
2
|
+
/** @typedef {typeof __propDef.events} ModalEvents */
|
3
|
+
/** @typedef {typeof __propDef.slots} ModalSlots */
|
4
|
+
export default class Modal extends SvelteComponentTyped<{
|
5
|
+
toggle?: (() => boolean) | undefined;
|
6
|
+
size?: string | undefined;
|
7
|
+
content?: string | undefined;
|
8
|
+
header?: string | undefined;
|
9
|
+
closeBtn?: string | undefined;
|
10
|
+
saveBtn?: string | undefined;
|
11
|
+
isOpen?: boolean | undefined;
|
12
|
+
}, {
|
13
|
+
[evt: string]: CustomEvent<any>;
|
14
|
+
}, {
|
15
|
+
header: {};
|
16
|
+
body: {};
|
17
|
+
footer: {};
|
18
|
+
}> {
|
19
|
+
}
|
20
|
+
export type ModalProps = typeof __propDef.props;
|
21
|
+
export type ModalEvents = typeof __propDef.events;
|
22
|
+
export type ModalSlots = typeof __propDef.slots;
|
1
23
|
import { SvelteComponentTyped } from "svelte";
|
2
24
|
declare const __propDef: {
|
3
25
|
props: {
|
26
|
+
toggle?: (() => boolean) | undefined;
|
27
|
+
size?: string | undefined;
|
4
28
|
content?: string | undefined;
|
5
29
|
header?: string | undefined;
|
6
30
|
closeBtn?: string | undefined;
|
7
31
|
saveBtn?: string | undefined;
|
8
|
-
|
9
|
-
toggle?: (() => boolean) | undefined;
|
10
|
-
size?: string | undefined;
|
32
|
+
isOpen?: boolean | undefined;
|
11
33
|
};
|
12
34
|
events: {
|
13
35
|
[evt: string]: CustomEvent<any>;
|
14
36
|
};
|
15
37
|
slots: {
|
16
38
|
header: {};
|
17
|
-
|
18
|
-
default: {};
|
39
|
+
body: {};
|
19
40
|
footer: {};
|
20
41
|
};
|
21
42
|
};
|
22
|
-
export type ModalProps = typeof __propDef.props;
|
23
|
-
export type ModalEvents = typeof __propDef.events;
|
24
|
-
export type ModalSlots = typeof __propDef.slots;
|
25
|
-
export default class Modal extends SvelteComponentTyped<ModalProps, ModalEvents, ModalSlots> {
|
26
|
-
}
|
27
43
|
export {};
|