@true-engineering/true-react-common-ui-kit 2.4.0 → 2.5.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.
- package/LICENSE +201 -201
- package/dist/components/DatePicker/DatePicker.styles.d.ts +4 -5
- package/dist/components/FiltersPane/index.d.ts +1 -0
- package/dist/components/Flag/augment.d.ts +1 -1
- package/dist/components/Icon/complexIcons/augment.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +1 -0
- package/dist/true-react-common-ui-kit.js +59 -59
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +59 -59
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/vite-env.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/AccountInfo/AccountInfo.styles.ts +55 -55
- package/src/components/AccountInfo/index.ts +2 -2
- package/src/components/AddButton/AddButton.stories.tsx +21 -21
- package/src/components/AddButton/AddButton.styles.ts +34 -34
- package/src/components/AddButton/index.ts +2 -2
- package/src/components/Button/Button.styles.ts +196 -196
- package/src/components/Checkbox/Checkbox.styles.ts +62 -62
- package/src/components/Checkbox/index.ts +2 -2
- package/src/components/CloseButton/index.ts +2 -2
- package/src/components/Colors/Colors.stories.tsx +7 -7
- package/src/components/Colors/Colors.styles.ts +38 -38
- package/src/components/Colors/index.ts +2 -2
- package/src/components/CssBaseline/CssBaseline.styles.ts +15 -15
- package/src/components/CssBaseline/index.ts +2 -2
- package/src/components/DateInput/DateInput.styles.ts +14 -14
- package/src/components/DateInput/constants.ts +2 -2
- package/src/components/DateInput/index.ts +3 -3
- package/src/components/DatePicker/DatePicker.styles.ts +4 -4
- package/src/components/Description/Description.styles.ts +31 -31
- package/src/components/Description/index.ts +2 -2
- package/src/components/FiltersPane/FiltersPane.styles.ts +71 -71
- package/src/components/FiltersPane/index.ts +1 -0
- package/src/components/Flag/Flag.styles.ts +18 -18
- package/src/components/Flag/augment.d.ts +1 -1
- package/src/components/Flag/index.ts +2 -2
- package/src/components/FlexibleTable/index.ts +3 -3
- package/src/components/Icon/Icon.styles.ts +10 -10
- package/src/components/Icon/complexIcons/augment.d.ts +1 -1
- package/src/components/Icon/complexIcons/avatarGreen.svg +57 -57
- package/src/components/Icon/complexIcons/index.ts +1 -1
- package/src/components/IncrementInput/IncrementInput.styles.ts +77 -77
- package/src/components/IncrementInput/index.ts +2 -2
- package/src/components/Input/Input.styles.ts +307 -307
- package/src/components/Input/Input.tsx +4 -2
- package/src/components/List/List.styles.ts +52 -52
- package/src/components/MoreMenu/MoreMenu.stories.tsx +46 -46
- package/src/components/MoreMenu/index.ts +2 -2
- package/src/components/MultiSelect/MultiSelect.styles.ts +55 -55
- package/src/components/NumberInput/index.ts +1 -1
- package/src/components/PhoneInput/PhoneInput.styles.ts +84 -84
- package/src/components/PhoneInput/types.ts +16 -16
- package/src/components/RadioButton/RadioButton.styles.ts +37 -37
- package/src/components/RadioButton/index.ts +2 -2
- package/src/components/ScrollIntoViewIfNeeded/index.ts +1 -1
- package/src/components/SearchInput/index.ts +2 -2
- package/src/components/Select/Select.styles.ts +96 -96
- package/src/components/Select/constants.ts +2 -2
- package/src/components/Select/types.ts +1 -1
- package/src/components/Switch/Switch.styles.ts +75 -75
- package/src/components/TextArea/TextArea.styles.ts +153 -153
- package/src/components/TextArea/index.ts +2 -2
- package/src/components/TextWithInfo/TextWithInfo.styles.ts +60 -60
- package/src/components/TextWithInfo/index.ts +2 -2
- package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +58 -58
- package/src/components/TextWithTooltip/TextWithTooltip.styles.ts +19 -19
- package/src/components/TextWithTooltip/index.ts +2 -2
- package/src/components/ThemedPreloader/ThemedPreloader.styles.ts +21 -21
- package/src/components/ThemedPreloader/components/DefaultPreloader/index.ts +1 -1
- package/src/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.ts +54 -54
- package/src/components/ThemedPreloader/components/DotsPreloader/index.ts +2 -2
- package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.ts +11 -11
- package/src/components/ThemedPreloader/components/SvgPreloader/index.ts +2 -2
- package/src/components/Toaster/Toaster.styles.ts +59 -59
- package/src/components/Tooltip/types.ts +1 -1
- package/src/components/index.ts +36 -36
- package/src/helpers/popper-helpers.ts +17 -17
- package/src/hooks/index.ts +6 -6
- package/src/hooks/use-is-mounted.ts +15 -15
- package/src/index.ts +6 -6
- package/src/vite-env.d.ts +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Modifier } from 'react-overlays/usePopper';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
-
export const minWidthModifier: Partial<Modifier<any, any>> = {
|
|
5
|
-
name: 'minWidth',
|
|
6
|
-
enabled: true,
|
|
7
|
-
phase: 'beforeWrite',
|
|
8
|
-
requires: ['computeStyles'],
|
|
9
|
-
fn: ({ state }) => {
|
|
10
|
-
state.styles.popper.minWidth = `${state.rects.reference.width}px`;
|
|
11
|
-
},
|
|
12
|
-
effect: ({ state }) => {
|
|
13
|
-
state.elements.popper.style.minWidth = `${
|
|
14
|
-
(state.elements.reference as HTMLElement).offsetWidth
|
|
15
|
-
}px`;
|
|
16
|
-
},
|
|
17
|
-
};
|
|
1
|
+
import { Modifier } from 'react-overlays/usePopper';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
+
export const minWidthModifier: Partial<Modifier<any, any>> = {
|
|
5
|
+
name: 'minWidth',
|
|
6
|
+
enabled: true,
|
|
7
|
+
phase: 'beforeWrite',
|
|
8
|
+
requires: ['computeStyles'],
|
|
9
|
+
fn: ({ state }) => {
|
|
10
|
+
state.styles.popper.minWidth = `${state.rects.reference.width}px`;
|
|
11
|
+
},
|
|
12
|
+
effect: ({ state }) => {
|
|
13
|
+
state.elements.popper.style.minWidth = `${
|
|
14
|
+
(state.elements.reference as HTMLElement).offsetWidth
|
|
15
|
+
}px`;
|
|
16
|
+
},
|
|
17
|
+
};
|
package/src/hooks/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './use-is-mounted';
|
|
2
|
-
export * from './use-on-click-outside';
|
|
3
|
-
export * from './use-theme';
|
|
4
|
-
export * from './use-dropdown';
|
|
5
|
-
export * from './use-tweak-styles';
|
|
6
|
-
export * from './use-did-mount-effect';
|
|
1
|
+
export * from './use-is-mounted';
|
|
2
|
+
export * from './use-on-click-outside';
|
|
3
|
+
export * from './use-theme';
|
|
4
|
+
export * from './use-dropdown';
|
|
5
|
+
export * from './use-tweak-styles';
|
|
6
|
+
export * from './use-did-mount-effect';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { useCallback, useEffect, useRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export const useIsMounted = (): (() => boolean) => {
|
|
4
|
-
const isMounted = useRef(false);
|
|
5
|
-
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
isMounted.current = true;
|
|
8
|
-
|
|
9
|
-
return () => {
|
|
10
|
-
isMounted.current = false;
|
|
11
|
-
};
|
|
12
|
-
}, []);
|
|
13
|
-
|
|
14
|
-
return useCallback(() => isMounted.current, []);
|
|
15
|
-
};
|
|
1
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
2
|
+
|
|
3
|
+
export const useIsMounted = (): (() => boolean) => {
|
|
4
|
+
const isMounted = useRef(false);
|
|
5
|
+
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
isMounted.current = true;
|
|
8
|
+
|
|
9
|
+
return () => {
|
|
10
|
+
isMounted.current = false;
|
|
11
|
+
};
|
|
12
|
+
}, []);
|
|
13
|
+
|
|
14
|
+
return useCallback(() => isMounted.current, []);
|
|
15
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { commonTheme } from './theme';
|
|
2
|
-
export * from './components';
|
|
3
|
-
export * from './hooks';
|
|
4
|
-
export * from './types';
|
|
5
|
-
export * from './helpers';
|
|
6
|
-
export * from './helpers/snippets';
|
|
1
|
+
export { commonTheme } from './theme';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export * from './hooks';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export * from './helpers';
|
|
6
|
+
export * from './helpers/snippets';
|
package/src/vite-env.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
1
|
+
/// <reference types="vite/client" />
|