@true-engineering/true-react-common-ui-kit 4.0.0-alpha35 → 4.0.0-alpha37
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/dist/components/FileItem/constants.d.ts +3 -4
- package/dist/components/FileItem/helpers.d.ts +3 -2
- package/dist/components/FileItem/types.d.ts +1 -2
- package/dist/components/Flag/customFlags/customFlags.d.ts +2 -2
- package/dist/components/Icon/icons/index.d.ts +31 -0
- package/dist/components/Icon/index.d.ts +1 -1
- package/dist/components/Icon/types.d.ts +7 -11
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +2 -2
- package/dist/helpers/misc.d.ts +1 -2
- package/dist/theme/types.d.ts +2 -3
- package/dist/true-react-common-ui-kit.js +230 -1175
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +349 -1295
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.stories.tsx +2 -3
- package/src/components/Colors/Colors.tsx +3 -3
- package/src/components/ControlWrapper/ControlWrapper.stories.tsx +3 -3
- package/src/components/FileItem/FileItem.stories.tsx +2 -3
- package/src/components/FileItem/constants.ts +3 -14
- package/src/components/FileItem/helpers.ts +3 -2
- package/src/components/FileItem/types.ts +1 -3
- package/src/components/Icon/Icon.stories.tsx +72 -63
- package/src/components/Icon/Icon.styles.ts +1 -1
- package/src/components/Icon/Icon.tsx +17 -12
- package/src/components/Icon/icons/calendar.svg +1 -0
- package/src/components/Icon/icons/check.svg +1 -0
- package/src/components/Icon/icons/chevron-down-small.svg +1 -0
- package/src/components/Icon/icons/chevron-down.svg +1 -0
- package/src/components/Icon/icons/chevron-left.svg +1 -0
- package/src/components/Icon/icons/chevron-right.svg +1 -0
- package/src/components/Icon/icons/close-large.svg +1 -0
- package/src/components/Icon/icons/close-window.svg +1 -0
- package/src/components/Icon/icons/close.svg +1 -0
- package/src/components/Icon/icons/filter.svg +1 -0
- package/src/components/Icon/icons/index.ts +62 -0
- package/src/components/Icon/icons/information.svg +1 -0
- package/src/components/Icon/icons/menu.svg +1 -0
- package/src/components/Icon/icons/minus.svg +1 -0
- package/src/components/Icon/icons/plus.svg +1 -0
- package/src/components/Icon/icons/search.svg +1 -0
- package/src/components/Icon/icons/status-error.svg +1 -0
- package/src/components/Icon/icons/status-info.svg +1 -0
- package/src/components/Icon/icons/status-not-ok.svg +1 -0
- package/src/components/Icon/icons/status-ok.svg +1 -0
- package/src/components/Icon/icons/status-warning.svg +1 -0
- package/src/components/Icon/icons/trash-can.svg +1 -0
- package/src/components/Icon/index.ts +1 -1
- package/src/components/Icon/types.ts +7 -13
- package/src/components/IconButton/IconButton.stories.tsx +2 -3
- package/src/components/Input/Input.stories.tsx +2 -2
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/Notification/Notification.stories.tsx +2 -3
- package/src/components/PhoneInput/PhoneInput.stories.tsx +2 -2
- package/src/components/Select/MultiSelect.stories.tsx +2 -2
- package/src/components/Select/Select.stories.tsx +2 -2
- package/src/components/Status/Status.stories.tsx +3 -4
- package/src/components/TextButton/TextButton.stories.tsx +2 -3
- package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.tsx +4 -4
- package/src/helpers/misc.ts +1 -2
- package/src/theme/types.ts +2 -4
- package/dist/components/Icon/complexIcons/icons.d.ts +0 -10
- package/dist/components/Icon/complexIcons/index.d.ts +0 -1
- package/dist/components/Icon/components/ComplexIconBoilerplate/ComplexIconBoilerplate.d.ts +0 -6
- package/dist/components/Icon/components/ComplexIconBoilerplate/index.d.ts +0 -1
- package/dist/components/Icon/components/IconBolerplate/IconBoilerplate.d.ts +0 -6
- package/dist/components/Icon/components/IconBolerplate/index.d.ts +0 -1
- package/dist/components/Icon/components/index.d.ts +0 -2
- package/dist/components/Icon/helpers.d.ts +0 -6
- package/dist/components/Icon/icons-list.d.ts +0 -1
- package/src/components/Flag/augment.d.ts +0 -1
- package/src/components/Icon/complexIcons/augment.d.ts +0 -1
- package/src/components/Icon/complexIcons/icons.ts +0 -19
- package/src/components/Icon/complexIcons/index.ts +0 -1
- package/src/components/Icon/components/ComplexIconBoilerplate/ComplexIconBoilerplate.tsx +0 -16
- package/src/components/Icon/components/ComplexIconBoilerplate/index.ts +0 -1
- package/src/components/Icon/components/IconBolerplate/IconBoilerplate.tsx +0 -43
- package/src/components/Icon/components/IconBolerplate/index.ts +0 -1
- package/src/components/Icon/components/index.ts +0 -2
- package/src/components/Icon/helpers.tsx +0 -9
- package/src/components/Icon/icons-list.ts +0 -855
- package/src/vite-env.d.ts +0 -1
- /package/src/components/Icon/{complexIcons/avatarGreen.svg → icons/avatar.svg} +0 -0
- /package/src/components/Icon/{complexIcons/fileExcel.svg → icons/file-excel.svg} +0 -0
- /package/src/components/Icon/{complexIcons/fileImage.svg → icons/file-image.svg} +0 -0
- /package/src/components/Icon/{complexIcons/fileOther.svg → icons/file-other.svg} +0 -0
- /package/src/components/Icon/{complexIcons/filePdf.svg → icons/file-pdf.svg} +0 -0
- /package/src/components/Icon/{complexIcons/fileWord.svg → icons/file-word.svg} +0 -0
- /package/src/components/Icon/{complexIcons/fileXml.svg → icons/file-xml.svg} +0 -0
- /package/src/components/Icon/{complexIcons/fileZip.svg → icons/file-zip.svg} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const iconTypeMap: Record<string, IFileIcon>;
|
|
1
|
+
import { IIconType } from '../Icon';
|
|
2
|
+
export declare const FILE_ICON_DEFAULT: IIconType;
|
|
3
|
+
export declare const iconTypeMap: Record<string, IIconType>;
|
|
5
4
|
export declare const FILE_ITEM_SIZES: readonly ["m", "l"];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IIconType } from '../Icon';
|
|
2
|
+
import { IFileInfo } from './types';
|
|
2
3
|
export declare const getFileExtensionByFilename: (fileName: string) => string | undefined;
|
|
3
4
|
export declare const getMimeTypeByFilename: (fileName: string) => string | undefined;
|
|
4
|
-
export declare const getFileIcon: ({ type, name }: IFileInfo) =>
|
|
5
|
+
export declare const getFileIcon: ({ type, name }: IFileInfo) => IIconType;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FILE_ITEM_SIZES } from './constants';
|
|
2
2
|
export interface IFileInfo {
|
|
3
3
|
name: File['name'];
|
|
4
4
|
type?: File['type'];
|
|
5
5
|
size?: File['size'];
|
|
6
6
|
}
|
|
7
|
-
export type IFileIcon = (typeof FILE_ICONS)[number];
|
|
8
7
|
export type IFileItemSize = (typeof FILE_ITEM_SIZES)[number];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const iconsMap: {
|
|
2
|
+
avatar: any;
|
|
3
|
+
calendar: any;
|
|
4
|
+
check: any;
|
|
5
|
+
'chevron-down-small': any;
|
|
6
|
+
'chevron-down': any;
|
|
7
|
+
'chevron-left': any;
|
|
8
|
+
'chevron-right': any;
|
|
9
|
+
'close-large': any;
|
|
10
|
+
'close-window': any;
|
|
11
|
+
close: any;
|
|
12
|
+
'file-excel': any;
|
|
13
|
+
'file-image': any;
|
|
14
|
+
'file-other': any;
|
|
15
|
+
'file-pdf': any;
|
|
16
|
+
'file-word': any;
|
|
17
|
+
'file-xml': any;
|
|
18
|
+
'file-zip': any;
|
|
19
|
+
filter: any;
|
|
20
|
+
information: any;
|
|
21
|
+
menu: any;
|
|
22
|
+
minus: any;
|
|
23
|
+
plus: any;
|
|
24
|
+
search: any;
|
|
25
|
+
'status-error': any;
|
|
26
|
+
'status-info': any;
|
|
27
|
+
'status-not-ok': any;
|
|
28
|
+
'status-ok': any;
|
|
29
|
+
'status-warning': any;
|
|
30
|
+
'trash-can': any;
|
|
31
|
+
};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { ReactElement
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
paths?: Array<SVGAttributes<never>>;
|
|
7
|
-
circles?: Array<SVGAttributes<never>>;
|
|
8
|
-
rects?: Array<SVGAttributes<never>>;
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { iconsMap } from './icons';
|
|
3
|
+
export type ISvgIcon = string;
|
|
4
|
+
type IUiKitIconsMap = typeof iconsMap;
|
|
5
|
+
export interface IIconsMap extends IUiKitIconsMap {
|
|
9
6
|
}
|
|
10
|
-
export type
|
|
11
|
-
export type IComplexIcon = keyof typeof complexIcons;
|
|
12
|
-
export type IIconType = ICommonIcon | IComplexIcon;
|
|
7
|
+
export type IIconType = keyof IIconsMap;
|
|
13
8
|
export type IIcon = IIconType | ReactElement;
|
|
9
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import { IModalPosition, IModalTransitionProps } from './types';
|
|
|
4
4
|
import { IModalStyles } from './Modal.styles';
|
|
5
5
|
export interface IModalProps extends ICommonProps<IModalStyles>, IModalTransitionProps {
|
|
6
6
|
title?: ReactNode;
|
|
7
|
-
/** @default 'l */
|
|
7
|
+
/** @default 'l' */
|
|
8
8
|
size?: 'l' | 'm' | 's';
|
|
9
9
|
/** @default false */
|
|
10
10
|
isFooterSticky?: boolean;
|
|
@@ -135,7 +135,7 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
|
|
|
135
135
|
style?: import("react").CSSProperties | undefined;
|
|
136
136
|
tabIndex?: number | undefined;
|
|
137
137
|
title?: string | undefined;
|
|
138
|
-
translate?: "
|
|
138
|
+
translate?: "yes" | "no" | undefined;
|
|
139
139
|
radioGroup?: string | undefined;
|
|
140
140
|
role?: import("react").AriaRole | undefined;
|
|
141
141
|
about?: string | undefined;
|
|
@@ -161,7 +161,7 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
|
|
|
161
161
|
results?: number | undefined;
|
|
162
162
|
security?: string | undefined;
|
|
163
163
|
unselectable?: "on" | "off" | undefined;
|
|
164
|
-
inputMode?: "search" | "none" | "text" | "
|
|
164
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
165
165
|
is?: string | undefined;
|
|
166
166
|
"aria-activedescendant"?: string | undefined;
|
|
167
167
|
"aria-atomic"?: (boolean | "false" | "true") | undefined;
|
package/dist/helpers/misc.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import hexToRgba from 'hex-to-rgba';
|
|
2
1
|
import { IDataAttributes } from '../types';
|
|
3
|
-
export
|
|
2
|
+
export { default as rgba } from 'hex-to-rgba';
|
|
4
3
|
/** @deprecated Используйте `toKebabCase` из `true-react-platform-helpers` */
|
|
5
4
|
export declare const transformToKebab: (string: string) => string;
|
|
6
5
|
export declare const hasExactParent: (element: Element, parent: Element) => boolean;
|
package/dist/theme/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Styles } from 'react-jss';
|
|
2
2
|
import { Classes, JssValue } from 'jss';
|
|
3
|
-
import type { IAccountInfoStyles, IAddButtonStyles, IButtonStyles, ICheckboxStyles, ICloseButtonStyles,
|
|
3
|
+
import type { IAccountInfoStyles, IAddButtonStyles, IButtonStyles, ICheckboxStyles, ICloseButtonStyles, IControlWrapperStyles, ICssBaselineStyles, IDateInputStyles, IDatePickerHeaderStyles, IDatePickerStyles, IDescriptionStyles, IDotsPreloaderStyles, IFileInputStyles, IFileItemStyles, IFilterIntervalStyles, IFilterSelectStyles, IFiltersPaneSearchStyles, IFiltersPaneStyles, IFilterValueViewStyles, IFilterWithDatesStyles, IFilterWithPeriodStyles, IFilterWrapperStyles, IFlagStyles, IFlexibleTableCellStyles, IFlexibleTableRowStyles, IFlexibleTableStyles, IIconButtonStyles, IIconStyles, IIconType, IIncrementInputStyles, IInputStyles, IListItemStyles, IListStyles, IModalStyles, IMoreMenuStyles, IMultiSelectInputStyles, IMultiSelectListStyles, IMultiSelectStyles, INewMoreMenuStyles, INotificationStyles, IPhoneInputCountryListStyles, IPhoneInputStyles, IPreloaderSvgType, IRadioButtonStyles, ISearchInputStyles, ISelectListStyles, ISelectorStyles, ISelectStyles, ISkeletonStyles, IStatusStyles, ISvgIcon, ISvgPreloaderStyles, ISwitchStyles, ITextAreaStyles, ITextButtonStyles, ITextWithInfoStyles, ITextWithTooltipStyles, IThemedPreloaderStyles, IToasterStyles, ITooltipStyles, IWithMessagesStyles, IWithPopupStyles, IWithTooltipStyles } from '../components';
|
|
4
4
|
export type IStyles<C extends string, P = unknown> = Styles<C, P, Partial<Styles<C, P>>>;
|
|
5
5
|
export type IMaybeArray<T> = T[] | T;
|
|
6
6
|
export type IMixedStyles<T> = IMaybeArray<T | boolean | undefined>;
|
|
@@ -75,8 +75,7 @@ export type IUiKitAnimations = Record<string, any>;
|
|
|
75
75
|
export type IUiKitHelpers = Record<string, Styles | (() => Styles)>;
|
|
76
76
|
export interface IUiKitTheme {
|
|
77
77
|
components?: Partial<IComponentStyles>;
|
|
78
|
-
icons?: Partial<Record<
|
|
79
|
-
complexIcons?: Partial<Record<IComplexIcon, string>>;
|
|
78
|
+
icons?: Partial<Record<IIconType, ISvgIcon>>;
|
|
80
79
|
preloaders?: Partial<Record<IPreloaderSvgType, string>>;
|
|
81
80
|
animations?: IUiKitAnimations;
|
|
82
81
|
colors?: Record<string, string>;
|