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.
- 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/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/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/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
- package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +6 -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/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/ExcelFile/ColorBarselector/ColorBarSelector.d.ts +8 -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/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/Form/Forms.d.ts +3 -1
- 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.d.ts +1 -1
- package/lib/components/Input/Input.stories.d.ts +9 -0
- package/lib/components/Input/types.d.ts +4 -0
- package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +9 -0
- package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +11 -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 +10 -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 +13 -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/Table/Table.stories.d.ts +13 -0
- package/lib/components/TableTree/TableTree.d.ts +2 -1
- 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 +17 -5
- package/lib/index.esm.js +212 -145
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +212 -145
- 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/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 +38 -15
- package/src/assets/Themes/DarkTheme.scss +15 -1
- package/src/assets/fonts/Poppins-Bold.woff2 +0 -0
- package/src/assets/fonts/Poppins-Medium.woff2 +0 -0
- package/src/assets/fonts/Poppins-Regular.woff2 +0 -0
- package/src/assets/fonts/Poppins-SemiBold.woff2 +0 -0
- package/src/assets/icons/Header_preset.svg +13 -0
- package/src/assets/icons/add_file.svg +16 -4
- package/src/assets/icons/eye_open_icon.svg +2 -9
- package/src/assets/icons/hide_access_icon.svg +3 -0
- package/src/assets/icons/replace_icon.svg +6 -0
- package/src/assets/styles/_fonts.scss +7 -4
- 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 +108 -101
- package/src/components/AppHeader/types.ts +1 -0
- package/src/components/AttachmentButton/AttachmentButton.tsx +10 -5
- package/src/components/EditTextField/EditTextField.tsx +3 -5
- package/src/components/Form/Form.stories.tsx +4 -8
- package/src/components/Form/Forms.tsx +11 -4
- package/src/components/Icon/iconList.ts +9 -3
- package/src/components/Input/Input.scss +5 -0
- package/src/components/Input/Input.stories.tsx +44 -0
- package/src/components/Input/Input.tsx +24 -19
- package/src/components/Input/types.ts +4 -0
- package/src/components/MenuOption/MenuOption.scss +24 -27
- package/src/components/MenuOption/MenuOption.stories.tsx +90 -35
- package/src/components/MenuOption/MenuOption.tsx +22 -20
- 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/components/TableTree/TableTree.scss +22 -7
- package/src/components/TableTree/TableTree.stories.tsx +41 -0
- package/src/components/TableTree/TableTree.tsx +55 -18
- package/src/components/Typography/Typography.scss +4 -4
- package/src/utils/capitalize/capitalize.stories.tsx +44 -0
- package/src/utils/capitalize/capitalize.tsx +4 -0
- package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
- package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
- package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
- package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
- /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
|
-
|
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:
|
12
|
+
line-height: 18px;
|
11
13
|
@include mixins.center-content();
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
-
|
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,118 @@ 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
|
+
dropdownPlacement="down"
|
146
|
+
/>
|
129
147
|
</div>
|
130
|
-
)
|
131
|
-
})}
|
148
|
+
)}
|
132
149
|
</div>
|
133
|
-
|
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
|
-
|
106
|
-
|
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
|
))}
|