pixel-react 1.1.8 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/AddButton/AddButton.d.ts +5 -0
- package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
- package/lib/components/AddButton/index.d.ts +1 -0
- package/lib/components/AddButton/types.d.ts +4 -0
- package/lib/components/AppHeader/types.d.ts +7 -7
- package/lib/components/Drawer/Drawer.stories.d.ts +2 -0
- package/lib/components/Drawer/Types.d.ts +11 -0
- package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
- package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +8 -0
- package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +81 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +130 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +215 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +45 -0
- package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +3 -0
- package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
- package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +15 -0
- package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +3 -0
- package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
- package/lib/components/ExcelFile/Types.d.ts +176 -0
- package/lib/components/ExcelFile/index.d.ts +1 -0
- package/lib/components/Icon/Icon.stories.d.ts +1 -0
- package/lib/components/Icon/types.d.ts +1 -0
- package/lib/components/IconRadioGroup/IconRadioGroup.d.ts +5 -0
- package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
- package/lib/components/IconRadioGroup/index.d.ts +1 -0
- package/lib/components/IconRadioGroup/type.d.ts +41 -0
- package/lib/components/Table/Table.d.ts +1 -1
- package/lib/components/Table/Table.stories.d.ts +2 -0
- package/lib/components/Table/Types.d.ts +16 -0
- package/lib/index.d.ts +81 -9
- package/lib/index.esm.js +739 -248
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +739 -247
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/find/findAndInsert.d.ts +7 -0
- package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
- package/package.json +4 -2
- package/src/assets/Themes/BaseTheme.scss +4 -0
- package/src/assets/Themes/DarkTheme.scss +4 -0
- package/src/assets/icons/all_borders.svg +3 -0
- package/src/assets/icons/bold.svg +3 -0
- package/src/assets/icons/border_bottom.svg +3 -0
- package/src/assets/icons/border_left.svg +3 -0
- package/src/assets/icons/border_right.svg +3 -0
- package/src/assets/icons/border_top.svg +3 -0
- package/src/assets/icons/clone_icon.svg +3 -0
- package/src/assets/icons/double_underline.svg +5 -0
- package/src/assets/icons/eye_closed.svg +3 -0
- package/src/assets/icons/fill_color.svg +7 -0
- package/src/assets/icons/formate_painter.svg +5 -0
- package/src/assets/icons/full_access_icon.svg +4 -0
- package/src/assets/icons/history_icon.svg +19 -0
- package/src/assets/icons/italic.svg +3 -0
- package/src/assets/icons/jira.svg +3 -0
- package/src/assets/icons/linked_defects.svg +11 -0
- package/src/assets/icons/move_icon.svg +5 -0
- package/src/assets/icons/no_access_icon.svg +4 -0
- package/src/assets/icons/no_border.svg +3 -0
- package/src/assets/icons/strike_through.svg +3 -0
- package/src/assets/icons/text_align_center.svg +3 -0
- package/src/assets/icons/text_align_left.svg +3 -0
- package/src/assets/icons/text_align_right.svg +3 -0
- package/src/assets/icons/text_color.svg +3 -0
- package/src/assets/icons/underline.svg +4 -0
- package/src/assets/icons/view_access_icon.svg +4 -0
- package/src/components/AppHeader/AppHeader.scss +23 -10
- package/src/components/AppHeader/AppHeader.stories.tsx +29 -28
- package/src/components/AppHeader/AppHeader.tsx +18 -16
- package/src/components/AppHeader/types.ts +7 -7
- package/src/components/Button/Button.scss +1 -0
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/Drawer/Drawer.scss +13 -9
- package/src/components/Drawer/Drawer.stories.tsx +28 -0
- package/src/components/Drawer/Drawer.tsx +29 -6
- package/src/components/Drawer/Types.ts +11 -0
- package/src/components/ExcelFile/ChangeExcelStyles.tsx +78 -0
- package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +13 -0
- package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.tsx +43 -0
- package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +102 -0
- package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +104 -0
- package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +131 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +201 -0
- package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +123 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +25 -0
- package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +49 -0
- package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +37 -0
- package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +46 -0
- package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +31 -0
- package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +5 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +5 -0
- package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +102 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +32 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.css +144 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +494 -0
- package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +19 -0
- package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +302 -0
- package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +18 -0
- package/src/components/ExcelFile/ExcelFile/Excel/context.ts +12 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +200 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +137 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +154 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +10 -0
- package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +69 -0
- package/src/components/ExcelFile/ExcelFile/Excel/index.ts +48 -0
- package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +388 -0
- package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +82 -0
- package/src/components/ExcelFile/ExcelFile/Excel/point.ts +15 -0
- package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +682 -0
- package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +257 -0
- package/src/components/ExcelFile/ExcelFile/Excel/types.ts +269 -0
- package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +58 -0
- package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +8 -0
- package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +9 -0
- package/src/components/ExcelFile/ExcelFile/Excel/util.ts +173 -0
- package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +27 -0
- package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +520 -0
- package/src/components/ExcelFile/ExcelFile.stories.tsx +132 -0
- package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.scss +16 -0
- package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +79 -0
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +22 -0
- package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +271 -0
- package/src/components/ExcelFile/ImportExcelStyles.tsx +86 -0
- package/src/components/ExcelFile/Types.ts +241 -0
- package/src/components/ExcelFile/index.ts +1 -0
- package/src/components/Icon/Icon.stories.tsx +27 -0
- package/src/components/Icon/Icon.tsx +5 -1
- package/src/components/Icon/Icons.scss +15 -5
- package/src/components/Icon/iconList.ts +52 -1
- package/src/components/Icon/types.ts +1 -0
- package/src/components/IconRadioGroup/IconRadioGroup.scss +60 -0
- package/src/components/IconRadioGroup/IconRadioGroup.stories.tsx +108 -0
- package/src/components/IconRadioGroup/IconRadioGroup.tsx +72 -0
- package/src/components/IconRadioGroup/index.ts +1 -0
- package/src/components/IconRadioGroup/type.ts +50 -0
- package/src/components/Modal/Modal.tsx +8 -1
- package/src/components/Modal/modal.scss +10 -2
- package/src/components/Table/Table.scss +16 -4
- package/src/components/Table/Table.stories.tsx +36 -12
- package/src/components/Table/Table.tsx +33 -16
- package/src/components/Table/Types.ts +121 -105
- package/src/index.ts +2 -0
@@ -6,6 +6,12 @@ const meta: Meta<typeof Icon> = {
|
|
6
6
|
title: 'Components/Icon',
|
7
7
|
component: Icon,
|
8
8
|
tags: ['autodocs'],
|
9
|
+
argTypes: {
|
10
|
+
variant: {
|
11
|
+
control: { type: 'select' },
|
12
|
+
options: ['light', 'dark'],
|
13
|
+
},
|
14
|
+
},
|
9
15
|
};
|
10
16
|
|
11
17
|
type Story = StoryObj<typeof Icon>;
|
@@ -34,4 +40,25 @@ export const AllIcons: Story = {
|
|
34
40
|
},
|
35
41
|
};
|
36
42
|
|
43
|
+
export const DarkVariantIcons: Story = {
|
44
|
+
args: {
|
45
|
+
name: 'hamburger_menu',
|
46
|
+
color: 'var(--ff-icon-color-dark-variant)',
|
47
|
+
variant: 'dark',
|
48
|
+
hoverEffect: true,
|
49
|
+
},
|
50
|
+
render: (args) => {
|
51
|
+
const backgroundColor = args.variant === 'dark' ? '#000' : '#fff';
|
52
|
+
const iconColor = args.variant === 'dark' ? 'var(--ff-icon-color-dark-variant)' : 'var(--brand-color)';
|
53
|
+
|
54
|
+
return (
|
55
|
+
<div style={{ backgroundColor, padding: '20px' }}>
|
56
|
+
<Icon {...args} color={iconColor} height={16} width={16} />
|
57
|
+
</div>
|
58
|
+
);
|
59
|
+
},
|
60
|
+
};
|
61
|
+
|
62
|
+
|
63
|
+
|
37
64
|
export default meta;
|
@@ -15,6 +15,7 @@ const Icon = forwardRef<HTMLSpanElement, IconProps>(
|
|
15
15
|
hoverEffect = false,
|
16
16
|
className = '',
|
17
17
|
disabled = false,
|
18
|
+
variant = "light",
|
18
19
|
...props
|
19
20
|
},
|
20
21
|
ref
|
@@ -28,6 +29,8 @@ const Icon = forwardRef<HTMLSpanElement, IconProps>(
|
|
28
29
|
return null;
|
29
30
|
}
|
30
31
|
|
32
|
+
const iconColor = variant === "dark" ? 'var(--ff-icon-color-dark-variant)' : color;
|
33
|
+
|
31
34
|
return (
|
32
35
|
<span
|
33
36
|
ref={ref}
|
@@ -36,11 +39,12 @@ const Icon = forwardRef<HTMLSpanElement, IconProps>(
|
|
36
39
|
className={classNames('ff-icon-container', {
|
37
40
|
'ff-icon-click': !!hoverEffect,
|
38
41
|
'ff-icon-disabled': disabled,
|
42
|
+
'ff-icon-dark': variant === "dark",
|
39
43
|
[className]: !!className,
|
40
44
|
})}
|
41
45
|
{...props}
|
42
46
|
>
|
43
|
-
<IconComponent height="100%" width="100%" style={{ color:
|
47
|
+
<IconComponent height="100%" width="100%" style={{ color: iconColor }} />
|
44
48
|
</span>
|
45
49
|
);
|
46
50
|
}
|
@@ -1,18 +1,28 @@
|
|
1
|
-
|
2
1
|
.ff-icon-container {
|
3
2
|
display: flex;
|
4
3
|
justify-content: center;
|
5
4
|
align-items: center;
|
5
|
+
padding: 4px;
|
6
|
+
&.ff-icon-dark {
|
7
|
+
background-color: var(--brand-color);
|
8
|
+
&.ff-icon-click {
|
9
|
+
&:hover {
|
10
|
+
border-radius: 4px;
|
11
|
+
background-color: white;
|
12
|
+
svg path {
|
13
|
+
fill: var(--brand-color);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
6
18
|
}
|
7
19
|
|
8
20
|
.ff-icon-click {
|
9
21
|
cursor: pointer;
|
10
|
-
padding: 4px;
|
11
22
|
box-sizing: content-box;
|
12
23
|
&:hover {
|
13
|
-
border-radius:
|
14
|
-
background-color: var(--
|
15
|
-
box-shadow: 0px 0px 16px var(--toggle-strip-shadow);
|
24
|
+
border-radius: 4px;
|
25
|
+
background-color: var(--ff-icon-hover-fill-color);
|
16
26
|
& > svg {
|
17
27
|
color: var(--brand-color);
|
18
28
|
}
|
@@ -43,6 +43,23 @@ import LicenseIcon from '../../assets/icons/active_license_icon.svg?react';
|
|
43
43
|
import DeleteIcon from '../../assets/icons/delete.svg?react';
|
44
44
|
import DetailsIcon from '../../assets/icons/details.svg?react';
|
45
45
|
import ImpactListIcon from '../../assets/icons/impactList.svg?react';
|
46
|
+
import FormatePainter from '../../assets/icons/formate_painter.svg?react';
|
47
|
+
import Bold from '../../assets/icons/bold.svg?react';
|
48
|
+
import Italic from '../../assets/icons/italic.svg?react';
|
49
|
+
import StrikeThrough from '../../assets/icons/strike_through.svg?react';
|
50
|
+
import Underline from '../../assets/icons/underline.svg?react';
|
51
|
+
import DoubleUnderline from '../../assets/icons/double_underline.svg?react';
|
52
|
+
import AllBorders from '../../assets/icons/all_borders.svg?react';
|
53
|
+
import BorderBottom from '../../assets/icons/border_bottom.svg?react';
|
54
|
+
import BorderLeft from '../../assets/icons/border_left.svg?react';
|
55
|
+
import BorderRight from '../../assets/icons/border_right.svg?react';
|
56
|
+
import BorderTop from '../../assets/icons/border_top.svg?react';
|
57
|
+
import NoBorder from '../../assets/icons/no_border.svg?react';
|
58
|
+
import TextAlignCenter from '../../assets/icons/text_align_center.svg?react';
|
59
|
+
import TextAlignLeft from '../../assets/icons/text_align_left.svg?react';
|
60
|
+
import TextAlignRight from '../../assets/icons/text_align_right.svg?react';
|
61
|
+
import TextColor from '../../assets/icons/text_color.svg?react';
|
62
|
+
import FillColor from '../../assets/icons/fill_color.svg?react';
|
46
63
|
import InfoIcon from '../../assets/icons/info_icon.svg?react';
|
47
64
|
import CalendarIcon from '../../assets/icons/calendar_icon.svg?react';
|
48
65
|
import HideIcon from '../../assets/icons/hide_icon.svg?react';
|
@@ -70,6 +87,9 @@ import SalesForceIcon from '../../assets/icons/sales_force.svg?react';
|
|
70
87
|
import MSDynamicIcon from '../../assets/icons/ms_dynamic.svg?react';
|
71
88
|
import AllProjectsIcon from '../../assets/icons/all_projects.svg?react';
|
72
89
|
import AndroidIcon from '../../assets/icons/android_icon.svg?react';
|
90
|
+
import NoAccessIcon from '../../assets/icons/no_access_icon.svg?react';
|
91
|
+
import FullAccessIcon from '../../assets/icons/full_access_icon.svg?react';
|
92
|
+
import ViewAccessIcon from '../../assets/icons/view_access_icon.svg?react';
|
73
93
|
import AddLocator from '../../assets/icons/add_locator.svg?react';
|
74
94
|
import PlusUserIcon from '../../assets/icons/plus_user_icon.svg?react';
|
75
95
|
|
@@ -93,9 +113,14 @@ import NotificationIcon from '../../assets/icons/notification_icon.svg?react';
|
|
93
113
|
import NLPHelpIcon from '../../assets/icons/nlp_help_icon.svg?react';
|
94
114
|
import UpdateIcon from '../../assets/icons/update_icon.svg?react';
|
95
115
|
import AddFile from '../../assets/icons/add_file.svg?react';
|
116
|
+
import EyeClosed from '../../assets/icons/eye_closed.svg?react';
|
96
117
|
|
118
|
+
import CloneIcon from '../../assets/icons/clone_icon.svg?react';
|
119
|
+
import MoveIcon from '../../assets/icons/move_icon.svg?react';
|
120
|
+
import Jira from '../../assets/icons/jira.svg?react';
|
121
|
+
import HistoryIcon from '../../assets//icons/history_icon.svg?react';
|
122
|
+
import LinkedDefects from '../../assets//icons/linked_defects.svg?react';
|
97
123
|
|
98
|
-
//icons
|
99
124
|
Components['delete_info'] = DeleteInfoIcon;
|
100
125
|
Components['success'] = ToastSuccessIcon;
|
101
126
|
Components['warning'] = WarningIcon;
|
@@ -138,6 +163,23 @@ Components['delete'] = DeleteIcon;
|
|
138
163
|
Components['details'] = DetailsIcon;
|
139
164
|
Components['impactList'] = ImpactListIcon;
|
140
165
|
Components['add_variable'] = AddVariable;
|
166
|
+
Components['formate_painter'] = FormatePainter;
|
167
|
+
Components['bold'] = Bold;
|
168
|
+
Components['italic'] = Italic;
|
169
|
+
Components['strike_through'] = StrikeThrough;
|
170
|
+
Components['underline'] = Underline;
|
171
|
+
Components['double_underline'] = DoubleUnderline;
|
172
|
+
Components['border_left'] = BorderLeft;
|
173
|
+
Components['border_right'] = BorderRight;
|
174
|
+
Components['border_bottom'] = BorderBottom;
|
175
|
+
Components['border_top'] = BorderTop;
|
176
|
+
Components['all_borders'] = AllBorders;
|
177
|
+
Components['no_border'] = NoBorder;
|
178
|
+
Components['text_align_center'] = TextAlignCenter;
|
179
|
+
Components['text_align_left'] = TextAlignLeft;
|
180
|
+
Components['text_align_right'] = TextAlignRight;
|
181
|
+
Components['text_color'] = TextColor;
|
182
|
+
Components['fill_color'] = FillColor;
|
141
183
|
Components['info'] = InfoIcon;
|
142
184
|
Components['calendar_icon'] = CalendarIcon;
|
143
185
|
Components['hide_icon'] = HideIcon;
|
@@ -187,5 +229,14 @@ Components['notification_icon'] = NotificationIcon;
|
|
187
229
|
Components['nlp_help_icon'] = NLPHelpIcon;
|
188
230
|
Components['update_icon'] = UpdateIcon;
|
189
231
|
Components['add_file'] = AddFile;
|
232
|
+
Components['clone_icon'] = CloneIcon;
|
233
|
+
Components['move_icon'] = MoveIcon;
|
234
|
+
Components['jira'] = Jira;
|
235
|
+
Components['history'] = HistoryIcon;
|
236
|
+
Components['linked_defects'] = LinkedDefects;
|
237
|
+
Components['no_access_icon'] = NoAccessIcon;
|
238
|
+
Components['full_access_icon'] = FullAccessIcon;
|
239
|
+
Components['view_access_icon'] = ViewAccessIcon;
|
240
|
+
Components['eye_closed'] = EyeClosed;
|
190
241
|
|
191
242
|
export default Components;
|
@@ -0,0 +1,60 @@
|
|
1
|
+
.ff-icon-radio-group {
|
2
|
+
width: 237px;
|
3
|
+
height: 24px;
|
4
|
+
display: flex;
|
5
|
+
align-items: center;
|
6
|
+
gap: 47px;
|
7
|
+
position: relative;
|
8
|
+
}
|
9
|
+
|
10
|
+
.ff-icon-radio-button {
|
11
|
+
width: 24px;
|
12
|
+
height: 24px;
|
13
|
+
border-radius: 4px;
|
14
|
+
display: flex;
|
15
|
+
justify-content: center;
|
16
|
+
align-items: center;
|
17
|
+
cursor: pointer;
|
18
|
+
position: relative;
|
19
|
+
|
20
|
+
&.selected {
|
21
|
+
background-color: var(--brand-color);
|
22
|
+
}
|
23
|
+
|
24
|
+
&.disabled {
|
25
|
+
opacity: 50%;
|
26
|
+
cursor: not-allowed;
|
27
|
+
}
|
28
|
+
|
29
|
+
.icon-container {
|
30
|
+
width: 24px;
|
31
|
+
height: 24px;
|
32
|
+
border-radius: 4px;
|
33
|
+
display: flex;
|
34
|
+
justify-content: center;
|
35
|
+
align-items: center;
|
36
|
+
border: 1px solid var(--border-color);
|
37
|
+
background: var(--drawer-footer-bg);
|
38
|
+
|
39
|
+
&.selected {
|
40
|
+
background-color: var(--brand-color);
|
41
|
+
}
|
42
|
+
|
43
|
+
.icon {
|
44
|
+
width: 14px;
|
45
|
+
height: 14px;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
.line-connector {
|
51
|
+
position: absolute;
|
52
|
+
top: 50%;
|
53
|
+
left: 0;
|
54
|
+
right: 0;
|
55
|
+
height: 1px;
|
56
|
+
background-color: var(--border-color);
|
57
|
+
z-index: -1;
|
58
|
+
border-radius: 2px 0px 0px 0px;
|
59
|
+
opacity: 0px;
|
60
|
+
}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import IconRadioGroup from './IconRadioGroup';
|
3
|
+
import { useState } from 'react';
|
4
|
+
|
5
|
+
const meta: Meta<typeof IconRadioGroup> = {
|
6
|
+
title: 'Components/IconRadioGroup',
|
7
|
+
component: IconRadioGroup,
|
8
|
+
parameters: {
|
9
|
+
layout: 'centered',
|
10
|
+
},
|
11
|
+
tags: ['autodocs'],
|
12
|
+
};
|
13
|
+
|
14
|
+
type Story = StoryObj<typeof IconRadioGroup>;
|
15
|
+
|
16
|
+
export const Default: Story = {
|
17
|
+
render: () => {
|
18
|
+
const radioOptions = [
|
19
|
+
{
|
20
|
+
iconName: 'no_access_icon',
|
21
|
+
iconLabel: 'No Access',
|
22
|
+
disabled: false,
|
23
|
+
disableMessage: '',
|
24
|
+
},
|
25
|
+
{
|
26
|
+
iconName: 'view_access_icon',
|
27
|
+
iconLabel: 'View',
|
28
|
+
disabled: false,
|
29
|
+
disableMessage: '',
|
30
|
+
},
|
31
|
+
{
|
32
|
+
iconName: 'edit',
|
33
|
+
iconLabel: 'Edit',
|
34
|
+
disabled: false,
|
35
|
+
disableMessage: '',
|
36
|
+
},
|
37
|
+
{
|
38
|
+
iconName: 'full_access_icon',
|
39
|
+
iconLabel: 'Full Access',
|
40
|
+
disabled: false,
|
41
|
+
disableMessage: '',
|
42
|
+
},
|
43
|
+
];
|
44
|
+
|
45
|
+
const [selectedOption, setSelectedOption] = useState<string | null>(null);
|
46
|
+
|
47
|
+
const handleOptionChange = (selected: string | null) => {
|
48
|
+
setSelectedOption(selected);
|
49
|
+
};
|
50
|
+
|
51
|
+
return (
|
52
|
+
<IconRadioGroup
|
53
|
+
items={radioOptions}
|
54
|
+
onButtonClick={(selectedItem) => console.log('Selected:', selectedItem)}
|
55
|
+
onChange={handleOptionChange}
|
56
|
+
selectedValue={selectedOption}
|
57
|
+
/>
|
58
|
+
);
|
59
|
+
},
|
60
|
+
};
|
61
|
+
|
62
|
+
export const WithDisabledOption: Story = {
|
63
|
+
render: () => {
|
64
|
+
const radioOptions = [
|
65
|
+
{
|
66
|
+
iconName: 'no_access_icon',
|
67
|
+
iconLabel: 'No Access',
|
68
|
+
disabled: true,
|
69
|
+
disableMessage: 'user dont have access',
|
70
|
+
},
|
71
|
+
{
|
72
|
+
iconName: 'view_access_icon',
|
73
|
+
iconLabel: 'View',
|
74
|
+
disabled: false,
|
75
|
+
disableMessage: '',
|
76
|
+
},
|
77
|
+
{
|
78
|
+
iconName: 'edit',
|
79
|
+
iconLabel: 'Edit',
|
80
|
+
disabled: false,
|
81
|
+
disableMessage: '',
|
82
|
+
},
|
83
|
+
{
|
84
|
+
iconName: 'full_access_icon',
|
85
|
+
iconLabel: 'Full Access',
|
86
|
+
disabled: false,
|
87
|
+
disableMessage: '',
|
88
|
+
},
|
89
|
+
];
|
90
|
+
|
91
|
+
const [selectedOption, setSelectedOption] = useState<string | null>(null);
|
92
|
+
|
93
|
+
const handleOptionChange = (selected: string | null) => {
|
94
|
+
setSelectedOption(selected);
|
95
|
+
};
|
96
|
+
|
97
|
+
return (
|
98
|
+
<IconRadioGroup
|
99
|
+
items={radioOptions}
|
100
|
+
onButtonClick={() => {}}
|
101
|
+
onChange={handleOptionChange}
|
102
|
+
selectedValue={selectedOption}
|
103
|
+
/>
|
104
|
+
);
|
105
|
+
},
|
106
|
+
};
|
107
|
+
|
108
|
+
export default meta;
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
2
|
+
import classNames from 'classnames';
|
3
|
+
import './IconRadioGroup.scss';
|
4
|
+
import Icon from '../Icon/Icon';
|
5
|
+
import { IconRadioItem, IconRadioGroupProps } from './type';
|
6
|
+
|
7
|
+
const IconRadioGroup: React.FC<IconRadioGroupProps> = ({
|
8
|
+
items,
|
9
|
+
onButtonClick,
|
10
|
+
selectedValue: initialSelectedValue = null,
|
11
|
+
onChange,
|
12
|
+
className = '',
|
13
|
+
}) => {
|
14
|
+
const [selectedValue, setSelectedValue] = useState<string | null>(
|
15
|
+
initialSelectedValue
|
16
|
+
);
|
17
|
+
|
18
|
+
useEffect(() => {
|
19
|
+
if (initialSelectedValue !== selectedValue) {
|
20
|
+
setSelectedValue(initialSelectedValue);
|
21
|
+
}
|
22
|
+
}, [initialSelectedValue, selectedValue]);
|
23
|
+
|
24
|
+
const handleButtonClick = (item: IconRadioItem) => {
|
25
|
+
if (item.disabled) return;
|
26
|
+
|
27
|
+
const newSelectedValue = item.iconName;
|
28
|
+
setSelectedValue(newSelectedValue);
|
29
|
+
|
30
|
+
if (onChange) {
|
31
|
+
onChange(newSelectedValue);
|
32
|
+
}
|
33
|
+
|
34
|
+
onButtonClick(item);
|
35
|
+
};
|
36
|
+
|
37
|
+
return (
|
38
|
+
<div className={classNames('ff-icon-radio-group', className)}>
|
39
|
+
{items.map((item) => (
|
40
|
+
<div
|
41
|
+
key={item.iconName}
|
42
|
+
className={classNames('ff-icon-radio-button', {
|
43
|
+
selected: selectedValue === item.iconName,
|
44
|
+
disabled: item.disabled,
|
45
|
+
})}
|
46
|
+
onClick={() => handleButtonClick(item)}
|
47
|
+
>
|
48
|
+
<div
|
49
|
+
className={classNames('icon-container', {
|
50
|
+
selected: selectedValue === item.iconName,
|
51
|
+
})}
|
52
|
+
>
|
53
|
+
<Icon
|
54
|
+
name={item.iconName}
|
55
|
+
height={14}
|
56
|
+
width={14}
|
57
|
+
hoverEffect={false}
|
58
|
+
color={
|
59
|
+
selectedValue === item.iconName
|
60
|
+
? 'var(--drawer-footer-bg)'
|
61
|
+
: 'var(--brand-color)'
|
62
|
+
}
|
63
|
+
/>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
))}
|
67
|
+
<div className="line-connector"></div>
|
68
|
+
</div>
|
69
|
+
);
|
70
|
+
};
|
71
|
+
|
72
|
+
export default IconRadioGroup;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './IconRadioGroup';
|
@@ -0,0 +1,50 @@
|
|
1
|
+
export interface IconRadioItem {
|
2
|
+
/**
|
3
|
+
* The unique name for the icon, used to load the corresponding icon.
|
4
|
+
*/
|
5
|
+
iconName: string;
|
6
|
+
|
7
|
+
/**
|
8
|
+
* The display label for the icon. This can be used for accessibility purposes.
|
9
|
+
*/
|
10
|
+
iconLabel: string;
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Flag to determine if the icon option is disabled.
|
14
|
+
*/
|
15
|
+
disabled?: boolean;
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Message to display when the option is disabled.
|
19
|
+
*/
|
20
|
+
disableMessage?: string;
|
21
|
+
}
|
22
|
+
|
23
|
+
export interface IconRadioGroupProps {
|
24
|
+
/**
|
25
|
+
* Array of icon items that make up the radio button group.
|
26
|
+
*/
|
27
|
+
items: IconRadioItem[];
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Callback function called when a button/icon is clicked.
|
31
|
+
* It returns the selected item.
|
32
|
+
*/
|
33
|
+
onButtonClick: (selectedItem: IconRadioItem) => void;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* The currently selected icon value
|
37
|
+
*/
|
38
|
+
selectedValue?: string | null;
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Callback function to notify parent of selection change.
|
42
|
+
*/
|
43
|
+
onChange?: (selected: string | null) => void;
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Optional className for custom styling
|
47
|
+
*/
|
48
|
+
className?: string;
|
49
|
+
}
|
50
|
+
|
@@ -3,6 +3,7 @@ import { createPortal } from 'react-dom';
|
|
3
3
|
import './modal.scss';
|
4
4
|
import { ModalProps } from './types';
|
5
5
|
import { ThemeContext } from '../ThemeProvider/ThemeProvider';
|
6
|
+
import classNames from 'classnames';
|
6
7
|
|
7
8
|
const Modal: React.FC<ModalProps> = ({
|
8
9
|
isOpen,
|
@@ -54,7 +55,13 @@ const Modal: React.FC<ModalProps> = ({
|
|
54
55
|
onClick={shouldCloseOnOverlayClick ? onClose : undefined}
|
55
56
|
>
|
56
57
|
<div
|
57
|
-
className={
|
58
|
+
className={classNames(
|
59
|
+
`ff-modal-content ${currentTheme} ${contentClassName}`,
|
60
|
+
{
|
61
|
+
'modal-bottom-border': !isFooterDisplayed,
|
62
|
+
'modal-top-border': !isHeaderDisplayed,
|
63
|
+
}
|
64
|
+
)}
|
58
65
|
style={{ width: customWidth, height: customHeight }}
|
59
66
|
onClick={(e) => e.stopPropagation()}
|
60
67
|
aria-label={contentLabel}
|
@@ -15,7 +15,6 @@
|
|
15
15
|
background: var(--ff-mini-modal-border);
|
16
16
|
position: relative;
|
17
17
|
max-width: 100%;
|
18
|
-
border-radius: 12px;
|
19
18
|
padding: 8px;
|
20
19
|
|
21
20
|
.ff-modal-header {
|
@@ -24,6 +23,15 @@
|
|
24
23
|
}
|
25
24
|
}
|
26
25
|
|
26
|
+
.modal-bottom-border {
|
27
|
+
border-bottom-left-radius: 12px;
|
28
|
+
border-bottom-right-radius: 12px;
|
29
|
+
}
|
30
|
+
.modal-top-border {
|
31
|
+
border-top-left-radius: 12px;
|
32
|
+
border-top-right-radius: 12px;
|
33
|
+
}
|
34
|
+
|
27
35
|
.ff-modal-footer {
|
28
36
|
background-color: var(--expandable-menu-option-bg);
|
29
37
|
max-width: 100%;
|
@@ -35,5 +43,5 @@
|
|
35
43
|
justify-content: end;
|
36
44
|
align-items: center;
|
37
45
|
gap: 8px;
|
38
|
-
padding: 4px
|
46
|
+
padding: 4px 8px;
|
39
47
|
}
|
@@ -3,7 +3,14 @@
|
|
3
3
|
.ff-fixed-header-table {
|
4
4
|
overflow-y: auto;
|
5
5
|
}
|
6
|
-
|
6
|
+
.ff-table-icon {
|
7
|
+
position: absolute;
|
8
|
+
top: 10px;
|
9
|
+
right: 0;
|
10
|
+
margin-right: 10px;
|
11
|
+
z-index: 100;
|
12
|
+
cursor: pointer;
|
13
|
+
}
|
7
14
|
.ff-table {
|
8
15
|
width: 100%;
|
9
16
|
th,
|
@@ -16,7 +23,6 @@
|
|
16
23
|
tr {
|
17
24
|
th {
|
18
25
|
@extend .fontMd;
|
19
|
-
color: var(--text-color);
|
20
26
|
border-bottom: 1px solid var(--slider-table-color);
|
21
27
|
text-transform: uppercase;
|
22
28
|
}
|
@@ -54,7 +60,7 @@
|
|
54
60
|
}
|
55
61
|
td {
|
56
62
|
position: relative;
|
57
|
-
color: var(--text-color);
|
63
|
+
color: var(--table-column-text-color);
|
58
64
|
@extend .fontSm;
|
59
65
|
|
60
66
|
&.clickable-cell {
|
@@ -81,6 +87,12 @@
|
|
81
87
|
.default-bg {
|
82
88
|
background-color: transparent;
|
83
89
|
}
|
90
|
+
.default-color {
|
91
|
+
color: var(--table-header-text-color);
|
92
|
+
}
|
93
|
+
.primary-color {
|
94
|
+
color: var(--brand-color);
|
95
|
+
}
|
84
96
|
}
|
85
97
|
.border-borderRadius {
|
86
98
|
border: 1px solid var(--slider-table-color);
|
@@ -104,4 +116,4 @@
|
|
104
116
|
tbody tr.disabled-row {
|
105
117
|
opacity: 0.5;
|
106
118
|
cursor: not-allowed;
|
107
|
-
}
|
119
|
+
}
|