@cloud-ru/ds-uikit-product-quota 1.1.11 → 1.1.12
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 +4 -0
- package/dist/cjs/components/QuotaWidget/QuotaWidget.js +3 -3
- package/dist/esm/components/QuotaWidget/QuotaWidget.js +4 -4
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/components/QuotaWidget/QuotaWidget.tsx +4 -4
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.12 (2026-10-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ds/uikit-product-quota
|
|
9
|
+
|
|
6
10
|
## 1.1.11 (2026-10-09)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @ds/uikit-product-quota
|
|
@@ -29,14 +29,14 @@ function QuotaWidget({ quotas, disableSorting, loading, skeletonRowCount, error,
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
const exhaustedCount = quotas.filter(utils_1.checkIsExceeded).length;
|
|
32
|
-
// На мобилке лист full-height
|
|
32
|
+
// На мобилке лист full-height: шапку и кнопку выносим в pinned-слоты BottomSheet
|
|
33
33
|
// (`title` сверху, `footer` снизу), а карточки скроллятся в теле листа — как в макете.
|
|
34
34
|
const showMobileIncreaseButton = isMobile && canEditQuota && !error && !hideIncreaseQuotaButton;
|
|
35
35
|
return ((0, jsx_runtime_1.jsx)(dropdown_1.Dropdown, { ...props, placement: 'bottom-end',
|
|
36
36
|
// Desktop: отступы даёт `.content`; mobile: отступ тела даёт BottomSheet.
|
|
37
37
|
bodyPadding: isMobile,
|
|
38
|
-
// Mobile: лист на всю высоту экрана (
|
|
39
|
-
snapPoints:
|
|
38
|
+
// Mobile: лист на всю высоту экрана (safe-area даёт сам BottomSheet).
|
|
39
|
+
snapPoints: dropdown_1.SNAP_POINTS_PRESET.full, title: isMobile ? (0, jsx_runtime_1.jsx)(QuotaMobileHeader_1.QuotaMobileHeader, { projectName: projectName }) : undefined, footer: showMobileIncreaseButton ? (0, jsx_runtime_1.jsx)(QuotaIncreaseButton_1.QuotaIncreaseButton, { onClick: onIncreaseQuotaClick }) : undefined, open: isOpen, onOpenChange: handleOpenChange, content: (0, jsx_runtime_1.jsx)(QuotaWidgetContent_1.QuotaWidgetContent, { quotas: quotas, disableSorting: disableSorting, loading: loading, skeletonRowCount: skeletonRowCount, error: error, onRefresh: onRefresh, projectName: projectName, quotasUrl: quotasUrl, canEditQuota: canEditQuota, hideIncreaseQuotaButton: hideIncreaseQuotaButton, onIncreaseQuotaClick: onIncreaseQuotaClick, onQuotasUrlClick: onQuotasUrlClick, hideMobileHeader: isMobile, hideMobileIncreaseButton: isMobile, "data-test-id": contentTestId }), children: (0, jsx_runtime_1.jsx)(button_1.Button
|
|
40
40
|
// На мобилке триггер бордюрный (`outline` — как в макете кнопки квот),
|
|
41
41
|
// на desktop — плоский `function`. Переопределяется через `buttonProps.view`.
|
|
42
42
|
, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isMobileLayout, useAdaptiveLayout } from '@cloud-ru/ds-adaptive';
|
|
3
3
|
import { Button } from '@cloud-ru/ds-button';
|
|
4
|
-
import { Dropdown } from '@cloud-ru/ds-dropdown';
|
|
4
|
+
import { Dropdown, SNAP_POINTS_PRESET } from '@cloud-ru/ds-dropdown';
|
|
5
5
|
import { ChevronDownSVG, ChevronUpSVG } from '@cloud-ru/ds-icons/interface/system';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
import { TEST_IDS } from '../../constants.js';
|
|
@@ -26,14 +26,14 @@ export function QuotaWidget({ quotas, disableSorting, loading, skeletonRowCount,
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
const exhaustedCount = quotas.filter(checkIsExceeded).length;
|
|
29
|
-
// На мобилке лист full-height
|
|
29
|
+
// На мобилке лист full-height: шапку и кнопку выносим в pinned-слоты BottomSheet
|
|
30
30
|
// (`title` сверху, `footer` снизу), а карточки скроллятся в теле листа — как в макете.
|
|
31
31
|
const showMobileIncreaseButton = isMobile && canEditQuota && !error && !hideIncreaseQuotaButton;
|
|
32
32
|
return (_jsx(Dropdown, { ...props, placement: 'bottom-end',
|
|
33
33
|
// Desktop: отступы даёт `.content`; mobile: отступ тела даёт BottomSheet.
|
|
34
34
|
bodyPadding: isMobile,
|
|
35
|
-
// Mobile: лист на всю высоту экрана (
|
|
36
|
-
snapPoints:
|
|
35
|
+
// Mobile: лист на всю высоту экрана (safe-area даёт сам BottomSheet).
|
|
36
|
+
snapPoints: SNAP_POINTS_PRESET.full, title: isMobile ? _jsx(QuotaMobileHeader, { projectName: projectName }) : undefined, footer: showMobileIncreaseButton ? _jsx(QuotaIncreaseButton, { onClick: onIncreaseQuotaClick }) : undefined, open: isOpen, onOpenChange: handleOpenChange, content: _jsx(QuotaWidgetContent, { quotas: quotas, disableSorting: disableSorting, loading: loading, skeletonRowCount: skeletonRowCount, error: error, onRefresh: onRefresh, projectName: projectName, quotasUrl: quotasUrl, canEditQuota: canEditQuota, hideIncreaseQuotaButton: hideIncreaseQuotaButton, onIncreaseQuotaClick: onIncreaseQuotaClick, onQuotasUrlClick: onQuotasUrlClick, hideMobileHeader: isMobile, hideMobileIncreaseButton: isMobile, "data-test-id": contentTestId }), children: _jsx(Button
|
|
37
37
|
// На мобилке триггер бордюрный (`outline` — как в макете кнопки квот),
|
|
38
38
|
// на desktop — плоский `function`. Переопределяется через `buttonProps.view`.
|
|
39
39
|
, {
|