@enki-tek/fms-web-components 0.0.90 → 0.1.1

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.
Files changed (103) hide show
  1. package/components/Accordion/Accordion.svelte +3 -0
  2. package/components/Accordion/AccordionItem.svelte +3 -0
  3. package/components/Alert/Alert.svelte.d.ts +1 -1
  4. package/components/Badge/Badge.svelte +3 -0
  5. package/components/Breadcrumb/Breadcrumb.svelte +3 -0
  6. package/components/Button/Button.svelte +3 -0
  7. package/components/Button/Button.svelte.d.ts +8 -8
  8. package/components/Card/Card.svelte.d.ts +4 -4
  9. package/components/CardIcon/CardIcon.svelte +3 -0
  10. package/components/CardIcon/CardiconBody.svelte +3 -0
  11. package/components/CardIcon/CardiconSubtitle.svelte +3 -0
  12. package/components/CardIcon/CardiconTitle.svelte +3 -0
  13. package/components/CardIcon/CardiconTitle.svelte.d.ts +2 -2
  14. package/components/Charts/Barchart.svelte +74 -0
  15. package/components/Charts/Barchart.svelte.d.ts +23 -0
  16. package/components/Charts/DoughnutChart.svelte +73 -0
  17. package/components/Charts/DoughnutChart.svelte.d.ts +29 -0
  18. package/components/Charts/LineChart.svelte +62 -0
  19. package/components/Charts/LineChart.svelte.d.ts +23 -0
  20. package/components/Charts/PieChart.svelte +75 -0
  21. package/components/Charts/PieChart.svelte.d.ts +29 -0
  22. package/components/CheckBox/Checkbox.svelte +3 -0
  23. package/components/CheckBox/Checkbox.svelte.d.ts +8 -8
  24. package/components/Dropdown/Dropdown.svelte +3 -0
  25. package/components/Dropdown/DropdownItem.svelte +3 -0
  26. package/components/EnkiCard/CardBody.svelte.d.ts +2 -2
  27. package/components/EnkiSidbar/EnkiSidebar.svelte +3 -0
  28. package/components/EnkiSidbar/EnkiSidebar.svelte.d.ts +2 -2
  29. package/components/EnkiSidbar/NavIcon.svelte +3 -0
  30. package/components/EnkiSidbar/NavItem.svelte +3 -0
  31. package/components/EnkiSidbar/NavLink.svelte +3 -0
  32. package/components/EnkiTable/EnkiTable.svelte.d.ts +4 -4
  33. package/components/EnkiTable/TableCell.svelte.d.ts +2 -2
  34. package/components/Header/Brand.svelte +25 -16
  35. package/components/Header/Header.scss +40 -34
  36. package/components/Header/Header.svelte +26 -20
  37. package/components/Header/Header.svelte.d.ts +6 -2
  38. package/components/Header/HeaderDropDownLink.svelte +11 -0
  39. package/components/Header/HeaderDropDownLink.svelte.d.ts +29 -0
  40. package/components/Header/HeaderDropDownLinkItem.svelte +9 -0
  41. package/components/Header/HeaderDropDownLinkItem.svelte.d.ts +31 -0
  42. package/components/Header/HeaderItem.svelte +9 -0
  43. package/components/Header/HeaderItem.svelte.d.ts +2 -2
  44. package/components/Header/HeaderLink.svelte +9 -0
  45. package/components/Header/HeaderLink.svelte.d.ts +31 -0
  46. package/components/Header/HeaderLinks.svelte +9 -0
  47. package/components/Header/HeaderLinks.svelte.d.ts +27 -0
  48. package/components/Header/UserAvatar.svelte +12 -3
  49. package/components/Icon/ActionIcon.svelte.d.ts +2 -2
  50. package/components/Layout/Content.svelte +9 -0
  51. package/components/Layout/Content.svelte.d.ts +29 -0
  52. package/components/Layout/Footer.svelte +2 -0
  53. package/components/Layout/Layout.svelte +6 -0
  54. package/components/Layout/Layout.svelte.d.ts +27 -0
  55. package/components/Layout/Page.svelte +35 -9
  56. package/components/Layout/Page.svelte.d.ts +6 -2
  57. package/components/Layout/SortableGrid.svelte +28 -0
  58. package/components/Layout/SortableGrid.svelte.d.ts +27 -0
  59. package/components/ModalWindow/Modal.svelte +3 -0
  60. package/components/ModalWindow/Modal.svelte.d.ts +2 -2
  61. package/components/ModalWindow/ModalBody.svelte +3 -0
  62. package/components/ModalWindow/ModalFooter.svelte +3 -0
  63. package/components/ModalWindow/ModalHeader.svelte +3 -0
  64. package/components/NotFound/NotFound.svelte +3 -0
  65. package/components/Pagination/Pagination.svelte +3 -0
  66. package/components/RadioButton/RadioButton.svelte +3 -0
  67. package/components/Sidebar/MenuGroup.svelte +108 -0
  68. package/components/Sidebar/MenuGroup.svelte.d.ts +29 -0
  69. package/components/Sidebar/MenuItem.svelte +122 -0
  70. package/components/Sidebar/MenuItem.svelte.d.ts +35 -0
  71. package/components/Sidebar/SideBarMenu.svelte +148 -0
  72. package/components/Sidebar/SideBarMenu.svelte.d.ts +27 -0
  73. package/components/Sidebar/Sidebar.scss +29 -0
  74. package/components/Sidebar/Sidebar.svelte +29 -0
  75. package/components/StatusCard/StatusCard.scss +35 -0
  76. package/components/StatusCard/StatusCard.svelte +42 -0
  77. package/components/StatusCard/StatusCard.svelte.d.ts +27 -0
  78. package/components/StatusCard/StatusCardBody.svelte +57 -0
  79. package/components/StatusCard/StatusCardBody.svelte.d.ts +31 -0
  80. package/components/StatusCard/StatusCardTitle.svelte +47 -0
  81. package/components/StatusCard/StatusCardTitle.svelte.d.ts +29 -0
  82. package/components/Switches/Switch.svelte +3 -0
  83. package/components/Switches/Switch.svelte.d.ts +2 -2
  84. package/components/Tab/Tab.svelte +3 -0
  85. package/components/TextField/TextField.svelte +3 -0
  86. package/components/TextField/TextField.svelte.d.ts +8 -8
  87. package/components/Toast/Toast.svelte +3 -0
  88. package/components/Toast/Toast.svelte.d.ts +2 -2
  89. package/components/Tooltip/Tooltip.svelte +3 -0
  90. package/components/WidgetCard/Card.scss +108 -0
  91. package/components/WidgetCard/SensorStatusCard.svelte +130 -0
  92. package/components/WidgetCard/SensorStatusCard.svelte.d.ts +27 -0
  93. package/components/WidgetCard/StateCard.svelte +133 -0
  94. package/components/WidgetCard/StateCard.svelte.d.ts +29 -0
  95. package/components/WidgetCard/WidgetCard.svelte +152 -0
  96. package/components/WidgetCard/WidgetCard.svelte.d.ts +35 -0
  97. package/components/WidgetCard/WidgetCardBody.svelte +13 -0
  98. package/components/WidgetCard/WidgetCardBody.svelte.d.ts +27 -0
  99. package/components/common.scss +4 -0
  100. package/components/variable.scss +13 -3
  101. package/index.d.ts +65 -48
  102. package/index.js +65 -48
  103. package/package.json +30 -2
@@ -584,6 +584,9 @@ export let stayOpen = true;
584
584
  font-weight: 400;
585
585
  line-height: normal;
586
586
  }
587
+ :global(.bg-dark) {
588
+ background-color: #05445E !important;
589
+ }
587
590
  :global(.accordion-body) {
588
591
  color: #6C757D;
589
592
  font-size: 16px;
@@ -585,6 +585,9 @@ export let header;
585
585
  font-weight: 400;
586
586
  line-height: normal;
587
587
  }
588
+ :global(.bg-dark) {
589
+ background-color: #05445E !important;
590
+ }
588
591
  :global(.accordion-body) {
589
592
  color: #6C757D;
590
593
  font-size: 16px;
@@ -1,7 +1,7 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
- color?: "danger" | "info" | "success" | "warning" | undefined;
4
+ color?: "info" | "success" | "danger" | "warning" | undefined;
5
5
  };
6
6
  events: {
7
7
  [evt: string]: CustomEvent<any>;
@@ -589,4 +589,7 @@ if (badgeConfig.hasOwnProperty(config)) {
589
589
  font-style: normal;
590
590
  font-weight: 400;
591
591
  line-height: normal;
592
+ }
593
+ :global(.bg-dark) {
594
+ background-color: #05445E !important;
592
595
  }</style>
@@ -599,4 +599,7 @@ let length = newBreadcrumbs.length;
599
599
  font-style: normal;
600
600
  font-weight: 400;
601
601
  line-height: normal;
602
+ }
603
+ :global(.bg-dark) {
604
+ background-color: #05445E !important;
602
605
  }</style>
@@ -1336,6 +1336,9 @@
1336
1336
  font-weight: 400;
1337
1337
  line-height: normal;
1338
1338
  }
1339
+ :global(.bg-dark) {
1340
+ background-color: #05445E !important;
1341
+ }
1339
1342
  .ebg-active-secondary {
1340
1343
  background-color: #3AC82E;
1341
1344
  color: #ffffff;
@@ -3,12 +3,11 @@
3
3
  /** @typedef {typeof __propDef.slots} ButtonSlots */
4
4
  export default class Button extends SvelteComponentTyped<{
5
5
  [x: string]: any;
6
- size?: string | undefined;
7
- id?: string | undefined;
6
+ config?: string | undefined;
7
+ className?: string | undefined;
8
8
  disabled?: boolean | undefined;
9
9
  type?: string | undefined;
10
10
  label?: string | undefined;
11
- config?: string | undefined;
12
11
  icon?: {
13
12
  state: boolean;
14
13
  name: string;
@@ -16,7 +15,8 @@ export default class Button extends SvelteComponentTyped<{
16
15
  } | undefined;
17
16
  shade?: string | undefined;
18
17
  outlineShade?: string | undefined;
19
- className?: string | undefined;
18
+ size?: string | undefined;
19
+ id?: string | undefined;
20
20
  actived?: {
21
21
  state: boolean;
22
22
  color: string;
@@ -38,12 +38,11 @@ import { SvelteComponentTyped } from "svelte";
38
38
  declare const __propDef: {
39
39
  props: {
40
40
  [x: string]: any;
41
- size?: string | undefined;
42
- id?: string | undefined;
41
+ config?: string | undefined;
42
+ className?: string | undefined;
43
43
  disabled?: boolean | undefined;
44
44
  type?: string | undefined;
45
45
  label?: string | undefined;
46
- config?: string | undefined;
47
46
  icon?: {
48
47
  state: boolean;
49
48
  name: string;
@@ -51,7 +50,8 @@ declare const __propDef: {
51
50
  } | undefined;
52
51
  shade?: string | undefined;
53
52
  outlineShade?: string | undefined;
54
- className?: string | undefined;
53
+ size?: string | undefined;
54
+ id?: string | undefined;
55
55
  actived?: {
56
56
  state: boolean;
57
57
  color: string;
@@ -2,10 +2,10 @@
2
2
  /** @typedef {typeof __propDef.events} CardEvents */
3
3
  /** @typedef {typeof __propDef.slots} CardSlots */
4
4
  export default class Card extends SvelteComponentTyped<{
5
- link?: string | undefined;
6
- text?: string | undefined;
7
5
  title?: string | undefined;
8
6
  subTitle?: string | undefined;
7
+ text?: string | undefined;
8
+ link?: string | undefined;
9
9
  image?: string | undefined;
10
10
  width?: string | undefined;
11
11
  linkName1?: string | undefined;
@@ -27,10 +27,10 @@ export type CardSlots = typeof __propDef.slots;
27
27
  import { SvelteComponentTyped } from "svelte";
28
28
  declare const __propDef: {
29
29
  props: {
30
- link?: string | undefined;
31
- text?: string | undefined;
32
30
  title?: string | undefined;
33
31
  subTitle?: string | undefined;
32
+ text?: string | undefined;
33
+ link?: string | undefined;
34
34
  image?: string | undefined;
35
35
  width?: string | undefined;
36
36
  linkName1?: string | undefined;
@@ -666,4 +666,7 @@ if (titleConfig.includes(titleLocation)) {
666
666
  font-style: normal;
667
667
  font-weight: 400;
668
668
  line-height: normal;
669
+ }
670
+ :global(.bg-dark) {
671
+ background-color: #05445E !important;
669
672
  }</style>
@@ -661,4 +661,7 @@
661
661
  font-style: normal;
662
662
  font-weight: 400;
663
663
  line-height: normal;
664
+ }
665
+ :global(.bg-dark) {
666
+ background-color: #05445E !important;
664
667
  }</style>
@@ -670,4 +670,7 @@
670
670
  font-style: normal;
671
671
  font-weight: 400;
672
672
  line-height: normal;
673
+ }
674
+ :global(.bg-dark) {
675
+ background-color: #05445E !important;
673
676
  }</style>
@@ -670,4 +670,7 @@
670
670
  font-style: normal;
671
671
  font-weight: 400;
672
672
  line-height: normal;
673
+ }
674
+ :global(.bg-dark) {
675
+ background-color: #05445E !important;
673
676
  }</style>
@@ -3,8 +3,8 @@
3
3
  /** @typedef {typeof __propDef.slots} CardiconTitleSlots */
4
4
  export default class CardiconTitle extends SvelteComponentTyped<{
5
5
  className: any;
6
- name?: string | undefined;
7
6
  title?: string | undefined;
7
+ name?: string | undefined;
8
8
  iconLocation?: string | undefined;
9
9
  }, {
10
10
  [evt: string]: CustomEvent<any>;
@@ -17,8 +17,8 @@ import { SvelteComponentTyped } from "svelte";
17
17
  declare const __propDef: {
18
18
  props: {
19
19
  className: any;
20
- name?: string | undefined;
21
20
  title?: string | undefined;
21
+ name?: string | undefined;
22
22
  iconLocation?: string | undefined;
23
23
  };
24
24
  events: {
@@ -0,0 +1,74 @@
1
+ <!-- src/BarChart.svelte -->
2
+ <script>
3
+ import { onMount, onDestroy } from 'svelte';
4
+ import { Chart, registerables } from 'chart.js';
5
+
6
+ // Register all necessary components
7
+ Chart.register(...registerables);
8
+
9
+ let chart;
10
+ let canvas;
11
+
12
+ // Chart configuration
13
+ const chartData = {
14
+ labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
15
+ datasets: [
16
+ {
17
+ label: '# of Votes',
18
+ backgroundColor: [
19
+ 'rgba(255, 99, 132, 0.2)',
20
+ 'rgba(54, 162, 235, 0.2)',
21
+ 'rgba(255, 206, 86, 0.2)',
22
+ 'rgba(75, 192, 192, 0.2)',
23
+ 'rgba(153, 102, 255, 0.2)',
24
+ 'rgba(255, 159, 64, 0.2)',
25
+ ],
26
+ borderColor: [
27
+ 'rgba(255, 99, 132, 1)',
28
+ 'rgba(54, 162, 235, 1)',
29
+ 'rgba(255, 206, 86, 1)',
30
+ 'rgba(75, 192, 192, 1)',
31
+ 'rgba(153, 102, 255, 1)',
32
+ 'rgba(255, 159, 64, 1)',
33
+ ],
34
+ borderWidth: 1,
35
+ data: [12, 19, 3, 5, 2, 3],
36
+ },
37
+ ],
38
+ };
39
+
40
+ const chartOptions = {
41
+ responsive: true,
42
+ maintainAspectRatio: false, // Allows the chart to resize freely
43
+ scales: {
44
+ y: {
45
+ beginAtZero: true,
46
+ },
47
+ },
48
+ };
49
+
50
+ onMount(() => {
51
+ const ctx = canvas.getContext('2d');
52
+ chart = new Chart(ctx, {
53
+ type: 'bar', // Set chart type to 'bar'
54
+ data: chartData,
55
+ options: chartOptions,
56
+ });
57
+ });
58
+
59
+ onDestroy(() => {
60
+ if (chart) {
61
+ chart.destroy();
62
+ }
63
+ });
64
+ </script>
65
+
66
+ <canvas bind:this={canvas} width="400" height="200" />
67
+
68
+ <style>
69
+ canvas {
70
+ max-width: 100%;
71
+ height: 100%; /* Ensures the canvas takes the full height of the container */
72
+ }
73
+ </style>
74
+
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} BarchartProps */
2
+ /** @typedef {typeof __propDef.events} BarchartEvents */
3
+ /** @typedef {typeof __propDef.slots} BarchartSlots */
4
+ export default class Barchart extends SvelteComponentTyped<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type BarchartProps = typeof __propDef.props;
11
+ export type BarchartEvents = typeof __propDef.events;
12
+ export type BarchartSlots = typeof __propDef.slots;
13
+ import { SvelteComponentTyped } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -0,0 +1,73 @@
1
+ <!-- src/PieChart.svelte -->
2
+ <script>
3
+ import { onMount, onDestroy } from 'svelte';
4
+ import { Chart, registerables } from 'chart.js';
5
+
6
+ export let data = {};
7
+ export let label = '';
8
+ export let width = 200;
9
+ export let height = 200;
10
+ // Register all necessary components
11
+ Chart.register(...registerables);
12
+
13
+ let chart;
14
+ let canvas;
15
+
16
+ // Chart configuration
17
+ const chartData = {
18
+ labels: Object.keys(data),
19
+ datasets: [
20
+ {
21
+ label: label,
22
+ data: Object.values(data)
23
+ }
24
+ ]
25
+ };
26
+
27
+ const chartOptions = {
28
+ plugins: {
29
+ legend: {
30
+ position: 'bottom' // Set legend position to bottom
31
+ },
32
+ datalabels: {
33
+ anchor: 'center',
34
+ align: 'end',
35
+ clamp: true,
36
+ font: {
37
+ size: 16, // Set the font size here
38
+ weight: 'bold', // Optional: set font weight
39
+ family: 'Roboto', // Set the font family to Roboto
40
+ },
41
+ formatter: (value) => {
42
+ return value; // Show the value directly
43
+ }
44
+ }
45
+ },
46
+ responsive: true,
47
+ maintainAspectRatio: false // Allows the chart to resize freely
48
+ };
49
+
50
+ onMount(() => {
51
+ const ctx = canvas.getContext('2d');
52
+ chart = new Chart(ctx, {
53
+ type: 'doughnut',
54
+ data: chartData,
55
+ options: chartOptions
56
+ });
57
+ });
58
+
59
+ onDestroy(() => {
60
+ if (chart) {
61
+ chart.destroy();
62
+ }
63
+ });
64
+ </script>
65
+
66
+ <canvas bind:this={canvas} {width} {height} />
67
+
68
+ <style>
69
+ canvas {
70
+ max-width: 100%;
71
+ height: auto; /* Ensures the canvas takes the full height of the container */
72
+ }
73
+ </style>
@@ -0,0 +1,29 @@
1
+ /** @typedef {typeof __propDef.props} DoughnutChartProps */
2
+ /** @typedef {typeof __propDef.events} DoughnutChartEvents */
3
+ /** @typedef {typeof __propDef.slots} DoughnutChartSlots */
4
+ export default class DoughnutChart extends SvelteComponentTyped<{
5
+ label?: string | undefined;
6
+ width?: number | undefined;
7
+ height?: number | undefined;
8
+ data?: {} | undefined;
9
+ }, {
10
+ [evt: string]: CustomEvent<any>;
11
+ }, {}> {
12
+ }
13
+ export type DoughnutChartProps = typeof __propDef.props;
14
+ export type DoughnutChartEvents = typeof __propDef.events;
15
+ export type DoughnutChartSlots = typeof __propDef.slots;
16
+ import { SvelteComponentTyped } from "svelte";
17
+ declare const __propDef: {
18
+ props: {
19
+ label?: string | undefined;
20
+ width?: number | undefined;
21
+ height?: number | undefined;
22
+ data?: {} | undefined;
23
+ };
24
+ events: {
25
+ [evt: string]: CustomEvent<any>;
26
+ };
27
+ slots: {};
28
+ };
29
+ export {};
@@ -0,0 +1,62 @@
1
+ <!-- src/MyChart.svelte -->
2
+ <script>
3
+ import { onMount, onDestroy } from 'svelte';
4
+ import { Chart, registerables } from 'chart.js';
5
+
6
+ export let data = {};
7
+
8
+ // Register all necessary components
9
+ Chart.register(...registerables);
10
+
11
+ let chart;
12
+ let canvas;
13
+
14
+ // Chart configuration
15
+ const chartData = {
16
+ labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
17
+ datasets: [
18
+ {
19
+ label: 'My First dataset',
20
+ backgroundColor: 'rgba(75, 192, 192, 0.2)',
21
+ borderColor: 'rgba(75, 192, 192, 1)',
22
+ borderWidth: 1,
23
+ data: [40, 30, 20, 50, 60, 70, 80]
24
+ }
25
+ ]
26
+ };
27
+
28
+ const chartOptions = {
29
+ responsive: true,
30
+ maintainAspectRatio: false, // Allows the chart to resize without maintaining aspect ratio
31
+ scales: {
32
+ y: {
33
+ beginAtZero: true
34
+ }
35
+ }
36
+ };
37
+
38
+ onMount(() => {
39
+ const ctx = canvas.getContext('2d');
40
+ chart = new Chart(ctx, {
41
+ type: 'line', // Change this to 'bar' for a bar chart
42
+ data: chartData,
43
+ options: chartOptions
44
+ });
45
+ });
46
+
47
+ // Cleanup when component is destroyed
48
+ onDestroy(() => {
49
+ if (chart) {
50
+ chart.destroy();
51
+ }
52
+ });
53
+ </script>
54
+
55
+ <canvas bind:this={canvas} />
56
+
57
+ <style>
58
+ canvas {
59
+ max-width: 100%;
60
+ height: auto;
61
+ }
62
+ </style>
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} LineChartProps */
2
+ /** @typedef {typeof __propDef.events} LineChartEvents */
3
+ /** @typedef {typeof __propDef.slots} LineChartSlots */
4
+ export default class LineChart extends SvelteComponentTyped<{
5
+ data?: {} | undefined;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type LineChartProps = typeof __propDef.props;
11
+ export type LineChartEvents = typeof __propDef.events;
12
+ export type LineChartSlots = typeof __propDef.slots;
13
+ import { SvelteComponentTyped } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ data?: {} | undefined;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -0,0 +1,75 @@
1
+ <!-- src/PieChart.svelte -->
2
+ <script>
3
+ import { onMount, onDestroy } from 'svelte';
4
+ import { Chart, registerables } from 'chart.js';
5
+ import ChartDataLabels from 'chartjs-plugin-datalabels';
6
+
7
+ export let data = {};
8
+ export let label = '';
9
+ export let width = 300;
10
+ export let height = 300;
11
+ // Register all necessary components
12
+ Chart.register(...registerables);
13
+ Chart.register(ChartDataLabels);
14
+ let chart;
15
+ let canvas;
16
+
17
+ // Chart configuration
18
+ const chartData = {
19
+ labels: Object.keys(data),
20
+ datasets: [
21
+ {
22
+ label: label,
23
+ data: Object.values(data)
24
+ }
25
+ ]
26
+ };
27
+
28
+ const chartOptions = {
29
+ plugins: {
30
+ legend: {
31
+ position: 'bottom' // Set legend position to bottom
32
+ },
33
+ datalabels: {
34
+ anchor: 'center',
35
+ align: 'end',
36
+ clamp: true,
37
+ font: {
38
+ size: 16, // Set the font size here
39
+ weight: 'bold', // Optional: set font weight
40
+ family: 'Roboto', // Set the font family to Roboto
41
+ },
42
+ formatter: (value) => {
43
+ return value; // Show the value directly
44
+ }
45
+ }
46
+ },
47
+ responsive: true,
48
+ maintainAspectRatio: false // Allows the chart to resize freely
49
+ };
50
+
51
+ onMount(() => {
52
+ // console.log(chartData);
53
+ const ctx = canvas.getContext('2d');
54
+ chart = new Chart(ctx, {
55
+ type: 'pie', // Set chart type to 'pie'
56
+ data: chartData,
57
+ options: chartOptions
58
+ });
59
+ });
60
+
61
+ onDestroy(() => {
62
+ if (chart) {
63
+ chart.destroy();
64
+ }
65
+ });
66
+ </script>
67
+
68
+ <canvas bind:this={canvas} {width} {height} />
69
+
70
+ <style>
71
+ canvas {
72
+ max-width: 100%;
73
+ height: auto; /* Ensures the canvas takes the full height of the container */
74
+ }
75
+ </style>
@@ -0,0 +1,29 @@
1
+ /** @typedef {typeof __propDef.props} PieChartProps */
2
+ /** @typedef {typeof __propDef.events} PieChartEvents */
3
+ /** @typedef {typeof __propDef.slots} PieChartSlots */
4
+ export default class PieChart extends SvelteComponentTyped<{
5
+ label?: string | undefined;
6
+ width?: number | undefined;
7
+ height?: number | undefined;
8
+ data?: {} | undefined;
9
+ }, {
10
+ [evt: string]: CustomEvent<any>;
11
+ }, {}> {
12
+ }
13
+ export type PieChartProps = typeof __propDef.props;
14
+ export type PieChartEvents = typeof __propDef.events;
15
+ export type PieChartSlots = typeof __propDef.slots;
16
+ import { SvelteComponentTyped } from "svelte";
17
+ declare const __propDef: {
18
+ props: {
19
+ label?: string | undefined;
20
+ width?: number | undefined;
21
+ height?: number | undefined;
22
+ data?: {} | undefined;
23
+ };
24
+ events: {
25
+ [evt: string]: CustomEvent<any>;
26
+ };
27
+ slots: {};
28
+ };
29
+ export {};
@@ -619,4 +619,7 @@
619
619
  font-style: normal;
620
620
  font-weight: 400;
621
621
  line-height: normal;
622
+ }
623
+ :global(.bg-dark) {
624
+ background-color: #05445E !important;
622
625
  }</style>
@@ -3,14 +3,14 @@
3
3
  /** @typedef {typeof __propDef.slots} CheckboxSlots */
4
4
  export default class Checkbox extends SvelteComponentTyped<{
5
5
  invalid: any;
6
- valid: any;
7
- feedback: any;
8
6
  disable: any;
9
7
  enable: any;
10
- size?: string | undefined;
8
+ valid: any;
9
+ feedback: any;
11
10
  label?: string | undefined;
12
- value?: string | undefined;
11
+ size?: string | undefined;
13
12
  name?: string | undefined;
13
+ value?: string | undefined;
14
14
  }, {
15
15
  [evt: string]: CustomEvent<any>;
16
16
  }, {}> {
@@ -22,14 +22,14 @@ import { SvelteComponentTyped } from "svelte";
22
22
  declare const __propDef: {
23
23
  props: {
24
24
  invalid: any;
25
- valid: any;
26
- feedback: any;
27
25
  disable: any;
28
26
  enable: any;
29
- size?: string | undefined;
27
+ valid: any;
28
+ feedback: any;
30
29
  label?: string | undefined;
31
- value?: string | undefined;
30
+ size?: string | undefined;
32
31
  name?: string | undefined;
32
+ value?: string | undefined;
33
33
  };
34
34
  events: {
35
35
  [evt: string]: CustomEvent<any>;
@@ -644,4 +644,7 @@ export let title = "Dropdowns";
644
644
  font-style: normal;
645
645
  font-weight: 400;
646
646
  line-height: normal;
647
+ }
648
+ :global(.bg-dark) {
649
+ background-color: #05445E !important;
647
650
  }</style>
@@ -637,4 +637,7 @@ export let disabled = false;
637
637
  font-style: normal;
638
638
  font-weight: 400;
639
639
  line-height: normal;
640
+ }
641
+ :global(.bg-dark) {
642
+ background-color: #05445E !important;
640
643
  }</style>
@@ -2,8 +2,8 @@
2
2
  /** @typedef {typeof __propDef.events} CardBodyEvents */
3
3
  /** @typedef {typeof __propDef.slots} CardBodySlots */
4
4
  export default class CardBody extends SvelteComponentTyped<{
5
- type?: string | undefined;
6
5
  className?: string | undefined;
6
+ type?: string | undefined;
7
7
  }, {
8
8
  [evt: string]: CustomEvent<any>;
9
9
  }, {
@@ -16,8 +16,8 @@ export type CardBodySlots = typeof __propDef.slots;
16
16
  import { SvelteComponentTyped } from "svelte";
17
17
  declare const __propDef: {
18
18
  props: {
19
- type?: string | undefined;
20
19
  className?: string | undefined;
20
+ type?: string | undefined;
21
21
  };
22
22
  events: {
23
23
  [evt: string]: CustomEvent<any>;
@@ -718,4 +718,7 @@ li.icons:hover {
718
718
  font-style: normal;
719
719
  font-weight: 400;
720
720
  line-height: normal;
721
+ }
722
+ :global(.bg-dark) {
723
+ background-color: #05445E !important;
721
724
  }</style>