pixelize-design-library 1.1.92 → 1.1.93

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.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  import { ButtonProps } from "./ButtonProps";
3
- declare function Button({ label, onClick, color, variant, leftIcon, rightIcon, size, isDisabled, isLoading, loadingText, type, width, padding, sx, }: ButtonProps): React.JSX.Element;
3
+ declare function Button({ label, onClick, color, variant, leftIcon, rightIcon, size, isDisabled, isLoading, loadingText, type, sx, }: ButtonProps): React.JSX.Element;
4
4
  declare const _default: React.MemoExoticComponent<typeof Button>;
5
5
  export default _default;
@@ -38,7 +38,7 @@ var react_1 = __importStar(require("react"));
38
38
  var react_2 = require("@chakra-ui/react");
39
39
  var useCustomTheme_1 = require("../../Theme/useCustomTheme");
40
40
  function Button(_a) {
41
- var label = _a.label, onClick = _a.onClick, color = _a.color, _b = _a.variant, variant = _b === void 0 ? "solid" : _b, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, size = _a.size, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isLoading, isLoading = _d === void 0 ? false : _d, _e = _a.loadingText, loadingText = _e === void 0 ? "Loading" : _e, type = _a.type, width = _a.width, padding = _a.padding, sx = _a.sx;
41
+ var label = _a.label, onClick = _a.onClick, color = _a.color, _b = _a.variant, variant = _b === void 0 ? "solid" : _b, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, size = _a.size, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isLoading, isLoading = _d === void 0 ? false : _d, _e = _a.loadingText, loadingText = _e === void 0 ? "Loading" : _e, type = _a.type, sx = _a.sx;
42
42
  var theme = (0, useCustomTheme_1.useCustomTheme)();
43
43
  var buttonColor = !color ? theme.colors.primary[500] : color;
44
44
  var variantStyles = {
@@ -78,12 +78,12 @@ function Button(_a) {
78
78
  },
79
79
  };
80
80
  var appliedVariantStyle = !color ? variantStyles[variant] : {};
81
- return (react_1.default.createElement(react_2.Button, __assign({ type: type, onClick: onClick, width: width || "fit-content", padding: padding, borderRadius: "4px", bg: "#9A4FE5", color: "white", _hover: { bg: "#8847C5" }, variant: variant, size: size, isLoading: isLoading, isDisabled: isDisabled, loadingText: loadingText, leftIcon: leftIcon, rightIcon: rightIcon, sx: sx }, appliedVariantStyle),
82
- react_1.default.createElement(react_2.Text, { sx: {
81
+ return (react_1.default.createElement(react_2.Button, __assign({ type: type, onClick: onClick, width: "fit-content", colorScheme: buttonColor, variant: variant, size: size, isLoading: isLoading, isDisabled: isDisabled, loadingText: loadingText, leftIcon: leftIcon, rightIcon: rightIcon }, appliedVariantStyle, { sx: sx }),
82
+ react_1.default.createElement(react_2.Box, { sx: {
83
83
  overflow: "hidden",
84
84
  textOverflow: "ellipsis",
85
85
  whiteSpace: "nowrap",
86
86
  maxWidth: "100%",
87
- }, fontSize: "1rem", fontWeight: 500 }, label)));
87
+ } }, label)));
88
88
  }
89
89
  exports.default = (0, react_1.memo)(Button);
@@ -6,5 +6,4 @@ export type ButtonProps = Pick<ChakraButtonProps, "onClick" | "leftIcon" | "righ
6
6
  variant?: "solid" | "outline" | "ghost" | "link" | "unstyled";
7
7
  color?: string;
8
8
  type?: "button" | "submit" | "reset";
9
- padding?: string;
10
9
  };
@@ -5,12 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var react_1 = __importDefault(require("react"));
7
7
  var react_2 = require("@chakra-ui/react");
8
- var lucide_react_1 = require("lucide-react");
9
8
  var ErrorMessage = function (_a) {
10
9
  var errorMessage = _a.errorMessage;
11
- return (react_1.default.createElement(react_1.default.Fragment, null,
12
- react_1.default.createElement(react_2.FormErrorMessage, { fontSize: "14px" },
13
- react_1.default.createElement(lucide_react_1.Info, { width: "14px" }),
14
- react_1.default.createElement(react_2.Text, { ml: "3px" }, errorMessage !== null && errorMessage !== void 0 ? errorMessage : "Error"))));
10
+ return (react_1.default.createElement(react_2.FormErrorMessage, { fontSize: 14 }, errorMessage !== null && errorMessage !== void 0 ? errorMessage : "Error"));
15
11
  };
16
12
  exports.default = ErrorMessage;
@@ -7,12 +7,16 @@ exports.TextLabel = void 0;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  var react_2 = require("@chakra-ui/react");
9
9
  var useCustomTheme_1 = require("../../Theme/useCustomTheme");
10
+ var lucide_react_1 = require("lucide-react");
10
11
  var TextLabel = function (_a) {
11
12
  var label = _a.label, id = _a.id, _b = _a.isRequired, isRequired = _b === void 0 ? false : _b, _c = _a.isInformation, isInformation = _c === void 0 ? false : _c, _d = _a.informationMessage, informationMessage = _d === void 0 ? "" : _d;
12
13
  var theme = (0, useCustomTheme_1.useCustomTheme)();
13
14
  return (react_1.default.createElement(react_2.Box, { display: "flex", alignItems: "center", gap: "3px" },
14
- react_1.default.createElement(react_2.FormLabel, { htmlFor: id !== null && id !== void 0 ? id : label, color: theme.colors.gray[600], mb: "0.375rem", fontWeight: 400, fontSize: "0.875rem" },
15
+ react_1.default.createElement(react_2.FormLabel, { htmlFor: id !== null && id !== void 0 ? id : label, color: theme.colors.gray[600], mb: "0.1rem", fontWeight: 600, fontSize: 14 },
15
16
  label,
16
- isRequired && react_1.default.createElement("span", { style: { color: "red", paddingLeft: "0.4rem" } }, "*"))));
17
+ isRequired && react_1.default.createElement("span", { style: { color: "red" } }, "*")),
18
+ isInformation && informationMessage && (react_1.default.createElement(react_2.Tooltip, { label: informationMessage, hasArrow: true, placement: "top", bg: "gray.600", color: "white", fontSize: "10px" },
19
+ react_1.default.createElement(react_2.Box, { cursor: "pointer" },
20
+ react_1.default.createElement(react_2.Icon, { as: lucide_react_1.InfoIcon, color: "gray.500", boxSize: 4 }))))));
17
21
  };
18
22
  exports.TextLabel = TextLabel;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
2
  import { TextInputProps } from "./TextInputProps";
3
- declare function TextInput({ label, type, id, name, onChange, onBlur, onFocus, isDisabled, isReadOnly, isRequired, value, placeholder, width, height, error, errorMessage, helperText, onRightIconclick, inputRightIcon, inputLeftIcon, onLeftIconClick, inputGroupStyle, inputStyle, size, isInformation, informationMessage, leftElementStyle, rightElementStyle, }: TextInputProps): React.JSX.Element;
3
+ declare function TextInput({ label, type, id, name, onChange, onBlur, onFocus, isDisabled, isReadOnly, isRequired, value, placeholder, width, error, errorMessage, helperText, onRightIconclick, inputRightIcon, inputLeftIcon, onLeftIconClick, inputGroupStyle, inputStyle, size, isInformation, informationMessage, leftElementStyle, rightElementStyle, }: TextInputProps): React.JSX.Element;
4
4
  declare const _default: React.MemoExoticComponent<typeof TextInput>;
5
5
  export default _default;
@@ -21,29 +21,30 @@ var FormLabel_1 = require("../Common/FormLabel");
21
21
  var HelperText_1 = __importDefault(require("../Common/HelperText"));
22
22
  var ErrorMessage_1 = __importDefault(require("../Common/ErrorMessage"));
23
23
  function TextInput(_a) {
24
- var label = _a.label, _b = _a.type, type = _b === void 0 ? "text" : _b, id = _a.id, name = _a.name, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, value = _a.value, _f = _a.placeholder, placeholder = _f === void 0 ? "Placeholder" : _f, _g = _a.width, width = _g === void 0 ? "360px" : _g, _h = _a.height, height = _h === void 0 ? "44px" : _h, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, onRightIconclick = _a.onRightIconclick, inputRightIcon = _a.inputRightIcon, inputLeftIcon = _a.inputLeftIcon, onLeftIconClick = _a.onLeftIconClick, inputGroupStyle = _a.inputGroupStyle, inputStyle = _a.inputStyle, _j = _a.size, size = _j === void 0 ? "md" : _j, _k = _a.isInformation, isInformation = _k === void 0 ? false : _k, informationMessage = _a.informationMessage, leftElementStyle = _a.leftElementStyle, rightElementStyle = _a.rightElementStyle;
24
+ var label = _a.label, _b = _a.type, type = _b === void 0 ? "text" : _b, id = _a.id, name = _a.name, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, _c = _a.isDisabled, isDisabled = _c === void 0 ? false : _c, _d = _a.isReadOnly, isReadOnly = _d === void 0 ? false : _d, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, value = _a.value, _f = _a.placeholder, placeholder = _f === void 0 ? "Placeholder" : _f, _g = _a.width, width = _g === void 0 ? "250px" : _g, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, onRightIconclick = _a.onRightIconclick, inputRightIcon = _a.inputRightIcon, inputLeftIcon = _a.inputLeftIcon, onLeftIconClick = _a.onLeftIconClick, inputGroupStyle = _a.inputGroupStyle, inputStyle = _a.inputStyle, _h = _a.size, size = _h === void 0 ? "sm" : _h, _j = _a.isInformation, isInformation = _j === void 0 ? false : _j, informationMessage = _a.informationMessage, leftElementStyle = _a.leftElementStyle, rightElementStyle = _a.rightElementStyle;
25
25
  var theme = (0, useCustomTheme_1.useCustomTheme)();
26
26
  var getPadding = function () {
27
27
  if (inputLeftIcon && inputRightIcon) {
28
- return { pl: "1.9rem", pr: "1.9rem" };
28
+ return "0 1.6rem 0 1.6rem";
29
29
  }
30
30
  else if (inputLeftIcon) {
31
- return { pl: "1.9rem", pr: "1rem" };
31
+ return "0 0.5rem 0 1.6rem";
32
32
  }
33
33
  else if (inputRightIcon) {
34
- return { pl: "1rem", pr: "1.9rem" };
34
+ return "0 1.6rem 0 0.5rem";
35
35
  }
36
36
  else {
37
- return { pl: "1rem", pr: "1rem" };
37
+ return "0 0.5rem";
38
38
  }
39
39
  };
40
- var padding = getPadding();
41
- return (react_1.default.createElement(react_2.FormControl, { isInvalid: error, w: width },
40
+ return (react_1.default.createElement(react_2.FormControl, { isInvalid: error },
42
41
  label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, id: id, isInformation: isInformation, informationMessage: informationMessage, isRequired: isRequired })),
43
- react_1.default.createElement(react_2.InputGroup, { width: "100%", style: inputGroupStyle, height: height },
44
- inputLeftIcon && (react_1.default.createElement(react_2.InputLeftElement, __assign({ onClick: onLeftIconClick, pointerEvents: onLeftIconClick ? "auto" : "none", display: "flex", alignItems: "center", justifyContent: "center", height: height, width: "2rem", cursor: onLeftIconClick ? "pointer" : "default" }, leftElementStyle), inputLeftIcon)),
45
- react_1.default.createElement(react_2.Input, __assign({ type: type, placeholder: placeholder, onChange: onChange, onBlur: onBlur, onFocus: onFocus, value: value, errorBorderColor: error ? "crimson" : "", isDisabled: isDisabled, isReadOnly: isReadOnly, id: id, name: name, size: size, height: height, fontWeight: 500, color: "#161B25", bg: "gray.50", fontSize: "0.875rem", letterSpacing: "0.7px", borderRadius: "0.25rem", border: "1px", borderColor: error ? "#F2463A" : "#D6D8DB", _placeholder: { color: "gray.400", fontStyle: "italic" }, pt: "13px", pb: "13px" }, padding, inputStyle)),
46
- inputRightIcon && (react_1.default.createElement(react_2.InputRightElement, __assign({ onClick: onRightIconclick, pointerEvents: onRightIconclick ? "auto" : "none", display: "flex", alignItems: "center", justifyContent: "center", height: height, width: "2rem" }, rightElementStyle), inputRightIcon))),
42
+ react_1.default.createElement(react_2.InputGroup, { width: width, style: inputGroupStyle },
43
+ inputLeftIcon && (react_1.default.createElement(react_2.InputLeftElement, { onClick: onLeftIconClick, style: __assign(__assign({}, leftElementStyle), { height: "1.8rem", width: "1.8rem", cursor: "pointer" }) }, inputLeftIcon)),
44
+ react_1.default.createElement(react_2.Input, { type: type,
45
+ // variant={variant}
46
+ placeholder: placeholder, onChange: onChange, onBlur: onBlur, onFocus: onFocus, value: value, errorBorderColor: error ? "crimson" : "", isDisabled: isDisabled, isReadOnly: isReadOnly, id: id, name: name, size: size, style: __assign(__assign({}, inputStyle), { backgroundColor: theme.colors.backgroundColor.light, fontWeight: 600, color: theme.colors.gray[600], padding: getPadding(), fontSize: 15, letterSpacing: 0.7 }) }),
47
+ inputRightIcon && (react_1.default.createElement(react_2.InputRightElement, { onClick: onRightIconclick, style: __assign(__assign({}, rightElementStyle), { height: "1.8rem", width: "1.8rem" }) }, inputRightIcon))),
47
48
  error && react_1.default.createElement(ErrorMessage_1.default, { errorMessage: errorMessage }),
48
49
  helperText && !error && react_1.default.createElement(HelperText_1.default, { helperText: helperText })));
49
50
  }
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { InputProps } from "@chakra-ui/react";
2
- export type TextInputProps = Pick<InputProps, "value" | "type" | "onChange" | "placeholder" | "onBlur" | "onFocus" | "isDisabled" | "isRequired" | "isReadOnly" | "width" | "height" | "errorBorderColor" | "size"> & {
3
+ export type TextInputProps = Pick<InputProps, "value" | "type" | "onChange" | "placeholder" | "onBlur" | "onFocus" | "isDisabled" | "isRequired" | "isReadOnly" | "width" | "errorBorderColor" | "size"> & {
3
4
  label?: string;
4
5
  id?: string;
5
6
  name?: string;
@@ -7,9 +8,9 @@ export type TextInputProps = Pick<InputProps, "value" | "type" | "onChange" | "p
7
8
  errorMessage?: string;
8
9
  helperText?: string;
9
10
  onRightIconclick?: () => void;
10
- inputRightIcon?: any;
11
+ inputRightIcon?: JSX.Element | string;
11
12
  onLeftIconClick?: () => void;
12
- inputLeftIcon?: any;
13
+ inputLeftIcon?: JSX.Element | string;
13
14
  inputStyle?: {};
14
15
  inputGroupStyle?: {};
15
16
  isInformation?: boolean;
@@ -12,18 +12,14 @@ var ButtonPage = function () {
12
12
  react_1.default.createElement(ButtonGroupIcon_1.default, { buttonText: "hello", rightIcon: react_1.default.createElement(lucide_react_1.House, null), leftIcon: react_1.default.createElement(lucide_react_1.House, null), size: "md", variant: "solid",
13
13
  // color="red"
14
14
  rightIconDropdown: true, dropdownOptions: [
15
- {
16
- label: "123",
17
- id: "1",
18
- image: react_1.default.createElement(lucide_react_1.House, { style: { marginRight: "20px" } }),
19
- },
20
- { label: "456", id: "2" },
15
+ { label: "123", id: "1", image: react_1.default.createElement(lucide_react_1.House, { style: { marginRight: "20px" } }) },
16
+ { label: "456", id: "2" }
21
17
  ], onDropdownOptionClick: function (e, option) {
22
18
  console.log(e, option);
23
19
  } }),
24
20
  react_1.default.createElement("br", null),
25
21
  react_1.default.createElement("br", null),
26
22
  react_1.default.createElement("br", null),
27
- react_1.default.createElement(Button_1.default, { label: "Button", onClick: function () { }, variant: "solid", color: "blue", size: "md", width: 360, padding: "22px" })));
23
+ react_1.default.createElement(Button_1.default, { label: "Button", onClick: function () { }, variant: "solid", color: "blue", size: "md", width: 100 })));
28
24
  };
29
25
  exports.default = ButtonPage;
@@ -12,22 +12,17 @@ var InputPage = function () {
12
12
  //helperText="Hello"
13
13
  //errorMessage="Required"
14
14
  //error={true}
15
- type: "email", inputRightIcon: react_1.default.createElement(lucide_react_1.User, { color: "#FF0000" }), onRightIconclick: function () {
15
+ type: "text", inputRightIcon: react_1.default.createElement(lucide_react_1.User, { color: "gray.300" }), onRightIconclick: function () {
16
16
  console.log("icon click");
17
- },
18
- // inputLeftIcon={<User color="#FF0000"/>}
19
- // onLeftIconClick={() => {
20
- // console.log("icon click");
21
- // }}
22
- key: "input",
17
+ }, inputLeftIcon: react_1.default.createElement(lucide_react_1.User, { color: "gray.300" }), onLeftIconClick: function () {
18
+ console.log("icon click");
19
+ }, key: "input",
23
20
  // border={"0px solid"}
24
21
  // padding={"0px"}
25
22
  // inputStyle={{ border: "0px solid", padding: "0px" }}
26
23
  // inputGroupStyle={{ border: "0px solid", padding: "0px" }}
27
24
  error: true, errorMessage: "Required", onChange: function (e) {
28
25
  console.log(e.target.files);
29
- },
30
- // helperText="sometibg"
31
- isRequired: true, informationMessage: "This is information", isInformation: true })));
26
+ }, helperText: "sometibg", isRequired: true, informationMessage: "This is information", isInformation: true })));
32
27
  };
33
28
  exports.default = InputPage;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import "./bootstrap";
2
1
  import Accordian from "./Components/Accordion/Accordion";
3
2
  import AlertDialog from "./Components/AlertDialog/AlertDialog";
4
3
  import ApexBarChart from "./Components/Apexcharts/ApexBarChart/ApexBarChart";
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ // import "./bootstrap";
2
3
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
4
  if (k2 === undefined) k2 = k;
4
5
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -28,7 +29,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
29
  Object.defineProperty(exports, "__esModule", { value: true });
29
30
  exports.ThemesList = exports.useCustomTheme = exports.VerifyEmailOtp = exports.useToaster = exports.ToolTip = exports.Toaster = exports.Timeline = exports.TextInput = exports.Table = exports.Switch = exports.Skeletons = exports.SideBar = exports.SelectSearch = exports.Select = exports.Search = exports.RadioButtonGroup = exports.RadioButton = exports.ProgressBar = exports.ProfilePhotoViewer = exports.ProfileCardFooter = exports.ProfileCardBody = exports.ProfileCardHeader = exports.ProfileCard = exports.PinInput = exports.NumberInput = exports.MultiSelect = exports.NoteTextArea = exports.NavigationBar = exports.ModalFooter = exports.ModalBody = exports.ModalHeader = exports.Modal = exports.Loading = exports.InputTextArea = exports.Editor = exports.Dropdown = exports.DrawerFooter = exports.DrawerBody = exports.DrawerHeader = exports.Drawer = exports.DatePicker = exports.Checkbox = exports.Card = exports.ButtonGroupIcon = exports.Button = exports.Breadcrumbs = exports.ApexPieChart = exports.ApexBarChart = exports.AlertDialog = exports.Accordian = void 0;
30
31
  exports.debounce = void 0;
31
- require("./bootstrap");
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"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "1.1.92",
3
+ "version": "1.1.93",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",