@enki-tek/fms-web-components 0.0.89 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/components/Accordion/Accordion.svelte +3 -0
- package/components/Accordion/AccordionItem.svelte +3 -0
- package/components/Badge/Badge.svelte +3 -0
- package/components/Breadcrumb/Breadcrumb.svelte +3 -0
- package/components/Button/Button.svelte +3 -0
- package/components/CardIcon/CardIcon.svelte +3 -0
- package/components/CardIcon/CardiconBody.svelte +3 -0
- package/components/CardIcon/CardiconSubtitle.svelte +3 -0
- package/components/CardIcon/CardiconTitle.svelte +3 -0
- package/components/Charts/Barchart.svelte +74 -0
- package/components/Charts/Barchart.svelte.d.ts +23 -0
- package/components/Charts/DoughnutChart.svelte +73 -0
- package/components/Charts/DoughnutChart.svelte.d.ts +29 -0
- package/components/Charts/LineChart.svelte +62 -0
- package/components/Charts/LineChart.svelte.d.ts +23 -0
- package/components/Charts/PieChart.svelte +75 -0
- package/components/Charts/PieChart.svelte.d.ts +29 -0
- package/components/CheckBox/Checkbox.svelte +3 -0
- package/components/Dropdown/Dropdown.svelte +3 -0
- package/components/Dropdown/DropdownItem.svelte +3 -0
- package/components/EnkiSidbar/EnkiSidebar.svelte +3 -0
- package/components/EnkiSidbar/NavIcon.svelte +3 -0
- package/components/EnkiSidbar/NavItem.svelte +3 -0
- package/components/EnkiSidbar/NavLink.svelte +3 -0
- package/components/Header/Brand.svelte +25 -16
- package/components/Header/Header.scss +40 -34
- package/components/Header/Header.svelte +26 -20
- package/components/Header/Header.svelte.d.ts +6 -2
- package/components/Header/HeaderDropDownLink.svelte +11 -0
- package/components/Header/HeaderDropDownLink.svelte.d.ts +29 -0
- package/components/Header/HeaderDropDownLinkItem.svelte +9 -0
- package/components/Header/HeaderDropDownLinkItem.svelte.d.ts +31 -0
- package/components/Header/HeaderItem.svelte +9 -0
- package/components/Header/HeaderLink.svelte +9 -0
- package/components/Header/HeaderLink.svelte.d.ts +31 -0
- package/components/Header/HeaderLinks.svelte +9 -0
- package/components/Header/HeaderLinks.svelte.d.ts +27 -0
- package/components/Header/UserAvatar.svelte +12 -3
- package/components/Layout/Content.svelte +9 -0
- package/components/Layout/Content.svelte.d.ts +29 -0
- package/components/Layout/Footer.svelte +2 -0
- package/components/Layout/Layout.svelte +6 -0
- package/components/Layout/Layout.svelte.d.ts +27 -0
- package/components/Layout/Page.svelte +35 -9
- package/components/Layout/Page.svelte.d.ts +6 -2
- package/components/Layout/SortableGrid.svelte +28 -0
- package/components/Layout/SortableGrid.svelte.d.ts +27 -0
- package/components/ModalWindow/Modal.svelte +3 -0
- package/components/ModalWindow/ModalBody.svelte +3 -0
- package/components/ModalWindow/ModalFooter.svelte +3 -0
- package/components/ModalWindow/ModalHeader.svelte +3 -0
- package/components/NotFound/NotFound.svelte +3 -0
- package/components/Pagination/Pagination.svelte +3 -0
- package/components/RadioButton/RadioButton.svelte +3 -0
- package/components/Sidebar/MenuGroup.svelte +108 -0
- package/components/Sidebar/MenuGroup.svelte.d.ts +29 -0
- package/components/Sidebar/MenuItem.svelte +122 -0
- package/components/Sidebar/MenuItem.svelte.d.ts +35 -0
- package/components/Sidebar/SideBarMenu.svelte +148 -0
- package/components/Sidebar/SideBarMenu.svelte.d.ts +27 -0
- package/components/Sidebar/Sidebar.scss +29 -0
- package/components/Sidebar/Sidebar.svelte +29 -0
- package/components/StatusCard/StatusCard.scss +35 -0
- package/components/StatusCard/StatusCard.svelte +42 -0
- package/components/StatusCard/StatusCard.svelte.d.ts +27 -0
- package/components/StatusCard/StatusCardBody.svelte +57 -0
- package/components/StatusCard/StatusCardBody.svelte.d.ts +31 -0
- package/components/StatusCard/StatusCardTitle.svelte +47 -0
- package/components/StatusCard/StatusCardTitle.svelte.d.ts +29 -0
- package/components/Switches/Switch.svelte +3 -0
- package/components/Tab/Tab.svelte +3 -0
- package/components/TextField/TextField.svelte +3 -0
- package/components/Toast/Toast.scss +0 -2
- package/components/Toast/Toast.svelte +7 -6
- package/components/Tooltip/Tooltip.svelte +3 -0
- package/components/WidgetCard/Card.scss +108 -0
- package/components/WidgetCard/SensorStatusCard.svelte +130 -0
- package/components/WidgetCard/SensorStatusCard.svelte.d.ts +27 -0
- package/components/WidgetCard/StateCard.svelte +133 -0
- package/components/WidgetCard/StateCard.svelte.d.ts +29 -0
- package/components/WidgetCard/WidgetCard.svelte +152 -0
- package/components/WidgetCard/WidgetCard.svelte.d.ts +35 -0
- package/components/WidgetCard/WidgetCardBody.svelte +13 -0
- package/components/WidgetCard/WidgetCardBody.svelte.d.ts +27 -0
- package/components/common.scss +4 -0
- package/components/variable.scss +13 -3
- package/package.json +30 -2
@@ -0,0 +1,27 @@
|
|
1
|
+
/** @typedef {typeof __propDef.props} StatusCardProps */
|
2
|
+
/** @typedef {typeof __propDef.events} StatusCardEvents */
|
3
|
+
/** @typedef {typeof __propDef.slots} StatusCardSlots */
|
4
|
+
export default class StatusCard extends SvelteComponentTyped<{
|
5
|
+
className?: string | undefined;
|
6
|
+
}, {
|
7
|
+
[evt: string]: CustomEvent<any>;
|
8
|
+
}, {
|
9
|
+
default: {};
|
10
|
+
}> {
|
11
|
+
}
|
12
|
+
export type StatusCardProps = typeof __propDef.props;
|
13
|
+
export type StatusCardEvents = typeof __propDef.events;
|
14
|
+
export type StatusCardSlots = typeof __propDef.slots;
|
15
|
+
import { SvelteComponentTyped } from "svelte";
|
16
|
+
declare const __propDef: {
|
17
|
+
props: {
|
18
|
+
className?: string | undefined;
|
19
|
+
};
|
20
|
+
events: {
|
21
|
+
[evt: string]: CustomEvent<any>;
|
22
|
+
};
|
23
|
+
slots: {
|
24
|
+
default: {};
|
25
|
+
};
|
26
|
+
};
|
27
|
+
export {};
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<script>
|
2
|
+
import { Col, Row } from 'sveltestrap';
|
3
|
+
export let index;
|
4
|
+
export let text;
|
5
|
+
export let value;
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<div class="mt-5">
|
9
|
+
<Row>
|
10
|
+
<Col>
|
11
|
+
<div class={Number(index) > 0 ? 'box1 mb-1' : 'box2 mb-1'}>
|
12
|
+
<div class={Number(index) > 0 ? 'p-1 px-2 text-success' : 'p-1 px-2 text-danger'}>
|
13
|
+
<i class="material-icons index">{Number(index) > 0 ? 'call_made' : 'call_received'}</i>
|
14
|
+
{Number(index) > 0 ? '+' + index : index}
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<div class="text fw-normal">{text}</div></Col
|
18
|
+
>
|
19
|
+
<Col><div class="float-end value fw-bold">{value}</div></Col>
|
20
|
+
</Row>
|
21
|
+
</div>
|
22
|
+
<slot />
|
23
|
+
|
24
|
+
<style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
|
25
|
+
@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");
|
26
|
+
@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");
|
27
|
+
.card {
|
28
|
+
background-color: #F8F9FA;
|
29
|
+
padding: 1rem;
|
30
|
+
border-radius: 0.75rem;
|
31
|
+
font-family: Roboto;
|
32
|
+
min-width: 22rem;
|
33
|
+
min-height: 14rem;
|
34
|
+
}
|
35
|
+
.title {
|
36
|
+
font-size: 24px;
|
37
|
+
font-weight: 400;
|
38
|
+
}
|
39
|
+
.text {
|
40
|
+
font-size: 12px;
|
41
|
+
}
|
42
|
+
.value {
|
43
|
+
font-size: 28px;
|
44
|
+
}
|
45
|
+
.index {
|
46
|
+
font-size: medium !important;
|
47
|
+
}
|
48
|
+
.box1 {
|
49
|
+
background-color: #D1E7DD;
|
50
|
+
width: fit-content;
|
51
|
+
border-radius: 0.3333333333rem;
|
52
|
+
}
|
53
|
+
.box2 {
|
54
|
+
background-color: #F8D7DA;
|
55
|
+
width: fit-content;
|
56
|
+
border-radius: 0.3333333333rem;
|
57
|
+
}</style>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/** @typedef {typeof __propDef.props} StatusCardBodyProps */
|
2
|
+
/** @typedef {typeof __propDef.events} StatusCardBodyEvents */
|
3
|
+
/** @typedef {typeof __propDef.slots} StatusCardBodySlots */
|
4
|
+
export default class StatusCardBody extends SvelteComponentTyped<{
|
5
|
+
index: any;
|
6
|
+
text: any;
|
7
|
+
value: any;
|
8
|
+
}, {
|
9
|
+
[evt: string]: CustomEvent<any>;
|
10
|
+
}, {
|
11
|
+
default: {};
|
12
|
+
}> {
|
13
|
+
}
|
14
|
+
export type StatusCardBodyProps = typeof __propDef.props;
|
15
|
+
export type StatusCardBodyEvents = typeof __propDef.events;
|
16
|
+
export type StatusCardBodySlots = typeof __propDef.slots;
|
17
|
+
import { SvelteComponentTyped } from "svelte";
|
18
|
+
declare const __propDef: {
|
19
|
+
props: {
|
20
|
+
index: any;
|
21
|
+
text: any;
|
22
|
+
value: any;
|
23
|
+
};
|
24
|
+
events: {
|
25
|
+
[evt: string]: CustomEvent<any>;
|
26
|
+
};
|
27
|
+
slots: {
|
28
|
+
default: {};
|
29
|
+
};
|
30
|
+
};
|
31
|
+
export {};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<script>
|
2
|
+
export let title = '';
|
3
|
+
export let subTitle = '';
|
4
|
+
</script>
|
5
|
+
|
6
|
+
<div class="title">
|
7
|
+
<h4>
|
8
|
+
<p class="text-secondary m-0 title fw-lighter">{title}</p>
|
9
|
+
<p class="text-primary m-0 sub_title fw-normal">{subTitle}</p>
|
10
|
+
</h4>
|
11
|
+
</div>
|
12
|
+
<slot />
|
13
|
+
|
14
|
+
<style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
|
15
|
+
@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");
|
16
|
+
@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");
|
17
|
+
.card {
|
18
|
+
background-color: #F8F9FA;
|
19
|
+
padding: 1rem;
|
20
|
+
border-radius: 0.75rem;
|
21
|
+
font-family: Roboto;
|
22
|
+
min-width: 22rem;
|
23
|
+
min-height: 14rem;
|
24
|
+
}
|
25
|
+
.title {
|
26
|
+
font-size: 24px;
|
27
|
+
font-weight: 400;
|
28
|
+
}
|
29
|
+
.text {
|
30
|
+
font-size: 12px;
|
31
|
+
}
|
32
|
+
.value {
|
33
|
+
font-size: 28px;
|
34
|
+
}
|
35
|
+
.index {
|
36
|
+
font-size: medium !important;
|
37
|
+
}
|
38
|
+
.box1 {
|
39
|
+
background-color: #D1E7DD;
|
40
|
+
width: fit-content;
|
41
|
+
border-radius: 0.3333333333rem;
|
42
|
+
}
|
43
|
+
.box2 {
|
44
|
+
background-color: #F8D7DA;
|
45
|
+
width: fit-content;
|
46
|
+
border-radius: 0.3333333333rem;
|
47
|
+
}</style>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/** @typedef {typeof __propDef.props} StatusCardTitleProps */
|
2
|
+
/** @typedef {typeof __propDef.events} StatusCardTitleEvents */
|
3
|
+
/** @typedef {typeof __propDef.slots} StatusCardTitleSlots */
|
4
|
+
export default class StatusCardTitle extends SvelteComponentTyped<{
|
5
|
+
title?: string | undefined;
|
6
|
+
subTitle?: string | undefined;
|
7
|
+
}, {
|
8
|
+
[evt: string]: CustomEvent<any>;
|
9
|
+
}, {
|
10
|
+
default: {};
|
11
|
+
}> {
|
12
|
+
}
|
13
|
+
export type StatusCardTitleProps = typeof __propDef.props;
|
14
|
+
export type StatusCardTitleEvents = typeof __propDef.events;
|
15
|
+
export type StatusCardTitleSlots = typeof __propDef.slots;
|
16
|
+
import { SvelteComponentTyped } from "svelte";
|
17
|
+
declare const __propDef: {
|
18
|
+
props: {
|
19
|
+
title?: string | undefined;
|
20
|
+
subTitle?: string | undefined;
|
21
|
+
};
|
22
|
+
events: {
|
23
|
+
[evt: string]: CustomEvent<any>;
|
24
|
+
};
|
25
|
+
slots: {
|
26
|
+
default: {};
|
27
|
+
};
|
28
|
+
};
|
29
|
+
export {};
|
@@ -27,10 +27,10 @@
|
|
27
27
|
|
28
28
|
<div class={toastStyle.join(' ')}>
|
29
29
|
<Row class="me-0 ms-0 ps-1">
|
30
|
-
<Col sm="
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
<Col sm="12" class="ps-2 pt-0 pb-0 pe-3 d-flex align-items-center">
|
31
|
+
{#if iconName}
|
32
|
+
<Icon name={iconName} class="me-2" />
|
33
|
+
{/if}
|
34
34
|
<slot>
|
35
35
|
{#if label}
|
36
36
|
{label}
|
@@ -57,8 +57,6 @@
|
|
57
57
|
bottom: 14px;
|
58
58
|
right: 6px;
|
59
59
|
z-index: 2000;
|
60
|
-
min-width: 100px;
|
61
|
-
max-width: 500px;
|
62
60
|
border: 1px solid #000000;
|
63
61
|
border-left-width: 5px;
|
64
62
|
border-radius: 6px;
|
@@ -658,4 +656,7 @@
|
|
658
656
|
font-style: normal;
|
659
657
|
font-weight: 400;
|
660
658
|
line-height: normal;
|
659
|
+
}
|
660
|
+
:global(.bg-dark) {
|
661
|
+
background-color: #05445E !important;
|
661
662
|
}</style>
|
@@ -0,0 +1,108 @@
|
|
1
|
+
@import './../variable.scss';
|
2
|
+
.card {
|
3
|
+
font-family: $bodyFonts;
|
4
|
+
background-color: #f8f8f8;
|
5
|
+
border-radius: calc((3*$rem)/4);
|
6
|
+
padding: $rem;
|
7
|
+
border-color: transparent;
|
8
|
+
min-height: 354px;
|
9
|
+
min-width: 355px;
|
10
|
+
}
|
11
|
+
.doublecard{
|
12
|
+
font-family: $bodyFonts;
|
13
|
+
background-color: #f8f8f8;
|
14
|
+
border-radius: calc((3*$rem)/4);
|
15
|
+
padding: $rem;
|
16
|
+
border-color: transparent;
|
17
|
+
min-height: 354px;
|
18
|
+
min-width: 712px;
|
19
|
+
}
|
20
|
+
.state-card {
|
21
|
+
font-family: $bodyFonts;
|
22
|
+
background-color: #f8f8f8;
|
23
|
+
border-radius: calc((3*$rem)/4);
|
24
|
+
padding: $rem;
|
25
|
+
border-color: transparent;
|
26
|
+
background-color: $gray-200 !important;
|
27
|
+
}
|
28
|
+
.title{
|
29
|
+
font-size: $widget-card-title;
|
30
|
+
font-weight: $title-weight;
|
31
|
+
}
|
32
|
+
.full-screen {
|
33
|
+
width: 100%;
|
34
|
+
height: 100%;
|
35
|
+
position: fixed;
|
36
|
+
top: 0;
|
37
|
+
left: 0;
|
38
|
+
z-index: 1000;
|
39
|
+
margin: 0;
|
40
|
+
}
|
41
|
+
|
42
|
+
.full-screen .card {
|
43
|
+
width: 100%;
|
44
|
+
height: 100%;
|
45
|
+
border-radius: 0;
|
46
|
+
}
|
47
|
+
|
48
|
+
.content{
|
49
|
+
font-size: 16px;
|
50
|
+
}
|
51
|
+
|
52
|
+
.status {
|
53
|
+
top: 10px;
|
54
|
+
right: 10px;
|
55
|
+
font-size: 12px;
|
56
|
+
float:left;
|
57
|
+
}
|
58
|
+
|
59
|
+
.completed-tag {
|
60
|
+
background-color: #c0e4c1; /* Green */
|
61
|
+
color: #4CAF50;
|
62
|
+
padding: 5px 10px;
|
63
|
+
border-radius: 5px;
|
64
|
+
}
|
65
|
+
.overdue-tag {
|
66
|
+
background-color: #eba797; /* Green */
|
67
|
+
color: #c9443a;
|
68
|
+
padding: 5px 10px;
|
69
|
+
border-radius: 5px;
|
70
|
+
}
|
71
|
+
.progress-tag {
|
72
|
+
background-color: #e6be75; /* Green */
|
73
|
+
color: #db9833;
|
74
|
+
padding: 5px 10px;
|
75
|
+
border-radius: 5px;
|
76
|
+
}
|
77
|
+
|
78
|
+
.statecardtitle {
|
79
|
+
font-weight: 400;
|
80
|
+
float: right;
|
81
|
+
width: max-content;
|
82
|
+
}
|
83
|
+
|
84
|
+
.subtitle {
|
85
|
+
float: left;
|
86
|
+
font-size: 16px;
|
87
|
+
font-weight: 400;
|
88
|
+
width: max-content;
|
89
|
+
}
|
90
|
+
|
91
|
+
.time {
|
92
|
+
float: right;
|
93
|
+
font-size: 12px;
|
94
|
+
color: #999;
|
95
|
+
width: max-content;
|
96
|
+
}
|
97
|
+
.activeStatus{
|
98
|
+
background-color: #c0e4c1; /* Green */
|
99
|
+
color: #4CAF50;
|
100
|
+
padding: 5px 10px;
|
101
|
+
border-radius: 5px;
|
102
|
+
}
|
103
|
+
.errorStatus{
|
104
|
+
background-color: #eba797; /* Green */
|
105
|
+
color: #c9443a;
|
106
|
+
padding: 5px 10px;
|
107
|
+
border-radius: 5px;
|
108
|
+
}
|
@@ -0,0 +1,130 @@
|
|
1
|
+
<script>
|
2
|
+
import { Col, Row } from 'sveltestrap';
|
3
|
+
export let status = 'active';
|
4
|
+
export let title = '#RTD101';
|
5
|
+
export let time = '7 am to 12 pm';
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<div class="state-card mb-2">
|
9
|
+
<Row>
|
10
|
+
<Col>
|
11
|
+
<div class="content float-start">
|
12
|
+
<div class="statecardtitle">{title}</div>
|
13
|
+
</div>
|
14
|
+
</Col>
|
15
|
+
<Col>
|
16
|
+
<div class="status float-end">
|
17
|
+
<span class={status == 'active' ? 'activeStatus' : 'errorStatus'}>
|
18
|
+
{status == 'active' ? 'active' : 'error'}</span
|
19
|
+
>
|
20
|
+
</div>
|
21
|
+
</Col>
|
22
|
+
</Row>
|
23
|
+
<Row>
|
24
|
+
<Col><div class="time mt-1 float-start">{time}</div></Col>
|
25
|
+
</Row>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
|
29
|
+
@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");
|
30
|
+
@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");
|
31
|
+
.card {
|
32
|
+
font-family: Roboto;
|
33
|
+
background-color: #f8f8f8;
|
34
|
+
border-radius: 0.75rem;
|
35
|
+
padding: 1rem;
|
36
|
+
border-color: transparent;
|
37
|
+
min-height: 354px;
|
38
|
+
min-width: 355px;
|
39
|
+
}
|
40
|
+
.doublecard {
|
41
|
+
font-family: Roboto;
|
42
|
+
background-color: #f8f8f8;
|
43
|
+
border-radius: 0.75rem;
|
44
|
+
padding: 1rem;
|
45
|
+
border-color: transparent;
|
46
|
+
min-height: 354px;
|
47
|
+
min-width: 712px;
|
48
|
+
}
|
49
|
+
.state-card {
|
50
|
+
font-family: Roboto;
|
51
|
+
background-color: #f8f8f8;
|
52
|
+
border-radius: 0.75rem;
|
53
|
+
padding: 1rem;
|
54
|
+
border-color: transparent;
|
55
|
+
background-color: #E9ECEF !important;
|
56
|
+
}
|
57
|
+
.title {
|
58
|
+
font-size: 20px;
|
59
|
+
font-weight: 400;
|
60
|
+
}
|
61
|
+
.full-screen {
|
62
|
+
width: 100%;
|
63
|
+
height: 100%;
|
64
|
+
position: fixed;
|
65
|
+
top: 0;
|
66
|
+
left: 0;
|
67
|
+
z-index: 1000;
|
68
|
+
margin: 0;
|
69
|
+
}
|
70
|
+
.full-screen .card {
|
71
|
+
width: 100%;
|
72
|
+
height: 100%;
|
73
|
+
border-radius: 0;
|
74
|
+
}
|
75
|
+
.content {
|
76
|
+
font-size: 16px;
|
77
|
+
}
|
78
|
+
.status {
|
79
|
+
top: 10px;
|
80
|
+
right: 10px;
|
81
|
+
font-size: 12px;
|
82
|
+
float: left;
|
83
|
+
}
|
84
|
+
.completed-tag {
|
85
|
+
background-color: #c0e4c1; /* Green */
|
86
|
+
color: #4CAF50;
|
87
|
+
padding: 5px 10px;
|
88
|
+
border-radius: 5px;
|
89
|
+
}
|
90
|
+
.overdue-tag {
|
91
|
+
background-color: #eba797; /* Green */
|
92
|
+
color: #c9443a;
|
93
|
+
padding: 5px 10px;
|
94
|
+
border-radius: 5px;
|
95
|
+
}
|
96
|
+
.progress-tag {
|
97
|
+
background-color: #e6be75; /* Green */
|
98
|
+
color: #db9833;
|
99
|
+
padding: 5px 10px;
|
100
|
+
border-radius: 5px;
|
101
|
+
}
|
102
|
+
.statecardtitle {
|
103
|
+
font-weight: 400;
|
104
|
+
float: right;
|
105
|
+
width: max-content;
|
106
|
+
}
|
107
|
+
.subtitle {
|
108
|
+
float: left;
|
109
|
+
font-size: 16px;
|
110
|
+
font-weight: 400;
|
111
|
+
width: max-content;
|
112
|
+
}
|
113
|
+
.time {
|
114
|
+
float: right;
|
115
|
+
font-size: 12px;
|
116
|
+
color: #999;
|
117
|
+
width: max-content;
|
118
|
+
}
|
119
|
+
.activeStatus {
|
120
|
+
background-color: #c0e4c1; /* Green */
|
121
|
+
color: #4CAF50;
|
122
|
+
padding: 5px 10px;
|
123
|
+
border-radius: 5px;
|
124
|
+
}
|
125
|
+
.errorStatus {
|
126
|
+
background-color: #eba797; /* Green */
|
127
|
+
color: #c9443a;
|
128
|
+
padding: 5px 10px;
|
129
|
+
border-radius: 5px;
|
130
|
+
}</style>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/** @typedef {typeof __propDef.props} SensorStatusCardProps */
|
2
|
+
/** @typedef {typeof __propDef.events} SensorStatusCardEvents */
|
3
|
+
/** @typedef {typeof __propDef.slots} SensorStatusCardSlots */
|
4
|
+
export default class SensorStatusCard extends SvelteComponentTyped<{
|
5
|
+
time?: string | undefined;
|
6
|
+
title?: string | undefined;
|
7
|
+
status?: string | undefined;
|
8
|
+
}, {
|
9
|
+
[evt: string]: CustomEvent<any>;
|
10
|
+
}, {}> {
|
11
|
+
}
|
12
|
+
export type SensorStatusCardProps = typeof __propDef.props;
|
13
|
+
export type SensorStatusCardEvents = typeof __propDef.events;
|
14
|
+
export type SensorStatusCardSlots = typeof __propDef.slots;
|
15
|
+
import { SvelteComponentTyped } from "svelte";
|
16
|
+
declare const __propDef: {
|
17
|
+
props: {
|
18
|
+
time?: string | undefined;
|
19
|
+
title?: string | undefined;
|
20
|
+
status?: string | undefined;
|
21
|
+
};
|
22
|
+
events: {
|
23
|
+
[evt: string]: CustomEvent<any>;
|
24
|
+
};
|
25
|
+
slots: {};
|
26
|
+
};
|
27
|
+
export {};
|
@@ -0,0 +1,133 @@
|
|
1
|
+
<script>
|
2
|
+
import { Col, Row } from 'sveltestrap';
|
3
|
+
export let state = "overdue";
|
4
|
+
export let title = 'Fertilizing';
|
5
|
+
export let subtitle = 'Basil- G1B2';
|
6
|
+
export let time = '7 am to 12 pm';
|
7
|
+
</script>
|
8
|
+
<div class="state-card mb-2">
|
9
|
+
<Row>
|
10
|
+
|
11
|
+
<Col>
|
12
|
+
<div class="status">
|
13
|
+
<span class={state == "completed" ? "completed-tag" : (state == "inprogress" ? "progress-tag" : "overdue-tag")}>
|
14
|
+
{state == "completed" ? "completed" : (state == "inprogress" ? "inprogress" : "overdue")}</span>
|
15
|
+
</div>
|
16
|
+
</Col>
|
17
|
+
<Col>
|
18
|
+
<div class="content">
|
19
|
+
<div class="statecardtitle">{title}</div>
|
20
|
+
</div>
|
21
|
+
</Col>
|
22
|
+
</Row>
|
23
|
+
<Row>
|
24
|
+
<Col>
|
25
|
+
<div class="subtitle">{subtitle}</div>
|
26
|
+
</Col>
|
27
|
+
<Col> <div class="time mt-1">{time}</div>
|
28
|
+
</Col>
|
29
|
+
</Row>
|
30
|
+
</div>
|
31
|
+
<style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
|
32
|
+
@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");
|
33
|
+
@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");
|
34
|
+
.card {
|
35
|
+
font-family: Roboto;
|
36
|
+
background-color: #f8f8f8;
|
37
|
+
border-radius: 0.75rem;
|
38
|
+
padding: 1rem;
|
39
|
+
border-color: transparent;
|
40
|
+
min-height: 354px;
|
41
|
+
min-width: 355px;
|
42
|
+
}
|
43
|
+
.doublecard {
|
44
|
+
font-family: Roboto;
|
45
|
+
background-color: #f8f8f8;
|
46
|
+
border-radius: 0.75rem;
|
47
|
+
padding: 1rem;
|
48
|
+
border-color: transparent;
|
49
|
+
min-height: 354px;
|
50
|
+
min-width: 712px;
|
51
|
+
}
|
52
|
+
.state-card {
|
53
|
+
font-family: Roboto;
|
54
|
+
background-color: #f8f8f8;
|
55
|
+
border-radius: 0.75rem;
|
56
|
+
padding: 1rem;
|
57
|
+
border-color: transparent;
|
58
|
+
background-color: #E9ECEF !important;
|
59
|
+
}
|
60
|
+
.title {
|
61
|
+
font-size: 20px;
|
62
|
+
font-weight: 400;
|
63
|
+
}
|
64
|
+
.full-screen {
|
65
|
+
width: 100%;
|
66
|
+
height: 100%;
|
67
|
+
position: fixed;
|
68
|
+
top: 0;
|
69
|
+
left: 0;
|
70
|
+
z-index: 1000;
|
71
|
+
margin: 0;
|
72
|
+
}
|
73
|
+
.full-screen .card {
|
74
|
+
width: 100%;
|
75
|
+
height: 100%;
|
76
|
+
border-radius: 0;
|
77
|
+
}
|
78
|
+
.content {
|
79
|
+
font-size: 16px;
|
80
|
+
}
|
81
|
+
.status {
|
82
|
+
top: 10px;
|
83
|
+
right: 10px;
|
84
|
+
font-size: 12px;
|
85
|
+
float: left;
|
86
|
+
}
|
87
|
+
.completed-tag {
|
88
|
+
background-color: #c0e4c1; /* Green */
|
89
|
+
color: #4CAF50;
|
90
|
+
padding: 5px 10px;
|
91
|
+
border-radius: 5px;
|
92
|
+
}
|
93
|
+
.overdue-tag {
|
94
|
+
background-color: #eba797; /* Green */
|
95
|
+
color: #c9443a;
|
96
|
+
padding: 5px 10px;
|
97
|
+
border-radius: 5px;
|
98
|
+
}
|
99
|
+
.progress-tag {
|
100
|
+
background-color: #e6be75; /* Green */
|
101
|
+
color: #db9833;
|
102
|
+
padding: 5px 10px;
|
103
|
+
border-radius: 5px;
|
104
|
+
}
|
105
|
+
.statecardtitle {
|
106
|
+
font-weight: 400;
|
107
|
+
float: right;
|
108
|
+
width: max-content;
|
109
|
+
}
|
110
|
+
.subtitle {
|
111
|
+
float: left;
|
112
|
+
font-size: 16px;
|
113
|
+
font-weight: 400;
|
114
|
+
width: max-content;
|
115
|
+
}
|
116
|
+
.time {
|
117
|
+
float: right;
|
118
|
+
font-size: 12px;
|
119
|
+
color: #999;
|
120
|
+
width: max-content;
|
121
|
+
}
|
122
|
+
.activeStatus {
|
123
|
+
background-color: #c0e4c1; /* Green */
|
124
|
+
color: #4CAF50;
|
125
|
+
padding: 5px 10px;
|
126
|
+
border-radius: 5px;
|
127
|
+
}
|
128
|
+
.errorStatus {
|
129
|
+
background-color: #eba797; /* Green */
|
130
|
+
color: #c9443a;
|
131
|
+
padding: 5px 10px;
|
132
|
+
border-radius: 5px;
|
133
|
+
}</style>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/** @typedef {typeof __propDef.props} StateCardProps */
|
2
|
+
/** @typedef {typeof __propDef.events} StateCardEvents */
|
3
|
+
/** @typedef {typeof __propDef.slots} StateCardSlots */
|
4
|
+
export default class StateCard extends SvelteComponentTyped<{
|
5
|
+
time?: string | undefined;
|
6
|
+
title?: string | undefined;
|
7
|
+
subtitle?: string | undefined;
|
8
|
+
state?: string | undefined;
|
9
|
+
}, {
|
10
|
+
[evt: string]: CustomEvent<any>;
|
11
|
+
}, {}> {
|
12
|
+
}
|
13
|
+
export type StateCardProps = typeof __propDef.props;
|
14
|
+
export type StateCardEvents = typeof __propDef.events;
|
15
|
+
export type StateCardSlots = typeof __propDef.slots;
|
16
|
+
import { SvelteComponentTyped } from "svelte";
|
17
|
+
declare const __propDef: {
|
18
|
+
props: {
|
19
|
+
time?: string | undefined;
|
20
|
+
title?: string | undefined;
|
21
|
+
subtitle?: string | undefined;
|
22
|
+
state?: string | undefined;
|
23
|
+
};
|
24
|
+
events: {
|
25
|
+
[evt: string]: CustomEvent<any>;
|
26
|
+
};
|
27
|
+
slots: {};
|
28
|
+
};
|
29
|
+
export {};
|