@cloud-ru/ds-drawer 1.2.8 → 1.2.9-preview-3ffb7c01.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-ru/ds-drawer",
3
- "version": "1.2.8",
3
+ "version": "1.2.9-preview-3ffb7c01.0",
4
4
  "description": "Пакет выезжающих панелей — компоненты Drawer и DrawerCustom с едиными токенами позиции и ширины.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,13 +40,13 @@
40
40
  "classnames": "^2.5.1",
41
41
  "react-remove-scroll": "^2.7.2",
42
42
  "tabbable": "^6.5.0",
43
- "@cloud-ru/ds-materials": "^2.0.1",
44
- "@cloud-ru/ds-bottom-sheet": "^1.2.1",
45
- "@cloud-ru/ds-adaptive": "^1.0.2",
46
- "@cloud-ru/ds-popup-private": "^1.1.8",
47
- "@cloud-ru/ds-scroll": "^1.0.5",
48
- "@cloud-ru/ds-portal-context": "^1.0.2",
49
- "@cloud-ru/ds-tooltip": "^1.0.10",
50
- "@cloud-ru/ds-utils": "^1.2.0"
43
+ "@cloud-ru/ds-adaptive": "1.0.2",
44
+ "@cloud-ru/ds-bottom-sheet": "1.2.2-preview-3ffb7c01.0",
45
+ "@cloud-ru/ds-portal-context": "1.0.2",
46
+ "@cloud-ru/ds-popup-private": "1.1.9-preview-3ffb7c01.0",
47
+ "@cloud-ru/ds-tooltip": "1.0.11-preview-3ffb7c01.0",
48
+ "@cloud-ru/ds-utils": "1.2.0",
49
+ "@cloud-ru/ds-materials": "2.0.1",
50
+ "@cloud-ru/ds-scroll": "1.0.5"
51
51
  }
52
52
  }
@@ -9,12 +9,15 @@ import { DrawerCustomProps } from '../DrawerCustom';
9
9
  * Адаптивный Drawer: desktop — боковая/верхняя/нижняя панель, `mobile` — `BottomSheet`.
10
10
  *
11
11
  * Только desktop: `position`, `width`, `heightAuto`, `nestedDrawer`, `truncate` (на mobile игнорируются).
12
- * Только mobile: `swipeEnabled`, `snapPoints`, `snapIndex`, `onSnapIndexChange`, `safeArea`, `withDividers`
12
+ * Только mobile: `swipeEnabled`, `snapPoints`, `snapIndex`, `onSnapIndexChange`, `safeAreaTop`, `safeAreaBottom`, `withDividers`
13
13
  * (на desktop-панели игнорируются — это анатомия `BottomSheet`).
14
14
  */
15
15
  export type DrawerProps = WithSupportProps<
16
16
  Omit<DrawerCustomProps, 'nestedDrawer' | 'push' | 'resizable'> &
17
- Pick<BottomSheetProps, 'swipeEnabled' | 'snapPoints' | 'snapIndex' | 'onSnapIndexChange' | 'safeArea'> &
17
+ Pick<
18
+ BottomSheetProps,
19
+ 'swipeEnabled' | 'snapPoints' | 'snapIndex' | 'onSnapIndexChange' | 'safeAreaTop' | 'safeAreaBottom'
20
+ > &
18
21
  Pick<DialogHeaderProps, 'title' | 'slotAfterTitle' | 'slotSecondTitle' | 'onBackButtonClick' | 'truncate'> &
19
22
  Pick<DialogBodyProps, 'content'> & {
20
23
  /** Ссылка на скроллируемый контейнер контента (например, для дозагрузки по скроллу). */
@@ -175,7 +175,8 @@ export function DrawerCustom(props: DrawerCustomProps) {
175
175
  showBlackout,
176
176
  snapPoints,
177
177
  swipeEnabled,
178
- safeArea,
178
+ safeAreaTop,
179
+ safeAreaBottom,
179
180
  disableMotions,
180
181
  ...rest
181
182
  } = props;
@@ -190,7 +191,8 @@ export function DrawerCustom(props: DrawerCustomProps) {
190
191
  showBackdrop={showBlackout}
191
192
  snapPoints={snapPoints}
192
193
  swipeEnabled={swipeEnabled}
193
- safeArea={safeArea}
194
+ safeAreaTop={safeAreaTop}
195
+ safeAreaBottom={safeAreaBottom}
194
196
  disableMotions={disableMotions}
195
197
  {...extractSupportProps(rest)}
196
198
  >
@@ -74,4 +74,4 @@ export type DrawerCustomProps = WithSupportProps<
74
74
  }>
75
75
  > &
76
76
  // Только mobile: управляют sheet-поверхностью (на desktop игнорируются).
77
- Pick<BottomSheetCustomProps, 'snapPoints' | 'swipeEnabled' | 'safeArea'>;
77
+ Pick<BottomSheetCustomProps, 'snapPoints' | 'swipeEnabled' | 'safeAreaTop' | 'safeAreaBottom'>;
@@ -33,7 +33,8 @@ export function MobileDrawer({
33
33
  snapPoints,
34
34
  snapIndex,
35
35
  onSnapIndexChange,
36
- safeArea,
36
+ safeAreaTop,
37
+ safeAreaBottom,
37
38
  withDividers = false,
38
39
  ...rest
39
40
  }: DrawerProps) {
@@ -71,7 +72,8 @@ export function MobileDrawer({
71
72
  snapPoints={snapPoints}
72
73
  snapIndex={snapIndex}
73
74
  onSnapIndexChange={onSnapIndexChange}
74
- safeArea={safeArea}
75
+ safeAreaTop={safeAreaTop}
76
+ safeAreaBottom={safeAreaBottom}
75
77
  {...extractSupportProps(rest)}
76
78
  />
77
79
  );