@cloud-ru/ds-list 2.4.1-preview-b543ec31.0 → 3.0.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/CHANGELOG.md +6 -0
- package/dist/cjs/components/Lists/types.d.ts +1 -1
- package/dist/cjs/helperComponents/MobileDroplist/MobileDroplist.d.ts +1 -1
- package/dist/cjs/helperComponents/MobileDroplist/MobileDroplist.js +2 -2
- package/dist/esm/components/Lists/types.d.ts +1 -1
- package/dist/esm/helperComponents/MobileDroplist/MobileDroplist.d.ts +1 -1
- package/dist/esm/helperComponents/MobileDroplist/MobileDroplist.js +2 -2
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +18 -18
- package/src/components/Lists/types.ts +1 -1
- package/src/helperComponents/MobileDroplist/MobileDroplist.tsx +13 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0 (2026-10-16)
|
|
7
|
+
|
|
8
|
+
### BREAKING CHANGES
|
|
9
|
+
|
|
10
|
+
- **IAM-7099:** remove deprecated addOptionByEnter, allow custom options in FieldSelect via configurable triggers ([b698db6](https://github.com/cloud-ru-tech/snack-v2/commit/b698db6a2276ad901d3bc489e1be885e37f5db34))
|
|
11
|
+
|
|
6
12
|
# 2.4.0 (2026-10-14)
|
|
7
13
|
|
|
8
14
|
### Features
|
|
@@ -174,7 +174,7 @@ export type DroplistImplProps = DesktopDroplistProps & DroplistMobileSlots;
|
|
|
174
174
|
* @internal Props mobile-реализации (`BottomSheet`): реализация дроплиста без popover-пропов
|
|
175
175
|
* + mobile-слоты.
|
|
176
176
|
*/
|
|
177
|
-
export type MobileDroplistProps = Omit<DesktopDroplistProps, 'trigger' | 'placement' | 'widthStrategy' | 'triggerElemRef' | '
|
|
177
|
+
export type MobileDroplistProps = Omit<DesktopDroplistProps, 'trigger' | 'placement' | 'widthStrategy' | 'triggerElemRef' | 'triggerClassName' | 'disableSpanWrapper'> & Pick<BottomSheetProps, 'snapPoints' | 'withDividers'> & DroplistMobileSlots;
|
|
178
178
|
export type ListPrivateProps = Omit<ListImplProps, 'pinTop' | 'pinBottom' | 'items' | 'hasListInFocusChain' | 'onItemsReorder' | 'virtualized'> & {
|
|
179
179
|
nested?: boolean;
|
|
180
180
|
active?: boolean;
|
|
@@ -6,4 +6,4 @@ import { MobileDroplistProps } from '../../components/Lists/types';
|
|
|
6
6
|
* вложенного списка, в шапке появляется его заголовок и кнопка «назад». Internal — наружу не реэкспортится;
|
|
7
7
|
* рендерится адаптивным `Droplist` на `layoutType='mobile'`.
|
|
8
8
|
*/
|
|
9
|
-
export declare function MobileDroplist({ items, selection, open: openProp, onOpenChange, children, search, label, actionButton, slotAfterTitle, onBackButtonClick, virtualized, closeDroplistOnItemClick, scroll, container, closeOnPopstate, size, snapPoints, footer, onItemsReorder, withDividers, ...rest }: MobileDroplistProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function MobileDroplist({ items, selection, open: openProp, onOpenChange, children, search, label, actionButton, slotAfterTitle, onBackButtonClick, virtualized, closeDroplistOnItemClick, scroll, container, closeOnPopstate, size, snapPoints, footer, onItemsReorder, withDividers, listRef, ...rest }: MobileDroplistProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,7 +25,7 @@ function MobileDroplist({ items, selection, open: openProp, onOpenChange, childr
|
|
|
25
25
|
// скроллятся вместе со списком). `header` + `headerDivider` / `footerDivider` НЕ деструктурируем —
|
|
26
26
|
// они уходят в `...rest` на корневой `List` (он рендерит шапку и её divider).
|
|
27
27
|
// `onItemsReorder` — только на корне: drill-down `next-list` ортогонален дереву `SimpleItem`.
|
|
28
|
-
footer, onItemsReorder, withDividers, ...rest }) {
|
|
28
|
+
footer, onItemsReorder, withDividers, listRef, ...rest }) {
|
|
29
29
|
const portalContext = (0, portal_context_1.usePortalContext)();
|
|
30
30
|
const scrollRef = (0, react_1.useRef)(null);
|
|
31
31
|
const [open = false, setIsOpen] = (0, utils_1.useValueControl)({ value: openProp, onChange: onOpenChange });
|
|
@@ -137,7 +137,7 @@ footer, onItemsReorder, withDividers, ...rest }) {
|
|
|
137
137
|
limitedScrollHeight: false,
|
|
138
138
|
scrollContainerClassName: scrollable ? MobileDroplist_module_scss_1.default.sheetScroll : undefined,
|
|
139
139
|
};
|
|
140
|
-
const content = ((0, jsx_runtime_1.jsx)("div", { className: MobileDroplist_module_scss_1.default.listWrapper, "data-test-id": isRoot ? constants_1.TEST_IDS.mobileDroplistRoot : undefined, "data-fill": scrollable || undefined, children: reorderRoot && onItemsReorder ? ((0, jsx_runtime_1.jsx)(List_1.ReorderableList, { ...listCommonProps, items: items, onItemsReorder: onItemsReorder })) : ((0, jsx_runtime_1.jsx)(List_1.List, { ...listCommonProps, items: levelItems ?? [], virtualized: isRoot && virtualized })) }));
|
|
140
|
+
const content = ((0, jsx_runtime_1.jsx)("div", { className: MobileDroplist_module_scss_1.default.listWrapper, "data-test-id": isRoot ? constants_1.TEST_IDS.mobileDroplistRoot : undefined, "data-fill": scrollable || undefined, children: reorderRoot && onItemsReorder ? ((0, jsx_runtime_1.jsx)(List_1.ReorderableList, { ...listCommonProps, items: items, onItemsReorder: onItemsReorder, ref: isRoot ? listRef : undefined })) : ((0, jsx_runtime_1.jsx)(List_1.List, { ...listCommonProps, items: levelItems ?? [], virtualized: isRoot && virtualized, ref: isRoot ? listRef : undefined })) }));
|
|
141
141
|
// Уход с уровня вверх по стеку (для глубже-корня sheet'ов).
|
|
142
142
|
const popLevel = () => setPath(prev => prev.slice(0, levelIndex - 1));
|
|
143
143
|
// «Назад»: на корне — только явный `onBackButtonClick` (иначе back-стрелки нет — корневой
|
|
@@ -174,7 +174,7 @@ export type DroplistImplProps = DesktopDroplistProps & DroplistMobileSlots;
|
|
|
174
174
|
* @internal Props mobile-реализации (`BottomSheet`): реализация дроплиста без popover-пропов
|
|
175
175
|
* + mobile-слоты.
|
|
176
176
|
*/
|
|
177
|
-
export type MobileDroplistProps = Omit<DesktopDroplistProps, 'trigger' | 'placement' | 'widthStrategy' | 'triggerElemRef' | '
|
|
177
|
+
export type MobileDroplistProps = Omit<DesktopDroplistProps, 'trigger' | 'placement' | 'widthStrategy' | 'triggerElemRef' | 'triggerClassName' | 'disableSpanWrapper'> & Pick<BottomSheetProps, 'snapPoints' | 'withDividers'> & DroplistMobileSlots;
|
|
178
178
|
export type ListPrivateProps = Omit<ListImplProps, 'pinTop' | 'pinBottom' | 'items' | 'hasListInFocusChain' | 'onItemsReorder' | 'virtualized'> & {
|
|
179
179
|
nested?: boolean;
|
|
180
180
|
active?: boolean;
|
|
@@ -6,4 +6,4 @@ import { MobileDroplistProps } from '../../components/Lists/types.js';
|
|
|
6
6
|
* вложенного списка, в шапке появляется его заголовок и кнопка «назад». Internal — наружу не реэкспортится;
|
|
7
7
|
* рендерится адаптивным `Droplist` на `layoutType='mobile'`.
|
|
8
8
|
*/
|
|
9
|
-
export declare function MobileDroplist({ items, selection, open: openProp, onOpenChange, children, search, label, actionButton, slotAfterTitle, onBackButtonClick, virtualized, closeDroplistOnItemClick, scroll, container, closeOnPopstate, size, snapPoints, footer, onItemsReorder, withDividers, ...rest }: MobileDroplistProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function MobileDroplist({ items, selection, open: openProp, onOpenChange, children, search, label, actionButton, slotAfterTitle, onBackButtonClick, virtualized, closeDroplistOnItemClick, scroll, container, closeOnPopstate, size, snapPoints, footer, onItemsReorder, withDividers, listRef, ...rest }: MobileDroplistProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,7 +19,7 @@ export function MobileDroplist({ items, selection, open: openProp, onOpenChange,
|
|
|
19
19
|
// скроллятся вместе со списком). `header` + `headerDivider` / `footerDivider` НЕ деструктурируем —
|
|
20
20
|
// они уходят в `...rest` на корневой `List` (он рендерит шапку и её divider).
|
|
21
21
|
// `onItemsReorder` — только на корне: drill-down `next-list` ортогонален дереву `SimpleItem`.
|
|
22
|
-
footer, onItemsReorder, withDividers, ...rest }) {
|
|
22
|
+
footer, onItemsReorder, withDividers, listRef, ...rest }) {
|
|
23
23
|
const portalContext = usePortalContext();
|
|
24
24
|
const scrollRef = useRef(null);
|
|
25
25
|
const [open = false, setIsOpen] = useValueControl({ value: openProp, onChange: onOpenChange });
|
|
@@ -131,7 +131,7 @@ footer, onItemsReorder, withDividers, ...rest }) {
|
|
|
131
131
|
limitedScrollHeight: false,
|
|
132
132
|
scrollContainerClassName: scrollable ? styles.sheetScroll : undefined,
|
|
133
133
|
};
|
|
134
|
-
const content = (_jsx("div", { className: styles.listWrapper, "data-test-id": isRoot ? TEST_IDS.mobileDroplistRoot : undefined, "data-fill": scrollable || undefined, children: reorderRoot && onItemsReorder ? (_jsx(ReorderableList, { ...listCommonProps, items: items, onItemsReorder: onItemsReorder })) : (_jsx(List, { ...listCommonProps, items: levelItems ?? [], virtualized: isRoot && virtualized })) }));
|
|
134
|
+
const content = (_jsx("div", { className: styles.listWrapper, "data-test-id": isRoot ? TEST_IDS.mobileDroplistRoot : undefined, "data-fill": scrollable || undefined, children: reorderRoot && onItemsReorder ? (_jsx(ReorderableList, { ...listCommonProps, items: items, onItemsReorder: onItemsReorder, ref: isRoot ? listRef : undefined })) : (_jsx(List, { ...listCommonProps, items: levelItems ?? [], virtualized: isRoot && virtualized, ref: isRoot ? listRef : undefined })) }));
|
|
135
135
|
// Уход с уровня вверх по стеку (для глубже-корня sheet'ов).
|
|
136
136
|
const popLevel = () => setPath(prev => prev.slice(0, levelIndex - 1));
|
|
137
137
|
// «Назад»: на корне — только явный `onBackButtonClick` (иначе back-стрелки нет — корневой
|