pixel-react 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- package/.yarn/install-state.gz +0 -0
- package/lib/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +6 -0
- package/lib/StyleGuide/Typography/Typography.stories.d.ts +6 -0
- package/lib/components/Accordion/Accordion.stories.d.ts +6 -0
- package/lib/components/AddButton/AddButton.d.ts +5 -0
- package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
- package/lib/components/AddButton/index.d.ts +1 -0
- package/lib/components/AddButton/types.d.ts +4 -0
- package/lib/components/AddResourceButton/AddButton.stories.d.ts +8 -0
- package/lib/components/AllProjectsDropdown/AllProjectsDropdown.d.ts +1 -1
- package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +7 -0
- package/lib/components/AllProjectsDropdown/types.d.ts +2 -0
- package/lib/components/AppHeader/AppHeader.stories.d.ts +7 -0
- package/lib/components/AppHeader/types.d.ts +1 -0
- package/lib/components/AttachImage/AttachImage.stories.d.ts +7 -0
- package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +9 -0
- package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
- package/lib/components/Button/Button.stories.d.ts +13 -0
- package/lib/components/Charts/BarChart/BarChart.stories.d.ts +6 -0
- package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
- package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +6 -0
- package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +8 -0
- package/lib/components/Charts/LineChart/LineChart.stories.d.ts +7 -0
- package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +8 -0
- package/lib/components/Charts/PieChart/PieChart.stories.d.ts +7 -0
- package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +6 -0
- package/lib/components/Checkbox/Checkbox.stories.d.ts +8 -0
- package/lib/components/Chip/Chip.stories.d.ts +14 -0
- package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +6 -0
- package/lib/components/DatePicker/DatePicker.stories.d.ts +9 -0
- package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +6 -0
- package/lib/components/Drawer/Drawer.stories.d.ts +12 -0
- package/lib/components/EditTextField/EditTextField.stories.d.ts +10 -0
- package/lib/components/Editor/Editor.stories.d.ts +6 -0
- package/lib/components/Excel/ExcelFile.stories.d.ts +6 -0
- package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
- package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +8 -0
- package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +80 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +174 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +178 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +44 -0
- package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +19 -0
- package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +12 -0
- package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +15 -0
- package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
- package/lib/components/ExcelFile/Types.d.ts +129 -0
- package/lib/components/ExcelFile/index.d.ts +1 -0
- package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +7 -0
- package/lib/components/FF_Captcha/captcha.stories.d.ts +8 -0
- package/lib/components/FileDropzone/FileDropzone.stories.d.ts +8 -0
- package/lib/components/Form/Form.stories.d.ts +7 -0
- package/lib/components/GridLayout/GridLayout.stories.d.ts +8 -0
- package/lib/components/HighlightText/HighlightText.stories.d.ts +6 -0
- package/lib/components/Icon/Icon.stories.d.ts +8 -0
- package/lib/components/IconButton/IconButton.stories.d.ts +7 -0
- package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
- package/lib/components/Input/Input.stories.d.ts +9 -0
- package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +9 -0
- package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +13 -0
- package/lib/components/LazyLoad/LazyLoad.stories.d.ts +6 -0
- package/lib/components/MachineInputField/MachineInputField.stories.d.ts +6 -0
- package/lib/components/MenuOption/MenuOption.stories.d.ts +16 -0
- package/lib/components/MenuOption/types.d.ts +1 -1
- package/lib/components/MiniModal/MiniModal.stories.d.ts +10 -0
- package/lib/components/Modal/Modal.stories.d.ts +7 -0
- package/lib/components/Modal/types.d.ts +4 -2
- package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
- package/lib/components/MultiSelect/MultiSelect.stories.d.ts +11 -0
- package/lib/components/NLPInput/NlpInput.stories.d.ts +7 -0
- package/lib/components/Paper/Paper.stories.d.ts +11 -0
- package/lib/components/RadioButton/RadioButton.stories.d.ts +10 -0
- package/lib/components/RadioGroup/RadioGroup.stories.d.ts +9 -0
- package/lib/components/Search/Search.stories.d.ts +6 -0
- package/lib/components/Select/Select.stories.d.ts +14 -0
- package/lib/components/Select/components/Dropdown/Dropdown.d.ts +4 -0
- package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +17 -0
- package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +6 -0
- package/lib/components/StateDropdown/StateDropdown.stories.d.ts +10 -0
- package/lib/components/StatusButton/StatusButton.stories.d.ts +14 -0
- package/lib/components/StatusCard/StatusCard.stories.d.ts +11 -0
- package/lib/components/Table/Table.stories.d.ts +13 -0
- package/lib/components/TableTree/TableTree.stories.d.ts +7 -0
- package/lib/components/Tabs/Tabs.stories.d.ts +9 -0
- package/lib/components/TextArea/Textarea.stories.d.ts +9 -0
- package/lib/components/Toast/Toast.stories.d.ts +6 -0
- package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
- package/lib/components/Toggle/Toggle.stories.d.ts +12 -0
- package/lib/components/Tooltip/Tooltip.stories.d.ts +15 -0
- package/lib/components/Typography/Typography.stories.d.ts +10 -0
- package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
- package/lib/index.d.ts +7 -2
- package/lib/index.esm.js +116 -87
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +116 -87
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/capitalize/capitalize.d.ts +1 -0
- package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +6 -0
- package/lib/utils/compareArrays/compareArrays.stories.d.ts +6 -0
- package/lib/utils/compareObjects/compareObjects.stories.d.ts +6 -0
- package/lib/utils/debounce/debounce.stories.d.ts +6 -0
- package/lib/utils/ffID/ffID.stories.d.ts +6 -0
- package/lib/utils/find/findAndInsert.d.ts +7 -0
- package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
- package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
- package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +6 -0
- package/lib/utils/getExtension/getExtension.stories.d.ts +6 -0
- package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +10 -0
- package/lib/utils/throttle/throttle.stories.d.ts +6 -0
- package/lib/utils/truncateText/truncateText.stories.d.ts +6 -0
- package/package.json +2 -2
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +82 -12
- package/src/assets/Themes/BaseTheme.scss +36 -15
- package/src/assets/Themes/DarkTheme.scss +15 -1
- package/src/assets/icons/hide_access_icon.svg +3 -0
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +58 -8
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +83 -75
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +31 -18
- package/src/components/AllProjectsDropdown/types.ts +2 -0
- package/src/components/AppHeader/AppHeader.scss +2 -2
- package/src/components/AppHeader/AppHeader.stories.tsx +5 -1
- package/src/components/AppHeader/AppHeader.tsx +107 -101
- package/src/components/AppHeader/types.ts +1 -0
- package/src/components/EditTextField/EditTextField.tsx +3 -5
- package/src/components/Icon/iconList.ts +2 -2
- package/src/components/MenuOption/MenuOption.scss +24 -27
- package/src/components/MenuOption/MenuOption.stories.tsx +90 -35
- package/src/components/MenuOption/MenuOption.tsx +18 -16
- package/src/components/MenuOption/types.ts +1 -1
- package/src/components/Modal/Modal.stories.tsx +2 -2
- package/src/components/Modal/Modal.tsx +6 -2
- package/src/components/Modal/modal.scss +2 -3
- package/src/components/Modal/types.ts +4 -2
- package/src/utils/capitalize/capitalize.stories.tsx +44 -0
- package/src/utils/capitalize/capitalize.tsx +4 -0
@@ -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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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
|
-
<
|
101
|
-
|
102
|
-
|
103
|
-
|
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
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
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 && (
|
@@ -3,8 +3,7 @@
|
|
3
3
|
justify-content: space-between;
|
4
4
|
background-color: var(--brand-color);
|
5
5
|
padding-left: 8px;
|
6
|
-
|
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,117 @@ const AppHeader: React.FC<AppHeaderProps> = ({
|
|
35
36
|
<div className="ff-app-header-left-content">{leftContent}</div>
|
36
37
|
)}
|
37
38
|
</div>
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
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
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
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
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
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
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
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
|
+
/>
|
129
146
|
</div>
|
130
|
-
)
|
131
|
-
})}
|
147
|
+
)}
|
132
148
|
</div>
|
133
|
-
|
134
|
-
<div>
|
135
|
-
<MenuOption
|
136
|
-
iconName="more"
|
137
|
-
options={appHeaderHiddenMenuItems}
|
138
|
-
onOptionClick={onMoreMenuOptionClick}
|
139
|
-
variant='dark'
|
140
|
-
/>
|
141
|
-
</div>
|
142
|
-
)}
|
143
|
-
</div>
|
149
|
+
)}
|
144
150
|
{rightContent && (
|
145
151
|
<div className="ff-app-header-right-content">{rightContent}</div>
|
146
152
|
)}
|
@@ -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 Typography from '../Typography';
|
|
5
5
|
import HighlightText from '../HighlightText';
|
6
6
|
import Icon from '../Icon';
|
7
7
|
import Tooltip from '../Tooltip';
|
8
|
+
import { capitalize } from '../../utils/capitalize/capitalize';
|
8
9
|
|
9
10
|
const getErrorMessage = (
|
10
11
|
inputValue: string,
|
@@ -91,10 +92,7 @@ const EditTextField: FC<LabelEditTextFieldTypes> = ({
|
|
91
92
|
};
|
92
93
|
|
93
94
|
return (
|
94
|
-
<div
|
95
|
-
className="ff-label-edit-text-field"
|
96
|
-
ref={containerRef}
|
97
|
-
>
|
95
|
+
<div className="ff-label-edit-text-field" ref={containerRef}>
|
98
96
|
{isEditing ? (
|
99
97
|
<div className="ff-label-text-field">
|
100
98
|
<div className="ff-label-text-field-without-dropdown">
|
@@ -159,7 +157,7 @@ const EditTextField: FC<LabelEditTextFieldTypes> = ({
|
|
159
157
|
<HighlightText text={inputValue} highlight={highlightText} />
|
160
158
|
</span>
|
161
159
|
)}
|
162
|
-
<Tooltip title={editIcon?.name ?? '
|
160
|
+
<Tooltip title={capitalize(editIcon?.name || '') ?? 'Edit'}>
|
163
161
|
<Icon
|
164
162
|
color={editIcon?.color ?? 'var(--label-edit-cancel-icon)'}
|
165
163
|
height={editIcon?.height ?? 20}
|
@@ -111,6 +111,7 @@ import AndroidIcon from '../../assets/icons/android_icon.svg?react';
|
|
111
111
|
import NoAccessIcon from '../../assets/icons/no_access_icon.svg?react';
|
112
112
|
import FullAccessIcon from '../../assets/icons/full_access_icon.svg?react';
|
113
113
|
import ViewAccessIcon from '../../assets/icons/view_access_icon.svg?react';
|
114
|
+
import HideAccessIcon from '../../assets/icons/hide_access_icon.svg?react';
|
114
115
|
import AddLocator from '../../assets/icons/add_locator.svg?react';
|
115
116
|
import PlusUserIcon from '../../assets/icons/plus_user_icon.svg?react';
|
116
117
|
|
@@ -248,7 +249,6 @@ Components['impactList'] = ImpactListIcon;
|
|
248
249
|
Components['beautify_icon'] = BeautifyIcon;
|
249
250
|
Components['add_variable'] = AddVariable;
|
250
251
|
|
251
|
-
|
252
252
|
Components['formate_painter'] = FormatePainter;
|
253
253
|
Components['bold'] = Bold;
|
254
254
|
Components['italic'] = Italic;
|
@@ -345,6 +345,7 @@ Components['linked_defects'] = LinkedDefects;
|
|
345
345
|
Components['no_access_icon'] = NoAccessIcon;
|
346
346
|
Components['full_access_icon'] = FullAccessIcon;
|
347
347
|
Components['view_access_icon'] = ViewAccessIcon;
|
348
|
+
Components['hide_access_icon'] = HideAccessIcon;
|
348
349
|
Components['eye_closed'] = EyeClosed;
|
349
350
|
Components['attachment_icon'] = AttachmentIcon;
|
350
351
|
Components['authorization_icon'] = AuthorizationIcon;
|
@@ -405,5 +406,4 @@ Components['run_manual_testcase'] = RunManualTestcaseIcon;
|
|
405
406
|
Components['run_automation_scripts'] = RunAutomationScriptsIcon;
|
406
407
|
Components['eye_open_icon'] = EyeOpenIcon;
|
407
408
|
|
408
|
-
|
409
409
|
export default Components;
|
@@ -47,37 +47,34 @@
|
|
47
47
|
.ff-option-card {
|
48
48
|
position: fixed;
|
49
49
|
margin: 4px;
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
50
|
+
border: 1px solid var(--option-card-border-color);
|
51
|
+
background: var(--option-card-bg-color);
|
52
|
+
overflow: hidden;
|
53
|
+
min-height: 32px;
|
54
|
+
min-width: 112px;
|
55
|
+
width: max-content;
|
56
|
+
border-radius: 4px;
|
57
|
+
.ff-options {
|
58
|
+
@extend .fontSm;
|
59
|
+
cursor: pointer;
|
60
|
+
border-radius: 3px;
|
61
|
+
display: flex;
|
62
|
+
align-items: center;
|
63
|
+
padding: 8px;
|
64
|
+
gap: 8px;
|
65
|
+
&:hover {
|
66
|
+
background-color: var(--hover-color);
|
67
|
+
}
|
68
|
+
label {
|
61
69
|
cursor: pointer;
|
62
|
-
border-radius: 3px;
|
63
|
-
display: flex;
|
64
|
-
align-items: center;
|
65
|
-
padding: 8px;
|
66
|
-
gap: 8px;
|
67
|
-
&:hover {
|
68
|
-
background-color: var(--hover-color);
|
69
|
-
}
|
70
|
-
label {
|
71
|
-
cursor: pointer;
|
72
|
-
}
|
73
70
|
}
|
71
|
+
}
|
74
72
|
|
75
|
-
|
76
|
-
|
73
|
+
.ff-disable-option {
|
74
|
+
opacity: 0.5;
|
75
|
+
cursor: no-drop;
|
76
|
+
label {
|
77
77
|
cursor: no-drop;
|
78
|
-
label {
|
79
|
-
cursor: no-drop;
|
80
|
-
}
|
81
78
|
}
|
82
79
|
}
|
83
80
|
}
|