pixel-react 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. package/lib/components/AppHeader/types.d.ts +11 -2
  2. package/lib/components/Avatar/Avatar.d.ts +5 -0
  3. package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
  4. package/lib/components/Avatar/index.d.ts +1 -0
  5. package/lib/components/Avatar/types.d.ts +26 -0
  6. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +2 -2
  7. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +2 -2
  8. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +1 -1
  9. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +2 -2
  10. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +2 -2
  11. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +2 -2
  12. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +2 -2
  13. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +1 -1
  14. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +1 -1
  15. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +2 -2
  16. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +1 -1
  17. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +6 -7
  18. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +1 -1
  19. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +49 -5
  20. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +3 -3
  21. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +5 -5
  22. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +6 -6
  23. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -2
  24. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +2 -2
  25. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +1 -1
  26. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +1 -1
  27. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +11 -11
  28. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +1 -1
  29. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +1 -1
  30. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +5 -5
  31. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +3 -3
  32. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +11 -48
  33. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +1 -1
  34. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +1 -1
  35. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +11 -12
  36. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +16 -0
  37. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -3
  38. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +12 -0
  39. package/lib/components/ExcelFile/Types.d.ts +2 -49
  40. package/lib/components/Form/Form.d.ts +1 -15
  41. package/lib/components/Form/Form.stories.d.ts +6 -5
  42. package/lib/components/Form/Forms.d.ts +8 -0
  43. package/lib/components/Form/index.d.ts +1 -1
  44. package/lib/components/MenuOption/types.d.ts +7 -7
  45. package/lib/components/ModulesChip/ModuleChip.d.ts +4 -0
  46. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
  47. package/lib/components/ModulesChip/index.d.ts +1 -0
  48. package/lib/components/ModulesChip/types.d.ts +14 -0
  49. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
  50. package/lib/components/Toastify/Toastify.d.ts +8 -0
  51. package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
  52. package/lib/components/Toastify/index.d.ts +1 -0
  53. package/lib/components/Toastify/types.d.ts +7 -0
  54. package/lib/components/Tooltip/types.d.ts +6 -0
  55. package/lib/components/Typography/types.d.ts +1 -0
  56. package/lib/index.d.ts +75 -22
  57. package/lib/index.esm.js +26686 -870
  58. package/lib/index.esm.js.map +1 -1
  59. package/lib/index.js +26684 -864
  60. package/lib/index.js.map +1 -1
  61. package/lib/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +1 -1
  63. package/src/StyleGuide/ColorPalette/colorPaletteList.ts +10 -0
  64. package/src/assets/Themes/BaseTheme.scss +2 -0
  65. package/src/assets/Themes/DarkTheme.scss +2 -0
  66. package/src/assets/icons/client_profile.svg +4 -0
  67. package/src/assets/icons/fireflink_finder_logo.svg +7 -0
  68. package/src/assets/icons/fireflink_platform.svg +4 -0
  69. package/src/assets/icons/license_expired.svg +20 -0
  70. package/src/components/AppHeader/AppHeader.stories.tsx +24 -3
  71. package/src/components/AppHeader/AppHeader.tsx +29 -11
  72. package/src/components/AppHeader/types.ts +11 -3
  73. package/src/components/Avatar/Avatar.scss +24 -0
  74. package/src/components/Avatar/Avatar.stories.tsx +56 -0
  75. package/src/components/Avatar/Avatar.tsx +25 -0
  76. package/src/components/Avatar/index.ts +1 -0
  77. package/src/components/Avatar/types.ts +27 -0
  78. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +0 -2
  79. package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +1 -4
  80. package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +0 -1
  81. package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +13 -13
  82. package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +13 -12
  83. package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +40 -32
  84. package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +4 -4
  85. package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +10 -10
  86. package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +5 -5
  87. package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +10 -10
  88. package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +6 -6
  89. package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +1 -1
  90. package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +1 -1
  91. package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +34 -27
  92. package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +5 -5
  93. package/src/components/ExcelFile/ExcelFile/Excel/{Spreadsheet.css → Spreadsheet.scss} +21 -37
  94. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +87 -78
  95. package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +2 -2
  96. package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +121 -31
  97. package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +1 -1
  98. package/src/components/ExcelFile/ExcelFile/Excel/context.ts +4 -4
  99. package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +7 -7
  100. package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +11 -11
  101. package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -2
  102. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +3 -3
  103. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +2 -2
  104. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +2 -2
  105. package/src/components/ExcelFile/ExcelFile/Excel/index.ts +12 -11
  106. package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +18 -24
  107. package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +1 -1
  108. package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +311 -41
  109. package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +5 -5
  110. package/src/components/ExcelFile/ExcelFile/Excel/types.ts +14 -66
  111. package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +8 -8
  112. package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +2 -2
  113. package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +3 -3
  114. package/src/components/ExcelFile/ExcelFile/Excel/util.ts +21 -22
  115. package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +0 -3
  116. package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +45 -403
  117. package/src/components/ExcelFile/ExcelFile.stories.tsx +10 -29
  118. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +1 -12
  119. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +0 -3
  120. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +147 -127
  121. package/src/components/ExcelFile/Types.ts +3 -70
  122. package/src/components/ExcelFile/index.ts +1 -1
  123. package/src/components/Form/Form.d.ts +3 -0
  124. package/src/components/Form/Form.scss +31 -4
  125. package/src/components/Form/Form.stories.tsx +172 -138
  126. package/src/components/Form/Form.ts +2 -0
  127. package/src/components/Form/Forms.tsx +25 -0
  128. package/src/components/Form/index.ts +1 -1
  129. package/src/components/Icon/iconList.ts +8 -0
  130. package/src/components/IconButton/IconButton.scss +1 -1
  131. package/src/components/MenuOption/types.ts +7 -6
  132. package/src/components/ModulesChip/ModuleChip.scss +20 -0
  133. package/src/components/ModulesChip/ModuleChip.stories.tsx +41 -0
  134. package/src/components/ModulesChip/ModuleChip.tsx +31 -0
  135. package/src/components/ModulesChip/index.ts +1 -0
  136. package/src/components/ModulesChip/types.ts +14 -0
  137. package/src/components/MultiSelect/Dropdown.tsx +6 -1
  138. package/src/components/MultiSelect/MultiSelect.scss +17 -10
  139. package/src/components/MultiSelect/MultiSelect.stories.tsx +16 -4
  140. package/src/components/MultiSelect/MultiSelect.tsx +11 -4
  141. package/src/components/MultiSelect/MultiSelectTypes.ts +4 -3
  142. package/src/components/Select/Select.scss +4 -0
  143. package/src/components/Select/Select.tsx +2 -2
  144. package/src/components/Toastify/Toastify.stories.tsx +52 -0
  145. package/src/components/Toastify/Toastify.tsx +66 -0
  146. package/src/components/Toastify/index.ts +1 -0
  147. package/src/components/Toastify/types.ts +8 -0
  148. package/src/components/Tooltip/Tooltip.tsx +2 -1
  149. package/src/components/Tooltip/types.ts +6 -0
  150. package/src/components/Typography/Typography.scss +12 -4
  151. package/src/components/Typography/Typography.stories.tsx +2 -0
  152. package/src/components/Typography/Typography.tsx +2 -0
  153. package/src/components/Typography/types.ts +1 -0
  154. package/src/index.ts +10 -2
  155. package/src/components/ExcelFile/ChangeExcelStyles.tsx +0 -78
  156. package/src/components/ExcelFile/ImportExcelStyles.tsx +0 -86
  157. package/src/components/Form/Form.tsx +0 -57
@@ -1,22 +1,31 @@
1
- import { useState } from 'react';
2
- import type { Meta, StoryObj } from '@storybook/react';
3
- import Form from './Form';
4
- import validationRules from './validation.json';
5
- import { FormValues } from './types';
1
+ import Forms from './Forms';
2
+ import Input from '../Input';
3
+ import RadioGroup from '../RadioGroup';
4
+ import Select from '../Select';
5
+ import { Meta, StoryObj } from '@storybook/react/*';
6
6
  import Typography from '../Typography';
7
+ import './Form.scss';
7
8
 
8
- const meta: Meta<typeof Form> = {
9
- title: 'Components/Form',
10
- component: Form,
9
+ type FormValues = {
10
+ username: string;
11
+ email: string;
12
+ password: string;
13
+ gender: string;
14
+ language: string;
15
+ };
16
+
17
+ const meta: Meta<typeof Forms> = {
18
+ title: 'Components/Forms',
19
+ component: Forms,
11
20
  parameters: {
12
21
  layout: 'centered',
13
22
  },
14
23
  tags: ['autodocs'],
15
24
  };
16
25
 
17
- type Story = StoryObj<typeof Form>;
26
+ type Story = StoryObj<typeof Forms>;
18
27
 
19
- export const WithControlledState: Story = {
28
+ export const WithDefaultValues: Story = {
20
29
  render: () => {
21
30
  const initialFormState: FormValues = {
22
31
  username: '',
@@ -26,152 +35,177 @@ export const WithControlledState: Story = {
26
35
  language: '',
27
36
  };
28
37
 
29
- const [formData, setFormData] = useState<FormValues>(initialFormState);
30
-
31
- const handleSubmit = (data: FormValues) => {
32
- setFormData(data);
38
+ const onSubmit = (data: FormValues) => {
33
39
  alert('Form submitted with: ' + JSON.stringify(data));
34
40
  };
35
41
 
36
- const handleReset = (
37
- setValue: (field: keyof FormValues, value: any) => void
38
- ) => {
39
- Object.keys(initialFormState).forEach((field) => {
40
- setValue(
41
- field as keyof FormValues,
42
- initialFormState[field as keyof FormValues]
43
- );
44
- });
45
- setFormData(initialFormState);
46
- };
47
-
48
42
  return (
49
- <div className="ff-form-container">
50
- <Form<FormValues> onSubmit={handleSubmit}>
51
- {(
52
- { register, errors, handleBlur, setValue } // Include setValue here
53
- ) => (
54
- <>
55
- {['username', 'email', 'password'].map((field) => (
56
- <div className="ff-form-group" key={field}>
57
- <Typography as="label">
58
- {field.charAt(0).toUpperCase() + field.slice(1)}
59
- </Typography>
60
- <input
61
- id={field}
62
- type={
63
- field === 'email'
64
- ? 'email'
65
- : field === 'password'
66
- ? 'password'
67
- : 'text'
68
- }
69
- {...register(field as keyof FormValues, {
70
- ...validationRules[field as keyof typeof validationRules],
71
- onChange: (e: any) => {
72
- const value = e.target.value;
73
- setFormData((prev) => ({
74
- ...prev,
75
- [field]: value,
76
- }));
77
- if (errors[field as keyof FormValues]?.message) {
78
- handleBlur(field as keyof FormValues);
79
- }
80
- },
81
- })}
82
- className={
83
- errors[field as keyof FormValues] ? 'ff-error' : ''
84
- }
85
- onBlur={() => handleBlur(field as keyof FormValues)}
86
- />
87
- {errors[field as keyof FormValues]?.message && (
88
- <span className="ff-error">
89
- {String(errors[field as keyof FormValues]?.message)}
90
- </span>
91
- )}
92
- </div>
93
- ))}
43
+ <Forms<FormValues> onSubmit={onSubmit} defaultValues={initialFormState}>
44
+ {({
45
+ register,
46
+ formState: { errors },
47
+ setValue,
48
+ watch,
49
+ reset,
50
+ trigger,
51
+ }) => {
52
+ return (
53
+ <div className="ff-main">
54
+ {/* Username Field */}
55
+ <div>
56
+ <Typography as="label">username</Typography>
57
+ <Input
58
+ type="text"
59
+ {...register('username', {
60
+ required: 'Username is required',
61
+ minLength: {
62
+ value: 3,
63
+ message: 'Username must be at least 3 characters',
64
+ },
65
+ maxLength: {
66
+ value: 15,
67
+ message: 'Username must not exceed 15 characters',
68
+ },
69
+ })}
70
+ error={!!errors.username?.message}
71
+ helperText={errors.username?.message}
72
+ value={watch('username')}
73
+ onChange={(e) =>
74
+ setValue('username', e.target.value, {
75
+ shouldValidate: false,
76
+ })
77
+ }
78
+ onBlur={() => {
79
+ trigger('username');
80
+ }}
81
+ />
82
+ </div>
83
+
84
+ {/* Email Field */}
85
+ <div>
86
+ <Typography as="label">Email</Typography>
87
+
88
+ <Input
89
+ type="email"
90
+ {...register('email', {
91
+ required: 'Email is required',
92
+ pattern: {
93
+ value: /^\S+@\S+\.\S+$/,
94
+ message: 'Please enter a valid email',
95
+ },
96
+ })}
97
+ error={!!errors.email?.message}
98
+ helperText={errors.email?.message}
99
+ value={watch('email')}
100
+ onChange={(e) =>
101
+ setValue('email', e.target.value, { shouldValidate: false })
102
+ }
103
+ onBlur={() => {
104
+ trigger('email');
105
+ }}
106
+ />
107
+ </div>
94
108
 
95
- {/* Gender Radio Input */}
96
- <div className="ff-form-radio-group">
97
- <Typography as="label"> Gender </Typography>
98
- <div className='ff-radio-group-wrapper'>
99
- {['Male', 'Female', 'Other'].map((gender) => (
100
- <div className="ff-radio-gender" key={gender}>
101
- <Typography as="label">
102
- <input
103
- type="radio"
104
- value={gender}
105
- {...register('gender', validationRules.gender)}
106
- checked={formData.gender === gender}
107
- onChange={() =>
108
- setFormData((prev) => ({ ...prev, gender }))
109
- }
110
- onBlur={() => handleBlur('gender')}
111
- />
112
- {gender}
113
- </Typography>
114
- </div>
115
- ))}
116
- {errors.gender?.message && (
117
- <span className="ff-error">
118
- {String(errors.gender.message)}
119
- </span>
109
+ {/* Password Field */}
110
+ <div>
111
+ <Typography as="label">Password</Typography>
112
+
113
+ <Input
114
+ type="password"
115
+ {...register('password', {
116
+ required: 'Password is required',
117
+ minLength: {
118
+ value: 6,
119
+ message: 'Password must be at least 6 characters',
120
+ },
121
+ })}
122
+ error={!!errors.password?.message}
123
+ helperText={errors.password?.message}
124
+ value={watch('password')}
125
+ onChange={(e) =>
126
+ setValue('password', e.target.value, {
127
+ shouldValidate: true,
128
+ })
129
+ }
130
+ onBlur={() => {
131
+ trigger('password');
132
+ }}
133
+ />
134
+ </div>
135
+
136
+ {/* Gender Field */}
137
+ <div>
138
+ <Typography as="label">Gender</Typography>
139
+
140
+ <RadioGroup
141
+ options={[
142
+ {
143
+ label: 'Male',
144
+ value: 'male',
145
+ },
146
+ {
147
+ label: 'Female',
148
+ value: 'female',
149
+ },
150
+ {
151
+ label: 'Other',
152
+ value: 'other',
153
+ },
154
+ ]}
155
+ selectedValue={watch('gender')}
156
+ onChange={(option) => {
157
+ setValue('gender', option.value);
158
+ }}
159
+ name="gender"
160
+ />
161
+ {errors?.gender && (
162
+ <span className="ff-error">{errors.gender.message}</span>
120
163
  )}
121
- </div>
122
164
  </div>
123
165
 
124
- {/* Language Select Dropdown */}
125
- <div className="ff-form-group">
126
- <Typography as='label'>Programming Language</Typography>
127
- <select
128
- id="language"
129
- {...register('language', validationRules.language)}
130
- onBlur={() => handleBlur('language')}
131
- className={errors.language ? 'ff-error' : ''}
132
- value={formData.language}
133
- onChange={(e) => {
134
- const value = e.target.value;
135
- setFormData((prev) => ({
136
- ...prev,
137
- language: value,
138
- }));
139
- if (value) {
140
- setValue('language', value);
141
- }
166
+ {/* Language Field */}
167
+ <div className="ff-select">
168
+ <Typography as="label">Programming Language</Typography>
169
+ <Select
170
+ optionsList={[
171
+ { label: 'Java', value: 'Java' },
172
+ { label: 'Rust', value: 'Rust' },
173
+ { label: 'Dart', value: 'Dart' },
174
+ ]}
175
+ selectedOption={{
176
+ label: watch('language') || 'Select a language',
177
+ value: watch('language') || '',
142
178
  }}
143
- >
144
- <option value="">Select a language</option>
145
- {['Java', 'Rust', 'Dart'].map((lang) => (
146
- <option key={lang} value={lang}>
147
- {lang}
148
- </option>
149
- ))}
150
- </select>
151
- {errors.language?.message && (
152
- <span className="ff-error">
153
- {String(errors.language.message)}
154
- </span>
179
+ {...register('language', {
180
+ required: 'Programming language is required',
181
+ })}
182
+ onChange={(option) =>
183
+ setValue('language', option.value, { shouldValidate: true })
184
+ }
185
+ />
186
+ {errors?.gender && (
187
+ <span className="ff-error">{errors?.language?.message}</span>
155
188
  )}
156
189
  </div>
157
190
 
191
+ {/* Buttons */}
158
192
  <div className="ff-button-layout">
159
193
  <button type="submit">Submit</button>
160
- <button type="button" onClick={() => handleReset(setValue)}>
194
+ <button
195
+ type="button"
196
+ onClick={() => {
197
+ reset(initialFormState);
198
+ }}
199
+ >
161
200
  Reset
162
201
  </button>
163
202
  </div>
164
- </>
165
- )}
166
- </Form>
167
-
168
- <pre>
169
- <span>Payload Data:</span>
170
- </pre>
171
- <pre>{JSON.stringify(formData, null, 2)}</pre>
172
- </div>
203
+ </div>
204
+ );
205
+ }}
206
+ </Forms>
173
207
  );
174
208
  },
175
209
  };
176
210
 
177
- export default meta;
211
+ export default meta;
@@ -0,0 +1,2 @@
1
+ import * as Form from 'react-hook-form';
2
+ export default Form;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import Form from './Form';
3
+
4
+ interface FormProps<T extends Form.FieldValues> extends Form.UseFormProps<T> {
5
+ onSubmit: Form.SubmitHandler<T>;
6
+ children: (methods: ReturnType<typeof Form.useForm<T>>) => React.ReactNode;
7
+ }
8
+
9
+ const Forms = <T extends Form.FieldValues>({
10
+ onSubmit,
11
+ children,
12
+ ...rest
13
+ }: FormProps<T>) => {
14
+ const methods = Form.useForm<T>(rest);
15
+
16
+ const { handleSubmit } = methods;
17
+
18
+ return (
19
+ <form onSubmit={handleSubmit(onSubmit)}>
20
+ {children(methods)}
21
+ </form>
22
+ );
23
+ };
24
+
25
+ export default Forms;
@@ -1 +1 @@
1
- export {default} from './Form';
1
+ export * from './Form';
@@ -120,6 +120,10 @@ import MoveIcon from '../../assets/icons/move_icon.svg?react';
120
120
  import Jira from '../../assets/icons/jira.svg?react';
121
121
  import HistoryIcon from '../../assets//icons/history_icon.svg?react';
122
122
  import LinkedDefects from '../../assets//icons/linked_defects.svg?react';
123
+ import FireflinkPlatform from '../../assets//icons/fireflink_platform.svg?react';
124
+ import FireflinkFinder from '../../assets//icons/fireflink_finder_logo.svg?react';
125
+ import ClientProfile from '../../assets//icons/client_profile.svg?react'
126
+ import LicenseExpired from '../../assets//icons/license_expired.svg?react';
123
127
 
124
128
  Components['delete_info'] = DeleteInfoIcon;
125
129
  Components['success'] = ToastSuccessIcon;
@@ -238,5 +242,9 @@ Components['no_access_icon'] = NoAccessIcon;
238
242
  Components['full_access_icon'] = FullAccessIcon;
239
243
  Components['view_access_icon'] = ViewAccessIcon;
240
244
  Components['eye_closed'] = EyeClosed;
245
+ Components['fireflink_platform_logo'] = FireflinkPlatform;
246
+ Components['fireflink_finder_logo'] = FireflinkFinder;
247
+ Components['client_profile'] = ClientProfile;
248
+ Components['license_expired'] = LicenseExpired;
241
249
 
242
250
  export default Components;
@@ -33,7 +33,7 @@
33
33
  border: 1px solid var(--secondary-icon-color);
34
34
  background-color: var(--hover-color);
35
35
  .icon-name {
36
- font-weight: 600;
36
+ font-weight: 400;
37
37
  color: var(--secondary-icon-color);
38
38
  @include mixins.center-content();
39
39
  }
@@ -105,17 +105,18 @@ interface MenuOptionProps {
105
105
  */
106
106
  dropdownPlacement?: string | 'top' | 'left' | 'right' | 'down';
107
107
 
108
- /**
109
- * Callback function triggered when the icon is clicked.
110
- * @type {function}
108
+ /**
109
+ * The variant of the menu option, either 'dark' or 'light'.
110
+ * @type {'dark' | 'light'}
111
+ * @default 'light'
111
112
  * @optional
112
113
  */
113
114
 
114
115
  variant?: 'dark' | 'light';
116
+
115
117
  /**
116
- * The variant of the menu option, either 'dark' or 'light'.
117
- * @type {'dark' | 'light'}
118
- * @default 'light'
118
+ * Callback function triggered when the icon is clicked.
119
+ * @type {function}
119
120
  * @optional
120
121
  */
121
122
 
@@ -0,0 +1,20 @@
1
+ @use '../../assets/styles/fonts';
2
+ @use '../../assets/styles/mixins';
3
+
4
+ .ff-expandable-chip-menu {
5
+ width: 75px;
6
+ height: 32px;
7
+ border: 0.5px solid;
8
+ border-radius: 16px;
9
+ color: var(--brand-color);
10
+ cursor: pointer;
11
+ @include mixins.center-content();
12
+ .ff-label-chip {
13
+ &--active {
14
+ color: var(--ff-header-text-color);
15
+ }
16
+ }
17
+ &--active {
18
+ background: var(--brand-color);
19
+ }
20
+ }
@@ -0,0 +1,41 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import ModuleChip from './ModuleChip';
3
+ import { useState } from 'react';
4
+
5
+ const meta: Meta<typeof ModuleChip> = {
6
+ title: 'Components/ModuleChip',
7
+ component: ModuleChip,
8
+ parameters: {
9
+ layout: 'center',
10
+ },
11
+ argTypes: {
12
+ isActive: Boolean,
13
+ },
14
+ tags: ['autodocs'],
15
+ };
16
+
17
+ type Story = StoryObj<typeof ModuleChip>;
18
+
19
+ const defaultArgs = {
20
+ label: 'Modules',
21
+ isActive: false,
22
+ };
23
+
24
+ export const Controlled: Story = {
25
+ render: () => {
26
+ const [selectedMenu, setSelectedMenu] = useState<boolean>(true);
27
+ const handleChipClick = () => {
28
+ setSelectedMenu(!selectedMenu);
29
+ };
30
+
31
+ return (
32
+ <ModuleChip
33
+ {...defaultArgs}
34
+ isActive={selectedMenu}
35
+ onClick={handleChipClick}
36
+ />
37
+ );
38
+ },
39
+ };
40
+
41
+ export default meta;
@@ -0,0 +1,31 @@
1
+ import './ModuleChip.scss';
2
+ import classNames from 'classnames';
3
+ import { ModuleChipProps } from './types';
4
+ import Typography from '../Typography';
5
+
6
+ const ModuleChip: React.FC<ModuleChipProps> = ({
7
+ label = '',
8
+ isActive = true,
9
+ onClick = () => {},
10
+ }) => {
11
+ return (
12
+ <div
13
+ className={classNames('ff-expandable-chip-menu', {
14
+ 'ff-expandable-chip-menu--active': isActive,
15
+ })}
16
+ onClick={onClick}
17
+ >
18
+ <div
19
+ className={classNames(`ff-label-chip `, {
20
+ 'ff-label-chip--active': isActive,
21
+ })}
22
+ >
23
+ <Typography fontSize={'14px'} fontWeight="regular" lineHeight="21px">
24
+ {label}
25
+ </Typography>
26
+ </div>
27
+ </div>
28
+ );
29
+ };
30
+
31
+ export default ModuleChip;
@@ -0,0 +1 @@
1
+ export { default } from './ModuleChip';
@@ -0,0 +1,14 @@
1
+ export interface ModuleChipProps {
2
+ /**
3
+ * mandatory | label for the ModuleChip component
4
+ */
5
+ label: string;
6
+ /**
7
+ * mandatory | isActive for the ModuleChip component
8
+ */
9
+ isActive: boolean;
10
+ /**
11
+ * mandatory | onClick for the ModuleChip component
12
+ */
13
+ onClick: () => void;
14
+ }
@@ -5,6 +5,7 @@ import './Dropdown.scss';
5
5
  import { ThemeContext } from '../ThemeProvider/ThemeProvider';
6
6
  import classNames from 'classnames';
7
7
  import Button from '../Button';
8
+ import Typography from '../Typography';
8
9
 
9
10
  const Dropdown = forwardRef<HTMLDivElement, DropdownProps>(
10
11
  (
@@ -82,7 +83,11 @@ const Dropdown = forwardRef<HTMLDivElement, DropdownProps>(
82
83
  onClick={() => handleOptionChange(info, !info.isChecked)}
83
84
  >
84
85
  <input type="checkbox" checked={info.isChecked} readOnly />
85
- <span className="dropdown-option-label">{info.label}</span>
86
+ <Typography
87
+ as="span"
88
+ className="dropdown-option-label"
89
+ children={info.label}
90
+ />
86
91
  </div>
87
92
  ))
88
93
  )}
@@ -38,16 +38,16 @@
38
38
  cursor: pointer;
39
39
  position: relative;
40
40
  border: 1px solid var(--default-icon-color);
41
- border-radius: 8px;
41
+ border-radius: 4px;
42
42
  background: var(--drawer-footer-bg);
43
43
  min-width: 150px;
44
44
  width: 100%;
45
45
  height: 32px;
46
46
  .ff-multiselect {
47
47
  position: relative;
48
- padding: 6px;
48
+ padding: 3px;
49
49
  border: none;
50
- border-radius: 8px;
50
+ border-radius: 4px;
51
51
  @include flex-center;
52
52
  &__main {
53
53
  display: flex;
@@ -61,6 +61,8 @@
61
61
 
62
62
  .active-default-label {
63
63
  @extend .font-size-8;
64
+ font-size: 8px !important;
65
+ height: 8px;
64
66
  @include label-styles;
65
67
  background-color: var(--multi-select-label-bg);
66
68
  line-height: 12px;
@@ -87,6 +89,9 @@
87
89
  @extend .fontXs;
88
90
  line-height: 14px;
89
91
  color: var(--tooltip-bg-color);
92
+ &.pr-2 {
93
+ padding: 5px 2px;
94
+ }
90
95
  }
91
96
  .ff-multiselect-chip-close-icon {
92
97
  cursor: pointer;
@@ -108,13 +113,15 @@
108
113
  }
109
114
  }
110
115
  }
111
- .ff-multiselect-more-chip{
112
- width: 1.2rem;
113
- @extend .fontSm;
114
- font-weight: 600;
115
- line-height: 16px;
116
- color: var(--brand-color);
117
- }
116
+ }
117
+ .ff-multiselect-more-chip {
118
+ display: flex;
119
+ align-items: center;
120
+ width: 1.2rem;
121
+ @extend .fontSm;
122
+ font-weight: 600;
123
+ line-height: 16px;
124
+ color: var(--brand-color);
118
125
  }
119
126
  }
120
127
  &__toggle {