@salutejs/plasma-web 1.596.0-canary.2280.18389973911.0 → 1.596.0-canary.2280.18409919038.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.
@@ -0,0 +1,128 @@
1
+ import { css, progressBarCircularTokens } from '@salutejs/plasma-new-hope/styled-components';
2
+
3
+ export const config = {
4
+ defaults: {
5
+ view: 'default',
6
+ size: 'm',
7
+ },
8
+ variations: {
9
+ view: {
10
+ default: css`
11
+ ${progressBarCircularTokens.backgroundStroke}: var(--surface-transparent-tertiary);
12
+ ${progressBarCircularTokens.progressStroke}: var(--surface-solid-default);
13
+ ${progressBarCircularTokens.contentColor}: var(--text-primary);
14
+ `,
15
+ secondary: css`
16
+ ${progressBarCircularTokens.backgroundStroke}: var(--surface-transparent-tertiary);
17
+ ${progressBarCircularTokens.progressStroke}: var(--surface-transparent-secondary);
18
+ ${progressBarCircularTokens.contentColor}: var(--text-primary);
19
+ `,
20
+ accent: css`
21
+ ${progressBarCircularTokens.backgroundStroke}: var(--surface-transparent-tertiary);
22
+ ${progressBarCircularTokens.progressStroke}: var(--surface-accent);
23
+ ${progressBarCircularTokens.contentColor}: var(--text-primary);
24
+ `,
25
+ positive: css`
26
+ ${progressBarCircularTokens.backgroundStroke}: var(--surface-transparent-tertiary);
27
+ ${progressBarCircularTokens.progressStroke}: var(--surface-positive);
28
+ ${progressBarCircularTokens.contentColor}: var(--text-primary);
29
+ `,
30
+ warning: css`
31
+ ${progressBarCircularTokens.backgroundStroke}: var(--surface-transparent-tertiary);
32
+ ${progressBarCircularTokens.progressStroke}: var(--surface-warning);
33
+ ${progressBarCircularTokens.contentColor}: var(--text-primary);
34
+ `,
35
+ negative: css`
36
+ ${progressBarCircularTokens.backgroundStroke}: var(--surface-transparent-tertiary);
37
+ ${progressBarCircularTokens.progressStroke}: var(--surface-negative);
38
+ ${progressBarCircularTokens.contentColor}: var(--text-primary);
39
+ `,
40
+ },
41
+ size: {
42
+ xxl: css`
43
+ ${progressBarCircularTokens.width}: 8rem;
44
+ ${progressBarCircularTokens.height}: 8rem;
45
+ ${progressBarCircularTokens.backgroundStrokeWidth}: 0.25rem;
46
+ ${progressBarCircularTokens.progressStrokeWidth}: 0.25rem;
47
+ ${progressBarCircularTokens.contentFontFamily}: var(--plasma-typo-h2-font-family);
48
+ ${progressBarCircularTokens.contentFontSize}: var(--plasma-typo-h2-font-size);
49
+ ${progressBarCircularTokens.contentFontStyle}: var(--plasma-typo-h2-font-style);
50
+ ${progressBarCircularTokens.contentFontWeight}: var(--plasma-typo-h2-bold-font-weight);
51
+ ${progressBarCircularTokens.contentLetterSpacing}: var(--plasma-typo-h2-letter-spacing);
52
+ ${progressBarCircularTokens.contentLineHeight}: var(--plasma-typo-h2-line-height);
53
+ `,
54
+ xl: css`
55
+ ${progressBarCircularTokens.width}: 5.5rem;
56
+ ${progressBarCircularTokens.height}: 5.5rem;
57
+ ${progressBarCircularTokens.backgroundStrokeWidth}: 0.25rem;
58
+ ${progressBarCircularTokens.progressStrokeWidth}: 0.25rem;
59
+ ${progressBarCircularTokens.contentFontFamily}: var(--plasma-typo-h5-font-family);
60
+ ${progressBarCircularTokens.contentFontSize}: var(--plasma-typo-h5-font-size);
61
+ ${progressBarCircularTokens.contentFontStyle}: var(--plasma-typo-h5-font-style);
62
+ ${progressBarCircularTokens.contentFontWeight}: var(--plasma-typo-h5-bold-font-weight);
63
+ ${progressBarCircularTokens.contentLetterSpacing}: var(--plasma-typo-h5-letter-spacing);
64
+ ${progressBarCircularTokens.contentLineHeight}: var(--plasma-typo-h5-line-height);
65
+ `,
66
+ l: css`
67
+ ${progressBarCircularTokens.width}: 3.5rem;
68
+ ${progressBarCircularTokens.height}: 3.5rem;
69
+ ${progressBarCircularTokens.backgroundStrokeWidth}: 0.125rem;
70
+ ${progressBarCircularTokens.progressStrokeWidth}: 0.125rem;
71
+ ${progressBarCircularTokens.contentFontFamily}: var(--plasma-typo-body-l-font-family);
72
+ ${progressBarCircularTokens.contentFontSize}: var(--plasma-typo-body-l-font-size);
73
+ ${progressBarCircularTokens.contentFontStyle}: var(--plasma-typo-body-l-font-style);
74
+ ${progressBarCircularTokens.contentFontWeight}: var(--plasma-typo-body-l-body-font-weight);
75
+ ${progressBarCircularTokens.contentLetterSpacing}: var(--plasma-typo-body-l-letter-spacing);
76
+ ${progressBarCircularTokens.contentLineHeight}: var(--plasma-typo-body-l-line-height);
77
+ `,
78
+ m: css`
79
+ ${progressBarCircularTokens.width}: 3rem;
80
+ ${progressBarCircularTokens.height}: 3rem;
81
+ ${progressBarCircularTokens.backgroundStrokeWidth}: 0.125rem;
82
+ ${progressBarCircularTokens.progressStrokeWidth}: 0.125rem;
83
+ ${progressBarCircularTokens.contentFontFamily}: var(--plasma-typo-body-m-font-family);
84
+ ${progressBarCircularTokens.contentFontSize}: var(--plasma-typo-body-m-font-size);
85
+ ${progressBarCircularTokens.contentFontStyle}: var(--plasma-typo-body-m-font-style);
86
+ ${progressBarCircularTokens.contentFontWeight}: var(--plasma-typo-body-m-body-font-weight);
87
+ ${progressBarCircularTokens.contentLetterSpacing}: var(--plasma-typo-body-m-letter-spacing);
88
+ ${progressBarCircularTokens.contentLineHeight}: var(--plasma-typo-body-m-line-height);
89
+ `,
90
+ s: css`
91
+ ${progressBarCircularTokens.width}: 2.25rem;
92
+ ${progressBarCircularTokens.height}: 2.25rem;
93
+ ${progressBarCircularTokens.backgroundStrokeWidth}: 0.125rem;
94
+ ${progressBarCircularTokens.progressStrokeWidth}: 0.125rem;
95
+ ${progressBarCircularTokens.contentFontFamily}: var(--plasma-typo-body-s-font-family);
96
+ ${progressBarCircularTokens.contentFontSize}: var(--plasma-typo-body-s-font-size);
97
+ ${progressBarCircularTokens.contentFontStyle}: var(--plasma-typo-body-s-font-style);
98
+ ${progressBarCircularTokens.contentFontWeight}: var(--plasma-typo-body-s-body-font-weight);
99
+ ${progressBarCircularTokens.contentLetterSpacing}: var(--plasma-typo-body-s-letter-spacing);
100
+ ${progressBarCircularTokens.contentLineHeight}: var(--plasma-typo-body-s-line-height);
101
+ `,
102
+ xs: css`
103
+ ${progressBarCircularTokens.width}: 1.5rem;
104
+ ${progressBarCircularTokens.height}: 1.5rem;
105
+ ${progressBarCircularTokens.backgroundStrokeWidth}: 0.125rem;
106
+ ${progressBarCircularTokens.progressStrokeWidth}: 0.125rem;
107
+ ${progressBarCircularTokens.contentFontFamily}: var(--plasma-typo-body-xs-font-family);
108
+ ${progressBarCircularTokens.contentFontSize}: var(--plasma-typo-body-xs-font-size);
109
+ ${progressBarCircularTokens.contentFontStyle}: var(--plasma-typo-body-xs-font-style);
110
+ ${progressBarCircularTokens.contentFontWeight}: var(--plasma-typo-body-xs-body-font-weight);
111
+ ${progressBarCircularTokens.contentLetterSpacing}: var(--plasma-typo-body-xs-letter-spacing);
112
+ ${progressBarCircularTokens.contentLineHeight}: var(--plasma-typo-body-xs-line-height);
113
+ `,
114
+ xxs: css`
115
+ ${progressBarCircularTokens.width}: 1rem;
116
+ ${progressBarCircularTokens.height}: 1rem;
117
+ ${progressBarCircularTokens.backgroundStrokeWidth}: 0.125rem;
118
+ ${progressBarCircularTokens.progressStrokeWidth}: 0.125rem;
119
+ ${progressBarCircularTokens.contentFontFamily}: var(--plasma-typo-body-xxs-font-family);
120
+ ${progressBarCircularTokens.contentFontSize}: var(--plasma-typo-body-xxs-font-size);
121
+ ${progressBarCircularTokens.contentFontStyle}: var(--plasma-typo-body-xxs-font-style);
122
+ ${progressBarCircularTokens.contentFontWeight}: var(--plasma-typo-body-xxs-body-font-weight);
123
+ ${progressBarCircularTokens.contentLetterSpacing}: var(--plasma-typo-body-xxs-letter-spacing);
124
+ ${progressBarCircularTokens.contentLineHeight}: var(--plasma-typo-body-xxs-line-height);
125
+ `,
126
+ },
127
+ },
128
+ };
@@ -0,0 +1,63 @@
1
+ import type { StoryObj, Meta } from '@storybook/react';
2
+ import { InSpacingDecorator, getConfigVariations, disableProps } from '@salutejs/plasma-sb-utils';
3
+ import React, { ComponentProps } from 'react';
4
+ import { IconCross } from '@salutejs/plasma-icons';
5
+
6
+ import { config } from './ProgressBarCircular.config';
7
+
8
+ import { ProgressBarCircular } from '.';
9
+
10
+ const { views, sizes } = getConfigVariations(config);
11
+
12
+ const meta: Meta<typeof ProgressBarCircular> = {
13
+ title: 'Overlay/ProgressBarCircular',
14
+ component: ProgressBarCircular,
15
+ decorators: [InSpacingDecorator],
16
+ argTypes: {
17
+ view: {
18
+ options: views,
19
+ control: {
20
+ type: 'select',
21
+ },
22
+ },
23
+ size: {
24
+ options: sizes,
25
+ control: {
26
+ type: 'select',
27
+ },
28
+ },
29
+ strokeWidth: {
30
+ control: {
31
+ type: 'range',
32
+ min: 1,
33
+ max: 16,
34
+ },
35
+ },
36
+ ...disableProps(['status']),
37
+ },
38
+ };
39
+
40
+ export default meta;
41
+
42
+ type StoryPropsDefault = ComponentProps<typeof ProgressBarCircular>;
43
+
44
+ const getContent = (value?: number, size?: string) => {
45
+ if (size === 'xxl' || size === 'xl') {
46
+ return `${value}%`;
47
+ }
48
+
49
+ if (size !== 'xxs') {
50
+ return <IconCross size={size === 'l' ? 's' : 'xs'} />;
51
+ }
52
+
53
+ return '';
54
+ };
55
+
56
+ export const Default: StoryObj<StoryPropsDefault> = {
57
+ args: {
58
+ view: 'default',
59
+ size: 's',
60
+ value: 50,
61
+ },
62
+ render: ({ ...args }) => <ProgressBarCircular {...args}>{getContent(args.value, args.size)}</ProgressBarCircular>,
63
+ };
@@ -0,0 +1,7 @@
1
+ import { progressBarCircularConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components';
2
+
3
+ import { config } from './ProgressBarCircular.config';
4
+
5
+ const mergedConfig = mergeConfig(progressBarCircularConfig, config);
6
+
7
+ export const ProgressBarCircular = component(mergedConfig);
@@ -0,0 +1,3 @@
1
+ export { ProgressBarCircular } from './ProgressBarCircular';
2
+
3
+ export type { ProgressProps } from '@salutejs/plasma-new-hope/styled-components';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-web",
3
- "version": "1.596.0-canary.2280.18389973911.0",
3
+ "version": "1.596.0-canary.2280.18409919038.0",
4
4
  "description": "Salute Design System / React UI kit for web applications",
5
5
  "author": "Salute Frontend Team <salute.developers@gmail.com>",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@salutejs/plasma-core": "1.208.0",
23
23
  "@salutejs/plasma-hope": "1.353.0",
24
- "@salutejs/plasma-new-hope": "0.338.0-canary.2280.18389973911.0",
24
+ "@salutejs/plasma-new-hope": "0.338.0-canary.2280.18409919038.0",
25
25
  "@salutejs/plasma-themes": "0.38.0",
26
26
  "@salutejs/plasma-tokens-b2b": "1.54.0",
27
27
  "@salutejs/plasma-tokens-b2c": "0.65.0",
@@ -111,5 +111,5 @@
111
111
  "Fanil Zubairov"
112
112
  ],
113
113
  "sideEffects": false,
114
- "gitHead": "f7f01a56f17242dd60754c7da9c46e8c1b431e60"
114
+ "gitHead": "c513ab146a150c8c0dae83fbb8005adbfb1a044d"
115
115
  }