@true-engineering/true-react-common-ui-kit 3.5.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.
- package/README.md +28 -0
- package/dist/components/FiltersPane/FiltersPane.stories.d.ts +1 -2
- package/dist/components/FlexibleTable/FlexibleTable.d.ts +13 -21
- package/dist/components/FlexibleTable/FlexibleTable.stories.d.ts +3 -6
- package/dist/components/FlexibleTable/FlexibleTable.styles.d.ts +1 -1
- package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.d.ts +10 -14
- package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.d.ts +1 -1
- package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.d.ts +19 -12
- package/dist/components/FlexibleTable/types.d.ts +8 -8
- package/dist/components/Icon/Icon.stories.d.ts +2 -2
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +60 -56
- package/dist/components/Select/CustomSelect.stories.d.ts +13 -0
- package/dist/components/Select/MultiSelect.stories.d.ts +1 -2
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.stories.d.ts +1 -2
- package/dist/components/Select/components/SelectList/SelectList.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +485 -358
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +484 -357
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +2 -1
- package/src/components/FiltersPane/components/Filter/Filter.tsx +1 -1
- package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +10 -9
- package/src/components/FlexibleTable/FlexibleTable.stories.tsx +28 -114
- package/src/components/FlexibleTable/FlexibleTable.styles.ts +1 -8
- package/src/components/FlexibleTable/FlexibleTable.tsx +89 -98
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.ts +6 -0
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +48 -39
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +89 -57
- package/src/components/FlexibleTable/helpers.ts +1 -3
- package/src/components/FlexibleTable/types.ts +9 -9
- package/src/components/Select/CustomSelect.stories.tsx +217 -0
- package/src/components/Select/Select.tsx +3 -2
- package/src/components/Select/components/SelectList/SelectList.tsx +2 -2
- package/src/hooks/use-dropdown.ts +2 -0
package/README.md
CHANGED
|
@@ -10,6 +10,34 @@
|
|
|
10
10
|
|
|
11
11
|
# Release Notes
|
|
12
12
|
|
|
13
|
+
## v3.7.0
|
|
14
|
+
|
|
15
|
+
### Changes
|
|
16
|
+
|
|
17
|
+
- Подключен плагин `eslint-plugin-react-hooks` для линтера
|
|
18
|
+
|
|
19
|
+
- **FlexibleTable**:
|
|
20
|
+
|
|
21
|
+
1. Улучшение код-стайла
|
|
22
|
+
2. Добавлена пропса `isExpandableRowComponentInitiallyOpen`
|
|
23
|
+
|
|
24
|
+
- **FlexibleTableCell**: Добавлены классы `loading` и `skeleton` для отрисовки скелетона
|
|
25
|
+
|
|
26
|
+
### Breaking changes
|
|
27
|
+
|
|
28
|
+
- **FlexibleTable**:
|
|
29
|
+
|
|
30
|
+
1. Удалены типы `ITextAlignment`, `IVerticalAlignment` и `IPosition`
|
|
31
|
+
2. Удалены классы `skeletonRow` и `skeleton`
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **FlexibleTable**: Исправлен баг, когда при отрисовка скелетона первая колонка таблицы не была sticky
|
|
36
|
+
|
|
37
|
+
## v3.6.0
|
|
38
|
+
|
|
39
|
+
- **Select**: Добавлена возможность передавать `defaultOptionLabel` как `ReactNode`
|
|
40
|
+
|
|
13
41
|
## v3.5.0
|
|
14
42
|
|
|
15
43
|
### Fixed
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ComponentStory } from '@storybook/react';
|
|
3
2
|
import { IFiltersPaneProps } from './FiltersPane';
|
|
4
3
|
interface IFiltersPaneWithCustomProps<Values, Content> extends IFiltersPaneProps<Values, Content> {
|
|
@@ -10,7 +9,7 @@ interface IFiltersPaneWithCustomProps<Values, Content> extends IFiltersPaneProps
|
|
|
10
9
|
isGroupingEnabled: boolean;
|
|
11
10
|
checkboxPosition: 'left' | 'right';
|
|
12
11
|
}
|
|
13
|
-
declare function FiltersPaneWithCustomProps<Values, Content>({ containerWidth, isSearchDisabled, isSearchAutosizeable, shouldShowSettingsButton, withFieldNameInLabel, isGroupingEnabled, checkboxPosition, ...args }: IFiltersPaneWithCustomProps<Values, Content>): JSX.Element;
|
|
12
|
+
declare function FiltersPaneWithCustomProps<Values, Content>({ containerWidth, isSearchDisabled, isSearchAutosizeable, shouldShowSettingsButton, withFieldNameInLabel, isGroupingEnabled, checkboxPosition, ...args }: IFiltersPaneWithCustomProps<Values, Content>): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
declare const _default: {
|
|
15
14
|
title: string;
|
|
16
15
|
component: typeof FiltersPaneWithCustomProps;
|
|
@@ -1,30 +1,22 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { ICommonProps } from '../../types';
|
|
3
|
-
import {
|
|
3
|
+
import { IFlexibleTableRowProps } from './components';
|
|
4
|
+
import { ITableRow, IFlexibleTableConfigType, IInfinityScrollConfig, IFlexibleTableRenderMode } from './types';
|
|
4
5
|
import { IFlexibleTableStyles } from './FlexibleTable.styles';
|
|
5
|
-
export interface IFlexibleTableProps<
|
|
6
|
-
content:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
config: IFlexibleTableConfigType<
|
|
6
|
+
export interface IFlexibleTableProps<Row extends ITableRow> extends ICommonProps<IFlexibleTableStyles>, Pick<IFlexibleTableRowProps<Row>, 'uniqueField' | 'activeRows' | 'rowAttributes' | 'isFirstColumnSticky' | 'isExpandableRowComponentInitiallyOpen' | 'expandableRowComponent' | 'onRowClick' | 'onRowHover'> {
|
|
7
|
+
content: Row[];
|
|
8
|
+
/** @default 'table' */
|
|
9
|
+
renderMode?: IFlexibleTableRenderMode;
|
|
10
|
+
headerContent?: Partial<Record<keyof Row, any>>;
|
|
11
|
+
config: IFlexibleTableConfigType<Row>;
|
|
12
|
+
enabledColumns?: Array<keyof Row & string>;
|
|
11
13
|
/** @default false */
|
|
12
|
-
|
|
14
|
+
isLoading?: boolean;
|
|
13
15
|
/** @default false */
|
|
14
|
-
|
|
16
|
+
isHorizontallyScrollable?: boolean;
|
|
15
17
|
infinityScrollConfig?: IInfinityScrollConfig;
|
|
16
|
-
|
|
17
|
-
uniqueField?: keyof Values;
|
|
18
|
-
onHeadClick?: (column: keyof Values) => void;
|
|
19
|
-
/** @default false */
|
|
20
|
-
isLoading?: boolean;
|
|
21
|
-
onRowClick?: (id: string) => void;
|
|
22
|
-
onRowHover?: (id?: string) => void;
|
|
23
|
-
rowAttributes?: Array<keyof Values>;
|
|
18
|
+
onHeadClick?: (column: keyof Row) => void;
|
|
24
19
|
refForScroll?: RefObject<HTMLDivElement>;
|
|
25
20
|
nothingFoundContent?: ReactNode;
|
|
26
|
-
/** @default 'table' */
|
|
27
|
-
renderMode?: 'table' | 'divs';
|
|
28
|
-
expandableRowComponent?: (item: Values, isOpen: boolean, close: () => void) => ReactNode;
|
|
29
21
|
}
|
|
30
|
-
export declare function FlexibleTable<
|
|
22
|
+
export declare function FlexibleTable<Row extends ITableRow>({ content, headerContent, config, enabledColumns, isLoading, isHorizontallyScrollable, infinityScrollConfig, renderMode, refForScroll, nothingFoundContent, data, testId, tweakStyles, onHeadClick, ...restProps }: IFlexibleTableProps<Row>): JSX.Element;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentStory } from '@storybook/react';
|
|
2
|
+
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
3
|
import { FlexibleTable } from './FlexibleTable';
|
|
4
|
-
declare const _default:
|
|
5
|
-
title: string;
|
|
6
|
-
component: typeof FlexibleTable;
|
|
7
|
-
};
|
|
4
|
+
declare const _default: ComponentMeta<typeof FlexibleTable>;
|
|
8
5
|
export default _default;
|
|
9
6
|
interface ITableContent {
|
|
10
7
|
contractCode: string;
|
|
@@ -18,4 +15,4 @@ interface ITableContent {
|
|
|
18
15
|
currency: string;
|
|
19
16
|
status: string;
|
|
20
17
|
}
|
|
21
|
-
export declare const Default: ComponentStory<({
|
|
18
|
+
export declare const Default: ComponentStory<({ content, headerContent, config, enabledColumns, isLoading, isHorizontallyScrollable, infinityScrollConfig, renderMode, refForScroll, nothingFoundContent, data, testId, tweakStyles, onHeadClick, ...restProps }: import("./FlexibleTable").IFlexibleTableProps<ITableContent>) => JSX.Element>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ITweakStyles } from '../../theme';
|
|
2
2
|
import type { IFlexibleTableRowStyles } from './components';
|
|
3
3
|
export declare const STICKY_SHADOW_PADDING = 12;
|
|
4
|
-
export declare const useStyles: import("../../theme").IUseStyles<"scroll" | "root" | "loader" | "header" | "nothingFound" | "head" | "body" | "loaderRow" | "loaderCell" | "headerRow" | "headerSticky" | "headerSecond" | "nothingFoundRow"
|
|
4
|
+
export declare const useStyles: import("../../theme").IUseStyles<"scroll" | "root" | "loader" | "header" | "nothingFound" | "head" | "body" | "loaderRow" | "loaderCell" | "headerRow" | "headerSticky" | "headerSecond" | "nothingFoundRow", unknown>;
|
|
5
5
|
export type IFlexibleTableStyles = ITweakStyles<typeof useStyles, {
|
|
6
6
|
tweakTableRow: IFlexibleTableRowStyles;
|
|
7
7
|
}>;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ICommonProps } from '../../../../types';
|
|
3
|
+
import { ITableRow, IValueComponent, IFlexibleTableConfigType, IFlexibleTableRenderMode } from '../../types';
|
|
4
4
|
import { IFlexibleTableCellStyles } from './FlexibleTableCell.styles';
|
|
5
|
-
export interface IFlexibleTableCellProps<
|
|
6
|
-
|
|
7
|
-
columnName: keyof
|
|
8
|
-
config: IFlexibleTableConfigType<
|
|
9
|
-
|
|
10
|
-
renderMode?: 'table' | 'divs';
|
|
11
|
-
isFocusedRow?: boolean;
|
|
5
|
+
export interface IFlexibleTableCellProps<Row extends ITableRow> extends Pick<ICommonProps<IFlexibleTableCellStyles>, 'tweakStyles'>, Pick<Parameters<IValueComponent<Row, unknown>>[0], 'isFocusedRow' | 'isNestedComponentExpanded' | 'isRowNestedComponentExpanded' | 'onSetNestedComponent'> {
|
|
6
|
+
row: Row;
|
|
7
|
+
columnName: keyof Row;
|
|
8
|
+
config: IFlexibleTableConfigType<Row>;
|
|
9
|
+
renderMode: IFlexibleTableRenderMode;
|
|
12
10
|
isSecond?: boolean;
|
|
13
11
|
isSticky?: boolean;
|
|
14
|
-
|
|
15
|
-
isRowNestedComponentExpanded: boolean;
|
|
16
|
-
onSetNestedComponent: (component?: ReactNode) => void;
|
|
12
|
+
isLoading?: boolean;
|
|
17
13
|
}
|
|
18
|
-
export declare function FlexibleTableCell<
|
|
14
|
+
export declare function FlexibleTableCell<Row extends ITableRow>({ row, columnName, config, renderMode, isSecond, isSticky, isLoading, tweakStyles, ...valueComponentProps }: IFlexibleTableCellProps<Row>): JSX.Element;
|
package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ITweakStyles } from '../../../../theme';
|
|
2
|
-
export declare const useStyles: import("../../../../theme").IUseStyles<"root" | "sticky" | "second", unknown>;
|
|
2
|
+
export declare const useStyles: import("../../../../theme").IUseStyles<"root" | "sticky" | "loading" | "second" | "skeleton", unknown>;
|
|
3
3
|
export type IFlexibleTableCellStyles = ITweakStyles<typeof useStyles>;
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ICommonProps } from '../../../../types';
|
|
3
|
-
import { IFlexibleTableConfigType } from '../../types';
|
|
3
|
+
import { ITableRow, IFlexibleTableConfigType, IFlexibleTableRenderMode } from '../../types';
|
|
4
4
|
import { IFlexibleTableRowStyles } from './FlexibleTableRow.styles';
|
|
5
|
-
export interface IFlexibleTableRowProps<
|
|
6
|
-
item:
|
|
7
|
-
|
|
5
|
+
export interface IFlexibleTableRowProps<Row extends ITableRow> extends Pick<ICommonProps<IFlexibleTableRowStyles>, 'tweakStyles'> {
|
|
6
|
+
item: Row;
|
|
7
|
+
index: number;
|
|
8
|
+
uniqueField?: keyof Row;
|
|
9
|
+
renderMode: IFlexibleTableRenderMode;
|
|
10
|
+
/** Индексы строк, на которые навешивается класс `active` */
|
|
11
|
+
activeRows?: number[];
|
|
12
|
+
/** @default false */
|
|
8
13
|
isFirstColumnSticky?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/** @default false */
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
config: IFlexibleTableConfigType<Row>;
|
|
17
|
+
columns: Array<keyof Row & string>;
|
|
18
|
+
rowAttributes?: Array<keyof Row>;
|
|
19
|
+
/** @default false */
|
|
20
|
+
isExpandableRowComponentInitiallyOpen?: boolean | ((row: Row, index: number) => boolean);
|
|
21
|
+
/** Возвращает React-элемент, который отрисуется под строкой при нажатии на неё */
|
|
22
|
+
expandableRowComponent?: (item: Row, isOpen: boolean, close: () => void) => ReactNode;
|
|
16
23
|
onRowHover?: (id?: string) => void;
|
|
17
24
|
onRowClick?: (id: string) => void;
|
|
18
25
|
}
|
|
19
|
-
declare function FlexibleTableRowInner<
|
|
26
|
+
declare function FlexibleTableRowInner<Row extends ITableRow>({ item, index, config, columns, uniqueField, renderMode, activeRows, isFirstColumnSticky, isLoading, rowAttributes, isExpandableRowComponentInitiallyOpen, tweakStyles, expandableRowComponent, onRowHover, onRowClick, }: IFlexibleTableRowProps<Row>): JSX.Element;
|
|
20
27
|
export declare const FlexibleTableRow: typeof FlexibleTableRowInner;
|
|
21
28
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export type IPosition = 'sticky' | 'absolute' | 'relative' | 'static';
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
export type IFlexibleTableRenderMode = 'table' | 'divs';
|
|
3
|
+
export type ITableRow = Record<string, any>;
|
|
5
4
|
export type ITitleComponent<Value> = FC<{
|
|
6
5
|
value?: Value;
|
|
7
6
|
}>;
|
|
@@ -22,10 +21,11 @@ export type IFlexibleTableConfigType<Values> = {
|
|
|
22
21
|
minWidth?: string | number;
|
|
23
22
|
width?: string | number;
|
|
24
23
|
maxWidth?: string | number;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
/** @default 'left' */
|
|
25
|
+
titleAlign?: CSSProperties['textAlign'];
|
|
26
|
+
cellAlign?: CSSProperties['textAlign'];
|
|
27
|
+
cellVerticalAlign?: CSSProperties['verticalAlign'];
|
|
28
|
+
position?: CSSProperties['position'];
|
|
29
29
|
right?: number;
|
|
30
30
|
left?: number;
|
|
31
31
|
};
|
|
@@ -2,5 +2,5 @@ declare const _default: {
|
|
|
2
2
|
title: string;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Default: () => JSX.Element;
|
|
6
|
-
export declare const Gallery: () => JSX.Element;
|
|
5
|
+
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const Gallery: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,7 +22,6 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
|
|
|
22
22
|
as?: string | undefined;
|
|
23
23
|
async?: boolean | undefined;
|
|
24
24
|
autoComplete?: string | undefined;
|
|
25
|
-
autoFocus?: boolean | undefined;
|
|
26
25
|
autoPlay?: boolean | undefined;
|
|
27
26
|
capture?: boolean | "user" | "environment" | undefined;
|
|
28
27
|
cellPadding?: string | number | undefined;
|
|
@@ -34,10 +33,9 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
|
|
|
34
33
|
classID?: string | undefined;
|
|
35
34
|
cols?: number | undefined;
|
|
36
35
|
colSpan?: number | undefined;
|
|
37
|
-
content?: string | undefined;
|
|
38
36
|
controls?: boolean | undefined;
|
|
39
37
|
coords?: string | undefined;
|
|
40
|
-
crossOrigin?:
|
|
38
|
+
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
41
39
|
data?: string | undefined;
|
|
42
40
|
dateTime?: string | undefined;
|
|
43
41
|
default?: boolean | undefined;
|
|
@@ -89,7 +87,6 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
|
|
|
89
87
|
poster?: string | undefined;
|
|
90
88
|
preload?: string | undefined;
|
|
91
89
|
readOnly?: boolean | undefined;
|
|
92
|
-
rel?: string | undefined;
|
|
93
90
|
required?: boolean | undefined;
|
|
94
91
|
reversed?: boolean | undefined;
|
|
95
92
|
rows?: number | undefined;
|
|
@@ -123,8 +120,9 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
|
|
|
123
120
|
suppressContentEditableWarning?: boolean | undefined;
|
|
124
121
|
suppressHydrationWarning?: boolean | undefined;
|
|
125
122
|
accessKey?: string | undefined;
|
|
123
|
+
autoFocus?: boolean | undefined;
|
|
126
124
|
className?: string | undefined;
|
|
127
|
-
contentEditable?: "inherit" | (boolean | "false" | "true") | undefined;
|
|
125
|
+
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
128
126
|
contextMenu?: string | undefined;
|
|
129
127
|
dir?: string | undefined;
|
|
130
128
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
@@ -141,11 +139,14 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
|
|
|
141
139
|
radioGroup?: string | undefined;
|
|
142
140
|
role?: import("react").AriaRole | undefined;
|
|
143
141
|
about?: string | undefined;
|
|
142
|
+
content?: string | undefined;
|
|
144
143
|
datatype?: string | undefined;
|
|
145
144
|
inlist?: any;
|
|
146
145
|
prefix?: string | undefined;
|
|
147
146
|
property?: string | undefined;
|
|
147
|
+
rel?: string | undefined;
|
|
148
148
|
resource?: string | undefined;
|
|
149
|
+
rev?: string | undefined;
|
|
149
150
|
typeof?: string | undefined;
|
|
150
151
|
vocab?: string | undefined;
|
|
151
152
|
autoCapitalize?: string | undefined;
|
|
@@ -162,56 +163,61 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
|
|
|
162
163
|
unselectable?: "on" | "off" | undefined;
|
|
163
164
|
inputMode?: "none" | "search" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
|
|
164
165
|
is?: string | undefined;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
166
|
+
"aria-activedescendant"?: string | undefined;
|
|
167
|
+
"aria-atomic"?: (boolean | "false" | "true") | undefined;
|
|
168
|
+
"aria-autocomplete"?: "inline" | "none" | "both" | "list" | undefined;
|
|
169
|
+
"aria-braillelabel"?: string | undefined;
|
|
170
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
171
|
+
"aria-busy"?: (boolean | "false" | "true") | undefined;
|
|
172
|
+
"aria-checked"?: boolean | "mixed" | "false" | "true" | undefined;
|
|
173
|
+
"aria-colcount"?: number | undefined;
|
|
174
|
+
"aria-colindex"?: number | undefined;
|
|
175
|
+
"aria-colindextext"?: string | undefined;
|
|
176
|
+
"aria-colspan"?: number | undefined;
|
|
177
|
+
"aria-controls"?: string | undefined;
|
|
178
|
+
"aria-current"?: boolean | "page" | "false" | "true" | "time" | "date" | "step" | "location" | undefined;
|
|
179
|
+
"aria-describedby"?: string | undefined;
|
|
180
|
+
"aria-description"?: string | undefined;
|
|
181
|
+
"aria-details"?: string | undefined;
|
|
182
|
+
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
183
|
+
"aria-dropeffect"?: "copy" | "none" | "link" | "move" | "execute" | "popup" | undefined;
|
|
184
|
+
"aria-errormessage"?: string | undefined;
|
|
185
|
+
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
186
|
+
"aria-flowto"?: string | undefined;
|
|
187
|
+
"aria-grabbed"?: (boolean | "false" | "true") | undefined;
|
|
188
|
+
"aria-haspopup"?: boolean | "grid" | "listbox" | "menu" | "false" | "true" | "dialog" | "tree" | undefined;
|
|
189
|
+
"aria-hidden"?: (boolean | "false" | "true") | undefined;
|
|
190
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
191
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
192
|
+
"aria-label"?: string | undefined;
|
|
193
|
+
"aria-labelledby"?: string | undefined;
|
|
194
|
+
"aria-level"?: number | undefined;
|
|
195
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
196
|
+
"aria-modal"?: (boolean | "false" | "true") | undefined;
|
|
197
|
+
"aria-multiline"?: (boolean | "false" | "true") | undefined;
|
|
198
|
+
"aria-multiselectable"?: (boolean | "false" | "true") | undefined;
|
|
199
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
200
|
+
"aria-owns"?: string | undefined;
|
|
201
|
+
"aria-placeholder"?: string | undefined;
|
|
202
|
+
"aria-posinset"?: number | undefined;
|
|
203
|
+
"aria-pressed"?: boolean | "mixed" | "false" | "true" | undefined;
|
|
204
|
+
"aria-readonly"?: (boolean | "false" | "true") | undefined;
|
|
205
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
206
|
+
"aria-required"?: (boolean | "false" | "true") | undefined;
|
|
207
|
+
"aria-roledescription"?: string | undefined;
|
|
208
|
+
"aria-rowcount"?: number | undefined;
|
|
209
|
+
"aria-rowindex"?: number | undefined;
|
|
210
|
+
"aria-rowindextext"?: string | undefined;
|
|
211
|
+
"aria-rowspan"?: number | undefined;
|
|
212
|
+
"aria-selected"?: (boolean | "false" | "true") | undefined;
|
|
213
|
+
"aria-setsize"?: number | undefined;
|
|
214
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
215
|
+
"aria-valuemax"?: number | undefined;
|
|
216
|
+
"aria-valuemin"?: number | undefined;
|
|
217
|
+
"aria-valuenow"?: number | undefined;
|
|
218
|
+
"aria-valuetext"?: string | undefined;
|
|
213
219
|
dangerouslySetInnerHTML?: {
|
|
214
|
-
__html: string;
|
|
220
|
+
__html: string | TrustedHTML;
|
|
215
221
|
} | undefined;
|
|
216
222
|
onCopy?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
217
223
|
onCopyCapture?: import("react").ClipboardEventHandler<HTMLElement> | undefined;
|
|
@@ -352,9 +358,7 @@ export declare class ScrollIntoViewIfNeeded extends PureComponent<IScrollIntoVie
|
|
|
352
358
|
onPointerCancel?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
353
359
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
354
360
|
onPointerEnter?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
355
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
356
361
|
onPointerLeave?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
357
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
358
362
|
onPointerOver?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
359
363
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
360
364
|
onPointerOut?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ComponentMeta, type ComponentStory } from '@storybook/react';
|
|
2
|
+
import { type ISelectProps } from './Select';
|
|
3
|
+
interface ISelectWithCustomProps<T> extends ISelectProps<T> {
|
|
4
|
+
shouldUsePopper?: boolean;
|
|
5
|
+
shouldRenderInBody?: boolean;
|
|
6
|
+
shouldHideOnScroll?: boolean;
|
|
7
|
+
canBeFlipped?: boolean;
|
|
8
|
+
scrollParent?: 'document' | 'auto';
|
|
9
|
+
}
|
|
10
|
+
declare function SelectWithCustomProps({ noMatchesLabel, shouldUsePopper, shouldRenderInBody, shouldHideOnScroll, canBeFlipped, scrollParent, ...restProps }: ISelectWithCustomProps<string>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const _default: ComponentMeta<typeof SelectWithCustomProps>;
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const CustomSelect: ComponentStory<typeof SelectWithCustomProps>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
2
|
import { ISelectProps } from './Select';
|
|
4
3
|
interface ISelectWithCustomProps<T> extends ISelectProps<T> {
|
|
@@ -12,7 +11,7 @@ interface ISelectWithCustomProps<T> extends ISelectProps<T> {
|
|
|
12
11
|
canBeFlipped?: boolean;
|
|
13
12
|
scrollParent?: 'document' | 'auto';
|
|
14
13
|
}
|
|
15
|
-
declare function SelectWithCustomProps<T>({ valuesType, optionsMode, shouldUseReactNodes, shouldUsePopper, shouldRenderInBody, shouldHideOnScroll, shouldUseCustomIsDisabledFunction, shouldRenderSearchInputInList, canBeFlipped, scrollParent, noMatchesLabel, ...rest }: ISelectWithCustomProps<T>): JSX.Element;
|
|
14
|
+
declare function SelectWithCustomProps<T>({ valuesType, optionsMode, shouldUseReactNodes, shouldUsePopper, shouldRenderInBody, shouldHideOnScroll, shouldUseCustomIsDisabledFunction, shouldRenderSearchInputInList, canBeFlipped, scrollParent, noMatchesLabel, ...rest }: ISelectWithCustomProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
declare const _default: ComponentMeta<typeof SelectWithCustomProps>;
|
|
17
16
|
export default _default;
|
|
18
17
|
export declare const MultiSelect: ComponentStory<typeof SelectWithCustomProps>;
|
|
@@ -6,7 +6,7 @@ import { ISearchInputProps } from '../SearchInput';
|
|
|
6
6
|
import { 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
|
-
defaultOptionLabel?:
|
|
9
|
+
defaultOptionLabel?: ReactNode;
|
|
10
10
|
allOptionsLabel?: string;
|
|
11
11
|
noMatchesLabel?: string;
|
|
12
12
|
loadingLabel?: ReactNode;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
3
2
|
import { ISelectProps } from './Select';
|
|
4
3
|
interface ISelectWithCustomProps<T> extends ISelectProps<T> {
|
|
@@ -12,7 +11,7 @@ interface ISelectWithCustomProps<T> extends ISelectProps<T> {
|
|
|
12
11
|
canBeFlipped?: boolean;
|
|
13
12
|
scrollParent?: 'document' | 'auto';
|
|
14
13
|
}
|
|
15
|
-
declare function SelectWithCustomProps<T>({ valuesType, optionsMode, shouldUseReactNodes, shouldUsePopper, shouldRenderInBody, shouldHideOnScroll, shouldUseCustomIsDisabledFunction, shouldRenderSearchInputInList, canBeFlipped, scrollParent, noMatchesLabel, ...rest }: ISelectWithCustomProps<T>): JSX.Element;
|
|
14
|
+
declare function SelectWithCustomProps<T>({ valuesType, optionsMode, shouldUseReactNodes, shouldUsePopper, shouldRenderInBody, shouldHideOnScroll, shouldUseCustomIsDisabledFunction, shouldRenderSearchInputInList, canBeFlipped, scrollParent, noMatchesLabel, ...rest }: ISelectWithCustomProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
declare const _default: ComponentMeta<typeof SelectWithCustomProps>;
|
|
17
16
|
export default _default;
|
|
18
17
|
export declare const Default: ComponentStory<typeof SelectWithCustomProps>;
|
|
@@ -8,7 +8,7 @@ export interface ISelectListProps<Value> extends ICommonProps<ISelectListStyles>
|
|
|
8
8
|
noMatchesLabel?: string;
|
|
9
9
|
isLoading?: boolean;
|
|
10
10
|
loadingLabel?: ReactNode;
|
|
11
|
-
defaultOptionLabel?:
|
|
11
|
+
defaultOptionLabel?: ReactNode;
|
|
12
12
|
allOptionsLabel?: string;
|
|
13
13
|
areAllOptionsSelected?: boolean;
|
|
14
14
|
shouldScrollToList?: boolean;
|