pixel-react 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) 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/RadioButton/radioButtonTypes.d.ts +15 -0
  7. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +2 -1
  8. package/lib/components/RadioGroup/radioGroupTypes.d.ts +15 -0
  9. package/lib/components/Select/Select.d.ts +1 -1
  10. package/lib/components/Select/types.d.ts +4 -0
  11. package/lib/components/Table/Table.d.ts +1 -1
  12. package/lib/components/Table/Types.d.ts +8 -0
  13. package/lib/components/TableTree/TableTree.d.ts +1 -0
  14. package/lib/index.d.ts +27 -3
  15. package/lib/index.esm.js +399 -580
  16. package/lib/index.esm.js.map +1 -1
  17. package/lib/index.js +399 -579
  18. package/lib/index.js.map +1 -1
  19. package/lib/tsconfig.tsbuildinfo +1 -1
  20. package/package.json +1 -1
  21. package/src/assets/Themes/BaseTheme.scss +10 -0
  22. package/src/assets/Themes/DarkTheme.scss +9 -0
  23. package/src/assets/icons/add_file.svg +14 -0
  24. package/src/assets/icons/nlp_help_icon.svg +3 -0
  25. package/src/assets/icons/notification_icon.svg +3 -0
  26. package/src/assets/icons/update_icon.svg +3 -0
  27. package/src/components/AppHeader/AppHeader.scss +56 -0
  28. package/src/components/AttachmentButton/AttachmentButton.scss +9 -0
  29. package/src/components/AttachmentButton/AttachmentButton.stories.tsx +76 -0
  30. package/src/components/AttachmentButton/AttachmentButton.tsx +113 -0
  31. package/src/components/AttachmentButton/index.ts +1 -0
  32. package/src/components/AttachmentButton/types.ts +8 -0
  33. package/src/components/Drawer/Drawer.scss +0 -1
  34. package/src/components/Icon/iconList.ts +9 -0
  35. package/src/components/Modal/modal.scss +1 -1
  36. package/src/components/MultiSelect/MultiSelect.scss +2 -2
  37. package/src/components/RadioButton/RadioButton.scss +74 -68
  38. package/src/components/RadioButton/RadioButton.tsx +22 -15
  39. package/src/components/RadioButton/radioButtonTypes.tsx +18 -0
  40. package/src/components/RadioGroup/RadioGroup.stories.tsx +42 -1
  41. package/src/components/RadioGroup/RadioGroup.tsx +3 -0
  42. package/src/components/RadioGroup/radioGroupTypes.tsx +18 -0
  43. package/src/components/Select/Select.scss +1 -2
  44. package/src/components/Select/Select.tsx +3 -2
  45. package/src/components/Select/types.ts +5 -0
  46. package/src/components/SequentialConnectingBranch/components/Branches/Branches.scss +5 -5
  47. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +1 -1
  48. package/src/components/Table/Table.scss +1 -0
  49. package/src/components/Table/Table.tsx +28 -13
  50. package/src/components/Table/Types.ts +8 -0
  51. package/src/components/TableTree/TableTree.scss +18 -2
  52. package/src/components/TableTree/TableTree.stories.tsx +9 -51
  53. package/src/components/TableTree/TableTree.tsx +15 -2
  54. package/src/index.ts +2 -0
  55. package/lib/components/AddButton/AddButton.d.ts +0 -5
  56. package/lib/components/AddButton/AddButton.stories.d.ts +0 -6
  57. package/lib/components/AddButton/index.d.ts +0 -1
  58. package/lib/components/AddButton/types.d.ts +0 -4
  59. package/lib/utils/find/findAndInsert.d.ts +0 -7
  60. package/lib/utils/find/findAndInsert.stories.d.ts +0 -7
@@ -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
@@ -48,6 +48,7 @@ import Recaptcha from './components/FF_Captcha/Recaptcha';
48
48
  import NLPInput from './components/NLPInput';
49
49
  import MachineInputField from './components/MachineInputField';
50
50
  import SequentialConnectingBranch from './components/SequentialConnectingBranch';
51
+ import AttachmentButton from './components/AttachmentButton';
51
52
 
52
53
  // Utils imports
53
54
  import { checkEmpty } from './utils/checkEmpty/checkEmpty';
@@ -117,6 +118,7 @@ export {
117
118
  NLPInput,
118
119
  MachineInputField,
119
120
  SequentialConnectingBranch,
121
+ AttachmentButton,
120
122
 
121
123
  // utils exports
122
124
  checkEmpty,
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import './AddButton.scss';
3
- import { AddButtonProps } from './types';
4
- declare const AddButton: React.FC<AddButtonProps>;
5
- export default AddButton;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import AddButton from './AddButton';
3
- declare const meta: Meta<typeof AddButton>;
4
- type Story = StoryObj<typeof AddButton>;
5
- export declare const PrimaryAddButton: Story;
6
- export default meta;
@@ -1 +0,0 @@
1
- export { default } from './AddButton';
@@ -1,4 +0,0 @@
1
- export interface AddButtonProps {
2
- name: string;
3
- onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
4
- }
@@ -1,7 +0,0 @@
1
- export type AnyObject = {
2
- id: number;
3
- [key: string]: any;
4
- };
5
- export declare function findAndInsert<T extends AnyObject>(data: T[], key: keyof T, targetId: number, newEntry: T, insertPosition: 'above' | 'below' | 'replace', childrenKey?: string): {
6
- updatedArray: T[];
7
- } | null;
@@ -1,7 +0,0 @@
1
- import { findAndInsert } from './findAndInsert';
2
- declare const _default: {
3
- title: string;
4
- component: typeof findAndInsert;
5
- };
6
- export default _default;
7
- export declare const InteractivePlayground: () => import("react/jsx-runtime").JSX.Element;