pixel-react 1.5.0 → 1.5.1

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 (49) hide show
  1. package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
  2. package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
  3. package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
  4. package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
  5. package/lib/components/AddButton/AddButton.d.ts +5 -0
  6. package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
  7. package/lib/components/AddButton/index.d.ts +1 -0
  8. package/lib/components/AddButton/types.d.ts +4 -0
  9. package/lib/components/AttachImage/AttachImage.stories.d.ts +7 -0
  10. package/lib/components/Charts/BarChart/BarChart.stories.d.ts +6 -0
  11. package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +8 -0
  12. package/lib/components/Charts/LineChart/LineChart.stories.d.ts +7 -0
  13. package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +8 -0
  14. package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +6 -0
  15. package/lib/components/EditTextField/EditTextField.stories.d.ts +10 -0
  16. package/lib/components/Editor/Editor.stories.d.ts +6 -0
  17. package/lib/components/Excel/ContextMenu/ContextMenu.d.ts +4 -0
  18. package/lib/components/Excel/ExcelFile.stories.d.ts +6 -0
  19. package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
  20. package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
  21. package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +2 -0
  22. package/lib/components/MenuOption/MenuOption.d.ts +1 -1
  23. package/lib/components/MenuOption/types.d.ts +12 -0
  24. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +1 -0
  25. package/lib/components/Select/Select.stories.d.ts +1 -0
  26. package/lib/components/StatusCard/StatusCard.stories.d.ts +11 -0
  27. package/lib/index.d.ts +7 -1
  28. package/lib/index.esm.js +99 -60
  29. package/lib/index.esm.js.map +1 -1
  30. package/lib/index.js +99 -60
  31. package/lib/index.js.map +1 -1
  32. package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +10 -0
  33. package/package.json +1 -1
  34. package/src/assets/icons/approval_pending.svg +8 -0
  35. package/src/assets/icons/configuration.svg +3 -0
  36. package/src/assets/icons/defects.svg +8 -0
  37. package/src/assets/icons/element.svg +4 -0
  38. package/src/assets/icons/project_element.svg +4 -0
  39. package/src/assets/icons/step_group.svg +10 -0
  40. package/src/assets/icons/variable.svg +3 -0
  41. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +2 -0
  42. package/src/components/AppHeader/AppHeader.scss +132 -101
  43. package/src/components/AppHeader/AppHeader.stories.tsx +13 -10
  44. package/src/components/AppHeader/AppHeader.tsx +82 -61
  45. package/src/components/Icon/iconList.ts +14 -1
  46. package/src/components/MenuOption/MenuOption.scss +17 -0
  47. package/src/components/MenuOption/MenuOption.tsx +8 -1
  48. package/src/components/MenuOption/types.ts +12 -0
  49. /package/lib/components/ExcelFile/{ColorBarselector → ColorBarSelector}/ColorBarSelector.d.ts +0 -0
@@ -6,6 +6,7 @@ import Typography from '../Typography';
6
6
  import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
7
7
  import AllProjectsDropdown from '../AllProjectsDropdown';
8
8
  import MenuOption from '../MenuOption';
9
+ import Tooltip from '../Tooltip';
9
10
 
10
11
  const AppHeader: React.FC<AppHeaderProps> = ({
11
12
  logoIconName = 'fireflink_icon',
@@ -26,7 +27,7 @@ const AppHeader: React.FC<AppHeaderProps> = ({
26
27
  onMoreMenuOptionClick = () => {},
27
28
  }) => {
28
29
  return (
29
- <>
30
+ <div className='ff-app-header-main'>
30
31
  <div className="ff-app-header">
31
32
  <div className="ff-app-header-left-container">
32
33
  <div className="ff-app-header-logo-icon">
@@ -70,79 +71,99 @@ const AppHeader: React.FC<AppHeaderProps> = ({
70
71
  {menuItem.label}
71
72
  </Typography>
72
73
  {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"
79
- >
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)
108
- }
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
- );
74
+ menuItem?.subMenuItems && (
75
+ <>
76
+ {menuItem.subMenuItems.map((subMenuItem) => {
77
+ return (
78
+ <div
79
+ key={subMenuItem.label}
80
+ className="ff-app-header-submenu-container"
81
+ >
82
+ <Typography
83
+ as="div"
84
+ className={classNames(
85
+ 'ff-app-header-nav-bar-submenu-item',
86
+ {
87
+ ['ff-app-header-nav-bar-submenu-item--selected']:
88
+ subMenuItem.label === selectedSubMenu,
126
89
  }
127
90
  )}
128
- </div>
129
- )}
130
- </div>
131
- );
132
- })}
91
+ lineHeight="18px"
92
+ onClick={() => onSubMenuClick(subMenuItem)}
93
+ >
94
+ {subMenuItem.label}
95
+ </Typography>
96
+ </div>
97
+ );
98
+ })}
99
+ {menuItem.subMenuItems.map((subMenuItem) => {
100
+ return (
101
+ <div
102
+ key={subMenuItem.label}
103
+ className="ff-app-header-submenu-container"
104
+ >
105
+ {subMenuItem.label === selectedSubMenu &&
106
+ subMenuItem?.quickMenuItems && (
107
+ <div className="ff-app-header-quickmenu-container">
108
+ <div>
109
+ <Icon name="vertical_separator" />
110
+ </div>
111
+ {subMenuItem.quickMenuItems.map(
112
+ (quickMenuItem) => {
113
+ return (
114
+ <>
115
+ <div
116
+ key={quickMenuItem.iconName}
117
+ onClick={() =>
118
+ onQuickMenuClick(
119
+ quickMenuItem
120
+ )
121
+ }
122
+ className={classNames(
123
+ 'ff-app-header-nav-bar-quickmenu-item',
124
+ {
125
+ ['ff-app-header-nav-bar-quickmenu-item--selected']:
126
+ quickMenuItem.iconName ===
127
+ selectedQuickMenu,
128
+ }
129
+ )}
130
+ >
131
+ <Tooltip title={quickMenuItem?.label}>
132
+ <Icon
133
+ name={quickMenuItem.iconName}
134
+ height={24}
135
+ width={24}
136
+ hoverEffect={true}
137
+ />
138
+ </Tooltip>
139
+ </div>
140
+ </>
141
+ );
142
+ }
143
+ )}
144
+ </div>
145
+ )}
146
+ </div>
147
+ );
148
+ })}
149
+ </>
150
+ )}
133
151
  </div>
134
152
  );
135
153
  })}
136
154
  </div>
137
155
  {appHeaderHiddenMenuItems &&
138
156
  !checkEmpty(appHeaderHiddenMenuItems) && (
139
- <div>
157
+ <div className='more-menu'>
140
158
  <MenuOption
141
159
  iconName="more"
142
160
  options={appHeaderHiddenMenuItems}
143
161
  onOptionClick={onMoreMenuOptionClick}
144
162
  variant="dark"
145
163
  dropdownPlacement="down"
164
+ zIndex={1001}
165
+ tooltipTitle='More'
166
+ optionCardVariant='primary'
146
167
  />
147
168
  </div>
148
169
  )}
@@ -152,7 +173,7 @@ const AppHeader: React.FC<AppHeaderProps> = ({
152
173
  <div className="ff-app-header-right-content">{rightContent}</div>
153
174
  )}
154
175
  </div>
155
- </>
176
+ </div>
156
177
  );
157
178
  };
158
179
  export default AppHeader;
@@ -207,7 +207,13 @@ import RunAutomationScriptsIcon from '../../assets/icons/run_automation_scripts_
207
207
  import EyeOpenIcon from '../../assets/icons/eye_open_icon.svg?react';
208
208
  import ReplaceIcon from '../../assets/icons/replace_icon.svg?react';
209
209
  import HeaderPreset from '../../assets/icons/Header_preset.svg?react';
210
-
210
+ import ProjectElement from '../../assets/icons/project_element.svg?react';
211
+ import Element from '../../assets/icons/element.svg?react';
212
+ import StepGroup from '../../assets/icons/step_group.svg?react';
213
+ import Variable from '../../assets/icons/variable.svg?react';
214
+ import Defects from '../../assets/icons/defects.svg?react';
215
+ import ApprovalPending from '../../assets/icons/approval_pending.svg?react';
216
+ import Configuration from '../../assets/icons/configuration.svg?react';
211
217
 
212
218
  Components['success'] = ToastSuccessIcon;
213
219
  Components['delete_info'] = DeleteInfoIcon;
@@ -411,5 +417,12 @@ Components['run_automation_scripts'] = RunAutomationScriptsIcon;
411
417
  Components['eye_open_icon'] = EyeOpenIcon;
412
418
  Components['replace_icon']=ReplaceIcon;
413
419
  Components['header_preset'] = HeaderPreset;
420
+ Components['project_element'] = ProjectElement;
421
+ Components['element'] = Element;
422
+ Components['step_group'] = StepGroup;
423
+ Components['variable'] = Variable;
424
+ Components['defects'] = Defects;
425
+ Components['approval_pending'] = ApprovalPending;
426
+ Components['configuration'] = Configuration;
414
427
 
415
428
  export default Components;
@@ -54,6 +54,23 @@
54
54
  min-width: 112px;
55
55
  width: max-content;
56
56
  border-radius: 4px;
57
+ &--primary{
58
+ background: var(--brand-color);
59
+ color: var(--primary-button-text-color);
60
+ svg {
61
+ path {
62
+ fill: var(--primary-icon-color);
63
+ }
64
+ }
65
+ :hover{
66
+ color: var(--brand-color);
67
+ svg {
68
+ path {
69
+ fill: var(--brand-color);
70
+ }
71
+ }
72
+ }
73
+ }
57
74
  .ff-options {
58
75
  @extend .fontSm;
59
76
  cursor: pointer;
@@ -46,6 +46,7 @@ const OptionCard = ({
46
46
  closeDropdown,
47
47
  zIndex,
48
48
  dropdownPlacement,
49
+ variant,
49
50
  }: OptionCardProps) => {
50
51
  const themeContext = useContext(ThemeContext);
51
52
  const currentTheme = themeContext?.currentTheme;
@@ -95,7 +96,11 @@ const OptionCard = ({
95
96
 
96
97
  return createPortal(
97
98
  <div
98
- className={classNames('ff-option-card', currentTheme)}
99
+ className={classNames(
100
+ 'ff-option-card',
101
+ [{ 'ff-option-card--primary': variant === 'primary' }],
102
+ currentTheme
103
+ )}
99
104
  style={{ ...style, zIndex }}
100
105
  ref={optionCardRef}
101
106
  >
@@ -121,6 +126,7 @@ const MenuOption = ({
121
126
  variant = 'light',
122
127
  zIndex = 99,
123
128
  dropdownPlacement = 'down',
129
+ optionCardVariant
124
130
  }: MenuOptionProps) => {
125
131
  const [isClicked, setIsClicked] = useState(false);
126
132
  const menuRef = useRef<HTMLDivElement>(null);
@@ -202,6 +208,7 @@ const MenuOption = ({
202
208
  closeDropdown={closeDropDown}
203
209
  zIndex={zIndex}
204
210
  dropdownPlacement={dropdownPlacement}
211
+ variant={optionCardVariant}
205
212
  />
206
213
  )}
207
214
  </div>
@@ -91,6 +91,12 @@ interface OptionCardProps {
91
91
  * @optional
92
92
  */
93
93
  dropdownPlacement?: 'top' | 'down' | 'left' | 'right';
94
+ /**
95
+ * Variant for backgroung color of options card.
96
+ * @type {string}
97
+ * @optional
98
+ */
99
+ variant?: 'primary';
94
100
  }
95
101
 
96
102
  interface MenuOptionProps {
@@ -194,6 +200,12 @@ interface MenuOptionProps {
194
200
  * @optional
195
201
  */
196
202
  zIndex?: number;
203
+ /**
204
+ * Variant for backgroung color of options card.
205
+ * @type {string}
206
+ * @optional
207
+ */
208
+ optionCardVariant?: 'primary';
197
209
  }
198
210
 
199
211
  interface OptionProps {