pixel-react 1.5.5 → 1.5.6

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 (57) hide show
  1. package/lib/components/DatePicker/types.d.ts +4 -0
  2. package/lib/components/Excel/ExcelContextMenu/ExcelContextMenu.d.ts +1 -7
  3. package/lib/components/Excel/ExcelFile/ExcelFileComponents/DataViewer.d.ts +1 -1
  4. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +1 -0
  5. package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.d.ts +1 -0
  6. package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +5 -0
  7. package/lib/components/FileDropzone/types.d.ts +3 -0
  8. package/lib/components/StateDropdown/StateDropdown.d.ts +1 -1
  9. package/lib/components/StateDropdown/StateDropdownTypes.d.ts +3 -0
  10. package/lib/index.d.ts +49 -2
  11. package/lib/index.esm.js +899 -550
  12. package/lib/index.esm.js.map +1 -1
  13. package/lib/index.js +899 -549
  14. package/lib/index.js.map +1 -1
  15. package/package.json +1 -1
  16. package/src/assets/icons/dashboard_icon.svg +31 -0
  17. package/src/assets/styles/_colors.scss +1 -0
  18. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +1 -1
  19. package/src/components/DatePicker/DatePicker.scss +4 -3
  20. package/src/components/DatePicker/DatePicker.stories.tsx +27 -14
  21. package/src/components/DatePicker/DatePicker.tsx +62 -49
  22. package/src/components/DatePicker/types.ts +5 -0
  23. package/src/components/Excel/ColorBarSelector/ColorBarSelector.scss +8 -4
  24. package/src/components/Excel/ColorBarSelector/ColorBarSelector.tsx +2 -2
  25. package/src/components/Excel/ExcelContextMenu/ExcelContextMenu.scss +23 -35
  26. package/src/components/Excel/ExcelContextMenu/ExcelContextMenu.tsx +3 -12
  27. package/src/components/Excel/ExcelFile/ExcelFile.scss +31 -25
  28. package/src/components/Excel/ExcelFile/ExcelFile.tsx +157 -47
  29. package/src/components/Excel/ExcelFile/ExcelFileComponents/Cell.tsx +5 -4
  30. package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +3 -3
  31. package/src/components/Excel/ExcelFile/ExcelFileComponents/DataViewer.tsx +40 -1
  32. package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +3 -3
  33. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +10 -0
  34. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +9 -45
  35. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +43 -2
  36. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +40 -5
  37. package/src/components/Excel/ExcelFile/ExcelFileComponents/types.ts +3 -1
  38. package/src/components/Excel/ExcelFile.stories.tsx +42 -43
  39. package/src/components/Excel/ExcelToolBar/ExcelToolBar.scss +80 -20
  40. package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +171 -159
  41. package/src/components/FileDropzone/Dropzone.tsx +2 -0
  42. package/src/components/FileDropzone/FileDropzone.scss +1 -2
  43. package/src/components/FileDropzone/FileDropzone.stories.tsx +3 -0
  44. package/src/components/FileDropzone/FileDropzone.tsx +11 -3
  45. package/src/components/FileDropzone/types.ts +5 -0
  46. package/src/components/Icon/Icon.stories.tsx +5 -4
  47. package/src/components/Icon/iconList.ts +2 -0
  48. package/src/components/MultiSelect/MultiSelect.scss +41 -50
  49. package/src/components/MultiSelect/MultiSelect.tsx +48 -48
  50. package/src/components/Select/Select.scss +11 -1
  51. package/src/components/Select/Select.tsx +2 -2
  52. package/src/components/StateDropdown/StateDropdown.stories.tsx +5 -0
  53. package/src/components/StateDropdown/StateDropdown.tsx +27 -12
  54. package/src/components/StateDropdown/StateDropdownTypes.tsx +6 -0
  55. package/src/components/TableTree/TableTree.scss +17 -15
  56. package/src/components/TableTree/TableTree.tsx +42 -40
  57. package/src/index.ts +2 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pixel-react",
3
3
  "description": "Great for pixel-perfect, design-focused components in React",
4
- "version": "1.5.5",
4
+ "version": "1.5.6",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -0,0 +1,31 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10.5453 15.652C10.2568 15.3525 9.8837 15.1313 9.4568 15.029L7.91394 14.6593V13.7174H6.02987V14.6623L4.49101 15.0299C3.48478 15.2703 2.7749 16.1697 2.7749 17.2042V19.725H6.18598L10.5453 15.652Z" fill="#78D2FA"/>
3
+ <path d="M7.95401 13.7174V14.6847L6.97624 17.0268L5.99951 14.6881V13.7174H7.95401Z" fill="#FFB487"/>
4
+ <path d="M9.0732 10.4723V11.7769C9.0732 12.9367 8.13296 13.8769 6.97312 13.8769C5.81328 13.8769 4.87305 12.9367 4.87305 11.7769V10.4723H9.0732Z" fill="#FFCDAC"/>
5
+ <path d="M9.0732 10.885V10.3794C9.0732 9.21962 8.13296 8.27942 6.97312 8.27942C5.81328 8.27942 4.87305 9.21962 4.87305 10.3794V10.885H6.32066C7.22718 10.885 8.11672 10.6388 8.89432 10.1729" fill="#878791"/>
6
+ <path d="M13.4541 15.652C13.7426 15.3525 14.1157 15.1313 14.5426 15.029L16.0854 14.6593V13.7174H17.9695V14.6623L19.5084 15.0299C20.5146 15.2703 21.2245 16.1697 21.2245 17.2042V19.725H17.8134L13.4541 15.652Z" fill="#A5DC69"/>
7
+ <path d="M10.6856 15.6151L8.53663 16.1301C7.13608 16.4657 6.14844 17.7179 6.14844 19.1581V21.225H17.8436V19.1599C17.8436 17.7189 16.8548 16.4662 15.4532 16.1313L13.3099 15.6193L10.6856 15.6151Z" fill="#FF5A5A"/>
8
+ <path d="M17.9999 13.7174V14.6881L17.0232 17.0268L16.0454 14.6847V13.7174H17.9999Z" fill="#FFB487"/>
9
+ <path d="M12.0002 18.6277L13.3993 15.4511C13.2955 15.2767 13.2363 15.0738 13.2363 14.8589V14.5536H10.7626V14.859C10.7626 15.0735 10.7036 15.2761 10.6001 15.4503L12.0002 18.6277Z" fill="#FFB487"/>
10
+ <path d="M14.9247 9.58215V11.6004C14.9247 13.2158 13.6151 14.5254 11.9997 14.5254C10.3843 14.5254 9.07471 13.2158 9.07471 11.6004V9.58215H14.9247Z" fill="#FFCDAC"/>
11
+ <path d="M11.9997 6.72888C10.3843 6.72888 9.07471 8.03846 9.07471 9.65388V10.358H10.5048C11.4555 10.358 12.3574 9.93708 12.968 9.20842L14.9247 10.358V9.65388C14.9248 8.03846 13.6152 6.72888 11.9997 6.72888Z" fill="#F5B955"/>
12
+ <path d="M14.9263 10.4723V11.7769C14.9263 12.9367 15.8665 13.8769 17.0263 13.8769C18.1862 13.8769 19.1264 12.9367 19.1264 11.7769V10.4723H14.9263Z" fill="#FFCDAC"/>
13
+ <path d="M14.9263 10.885V10.3794C14.9263 9.21962 15.8665 8.27942 17.0263 8.27942C18.1862 8.27942 19.1264 9.21962 19.1264 10.3794V10.885H17.6788C16.7723 10.885 15.8827 10.6388 15.1051 10.1729" fill="#878791"/>
14
+ <path d="M11.9906 20.85C11.8917 20.85 11.7947 20.8901 11.7249 20.9599C11.655 21.0296 11.6147 21.1264 11.6147 21.225C11.6147 21.3236 11.6549 21.4204 11.7249 21.4901C11.7947 21.5599 11.8917 21.6 11.9906 21.6C12.0895 21.6 12.1864 21.5599 12.2563 21.4901C12.3262 21.4204 12.3665 21.3236 12.3665 21.225C12.3665 21.1264 12.3263 21.0296 12.2563 20.9599C12.1864 20.8901 12.0895 20.85 11.9906 20.85Z" fill="black"/>
15
+ <path d="M19.5959 14.6652L18.345 14.3663V13.8701C19.0393 13.4313 19.5018 12.6573 19.5018 11.7769V10.3794C19.5018 9.01469 18.3915 7.90443 17.0267 7.90443C16.2905 7.90443 15.6287 8.22791 15.175 8.73974C14.7775 7.36338 13.5064 6.35388 12.0038 6.35388H12.0038C10.4987 6.35388 9.22588 7.36657 8.83067 8.74631C8.37677 8.23068 7.71256 7.90443 6.97322 7.90443C5.60844 7.90443 4.49814 9.01473 4.49814 10.3794V11.7769C4.49814 12.6573 4.96059 13.4313 5.65494 13.8701V14.3663L4.40402 14.6652C3.224 14.947 2.3999 15.9911 2.3999 17.2042V19.725C2.3999 19.9321 2.56783 20.1 2.7749 20.1H5.77351V21.225C5.77351 21.4321 5.94144 21.6 6.14851 21.6H10.2624C10.4695 21.6 10.6374 21.4321 10.6374 21.225C10.6374 21.0179 10.4695 20.85 10.2624 20.85H8.5883V19.1995C8.5883 18.9924 8.42038 18.8245 8.2133 18.8245C8.00623 18.8245 7.8383 18.9924 7.8383 19.1995V20.85H6.52348V19.1581C6.52348 17.8863 7.38725 16.7911 8.62404 16.4947L10.4684 16.0528L11.6551 18.7526C11.715 18.8888 11.8496 18.9767 11.9984 18.9767H11.9984C12.1471 18.9767 12.2818 18.8888 12.3417 18.7527L13.5272 16.0567L15.3662 16.4961C16.6041 16.7917 17.4686 17.8872 17.4686 19.1598V19.5783C17.4495 19.6234 17.4388 19.6729 17.4388 19.725C17.4388 19.777 17.4495 19.8266 17.4686 19.8716V20.85H16.1615V19.1995C16.1615 18.9924 15.9936 18.8245 15.7865 18.8245C15.5794 18.8245 15.4115 18.9924 15.4115 19.1995V20.85H13.5749C13.3679 20.85 13.1999 21.0179 13.1999 21.225C13.1999 21.4321 13.3679 21.6 13.5749 21.6H17.8436C18.0507 21.6 18.2186 21.4321 18.2186 21.225V20.1H21.2249C21.432 20.1 21.5999 19.9321 21.5999 19.725V17.2042C21.5999 15.9911 20.7758 14.947 19.5959 14.6652ZM17.5958 14.6826L17.0233 16.0535L16.4584 14.7006C16.4599 14.687 16.461 14.6733 16.461 14.6596C16.461 14.6561 16.461 14.6526 16.4609 14.6491V14.1859C16.6427 14.2287 16.832 14.2519 17.0267 14.2519C17.2222 14.2519 17.4124 14.2284 17.5949 14.1853V14.6623C17.5949 14.6691 17.5954 14.6758 17.5958 14.6826ZM10.3106 14.9838C10.0752 14.8378 9.81692 14.7297 9.54422 14.6643L8.28894 14.3635V13.8717C8.60113 13.675 8.86629 13.4105 9.06395 13.099C9.34666 13.6513 9.78058 14.1138 10.3106 14.432V14.9838ZM9.45365 11.6004V10.7331H10.5088C11.466 10.7331 12.3731 10.3548 13.0433 9.68527L14.5516 10.5714V11.6884C14.505 13.0539 13.3804 14.1505 12.0038 14.1505C10.5976 14.1504 9.45365 13.0065 9.45365 11.6004ZM13.6849 14.439C14.2183 14.122 14.6552 13.6591 14.9401 13.1056C15.1373 13.4142 15.4009 13.6763 15.7109 13.8717V14.3635L14.4556 14.6643C14.1812 14.7301 13.9215 14.8392 13.6849 14.9865L13.6849 14.439ZM17.0267 13.5019C16.0755 13.5019 15.3016 12.7281 15.3016 11.7769V11.7157C15.3029 11.6775 15.3038 10.7074 15.3038 10.7074C16.0411 11.07 16.8538 11.26 17.6792 11.26H18.7518V11.777C18.7517 12.7281 17.9779 13.5019 17.0267 13.5019ZM17.0267 8.65443C17.9779 8.65443 18.7517 9.42828 18.7517 10.3794V10.4723V10.51H17.6791C16.8689 10.51 16.0727 10.2972 15.3711 9.89399C15.5813 9.17842 16.2439 8.65443 17.0267 8.65443ZM9.45365 9.65392C9.45365 8.24782 10.5976 7.10392 12.0038 7.10392C13.4099 7.10392 14.5538 8.24786 14.5538 9.65392V9.70282L13.162 8.88513C13.0041 8.79232 12.8023 8.82723 12.6847 8.96759C12.1439 9.61289 11.3509 9.98302 10.5089 9.98302H9.45365V9.65392ZM5.24806 10.3794C5.24806 9.42824 6.02195 8.65443 6.97314 8.65443C7.75588 8.65443 8.4185 9.17842 8.62869 9.89403C7.92703 10.2972 7.1309 10.51 6.32064 10.51H5.24806V10.4723V10.3794ZM5.24806 11.26H6.32068C7.14688 11.26 7.96044 11.0696 8.69822 10.7064V11.7769C8.69822 12.7281 7.92433 13.5019 6.97314 13.5019C6.02195 13.5019 5.24806 12.7281 5.24806 11.7769V11.26ZM6.97314 14.2519C7.16784 14.2519 7.35707 14.2286 7.53894 14.1859V14.6386C7.53853 14.6456 7.53834 14.6527 7.53834 14.6597C7.53834 14.6715 7.53947 14.6833 7.54059 14.695L6.97322 16.0535L6.4037 14.6893C6.40434 14.6803 6.40487 14.6714 6.40487 14.6623V14.1854C6.58745 14.2284 6.77758 14.2519 6.97314 14.2519ZM5.77351 19.1581V19.35H4.6499V17.6839C4.6499 17.4768 4.48198 17.3089 4.2749 17.3089C4.06783 17.3089 3.8999 17.4768 3.8999 17.6839V19.35H3.1499V17.2042C3.1499 16.3396 3.73723 15.5955 4.57817 15.3946L5.76684 15.1107L6.54264 16.969C6.05743 17.5717 5.77351 18.3358 5.77351 19.1581ZM8.44929 15.7654C8.22785 15.8185 8.01624 15.8923 7.81531 15.9834L8.18056 15.1088L9.36943 15.3937C9.46164 15.4158 9.55149 15.445 9.63845 15.4804L8.44929 15.7654ZM11.9985 17.67L11.0606 15.5363V14.7629C11.3596 14.8522 11.6761 14.9004 12.0037 14.9004C12.327 14.9004 12.6395 14.8535 12.9349 14.7664V15.5405L11.9985 17.67ZM14.3545 15.4833C14.4436 15.4465 14.5357 15.4164 14.6304 15.3937L15.8164 15.1095L16.1831 15.988C15.9796 15.8953 15.7651 15.8203 15.5404 15.7666L14.3545 15.4833ZM20.8499 19.35H20.0999V17.6839C20.0999 17.4768 19.932 17.3089 19.7249 17.3089C19.5178 17.3089 19.3499 17.4768 19.3499 17.6839V19.35H18.2186V19.1599C18.2186 18.3387 17.9357 17.5757 17.4518 16.9734L18.2301 15.11L19.4216 15.3946C20.2626 15.5955 20.8499 16.3396 20.8499 17.2042V19.35Z" fill="black"/>
16
+ <path d="M10.7426 11.0719C10.6437 11.0719 10.5467 11.112 10.4768 11.1818C10.4069 11.2515 10.3667 11.3483 10.3667 11.4469C10.3667 11.5455 10.4069 11.6423 10.4768 11.712C10.5468 11.7818 10.6437 11.8219 10.7426 11.8219C10.8418 11.8219 10.9384 11.7818 11.0083 11.712C11.0786 11.6423 11.1184 11.5455 11.1184 11.4469C11.1184 11.3483 11.0786 11.2515 11.0083 11.1818C10.9384 11.112 10.8414 11.0719 10.7426 11.0719Z" fill="black"/>
17
+ <path d="M13.2504 11.8219C13.3492 11.8219 13.4462 11.7818 13.5161 11.712C13.5864 11.6423 13.6262 11.5455 13.6262 11.4469C13.6262 11.3483 13.5864 11.2515 13.5161 11.1818C13.4462 11.112 13.3492 11.0719 13.2504 11.0719C13.1515 11.0719 13.0546 11.112 12.9846 11.1818C12.9147 11.2515 12.8745 11.3483 12.8745 11.4469C12.8745 11.5455 12.9147 11.6423 12.9846 11.712C13.0546 11.7818 13.1515 11.8219 13.2504 11.8219Z" fill="black"/>
18
+ <path d="M12.7217 12.4441C12.5752 12.2976 12.3378 12.2976 12.1913 12.4441C12.0804 12.5549 11.9 12.5549 11.7891 12.4441C11.6426 12.2976 11.4053 12.2976 11.2588 12.4441C11.1123 12.5905 11.1123 12.8279 11.2588 12.9744C11.4604 13.1761 11.7253 13.2769 11.9902 13.2769C12.2551 13.2769 12.52 13.1761 12.7216 12.9744C12.8681 12.8279 12.8681 12.5905 12.7217 12.4441Z" fill="black"/>
19
+ <path d="M17.6479 5.17505H17.9052C18.1122 5.17505 18.2802 5.00716 18.2802 4.80005C18.2802 4.59294 18.1122 4.42505 17.9052 4.42505H17.6479C17.4409 4.42505 17.2729 4.59294 17.2729 4.80005C17.2729 5.00716 17.4409 5.17505 17.6479 5.17505Z" fill="black"/>
20
+ <path d="M19.4673 5.17505H19.7245C19.9316 5.17505 20.0995 5.00716 20.0995 4.80005C20.0995 4.59294 19.9316 4.42505 19.7245 4.42505H19.4673C19.2602 4.42505 19.0923 4.59294 19.0923 4.80005C19.0923 5.00716 19.2602 5.17505 19.4673 5.17505Z" fill="black"/>
21
+ <path d="M18.6874 6.21339C18.8949 6.21339 19.0633 6.0455 19.0633 5.83839V5.58118C19.0633 5.37406 18.8949 5.20618 18.6874 5.20618C18.4798 5.20618 18.3115 5.37406 18.3115 5.58118V5.83839C18.3115 6.0455 18.4798 6.21339 18.6874 6.21339Z" fill="black"/>
22
+ <path d="M18.6874 4.39381C18.8949 4.39381 19.0633 4.22592 19.0633 4.01881V3.7616C19.0633 3.55448 18.8949 3.3866 18.6874 3.3866C18.4798 3.3866 18.3115 3.55448 18.3115 3.7616V4.01881C18.3115 4.22592 18.4798 4.39381 18.6874 4.39381Z" fill="black"/>
23
+ <path d="M4.25391 5.17505H4.51108C4.71816 5.17505 4.88608 5.00716 4.88608 4.80005C4.88608 4.59294 4.71816 4.42505 4.51108 4.42505H4.25391C4.04683 4.42505 3.87891 4.59294 3.87891 4.80005C3.87891 5.00716 4.04683 5.17505 4.25391 5.17505Z" fill="black"/>
24
+ <path d="M6.07324 5.17505H6.33042C6.53749 5.17505 6.70542 5.00716 6.70542 4.80005C6.70542 4.59294 6.53749 4.42505 6.33042 4.42505H6.07324C5.86617 4.42505 5.69824 4.59294 5.69824 4.80005C5.69824 5.00716 5.86613 5.17505 6.07324 5.17505Z" fill="black"/>
25
+ <path d="M5.29286 6.21339C5.50041 6.21339 5.66873 6.0455 5.66873 5.83839V5.58118C5.66873 5.37406 5.50041 5.20618 5.29286 5.20618C5.08531 5.20618 4.91699 5.37406 4.91699 5.58118V5.83839C4.91699 6.0455 5.08527 6.21339 5.29286 6.21339Z" fill="black"/>
26
+ <path d="M5.29286 4.39381C5.50041 4.39381 5.66873 4.22592 5.66873 4.01881V3.7616C5.66873 3.55448 5.50041 3.3866 5.29286 3.3866C5.08531 3.3866 4.91699 3.55448 4.91699 3.7616V4.01881C4.91699 4.22592 5.08527 4.39381 5.29286 4.39381Z" fill="black"/>
27
+ <path d="M12.0004 5.56487C12.2079 5.56487 12.3762 5.39698 12.3762 5.18987V4.20325C12.3762 3.99613 12.2079 3.82825 12.0004 3.82825C11.7928 3.82825 11.6245 3.99613 11.6245 4.20325V5.18987C11.6245 5.39698 11.7928 5.56487 12.0004 5.56487Z" fill="black"/>
28
+ <path d="M12.0004 3.15002C12.0992 3.15002 12.1962 3.1099 12.2661 3.04015C12.336 2.9704 12.3762 2.87365 12.3762 2.77502C12.3762 2.6764 12.336 2.57965 12.2661 2.5099C12.1962 2.44015 12.0992 2.40002 12.0004 2.40002C11.9015 2.40002 11.8046 2.44015 11.7346 2.5099C11.6647 2.57965 11.6245 2.6764 11.6245 2.77502C11.6245 2.87365 11.6647 2.9704 11.7346 3.04015C11.8046 3.1099 11.9015 3.15002 12.0004 3.15002Z" fill="black"/>
29
+ <path d="M10.1552 4.43482C10.2285 4.50805 10.3244 4.54465 10.4204 4.54465C10.5163 4.54465 10.6123 4.50805 10.6855 4.43482C10.832 4.28838 10.832 4.05093 10.6855 3.90445L10.1368 3.35568C9.9903 3.20924 9.75292 3.20924 9.60641 3.35568C9.45997 3.50212 9.45997 3.73957 9.60641 3.88604L10.1552 4.43482Z" fill="black"/>
30
+ <path d="M13.5606 4.54236C13.6566 4.54236 13.7525 4.50576 13.8257 4.43252L14.3929 3.86541C14.5393 3.71897 14.5393 3.48152 14.3929 3.33505C14.2464 3.18861 14.009 3.18861 13.8625 3.33505L13.2954 3.90216C13.1489 4.0486 13.1489 4.28605 13.2954 4.43252C13.3687 4.50576 13.4646 4.54236 13.5606 4.54236Z" fill="black"/>
31
+ </svg>
@@ -93,6 +93,7 @@ $expandable-menu-option-bg: #610b861a;
93
93
  $file-dropzone-default-color: #71347b1a;
94
94
  $file-dropzone-selected-color: #71347b33;
95
95
  $file-details-container-shadow: #1e161f29;
96
+ $excel-toolbar-divider: #57575733;
96
97
  $file-details-bg: #ffffff;
97
98
 
98
99
  $variable-dropdown-bg: #ffffff;
@@ -70,7 +70,7 @@
70
70
  background-color: var(--secondary-icon-color);
71
71
  color: var(--primary-icon-color);
72
72
  .ff-projects-search {
73
- width: 99%;
73
+ width: 100%;
74
74
  margin-bottom: 1px;
75
75
  input {
76
76
  height: 30px;
@@ -9,7 +9,7 @@
9
9
  --rdp-day-height: 24px;
10
10
  --rdp-day-width: 36px;
11
11
  @include fonts.fontPoppins(12px);
12
- --rdp-font-family: 'Poppins';
12
+ --rdp-font-family: 'Poppins', sans-serif;
13
13
  }
14
14
 
15
15
  .ff-cursor-pointer {
@@ -48,7 +48,8 @@
48
48
  .ff-calendar-icon,
49
49
  .ff-clock-icon {
50
50
  position: absolute;
51
- transform: translate(50%, 50%);
51
+ top: 50%;
52
+ transform: translate(25%, -50%);
52
53
  display: flex;
53
54
  align-items: center;
54
55
  pointer-events: none;
@@ -118,7 +119,7 @@
118
119
  border: 1px solid var(--border-color);
119
120
  background-color: var(--toggle-button-bg-color);
120
121
  box-shadow: 0 -2px 2px 0 var(--ff-mini-modal-box-shadow);
121
- padding: 4px;
122
+ padding: 0px;
122
123
  border-radius: 30%;
123
124
  cursor: pointer;
124
125
 
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import type { Meta, StoryObj } from '@storybook/react';
2
3
  import CustomDatePicker from './DatePicker';
3
4
  import { useState } from 'react';
@@ -36,7 +37,7 @@ const meta: Meta<typeof CustomDatePicker> = {
36
37
  },
37
38
  onChange: {
38
39
  description: 'Function to handle date selection',
39
- action: 'changed',
40
+ action: 'changed',
40
41
  },
41
42
  placeholder: {
42
43
  description: 'Placeholder text for the input field',
@@ -60,14 +61,15 @@ const meta: Meta<typeof CustomDatePicker> = {
60
61
  },
61
62
  calendarWidth: {
62
63
  description: 'Custom width for the calendar in pixel',
63
- control: "number"
64
+ control: 'number',
64
65
  },
65
66
  error: {
66
67
  description: 'Displays the input field in an error state',
67
68
  control: 'boolean',
68
69
  },
69
70
  helperText: {
70
- description: 'Helper text to show below the input, often used for error messages',
71
+ description:
72
+ 'Helper text to show below the input, often used for error messages',
71
73
  control: 'text',
72
74
  },
73
75
  },
@@ -82,14 +84,8 @@ export const Default: Story = {
82
84
  render: (args) => {
83
85
  const [date, setDate] = useState<Date | undefined>();
84
86
 
85
- return(
86
- <CustomDatePicker
87
- {...args}
88
- value={date}
89
- onChange={setDate}
90
- />
91
- )
92
- }
87
+ return <CustomDatePicker {...args} value={date} onChange={setDate} />;
88
+ },
93
89
  };
94
90
 
95
91
  // Start Date Filter story
@@ -102,7 +98,7 @@ export const StartDateFilter: Story = {
102
98
  {...args}
103
99
  value={startDate}
104
100
  onChange={setStartDate}
105
- calendarWidth = {240}
101
+ calendarWidth={240}
106
102
  maxDate={new Date()} // Disable future dates for start date picker
107
103
  />
108
104
  );
@@ -143,7 +139,7 @@ export const EndDateInput: Story = {
143
139
  export const ScheduleDateInput: Story = {
144
140
  args: {
145
141
  error: false,
146
- helperText: "Error"
142
+ helperText: 'Error',
147
143
  },
148
144
 
149
145
  render: (args) => {
@@ -157,5 +153,22 @@ export const ScheduleDateInput: Story = {
157
153
  minDate={new Date()} // Set minimum date to today
158
154
  />
159
155
  );
160
- }
156
+ },
157
+ };
158
+
159
+ export const Dateonly: Story = {
160
+ render: (args) => {
161
+ const [selectedDate, setSelectDate] = useState<Date | undefined>();
162
+
163
+ console.log(selectedDate);
164
+ return (
165
+ <CustomDatePicker
166
+ {...args}
167
+ value={selectedDate}
168
+ onChange={setSelectDate}
169
+ calendarWidth={240}
170
+ dateOnly
171
+ />
172
+ );
173
+ },
161
174
  };
@@ -26,6 +26,7 @@ const CustomDatePicker: React.FC<DatePickerProps> = ({
26
26
  timeFormat = 'hh:mm a',
27
27
  error,
28
28
  helperText = '',
29
+ dateOnly = false,
29
30
  }) => {
30
31
  const [timeValue, setTimeValue] = useState<string>('');
31
32
  const [selectedDate, setSelectedDate] = useState<Date | undefined>();
@@ -121,17 +122,23 @@ const CustomDatePicker: React.FC<DatePickerProps> = ({
121
122
  };
122
123
 
123
124
  const handleDaySelect = (date: Date | undefined) => {
124
- if (!timeValue || !date) {
125
- // if need to set time to current time in case no time selected
126
- const now = new Date();
127
- date?.setHours(now.getHours(), now.getMinutes(), now.getSeconds());
128
-
125
+ if (dateOnly) {
129
126
  setSelectedDate(date);
127
+ onChange(date);
128
+ resetAndCloseDatePicker();
130
129
  } else {
131
- const [hoursStr, minutesStr] = timeValue.split(':');
132
- date.setHours(parseInt(hoursStr ? hoursStr : '0', 10) || 0);
133
- date.setMinutes(parseInt(minutesStr ? minutesStr : '0', 10) || 0);
134
- setSelectedDate(date);
130
+ if (!timeValue || !date) {
131
+ // if need to set time to current time in case no time selected
132
+ const now = new Date();
133
+ date?.setHours(now.getHours(), now.getMinutes(), now.getSeconds());
134
+
135
+ setSelectedDate(date);
136
+ } else {
137
+ const [hoursStr, minutesStr] = timeValue.split(':');
138
+ date.setHours(parseInt(hoursStr ? hoursStr : '0', 10) || 0);
139
+ date.setMinutes(parseInt(minutesStr ? minutesStr : '0', 10) || 0);
140
+ setSelectedDate(date);
141
+ }
135
142
  }
136
143
  };
137
144
 
@@ -273,7 +280,7 @@ const CustomDatePicker: React.FC<DatePickerProps> = ({
273
280
  onClick={onClick}
274
281
  disabled={disabled}
275
282
  >
276
- <Icon name="left_arrow_icon" height={12} width={12} />
283
+ <Icon name="left_arrow_icon" height={20} width={20} />
277
284
  </button>
278
285
  );
279
286
  };
@@ -287,7 +294,7 @@ const CustomDatePicker: React.FC<DatePickerProps> = ({
287
294
  onClick={onClick}
288
295
  disabled={disabled}
289
296
  >
290
- <Icon name="right_arrow_icon" height={12} width={12} />
297
+ <Icon name="right_arrow_icon" height={20} width={20} />
291
298
  </button>
292
299
  );
293
300
  };
@@ -340,22 +347,24 @@ const CustomDatePicker: React.FC<DatePickerProps> = ({
340
347
  )}
341
348
  </div>
342
349
 
343
- <div className="ff-input-with-icon ff-time-input-field">
344
- <Icon
345
- name={'clock_icon'}
346
- hoverEffect={false}
347
- className="ff-clock-icon"
348
- />
349
- <input
350
- type="text"
351
- placeholder="Select time"
352
- className="ff-time-input"
353
- value={value ? formatInTimeZone(value, timezone, timeFormat) : ''}
354
- disabled={disabled}
355
- onClick={handleDateInputClick}
356
- readOnly
357
- />
358
- </div>
350
+ {!dateOnly && (
351
+ <div className="ff-input-with-icon ff-time-input-field">
352
+ <Icon
353
+ name={'clock_icon'}
354
+ hoverEffect={false}
355
+ className="ff-clock-icon"
356
+ />
357
+ <input
358
+ type="text"
359
+ placeholder="Select time"
360
+ className="ff-time-input"
361
+ value={value ? formatInTimeZone(value, timezone, timeFormat) : ''}
362
+ disabled={disabled}
363
+ onClick={handleDateInputClick}
364
+ readOnly
365
+ />
366
+ </div>
367
+ )}
359
368
  </div>
360
369
 
361
370
  {isPickerOpen && (
@@ -406,29 +415,33 @@ const CustomDatePicker: React.FC<DatePickerProps> = ({
406
415
  : {}),
407
416
  }}
408
417
  />
409
- <TimePicker
410
- value={timeValue}
411
- onChange={handleTimeChange}
412
- minTime={minTime}
413
- maxTime={maxTime}
414
- onErrorChange={setTimeError}
415
- />
416
- </div>
417
- <div className="ff-date-picker-controls">
418
- <Button
419
- className="ff-date-picker-button"
420
- variant="secondary"
421
- onClick={handleCancel}
422
- label="Cancel"
423
- />
424
- <Button
425
- className="ff-date-picker-button"
426
- variant="primary"
427
- onClick={handleSave}
428
- label="Save"
429
- disabled={timeError}
430
- />
418
+ {!dateOnly && (
419
+ <TimePicker
420
+ value={timeValue}
421
+ onChange={handleTimeChange}
422
+ minTime={minTime}
423
+ maxTime={maxTime}
424
+ onErrorChange={setTimeError}
425
+ />
426
+ )}
431
427
  </div>
428
+ {!dateOnly && (
429
+ <div className="ff-date-picker-controls">
430
+ <Button
431
+ className="ff-date-picker-button"
432
+ variant="secondary"
433
+ onClick={handleCancel}
434
+ label="Cancel"
435
+ />
436
+ <Button
437
+ className="ff-date-picker-button"
438
+ variant="primary"
439
+ onClick={handleSave}
440
+ label="Save"
441
+ disabled={timeError}
442
+ />
443
+ </div>
444
+ )}
432
445
  </div>
433
446
  )}
434
447
  </div>
@@ -58,6 +58,11 @@ export interface DatePickerProps {
58
58
  * Helper text to display below the input field, used for error messages or instructions.
59
59
  */
60
60
  helperText?: string | undefined;
61
+
62
+ /**
63
+ * Select only date .
64
+ */
65
+ dateOnly?: boolean;
61
66
  }
62
67
 
63
68
  export type DateValue = Date | undefined;
@@ -1,8 +1,12 @@
1
- .color-bar {
1
+ .ff-excel-color-selector {
2
+ position: absolute;
2
3
  background-color: var(--error_light);
3
- width: 100%;
4
- height: 4px;
5
- .colorPicker {
4
+ width: 14px;
5
+ height: 3px;
6
+ bottom: 3px;
7
+ z-index: 200;
8
+ cursor: pointer;
9
+ .ff-excel-color-selector-picker {
6
10
  width: 100%;
7
11
  height: 0;
8
12
  padding: 0;
@@ -20,7 +20,7 @@ const ColorBarSelector: React.FC<ColorBarSelectorProps> = ({
20
20
 
21
21
  return (
22
22
  <div
23
- className="color-bar"
23
+ className="ff-excel-color-selector"
24
24
  style={{
25
25
  backgroundColor: `${color}`,
26
26
  }}
@@ -29,7 +29,7 @@ const ColorBarSelector: React.FC<ColorBarSelectorProps> = ({
29
29
  <input
30
30
  type="color"
31
31
  disabled={disabled}
32
- className="colorPicker"
32
+ className="ff-excel-color-selector-picker"
33
33
  ref={colorInputRef}
34
34
  onChange={(e) => {
35
35
  setColor(e.target.value);
@@ -1,39 +1,27 @@
1
- @use '../../../assets/styles/fonts';
1
+ .ff-excel-menu {
2
+ position: absolute;
3
+ border: 1px solid var(--option-card-border-color);
4
+ background: var(--option-card-bg-color);
5
+ border-radius: 4px;
6
+ margin: 2px;
7
+ min-height: 32px;
8
+ min-width: 111px;
9
+ white-space: nowrap;
10
+ z-index: 100;
2
11
 
3
-
4
- .ff-option-card {
5
- position: absolute;
6
- border: 1px solid var(--option-card-border-color);
7
- background: var(--option-card-bg-color);
8
- border-radius: 4px;
9
- margin: 2px;
10
- min-height: 32px;
11
- min-width: 111px;
12
- white-space: nowrap;
13
- z-index: 100;
14
-
15
- .ff-options {
16
- @extend .fontSm;
17
- cursor: pointer;
18
- border-radius: 4px;
19
- display: flex;
20
- align-items: center;
21
- padding: 8px;
22
- line-height: 16px;
23
- gap: 8px;
24
- &:hover {
25
- background-color: var(--hover-color);
26
- }
27
- label {
28
- cursor: pointer;
29
- }
12
+ .ff-excel-menu-options {
13
+ color: var(--text-color);
14
+ cursor: pointer;
15
+ border-radius: 3px;
16
+ display: flex;
17
+ align-items: center;
18
+ padding: 4px;
19
+ gap: 8px;
20
+ &:hover {
21
+ background-color: var(--hover-color);
30
22
  }
31
-
32
- .ff-disable-option {
33
- opacity: 0.5;
34
- cursor: no-drop;
35
- label {
36
- cursor: no-drop;
37
- }
23
+ label {
24
+ cursor: pointer;
38
25
  }
39
26
  }
27
+ }
@@ -1,30 +1,21 @@
1
1
  import Icon from '../../Icon';
2
2
  import './ExcelContextMenu.scss';
3
3
  import Typography from '../../Typography';
4
- import * as Matrix from '../ExcelFile/ExcelFileComponents/matrix';
5
- import {
6
- CellBase,
7
- ContextMenuState,
8
- } from '../ExcelFile/ExcelFileComponents/types';
4
+ import { ContextMenuState } from '../ExcelFile/ExcelFileComponents/types';
9
5
 
10
6
  type ExcelContextMenuProps = {
11
- data: Matrix.Matrix<CellBase>;
12
7
  contextMenu: ContextMenuState;
13
- addRowTop: (data: Matrix.Matrix<CellBase>) => void;
14
- addColumnLeft: (data: Matrix.Matrix<CellBase>) => void;
15
- deleteRow: (data: Matrix.Matrix<CellBase>) => void;
16
- deleteColumn: (data: Matrix.Matrix<CellBase>) => void;
17
8
  };
18
9
 
19
10
  const ExcelContextMenu: React.FC<ExcelContextMenuProps> = ({ contextMenu }) => {
20
11
  return (
21
12
  <div
22
- className="ff-option-card"
13
+ className="ff-excel-menu"
23
14
  style={{ left: contextMenu.position.x, top: contextMenu.position.y }}
24
15
  >
25
16
  {contextMenu.options.map((option) => (
26
17
  <div
27
- className={'ff-options'}
18
+ className={'ff-excel-menu-options'}
28
19
  onClick={() => {
29
20
  option.action();
30
21
  }}
@@ -1,31 +1,41 @@
1
- .excel-page {
1
+ .ff-excel-page {
2
2
  width: 100%;
3
3
  display: flex;
4
+ margin-top: 40px;
4
5
  flex-direction: column;
5
6
  align-items: center;
6
7
 
7
- .excel-book {
8
+ .ff-excel-book {
8
9
  position: relative;
9
10
  width: 100%;
10
- .excel-sheet {
11
- overflow: auto;
12
- scrollbar-width: thin;
13
- }
14
11
 
15
- .sheet-bar {
16
- margin-top: 5px;
17
- padding: 0p 20px;
12
+ // .ff-excel-sheet { TODO
13
+ // overflow: auto;
14
+ // scrollbar-width: none;
15
+ // &::-webkit-scrollbar {
16
+ // height: 0px;
17
+ // }
18
+ // }
19
+
20
+ .ff-excel-sheet-bar {
21
+ margin-left: 83px;
22
+ display: flex;
23
+ height: 36px;
18
24
  align-items: center;
19
- .add-sheet-icon {
20
- display: flex;
21
- align-items: start;
22
- justify-content: center;
25
+ color: var(--brand2-color);
26
+ margin-top: -2px;
27
+ box-shadow: 0px 0px 4px -1px var(--toggle-strip-shadow);
28
+
29
+ .ff-excel-add-sheet-icon {
30
+ padding: 4px 6px;
23
31
  }
24
- .excel-tab-container {
32
+ .ff-excel-tab-container {
33
+ height: 36px;
34
+ width: 860px;
25
35
  display: flex;
26
36
  overflow-x: auto;
27
37
  align-items: center;
28
- scrollbar-width: thin;
38
+ scrollbar-width: none;
29
39
  scrollbar-color: var(--hover-color) transparent;
30
40
  &::-webkit-scrollbar-track {
31
41
  background-color: transparent;
@@ -33,12 +43,15 @@
33
43
  &::-webkit-scrollbar-thumb {
34
44
  border-radius: 5px;
35
45
  }
36
- .excel-tab-list {
37
- padding: 10px 20px;
46
+ &::-webkit-scrollbar {
47
+ height: 0px;
48
+ }
49
+ .ff-excel-tab-list {
50
+ margin-top: 2px;
51
+ padding: 10px 9px;
38
52
  min-width: max-content;
39
53
  cursor: pointer;
40
54
  display: flex;
41
- font-weight: bold;
42
55
  background-color: var(--hover-color);
43
56
  &.active {
44
57
  background-color: var(--excel-sheet-button-color);
@@ -53,10 +66,3 @@
53
66
  }
54
67
  }
55
68
  }
56
- .menu-list {
57
- display: flex;
58
- align-items: center;
59
- .menu-title {
60
- padding-left: 5px;
61
- }
62
- }