@cloud-ru/ds-popup-private 1.1.14 → 1.1.16-preview-0343264d.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 CHANGED
@@ -3,6 +3,10 @@
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
+ ## 1.1.15 (2026-10-19)
7
+
8
+ **Note:** Version bump only for package @ds/popup-private
9
+
6
10
  ## 1.1.14 (2026-10-17)
7
11
 
8
12
  **Note:** Version bump only for package @ds/popup-private
package/README.md CHANGED
@@ -12,9 +12,9 @@
12
12
  | `additionalButton` | `BottomSheetActionButton` | — | Дополнительная (третья) кнопка (по умолчанию `view='simple'`, `appearance='neutral'`). |
13
13
  | `approveButton` | `BottomSheetActionButton` | — | Основная кнопка (по умолчанию `view='filled'`, `appearance='primary'`). |
14
14
  | `cancelButton` | `BottomSheetActionButton` | — | Кнопка отмены (по умолчанию `view='outline'`, `appearance='neutral'`). |
15
- | `footerActionsOrientation` | `"horizontal"` \| `"vertical"` | `horizontal` | Ориентация кнопок при ровно двух действиях. |
15
+ | `footerActionsOrientation` | `"horizontal"` \| `"vertical"` | `horizontal` | Ориентация кнопок в футере. |
16
16
  | `size` | `"l"` \| `"m"` \| `"s"` | — | Размер кнопок футера. Задаётся на уровне группы (как в `ButtonGroup`), не по кнопке — <br/> в макетах все действия футера одного размера. Нужен потребителям с собственной осью <br/> размера (календарные дропдауны: 24 / 32 / 40 при s / m / l). У modal, drawer и <br/> bottom-sheet своей оси нет, но кит рисует их футеры на `l` — эти поверхности <br/> передают `size='l'` явно. |
17
- | `surface` | `"bottomSheet"` \| `"window"` | `window` | Поверхность overlay'я — определяет раскладку кнопок: <br/> - `window` (desktop, дефолт): 1–2 кнопки компактно вправо, 3 — стопка (primary сверху). <br/> - `bottomSheet` (mobile): 1 → вправо, 2 → space-between, 3 → стопка с инверсией (primary внизу). |
17
+ | `surface` | `"bottomSheet"` \| `"window"` | `window` | Поверхность overlay'я — определяет раскладку кнопок: <br/> - `window` (desktop, дефолт): 3 кнопки вряд. <br/> - `bottomSheet` (mobile): 1 → вправо, 2 → space-between, 3 → стопка с инверсией (primary внизу). |
18
18
  | `testIds` | `FooterActionsTestIds` | — | Идентификаторы слотов конкретного компонента (`bottom-sheet` / `modal` / `drawer`). |
19
19
 
20
20
  #### Related types
@@ -23,7 +23,7 @@ export type FooterActionsProps = {
23
23
  * передают `size='l'` явно.
24
24
  */
25
25
  size?: Size;
26
- /** Ориентация кнопок при ровно двух действиях. */
26
+ /** Ориентация кнопок в футере. */
27
27
  footerActionsOrientation?: FooterActionsOrientation;
28
28
  /** Идентификаторы слотов конкретного компонента (`bottom-sheet` / `modal` / `drawer`). */
29
29
  testIds: FooterActionsTestIds;
@@ -31,7 +31,7 @@ export type FooterActionsProps = {
31
31
  actionsClassName?: string;
32
32
  /**
33
33
  * Поверхность overlay'я — определяет раскладку кнопок:
34
- * - `window` (desktop, дефолт): 1–2 кнопки компактно вправо, 3 — стопка (primary сверху).
34
+ * - `window` (desktop, дефолт): 3 кнопки вряд.
35
35
  * - `bottomSheet` (mobile): 1 → вправо, 2 → space-between, 3 → стопка с инверсией (primary внизу).
36
36
  */
37
37
  surface?: SurfaceTokenSegment;
@@ -20,13 +20,17 @@ function FooterActions({ approveButton, cancelButton, additionalButton, size, fo
20
20
  return null;
21
21
  }
22
22
  const isMobile = surface === 'bottomSheet';
23
- const isVerticalActions = footerActionsOrientation === constants_1.FOOTER_ACTIONS_ORIENTATION.Vertical || actionCount === 3;
23
+ const isVerticalActions = footerActionsOrientation === constants_1.FOOTER_ACTIONS_ORIENTATION.Vertical;
24
24
  const hasTertiary = Boolean(additionalButton);
25
25
  // Раскладка кнопок футера зависит от поверхности:
26
- // - desktop (window): пара `cancel + approve` → компактно вправо (`compact`); пара с tertiary
27
- // (`additional + approve`) → space-between, tertiary слева / primary справа (Figma
28
- // `popupDropdownFooter` — календарные дропдауны); 3 → стопка, primary сверху (ButtonGroup default).
29
- // - mobile (bottomSheet): 1 → вправо (`single`); 2 → space-between (`break`); 3 → стопка, инверсия (`stackInverted`).
26
+ // - desktop (window):
27
+ // пара `cancel + approve` → компактно вправо (`compact`);
28
+ // пара с tertiary (`additional + approve`) → space-between, tertiary слева / primary справа (Figma `popupDropdownFooter` — календарные дропдауны);
29
+ // три кнопки → space-between, additional первая слева;
30
+ // - mobile (bottomSheet):
31
+ // 1 → вправо (`single`);
32
+ // 2 → space-between (`break`);
33
+ // 3 → стопка, инверсия (`stackInverted`).
30
34
  const useBreak = !isVerticalActions && actionCount === 2 && (isMobile || (!isMobile && hasTertiary));
31
35
  const isSingle = isMobile && actionCount === 1;
32
36
  const isCompact = !isMobile && !isVerticalActions && !useBreak;
@@ -23,7 +23,7 @@ export type FooterActionsProps = {
23
23
  * передают `size='l'` явно.
24
24
  */
25
25
  size?: Size;
26
- /** Ориентация кнопок при ровно двух действиях. */
26
+ /** Ориентация кнопок в футере. */
27
27
  footerActionsOrientation?: FooterActionsOrientation;
28
28
  /** Идентификаторы слотов конкретного компонента (`bottom-sheet` / `modal` / `drawer`). */
29
29
  testIds: FooterActionsTestIds;
@@ -31,7 +31,7 @@ export type FooterActionsProps = {
31
31
  actionsClassName?: string;
32
32
  /**
33
33
  * Поверхность overlay'я — определяет раскладку кнопок:
34
- * - `window` (desktop, дефолт): 1–2 кнопки компактно вправо, 3 — стопка (primary сверху).
34
+ * - `window` (desktop, дефолт): 3 кнопки вряд.
35
35
  * - `bottomSheet` (mobile): 1 → вправо, 2 → space-between, 3 → стопка с инверсией (primary внизу).
36
36
  */
37
37
  surface?: SurfaceTokenSegment;
@@ -14,13 +14,17 @@ export function FooterActions({ approveButton, cancelButton, additionalButton, s
14
14
  return null;
15
15
  }
16
16
  const isMobile = surface === 'bottomSheet';
17
- const isVerticalActions = footerActionsOrientation === FOOTER_ACTIONS_ORIENTATION.Vertical || actionCount === 3;
17
+ const isVerticalActions = footerActionsOrientation === FOOTER_ACTIONS_ORIENTATION.Vertical;
18
18
  const hasTertiary = Boolean(additionalButton);
19
19
  // Раскладка кнопок футера зависит от поверхности:
20
- // - desktop (window): пара `cancel + approve` → компактно вправо (`compact`); пара с tertiary
21
- // (`additional + approve`) → space-between, tertiary слева / primary справа (Figma
22
- // `popupDropdownFooter` — календарные дропдауны); 3 → стопка, primary сверху (ButtonGroup default).
23
- // - mobile (bottomSheet): 1 → вправо (`single`); 2 → space-between (`break`); 3 → стопка, инверсия (`stackInverted`).
20
+ // - desktop (window):
21
+ // пара `cancel + approve` → компактно вправо (`compact`);
22
+ // пара с tertiary (`additional + approve`) → space-between, tertiary слева / primary справа (Figma `popupDropdownFooter` — календарные дропдауны);
23
+ // три кнопки → space-between, additional первая слева;
24
+ // - mobile (bottomSheet):
25
+ // 1 → вправо (`single`);
26
+ // 2 → space-between (`break`);
27
+ // 3 → стопка, инверсия (`stackInverted`).
24
28
  const useBreak = !isVerticalActions && actionCount === 2 && (isMobile || (!isMobile && hasTertiary));
25
29
  const isSingle = isMobile && actionCount === 1;
26
30
  const isCompact = !isMobile && !isVerticalActions && !useBreak;