@cloud-ru/ds-list 2.3.3-preview-e8fab9b7.0 → 2.3.3-preview-20b4671f.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/dist/cjs/components/Lists/List/List.d.ts +10 -9
- package/dist/cjs/components/Lists/List/List.js +2 -1
- package/dist/cjs/helperComponents/DesktopDroplist/DesktopDroplist.js +2 -1
- package/dist/esm/components/Lists/List/List.d.ts +6 -5
- package/dist/esm/components/Lists/List/List.js +2 -1
- package/dist/esm/helperComponents/DesktopDroplist/DesktopDroplist.js +2 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +11 -11
- package/src/components/Lists/List/List.tsx +6 -3
- package/src/helperComponents/DesktopDroplist/DesktopDroplist.tsx +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/ds-list",
|
|
3
|
-
"version": "2.3.3-preview-
|
|
3
|
+
"version": "2.3.3-preview-20b4671f.0",
|
|
4
4
|
"description": "Списочный UI — компонент List для плоских/вложенных списков с выбором, группами и поиском и Droplist — тот же список в поповере.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,22 +48,22 @@
|
|
|
48
48
|
"@tanstack/react-virtual": "^3.14.8",
|
|
49
49
|
"classnames": "^2.5.1",
|
|
50
50
|
"merge-refs": "^2.0.0",
|
|
51
|
-
"@cloud-ru/ds-
|
|
52
|
-
"@cloud-ru/ds-
|
|
51
|
+
"@cloud-ru/ds-bottom-sheet": "2.0.1-preview-20b4671f.0",
|
|
52
|
+
"@cloud-ru/ds-dropdown": "1.1.2-preview-20b4671f.0",
|
|
53
53
|
"@cloud-ru/ds-adaptive": "1.0.2",
|
|
54
54
|
"@cloud-ru/ds-drag-and-drop": "1.1.3",
|
|
55
|
-
"@cloud-ru/ds-
|
|
55
|
+
"@cloud-ru/ds-loader": "1.0.3",
|
|
56
56
|
"@cloud-ru/ds-divider": "1.0.2",
|
|
57
|
-
"@cloud-ru/ds-icons": "1.5.1-preview-
|
|
57
|
+
"@cloud-ru/ds-icons": "1.5.1-preview-20b4671f.0",
|
|
58
58
|
"@cloud-ru/ds-info-block": "1.0.3",
|
|
59
|
-
"@cloud-ru/ds-loader": "1.0.3",
|
|
60
|
-
"@cloud-ru/ds-materials": "2.0.1",
|
|
61
59
|
"@cloud-ru/ds-portal-context": "1.0.2",
|
|
60
|
+
"@cloud-ru/ds-materials": "2.0.1",
|
|
62
61
|
"@cloud-ru/ds-scroll": "1.0.5",
|
|
63
|
-
"@cloud-ru/ds-search-private": "1.0.15-preview-
|
|
64
|
-
"@cloud-ru/ds-toggles": "1.1.10-preview-
|
|
65
|
-
"@cloud-ru/ds-
|
|
66
|
-
"@cloud-ru/ds-
|
|
62
|
+
"@cloud-ru/ds-search-private": "1.0.15-preview-20b4671f.0",
|
|
63
|
+
"@cloud-ru/ds-toggles": "1.1.10-preview-20b4671f.0",
|
|
64
|
+
"@cloud-ru/ds-utils": "1.2.0",
|
|
65
|
+
"@cloud-ru/ds-button": "1.0.4",
|
|
66
|
+
"@cloud-ru/ds-truncate-string": "1.0.13-preview-20b4671f.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@cloud-ru/ds-locale": "1.0.0"
|
|
@@ -5,19 +5,22 @@ import { ForwardedRef, forwardRef, KeyboardEvent, useCallback, useMemo, useRef }
|
|
|
5
5
|
|
|
6
6
|
import { DEFAULT_SIZE } from '../../../constants';
|
|
7
7
|
import { HiddenTabButton } from '../../../helperComponents';
|
|
8
|
+
import { Item } from '../../Items';
|
|
8
9
|
import { CollapseContext, FocusListContext, NewListContextProvider, SelectionProvider } from '../contexts';
|
|
9
10
|
import { useListItemsModel, useNewKeyboardNavigation } from '../hooks';
|
|
10
11
|
import { ListPrivate } from '../ListPrivate';
|
|
11
12
|
import styles from '../styles.module.scss';
|
|
12
13
|
import { ListImplProps, ListProps, ReorderableListProps } from '../types';
|
|
13
14
|
|
|
15
|
+
const NO_ITEMS: Item[] = [];
|
|
16
|
+
|
|
14
17
|
const ListImpl = forwardRef(
|
|
15
18
|
(
|
|
16
19
|
{
|
|
17
|
-
items: itemsProp =
|
|
20
|
+
items: itemsProp = NO_ITEMS,
|
|
18
21
|
search,
|
|
19
|
-
pinBottom: pinBottomProp =
|
|
20
|
-
pinTop: pinTopProp =
|
|
22
|
+
pinBottom: pinBottomProp = NO_ITEMS,
|
|
23
|
+
pinTop: pinTopProp = NO_ITEMS,
|
|
21
24
|
footerActiveElementsRefs,
|
|
22
25
|
onKeyDown,
|
|
23
26
|
tabIndex = 0,
|
|
@@ -4,7 +4,7 @@ import cn from 'classnames';
|
|
|
4
4
|
import mergeRefs from 'merge-refs';
|
|
5
5
|
import { cloneElement, isValidElement, KeyboardEvent, ReactNode, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
6
6
|
|
|
7
|
-
import { SearchItem } from '../../components/Items';
|
|
7
|
+
import { Item, SearchItem } from '../../components/Items';
|
|
8
8
|
import {
|
|
9
9
|
CollapseContext,
|
|
10
10
|
FocusListContext,
|
|
@@ -22,6 +22,8 @@ import { ListPrivate } from '../../components/Lists/ListPrivate';
|
|
|
22
22
|
import styles from '../../components/Lists/styles.module.scss';
|
|
23
23
|
import { DesktopDroplistProps } from '../../components/Lists/types';
|
|
24
24
|
|
|
25
|
+
const NO_ITEMS: Item[] = [];
|
|
26
|
+
|
|
25
27
|
/**
|
|
26
28
|
* Desktop-поверхность `Droplist`: анкорный popover (`Dropdown`) со списком. Internal — наружу
|
|
27
29
|
* не реэкспортится; рендерится адаптивным `Droplist` на не-mobile раскладке. Так как вызывается
|
|
@@ -30,8 +32,8 @@ import { DesktopDroplistProps } from '../../components/Lists/types';
|
|
|
30
32
|
export function DesktopDroplist({
|
|
31
33
|
items: itemsProp,
|
|
32
34
|
search,
|
|
33
|
-
pinBottom: pinBottomProp =
|
|
34
|
-
pinTop: pinTopProp =
|
|
35
|
+
pinBottom: pinBottomProp = NO_ITEMS,
|
|
36
|
+
pinTop: pinTopProp = NO_ITEMS,
|
|
35
37
|
footerActiveElementsRefs,
|
|
36
38
|
children,
|
|
37
39
|
trigger,
|