pixel-react 1.4.3 → 1.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +6 -0
  3. package/lib/StyleGuide/Typography/Typography.stories.d.ts +6 -0
  4. package/lib/components/Accordion/Accordion.stories.d.ts +6 -0
  5. package/lib/components/AddButton/AddButton.d.ts +5 -0
  6. package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
  7. package/lib/components/AddButton/index.d.ts +1 -0
  8. package/lib/components/AddButton/types.d.ts +4 -0
  9. package/lib/components/AddResourceButton/AddButton.stories.d.ts +8 -0
  10. package/lib/components/AddResourceButton/type.d.ts +1 -1
  11. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +7 -0
  12. package/lib/components/AppHeader/AppHeader.stories.d.ts +7 -0
  13. package/lib/components/AttachImage/AttachImage.stories.d.ts +7 -0
  14. package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +9 -0
  15. package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
  16. package/lib/components/Button/Button.stories.d.ts +13 -0
  17. package/lib/components/Charts/BarChart/BarChart.stories.d.ts +6 -0
  18. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
  19. package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +6 -0
  20. package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +8 -0
  21. package/lib/components/Charts/LineChart/LineChart.stories.d.ts +7 -0
  22. package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +8 -0
  23. package/lib/components/Charts/PieChart/PieChart.stories.d.ts +7 -0
  24. package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +6 -0
  25. package/lib/components/Checkbox/Checkbox.stories.d.ts +8 -0
  26. package/lib/components/Chip/Chip.stories.d.ts +14 -0
  27. package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +6 -0
  28. package/lib/components/DatePicker/DatePicker.stories.d.ts +9 -0
  29. package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +6 -0
  30. package/lib/components/Drawer/Drawer.stories.d.ts +12 -0
  31. package/lib/components/Drawer/Types.d.ts +4 -0
  32. package/lib/components/EditTextField/EditTextField.stories.d.ts +10 -0
  33. package/lib/components/Editor/Editor.d.ts +1 -2
  34. package/lib/components/Editor/Editor.stories.d.ts +6 -0
  35. package/lib/components/Editor/types.d.ts +1 -5
  36. package/lib/components/Excel/ExcelContextMenu/ExcelContextMenu.d.ts +13 -0
  37. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +0 -13
  38. package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +29 -1
  39. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/engine.d.ts +3 -9
  40. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/formula.d.ts +2 -10
  41. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/point-graph.d.ts +0 -1
  42. package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +27 -2
  43. package/lib/components/Excel/ExcelFile.stories.d.ts +6 -0
  44. package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
  45. package/lib/components/ExcelFile/ColorBarselector/ColorBarSelector.d.ts +8 -0
  46. package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
  47. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
  48. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
  49. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
  50. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
  51. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
  52. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
  53. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
  54. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
  55. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
  56. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
  57. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
  58. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
  59. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +81 -0
  60. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
  61. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +130 -0
  62. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
  63. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
  64. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
  65. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
  66. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
  67. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
  68. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
  69. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
  70. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
  71. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
  72. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
  73. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
  74. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
  75. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
  76. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +215 -0
  77. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
  78. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
  79. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +45 -0
  80. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +3 -0
  81. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
  82. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +15 -0
  83. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +3 -0
  84. package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
  85. package/lib/components/ExcelFile/Types.d.ts +176 -0
  86. package/lib/components/ExcelFile/index.d.ts +1 -0
  87. package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +7 -0
  88. package/lib/components/FF_Captcha/captcha.stories.d.ts +8 -0
  89. package/lib/components/FileDropzone/FileDropzone.stories.d.ts +8 -0
  90. package/lib/components/Form/Form.stories.d.ts +7 -0
  91. package/lib/components/Form/Forms.d.ts +4 -2
  92. package/lib/components/GridLayout/GridLayout.stories.d.ts +8 -0
  93. package/lib/components/HighlightText/HighlightText.stories.d.ts +6 -0
  94. package/lib/components/Icon/Icon.stories.d.ts +8 -0
  95. package/lib/components/IconButton/IconButton.stories.d.ts +7 -0
  96. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
  97. package/lib/components/Input/Input.stories.d.ts +9 -0
  98. package/lib/components/InputWithDropdown/InputWithDropdown.d.ts +1 -1
  99. package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +9 -0
  100. package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +13 -0
  101. package/lib/components/LazyLoad/LazyLoad.stories.d.ts +6 -0
  102. package/lib/components/MachineInputField/MachineInputField.stories.d.ts +6 -0
  103. package/lib/components/MenuOption/MenuOption.d.ts +1 -1
  104. package/lib/components/MenuOption/MenuOption.stories.d.ts +16 -0
  105. package/lib/components/MenuOption/types.d.ts +49 -15
  106. package/lib/components/MiniModal/MiniModal.stories.d.ts +10 -0
  107. package/lib/components/Modal/Modal.stories.d.ts +7 -0
  108. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
  109. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  110. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +12 -0
  111. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +4 -5
  112. package/lib/components/MultiSelect/dropdownTypes.d.ts +2 -0
  113. package/lib/components/NLPInput/NlpInput.stories.d.ts +7 -0
  114. package/lib/components/Paper/Paper.stories.d.ts +11 -0
  115. package/lib/components/RadioButton/RadioButton.d.ts +1 -0
  116. package/lib/components/RadioButton/RadioButton.stories.d.ts +10 -0
  117. package/lib/components/RadioButton/radioButtonTypes.d.ts +3 -1
  118. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +9 -0
  119. package/lib/components/Search/Search.stories.d.ts +6 -0
  120. package/lib/components/Select/Select.stories.d.ts +14 -0
  121. package/lib/components/Select/components/Dropdown/Dropdown.d.ts +4 -0
  122. package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +17 -0
  123. package/lib/components/Select/components/types.d.ts +4 -2
  124. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +6 -0
  125. package/lib/components/StateDropdown/StateDropdown.stories.d.ts +10 -0
  126. package/lib/components/StatusButton/StatusButton.stories.d.ts +14 -0
  127. package/lib/components/StatusCard/StatusCard.stories.d.ts +11 -0
  128. package/lib/components/Table/Table.d.ts +1 -1
  129. package/lib/components/Table/Table.stories.d.ts +13 -0
  130. package/lib/components/TableTree/TableTree.stories.d.ts +7 -0
  131. package/lib/components/Tabs/Tabs.stories.d.ts +9 -0
  132. package/lib/components/TextArea/Textarea.stories.d.ts +9 -0
  133. package/lib/components/Toast/Toast.stories.d.ts +6 -0
  134. package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
  135. package/lib/components/Toggle/Toggle.stories.d.ts +12 -0
  136. package/lib/components/ToggleSwitch/ToggleSwitch.d.ts +10 -0
  137. package/lib/components/ToggleSwitch/index.d.ts +1 -0
  138. package/lib/components/Tooltip/Tooltip.stories.d.ts +15 -0
  139. package/lib/components/Typography/Typography.stories.d.ts +10 -0
  140. package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
  141. package/lib/index.d.ts +140 -29
  142. package/lib/index.esm.js +15628 -5724
  143. package/lib/index.esm.js.map +1 -1
  144. package/lib/index.js +15625 -5718
  145. package/lib/index.js.map +1 -1
  146. package/lib/tsconfig.tsbuildinfo +1 -1
  147. package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +6 -0
  148. package/lib/utils/compareArrays/compareArrays.stories.d.ts +6 -0
  149. package/lib/utils/compareObjects/compareObjects.stories.d.ts +6 -0
  150. package/lib/utils/debounce/debounce.stories.d.ts +6 -0
  151. package/lib/utils/ffID/ffID.stories.d.ts +6 -0
  152. package/lib/utils/find/findAndInsert.d.ts +7 -0
  153. package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
  154. package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
  155. package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +6 -0
  156. package/lib/utils/getExtension/getExtension.stories.d.ts +6 -0
  157. package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +10 -0
  158. package/lib/utils/throttle/throttle.stories.d.ts +6 -0
  159. package/lib/utils/truncateText/truncateText.stories.d.ts +6 -0
  160. package/package.json +12 -12
  161. package/src/StyleGuide/ColorPalette/colorPaletteList.ts +10 -0
  162. package/src/assets/Themes/BaseTheme.scss +17 -23
  163. package/src/assets/Themes/DarkTheme.scss +25 -38
  164. package/src/assets/icons/apk_file_type.svg +4 -0
  165. package/src/assets/icons/compressed_file_type.svg +4 -0
  166. package/src/assets/icons/csv_file_type.svg +4 -0
  167. package/src/assets/icons/excel_corner_menu.svg +3 -0
  168. package/src/assets/icons/formula_icon.svg +3 -0
  169. package/src/assets/icons/gif_file_type.svg +4 -0
  170. package/src/assets/icons/html_file_type.svg +4 -0
  171. package/src/assets/icons/ipk_file_type.svg +4 -0
  172. package/src/assets/icons/jpg_file_type.svg +4 -0
  173. package/src/assets/icons/json_file_type.svg +4 -0
  174. package/src/assets/icons/pdf_file_type.svg +4 -0
  175. package/src/assets/icons/png_file_type.svg +4 -0
  176. package/src/assets/icons/quick_run_setting_icon.svg +5 -0
  177. package/src/assets/icons/run_automation_scripts_icon.svg +33 -0
  178. package/src/assets/icons/run_manual_testcase_icon.svg +4 -0
  179. package/src/assets/icons/search.svg +2 -2
  180. package/src/assets/icons/txt_file_type.svg +4 -0
  181. package/src/assets/icons/xls_file_type.svg +4 -0
  182. package/src/assets/icons/xlsx_file_type.svg +4 -0
  183. package/src/assets/icons/xml_file_type.svg +4 -0
  184. package/src/components/AddResourceButton/AddButton.tsx +7 -7
  185. package/src/components/AddResourceButton/type.ts +1 -1
  186. package/src/components/AttachmentButton/AttachmentButton.scss +1 -1
  187. package/src/components/AttachmentButton/AttachmentButton.stories.tsx +1 -0
  188. package/src/components/Button/Button.scss +22 -20
  189. package/src/components/Button/Button.tsx +8 -1
  190. package/src/components/Drawer/Drawer.scss +4 -3
  191. package/src/components/Drawer/Drawer.tsx +14 -18
  192. package/src/components/Drawer/Types.ts +4 -0
  193. package/src/components/Editor/Editor.tsx +224 -193
  194. package/src/components/Editor/types.ts +1 -5
  195. package/src/components/Excel/ExcelContextMenu/ExcelContextMenu.scss +39 -0
  196. package/src/components/Excel/ExcelContextMenu/ExcelContextMenu.tsx +51 -0
  197. package/src/components/Excel/ExcelFile/ExcelFile.tsx +7 -8
  198. package/src/components/Excel/ExcelFile/ExcelFileComponents/Cell.tsx +35 -0
  199. package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +44 -7
  200. package/src/components/Excel/ExcelFile/ExcelFileComponents/CornerIndicator.tsx +8 -1
  201. package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +45 -6
  202. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +37 -2
  203. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +69 -24
  204. package/src/components/Excel/ExcelFile/ExcelFileComponents/actions.ts +59 -0
  205. package/src/components/Excel/ExcelFile/ExcelFileComponents/engine/engine.ts +18 -65
  206. package/src/components/Excel/ExcelFile/ExcelFileComponents/engine/formula.ts +5 -110
  207. package/src/components/Excel/ExcelFile/ExcelFileComponents/engine/point-graph.ts +0 -2
  208. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +105 -1
  209. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +670 -673
  210. package/src/components/Excel/ExcelFile/ExcelFileComponents/types.ts +38 -2
  211. package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +0 -4
  212. package/src/components/FileDropzone/FileDropzone.scss +4 -2
  213. package/src/components/FileDropzone/FileDropzone.tsx +1 -1
  214. package/src/components/FileDropzone/FilePreview.tsx +3 -1
  215. package/src/components/Form/Form.scss +2 -0
  216. package/src/components/Form/Form.stories.tsx +195 -6
  217. package/src/components/Form/Forms.tsx +15 -8
  218. package/src/components/Icon/iconList.ts +46 -0
  219. package/src/components/IconRadioGroup/IconRadioGroup.scss +3 -0
  220. package/src/components/IconRadioGroup/IconRadioGroup.tsx +20 -17
  221. package/src/components/Input/Input.scss +14 -15
  222. package/src/components/Input/Input.stories.tsx +2 -1
  223. package/src/components/InputWithDropdown/InputWithDropdown.scss +12 -13
  224. package/src/components/InputWithDropdown/InputWithDropdown.stories.tsx +3 -2
  225. package/src/components/InputWithDropdown/InputWithDropdown.tsx +22 -19
  226. package/src/components/MenuOption/MenuOption.scss +11 -10
  227. package/src/components/MenuOption/MenuOption.stories.tsx +51 -232
  228. package/src/components/MenuOption/MenuOption.tsx +131 -52
  229. package/src/components/MenuOption/types.ts +55 -14
  230. package/src/components/MiniModal/MiniModal.stories.tsx +2 -3
  231. package/src/components/MultiSelect/Dropdown.tsx +11 -12
  232. package/src/components/MultiSelect/MultiSelect.scss +1 -0
  233. package/src/components/MultiSelect/MultiSelect.stories.tsx +45 -10
  234. package/src/components/MultiSelect/MultiSelect.tsx +29 -13
  235. package/src/components/MultiSelect/MultiSelectTypes.ts +7 -5
  236. package/src/components/MultiSelect/dropdownTypes.ts +2 -0
  237. package/src/components/RadioButton/RadioButton.scss +3 -1
  238. package/src/components/RadioButton/RadioButton.tsx +3 -1
  239. package/src/components/RadioButton/radioButtonTypes.tsx +5 -1
  240. package/src/components/Search/Search.scss +25 -6
  241. package/src/components/Search/Search.tsx +45 -24
  242. package/src/components/Select/Select.scss +12 -12
  243. package/src/components/Select/Select.stories.tsx +2 -0
  244. package/src/components/Select/Select.tsx +11 -5
  245. package/src/components/Select/components/Dropdown.scss +2 -0
  246. package/src/components/Select/components/Dropdown.tsx +19 -4
  247. package/src/components/Select/components/types.ts +4 -2
  248. package/src/components/StatusButton/StatusButton.tsx +26 -20
  249. package/src/components/Table/Table.scss +1 -3
  250. package/src/components/Table/Table.stories.tsx +1 -0
  251. package/src/components/Table/Table.tsx +7 -3
  252. package/src/components/ToggleSwitch/ToggleSwitch.scss +59 -0
  253. package/src/components/ToggleSwitch/ToggleSwitch.stories.tsx +52 -0
  254. package/src/components/ToggleSwitch/ToggleSwitch.tsx +30 -0
  255. package/src/components/ToggleSwitch/index.ts +1 -0
  256. package/src/hooks/useFileDropzone.tsx +1 -0
  257. package/src/index.ts +7 -3
  258. package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
  259. package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
  260. package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
  261. package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
  262. package/src/components/Excel/ContextMenu/ContextMenu.scss +0 -99
  263. package/src/components/Excel/ContextMenu/ContextMenu.tsx +0 -103
@@ -2,6 +2,7 @@ import classNames from 'classnames';
2
2
  import './StatusButton.scss';
3
3
  import { StatusButtonProps } from './types';
4
4
  import Typography from '../Typography';
5
+ import Tooltip from '../Tooltip';
5
6
 
6
7
  const StatusButton = ({
7
8
  status = 'passed',
@@ -12,28 +13,33 @@ const StatusButton = ({
12
13
  disabled = false,
13
14
  ...props
14
15
  }: StatusButtonProps) => {
16
+ const hasTooltip =
17
+ status === 'partially-executed' || status === 'not-executed';
18
+
15
19
  return (
16
- <button
17
- className={classNames(
18
- 'ff-status-button',
19
- `ff-status-button--${status}`,
20
- className
21
- )}
22
- style={style}
23
- onClick={onClick}
24
- disabled={disabled}
25
- {...props}
26
- >
27
- <Typography
28
- as="div"
29
- fontWeight="semi-bold"
30
- lineHeight="16px"
31
- textAlign="center"
32
- className="ff-status-button__text"
20
+ <Tooltip title={hasTooltip ? label : ''} placement="bottom">
21
+ <button
22
+ className={classNames(
23
+ 'ff-status-button',
24
+ `ff-status-button--${status}`,
25
+ className
26
+ )}
27
+ style={style}
28
+ onClick={onClick}
29
+ disabled={disabled}
30
+ {...props}
33
31
  >
34
- {label}
35
- </Typography>
36
- </button>
32
+ <Typography
33
+ as="div"
34
+ fontWeight="semi-bold"
35
+ lineHeight="16px"
36
+ textAlign="center"
37
+ className="ff-status-button__text"
38
+ >
39
+ {label}
40
+ </Typography>
41
+ </button>
42
+ </Tooltip>
37
43
  );
38
44
  };
39
45
 
@@ -1,4 +1,4 @@
1
- @use '../../assets/styles/_fonts';
1
+
2
2
 
3
3
  .ff-fixed-header-table {
4
4
  overflow-y: auto;
@@ -22,7 +22,6 @@
22
22
  thead {
23
23
  tr {
24
24
  th {
25
- @extend .fontMd;
26
25
  border-bottom: 1px solid var(--slider-table-color);
27
26
  }
28
27
  th{
@@ -60,7 +59,6 @@
60
59
  td {
61
60
  position: relative;
62
61
  color: var(--table-column-text-color);
63
- @extend .fontSm;
64
62
 
65
63
  &.clickable-cell {
66
64
  cursor: pointer;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { useEffect, useState } from 'react';
2
3
  import { StoryObj, Meta } from '@storybook/react';
3
4
  import Table from './Table';
@@ -48,7 +48,6 @@ const Table = ({
48
48
  onSelect(e, item);
49
49
  }
50
50
  };
51
- if (!(data.length >= 0)) return null;
52
51
 
53
52
  return (
54
53
  <div
@@ -88,7 +87,12 @@ const Table = ({
88
87
  key={column.header}
89
88
  style={{ width: column?.width }}
90
89
  >
91
- <div className="ff-label-checkbox-container">
90
+ <Typography
91
+ as="div"
92
+ fontSize={12}
93
+ fontWeight="semi-bold"
94
+ className="ff-label-checkbox-container"
95
+ >
92
96
  {index === 0 && withCheckbox && (
93
97
  <span className="ff-table-checkbox">
94
98
  <Checkbox
@@ -105,7 +109,7 @@ const Table = ({
105
109
  )}
106
110
 
107
111
  {column.header}
108
- </div>
112
+ </Typography>
109
113
  </th>
110
114
  ))}
111
115
  </tr>
@@ -0,0 +1,59 @@
1
+ /* Container Styling */
2
+ .toggle-container {
3
+ display: flex;
4
+ background-color: var(--base-bg-color);
5
+ height: 24px;
6
+ border-radius: 6px;
7
+ padding: 4px 2px;
8
+ overflow: hidden;
9
+ width: fit-content;
10
+ box-shadow: 1px 1px 2px 0px var(--base-bg-color),
11
+ inset -1px -1px 2px var(--base-bg-color),
12
+ inset 1px -1px 2px var(--ff-toggle-switch-shadow-color),
13
+ inset -1px 2px 0px var(--ff-toggle-switch-shadow-color);
14
+ align-items: center;
15
+ justify-content: center;
16
+ gap: 4px;
17
+ }
18
+
19
+ /* Button Styling */
20
+ .toggle-button {
21
+ padding: 4px 2px;
22
+ font-size: 10px;
23
+ font-weight: 500;
24
+ border: none;
25
+ border-radius: 4px;
26
+ cursor: pointer;
27
+ background-color: var(--base-bg-color);
28
+ color: var(--ff-toggle-switch-off-color);
29
+ outline: none;
30
+ transition: all 0.3s ease;
31
+ min-width: 24px;
32
+ height: 20px;
33
+ text-align: center;
34
+ box-shadow:
35
+ inset 1px 1px 2px 0 var(--base-bg-color),
36
+ 1px 1px 3px 0 var(--ff-chips-blur-color),
37
+ -1px -1px 2px 0 var(--base-bg-color),
38
+ 1px -1px 2px 0 var(--ff-chips-blur-color),
39
+ -1px 1px 2px 0 var(--ff-chips-blur-color)
40
+ }
41
+
42
+ /* Active Button */
43
+ .toggle-button.active {
44
+ background-color: var(--ff-line-number-bg);
45
+ color: var(--base-bg-color);
46
+ box-shadow:
47
+ inset -1px -1px 2px 0 var(--ff-chips-blur-color),
48
+ 1px 1px 3px 0 var(--ff-chips-blur-color),
49
+ -1px -1px 2px 0 var(--base-bg-color),
50
+ -1px 1px 2px 0 var(--ff-chips-blur-color);
51
+ }
52
+
53
+ /* Button Hover Effect */
54
+ .toggle-button:hover {
55
+ background-color: var(--hover-color);
56
+ color: var(--brand-color);
57
+ }
58
+
59
+
@@ -0,0 +1,52 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import ToggleSwitch from "./ToggleSwitch";
3
+ import React, { useState } from "react";
4
+
5
+
6
+ const meta: Meta<typeof ToggleSwitch> = {
7
+ title: "Components/ToggleSwitch",
8
+ component: ToggleSwitch,
9
+ tags: ["autodocs"],
10
+ argTypes: {
11
+ selected: {
12
+ control: { type: "radio" },
13
+ options: ["Automation", "Manual"],
14
+ },
15
+ },
16
+ };
17
+
18
+ export default meta;
19
+
20
+ type Story = StoryObj<typeof ToggleSwitch>;
21
+
22
+ export const Default: Story = {
23
+ args: {
24
+ selected: "Automation",
25
+ firstButton: "Automation",
26
+ secondButton: "Manual",
27
+ handleClick: () => {},
28
+ },
29
+ };
30
+
31
+ export const Switch: Story = {
32
+ render: () => {
33
+ const ToggleSwitchWrapper = () => {
34
+ const [selected, setSelected] = useState<string>("Automation");
35
+
36
+ const handleChange = (selectedSwitch: string) => {
37
+ setSelected(selectedSwitch);
38
+ };
39
+
40
+ return (
41
+ <ToggleSwitch
42
+ selected={selected}
43
+ firstButton="Automation"
44
+ secondButton="Manual"
45
+ handleClick={handleChange}
46
+ />
47
+ );
48
+ };
49
+
50
+ return <ToggleSwitchWrapper />;
51
+ },
52
+ };
@@ -0,0 +1,30 @@
1
+ import React, { type JSX } from "react";
2
+ import "./ToggleSwitch.scss";
3
+
4
+ interface ToggleSwitchProps {
5
+ firstButton:string,
6
+ secondButton:string,
7
+ handleClick:(selected:string)=>void,
8
+ selected:string
9
+ }
10
+
11
+ const ToggleSwitch: React.FC<ToggleSwitchProps> = ({ selected = "text",firstButton='File',secondButton='File',handleClick}):JSX.Element => {
12
+ return (
13
+ <div className="toggle-container">
14
+ <button
15
+ className={`toggle-button ${selected === firstButton ? "active" : ""}`}
16
+ onClick={() => handleClick(firstButton)}
17
+ >
18
+ {firstButton}
19
+ </button>
20
+ <button
21
+ className={`toggle-button ${selected === secondButton ? "active" : ""}`}
22
+ onClick={() => handleClick(secondButton)}
23
+ >
24
+ {secondButton}
25
+ </button>
26
+ </div>
27
+ );
28
+ };
29
+
30
+ export default ToggleSwitch;
@@ -0,0 +1 @@
1
+ export {default} from './ToggleSwitch'
@@ -167,6 +167,7 @@ const useFileDropzone = (options: DropzoneOptions): DropzoneState => {
167
167
  ) => {
168
168
  event.preventDefault();
169
169
  event.stopPropagation();
170
+ setIsDragActive(false);
170
171
 
171
172
  const droppedFiles =
172
173
  'dataTransfer' in event
package/src/index.ts CHANGED
@@ -51,10 +51,12 @@ import MachineInputField from './components/MachineInputField';
51
51
  import SequentialConnectingBranch from './components/SequentialConnectingBranch';
52
52
  import AttachmentButton from './components/AttachmentButton';
53
53
  import { Toastify, toast } from './components/Toastify/Toastify';
54
+ import ToggleSwitch from './components/ToggleSwitch/ToggleSwitch';
55
+ import Avatar from './components/Avatar/Avatar';
54
56
 
55
57
  import LabelEditTextField from './components/LabelEditTextField';
56
58
  import EditTextField from './components/EditTextField';
57
- // import Excel from './components/Excel';
59
+ import Excel from './components/Excel';
58
60
  import ModuleChip from './components/ModulesChip/ModuleChip';
59
61
  import IconRadialChart from './components/Charts/IconRadialChart';
60
62
  import AttachImage from './components/AttachImage';
@@ -80,7 +82,7 @@ import MultiRadialChart from './components/Charts/MultiRadialChart';
80
82
  import Editor from './components/Editor/Editor';
81
83
  import { getSequentialPayload } from './utils/getSequentialPayload/getSequentialPayload';
82
84
  import ConnectingBranch from './components/ConnectingBranch/ConnectingBranch';
83
- import { saveFileFromBlob } from './utils/downloadFile/saveFileFromBlob'
85
+ import { saveFileFromBlob } from './utils/downloadFile/saveFileFromBlob';
84
86
 
85
87
  export {
86
88
  Button,
@@ -138,7 +140,7 @@ export {
138
140
  Editor,
139
141
  AttachmentButton,
140
142
  LabelEditTextField,
141
- // Excel,
143
+ Excel,
142
144
  IconRadioGroup,
143
145
  Toastify,
144
146
  toast,
@@ -151,6 +153,8 @@ export {
151
153
  StatusCard,
152
154
  EditTextField,
153
155
  AttachImage,
156
+ ToggleSwitch,
157
+ Avatar,
154
158
  // utils exports
155
159
  checkEmpty,
156
160
  getExtension,
Binary file
Binary file
@@ -1,99 +0,0 @@
1
- @use '../../assets/styles/fonts';
2
-
3
- .context-menu {
4
- position: absolute;
5
- z-index: 1;
6
- outline: none;
7
- background-color: var(--brand-color);
8
- border-radius: 5px;
9
- opacity: 1;
10
- padding: 16px 0;
11
- .menu-options {
12
- overflow: auto;
13
- min-height: 20px;
14
- max-height: 175px;
15
- min-width: 250px;
16
- opacity: 1;
17
- .options {
18
- cursor: pointer;
19
- display: flex;
20
- align-items: center;
21
- padding: 0 8px;
22
- line-height: 35px;
23
- gap: 16px;
24
- .sheet-context-menu {
25
- display: flex;
26
- align-items: center;
27
- justify-content: center;
28
- }
29
- &:hover {
30
- .options-label {
31
- background: var(--option-card-bg-color);
32
- }
33
- }
34
- }
35
- }
36
- }
37
-
38
- .ff-icon-label {
39
- display: flex;
40
- align-items: center;
41
- gap: 4px;
42
- .ff-menuicon-container {
43
- display: flex;
44
- justify-content: center;
45
- align-items: center;
46
- cursor: pointer;
47
- &:hover {
48
- background-color: var(--brand-color);
49
- }
50
- }
51
-
52
- .ff-menuicon-container-clicked {
53
- display: flex;
54
- justify-content: center;
55
- align-items: center;
56
- background-color: var(--brand-color);
57
- cursor: pointer;
58
- &:hover {
59
- background-color: var(--brand-color);
60
- }
61
- }
62
- }
63
-
64
- .ff-option-card {
65
- position: absolute;
66
- border: 1px solid var(--option-card-border-color);
67
- background: var(--option-card-bg-color);
68
- border-radius: 4px;
69
- margin: 2px;
70
- min-height: 32px;
71
- min-width: 111px;
72
- z-index: 100000;
73
- white-space: nowrap;
74
-
75
- .ff-options {
76
- @extend .fontSm;
77
- cursor: pointer;
78
- border-radius: 4px;
79
- display: flex;
80
- align-items: center;
81
- padding: 8px;
82
- line-height: 16px;
83
- gap: 8px;
84
- &:hover {
85
- background-color: var(--hover-color);
86
- }
87
- label {
88
- cursor: pointer;
89
- }
90
- }
91
-
92
- .ff-disable-option {
93
- opacity: 0.5;
94
- cursor: no-drop;
95
- label {
96
- cursor: no-drop;
97
- }
98
- }
99
- }
@@ -1,103 +0,0 @@
1
- import React from 'react';
2
- import './ContextMenu.scss';
3
- import Icon from '../../Icon';
4
-
5
- const ContextMenu: React.FC<ContextMenuProps> = ({
6
- customContext,
7
- contextAction,
8
- contextData,
9
- setContextData,
10
- }) => {
11
- const contextOptions: ContextOption[] = [
12
- {
13
- name: 'cell',
14
- value: customContext || [],
15
- },
16
- {
17
- name: 'row',
18
- value: [
19
- { name: 'Add Row', title: 'Add Row', action: contextAction.addRow },
20
- {
21
- name: 'Delete Row',
22
- title: 'Delete Row',
23
- action: contextAction.deleteRow,
24
- },
25
- ],
26
- },
27
- {
28
- name: 'column',
29
- value: [
30
- {
31
- name: 'Add Column',
32
- title: 'Add Column',
33
- action: contextAction.addColumn,
34
- },
35
- {
36
- name: 'Delete Column',
37
- title: 'Delete Column',
38
- action: contextAction.deleteColumn,
39
- },
40
- ],
41
- },
42
- {
43
- name: 'sheet_options',
44
- value: [
45
- {
46
- name: 'Add Sheet',
47
- title: (
48
- <span className="sheet-context-menu">
49
- <Icon name="plus_icon" /> Add
50
- Sheet
51
- </span>
52
- ),
53
- action: contextAction.addSheet,
54
- },
55
- {
56
- name: 'Delete Sheet',
57
- title: (
58
- <span className="sheet-context-menu">
59
- <Icon name="delete" /> Delete Sheet
60
- </span>
61
- ),
62
- action: contextAction.deleteSheet,
63
- },
64
- ],
65
- },
66
- ];
67
-
68
- return (
69
- contextData.visible &&
70
- contextOptions.some(
71
- (contextType) =>
72
- contextType.name === contextData.type && contextType.value.length > 0
73
- ) && (
74
- <div
75
- className="context-menu"
76
- style={{ top: contextData.y, left: contextData.x }}
77
- >
78
- <div className="menu-options">
79
- {contextOptions
80
- .filter((contextType) => contextType.name === contextData.type)
81
- .map((contextType) =>
82
- contextType.value.length > 0
83
- ? contextType.value.map((item) => (
84
- <div
85
- className="options"
86
- key={item.name}
87
- onClick={() => {
88
- item.action();
89
- setContextData((prev) => ({ ...prev, visible: false }));
90
- }}
91
- >
92
- <label className="options-label">{item.title}</label>
93
- </div>
94
- ))
95
- : null
96
- )}
97
- </div>
98
- </div>
99
- )
100
- );
101
- };
102
-
103
- export default ContextMenu;