pixel-react 1.4.7 → 1.4.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/components/Form/Forms.d.ts +3 -1
  3. package/lib/components/Input/Input.d.ts +1 -1
  4. package/lib/components/Input/types.d.ts +4 -0
  5. package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +0 -2
  6. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +0 -1
  7. package/lib/components/Select/Select.stories.d.ts +0 -1
  8. package/lib/components/TableTree/TableTree.d.ts +2 -1
  9. package/lib/index.d.ts +10 -3
  10. package/lib/index.esm.js +131 -93
  11. package/lib/index.esm.js.map +1 -1
  12. package/lib/index.js +131 -93
  13. package/lib/index.js.map +1 -1
  14. package/package.json +1 -1
  15. package/src/assets/Themes/BaseTheme.scss +2 -0
  16. package/src/assets/fonts/Poppins-Bold.woff2 +0 -0
  17. package/src/assets/fonts/Poppins-Medium.woff2 +0 -0
  18. package/src/assets/fonts/Poppins-Regular.woff2 +0 -0
  19. package/src/assets/fonts/Poppins-SemiBold.woff2 +0 -0
  20. package/src/assets/icons/Header_preset.svg +13 -0
  21. package/src/assets/icons/add_file.svg +16 -4
  22. package/src/assets/icons/eye_open_icon.svg +2 -9
  23. package/src/assets/icons/replace_icon.svg +6 -0
  24. package/src/assets/styles/_fonts.scss +7 -4
  25. package/src/components/AppHeader/AppHeader.tsx +1 -0
  26. package/src/components/AttachmentButton/AttachmentButton.tsx +10 -5
  27. package/src/components/Form/Form.stories.tsx +4 -8
  28. package/src/components/Form/Forms.tsx +11 -4
  29. package/src/components/Icon/iconList.ts +7 -1
  30. package/src/components/Input/Input.scss +5 -0
  31. package/src/components/Input/Input.stories.tsx +44 -0
  32. package/src/components/Input/Input.tsx +24 -19
  33. package/src/components/Input/types.ts +4 -0
  34. package/src/components/MenuOption/MenuOption.tsx +5 -5
  35. package/src/components/TableTree/TableTree.scss +22 -7
  36. package/src/components/TableTree/TableTree.stories.tsx +41 -0
  37. package/src/components/TableTree/TableTree.tsx +55 -18
  38. package/src/components/Typography/Typography.scss +4 -4
  39. package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
  40. package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
  41. package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
  42. package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
  43. package/lib/components/AddButton/AddButton.d.ts +0 -5
  44. package/lib/components/AddButton/AddButton.stories.d.ts +0 -6
  45. package/lib/components/AddButton/index.d.ts +0 -1
  46. package/lib/components/AddButton/types.d.ts +0 -4
  47. package/lib/components/AttachImage/AttachImage.stories.d.ts +0 -7
  48. package/lib/components/Charts/BarChart/BarChart.stories.d.ts +0 -6
  49. package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +0 -8
  50. package/lib/components/Charts/LineChart/LineChart.stories.d.ts +0 -7
  51. package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +0 -8
  52. package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +0 -6
  53. package/lib/components/EditTextField/EditTextField.stories.d.ts +0 -10
  54. package/lib/components/Editor/Editor.stories.d.ts +0 -6
  55. package/lib/components/Excel/ContextMenu/ContextMenu.d.ts +0 -4
  56. package/lib/components/Excel/ExcelFile.stories.d.ts +0 -6
  57. package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +0 -14
  58. package/lib/components/ExcelFile/ImportExcelStyles.d.ts +0 -24
  59. package/lib/components/StatusCard/StatusCard.stories.d.ts +0 -11
  60. package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +0 -10
  61. /package/lib/components/ExcelFile/{ColorBarSelector → ColorBarselector}/ColorBarSelector.d.ts +0 -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.4.7",
4
+ "version": "1.4.8",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
7
7
  "types": "lib/index.d.ts",
@@ -249,6 +249,8 @@ $base-theme: (
249
249
  icon-hover-color: #f7ecf8,
250
250
  ff-search-icon-hover-color: #f7ecf8,
251
251
  ff-search-filed-bg-color: #ffffff,
252
+
253
+ ff-filter-toggle-button-bg-primary:linear-gradient(90deg, #71347b 0%, #9c1ebb 100%),
252
254
  );
253
255
 
254
256
  :root {
@@ -0,0 +1,13 @@
1
+ <svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M97.5 22.4999H82.5C79.7422 22.4917 77.5083 20.2579 77.5001 17.5V2.5L97.5 22.4999Z" fill="#4A1353"/>
3
+ <path d="M97.5 22.4999V112.5C97.4918 115.258 95.258 117.492 92.5001 117.5H12.4999C9.74203 117.492 7.5082 115.258 7.5 112.5V7.49992C7.5082 4.74203 9.74203 2.5082 12.4999 2.5H77.4998V17.5C77.5083 20.2579 79.7421 22.4917 82.5 22.4999H97.5Z" fill="white"/>
4
+ <path d="M82.5 100C99.0685 100 112.5 86.5685 112.5 70C112.5 53.4315 99.0685 40 82.5 40C65.9315 40 52.5 53.4315 52.5 70C52.5 86.5685 65.9315 100 82.5 100Z" fill="#FDFAFF"/>
5
+ <path d="M95.0717 58.5713H74.5002C72.6067 58.5713 71.0717 60.1063 71.0717 61.9999V82.5713C71.0717 84.4648 72.6067 85.9999 74.5002 85.9999H95.0717C96.9652 85.9999 98.5002 84.4648 98.5002 82.5713V61.9999C98.5002 60.1063 96.9652 58.5713 95.0717 58.5713Z" fill="#9D34AE"/>
6
+ <path d="M90.5001 54H69.9287C68.0351 54 66.5001 55.535 66.5001 57.4286V78C66.5001 79.8935 68.0351 81.4286 69.9287 81.4286H90.5001C92.3937 81.4286 93.9287 79.8935 93.9287 78V57.4286C93.9287 55.535 92.3937 54 90.5001 54Z" fill="#71347B"/>
7
+ <path d="M87.0717 66.5715H81.3575V60.8572C81.3575 60.5541 81.237 60.2634 81.0227 60.0491C80.8084 59.8348 80.5177 59.7144 80.2146 59.7144C79.9115 59.7144 79.6208 59.8348 79.4065 60.0491C79.1922 60.2634 79.0717 60.5541 79.0717 60.8572V66.5715H73.3575C73.0544 66.5715 72.7637 66.6919 72.5493 66.9062C72.335 67.1206 72.2146 67.4113 72.2146 67.7144C72.2146 68.0175 72.335 68.3082 72.5493 68.5225C72.7637 68.7368 73.0544 68.8572 73.3575 68.8572H79.0717V74.5715C79.0717 74.8746 79.1922 75.1653 79.4065 75.3796C79.6208 75.5939 79.9115 75.7144 80.2146 75.7144C80.5177 75.7144 80.8084 75.5939 81.0227 75.3796C81.237 75.1653 81.3575 74.8746 81.3575 74.5715V68.8572H87.0717C87.3748 68.8572 87.6655 68.7368 87.8799 68.5225C88.0942 68.3082 88.2146 68.0175 88.2146 67.7144C88.2146 67.4113 88.0942 67.1206 87.8799 66.9062C87.6655 66.6919 87.3748 66.5715 87.0717 66.5715Z" fill="#F5F5F5"/>
8
+ <path d="M19.9999 15H45V19.9999H19.9999V15Z" fill="#71347B"/>
9
+ <path d="M19.9999 25H24.9998V29.9999H19.9999V25Z" fill="#71347B"/>
10
+ <path d="M30 25H34.9999V29.9999H30V25Z" fill="#71347B"/>
11
+ <path d="M94.9999 112.5C94.9999 113.881 93.8805 115 92.4998 115H12.4999C11.1192 115 9.9998 113.881 9.9998 112.5V7.5C9.9998 6.1193 11.1192 4.99992 12.4999 4.99992H75V17.4998C75 21.642 78.3578 24.9998 82.5 24.9998H87.4999V19.9999H82.5C81.1192 19.9999 79.9999 18.8805 79.9999 17.4998V8.535L94.9999 23.535V32.5001H99.9998V22.5C99.9996 21.837 99.7361 21.2013 99.2674 20.7326L79.2675 0.732422C78.7987 0.263438 78.1628 0 77.5 0H12.4999C8.35777 0 4.99988 3.35789 4.99988 7.5V112.5C4.99988 116.642 8.35777 120 12.4999 120H92.4998C96.6419 120 99.9998 116.642 99.9998 112.5V107.5H94.9999V112.5Z" fill="#71347B"/>
12
+ <path d="M82.5 37.5C64.5508 37.5 49.9999 52.0507 49.9999 70.0001C49.9999 87.9495 64.5508 102.5 82.5 102.5C100.449 102.5 115 87.9492 115 69.9998C114.979 52.0594 100.441 37.5206 82.5 37.5ZM82.5 97.5C67.3122 97.5 55 85.1878 55 70.0001C55 54.8123 67.3122 42.4999 82.5 42.4999C97.6877 42.4999 110 54.8121 110 69.9998C109.982 85.1803 97.6804 97.4822 82.5 97.5Z" fill="#71347B"/>
13
+ </svg>
@@ -1,5 +1,17 @@
1
- <svg width="16" height="16" viewBox="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd"
3
- d="M16.1307 9.4822C16.6597 9.4822 17.0885 9.05336 17.0885 8.52434C17.0885 7.99533 16.6597 7.56648 16.1307 7.56648L9.95786 7.56648L9.95786 1.39368C9.95786 0.864669 9.52901 0.435821 9 0.435821C8.47099 0.435821 8.04214 0.864669 8.04214 1.39368L8.04214 7.56648L1.86934 7.56648C1.34033 7.56648 0.911477 7.99533 0.911477 8.52434C0.911477 9.05336 1.34032 9.4822 1.86934 9.4822L8.04214 9.4822V15.655C8.04214 16.184 8.47099 16.6129 9 16.6129C9.52901 16.6129 9.95786 16.184 9.95786 15.655V9.4822L16.1307 9.4822Z"
4
- fill="currentColor" />
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_2947_13105)">
3
+ <path
4
+ d="M12 20C11.3995 20 10.9129 19.5134 10.9129 18.9129V5.08707C10.9129 4.48657 11.3995 4 12 4C12.6005 4 13.0871 4.48657 13.0871 5.08707V18.9129C13.0871 19.5134 12.6005 20 12 20Z"
5
+ fill="currentColor" />
6
+ <path
7
+ d="M18.9129 13.0871H5.08707C4.48657 13.0871 4 12.6005 4 12C4 11.3995 4.48657 10.9129 5.08707 10.9129H18.9129C19.5134 10.9129 20 11.3995 20 12C20 12.6005 19.5134 13.0871 18.9129 13.0871Z"
8
+ fill="currentColor" />
9
+ </g>
10
+ <defs>
11
+ <clipPath id="clip0_2947_13105">
12
+ <path
13
+ d="M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z"
14
+ fill="white" />
15
+ </clipPath>
16
+ </defs>
5
17
  </svg>
@@ -1,10 +1,3 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g clip-path="url(#clip0_2947_11191)">
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M18.8985 12.297C17.5046 14.8002 14.861 16.3552 12.0009 16.3552C9.13896 16.3552 6.49546 14.8002 5.10149 12.297C4.99413 12.1026 4.99413 11.8972 5.10149 11.703C6.49546 9.19978 9.13896 7.64494 12.0009 7.64494C14.861 7.64494 17.5045 9.19978 18.8985 11.703C19.0078 11.8972 19.0078 12.1026 18.8985 12.297ZM19.789 11.2067C18.2154 8.38043 15.2313 6.62494 12.0009 6.62494C8.76871 6.62494 5.78457 8.38043 4.21104 11.2067C3.92965 11.7109 3.92965 12.2891 4.21104 12.7929C5.78457 15.6192 8.76871 17.375 12.0009 17.375C15.2313 17.375 18.2154 15.6192 19.789 12.7929C20.0703 12.2891 20.0703 11.7109 19.789 11.2067ZM12.0009 14.0923C13.1542 14.0923 14.0928 13.1538 14.0928 11.9999C14.0928 10.8461 13.1542 9.9075 12.0009 9.9075C10.8458 9.9075 9.9072 10.8461 9.9072 11.9999C9.9072 13.1538 10.8458 14.0923 12.0009 14.0923ZM12.0009 8.88749C10.283 8.88749 8.8872 10.2839 8.8872 11.9999C8.8872 13.7164 10.283 15.1122 12.0009 15.1122C13.717 15.1122 15.1128 13.7164 15.1128 11.9999C15.1128 10.2839 13.717 8.88749 12.0009 8.88749Z" fill="currentColor"/>
4
- </g>
5
- <defs>
6
- <clipPath id="clip0_2947_11191">
7
- <path d="M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z" fill="white"/>
8
- </clipPath>
9
- </defs>
1
+ <svg width="16" height="12" viewBox="0 0 16 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M14.8985 6.29701C13.5046 8.80023 10.861 10.3552 8.00093 10.3552C5.13896 10.3552 2.49546 8.80023 1.10149 6.29701C0.994127 6.10264 0.994127 5.89717 1.10149 5.70297C2.49546 3.19978 5.13896 1.64494 8.00093 1.64494C10.861 1.64494 13.5045 3.19978 14.8985 5.70297C15.0078 5.89717 15.0078 6.10264 14.8985 6.29701ZM15.789 5.20666C14.2154 2.38043 11.2313 0.624939 8.00093 0.624939C4.76871 0.624939 1.78457 2.38043 0.211039 5.20666C-0.0703464 5.71093 -0.0703464 6.28905 0.211039 6.79295C1.78457 9.61918 4.76871 11.375 8.00093 11.375C11.2313 11.375 14.2154 9.61918 15.789 6.79295C16.0703 6.28909 16.0703 5.71093 15.789 5.20666ZM8.00093 8.09231C9.15424 8.09231 10.0928 7.15375 10.0928 5.99991C10.0928 4.84606 9.15424 3.9075 8.00093 3.9075C6.84576 3.9075 5.9072 4.84606 5.9072 5.99991C5.9072 7.15375 6.8458 8.09231 8.00093 8.09231ZM8.00093 2.88749C6.28299 2.88749 4.8872 4.28386 4.8872 5.99994C4.8872 7.71639 6.28303 9.11218 8.00093 9.11218C9.71701 9.11218 11.1128 7.71636 11.1128 5.99994C11.1128 4.28386 9.71701 2.88749 8.00093 2.88749Z" fill="currentColor"/>
10
3
  </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M10.2278 16C10.027 16 9.84105 15.8884 9.74435 15.7172C9.64765 15.5386 9.64765 15.3302 9.75179 15.1516L10.5328 13.8492C10.689 13.5812 11.0386 13.4994 11.299 13.6557C11.5667 13.8119 11.6486 14.1543 11.4924 14.4222L11.2915 14.7571C13.3445 14.2734 14.8842 12.4277 14.8842 10.2247C14.8842 9.91955 15.1371 9.6665 15.4421 9.6665C15.7471 9.6665 16 9.91955 16 10.2247C15.9925 13.4101 13.404 16 10.2278 16Z" fill="currentColor"/>
3
+ <path d="M0.557875 6.32608C0.252903 6.32608 0 6.07304 0 5.7679C0 2.58997 2.58854 0 5.76471 0C5.96554 0 6.1515 0.111637 6.2482 0.282813C6.3449 0.461432 6.3449 0.669821 6.24076 0.848439L5.45973 2.15087C5.30353 2.41135 4.96137 2.50066 4.69359 2.33693C4.43325 2.18064 4.34399 1.83829 4.50763 1.57036L4.70846 1.23545C2.64805 1.71921 1.11575 3.56493 1.11575 5.7679C1.11575 6.07304 0.862846 6.32608 0.557875 6.32608Z" fill="currentColor"/>
4
+ <path d="M10.079 8.46888V10.657C10.079 12.4804 9.35004 13.2097 7.52765 13.2097H5.34078C3.51839 13.2097 2.78943 12.4804 2.78943 10.657V8.46888C2.78943 6.64548 3.51839 5.91614 5.34078 5.91614H7.52765C9.35004 5.91614 10.079 6.64548 10.079 8.46888Z" fill="currentColor"/>
5
+ <path d="M10.6524 2.79102H8.46551C6.67287 2.79102 5.94395 3.50549 5.92163 5.26191H7.52828C9.71515 5.26191 10.7268 6.28152 10.7268 8.46216V10.0697C12.4896 10.0474 13.1963 9.31804 13.1963 7.52441V5.34378C13.2037 3.52038 12.4748 2.79102 10.6524 2.79102Z" fill="currentColor"/>
6
+ </svg>
@@ -8,7 +8,7 @@
8
8
  font-weight: 400;
9
9
  src:
10
10
  local('Poppins-Regular'),
11
- url(../../assets/fonts/Poppins-Regular.ttf) format('truetype');
11
+ url(../../assets/fonts/Poppins-Regular.woff2) format('woff2');
12
12
  }
13
13
 
14
14
  @font-face {
@@ -16,7 +16,7 @@
16
16
  font-weight: 500;
17
17
  src:
18
18
  local('Poppins-Medium'),
19
- url(../../assets/fonts/Poppins-Medium.ttf) format('truetype');
19
+ url(../../assets/fonts/Poppins-Medium.woff2) format('woff2');
20
20
  }
21
21
 
22
22
  @font-face {
@@ -24,7 +24,7 @@
24
24
  font-weight: 600;
25
25
  src:
26
26
  local('Poppins-SemiBold'),
27
- url(../../assets/fonts/Poppins-SemiBold.ttf) format('truetype');
27
+ url(../../assets/fonts/Poppins-SemiBold.woff2) format('woff2');
28
28
  }
29
29
 
30
30
  @font-face {
@@ -32,7 +32,7 @@
32
32
  font-weight: 700;
33
33
  src:
34
34
  local('Poppins-Bold'),
35
- url(../../assets/fonts/Poppins-Bold.ttf) format('truetype');
35
+ url(../../assets/fonts/Poppins-Bold.woff2) format('woff2');
36
36
  }
37
37
 
38
38
  .fontXs {
@@ -70,3 +70,6 @@
70
70
  .font-size-80 {
71
71
  @include fontPoppins(80px);
72
72
  }
73
+
74
+
75
+ //NOTE: Please Don't use these classes use Typography component TODO: Need to remove this file
@@ -142,6 +142,7 @@ const AppHeader: React.FC<AppHeaderProps> = ({
142
142
  options={appHeaderHiddenMenuItems}
143
143
  onOptionClick={onMoreMenuOptionClick}
144
144
  variant="dark"
145
+ dropdownPlacement="down"
145
146
  />
146
147
  </div>
147
148
  )}
@@ -5,6 +5,7 @@ import Toaster from '../Toast';
5
5
  import Icon from '../Icon';
6
6
  import { AttachmentUploaderProps } from './types';
7
7
  import './AttachmentButton.scss';
8
+ import Tooltip from '../Tooltip';
8
9
 
9
10
  const AttachmentButton: React.FC<AttachmentUploaderProps> = ({
10
11
  label,
@@ -81,7 +82,7 @@ const AttachmentButton: React.FC<AttachmentUploaderProps> = ({
81
82
  multiple
82
83
  accept="*"
83
84
  />
84
- {fileError && (
85
+ {/* {fileError && ( */}
85
86
  <Toaster
86
87
  isOpen={!!fileError}
87
88
  variant="info"
@@ -89,24 +90,28 @@ const AttachmentButton: React.FC<AttachmentUploaderProps> = ({
89
90
  toastMessage={fileError}
90
91
  zIndex={10000000}
91
92
  />
92
- )}
93
+ {/* )} */}
93
94
  {showSelectedFiles &&
94
95
  selectedFiles.map((file, index) => (
95
96
  <div key={file.name} className="ff-attachment-files">
96
97
  <Typography color="var(--brand-color)">{file.name}</Typography>
98
+ <Tooltip title="delete">
97
99
  <Icon
98
100
  name="delete"
101
+ hoverEffect={true}
99
102
  color="var(--ff-delete-button-attachment)"
100
103
  onClick={() => handleDeleteFile(index)}
101
104
  />
105
+ </Tooltip>
102
106
  {index === selectedFiles.length - 1 &&
103
107
  selectedFiles.length < maxFiles && (
108
+ <Tooltip title="add attachment">
104
109
  <Icon
105
- name="add_file"
106
- height={24}
107
- width={24}
110
+ name="add_file"
111
+ hoverEffect={true}
108
112
  onClick={handleAttachmentClick}
109
113
  />
114
+ </Tooltip>
110
115
  )}
111
116
  </div>
112
117
  ))}
@@ -95,7 +95,7 @@ export const WithDefaultValues: Story = {
95
95
  <div>
96
96
  <Input
97
97
  type="text"
98
- label='Username'
98
+ label="Username"
99
99
  disabled={false}
100
100
  {...register('username', {
101
101
  required: {
@@ -354,10 +354,10 @@ export const WithSubmissionOutside: Story = {
354
354
  formRef.current.clearErrors();
355
355
  };
356
356
 
357
- const handleReset = () => {
357
+ const handleReset = () => {
358
358
  formRef.current.reset();
359
359
  formRef.current.clearErrors();
360
- }
360
+ };
361
361
 
362
362
  const footerContent = (
363
363
  <>
@@ -382,11 +382,7 @@ export const WithSubmissionOutside: Story = {
382
382
  onClick={() => setIsDrawerOpen(false)}
383
383
  label="Cancel"
384
384
  />
385
- <Button
386
- variant="secondary"
387
- onClick={handleReset}
388
- label="Reset"
389
- />
385
+ <Button variant="secondary" onClick={handleReset} label="Reset" />
390
386
  <Button
391
387
  variant="secondary"
392
388
  onClick={handleCreateAndContinue}
@@ -4,7 +4,11 @@ import Form from './Form';
4
4
  interface FormProps<T extends Form.FieldValues> extends Form.UseFormProps<T> {
5
5
  id?: string;
6
6
  onSubmit: Form.SubmitHandler<T>;
7
- children: (methods: ReturnType<typeof Form.useForm<T>>) => React.ReactNode;
7
+ children: (
8
+ methods: ReturnType<typeof Form.useForm<T>> & {
9
+ Form: typeof Form;
10
+ }
11
+ ) => React.ReactNode;
8
12
  }
9
13
 
10
14
  const Forms = <T extends Form.FieldValues>(
@@ -14,15 +18,18 @@ const Forms = <T extends Form.FieldValues>(
14
18
  const methods = Form.useForm<T>(rest);
15
19
 
16
20
  const { handleSubmit } = methods;
17
-
21
+ const extendedMethods = {
22
+ ...methods,
23
+ Form,
24
+ };
18
25
  useImperativeHandle(ref, () => ({
19
26
  submit: handleSubmit(onSubmit),
20
- ...methods,
27
+ ...extendedMethods,
21
28
  }));
22
29
 
23
30
  return (
24
31
  <form id={id} onSubmit={handleSubmit(onSubmit)}>
25
- {children(methods)}
32
+ {children(extendedMethods)}
26
33
  </form>
27
34
  );
28
35
  };
@@ -30,6 +30,7 @@ import FireflinkIcon from '../../assets/Icons/fireflink_icon.svg?react';
30
30
  import Tick from '../../assets/Icons/tick_icon.svg?react';
31
31
  import Search from '../../assets/icons/search.svg?react';
32
32
  import Filter from '../../assets/icons/filter.svg?react';
33
+
33
34
  import RightArrow from '../../assets/icons/right_arrow_icon.svg?react';
34
35
  import LeftArrow from '../../assets/icons/left_arrow_icon.svg?react';
35
36
  import ClockIcon from '../../assets/icons/clock_icon.svg?react';
@@ -204,9 +205,12 @@ import QuickRunSettingIcon from '../../assets/icons/quick_run_setting_icon.svg?r
204
205
  import RunManualTestcaseIcon from '../../assets/icons/run_manual_testcase_icon.svg?react';
205
206
  import RunAutomationScriptsIcon from '../../assets/icons/run_automation_scripts_icon.svg?react';
206
207
  import EyeOpenIcon from '../../assets/icons/eye_open_icon.svg?react';
208
+ import ReplaceIcon from '../../assets/icons/replace_icon.svg?react';
209
+ import HeaderPreset from '../../assets/icons/Header_preset.svg?react';
210
+
207
211
 
208
- Components['delete_info'] = DeleteInfoIcon;
209
212
  Components['success'] = ToastSuccessIcon;
213
+ Components['delete_info'] = DeleteInfoIcon;
210
214
  Components['warning'] = WarningIcon;
211
215
  Components['toast_info'] = ToastInfoIcon;
212
216
  Components['error'] = ToastErrorIcon;
@@ -405,5 +409,7 @@ Components['quick_run_setting'] = QuickRunSettingIcon;
405
409
  Components['run_manual_testcase'] = RunManualTestcaseIcon;
406
410
  Components['run_automation_scripts'] = RunAutomationScriptsIcon;
407
411
  Components['eye_open_icon'] = EyeOpenIcon;
412
+ Components['replace_icon']=ReplaceIcon;
413
+ Components['header_preset'] = HeaderPreset;
408
414
 
409
415
  export default Components;
@@ -36,6 +36,11 @@
36
36
  &--no-border {
37
37
  border: none;
38
38
  }
39
+ &--placeholder {
40
+ &::placeholder {
41
+ opacity: 1;
42
+ }
43
+ }
39
44
  }
40
45
 
41
46
  .ff-input-label-container {
@@ -51,6 +51,50 @@ export const DisabledWithValue: Story = {
51
51
  },
52
52
  };
53
53
 
54
+ export const WithoutLabel: Story = {
55
+ render: () => {
56
+ const [value, setValue] = useState('');
57
+ const [error, setError] = useState<boolean>(false);
58
+ const [helperText, setHelperText] = useState<string>();
59
+
60
+ const onChangeHandler = (event: ChangeEvent<HTMLInputElement>) => {
61
+ const value = event.target.value;
62
+ if (event.target) {
63
+ if (value.length <= 0) {
64
+ setError(true);
65
+ setHelperText(`${event?.target?.name} is required`);
66
+ } else if (value.length >= 10) {
67
+ setError(true);
68
+ setHelperText(`Name should be within 10 characters`);
69
+ } else {
70
+ setError(false);
71
+ setHelperText('');
72
+ }
73
+ }
74
+ setValue(value);
75
+ };
76
+ return (
77
+ <>
78
+ <Input
79
+ {...defaultArgs}
80
+ type="text"
81
+ onChange={onChangeHandler}
82
+ disabled={false}
83
+ value={value}
84
+ name="Name"
85
+ label="Name"
86
+ placeholder="Enter name here"
87
+ variant="primary"
88
+ required={true}
89
+ error={error}
90
+ helperText={helperText}
91
+ isLabelRequired={false}
92
+ />
93
+ </>
94
+ );
95
+ },
96
+ };
97
+
54
98
  export const Controlled: Story = {
55
99
  render: () => {
56
100
  const [value, setValue] = useState('');
@@ -24,6 +24,7 @@ const Input = ({
24
24
  maxValue = Infinity,
25
25
  transparentBackground = false,
26
26
  size = 'small',
27
+ isLabelRequired = true,
27
28
  ...props
28
29
  }: InputProps) => {
29
30
  const isValueFilled = !checkEmpty(value);
@@ -34,26 +35,29 @@ const Input = ({
34
35
  'ff-input-container--disabled': !!disabled,
35
36
  })}
36
37
  >
37
- <label
38
- htmlFor={name}
39
- className={classNames(
40
- `ff-input-label-container ff-input-label-container--${size}`,
41
- {
42
- 'ff-input-label-container--danger': !!error,
43
- }
44
- )}
45
- >
46
- {required && <span className="required-asterisk">*</span>}
47
- <span
48
- className={classNames(`ff-input-label ff-input-label--${variant}`, {
49
- 'ff-input-label--no-hover': !!value,
50
- 'ff-input-label--disabled': !!disabled,
51
- 'ff-input-label--danger': !!error,
52
- })}
38
+ {isLabelRequired && (
39
+ <label
40
+ htmlFor={name}
41
+ className={classNames(
42
+ `ff-input-label-container ff-input-label-container--${size}`,
43
+ {
44
+ 'ff-input-label-container--danger': !!error,
45
+ }
46
+ )}
53
47
  >
54
- {label}
55
- </span>
56
- </label>
48
+ {required && <span className="required-asterisk">*</span>}
49
+ <span
50
+ className={classNames(`ff-input-label ff-input-label--${variant}`, {
51
+ 'ff-input-label--no-hover': !!value,
52
+ 'ff-input-label--disabled': !!disabled,
53
+ 'ff-input-label--danger': !!error,
54
+ })}
55
+ >
56
+ {label}
57
+ </span>
58
+ </label>
59
+ )}
60
+
57
61
  <input
58
62
  name={name}
59
63
  value={value}
@@ -68,6 +72,7 @@ const Input = ({
68
72
  'ff-input--disabled': !!disabled,
69
73
  'ff-input--danger': !!error,
70
74
  'ff-input--no-border': !!noBorder,
75
+ 'ff-input--placeholder': !isLabelRequired,
71
76
  },
72
77
  `${className}`
73
78
  )}
@@ -78,4 +78,8 @@ export interface InputProps {
78
78
  * size for the input field
79
79
  */
80
80
  size?: 'small' | 'medium';
81
+ /**
82
+ * isLabelRequired for the input field without label,showing placeholder
83
+ */
84
+ isLabelRequired?: boolean;
81
85
  }
@@ -68,21 +68,21 @@ const OptionCard = ({
68
68
  case 'top':
69
69
  return {
70
70
  top: menuPosition.top - optionsHeight - 7,
71
- left: menuPosition.rightSpaceAvailable + 12,
71
+ left: menuPosition.left - 4,
72
72
  };
73
73
  case 'down':
74
74
  return {
75
- top: menuPosition.bottom,
76
- left: menuPosition.rightSpaceAvailable + 12,
75
+ top: menuPosition.top + 18,
76
+ left: menuPosition.left - 4,
77
77
  };
78
78
  case 'left':
79
79
  return {
80
- top: menuPosition.top,
80
+ top: menuPosition.top - 4,
81
81
  left: menuPosition.left - optionsWidth - 7,
82
82
  };
83
83
  case 'right':
84
84
  return {
85
- top: menuPosition.top,
85
+ top: menuPosition.top - 4,
86
86
  left: menuPosition.left + 20,
87
87
  };
88
88
  default:
@@ -1,15 +1,18 @@
1
1
  @use '../../assets/styles/fonts';
2
+
2
3
  .ff-tree-container {
3
4
  width: 100%;
4
5
  font-size: 12px;
5
6
  color: var(--brand-color);
6
7
  transition: all 0.3s ease;
7
8
  @extend .fontSm;
9
+
8
10
  table {
9
11
  border-collapse: collapse;
10
12
  width: 100%;
11
13
  text-align: left;
12
14
  }
15
+
13
16
  .ff-toggle-arrow-icon {
14
17
  height: 12px;
15
18
  width: 12px;
@@ -40,6 +43,7 @@
40
43
  overflow: hidden;
41
44
  text-overflow: ellipsis;
42
45
  }
46
+
43
47
  th {
44
48
  vertical-align: middle;
45
49
  height: 32px;
@@ -53,8 +57,10 @@
53
57
  .ff-action-section {
54
58
  display: none;
55
59
  }
60
+
56
61
  &:hover {
57
62
  background-color: var(--hover-color);
63
+
58
64
  .ff-title-action-container {
59
65
  display: flex;
60
66
  }
@@ -70,6 +76,7 @@
70
76
  display: flex;
71
77
  cursor: pointer;
72
78
  }
79
+
73
80
  &.ff-folder {
74
81
  font-weight: 600;
75
82
  }
@@ -77,6 +84,7 @@
77
84
  &.ff-file {
78
85
  font-weight: 400;
79
86
  }
87
+
80
88
  .ff-title {
81
89
  display: flex;
82
90
  gap: 4px;
@@ -96,12 +104,6 @@
96
104
  position: absolute;
97
105
  right: 10px;
98
106
  }
99
-
100
- // &:hover {
101
- // > .ff-title-action-container {
102
- // display: flex;
103
- // }
104
- // }
105
107
  }
106
108
  }
107
109
 
@@ -144,12 +146,25 @@
144
146
  height: calc(var(--node-height) / 2);
145
147
  }
146
148
 
147
- // Remove the lines for root level
149
+ // Remove the lines for root level
148
150
  &[style*='--level: 0']::before,
149
151
  &[style*='--level: 0']::after {
150
152
  content: none;
151
153
  }
152
154
  }
155
+
156
+ th:first-child {
157
+ position: sticky;
158
+ left: 0;
159
+ z-index: 999;
160
+ background-color: var(--slider-table-color);
161
+ }
162
+ td:first-child {
163
+ position: sticky;
164
+ left: 0;
165
+ z-index: 99;
166
+ background-color: var(--ff-status-card-text-color);
167
+ }
153
168
  }
154
169
 
155
170
  .ff-title-action-container {
@@ -4,6 +4,7 @@ import Button from '../Button';
4
4
  import treeData from './data';
5
5
  import Icon from '../Icon/Icon';
6
6
  import './TableTreeStories.scss';
7
+ import React from 'react';
7
8
 
8
9
  const meta: Meta<typeof TableTree> = {
9
10
  title: 'Components/Table tree',
@@ -19,6 +20,9 @@ type Story = StoryObj<typeof TableTree>;
19
20
 
20
21
  export const Default: Story = {
21
22
  args: {
23
+ onPagination: (node) => {
24
+ console.log(node);
25
+ },
22
26
  select: 'radio',
23
27
  onChange: (e: any, node: any) => {
24
28
  e.preventDefault();
@@ -45,6 +49,43 @@ export const Default: Story = {
45
49
  },
46
50
  },
47
51
 
52
+ {
53
+ name: 'Module Path',
54
+ accessor: 'path',
55
+ width: '200px',
56
+ isClickable: true,
57
+ },
58
+
59
+ {
60
+ name: 'Module Path',
61
+ accessor: 'path',
62
+ width: '200px',
63
+ isClickable: true,
64
+ },
65
+ {
66
+ name: 'Module Path',
67
+ accessor: 'path',
68
+ width: '200px',
69
+ isClickable: true,
70
+ },
71
+ {
72
+ name: 'Module Path',
73
+ accessor: 'path',
74
+ width: '200px',
75
+ isClickable: true,
76
+ },
77
+ {
78
+ name: 'Module Path',
79
+ accessor: 'path',
80
+ width: '200px',
81
+ isClickable: true,
82
+ },
83
+ {
84
+ name: 'Module Path',
85
+ accessor: 'path',
86
+ width: '200px',
87
+ isClickable: true,
88
+ },
48
89
  {
49
90
  name: 'Module Path',
50
91
  accessor: 'path',