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.
- package/lib/components/AppHeader/types.d.ts +11 -2
- package/lib/components/Avatar/Avatar.d.ts +5 -0
- package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
- package/lib/components/Avatar/index.d.ts +1 -0
- package/lib/components/Avatar/types.d.ts +26 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +6 -7
- package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +49 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +3 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +5 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +6 -6
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +2 -2
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +11 -11
- package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +5 -5
- package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +3 -3
- package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +11 -48
- package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +1 -1
- package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +11 -12
- package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +16 -0
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -3
- package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +12 -0
- package/lib/components/ExcelFile/Types.d.ts +2 -49
- package/lib/components/Form/Form.d.ts +1 -15
- package/lib/components/Form/Form.stories.d.ts +6 -5
- package/lib/components/Form/Forms.d.ts +8 -0
- package/lib/components/Form/index.d.ts +1 -1
- package/lib/components/MenuOption/types.d.ts +7 -7
- package/lib/components/ModulesChip/ModuleChip.d.ts +4 -0
- package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
- package/lib/components/ModulesChip/index.d.ts +1 -0
- package/lib/components/ModulesChip/types.d.ts +14 -0
- package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
- package/lib/components/Toastify/Toastify.d.ts +8 -0
- package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
- package/lib/components/Toastify/index.d.ts +1 -0
- package/lib/components/Toastify/types.d.ts +7 -0
- package/lib/components/Tooltip/types.d.ts +6 -0
- package/lib/components/Typography/types.d.ts +1 -0
- package/lib/index.d.ts +75 -22
- package/lib/index.esm.js +26686 -870
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +26684 -864
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +10 -0
- package/src/assets/Themes/BaseTheme.scss +2 -0
- package/src/assets/Themes/DarkTheme.scss +2 -0
- package/src/assets/icons/client_profile.svg +4 -0
- package/src/assets/icons/fireflink_finder_logo.svg +7 -0
- package/src/assets/icons/fireflink_platform.svg +4 -0
- package/src/assets/icons/license_expired.svg +20 -0
- package/src/components/AppHeader/AppHeader.stories.tsx +24 -3
- package/src/components/AppHeader/AppHeader.tsx +29 -11
- package/src/components/AppHeader/types.ts +11 -3
- package/src/components/Avatar/Avatar.scss +24 -0
- package/src/components/Avatar/Avatar.stories.tsx +56 -0
- package/src/components/Avatar/Avatar.tsx +25 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Avatar/types.ts +27 -0
- package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +0 -2
- package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +1 -4
- package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +0 -1
- package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +13 -13
- package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +13 -12
- package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +40 -32
- package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +4 -4
- package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +10 -10
- package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +5 -5
- package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +10 -10
- package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +6 -6
- package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +34 -27
- package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +5 -5
- package/src/components/ExcelFile/ExcelFile/Excel/{Spreadsheet.css → Spreadsheet.scss} +21 -37
- package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +87 -78
- package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +121 -31
- package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/context.ts +4 -4
- package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +7 -7
- package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +11 -11
- package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +3 -3
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/index.ts +12 -11
- package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +18 -24
- package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +1 -1
- package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +311 -41
- package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +5 -5
- package/src/components/ExcelFile/ExcelFile/Excel/types.ts +14 -66
- package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +8 -8
- package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +2 -2
- package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +3 -3
- package/src/components/ExcelFile/ExcelFile/Excel/util.ts +21 -22
- package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +0 -3
- package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +45 -403
- package/src/components/ExcelFile/ExcelFile.stories.tsx +10 -29
- package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +1 -12
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +0 -3
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +147 -127
- package/src/components/ExcelFile/Types.ts +3 -70
- package/src/components/ExcelFile/index.ts +1 -1
- package/src/components/Form/Form.d.ts +3 -0
- package/src/components/Form/Form.scss +31 -4
- package/src/components/Form/Form.stories.tsx +172 -138
- package/src/components/Form/Form.ts +2 -0
- package/src/components/Form/Forms.tsx +25 -0
- package/src/components/Form/index.ts +1 -1
- package/src/components/Icon/iconList.ts +8 -0
- package/src/components/IconButton/IconButton.scss +1 -1
- package/src/components/MenuOption/types.ts +7 -6
- package/src/components/ModulesChip/ModuleChip.scss +20 -0
- package/src/components/ModulesChip/ModuleChip.stories.tsx +41 -0
- package/src/components/ModulesChip/ModuleChip.tsx +31 -0
- package/src/components/ModulesChip/index.ts +1 -0
- package/src/components/ModulesChip/types.ts +14 -0
- package/src/components/MultiSelect/Dropdown.tsx +6 -1
- package/src/components/MultiSelect/MultiSelect.scss +17 -10
- package/src/components/MultiSelect/MultiSelect.stories.tsx +16 -4
- package/src/components/MultiSelect/MultiSelect.tsx +11 -4
- package/src/components/MultiSelect/MultiSelectTypes.ts +4 -3
- package/src/components/Select/Select.scss +4 -0
- package/src/components/Select/Select.tsx +2 -2
- package/src/components/Toastify/Toastify.stories.tsx +52 -0
- package/src/components/Toastify/Toastify.tsx +66 -0
- package/src/components/Toastify/index.ts +1 -0
- package/src/components/Toastify/types.ts +8 -0
- package/src/components/Tooltip/Tooltip.tsx +2 -1
- package/src/components/Tooltip/types.ts +6 -0
- package/src/components/Typography/Typography.scss +12 -4
- package/src/components/Typography/Typography.stories.tsx +2 -0
- package/src/components/Typography/Typography.tsx +2 -0
- package/src/components/Typography/types.ts +1 -0
- package/src/index.ts +10 -2
- package/src/components/ExcelFile/ChangeExcelStyles.tsx +0 -78
- package/src/components/ExcelFile/ImportExcelStyles.tsx +0 -86
- package/src/components/Form/Form.tsx +0 -57
@@ -1,22 +1,31 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import {
|
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
|
-
|
9
|
-
|
10
|
-
|
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
|
26
|
+
type Story = StoryObj<typeof Forms>;
|
18
27
|
|
19
|
-
export const
|
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
|
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
|
-
<
|
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
|
-
</
|
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
|
-
{/*
|
96
|
-
<div
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
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
|
125
|
-
<div className="ff-
|
126
|
-
<Typography as=
|
127
|
-
<
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
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
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
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
|
194
|
+
<button
|
195
|
+
type="button"
|
196
|
+
onClick={() => {
|
197
|
+
reset(initialFormState);
|
198
|
+
}}
|
199
|
+
>
|
161
200
|
Reset
|
162
201
|
</button>
|
163
202
|
</div>
|
164
|
-
|
165
|
-
)
|
166
|
-
|
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,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
|
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;
|
@@ -105,17 +105,18 @@ interface MenuOptionProps {
|
|
105
105
|
*/
|
106
106
|
dropdownPlacement?: string | 'top' | 'left' | 'right' | 'down';
|
107
107
|
|
108
|
-
|
109
|
-
*
|
110
|
-
* @type {
|
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
|
-
*
|
117
|
-
* @type {
|
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
|
-
<
|
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:
|
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:
|
48
|
+
padding: 3px;
|
49
49
|
border: none;
|
50
|
-
border-radius:
|
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
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
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 {
|