@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.
- package/CHANGELOG.md +8 -0
- package/LICENSE +201 -0
- package/README.md +458 -0
- package/dist/cjs/components/QuotaWidget/QuotaIncreaseButton.d.ts +4 -0
- package/dist/cjs/components/QuotaWidget/QuotaIncreaseButton.js +15 -0
- package/dist/cjs/components/QuotaWidget/QuotaMobileHeader.d.ts +4 -0
- package/dist/cjs/components/QuotaWidget/QuotaMobileHeader.js +15 -0
- package/dist/cjs/components/QuotaWidget/QuotaWidget.d.ts +12 -0
- package/dist/cjs/components/QuotaWidget/QuotaWidget.js +44 -0
- package/dist/cjs/components/QuotaWidget/QuotaWidgetContent.d.ts +27 -0
- package/dist/cjs/components/QuotaWidget/QuotaWidgetContent.js +33 -0
- package/dist/cjs/components/QuotaWidget/components/ProjectHeader/ProjectHeader.d.ts +7 -0
- package/dist/cjs/components/QuotaWidget/components/ProjectHeader/ProjectHeader.js +19 -0
- package/dist/cjs/components/QuotaWidget/components/ProjectHeader/index.d.ts +1 -0
- package/dist/cjs/components/QuotaWidget/components/ProjectHeader/index.js +17 -0
- package/dist/cjs/components/QuotaWidget/components/ProjectHeader/styles.module.css +30 -0
- package/dist/cjs/components/QuotaWidget/index.d.ts +2 -0
- package/dist/cjs/components/QuotaWidget/index.js +18 -0
- package/dist/cjs/components/QuotaWidget/styles.module.css +49 -0
- package/dist/cjs/components/QuotaWidgetCard/QuotaWidgetCard.d.ts +13 -0
- package/dist/cjs/components/QuotaWidgetCard/QuotaWidgetCard.js +53 -0
- package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.d.ts +6 -0
- package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.js +23 -0
- package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/index.d.ts +1 -0
- package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/index.js +17 -0
- package/dist/cjs/components/QuotaWidgetCard/components/QuotaTooltip/styles.module.css +34 -0
- package/dist/cjs/components/QuotaWidgetCard/index.d.ts +1 -0
- package/dist/cjs/components/QuotaWidgetCard/index.js +17 -0
- package/dist/cjs/components/QuotaWidgetCard/styles.module.css +97 -0
- package/dist/cjs/components/QuotaWidgetMini/QuotaWidgetMini.d.ts +7 -0
- package/dist/cjs/components/QuotaWidgetMini/QuotaWidgetMini.js +27 -0
- package/dist/cjs/components/QuotaWidgetMini/index.d.ts +1 -0
- package/dist/cjs/components/QuotaWidgetMini/index.js +17 -0
- package/dist/cjs/components/QuotaWidgetMini/styles.module.css +15 -0
- package/dist/cjs/components/index.d.ts +3 -0
- package/dist/cjs/components/index.js +19 -0
- package/dist/cjs/constants.d.ts +17 -0
- package/dist/cjs/constants.js +20 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/QuotaCardsGrid.d.ts +6 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/QuotaCardsGrid.js +32 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/Grid.d.ts +6 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/Grid.js +30 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.d.ts +6 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.js +16 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.d.ts +1 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.js +17 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/styles.module.css +10 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/index.d.ts +1 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/index.js +17 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/Grid/styles.module.css +9 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.d.ts +5 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.js +12 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/QuotaError/index.d.ts +1 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/components/QuotaError/index.js +17 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/index.d.ts +1 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/index.js +17 -0
- package/dist/cjs/helperComponents/QuotaCardsGrid/styles.module.css +16 -0
- package/dist/cjs/index.d.ts +5 -0
- package/dist/cjs/index.js +21 -0
- package/dist/cjs/locale/index.d.ts +91 -0
- package/dist/cjs/locale/index.js +50 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/style.css +260 -0
- package/dist/cjs/types.d.ts +34 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/utils/checkIsExceeded.d.ts +2 -0
- package/dist/cjs/utils/checkIsExceeded.js +5 -0
- package/dist/cjs/utils/formatNumber.d.ts +1 -0
- package/dist/cjs/utils/formatNumber.js +6 -0
- package/dist/cjs/utils/getPercent.d.ts +2 -0
- package/dist/cjs/utils/getPercent.js +9 -0
- package/dist/cjs/utils/index.d.ts +3 -0
- package/dist/cjs/utils/index.js +19 -0
- package/dist/esm/components/QuotaWidget/QuotaIncreaseButton.d.ts +4 -0
- package/dist/esm/components/QuotaWidget/QuotaIncreaseButton.js +9 -0
- package/dist/esm/components/QuotaWidget/QuotaMobileHeader.d.ts +4 -0
- package/dist/esm/components/QuotaWidget/QuotaMobileHeader.js +9 -0
- package/dist/esm/components/QuotaWidget/QuotaWidget.d.ts +12 -0
- package/dist/esm/components/QuotaWidget/QuotaWidget.js +41 -0
- package/dist/esm/components/QuotaWidget/QuotaWidgetContent.d.ts +27 -0
- package/dist/esm/components/QuotaWidget/QuotaWidgetContent.js +27 -0
- package/dist/esm/components/QuotaWidget/components/ProjectHeader/ProjectHeader.d.ts +7 -0
- package/dist/esm/components/QuotaWidget/components/ProjectHeader/ProjectHeader.js +13 -0
- package/dist/esm/components/QuotaWidget/components/ProjectHeader/index.d.ts +1 -0
- package/dist/esm/components/QuotaWidget/components/ProjectHeader/index.js +1 -0
- package/dist/esm/components/QuotaWidget/components/ProjectHeader/styles.module.css +30 -0
- package/dist/esm/components/QuotaWidget/index.d.ts +2 -0
- package/dist/esm/components/QuotaWidget/index.js +2 -0
- package/dist/esm/components/QuotaWidget/styles.module.css +49 -0
- package/dist/esm/components/QuotaWidgetCard/QuotaWidgetCard.d.ts +13 -0
- package/dist/esm/components/QuotaWidgetCard/QuotaWidgetCard.js +47 -0
- package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.d.ts +6 -0
- package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.js +17 -0
- package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/index.d.ts +1 -0
- package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/index.js +1 -0
- package/dist/esm/components/QuotaWidgetCard/components/QuotaTooltip/styles.module.css +34 -0
- package/dist/esm/components/QuotaWidgetCard/index.d.ts +1 -0
- package/dist/esm/components/QuotaWidgetCard/index.js +1 -0
- package/dist/esm/components/QuotaWidgetCard/styles.module.css +97 -0
- package/dist/esm/components/QuotaWidgetMini/QuotaWidgetMini.d.ts +7 -0
- package/dist/esm/components/QuotaWidgetMini/QuotaWidgetMini.js +21 -0
- package/dist/esm/components/QuotaWidgetMini/index.d.ts +1 -0
- package/dist/esm/components/QuotaWidgetMini/index.js +1 -0
- package/dist/esm/components/QuotaWidgetMini/styles.module.css +15 -0
- package/dist/esm/components/index.d.ts +3 -0
- package/dist/esm/components/index.js +3 -0
- package/dist/esm/constants.d.ts +17 -0
- package/dist/esm/constants.js +17 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/QuotaCardsGrid.d.ts +6 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/QuotaCardsGrid.js +26 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/Grid.d.ts +6 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/Grid.js +24 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.d.ts +6 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.js +10 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.d.ts +1 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.js +1 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/styles.module.css +10 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/index.d.ts +1 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/index.js +1 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/Grid/styles.module.css +9 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.d.ts +5 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.js +9 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/QuotaError/index.d.ts +1 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/components/QuotaError/index.js +1 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/index.d.ts +1 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/index.js +1 -0
- package/dist/esm/helperComponents/QuotaCardsGrid/styles.module.css +16 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/locale/index.d.ts +91 -0
- package/dist/esm/locale/index.js +47 -0
- package/dist/esm/style.css +260 -0
- package/dist/esm/types.d.ts +34 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/utils/checkIsExceeded.d.ts +2 -0
- package/dist/esm/utils/checkIsExceeded.js +1 -0
- package/dist/esm/utils/formatNumber.d.ts +1 -0
- package/dist/esm/utils/formatNumber.js +3 -0
- package/dist/esm/utils/getPercent.d.ts +2 -0
- package/dist/esm/utils/getPercent.js +6 -0
- package/dist/esm/utils/index.d.ts +3 -0
- package/dist/esm/utils/index.js +3 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/package.json +63 -0
- package/src/components/QuotaWidget/QuotaIncreaseButton.tsx +21 -0
- package/src/components/QuotaWidget/QuotaMobileHeader.tsx +18 -0
- package/src/components/QuotaWidget/QuotaWidget.tsx +109 -0
- package/src/components/QuotaWidget/QuotaWidgetContent.tsx +91 -0
- package/src/components/QuotaWidget/components/ProjectHeader/ProjectHeader.tsx +59 -0
- package/src/components/QuotaWidget/components/ProjectHeader/index.ts +1 -0
- package/src/components/QuotaWidget/components/ProjectHeader/styles.module.scss +29 -0
- package/src/components/QuotaWidget/index.ts +2 -0
- package/src/components/QuotaWidget/styles.module.scss +52 -0
- package/src/components/QuotaWidgetCard/QuotaWidgetCard.tsx +127 -0
- package/src/components/QuotaWidgetCard/components/QuotaTooltip/QuotaTooltip.tsx +48 -0
- package/src/components/QuotaWidgetCard/components/QuotaTooltip/index.ts +1 -0
- package/src/components/QuotaWidgetCard/components/QuotaTooltip/styles.module.scss +30 -0
- package/src/components/QuotaWidgetCard/index.ts +1 -0
- package/src/components/QuotaWidgetCard/styles.module.scss +97 -0
- package/src/components/QuotaWidgetMini/QuotaWidgetMini.tsx +93 -0
- package/src/components/QuotaWidgetMini/index.ts +1 -0
- package/src/components/QuotaWidgetMini/styles.module.scss +18 -0
- package/src/components/index.ts +3 -0
- package/src/constants.ts +17 -0
- package/src/helperComponents/QuotaCardsGrid/QuotaCardsGrid.tsx +54 -0
- package/src/helperComponents/QuotaCardsGrid/components/Grid/Grid.tsx +47 -0
- package/src/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/QuotaCardsSkeleton.tsx +24 -0
- package/src/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/index.ts +1 -0
- package/src/helperComponents/QuotaCardsGrid/components/Grid/components/QuotaWidgetCardsSkeleton/styles.module.scss +15 -0
- package/src/helperComponents/QuotaCardsGrid/components/Grid/index.ts +1 -0
- package/src/helperComponents/QuotaCardsGrid/components/Grid/styles.module.scss +12 -0
- package/src/helperComponents/QuotaCardsGrid/components/QuotaError/QuotaError.tsx +31 -0
- package/src/helperComponents/QuotaCardsGrid/components/QuotaError/index.ts +1 -0
- package/src/helperComponents/QuotaCardsGrid/index.ts +1 -0
- package/src/helperComponents/QuotaCardsGrid/styles.module.scss +16 -0
- package/src/index.ts +5 -0
- package/src/locale/index.ts +51 -0
- package/src/types.ts +35 -0
- package/src/utils/checkIsExceeded.ts +3 -0
- package/src/utils/formatNumber.ts +3 -0
- package/src/utils/getPercent.ts +9 -0
- package/src/utils/index.ts +3 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineLocale, defineMessages } from '@cloud-ru/ds-locale';
|
|
2
|
+
const QUOTA_MESSAGES = defineMessages({
|
|
3
|
+
'en-GB': {
|
|
4
|
+
quotas: 'Quotas',
|
|
5
|
+
widgetTitle: {
|
|
6
|
+
withoutProject: 'Project quotas',
|
|
7
|
+
quotes: 'Project quotas «{{project}}»',
|
|
8
|
+
noQuotes: 'Project quotas {{project}}',
|
|
9
|
+
},
|
|
10
|
+
widgetSubtitle: 'Current quota balance',
|
|
11
|
+
increaseQuota: 'Increase quota',
|
|
12
|
+
cardAvailable: 'Available',
|
|
13
|
+
cardRemaining: 'Remaining',
|
|
14
|
+
tooltipAvailable: 'Available',
|
|
15
|
+
tooltipUsed: 'Used',
|
|
16
|
+
tooltipRemaining: 'Remaining',
|
|
17
|
+
tooltipExhaustedHint: {
|
|
18
|
+
first: 'Quota exhausted.',
|
|
19
|
+
second: 'To increase the quota, contact the quota or organization administrator.',
|
|
20
|
+
},
|
|
21
|
+
errorText: 'Failed to load data',
|
|
22
|
+
errorButton: 'Refresh',
|
|
23
|
+
},
|
|
24
|
+
'ru-RU': {
|
|
25
|
+
quotas: 'Квоты',
|
|
26
|
+
widgetTitle: {
|
|
27
|
+
withoutProject: 'Квоты проекта',
|
|
28
|
+
quotes: 'Квоты проекта «{{project}}»',
|
|
29
|
+
noQuotes: 'Квоты проекта {{project}}',
|
|
30
|
+
},
|
|
31
|
+
widgetSubtitle: 'Остаток по квотам на текущий момент',
|
|
32
|
+
increaseQuota: 'Увеличить квоту',
|
|
33
|
+
cardAvailable: 'Доступно',
|
|
34
|
+
cardRemaining: 'Остаток',
|
|
35
|
+
tooltipAvailable: 'Доступно',
|
|
36
|
+
tooltipUsed: 'Использовано',
|
|
37
|
+
tooltipRemaining: 'Остаток',
|
|
38
|
+
tooltipExhaustedHint: {
|
|
39
|
+
first: 'Квота исчерпана.',
|
|
40
|
+
second: 'Чтобы увеличить квоту, обратитесь к администратору квот или организации.',
|
|
41
|
+
},
|
|
42
|
+
errorText: 'Не удалось загрузить данные',
|
|
43
|
+
errorButton: 'Обновить',
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
/** locale компонента Quota: `quotaLocale.useTranslations()` в коде, `quotaLocale.extend(...)` в сервисе. */
|
|
47
|
+
export const quotaLocale = defineLocale('@cloud-ru/ds-uikit-product-quota', QUOTA_MESSAGES);
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
.header{
|
|
2
|
+
display:flex;
|
|
3
|
+
gap:var(--sn-primitive-dimension-8, 8px);
|
|
4
|
+
align-items:center;
|
|
5
|
+
width:100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.projectWrapper{
|
|
9
|
+
display:flex;
|
|
10
|
+
flex:1 0 0;
|
|
11
|
+
flex-direction:column;
|
|
12
|
+
align-items:flex-start;
|
|
13
|
+
min-width:0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.titleLink{
|
|
17
|
+
gap:var(--sn-primitive-dimension-8, 8px);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.subtitle{
|
|
21
|
+
font-family:var(--sn-regular-body-s-fontFamily, var(--sn-brand-font-fontFamily-regular-body, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
22
|
+
font-weight:var(--sn-regular-body-s-fontWeight, var(--sn-theme-typography-fontWeight-regular-body-s, var(--sn-brand-font-fontWeight-light-regular-body-s, var(--sn-primitive-font-fontWeightValue-400, 400))));
|
|
23
|
+
line-height:var(--sn-regular-body-s-lineHeight, var(--sn-density-typography-roleBody-lineHeightS, var(--sn-primitive-font-lineHeight-by14, 20px)));
|
|
24
|
+
font-size:var(--sn-regular-body-s-fontSize, var(--sn-density-typography-roleBody-fontSizeS, var(--sn-primitive-font-fontSize-14, 14px)));
|
|
25
|
+
letter-spacing:var(--sn-regular-body-s-letterSpacing, var(--sn-primitive-font-letterSpacing-m, 0.1px));
|
|
26
|
+
paragraph-spacing:var(--sn-regular-body-s-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize12, 6px));
|
|
27
|
+
width:100%;
|
|
28
|
+
margin:0;
|
|
29
|
+
color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
|
|
30
|
+
}
|
|
31
|
+
@charset "UTF-8";
|
|
32
|
+
.content{
|
|
33
|
+
display:flex;
|
|
34
|
+
flex-direction:column;
|
|
35
|
+
gap:var(--sn-primitive-dimension-16, 16px);
|
|
36
|
+
align-items:flex-start;
|
|
37
|
+
width:620px;
|
|
38
|
+
min-width:620px;
|
|
39
|
+
padding:var(--sn-primitive-dimension-12, 12px) var(--sn-primitive-dimension-16, 16px);
|
|
40
|
+
}
|
|
41
|
+
.content[data-mobile=true]{
|
|
42
|
+
width:100%;
|
|
43
|
+
min-width:0;
|
|
44
|
+
height:100%;
|
|
45
|
+
padding:0;
|
|
46
|
+
}
|
|
47
|
+
.increaseButton{
|
|
48
|
+
width:100%;
|
|
49
|
+
}
|
|
50
|
+
.mobileHeader{
|
|
51
|
+
display:flex;
|
|
52
|
+
flex-direction:column;
|
|
53
|
+
gap:var(--sn-primitive-dimension-2, 2px);
|
|
54
|
+
align-items:flex-start;
|
|
55
|
+
width:100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.mobileTitle{
|
|
59
|
+
font-family:var(--sn-regular-title-l-fontFamily, var(--sn-brand-font-fontFamily-regular-title, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
60
|
+
font-weight:var(--sn-regular-title-l-fontWeight, var(--sn-theme-typography-fontWeight-regular-title-l, var(--sn-brand-font-fontWeight-light-regular-title-l, var(--sn-primitive-font-fontWeightValue-600, 600))));
|
|
61
|
+
line-height:var(--sn-regular-title-l-lineHeight, var(--sn-density-typography-roleTitle-lineHeightL, var(--sn-primitive-font-lineHeight-by20, 28px)));
|
|
62
|
+
font-size:var(--sn-regular-title-l-fontSize, var(--sn-density-typography-roleTitle-fontSizeL, var(--sn-primitive-font-fontSize-20, 20px)));
|
|
63
|
+
letter-spacing:var(--sn-regular-title-l-letterSpacing, var(--sn-primitive-font-letterSpacing-l, 0.15px));
|
|
64
|
+
paragraph-spacing:var(--sn-regular-title-l-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize20, 10px));
|
|
65
|
+
margin:0;
|
|
66
|
+
color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.mobileSubtitle{
|
|
70
|
+
font-family:var(--sn-regular-body-m-fontFamily, var(--sn-brand-font-fontFamily-regular-body, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
71
|
+
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))));
|
|
72
|
+
line-height:var(--sn-regular-body-m-lineHeight, var(--sn-density-typography-roleBody-lineHeightM, var(--sn-primitive-font-lineHeight-by16, 24px)));
|
|
73
|
+
font-size:var(--sn-regular-body-m-fontSize, var(--sn-density-typography-roleBody-fontSizeM, var(--sn-primitive-font-fontSize-16, 16px)));
|
|
74
|
+
letter-spacing:var(--sn-regular-body-m-letterSpacing, var(--sn-primitive-font-letterSpacing-m, 0.1px));
|
|
75
|
+
paragraph-spacing:var(--sn-regular-body-m-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
|
|
76
|
+
width:100%;
|
|
77
|
+
margin:0;
|
|
78
|
+
color:var(--sn-theme-color-available-version-textSecondary, var(--sn-brand-color-text-version-secondary, rgba(65, 66, 78, 0.8)));
|
|
79
|
+
}
|
|
80
|
+
.content{
|
|
81
|
+
display:flex;
|
|
82
|
+
flex-direction:column;
|
|
83
|
+
row-gap:var(--sn-primitive-dimension-4, 4px);
|
|
84
|
+
align-items:stretch;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.lists{
|
|
88
|
+
display:flex;
|
|
89
|
+
flex-direction:column;
|
|
90
|
+
row-gap:var(--sn-primitive-dimension-4, 4px);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.row{
|
|
94
|
+
display:flex;
|
|
95
|
+
-moz-column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
96
|
+
column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
97
|
+
align-items:center;
|
|
98
|
+
justify-content:space-between;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.rowLabel,
|
|
102
|
+
.rowValue{
|
|
103
|
+
font-family:var(--sn-regular-body-m-fontFamily, var(--sn-brand-font-fontFamily-regular-body, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
104
|
+
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))));
|
|
105
|
+
line-height:var(--sn-regular-body-m-lineHeight, var(--sn-density-typography-roleBody-lineHeightM, var(--sn-primitive-font-lineHeight-by16, 24px)));
|
|
106
|
+
font-size:var(--sn-regular-body-m-fontSize, var(--sn-density-typography-roleBody-fontSizeM, var(--sn-primitive-font-fontSize-16, 16px)));
|
|
107
|
+
letter-spacing:var(--sn-regular-body-m-letterSpacing, var(--sn-primitive-font-letterSpacing-m, 0.1px));
|
|
108
|
+
paragraph-spacing:var(--sn-regular-body-m-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.rowValue{
|
|
112
|
+
text-align:right;
|
|
113
|
+
}
|
|
114
|
+
@charset "UTF-8";
|
|
115
|
+
.tooltip{
|
|
116
|
+
display:flex;
|
|
117
|
+
width:100%;
|
|
118
|
+
max-width:100%;
|
|
119
|
+
}
|
|
120
|
+
.card{
|
|
121
|
+
display:flex;
|
|
122
|
+
flex:1 1 auto;
|
|
123
|
+
flex-direction:column;
|
|
124
|
+
row-gap:var(--sn-primitive-dimension-4, 4px);
|
|
125
|
+
box-sizing:border-box;
|
|
126
|
+
min-width:min(256px, 100%);
|
|
127
|
+
max-width:100%;
|
|
128
|
+
padding:var(--sn-primitive-dimension-8, 8px);
|
|
129
|
+
border-radius:var(--sn-card-anatomy-radius-s-container-borderRadius, var(--sn-brand-anatomy-radius-card-s, var(--sn-primitive-dimension-2, 2px)));
|
|
130
|
+
background-color:var(--sn-theme-color-neutral-decorTransparent, var(--sn-brand-color-neutral-transparent-forLightMode, rgba(124, 131, 182, 0.0784313725)));
|
|
131
|
+
backdrop-filter:blur(calc(var(--sn-acrylic-blurBackground1Level, 0) / 2));
|
|
132
|
+
}
|
|
133
|
+
.card[data-exhausted=true]{
|
|
134
|
+
background-color:var(--sn-theme-color-red-background, var(--sn-primitive-color-red-90, #fee8e5));
|
|
135
|
+
}
|
|
136
|
+
.header{
|
|
137
|
+
display:flex;
|
|
138
|
+
gap:var(--sn-primitive-dimension-8, 8px);
|
|
139
|
+
align-items:flex-end;
|
|
140
|
+
justify-content:space-between;
|
|
141
|
+
width:100%;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.title{
|
|
145
|
+
flex:1 1 0;
|
|
146
|
+
min-width:0;
|
|
147
|
+
color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.percent{
|
|
151
|
+
font-family:var(--sn-thin-label-m-fontFamily, var(--sn-brand-font-fontFamily-thin-label, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
152
|
+
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))));
|
|
153
|
+
line-height:var(--sn-thin-label-m-lineHeight, var(--sn-density-typography-roleLabel-lineHeightM, var(--sn-primitive-font-lineHeight-by16, 24px)));
|
|
154
|
+
font-size:var(--sn-thin-label-m-fontSize, var(--sn-density-typography-roleLabel-fontSizeM, var(--sn-primitive-font-fontSize-16, 16px)));
|
|
155
|
+
letter-spacing:var(--sn-thin-label-m-letterSpacing, var(--sn-primitive-font-letterSpacing-s, 0px));
|
|
156
|
+
paragraph-spacing:var(--sn-thin-label-m-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize12, 6px));
|
|
157
|
+
flex-shrink:0;
|
|
158
|
+
color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.progressBar{
|
|
162
|
+
width:100%;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.info{
|
|
166
|
+
display:flex;
|
|
167
|
+
flex-direction:column;
|
|
168
|
+
row-gap:var(--sn-primitive-dimension-2, 2px);
|
|
169
|
+
width:100%;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.row{
|
|
173
|
+
display:flex;
|
|
174
|
+
-moz-column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
175
|
+
column-gap:var(--sn-primitive-dimension-8, 8px);
|
|
176
|
+
align-items:center;
|
|
177
|
+
justify-content:space-between;
|
|
178
|
+
width:100%;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.label{
|
|
182
|
+
font-family:var(--sn-thin-label-s-fontFamily, var(--sn-brand-font-fontFamily-thin-label, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
183
|
+
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))));
|
|
184
|
+
line-height:var(--sn-thin-label-s-lineHeight, var(--sn-density-typography-roleLabel-lineHeightS, var(--sn-primitive-font-lineHeight-by14, 20px)));
|
|
185
|
+
font-size:var(--sn-thin-label-s-fontSize, var(--sn-density-typography-roleLabel-fontSizeS, var(--sn-primitive-font-fontSize-14, 14px)));
|
|
186
|
+
letter-spacing:var(--sn-thin-label-s-letterSpacing, var(--sn-primitive-font-letterSpacing-s, 0px));
|
|
187
|
+
paragraph-spacing:var(--sn-thin-label-s-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize11, 5px));
|
|
188
|
+
color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.value{
|
|
192
|
+
font-family:var(--sn-thin-label-l-fontFamily, var(--sn-brand-font-fontFamily-thin-label, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
193
|
+
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))));
|
|
194
|
+
line-height:var(--sn-thin-label-l-lineHeight, var(--sn-density-typography-roleLabel-lineHeightL, var(--sn-primitive-font-lineHeight-by20, 28px)));
|
|
195
|
+
font-size:var(--sn-thin-label-l-fontSize, var(--sn-density-typography-roleLabel-fontSizeL, var(--sn-primitive-font-fontSize-20, 20px)));
|
|
196
|
+
letter-spacing:var(--sn-thin-label-l-letterSpacing, var(--sn-primitive-font-letterSpacing-s, 0px));
|
|
197
|
+
paragraph-spacing:var(--sn-thin-label-l-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
|
|
198
|
+
color:var(--sn-theme-color-available-version-textMain, var(--sn-brand-color-text-version-main, #41424e));
|
|
199
|
+
white-space:nowrap;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.unit{
|
|
203
|
+
font-family:var(--sn-thin-label-l-fontFamily, var(--sn-brand-font-fontFamily-thin-label, var(--sn-primitive-fontFamily-brandA-sans, SB Sans Interface)));
|
|
204
|
+
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))));
|
|
205
|
+
line-height:var(--sn-thin-label-l-lineHeight, var(--sn-density-typography-roleLabel-lineHeightL, var(--sn-primitive-font-lineHeight-by20, 28px)));
|
|
206
|
+
font-size:var(--sn-thin-label-l-fontSize, var(--sn-density-typography-roleLabel-fontSizeL, var(--sn-primitive-font-fontSize-20, 20px)));
|
|
207
|
+
letter-spacing:var(--sn-thin-label-l-letterSpacing, var(--sn-primitive-font-letterSpacing-s, 0px));
|
|
208
|
+
paragraph-spacing:var(--sn-thin-label-l-paragraphSpacing, var(--sn-primitive-font-paragraphSpacing-byFontSize14, 7px));
|
|
209
|
+
color:var(--sn-theme-color-available-version-textTertiary, var(--sn-brand-color-text-version-tertiary, rgba(65, 66, 78, 0.5490196078)));
|
|
210
|
+
}
|
|
211
|
+
.collapse{
|
|
212
|
+
width:304px;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.body{
|
|
216
|
+
display:flex;
|
|
217
|
+
flex-direction:column;
|
|
218
|
+
gap:var(--sn-primitive-dimension-16, 16px);
|
|
219
|
+
align-items:flex-start;
|
|
220
|
+
width:100%;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.button{
|
|
224
|
+
width:100%;
|
|
225
|
+
}
|
|
226
|
+
.card{
|
|
227
|
+
display:flex;
|
|
228
|
+
flex:1;
|
|
229
|
+
flex-direction:column;
|
|
230
|
+
row-gap:var(--sn-primitive-dimension-4, 4px);
|
|
231
|
+
min-width:0;
|
|
232
|
+
padding:var(--sn-primitive-dimension-8, 8px);
|
|
233
|
+
border-radius:var(--sn-card-anatomy-radius-s-container-borderRadius, var(--sn-brand-anatomy-radius-card-s, var(--sn-primitive-dimension-2, 2px)));
|
|
234
|
+
background-color:var(--sn-theme-color-neutral-decorTransparent, var(--sn-brand-color-neutral-transparent-forLightMode, rgba(124, 131, 182, 0.0784313725)));
|
|
235
|
+
}
|
|
236
|
+
.grid{
|
|
237
|
+
display:grid;
|
|
238
|
+
grid-template-columns:repeat(2, minmax(0, 1fr));
|
|
239
|
+
gap:var(--sn-primitive-dimension-4, 4px) var(--sn-primitive-dimension-4, 4px);
|
|
240
|
+
width:100%;
|
|
241
|
+
}
|
|
242
|
+
.grid[data-single=true]{
|
|
243
|
+
grid-template-columns:minmax(0, 1fr);
|
|
244
|
+
}
|
|
245
|
+
@charset "UTF-8";
|
|
246
|
+
.wrapper{
|
|
247
|
+
width:100%;
|
|
248
|
+
height:auto;
|
|
249
|
+
max-height:382px;
|
|
250
|
+
}
|
|
251
|
+
.wrapper[data-accordion=true]{
|
|
252
|
+
max-height:400px;
|
|
253
|
+
}
|
|
254
|
+
.wrapper{
|
|
255
|
+
}
|
|
256
|
+
.wrapper[data-mobile=true]{
|
|
257
|
+
flex:1 1 auto;
|
|
258
|
+
min-height:0;
|
|
259
|
+
max-height:none;
|
|
260
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type QuotaItem = {
|
|
2
|
+
/** Название квоты */
|
|
3
|
+
name: string;
|
|
4
|
+
/** Лимит квоты */
|
|
5
|
+
limit: number;
|
|
6
|
+
/** Потребление квоты */
|
|
7
|
+
usage: number;
|
|
8
|
+
/** Остаток квоты */
|
|
9
|
+
remains: number;
|
|
10
|
+
/** Единица измерения квоты */
|
|
11
|
+
unitDisplayName: string;
|
|
12
|
+
};
|
|
13
|
+
export type QuotaWidgetPropsBase = {
|
|
14
|
+
/** Список квот для отображения */
|
|
15
|
+
quotas: QuotaItem[];
|
|
16
|
+
/** Флаг отключения сортировки квот */
|
|
17
|
+
disableSorting?: boolean;
|
|
18
|
+
/** Флаг загрузки квот */
|
|
19
|
+
loading: boolean;
|
|
20
|
+
/** Флаг ошибки при загрузке квот */
|
|
21
|
+
error: boolean;
|
|
22
|
+
/** Колбек на обновление списка квот при ошибке */
|
|
23
|
+
onRefresh: () => void;
|
|
24
|
+
/** Название проекта, по которому отображаются квоты */
|
|
25
|
+
projectName: string;
|
|
26
|
+
/** Флаг наличия прав на редактирование квот */
|
|
27
|
+
canEditQuota: boolean;
|
|
28
|
+
/** Флаг скрытия кнопки увеличения квоты */
|
|
29
|
+
hideIncreaseQuotaButton?: boolean;
|
|
30
|
+
/** Колбек нажатия на кнопку увеличения квот */
|
|
31
|
+
onIncreaseQuotaClick?: () => void;
|
|
32
|
+
/** Колбек открытия виджета квот */
|
|
33
|
+
onWidgetOpen?: () => void;
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const checkIsExceeded = (quota) => quota.remains <= 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatNumber(value: number): string;
|