pixelize-design-library 1.0.89 → 1.0.91

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,31 @@
1
+ name: Check Build on PR
2
+
3
+ # Trigger the workflow when a pull request is raised against the develop branch
4
+ on:
5
+ pull_request:
6
+ branches:
7
+ - develop
8
+
9
+ # Define the job to run the build
10
+ jobs:
11
+ check-build:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ # Check out the code from the repository
16
+ - name: Checkout code
17
+ uses: actions/checkout@v3
18
+
19
+ # Set up Node.js environment
20
+ - name: Set up Node.js
21
+ uses: actions/setup-node@v3
22
+ with:
23
+ node-version: '18' # Specify your required Node.js version
24
+
25
+ # Install npm dependencies
26
+ - name: Install dependencies
27
+ run: npm install
28
+
29
+ # Run the build script
30
+ - name: Run build
31
+ run: npm run build
@@ -1,5 +1,8 @@
1
1
  import React from "react";
2
- export declare const TextLabel: ({ label, id }: {
2
+ export declare const TextLabel: ({ label, id, isInformation, informationMessage, isRequired, }: {
3
3
  label: string;
4
4
  id?: string | undefined;
5
+ isInformation?: boolean | undefined;
6
+ informationMessage?: string | undefined;
7
+ isRequired: boolean;
5
8
  }) => React.JSX.Element;
@@ -7,9 +7,15 @@ 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 ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
11
+ var icons_1 = require("@chakra-ui/icons");
10
12
  var TextLabel = function (_a) {
11
- var label = _a.label, id = _a.id;
13
+ var label = _a.label, id = _a.id, isInformation = _a.isInformation, informationMessage = _a.informationMessage, _b = _a.isRequired, isRequired = _b === void 0 ? false : _b;
12
14
  var theme = (0, useCustomTheme_1.useCustomTheme)();
13
- return (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 }, label));
15
+ return (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 },
16
+ label,
17
+ isRequired && react_1.default.createElement("span", { style: { color: "red" } }, "*"),
18
+ isInformation && (react_1.default.createElement(ToolTip_1.default, { placement: "top", hasArrow: true, label: informationMessage },
19
+ react_1.default.createElement(icons_1.InfoIcon, { ml: 1, position: "absolute", top: "3px", fontSize: 14, color: theme.colors.gray[500] })))));
14
20
  };
15
21
  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, error, errorMessage, helperText, onRightIconclick, inputRightIcon, inputGroupStyle, inputStyle, size, }: 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, inputGroupStyle, inputStyle, size, isInformation, informationMessage, }: TextInputProps): React.JSX.Element;
4
4
  declare const _default: React.MemoExoticComponent<typeof TextInput>;
5
5
  export default _default;
@@ -21,10 +21,10 @@ 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 ? "250px" : _g, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, onRightIconclick = _a.onRightIconclick, inputRightIcon = _a.inputRightIcon, inputGroupStyle = _a.inputGroupStyle, inputStyle = _a.inputStyle, _h = _a.size, size = _h === void 0 ? "sm" : _h;
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, 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;
25
25
  var theme = (0, useCustomTheme_1.useCustomTheme)();
26
- return (react_1.default.createElement(react_2.FormControl, { isRequired: isRequired, isInvalid: error },
27
- label && react_1.default.createElement(FormLabel_1.TextLabel, { label: label, id: id }),
26
+ return (react_1.default.createElement(react_2.FormControl, { isInvalid: error },
27
+ label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, id: id, isInformation: isInformation, informationMessage: informationMessage, isRequired: isRequired })),
28
28
  react_1.default.createElement(react_2.InputGroup, { width: width, style: inputGroupStyle },
29
29
  react_1.default.createElement(react_2.Input, { type: type, variant: "flushed", 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.main, fontWeight: 800, color: theme.colors.gray[700], padding: "0 0.5rem", fontSize: 15, letterSpacing: 0.7 }) }),
30
30
  inputRightIcon && (react_1.default.createElement(react_2.InputRightElement, { onClick: onRightIconclick }, inputRightIcon))),
@@ -11,4 +11,6 @@ export type TextInputProps = Pick<InputProps, "value" | "type" | "onChange" | "p
11
11
  inputRightIcon?: JSX.Element | string;
12
12
  inputStyle?: {};
13
13
  inputGroupStyle?: {};
14
+ isInformation?: boolean;
15
+ informationMessage?: string;
14
16
  };
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { chakraSelectProps } from "./SelectProps";
3
- export default function Select({ placeholder, size, variant, icon, bg, borderColor, color, onChange, onBlur, onFocus, errorBorderColor, isDisabled, isReadOnly, isRequired, value, colorScheme, label, error, errorMessage, helperText, options, width, formControlStyle, }: chakraSelectProps): React.JSX.Element;
3
+ export default function Select({ placeholder, size, variant, icon, bg, borderColor, color, onChange, onBlur, onFocus, errorBorderColor, isDisabled, isReadOnly, isRequired, value, colorScheme, label, error, errorMessage, helperText, options, width, formControlStyle, isInformation, informationMessage, }: chakraSelectProps): React.JSX.Element;
@@ -32,7 +32,7 @@ var FormLabel_1 = require("../Common/FormLabel");
32
32
  var ErrorMessage_1 = __importDefault(require("../Common/ErrorMessage"));
33
33
  var HelperText_1 = __importDefault(require("../Common/HelperText"));
34
34
  function Select(_a) {
35
- var _b = _a.placeholder, placeholder = _b === void 0 ? "Select Option" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "outline" : _d, icon = _a.icon, bg = _a.bg, borderColor = _a.borderColor, color = _a.color, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, errorBorderColor = _a.errorBorderColor, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, isRequired = _a.isRequired, _e = _a.value, value = _e === void 0 ? "" : _e, colorScheme = _a.colorScheme, label = _a.label, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, _f = _a.options, options = _f === void 0 ? [] : _f, _g = _a.width, width = _g === void 0 ? 500 : _g, formControlStyle = _a.formControlStyle;
35
+ var _b = _a.placeholder, placeholder = _b === void 0 ? "Select Option" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "outline" : _d, icon = _a.icon, bg = _a.bg, borderColor = _a.borderColor, color = _a.color, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, errorBorderColor = _a.errorBorderColor, isDisabled = _a.isDisabled, isReadOnly = _a.isReadOnly, _e = _a.isRequired, isRequired = _e === void 0 ? false : _e, _f = _a.value, value = _f === void 0 ? "" : _f, colorScheme = _a.colorScheme, label = _a.label, error = _a.error, errorMessage = _a.errorMessage, helperText = _a.helperText, _g = _a.options, options = _g === void 0 ? [] : _g, _h = _a.width, width = _h === void 0 ? 500 : _h, formControlStyle = _a.formControlStyle, _j = _a.isInformation, isInformation = _j === void 0 ? false : _j, informationMessage = _a.informationMessage;
36
36
  var getOptionsList = (0, react_1.useCallback)(function () {
37
37
  if (!options.length)
38
38
  return react_1.default.createElement("option", { value: "" }, "No Options");
@@ -40,13 +40,13 @@ function Select(_a) {
40
40
  }, [options]);
41
41
  var handleOnChange = function (event) {
42
42
  var selectedValue = event.target.value;
43
- var selectedOption = options.find(function (option) { return option.id === selectedValue; });
43
+ var selectedOption = options.find(function (option) { return option.id.toString() === selectedValue.toString(); });
44
44
  if (selectedOption && onChange) {
45
45
  onChange(selectedOption);
46
46
  }
47
47
  };
48
- return (react_1.default.createElement(react_2.FormControl, { isRequired: isRequired, isInvalid: error, style: formControlStyle, width: width },
49
- label && react_1.default.createElement(FormLabel_1.TextLabel, { label: label }),
48
+ return (react_1.default.createElement(react_2.FormControl, { isInvalid: error, style: formControlStyle, width: width },
49
+ label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })),
50
50
  react_1.default.createElement(react_2.Select, { placeholder: placeholder, size: size, variant: "flushed", icon: icon, bg: bg, borderColor: borderColor, color: color, isInvalid: error, value: value, onChange: handleOnChange, width: width, onBlur: onBlur, onFocus: onFocus, isDisabled: isDisabled, isReadOnly: isReadOnly, colorScheme: colorScheme, errorBorderColor: errorBorderColor }, getOptionsList()),
51
51
  error && react_1.default.createElement(ErrorMessage_1.default, { errorMessage: errorMessage }),
52
52
  helperText && !error && react_1.default.createElement(HelperText_1.default, { helperText: helperText })));
@@ -9,6 +9,8 @@ export type chakraSelectProps = Pick<SelectProps, "placeholder" | "size" | "vari
9
9
  width?: string | number;
10
10
  onChange: (selectedOption: OptionProp | undefined) => void;
11
11
  formControlStyle?: React.CSSProperties;
12
+ isInformation?: boolean;
13
+ informationMessage?: string;
12
14
  };
13
15
  export type OptionProp = {
14
16
  id: string | number;
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { SelectSearchProps } from "./SelectSearchProps";
3
- export default function SelectSearch({ options, initialSelectedOption, onOptionSelect, inputOnchange, id, name, label, inputStyle, dropdownStyle, isOptionLoading, loadingText, boxStyle, placeholder, searchQuery, }: Readonly<SelectSearchProps>): React.JSX.Element;
3
+ export default function SelectSearch({ options, initialSelectedOption, onOptionSelect, inputOnchange, id, name, label, inputStyle, dropdownStyle, isOptionLoading, loadingText, boxStyle, placeholder, searchQuery, isInformation, informationMessage, }: Readonly<SelectSearchProps>): React.JSX.Element;
@@ -39,11 +39,11 @@ var react_2 = require("@chakra-ui/react");
39
39
  var FormLabel_1 = require("../Common/FormLabel");
40
40
  var useCustomTheme_1 = require("../../Theme/useCustomTheme");
41
41
  function SelectSearch(_a) {
42
- var options = _a.options, _b = _a.initialSelectedOption, initialSelectedOption = _b === void 0 ? null : _b, onOptionSelect = _a.onOptionSelect, inputOnchange = _a.inputOnchange, id = _a.id, name = _a.name, label = _a.label, inputStyle = _a.inputStyle, dropdownStyle = _a.dropdownStyle, isOptionLoading = _a.isOptionLoading, _c = _a.loadingText, loadingText = _c === void 0 ? "loading" : _c, boxStyle = _a.boxStyle, _d = _a.placeholder, placeholder = _d === void 0 ? "Select Option" : _d, _e = _a.searchQuery, searchQuery = _e === void 0 ? "" : _e;
42
+ var options = _a.options, _b = _a.initialSelectedOption, initialSelectedOption = _b === void 0 ? null : _b, onOptionSelect = _a.onOptionSelect, inputOnchange = _a.inputOnchange, id = _a.id, name = _a.name, label = _a.label, inputStyle = _a.inputStyle, dropdownStyle = _a.dropdownStyle, isOptionLoading = _a.isOptionLoading, _c = _a.loadingText, loadingText = _c === void 0 ? "loading" : _c, boxStyle = _a.boxStyle, _d = _a.placeholder, placeholder = _d === void 0 ? "Select Option" : _d, _e = _a.searchQuery, searchQuery = _e === void 0 ? "" : _e, _f = _a.isInformation, isInformation = _f === void 0 ? false : _f, informationMessage = _a.informationMessage;
43
43
  var theme = (0, useCustomTheme_1.useCustomTheme)();
44
- var _f = (0, react_1.useState)(initialSelectedOption ? initialSelectedOption.label : ""), inputValue = _f[0], setInputValue = _f[1];
45
- var _g = (0, react_1.useState)(false), isOpen = _g[0], setIsOpen = _g[1];
46
- var _h = (0, react_1.useState)("below"), position = _h[0], setPosition = _h[1];
44
+ var _g = (0, react_1.useState)(initialSelectedOption ? initialSelectedOption.label : ""), inputValue = _g[0], setInputValue = _g[1];
45
+ var _h = (0, react_1.useState)(false), isOpen = _h[0], setIsOpen = _h[1];
46
+ var _j = (0, react_1.useState)("below"), position = _j[0], setPosition = _j[1];
47
47
  var inputRef = (0, react_1.useRef)(null);
48
48
  var dropdownRef = (0, react_1.useRef)(null);
49
49
  var filteredOptions = (0, react_1.useMemo)(function () {
@@ -127,7 +127,7 @@ function SelectSearch(_a) {
127
127
  return (react_1.default.createElement(react_2.Text, { px: 4, py: 2, color: "gray.500" }, "No options found"));
128
128
  }, [filteredOptions, isOptionLoading, loadingText, handleOptionClick]);
129
129
  return (react_1.default.createElement(react_2.Box, { display: "flex", flexDirection: "column", position: "relative", sx: boxStyle },
130
- label && react_1.default.createElement(FormLabel_1.TextLabel, { label: label, id: id }),
130
+ label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, id: id, isRequired: false, isInformation: isInformation, informationMessage: informationMessage })),
131
131
  react_1.default.createElement(react_2.Input, { ref: inputRef, variant: "flushed", value: inputValue, onClick: function () { return setIsOpen(true); }, onChange: function (e) { return inputOnchange(e.target.value); }, placeholder: placeholder, onKeyDown: handleKeyDown, id: id, name: name, cursor: "pointer", borderColor: "gray.300", _hover: { borderColor: "blue.500" }, _focus: { borderColor: "blue.500" },
132
132
  // {...inputStyle}
133
133
  style: __assign(__assign({}, inputStyle), { backgroundColor: theme.colors.backgroundColor.main, fontWeight: 800, color: theme.colors.gray[700], padding: "0 0.5rem", fontSize: 15, letterSpacing: 0.7 }) }),
@@ -15,6 +15,8 @@ export type SelectSearchProps = {
15
15
  loadingText?: string;
16
16
  placeholder?: string;
17
17
  searchQuery: string;
18
+ isInformation?: boolean;
19
+ informationMessage?: string;
18
20
  };
19
21
  export type MultiSelectOptions = {
20
22
  id: string;
package/dist/Layout.js CHANGED
@@ -588,7 +588,7 @@ var Layout = function () {
588
588
  // inputGroupStyle={{ border: "0px solid", padding: "0px" }}
589
589
  error: true, errorMessage: "Required", onChange: function (e) {
590
590
  console.log(e.target.files);
591
- }, helperText: "sometibg", isRequired: true }),
591
+ }, helperText: "sometibg", isRequired: true, informationMessage: "This is information", isInformation: true }),
592
592
  react_1.default.createElement("br", null),
593
593
  react_1.default.createElement("br", null),
594
594
  react_1.default.createElement(Button_1.default, { label: "TestButton", onClick: function () {
@@ -683,7 +683,7 @@ var Layout = function () {
683
683
  react_1.default.createElement(react_2.Skeleton, { height: "20px", width: "25%" }),
684
684
  react_1.default.createElement(react_2.Skeleton, { height: "20px", width: "10%" }),
685
685
  react_1.default.createElement(react_2.Skeleton, { height: "20px", width: "20%" }))); })), loadingBoxStyle: { padding: "10px", width: "100%" }, isVisiblity: false }),
686
- react_1.default.createElement(ToolTip_1.default, { label: "Hello", placement: "top", hasArrow: true, size: "20", width: "300px", height: "100px", bg: "green" }, "hai"),
686
+ react_1.default.createElement(ToolTip_1.default, { label: "Hello", placement: "top", hasArrow: true }, "hai"),
687
687
  react_1.default.createElement("br", null),
688
688
  react_1.default.createElement(react_2.Box, null,
689
689
  react_1.default.createElement("div", { style: { display: "flex", justifyContent: "space-around" } },
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import "./bootstrap";
1
2
  import Accordian from "./Components/Accordion/Accordion";
2
3
  import AlertDialog from "./Components/AlertDialog/AlertDialog";
3
4
  import ApexBarChart from "./Components/Apexcharts/ApexBarChart/ApexBarChart";
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- // import "./bootstrap";
3
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
3
  if (k2 === undefined) k2 = k;
5
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -29,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
29
28
  Object.defineProperty(exports, "__esModule", { value: true });
30
29
  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.TableProps = exports.TableEnums = exports.TableActionCreator = exports.KaTable = 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;
31
30
  exports.meadow = exports.radiant = exports.skyline = exports.ThemesList = exports.useCustomTheme = exports.VerifyEmailOtp = exports.useToaster = 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.0.89",
3
+ "version": "1.0.91",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",