@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.
Files changed (87) hide show
  1. package/components/Accordion/Accordion.svelte +3 -0
  2. package/components/Accordion/AccordionItem.svelte +3 -0
  3. package/components/Badge/Badge.svelte +3 -0
  4. package/components/Breadcrumb/Breadcrumb.svelte +3 -0
  5. package/components/Button/Button.svelte +3 -0
  6. package/components/CardIcon/CardIcon.svelte +3 -0
  7. package/components/CardIcon/CardiconBody.svelte +3 -0
  8. package/components/CardIcon/CardiconSubtitle.svelte +3 -0
  9. package/components/CardIcon/CardiconTitle.svelte +3 -0
  10. package/components/Charts/Barchart.svelte +74 -0
  11. package/components/Charts/Barchart.svelte.d.ts +23 -0
  12. package/components/Charts/DoughnutChart.svelte +73 -0
  13. package/components/Charts/DoughnutChart.svelte.d.ts +29 -0
  14. package/components/Charts/LineChart.svelte +62 -0
  15. package/components/Charts/LineChart.svelte.d.ts +23 -0
  16. package/components/Charts/PieChart.svelte +75 -0
  17. package/components/Charts/PieChart.svelte.d.ts +29 -0
  18. package/components/CheckBox/Checkbox.svelte +3 -0
  19. package/components/Dropdown/Dropdown.svelte +3 -0
  20. package/components/Dropdown/DropdownItem.svelte +3 -0
  21. package/components/EnkiSidbar/EnkiSidebar.svelte +3 -0
  22. package/components/EnkiSidbar/NavIcon.svelte +3 -0
  23. package/components/EnkiSidbar/NavItem.svelte +3 -0
  24. package/components/EnkiSidbar/NavLink.svelte +3 -0
  25. package/components/Header/Brand.svelte +25 -16
  26. package/components/Header/Header.scss +40 -34
  27. package/components/Header/Header.svelte +26 -20
  28. package/components/Header/Header.svelte.d.ts +6 -2
  29. package/components/Header/HeaderDropDownLink.svelte +11 -0
  30. package/components/Header/HeaderDropDownLink.svelte.d.ts +29 -0
  31. package/components/Header/HeaderDropDownLinkItem.svelte +9 -0
  32. package/components/Header/HeaderDropDownLinkItem.svelte.d.ts +31 -0
  33. package/components/Header/HeaderItem.svelte +9 -0
  34. package/components/Header/HeaderLink.svelte +9 -0
  35. package/components/Header/HeaderLink.svelte.d.ts +31 -0
  36. package/components/Header/HeaderLinks.svelte +9 -0
  37. package/components/Header/HeaderLinks.svelte.d.ts +27 -0
  38. package/components/Header/UserAvatar.svelte +12 -3
  39. package/components/Layout/Content.svelte +9 -0
  40. package/components/Layout/Content.svelte.d.ts +29 -0
  41. package/components/Layout/Footer.svelte +2 -0
  42. package/components/Layout/Layout.svelte +6 -0
  43. package/components/Layout/Layout.svelte.d.ts +27 -0
  44. package/components/Layout/Page.svelte +35 -9
  45. package/components/Layout/Page.svelte.d.ts +6 -2
  46. package/components/Layout/SortableGrid.svelte +28 -0
  47. package/components/Layout/SortableGrid.svelte.d.ts +27 -0
  48. package/components/ModalWindow/Modal.svelte +3 -0
  49. package/components/ModalWindow/ModalBody.svelte +3 -0
  50. package/components/ModalWindow/ModalFooter.svelte +3 -0
  51. package/components/ModalWindow/ModalHeader.svelte +3 -0
  52. package/components/NotFound/NotFound.svelte +3 -0
  53. package/components/Pagination/Pagination.svelte +3 -0
  54. package/components/RadioButton/RadioButton.svelte +3 -0
  55. package/components/Sidebar/MenuGroup.svelte +108 -0
  56. package/components/Sidebar/MenuGroup.svelte.d.ts +29 -0
  57. package/components/Sidebar/MenuItem.svelte +122 -0
  58. package/components/Sidebar/MenuItem.svelte.d.ts +35 -0
  59. package/components/Sidebar/SideBarMenu.svelte +148 -0
  60. package/components/Sidebar/SideBarMenu.svelte.d.ts +27 -0
  61. package/components/Sidebar/Sidebar.scss +29 -0
  62. package/components/Sidebar/Sidebar.svelte +29 -0
  63. package/components/StatusCard/StatusCard.scss +35 -0
  64. package/components/StatusCard/StatusCard.svelte +42 -0
  65. package/components/StatusCard/StatusCard.svelte.d.ts +27 -0
  66. package/components/StatusCard/StatusCardBody.svelte +57 -0
  67. package/components/StatusCard/StatusCardBody.svelte.d.ts +31 -0
  68. package/components/StatusCard/StatusCardTitle.svelte +47 -0
  69. package/components/StatusCard/StatusCardTitle.svelte.d.ts +29 -0
  70. package/components/Switches/Switch.svelte +3 -0
  71. package/components/Tab/Tab.svelte +3 -0
  72. package/components/TextField/TextField.svelte +3 -0
  73. package/components/Toast/Toast.scss +0 -2
  74. package/components/Toast/Toast.svelte +7 -6
  75. package/components/Tooltip/Tooltip.svelte +3 -0
  76. package/components/WidgetCard/Card.scss +108 -0
  77. package/components/WidgetCard/SensorStatusCard.svelte +130 -0
  78. package/components/WidgetCard/SensorStatusCard.svelte.d.ts +27 -0
  79. package/components/WidgetCard/StateCard.svelte +133 -0
  80. package/components/WidgetCard/StateCard.svelte.d.ts +29 -0
  81. package/components/WidgetCard/WidgetCard.svelte +152 -0
  82. package/components/WidgetCard/WidgetCard.svelte.d.ts +35 -0
  83. package/components/WidgetCard/WidgetCardBody.svelte +13 -0
  84. package/components/WidgetCard/WidgetCardBody.svelte.d.ts +27 -0
  85. package/components/common.scss +4 -0
  86. package/components/variable.scss +13 -3
  87. package/package.json +30 -2
@@ -0,0 +1,152 @@
1
+ <script>
2
+ import { onMount } from 'svelte';
3
+ import { Col, Row } from 'sveltestrap';
4
+ export let title;
5
+ export let resizable = false;
6
+ export let widthOnly = true;
7
+ export let resizeQuotient = 2;
8
+ export let cardLength = 1;
9
+ let maximized = false;
10
+ let element = null;
11
+ const toggleMaximize = () => {
12
+ maximized = !maximized;
13
+ if (!maximized) {
14
+ element.style.width = element.getBoundingClientRect().width / resizeQuotient + 'px';
15
+ if (!widthOnly) {
16
+ element.style.height = element.getBoundingClientRect().height / resizeQuotient + 'px';
17
+ }
18
+
19
+ return;
20
+ }
21
+ element.style.width = element.getBoundingClientRect().width * resizeQuotient + 'px';
22
+ if (!widthOnly) {
23
+ element.style.height = element.getBoundingClientRect().height * resizeQuotient + 'px';
24
+ }
25
+ };
26
+ </script>
27
+
28
+ <div bind:this={element}>
29
+ <div class="m-2 {cardLength == 1 ? "card" : "doublecard"}">
30
+ <Row>
31
+ <Col>
32
+ <div class="title fw-normal">{title}</div>
33
+ </Col>
34
+ {#if resizable}
35
+ <Col>
36
+ <div class="float-end">
37
+ <i on:click={toggleMaximize} class="material-icons"
38
+ >{!maximized ? 'zoom_out_map' : 'zoom_in_map'}</i
39
+ >
40
+ </div>
41
+ </Col>
42
+ {/if}
43
+ </Row>
44
+ <Row>
45
+ <slot />
46
+ </Row>
47
+ </div>
48
+ </div>
49
+
50
+ <style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
51
+ @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");
52
+ @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");
53
+ .card {
54
+ font-family: Roboto;
55
+ background-color: #f8f8f8;
56
+ border-radius: 0.75rem;
57
+ padding: 1rem;
58
+ border-color: transparent;
59
+ min-height: 354px;
60
+ min-width: 355px;
61
+ }
62
+ .doublecard {
63
+ font-family: Roboto;
64
+ background-color: #f8f8f8;
65
+ border-radius: 0.75rem;
66
+ padding: 1rem;
67
+ border-color: transparent;
68
+ min-height: 354px;
69
+ min-width: 712px;
70
+ }
71
+ .state-card {
72
+ font-family: Roboto;
73
+ background-color: #f8f8f8;
74
+ border-radius: 0.75rem;
75
+ padding: 1rem;
76
+ border-color: transparent;
77
+ background-color: #E9ECEF !important;
78
+ }
79
+ .title {
80
+ font-size: 20px;
81
+ font-weight: 400;
82
+ }
83
+ .full-screen {
84
+ width: 100%;
85
+ height: 100%;
86
+ position: fixed;
87
+ top: 0;
88
+ left: 0;
89
+ z-index: 1000;
90
+ margin: 0;
91
+ }
92
+ .full-screen .card {
93
+ width: 100%;
94
+ height: 100%;
95
+ border-radius: 0;
96
+ }
97
+ .content {
98
+ font-size: 16px;
99
+ }
100
+ .status {
101
+ top: 10px;
102
+ right: 10px;
103
+ font-size: 12px;
104
+ float: left;
105
+ }
106
+ .completed-tag {
107
+ background-color: #c0e4c1; /* Green */
108
+ color: #4CAF50;
109
+ padding: 5px 10px;
110
+ border-radius: 5px;
111
+ }
112
+ .overdue-tag {
113
+ background-color: #eba797; /* Green */
114
+ color: #c9443a;
115
+ padding: 5px 10px;
116
+ border-radius: 5px;
117
+ }
118
+ .progress-tag {
119
+ background-color: #e6be75; /* Green */
120
+ color: #db9833;
121
+ padding: 5px 10px;
122
+ border-radius: 5px;
123
+ }
124
+ .statecardtitle {
125
+ font-weight: 400;
126
+ float: right;
127
+ width: max-content;
128
+ }
129
+ .subtitle {
130
+ float: left;
131
+ font-size: 16px;
132
+ font-weight: 400;
133
+ width: max-content;
134
+ }
135
+ .time {
136
+ float: right;
137
+ font-size: 12px;
138
+ color: #999;
139
+ width: max-content;
140
+ }
141
+ .activeStatus {
142
+ background-color: #c0e4c1; /* Green */
143
+ color: #4CAF50;
144
+ padding: 5px 10px;
145
+ border-radius: 5px;
146
+ }
147
+ .errorStatus {
148
+ background-color: #eba797; /* Green */
149
+ color: #c9443a;
150
+ padding: 5px 10px;
151
+ border-radius: 5px;
152
+ }</style>
@@ -0,0 +1,35 @@
1
+ /** @typedef {typeof __propDef.props} WidgetCardProps */
2
+ /** @typedef {typeof __propDef.events} WidgetCardEvents */
3
+ /** @typedef {typeof __propDef.slots} WidgetCardSlots */
4
+ export default class WidgetCard extends SvelteComponentTyped<{
5
+ title: any;
6
+ resizable?: boolean | undefined;
7
+ widthOnly?: boolean | undefined;
8
+ resizeQuotient?: number | undefined;
9
+ cardLength?: number | undefined;
10
+ }, {
11
+ [evt: string]: CustomEvent<any>;
12
+ }, {
13
+ default: {};
14
+ }> {
15
+ }
16
+ export type WidgetCardProps = typeof __propDef.props;
17
+ export type WidgetCardEvents = typeof __propDef.events;
18
+ export type WidgetCardSlots = typeof __propDef.slots;
19
+ import { SvelteComponentTyped } from "svelte";
20
+ declare const __propDef: {
21
+ props: {
22
+ title: any;
23
+ resizable?: boolean | undefined;
24
+ widthOnly?: boolean | undefined;
25
+ resizeQuotient?: number | undefined;
26
+ cardLength?: number | undefined;
27
+ };
28
+ events: {
29
+ [evt: string]: CustomEvent<any>;
30
+ };
31
+ slots: {
32
+ default: {};
33
+ };
34
+ };
35
+ export {};
@@ -0,0 +1,13 @@
1
+ <script>
2
+ </script>
3
+
4
+ <div class="widget-card-body">
5
+ <slot />
6
+ </div>
7
+
8
+ <style>
9
+ .widget-card-body {
10
+ width: 100%;
11
+ position: relative;
12
+ }
13
+ </style>
@@ -0,0 +1,27 @@
1
+ /** @typedef {typeof __propDef.props} WidgetCardBodyProps */
2
+ /** @typedef {typeof __propDef.events} WidgetCardBodyEvents */
3
+ /** @typedef {typeof __propDef.slots} WidgetCardBodySlots */
4
+ export default class WidgetCardBody extends SvelteComponentTyped<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {
9
+ default: {};
10
+ }> {
11
+ }
12
+ export type WidgetCardBodyProps = typeof __propDef.props;
13
+ export type WidgetCardBodyEvents = typeof __propDef.events;
14
+ export type WidgetCardBodySlots = typeof __propDef.slots;
15
+ import { SvelteComponentTyped } from "svelte";
16
+ declare const __propDef: {
17
+ props: {
18
+ [x: string]: never;
19
+ };
20
+ events: {
21
+ [evt: string]: CustomEvent<any>;
22
+ };
23
+ slots: {
24
+ default: {};
25
+ };
26
+ };
27
+ export {};
@@ -786,4 +786,8 @@
786
786
  font-style: normal;
787
787
  font-weight: 400;
788
788
  line-height: normal;
789
+ }
790
+
791
+ :global(.bg-dark) {
792
+ background-color: $bg-dark !important;
789
793
  }
@@ -40,6 +40,8 @@ $warning: #FFBA3A;
40
40
  $warning-dark: #997404;
41
41
  $warning-light: #FFF3CD;
42
42
 
43
+ $bg-dark: #05445E;
44
+
43
45
  $gray-900: #212529;
44
46
  $gray-800: #343A40;
45
47
  $gray-700: #495057;
@@ -49,6 +51,7 @@ $gray-400: #CED4DA;
49
51
  $gray-300: #DEE2E6;
50
52
  $gray-200: #E9ECEF;
51
53
  $gray-100: #F8F9FA;
54
+ $gray-1000: #F7F8F8;
52
55
 
53
56
  $green-900: #051B11;
54
57
  $green-800: #0A3622;
@@ -97,8 +100,8 @@ $blue-500: rgba(13, 110, 253, 1);
97
100
  $Title-Color: #152536;
98
101
 
99
102
  // cardicon color private
100
- $gray-cardicon:#444;
101
- $white-cardicon:#B8B8B8;
103
+ $gray-cardicon: #444;
104
+ $white-cardicon: #B8B8B8;
102
105
 
103
106
  $box-shadow-green: rgba(11, 235, 49, 0.25);
104
107
  //Button sizes
@@ -123,4 +126,11 @@ $highShadow: 0px 1px 16px 0px rgba(0, 0, 0, 0.10);
123
126
 
124
127
  // transition variable hover
125
128
 
126
- $transitionTimeHover:.3s;
129
+ $transitionTimeHover: .3s;
130
+ $rem: 1rem;
131
+ $status-card-title : 24px;
132
+ $status-card-text : 12px;
133
+ $status-card-value : 28px;
134
+ $widget-card-title : 20px;
135
+ $sidebar-title : 16px;
136
+ $title-weight: 400;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enki-tek/fms-web-components",
3
- "version": "0.0.89",
3
+ "version": "0.1.0",
4
4
  "devDependencies": {
5
5
  "@storybook/addon-essentials": "^7.6.14",
6
6
  "@storybook/addon-interactions": "^7.6.14",
@@ -24,6 +24,7 @@
24
24
  "prettier-plugin-svelte": "^2.8.1",
25
25
  "react": "^18.2.0",
26
26
  "react-dom": "^18.2.0",
27
+ "sass": "^1.80.3",
27
28
  "storybook": "^7.6.14",
28
29
  "svelte": "^3.54.0",
29
30
  "svelte-check": "^2.9.2",
@@ -38,7 +39,11 @@
38
39
  "dependencies": {
39
40
  "@vitejs/plugin-basic-ssl": "^1.0.1",
40
41
  "bootstrap": "^5.3.2",
41
- "qr-scanner": "^1.4.2"
42
+ "chart.js": "^4.4.5",
43
+ "chartjs-plugin-datalabels": "^2.2.0",
44
+ "qr-scanner": "^1.4.2",
45
+ "sortablejs": "^1.15.3",
46
+ "svelte-chartjs": "^3.1.2"
42
47
  },
43
48
  "exports": {
44
49
  "./package.json": "./package.json",
@@ -72,6 +77,10 @@
72
77
  "./components/CardIcon/CardiconBody.svelte": "./components/CardIcon/CardiconBody.svelte",
73
78
  "./components/CardIcon/CardiconSubtitle.svelte": "./components/CardIcon/CardiconSubtitle.svelte",
74
79
  "./components/CardIcon/CardiconTitle.svelte": "./components/CardIcon/CardiconTitle.svelte",
80
+ "./components/Charts/Barchart.svelte": "./components/Charts/Barchart.svelte",
81
+ "./components/Charts/DoughnutChart.svelte": "./components/Charts/DoughnutChart.svelte",
82
+ "./components/Charts/LineChart.svelte": "./components/Charts/LineChart.svelte",
83
+ "./components/Charts/PieChart.svelte": "./components/Charts/PieChart.svelte",
75
84
  "./components/CheckBox/Checkbox.scss": "./components/CheckBox/Checkbox.scss",
76
85
  "./components/CheckBox/Checkbox.stories": "./components/CheckBox/Checkbox.stories.js",
77
86
  "./components/CheckBox/Checkbox.svelte": "./components/CheckBox/Checkbox.svelte",
@@ -103,7 +112,11 @@
103
112
  "./components/Header/Header.scss": "./components/Header/Header.scss",
104
113
  "./components/Header/Header.stories": "./components/Header/Header.stories.js",
105
114
  "./components/Header/Header.svelte": "./components/Header/Header.svelte",
115
+ "./components/Header/HeaderDropDownLink.svelte": "./components/Header/HeaderDropDownLink.svelte",
116
+ "./components/Header/HeaderDropDownLinkItem.svelte": "./components/Header/HeaderDropDownLinkItem.svelte",
106
117
  "./components/Header/HeaderItem.svelte": "./components/Header/HeaderItem.svelte",
118
+ "./components/Header/HeaderLink.svelte": "./components/Header/HeaderLink.svelte",
119
+ "./components/Header/HeaderLinks.svelte": "./components/Header/HeaderLinks.svelte",
107
120
  "./components/Header/UserAvatar.svelte": "./components/Header/UserAvatar.svelte",
108
121
  "./components/Icon/ActionIcon.svelte": "./components/Icon/ActionIcon.svelte",
109
122
  "./components/Icon/ActionInconGroup.svelte": "./components/Icon/ActionInconGroup.svelte",
@@ -111,11 +124,14 @@
111
124
  "./components/Icon/Icon.stories": "./components/Icon/Icon.stories.js",
112
125
  "./components/Icon/Icon.svelte": "./components/Icon/Icon.svelte",
113
126
  "./components/Icon/actionIcon.scss": "./components/Icon/actionIcon.scss",
127
+ "./components/Layout/Content.svelte": "./components/Layout/Content.svelte",
114
128
  "./components/Layout/Footer.svelte": "./components/Layout/Footer.svelte",
115
129
  "./components/Layout/LayOut.stories": "./components/Layout/LayOut.stories.js",
116
130
  "./components/Layout/LayOut.svelte": "./components/Layout/LayOut.svelte",
131
+ "./components/Layout/Layout.svelte": "./components/Layout/Layout.svelte",
117
132
  "./components/Layout/MainMenuHead.svelte": "./components/Layout/MainMenuHead.svelte",
118
133
  "./components/Layout/Page.svelte": "./components/Layout/Page.svelte",
134
+ "./components/Layout/SortableGrid.svelte": "./components/Layout/SortableGrid.svelte",
119
135
  "./components/Layout/menuStore": "./components/Layout/menuStore.js",
120
136
  "./components/ModalWindow/Modal.scss": "./components/ModalWindow/Modal.scss",
121
137
  "./components/ModalWindow/Modal.stories": "./components/ModalWindow/Modal.stories.js",
@@ -132,9 +148,16 @@
132
148
  "./components/RadioButton/RadioButton.scss": "./components/RadioButton/RadioButton.scss",
133
149
  "./components/RadioButton/RadioButton.stories": "./components/RadioButton/RadioButton.stories.js",
134
150
  "./components/RadioButton/RadioButton.svelte": "./components/RadioButton/RadioButton.svelte",
151
+ "./components/Sidebar/MenuGroup.svelte": "./components/Sidebar/MenuGroup.svelte",
152
+ "./components/Sidebar/MenuItem.svelte": "./components/Sidebar/MenuItem.svelte",
153
+ "./components/Sidebar/SideBarMenu.svelte": "./components/Sidebar/SideBarMenu.svelte",
135
154
  "./components/Sidebar/Sidebar.scss": "./components/Sidebar/Sidebar.scss",
136
155
  "./components/Sidebar/Sidebar.stories": "./components/Sidebar/Sidebar.stories.js",
137
156
  "./components/Sidebar/Sidebar.svelte": "./components/Sidebar/Sidebar.svelte",
157
+ "./components/StatusCard/StatusCard.scss": "./components/StatusCard/StatusCard.scss",
158
+ "./components/StatusCard/StatusCard.svelte": "./components/StatusCard/StatusCard.svelte",
159
+ "./components/StatusCard/StatusCardBody.svelte": "./components/StatusCard/StatusCardBody.svelte",
160
+ "./components/StatusCard/StatusCardTitle.svelte": "./components/StatusCard/StatusCardTitle.svelte",
138
161
  "./components/Switches/Switch.scss": "./components/Switches/Switch.scss",
139
162
  "./components/Switches/Switch.stories": "./components/Switches/Switch.stories.js",
140
163
  "./components/Switches/Switch.svelte": "./components/Switches/Switch.svelte",
@@ -154,6 +177,11 @@
154
177
  "./components/Tooltip/Tooltip.scss": "./components/Tooltip/Tooltip.scss",
155
178
  "./components/Tooltip/Tooltip.stories": "./components/Tooltip/Tooltip.stories.js",
156
179
  "./components/Tooltip/Tooltip.svelte": "./components/Tooltip/Tooltip.svelte",
180
+ "./components/WidgetCard/Card.scss": "./components/WidgetCard/Card.scss",
181
+ "./components/WidgetCard/SensorStatusCard.svelte": "./components/WidgetCard/SensorStatusCard.svelte",
182
+ "./components/WidgetCard/StateCard.svelte": "./components/WidgetCard/StateCard.svelte",
183
+ "./components/WidgetCard/WidgetCard.svelte": "./components/WidgetCard/WidgetCard.svelte",
184
+ "./components/WidgetCard/WidgetCardBody.svelte": "./components/WidgetCard/WidgetCardBody.svelte",
157
185
  "./components/common.scss": "./components/common.scss",
158
186
  "./components/i18n/ShiftLanguage.svelte": "./components/i18n/ShiftLanguage.svelte",
159
187
  "./components/i18n/i18n": "./components/i18n/i18n.js",