pixel-react-excel-sheet 1.0.23 → 1.0.25

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.
Files changed (63) hide show
  1. package/lib/components/Charts/LineChart/types.d.ts +1 -0
  2. package/lib/components/DownloadClient/type.d.ts +19 -27
  3. package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
  4. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
  5. package/lib/components/MultiSelect/dropdownTypes.d.ts +1 -0
  6. package/lib/components/PhoneInput/PhoneInput.d.ts +0 -1
  7. package/lib/components/PhoneInput/types.d.ts +6 -0
  8. package/lib/components/SequentialConnectingBranch/components/Branches/Branches.d.ts +1 -1
  9. package/lib/components/SequentialConnectingBranch/components/Branches/types.d.ts +4 -1
  10. package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.d.ts +1 -1
  11. package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/types.d.ts +4 -1
  12. package/lib/components/SequentialConnectingBranch/types.d.ts +7 -1
  13. package/lib/index.d.ts +36 -29
  14. package/lib/index.esm.js +298 -189
  15. package/lib/index.esm.js.map +1 -1
  16. package/lib/index.js +298 -189
  17. package/lib/index.js.map +1 -1
  18. package/lib/utils/getSequentialPayload/types.d.ts +1 -0
  19. package/package.json +1 -1
  20. package/src/assets/Themes/BaseTheme.scss +1 -1
  21. package/src/assets/Themes/DarkTheme.scss +2 -0
  22. package/src/assets/icons/auto_save_icon.svg +4 -0
  23. package/src/components/Charts/LineChart/LineChart.stories.tsx +7 -3
  24. package/src/components/Charts/LineChart/LineChart.tsx +10 -1
  25. package/src/components/Charts/LineChart/types.ts +1 -0
  26. package/src/components/ConditionalDropdown/ConditionalDropdown.tsx +1 -1
  27. package/src/components/DownloadClient/DownloadClient.scss +51 -64
  28. package/src/components/DownloadClient/DownloadClient.stories.tsx +6 -6
  29. package/src/components/DownloadClient/DownloadClient.tsx +60 -51
  30. package/src/components/DownloadClient/type.ts +32 -40
  31. package/src/components/Excel/ExcelFile/ExcelFile.scss +46 -53
  32. package/src/components/Excel/ExcelFile/ExcelFile.tsx +7 -7
  33. package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +4 -1
  34. package/src/components/Excel/ExcelFile/ExcelFileComponents/CornerIndicator.tsx +8 -7
  35. package/src/components/Excel/ExcelFile/ExcelFileComponents/HeaderRow.tsx +1 -1
  36. package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +4 -1
  37. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +118 -106
  38. package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +1 -2
  39. package/src/components/FileDropzone/FileDropzone.stories.tsx +5 -19
  40. package/src/components/FileDropzone/FileDropzone.tsx +24 -4
  41. package/src/components/Icon/iconList.ts +2 -0
  42. package/src/components/MachineInputField/MachineInputField.stories.tsx +5 -4
  43. package/src/components/MachineInputField/MachineInputField.tsx +12 -15
  44. package/src/components/MachineInputField/types.ts +1 -0
  45. package/src/components/MultiSelect/Dropdown.tsx +30 -4
  46. package/src/components/MultiSelect/MultiSelect.tsx +2 -0
  47. package/src/components/MultiSelect/MultiSelectTypes.ts +3 -1
  48. package/src/components/MultiSelect/dropdownTypes.ts +2 -0
  49. package/src/components/PhoneInput/PhoneInput.stories.tsx +16 -41
  50. package/src/components/PhoneInput/PhoneInput.tsx +10 -2
  51. package/src/components/PhoneInput/phoneInput.scss +898 -0
  52. package/src/components/PhoneInput/types.ts +6 -0
  53. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.tsx +13 -2
  54. package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.tsx +34 -19
  55. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +113 -33
  56. package/src/components/SequentialConnectingBranch/components/Branches/types.ts +7 -1
  57. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.tsx +6 -0
  58. package/src/components/SequentialConnectingBranch/components/ConnectingBranches/types.ts +7 -1
  59. package/src/components/SequentialConnectingBranch/types.ts +7 -5
  60. package/src/components/TableTree/TableTree.tsx +1 -3
  61. package/src/components/TableTree/data.ts +0 -45
  62. package/src/components/TableTree/types.ts +3 -3
  63. package/src/utils/getSequentialPayload/types.ts +1 -0
@@ -2,6 +2,7 @@ export interface OperatingSystemInfo {
2
2
  osName: string;
3
3
  osVersion: string;
4
4
  hostName: string;
5
+ iconName: string;
5
6
  }
6
7
  export interface RunLevelExecutionDataSet {
7
8
  peVariableSetId: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pixel-react-excel-sheet",
3
3
  "description": "Great for pixel-perfect, design-focused components in React",
4
- "version": "1.0.23",
4
+ "version": "1.0.25",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -268,8 +268,8 @@ $base-theme: (
268
268
  excel-toolbar-bg: #D4B0E426,
269
269
  excel-header-bg: #f4ecf8,
270
270
  excel-toolbar-divider: #57575733,
271
-
272
271
  excel-sheet-header-background-color: #f3f0f5,
272
+
273
273
  icon-hover-color: #f7ecf8,
274
274
  ff-search-icon-hover-color: #f7ecf8,
275
275
  ff-search-filed-bg-color: #ffffff,
@@ -249,7 +249,9 @@ $dark-theme: (
249
249
  excel-sheet-button-color: #e9b5ff,
250
250
  excel-sheet-border:#cfd1e271,
251
251
  excel-toolbar-bg: #D4B0E426,
252
+ excel-header-bg: #f4ecf8,
252
253
  excel-toolbar-divider: #57575733,
254
+ excel-sheet-header-background-color: #f3f0f5,
253
255
 
254
256
  icon-hover-color: #f7ecf8,
255
257
  ff-editor-border-color: #f0e7f4,
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M18.7198 9.48632C18.5588 7.81594 17.7814 6.26541 16.5392 5.13714C15.297 4.00888 13.679 3.38379 12.0009 3.38379C10.3228 3.38379 8.70484 4.00888 7.46263 5.13714C6.22041 6.26541 5.44301 7.81594 5.28204 9.48632C3.91685 9.76252 2.70269 10.5354 1.87459 11.6553C1.04649 12.7753 0.663354 14.1626 0.79935 15.5488C0.935346 16.935 1.5808 18.2215 2.61077 19.1591C3.64073 20.0968 4.98195 20.619 6.37479 20.6246H17.6248C19.0178 20.6195 20.3594 20.0977 21.3898 19.1602C22.4202 18.2228 23.066 16.9363 23.2023 15.5499C23.3386 14.1636 22.9556 12.776 22.1275 11.6558C21.2994 10.5356 20.0852 9.76257 18.7198 9.48632ZM17.6248 19.1246H6.37479C5.31667 19.1122 4.30377 18.6937 3.54555 17.9555C2.78732 17.2174 2.34177 16.2161 2.30103 15.1587C2.26029 14.1013 2.62747 13.0686 3.32664 12.2743C4.02582 11.48 5.00351 10.9848 6.05754 10.8911C6.2477 10.8726 6.42409 10.7837 6.55215 10.6419C6.6802 10.5001 6.75069 10.3156 6.74979 10.1246C6.74609 9.43513 6.87823 8.75171 7.13866 8.11334C7.39908 7.47497 7.78269 6.89414 8.26759 6.40402C9.24688 5.41418 10.5793 4.8539 11.9717 4.84644C13.364 4.83898 14.7024 5.38495 15.6922 6.36424C16.6821 7.34354 17.2423 8.67593 17.2498 10.0683V10.1433C17.2492 10.3327 17.3204 10.5153 17.4489 10.6545C17.5775 10.7936 17.7539 10.8789 17.9428 10.8933C18.9927 10.9922 19.9649 11.4894 20.6595 12.2829C21.3542 13.0763 21.7186 14.1056 21.6779 15.1594C21.6372 16.2132 21.1944 17.2113 20.4406 17.9488C19.6868 18.6862 18.6792 19.107 17.6248 19.1246Z" fill="currentColor"/>
3
+ <path d="M14.8443 11.4693L10.8746 15.4391L9.15482 13.7193C9.01337 13.5827 8.82392 13.5071 8.62727 13.5088C8.43062 13.5105 8.24251 13.5894 8.10346 13.7285C7.9644 13.8675 7.88553 14.0556 7.88382 14.2523C7.88211 14.4489 7.9577 14.6384 8.09432 14.7798L10.3443 17.0298C10.485 17.1704 10.6757 17.2494 10.8746 17.2494C11.0734 17.2494 11.2642 17.1704 11.4048 17.0298L15.9048 12.5298C16.0414 12.3884 16.117 12.1989 16.1153 12.0023C16.1136 11.8056 16.0347 11.6175 15.8957 11.4785C15.7566 11.3394 15.5685 11.2605 15.3719 11.2588C15.1752 11.2571 14.9858 11.3327 14.8443 11.4693Z" fill="currentColor"/>
4
+ </svg>
@@ -38,14 +38,14 @@ export const DefaultLineChart: StoryObj<LineChartProps> = {
38
38
  },
39
39
  {
40
40
  date: '29 Oct',
41
- totalMemory: 800,
41
+ totalMemory: 100,
42
42
  },
43
43
  {
44
- date: '30 Oct',
44
+ date: '3 Nov',
45
45
  totalMemory: 10.12,
46
46
  },
47
47
  {
48
- date: '31 Oct',
48
+ date: '23 Nov',
49
49
  totalMemory: 10.1,
50
50
  },
51
51
  ],
@@ -60,6 +60,7 @@ export const DefaultLineChart: StoryObj<LineChartProps> = {
60
60
  xAxisColor: '#D9D9D9',
61
61
  yAxisColor: '#252C37',
62
62
  numberSize: '10px',
63
+ proportionalSpacing :false,
63
64
  },
64
65
  render: (args) => (
65
66
  <div className="linechart-container">
@@ -153,6 +154,8 @@ export const multiLineScriptsChart: StoryObj<LineChartProps> = {
153
154
  yAxisColor: '#252C37',
154
155
  yAxisLabelColor: '#252C37',
155
156
  textSize: '12px',
157
+ proportionalSpacing :false,
158
+
156
159
  },
157
160
  render: (args) => (
158
161
  <div className="linechart-container">
@@ -246,6 +249,7 @@ export const multiLineDefectsChart: StoryObj<LineChartProps> = {
246
249
  yAxisLabelColor: '#252C37',
247
250
  textSize: '12px',
248
251
  fontWeight: 'semi-bold',
252
+ proportionalSpacing :false,
249
253
  },
250
254
  render: (args) => (
251
255
  <div className="linechart-container">
@@ -25,6 +25,7 @@ const LineChart: React.FC<LineChartProps> = ({
25
25
  textSize,
26
26
  fontWeight,
27
27
  numberSize,
28
+ proportionalSpacing,
28
29
  }) => {
29
30
  const margin = 40;
30
31
  const xMax = width - margin * 2;
@@ -36,6 +37,7 @@ const LineChart: React.FC<LineChartProps> = ({
36
37
  const xKey = isDefaultLineChart ? 'date' : 'date';
37
38
  const yKey = isDefaultLineChart ? 'totalMemory' : 'value';
38
39
  const xScale = (x: string) => {
40
+ if (proportionalSpacing) {
39
41
  const date = new Date(x);
40
42
  const time = date.getTime();
41
43
  const minDate = new Date(
@@ -49,7 +51,14 @@ const LineChart: React.FC<LineChartProps> = ({
49
51
  ((time - minDate.getTime()) / (maxDate.getTime() - minDate.getTime())) *
50
52
  xMax
51
53
  );
52
- };
54
+ } else {
55
+ const index = data[0].data.findIndex((point: any) => point[xKey] === x);
56
+ if (index === -1) return 0;
57
+ const totalPoints = data[0].data.length;
58
+ return (index / (totalPoints - 1)) * xMax;
59
+ }
60
+ };
61
+
53
62
 
54
63
  const yScale = (y: number) => yMax - (y * yMax) / 1024;
55
64
 
@@ -26,4 +26,5 @@ export interface LineChartProps {
26
26
  textSize?: string | number;
27
27
  fontWeight?: string | number;
28
28
  numberSize?: string | number;
29
+ proportionalSpacing?: boolean;
29
30
  }
@@ -21,7 +21,7 @@ const ConditionalDropdown: React.FC<ConditionalDropdownProps> = ({
21
21
  dataFiles = [],
22
22
  ...props
23
23
  }) => {
24
- const [inputValue, setInputValue] = useState<string>('');
24
+ const [inputValue, setInputValue] = useState<string>(value);
25
25
  const [showDropdown, setShowDropdown] = useState<boolean>(false);
26
26
  const [cursorPosition, setCursorPosition] = useState<number | null>(null);
27
27
  const [showCreateVariableIcon, setShowCreateVariableIcon] =
@@ -1,80 +1,67 @@
1
- @use '../../assets/styles/colors' as *;
2
- @use '../../assets/styles/fonts';
3
1
  @use '../../assets/styles/mixins' as *;
4
2
 
5
- .ff-download-client-overlay {
6
- width: 378px;
7
- height: 217px;
3
+ .ff-download-client-wrapper {
8
4
  position: absolute;
9
- @include center-content;
10
- z-index: 9999;
5
+ height: 181px;
6
+ width: 368px;
7
+ border: 1px solid var(--download-client-border-color);
8
+ border-radius: 4px;
9
+ box-shadow: 0px 0px 8px 0px
10
+ var(--download-client-icon-container-box-shadow-color);
11
11
 
12
- .ff-download-client-container {
13
- width: 370px;
12
+ .ff-download-client-header-wrapper {
13
+ position: relative;
14
14
  @include center-content;
15
- flex-direction: column;
16
- border-radius: 8px;
17
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
18
- border: 1px solid var(--download-client-border-color);
19
- margin-left: 5px;
15
+ justify-content: space-between;
16
+ background-color: var(--download-client-header-bg-color);
20
17
 
21
- .ff-download-client-header {
22
- width: 100%;
23
- @include center-content;
24
- justify-content: space-between;
25
- padding: 7px 4px;
26
- margin-bottom: 8px;
27
- border-radius: 4px 4px 0 0;
28
- background-color: var(--download-client-header-bg-color);
29
- box-sizing: border-box;
18
+ .ff-download-client-hollow-triangle {
19
+ position: absolute;
20
+ height: 8px;
21
+ width: 8px;
22
+ border: 1px solid var(--download-client-border-color);
23
+ top: -6px;
24
+ right: 64px;
25
+ z-index: -1;
26
+ border-radius: 2px;
27
+ transform: rotate(45deg);
28
+ }
30
29
 
31
- .ff-header-arrow {
32
- content: "";
33
- display: block;
34
- position: absolute;
35
- top: 10px;
36
- right: 70px;
37
- width: 10px;
38
- height: 10px;
39
- background-color: var(--download-client-icon-container-bg-color) ;
40
- transform: translateY(-50%) rotate(-45deg);
41
- z-index: -999;
42
- border: 1px solid var(--download-client-header-bg-color);
43
- }
30
+ .ff-download-client-header-text {
31
+ margin-left: 4px;
32
+ }
44
33
 
34
+ .ff-download-client-close-icon {
35
+ cursor: pointer;
36
+ margin-right: 10px;
45
37
  }
38
+ }
46
39
 
47
- .ff-download-client-content {
48
- width: 100%;
49
- @include center-content;
50
- flex-direction: column;
51
- padding-left: 8px;
52
- padding-right: 24px;
53
- gap: 8px;
54
- margin-bottom: 8px;
55
- color: var(--popup-text-color);
56
- .ff-download-install,
57
- .ff-choose-os {
58
- padding: 4px 0;
59
- }
40
+ .ff-download-client-content-text {
41
+ width: calc(100% - 16px);
42
+ height: 132px;
43
+ background-color: #fff;
44
+ padding: 8px;
45
+
46
+ .ff-download-client-description-text {
47
+ margin-bottom: 8px
60
48
  }
61
49
 
62
- .ff-download-client-actions {
63
- width: 240px;
50
+ }
51
+
52
+ .ff-download-client-os-wrapper {
53
+ @include center-content;
54
+ gap: 24px;
55
+
56
+ .ff-os-version-wrapper {
64
57
  @include center-content;
65
- gap: 12px;
66
- margin-bottom: 17px;
67
- .ff-icons-container {
68
- @include center-content;
69
- width: 64px;
70
- height: 64px;
71
- border-radius: 8px;
72
- border: 1px solid var(--download-client-icon-container-border-color);
73
- background-color: var(--download-client-icon-container-bg-color);
74
- cursor: pointer;
75
- box-shadow: 0px 0px 10px 0px
76
- var(--download-client-icon-container-box-shadow-color);
77
- }
58
+ height: 64px;
59
+ width: 64px;
60
+ cursor: pointer;
61
+ border-radius: 8px;
62
+ border: 1px solid var(--download-client-icon-container-border-color);
63
+ box-shadow: 0px 0px 10px 0px
64
+ var(--download-client-icon-container-box-shadow-color);
78
65
  }
79
66
  }
80
67
  }
@@ -1,5 +1,6 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import DownloadClient from './DownloadClient';
3
+ import './DownloadClient.scss';
3
4
 
4
5
  const meta: Meta<typeof DownloadClient> = {
5
6
  title: 'Components/DownloadClient',
@@ -14,12 +15,11 @@ type Story = StoryObj<typeof DownloadClient>;
14
15
 
15
16
  export const Default: Story = {
16
17
  args: {
17
- onClose: () =>{},
18
- onClickWindows: () =>{},
19
- onClickLinux: () =>{},
20
- onClickMac: () =>{},
21
- top: '100px',
22
- left: '50px',
18
+ onClose: () => {},
19
+ top: '50%',
20
+ left: '50%',
21
+ className: 'ff-download-client-stories',
22
+ onClick: () => {},
23
23
  },
24
24
  };
25
25
 
@@ -6,17 +6,13 @@ import { DownloadClientProps } from './type';
6
6
 
7
7
  const DownloadClient: React.FC<DownloadClientProps> = ({
8
8
  onClose,
9
- onClickWindows,
10
- onClickLinux,
11
- onClickMac,
12
- top = '10px',
13
- left = '10px',
9
+ top = '100px',
10
+ left = '0px',
11
+ className,
12
+ description = 'Download and Install the fireflink client to run the script',
13
+ onClick = () => {},
14
+ optionZIndex = 10000001,
14
15
  }) => {
15
- const title = 'Download Client';
16
- const description =
17
- 'Download and Install the fireflink client to run the script';
18
- const chooseOSText = 'Choose OS';
19
-
20
16
  useEffect(() => {
21
17
  const handleCloseDownloadClient = (event: KeyboardEvent) => {
22
18
  if (event.key === 'Escape') {
@@ -29,49 +25,62 @@ const DownloadClient: React.FC<DownloadClientProps> = ({
29
25
  };
30
26
  }, [onClose]);
31
27
 
28
+ const osVersion = ['windows', 'mac_icon', 'linux'];
29
+
32
30
  return (
33
- <div className="ff-download-client-overlay" style={{ top, left }}>
34
- <div className="ff-download-client-container">
35
- <div className="ff-download-client-header">
36
- <div className="ff-header-arrow"></div>
37
- <Typography
38
- color="var(--table-header-text-color)"
39
- fontWeight="semi-bold"
40
- >
41
- {title}
42
- </Typography>
43
- <div onClick={onClose}>
44
- <Icon name="close" width={12} height={12} />
45
- </div>
46
- </div>
47
- <div className="ff-download-client-content">
48
- <div className="ff-download-install">
49
- <Typography
50
- fontWeight="semi-bold"
51
- color="var(--download-client-content-text-color)"
52
- >
53
- {description}
54
- </Typography>
55
- </div>
56
- <div className="ff-choose-os">
57
- <Typography
58
- fontWeight="semi-bold"
59
- color="var(--download-client-choose-os-text-color)"
31
+ <div
32
+ className={`ff-download-client-wrapper ${className}`}
33
+ style={{ top: top, left: left, zIndex: optionZIndex }}
34
+ >
35
+ <div className="ff-download-client-header-wrapper">
36
+ <div className="ff-download-client-hollow-triangle"></div>
37
+ <Typography
38
+ fontWeight="semi-bold"
39
+ lineHeight="32px"
40
+ className="ff-download-client-header-text"
41
+ >
42
+ Download client
43
+ </Typography>
44
+ <Icon
45
+ name="close"
46
+ color="var(--brand-color)"
47
+ className="ff-download-client-close-icon"
48
+ height={12}
49
+ width={12}
50
+ />
51
+ </div>
52
+
53
+ <div className="ff-download-client-content-text">
54
+ <Typography
55
+ as="div"
56
+ color="var(--download-client-content-text-color)"
57
+ fontWeight="semi-bold"
58
+ textAlign="center"
59
+ lineHeight="26px"
60
+ >
61
+ {description}
62
+ </Typography>
63
+ <Typography
64
+ as="div"
65
+ className="ff-download-client-description-text"
66
+ textAlign="center"
67
+ fontWeight="medium"
68
+ lineHeight='26px'
69
+ >
70
+ Choose OS to Download
71
+ </Typography>
72
+
73
+ <div className="ff-download-client-os-wrapper">
74
+ {osVersion.map((os) => (
75
+ <div
76
+ className="ff-os-version-wrapper"
77
+ onClick={() => {
78
+ onClick(os === 'mac_icon' ? 'mac' : os);
79
+ }}
60
80
  >
61
- {chooseOSText}
62
- </Typography>
63
- </div>
64
- </div>
65
- <div className="ff-download-client-actions">
66
- <div className="ff-icons-container" onClick={onClickWindows}>
67
- <Icon name="windows" width={32} height={38} />
68
- </div>
69
- <div className="ff-icons-container" onClick={onClickLinux}>
70
- <Icon name="linux" width={32} height={38} />
71
- </div>
72
- <div className="ff-icons-container" onClick={onClickMac}>
73
- <Icon name="mac_icon" width={32} height={38} />
74
- </div>
81
+ <Icon name={os} height={36} width={36} />
82
+ </div>
83
+ ))}
75
84
  </div>
76
85
  </div>
77
86
  </div>
@@ -1,41 +1,33 @@
1
1
  export interface DownloadClientProps {
2
- /**
3
- * Title of the popup.
4
- */
5
- title: string;
6
-
7
- /**
8
- * Description or body text of the popup.
9
- */
10
- description: string;
11
-
12
- /**
13
- * Callback for when the "Cancel" icon is clicked.
14
- */
15
- onCancel: () => void;
16
-
17
- /**
18
- * Callback for when the "Download for Windows" icon is clicked.
19
- */
20
- onDownloadWindows: () => void;
21
-
22
- /**
23
- * Callback for when the "Download for macOS" icon is clicked.
24
- */
25
- onDownloadMac: () => void;
26
-
27
- /**
28
- * Optional flag to control whether to display icons for download actions instead of buttons.
29
- * Defaults to `false` for buttons.
30
- */
31
- showIcons?: boolean;
32
- }
33
-
34
- export interface DownloadClientProps {
35
- onClose?: () => void;
36
- onClickWindows: () => void;
37
- onClickLinux: () => void;
38
- onClickMac: () => void;
39
- top?: string;
40
- left?: string;
41
- }
2
+ /**
3
+ * Close dialog function to close the modal dialog
4
+ **/
5
+ onClose: () => void;
6
+
7
+ /**
8
+ * distance between modal dialog and parent from top
9
+ **/
10
+ top?: string;
11
+
12
+ /**
13
+ * distance between modal dialog and parent from left
14
+ **/
15
+ left?: string;
16
+
17
+ /**
18
+ * To be used custom properties for the modal dialog through className
19
+ **/
20
+ className?: string;
21
+
22
+ /**
23
+ * Description of the dialog box
24
+ **/
25
+ description?: string;
26
+
27
+ /**
28
+ * Download button function
29
+ **/
30
+ onClick?: (os: string) => void;
31
+
32
+ optionZIndex?: number;
33
+ }
@@ -1,63 +1,56 @@
1
+ .ff-excel-sheet {
2
+ position: relative;
3
+ top: 0;
4
+ }
1
5
 
2
- .ff-excel-book {
3
- // position: relative;
4
- z-index: 1000;
6
+ .ff-excel-sheet-bar {
7
+ position: static;
8
+ max-width: 100%;
9
+ margin-left: 60px;
10
+ display: flex;
11
+ height: 36px;
12
+ align-items: center;
13
+ color: var(--brand2-color);
14
+ box-shadow: 0px 0px 4px -1px var(--toggle-strip-shadow);
5
15
 
6
- .ff-excel-sheet {
7
- position: static;
8
- top: 0;
16
+ .ff-excel-add-sheet-set {
17
+ position: relative;
18
+ background-color: var(--tab-bg-color);
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: center;
22
+ width: 40px;
23
+ top: 0;
24
+ left: 0px;
25
+ height: 100%;
26
+
27
+ .ff-excel-add-sheet-icon {
28
+ padding: 8px 10px;
9
29
  }
30
+ }
10
31
 
11
- .ff-excel-sheet-bar {
12
- position: static;
13
- max-width: 100%;
14
- margin-left: 60px;
32
+ .ff-excel-tab-container {
33
+ height: 36px;
34
+ display: flex;
35
+ overflow-x: auto;
36
+ align-items: center;
37
+ scrollbar-width: none;
38
+
39
+ .ff-excel-tab-list {
40
+ margin-top: 2px;
41
+ padding: 10px 9px;
42
+ min-width: max-content;
43
+ cursor: pointer;
15
44
  display: flex;
16
- height: 36px;
17
- align-items: center;
18
- color: var(--brand2-color);
19
- box-shadow: 0px 0px 4px -1px var(--toggle-strip-shadow);
20
-
21
- .ff-excel-add-sheet-icon {
22
- position: fixed;
23
- margin-top: 4px;
24
- padding: 0px 6px;
45
+ background-color: var(--hover-color);
46
+ &.active {
47
+ background-color: var(--excel-sheet-button-color);
25
48
  }
26
-
27
- .ff-excel-tab-container {
28
- padding-left: 40px;
29
- height: 36px;
30
- display: flex;
31
- overflow-x: auto;
32
- align-items: center;
33
- scrollbar-width: none;
34
- scrollbar-color: var(--hover-color) transparent;
35
- &::-webkit-scrollbar-track {
36
- background-color: transparent;
37
- }
38
- &::-webkit-scrollbar-thumb {
39
- border-radius: 5px;
40
- }
41
- &::-webkit-scrollbar {
42
- height: 0px;
43
- }
44
- .ff-excel-tab-list {
45
- margin-top: 2px;
46
- padding: 10px 9px;
47
- min-width: max-content;
48
- cursor: pointer;
49
- display: flex;
50
- background-color: var(--hover-color);
51
- &.active {
52
- background-color: var(--excel-sheet-button-color);
53
- }
54
49
 
55
- &:focus {
56
- outline: none;
57
- text-decoration: none;
58
- }
59
- }
50
+ &:focus {
51
+ outline: none;
52
+ text-decoration: none;
60
53
  }
61
54
  }
62
55
  }
63
-
56
+ }
@@ -430,8 +430,8 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
430
430
  setContextMenu({
431
431
  open: true,
432
432
  position: {
433
- x: event.pageX - 0,
434
- y: event.pageY - 50,
433
+ x: event.pageX - 50,
434
+ y: event.pageY - 250,
435
435
  },
436
436
  options: options,
437
437
  });
@@ -440,8 +440,7 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
440
440
  return (
441
441
  <>
442
442
  {sheetNames.length > 0 && (
443
- <div className="ff-excel-book">
444
- {contextMenu.open && <ExcelContextMenu contextMenu={contextMenu} />}
443
+ <>
445
444
  <div ref={sheetRef} className="ff-excel-sheet">
446
445
  <Spreadsheet
447
446
  sheetHeight={sheetHeight}
@@ -451,10 +450,10 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
451
450
  />
452
451
  </div>
453
452
  <div className="ff-excel-sheet-bar">
454
- <div className="ff-excel-add-sheet-icon">
453
+ <div className="ff-excel-add-sheet-set">
455
454
  <Tooltip title="Add Sheet" placement="top">
456
455
  <Icon
457
- className="cursor-pointer ml-1"
456
+ className="ff-excel-add-sheet-icon"
458
457
  hoverEffect={true}
459
458
  onClick={() => {
460
459
  handleAddSheet();
@@ -502,8 +501,9 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
502
501
  ))}
503
502
  </div>
504
503
  </div>
504
+ {contextMenu.open && <ExcelContextMenu contextMenu={contextMenu} />}
505
505
  <Toastify />
506
- </div>
506
+ </>
507
507
  )}
508
508
  </>
509
509
  );