@true-engineering/true-react-common-ui-kit 3.45.1 → 4.0.0-alpha0
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 +0 -40
- package/dist/components/CloseButton/CloseButton.d.ts +1 -1
- package/dist/components/ControlGroup/ControlGroup.d.ts +10 -0
- package/dist/components/ControlGroup/ControlGroup.stories.d.ts +7 -0
- package/dist/components/ControlGroup/ControlGroup.styles.d.ts +3 -0
- package/dist/components/ControlGroup/index.d.ts +2 -0
- package/dist/components/ControlWrapper/ControlWrapper.d.ts +27 -0
- package/dist/components/ControlWrapper/ControlWrapper.stories.d.ts +6 -0
- package/dist/components/ControlWrapper/ControlWrapper.styles.d.ts +6 -0
- package/dist/components/ControlWrapper/index.d.ts +2 -0
- package/dist/components/DateInput/DateInput.d.ts +3 -3
- package/dist/components/DatePicker/components/DatePickerHeader/DatePickerHeader.styles.d.ts +1 -1
- package/dist/components/DatePicker/types.d.ts +1 -1
- package/dist/components/FiltersPane/FiltersPane.stories.d.ts +1 -2
- package/dist/components/FiltersPane/components/FilterWithDates/FilterWithDates.d.ts +1 -1
- package/dist/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.d.ts +1 -2
- package/dist/components/Input/Input.d.ts +5 -52
- package/dist/components/Input/Input.stories.d.ts +4 -13
- package/dist/components/Input/Input.styles.d.ts +5 -4
- package/dist/components/Input/InputBase.d.ts +24 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Input/types.d.ts +3 -4
- package/dist/components/NumberInput/NumberInput.d.ts +3 -3
- package/dist/components/PhoneInput/PhoneInput.d.ts +3 -3
- package/dist/components/PhoneInput/PhoneInput.stories.d.ts +2 -2
- package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.d.ts +3 -2
- package/dist/components/PhoneInput/types.d.ts +2 -0
- package/dist/components/SearchInput/SearchInput.d.ts +1 -3
- package/dist/components/SearchInput/SearchInput.stories.d.ts +11 -1
- package/dist/components/SearchInput/SearchInput.styles.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +5 -5
- package/dist/components/Select/Select.styles.d.ts +17 -16
- package/dist/components/Select/types.d.ts +3 -0
- package/dist/components/SmartInput/SmartInput.d.ts +3 -3
- package/dist/components/TextArea/TextArea.d.ts +5 -14
- package/dist/components/TextArea/TextArea.styles.d.ts +8 -2
- package/dist/components/WithPopup/WithPopup.d.ts +3 -10
- package/dist/components/WithPopup/WithPopup.styles.d.ts +1 -1
- package/dist/components/WithPopup/types.d.ts +0 -3
- package/dist/components/WithTooltip/WithTooltip.styles.d.ts +0 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/theme/common.d.ts +13 -5
- package/dist/theme/types.d.ts +4 -2
- package/dist/true-react-common-ui-kit.js +1184 -1029
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +1164 -1009
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/Button/Button.stories.tsx +4 -8
- package/src/components/CloseButton/CloseButton.tsx +4 -4
- package/src/components/ControlGroup/ControlGroup.stories.tsx +40 -0
- package/src/components/ControlGroup/ControlGroup.styles.ts +46 -0
- package/src/components/ControlGroup/ControlGroup.tsx +55 -0
- package/src/components/ControlGroup/index.ts +2 -0
- package/src/components/ControlWrapper/ControlWrapper.stories.tsx +45 -0
- package/src/components/ControlWrapper/ControlWrapper.styles.ts +185 -0
- package/src/components/ControlWrapper/ControlWrapper.tsx +151 -0
- package/src/components/ControlWrapper/index.ts +2 -0
- package/src/components/DateInput/DateInput.styles.ts +2 -7
- package/src/components/DateInput/DateInput.tsx +4 -4
- package/src/components/DatePicker/DatePicker.tsx +3 -3
- package/src/components/DatePicker/components/DatePickerHeader/DatePickerHeader.styles.ts +7 -41
- package/src/components/DatePicker/components/DatePickerHeader/DatePickerHeader.tsx +18 -26
- package/src/components/DatePicker/types.ts +1 -1
- package/src/components/FileItem/FileItem.stories.tsx +4 -8
- package/src/components/FiltersPane/FiltersPane.stories.tsx +0 -4
- package/src/components/FiltersPane/components/FilterInterval/FilterInterval.styles.ts +9 -7
- package/src/components/FiltersPane/components/FilterInterval/FilterInterval.tsx +1 -8
- package/src/components/FiltersPane/components/FilterSelect/FilterSelect.styles.ts +7 -5
- package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.tsx +7 -9
- package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.ts +12 -17
- package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.tsx +2 -5
- package/src/components/IconButton/IconButton.stories.tsx +5 -5
- package/src/components/IncrementInput/IncrementInput.stories.tsx +0 -2
- package/src/components/IncrementInput/IncrementInput.styles.ts +9 -9
- package/src/components/Input/Input.stories.tsx +17 -25
- package/src/components/Input/Input.styles.ts +50 -260
- package/src/components/Input/Input.tsx +22 -285
- package/src/components/Input/InputBase.tsx +250 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/Input/types.ts +3 -32
- package/src/components/MultiSelectList/MultiSelectList.styles.ts +7 -5
- package/src/components/Notification/Notification.stories.tsx +2 -6
- package/src/components/NumberInput/NumberInput.stories.tsx +0 -2
- package/src/components/NumberInput/NumberInput.tsx +4 -7
- package/src/components/PhoneInput/PhoneInput.stories.tsx +6 -10
- package/src/components/PhoneInput/PhoneInput.styles.ts +13 -10
- package/src/components/PhoneInput/PhoneInput.tsx +9 -12
- package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.styles.ts +6 -4
- package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.tsx +6 -6
- package/src/components/PhoneInput/types.ts +4 -0
- package/src/components/SearchInput/SearchInput.stories.tsx +1 -0
- package/src/components/SearchInput/SearchInput.styles.ts +17 -27
- package/src/components/SearchInput/SearchInput.tsx +13 -34
- package/src/components/Select/CustomSelect.stories.tsx +6 -9
- package/src/components/Select/MultiSelect.stories.tsx +4 -12
- package/src/components/Select/Select.stories.tsx +3 -11
- package/src/components/Select/Select.styles.ts +28 -42
- package/src/components/Select/Select.tsx +73 -81
- package/src/components/Select/types.ts +5 -0
- package/src/components/SmartInput/SmartInput.stories.tsx +0 -1
- package/src/components/SmartInput/SmartInput.tsx +4 -4
- package/src/components/Status/Status.stories.tsx +3 -7
- package/src/components/TextArea/TextArea.stories.tsx +1 -3
- package/src/components/TextArea/TextArea.styles.ts +27 -126
- package/src/components/TextArea/TextArea.tsx +86 -112
- package/src/components/TextButton/TextButton.stories.tsx +4 -8
- package/src/components/WithPopup/WithPopup.stories.tsx +0 -1
- package/src/components/WithPopup/WithPopup.styles.ts +0 -2
- package/src/components/WithPopup/WithPopup.tsx +10 -36
- package/src/components/WithPopup/types.ts +0 -7
- package/src/components/WithTooltip/WithTooltip.styles.ts +0 -6
- package/src/components/WithTooltip/WithTooltip.tsx +2 -7
- package/src/components/index.ts +2 -0
- package/src/theme/common.ts +15 -6
- package/src/theme/types.ts +8 -4
- package/src/types.ts +3 -0
- package/dist/components/Input/constants.d.ts +0 -1
- package/dist/components/WithPopup/helpers.d.ts +0 -2
- package/src/components/Input/constants.ts +0 -1
- package/src/components/WithPopup/helpers.ts +0 -9
package/README.md
CHANGED
|
@@ -11,46 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
# Release Notes
|
|
13
13
|
|
|
14
|
-
## 3.45.1
|
|
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
|
-
|
|
54
14
|
## 3.42.0
|
|
55
15
|
|
|
56
16
|
### Changes
|
|
@@ -3,7 +3,7 @@ import { ICommonProps } from '../../types';
|
|
|
3
3
|
import { ICloseButtonStyles } from './CloseButton.styles';
|
|
4
4
|
export interface ICloseButtonProps extends ICommonProps<ICloseButtonStyles> {
|
|
5
5
|
/** @default 'close' */
|
|
6
|
-
|
|
6
|
+
icon?: 'close' | 'close-large' | 'close-window';
|
|
7
7
|
onClose?: () => void;
|
|
8
8
|
}
|
|
9
9
|
/** @deprecated */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ICommonProps } from '../../types';
|
|
3
|
+
import { IControlGroupStyles } from './ControlGroup.styles';
|
|
4
|
+
export interface IControlGroupProps extends ICommonProps<IControlGroupStyles> {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
infoMessage?: ReactNode;
|
|
7
|
+
errorMessage?: ReactNode;
|
|
8
|
+
direction?: 'horizontal' | 'vertical';
|
|
9
|
+
}
|
|
10
|
+
export declare const ControlGroup: import("react").ForwardRefExoticComponent<IControlGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./ControlGroup").IControlGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./ControlGroup").IControlGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { IClickHandlerEvent, ICommonProps } from '../../types';
|
|
3
|
+
import { IIcon } from '../Icon';
|
|
4
|
+
import { IControlWrapperStyles } from './ControlWrapper.styles';
|
|
5
|
+
export interface IControlWrapperProps extends ICommonProps<IControlWrapperStyles> {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
icon?: IIcon;
|
|
9
|
+
groupPlacement?: 'left' | 'right' | 'middle' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
10
|
+
/** @default false */
|
|
11
|
+
isInvalid?: boolean;
|
|
12
|
+
/** @default false */
|
|
13
|
+
isFocused?: boolean;
|
|
14
|
+
/** @default false */
|
|
15
|
+
hasValue?: boolean;
|
|
16
|
+
/** @default false */
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
/** @default false */
|
|
19
|
+
isFullWidth?: boolean;
|
|
20
|
+
/** @default false */
|
|
21
|
+
isLoading?: boolean;
|
|
22
|
+
/** @default false */
|
|
23
|
+
isDisabled?: boolean;
|
|
24
|
+
onIconClick?: (event: IClickHandlerEvent) => void;
|
|
25
|
+
onClear?: (event: IClickHandlerEvent) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const ControlWrapper: FC<IControlWrapperProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("react").FC<import("./ControlWrapper").IControlWrapperProps>;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./ControlWrapper").IControlWrapperProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ITweakStyles } from '../../theme';
|
|
2
|
+
import { IThemedPreloaderStyles } from '../ThemedPreloader';
|
|
3
|
+
export declare const useStyles: import("../../theme").IUseStyles<"invalid" | "root" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "minContent" | "activeLabel" | "disabledLabel" | "wrapper" | "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>;
|
|
4
|
+
export type IControlWrapperStyles = ITweakStyles<typeof useStyles, {
|
|
5
|
+
tweakPreloader: IThemedPreloaderStyles;
|
|
6
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
2
|
import { ICommonProps } from '../../types';
|
|
3
|
-
import { IInputProps } from '../Input';
|
|
3
|
+
import { IChangeInputEvent, IInputProps } from '../Input';
|
|
4
4
|
import { IDateInputStyles } from './DateInput.styles';
|
|
5
5
|
export interface IDateInputProps extends Omit<IInputProps, 'value' | 'beforeMaskedStateChange' | 'onChange' | 'tweakStyles'>, ICommonProps<IDateInputStyles> {
|
|
6
6
|
date?: string;
|
|
@@ -12,6 +12,6 @@ export interface IDateInputProps extends Omit<IInputProps, 'value' | 'beforeMask
|
|
|
12
12
|
/** @default false */
|
|
13
13
|
isRange?: boolean;
|
|
14
14
|
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
15
|
-
onChange?: (event:
|
|
15
|
+
onChange?: (event: IChangeInputEvent, value: string) => void;
|
|
16
16
|
}
|
|
17
17
|
export declare const DateInput: import("react").ForwardRefExoticComponent<IDateInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITweakStyles } from '../../../../theme';
|
|
2
2
|
import { ISelectStyles } from '../../../Select';
|
|
3
|
-
export declare const useStyles: import("../../../../theme").IUseStyles<"
|
|
3
|
+
export declare const useStyles: import("../../../../theme").IUseStyles<"btn" | "header" | "buttons", unknown>;
|
|
4
4
|
export declare const selectStyles: ISelectStyles;
|
|
5
5
|
export type IDatePickerHeaderStyles = ITweakStyles<typeof useStyles, {
|
|
6
6
|
tweakSelect: ISelectStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ReactDatePickerProps } from 'react-datepicker';
|
|
2
2
|
import { IDateInputProps } from '../DateInput';
|
|
3
3
|
export type IRange = [Date | null, Date | null] | null;
|
|
4
|
-
export type IDatePickerBaseProps = Pick<ReactDatePickerProps, 'startDate' | 'endDate' | 'minDate' | 'maxDate' | 'allowSameDay' | 'disabledKeyboardNavigation' | 'monthsShown' | 'popperModifiers' | 'popperPlacement' | 'filterDate' | 'dayClassName' | 'calendarContainer' | 'onCalendarOpen' | 'onCalendarClose' | 'onYearChange' | 'onMonthChange' | 'focusSelectedMonth' | 'shouldCloseOnSelect' | 'showPreviousMonths' | 'todayButton' | 'renderCustomHeader' | 'customInputRef' | 'preventOpenOnFocus' | 'strictParsing' | 'highlightDates' | 'fixedHeight' | 'excludeScrollbar'> & Omit<IDateInputProps, 'date' | 'startDate' | 'endDate' | 'isRange' | 'isActive' | '
|
|
4
|
+
export type IDatePickerBaseProps = Pick<ReactDatePickerProps, 'startDate' | 'endDate' | 'minDate' | 'maxDate' | 'allowSameDay' | 'disabledKeyboardNavigation' | 'monthsShown' | 'popperModifiers' | 'popperPlacement' | 'filterDate' | 'dayClassName' | 'calendarContainer' | 'onCalendarOpen' | 'onCalendarClose' | 'onYearChange' | 'onMonthChange' | 'focusSelectedMonth' | 'shouldCloseOnSelect' | 'showPreviousMonths' | 'todayButton' | 'renderCustomHeader' | 'customInputRef' | 'preventOpenOnFocus' | 'strictParsing' | 'highlightDates' | 'fixedHeight' | 'excludeScrollbar'> & Omit<IDateInputProps, 'date' | 'startDate' | 'endDate' | 'isRange' | 'isActive' | 'icon' | 'maxLength' | 'onChange' | 'onClick' | 'tweakStyles'>;
|
|
@@ -2,14 +2,13 @@ import { IFiltersPaneProps } from './FiltersPane';
|
|
|
2
2
|
interface IFiltersPaneWithCustomProps<Values, Content> extends IFiltersPaneProps<Values, Content> {
|
|
3
3
|
containerWidth: number;
|
|
4
4
|
isSearchDisabled: boolean;
|
|
5
|
-
isSearchAutosizeable: boolean;
|
|
6
5
|
shouldShowSettingsButton: boolean;
|
|
7
6
|
withFieldNameInLabel: boolean;
|
|
8
7
|
isGroupingEnabled: boolean;
|
|
9
8
|
checkboxPosition: 'left' | 'right';
|
|
10
9
|
isClearableFields: boolean;
|
|
11
10
|
}
|
|
12
|
-
declare function FiltersPaneWithCustomProps<Values, Content>({ containerWidth, isSearchDisabled,
|
|
11
|
+
declare function FiltersPaneWithCustomProps<Values, Content>({ containerWidth, isSearchDisabled, shouldShowSettingsButton, withFieldNameInLabel, isGroupingEnabled, checkboxPosition, isClearableFields, ...args }: IFiltersPaneWithCustomProps<Values, Content>): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
declare const _default: {
|
|
14
13
|
title: string;
|
|
15
14
|
component: typeof FiltersPaneWithCustomProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ICommonProps } from '../../../../types';
|
|
3
|
-
import {
|
|
3
|
+
import { IFilterLocaleKey, IFilterWithDateDatePickerProps, IFilterWithDatesValue, IPartialFilterLocale } from '../../types';
|
|
4
4
|
import { IFilterWithDatesStyles } from './FilterWithDates.styles';
|
|
5
5
|
export interface IFilterWithDatesProps extends ICommonProps<IFilterWithDatesStyles> {
|
|
6
6
|
value?: IFilterWithDatesValue;
|
|
@@ -16,6 +16,5 @@ export interface IFiltersPaneSearchProps<Value> extends ICommonProps<IFiltersPan
|
|
|
16
16
|
hasClearSelectButton?: boolean;
|
|
17
17
|
isDisabled?: boolean;
|
|
18
18
|
isSelectSearchEnabled?: boolean;
|
|
19
|
-
isAutoSizeable?: boolean;
|
|
20
19
|
}
|
|
21
|
-
export declare function FiltersPaneSearch<Value>({ value, fields, field, onChange, localeKey, locale, getValueId, getValueView, getValueString, hasClearSelectButton, isDisabled, isSelectSearchEnabled,
|
|
20
|
+
export declare function FiltersPaneSearch<Value>({ value, fields, field, onChange, localeKey, locale, getValueId, getValueView, getValueString, hasClearSelectButton, isDisabled, isSelectSearchEnabled, maxLength, data, tweakStyles, testId, }: IFiltersPaneSearchProps<Value>): JSX.Element;
|
|
@@ -1,52 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
export interface IInputProps extends ICommonProps<IInputStyles>, IReactInputMaskProps, IInputHTMLBaseProps {
|
|
7
|
-
value?: string;
|
|
8
|
-
label?: ReactNode;
|
|
9
|
-
/** @default false */
|
|
10
|
-
isDisabled?: boolean;
|
|
11
|
-
/** @default true */
|
|
12
|
-
hasFloatingLabel?: boolean;
|
|
13
|
-
/** @default false */
|
|
14
|
-
isReadonly?: boolean;
|
|
15
|
-
/** @default false */
|
|
16
|
-
isInvalid?: boolean;
|
|
17
|
-
/** @default false */
|
|
18
|
-
isActive?: boolean;
|
|
19
|
-
/** @default false */
|
|
20
|
-
isClearable?: boolean;
|
|
21
|
-
infoMessage?: string;
|
|
22
|
-
errorMessage?: string;
|
|
23
|
-
/** @default 'bottom' */
|
|
24
|
-
errorPosition?: 'top' | 'bottom';
|
|
25
|
-
inlineStyle?: 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'left' | 'right' | 'middle';
|
|
26
|
-
border?: 'top' | 'bottom' | 'left' | 'right';
|
|
27
|
-
/** @default false */
|
|
28
|
-
isRequired?: boolean;
|
|
29
|
-
/** @default false */
|
|
30
|
-
isLoading?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Должна ли ширина input'а подстраиваться под ширину контента
|
|
33
|
-
* @default false
|
|
34
|
-
*/
|
|
35
|
-
isAutoSizeable?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Ширина input'а по умолчанию. Используется только вместе с `isAutoSizeable` равному `true`
|
|
38
|
-
* @default 6
|
|
39
|
-
*/
|
|
40
|
-
defaultSize?: number;
|
|
41
|
-
iconType?: IIcon;
|
|
42
|
-
units?: string;
|
|
43
|
-
/** @default false */
|
|
44
|
-
hasRequiredLabel?: boolean;
|
|
45
|
-
/** @default false */
|
|
46
|
-
shouldFocusOnMount?: boolean;
|
|
47
|
-
/** @default false */
|
|
48
|
-
shouldAlwaysShowPlaceholder?: boolean;
|
|
49
|
-
onChange: (value: string, event: FormEvent<HTMLInputElement>) => void;
|
|
50
|
-
onIconClick?: () => void;
|
|
51
|
-
}
|
|
52
|
-
export declare const Input: import("react").ForwardRefExoticComponent<IInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IControlGroupProps } from '../ControlGroup';
|
|
3
|
+
import { IInputBaseProps } from './InputBase';
|
|
4
|
+
export type IInputProps = IInputBaseProps & Pick<IControlGroupProps, 'infoMessage' | 'errorMessage'>;
|
|
5
|
+
export declare const Input: import("react").ForwardRefExoticComponent<IInputBaseProps & Pick<IControlGroupProps, "infoMessage" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,34 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IInputProps } from './Input';
|
|
3
2
|
declare const _default: {
|
|
4
3
|
title: string;
|
|
5
|
-
component: import("react").ForwardRefExoticComponent<
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./InputBase").IInputBaseProps & Pick<import("..").IControlGroupProps, "infoMessage" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
6
5
|
argTypes: {
|
|
7
6
|
type: {
|
|
8
7
|
control: string;
|
|
9
8
|
options: (import("react").HTMLInputTypeAttribute | undefined)[];
|
|
10
9
|
};
|
|
11
|
-
|
|
10
|
+
icon: {
|
|
12
11
|
control: string;
|
|
13
12
|
options: (string | undefined)[];
|
|
14
13
|
};
|
|
15
|
-
iconType: {
|
|
16
|
-
control: string;
|
|
17
|
-
options: (string | undefined)[];
|
|
18
|
-
};
|
|
19
|
-
errorPosition: {
|
|
20
|
-
control: string;
|
|
21
|
-
options: string[];
|
|
22
|
-
};
|
|
23
14
|
mask: {
|
|
24
15
|
control: string;
|
|
25
16
|
options: (string | undefined)[];
|
|
26
17
|
};
|
|
27
|
-
|
|
18
|
+
groupPositions: {
|
|
28
19
|
control: string;
|
|
29
20
|
options: (string | undefined)[];
|
|
30
21
|
};
|
|
31
22
|
};
|
|
32
23
|
};
|
|
33
24
|
export default _default;
|
|
34
|
-
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R,
|
|
25
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("./InputBase").IInputBaseProps & Pick<import("..").IControlGroupProps, "infoMessage" | "errorMessage"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ITweakStyles } from '../../theme';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare const useStyles: import("../../theme").IUseStyles<"
|
|
2
|
+
import { IControlGroupStyles } from '../ControlGroup';
|
|
3
|
+
import { IControlWrapperStyles } from '../ControlWrapper';
|
|
4
|
+
export declare const useStyles: import("../../theme").IUseStyles<"input" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown>;
|
|
5
5
|
export type IInputStyles = ITweakStyles<typeof useStyles, {
|
|
6
|
-
|
|
6
|
+
tweakControlWrapper: IControlWrapperStyles;
|
|
7
|
+
tweakControlGroup: IControlGroupStyles;
|
|
7
8
|
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { Props as ReactInputMaskBaseProps } from 'react-input-mask';
|
|
3
|
+
import { ICommonProps } from '../../types';
|
|
4
|
+
import { IControlWrapperProps } from '../ControlWrapper';
|
|
5
|
+
import { IChangeInputEvent } from './types';
|
|
6
|
+
import { IInputStyles } from './Input.styles';
|
|
7
|
+
export interface IInputBaseProps extends ICommonProps<IInputStyles>, Pick<IControlWrapperProps, 'label' | 'icon' | 'groupPlacement' | 'isInvalid' | 'isRequired' | 'isLoading' | 'isDisabled' | 'onIconClick'>, Pick<InputHTMLAttributes<HTMLInputElement>, 'type' | 'inputMode' | 'autoComplete' | 'name' | 'maxLength' | 'tabIndex' | 'placeholder' | 'onFocus' | 'onBlur' | 'onPaste' | 'onKeyDown'>, Pick<Partial<ReactInputMaskBaseProps>, 'mask' | 'maskPlaceholder' | 'alwaysShowMask' | 'beforeMaskedStateChange'> {
|
|
8
|
+
value?: string;
|
|
9
|
+
units?: ReactNode;
|
|
10
|
+
/** @default false */
|
|
11
|
+
isReadonly?: boolean;
|
|
12
|
+
/** @default false */
|
|
13
|
+
isActive?: boolean;
|
|
14
|
+
/** @default false */
|
|
15
|
+
isClearable?: boolean;
|
|
16
|
+
/** @default false */
|
|
17
|
+
shouldFocusOnMount?: boolean;
|
|
18
|
+
/** @default false */
|
|
19
|
+
isAutoSized?: boolean;
|
|
20
|
+
/** @default false */
|
|
21
|
+
shouldAlwaysShowPlaceholder?: boolean;
|
|
22
|
+
onChange(value: string, event: IChangeInputEvent): void;
|
|
23
|
+
}
|
|
24
|
+
export declare const InputBase: import("react").ForwardRefExoticComponent<IInputBaseProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export type
|
|
4
|
-
export type IInputHTMLBaseProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'maxLength' | 'name' | 'tabIndex' | 'placeholder' | 'type' | 'inputMode' | 'onBlur' | 'onFocus' | 'onInput' | 'onKeyDown' | 'onPaste'>;
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { IClickHandlerEvent } from '../../types';
|
|
3
|
+
export type IChangeInputEvent = ChangeEvent<HTMLInputElement> | IClickHandlerEvent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { IInputProps } from '../Input';
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IChangeInputEvent, IInputProps } from '../Input';
|
|
3
3
|
export interface INumberInputProps extends Omit<IInputProps, 'value' | 'onChange' | 'type'> {
|
|
4
4
|
value?: number;
|
|
5
5
|
/** @default 3 */
|
|
@@ -13,6 +13,6 @@ export interface INumberInputProps extends Omit<IInputProps, 'value' | 'onChange
|
|
|
13
13
|
canBeNegative?: boolean;
|
|
14
14
|
min?: number;
|
|
15
15
|
max?: number;
|
|
16
|
-
onChange: (value: number | undefined, event?:
|
|
16
|
+
onChange: (value: number | undefined, event?: IChangeInputEvent) => void;
|
|
17
17
|
}
|
|
18
18
|
export declare const NumberInput: import("react").ForwardRefExoticComponent<INumberInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { ICommonProps } from '../../types';
|
|
3
3
|
import { IInputProps } from '../Input';
|
|
4
|
-
import { IPhoneValue } from './types';
|
|
4
|
+
import { IChangePhoneInputEvent, IPhoneValue } from './types';
|
|
5
5
|
import { IPhoneInputStyles } from './PhoneInput.styles';
|
|
6
6
|
export interface IPhoneInputProps extends Omit<IInputProps, 'value' | 'onChange' | 'type' | 'mask' | 'units' | 'placeholder' | 'tweakStyles'>, ICommonProps<IPhoneInputStyles> {
|
|
7
7
|
/** @default 'ru' */
|
|
@@ -12,6 +12,6 @@ export interface IPhoneInputProps extends Omit<IInputProps, 'value' | 'onChange'
|
|
|
12
12
|
noMatchesLabel?: string;
|
|
13
13
|
/** @default { phoneNumber: '', dialCode: '' } */
|
|
14
14
|
value?: IPhoneValue;
|
|
15
|
-
onChange: (phone: IPhoneValue, event:
|
|
15
|
+
onChange: (phone: IPhoneValue, event: IChangePhoneInputEvent) => void;
|
|
16
16
|
}
|
|
17
17
|
export declare const PhoneInput: FC<IPhoneInputProps>;
|
|
@@ -2,7 +2,7 @@ declare const _default: {
|
|
|
2
2
|
title: string;
|
|
3
3
|
component: import("react").FC<import("./PhoneInput").IPhoneInputProps>;
|
|
4
4
|
argTypes: {
|
|
5
|
-
|
|
5
|
+
icon: {
|
|
6
6
|
control: string;
|
|
7
7
|
options: (string | undefined)[];
|
|
8
8
|
};
|
|
@@ -14,7 +14,7 @@ declare const _default: {
|
|
|
14
14
|
control: string;
|
|
15
15
|
options: (string | undefined)[];
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
groupPlacement: {
|
|
18
18
|
control: string;
|
|
19
19
|
options: (string | undefined)[];
|
|
20
20
|
};
|
package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FC
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { ICommonProps } from '../../../../types';
|
|
3
|
+
import { IChangeInputEvent } from '../../../Input';
|
|
3
4
|
import { IPhoneInfo } from '../../types';
|
|
4
5
|
import { IPhoneInputCountryListStyles } from './PhoneInputCountryList.styles';
|
|
5
6
|
export interface IPhoneInputCountryListProps extends Pick<ICommonProps<IPhoneInputCountryListStyles>, 'tweakStyles'> {
|
|
@@ -8,6 +9,6 @@ export interface IPhoneInputCountryListProps extends Pick<ICommonProps<IPhoneInp
|
|
|
8
9
|
placeholder: string;
|
|
9
10
|
noMatchesLabel: string;
|
|
10
11
|
closeList: () => void;
|
|
11
|
-
onChange: (country: IPhoneInfo, event:
|
|
12
|
+
onChange: (country: IPhoneInfo, event: IChangeInputEvent | KeyboardEvent) => void;
|
|
12
13
|
}
|
|
13
14
|
export declare const PhoneInputCountryList: FC<IPhoneInputCountryListProps>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IChangeInputEvent } from '../Input';
|
|
1
2
|
export interface IPhoneInfo {
|
|
2
3
|
countryEn: string;
|
|
3
4
|
countryRu: string;
|
|
@@ -13,3 +14,4 @@ export interface IPhoneValue {
|
|
|
13
14
|
dialCode?: string;
|
|
14
15
|
countryCode?: string;
|
|
15
16
|
}
|
|
17
|
+
export type IChangePhoneInputEvent = IChangeInputEvent | KeyboardEvent;
|
|
@@ -2,7 +2,5 @@ import { FC } from 'react';
|
|
|
2
2
|
import { ICommonProps } from '../../types';
|
|
3
3
|
import { IInputProps } from '../Input';
|
|
4
4
|
import { ISearchInputStyles } from './SearchInput.styles';
|
|
5
|
-
export
|
|
6
|
-
onSearchIconClick?: () => void;
|
|
7
|
-
}
|
|
5
|
+
export type ISearchInputProps = Omit<IInputProps, 'type' | 'label' | 'isInvalid' | 'errorMessage' | 'isActive' | 'tweakStyles'> & ICommonProps<ISearchInputStyles>;
|
|
8
6
|
export declare const SearchInput: FC<ISearchInputProps>;
|
|
@@ -3,4 +3,14 @@ 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, import("
|
|
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<Partial<import("jss").Styles<"root" | "icon", unknown, undefined>> & Partial<{
|
|
7
|
+
tweakInput: Partial<import("jss").Styles<"input" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
|
|
8
|
+
tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "root" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "minContent" | "activeLabel" | "disabledLabel" | "wrapper" | "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
|
+
tweakControlGroup: Partial<import("jss").Styles<"error" | "root" | "horizontal" | "vertical" | "children" | "info" | "message", unknown, undefined>> & Partial<unknown>;
|
|
15
|
+
}>;
|
|
16
|
+
}>>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITweakStyles } from '../../theme';
|
|
2
2
|
import { IInputStyles } from '../Input';
|
|
3
|
-
export declare const useStyles: import("../../theme").IUseStyles<"root" | "icon"
|
|
3
|
+
export declare const useStyles: import("../../theme").IUseStyles<"root" | "icon", unknown>;
|
|
4
4
|
export declare const inputStyles: IInputStyles;
|
|
5
5
|
export type ISearchInputStyles = ITweakStyles<typeof useStyles, {
|
|
6
6
|
tweakInput: IInputStyles;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode, SyntheticEvent } from 'react';
|
|
2
|
+
import { ICommonProps, IDropdownWithPopperOptions } from '../../types';
|
|
3
3
|
import { IIcon } from '../Icon';
|
|
4
4
|
import { IInputProps } from '../Input';
|
|
5
5
|
import { ISearchInputProps } from '../SearchInput';
|
|
6
|
-
import { IMultipleSelectValue } from './types';
|
|
6
|
+
import { IChangeSelectEvent, IMultipleSelectValue } from './types';
|
|
7
7
|
import { ISelectStyles } from './Select.styles';
|
|
8
8
|
export interface ISelectProps<Value> extends Omit<IInputProps, 'value' | 'onChange' | 'onBlur' | 'type' | 'tweakStyles'>, ICommonProps<ISelectStyles> {
|
|
9
9
|
header?: ReactNode;
|
|
@@ -30,7 +30,7 @@ export interface ISelectProps<Value> extends Omit<IInputProps, 'value' | 'onChan
|
|
|
30
30
|
shouldRenderInList: true;
|
|
31
31
|
} & Pick<ISearchInputProps, 'placeholder'>;
|
|
32
32
|
isOptionDisabled?: (option: Value) => boolean;
|
|
33
|
-
onChange: (value: Value | undefined, event:
|
|
33
|
+
onChange: (value: Value | undefined, event: IChangeSelectEvent) => void;
|
|
34
34
|
onBlur?: (event: Event | SyntheticEvent) => void;
|
|
35
35
|
onType?: (value: string) => Promise<void>;
|
|
36
36
|
optionsFilter?: (options: Value[], query: string) => Value[];
|
|
@@ -46,7 +46,7 @@ export interface ISelectProps<Value> extends Omit<IInputProps, 'value' | 'onChan
|
|
|
46
46
|
export interface IMultipleSelectProps<Value> extends Omit<ISelectProps<Value>, 'value' | 'onChange' | 'compareValuesOnChange' | 'isMultiSelect'> {
|
|
47
47
|
isMultiSelect: true;
|
|
48
48
|
value: IMultipleSelectValue<Value> | undefined;
|
|
49
|
-
onChange: (value: IMultipleSelectValue<Value> | undefined, event:
|
|
49
|
+
onChange: (value: IMultipleSelectValue<Value> | undefined, event: IChangeSelectEvent) => void;
|
|
50
50
|
compareValuesOnChange?: (v1?: IMultipleSelectValue<Value>, v2?: IMultipleSelectValue<Value>) => boolean;
|
|
51
51
|
}
|
|
52
52
|
export declare function Select<Value>(props: ISelectProps<Value> | IMultipleSelectProps<Value>): JSX.Element;
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { type ITweakStyles } from '../../theme';
|
|
2
|
+
import { IControlGroupStyles } from '../ControlGroup';
|
|
2
3
|
import { type IInputStyles } from '../Input';
|
|
3
4
|
import { type ISearchInputStyles } from '../SearchInput';
|
|
4
5
|
import { type ISelectListStyles } from './components';
|
|
5
|
-
export declare const useStyles: import("../../theme").IUseStyles<"root" | "icon" | "disabled" | "inputWrapper" | "arrow" | "listWrapper" | "withoutPopper" | "listWrapperInBody" | "activeArrow" | "counter", unknown>;
|
|
6
|
-
export declare const readonlyInputStyles: Partial<import("jss").Styles<"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export declare const useStyles: import("../../theme").IUseStyles<"root" | "icon" | "disabled" | "inputWrapper" | "arrow" | "listWrapper" | "withoutPopper" | "listWrapperInBody" | "activeArrow" | "counter" | "iconWrapper", unknown>;
|
|
7
|
+
export declare const readonlyInputStyles: Partial<import("jss").Styles<"input" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
|
|
8
|
+
tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "root" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "minContent" | "activeLabel" | "disabledLabel" | "wrapper" | "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
|
+
}>;
|
|
10
13
|
}>;
|
|
14
|
+
tweakControlGroup: Partial<import("jss").Styles<"error" | "root" | "horizontal" | "vertical" | "children" | "info" | "message", unknown, undefined>> & Partial<unknown>;
|
|
11
15
|
}>;
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}>;
|
|
18
|
-
export declare const readonlyMultiSelectStyles: Partial<import("jss").Styles<"bottom" | "left" | "right" | "top" | "error" | "input" | "invalid" | "root" | "middle" | "icon" | "disabled" | "loading" | "label" | "requiredLabel" | "inputWrapper" | "info" | "autosize" | "clearIcon" | "focused" | "inputContent" | "unitsWrapper" | "fakeValue" | "units" | "withFloatingLabel" | "floatingLabelWithoutPadding" | "floating" | "activeLabel" | "required" | "floatingWithoutPadding" | "activeIcon" | "border-top" | "border-bottom" | "border-left" | "border-right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "controls" | "inputIcon" | "withIcons" | "withControls" | "invalidLabel" | "error-top" | "error-bottom" | "withUnits", unknown, undefined>> & Partial<{
|
|
19
|
-
tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
|
|
20
|
-
tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
|
|
21
|
-
tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
|
|
16
|
+
export declare const readonlyMultiSelectStyles: Partial<import("jss").Styles<"input" | "inputContent" | "autoSizeWrapper" | "autoSized" | "withUnits" | "withLabel" | "fakeValue" | "units" | "focusedInput" | "disabledInput" | "invalidInput", unknown, undefined>> & Partial<{
|
|
17
|
+
tweakControlWrapper: Partial<import("jss").Styles<"invalid" | "root" | "icon" | "disabled" | "loader" | "loading" | "label" | "requiredLabel" | "withValue" | "clearIcon" | "focused" | "minContent" | "activeLabel" | "disabledLabel" | "wrapper" | "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<{
|
|
18
|
+
tweakPreloader: Partial<import("jss").Styles<"root" | "default" | "currentColor" | "dots" | "logo", unknown, undefined>> & Partial<{
|
|
19
|
+
tweakDotsPreloader: Partial<import("jss").Styles<"root" | "dot" | "fadedDot" | "@keyframes FadedDots", unknown, undefined>> & Partial<unknown>;
|
|
20
|
+
tweakSvgPreloader: Partial<import("jss").Styles<"root", unknown, undefined>> & Partial<unknown>;
|
|
21
|
+
}>;
|
|
22
22
|
}>;
|
|
23
|
+
tweakControlGroup: Partial<import("jss").Styles<"error" | "root" | "horizontal" | "vertical" | "children" | "info" | "message", unknown, undefined>> & Partial<unknown>;
|
|
23
24
|
}>;
|
|
24
25
|
export declare const getInputStyles: ({ hasReadonlyInput, isMultiSelect, }: {
|
|
25
26
|
hasReadonlyInput: boolean;
|
|
26
27
|
isMultiSelect?: boolean | undefined;
|
|
27
28
|
}) => IInputStyles;
|
|
28
|
-
export declare const searchInputStyles: ISearchInputStyles;
|
|
29
29
|
export type ISelectStyles = ITweakStyles<typeof useStyles, {
|
|
30
|
+
tweakControlGroup: IControlGroupStyles;
|
|
30
31
|
tweakInput: IInputStyles;
|
|
31
32
|
tweakSelectList: ISelectListStyles;
|
|
32
33
|
tweakSearchInput: ISearchInputStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ClipboardEvent
|
|
2
|
-
import { IInputProps } from '../Input';
|
|
1
|
+
import { ClipboardEvent } from 'react';
|
|
2
|
+
import { IChangeInputEvent, IInputProps } from '../Input';
|
|
3
3
|
import { IInputRawValue, ISmartType } from './types';
|
|
4
4
|
export interface ISmartInputProps extends Omit<IInputProps, 'onChange'> {
|
|
5
5
|
/** @default 'default' */
|
|
@@ -9,6 +9,6 @@ export interface ISmartInputProps extends Omit<IInputProps, 'onChange'> {
|
|
|
9
9
|
isUpperCase?: boolean;
|
|
10
10
|
/** @default true */
|
|
11
11
|
isTransliterationEnabled?: boolean;
|
|
12
|
-
onChange: (value: string, rawValue: IInputRawValue, event?:
|
|
12
|
+
onChange: (value: string, rawValue: IInputRawValue, event?: IChangeInputEvent | ClipboardEvent<HTMLInputElement>) => void;
|
|
13
13
|
}
|
|
14
14
|
export declare const SmartInput: import("react").ForwardRefExoticComponent<ISmartInputProps & import("react").RefAttributes<HTMLInputElement>>;
|