pixel-react 1.4.6 → 1.4.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) 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/AddResourceButton/AddButton.stories.d.ts +8 -0
  6. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.d.ts +1 -1
  7. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +7 -0
  8. package/lib/components/AllProjectsDropdown/types.d.ts +2 -0
  9. package/lib/components/AppHeader/AppHeader.stories.d.ts +7 -0
  10. package/lib/components/AppHeader/types.d.ts +1 -0
  11. package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +9 -0
  12. package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
  13. package/lib/components/Button/Button.stories.d.ts +13 -0
  14. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
  15. package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +6 -0
  16. package/lib/components/Charts/PieChart/PieChart.stories.d.ts +7 -0
  17. package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +6 -0
  18. package/lib/components/Checkbox/Checkbox.stories.d.ts +8 -0
  19. package/lib/components/Chip/Chip.stories.d.ts +14 -0
  20. package/lib/components/DatePicker/DatePicker.stories.d.ts +9 -0
  21. package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +6 -0
  22. package/lib/components/Drawer/Drawer.stories.d.ts +12 -0
  23. package/lib/components/ExcelFile/ColorBarselector/ColorBarSelector.d.ts +8 -0
  24. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
  25. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
  26. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
  27. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
  28. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
  29. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
  30. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
  31. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
  32. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
  33. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
  34. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
  35. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
  36. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +80 -0
  37. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
  38. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +174 -0
  39. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
  40. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
  41. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
  42. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
  43. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
  44. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
  45. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
  46. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
  47. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
  48. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
  49. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
  50. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
  51. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
  52. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
  53. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +178 -0
  54. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
  55. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
  56. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +44 -0
  57. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +19 -0
  58. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
  59. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +12 -0
  60. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +15 -0
  61. package/lib/components/ExcelFile/Types.d.ts +129 -0
  62. package/lib/components/ExcelFile/index.d.ts +1 -0
  63. package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +7 -0
  64. package/lib/components/FF_Captcha/captcha.stories.d.ts +8 -0
  65. package/lib/components/FileDropzone/FileDropzone.stories.d.ts +8 -0
  66. package/lib/components/Form/Form.stories.d.ts +7 -0
  67. package/lib/components/Form/Forms.d.ts +3 -1
  68. package/lib/components/GridLayout/GridLayout.stories.d.ts +8 -0
  69. package/lib/components/HighlightText/HighlightText.stories.d.ts +6 -0
  70. package/lib/components/Icon/Icon.stories.d.ts +8 -0
  71. package/lib/components/IconButton/IconButton.stories.d.ts +7 -0
  72. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
  73. package/lib/components/Input/Input.d.ts +1 -1
  74. package/lib/components/Input/Input.stories.d.ts +9 -0
  75. package/lib/components/Input/types.d.ts +4 -0
  76. package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +9 -0
  77. package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +11 -0
  78. package/lib/components/LazyLoad/LazyLoad.stories.d.ts +6 -0
  79. package/lib/components/MachineInputField/MachineInputField.stories.d.ts +6 -0
  80. package/lib/components/MenuOption/MenuOption.stories.d.ts +16 -0
  81. package/lib/components/MenuOption/types.d.ts +1 -1
  82. package/lib/components/MiniModal/MiniModal.stories.d.ts +10 -0
  83. package/lib/components/Modal/Modal.stories.d.ts +7 -0
  84. package/lib/components/Modal/types.d.ts +4 -2
  85. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
  86. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +10 -0
  87. package/lib/components/NLPInput/NlpInput.stories.d.ts +7 -0
  88. package/lib/components/Paper/Paper.stories.d.ts +11 -0
  89. package/lib/components/RadioButton/RadioButton.stories.d.ts +10 -0
  90. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +9 -0
  91. package/lib/components/Search/Search.stories.d.ts +6 -0
  92. package/lib/components/Select/Select.stories.d.ts +13 -0
  93. package/lib/components/Select/components/Dropdown/Dropdown.d.ts +4 -0
  94. package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +17 -0
  95. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +6 -0
  96. package/lib/components/StateDropdown/StateDropdown.stories.d.ts +10 -0
  97. package/lib/components/StatusButton/StatusButton.stories.d.ts +14 -0
  98. package/lib/components/Table/Table.stories.d.ts +13 -0
  99. package/lib/components/TableTree/TableTree.d.ts +2 -1
  100. package/lib/components/TableTree/TableTree.stories.d.ts +7 -0
  101. package/lib/components/Tabs/Tabs.stories.d.ts +9 -0
  102. package/lib/components/TextArea/Textarea.stories.d.ts +9 -0
  103. package/lib/components/Toast/Toast.stories.d.ts +6 -0
  104. package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
  105. package/lib/components/Toggle/Toggle.stories.d.ts +12 -0
  106. package/lib/components/Tooltip/Tooltip.stories.d.ts +15 -0
  107. package/lib/components/Typography/Typography.stories.d.ts +10 -0
  108. package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
  109. package/lib/index.d.ts +17 -5
  110. package/lib/index.esm.js +212 -145
  111. package/lib/index.esm.js.map +1 -1
  112. package/lib/index.js +212 -145
  113. package/lib/index.js.map +1 -1
  114. package/lib/tsconfig.tsbuildinfo +1 -1
  115. package/lib/utils/capitalize/capitalize.d.ts +1 -0
  116. package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +6 -0
  117. package/lib/utils/compareArrays/compareArrays.stories.d.ts +6 -0
  118. package/lib/utils/compareObjects/compareObjects.stories.d.ts +6 -0
  119. package/lib/utils/debounce/debounce.stories.d.ts +6 -0
  120. package/lib/utils/ffID/ffID.stories.d.ts +6 -0
  121. package/lib/utils/find/findAndInsert.d.ts +7 -0
  122. package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
  123. package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
  124. package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +6 -0
  125. package/lib/utils/getExtension/getExtension.stories.d.ts +6 -0
  126. package/lib/utils/throttle/throttle.stories.d.ts +6 -0
  127. package/lib/utils/truncateText/truncateText.stories.d.ts +6 -0
  128. package/package.json +2 -2
  129. package/src/StyleGuide/ColorPalette/colorPaletteList.ts +82 -12
  130. package/src/assets/Themes/BaseTheme.scss +38 -15
  131. package/src/assets/Themes/DarkTheme.scss +15 -1
  132. package/src/assets/fonts/Poppins-Bold.woff2 +0 -0
  133. package/src/assets/fonts/Poppins-Medium.woff2 +0 -0
  134. package/src/assets/fonts/Poppins-Regular.woff2 +0 -0
  135. package/src/assets/fonts/Poppins-SemiBold.woff2 +0 -0
  136. package/src/assets/icons/Header_preset.svg +13 -0
  137. package/src/assets/icons/add_file.svg +16 -4
  138. package/src/assets/icons/eye_open_icon.svg +2 -9
  139. package/src/assets/icons/hide_access_icon.svg +3 -0
  140. package/src/assets/icons/replace_icon.svg +6 -0
  141. package/src/assets/styles/_fonts.scss +7 -4
  142. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +58 -8
  143. package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +83 -75
  144. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +31 -18
  145. package/src/components/AllProjectsDropdown/types.ts +2 -0
  146. package/src/components/AppHeader/AppHeader.scss +2 -2
  147. package/src/components/AppHeader/AppHeader.stories.tsx +5 -1
  148. package/src/components/AppHeader/AppHeader.tsx +108 -101
  149. package/src/components/AppHeader/types.ts +1 -0
  150. package/src/components/AttachmentButton/AttachmentButton.tsx +10 -5
  151. package/src/components/EditTextField/EditTextField.tsx +3 -5
  152. package/src/components/Form/Form.stories.tsx +4 -8
  153. package/src/components/Form/Forms.tsx +11 -4
  154. package/src/components/Icon/iconList.ts +9 -3
  155. package/src/components/Input/Input.scss +5 -0
  156. package/src/components/Input/Input.stories.tsx +44 -0
  157. package/src/components/Input/Input.tsx +24 -19
  158. package/src/components/Input/types.ts +4 -0
  159. package/src/components/MenuOption/MenuOption.scss +24 -27
  160. package/src/components/MenuOption/MenuOption.stories.tsx +90 -35
  161. package/src/components/MenuOption/MenuOption.tsx +22 -20
  162. package/src/components/MenuOption/types.ts +1 -1
  163. package/src/components/Modal/Modal.stories.tsx +2 -2
  164. package/src/components/Modal/Modal.tsx +6 -2
  165. package/src/components/Modal/modal.scss +2 -3
  166. package/src/components/Modal/types.ts +4 -2
  167. package/src/components/TableTree/TableTree.scss +22 -7
  168. package/src/components/TableTree/TableTree.stories.tsx +41 -0
  169. package/src/components/TableTree/TableTree.tsx +55 -18
  170. package/src/components/Typography/Typography.scss +4 -4
  171. package/src/utils/capitalize/capitalize.stories.tsx +44 -0
  172. package/src/utils/capitalize/capitalize.tsx +4 -0
  173. package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
  174. package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
  175. package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
  176. package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
  177. /package/lib/components/{Excel → ExcelFile}/ContextMenu/ContextMenu.d.ts +0 -0
@@ -5,16 +5,52 @@
5
5
  flex-direction: column;
6
6
  justify-content: flex-start;
7
7
  .ff-all-project-dropdown {
8
- background-color: var(--secondary-icon-color);
8
+ width: fit-content;
9
+ border-radius: 16px;
10
+ background-color: var(--ff-all-projects-default-color);
9
11
  color: var(--expandable-menu-default-bg);
10
- height: 24px;
12
+ line-height: 18px;
11
13
  @include mixins.center-content();
12
- gap: 10px;
13
- padding: 4px;
14
- .label-icon {
15
- height: 16px;
16
- width: 16px;
17
- @include mixins.center-content();
14
+ padding: 3px;
15
+ cursor: pointer;
16
+ &--selected {
17
+ background-color: var(--primary-icon-color);
18
+ border-radius: 20px;
19
+ .ff-all-project-container {
20
+ border-radius: 20px;
21
+ background-color: var(--brand-color);
22
+ }
23
+ }
24
+ &:not(.ff-all-project-dropdown--selected):hover {
25
+ .projects-label {
26
+ position: relative;
27
+ white-space: nowrap;
28
+ &:hover::after {
29
+ animation: oscillate-border-width 0.5s ease-in-out forwards;
30
+ }
31
+ &::after {
32
+ content: '';
33
+ position: absolute;
34
+ top: 20px;
35
+ left: 0%;
36
+ width: 0%;
37
+ height: 2px;
38
+ background-color: var(--ff-app-header-menu-border-bottom-color);
39
+ border-radius: 4px;
40
+ transition: width 0.15s ease-in-out;
41
+ }
42
+ }
43
+ }
44
+ .ff-all-project-container {
45
+ display: flex;
46
+ padding: 4px;
47
+ gap: 4px;
48
+ justify-content: center;
49
+ .label-icon {
50
+ height: 16px;
51
+ width: 16px;
52
+ @include mixins.center-content();
53
+ }
18
54
  }
19
55
  }
20
56
  .ff-projects-dropdown {
@@ -130,3 +166,17 @@
130
166
  }
131
167
  }
132
168
  }
169
+ @keyframes oscillate-border-width {
170
+ 0% {
171
+ width: 50%;
172
+ left: 25%;
173
+ }
174
+ 50% {
175
+ width: 70%;
176
+ left: 15%;
177
+ }
178
+ 100% {
179
+ width: 50%;
180
+ left: 25%;
181
+ }
182
+ }
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import AllProjectsDropdown from './AllProjectsDropdown';
3
- import { useState } from 'react';
3
+ import React, { useState } from 'react';
4
4
  import { optionsType } from './types';
5
5
 
6
6
  const meta: Meta<typeof AllProjectsDropdown> = {
@@ -13,45 +13,76 @@ const meta: Meta<typeof AllProjectsDropdown> = {
13
13
  };
14
14
 
15
15
  type Story = StoryObj<typeof AllProjectsDropdown>;
16
-
16
+ const options = [
17
+ {
18
+ label:
19
+ 'Pantaloon Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project',
20
+ value:
21
+ 'Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project',
22
+ iconName: 'web_icon',
23
+ },
24
+ {
25
+ label: 'Mobile Project',
26
+ value: 'Mobile Project',
27
+ iconName: 'mobile_icon',
28
+ },
29
+ {
30
+ label: 'Web & Mobile Project',
31
+ value: 'Web & Mobile Project',
32
+ iconName: 'web&mobile_icon',
33
+ },
34
+ {
35
+ label: 'Sales Force',
36
+ value: 'Sales Force',
37
+ iconName: 'sales_force',
38
+ },
39
+ {
40
+ label: 'MS Dynamic',
41
+ value: 'MS Dynamic',
42
+ iconName: 'ms_dynamic',
43
+ },
44
+ {
45
+ label: 'Test',
46
+ value: 'test',
47
+ iconName: 'mobile_icon',
48
+ },
49
+ {
50
+ label: 'Web Service',
51
+ value: 'Web Service',
52
+ iconName: '',
53
+ },
54
+ ];
17
55
  export const Default: Story = {
18
- args: {
19
- options: [
20
- {
21
- label: 'Pantaloon Project',
22
- value: 'Pantaloon Web Project',
23
- iconName: 'web_icon',
24
- },
25
- {
26
- label: 'Mobile Project',
27
- value: 'Mobile Project',
28
- iconName: 'mobile_icon',
29
- },
30
- {
31
- label: 'Web & Mobile Project',
32
- value: 'Web & Mobile Project',
33
- iconName: 'web&mobile_icon',
34
- },
35
- {
36
- label: 'Sales Force',
37
- value: 'Sales Force',
38
- iconName: 'sales_force',
39
- },
40
- {
41
- label: 'MS Dynamic',
42
- value: 'MS Dynamic',
43
- iconName: 'ms_dynamic',
44
- },
45
- {
46
- label: 'Web Service',
47
- value: 'Web Service',
48
- iconName: '',
49
- },
50
- ],
56
+ render: () => {
57
+ const [selectedOption, setSelectedOption] = useState({
58
+ label: 'All Projects',
59
+ value: 'All Projects',
60
+ iconName: 'all_projects',
61
+ });
62
+
63
+ const handleSelectedOption = (option: optionsType) => {
64
+ setSelectedOption(option);
65
+ };
66
+
67
+ return (
68
+ <div
69
+ style={{
70
+ backgroundColor: 'var(--brand-color)',
71
+ height: 50,
72
+ width: 120,
73
+ padding: 10,
74
+ }}
75
+ >
76
+ <AllProjectsDropdown
77
+ options={options}
78
+ onClick={handleSelectedOption}
79
+ selectedOption={selectedOption}
80
+ />
81
+ </div>
82
+ );
51
83
  },
52
84
  };
53
-
54
- export const PrimaryIconButton: Story = {
85
+ export const Selected: Story = {
55
86
  render: () => {
56
87
  const [selectedOption, setSelectedOption] = useState({
57
88
  label: 'All Projects',
@@ -63,45 +94,22 @@ export const PrimaryIconButton: Story = {
63
94
  setSelectedOption(option);
64
95
  };
65
96
 
66
- const options = [
67
- {
68
- label: 'Pantaloon Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project',
69
- value: 'Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project Pantaloon Web Project',
70
- iconName: 'web_icon',
71
- },
72
- {
73
- label: 'Mobile Project',
74
- value: 'Mobile Project',
75
- iconName: 'mobile_icon',
76
- },
77
- {
78
- label: 'Web & Mobile Project',
79
- value: 'Web & Mobile Project',
80
- iconName: 'web&mobile_icon',
81
- },
82
- {
83
- label: 'Sales Force',
84
- value: 'Sales Force',
85
- iconName: 'sales_force',
86
- },
87
- {
88
- label: 'MS Dynamic',
89
- value: 'MS Dynamic',
90
- iconName: 'ms_dynamic',
91
- },
92
- {
93
- label: 'Web Service',
94
- value: 'Web Service',
95
- iconName: '',
96
- },
97
- ];
98
-
99
97
  return (
100
- <AllProjectsDropdown
101
- options={options}
102
- onClick={handleSelectedOption}
103
- selectedOption={selectedOption}
104
- />
98
+ <div
99
+ style={{
100
+ backgroundColor: 'var(--brand-color)',
101
+ height: 50,
102
+ width: 120,
103
+ padding: 10,
104
+ }}
105
+ >
106
+ <AllProjectsDropdown
107
+ options={options}
108
+ onClick={handleSelectedOption}
109
+ selectedOption={selectedOption}
110
+ selected={true}
111
+ />
112
+ </div>
105
113
  );
106
114
  },
107
115
  };
@@ -10,12 +10,14 @@ import useClickOutside from '../../hooks/useClickOutside';
10
10
 
11
11
  const AllProjectsDropdown = ({
12
12
  onClick = () => {},
13
+ onMenuClick = () => {},
13
14
  options,
14
15
  selectedOption = {
15
16
  label: 'All Projects',
16
17
  value: 'All Projects',
17
18
  iconName: 'all_projects',
18
19
  },
20
+ selected = false,
19
21
  }: AllProjectsDropdownProps) => {
20
22
  const [showOptions, setShowOptions] = useState(false);
21
23
  const [selectedOptions, setSelectedOptions] = useState(selectedOption);
@@ -47,24 +49,35 @@ const AllProjectsDropdown = ({
47
49
  useClickOutside(optionsRef, closeOptions);
48
50
  return (
49
51
  <div className={classNames('ff-all-project')}>
50
- <div className={classNames('ff-all-project-dropdown')}>
51
- <Typography
52
- as={'div'}
53
- lineHeight={'18px'}
54
- fontSize={12}
55
- fontWeight={'regular'}
56
- className={classNames('projects-label')}
57
- >
58
- {truncateText(selectedOptions?.label, 12)}
59
- </Typography>
60
- <div className={classNames('label-icon')} onClick={handleShowOption}>
61
- <Icon
62
- name="arrows_down_icon"
63
- color="var(--primary-icon-color)"
64
- height={8}
65
- width={8}
66
- hoverEffect={false}
67
- />
52
+ <div
53
+ className={classNames('ff-all-project-dropdown', {
54
+ ['ff-all-project-dropdown--selected']: selected,
55
+ })}
56
+ >
57
+ <div className={classNames('ff-all-project-container')}>
58
+ <Typography
59
+ as={'div'}
60
+ lineHeight={'18px'}
61
+ fontSize={12}
62
+ fontWeight={'regular'}
63
+ className={classNames('projects-label')}
64
+ onClick={onMenuClick}
65
+ >
66
+ <Tooltip title={selectedOptions?.label}>
67
+ {selectedOptions.label.length <= 12
68
+ ? selectedOptions.label
69
+ : truncateText(selectedOptions?.label, 8)}
70
+ </Tooltip>
71
+ </Typography>
72
+ <div className={classNames('label-icon')} onClick={handleShowOption}>
73
+ <Icon
74
+ name="arrows_down_icon"
75
+ color="var(--primary-icon-color)"
76
+ height={8}
77
+ width={8}
78
+ hoverEffect={false}
79
+ />
80
+ </div>
68
81
  </div>
69
82
  </div>
70
83
  {showOptions && (
@@ -5,6 +5,8 @@ export interface optionsType {
5
5
  }
6
6
  export interface AllProjectsDropdownProps {
7
7
  options: optionsType[];
8
+ onMenuClick?: () => void;
8
9
  onClick: (option: optionsType) => void;
9
10
  selectedOption: optionsType;
11
+ selected?: boolean;
10
12
  }
@@ -3,8 +3,7 @@
3
3
  justify-content: space-between;
4
4
  background-color: var(--brand-color);
5
5
  padding-left: 8px;
6
- border-top-left-radius: 8px;
7
- border-top-right-radius: 8px;
6
+ height: 40px;
8
7
  .ff-app-header-left-container {
9
8
  display: flex;
10
9
  .ff-app-header-logo-icon {
@@ -82,6 +81,7 @@
82
81
  height: 2px;
83
82
  border-radius: 4px;
84
83
  transition: width 0.15s ease-in-out;
84
+ background: var(--ff-app-header-submenu-border-bottom-color);
85
85
  }
86
86
  padding-left: 8px;
87
87
  &--selected {
@@ -6,7 +6,7 @@ import {
6
6
  appHeaderQuickMenuItemProps,
7
7
  } from './types';
8
8
  import Icon from '../Icon';
9
- import { useState } from 'react';
9
+ import React, { useState } from 'react';
10
10
  import { optionsType } from '../AllProjectsDropdown/types';
11
11
 
12
12
  const meta: Meta<typeof AppHeader> = {
@@ -159,6 +159,9 @@ export const Controlled: Story = {
159
159
  const handleProjectClick = (item: optionsType) => {
160
160
  setSelectedProject(item);
161
161
  };
162
+ const handleProjectDropdownLabelClick = () => {
163
+ setSelectedMenuItem('Projects');
164
+ }
162
165
 
163
166
  return (
164
167
  <>
@@ -178,6 +181,7 @@ export const Controlled: Story = {
178
181
  onSubMenuClick={handleSubMenuClick}
179
182
  onQuickMenuClick={handleQuickMenuClick}
180
183
  onProjectMenuClick={handleProjectClick}
184
+ onProjectDropdownLabelClick={handleProjectDropdownLabelClick}
181
185
  />
182
186
  </div>
183
187
  </>
@@ -22,6 +22,7 @@ const AppHeader: React.FC<AppHeaderProps> = ({
22
22
  onSubMenuClick = () => {},
23
23
  onQuickMenuClick = () => {},
24
24
  onProjectMenuClick = () => {},
25
+ onProjectDropdownLabelClick = () => {},
25
26
  onMoreMenuOptionClick = () => {},
26
27
  }) => {
27
28
  return (
@@ -35,112 +36,118 @@ const AppHeader: React.FC<AppHeaderProps> = ({
35
36
  <div className="ff-app-header-left-content">{leftContent}</div>
36
37
  )}
37
38
  </div>
38
- <div className="ff-app-header-nav-bar">
39
- {projectsList && !checkEmpty(projectsList) && (
40
- <div>
41
- {
42
- <AllProjectsDropdown
43
- onClick={onProjectMenuClick}
44
- options={projectsList}
45
- selectedOption={selectedProject}
46
- />
47
- }
48
- </div>
49
- )}
50
- <div className="ff-app-header-nav-bar-items fontSm">
51
- {appHeaderMenuItems.map((menuItem) => {
52
- return (
53
- <div
54
- className={classNames('ff-app-header-nav-bar-item', {
55
- ['ff-app-header-nav-bar-item--selected']:
56
- menuItem.label === selectedMenu,
57
- })}
58
- key={menuItem.label}
59
- >
60
- <Typography
61
- as="div"
62
- className="ff-app-header-nav-bar-item-label"
63
- lineHeight="18px"
64
- onClick={() => onMenuClick(menuItem)}
39
+ {!checkEmpty(appHeaderMenuItems) && (
40
+ <div className="ff-app-header-nav-bar">
41
+ {projectsList && !checkEmpty(projectsList) && (
42
+ <div>
43
+ {
44
+ <AllProjectsDropdown
45
+ onClick={onProjectMenuClick}
46
+ options={projectsList}
47
+ selectedOption={selectedProject}
48
+ onMenuClick={onProjectDropdownLabelClick}
49
+ selected={selectedMenu === 'Projects'}
50
+ />
51
+ }
52
+ </div>
53
+ )}
54
+ <div className="ff-app-header-nav-bar-items fontSm">
55
+ {appHeaderMenuItems.map((menuItem) => {
56
+ return (
57
+ <div
58
+ className={classNames('ff-app-header-nav-bar-item', {
59
+ ['ff-app-header-nav-bar-item--selected']:
60
+ menuItem.label === selectedMenu,
61
+ })}
62
+ key={menuItem.label}
65
63
  >
66
- {menuItem.label}
67
- </Typography>
68
- {menuItem.label === selectedMenu &&
69
- menuItem?.subMenuItems &&
70
- menuItem.subMenuItems.map((subMenuItem) => {
71
- return (
72
- <div
73
- key={subMenuItem.label}
74
- className="ff-app-header-submenu-container"
75
- >
76
- <Typography
77
- as="div"
78
- className={classNames(
79
- 'ff-app-header-nav-bar-submenu-item',
80
- {
81
- ['ff-app-header-nav-bar-submenu-item--selected']:
82
- subMenuItem.label === selectedSubMenu,
83
- }
84
- )}
85
- lineHeight="18px"
86
- onClick={() => onSubMenuClick(subMenuItem)}
64
+ <Typography
65
+ as="div"
66
+ className="ff-app-header-nav-bar-item-label"
67
+ lineHeight="18px"
68
+ onClick={() => onMenuClick(menuItem)}
69
+ >
70
+ {menuItem.label}
71
+ </Typography>
72
+ {menuItem.label === selectedMenu &&
73
+ menuItem?.subMenuItems &&
74
+ menuItem.subMenuItems.map((subMenuItem) => {
75
+ return (
76
+ <div
77
+ key={subMenuItem.label}
78
+ className="ff-app-header-submenu-container"
87
79
  >
88
- {subMenuItem.label}
89
- </Typography>
90
- {subMenuItem.label === selectedSubMenu &&
91
- subMenuItem?.quickMenuItems && (
92
- <div className="ff-app-header-quickmenu-container">
93
- <div>
94
- <Icon name="vertical_separator" />
95
- </div>
96
- {subMenuItem.quickMenuItems.map(
97
- (quickMenuItem) => {
98
- return (
99
- <>
100
- <div
101
- key={quickMenuItem.iconName}
102
- onClick={() =>
103
- onQuickMenuClick(quickMenuItem)
104
- }
105
- className={classNames(
106
- 'ff-app-header-nav-bar-quickmenu-item',
107
- {
108
- ['ff-app-header-nav-bar-quickmenu-item--selected']:
109
- quickMenuItem.path ===
110
- selectedQuickMenu,
80
+ <Typography
81
+ as="div"
82
+ className={classNames(
83
+ 'ff-app-header-nav-bar-submenu-item',
84
+ {
85
+ ['ff-app-header-nav-bar-submenu-item--selected']:
86
+ subMenuItem.label === selectedSubMenu,
87
+ }
88
+ )}
89
+ lineHeight="18px"
90
+ onClick={() => onSubMenuClick(subMenuItem)}
91
+ >
92
+ {subMenuItem.label}
93
+ </Typography>
94
+ {subMenuItem.label === selectedSubMenu &&
95
+ subMenuItem?.quickMenuItems && (
96
+ <div className="ff-app-header-quickmenu-container">
97
+ <div>
98
+ <Icon name="vertical_separator" />
99
+ </div>
100
+ {subMenuItem.quickMenuItems.map(
101
+ (quickMenuItem) => {
102
+ return (
103
+ <>
104
+ <div
105
+ key={quickMenuItem.iconName}
106
+ onClick={() =>
107
+ onQuickMenuClick(quickMenuItem)
111
108
  }
112
- )}
113
- >
114
- <Icon
115
- name={quickMenuItem.iconName}
116
- height={24}
117
- width={24}
118
- />
119
- </div>
120
- </>
121
- );
122
- }
123
- )}
124
- </div>
125
- )}
126
- </div>
127
- );
128
- })}
109
+ className={classNames(
110
+ 'ff-app-header-nav-bar-quickmenu-item',
111
+ {
112
+ ['ff-app-header-nav-bar-quickmenu-item--selected']:
113
+ quickMenuItem.path ===
114
+ selectedQuickMenu,
115
+ }
116
+ )}
117
+ >
118
+ <Icon
119
+ name={quickMenuItem.iconName}
120
+ height={24}
121
+ width={24}
122
+ />
123
+ </div>
124
+ </>
125
+ );
126
+ }
127
+ )}
128
+ </div>
129
+ )}
130
+ </div>
131
+ );
132
+ })}
133
+ </div>
134
+ );
135
+ })}
136
+ </div>
137
+ {appHeaderHiddenMenuItems &&
138
+ !checkEmpty(appHeaderHiddenMenuItems) && (
139
+ <div>
140
+ <MenuOption
141
+ iconName="more"
142
+ options={appHeaderHiddenMenuItems}
143
+ onOptionClick={onMoreMenuOptionClick}
144
+ variant="dark"
145
+ dropdownPlacement="down"
146
+ />
129
147
  </div>
130
- );
131
- })}
148
+ )}
132
149
  </div>
133
- {appHeaderHiddenMenuItems && !checkEmpty(appHeaderHiddenMenuItems) && (
134
- <div>
135
- <MenuOption
136
- iconName="more"
137
- options={appHeaderHiddenMenuItems}
138
- onOptionClick={onMoreMenuOptionClick}
139
- variant='dark'
140
- />
141
- </div>
142
- )}
143
- </div>
150
+ )}
144
151
  {rightContent && (
145
152
  <div className="ff-app-header-right-content">{rightContent}</div>
146
153
  )}
@@ -20,6 +20,7 @@ export interface AppHeaderProps {
20
20
  onSubMenuClick?: (text: any) => void;
21
21
  onQuickMenuClick?: (text: any) => void;
22
22
  onProjectMenuClick?: (text: any) => void;
23
+ onProjectDropdownLabelClick?: () => void;
23
24
  onMoreMenuOptionClick?: (text: any) => void;
24
25
  }
25
26
  export interface appHeaderMenuItemProps {
@@ -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
  ))}