@hh.ru/magritte-ui-loader 3.0.14 → 4.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/Loader.js +36 -17
- package/Loader.js.map +1 -1
- package/index.css +203 -14
- package/package.json +2 -2
- package/types.d.ts +8 -2
package/Loader.js
CHANGED
|
@@ -1,29 +1,48 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
-
import { LoaderOutlinedSize16, LoaderOutlinedSize24, LoaderOutlinedSize32, LoaderOutlinedSize48, LoaderOutlinedSize64, LoaderOutlinedSize96 } from '@hh.ru/magritte-ui-icon/icon';
|
|
4
|
+
import { LoaderOutlinedSize16, LoaderOutlinedSize24, LoaderOutlinedSize32, LoaderOutlinedSize48, LoaderOutlinedSize64, LoaderOutlinedSize96, HyperstarFilledSize16, HyperstarFilledSize24, HyperstarFilledSize32, HyperstarFilledSize48, HyperstarFilledSize64, HyperstarFilledSize96 } from '@hh.ru/magritte-ui-icon/icon';
|
|
5
5
|
|
|
6
|
-
var styles = {"loader":"magritte-
|
|
6
|
+
var styles = {"loader":"magritte-loader___GSe1a_4-0-0","loader-color-override":"magritte-loader-color-override___-ttHq_4-0-0","loaderColorOverride":"magritte-loader-color-override___-ttHq_4-0-0","stars":"magritte-stars___NlDEc_4-0-0","star-1-position-animation":"magritte-star-1-position-animation___YJawa_4-0-0","star1PositionAnimation":"magritte-star-1-position-animation___YJawa_4-0-0","star-1-scale-animation":"magritte-star-1-scale-animation___s3pjV_4-0-0","star1ScaleAnimation":"magritte-star-1-scale-animation___s3pjV_4-0-0","star-2-position-animation":"magritte-star-2-position-animation___a7b4H_4-0-0","star2PositionAnimation":"magritte-star-2-position-animation___a7b4H_4-0-0","star-2-scale-animation":"magritte-star-2-scale-animation___EFKyj_4-0-0","star2ScaleAnimation":"magritte-star-2-scale-animation___EFKyj_4-0-0"};
|
|
7
7
|
|
|
8
|
-
const ICON_BY_SIZE =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
const ICON_BY_SIZE = {
|
|
9
|
+
default: {
|
|
10
|
+
16: LoaderOutlinedSize16,
|
|
11
|
+
24: LoaderOutlinedSize24,
|
|
12
|
+
32: LoaderOutlinedSize32,
|
|
13
|
+
48: LoaderOutlinedSize48,
|
|
14
|
+
64: LoaderOutlinedSize64,
|
|
15
|
+
96: LoaderOutlinedSize96,
|
|
16
|
+
},
|
|
17
|
+
hyperstar: {
|
|
18
|
+
16: HyperstarFilledSize16,
|
|
19
|
+
24: HyperstarFilledSize24,
|
|
20
|
+
32: HyperstarFilledSize32,
|
|
21
|
+
48: HyperstarFilledSize48,
|
|
22
|
+
64: HyperstarFilledSize64,
|
|
23
|
+
96: HyperstarFilledSize96,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
const ICON_COLOR = {
|
|
27
|
+
default: 'accent',
|
|
28
|
+
hyperstar: 'tertiary',
|
|
29
|
+
};
|
|
30
|
+
const Loader = ({ size = 16, 'aria-label': ariaLabel = 'loading', color, mode = 'default', }) => {
|
|
31
|
+
const Element = ICON_BY_SIZE[mode][size];
|
|
18
32
|
if (!Element) {
|
|
19
33
|
return null;
|
|
20
34
|
}
|
|
21
|
-
const
|
|
35
|
+
const iconProps = {
|
|
22
36
|
'aria-label': ariaLabel,
|
|
23
|
-
initialColor:
|
|
24
|
-
...props,
|
|
37
|
+
initialColor: color ?? ICON_COLOR[mode],
|
|
25
38
|
};
|
|
26
|
-
|
|
39
|
+
if (mode === 'default') {
|
|
40
|
+
return (jsx("span", { className: classNames(styles.loader, { [styles.loaderColorOverride]: !color }), role: "status", "data-qa": "magritte-loader", children: jsx(Element, { ...iconProps, loading: true }) }));
|
|
41
|
+
}
|
|
42
|
+
if (mode === 'hyperstar') {
|
|
43
|
+
return (jsxs("span", { className: classNames(styles.stars, { [styles.loaderColorOverride]: !color }), role: "status", "data-qa": "magritte-loader", style: { width: size, height: size }, children: [jsx("span", { className: styles.star1PositionAnimation, children: jsx("span", { className: styles.star1ScaleAnimation, children: jsx(Element, { ...iconProps }) }) }), jsx("span", { className: styles.star2PositionAnimation, children: jsx("span", { className: styles.star2ScaleAnimation, children: jsx(Element, { ...iconProps }) }) })] }));
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
27
46
|
};
|
|
28
47
|
|
|
29
48
|
export { Loader };
|
package/Loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Loader.js","sources":["src/Loader.tsx"],"sourcesContent":["import { FC } from 'react';\nimport classNames from 'classnames';\n\nimport { IconWrapperComponent } from '@hh.ru/magritte-ui-icon';\nimport {\n LoaderOutlinedSize16,\n LoaderOutlinedSize24,\n LoaderOutlinedSize32,\n LoaderOutlinedSize48,\n LoaderOutlinedSize64,\n LoaderOutlinedSize96,\n} from '@hh.ru/magritte-ui-icon/icon';\nimport { type LoaderSize, type LoaderProps } from '@hh.ru/magritte-ui-loader/types';\n\nimport styles from './loader.less';\n\nconst ICON_BY_SIZE
|
|
1
|
+
{"version":3,"file":"Loader.js","sources":["src/Loader.tsx"],"sourcesContent":["import { FC } from 'react';\nimport classNames from 'classnames';\n\nimport { IconWrapperComponent } from '@hh.ru/magritte-ui-icon';\nimport {\n type IconColor,\n HyperstarFilledSize16,\n HyperstarFilledSize24,\n HyperstarFilledSize32,\n HyperstarFilledSize48,\n HyperstarFilledSize64,\n HyperstarFilledSize96,\n LoaderOutlinedSize16,\n LoaderOutlinedSize24,\n LoaderOutlinedSize32,\n LoaderOutlinedSize48,\n LoaderOutlinedSize64,\n LoaderOutlinedSize96,\n} from '@hh.ru/magritte-ui-icon/icon';\nimport { type LoaderSize, type LoaderProps } from '@hh.ru/magritte-ui-loader/types';\n\nimport styles from './loader.less';\n\nconst ICON_BY_SIZE: Record<Required<LoaderProps>['mode'], Record<LoaderSize, IconWrapperComponent>> = {\n default: {\n 16: LoaderOutlinedSize16,\n 24: LoaderOutlinedSize24,\n 32: LoaderOutlinedSize32,\n 48: LoaderOutlinedSize48,\n 64: LoaderOutlinedSize64,\n 96: LoaderOutlinedSize96,\n },\n hyperstar: {\n 16: HyperstarFilledSize16,\n 24: HyperstarFilledSize24,\n 32: HyperstarFilledSize32,\n 48: HyperstarFilledSize48,\n 64: HyperstarFilledSize64,\n 96: HyperstarFilledSize96,\n },\n};\n\nconst ICON_COLOR: Record<Required<LoaderProps>['mode'], IconColor> = {\n default: 'accent',\n hyperstar: 'tertiary',\n};\n\nexport const Loader: FC<LoaderProps> = ({\n size = 16,\n 'aria-label': ariaLabel = 'loading',\n color,\n mode = 'default',\n}) => {\n const Element = ICON_BY_SIZE[mode][size];\n if (!Element) {\n return null;\n }\n\n const iconProps = {\n 'aria-label': ariaLabel,\n initialColor: color ?? ICON_COLOR[mode],\n };\n\n if (mode === 'default') {\n return (\n <span\n className={classNames(styles.loader, { [styles.loaderColorOverride]: !color })}\n role=\"status\"\n data-qa=\"magritte-loader\"\n >\n <Element {...iconProps} loading />\n </span>\n );\n }\n\n if (mode === 'hyperstar') {\n return (\n <span\n className={classNames(styles.stars, { [styles.loaderColorOverride]: !color })}\n role=\"status\"\n data-qa=\"magritte-loader\"\n style={{ width: size, height: size }}\n >\n <span className={styles.star1PositionAnimation}>\n <span className={styles.star1ScaleAnimation}>\n <Element {...iconProps} />\n </span>\n </span>\n <span className={styles.star2PositionAnimation}>\n <span className={styles.star2ScaleAnimation}>\n <Element {...iconProps} />\n </span>\n </span>\n </span>\n );\n }\n\n return null;\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;AAuBA,MAAM,YAAY,GAAoF;AAClG,IAAA,OAAO,EAAE;AACL,QAAA,EAAE,EAAE,oBAAoB;AACxB,QAAA,EAAE,EAAE,oBAAoB;AACxB,QAAA,EAAE,EAAE,oBAAoB;AACxB,QAAA,EAAE,EAAE,oBAAoB;AACxB,QAAA,EAAE,EAAE,oBAAoB;AACxB,QAAA,EAAE,EAAE,oBAAoB;AAC3B,KAAA;AACD,IAAA,SAAS,EAAE;AACP,QAAA,EAAE,EAAE,qBAAqB;AACzB,QAAA,EAAE,EAAE,qBAAqB;AACzB,QAAA,EAAE,EAAE,qBAAqB;AACzB,QAAA,EAAE,EAAE,qBAAqB;AACzB,QAAA,EAAE,EAAE,qBAAqB;AACzB,QAAA,EAAE,EAAE,qBAAqB;AAC5B,KAAA;CACJ,CAAC;AAEF,MAAM,UAAU,GAAqD;AACjE,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,SAAS,EAAE,UAAU;CACxB,CAAC;MAEW,MAAM,GAAoB,CAAC,EACpC,IAAI,GAAG,EAAE,EACT,YAAY,EAAE,SAAS,GAAG,SAAS,EACnC,KAAK,EACL,IAAI,GAAG,SAAS,GACnB,KAAI;IACD,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE;AACV,QAAA,OAAO,IAAI,CAAC;KACf;AAED,IAAA,MAAM,SAAS,GAAG;AACd,QAAA,YAAY,EAAE,SAAS;AACvB,QAAA,YAAY,EAAE,KAAK,IAAI,UAAU,CAAC,IAAI,CAAC;KAC1C,CAAC;AAEF,IAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AACpB,QAAA,QACIA,GACI,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,mBAAmB,GAAG,CAAC,KAAK,EAAE,CAAC,EAC9E,IAAI,EAAC,QAAQ,aACL,iBAAiB,EAAA,QAAA,EAEzBA,GAAC,CAAA,OAAO,OAAK,SAAS,EAAE,OAAO,EAAG,IAAA,EAAA,CAAA,EAAA,CAC/B,EACT;KACL;AAED,IAAA,IAAI,IAAI,KAAK,WAAW,EAAE;AACtB,QAAA,QACIC,IACI,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,mBAAmB,GAAG,CAAC,KAAK,EAAE,CAAC,EAC7E,IAAI,EAAC,QAAQ,aACL,iBAAiB,EACzB,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAEpCD,GAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,sBAAsB,EAAA,QAAA,EAC1CA,cAAM,SAAS,EAAE,MAAM,CAAC,mBAAmB,EACvC,QAAA,EAAAA,GAAA,CAAC,OAAO,EAAK,EAAA,GAAA,SAAS,GAAI,EACvB,CAAA,EAAA,CACJ,EACPA,GAAM,CAAA,MAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,sBAAsB,EAAA,QAAA,EAC1CA,cAAM,SAAS,EAAE,MAAM,CAAC,mBAAmB,YACvCA,GAAC,CAAA,OAAO,OAAK,SAAS,EAAA,CAAI,GACvB,EACJ,CAAA,CAAA,EAAA,CACJ,EACT;KACL;AAED,IAAA,OAAO,IAAI,CAAC;AAChB;;;;"}
|
package/index.css
CHANGED
|
@@ -1,19 +1,208 @@
|
|
|
1
|
-
|
|
2
|
-
--magritte-color-component-loader-icon-content-v24-7-2:#0070ff;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.magritte-night-theme{
|
|
6
|
-
--magritte-color-component-loader-icon-content-v24-7-2:#0d63e3;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.magritte-zp-day-theme{
|
|
10
|
-
--magritte-color-component-loader-icon-content-v24-7-2:#7195AF;
|
|
11
|
-
}
|
|
12
|
-
.magritte-loader___GSe1a_3-0-14{
|
|
1
|
+
.magritte-loader___GSe1a_4-0-0{
|
|
13
2
|
display:inline-flex;
|
|
14
3
|
height:max-content;
|
|
15
4
|
width:max-content;
|
|
16
5
|
}
|
|
17
|
-
.magritte-loader-color-override___-
|
|
18
|
-
--magritte-ui-icon-color-override:var(--magritte-ui-loader-color-override
|
|
6
|
+
.magritte-loader-color-override___-ttHq_4-0-0{
|
|
7
|
+
--magritte-ui-icon-color-override:var(--magritte-ui-loader-color-override);
|
|
8
|
+
}
|
|
9
|
+
.magritte-stars___NlDEc_4-0-0{
|
|
10
|
+
display:inline-block;
|
|
11
|
+
position:relative;
|
|
12
|
+
}
|
|
13
|
+
.magritte-star-1-position-animation___YJawa_4-0-0{
|
|
14
|
+
position:absolute;
|
|
15
|
+
width:100%;
|
|
16
|
+
height:100%;
|
|
17
|
+
}
|
|
18
|
+
@media (prefers-reduced-motion: no-preference){
|
|
19
|
+
.magritte-star-1-position-animation___YJawa_4-0-0{
|
|
20
|
+
top:-50%;
|
|
21
|
+
left:-50%;
|
|
22
|
+
animation:magritte-star-1-position-animation___YJawa_4-0-0 3s linear infinite;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
@keyframes magritte-star-1-position-animation___YJawa_4-0-0{
|
|
26
|
+
0%{
|
|
27
|
+
transform:translate(50%, 50%);
|
|
28
|
+
}
|
|
29
|
+
3.33%{
|
|
30
|
+
transform:translate(49.49%, 48.82%);
|
|
31
|
+
}
|
|
32
|
+
6.67%{
|
|
33
|
+
transform:translate(47.8%, 45.07%);
|
|
34
|
+
}
|
|
35
|
+
10%{
|
|
36
|
+
transform:translate(44.73%, 38.67%);
|
|
37
|
+
}
|
|
38
|
+
13.33%{
|
|
39
|
+
transform:translate(40.14%, 30.36%);
|
|
40
|
+
}
|
|
41
|
+
16.67%{
|
|
42
|
+
transform:translate(33.9%, 21.79%);
|
|
43
|
+
}
|
|
44
|
+
20%{
|
|
45
|
+
transform:translate(25.9%, 16.47%);
|
|
46
|
+
}
|
|
47
|
+
23.33%{
|
|
48
|
+
transform:translate(16.78%, 19.78%);
|
|
49
|
+
}
|
|
50
|
+
26.67%{
|
|
51
|
+
transform:translate(7.83%, 32.94%);
|
|
52
|
+
}
|
|
53
|
+
30%{
|
|
54
|
+
transform:translate(1.84%, 45.72%);
|
|
55
|
+
}
|
|
56
|
+
33.33%{
|
|
57
|
+
transform:translate(0%, 50%);
|
|
58
|
+
}
|
|
59
|
+
100%{
|
|
60
|
+
transform:translate(0%, 50%);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
.magritte-star-1-scale-animation___s3pjV_4-0-0{
|
|
64
|
+
position:absolute;
|
|
65
|
+
width:100%;
|
|
66
|
+
height:100%;
|
|
67
|
+
}
|
|
68
|
+
@media (prefers-reduced-motion: no-preference){
|
|
69
|
+
.magritte-star-1-scale-animation___s3pjV_4-0-0{
|
|
70
|
+
animation:magritte-star-1-scale-animation___s3pjV_4-0-0 3s linear infinite;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
@keyframes magritte-star-1-scale-animation___s3pjV_4-0-0{
|
|
74
|
+
0%{
|
|
75
|
+
scale:100%;
|
|
76
|
+
}
|
|
77
|
+
3.33%{
|
|
78
|
+
scale:98.03%;
|
|
79
|
+
}
|
|
80
|
+
6.67%{
|
|
81
|
+
scale:91.84%;
|
|
82
|
+
}
|
|
83
|
+
10%{
|
|
84
|
+
scale:81.25%;
|
|
85
|
+
}
|
|
86
|
+
13.33%{
|
|
87
|
+
scale:66.8%;
|
|
88
|
+
}
|
|
89
|
+
16.67%{
|
|
90
|
+
scale:50%;
|
|
91
|
+
}
|
|
92
|
+
20%{
|
|
93
|
+
scale:33.2%;
|
|
94
|
+
}
|
|
95
|
+
23.33%{
|
|
96
|
+
scale:18.75%;
|
|
97
|
+
}
|
|
98
|
+
26.67%{
|
|
99
|
+
scale:8.16%;
|
|
100
|
+
}
|
|
101
|
+
30%{
|
|
102
|
+
scale:1.97%;
|
|
103
|
+
}
|
|
104
|
+
33.33%{
|
|
105
|
+
scale:0%;
|
|
106
|
+
}
|
|
107
|
+
100%{
|
|
108
|
+
scale:0%;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
.magritte-star-2-position-animation___a7b4H_4-0-0{
|
|
112
|
+
position:absolute;
|
|
113
|
+
width:100%;
|
|
114
|
+
height:100%;
|
|
115
|
+
}
|
|
116
|
+
@media (prefers-reduced-motion: no-preference){
|
|
117
|
+
.magritte-star-2-position-animation___a7b4H_4-0-0{
|
|
118
|
+
top:-50%;
|
|
119
|
+
left:-50%;
|
|
120
|
+
animation:magritte-star-2-position-animation___a7b4H_4-0-0 3s linear infinite;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
@keyframes magritte-star-2-position-animation___a7b4H_4-0-0{
|
|
124
|
+
0%{
|
|
125
|
+
transform:translate(100%, 50%);
|
|
126
|
+
}
|
|
127
|
+
3.33%{
|
|
128
|
+
transform:translate(97.29%, 55.2%);
|
|
129
|
+
}
|
|
130
|
+
6.67%{
|
|
131
|
+
transform:translate(91.52%, 61.3%);
|
|
132
|
+
}
|
|
133
|
+
10%{
|
|
134
|
+
transform:translate(83.82%, 65.7%);
|
|
135
|
+
}
|
|
136
|
+
13.33%{
|
|
137
|
+
transform:translate(75.73%, 67.58%);
|
|
138
|
+
}
|
|
139
|
+
16.67%{
|
|
140
|
+
transform:translate(67.98%, 67.05%);
|
|
141
|
+
}
|
|
142
|
+
20%{
|
|
143
|
+
transform:translate(61.32%, 64.34%);
|
|
144
|
+
}
|
|
145
|
+
23.33%{
|
|
146
|
+
transform:translate(56.2%, 60.17%);
|
|
147
|
+
}
|
|
148
|
+
26.67%{
|
|
149
|
+
transform:translate(52.68%, 55.49%);
|
|
150
|
+
}
|
|
151
|
+
30%{
|
|
152
|
+
transform:translate(50.68%, 51.64%);
|
|
153
|
+
}
|
|
154
|
+
33.33%{
|
|
155
|
+
transform:translate(50%, 50%);
|
|
156
|
+
}
|
|
157
|
+
100%{
|
|
158
|
+
transform:translate(50%, 50%);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
.magritte-star-2-scale-animation___EFKyj_4-0-0{
|
|
162
|
+
position:absolute;
|
|
163
|
+
width:100%;
|
|
164
|
+
height:100%;
|
|
165
|
+
}
|
|
166
|
+
@media (prefers-reduced-motion: no-preference){
|
|
167
|
+
.magritte-star-2-scale-animation___EFKyj_4-0-0{
|
|
168
|
+
animation:magritte-star-2-scale-animation___EFKyj_4-0-0 3s linear infinite;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
@keyframes magritte-star-2-scale-animation___EFKyj_4-0-0{
|
|
172
|
+
0%{
|
|
173
|
+
scale:0%;
|
|
174
|
+
}
|
|
175
|
+
3.33%{
|
|
176
|
+
scale:1.97%;
|
|
177
|
+
}
|
|
178
|
+
6.67%{
|
|
179
|
+
scale:8.16%;
|
|
180
|
+
}
|
|
181
|
+
10%{
|
|
182
|
+
scale:18.75%;
|
|
183
|
+
}
|
|
184
|
+
13.33%{
|
|
185
|
+
scale:33.2%;
|
|
186
|
+
}
|
|
187
|
+
16.67%{
|
|
188
|
+
scale:50%;
|
|
189
|
+
}
|
|
190
|
+
20%{
|
|
191
|
+
scale:66.8%;
|
|
192
|
+
}
|
|
193
|
+
23.33%{
|
|
194
|
+
scale:81.25%;
|
|
195
|
+
}
|
|
196
|
+
26.67%{
|
|
197
|
+
scale:91.84%;
|
|
198
|
+
}
|
|
199
|
+
30%{
|
|
200
|
+
scale:98.03%;
|
|
201
|
+
}
|
|
202
|
+
33.33%{
|
|
203
|
+
scale:100%;
|
|
204
|
+
}
|
|
205
|
+
100%{
|
|
206
|
+
scale:100%;
|
|
207
|
+
}
|
|
19
208
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-loader",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "a912a354ba397bc6991dcf7f6ca19e02134b4abb"
|
|
34
34
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { IconColor } from '@hh.ru/magritte-ui-icon/icon';
|
|
1
|
+
import { type IconColor } from '@hh.ru/magritte-ui-icon/icon';
|
|
2
2
|
export type LoaderSize = 16 | 24 | 32 | 48 | 64 | 96;
|
|
3
3
|
export interface LoaderProps {
|
|
4
4
|
/** Свойство для изменения размеров SVG-иконки */
|
|
5
5
|
size?: LoaderSize;
|
|
6
6
|
/** Цвет иконки */
|
|
7
|
-
|
|
7
|
+
color?: IconColor;
|
|
8
|
+
/**
|
|
9
|
+
* Задает иконку, анимации и цвет по умолчанию:
|
|
10
|
+
* `default` — спиннер, цвет по умолчанию `accent`
|
|
11
|
+
* `hyperstar` — две сменяющиеся звезды, цвет по умолчанию `tertiary`
|
|
12
|
+
*/
|
|
13
|
+
mode?: 'default' | 'hyperstar';
|
|
8
14
|
'aria-label'?: string;
|
|
9
15
|
}
|