pixelize-design-library 2.1.72 → 2.1.74
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/Components/Apexcharts/ApexDonutChart/ApexDonutChart.d.ts +4 -0
- package/dist/Components/Apexcharts/ApexDonutChart/ApexDonutChart.js +58 -0
- package/dist/Components/Apexcharts/ApexDonutChart/ApexDonutChartProps.d.ts +21 -0
- package/dist/Components/Apexcharts/ApexDonutChart/ApexDonutChartProps.js +2 -0
- package/dist/Components/Dropdown/DropDown.js +1 -1
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +17 -29
- package/dist/Components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/Components/MultiSelect/MultiSelect.js +17 -13
- package/dist/Components/MultiSelect/MultiSelectProps.d.ts +2 -0
- package/dist/Components/NoteTextArea/NoteTextArea.d.ts +1 -1
- package/dist/Components/NoteTextArea/NoteTextArea.js +483 -162
- package/dist/Components/Search/Search.d.ts +1 -1
- package/dist/Components/Search/Search.js +17 -17
- package/dist/Components/Search/SearchProps.d.ts +8 -0
- package/dist/Components/SearchSelect/SearchSelect.js +2 -2
- package/dist/Components/Table/Components/TableActions.js +0 -126
- package/dist/Layout.js +1 -4
- package/dist/Pages/chart.js +4 -6
- package/dist/Pages/search.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ApexDonutChartProps } from "./ApexDonutChartProps";
|
|
3
|
+
declare const ApexDonutChart: ({ data, labels, title, titlePosition, height, width, donutColors, chartColor, titleStyle, legendStyle, }: ApexDonutChartProps) => React.JSX.Element;
|
|
4
|
+
export default ApexDonutChart;
|
|
@@ -0,0 +1,58 @@
|
|
|
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 ApexDonutChart = function (_a) {
|
|
20
|
+
var _b;
|
|
21
|
+
var data = _a.data, labels = _a.labels, title = _a.title, _c = _a.titlePosition, titlePosition = _c === void 0 ? "center" : _c, _d = _a.height, height = _d === void 0 ? 400 : _d, _e = _a.width, width = _e === void 0 ? 500 : _e, donutColors = _a.donutColors, chartColor = _a.chartColor, _f = _a.titleStyle, titleStyle = _f === void 0 ? {
|
|
22
|
+
color: "#3182ce",
|
|
23
|
+
fontSize: "16px",
|
|
24
|
+
fontWeight: 600,
|
|
25
|
+
fontFamily: "Arial",
|
|
26
|
+
} : _f, _g = _a.legendStyle, legendStyle = _g === void 0 ? {
|
|
27
|
+
colors: "#000",
|
|
28
|
+
position: "bottom",
|
|
29
|
+
useSeriesColors: false,
|
|
30
|
+
} : _g;
|
|
31
|
+
var options = {
|
|
32
|
+
chart: {
|
|
33
|
+
type: "donut",
|
|
34
|
+
},
|
|
35
|
+
labels: labels,
|
|
36
|
+
colors: (_b = chartColor !== null && chartColor !== void 0 ? chartColor : donutColors) !== null && _b !== void 0 ? _b : ["#3182ce", "#e53e3e", "#38a169", "#dd6b20"],
|
|
37
|
+
legend: {
|
|
38
|
+
position: legendStyle.position,
|
|
39
|
+
labels: {
|
|
40
|
+
colors: legendStyle.colors,
|
|
41
|
+
useSeriesColors: legendStyle.useSeriesColors,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
title: {
|
|
45
|
+
text: title,
|
|
46
|
+
align: titlePosition,
|
|
47
|
+
style: __assign(__assign({}, titleStyle), { fontSize: (titleStyle === null || titleStyle === void 0 ? void 0 : titleStyle.fontSize)
|
|
48
|
+
? String(titleStyle.fontSize) // ✅ ensures string if number passed
|
|
49
|
+
: undefined }),
|
|
50
|
+
},
|
|
51
|
+
dataLabels: {
|
|
52
|
+
enabled: true,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
return (react_1.default.createElement("div", null,
|
|
56
|
+
react_1.default.createElement(react_apexcharts_1.default, { options: options, series: data, type: "donut", height: height, width: width })));
|
|
57
|
+
};
|
|
58
|
+
exports.default = ApexDonutChart;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ApexDonutChartProps = {
|
|
2
|
+
data: number[];
|
|
3
|
+
labels: string[];
|
|
4
|
+
title?: string;
|
|
5
|
+
titlePosition?: "left" | "center" | "right";
|
|
6
|
+
height?: number;
|
|
7
|
+
width?: number;
|
|
8
|
+
donutColors?: string[];
|
|
9
|
+
chartColor?: string[];
|
|
10
|
+
titleStyle?: {
|
|
11
|
+
color?: string;
|
|
12
|
+
fontSize?: string | number;
|
|
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
|
+
};
|
|
@@ -79,7 +79,7 @@ var Dropdown = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
79
79
|
var _a;
|
|
80
80
|
return (react_1.default.createElement(react_2.ListItem, { key: option.id, onClick: function () { return handleListItemClick(option.id, option.label); }, p: optionsSize === "sm" ? 1 : 2, px: 2, _hover: {
|
|
81
81
|
bg: theme.colors.gray[100],
|
|
82
|
-
color: theme.colors.
|
|
82
|
+
color: theme.colors.primary[500],
|
|
83
83
|
}, display: "flex", alignItems: "center", cursor: "pointer", style: ItemStyle, borderBottom: divider ? "1px solid ".concat((_a = theme.colors) === null || _a === void 0 ? void 0 : _a.gray[300]) : undefined, sx: {
|
|
84
84
|
"&:last-child": {
|
|
85
85
|
borderBottom: "none",
|
|
@@ -10,35 +10,23 @@ var lucide_react_1 = require("lucide-react");
|
|
|
10
10
|
function VerifyEmailOtp(_a) {
|
|
11
11
|
var resendMail = _a.resendMail, onChange = _a.onChange, onComplete = _a.onComplete, _b = _a.placeholder, placeholder = _b === void 0 ? "" : _b, _c = _a.pins, pins = _c === void 0 ? 5 : _c, description = _a.description, title = _a.title, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isInvalid, isInvalid = _e === void 0 ? false : _e, styles = _a.styles;
|
|
12
12
|
var theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
13
|
-
return (react_1.default.createElement(
|
|
14
|
-
react_1.default.createElement(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
react_1.default.createElement(react_2.HStack, null,
|
|
30
|
-
react_1.default.createElement(react_2.PinInput, { placeholder: placeholder, onChange: onChange, onComplete: onComplete, isDisabled: isDisabled, isInvalid: isInvalid }, Array.from({ length: pins }).map(function (_, index) { return (react_1.default.createElement(react_2.PinInputField, { key: index })); })))),
|
|
31
|
-
react_1.default.createElement("p", { style: { textAlign: "center", marginBottom: "2%" } },
|
|
32
|
-
"Didn't receive the code?",
|
|
13
|
+
return (react_1.default.createElement(react_2.Box, { style: styles, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", p: 6, w: "100%", maxW: "400px", mx: "auto", borderColor: "gray.200", borderRadius: "lg" },
|
|
14
|
+
react_1.default.createElement(react_2.Box, { mb: 4 },
|
|
15
|
+
react_1.default.createElement(lucide_react_1.MailCheck, { size: 80, color: theme.colors.primary[500] })),
|
|
16
|
+
react_1.default.createElement(react_2.Text, { fontSize: "2xl", fontWeight: "bold", mb: 2, textAlign: "center" }, title),
|
|
17
|
+
react_1.default.createElement(react_2.Text, { fontSize: "md", textAlign: "center", color: "gray.600", mb: 6 },
|
|
18
|
+
description,
|
|
19
|
+
react_1.default.createElement("br", null),
|
|
20
|
+
"your new Pixel Account"),
|
|
21
|
+
react_1.default.createElement(react_2.HStack, { spacing: 3, mb: 6 },
|
|
22
|
+
react_1.default.createElement(react_2.PinInput, { placeholder: placeholder, onChange: onChange, onComplete: onComplete, isDisabled: isDisabled, isInvalid: isInvalid, size: "lg", focusBorderColor: theme.colors.primary[500] }, Array.from({ length: pins }).map(function (_, index) { return (react_1.default.createElement(react_2.PinInputField, { key: index, borderRadius: "md", border: "1px solid", borderColor: "gray.300", _focus: {
|
|
23
|
+
borderColor: theme.colors.primary[500],
|
|
24
|
+
boxShadow: "0 0 0 1px ".concat(theme.colors.primary[500]),
|
|
25
|
+
} })); }))),
|
|
26
|
+
react_1.default.createElement(react_2.Flex, { justify: "center" },
|
|
27
|
+
react_1.default.createElement(react_2.Text, { fontSize: "sm", color: "gray.600" },
|
|
28
|
+
"Didn\u2019t receive the code?",
|
|
33
29
|
" ",
|
|
34
|
-
react_1.default.createElement(
|
|
35
|
-
background: "none",
|
|
36
|
-
color: theme.colors.primary[700],
|
|
37
|
-
border: "none",
|
|
38
|
-
padding: "0",
|
|
39
|
-
font: "inherit",
|
|
40
|
-
cursor: "pointer",
|
|
41
|
-
outline: "inherit",
|
|
42
|
-
} }, "Resend Code")))));
|
|
30
|
+
react_1.default.createElement(react_2.Button, { variant: "link", color: theme.colors.primary[700], fontWeight: "semibold", onClick: resendMail }, "Resend Code")))));
|
|
43
31
|
}
|
|
44
32
|
exports.default = VerifyEmailOtp;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MultiSelectProps } from "./MultiSelectProps";
|
|
3
|
-
export default function MultiSelect({ value, onValueChange, width, label, isRequired, isInformation, informationMessage, name, id, placeholderText, isDisabled, isReadOnly, size, inputStyle, }: MultiSelectProps): React.JSX.Element;
|
|
3
|
+
export default function MultiSelect({ value, onValueChange, width, label, isRequired, isInformation, informationMessage, name, id, placeholderText, isDisabled, isReadOnly, size, inputStyle, helperText, errorMessage, }: MultiSelectProps): React.JSX.Element;
|
|
@@ -42,11 +42,16 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
42
42
|
}
|
|
43
43
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
44
44
|
};
|
|
45
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
46
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
47
|
+
};
|
|
45
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
49
|
var react_1 = __importStar(require("react"));
|
|
47
50
|
var react_2 = require("@chakra-ui/react");
|
|
48
51
|
var FormLabel_1 = require("../Common/FormLabel");
|
|
49
52
|
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
53
|
+
var ErrorMessage_1 = __importDefault(require("../Common/ErrorMessage"));
|
|
54
|
+
var HelperText_1 = __importDefault(require("../Common/HelperText"));
|
|
50
55
|
var generateUniqueId = (function () {
|
|
51
56
|
var counter = 0;
|
|
52
57
|
return function () {
|
|
@@ -55,11 +60,8 @@ var generateUniqueId = (function () {
|
|
|
55
60
|
};
|
|
56
61
|
})();
|
|
57
62
|
function MultiSelect(_a) {
|
|
58
|
-
var value = _a.value, onValueChange = _a.onValueChange, _b = _a.width, width = _b === void 0 ? "100%" : _b, _c = _a.label, label = _c === void 0 ? "label" : _c, _d = _a.isRequired, isRequired = _d === void 0 ? true : _d, _e = _a.isInformation, isInformation = _e === void 0 ? false : _e, _f = _a.informationMessage, informationMessage = _f === void 0 ? "" : _f, name = _a.name, id = _a.id, _g = _a.placeholderText, placeholderText = _g === void 0 ? "Type valid email and press enter" : _g, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, size = _a.size, inputStyle = _a.inputStyle;
|
|
63
|
+
var value = _a.value, onValueChange = _a.onValueChange, _b = _a.width, width = _b === void 0 ? "100%" : _b, _c = _a.label, label = _c === void 0 ? "label" : _c, _d = _a.isRequired, isRequired = _d === void 0 ? true : _d, _e = _a.isInformation, isInformation = _e === void 0 ? false : _e, _f = _a.informationMessage, informationMessage = _f === void 0 ? "" : _f, name = _a.name, id = _a.id, _g = _a.placeholderText, placeholderText = _g === void 0 ? "Type valid email and press enter" : _g, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, size = _a.size, inputStyle = _a.inputStyle, helperText = _a.helperText, errorMessage = _a.errorMessage;
|
|
59
64
|
var theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
60
|
-
var getPadding = function () {
|
|
61
|
-
return "0.5rem";
|
|
62
|
-
};
|
|
63
65
|
var _h = (0, react_1.useState)(value), options = _h[0], setOptions = _h[1];
|
|
64
66
|
var _j = (0, react_1.useState)(""), inputValue = _j[0], setInputValue = _j[1];
|
|
65
67
|
var _k = (0, react_1.useState)(""), error = _k[0], setError = _k[1];
|
|
@@ -88,9 +90,6 @@ function MultiSelect(_a) {
|
|
|
88
90
|
setOptions(updatedOptions);
|
|
89
91
|
onValueChange(updatedOptions);
|
|
90
92
|
setInputValue("");
|
|
91
|
-
if (inputRef.current) {
|
|
92
|
-
inputRef.current.focus();
|
|
93
|
-
}
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
else if (e.key === "Backspace" && inputValue === "") {
|
|
@@ -104,12 +103,17 @@ function MultiSelect(_a) {
|
|
|
104
103
|
setOptions(updatedOptions);
|
|
105
104
|
onValueChange(updatedOptions);
|
|
106
105
|
};
|
|
107
|
-
return (react_1.default.createElement(react_2.Box, { width: width
|
|
106
|
+
return (react_1.default.createElement(react_2.Box, { width: width },
|
|
108
107
|
label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })),
|
|
109
|
-
react_1.default.createElement(react_2.Flex, { wrap: "wrap", gap: 2
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
react_1.default.createElement(react_2.Flex, { wrap: "wrap", gap: 2, align: "center", px: 2, border: "1px solid", borderColor: theme.colors.gray[300], borderRadius: "sm", bg: theme.colors.white, minH: "42px", _focusWithin: {
|
|
109
|
+
borderColor: theme.colors.primary[500],
|
|
110
|
+
boxShadow: "0 0 0 1px " + theme.colors.primary[500],
|
|
111
|
+
} },
|
|
112
|
+
options.map(function (option) { return (react_1.default.createElement(react_2.Tag, { key: option.id, size: "md", borderRadius: "full", variant: "subtle", colorScheme: "blue" },
|
|
113
|
+
react_1.default.createElement(react_2.TagLabel, null, option.label),
|
|
114
|
+
react_1.default.createElement(react_2.TagCloseButton, { onClick: function () { return handleRemove(option); } }))); }),
|
|
115
|
+
react_1.default.createElement(react_2.Input, { ref: inputRef, type: "text", value: inputValue, isDisabled: isDisabled, isReadOnly: isReadOnly, id: id, name: name, size: size, variant: "unstyled", flex: "1", style: __assign(__assign({}, inputStyle), { backgroundColor: "transparent", fontWeight: 500, color: theme.colors.gray[700], fontSize: 15, letterSpacing: 0.3 }), onChange: handleInputChange, onKeyDown: handleKeyDown, placeholder: options.length === 0 ? placeholderText : "" })),
|
|
116
|
+
error && react_1.default.createElement(ErrorMessage_1.default, { errorMessage: errorMessage }),
|
|
117
|
+
helperText && !error && react_1.default.createElement(HelperText_1.default, { helperText: helperText })));
|
|
114
118
|
}
|
|
115
119
|
exports.default = MultiSelect;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { NoteTextAreaProps } from "./NoteTextAreaProps";
|
|
3
|
-
export default function NoteTextArea({ width, handleSubmit, handleCancel, value, title, file, isEditable, saveButtonLoading, maxFileSize, maxFilesSizeError, maxNoteWordCount, onChange, ref, }: NoteTextAreaProps): React.JSX.Element;
|
|
3
|
+
export default function NoteTextArea({ width, handleSubmit, handleCancel, value, title, file, isEditable, saveButtonLoading, maxFileSize, maxFilesSizeError, maxNoteWordCount, onChange, ref: inputRef, }: NoteTextAreaProps): React.JSX.Element;
|