pixel-react 1.1.7 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/components/AttachmentButton/AttachmentButton.d.ts +5 -0
  3. package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +9 -0
  4. package/lib/components/AttachmentButton/index.d.ts +1 -0
  5. package/lib/components/AttachmentButton/types.d.ts +8 -0
  6. package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
  7. package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +8 -0
  8. package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
  9. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
  10. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
  11. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
  12. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
  13. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
  14. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
  15. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
  16. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
  17. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
  18. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
  19. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
  20. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
  21. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +81 -0
  22. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
  23. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +130 -0
  24. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
  25. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
  26. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
  27. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
  28. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
  29. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
  30. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
  31. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
  32. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
  33. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
  34. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
  35. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
  36. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
  37. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
  38. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +215 -0
  39. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
  40. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
  41. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +45 -0
  42. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +3 -0
  43. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
  44. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +15 -0
  45. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +3 -0
  46. package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
  47. package/lib/components/ExcelFile/Types.d.ts +176 -0
  48. package/lib/components/ExcelFile/index.d.ts +1 -0
  49. package/lib/components/IconRadioGroup/IconRadioGroup.d.ts +5 -0
  50. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
  51. package/lib/components/IconRadioGroup/index.d.ts +1 -0
  52. package/lib/components/IconRadioGroup/type.d.ts +41 -0
  53. package/lib/components/RadioButton/radioButtonTypes.d.ts +15 -0
  54. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +2 -1
  55. package/lib/components/RadioGroup/radioGroupTypes.d.ts +15 -0
  56. package/lib/components/Select/Select.d.ts +1 -1
  57. package/lib/components/Select/types.d.ts +4 -0
  58. package/lib/components/Table/Table.d.ts +1 -1
  59. package/lib/components/Table/Types.d.ts +8 -0
  60. package/lib/components/TableTree/TableTree.d.ts +1 -0
  61. package/lib/index.d.ts +71 -3
  62. package/lib/index.esm.js +408 -151
  63. package/lib/index.esm.js.map +1 -1
  64. package/lib/index.js +409 -150
  65. package/lib/index.js.map +1 -1
  66. package/lib/tsconfig.tsbuildinfo +1 -1
  67. package/package.json +4 -2
  68. package/src/assets/Themes/BaseTheme.scss +11 -0
  69. package/src/assets/Themes/DarkTheme.scss +10 -0
  70. package/src/assets/icons/add_file.svg +14 -0
  71. package/src/assets/icons/all_borders.svg +3 -0
  72. package/src/assets/icons/bold.svg +3 -0
  73. package/src/assets/icons/border_bottom.svg +3 -0
  74. package/src/assets/icons/border_left.svg +3 -0
  75. package/src/assets/icons/border_right.svg +3 -0
  76. package/src/assets/icons/border_top.svg +3 -0
  77. package/src/assets/icons/clone_icon.svg +3 -0
  78. package/src/assets/icons/double_underline.svg +5 -0
  79. package/src/assets/icons/fill_color.svg +7 -0
  80. package/src/assets/icons/formate_painter.svg +5 -0
  81. package/src/assets/icons/full_access_icon.svg +4 -0
  82. package/src/assets/icons/history_icon.svg +19 -0
  83. package/src/assets/icons/italic.svg +3 -0
  84. package/src/assets/icons/jira.svg +3 -0
  85. package/src/assets/icons/linked_defects.svg +11 -0
  86. package/src/assets/icons/move_icon.svg +5 -0
  87. package/src/assets/icons/nlp_help_icon.svg +3 -0
  88. package/src/assets/icons/no_access_icon.svg +4 -0
  89. package/src/assets/icons/no_border.svg +3 -0
  90. package/src/assets/icons/notification_icon.svg +3 -0
  91. package/src/assets/icons/strike_through.svg +3 -0
  92. package/src/assets/icons/text_align_center.svg +3 -0
  93. package/src/assets/icons/text_align_left.svg +3 -0
  94. package/src/assets/icons/text_align_right.svg +3 -0
  95. package/src/assets/icons/text_color.svg +3 -0
  96. package/src/assets/icons/underline.svg +4 -0
  97. package/src/assets/icons/update_icon.svg +3 -0
  98. package/src/assets/icons/view_access_icon.svg +4 -0
  99. package/src/components/AppHeader/AppHeader.scss +65 -4
  100. package/src/components/AppHeader/AppHeader.stories.tsx +1 -0
  101. package/src/components/AppHeader/AppHeader.tsx +7 -5
  102. package/src/components/AttachmentButton/AttachmentButton.scss +9 -0
  103. package/src/components/AttachmentButton/AttachmentButton.stories.tsx +76 -0
  104. package/src/components/AttachmentButton/AttachmentButton.tsx +113 -0
  105. package/src/components/AttachmentButton/index.ts +1 -0
  106. package/src/components/AttachmentButton/types.ts +8 -0
  107. package/src/components/Drawer/Drawer.scss +0 -1
  108. package/src/components/ExcelFile/ChangeExcelStyles.tsx +78 -0
  109. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +13 -0
  110. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.tsx +43 -0
  111. package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +102 -0
  112. package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +104 -0
  113. package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +131 -0
  114. package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +201 -0
  115. package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +123 -0
  116. package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +25 -0
  117. package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +49 -0
  118. package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +37 -0
  119. package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +46 -0
  120. package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +31 -0
  121. package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +5 -0
  122. package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +5 -0
  123. package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +102 -0
  124. package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +32 -0
  125. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.css +144 -0
  126. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +494 -0
  127. package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +19 -0
  128. package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +302 -0
  129. package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +18 -0
  130. package/src/components/ExcelFile/ExcelFile/Excel/context.ts +12 -0
  131. package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +200 -0
  132. package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +137 -0
  133. package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -0
  134. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +154 -0
  135. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +10 -0
  136. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +69 -0
  137. package/src/components/ExcelFile/ExcelFile/Excel/index.ts +48 -0
  138. package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +388 -0
  139. package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +82 -0
  140. package/src/components/ExcelFile/ExcelFile/Excel/point.ts +15 -0
  141. package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +682 -0
  142. package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +257 -0
  143. package/src/components/ExcelFile/ExcelFile/Excel/types.ts +269 -0
  144. package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +58 -0
  145. package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +8 -0
  146. package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +9 -0
  147. package/src/components/ExcelFile/ExcelFile/Excel/util.ts +173 -0
  148. package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +27 -0
  149. package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +520 -0
  150. package/src/components/ExcelFile/ExcelFile.stories.tsx +132 -0
  151. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.scss +16 -0
  152. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +79 -0
  153. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +22 -0
  154. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +271 -0
  155. package/src/components/ExcelFile/ImportExcelStyles.tsx +86 -0
  156. package/src/components/ExcelFile/Types.ts +241 -0
  157. package/src/components/ExcelFile/index.ts +1 -0
  158. package/src/components/Icon/Icons.scss +2 -3
  159. package/src/components/Icon/iconList.ts +59 -1
  160. package/src/components/IconRadioGroup/IconRadioGroup.scss +60 -0
  161. package/src/components/IconRadioGroup/IconRadioGroup.stories.tsx +108 -0
  162. package/src/components/IconRadioGroup/IconRadioGroup.tsx +72 -0
  163. package/src/components/IconRadioGroup/index.ts +1 -0
  164. package/src/components/IconRadioGroup/type.ts +50 -0
  165. package/src/components/Modal/modal.scss +1 -1
  166. package/src/components/MultiSelect/MultiSelect.scss +2 -2
  167. package/src/components/RadioButton/RadioButton.scss +74 -68
  168. package/src/components/RadioButton/RadioButton.tsx +22 -15
  169. package/src/components/RadioButton/radioButtonTypes.tsx +18 -0
  170. package/src/components/RadioGroup/RadioGroup.stories.tsx +42 -1
  171. package/src/components/RadioGroup/RadioGroup.tsx +3 -0
  172. package/src/components/RadioGroup/radioGroupTypes.tsx +18 -0
  173. package/src/components/Select/Select.scss +1 -2
  174. package/src/components/Select/Select.tsx +3 -2
  175. package/src/components/Select/types.ts +5 -0
  176. package/src/components/SequentialConnectingBranch/components/Branches/Branches.scss +5 -5
  177. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +1 -1
  178. package/src/components/Table/Table.scss +1 -0
  179. package/src/components/Table/Table.tsx +28 -13
  180. package/src/components/Table/Types.ts +8 -0
  181. package/src/components/TableTree/TableTree.scss +18 -2
  182. package/src/components/TableTree/TableTree.stories.tsx +9 -51
  183. package/src/components/TableTree/TableTree.tsx +15 -2
  184. package/src/index.ts +4 -0
@@ -1,6 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import RadioGroup from './RadioGroup';
3
3
  import { useState } from 'react';
4
+ import Icon from '../Icon';
4
5
 
5
6
  const meta: Meta<typeof RadioGroup> = {
6
7
  title: 'Components/RadioGroup',
@@ -57,7 +58,7 @@ export const WithDisabledOption: Story = {
57
58
  },
58
59
  };
59
60
 
60
- export const DisabledSelcted: Story = {
61
+ export const DisabledSelected: Story = {
61
62
  render: () => {
62
63
  const radioOptions = [
63
64
  { value: 'men', label: 'Men' },
@@ -78,4 +79,44 @@ export const DisabledSelcted: Story = {
78
79
  );
79
80
  },
80
81
  };
82
+
83
+ export const WithToolTipIcon: Story = {
84
+ render: () => {
85
+ const radioOptions = [
86
+ {
87
+ value: 'men',
88
+ label: 'Men',
89
+ showTooltip: true,
90
+ tooltipChildren: <Icon name="info" />,
91
+ tooltipTitle: 'Info',
92
+ },
93
+ {
94
+ value: 'women',
95
+ label: 'Women',
96
+ showTooltip: true,
97
+ disabled: true,
98
+ },
99
+ {
100
+ value: 'other',
101
+ label: 'Other',
102
+ showTooltip: true,
103
+ tooltipChildren: <Icon name="info" />,
104
+ tooltipTitle: 'Info',
105
+ },
106
+ ];
107
+ const [selectedOption, setSelectedOption] = useState('women');
108
+ const handleOptionChange = (option: Option) => {
109
+ setSelectedOption(option.value);
110
+ };
111
+ return (
112
+ <RadioGroup
113
+ options={radioOptions}
114
+ onChange={handleOptionChange}
115
+ name="gender"
116
+ selectedValue={selectedOption}
117
+ />
118
+ );
119
+ },
120
+ };
121
+
81
122
  export default meta;
@@ -16,6 +16,9 @@ const RadioGroup: React.FC<RadioGroupProps> = ({
16
16
  <RadioButton
17
17
  key={option.value}
18
18
  label={option.label}
19
+ showTooltip={option?.showTooltip}
20
+ tooltipChildren={option?.tooltipChildren}
21
+ tooltipTitle={option?.tooltipTitle}
19
22
  name={name}
20
23
  value={option.value}
21
24
  checked={selectedValue === option.value}
@@ -17,6 +17,24 @@ interface Option {
17
17
  * Optional.
18
18
  */
19
19
  disabled?: boolean;
20
+
21
+ /**
22
+ * Indicates whether the radio button show the tooltip.
23
+ * Optional.
24
+ */
25
+ showTooltip?: boolean;
26
+
27
+ /**
28
+ * The content of the tooltip.
29
+ * Optional.
30
+ */
31
+ tooltipChildren?: React.ReactNode;
32
+
33
+ /**
34
+ * The content of the tooltip.
35
+ * Optional.
36
+ */
37
+ tooltipTitle?: React.ReactNode;
20
38
  }
21
39
 
22
40
  /**
@@ -110,7 +110,7 @@
110
110
  &-input {
111
111
  @extend .fontSm;
112
112
  @include absolute-position(6px, auto, auto, auto);
113
- width: calc(100% - 38px);
113
+ width: 100%;
114
114
  min-height: calc(100% - 8px);
115
115
  padding: 0 28px 0 8px;
116
116
  border-radius: 4px;
@@ -118,7 +118,6 @@
118
118
  z-index: 100;
119
119
  background: transparent;
120
120
  outline: none;
121
- color: var(--ff-select-text-color);
122
121
 
123
122
  &:hover {
124
123
  ~ .ff-select-label {
@@ -115,6 +115,7 @@ const Select = ({
115
115
  showBorder = true,
116
116
  required = false,
117
117
  optionsRequired = true,
118
+ selectedOptionColor = 'var(--ff-select-text-color)',
118
119
  }: SelectProps) => {
119
120
  const initialState: SelectState = useMemo(
120
121
  () => ({
@@ -248,7 +249,7 @@ const Select = ({
248
249
  return (
249
250
  <div className={classNames(`ff-select-wrapper ${className}`)}>
250
251
  <div className="ff-select">
251
- <input
252
+ <input
252
253
  type="text"
253
254
  className={classNames('ff-select-input', {
254
255
  'ff-select-input--default': !isInputFocused,
@@ -261,7 +262,7 @@ const Select = ({
261
262
  'ff-select-input--no-border': !showBorder,
262
263
  })}
263
264
  // inline css required due to multiple overlay scenarios are present
264
- style={{ zIndex: optionZIndex }}
265
+ style={{ zIndex: optionZIndex, color: selectedOptionColor }}
265
266
  onFocus={() => handleSelectAction('FOCUS_INPUT')}
266
267
  onMouseEnter={() => handleSelectAction('MOUSE_ENTER')}
267
268
  onMouseLeave={() => handleSelectAction('MOUSE_LEAVE')}
@@ -64,6 +64,11 @@ export interface SelectProps {
64
64
  * optionsRequired:false prop removes options from dropdown & shows static label only
65
65
  */
66
66
  optionsRequired?: boolean;
67
+
68
+ /**
69
+ * selectedOptionColor prop provides the custom color for the selected option
70
+ */
71
+ selectedOptionColor?: string;
67
72
  }
68
73
 
69
74
  export interface DrowdownPosition {
@@ -1,5 +1,5 @@
1
1
  @mixin arrow-style(
2
- $size: 7px,
2
+ $size: 6px,
3
3
  $color: var(--ff-connecting-branch-color),
4
4
  $z-index: 2
5
5
  ) {
@@ -25,7 +25,7 @@
25
25
  $size: 5px,
26
26
  $color: var(--ff-connecting-branch-color),
27
27
  $position: right,
28
- $offset: -4px
28
+ $offset: -2px
29
29
  ) {
30
30
  position: absolute;
31
31
  height: $size;
@@ -43,8 +43,8 @@
43
43
  $offset: -1px
44
44
  ) {
45
45
  position: absolute;
46
- height: 7px;
47
- width: 7px;
46
+ height: 5px;
47
+ width: 5px;
48
48
  background-color: var(--ff-connecting-branch-color);
49
49
  clip-path: $clip;
50
50
  top: calc(25% - 4px);
@@ -180,5 +180,5 @@
180
180
 
181
181
  .ff-connecting-branch-grid-reverse {
182
182
  direction: rtl;
183
- margin-left: 1px;
183
+ margin: 0px 0px 16px 0px;
184
184
  }
@@ -106,7 +106,7 @@ const Branches = ({
106
106
  })}
107
107
  ></div>
108
108
  <MachineInputField
109
- width="180px"
109
+ width={`${machineColumnWidth}px`}
110
110
  runCount={runCount}
111
111
  key={ffid()}
112
112
  options={[
@@ -5,6 +5,7 @@
5
5
  }
6
6
 
7
7
  .ff-table {
8
+ width: 100%;
8
9
  th,
9
10
  td {
10
11
  text-align: left;
@@ -2,7 +2,12 @@ import './Table.scss';
2
2
  // import Checkbox from '../Checkbox';
3
3
  import { isFunction } from '../../assets/utils/functionUtils';
4
4
  import classNames from 'classnames';
5
- import { ColumnsProps, DataProps, TableProps ,SelectedItemProps} from './Types';
5
+ import {
6
+ ColumnsProps,
7
+ DataProps,
8
+ TableProps,
9
+ SelectedItemProps,
10
+ } from './Types';
6
11
  import { prepareData } from '../../utils/TableCell/TableCell';
7
12
  import Checkbox from '../Checkbox';
8
13
  import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
@@ -19,12 +24,14 @@ const Table = ({
19
24
  partialSelected = false,
20
25
  withFixedHeader = true,
21
26
  borderWithRadius = false,
22
- headerCheckboxDisabled = false,
27
+ headerCheckboxDisabled = false,
23
28
  // noDataContent,
24
29
  // noDataImage,
25
30
  // noDataImageSize,
26
31
  height = '100%',
27
32
  className = '',
33
+ tableHeadClass = '',
34
+ tableBodyRowClass = '',
28
35
  }: TableProps) => {
29
36
  const hanleOnclick = (column: ColumnsProps, row: DataProps) => {
30
37
  let { onClick, accessor } = column;
@@ -38,7 +45,7 @@ const Table = ({
38
45
  }
39
46
  };
40
47
  if (checkEmpty(data)) return null;
41
-
48
+
42
49
  return (
43
50
  <div
44
51
  style={{ height: height }}
@@ -49,11 +56,14 @@ const Table = ({
49
56
  >
50
57
  <table className={classNames(`ff-table`)} cellSpacing={0}>
51
58
  <thead
52
- className={classNames({
53
- 'ff-fixed-header': withFixedHeader,
54
- })}
59
+ className={classNames(
60
+ {
61
+ 'ff-fixed-header': withFixedHeader,
62
+ },
63
+ tableHeadClass
64
+ )}
55
65
  >
56
- <tr >
66
+ <tr>
57
67
  {/* columns.map((column, index) */}
58
68
  {columns.map((column, index) => (
59
69
  <th
@@ -62,7 +72,7 @@ const Table = ({
62
72
  style={{ width: column?.width }}
63
73
  >
64
74
  <div>
65
- {index === 0 && withCheckbox && (
75
+ {index === 0 && withCheckbox && (
66
76
  <span className="ff-table-checkbox">
67
77
  <Checkbox
68
78
  onChange={(e) => {
@@ -75,7 +85,7 @@ const Table = ({
75
85
  disabled={headerCheckboxDisabled}
76
86
  />
77
87
  </span>
78
- )}
88
+ )}
79
89
 
80
90
  {column.header}
81
91
  </div>
@@ -86,10 +96,15 @@ const Table = ({
86
96
  <tbody>
87
97
  {data.length > 0 &&
88
98
  data.map((row: any, index: number) => (
89
- <tr key={row.id || index} className={classNames(className,{
90
- 'disabled-row': row.disabled
91
- })}
92
- >
99
+ <tr
100
+ key={row.id || index}
101
+ className={classNames(
102
+ tableBodyRowClass,
103
+ {
104
+ 'disabled-row': row.disabled,
105
+ },
106
+ )}
107
+ >
93
108
  {columns.map((column, i) => {
94
109
  return (
95
110
  <td
@@ -97,4 +97,12 @@ export interface ColumnsProps {
97
97
  * classNames for the table container
98
98
  */
99
99
  className?: string;
100
+ /**
101
+ * classNames for the table Header container
102
+ */
103
+ tableHeadClass?:string;
104
+ /**
105
+ * classNames for the table Row container
106
+ */
107
+ tableBodyRowClass?:string;
100
108
  }
@@ -55,8 +55,8 @@
55
55
  }
56
56
  &:hover {
57
57
  background-color: var(--hover-color);
58
- .ff-action-section {
59
- display: block;
58
+ .ff-title-action-container {
59
+ display: flex;
60
60
  }
61
61
  }
62
62
  }
@@ -86,11 +86,22 @@
86
86
  font-weight: 400;
87
87
  cursor: pointer;
88
88
 
89
+ .ff-title-label {
90
+ display: flex;
91
+ align-items: center;
92
+ }
93
+
89
94
  .ff-hover-icon {
90
95
  display: none;
91
96
  position: absolute;
92
97
  right: 10px;
93
98
  }
99
+
100
+ // &:hover {
101
+ // > .ff-title-action-container {
102
+ // display: flex;
103
+ // }
104
+ // }
94
105
  }
95
106
  }
96
107
 
@@ -140,3 +151,8 @@
140
151
  }
141
152
  }
142
153
  }
154
+
155
+ .ff-title-action-container {
156
+ display: none;
157
+ align-items: center;
158
+ }
@@ -2,9 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import TableTree from './TableTree';
3
3
  import Button from '../Button';
4
4
  import treeData from './data';
5
- import Typography from '../Typography/Typography';
6
5
  import Icon from '../Icon/Icon';
7
- import Chip from '../Chip/Chip';
8
6
  import './TableTreeStories.scss';
9
7
 
10
8
  const meta: Meta<typeof TableTree> = {
@@ -19,52 +17,6 @@ type Story = StoryObj<typeof TableTree>;
19
17
 
20
18
  // TODO :: below code is a temporary will Modify later
21
19
 
22
- const createTilteAndAction = (row: any): JSX.Element => {
23
- if (row?.folder) {
24
- return (
25
- <div className="ff-parent-node-section">
26
- <div className="ff-folder-name-style">
27
- <Typography fontWeight="semi-bold">{`${row?.title} - Action Folder lenthy name`}</Typography>
28
- </div>
29
-
30
- <Chip
31
- fullText={`Sub Modules ${row?.scriptCount}`}
32
- label={`SM ${row?.subModuleCount}`}
33
- variant="primary"
34
- />
35
- <Chip
36
- fullText={`Scripts Count ${row?.scriptCount}`}
37
- label={`SC ${row?.scriptCount}`}
38
- variant="primary"
39
- />
40
- <div className="ff-action-section">
41
- <div className="ff-action-menu">
42
- <Icon hoverEffect name="logo" />
43
- <Icon hoverEffect name="sun_icon" />
44
- <Icon hoverEffect name="more" />
45
- </div>
46
- </div>
47
- </div>
48
- );
49
- } else {
50
- return (
51
- <div className="ff-parent-node-section">
52
- <div className="ff-file-name-style">
53
- <Typography>{`${row.title} - Action File with lenthy name`}</Typography>
54
- </div>
55
- <div className="ff-action-section">
56
- <div className="ff-action-menu">
57
- <Icon hoverEffect name="file" />
58
- <Icon hoverEffect name="manage_apps" />
59
- <Icon hoverEffect name="dropzone_icon" />
60
- <Icon hoverEffect name="more" />
61
- </div>
62
- </div>
63
- </div>
64
- );
65
- }
66
- };
67
-
68
20
  export const Default: Story = {
69
21
  args: {
70
22
  select: 'radio',
@@ -72,7 +24,7 @@ export const Default: Story = {
72
24
  e.preventDefault();
73
25
  e.stopPropagation();
74
26
 
75
- console.log(node, '------------', e);
27
+ console.log(node, '------------', e.target.value);
76
28
  },
77
29
  selected: ['MOD1003'],
78
30
  treeData,
@@ -82,8 +34,14 @@ export const Default: Story = {
82
34
  accessor: 'title',
83
35
  width: '400px',
84
36
  isClickable: true,
85
- cell: (e) => {
86
- return createTilteAndAction(e.row);
37
+ actions: (row) => {
38
+ console.log('🚀 ~ row:', row);
39
+ return [
40
+ <Icon hoverEffect name="file" />,
41
+ <Icon hoverEffect name="manage_apps" />,
42
+ <Icon hoverEffect name="dropzone_icon" />,
43
+ <Icon hoverEffect name="more" />,
44
+ ];
87
45
  },
88
46
  },
89
47
 
@@ -8,6 +8,7 @@ import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
8
8
  import Checkbox from '../Checkbox';
9
9
  import './TableTree.scss';
10
10
  import RadioButton from '../RadioButton';
11
+ import Typography from '../Typography';
11
12
 
12
13
  interface ColumnDataProps {
13
14
  name: string;
@@ -16,6 +17,7 @@ interface ColumnDataProps {
16
17
  isClickable?: boolean;
17
18
  minWidth?: string;
18
19
  cell?: (e: any) => JSX.Element | string | ReactNode;
20
+ actions?: (e: any) => JSX.Element | string | ReactNode;
19
21
  }
20
22
 
21
23
  interface ObjectProps {
@@ -162,11 +164,22 @@ const TableTree = ({
162
164
  )}
163
165
  {select === 'radio' && (
164
166
  <RadioButton
165
- checked={selected.includes(node.key)}
167
+ // checked={selected.includes(node.key)}
168
+ name={node.title}
169
+ value={node.key}
166
170
  onChange={(e) => handleCheckBoxChange(e, node)}
167
171
  />
168
172
  )}
169
- {prepareData(node, column)}
173
+
174
+ <Typography className="ff-title-label" fontWeight="medium">
175
+ {prepareData(node, column)}
176
+ </Typography>
177
+
178
+ {column.actions && (
179
+ <div className="ff-title-action-container">
180
+ {column.actions(node)}
181
+ </div>
182
+ )}
170
183
  </div>
171
184
  </td>
172
185
  );
package/src/index.ts CHANGED
@@ -46,8 +46,10 @@ import Paper from './components/Paper';
46
46
  import DashboardDonutChart from './components/Charts/DashboardDonutChart';
47
47
  import Recaptcha from './components/FF_Captcha/Recaptcha';
48
48
  import NLPInput from './components/NLPInput';
49
+ import IconRadioGroup from './components/IconRadioGroup';
49
50
  import MachineInputField from './components/MachineInputField';
50
51
  import SequentialConnectingBranch from './components/SequentialConnectingBranch';
52
+ import AttachmentButton from './components/AttachmentButton';
51
53
 
52
54
  // Utils imports
53
55
  import { checkEmpty } from './utils/checkEmpty/checkEmpty';
@@ -117,6 +119,8 @@ export {
117
119
  NLPInput,
118
120
  MachineInputField,
119
121
  SequentialConnectingBranch,
122
+ AttachmentButton,
123
+ IconRadioGroup,
120
124
 
121
125
  // utils exports
122
126
  checkEmpty,