@apexcura/ui-components 0.0.14-Beta71 → 0.0.14-Beta72

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/dist/index.d.mts CHANGED
@@ -118,4 +118,6 @@ declare const Upload: (props: ElementType) => React$1.JSX.Element;
118
118
 
119
119
  declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
120
120
 
121
- export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
121
+ declare const Donut: (props: ElementType) => React$1.JSX.Element;
122
+
123
+ export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Donut, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
package/dist/index.d.ts CHANGED
@@ -118,4 +118,6 @@ declare const Upload: (props: ElementType) => React$1.JSX.Element;
118
118
 
119
119
  declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
120
120
 
121
- export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
121
+ declare const Donut: (props: ElementType) => React$1.JSX.Element;
122
+
123
+ export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Donut, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ __export(src_exports, {
36
36
  CkEditor: () => CkEditor,
37
37
  DatePickerElement: () => DatePickerElement,
38
38
  DateRangePickerElement: () => DateRangePickerElement,
39
+ Donut: () => Donut,
39
40
  DropDownGroup: () => DropDownGroup,
40
41
  FileUpload: () => FileUpload,
41
42
  Image: () => Image,
@@ -1081,6 +1082,79 @@ var OtpElement = (props) => {
1081
1082
  }
1082
1083
  )));
1083
1084
  };
1085
+
1086
+ // src/Components/Donut.tsx
1087
+ var import_react31 = __toESM(require("react"));
1088
+ var import_highcharts = __toESM(require("highcharts"));
1089
+ var import_highcharts_react_official = __toESM(require("highcharts-react-official"));
1090
+ var Donut = (props) => {
1091
+ const total = 100;
1092
+ const girls = 20;
1093
+ const girlsPercentage = girls / total * 100;
1094
+ const chartOptions = {
1095
+ chart: {
1096
+ type: "pie",
1097
+ events: {
1098
+ render: function() {
1099
+ const chart = this;
1100
+ const width = chart.plotWidth;
1101
+ const height = chart.plotHeight;
1102
+ const centerX = chart.plotLeft + width / 2;
1103
+ const centerY = chart.plotTop + height / 2;
1104
+ if (!chart.customText) {
1105
+ chart.customText = chart.renderer.text(
1106
+ `${girlsPercentage.toFixed(1)}%`,
1107
+ centerX,
1108
+ centerY
1109
+ ).attr({
1110
+ align: "center",
1111
+ zIndex: 5
1112
+ }).add();
1113
+ } else {
1114
+ chart.customText.attr({
1115
+ text: `${girlsPercentage.toFixed(1)}%`
1116
+ });
1117
+ }
1118
+ }
1119
+ }
1120
+ },
1121
+ title: {
1122
+ text: "Distribution of Students"
1123
+ },
1124
+ plotOptions: {
1125
+ pie: {
1126
+ innerSize: "70%",
1127
+ dataLabels: {
1128
+ enabled: false,
1129
+ format: "<b>{point.name}</b>: {point.percentage:.1f} %"
1130
+ },
1131
+ showInLegend: true
1132
+ }
1133
+ },
1134
+ series: [{
1135
+ type: "pie",
1136
+ name: "Percentage",
1137
+ data: props.items
1138
+ }],
1139
+ legend: {
1140
+ enabled: true,
1141
+ align: "left",
1142
+ verticalAlign: "middle",
1143
+ layout: "proximate",
1144
+ labelFormatter: function() {
1145
+ const point = this;
1146
+ return `${point.name}: ${point.y?.toFixed(1)}%`;
1147
+ }
1148
+ }
1149
+ };
1150
+ return /* @__PURE__ */ import_react31.default.createElement(
1151
+ import_highcharts_react_official.default,
1152
+ {
1153
+ highcharts: import_highcharts.default,
1154
+ options: chartOptions
1155
+ }
1156
+ );
1157
+ };
1084
1158
  // Annotate the CommonJS export names for ESM import in node:
1085
1159
  0 && (module.exports = {
1086
1160
  AddMoreTable,
@@ -1089,6 +1163,7 @@ var OtpElement = (props) => {
1089
1163
  CkEditor,
1090
1164
  DatePickerElement,
1091
1165
  DateRangePickerElement,
1166
+ Donut,
1092
1167
  DropDownGroup,
1093
1168
  FileUpload,
1094
1169
  Image,
package/dist/index.mjs CHANGED
@@ -1021,6 +1021,79 @@ var OtpElement = (props) => {
1021
1021
  }
1022
1022
  )));
1023
1023
  };
1024
+
1025
+ // src/Components/Donut.tsx
1026
+ import React31 from "react";
1027
+ import Highcharts from "highcharts";
1028
+ import HighchartsReact from "highcharts-react-official";
1029
+ var Donut = (props) => {
1030
+ const total = 100;
1031
+ const girls = 20;
1032
+ const girlsPercentage = girls / total * 100;
1033
+ const chartOptions = {
1034
+ chart: {
1035
+ type: "pie",
1036
+ events: {
1037
+ render: function() {
1038
+ const chart = this;
1039
+ const width = chart.plotWidth;
1040
+ const height = chart.plotHeight;
1041
+ const centerX = chart.plotLeft + width / 2;
1042
+ const centerY = chart.plotTop + height / 2;
1043
+ if (!chart.customText) {
1044
+ chart.customText = chart.renderer.text(
1045
+ `${girlsPercentage.toFixed(1)}%`,
1046
+ centerX,
1047
+ centerY
1048
+ ).attr({
1049
+ align: "center",
1050
+ zIndex: 5
1051
+ }).add();
1052
+ } else {
1053
+ chart.customText.attr({
1054
+ text: `${girlsPercentage.toFixed(1)}%`
1055
+ });
1056
+ }
1057
+ }
1058
+ }
1059
+ },
1060
+ title: {
1061
+ text: "Distribution of Students"
1062
+ },
1063
+ plotOptions: {
1064
+ pie: {
1065
+ innerSize: "70%",
1066
+ dataLabels: {
1067
+ enabled: false,
1068
+ format: "<b>{point.name}</b>: {point.percentage:.1f} %"
1069
+ },
1070
+ showInLegend: true
1071
+ }
1072
+ },
1073
+ series: [{
1074
+ type: "pie",
1075
+ name: "Percentage",
1076
+ data: props.items
1077
+ }],
1078
+ legend: {
1079
+ enabled: true,
1080
+ align: "left",
1081
+ verticalAlign: "middle",
1082
+ layout: "proximate",
1083
+ labelFormatter: function() {
1084
+ const point = this;
1085
+ return `${point.name}: ${point.y?.toFixed(1)}%`;
1086
+ }
1087
+ }
1088
+ };
1089
+ return /* @__PURE__ */ React31.createElement(
1090
+ HighchartsReact,
1091
+ {
1092
+ highcharts: Highcharts,
1093
+ options: chartOptions
1094
+ }
1095
+ );
1096
+ };
1024
1097
  export {
1025
1098
  AddMoreTable,
1026
1099
  ButtonElement,
@@ -1028,6 +1101,7 @@ export {
1028
1101
  CkEditor,
1029
1102
  DatePickerElement,
1030
1103
  DateRangePickerElement,
1104
+ Donut,
1031
1105
  DropDownGroup,
1032
1106
  FileUpload,
1033
1107
  Image,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta71",
3
+ "version": "0.0.14-Beta72",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",