@true-engineering/true-react-common-ui-kit 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +24 -0
  2. package/dist/components/FiltersPane/FiltersPane.stories.d.ts +1 -2
  3. package/dist/components/FlexibleTable/FlexibleTable.d.ts +13 -21
  4. package/dist/components/FlexibleTable/FlexibleTable.stories.d.ts +3 -6
  5. package/dist/components/FlexibleTable/FlexibleTable.styles.d.ts +1 -1
  6. package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.d.ts +10 -14
  7. package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.d.ts +1 -1
  8. package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.d.ts +19 -12
  9. package/dist/components/FlexibleTable/types.d.ts +8 -8
  10. package/dist/components/Icon/Icon.stories.d.ts +2 -2
  11. package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +60 -56
  12. package/dist/components/Select/CustomSelect.stories.d.ts +1 -2
  13. package/dist/components/Select/MultiSelect.stories.d.ts +1 -2
  14. package/dist/components/Select/Select.stories.d.ts +1 -2
  15. package/dist/true-react-common-ui-kit.js +483 -356
  16. package/dist/true-react-common-ui-kit.js.map +1 -1
  17. package/dist/true-react-common-ui-kit.umd.cjs +482 -355
  18. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  19. package/package.json +2 -1
  20. package/src/components/FiltersPane/components/Filter/Filter.tsx +1 -1
  21. package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +10 -9
  22. package/src/components/FlexibleTable/FlexibleTable.stories.tsx +28 -114
  23. package/src/components/FlexibleTable/FlexibleTable.styles.ts +1 -8
  24. package/src/components/FlexibleTable/FlexibleTable.tsx +89 -98
  25. package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.ts +6 -0
  26. package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +48 -39
  27. package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +89 -57
  28. package/src/components/FlexibleTable/helpers.ts +1 -3
  29. package/src/components/FlexibleTable/types.ts +9 -9
  30. package/src/hooks/use-dropdown.ts +2 -0
@@ -1,10 +1,9 @@
1
- import { FC, ReactNode } from 'react';
1
+ import { CSSProperties, FC, ReactNode } from 'react';
2
2
 
3
- export type ITextAlignment = 'left' | 'center' | 'right';
3
+ export type IFlexibleTableRenderMode = 'table' | 'divs';
4
4
 
5
- export type IVerticalAlignment = 'middle' | 'top' | 'bottom' | 'baseline' | 'sub' | string;
6
-
7
- export type IPosition = 'sticky' | 'absolute' | 'relative' | 'static';
5
+ // TODO: Заменить Record<string, any> на Record<string, unknown>
6
+ export type ITableRow = Record<string, any>;
8
7
 
9
8
  export type ITitleComponent<Value> = FC<{
10
9
  value?: Value;
@@ -28,10 +27,11 @@ export type IFlexibleTableConfigType<Values> = {
28
27
  minWidth?: string | number;
29
28
  width?: string | number;
30
29
  maxWidth?: string | number;
31
- titleAlign?: ITextAlignment;
32
- cellAlign?: ITextAlignment;
33
- cellVerticalAlign?: IVerticalAlignment;
34
- position?: IPosition;
30
+ /** @default 'left' */
31
+ titleAlign?: CSSProperties['textAlign'];
32
+ cellAlign?: CSSProperties['textAlign'];
33
+ cellVerticalAlign?: CSSProperties['verticalAlign'];
34
+ position?: CSSProperties['position'];
35
35
  right?: number;
36
36
  left?: number;
37
37
  };
@@ -49,6 +49,8 @@ export const useDropdown = ({
49
49
 
50
50
  let popperData: ReturnType<typeof usePopper> | undefined;
51
51
  if (shouldUsePopper) {
52
+ // TODO: Вытащить хук из под условия???
53
+ // eslint-disable-next-line react-hooks/rules-of-hooks
52
54
  popperData = usePopper(referenceElement, dropdownElement, {
53
55
  enabled: isOpen,
54
56
  placement,