pixelize-design-library 2.1.75 → 2.1.77

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.
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ApexLineChartProps } from "./ApexLineChartProps";
3
+ declare const ApexLineChart: ({ data, labels, title, height, width, lineColors, titlePosition, titleStyle, variant, }: ApexLineChartProps) => React.JSX.Element;
4
+ export default ApexLineChart;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
26
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
27
+ if (ar || !(i in from)) {
28
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
29
+ ar[i] = from[i];
30
+ }
31
+ }
32
+ return to.concat(ar || Array.prototype.slice.call(from));
33
+ };
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ var react_1 = __importStar(require("react"));
39
+ var react_apexcharts_1 = __importDefault(require("react-apexcharts"));
40
+ var ApexLineChart = function (_a) {
41
+ var data = _a.data, labels = _a.labels, title = _a.title, _b = _a.height, height = _b === void 0 ? 400 : _b, _c = _a.width, width = _c === void 0 ? 600 : _c, _d = _a.lineColors, lineColors = _d === void 0 ? ["#3182ce", "#e53e3e", "#38a169"] : _d, _e = _a.titlePosition, titlePosition = _e === void 0 ? "center" : _e, _f = _a.titleStyle, titleStyle = _f === void 0 ? {
42
+ color: "#3182ce",
43
+ fontSize: "16px",
44
+ fontWeight: 600,
45
+ fontFamily: "Arial",
46
+ } : _f, _g = _a.variant, variant = _g === void 0 ? "basic" : _g;
47
+ var _h = (0, react_1.useState)([
48
+ {
49
+ name: "Series 1",
50
+ data: Array.isArray(data) ? data : [],
51
+ },
52
+ ]), series = _h[0], setSeries = _h[1];
53
+ var chartRef = (0, react_1.useRef)(null);
54
+ // 🔄 Handle realtime updates
55
+ (0, react_1.useEffect)(function () {
56
+ if (variant === "realtime") {
57
+ var interval_1 = setInterval(function () {
58
+ setSeries(function (prev) {
59
+ var newData = __spreadArray([], prev[0].data, true);
60
+ newData.push(Math.floor(Math.random() * 100) + 10); // simulate
61
+ if (newData.length > 20)
62
+ newData.shift(); // keep window size
63
+ return [{ name: "Series 1", data: newData }];
64
+ });
65
+ }, 1000);
66
+ return function () { return clearInterval(interval_1); };
67
+ }
68
+ }, [variant]);
69
+ // const options: ApexOptions = {
70
+ // chart: {
71
+ // type: "line",
72
+ // animations:
73
+ // variant === "realtime"
74
+ // ? {
75
+ // enabled: true,
76
+ // easing: "linear",
77
+ // dynamicAnimation: { speed: 1000 },
78
+ // }
79
+ // : undefined,
80
+ // zoom: { enabled: true },
81
+ // toolbar: { show: true },
82
+ // },
83
+ // stroke: { curve: "smooth" },
84
+ // colors: lineColors,
85
+ // xaxis: labels
86
+ // ? { categories: labels }
87
+ // : { type: variant === "realtime" ? "numeric" : "category" },
88
+ // title: {
89
+ // text: title,
90
+ // align: titlePosition ?? "center",
91
+ // style: titleStyle,
92
+ // },
93
+ // markers: { size: 4 },
94
+ // dataLabels: { enabled: false },
95
+ // };
96
+ var options = {
97
+ chart: {
98
+ type: "line",
99
+ animations: variant === "realtime"
100
+ ? {
101
+ enabled: true,
102
+ speed: 1000,
103
+ dynamicAnimation: { speed: 1000 }, // ✅ allowed
104
+ }
105
+ : { enabled: false },
106
+ zoom: { enabled: true },
107
+ toolbar: { show: true },
108
+ },
109
+ stroke: { curve: "smooth" },
110
+ colors: lineColors,
111
+ xaxis: labels
112
+ ? { categories: labels }
113
+ : { type: variant === "realtime" ? "numeric" : "category" },
114
+ title: {
115
+ text: title,
116
+ align: titlePosition !== null && titlePosition !== void 0 ? titlePosition : "center",
117
+ style: titleStyle,
118
+ },
119
+ markers: { size: 4 },
120
+ dataLabels: { enabled: false },
121
+ };
122
+ return (react_1.default.createElement("div", null,
123
+ react_1.default.createElement(react_apexcharts_1.default, { ref: chartRef, options: options, series: series, type: "line", height: height, width: width })));
124
+ };
125
+ exports.default = ApexLineChart;
@@ -0,0 +1,22 @@
1
+ export type ApexLineChartProps = {
2
+ variant?: LineChartVariant;
3
+ data: number[];
4
+ labels?: string[];
5
+ title?: string;
6
+ height?: number;
7
+ width?: number;
8
+ lineColors?: string[];
9
+ titlePosition?: "left" | "center" | "right";
10
+ titleStyle?: {
11
+ color?: string;
12
+ fontSize?: string;
13
+ fontWeight?: number | string;
14
+ fontFamily?: string;
15
+ };
16
+ legendStyle?: {
17
+ colors?: string | string[];
18
+ useSeriesColors?: boolean;
19
+ position?: "top" | "right" | "bottom" | "left";
20
+ };
21
+ };
22
+ export type LineChartVariant = "basic" | "realtime";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ApexPolarChartProps } from "./ApexPolarChartsProps";
3
+ declare const ApexPolarChart: ({ data, labels, title, height, width, chartColors, titlePosition, titleStyle, legendStyle, variant, }: ApexPolarChartProps) => React.JSX.Element;
4
+ export default ApexPolarChart;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var react_1 = __importDefault(require("react"));
18
+ var react_apexcharts_1 = __importDefault(require("react-apexcharts"));
19
+ var ApexPolarChart = function (_a) {
20
+ var data = _a.data, labels = _a.labels, title = _a.title, _b = _a.height, height = _b === void 0 ? 400 : _b, _c = _a.width, width = _c === void 0 ? 500 : _c, chartColors = _a.chartColors, _d = _a.titlePosition, titlePosition = _d === void 0 ? "center" : _d, _e = _a.titleStyle, titleStyle = _e === void 0 ? {
21
+ color: "#3182ce",
22
+ fontSize: "16px",
23
+ fontWeight: 600,
24
+ fontFamily: "Arial",
25
+ } : _e, _f = _a.legendStyle, legendStyle = _f === void 0 ? {
26
+ colors: "#000",
27
+ position: "bottom",
28
+ useSeriesColors: false,
29
+ } : _f, _g = _a.variant, variant = _g === void 0 ? "basic" : _g;
30
+ var extraOptions = {};
31
+ switch (variant) {
32
+ case "basic":
33
+ extraOptions = {
34
+ stroke: { colors: ["#fff"] },
35
+ fill: { opacity: 0.8 },
36
+ };
37
+ break;
38
+ case "monochrome":
39
+ extraOptions = {
40
+ theme: {
41
+ monochrome: {
42
+ enabled: true,
43
+ shadeTo: "light",
44
+ shadeIntensity: 0.6,
45
+ },
46
+ },
47
+ stroke: { colors: ["#fff"] },
48
+ fill: { opacity: 0.8 },
49
+ };
50
+ break;
51
+ default:
52
+ break;
53
+ }
54
+ var options = __assign({ chart: { type: "polarArea" }, labels: labels, colors: chartColors !== null && chartColors !== void 0 ? chartColors : ["#3182ce", "#e53e3e", "#38a169", "#dd6b20"], legend: {
55
+ position: legendStyle.position,
56
+ labels: {
57
+ colors: legendStyle.colors,
58
+ useSeriesColors: legendStyle.useSeriesColors,
59
+ },
60
+ }, title: {
61
+ text: title,
62
+ align: titlePosition,
63
+ style: titleStyle,
64
+ }, dataLabels: { enabled: true } }, extraOptions);
65
+ return (react_1.default.createElement("div", null,
66
+ react_1.default.createElement(react_apexcharts_1.default, { options: options, series: data, type: "polarArea", height: height, width: width })));
67
+ };
68
+ exports.default = ApexPolarChart;
@@ -0,0 +1,22 @@
1
+ export type ApexPolarChartProps = {
2
+ variant?: PolarVariant;
3
+ data: number[];
4
+ labels: string[];
5
+ title?: string;
6
+ height?: number;
7
+ width?: number;
8
+ chartColors?: string[];
9
+ titlePosition?: "left" | "center" | "right";
10
+ titleStyle?: {
11
+ color?: string;
12
+ fontSize?: string;
13
+ fontWeight?: number | string;
14
+ fontFamily?: string;
15
+ };
16
+ legendStyle?: {
17
+ colors?: string | string[];
18
+ useSeriesColors?: boolean;
19
+ position?: "top" | "right" | "bottom" | "left";
20
+ };
21
+ };
22
+ export type PolarVariant = "basic" | "monochrome";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
7
  var ApexBarChart_1 = __importDefault(require("../Components/Apexcharts/ApexBarChart/ApexBarChart"));
8
8
  var ApexPieChart_1 = __importDefault(require("../Components/Apexcharts/ApexPieChart/ApexPieChart"));
9
+ var ApexLineChart_1 = __importDefault(require("../Components/Apexcharts/ApexLineChart/ApexLineChart"));
10
+ var ApexPolarCharts_1 = __importDefault(require("../Components/Apexcharts/ApexPolarCharts/ApexPolarCharts"));
9
11
  var ChartPage = function () {
10
12
  var data = Array.from({ length: 10 }, function () { return Math.floor(Math.random() * 100); });
11
13
  var categories = data.map(function (_, index) { return "Category ".concat(index + 1); });
@@ -27,6 +29,10 @@ var ChartPage = function () {
27
29
  react_1.default.createElement(ApexPieChart_1.default, { data: data1, labels: categories1, title: "donut-with-pattern", variant: "donut-with-pattern", titlePosition: "left",
28
30
  // chartColor={["#00E396", "#3182ce", "#ff4757", "#ff6348", "#e84393"]}
29
31
  titleStyle: { color: "#00E396" } }),
30
- react_1.default.createElement(ApexPieChart_1.default, { data: data1, labels: categories1, title: "pie-with-image", variant: "pie-with-image", titlePosition: "left", chartColor: ["#00E396", "#3182ce", "#ff4757", "#ff6348", "#e84393"], titleStyle: { color: "#00E396" } })));
32
+ react_1.default.createElement(ApexPieChart_1.default, { data: data1, labels: categories1, title: "pie-with-image", variant: "pie-with-image", titlePosition: "left", chartColor: ["#00E396", "#3182ce", "#ff4757", "#ff6348", "#e84393"], titleStyle: { color: "#00E396" } }),
33
+ react_1.default.createElement(ApexLineChart_1.default, { variant: "basic", data: [10, 20, 30, 40, 50], labels: ["Jan", "Feb", "Mar", "Apr", "May"], title: "Basic Line Chart", lineColors: ["#3182ce"], height: 300, width: 600 }),
34
+ react_1.default.createElement(ApexLineChart_1.default, { variant: "realtime", data: [15, 25, 35], title: "Realtime Line Chart", lineColors: ["#e53e3e"], height: 300, width: 600 }),
35
+ react_1.default.createElement(ApexPolarCharts_1.default, { data: [21, 23, 19, 14, 6], labels: ["Apple", "Mango", "Orange", "Watermelon", "Banana"], variant: "basic" }),
36
+ react_1.default.createElement(ApexPolarCharts_1.default, { data: [21, 23, 19, 14, 6], labels: ["Apple", "Mango", "Orange", "Watermelon", "Banana"], variant: "monochrome" })));
31
37
  };
32
38
  exports.default = ChartPage;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import Accordian from "./Components/Accordion/Accordion";
2
2
  import AlertDialog from "./Components/AlertDialog/AlertDialog";
3
3
  import ApexBarChart from "./Components/Apexcharts/ApexBarChart/ApexBarChart";
4
4
  import ApexPieChart from "./Components/Apexcharts/ApexPieChart/ApexPieChart";
5
+ import ApexPolarChart from "./Components/Apexcharts/ApexPolarCharts/ApexPolarCharts";
5
6
  import Breadcrumbs from "./Components/Breadcrumbs/Breadcrumbs";
6
7
  import Button from "./Components/Button/Button";
7
8
  import ButtonGroupIcon from "./Components/ButtonGroupIcon/ButtonGroupIcon";
@@ -55,5 +56,6 @@ import ProductDetails from "./Components/ProductDetails/ProductDetails";
55
56
  import PhoneNumberInput from "./Components/Input/PhoneNumberInput";
56
57
  import { InputSwitch } from "./Components/Input/Switch/InputSwitch";
57
58
  import PaymentCard from "./Components/Card/PaymentCard/PaymentCard";
58
- export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, FileUpload, FormWrapper, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, useToaster, VerifyEmailOtp, useCustomTheme, ThemesList, debounce, };
59
+ import ApexLineChart from "./Components/Apexcharts/ApexLineChart/ApexLineChart";
60
+ export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, FileUpload, FormWrapper, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, useToaster, VerifyEmailOtp, useCustomTheme, ThemesList, debounce, };
59
61
  export default withTheme;
package/dist/index.js CHANGED
@@ -27,8 +27,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  return (mod && mod.__esModule) ? mod : { "default": mod };
28
28
  };
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.SearchSelect = exports.Select = exports.Search = exports.Reorder = exports.RadioButtonGroup = exports.RadioButton = exports.ProgressBar = exports.ProfilePhotoViewer = exports.ProfileCardFooter = exports.ProfileCardBody = exports.ProfileCardHeader = exports.ProfileCard = exports.ProductDetails = exports.ProductCard = exports.PinInput = exports.PhoneNumberInput = exports.PaymentCard = exports.NumberInput = exports.MultiSelect = exports.NoteTextArea = exports.NavigationBar = exports.ModalFooter = exports.ModalBody = exports.ModalHeader = exports.Modal = exports.Loading = exports.KanbanBoard = exports.InputSwitch = exports.InputTextArea = exports.HeaderActions = exports.Header = exports.FormWrapper = exports.FileUpload = exports.Editor = exports.Dropdown = exports.DrawerFooter = exports.DrawerBody = exports.DrawerHeader = exports.Drawer = exports.DatePicker = exports.ContactForm = exports.Checkbox = exports.Card = exports.ButtonGroupIcon = exports.Button = exports.Breadcrumbs = exports.ApexPieChart = exports.ApexBarChart = exports.AlertDialog = exports.Accordian = void 0;
31
- exports.debounce = exports.ThemesList = exports.useCustomTheme = exports.VerifyEmailOtp = exports.useToaster = exports.ToolTip = exports.Toaster = exports.Timeline = exports.TextInput = exports.Tag = exports.TableToggle = exports.Table = exports.Switch = exports.Skeletons = exports.Slider = exports.SideBar = exports.SelectSearch = void 0;
30
+ exports.Search = exports.Reorder = exports.RadioButtonGroup = exports.RadioButton = exports.ProgressBar = exports.ProfilePhotoViewer = exports.ProfileCardFooter = exports.ProfileCardBody = exports.ProfileCardHeader = exports.ProfileCard = exports.ProductDetails = exports.ProductCard = exports.PinInput = exports.PhoneNumberInput = exports.PaymentCard = exports.NumberInput = exports.MultiSelect = exports.NoteTextArea = exports.NavigationBar = exports.ModalFooter = exports.ModalBody = exports.ModalHeader = exports.Modal = exports.Loading = exports.KanbanBoard = exports.InputSwitch = exports.InputTextArea = exports.HeaderActions = exports.Header = exports.FormWrapper = exports.FileUpload = exports.Editor = exports.Dropdown = exports.DrawerFooter = exports.DrawerBody = exports.DrawerHeader = exports.Drawer = exports.DatePicker = exports.ContactForm = exports.Checkbox = exports.Card = exports.ButtonGroupIcon = exports.Button = exports.Breadcrumbs = exports.ApexLineChart = exports.ApexPolarChart = exports.ApexPieChart = exports.ApexBarChart = exports.AlertDialog = exports.Accordian = void 0;
31
+ exports.debounce = exports.ThemesList = exports.useCustomTheme = exports.VerifyEmailOtp = exports.useToaster = exports.ToolTip = exports.Toaster = exports.Timeline = exports.TextInput = exports.Tag = exports.TableToggle = exports.Table = exports.Switch = exports.Skeletons = exports.Slider = exports.SideBar = exports.SelectSearch = exports.SearchSelect = exports.Select = void 0;
32
32
  var Accordion_1 = __importDefault(require("./Components/Accordion/Accordion"));
33
33
  exports.Accordian = Accordion_1.default;
34
34
  var AlertDialog_1 = __importDefault(require("./Components/AlertDialog/AlertDialog"));
@@ -37,6 +37,8 @@ var ApexBarChart_1 = __importDefault(require("./Components/Apexcharts/ApexBarCha
37
37
  exports.ApexBarChart = ApexBarChart_1.default;
38
38
  var ApexPieChart_1 = __importDefault(require("./Components/Apexcharts/ApexPieChart/ApexPieChart"));
39
39
  exports.ApexPieChart = ApexPieChart_1.default;
40
+ var ApexPolarCharts_1 = __importDefault(require("./Components/Apexcharts/ApexPolarCharts/ApexPolarCharts"));
41
+ exports.ApexPolarChart = ApexPolarCharts_1.default;
40
42
  var Breadcrumbs_1 = __importDefault(require("./Components/Breadcrumbs/Breadcrumbs"));
41
43
  exports.Breadcrumbs = Breadcrumbs_1.default;
42
44
  var Button_1 = __importDefault(require("./Components/Button/Button"));
@@ -153,4 +155,6 @@ var InputSwitch_1 = require("./Components/Input/Switch/InputSwitch");
153
155
  Object.defineProperty(exports, "InputSwitch", { enumerable: true, get: function () { return InputSwitch_1.InputSwitch; } });
154
156
  var PaymentCard_1 = __importDefault(require("./Components/Card/PaymentCard/PaymentCard"));
155
157
  exports.PaymentCard = PaymentCard_1.default;
158
+ var ApexLineChart_1 = __importDefault(require("./Components/Apexcharts/ApexLineChart/ApexLineChart"));
159
+ exports.ApexLineChart = ApexLineChart_1.default;
156
160
  exports.default = withTheme_1.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.1.75",
3
+ "version": "2.1.77",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",