@true-engineering/true-react-common-ui-kit 4.0.0-alpha1 → 4.0.0-alpha3
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/README.md +40 -0
- package/dist/components/SearchInput/SearchInput.stories.d.ts +1 -11
- package/dist/components/SearchInput/SearchInput.styles.d.ts +3 -5
- package/dist/components/WithPopup/WithPopup.d.ts +10 -3
- package/dist/components/WithPopup/WithPopup.styles.d.ts +1 -1
- package/dist/components/WithPopup/helpers.d.ts +2 -0
- package/dist/components/WithPopup/types.d.ts +3 -0
- package/dist/components/WithTooltip/WithTooltip.styles.d.ts +1 -0
- package/dist/theme/common.d.ts +4 -2
- package/dist/true-react-common-ui-kit.js +222 -233
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +198 -209
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/FiltersPane/components/FilterInterval/FilterInterval.styles.ts +1 -1
- package/src/components/FiltersPane/components/FilterInterval/FilterInterval.tsx +6 -1
- package/src/components/IncrementInput/IncrementInput.styles.ts +1 -1
- package/src/components/SearchInput/SearchInput.styles.ts +16 -29
- package/src/components/SearchInput/SearchInput.tsx +12 -20
- package/src/components/WithPopup/WithPopup.stories.tsx +1 -0
- package/src/components/WithPopup/WithPopup.styles.ts +2 -0
- package/src/components/WithPopup/WithPopup.tsx +36 -10
- package/src/components/WithPopup/helpers.ts +9 -0
- package/src/components/WithPopup/types.ts +7 -0
- package/src/components/WithTooltip/WithTooltip.styles.ts +6 -0
- package/src/components/WithTooltip/WithTooltip.tsx +7 -2
- package/src/theme/common.ts +5 -2
package/README.md
CHANGED
|
@@ -11,6 +11,46 @@
|
|
|
11
11
|
|
|
12
12
|
# Release Notes
|
|
13
13
|
|
|
14
|
+
## 3.45.2
|
|
15
|
+
|
|
16
|
+
### Changes
|
|
17
|
+
|
|
18
|
+
- **SearchInput**: Добавлен класс `iconClickable`
|
|
19
|
+
|
|
20
|
+
## 3.45.0
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
|
|
24
|
+
- **Input**: Добавлена стандартная пропса `inputMode`
|
|
25
|
+
- **SearchInput**: Добавлена пропса `onSearchIconClick`
|
|
26
|
+
|
|
27
|
+
## 3.44.1
|
|
28
|
+
|
|
29
|
+
### Changes
|
|
30
|
+
|
|
31
|
+
- **WithPopup**: Явный рендер попапа в `document.body`
|
|
32
|
+
|
|
33
|
+
## 3.44.0
|
|
34
|
+
|
|
35
|
+
### Changes
|
|
36
|
+
|
|
37
|
+
- **WithPopup**:
|
|
38
|
+
|
|
39
|
+
1. Реализована возможность отрисовки стрелочки
|
|
40
|
+
2. Добавлены пропсы `arrow` и `arrowProps`
|
|
41
|
+
3. Добавлена пропса `isMinWidthSameAsTrigger`, которая выставляет минимальную ширину попапа равной ширине триггера
|
|
42
|
+
4. Добавлена пропса `popupData`, которая позволяет прокинуть data-атрибуты в попап
|
|
43
|
+
5. В `children` добавлена пропса `floatingContext`, возвращаемый хуком `useFloating`
|
|
44
|
+
6. Дефолтное значение пропсы `shouldStopPropagation` изменено с `true` на `eventType === 'click`
|
|
45
|
+
|
|
46
|
+
- **WithTooltip**: `zIndex` тултипа как в `TextWithTooltip` (9999)
|
|
47
|
+
|
|
48
|
+
## 3.43.0
|
|
49
|
+
|
|
50
|
+
### Changes
|
|
51
|
+
|
|
52
|
+
- **withScrollBar**: Переносит константы размеров скролла в CSS-переменные: `--webkit-scrollbar-width` и `--webkit-scrollbar-height`
|
|
53
|
+
|
|
14
54
|
## 3.42.0
|
|
15
55
|
|
|
16
56
|
### Changes
|
|
@@ -3,14 +3,4 @@ declare const _default: {
|
|
|
3
3
|
component: import("react").FC<import("./SearchInput").ISearchInputProps>;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, Omit<import("..").IInputProps, "tweakStyles" | "label" | "isInvalid" | "type" | "isActive" | "errorMessage"> & import("../..").IDataAttributesProps & import("../..").ITweakStylesProps<
|
|
7
|
-
tweakInput: Partial<import("jss").Styles<"input" | "withValue" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
|
|
8
|
-
tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "wrapper" | "controlWrapper" | "minContent" | "activeLabel" | "disabledLabel" | "controls" | "iconInner" | "customIcon" | "endIcon" | "activeIcon" | "placement-top" | "placement-bottom" | "placement-top-left" | "placement-top-right" | "placement-bottom-left" | "placement-bottom-right" | "placement-left" | "placement-right" | "placement-middle", unknown, undefined>> & Partial<{
|
|
9
|
-
tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
|
|
10
|
-
tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
|
|
11
|
-
tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
|
|
12
|
-
}>;
|
|
13
|
-
}>;
|
|
14
|
-
tweakWithMessages: Partial<import("jss").Styles<"error" | "horizontal" | "vertical" | "children" | "info" | "withMessages" | "message", unknown, undefined>> & Partial<unknown>;
|
|
15
|
-
}>;
|
|
16
|
-
}>>>;
|
|
6
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, Omit<import("..").IInputProps, "tweakStyles" | "label" | "isInvalid" | "type" | "isActive" | "errorMessage"> & import("../..").IDataAttributesProps & import("../..").ITweakStylesProps<import("./SearchInput.styles").ISearchInputStyles>>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ITweakStyles } from '../../theme';
|
|
2
1
|
import { IInputStyles } from '../Input';
|
|
3
|
-
export declare const useStyles: import("../../theme").IUseStyles<"root" | "icon", unknown>;
|
|
4
2
|
export declare const inputStyles: IInputStyles;
|
|
5
|
-
export
|
|
6
|
-
tweakInput
|
|
7
|
-
}
|
|
3
|
+
export interface ISearchInputStyles {
|
|
4
|
+
tweakInput?: IInputStyles;
|
|
5
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Placement, Middleware, OffsetOptions, UseHoverProps } from '@floating-ui/react';
|
|
3
|
-
import { ICommonProps, IRenderNode } from '../../types';
|
|
4
|
-
import { IPopupEventType, IWithPopupChildrenProps, IWithPopupToggleEvent, IWithPopupTriggerProps } from './types';
|
|
3
|
+
import { ICommonProps, IDataAttributes, IRenderNode } from '../../types';
|
|
4
|
+
import { IPopupArrowProps, IPopupEventType, IWithPopupChildrenProps, IWithPopupToggleEvent, IWithPopupTriggerProps } from './types';
|
|
5
5
|
import { IWithPopupStyles } from './WithPopup.styles';
|
|
6
6
|
export interface IWithPopupProps extends ICommonProps<IWithPopupStyles> {
|
|
7
7
|
trigger: IRenderNode<IWithPopupTriggerProps>;
|
|
@@ -15,7 +15,9 @@ export interface IWithPopupProps extends ICommonProps<IWithPopupStyles> {
|
|
|
15
15
|
hoverDelay?: UseHoverProps['delay'];
|
|
16
16
|
/** @default 6 */
|
|
17
17
|
popupOffset?: OffsetOptions;
|
|
18
|
-
|
|
18
|
+
arrowProps?: IPopupArrowProps;
|
|
19
|
+
popupData?: IDataAttributes;
|
|
20
|
+
/** @default true, if eventType === click */
|
|
19
21
|
shouldStopPropagation?: boolean;
|
|
20
22
|
/** @default false */
|
|
21
23
|
shouldHideOnScroll?: boolean;
|
|
@@ -28,6 +30,11 @@ export interface IWithPopupProps extends ICommonProps<IWithPopupStyles> {
|
|
|
28
30
|
canBeFlipped?: boolean;
|
|
29
31
|
/** @default false */
|
|
30
32
|
isDisabled?: boolean;
|
|
33
|
+
/** @default false */
|
|
34
|
+
shouldShowArrow?: boolean;
|
|
35
|
+
/** Должна ли минимальная ширина попапа быть равна ширине триггера
|
|
36
|
+
* @default false */
|
|
37
|
+
isMinWidthSameAsTrigger?: boolean;
|
|
31
38
|
onToggle?: (isActive: boolean, event?: IWithPopupToggleEvent) => void;
|
|
32
39
|
}
|
|
33
40
|
export declare const WithPopup: FC<IWithPopupProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ITweakStyles } from '../../theme';
|
|
2
|
-
export declare const useStyles: import("../../theme").IUseStyles<"active" | "disabled" | "clickable" | "animationEnd" | "animationStart" | "trigger" | "popup" | "dropdown-initial" | "dropdown-open" | "dropdown-close" | "dropdown-unmounted", unknown>;
|
|
2
|
+
export declare const useStyles: import("../../theme").IUseStyles<"active" | "disabled" | "clickable" | "animationEnd" | "animationStart" | "arrow" | "trigger" | "popup" | "dropdown-initial" | "dropdown-open" | "dropdown-close" | "dropdown-unmounted", unknown>;
|
|
3
3
|
export type IWithPopupStyles = ITweakStyles<typeof useStyles>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MouseEvent, KeyboardEvent } from 'react';
|
|
2
|
+
import type { FloatingArrowProps, UseFloatingReturn } from '@floating-ui/react';
|
|
2
3
|
import type { IDataAttributesProps, IDomElementInteractions } from '../../types';
|
|
3
4
|
import type { POPUP_EVENT_TYPES } from './constants';
|
|
4
5
|
export type IPopupEventType = (typeof POPUP_EVENT_TYPES)[number];
|
|
@@ -15,5 +16,7 @@ export interface IWithPopupTriggerProps {
|
|
|
15
16
|
referenceProps?: IReferenceProps;
|
|
16
17
|
}
|
|
17
18
|
export interface IWithPopupChildrenProps {
|
|
19
|
+
floatingContext: UseFloatingReturn['context'];
|
|
18
20
|
onClose: (event?: IWithPopupToggleEvent) => void;
|
|
19
21
|
}
|
|
22
|
+
export type IPopupArrowProps = Pick<FloatingArrowProps, 'width' | 'height' | 'tipRadius' | 'staticOffset' | 'd' | 'stroke' | 'strokeWidth'>;
|
package/dist/theme/common.d.ts
CHANGED
|
@@ -48,9 +48,11 @@ export declare const helpers: {
|
|
|
48
48
|
boxSizing: string;
|
|
49
49
|
overflow: string;
|
|
50
50
|
'@supports selector(::-webkit-scrollbar)': {
|
|
51
|
+
'--webkit-scrollbar-width': string;
|
|
52
|
+
'--webkit-scrollbar-height': string;
|
|
51
53
|
'&::-webkit-scrollbar': {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
width: string;
|
|
55
|
+
height: string;
|
|
54
56
|
'&-thumb': {
|
|
55
57
|
width: number;
|
|
56
58
|
minHeight: number;
|