@cloud-ru/ds-uikit-product-quota 1.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.
Files changed (183) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +201 -0
  3. package/README.md +458 -0
  4. package/dist/cjs/components/QuotaWidget/QuotaIncreaseButton.d.ts +4 -0
  5. package/dist/cjs/components/QuotaWidget/QuotaIncreaseButton.js +15 -0
  6. package/dist/cjs/components/QuotaWidget/QuotaMobileHeader.d.ts +4 -0
  7. package/dist/cjs/components/QuotaWidget/QuotaMobileHeader.js +15 -0
  8. package/dist/cjs/components/QuotaWidget/QuotaWidget.d.ts +12 -0
  9. package/dist/cjs/components/QuotaWidget/QuotaWidget.js +44 -0
  10. package/dist/cjs/components/QuotaWidget/QuotaWidgetContent.d.ts +27 -0
  11. package/dist/cjs/components/QuotaWidget/QuotaWidgetContent.js +33 -0
  12. package/dist/cjs/components/QuotaWidget/components/ProjectHeader/ProjectHeader.d.ts +7 -0
  13. package/dist/cjs/components/QuotaWidget/components/ProjectHeader/ProjectHeader.js +19 -0
  14. package/dist/cjs/components/QuotaWidget/components/ProjectHeader/index.d.ts +1 -0
  15. package/dist/cjs/components/QuotaWidget/components/ProjectHeader/index.js +17 -0
  16. package/dist/cjs/components/QuotaWidget/components/ProjectHeader/styles.module.css +30 -0
  17. package/dist/cjs/components/QuotaWidget/index.d.ts +2 -0
  18. package/dist/cjs/components/QuotaWidget/index.js +18 -0
  19. package/dist/cjs/components/QuotaWidget/styles.module.css +49 -0
  20. package/dist/cjs/components/QuotaWidgetCard/QuotaWidgetCard.d.ts +13 -0
  21. package/dist/cjs/components/QuotaWidgetCard/QuotaWidgetCard.js +53 -0
  22. package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.d.ts +6 -0
  23. package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.js +23 -0
  24. package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/index.d.ts +1 -0
  25. package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/index.js +17 -0
  26. package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/styles.module.css +34 -0
  27. package/dist/cjs/components/QuotaWidgetCard/index.d.ts +1 -0
  28. package/dist/cjs/components/QuotaWidgetCard/index.js +17 -0
  29. package/dist/cjs/components/QuotaWidgetCard/styles.module.css +97 -0
  30. package/dist/cjs/components/QuotaWidgetMini/QuotaWidgetMini.d.ts +7 -0
  31. package/dist/cjs/components/QuotaWidgetMini/QuotaWidgetMini.js +27 -0
  32. package/dist/cjs/components/QuotaWidgetMini/index.d.ts +1 -0
  33. package/dist/cjs/components/QuotaWidgetMini/index.js +17 -0
  34. package/dist/cjs/components/QuotaWidgetMini/styles.module.css +15 -0
  35. package/dist/cjs/components/index.d.ts +3 -0
  36. package/dist/cjs/components/index.js +19 -0
  37. package/dist/cjs/constants.d.ts +17 -0
  38. package/dist/cjs/constants.js +20 -0
  39. package/dist/cjs/helperComponents/QuotaCardsGrid/QuotaCardsGrid.d.ts +6 -0
  40. package/dist/cjs/helperComponents/QuotaCardsGrid/QuotaCardsGrid.js +32 -0
  41. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/Grid.d.ts +6 -0
  42. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/Grid.js +30 -0
  43. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.d.ts +6 -0
  44. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.js +16 -0
  45. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.d.ts +1 -0
  46. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.js +17 -0
  47. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/styles.module.css +10 -0
  48. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/index.d.ts +1 -0
  49. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/index.js +17 -0
  50. package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/styles.module.css +9 -0
  51. package/dist/cjs/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.d.ts +5 -0
  52. package/dist/cjs/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.js +12 -0
  53. package/dist/cjs/helperComponents/QuotaCardsGrid/components/QuotaError/index.d.ts +1 -0
  54. package/dist/cjs/helperComponents/QuotaCardsGrid/components/QuotaError/index.js +17 -0
  55. package/dist/cjs/helperComponents/QuotaCardsGrid/index.d.ts +1 -0
  56. package/dist/cjs/helperComponents/QuotaCardsGrid/index.js +17 -0
  57. package/dist/cjs/helperComponents/QuotaCardsGrid/styles.module.css +16 -0
  58. package/dist/cjs/index.d.ts +5 -0
  59. package/dist/cjs/index.js +21 -0
  60. package/dist/cjs/locale/index.d.ts +91 -0
  61. package/dist/cjs/locale/index.js +50 -0
  62. package/dist/cjs/package.json +3 -0
  63. package/dist/cjs/style.css +260 -0
  64. package/dist/cjs/types.d.ts +34 -0
  65. package/dist/cjs/types.js +2 -0
  66. package/dist/cjs/utils/checkIsExceeded.d.ts +2 -0
  67. package/dist/cjs/utils/checkIsExceeded.js +5 -0
  68. package/dist/cjs/utils/formatNumber.d.ts +1 -0
  69. package/dist/cjs/utils/formatNumber.js +6 -0
  70. package/dist/cjs/utils/getPercent.d.ts +2 -0
  71. package/dist/cjs/utils/getPercent.js +9 -0
  72. package/dist/cjs/utils/index.d.ts +3 -0
  73. package/dist/cjs/utils/index.js +19 -0
  74. package/dist/esm/components/QuotaWidget/QuotaIncreaseButton.d.ts +4 -0
  75. package/dist/esm/components/QuotaWidget/QuotaIncreaseButton.js +9 -0
  76. package/dist/esm/components/QuotaWidget/QuotaMobileHeader.d.ts +4 -0
  77. package/dist/esm/components/QuotaWidget/QuotaMobileHeader.js +9 -0
  78. package/dist/esm/components/QuotaWidget/QuotaWidget.d.ts +12 -0
  79. package/dist/esm/components/QuotaWidget/QuotaWidget.js +41 -0
  80. package/dist/esm/components/QuotaWidget/QuotaWidgetContent.d.ts +27 -0
  81. package/dist/esm/components/QuotaWidget/QuotaWidgetContent.js +27 -0
  82. package/dist/esm/components/QuotaWidget/components/ProjectHeader/ProjectHeader.d.ts +7 -0
  83. package/dist/esm/components/QuotaWidget/components/ProjectHeader/ProjectHeader.js +13 -0
  84. package/dist/esm/components/QuotaWidget/components/ProjectHeader/index.d.ts +1 -0
  85. package/dist/esm/components/QuotaWidget/components/ProjectHeader/index.js +1 -0
  86. package/dist/esm/components/QuotaWidget/components/ProjectHeader/styles.module.css +30 -0
  87. package/dist/esm/components/QuotaWidget/index.d.ts +2 -0
  88. package/dist/esm/components/QuotaWidget/index.js +2 -0
  89. package/dist/esm/components/QuotaWidget/styles.module.css +49 -0
  90. package/dist/esm/components/QuotaWidgetCard/QuotaWidgetCard.d.ts +13 -0
  91. package/dist/esm/components/QuotaWidgetCard/QuotaWidgetCard.js +47 -0
  92. package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.d.ts +6 -0
  93. package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.js +17 -0
  94. package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/index.d.ts +1 -0
  95. package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/index.js +1 -0
  96. package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/styles.module.css +34 -0
  97. package/dist/esm/components/QuotaWidgetCard/index.d.ts +1 -0
  98. package/dist/esm/components/QuotaWidgetCard/index.js +1 -0
  99. package/dist/esm/components/QuotaWidgetCard/styles.module.css +97 -0
  100. package/dist/esm/components/QuotaWidgetMini/QuotaWidgetMini.d.ts +7 -0
  101. package/dist/esm/components/QuotaWidgetMini/QuotaWidgetMini.js +21 -0
  102. package/dist/esm/components/QuotaWidgetMini/index.d.ts +1 -0
  103. package/dist/esm/components/QuotaWidgetMini/index.js +1 -0
  104. package/dist/esm/components/QuotaWidgetMini/styles.module.css +15 -0
  105. package/dist/esm/components/index.d.ts +3 -0
  106. package/dist/esm/components/index.js +3 -0
  107. package/dist/esm/constants.d.ts +17 -0
  108. package/dist/esm/constants.js +17 -0
  109. package/dist/esm/helperComponents/QuotaCardsGrid/QuotaCardsGrid.d.ts +6 -0
  110. package/dist/esm/helperComponents/QuotaCardsGrid/QuotaCardsGrid.js +26 -0
  111. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/Grid.d.ts +6 -0
  112. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/Grid.js +24 -0
  113. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.d.ts +6 -0
  114. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.js +10 -0
  115. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.d.ts +1 -0
  116. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.js +1 -0
  117. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/styles.module.css +10 -0
  118. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/index.d.ts +1 -0
  119. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/index.js +1 -0
  120. package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/styles.module.css +9 -0
  121. package/dist/esm/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.d.ts +5 -0
  122. package/dist/esm/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.js +9 -0
  123. package/dist/esm/helperComponents/QuotaCardsGrid/components/QuotaError/index.d.ts +1 -0
  124. package/dist/esm/helperComponents/QuotaCardsGrid/components/QuotaError/index.js +1 -0
  125. package/dist/esm/helperComponents/QuotaCardsGrid/index.d.ts +1 -0
  126. package/dist/esm/helperComponents/QuotaCardsGrid/index.js +1 -0
  127. package/dist/esm/helperComponents/QuotaCardsGrid/styles.module.css +16 -0
  128. package/dist/esm/index.d.ts +5 -0
  129. package/dist/esm/index.js +5 -0
  130. package/dist/esm/locale/index.d.ts +91 -0
  131. package/dist/esm/locale/index.js +47 -0
  132. package/dist/esm/style.css +260 -0
  133. package/dist/esm/types.d.ts +34 -0
  134. package/dist/esm/types.js +1 -0
  135. package/dist/esm/utils/checkIsExceeded.d.ts +2 -0
  136. package/dist/esm/utils/checkIsExceeded.js +1 -0
  137. package/dist/esm/utils/formatNumber.d.ts +1 -0
  138. package/dist/esm/utils/formatNumber.js +3 -0
  139. package/dist/esm/utils/getPercent.d.ts +2 -0
  140. package/dist/esm/utils/getPercent.js +6 -0
  141. package/dist/esm/utils/index.d.ts +3 -0
  142. package/dist/esm/utils/index.js +3 -0
  143. package/dist/tsconfig.cjs.tsbuildinfo +1 -0
  144. package/dist/tsconfig.esm.tsbuildinfo +1 -0
  145. package/package.json +63 -0
  146. package/src/components/QuotaWidget/QuotaIncreaseButton.tsx +21 -0
  147. package/src/components/QuotaWidget/QuotaMobileHeader.tsx +18 -0
  148. package/src/components/QuotaWidget/QuotaWidget.tsx +109 -0
  149. package/src/components/QuotaWidget/QuotaWidgetContent.tsx +91 -0
  150. package/src/components/QuotaWidget/components/ProjectHeader/ProjectHeader.tsx +59 -0
  151. package/src/components/QuotaWidget/components/ProjectHeader/index.ts +1 -0
  152. package/src/components/QuotaWidget/components/ProjectHeader/styles.module.scss +29 -0
  153. package/src/components/QuotaWidget/index.ts +2 -0
  154. package/src/components/QuotaWidget/styles.module.scss +52 -0
  155. package/src/components/QuotaWidgetCard/QuotaWidgetCard.tsx +127 -0
  156. package/src/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.tsx +48 -0
  157. package/src/components/QuotaWidgetCard/components/QuotaTooltip/index.ts +1 -0
  158. package/src/components/QuotaWidgetCard/components/QuotaTooltip/styles.module.scss +30 -0
  159. package/src/components/QuotaWidgetCard/index.ts +1 -0
  160. package/src/components/QuotaWidgetCard/styles.module.scss +97 -0
  161. package/src/components/QuotaWidgetMini/QuotaWidgetMini.tsx +93 -0
  162. package/src/components/QuotaWidgetMini/index.ts +1 -0
  163. package/src/components/QuotaWidgetMini/styles.module.scss +18 -0
  164. package/src/components/index.ts +3 -0
  165. package/src/constants.ts +17 -0
  166. package/src/helperComponents/QuotaCardsGrid/QuotaCardsGrid.tsx +54 -0
  167. package/src/helperComponents/QuotaCardsGrid/components/Grid/Grid.tsx +47 -0
  168. package/src/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.tsx +24 -0
  169. package/src/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.ts +1 -0
  170. package/src/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/styles.module.scss +15 -0
  171. package/src/helperComponents/QuotaCardsGrid/components/Grid/index.ts +1 -0
  172. package/src/helperComponents/QuotaCardsGrid/components/Grid/styles.module.scss +12 -0
  173. package/src/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.tsx +31 -0
  174. package/src/helperComponents/QuotaCardsGrid/components/QuotaError/index.ts +1 -0
  175. package/src/helperComponents/QuotaCardsGrid/index.ts +1 -0
  176. package/src/helperComponents/QuotaCardsGrid/styles.module.scss +16 -0
  177. package/src/index.ts +5 -0
  178. package/src/locale/index.ts +51 -0
  179. package/src/types.ts +35 -0
  180. package/src/utils/checkIsExceeded.ts +3 -0
  181. package/src/utils/formatNumber.ts +3 -0
  182. package/src/utils/getPercent.ts +9 -0
  183. package/src/utils/index.ts +3 -0
@@ -0,0 +1,13 @@
1
+ import { WithSupportProps } from '@cloud-ru/ds-utils';
2
+ import { QuotaItem } from '../../types.js';
3
+ export type QuotaWidgetCardProps = WithSupportProps<{
4
+ /** Отображаемая квота */
5
+ quota: QuotaItem;
6
+ /** Состояние «не удалось загрузить данные» (Figma: noData=true) */
7
+ noData?: boolean;
8
+ /** Состояние загрузки (Figma: loading=true) */
9
+ loading?: boolean;
10
+ /** Колбек кнопки «Обновить» в состоянии noData */
11
+ onRefresh?: () => void;
12
+ }>;
13
+ export declare function QuotaWidgetCard({ quota, noData, loading, onRefresh, ...props }: QuotaWidgetCardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from '@cloud-ru/ds-button';
3
+ import { UpdateSVG } from '@cloud-ru/ds-icons/interface/system';
4
+ import { InfoBlock } from '@cloud-ru/ds-info-block';
5
+ import { ProgressBar } from '@cloud-ru/ds-progress-bar';
6
+ import { SkeletonText } from '@cloud-ru/ds-skeleton';
7
+ import { Tooltip } from '@cloud-ru/ds-tooltip';
8
+ import { TruncateString } from '@cloud-ru/ds-truncate-string';
9
+ import { Typography } from '@cloud-ru/ds-typography';
10
+ import { quotaLocale } from '../../locale/index.js';
11
+ import { checkIsExceeded, formatNumber, getPercent } from '../../utils/index.js';
12
+ import { QuotaTooltip } from './components/QuotaTooltip/index.js';
13
+ import styles from './styles.module.css';
14
+ const QUOTA_USAGE_PROGRESS = {
15
+ HIGH: 90,
16
+ MEDIUM: 70,
17
+ };
18
+ function getProgressAppearance(percent) {
19
+ if (percent >= QUOTA_USAGE_PROGRESS.HIGH) {
20
+ return 'red';
21
+ }
22
+ if (percent >= QUOTA_USAGE_PROGRESS.MEDIUM) {
23
+ return 'yellow';
24
+ }
25
+ return 'green';
26
+ }
27
+ export function QuotaWidgetCard({ quota, noData = false, loading = false, onRefresh, ...props }) {
28
+ const { t } = quotaLocale.useTranslations();
29
+ if (noData) {
30
+ return (_jsx("div", { className: styles.card, "data-no-data": true, ...props, children: _jsx(InfoBlock, { size: 's', align: 'vertical', title: quota.name, content: t('errorText'), footer: onRefresh ? (_jsx(Button, { view: 'simple', appearance: 'neutral', size: 's', label: t('errorButton'), icon: _jsx(UpdateSVG, { size: 16 }), iconPosition: 'after', onClick: onRefresh })) : undefined }) }));
31
+ }
32
+ if (loading) {
33
+ return (_jsxs("div", { className: styles.card, "data-loading": true, ...props, children: [_jsx(SkeletonText, { loading: true, lines: 1, variant: 'body', size: 'm' }), _jsx(SkeletonText, { loading: true, lines: 1, variant: 'body', size: 'm' }), _jsx(SkeletonText, { loading: true, lines: 1, variant: 'body', size: 'l' })] }));
34
+ }
35
+ const percent = getPercent(quota);
36
+ const rows = [
37
+ {
38
+ label: t('cardAvailable'),
39
+ value: quota.limit,
40
+ },
41
+ {
42
+ label: t('cardRemaining'),
43
+ value: quota.remains,
44
+ },
45
+ ];
46
+ return (_jsx(Tooltip, { triggerClassName: styles.tooltip, hoverDelayOpen: 500, tip: _jsx(QuotaTooltip, { quota: quota }), children: _jsxs("div", { className: styles.card, "data-exhausted": checkIsExceeded(quota), ...props, children: [_jsxs("div", { className: styles.header, children: [_jsx(Typography, { variant: 'body', size: 'm', className: styles.title, children: _jsx(TruncateString, { maxLines: 2, text: quota.name }) }), _jsxs("span", { className: styles.percent, children: [Math.round(percent), "%"] })] }), _jsx(ProgressBar, { className: styles.progressBar, progress: percent, size: 'xs', appearance: getProgressAppearance(percent) }), _jsx("div", { className: styles.info, children: rows.map(row => (_jsxs("div", { className: styles.row, children: [_jsx("span", { className: styles.label, children: row.label }), _jsxs("span", { className: styles.value, children: [formatNumber(row.value), " ", _jsx("span", { className: styles.unit, children: quota.unitDisplayName })] })] }, row.label))) })] }) }));
47
+ }
@@ -0,0 +1,6 @@
1
+ import { QuotaItem } from '../../../../types.js';
2
+ type QuotaTooltipProps = {
3
+ quota: QuotaItem;
4
+ };
5
+ export declare function QuotaTooltip({ quota }: QuotaTooltipProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { APPEARANCE, Divider } from '@cloud-ru/ds-divider';
3
+ import { Typography } from '@cloud-ru/ds-typography';
4
+ import { TEST_IDS } from '../../../../constants.js';
5
+ import { quotaLocale } from '../../../../locale/index.js';
6
+ import { checkIsExceeded, formatNumber } from '../../../../utils/index.js';
7
+ import styles from './styles.module.css';
8
+ export function QuotaTooltip({ quota }) {
9
+ const { t } = quotaLocale.useTranslations();
10
+ const rows = [
11
+ { label: t('tooltipAvailable'), value: quota.limit },
12
+ { label: t('tooltipUsed'), value: quota.usage },
13
+ { label: t('tooltipRemaining'), value: quota.remains },
14
+ ];
15
+ const exhaustedHint = `${t('tooltipExhaustedHint.first')} ${t('tooltipExhaustedHint.second')}`;
16
+ return (_jsxs("div", { className: styles.content, "data-test-id": TEST_IDS.quotaWidgetCard.tooltip, children: [_jsx("div", { className: styles.lists, children: rows.map(row => (_jsxs("div", { className: styles.row, children: [_jsx("span", { className: styles.rowLabel, children: row.label }), _jsxs("span", { className: styles.rowValue, children: [formatNumber(row.value), " ", quota.unitDisplayName] })] }, row.label))) }), checkIsExceeded(quota) && (_jsxs(_Fragment, { children: [_jsx(Divider, { appearance: APPEARANCE.InvertNeutral }), _jsx(Typography, { variant: 'body', size: 'm', children: exhaustedHint })] }))] }));
17
+ }
@@ -0,0 +1 @@
1
+ export * from './QuotaTooltip.js';
@@ -0,0 +1 @@
1
+ export * from './QuotaTooltip.js';
@@ -0,0 +1,34 @@
1
+ .content{
2
+ display:flex;
3
+ flex-direction:column;
4
+ row-gap:var(--sn-primitive-dimension-4, 4px);
5
+ align-items:stretch;
6
+ }
7
+
8
+ .lists{
9
+ display:flex;
10
+ flex-direction:column;
11
+ row-gap:var(--sn-primitive-dimension-4, 4px);
12
+ }
13
+
14
+ .row{
15
+ display:flex;
16
+ -moz-column-gap:var(--sn-primitive-dimension-8, 8px);
17
+ column-gap:var(--sn-primitive-dimension-8, 8px);
18
+ align-items:center;
19
+ justify-content:space-between;
20
+ }
21
+
22
+ .rowLabel,
23
+ .rowValue{
24
+ font-family:var(--sn-regular-body-m-fontFamily, var(--sn-brand-font-fontFamily-regular-body, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
25
+ font-weight:var(--sn-regular-body-m-fontWeight, var(--sn-theme-typography-fontWeight-regular-body-m, var(--sn-brand-font-fontWeight-light-regular-body-m, var(--sn-primitive-font-fontWeightValue-400, 400))));
26
+ line-height:var(--sn-regular-body-m-lineHeight, var(--sn-density-typography-roleBody-lineHeightM, var(--sn-primitive-font-lineHeight-by16, 24px)));
27
+ font-size:var(--sn-regular-body-m-fontSize, var(--sn-density-typography-roleBody-fontSizeM, var(--sn-primitive-font-fontSize-16, 16px)));
28
+ letter-spacing:var(--sn-regular-body-m-letterSpacing, var(--sn-primitive-font-letterSpacing-m, 0.1px));
29
+ paragraph-spacing:var(--sn-regular-body-m-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
30
+ }
31
+
32
+ .rowValue{
33
+ text-align:right;
34
+ }
@@ -0,0 +1 @@
1
+ export * from './QuotaWidgetCard.js';
@@ -0,0 +1 @@
1
+ export * from './QuotaWidgetCard.js';
@@ -0,0 +1,97 @@
1
+ @charset "UTF-8";
2
+ .tooltip{
3
+ display:flex;
4
+ width:100%;
5
+ max-width:100%;
6
+ }
7
+ .card{
8
+ display:flex;
9
+ flex:1 1 auto;
10
+ flex-direction:column;
11
+ row-gap:var(--sn-primitive-dimension-4, 4px);
12
+ box-sizing:border-box;
13
+ min-width:min(256px, 100%);
14
+ max-width:100%;
15
+ padding:var(--sn-primitive-dimension-8, 8px);
16
+ border-radius:var(--sn-card-anatomy-radius-s-container-borderRadius, var(--sn-brand-anatomy-radius-card-s, var(--sn-primitive-dimension-2, 2px)));
17
+ background-color:var(--sn-theme-color-neutral-decorTransparent, var(--sn-brand-color-neutral-transparent-forLightMode, rgba(124, 131, 182, 0.0784313725)));
18
+ backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
19
+ }
20
+ .card[data-exhausted=true]{
21
+ background-color:var(--sn-theme-color-red-background, var(--sn-primitive-color-red-90, #fee8e5));
22
+ }
23
+ .header{
24
+ display:flex;
25
+ gap:var(--sn-primitive-dimension-8, 8px);
26
+ align-items:flex-end;
27
+ justify-content:space-between;
28
+ width:100%;
29
+ }
30
+
31
+ .title{
32
+ flex:1 1 0;
33
+ min-width:0;
34
+ color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
35
+ }
36
+
37
+ .percent{
38
+ font-family:var(--sn-thin-label-m-fontFamily, var(--sn-brand-font-fontFamily-thin-label, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
39
+ font-weight:var(--sn-thin-label-m-fontWeight, var(--sn-theme-typography-fontWeight-thin-label-m, var(--sn-brand-font-fontWeight-light-thin-label-m, var(--sn-primitive-font-fontWeightValue-450, 450))));
40
+ line-height:var(--sn-thin-label-m-lineHeight, var(--sn-density-typography-roleLabel-lineHeightM, var(--sn-primitive-font-lineHeight-by16, 24px)));
41
+ font-size:var(--sn-thin-label-m-fontSize, var(--sn-density-typography-roleLabel-fontSizeM, var(--sn-primitive-font-fontSize-16, 16px)));
42
+ letter-spacing:var(--sn-thin-label-m-letterSpacing, var(--sn-primitive-font-letterSpacing-s, 0px));
43
+ paragraph-spacing:var(--sn-thin-label-m-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize12, 6px));
44
+ flex-shrink:0;
45
+ color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
46
+ }
47
+
48
+ .progressBar{
49
+ width:100%;
50
+ }
51
+
52
+ .info{
53
+ display:flex;
54
+ flex-direction:column;
55
+ row-gap:var(--sn-primitive-dimension-2, 2px);
56
+ width:100%;
57
+ }
58
+
59
+ .row{
60
+ display:flex;
61
+ -moz-column-gap:var(--sn-primitive-dimension-8, 8px);
62
+ column-gap:var(--sn-primitive-dimension-8, 8px);
63
+ align-items:center;
64
+ justify-content:space-between;
65
+ width:100%;
66
+ }
67
+
68
+ .label{
69
+ font-family:var(--sn-thin-label-s-fontFamily, var(--sn-brand-font-fontFamily-thin-label, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
70
+ font-weight:var(--sn-thin-label-s-fontWeight, var(--sn-theme-typography-fontWeight-thin-label-s, var(--sn-brand-font-fontWeight-light-thin-label-s, var(--sn-primitive-font-fontWeightValue-450, 450))));
71
+ line-height:var(--sn-thin-label-s-lineHeight, var(--sn-density-typography-roleLabel-lineHeightS, var(--sn-primitive-font-lineHeight-by14, 20px)));
72
+ font-size:var(--sn-thin-label-s-fontSize, var(--sn-density-typography-roleLabel-fontSizeS, var(--sn-primitive-font-fontSize-14, 14px)));
73
+ letter-spacing:var(--sn-thin-label-s-letterSpacing, var(--sn-primitive-font-letterSpacing-s, 0px));
74
+ paragraph-spacing:var(--sn-thin-label-s-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize11, 5px));
75
+ color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
76
+ }
77
+
78
+ .value{
79
+ font-family:var(--sn-thin-label-l-fontFamily, var(--sn-brand-font-fontFamily-thin-label, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
80
+ font-weight:var(--sn-thin-label-l-fontWeight, var(--sn-theme-typography-fontWeight-thin-label-l, var(--sn-brand-font-fontWeight-light-thin-label-l, var(--sn-primitive-font-fontWeightValue-450, 450))));
81
+ line-height:var(--sn-thin-label-l-lineHeight, var(--sn-density-typography-roleLabel-lineHeightL, var(--sn-primitive-font-lineHeight-by20, 28px)));
82
+ font-size:var(--sn-thin-label-l-fontSize, var(--sn-density-typography-roleLabel-fontSizeL, var(--sn-primitive-font-fontSize-20, 20px)));
83
+ letter-spacing:var(--sn-thin-label-l-letterSpacing, var(--sn-primitive-font-letterSpacing-s, 0px));
84
+ paragraph-spacing:var(--sn-thin-label-l-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
85
+ color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
86
+ white-space:nowrap;
87
+ }
88
+
89
+ .unit{
90
+ font-family:var(--sn-thin-label-l-fontFamily, var(--sn-brand-font-fontFamily-thin-label, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
91
+ font-weight:var(--sn-thin-label-l-fontWeight, var(--sn-theme-typography-fontWeight-thin-label-l, var(--sn-brand-font-fontWeight-light-thin-label-l, var(--sn-primitive-font-fontWeightValue-450, 450))));
92
+ line-height:var(--sn-thin-label-l-lineHeight, var(--sn-density-typography-roleLabel-lineHeightL, var(--sn-primitive-font-lineHeight-by20, 28px)));
93
+ font-size:var(--sn-thin-label-l-fontSize, var(--sn-density-typography-roleLabel-fontSizeL, var(--sn-primitive-font-fontSize-20, 20px)));
94
+ letter-spacing:var(--sn-thin-label-l-letterSpacing, var(--sn-primitive-font-letterSpacing-s, 0px));
95
+ paragraph-spacing:var(--sn-thin-label-l-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
96
+ color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
97
+ }
@@ -0,0 +1,7 @@
1
+ import { WithSupportProps } from '@cloud-ru/ds-utils';
2
+ import { QuotaWidgetPropsBase } from '../../types.js';
3
+ export type QuotaWidgetMiniProps = WithSupportProps<QuotaWidgetPropsBase & {
4
+ /** Флаг раскрытия аккордиона по умолчанию */
5
+ defaultExpanded?: boolean;
6
+ }>;
7
+ export declare function QuotaWidgetMini({ quotas, disableSorting, loading, error, onRefresh, projectName, canEditQuota, defaultExpanded, hideIncreaseQuotaButton, onIncreaseQuotaClick, onWidgetOpen, 'data-test-id': dataTestId, ...props }: QuotaWidgetMiniProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Accordion } from '@cloud-ru/ds-accordion';
3
+ import { Button } from '@cloud-ru/ds-button';
4
+ import { Counter } from '@cloud-ru/ds-counter';
5
+ import { TruncateString } from '@cloud-ru/ds-truncate-string';
6
+ import { TEST_IDS } from '../../constants.js';
7
+ import { QuotaCardsGrid } from '../../helperComponents/QuotaCardsGrid/index.js';
8
+ import { quotaLocale } from '../../locale/index.js';
9
+ import { checkIsExceeded } from '../../utils/index.js';
10
+ import styles from './styles.module.css';
11
+ const ACCORDION_ID = 'quotas-widget-accordion';
12
+ export function QuotaWidgetMini({ quotas, disableSorting, loading, error, onRefresh, projectName, canEditQuota, defaultExpanded, hideIncreaseQuotaButton, onIncreaseQuotaClick, onWidgetOpen, 'data-test-id': dataTestId, ...props }) {
13
+ const { t } = quotaLocale.useTranslations();
14
+ const exhaustedCount = quotas.filter(checkIsExceeded).length;
15
+ const handleExpandedChange = (expanded) => {
16
+ if (expanded) {
17
+ onWidgetOpen?.();
18
+ }
19
+ };
20
+ return (_jsx("div", { "data-test-id": dataTestId ?? TEST_IDS.quotaWidgetMini.root, children: _jsx(Accordion, { ...props, expandedDefault: defaultExpanded ? ACCORDION_ID : undefined, onExpandedChange: handleExpandedChange, children: _jsx(Accordion.CollapseBlockSecondary, { id: ACCORDION_ID, className: styles.collapse, "data-test-id": TEST_IDS.quotaWidgetMini.trigger, title: t('quotas'), afterTitle: !error && !loading && exhaustedCount > 0 ? (_jsx(Counter, { value: exhaustedCount, size: 'xs', appearance: 'red' })) : undefined, subTitle: _jsx(TruncateString, { maxLines: 1, text: projectName }), children: _jsxs("div", { className: styles.body, "data-test-id": TEST_IDS.quotaWidgetMini.content, children: [_jsx(QuotaCardsGrid, { isAccordion: true, quotas: quotas, disableSorting: disableSorting, loading: loading, error: error, onRefresh: onRefresh }), !error && canEditQuota && !hideIncreaseQuotaButton && (_jsx(Button, { className: styles.button, fullWidth: true, view: 'outline', appearance: 'neutral', label: t('increaseQuota'), size: 'm', onClick: onIncreaseQuotaClick }))] }) }) }) }));
21
+ }
@@ -0,0 +1 @@
1
+ export * from './QuotaWidgetMini.js';
@@ -0,0 +1 @@
1
+ export * from './QuotaWidgetMini.js';
@@ -0,0 +1,15 @@
1
+ .collapse{
2
+ width:304px;
3
+ }
4
+
5
+ .body{
6
+ display:flex;
7
+ flex-direction:column;
8
+ gap:var(--sn-primitive-dimension-16, 16px);
9
+ align-items:flex-start;
10
+ width:100%;
11
+ }
12
+
13
+ .button{
14
+ width:100%;
15
+ }
@@ -0,0 +1,3 @@
1
+ export * from './QuotaWidget/index.js';
2
+ export * from './QuotaWidgetMini/index.js';
3
+ export * from './QuotaWidgetCard/index.js';
@@ -0,0 +1,3 @@
1
+ export * from './QuotaWidget/index.js';
2
+ export * from './QuotaWidgetMini/index.js';
3
+ export * from './QuotaWidgetCard/index.js';
@@ -0,0 +1,17 @@
1
+ export declare const TEST_IDS: {
2
+ readonly quotaWidget: {
3
+ readonly root: "quota-widget";
4
+ readonly trigger: "quota-widget__trigger";
5
+ readonly content: "quota-widget__content";
6
+ readonly projectHeader: "quota-widget__project-header";
7
+ };
8
+ readonly quotaWidgetMini: {
9
+ readonly root: "quota-widget-mini";
10
+ readonly trigger: "quota-widget-mini__trigger";
11
+ readonly content: "quota-widget-mini__content";
12
+ };
13
+ readonly quotaWidgetCard: {
14
+ readonly root: "quota-widget-card";
15
+ readonly tooltip: "quota-widget-card__tooltip";
16
+ };
17
+ };
@@ -0,0 +1,17 @@
1
+ export const TEST_IDS = {
2
+ quotaWidget: {
3
+ root: 'quota-widget',
4
+ trigger: 'quota-widget__trigger',
5
+ content: 'quota-widget__content',
6
+ projectHeader: 'quota-widget__project-header',
7
+ },
8
+ quotaWidgetMini: {
9
+ root: 'quota-widget-mini',
10
+ trigger: 'quota-widget-mini__trigger',
11
+ content: 'quota-widget-mini__content',
12
+ },
13
+ quotaWidgetCard: {
14
+ root: 'quota-widget-card',
15
+ tooltip: 'quota-widget-card__tooltip',
16
+ },
17
+ };
@@ -0,0 +1,6 @@
1
+ import { QuotaWidgetPropsBase } from '../../types.js';
2
+ type QuotaCardsGridProps = Pick<QuotaWidgetPropsBase, 'quotas' | 'disableSorting' | 'loading' | 'error' | 'onRefresh'> & {
3
+ isAccordion?: boolean;
4
+ };
5
+ export declare function QuotaCardsGrid({ quotas, loading, error, onRefresh, disableSorting, isAccordion, }: QuotaCardsGridProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { isMobileLayout, useAdaptiveLayout } from '@cloud-ru/ds-adaptive';
3
+ import { Scroll } from '@cloud-ru/ds-scroll';
4
+ import { Grid } from './components/Grid/index.js';
5
+ import { QuotaError } from './components/QuotaError/index.js';
6
+ import styles from './styles.module.css';
7
+ export function QuotaCardsGrid({ quotas, loading, error, onRefresh, disableSorting = false, isAccordion = false, }) {
8
+ // На мобилке bottom-sheet-виджет full-height: снимаем фикс-cap высоты (`max-height`), карточки
9
+ // скроллятся телом листа. Для аккордеона (`QuotaWidgetMini`) это НЕ применяем — у него свой cap.
10
+ const isMobile = isMobileLayout(useAdaptiveLayout().layoutType);
11
+ const wrapperAttributes = {
12
+ className: styles.wrapper,
13
+ 'data-accordion': isAccordion,
14
+ 'data-mobile': isMobile && !isAccordion,
15
+ };
16
+ const gridProps = {
17
+ quotas,
18
+ loading,
19
+ disableSorting,
20
+ isAccordion,
21
+ };
22
+ if (error) {
23
+ return (_jsx("div", { ...wrapperAttributes, children: _jsx(QuotaError, { onRefresh: onRefresh }) }));
24
+ }
25
+ return (_jsx(Scroll, { ...wrapperAttributes, size: 's', children: _jsx(Grid, { ...gridProps }) }));
26
+ }
@@ -0,0 +1,6 @@
1
+ import { QuotaWidgetPropsBase } from '../../../../types.js';
2
+ type GridProps = Pick<QuotaWidgetPropsBase, 'quotas' | 'loading' | 'disableSorting'> & {
3
+ isAccordion?: boolean;
4
+ };
5
+ export declare function Grid({ quotas, loading, disableSorting, isAccordion }: GridProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { isMobileLayout, useAdaptiveLayout } from '@cloud-ru/ds-adaptive';
3
+ import { QuotaWidgetCard } from '../../../../components/QuotaWidgetCard/index.js';
4
+ import { TEST_IDS } from '../../../../constants.js';
5
+ import { getPercent } from '../../../../utils/getPercent.js';
6
+ import { QuotaWidgetCardsSkeleton } from './components/QuotaWidgetCardsSkeleton/index.js';
7
+ import styles from './styles.module.css';
8
+ function sortQuotas(quotas) {
9
+ return [...quotas].sort((first, second) => {
10
+ const percentFirst = getPercent(first);
11
+ const percentSecond = getPercent(second);
12
+ if (percentSecond !== percentFirst) {
13
+ return percentSecond - percentFirst;
14
+ }
15
+ return first.name.localeCompare(second.name);
16
+ });
17
+ }
18
+ export function Grid({ quotas, loading, disableSorting = false, isAccordion = false }) {
19
+ const sortedQuotas = disableSorting ? quotas : sortQuotas(quotas);
20
+ // На мобилке — строго одна колонка на всю ширину (BottomSheet-раскладка узкая, 2 колонки не влезают).
21
+ const { layoutType } = useAdaptiveLayout();
22
+ const isSingleColumn = (quotas.length <= 1 && !loading) || isAccordion || isMobileLayout(layoutType);
23
+ return (_jsx("div", { className: styles.grid, "data-single": isSingleColumn, children: _jsx(QuotaWidgetCardsSkeleton, { loading: loading, children: sortedQuotas.map(quota => (_jsx(QuotaWidgetCard, { quota: quota, "data-test-id": `${TEST_IDS.quotaWidgetCard.root}--${quota.name}` }, quota.name))) }) }));
24
+ }
@@ -0,0 +1,6 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type QuotaWidgetCardsSkeletonProps = PropsWithChildren<{
3
+ loading: boolean;
4
+ }>;
5
+ export declare function QuotaWidgetCardsSkeleton({ loading, children }: QuotaWidgetCardsSkeletonProps): string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element[] | null | undefined;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SkeletonText } from '@cloud-ru/ds-skeleton';
3
+ import styles from './styles.module.css';
4
+ const SKELETON_COUNT = 6;
5
+ export function QuotaWidgetCardsSkeleton({ loading, children }) {
6
+ if (loading) {
7
+ return [...Array(SKELETON_COUNT)].map((_, index) => (_jsxs("div", { className: styles.card, children: [_jsx(SkeletonText, { loading: true, lines: 1, variant: 'body', size: 'm' }), _jsx(SkeletonText, { loading: true, lines: 1, variant: 'body', size: 'm' }), _jsx(SkeletonText, { loading: true, lines: 1, variant: 'body', size: 'l' })] }, index)));
8
+ }
9
+ return children;
10
+ }
@@ -0,0 +1,10 @@
1
+ .card{
2
+ display:flex;
3
+ flex:1;
4
+ flex-direction:column;
5
+ row-gap:var(--sn-primitive-dimension-4, 4px);
6
+ min-width:0;
7
+ padding:var(--sn-primitive-dimension-8, 8px);
8
+ border-radius:var(--sn-card-anatomy-radius-s-container-borderRadius, var(--sn-brand-anatomy-radius-card-s, var(--sn-primitive-dimension-2, 2px)));
9
+ background-color:var(--sn-theme-color-neutral-decorTransparent, var(--sn-brand-color-neutral-transparent-forLightMode, rgba(124, 131, 182, 0.0784313725)));
10
+ }
@@ -0,0 +1 @@
1
+ export * from './Grid.js';
@@ -0,0 +1 @@
1
+ export * from './Grid.js';
@@ -0,0 +1,9 @@
1
+ .grid{
2
+ display:grid;
3
+ grid-template-columns:repeat(2, minmax(0, 1fr));
4
+ gap:var(--sn-primitive-dimension-4, 4px) var(--sn-primitive-dimension-4, 4px);
5
+ width:100%;
6
+ }
7
+ .grid[data-single=true]{
8
+ grid-template-columns:minmax(0, 1fr);
9
+ }
@@ -0,0 +1,5 @@
1
+ type QuotaErrorProps = {
2
+ onRefresh: () => void;
3
+ };
4
+ export declare function QuotaError({ onRefresh }: QuotaErrorProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Button } from '@cloud-ru/ds-button';
3
+ import { CrossSVG, UpdateSVG } from '@cloud-ru/ds-icons/interface/system';
4
+ import { InfoBlock } from '@cloud-ru/ds-info-block';
5
+ import { quotaLocale } from '../../../../locale/index.js';
6
+ export function QuotaError({ onRefresh }) {
7
+ const { t } = quotaLocale.useTranslations();
8
+ return (_jsx(InfoBlock, { size: 'm', align: 'vertical', content: t('errorText'), icon: { icon: CrossSVG, appearance: 'neutral', background: true }, footer: _jsx(Button, { appearance: 'neutral', size: 'm', label: t('errorButton'), icon: _jsx(UpdateSVG, { size: 24 }), onClick: onRefresh }) }));
9
+ }
@@ -0,0 +1 @@
1
+ export * from './QuotaError.js';
@@ -0,0 +1 @@
1
+ export * from './QuotaError.js';
@@ -0,0 +1 @@
1
+ export * from './QuotaCardsGrid.js';
@@ -0,0 +1 @@
1
+ export * from './QuotaCardsGrid.js';
@@ -0,0 +1,16 @@
1
+ @charset "UTF-8";
2
+ .wrapper{
3
+ width:100%;
4
+ height:auto;
5
+ max-height:382px;
6
+ }
7
+ .wrapper[data-accordion=true]{
8
+ max-height:400px;
9
+ }
10
+ .wrapper{
11
+ }
12
+ .wrapper[data-mobile=true]{
13
+ flex:1 1 auto;
14
+ min-height:0;
15
+ max-height:none;
16
+ }
@@ -0,0 +1,5 @@
1
+ export * from './components/index.js';
2
+ export * from './constants.js';
3
+ export * from './types.js';
4
+ export * from './utils/index.js';
5
+ export * from './locale/index.js';
@@ -0,0 +1,5 @@
1
+ export * from './components/index.js';
2
+ export * from './constants.js';
3
+ export * from './types.js';
4
+ export * from './utils/index.js';
5
+ export * from './locale/index.js';
@@ -0,0 +1,91 @@
1
+ declare const QUOTA_MESSAGES: {
2
+ readonly 'en-GB': {
3
+ readonly quotas: "Quotas";
4
+ readonly widgetTitle: {
5
+ readonly withoutProject: "Project quotas";
6
+ readonly quotes: "Project quotas «{{project}}»";
7
+ readonly noQuotes: "Project quotas {{project}}";
8
+ };
9
+ readonly widgetSubtitle: "Current quota balance";
10
+ readonly increaseQuota: "Increase quota";
11
+ readonly cardAvailable: "Available";
12
+ readonly cardRemaining: "Remaining";
13
+ readonly tooltipAvailable: "Available";
14
+ readonly tooltipUsed: "Used";
15
+ readonly tooltipRemaining: "Remaining";
16
+ readonly tooltipExhaustedHint: {
17
+ readonly first: "Quota exhausted.";
18
+ readonly second: "To increase the quota, contact the quota or organization administrator.";
19
+ };
20
+ readonly errorText: "Failed to load data";
21
+ readonly errorButton: "Refresh";
22
+ };
23
+ readonly 'ru-RU': {
24
+ readonly quotas: "Квоты";
25
+ readonly widgetTitle: {
26
+ readonly withoutProject: "Квоты проекта";
27
+ readonly quotes: "Квоты проекта «{{project}}»";
28
+ readonly noQuotes: "Квоты проекта {{project}}";
29
+ };
30
+ readonly widgetSubtitle: "Остаток по квотам на текущий момент";
31
+ readonly increaseQuota: "Увеличить квоту";
32
+ readonly cardAvailable: "Доступно";
33
+ readonly cardRemaining: "Остаток";
34
+ readonly tooltipAvailable: "Доступно";
35
+ readonly tooltipUsed: "Использовано";
36
+ readonly tooltipRemaining: "Остаток";
37
+ readonly tooltipExhaustedHint: {
38
+ readonly first: "Квота исчерпана.";
39
+ readonly second: "Чтобы увеличить квоту, обратитесь к администратору квот или организации.";
40
+ };
41
+ readonly errorText: "Не удалось загрузить данные";
42
+ readonly errorButton: "Обновить";
43
+ };
44
+ };
45
+ export type QuotaMessages = (typeof QUOTA_MESSAGES)['en-GB'];
46
+ /** locale компонента Quota: `quotaLocale.useTranslations()` в коде, `quotaLocale.extend(...)` в сервисе. */
47
+ export declare const quotaLocale: import("@cloud-ru/ds-locale").DefinedLocale<{
48
+ readonly 'en-GB': {
49
+ readonly quotas: "Quotas";
50
+ readonly widgetTitle: {
51
+ readonly withoutProject: "Project quotas";
52
+ readonly quotes: "Project quotas «{{project}}»";
53
+ readonly noQuotes: "Project quotas {{project}}";
54
+ };
55
+ readonly widgetSubtitle: "Current quota balance";
56
+ readonly increaseQuota: "Increase quota";
57
+ readonly cardAvailable: "Available";
58
+ readonly cardRemaining: "Remaining";
59
+ readonly tooltipAvailable: "Available";
60
+ readonly tooltipUsed: "Used";
61
+ readonly tooltipRemaining: "Remaining";
62
+ readonly tooltipExhaustedHint: {
63
+ readonly first: "Quota exhausted.";
64
+ readonly second: "To increase the quota, contact the quota or organization administrator.";
65
+ };
66
+ readonly errorText: "Failed to load data";
67
+ readonly errorButton: "Refresh";
68
+ };
69
+ readonly 'ru-RU': {
70
+ readonly quotas: "Квоты";
71
+ readonly widgetTitle: {
72
+ readonly withoutProject: "Квоты проекта";
73
+ readonly quotes: "Квоты проекта «{{project}}»";
74
+ readonly noQuotes: "Квоты проекта {{project}}";
75
+ };
76
+ readonly widgetSubtitle: "Остаток по квотам на текущий момент";
77
+ readonly increaseQuota: "Увеличить квоту";
78
+ readonly cardAvailable: "Доступно";
79
+ readonly cardRemaining: "Остаток";
80
+ readonly tooltipAvailable: "Доступно";
81
+ readonly tooltipUsed: "Использовано";
82
+ readonly tooltipRemaining: "Остаток";
83
+ readonly tooltipExhaustedHint: {
84
+ readonly first: "Квота исчерпана.";
85
+ readonly second: "Чтобы увеличить квоту, обратитесь к администратору квот или организации.";
86
+ };
87
+ readonly errorText: "Не удалось загрузить данные";
88
+ readonly errorButton: "Обновить";
89
+ };
90
+ }, "@cloud-ru/ds-uikit-product-quota">;
91
+ export {};