pixel-react 1.2.6 → 1.2.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/components/Drawer/Types.d.ts +29 -17
- package/lib/components/{ExcelFile → Excel}/ExcelFile/ExcelFile.d.ts +1 -0
- package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/actions.d.ts +39 -10
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducer.d.ts +4 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.d.ts +40 -0
- package/lib/components/{ExcelFile → Excel}/ExcelToolBar/ExcelToolBar.d.ts +7 -3
- package/lib/components/MenuOption/MenuOption.d.ts +1 -1
- package/lib/components/MenuOption/types.d.ts +4 -0
- package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
- package/lib/components/Select/Select.stories.d.ts +1 -0
- package/lib/components/Toastify/Toastify.d.ts +5 -4
- package/lib/components/Toastify/types.d.ts +1 -0
- package/lib/index.d.ts +76 -24
- package/lib/index.esm.js +1467 -1038
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1468 -1038
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/getSequentialPayload/getSequentialPayload.d.ts +2 -0
- package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +10 -0
- package/lib/utils/getSequentialPayload/types.d.ts +30 -0
- package/package.json +3 -3
- package/src/assets/Themes/BaseTheme.scss +4 -0
- package/src/assets/icons/maximize_icon.svg +5 -0
- package/src/assets/styles/_fonts.scss +1 -1
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +15 -6
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +0 -5
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +20 -10
- package/src/components/Drawer/Drawer.scss +1 -0
- package/src/components/Drawer/Drawer.stories.tsx +8 -9
- package/src/components/Drawer/Drawer.tsx +8 -5
- package/src/components/Drawer/Types.ts +27 -14
- package/src/components/Excel/ExcelFile/ExcelFile.scss +62 -0
- package/src/components/Excel/ExcelFile/ExcelFile.tsx +312 -0
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/ActiveCell.tsx +2 -2
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Cell.tsx +3 -3
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/ColumnIndicator.tsx +4 -4
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/CornerIndicator.tsx +2 -2
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/DataEditor.tsx +1 -1
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/DataViewer.tsx +3 -3
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/FloatingRect.tsx +4 -4
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/RowIndicator.tsx +4 -4
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Spreadsheet.scss +26 -24
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Spreadsheet.tsx +13 -45
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Table.tsx +1 -1
- package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/actions.ts +88 -20
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +495 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +758 -0
- package/src/components/{ExcelFile → Excel}/ExcelFile.stories.tsx +45 -0
- package/src/components/Excel/ExcelToolBar/ExcelToolBar.scss +36 -0
- package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +346 -0
- package/src/components/Form/Form.scss +54 -35
- package/src/components/Form/Form.stories.tsx +264 -225
- package/src/components/Form/Forms.tsx +5 -1
- package/src/components/Icon/iconList.ts +2 -1
- package/src/components/Input/Input.tsx +0 -1
- package/src/components/MenuOption/MenuOption.scss +0 -1
- package/src/components/MenuOption/MenuOption.stories.tsx +3 -0
- package/src/components/MenuOption/MenuOption.tsx +5 -4
- package/src/components/MenuOption/types.ts +4 -0
- package/src/components/ModulesChip/ModuleChip.scss +2 -2
- package/src/components/ModulesChip/ModuleChip.tsx +4 -4
- package/src/components/MultiSelect/Dropdown.tsx +5 -2
- package/src/components/MultiSelect/MultiSelect.scss +16 -11
- package/src/components/MultiSelect/MultiSelect.stories.tsx +17 -13
- package/src/components/MultiSelect/MultiSelect.tsx +49 -26
- package/src/components/MultiSelect/MultiSelectTypes.ts +2 -1
- package/src/components/Select/Select.stories.tsx +161 -18
- package/src/components/Select/Select.tsx +41 -33
- package/src/components/Table/Table.scss +6 -5
- package/src/components/Table/Table.stories.tsx +0 -9
- package/src/components/Table/Table.tsx +2 -2
- package/src/components/TableTree/TableTree.scss +1 -1
- package/src/components/TableTree/TableTree.tsx +3 -1
- package/src/components/Toastify/Toastify.stories.tsx +29 -10
- package/src/components/Toastify/Toastify.tsx +42 -16
- package/src/components/Toastify/types.ts +2 -0
- package/src/components/Tooltip/Tooltip.scss +1 -1
- package/src/index.ts +4 -2
- package/src/utils/getSequentialPayload/getSequentialPayload.stories.tsx +75 -0
- package/src/utils/getSequentialPayload/getSequentialPayload.ts +29 -0
- package/src/utils/getSequentialPayload/types.ts +35 -0
- package/lib/components/AddButton/AddButton.d.ts +0 -5
- package/lib/components/AddButton/AddButton.stories.d.ts +0 -6
- package/lib/components/AddButton/index.d.ts +0 -1
- package/lib/components/AddButton/types.d.ts +0 -4
- package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +0 -14
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +0 -27
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -12
- package/lib/components/ExcelFile/ImportExcelStyles.d.ts +0 -24
- package/lib/utils/find/findAndInsert.d.ts +0 -7
- package/lib/utils/find/findAndInsert.stories.d.ts +0 -7
- package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +0 -952
- package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +0 -24
- package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +0 -162
- package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.scss +0 -16
- package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +0 -68
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +0 -19
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +0 -291
- package/src/fonts/Montserrat/Montserrat-Medium.ttf +0 -0
- package/src/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/src/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Black.ttf +0 -0
- package/src/fonts/Poppins/Poppins-BlackItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-BoldItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ExtraBold.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ExtraLight.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ExtraLightItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Italic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Light.ttf +0 -0
- package/src/fonts/Poppins/Poppins-LightItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-MediumItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-SemiBoldItalic.ttf +0 -0
- package/src/fonts/Poppins/Poppins-Thin.ttf +0 -0
- package/src/fonts/Poppins/Poppins-ThinItalic.ttf +0 -0
- /package/lib/components/{ExcelFile → Excel}/ColorBarSelector/ColorBarSelector.d.ts +0 -0
- /package/lib/components/{ExcelFile → Excel}/ContextMenu/ContextMenu.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/ActiveCell.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Cell.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/ColumnIndicator.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Copied.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/CornerIndicator.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/DataEditor.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/DataViewer.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/FloatingRect.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/HeaderRow.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Row.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/RowIndicator.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Selected.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Spreadsheet.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Table.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/areModelsEqual.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/context.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/engine.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/formula.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/index.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-graph.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-hash.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-set.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/index.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/matrix.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/point-range.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/point.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/selection.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/types.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/use-dispatch.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/use-selector.d.ts +0 -0
- /package/lib/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/util.d.ts +0 -0
- /package/lib/components/{ExcelFile → Excel}/ExcelFile.stories.d.ts +0 -0
- /package/lib/components/{ExcelFile → Excel}/Types.d.ts +0 -0
- /package/lib/components/{ExcelFile → Excel}/index.d.ts +0 -0
- /package/src/components/{ExcelFile/ColorBarselector → Excel/ColorBarSelector}/ColorBarSelector.scss +0 -0
- /package/src/components/{ExcelFile/ColorBarselector → Excel/ColorBarSelector}/ColorBarSelector.tsx +0 -0
- /package/src/components/{ExcelFile → Excel}/ContextMenu/ContextMenu.scss +0 -0
- /package/src/components/{ExcelFile → Excel}/ContextMenu/ContextMenu.tsx +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Copied.tsx +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/HeaderRow.tsx +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Row.tsx +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Selected.tsx +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/areModelsEqual.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/context.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/engine.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/formula.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/index.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-graph.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-hash.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-set.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/index.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/matrix.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/point-range.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/point.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/selection.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/types.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/typings/fast-formula-parser.d.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/use-dispatch.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/use-selector.ts +0 -0
- /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/util.ts +0 -0
- /package/src/components/{ExcelFile → Excel}/Types.ts +0 -0
- /package/src/components/{ExcelFile → Excel}/index.ts +0 -0
@@ -7,6 +7,9 @@ import Typography from '../Typography';
|
|
7
7
|
import './Form.scss';
|
8
8
|
import Checkbox from '../Checkbox';
|
9
9
|
import TextArea from '../TextArea';
|
10
|
+
import Drawer from '../Drawer';
|
11
|
+
import { useState } from 'react';
|
12
|
+
import { Container } from '../GridLayout/GridLayout';
|
10
13
|
|
11
14
|
type FormValues = {
|
12
15
|
username: string;
|
@@ -31,6 +34,7 @@ type Story = StoryObj<typeof Forms>;
|
|
31
34
|
|
32
35
|
export const WithDefaultValues: Story = {
|
33
36
|
render: () => {
|
37
|
+
const [isDrawerOpen, setIsDrawerOpen] = useState(true);
|
34
38
|
const initialFormState: FormValues = {
|
35
39
|
username: '',
|
36
40
|
email: '',
|
@@ -45,238 +49,273 @@ export const WithDefaultValues: Story = {
|
|
45
49
|
alert('Form submitted with: ' + JSON.stringify(data));
|
46
50
|
};
|
47
51
|
|
52
|
+
const pageDrawerPrimaryButton = {
|
53
|
+
label: 'Select',
|
54
|
+
disabled: false,
|
55
|
+
size: 'medium',
|
56
|
+
type: 'submit' as 'submit',
|
57
|
+
form: 'element',
|
58
|
+
};
|
59
|
+
|
60
|
+
const pageDrawerSecondaryButton = {
|
61
|
+
label: 'Cancel',
|
62
|
+
variant: 'secondary',
|
63
|
+
size: 'medium',
|
64
|
+
disabled: false,
|
65
|
+
};
|
66
|
+
|
48
67
|
return (
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
68
|
+
<Drawer
|
69
|
+
overlay
|
70
|
+
isOpen={isDrawerOpen}
|
71
|
+
title="Select Page"
|
72
|
+
onClose={() => setIsDrawerOpen(false)}
|
73
|
+
primaryButtonProps={pageDrawerPrimaryButton}
|
74
|
+
secondaryButtonProps={pageDrawerSecondaryButton}
|
75
|
+
>
|
76
|
+
<Container fluid className='ff-forms-container'>
|
77
|
+
<Forms<FormValues>
|
78
|
+
onSubmit={onSubmit}
|
79
|
+
id="element"
|
80
|
+
defaultValues={initialFormState}
|
81
|
+
>
|
82
|
+
{({
|
83
|
+
register,
|
84
|
+
formState: { errors },
|
85
|
+
setValue,
|
86
|
+
watch,
|
87
|
+
reset,
|
88
|
+
trigger,
|
89
|
+
}) => {
|
90
|
+
return (
|
91
|
+
<div className="ff-main">
|
92
|
+
{/* Username Field */}
|
93
|
+
<div>
|
94
|
+
<Typography as="label">username</Typography>
|
95
|
+
<Input
|
96
|
+
type="text"
|
97
|
+
disabled={false}
|
98
|
+
{...register('username', {
|
99
|
+
required: {
|
100
|
+
value: true,
|
101
|
+
message: 'Username is required',
|
102
|
+
},
|
103
|
+
minLength: {
|
104
|
+
value: 3,
|
105
|
+
message: 'Username must be at least 3 characters',
|
106
|
+
},
|
107
|
+
maxLength: {
|
108
|
+
value: 15,
|
109
|
+
message: 'Username must not exceed 15 characters',
|
110
|
+
},
|
111
|
+
})}
|
112
|
+
error={!!errors.username?.message}
|
113
|
+
helperText={errors.username?.message}
|
114
|
+
value={watch('username')}
|
115
|
+
onChange={(e) =>
|
116
|
+
setValue('username', e.target.value, {
|
117
|
+
shouldValidate: true,
|
118
|
+
})
|
119
|
+
}
|
120
|
+
onBlur={() => {
|
121
|
+
trigger('username');
|
122
|
+
}}
|
123
|
+
/>
|
124
|
+
</div>
|
93
125
|
|
94
|
-
|
95
|
-
|
96
|
-
|
126
|
+
{/* Email Field */}
|
127
|
+
<div>
|
128
|
+
<Typography as="label">Email</Typography>
|
97
129
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
130
|
+
<Input
|
131
|
+
type="email"
|
132
|
+
disabled={false}
|
133
|
+
{...register('email', {
|
134
|
+
required: { value: true, message: 'Email is required' },
|
135
|
+
pattern: {
|
136
|
+
value: /^\S+@\S+\.\S+$/,
|
137
|
+
message: 'Please enter a valid email',
|
138
|
+
},
|
139
|
+
})}
|
140
|
+
error={!!errors.email?.message}
|
141
|
+
helperText={errors.email?.message}
|
142
|
+
value={watch('email')}
|
143
|
+
onChange={(e) =>
|
144
|
+
setValue('email', e.target.value, {
|
145
|
+
shouldValidate: true,
|
146
|
+
})
|
147
|
+
}
|
148
|
+
onBlur={() => {
|
149
|
+
trigger('email');
|
150
|
+
}}
|
151
|
+
/>
|
152
|
+
</div>
|
119
153
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
154
|
+
{/* Password Field */}
|
155
|
+
<div>
|
156
|
+
<Typography as="label">Password</Typography>
|
157
|
+
<Input
|
158
|
+
disabled={false}
|
159
|
+
type="password"
|
160
|
+
{...register('password', {
|
161
|
+
required: {
|
162
|
+
value: true,
|
163
|
+
message: 'Password is required',
|
164
|
+
},
|
165
|
+
minLength: {
|
166
|
+
value: 6,
|
167
|
+
message: 'Password must be at least 6 characters',
|
168
|
+
},
|
169
|
+
})}
|
170
|
+
error={!!errors.password?.message}
|
171
|
+
helperText={errors.password?.message}
|
172
|
+
value={watch('password')}
|
173
|
+
onChange={(e) =>
|
174
|
+
setValue('password', e.target.value, {
|
175
|
+
shouldValidate: true,
|
176
|
+
})
|
177
|
+
}
|
178
|
+
onBlur={() => {
|
179
|
+
trigger('password');
|
180
|
+
}}
|
181
|
+
/>
|
182
|
+
</div>
|
149
183
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
184
|
+
{/* Gender Field */}
|
185
|
+
<div className="ff-radio">
|
186
|
+
<Typography as="label">Gender</Typography>
|
187
|
+
<RadioGroup
|
188
|
+
options={[
|
189
|
+
{
|
190
|
+
label: 'Male',
|
191
|
+
value: 'male',
|
192
|
+
},
|
193
|
+
{
|
194
|
+
label: 'Female',
|
195
|
+
value: 'female',
|
196
|
+
},
|
197
|
+
{
|
198
|
+
label: 'Other',
|
199
|
+
value: 'other',
|
200
|
+
},
|
201
|
+
]}
|
202
|
+
{...register('gender', {
|
203
|
+
required: {
|
204
|
+
value: true,
|
205
|
+
message: 'select the Gender',
|
206
|
+
},
|
207
|
+
})}
|
208
|
+
selectedValue={watch('gender')}
|
209
|
+
onChange={(option) => {
|
210
|
+
setValue('gender', option.value, {
|
211
|
+
shouldValidate: true,
|
212
|
+
});
|
213
|
+
}}
|
214
|
+
/>
|
215
|
+
{errors?.gender && (
|
216
|
+
<Typography className="ff-error">
|
217
|
+
{errors.gender.message}
|
218
|
+
</Typography>
|
219
|
+
)}
|
220
|
+
</div>
|
187
221
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
222
|
+
{/* Language Field */}
|
223
|
+
<div className="ff-select">
|
224
|
+
<Typography as="label">Programming Language</Typography>
|
225
|
+
<Select
|
226
|
+
optionZIndex={9999999}
|
227
|
+
optionsList={[
|
228
|
+
{ label: 'Java', value: 'Java' },
|
229
|
+
{ label: 'Rust', value: 'Rust' },
|
230
|
+
{ label: 'Dart', value: 'Dart' },
|
231
|
+
]}
|
232
|
+
selectedOption={{
|
233
|
+
label: watch('language') || 'Select a language',
|
234
|
+
value: watch('language') || '',
|
235
|
+
}}
|
236
|
+
{...register('language', {
|
237
|
+
required: {
|
238
|
+
value: true,
|
239
|
+
message: 'language is required',
|
240
|
+
},
|
241
|
+
})}
|
242
|
+
onChange={(option) =>
|
243
|
+
setValue('language', option.value, {
|
244
|
+
shouldValidate: true,
|
245
|
+
})
|
246
|
+
}
|
247
|
+
/>
|
248
|
+
{errors?.gender && (
|
249
|
+
<Typography className="ff-error">
|
250
|
+
{errors?.language?.message}
|
251
|
+
</Typography>
|
252
|
+
)}
|
253
|
+
</div>
|
217
254
|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
255
|
+
{/* TextArea Field */}
|
256
|
+
<div className="ff-textarea">
|
257
|
+
<TextArea
|
258
|
+
label="Description"
|
259
|
+
value={watch('description')}
|
260
|
+
{...register('description', {
|
261
|
+
required: 'Description is required',
|
262
|
+
maxLength: {
|
263
|
+
value: 30,
|
264
|
+
message: 'Maximum length is 200 characters',
|
265
|
+
},
|
266
|
+
})}
|
267
|
+
error={!!errors?.description?.message}
|
268
|
+
onChange={(e) => {
|
269
|
+
setValue('description', e.target.value, {
|
270
|
+
shouldValidate: true,
|
271
|
+
});
|
272
|
+
}}
|
273
|
+
onBlur={() => {
|
274
|
+
trigger('description');
|
275
|
+
}}
|
276
|
+
/>
|
277
|
+
</div>
|
278
|
+
{/* check box Field */}
|
279
|
+
<div className="ff-check">
|
280
|
+
<Checkbox
|
281
|
+
label="terms condition"
|
282
|
+
disabled={false}
|
283
|
+
checked={watch('check')}
|
284
|
+
{...register('check', {
|
285
|
+
required: {
|
286
|
+
value: true,
|
287
|
+
message: 'Please select the checkbox',
|
288
|
+
},
|
289
|
+
})}
|
290
|
+
onChange={(e) => {
|
291
|
+
setValue('check', e.target.checked, {
|
292
|
+
shouldValidate: true,
|
293
|
+
});
|
294
|
+
}}
|
295
|
+
/>
|
296
|
+
{errors?.check && (
|
297
|
+
<Typography className="ff-error">
|
298
|
+
{errors.check.message}
|
299
|
+
</Typography>
|
300
|
+
)}
|
301
|
+
</div>
|
302
|
+
{/* Buttons */}
|
303
|
+
<div className="ff-button-layout">
|
304
|
+
<button
|
305
|
+
type="button"
|
306
|
+
onClick={() => {
|
307
|
+
reset(initialFormState);
|
308
|
+
}}
|
309
|
+
>
|
310
|
+
Reset
|
311
|
+
</button>
|
312
|
+
</div>
|
313
|
+
</div>
|
314
|
+
);
|
315
|
+
}}
|
316
|
+
</Forms>
|
317
|
+
</Container>
|
318
|
+
</Drawer>
|
280
319
|
);
|
281
320
|
},
|
282
321
|
};
|
@@ -17,7 +17,11 @@ const Forms = <T extends Form.FieldValues>({
|
|
17
17
|
|
18
18
|
const { handleSubmit } = methods;
|
19
19
|
|
20
|
-
return
|
20
|
+
return (
|
21
|
+
<form id={id} onSubmit={handleSubmit(onSubmit)}>
|
22
|
+
{children(methods)}
|
23
|
+
</form>
|
24
|
+
);
|
21
25
|
};
|
22
26
|
|
23
27
|
export default Forms;
|
@@ -143,6 +143,7 @@ import LinuxIcon from '../../assets/icons/linux.svg?react';
|
|
143
143
|
import OperaIcon from '../../assets/icons/opera.svg?react';
|
144
144
|
import SafariIcon from '../../assets/icons/safari_icon.svg?react';
|
145
145
|
import MaximizeScript from '../../assets/icons/maximize_script.svg?react';
|
146
|
+
import MaximizeIcon from '../../assets/icons/maximize_icon.svg?react';
|
146
147
|
|
147
148
|
Components['delete_info'] = DeleteInfoIcon;
|
148
149
|
Components['success'] = ToastSuccessIcon;
|
@@ -285,6 +286,6 @@ Components['linux'] = LinuxIcon;
|
|
285
286
|
Components['opera'] = OperaIcon;
|
286
287
|
Components['safari_icon'] = SafariIcon;
|
287
288
|
Components['maximize_script'] = MaximizeScript;
|
288
|
-
|
289
|
+
Components['maximize_icon'] = MaximizeIcon;
|
289
290
|
|
290
291
|
export default Components;
|
@@ -28,6 +28,7 @@ export const DefaultMenuOption: Story = {
|
|
28
28
|
icon: 'success',
|
29
29
|
},
|
30
30
|
],
|
31
|
+
zIndex:1000000,
|
31
32
|
},
|
32
33
|
};
|
33
34
|
|
@@ -139,6 +140,7 @@ export const MenuOptionWithDisabledHoverEffect: Story = {
|
|
139
140
|
icon: 'success',
|
140
141
|
},
|
141
142
|
];
|
143
|
+
const zIndex=1000000;
|
142
144
|
return (
|
143
145
|
<MenuOption
|
144
146
|
iconName="more"
|
@@ -146,6 +148,7 @@ export const MenuOptionWithDisabledHoverEffect: Story = {
|
|
146
148
|
tooltipPlacement="top"
|
147
149
|
dropdownPlacement="right"
|
148
150
|
options={options}
|
151
|
+
zIndex={zIndex}
|
149
152
|
/>
|
150
153
|
);
|
151
154
|
},
|
@@ -52,6 +52,7 @@ const MenuOption = ({
|
|
52
52
|
iconButtonBorderRadius = 7,
|
53
53
|
iconSize = 16,
|
54
54
|
variant = 'light',
|
55
|
+
zIndex=1000,
|
55
56
|
}: MenuOptionProps) => {
|
56
57
|
const [isClicked, setIsClicked] = useState(false);
|
57
58
|
const menuRef = useRef<HTMLDivElement>(null);
|
@@ -71,14 +72,14 @@ const MenuOption = ({
|
|
71
72
|
const dropdownPositionStyles = () => {
|
72
73
|
switch (dropdownPlacement) {
|
73
74
|
case 'top':
|
74
|
-
return { bottom: '100%', left: -2 };
|
75
|
+
return { bottom: '100%', left: -2 ,zIndex};
|
75
76
|
case 'left':
|
76
|
-
return { top: -2, right: '100%' };
|
77
|
+
return { top: -2, right: '100%' ,zIndex};
|
77
78
|
case 'right':
|
78
|
-
return { top: -2, left: '100%' };
|
79
|
+
return { top: -2, left: '100%' ,zIndex};
|
79
80
|
case 'down':
|
80
81
|
default:
|
81
|
-
return { top: '100%', left: -2 };
|
82
|
+
return { top: '100%', left: -2 ,zIndex};
|
82
83
|
}
|
83
84
|
};
|
84
85
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
@use '../../assets/styles/fonts';
|
2
2
|
@use '../../assets/styles/mixins';
|
3
3
|
|
4
|
-
.ff-
|
4
|
+
.ff-Module-chip {
|
5
5
|
width: 75px;
|
6
6
|
height: 32px;
|
7
7
|
border: 0.5px solid;
|
@@ -9,7 +9,7 @@
|
|
9
9
|
color: var(--brand-color);
|
10
10
|
cursor: pointer;
|
11
11
|
@include mixins.center-content();
|
12
|
-
.ff-label-chip {
|
12
|
+
.ff-Module-label-chip {
|
13
13
|
&--active {
|
14
14
|
color: var(--ff-header-text-color);
|
15
15
|
}
|