@alfalab/core-components-circular-progress-bar 5.0.14 → 5.0.15-alfasans
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/Component.js.map +1 -1
- package/consts.js.map +1 -1
- package/cssm/Component.js.map +1 -1
- package/cssm/consts.js.map +1 -1
- package/cssm/use-timer.js.map +1 -1
- package/cssm/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/cssm/utils/is-typography-color.js.map +1 -1
- package/esm/Component.js.map +1 -1
- package/esm/consts.js.map +1 -1
- package/esm/index.css +53 -53
- package/esm/index.module.css.js +1 -1
- package/esm/index.module.css.js.map +1 -1
- package/esm/use-timer.js.map +1 -1
- package/esm/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/esm/utils/is-typography-color.js.map +1 -1
- package/index.css +53 -53
- package/index.module.css.js +1 -1
- package/index.module.css.js.map +1 -1
- package/modern/Component.js +1 -1
- package/modern/Component.js.map +1 -1
- package/modern/consts.js.map +1 -1
- package/modern/index.css +53 -53
- package/modern/index.module.css.js +1 -1
- package/modern/index.module.css.js.map +1 -1
- package/modern/use-timer.js.map +1 -1
- package/modern/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/modern/utils/is-typography-color.js.map +1 -1
- package/moderncssm/Component.js +1 -1
- package/moderncssm/Component.js.map +1 -1
- package/moderncssm/consts.js.map +1 -1
- package/moderncssm/use-timer.js.map +1 -1
- package/moderncssm/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/moderncssm/utils/is-typography-color.js.map +1 -1
- package/package.json +5 -5
- package/use-timer.js.map +1 -1
- package/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/utils/is-typography-color.js.map +1 -1
package/esm/index.css
CHANGED
|
@@ -19,35 +19,35 @@
|
|
|
19
19
|
--circular-progress-bar-positive-color: var(--color-light-status-positive);
|
|
20
20
|
--circular-progress-bar-negative-color: var(--color-light-status-negative);
|
|
21
21
|
}
|
|
22
|
-
.circular-progress-
|
|
22
|
+
.circular-progress-bar__component_12ta7 {
|
|
23
23
|
position: relative;
|
|
24
24
|
display: flex;
|
|
25
25
|
justify-content: center;
|
|
26
26
|
align-items: center;
|
|
27
27
|
border-radius: var(--border-radius-pill);
|
|
28
28
|
}
|
|
29
|
-
.circular-progress-
|
|
29
|
+
.circular-progress-bar__component_12ta7.circular-progress-bar__bg-positive_12ta7 {
|
|
30
30
|
background: var(--circular-progress-bar-positive-color);
|
|
31
31
|
}
|
|
32
|
-
.circular-progress-
|
|
32
|
+
.circular-progress-bar__component_12ta7.circular-progress-bar__bg-negative_12ta7 {
|
|
33
33
|
background: var(--circular-progress-bar-negative-color);
|
|
34
34
|
}
|
|
35
|
-
.circular-progress-
|
|
35
|
+
.circular-progress-bar__svg_12ta7 {
|
|
36
36
|
display: block;
|
|
37
37
|
width: 100%;
|
|
38
38
|
}
|
|
39
|
-
.circular-progress-
|
|
40
|
-
.circular-progress-
|
|
39
|
+
.circular-progress-bar__title_12ta7,
|
|
40
|
+
.circular-progress-bar__subtitle_12ta7 {
|
|
41
41
|
overflow: hidden;
|
|
42
42
|
word-break: break-word;
|
|
43
43
|
white-space: nowrap;
|
|
44
44
|
text-overflow: ellipsis;
|
|
45
45
|
margin: var(--gap-0) var(--gap-6);
|
|
46
46
|
}
|
|
47
|
-
.circular-progress-
|
|
47
|
+
.circular-progress-bar__subtitle_12ta7 {
|
|
48
48
|
max-height: 40px;
|
|
49
49
|
}
|
|
50
|
-
.circular-progress-
|
|
50
|
+
.circular-progress-bar__labelWrapper_12ta7 {
|
|
51
51
|
text-align: center;
|
|
52
52
|
position: absolute;
|
|
53
53
|
top: 50%;
|
|
@@ -55,160 +55,160 @@
|
|
|
55
55
|
width: 100%;
|
|
56
56
|
transform: translate(-50%, -50%);
|
|
57
57
|
}
|
|
58
|
-
.circular-progress-
|
|
58
|
+
.circular-progress-bar__labelWrapper_12ta7.circular-progress-bar__label_12ta7 {
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: center;
|
|
61
61
|
justify-content: center;
|
|
62
62
|
}
|
|
63
|
-
.circular-progress-bar__size-
|
|
63
|
+
.circular-progress-bar__size-144_12ta7 {
|
|
64
64
|
width: 144px;
|
|
65
65
|
height: 144px;
|
|
66
66
|
}
|
|
67
|
-
.circular-progress-bar__size-
|
|
67
|
+
.circular-progress-bar__size-144_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
68
68
|
max-width: 128px;
|
|
69
69
|
}
|
|
70
|
-
.circular-progress-bar__size-
|
|
70
|
+
.circular-progress-bar__size-144_12ta7 .circular-progress-bar__title_12ta7 {
|
|
71
71
|
max-height: 32px;
|
|
72
72
|
}
|
|
73
|
-
.circular-progress-bar__size-
|
|
73
|
+
.circular-progress-bar__size-128_12ta7 {
|
|
74
74
|
width: 128px;
|
|
75
75
|
height: 128px;
|
|
76
76
|
}
|
|
77
|
-
.circular-progress-bar__size-
|
|
77
|
+
.circular-progress-bar__size-128_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
78
78
|
max-width: 108px;
|
|
79
79
|
}
|
|
80
|
-
.circular-progress-bar__size-
|
|
80
|
+
.circular-progress-bar__size-128_12ta7 .circular-progress-bar__title_12ta7 {
|
|
81
81
|
max-height: 32px;
|
|
82
82
|
}
|
|
83
|
-
.circular-progress-bar__size-
|
|
83
|
+
.circular-progress-bar__size-96_12ta7 {
|
|
84
84
|
width: 96px;
|
|
85
85
|
height: 96px;
|
|
86
86
|
}
|
|
87
|
-
.circular-progress-bar__size-
|
|
87
|
+
.circular-progress-bar__size-96_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
88
88
|
max-width: 64px;
|
|
89
89
|
}
|
|
90
|
-
.circular-progress-bar__size-
|
|
90
|
+
.circular-progress-bar__size-96_12ta7 .circular-progress-bar__title_12ta7 {
|
|
91
91
|
max-height: 20px;
|
|
92
92
|
}
|
|
93
|
-
.circular-progress-bar__size-
|
|
93
|
+
.circular-progress-bar__size-80_12ta7 {
|
|
94
94
|
width: 80px;
|
|
95
95
|
height: 80px;
|
|
96
96
|
}
|
|
97
|
-
.circular-progress-bar__size-
|
|
97
|
+
.circular-progress-bar__size-80_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
98
98
|
max-width: 64px;
|
|
99
99
|
}
|
|
100
|
-
.circular-progress-bar__size-
|
|
100
|
+
.circular-progress-bar__size-80_12ta7 .circular-progress-bar__title_12ta7 {
|
|
101
101
|
max-height: 24px;
|
|
102
102
|
}
|
|
103
|
-
.circular-progress-bar__size-
|
|
103
|
+
.circular-progress-bar__size-64_12ta7 {
|
|
104
104
|
width: 64px;
|
|
105
105
|
height: 64px;
|
|
106
106
|
}
|
|
107
|
-
.circular-progress-bar__size-
|
|
107
|
+
.circular-progress-bar__size-64_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
108
108
|
max-width: 48px;
|
|
109
109
|
}
|
|
110
|
-
.circular-progress-bar__size-
|
|
110
|
+
.circular-progress-bar__size-64_12ta7 .circular-progress-bar__title_12ta7 {
|
|
111
111
|
max-height: 16px;
|
|
112
112
|
margin: var(--gap-0);
|
|
113
113
|
}
|
|
114
|
-
.circular-progress-bar__size-
|
|
114
|
+
.circular-progress-bar__size-48_12ta7 {
|
|
115
115
|
width: 48px;
|
|
116
116
|
height: 48px;
|
|
117
117
|
}
|
|
118
|
-
.circular-progress-bar__size-
|
|
118
|
+
.circular-progress-bar__size-48_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
119
119
|
max-width: 40px;
|
|
120
120
|
}
|
|
121
|
-
.circular-progress-bar__size-
|
|
121
|
+
.circular-progress-bar__size-48_12ta7 .circular-progress-bar__title_12ta7 {
|
|
122
122
|
max-height: 16px;
|
|
123
123
|
margin: var(--gap-0);
|
|
124
124
|
}
|
|
125
|
-
.circular-progress-bar__size-
|
|
125
|
+
.circular-progress-bar__size-24_12ta7 {
|
|
126
126
|
width: 24px;
|
|
127
127
|
height: 24px;
|
|
128
128
|
}
|
|
129
|
-
.circular-progress-bar__size-
|
|
129
|
+
.circular-progress-bar__size-24_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
130
130
|
max-width: 24px;
|
|
131
131
|
}
|
|
132
|
-
.circular-progress-bar__size-
|
|
132
|
+
.circular-progress-bar__size-16_12ta7 {
|
|
133
133
|
width: 16px;
|
|
134
134
|
height: 16px;
|
|
135
135
|
}
|
|
136
|
-
.circular-progress-bar__size-
|
|
136
|
+
.circular-progress-bar__size-16_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
137
137
|
max-width: 16px;
|
|
138
138
|
}
|
|
139
|
-
.circular-progress-
|
|
140
|
-
.circular-progress-
|
|
139
|
+
.circular-progress-bar__backgroundCircle_12ta7,
|
|
140
|
+
.circular-progress-bar__progressCircle_12ta7 {
|
|
141
141
|
width: 100%;
|
|
142
142
|
height: 100%;
|
|
143
143
|
fill: transparent;
|
|
144
144
|
}
|
|
145
|
-
.circular-progress-
|
|
145
|
+
.circular-progress-bar__positive_12ta7 {
|
|
146
146
|
stroke: var(--circular-progress-bar-positive-color);
|
|
147
147
|
}
|
|
148
|
-
.circular-progress-
|
|
148
|
+
.circular-progress-bar__negative_12ta7 {
|
|
149
149
|
stroke: var(--circular-progress-bar-negative-color);
|
|
150
150
|
}
|
|
151
|
-
.circular-progress-
|
|
151
|
+
.circular-progress-bar__backgroundCircle_12ta7 {
|
|
152
152
|
stroke: var(--circular-progress-bar-stroke-color);
|
|
153
153
|
}
|
|
154
|
-
.circular-progress-
|
|
154
|
+
.circular-progress-bar__backgroundCircle_12ta7.circular-progress-bar__stroke_12ta7 {
|
|
155
155
|
stroke: transparent;
|
|
156
156
|
}
|
|
157
|
-
.circular-progress-
|
|
157
|
+
.circular-progress-bar__progressCircle_12ta7 {
|
|
158
158
|
stroke-linecap: round;
|
|
159
159
|
}
|
|
160
|
-
.circular-progress-
|
|
160
|
+
.circular-progress-bar__iconWrapper_12ta7 {
|
|
161
161
|
display: flex;
|
|
162
162
|
align-items: center;
|
|
163
163
|
justify-content: center;
|
|
164
164
|
}
|
|
165
|
-
.circular-progress-
|
|
165
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-144_12ta7 {
|
|
166
166
|
max-width: 64px;
|
|
167
167
|
max-height: 64px;
|
|
168
168
|
}
|
|
169
|
-
.circular-progress-
|
|
169
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-128_12ta7 {
|
|
170
170
|
max-width: 64px;
|
|
171
171
|
max-height: 64px;
|
|
172
172
|
}
|
|
173
|
-
.circular-progress-
|
|
173
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-96_12ta7 {
|
|
174
174
|
max-width: 48px;
|
|
175
175
|
max-height: 48px;
|
|
176
176
|
}
|
|
177
|
-
.circular-progress-
|
|
177
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-80_12ta7 {
|
|
178
178
|
max-width: 48px;
|
|
179
179
|
max-height: 48px;
|
|
180
180
|
}
|
|
181
|
-
.circular-progress-
|
|
181
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-64_12ta7 {
|
|
182
182
|
max-width: 36px;
|
|
183
183
|
max-height: 36px;
|
|
184
184
|
}
|
|
185
|
-
.circular-progress-
|
|
185
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-48_12ta7 {
|
|
186
186
|
max-width: 24px;
|
|
187
187
|
max-height: 24px;
|
|
188
188
|
}
|
|
189
|
-
.circular-progress-
|
|
189
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-24_12ta7 {
|
|
190
190
|
max-width: 16px;
|
|
191
191
|
max-height: 16px;
|
|
192
192
|
}
|
|
193
|
-
.circular-progress-
|
|
193
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-tertiary_12ta7 {
|
|
194
194
|
color: var(--color-light-neutral-500);
|
|
195
195
|
}
|
|
196
|
-
.circular-progress-
|
|
196
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-positive_12ta7 {
|
|
197
197
|
color: var(--color-light-status-positive);
|
|
198
198
|
}
|
|
199
|
-
.circular-progress-
|
|
199
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-negative_12ta7 {
|
|
200
200
|
color: var(--color-light-status-negative);
|
|
201
201
|
}
|
|
202
|
-
.circular-progress-
|
|
202
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-primary-inverted_12ta7 {
|
|
203
203
|
color: var(--color-light-neutral-translucent-1300-inverted);
|
|
204
204
|
}
|
|
205
|
-
.circular-progress-
|
|
205
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-primary_12ta7 {
|
|
206
206
|
color: var(--color-light-neutral-translucent-1300);
|
|
207
207
|
}
|
|
208
|
-
.circular-progress-
|
|
208
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-secondary_12ta7 {
|
|
209
209
|
color: var(--color-light-neutral-700);
|
|
210
210
|
}
|
|
211
|
-
.circular-progress-
|
|
211
|
+
.circular-progress-bar__icon_12ta7 {
|
|
212
212
|
width: 100%;
|
|
213
213
|
height: 100%;
|
|
214
214
|
}
|
package/esm/index.module.css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"component":"circular-progress-
|
|
3
|
+
var styles = {"component":"circular-progress-bar__component_12ta7","bg-positive":"circular-progress-bar__bg-positive_12ta7","bg-negative":"circular-progress-bar__bg-negative_12ta7","svg":"circular-progress-bar__svg_12ta7","title":"circular-progress-bar__title_12ta7","subtitle":"circular-progress-bar__subtitle_12ta7","labelWrapper":"circular-progress-bar__labelWrapper_12ta7","label":"circular-progress-bar__label_12ta7","size-144":"circular-progress-bar__size-144_12ta7","size-128":"circular-progress-bar__size-128_12ta7","size-96":"circular-progress-bar__size-96_12ta7","size-80":"circular-progress-bar__size-80_12ta7","size-64":"circular-progress-bar__size-64_12ta7","size-48":"circular-progress-bar__size-48_12ta7","size-24":"circular-progress-bar__size-24_12ta7","size-16":"circular-progress-bar__size-16_12ta7","backgroundCircle":"circular-progress-bar__backgroundCircle_12ta7","progressCircle":"circular-progress-bar__progressCircle_12ta7","positive":"circular-progress-bar__positive_12ta7","negative":"circular-progress-bar__negative_12ta7","stroke":"circular-progress-bar__stroke_12ta7","iconWrapper":"circular-progress-bar__iconWrapper_12ta7","icon-tertiary":"circular-progress-bar__icon-tertiary_12ta7","icon-positive":"circular-progress-bar__icon-positive_12ta7","icon-negative":"circular-progress-bar__icon-negative_12ta7","icon-primary-inverted":"circular-progress-bar__icon-primary-inverted_12ta7","icon-primary":"circular-progress-bar__icon-primary_12ta7","icon-secondary":"circular-progress-bar__icon-secondary_12ta7","icon":"circular-progress-bar__icon_12ta7"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n:root {\n /* stroke */\n --circular-progress-bar-stroke-color: var(--color-light-neutral-translucent-300);\n\n /* positive */\n --circular-progress-bar-positive-color: var(--color-light-status-positive);\n\n /* negative */\n --circular-progress-bar-negative-color: var(--color-light-status-negative);\n}\n\n.component {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--border-radius-pill);\n\n &.bg-positive {\n background: var(--circular-progress-bar-positive-color);\n }\n\n &.bg-negative {\n background: var(--circular-progress-bar-negative-color);\n }\n}\n\n.svg {\n display: block;\n width: 100%;\n}\n\n.title,\n.subtitle {\n overflow: hidden;\n word-break: break-word;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: var(--gap-0) var(--gap-6);\n}\n\n.subtitle {\n max-height: 40px;\n}\n\n.labelWrapper {\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n transform: translate(-50%, -50%);\n\n &.label {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n.size-144 {\n width: 144px;\n height: 144px;\n\n & .labelWrapper {\n max-width: 128px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-128 {\n width: 128px;\n height: 128px;\n\n & .labelWrapper {\n max-width: 108px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-96 {\n width: 96px;\n height: 96px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 20px;\n }\n}\n\n.size-80 {\n width: 80px;\n height: 80px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 24px;\n }\n}\n\n.size-64 {\n width: 64px;\n height: 64px;\n\n & .labelWrapper {\n max-width: 48px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-48 {\n width: 48px;\n height: 48px;\n\n & .labelWrapper {\n max-width: 40px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-24 {\n width: 24px;\n height: 24px;\n\n & .labelWrapper {\n max-width: 24px;\n }\n}\n\n.size-16 {\n width: 16px;\n height: 16px;\n\n & .labelWrapper {\n max-width: 16px;\n }\n}\n\n.backgroundCircle,\n.progressCircle {\n width: 100%;\n height: 100%;\n fill: transparent;\n}\n\n.positive {\n stroke: var(--circular-progress-bar-positive-color);\n}\n\n.negative {\n stroke: var(--circular-progress-bar-negative-color);\n}\n\n.backgroundCircle {\n stroke: var(--circular-progress-bar-stroke-color);\n\n &.stroke {\n stroke: transparent;\n }\n}\n\n.progressCircle {\n stroke-linecap: round;\n}\n\n.iconWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.size-144 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-128 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-96 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-80 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-64 {\n max-width: 36px;\n max-height: 36px;\n }\n\n &.size-48 {\n max-width: 24px;\n max-height: 24px;\n }\n\n &.size-24 {\n max-width: 16px;\n max-height: 16px;\n }\n\n &.icon-tertiary {\n color: var(--color-light-neutral-500);\n }\n\n &.icon-positive {\n color: var(--color-light-status-positive);\n }\n\n &.icon-negative {\n color: var(--color-light-status-negative);\n }\n\n &.icon-primary-inverted {\n color: var(--color-light-neutral-translucent-1300-inverted);\n }\n\n &.icon-primary {\n color: var(--color-light-neutral-translucent-1300);\n }\n\n &.icon-secondary {\n color: var(--color-light-neutral-700);\n }\n}\n\n.icon {\n width: 100%;\n height: 100%;\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,wCAAwC,CAAC,aAAa,CAAC,0CAA0C,CAAC,aAAa,CAAC,0CAA0C,CAAC,KAAK,CAAC,kCAAkC,CAAC,OAAO,CAAC,oCAAoC,CAAC,UAAU,CAAC,uCAAuC,CAAC,cAAc,CAAC,2CAA2C,CAAC,OAAO,CAAC,oCAAoC,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,kBAAkB,CAAC,+CAA+C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,QAAQ,CAAC,qCAAqC,CAAC,aAAa,CAAC,0CAA0C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,uBAAuB,CAAC,oDAAoD,CAAC,cAAc,CAAC,2CAA2C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,MAAM,CAAC,mCAAmC,CAAC
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n:root {\n /* stroke */\n --circular-progress-bar-stroke-color: var(--color-light-neutral-translucent-300);\n\n /* positive */\n --circular-progress-bar-positive-color: var(--color-light-status-positive);\n\n /* negative */\n --circular-progress-bar-negative-color: var(--color-light-status-negative);\n}\n\n.component {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--border-radius-pill);\n\n &.bg-positive {\n background: var(--circular-progress-bar-positive-color);\n }\n\n &.bg-negative {\n background: var(--circular-progress-bar-negative-color);\n }\n}\n\n.svg {\n display: block;\n width: 100%;\n}\n\n.title,\n.subtitle {\n overflow: hidden;\n word-break: break-word;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: var(--gap-0) var(--gap-6);\n}\n\n.subtitle {\n max-height: 40px;\n}\n\n.labelWrapper {\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n transform: translate(-50%, -50%);\n\n &.label {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n.size-144 {\n width: 144px;\n height: 144px;\n\n & .labelWrapper {\n max-width: 128px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-128 {\n width: 128px;\n height: 128px;\n\n & .labelWrapper {\n max-width: 108px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-96 {\n width: 96px;\n height: 96px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 20px;\n }\n}\n\n.size-80 {\n width: 80px;\n height: 80px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 24px;\n }\n}\n\n.size-64 {\n width: 64px;\n height: 64px;\n\n & .labelWrapper {\n max-width: 48px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-48 {\n width: 48px;\n height: 48px;\n\n & .labelWrapper {\n max-width: 40px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-24 {\n width: 24px;\n height: 24px;\n\n & .labelWrapper {\n max-width: 24px;\n }\n}\n\n.size-16 {\n width: 16px;\n height: 16px;\n\n & .labelWrapper {\n max-width: 16px;\n }\n}\n\n.backgroundCircle,\n.progressCircle {\n width: 100%;\n height: 100%;\n fill: transparent;\n}\n\n.positive {\n stroke: var(--circular-progress-bar-positive-color);\n}\n\n.negative {\n stroke: var(--circular-progress-bar-negative-color);\n}\n\n.backgroundCircle {\n stroke: var(--circular-progress-bar-stroke-color);\n\n &.stroke {\n stroke: transparent;\n }\n}\n\n.progressCircle {\n stroke-linecap: round;\n}\n\n.iconWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.size-144 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-128 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-96 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-80 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-64 {\n max-width: 36px;\n max-height: 36px;\n }\n\n &.size-48 {\n max-width: 24px;\n max-height: 24px;\n }\n\n &.size-24 {\n max-width: 16px;\n max-height: 16px;\n }\n\n &.icon-tertiary {\n color: var(--color-light-neutral-500);\n }\n\n &.icon-positive {\n color: var(--color-light-status-positive);\n }\n\n &.icon-negative {\n color: var(--color-light-status-negative);\n }\n\n &.icon-primary-inverted {\n color: var(--color-light-neutral-translucent-1300-inverted);\n }\n\n &.icon-primary {\n color: var(--color-light-neutral-translucent-1300);\n }\n\n &.icon-secondary {\n color: var(--color-light-neutral-700);\n }\n}\n\n.icon {\n width: 100%;\n height: 100%;\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,WAAW,CAAC,wCAAwC,CAAC,aAAa,CAAC,0CAA0C,CAAC,aAAa,CAAC,0CAA0C,CAAC,KAAK,CAAC,kCAAkC,CAAC,OAAO,CAAC,oCAAoC,CAAC,UAAU,CAAC,uCAAuC,CAAC,cAAc,CAAC,2CAA2C,CAAC,OAAO,CAAC,oCAAoC,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,kBAAkB,CAAC,+CAA+C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,QAAQ,CAAC,qCAAqC,CAAC,aAAa,CAAC,0CAA0C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,uBAAuB,CAAC,oDAAoD,CAAC,cAAc,CAAC,2CAA2C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,MAAM,CAAC,mCAAmC,CAAC;;"}
|
package/esm/use-timer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-timer.js","sources":["../src/use-timer.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { noop } from '@alfalab/core-components-shared';\n\nconst MAX_PERSENT_VALUE = 100;\n\nfunction makeTitle(time: number) {\n return `${Math.trunc(time / 60)}:${`${time % 60}`.padStart(2, '0')}`;\n}\n\n// eslint-disable-next-line max-params\nexport function useTimer(\n time: number,\n active = true,\n counting: 'forward' | 'backward',\n onFinish: () => void,\n interval = 1000,\n step = 1,\n): [value: number, title: string] {\n const [passedTime, setPassedTime] = useState(0);\n const isCompleted = passedTime === time;\n const persentValue = Math.trunc((passedTime / time) * MAX_PERSENT_VALUE);\n\n useEffect(() => {\n if (!active || isCompleted) {\n if (isCompleted) {\n onFinish();\n }\n\n return noop;\n }\n\n const timer = setInterval(() => {\n setPassedTime((prevPassed) => prevPassed + step);\n }, interval);\n\n return () => clearInterval(timer);\n }, [interval, isCompleted, active, step, onFinish]);\n\n return [persentValue, makeTitle(counting === 'backward' ? time - passedTime : passedTime)];\n}\n"],"names":[],"mappings":";;;AAIA,IAAM,iBAAiB,GAAG,GAAG;AAE7B,SAAS,SAAS,CAAC,IAAY,EAAA;IAC3B,OAAO,EAAA,CAAA,MAAA,CAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"use-timer.js","sources":["../src/use-timer.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { noop } from '@alfalab/core-components-shared';\n\nconst MAX_PERSENT_VALUE = 100;\n\nfunction makeTitle(time: number) {\n return `${Math.trunc(time / 60)}:${`${time % 60}`.padStart(2, '0')}`;\n}\n\n// eslint-disable-next-line max-params\nexport function useTimer(\n time: number,\n active = true,\n counting: 'forward' | 'backward',\n onFinish: () => void,\n interval = 1000,\n step = 1,\n): [value: number, title: string] {\n const [passedTime, setPassedTime] = useState(0);\n const isCompleted = passedTime === time;\n const persentValue = Math.trunc((passedTime / time) * MAX_PERSENT_VALUE);\n\n useEffect(() => {\n if (!active || isCompleted) {\n if (isCompleted) {\n onFinish();\n }\n\n return noop;\n }\n\n const timer = setInterval(() => {\n setPassedTime((prevPassed) => prevPassed + step);\n }, interval);\n\n return () => clearInterval(timer);\n }, [interval, isCompleted, active, step, onFinish]);\n\n return [persentValue, makeTitle(counting === 'backward' ? time - passedTime : passedTime)];\n}\n"],"names":[],"mappings":";;;AAIA,IAAM,iBAAiB,GAAG,GAAG;AAE7B,SAAS,SAAS,CAAC,IAAY,EAAA;IAC3B,OAAO,EAAA,CAAA,MAAA,CAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,EAAA,GAAA,CAAA,CAAA,MAAA,CAAI,EAAA,CAAA,MAAA,CAAG,IAAI,GAAG,EAAE,CAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAE;AACxE;AAEA;AACM,SAAU,QAAQ,CACpB,IAAY,EACZ,MAAa,EACb,QAAgC,EAChC,QAAoB,EACpB,QAAe,EACf,IAAQ,EAAA;AAJR,IAAA,IAAA,MAAA,KAAA,MAAA,EAAA,EAAA,MAAA,GAAA,IAAa,CAAA,CAAA;AAGb,IAAA,IAAA,QAAA,KAAA,MAAA,EAAA,EAAA,QAAA,GAAA,IAAe,CAAA,CAAA;AACf,IAAA,IAAA,IAAA,KAAA,MAAA,EAAA,EAAA,IAAA,GAAA,CAAQ,CAAA,CAAA;IAEF,IAAA,EAAA,GAA8B,QAAQ,CAAC,CAAC,CAAC,EAAxC,UAAU,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,aAAa,GAAA,EAAA,CAAA,CAAA,CAAe;AAC/C,IAAA,IAAM,WAAW,GAAG,UAAU,KAAK,IAAI;AACvC,IAAA,IAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,IAAI,IAAI,iBAAiB,CAAC;AAExE,IAAA,SAAS,CAAC,YAAA;AACN,QAAA,IAAI,CAAC,MAAM,IAAI,WAAW,EAAE;YACxB,IAAI,WAAW,EAAE;AACb,gBAAA,QAAQ,EAAE;YACd;AAEA,YAAA,OAAO,IAAI;QACf;QAEA,IAAM,KAAK,GAAG,WAAW,CAAC,YAAA;YACtB,aAAa,CAAC,UAAC,UAAU,EAAA,EAAK,OAAA,UAAU,GAAG,IAAI,CAAA,CAAjB,CAAiB,CAAC;QACpD,CAAC,EAAE,QAAQ,CAAC;QAEZ,OAAO,YAAA,EAAM,OAAA,aAAa,CAAC,KAAK,CAAC,CAAA,CAApB,CAAoB;AACrC,IAAA,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAEnD,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,QAAQ,KAAK,UAAU,GAAG,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAC9F;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-circular-progress-bar-test-ids.js","sources":["../../src/utils/get-circular-progress-bar-test-ids.ts"],"sourcesContent":["import { getDataTestId } from '@alfalab/core-components-shared';\n\nexport function getCircularProgressBarTestIds(dataTestId: string) {\n return {\n progressBar: dataTestId,\n title: getDataTestId(dataTestId, 'title'),\n subtitle: getDataTestId(dataTestId, 'subtitle'),\n circleProgressBar: getDataTestId(dataTestId, 'circle-progress-bar'),\n circleProgressValue: getDataTestId(dataTestId, 'circle-progress-value'),\n };\n}\n"],"names":[],"mappings":";;AAEM,SAAU,6BAA6B,CAAC,UAAkB,EAAA;IAC5D,OAAO;AACH,QAAA,WAAW,EAAE,UAAU;AACvB,QAAA,KAAK,EAAE,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC;AACzC,QAAA,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC;AAC/C,QAAA,iBAAiB,EAAE,aAAa,CAAC,UAAU,EAAE,qBAAqB,CAAC;AACnE,QAAA,mBAAmB,EAAE,aAAa,CAAC,UAAU,EAAE,uBAAuB,CAAC;KAC1E;AACL
|
|
1
|
+
{"version":3,"file":"get-circular-progress-bar-test-ids.js","sources":["../../src/utils/get-circular-progress-bar-test-ids.ts"],"sourcesContent":["import { getDataTestId } from '@alfalab/core-components-shared';\n\nexport function getCircularProgressBarTestIds(dataTestId: string) {\n return {\n progressBar: dataTestId,\n title: getDataTestId(dataTestId, 'title'),\n subtitle: getDataTestId(dataTestId, 'subtitle'),\n circleProgressBar: getDataTestId(dataTestId, 'circle-progress-bar'),\n circleProgressValue: getDataTestId(dataTestId, 'circle-progress-value'),\n };\n}\n"],"names":[],"mappings":";;AAEM,SAAU,6BAA6B,CAAC,UAAkB,EAAA;IAC5D,OAAO;AACH,QAAA,WAAW,EAAE,UAAU;AACvB,QAAA,KAAK,EAAE,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC;AACzC,QAAA,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC;AAC/C,QAAA,iBAAiB,EAAE,aAAa,CAAC,UAAU,EAAE,qBAAqB,CAAC;AACnE,QAAA,mBAAmB,EAAE,aAAa,CAAC,UAAU,EAAE,uBAAuB,CAAC;KAC1E;AACL;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-typography-color.js","sources":["../../src/utils/is-typography-color.ts"],"sourcesContent":["import { TYPOGRAPHY_COLOR } from '../consts';\nimport { type TypographyColor } from '../types/typography-color';\n\nexport const isTypographyColor = (color: TypographyColor | string): color is TypographyColor =>\n TYPOGRAPHY_COLOR.includes(color);\n"],"names":[],"mappings":";;AAGO,IAAM,iBAAiB,GAAG,UAAC,KAA+B,EAAA;AAC7D,IAAA,OAAA,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAAhC
|
|
1
|
+
{"version":3,"file":"is-typography-color.js","sources":["../../src/utils/is-typography-color.ts"],"sourcesContent":["import { TYPOGRAPHY_COLOR } from '../consts';\nimport { type TypographyColor } from '../types/typography-color';\n\nexport const isTypographyColor = (color: TypographyColor | string): color is TypographyColor =>\n TYPOGRAPHY_COLOR.includes(color);\n"],"names":[],"mappings":";;AAGO,IAAM,iBAAiB,GAAG,UAAC,KAA+B,EAAA;AAC7D,IAAA,OAAA,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAAhC;;"}
|
package/index.css
CHANGED
|
@@ -19,35 +19,35 @@
|
|
|
19
19
|
--circular-progress-bar-positive-color: var(--color-light-status-positive);
|
|
20
20
|
--circular-progress-bar-negative-color: var(--color-light-status-negative);
|
|
21
21
|
}
|
|
22
|
-
.circular-progress-
|
|
22
|
+
.circular-progress-bar__component_12ta7 {
|
|
23
23
|
position: relative;
|
|
24
24
|
display: flex;
|
|
25
25
|
justify-content: center;
|
|
26
26
|
align-items: center;
|
|
27
27
|
border-radius: var(--border-radius-pill);
|
|
28
28
|
}
|
|
29
|
-
.circular-progress-
|
|
29
|
+
.circular-progress-bar__component_12ta7.circular-progress-bar__bg-positive_12ta7 {
|
|
30
30
|
background: var(--circular-progress-bar-positive-color);
|
|
31
31
|
}
|
|
32
|
-
.circular-progress-
|
|
32
|
+
.circular-progress-bar__component_12ta7.circular-progress-bar__bg-negative_12ta7 {
|
|
33
33
|
background: var(--circular-progress-bar-negative-color);
|
|
34
34
|
}
|
|
35
|
-
.circular-progress-
|
|
35
|
+
.circular-progress-bar__svg_12ta7 {
|
|
36
36
|
display: block;
|
|
37
37
|
width: 100%;
|
|
38
38
|
}
|
|
39
|
-
.circular-progress-
|
|
40
|
-
.circular-progress-
|
|
39
|
+
.circular-progress-bar__title_12ta7,
|
|
40
|
+
.circular-progress-bar__subtitle_12ta7 {
|
|
41
41
|
overflow: hidden;
|
|
42
42
|
word-break: break-word;
|
|
43
43
|
white-space: nowrap;
|
|
44
44
|
text-overflow: ellipsis;
|
|
45
45
|
margin: var(--gap-0) var(--gap-6);
|
|
46
46
|
}
|
|
47
|
-
.circular-progress-
|
|
47
|
+
.circular-progress-bar__subtitle_12ta7 {
|
|
48
48
|
max-height: 40px;
|
|
49
49
|
}
|
|
50
|
-
.circular-progress-
|
|
50
|
+
.circular-progress-bar__labelWrapper_12ta7 {
|
|
51
51
|
text-align: center;
|
|
52
52
|
position: absolute;
|
|
53
53
|
top: 50%;
|
|
@@ -55,160 +55,160 @@
|
|
|
55
55
|
width: 100%;
|
|
56
56
|
transform: translate(-50%, -50%);
|
|
57
57
|
}
|
|
58
|
-
.circular-progress-
|
|
58
|
+
.circular-progress-bar__labelWrapper_12ta7.circular-progress-bar__label_12ta7 {
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: center;
|
|
61
61
|
justify-content: center;
|
|
62
62
|
}
|
|
63
|
-
.circular-progress-bar__size-
|
|
63
|
+
.circular-progress-bar__size-144_12ta7 {
|
|
64
64
|
width: 144px;
|
|
65
65
|
height: 144px;
|
|
66
66
|
}
|
|
67
|
-
.circular-progress-bar__size-
|
|
67
|
+
.circular-progress-bar__size-144_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
68
68
|
max-width: 128px;
|
|
69
69
|
}
|
|
70
|
-
.circular-progress-bar__size-
|
|
70
|
+
.circular-progress-bar__size-144_12ta7 .circular-progress-bar__title_12ta7 {
|
|
71
71
|
max-height: 32px;
|
|
72
72
|
}
|
|
73
|
-
.circular-progress-bar__size-
|
|
73
|
+
.circular-progress-bar__size-128_12ta7 {
|
|
74
74
|
width: 128px;
|
|
75
75
|
height: 128px;
|
|
76
76
|
}
|
|
77
|
-
.circular-progress-bar__size-
|
|
77
|
+
.circular-progress-bar__size-128_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
78
78
|
max-width: 108px;
|
|
79
79
|
}
|
|
80
|
-
.circular-progress-bar__size-
|
|
80
|
+
.circular-progress-bar__size-128_12ta7 .circular-progress-bar__title_12ta7 {
|
|
81
81
|
max-height: 32px;
|
|
82
82
|
}
|
|
83
|
-
.circular-progress-bar__size-
|
|
83
|
+
.circular-progress-bar__size-96_12ta7 {
|
|
84
84
|
width: 96px;
|
|
85
85
|
height: 96px;
|
|
86
86
|
}
|
|
87
|
-
.circular-progress-bar__size-
|
|
87
|
+
.circular-progress-bar__size-96_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
88
88
|
max-width: 64px;
|
|
89
89
|
}
|
|
90
|
-
.circular-progress-bar__size-
|
|
90
|
+
.circular-progress-bar__size-96_12ta7 .circular-progress-bar__title_12ta7 {
|
|
91
91
|
max-height: 20px;
|
|
92
92
|
}
|
|
93
|
-
.circular-progress-bar__size-
|
|
93
|
+
.circular-progress-bar__size-80_12ta7 {
|
|
94
94
|
width: 80px;
|
|
95
95
|
height: 80px;
|
|
96
96
|
}
|
|
97
|
-
.circular-progress-bar__size-
|
|
97
|
+
.circular-progress-bar__size-80_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
98
98
|
max-width: 64px;
|
|
99
99
|
}
|
|
100
|
-
.circular-progress-bar__size-
|
|
100
|
+
.circular-progress-bar__size-80_12ta7 .circular-progress-bar__title_12ta7 {
|
|
101
101
|
max-height: 24px;
|
|
102
102
|
}
|
|
103
|
-
.circular-progress-bar__size-
|
|
103
|
+
.circular-progress-bar__size-64_12ta7 {
|
|
104
104
|
width: 64px;
|
|
105
105
|
height: 64px;
|
|
106
106
|
}
|
|
107
|
-
.circular-progress-bar__size-
|
|
107
|
+
.circular-progress-bar__size-64_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
108
108
|
max-width: 48px;
|
|
109
109
|
}
|
|
110
|
-
.circular-progress-bar__size-
|
|
110
|
+
.circular-progress-bar__size-64_12ta7 .circular-progress-bar__title_12ta7 {
|
|
111
111
|
max-height: 16px;
|
|
112
112
|
margin: var(--gap-0);
|
|
113
113
|
}
|
|
114
|
-
.circular-progress-bar__size-
|
|
114
|
+
.circular-progress-bar__size-48_12ta7 {
|
|
115
115
|
width: 48px;
|
|
116
116
|
height: 48px;
|
|
117
117
|
}
|
|
118
|
-
.circular-progress-bar__size-
|
|
118
|
+
.circular-progress-bar__size-48_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
119
119
|
max-width: 40px;
|
|
120
120
|
}
|
|
121
|
-
.circular-progress-bar__size-
|
|
121
|
+
.circular-progress-bar__size-48_12ta7 .circular-progress-bar__title_12ta7 {
|
|
122
122
|
max-height: 16px;
|
|
123
123
|
margin: var(--gap-0);
|
|
124
124
|
}
|
|
125
|
-
.circular-progress-bar__size-
|
|
125
|
+
.circular-progress-bar__size-24_12ta7 {
|
|
126
126
|
width: 24px;
|
|
127
127
|
height: 24px;
|
|
128
128
|
}
|
|
129
|
-
.circular-progress-bar__size-
|
|
129
|
+
.circular-progress-bar__size-24_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
130
130
|
max-width: 24px;
|
|
131
131
|
}
|
|
132
|
-
.circular-progress-bar__size-
|
|
132
|
+
.circular-progress-bar__size-16_12ta7 {
|
|
133
133
|
width: 16px;
|
|
134
134
|
height: 16px;
|
|
135
135
|
}
|
|
136
|
-
.circular-progress-bar__size-
|
|
136
|
+
.circular-progress-bar__size-16_12ta7 .circular-progress-bar__labelWrapper_12ta7 {
|
|
137
137
|
max-width: 16px;
|
|
138
138
|
}
|
|
139
|
-
.circular-progress-
|
|
140
|
-
.circular-progress-
|
|
139
|
+
.circular-progress-bar__backgroundCircle_12ta7,
|
|
140
|
+
.circular-progress-bar__progressCircle_12ta7 {
|
|
141
141
|
width: 100%;
|
|
142
142
|
height: 100%;
|
|
143
143
|
fill: transparent;
|
|
144
144
|
}
|
|
145
|
-
.circular-progress-
|
|
145
|
+
.circular-progress-bar__positive_12ta7 {
|
|
146
146
|
stroke: var(--circular-progress-bar-positive-color);
|
|
147
147
|
}
|
|
148
|
-
.circular-progress-
|
|
148
|
+
.circular-progress-bar__negative_12ta7 {
|
|
149
149
|
stroke: var(--circular-progress-bar-negative-color);
|
|
150
150
|
}
|
|
151
|
-
.circular-progress-
|
|
151
|
+
.circular-progress-bar__backgroundCircle_12ta7 {
|
|
152
152
|
stroke: var(--circular-progress-bar-stroke-color);
|
|
153
153
|
}
|
|
154
|
-
.circular-progress-
|
|
154
|
+
.circular-progress-bar__backgroundCircle_12ta7.circular-progress-bar__stroke_12ta7 {
|
|
155
155
|
stroke: transparent;
|
|
156
156
|
}
|
|
157
|
-
.circular-progress-
|
|
157
|
+
.circular-progress-bar__progressCircle_12ta7 {
|
|
158
158
|
stroke-linecap: round;
|
|
159
159
|
}
|
|
160
|
-
.circular-progress-
|
|
160
|
+
.circular-progress-bar__iconWrapper_12ta7 {
|
|
161
161
|
display: flex;
|
|
162
162
|
align-items: center;
|
|
163
163
|
justify-content: center;
|
|
164
164
|
}
|
|
165
|
-
.circular-progress-
|
|
165
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-144_12ta7 {
|
|
166
166
|
max-width: 64px;
|
|
167
167
|
max-height: 64px;
|
|
168
168
|
}
|
|
169
|
-
.circular-progress-
|
|
169
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-128_12ta7 {
|
|
170
170
|
max-width: 64px;
|
|
171
171
|
max-height: 64px;
|
|
172
172
|
}
|
|
173
|
-
.circular-progress-
|
|
173
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-96_12ta7 {
|
|
174
174
|
max-width: 48px;
|
|
175
175
|
max-height: 48px;
|
|
176
176
|
}
|
|
177
|
-
.circular-progress-
|
|
177
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-80_12ta7 {
|
|
178
178
|
max-width: 48px;
|
|
179
179
|
max-height: 48px;
|
|
180
180
|
}
|
|
181
|
-
.circular-progress-
|
|
181
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-64_12ta7 {
|
|
182
182
|
max-width: 36px;
|
|
183
183
|
max-height: 36px;
|
|
184
184
|
}
|
|
185
|
-
.circular-progress-
|
|
185
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-48_12ta7 {
|
|
186
186
|
max-width: 24px;
|
|
187
187
|
max-height: 24px;
|
|
188
188
|
}
|
|
189
|
-
.circular-progress-
|
|
189
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__size-24_12ta7 {
|
|
190
190
|
max-width: 16px;
|
|
191
191
|
max-height: 16px;
|
|
192
192
|
}
|
|
193
|
-
.circular-progress-
|
|
193
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-tertiary_12ta7 {
|
|
194
194
|
color: var(--color-light-neutral-500);
|
|
195
195
|
}
|
|
196
|
-
.circular-progress-
|
|
196
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-positive_12ta7 {
|
|
197
197
|
color: var(--color-light-status-positive);
|
|
198
198
|
}
|
|
199
|
-
.circular-progress-
|
|
199
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-negative_12ta7 {
|
|
200
200
|
color: var(--color-light-status-negative);
|
|
201
201
|
}
|
|
202
|
-
.circular-progress-
|
|
202
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-primary-inverted_12ta7 {
|
|
203
203
|
color: var(--color-light-neutral-translucent-1300-inverted);
|
|
204
204
|
}
|
|
205
|
-
.circular-progress-
|
|
205
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-primary_12ta7 {
|
|
206
206
|
color: var(--color-light-neutral-translucent-1300);
|
|
207
207
|
}
|
|
208
|
-
.circular-progress-
|
|
208
|
+
.circular-progress-bar__iconWrapper_12ta7.circular-progress-bar__icon-secondary_12ta7 {
|
|
209
209
|
color: var(--color-light-neutral-700);
|
|
210
210
|
}
|
|
211
|
-
.circular-progress-
|
|
211
|
+
.circular-progress-bar__icon_12ta7 {
|
|
212
212
|
width: 100%;
|
|
213
213
|
height: 100%;
|
|
214
214
|
}
|
package/index.module.css.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"component":"circular-progress-
|
|
5
|
+
var styles = {"component":"circular-progress-bar__component_12ta7","bg-positive":"circular-progress-bar__bg-positive_12ta7","bg-negative":"circular-progress-bar__bg-negative_12ta7","svg":"circular-progress-bar__svg_12ta7","title":"circular-progress-bar__title_12ta7","subtitle":"circular-progress-bar__subtitle_12ta7","labelWrapper":"circular-progress-bar__labelWrapper_12ta7","label":"circular-progress-bar__label_12ta7","size-144":"circular-progress-bar__size-144_12ta7","size-128":"circular-progress-bar__size-128_12ta7","size-96":"circular-progress-bar__size-96_12ta7","size-80":"circular-progress-bar__size-80_12ta7","size-64":"circular-progress-bar__size-64_12ta7","size-48":"circular-progress-bar__size-48_12ta7","size-24":"circular-progress-bar__size-24_12ta7","size-16":"circular-progress-bar__size-16_12ta7","backgroundCircle":"circular-progress-bar__backgroundCircle_12ta7","progressCircle":"circular-progress-bar__progressCircle_12ta7","positive":"circular-progress-bar__positive_12ta7","negative":"circular-progress-bar__negative_12ta7","stroke":"circular-progress-bar__stroke_12ta7","iconWrapper":"circular-progress-bar__iconWrapper_12ta7","icon-tertiary":"circular-progress-bar__icon-tertiary_12ta7","icon-positive":"circular-progress-bar__icon-positive_12ta7","icon-negative":"circular-progress-bar__icon-negative_12ta7","icon-primary-inverted":"circular-progress-bar__icon-primary-inverted_12ta7","icon-primary":"circular-progress-bar__icon-primary_12ta7","icon-secondary":"circular-progress-bar__icon-secondary_12ta7","icon":"circular-progress-bar__icon_12ta7"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
package/index.module.css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n:root {\n /* stroke */\n --circular-progress-bar-stroke-color: var(--color-light-neutral-translucent-300);\n\n /* positive */\n --circular-progress-bar-positive-color: var(--color-light-status-positive);\n\n /* negative */\n --circular-progress-bar-negative-color: var(--color-light-status-negative);\n}\n\n.component {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--border-radius-pill);\n\n &.bg-positive {\n background: var(--circular-progress-bar-positive-color);\n }\n\n &.bg-negative {\n background: var(--circular-progress-bar-negative-color);\n }\n}\n\n.svg {\n display: block;\n width: 100%;\n}\n\n.title,\n.subtitle {\n overflow: hidden;\n word-break: break-word;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: var(--gap-0) var(--gap-6);\n}\n\n.subtitle {\n max-height: 40px;\n}\n\n.labelWrapper {\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n transform: translate(-50%, -50%);\n\n &.label {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n.size-144 {\n width: 144px;\n height: 144px;\n\n & .labelWrapper {\n max-width: 128px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-128 {\n width: 128px;\n height: 128px;\n\n & .labelWrapper {\n max-width: 108px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-96 {\n width: 96px;\n height: 96px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 20px;\n }\n}\n\n.size-80 {\n width: 80px;\n height: 80px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 24px;\n }\n}\n\n.size-64 {\n width: 64px;\n height: 64px;\n\n & .labelWrapper {\n max-width: 48px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-48 {\n width: 48px;\n height: 48px;\n\n & .labelWrapper {\n max-width: 40px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-24 {\n width: 24px;\n height: 24px;\n\n & .labelWrapper {\n max-width: 24px;\n }\n}\n\n.size-16 {\n width: 16px;\n height: 16px;\n\n & .labelWrapper {\n max-width: 16px;\n }\n}\n\n.backgroundCircle,\n.progressCircle {\n width: 100%;\n height: 100%;\n fill: transparent;\n}\n\n.positive {\n stroke: var(--circular-progress-bar-positive-color);\n}\n\n.negative {\n stroke: var(--circular-progress-bar-negative-color);\n}\n\n.backgroundCircle {\n stroke: var(--circular-progress-bar-stroke-color);\n\n &.stroke {\n stroke: transparent;\n }\n}\n\n.progressCircle {\n stroke-linecap: round;\n}\n\n.iconWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.size-144 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-128 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-96 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-80 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-64 {\n max-width: 36px;\n max-height: 36px;\n }\n\n &.size-48 {\n max-width: 24px;\n max-height: 24px;\n }\n\n &.size-24 {\n max-width: 16px;\n max-height: 16px;\n }\n\n &.icon-tertiary {\n color: var(--color-light-neutral-500);\n }\n\n &.icon-positive {\n color: var(--color-light-status-positive);\n }\n\n &.icon-negative {\n color: var(--color-light-status-negative);\n }\n\n &.icon-primary-inverted {\n color: var(--color-light-neutral-translucent-1300-inverted);\n }\n\n &.icon-primary {\n color: var(--color-light-neutral-translucent-1300);\n }\n\n &.icon-secondary {\n color: var(--color-light-neutral-700);\n }\n}\n\n.icon {\n width: 100%;\n height: 100%;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wCAAwC,CAAC,aAAa,CAAC,0CAA0C,CAAC,aAAa,CAAC,0CAA0C,CAAC,KAAK,CAAC,kCAAkC,CAAC,OAAO,CAAC,oCAAoC,CAAC,UAAU,CAAC,uCAAuC,CAAC,cAAc,CAAC,2CAA2C,CAAC,OAAO,CAAC,oCAAoC,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,kBAAkB,CAAC,+CAA+C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,QAAQ,CAAC,qCAAqC,CAAC,aAAa,CAAC,0CAA0C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,uBAAuB,CAAC,oDAAoD,CAAC,cAAc,CAAC,2CAA2C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,MAAM,CAAC,mCAAmC,CAAC
|
|
1
|
+
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n:root {\n /* stroke */\n --circular-progress-bar-stroke-color: var(--color-light-neutral-translucent-300);\n\n /* positive */\n --circular-progress-bar-positive-color: var(--color-light-status-positive);\n\n /* negative */\n --circular-progress-bar-negative-color: var(--color-light-status-negative);\n}\n\n.component {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--border-radius-pill);\n\n &.bg-positive {\n background: var(--circular-progress-bar-positive-color);\n }\n\n &.bg-negative {\n background: var(--circular-progress-bar-negative-color);\n }\n}\n\n.svg {\n display: block;\n width: 100%;\n}\n\n.title,\n.subtitle {\n overflow: hidden;\n word-break: break-word;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: var(--gap-0) var(--gap-6);\n}\n\n.subtitle {\n max-height: 40px;\n}\n\n.labelWrapper {\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n transform: translate(-50%, -50%);\n\n &.label {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n.size-144 {\n width: 144px;\n height: 144px;\n\n & .labelWrapper {\n max-width: 128px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-128 {\n width: 128px;\n height: 128px;\n\n & .labelWrapper {\n max-width: 108px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-96 {\n width: 96px;\n height: 96px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 20px;\n }\n}\n\n.size-80 {\n width: 80px;\n height: 80px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 24px;\n }\n}\n\n.size-64 {\n width: 64px;\n height: 64px;\n\n & .labelWrapper {\n max-width: 48px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-48 {\n width: 48px;\n height: 48px;\n\n & .labelWrapper {\n max-width: 40px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-24 {\n width: 24px;\n height: 24px;\n\n & .labelWrapper {\n max-width: 24px;\n }\n}\n\n.size-16 {\n width: 16px;\n height: 16px;\n\n & .labelWrapper {\n max-width: 16px;\n }\n}\n\n.backgroundCircle,\n.progressCircle {\n width: 100%;\n height: 100%;\n fill: transparent;\n}\n\n.positive {\n stroke: var(--circular-progress-bar-positive-color);\n}\n\n.negative {\n stroke: var(--circular-progress-bar-negative-color);\n}\n\n.backgroundCircle {\n stroke: var(--circular-progress-bar-stroke-color);\n\n &.stroke {\n stroke: transparent;\n }\n}\n\n.progressCircle {\n stroke-linecap: round;\n}\n\n.iconWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.size-144 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-128 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-96 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-80 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-64 {\n max-width: 36px;\n max-height: 36px;\n }\n\n &.size-48 {\n max-width: 24px;\n max-height: 24px;\n }\n\n &.size-24 {\n max-width: 16px;\n max-height: 16px;\n }\n\n &.icon-tertiary {\n color: var(--color-light-neutral-500);\n }\n\n &.icon-positive {\n color: var(--color-light-status-positive);\n }\n\n &.icon-negative {\n color: var(--color-light-status-negative);\n }\n\n &.icon-primary-inverted {\n color: var(--color-light-neutral-translucent-1300-inverted);\n }\n\n &.icon-primary {\n color: var(--color-light-neutral-translucent-1300);\n }\n\n &.icon-secondary {\n color: var(--color-light-neutral-700);\n }\n}\n\n.icon {\n width: 100%;\n height: 100%;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wCAAwC,CAAC,aAAa,CAAC,0CAA0C,CAAC,aAAa,CAAC,0CAA0C,CAAC,KAAK,CAAC,kCAAkC,CAAC,OAAO,CAAC,oCAAoC,CAAC,UAAU,CAAC,uCAAuC,CAAC,cAAc,CAAC,2CAA2C,CAAC,OAAO,CAAC,oCAAoC,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,kBAAkB,CAAC,+CAA+C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,QAAQ,CAAC,qCAAqC,CAAC,aAAa,CAAC,0CAA0C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,uBAAuB,CAAC,oDAAoD,CAAC,cAAc,CAAC,2CAA2C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,MAAM,CAAC,mCAAmC,CAAC;;"}
|
package/modern/Component.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { isObject, noop, getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
4
|
-
import {
|
|
4
|
+
import { TypographyText, TypographyTitleMobile } from '@alfalab/core-components-typography/modern';
|
|
5
5
|
import { isTypographyColor } from './utils/is-typography-color.js';
|
|
6
6
|
import { MIN_TIMER_VALUE, MAX_TIMER_VALUE, STROKE, SIZES, TYPOGRAPHY_COLOR, SIZE_TO_CLASSNAME_MAP, VIEW_TITLE, VIEW_TEXT, MAX_PROGRESS_VALUE } from './consts.js';
|
|
7
7
|
import { useTimer } from './use-timer.js';
|