pixel-react 1.2.7 → 1.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. package/lib/components/Drawer/Types.d.ts +23 -12
  2. package/lib/components/Editor/Editor.d.ts +5 -0
  3. package/lib/components/Editor/Editor.stories.d.ts +6 -0
  4. package/lib/components/Editor/VariableDropdown.d.ts +5 -0
  5. package/lib/components/Editor/constants.d.ts +3 -0
  6. package/lib/components/Editor/index.d.ts +1 -0
  7. package/lib/components/Editor/types.d.ts +71 -0
  8. package/lib/components/Excel/ContextMenu/ContextMenu.d.ts +4 -0
  9. package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +20 -0
  10. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.d.ts +7 -0
  11. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Cell.d.ts +4 -0
  12. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.d.ts +5 -0
  13. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Copied.d.ts +3 -0
  14. package/lib/components/Excel/ExcelFile/ExcelFileComponents/CornerIndicator.d.ts +5 -0
  15. package/lib/components/Excel/ExcelFile/ExcelFileComponents/DataEditor.d.ts +5 -0
  16. package/lib/components/Excel/ExcelFile/ExcelFileComponents/DataViewer.d.ts +8 -0
  17. package/lib/components/Excel/ExcelFile/ExcelFileComponents/FloatingRect.d.ts +10 -0
  18. package/lib/components/Excel/ExcelFile/ExcelFileComponents/HeaderRow.d.ts +3 -0
  19. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Row.d.ts +3 -0
  20. package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.d.ts +5 -0
  21. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Selected.d.ts +3 -0
  22. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +80 -0
  23. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Table.d.ts +3 -0
  24. package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +203 -0
  25. package/lib/components/Excel/ExcelFile/ExcelFileComponents/areModelsEqual.d.ts +1 -0
  26. package/lib/components/Excel/ExcelFile/ExcelFileComponents/context.d.ts +8 -0
  27. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/engine.d.ts +22 -0
  28. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/formula.d.ts +17 -0
  29. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/index.d.ts +2 -0
  30. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/point-graph.d.ts +21 -0
  31. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/point-hash.d.ts +3 -0
  32. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/point-set.d.ts +24 -0
  33. package/lib/components/Excel/ExcelFile/ExcelFileComponents/index.d.ts +13 -0
  34. package/lib/components/Excel/ExcelFile/ExcelFileComponents/matrix.d.ts +67 -0
  35. package/lib/components/Excel/ExcelFile/ExcelFileComponents/point-range.d.ts +22 -0
  36. package/lib/components/Excel/ExcelFile/ExcelFileComponents/point.d.ts +11 -0
  37. package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducer.d.ts +4 -0
  38. package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.d.ts +40 -0
  39. package/lib/components/Excel/ExcelFile/ExcelFileComponents/selection.d.ts +95 -0
  40. package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +178 -0
  41. package/lib/components/Excel/ExcelFile/ExcelFileComponents/use-dispatch.d.ts +3 -0
  42. package/lib/components/Excel/ExcelFile/ExcelFileComponents/use-selector.d.ts +3 -0
  43. package/lib/components/Excel/ExcelFile/ExcelFileComponents/util.d.ts +44 -0
  44. package/lib/components/Excel/ExcelFile.stories.d.ts +6 -0
  45. package/lib/components/Excel/ExcelToolBar/ExcelToolBar.d.ts +19 -0
  46. package/lib/components/Excel/Types.d.ts +129 -0
  47. package/lib/components/Excel/index.d.ts +1 -0
  48. package/lib/components/ExcelFile/ColorBarselector/ColorBarSelector.d.ts +8 -0
  49. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +2 -2
  50. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +2 -2
  51. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +1 -1
  52. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +2 -2
  53. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +2 -2
  54. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +2 -2
  55. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +2 -2
  56. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +1 -1
  57. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +1 -1
  58. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +2 -2
  59. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +1 -1
  60. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +7 -6
  61. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +1 -1
  62. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +5 -49
  63. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +3 -3
  64. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +5 -5
  65. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +6 -6
  66. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -2
  67. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +2 -2
  68. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +1 -1
  69. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +1 -1
  70. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +11 -11
  71. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +1 -1
  72. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +1 -1
  73. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +5 -5
  74. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +3 -3
  75. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +48 -11
  76. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +1 -1
  77. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +1 -1
  78. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +12 -11
  79. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +0 -16
  80. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +3 -0
  81. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +0 -12
  82. package/lib/components/ExcelFile/Types.d.ts +49 -2
  83. package/lib/components/InputWithDropdown/InputWithDropdown.d.ts +1 -1
  84. package/lib/components/InputWithDropdown/types.d.ts +3 -1
  85. package/lib/components/MenuOption/MenuOption.d.ts +1 -1
  86. package/lib/components/MenuOption/types.d.ts +4 -0
  87. package/lib/components/Select/Select.d.ts +3 -2
  88. package/lib/components/Select/Select.stories.d.ts +1 -0
  89. package/lib/components/Select/components/Dropdown.d.ts +5 -0
  90. package/lib/components/Select/components/types.d.ts +18 -0
  91. package/lib/components/Select/types.d.ts +2 -42
  92. package/lib/components/Toastify/Toastify.d.ts +5 -4
  93. package/lib/components/Toastify/types.d.ts +1 -0
  94. package/lib/index.d.ts +75 -30
  95. package/lib/index.esm.js +1734 -1441
  96. package/lib/index.esm.js.map +1 -1
  97. package/lib/index.js +1734 -1440
  98. package/lib/index.js.map +1 -1
  99. package/lib/tsconfig.tsbuildinfo +1 -1
  100. package/lib/utils/getSequentialPayload/getSequentialPayload.d.ts +2 -0
  101. package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +10 -0
  102. package/lib/utils/getSequentialPayload/types.d.ts +30 -0
  103. package/package.json +1 -1
  104. package/src/assets/Themes/BaseTheme.scss +5 -0
  105. package/src/assets/Themes/DarkTheme.scss +2 -0
  106. package/src/assets/icons/maximize_icon.svg +5 -0
  107. package/src/assets/styles/_fonts.scss +1 -1
  108. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +15 -6
  109. package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +0 -5
  110. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +20 -10
  111. package/src/components/Drawer/Drawer.scss +1 -0
  112. package/src/components/Drawer/Types.ts +24 -13
  113. package/src/components/Excel/ExcelFile/ExcelFile.scss +62 -0
  114. package/src/components/Excel/ExcelFile/ExcelFile.tsx +312 -0
  115. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/ActiveCell.tsx +2 -2
  116. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Cell.tsx +3 -3
  117. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/ColumnIndicator.tsx +4 -4
  118. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/CornerIndicator.tsx +2 -2
  119. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/DataEditor.tsx +1 -1
  120. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/DataViewer.tsx +3 -3
  121. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/FloatingRect.tsx +4 -4
  122. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/RowIndicator.tsx +4 -4
  123. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Spreadsheet.scss +26 -24
  124. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Spreadsheet.tsx +13 -45
  125. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Table.tsx +1 -1
  126. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/actions.ts +88 -20
  127. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +495 -0
  128. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +758 -0
  129. package/src/components/{ExcelFile → Excel}/ExcelFile.stories.tsx +45 -0
  130. package/src/components/Excel/ExcelToolBar/ExcelToolBar.scss +36 -0
  131. package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +346 -0
  132. package/src/components/Form/Form.scss +54 -35
  133. package/src/components/Form/Form.stories.tsx +264 -225
  134. package/src/components/Icon/Icons.scss +4 -0
  135. package/src/components/Icon/iconList.ts +2 -1
  136. package/src/components/Input/Input.tsx +0 -1
  137. package/src/components/InputWithDropdown/InputWithDropdown.scss +30 -1
  138. package/src/components/InputWithDropdown/InputWithDropdown.tsx +45 -16
  139. package/src/components/InputWithDropdown/types.ts +5 -1
  140. package/src/components/MenuOption/MenuOption.scss +0 -1
  141. package/src/components/MenuOption/MenuOption.stories.tsx +3 -0
  142. package/src/components/MenuOption/MenuOption.tsx +5 -4
  143. package/src/components/MenuOption/types.ts +4 -0
  144. package/src/components/MultiSelect/MultiSelect.scss +5 -1
  145. package/src/components/MultiSelect/MultiSelect.stories.tsx +17 -13
  146. package/src/components/MultiSelect/MultiSelect.tsx +27 -14
  147. package/src/components/Select/Select.scss +121 -188
  148. package/src/components/Select/Select.stories.tsx +164 -18
  149. package/src/components/Select/Select.tsx +142 -290
  150. package/src/components/Select/components/Dropdown.scss +50 -0
  151. package/src/components/Select/components/Dropdown.tsx +94 -0
  152. package/src/components/Select/components/types.ts +20 -0
  153. package/src/components/Select/types.ts +15 -39
  154. package/src/components/Table/Table.scss +6 -5
  155. package/src/components/Table/Table.stories.tsx +0 -9
  156. package/src/components/Table/Table.tsx +2 -2
  157. package/src/components/TableTree/TableTree.scss +1 -1
  158. package/src/components/TableTree/TableTree.tsx +3 -1
  159. package/src/components/Toastify/Toastify.stories.tsx +29 -10
  160. package/src/components/Toastify/Toastify.tsx +42 -16
  161. package/src/components/Toastify/types.ts +2 -0
  162. package/src/index.ts +4 -2
  163. package/src/utils/getSelectOptionValue/getSelectOptionValue.ts +1 -1
  164. package/src/utils/getSequentialPayload/getSequentialPayload.stories.tsx +75 -0
  165. package/src/utils/getSequentialPayload/getSequentialPayload.ts +29 -0
  166. package/src/utils/getSequentialPayload/types.ts +35 -0
  167. package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +0 -952
  168. package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +0 -24
  169. package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +0 -162
  170. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.scss +0 -16
  171. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +0 -68
  172. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +0 -19
  173. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +0 -291
  174. package/src/fonts/Montserrat/Montserrat-Medium.ttf +0 -0
  175. package/src/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  176. package/src/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
  177. package/src/fonts/Poppins/Poppins-Black.ttf +0 -0
  178. package/src/fonts/Poppins/Poppins-BlackItalic.ttf +0 -0
  179. package/src/fonts/Poppins/Poppins-BoldItalic.ttf +0 -0
  180. package/src/fonts/Poppins/Poppins-ExtraBold.ttf +0 -0
  181. package/src/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +0 -0
  182. package/src/fonts/Poppins/Poppins-ExtraLight.ttf +0 -0
  183. package/src/fonts/Poppins/Poppins-ExtraLightItalic.ttf +0 -0
  184. package/src/fonts/Poppins/Poppins-Italic.ttf +0 -0
  185. package/src/fonts/Poppins/Poppins-Light.ttf +0 -0
  186. package/src/fonts/Poppins/Poppins-LightItalic.ttf +0 -0
  187. package/src/fonts/Poppins/Poppins-MediumItalic.ttf +0 -0
  188. package/src/fonts/Poppins/Poppins-SemiBoldItalic.ttf +0 -0
  189. package/src/fonts/Poppins/Poppins-Thin.ttf +0 -0
  190. package/src/fonts/Poppins/Poppins-ThinItalic.ttf +0 -0
  191. /package/lib/components/{ExcelFile → Excel}/ColorBarSelector/ColorBarSelector.d.ts +0 -0
  192. /package/src/components/{ExcelFile/ColorBarselector → Excel/ColorBarSelector}/ColorBarSelector.scss +0 -0
  193. /package/src/components/{ExcelFile/ColorBarselector → Excel/ColorBarSelector}/ColorBarSelector.tsx +0 -0
  194. /package/src/components/{ExcelFile → Excel}/ContextMenu/ContextMenu.scss +0 -0
  195. /package/src/components/{ExcelFile → Excel}/ContextMenu/ContextMenu.tsx +0 -0
  196. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Copied.tsx +0 -0
  197. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/HeaderRow.tsx +0 -0
  198. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Row.tsx +0 -0
  199. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Selected.tsx +0 -0
  200. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/areModelsEqual.ts +0 -0
  201. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/context.ts +0 -0
  202. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/engine.ts +0 -0
  203. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/formula.ts +0 -0
  204. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/index.ts +0 -0
  205. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-graph.ts +0 -0
  206. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-hash.ts +0 -0
  207. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-set.ts +0 -0
  208. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/index.ts +0 -0
  209. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/matrix.ts +0 -0
  210. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/point-range.ts +0 -0
  211. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/point.ts +0 -0
  212. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/selection.ts +0 -0
  213. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/types.ts +0 -0
  214. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/typings/fast-formula-parser.d.ts +0 -0
  215. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/use-dispatch.ts +0 -0
  216. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/use-selector.ts +0 -0
  217. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/util.ts +0 -0
  218. /package/src/components/{ExcelFile → Excel}/Types.ts +0 -0
  219. /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
- <Forms<FormValues> onSubmit={onSubmit} defaultValues={initialFormState}>
50
- {({
51
- register,
52
- formState: { errors },
53
- setValue,
54
- watch,
55
- reset,
56
- trigger,
57
- }) => {
58
- return (
59
- <div className="ff-main">
60
- {/* Username Field */}
61
- <div>
62
- <Typography as="label">username</Typography>
63
- <Input
64
- type="text"
65
- disabled={false}
66
- {...register('username', {
67
- required: {
68
- value: true,
69
- message: 'Username is required',
70
- },
71
- minLength: {
72
- value: 3,
73
- message: 'Username must be at least 3 characters',
74
- },
75
- maxLength: {
76
- value: 15,
77
- message: 'Username must not exceed 15 characters',
78
- },
79
- })}
80
- error={!!errors.username?.message}
81
- helperText={errors.username?.message}
82
- value={watch('username')}
83
- onChange={(e) =>
84
- setValue('username', e.target.value, {
85
- shouldValidate: true,
86
- })
87
- }
88
- onBlur={() => {
89
- trigger('username');
90
- }}
91
- />
92
- </div>
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
- {/* Email Field */}
95
- <div>
96
- <Typography as="label">Email</Typography>
126
+ {/* Email Field */}
127
+ <div>
128
+ <Typography as="label">Email</Typography>
97
129
 
98
- <Input
99
- type="email"
100
- disabled={false}
101
- {...register('email', {
102
- required: { value: true, message: 'Email is required' },
103
- pattern: {
104
- value: /^\S+@\S+\.\S+$/,
105
- message: 'Please enter a valid email',
106
- },
107
- })}
108
- error={!!errors.email?.message}
109
- helperText={errors.email?.message}
110
- value={watch('email')}
111
- onChange={(e) =>
112
- setValue('email', e.target.value, { shouldValidate: true })
113
- }
114
- onBlur={() => {
115
- trigger('email');
116
- }}
117
- />
118
- </div>
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
- {/* Password Field */}
121
- <div>
122
- <Typography as="label">Password</Typography>
123
- <Input
124
- disabled={false}
125
- type="password"
126
- {...register('password', {
127
- required: {
128
- value: true,
129
- message: 'Password is required',
130
- },
131
- minLength: {
132
- value: 6,
133
- message: 'Password must be at least 6 characters',
134
- },
135
- })}
136
- error={!!errors.password?.message}
137
- helperText={errors.password?.message}
138
- value={watch('password')}
139
- onChange={(e) =>
140
- setValue('password', e.target.value, {
141
- shouldValidate: true,
142
- })
143
- }
144
- onBlur={() => {
145
- trigger('password');
146
- }}
147
- />
148
- </div>
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
- {/* Gender Field */}
151
- <div className="ff-radio">
152
- <Typography as="label">Gender</Typography>
153
- <RadioGroup
154
- options={[
155
- {
156
- label: 'Male',
157
- value: 'male',
158
- },
159
- {
160
- label: 'Female',
161
- value: 'female',
162
- },
163
- {
164
- label: 'Other',
165
- value: 'other',
166
- },
167
- ]}
168
- {...register('gender', {
169
- required: {
170
- value: true,
171
- message: 'select the Gender',
172
- },
173
- })}
174
- selectedValue={watch('gender')}
175
- onChange={(option) => {
176
- setValue('gender', option.value, {
177
- shouldValidate: true,
178
- });
179
- }}
180
- />
181
- {errors?.gender && (
182
- <Typography className="ff-error">
183
- {errors.gender.message}
184
- </Typography>
185
- )}
186
- </div>
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
- {/* Language Field */}
189
- <div className="ff-select">
190
- <Typography as="label">Programming Language</Typography>
191
- <Select
192
- optionsList={[
193
- { label: 'Java', value: 'Java' },
194
- { label: 'Rust', value: 'Rust' },
195
- { label: 'Dart', value: 'Dart' },
196
- ]}
197
- selectedOption={{
198
- label: watch('language') || 'Select a language',
199
- value: watch('language') || '',
200
- }}
201
- {...register('language', {
202
- required: {
203
- value: true,
204
- message: 'language is required',
205
- },
206
- })}
207
- onChange={(option) =>
208
- setValue('language', option.value, { shouldValidate: true })
209
- }
210
- />
211
- {errors?.gender && (
212
- <Typography className="ff-error">
213
- {errors?.language?.message}
214
- </Typography>
215
- )}
216
- </div>
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
- {/* TextArea Field */}
219
- <div className="ff-textarea">
220
- <TextArea
221
- label="Description"
222
- value={watch('description')}
223
- {...register('description', {
224
- required: 'Description is required',
225
- maxLength: {
226
- value: 30,
227
- message: 'Maximum length is 200 characters',
228
- },
229
- })}
230
- error={!!errors?.description?.message}
231
- onChange={(e) => {
232
- setValue('description', e.target.value, {
233
- shouldValidate: true,
234
- });
235
- }}
236
- onBlur={() => {
237
- trigger('description');
238
- }}
239
- />
240
- </div>
241
- {/* check box Field */}
242
- <div className="ff-check">
243
- <Checkbox
244
- label="terms condition"
245
- disabled={false}
246
- {...register('check', {
247
- required: {
248
- value: true,
249
- message: 'Please select the checkbox',
250
- },
251
- })}
252
- onChange={(e) => {
253
- setValue('check', e.target.checked, {
254
- shouldValidate: true,
255
- });
256
- }}
257
- />
258
- {errors?.check && (
259
- <Typography className="ff-error">
260
- {errors.check.message}
261
- </Typography>
262
- )}
263
- </div>
264
- {/* Buttons */}
265
- <div className="ff-button-layout">
266
- <button type="submit">Submit</button>
267
- <button
268
- type="button"
269
- onClick={() => {
270
- reset(initialFormState);
271
- }}
272
- >
273
- Reset
274
- </button>
275
- </div>
276
- </div>
277
- );
278
- }}
279
- </Forms>
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
  };
@@ -4,6 +4,10 @@
4
4
  align-items: center;
5
5
  padding: 4px;
6
6
  box-sizing: content-box;
7
+ &:hover {
8
+ border-radius: 4px;
9
+ background-color: var(--icon-hover-color);
10
+ }
7
11
  &.ff-icon-dark {
8
12
  background-color: var(--brand-color);
9
13
  &.ff-icon-click {
@@ -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;
@@ -74,7 +74,6 @@ const Input = ({
74
74
  onChange={onChange}
75
75
  onFocus={onFocus}
76
76
  onBlur={onBlur}
77
- required={required}
78
77
  autoComplete={autoComplete}
79
78
  min={minValue}
80
79
  max={maxValue}
@@ -10,6 +10,18 @@
10
10
  border-radius: 4px;
11
11
  padding: 0;
12
12
  position: relative;
13
+ .ff-input-with-dropdown--left {
14
+ display: flex;
15
+ flex-direction: row-reverse;
16
+ }
17
+
18
+ .ff-input-with-dropdown--right {
19
+ display: flex;
20
+ flex-direction: row;
21
+ }
22
+ .ff-floating-input--left-dropdown{
23
+ width: 698px;
24
+ }
13
25
 
14
26
  .ff-floating-label-input-container {
15
27
  .ff-floating-label {
@@ -61,6 +73,11 @@
61
73
  &--error {
62
74
  border-color: var(--input-error-text-color);
63
75
  }
76
+ &--left-dropdown {
77
+ &::placeholder {
78
+ opacity: 1;
79
+ }
80
+ }
64
81
  }
65
82
  }
66
83
 
@@ -80,10 +97,22 @@
80
97
  border: none;
81
98
  outline: none;
82
99
  margin: 0;
100
+
83
101
  &:disabled {
84
102
  cursor: not-allowed;
85
103
  }
86
104
  }
105
+
106
+ .ff-floating-dropdown--left {
107
+ min-width: 94px;
108
+ }
109
+ .seperatorline {
110
+ height: 26px;
111
+ margin-top: 3px;
112
+ border-right: 0.5px solid var(--brand-color);
113
+ flex-shrink: 0;
114
+ border-radius: 2px;
115
+ }
87
116
  }
88
117
  &:hover {
89
118
  .ff-input-with-dropdown {
@@ -98,7 +127,7 @@
98
127
  &--error {
99
128
  border-color: var(--input-error-text-color);
100
129
  }
101
- .ff-floating-label {
130
+ &--left .ff-floating-label {
102
131
  color: var(--input-hover-border-color);
103
132
  &--filled {
104
133
  color: var(--input-default-border-color);