pixel-react 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/components/AddResourceButton/type.d.ts +1 -1
  3. package/lib/components/Drawer/Types.d.ts +4 -0
  4. package/lib/components/Excel/ExcelContextMenu/ExcelContextMenu.d.ts +13 -0
  5. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +0 -13
  6. package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +29 -1
  7. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/engine.d.ts +3 -9
  8. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/formula.d.ts +2 -10
  9. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/point-graph.d.ts +0 -1
  10. package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +27 -2
  11. package/lib/components/Form/Forms.d.ts +4 -2
  12. package/lib/components/InputWithDropdown/InputWithDropdown.d.ts +1 -1
  13. package/lib/components/MenuOption/MenuOption.d.ts +1 -1
  14. package/lib/components/MenuOption/types.d.ts +49 -15
  15. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  16. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +4 -5
  17. package/lib/components/MultiSelect/dropdownTypes.d.ts +2 -0
  18. package/lib/components/RadioButton/RadioButton.d.ts +1 -0
  19. package/lib/components/RadioButton/radioButtonTypes.d.ts +3 -1
  20. package/lib/components/Select/components/types.d.ts +4 -2
  21. package/lib/components/Table/Table.d.ts +1 -1
  22. package/lib/components/ToggleSwitch/ToggleSwitch.d.ts +10 -0
  23. package/lib/components/ToggleSwitch/index.d.ts +1 -0
  24. package/lib/index.d.ts +109 -23
  25. package/lib/index.esm.js +5711 -635
  26. package/lib/index.esm.js.map +1 -1
  27. package/lib/index.js +5707 -629
  28. package/lib/index.js.map +1 -1
  29. package/lib/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +11 -11
  31. package/src/StyleGuide/ColorPalette/colorPaletteList.ts +10 -0
  32. package/src/assets/Themes/BaseTheme.scss +17 -23
  33. package/src/assets/Themes/DarkTheme.scss +25 -38
  34. package/src/assets/icons/apk_file_type.svg +4 -0
  35. package/src/assets/icons/compressed_file_type.svg +4 -0
  36. package/src/assets/icons/csv_file_type.svg +4 -0
  37. package/src/assets/icons/excel_corner_menu.svg +3 -0
  38. package/src/assets/icons/formula_icon.svg +3 -0
  39. package/src/assets/icons/gif_file_type.svg +4 -0
  40. package/src/assets/icons/html_file_type.svg +4 -0
  41. package/src/assets/icons/ipk_file_type.svg +4 -0
  42. package/src/assets/icons/jpg_file_type.svg +4 -0
  43. package/src/assets/icons/json_file_type.svg +4 -0
  44. package/src/assets/icons/pdf_file_type.svg +4 -0
  45. package/src/assets/icons/png_file_type.svg +4 -0
  46. package/src/assets/icons/quick_run_setting_icon.svg +5 -0
  47. package/src/assets/icons/run_automation_scripts_icon.svg +33 -0
  48. package/src/assets/icons/run_manual_testcase_icon.svg +4 -0
  49. package/src/assets/icons/search.svg +2 -2
  50. package/src/assets/icons/txt_file_type.svg +4 -0
  51. package/src/assets/icons/xls_file_type.svg +4 -0
  52. package/src/assets/icons/xlsx_file_type.svg +4 -0
  53. package/src/assets/icons/xml_file_type.svg +4 -0
  54. package/src/components/AddResourceButton/AddButton.tsx +7 -7
  55. package/src/components/AddResourceButton/type.ts +1 -1
  56. package/src/components/AttachmentButton/AttachmentButton.scss +1 -1
  57. package/src/components/AttachmentButton/AttachmentButton.stories.tsx +1 -0
  58. package/src/components/Button/Button.scss +22 -20
  59. package/src/components/Button/Button.tsx +8 -1
  60. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +2 -2
  61. package/src/components/Drawer/Drawer.scss +4 -3
  62. package/src/components/Drawer/Drawer.tsx +14 -18
  63. package/src/components/Drawer/Types.ts +4 -0
  64. package/src/components/Editor/Editor.tsx +9 -11
  65. package/src/components/Excel/ExcelContextMenu/ExcelContextMenu.scss +39 -0
  66. package/src/components/Excel/ExcelContextMenu/ExcelContextMenu.tsx +51 -0
  67. package/src/components/Excel/ExcelFile/ExcelFile.tsx +7 -8
  68. package/src/components/Excel/ExcelFile/ExcelFileComponents/Cell.tsx +35 -0
  69. package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +44 -7
  70. package/src/components/Excel/ExcelFile/ExcelFileComponents/CornerIndicator.tsx +8 -1
  71. package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +45 -6
  72. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +37 -2
  73. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +69 -24
  74. package/src/components/Excel/ExcelFile/ExcelFileComponents/actions.ts +59 -0
  75. package/src/components/Excel/ExcelFile/ExcelFileComponents/engine/engine.ts +18 -65
  76. package/src/components/Excel/ExcelFile/ExcelFileComponents/engine/formula.ts +5 -110
  77. package/src/components/Excel/ExcelFile/ExcelFileComponents/engine/point-graph.ts +0 -2
  78. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +105 -1
  79. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +670 -673
  80. package/src/components/Excel/ExcelFile/ExcelFileComponents/types.ts +38 -2
  81. package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +0 -4
  82. package/src/components/FileDropzone/FileDropzone.scss +4 -2
  83. package/src/components/FileDropzone/FileDropzone.tsx +1 -1
  84. package/src/components/FileDropzone/FilePreview.tsx +3 -1
  85. package/src/components/Form/Form.scss +2 -0
  86. package/src/components/Form/Form.stories.tsx +195 -6
  87. package/src/components/Form/Forms.tsx +15 -8
  88. package/src/components/Icon/iconList.ts +46 -0
  89. package/src/components/IconRadioGroup/IconRadioGroup.scss +3 -0
  90. package/src/components/IconRadioGroup/IconRadioGroup.tsx +20 -17
  91. package/src/components/Input/Input.scss +14 -15
  92. package/src/components/Input/Input.stories.tsx +2 -1
  93. package/src/components/InputWithDropdown/InputWithDropdown.scss +12 -13
  94. package/src/components/InputWithDropdown/InputWithDropdown.stories.tsx +3 -2
  95. package/src/components/InputWithDropdown/InputWithDropdown.tsx +22 -19
  96. package/src/components/MenuOption/MenuOption.scss +11 -10
  97. package/src/components/MenuOption/MenuOption.stories.tsx +51 -232
  98. package/src/components/MenuOption/MenuOption.tsx +131 -52
  99. package/src/components/MenuOption/types.ts +55 -14
  100. package/src/components/MiniModal/MiniModal.stories.tsx +2 -3
  101. package/src/components/MultiSelect/Dropdown.tsx +11 -12
  102. package/src/components/MultiSelect/MultiSelect.scss +1 -0
  103. package/src/components/MultiSelect/MultiSelect.stories.tsx +45 -10
  104. package/src/components/MultiSelect/MultiSelect.tsx +29 -13
  105. package/src/components/MultiSelect/MultiSelectTypes.ts +7 -5
  106. package/src/components/MultiSelect/dropdownTypes.ts +2 -0
  107. package/src/components/RadioButton/RadioButton.scss +3 -1
  108. package/src/components/RadioButton/RadioButton.tsx +3 -1
  109. package/src/components/RadioButton/radioButtonTypes.tsx +5 -1
  110. package/src/components/Search/Search.scss +25 -6
  111. package/src/components/Search/Search.tsx +45 -24
  112. package/src/components/Select/Select.scss +12 -12
  113. package/src/components/Select/Select.stories.tsx +2 -0
  114. package/src/components/Select/Select.tsx +11 -5
  115. package/src/components/Select/components/Dropdown.scss +2 -0
  116. package/src/components/Select/components/Dropdown.tsx +19 -4
  117. package/src/components/Select/components/types.ts +4 -2
  118. package/src/components/StatusButton/StatusButton.tsx +26 -20
  119. package/src/components/Table/Table.scss +1 -3
  120. package/src/components/Table/Table.stories.tsx +1 -0
  121. package/src/components/Table/Table.tsx +7 -3
  122. package/src/components/ToggleSwitch/ToggleSwitch.scss +59 -0
  123. package/src/components/ToggleSwitch/ToggleSwitch.stories.tsx +52 -0
  124. package/src/components/ToggleSwitch/ToggleSwitch.tsx +30 -0
  125. package/src/components/ToggleSwitch/index.ts +1 -0
  126. package/src/hooks/useFileDropzone.tsx +1 -0
  127. package/src/index.ts +4 -2
  128. package/src/components/Excel/ContextMenu/ContextMenu.scss +0 -99
  129. package/src/components/Excel/ContextMenu/ContextMenu.tsx +0 -103
package/lib/index.d.ts CHANGED
@@ -210,6 +210,10 @@ interface DrawerProps {
210
210
  * Custom z-index for the secondary drawer
211
211
  */
212
212
  secondLayerZIndex?: boolean;
213
+ /**
214
+ * Custom top for the drawer
215
+ */
216
+ top?: string;
213
217
  }
214
218
 
215
219
  declare const Drawer: FC<DrawerProps>;
@@ -263,12 +267,9 @@ interface AccordionProps {
263
267
  */
264
268
  declare const Accordion: ({ headerTitle, color, minHeight, accordionContent, disable, disableInfoMessage, }: AccordionProps) => react_jsx_runtime.JSX.Element;
265
269
 
270
+ type OptionValue$1 = any;
266
271
  interface Option$3 {
267
- label?: string;
268
- value?: string;
269
- accessor?: string;
270
- isChecked?: boolean;
271
- isDisabled?: boolean;
272
+ [key: string]: OptionValue$1;
272
273
  }
273
274
  interface MultiSelectProps {
274
275
  options: Option$3[];
@@ -296,9 +297,11 @@ interface MultiSelectProps {
296
297
  className?: string;
297
298
  /** Machine Name to be displayed */
298
299
  highlightedMachine?: string | ReactElement;
300
+ labelAccessor?: string;
301
+ valueAccessor?: string;
299
302
  }
300
303
 
301
- declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, displayCount, placeholderForSearching, variant, onLabelPlusIconClick, onManageLabelsClick, className, highlightedMachine, onSelectButtonClick, withSelectButton, }: MultiSelectProps) => react_jsx_runtime.JSX.Element;
304
+ declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, displayCount, placeholderForSearching, variant, onLabelPlusIconClick, onManageLabelsClick, className, highlightedMachine, onSelectButtonClick, labelAccessor, valueAccessor, withSelectButton, }: MultiSelectProps) => react_jsx_runtime.JSX.Element;
302
305
 
303
306
  interface ToasterProps {
304
307
  /**Boolean value to handle state of toaster. */
@@ -804,15 +807,17 @@ interface OptionClick {
804
807
  * @type {Array<string> | string}
805
808
  * @required
806
809
  */
807
- value: Array<string> | string;
810
+ value: any;
808
811
  }
809
812
  interface OptionType extends OptionClick {
810
813
  /**
811
814
  * The name of the icon associated with the option.
812
815
  * @type {string}
813
- * @required
816
+ * @optional
814
817
  */
815
818
  icon?: string;
819
+ iconColor?: string;
820
+ name?: string;
816
821
  /**
817
822
  * Indicates whether the option is disabled.
818
823
  * @type {boolean}
@@ -853,27 +858,27 @@ interface MenuOptionProps {
853
858
  tooltipPlacement?: 'bottom' | 'left' | 'right' | 'top' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
854
859
  /**
855
860
  * The placement of the dropdown menu relative to the icon.
856
- * @type {'top' | 'left' | 'right' | 'bottom'}
861
+ * @type {dropdownPosition}
857
862
  * @optional
858
863
  */
859
- dropdownPlacement?: string | 'top' | 'left' | 'right' | 'down';
864
+ dropdownPlacement?: 'top' | 'down' | 'left' | 'right';
860
865
  /**
861
- * The variant of the menu option, either 'dark' or 'light'.
862
- * @type {'dark' | 'light'}
863
- * @default 'light'
864
- * @optional
865
- */
866
+ * The variant of the menu option, either 'dark' or 'light'.
867
+ * @type {'dark' | 'light'}
868
+ * @default 'light'
869
+ * @optional
870
+ */
866
871
  variant?: 'dark' | 'light';
867
872
  /**
868
873
  * Callback function triggered when the icon is clicked.
869
- * @type {function}
874
+ * @type {() => void}
870
875
  * @optional
871
876
  */
872
877
  onClick?: () => void;
873
878
  /**
874
879
  * Callback function triggered when an option is clicked.
875
880
  * @param {OptionClick} option - The option that was clicked.
876
- * @type {function}
881
+ * @type {(option: OptionClick) => void}
877
882
  * @optional
878
883
  */
879
884
  onOptionClick?: (option: OptionClick) => void;
@@ -890,18 +895,20 @@ interface MenuOptionProps {
890
895
  */
891
896
  iconSize?: number;
892
897
  /**
893
- * The border radius of the icon.
898
+ * The border radius of the icon button.
894
899
  * @type {number}
895
900
  * @default 7
896
901
  */
897
902
  iconButtonBorderRadius?: number;
898
903
  /**
899
904
  * Providing z-index for the options card.
905
+ * @type {number}
906
+ * @optional
900
907
  */
901
908
  zIndex?: number;
902
909
  }
903
910
 
904
- declare const MenuOption: ({ labelName, iconName, tooltipTitle, tooltipPlacement, options, dropdownPlacement, onClick, onOptionClick, iconButtonSize, iconButtonBorderRadius, iconSize, variant, zIndex, }: MenuOptionProps) => react_jsx_runtime.JSX.Element;
911
+ declare const MenuOption: ({ labelName, iconName, tooltipTitle, tooltipPlacement, options, onClick, onOptionClick, iconButtonSize, iconButtonBorderRadius, iconSize, variant, zIndex, dropdownPlacement, }: MenuOptionProps) => react_jsx_runtime.JSX.Element;
905
912
 
906
913
  interface DataProps {
907
914
  /**
@@ -1002,7 +1009,7 @@ interface TableProps {
1002
1009
  headerIconOnClick?: () => void;
1003
1010
  }
1004
1011
 
1005
- declare const Table: ({ data, columns, headerType, withCheckbox, onSelect, allSelected, partialSelected, withFixedHeader, borderWithRadius, headerCheckboxDisabled, noDataContent, height, className, tableHeadClass, tableBodyRowClass, headerTextColor, tableDataTextColor, headerIconName, headerIconOnClick, }: TableProps) => react_jsx_runtime.JSX.Element | null;
1012
+ declare const Table: ({ data, columns, headerType, withCheckbox, onSelect, allSelected, partialSelected, withFixedHeader, borderWithRadius, headerCheckboxDisabled, noDataContent, height, className, tableHeadClass, tableBodyRowClass, headerTextColor, tableDataTextColor, headerIconName, headerIconOnClick, }: TableProps) => react_jsx_runtime.JSX.Element;
1006
1013
 
1007
1014
  /**
1008
1015
  * Props for the Add Resource Button component.
@@ -1175,7 +1182,9 @@ interface FormProps<T extends Form.FieldValues> extends Form.UseFormProps<T> {
1175
1182
  onSubmit: Form.SubmitHandler<T>;
1176
1183
  children: (methods: ReturnType<typeof Form.useForm<T>>) => React__default.ReactNode;
1177
1184
  }
1178
- declare const Forms: <T extends Form.FieldValues>({ onSubmit, children, id, ...rest }: FormProps<T>) => react_jsx_runtime.JSX.Element;
1185
+ declare const ForwardedForms: <T extends Form.FieldValues>(props: FormProps<T> & {
1186
+ ref?: React__default.Ref<any>;
1187
+ }) => JSX.Element;
1179
1188
 
1180
1189
  interface Option$1 {
1181
1190
  label: string | ReactNode;
@@ -1267,7 +1276,58 @@ interface InputWithDropdownProps {
1267
1276
  dropdownPosition?: 'left' | 'right';
1268
1277
  }
1269
1278
 
1270
- declare const InputWithDropdown: ({ name, label, value, disabled, required, placeholder, error, helperText, optionsList, selectedOption, onDropdownChangeHandler, onInputChangeHandler, onInputBlurHandler, optionsRequired, dropdownPosition, type, }: InputWithDropdownProps) => react_jsx_runtime.JSX.Element;
1279
+ declare const InputWithDropdown: ({ name, label, value, disabled, required, placeholder, error, helperText, optionsList, selectedOption, autoComplete, onDropdownChangeHandler, onInputChangeHandler, onInputBlurHandler, optionsRequired, dropdownPosition, type, }: InputWithDropdownProps) => react_jsx_runtime.JSX.Element;
1280
+
1281
+ /**
1282
+ * Props for the RadioButton component.
1283
+ */
1284
+ interface RadioButtonProps {
1285
+ /**
1286
+ * The display label for the radio button.
1287
+ * Optional.
1288
+ */
1289
+ label?: string | ReactElement;
1290
+ /**
1291
+ * The name attribute for the radio button, used for grouping.
1292
+ */
1293
+ name: string;
1294
+ /**
1295
+ * The unique value of the radio button.
1296
+ * Optional.
1297
+ */
1298
+ value?: string;
1299
+ /**
1300
+ * Indicates whether the radio button is checked.
1301
+ * Optional.
1302
+ */
1303
+ checked?: boolean;
1304
+ /**
1305
+ * Callback function that is called when the radio button's value changes.
1306
+ * Receives the change event as an argument.
1307
+ * Optional.
1308
+ */
1309
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
1310
+ /**
1311
+ * Indicates whether the radio button is disabled.
1312
+ * Optional.
1313
+ */
1314
+ disabled?: boolean;
1315
+ /**
1316
+ * Indicates whether the radio button show the tooltip.
1317
+ * Optional.
1318
+ */
1319
+ showTooltip?: boolean;
1320
+ /**
1321
+ * The content of the tooltip.
1322
+ * Optional.
1323
+ */
1324
+ tooltipChildren?: React.ReactNode;
1325
+ /**
1326
+ * The content of the tooltip.
1327
+ * Optional.
1328
+ */
1329
+ tooltipTitle?: React.ReactNode;
1330
+ }
1271
1331
 
1272
1332
  declare const RadioButton: React__default.FC<RadioButtonProps>;
1273
1333
 
@@ -1915,6 +1975,14 @@ declare const toast: {
1915
1975
  info: (arg1: AcceptedType, arg2?: AcceptedType) => void;
1916
1976
  };
1917
1977
 
1978
+ interface ToggleSwitchProps {
1979
+ firstButton: string;
1980
+ secondButton: string;
1981
+ handleClick: (selected: string) => void;
1982
+ selected: string;
1983
+ }
1984
+ declare const ToggleSwitch: React__default.FC<ToggleSwitchProps>;
1985
+
1918
1986
  interface IconProps$1 {
1919
1987
  /** Name of the icon to be displayed. */
1920
1988
  name: string;
@@ -2014,6 +2082,24 @@ interface LabelEditTextFieldTypes {
2014
2082
 
2015
2083
  declare const EditTextField: FC<LabelEditTextFieldTypes>;
2016
2084
 
2085
+ interface ExcelFileProps {
2086
+ /** The Excel data containing sheets and their content */
2087
+ excelData: {
2088
+ sheets: WorkSheet[];
2089
+ };
2090
+ /** Optional: Provide context menu options for actions like right-click */
2091
+ contextOption?: {
2092
+ name: string;
2093
+ title: React__default.ReactNode;
2094
+ action: () => void;
2095
+ }[];
2096
+ /** Controls whether the toolbar is shown, disabled, or hidden */
2097
+ toolbar?: 'show' | 'disable' | 'hide';
2098
+ /** Callback function to save the Excel data */
2099
+ onSave?: (excelData?: any) => void;
2100
+ }
2101
+ declare const ExcelFile: React__default.FC<ExcelFileProps>;
2102
+
2017
2103
  interface ModuleChipProps {
2018
2104
  /**
2019
2105
  * mandatory | label for the ModuleChip component
@@ -2258,4 +2344,4 @@ declare const ConnectingBranch: React__default.FC;
2258
2344
 
2259
2345
  declare const saveFileFromBlob: (blob: Blob, filename: string) => void;
2260
2346
 
2261
- export { Accordion, AddButton as AddResourceButton, AllProjectsDropdown, AppHeader, AttachImage, AttachmentButton, BarChart, Button, Checkbox, Chip, Col, ConnectingBranch, Container, DashboardDonutChart, CustomDatePicker as DatePicker, DonutChart, DragAndDrop, Drawer, EditTextField, Editor, ExpandableMenu, FileDropzone, Forms as Form, HighlightText, Icon, IconButton, IconRadialChart, IconRadioGroup, Input, InputWithDropdown, LabelEditTextField, LineChart, MachineInputField, MenuOption, MiniModal, Modal, ModuleChip, MultiRadialChart, MultiSelect, NlpInput as NLPInput, Paper, PieChart, RadialChart, RadioButton, RadioGroup, Recaptcha, Row, Search, Select, SequentialConnectingBranch, StateDropdown, StatusButton, StatusCard, Table, TableTree, Tabs, Textarea as TextArea, ThemeProvider, Toaster, Toastify, Toggle, Tooltip, Typography, VariableInput, checkEmpty, compareArrays, compareObjects, debounce, ffid, findAndInsert, getEncryptedData, getExtension, getExtensionWithPeriod, getSequentialPayload, saveFileFromBlob, throttle, toast, truncateText, useTheme };
2347
+ export { Accordion, AddButton as AddResourceButton, AllProjectsDropdown, AppHeader, AttachImage, AttachmentButton, BarChart, Button, Checkbox, Chip, Col, ConnectingBranch, Container, DashboardDonutChart, CustomDatePicker as DatePicker, DonutChart, DragAndDrop, Drawer, EditTextField, Editor, ExcelFile as Excel, ExpandableMenu, FileDropzone, ForwardedForms as Form, HighlightText, Icon, IconButton, IconRadialChart, IconRadioGroup, Input, InputWithDropdown, LabelEditTextField, LineChart, MachineInputField, MenuOption, MiniModal, Modal, ModuleChip, MultiRadialChart, MultiSelect, NlpInput as NLPInput, Paper, PieChart, RadialChart, RadioButton, RadioGroup, Recaptcha, Row, Search, Select, SequentialConnectingBranch, StateDropdown, StatusButton, StatusCard, Table, TableTree, Tabs, Textarea as TextArea, ThemeProvider, Toaster, Toastify, Toggle, ToggleSwitch, Tooltip, Typography, VariableInput, checkEmpty, compareArrays, compareObjects, debounce, ffid, findAndInsert, getEncryptedData, getExtension, getExtensionWithPeriod, getSequentialPayload, saveFileFromBlob, throttle, toast, truncateText, useTheme };