@hh.ru/magritte-ui-loader 4.0.11 → 4.1.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 +6 -2
- package/Loader.js.map +1 -1
- package/defaultProps.d.ts +8 -0
- package/defaultProps.js +14 -0
- package/defaultProps.js.map +1 -0
- package/index.css +20 -19
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/index.mock.d.ts +1 -0
- package/index.mock.js +2 -0
- package/index.mock.js.map +1 -1
- package/package.json +3 -2
- package/types.d.ts +8 -1
package/Loader.js
CHANGED
|
@@ -2,8 +2,10 @@ import './index.css';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { LoaderOutlinedSize16, LoaderOutlinedSize24, LoaderOutlinedSize32, LoaderOutlinedSize48, LoaderOutlinedSize64, LoaderOutlinedSize96, HyperstarFilledSize16, HyperstarFilledSize24, HyperstarFilledSize32, HyperstarFilledSize48, HyperstarFilledSize64, HyperstarFilledSize96 } from '@hh.ru/magritte-ui-icon/icon';
|
|
5
|
+
import { useLoaderDefaultProps } from './defaultProps.js';
|
|
6
|
+
import '@hh.ru/magritte-internal-default-props-context';
|
|
5
7
|
|
|
6
|
-
var styles = {"loader":"magritte-loader___GSe1a_4-0
|
|
8
|
+
var styles = {"loader":"magritte-loader___GSe1a_4-1-0","loader-color-override":"magritte-loader-color-override___-ttHq_4-1-0","loaderColorOverride":"magritte-loader-color-override___-ttHq_4-1-0","stars":"magritte-stars___NlDEc_4-1-0","star-1-position-animation":"magritte-star-1-position-animation___YJawa_4-1-0","star1PositionAnimation":"magritte-star-1-position-animation___YJawa_4-1-0","star-1-scale-animation":"magritte-star-1-scale-animation___s3pjV_4-1-0","star1ScaleAnimation":"magritte-star-1-scale-animation___s3pjV_4-1-0","star-2-position-animation":"magritte-star-2-position-animation___a7b4H_4-1-0","star2PositionAnimation":"magritte-star-2-position-animation___a7b4H_4-1-0","star-2-scale-animation":"magritte-star-2-scale-animation___EFKyj_4-1-0","star2ScaleAnimation":"magritte-star-2-scale-animation___EFKyj_4-1-0"};
|
|
7
9
|
|
|
8
10
|
const ICON_BY_SIZE = {
|
|
9
11
|
default: {
|
|
@@ -27,7 +29,9 @@ const ICON_COLOR = {
|
|
|
27
29
|
default: 'accent',
|
|
28
30
|
hyperstar: 'tertiary',
|
|
29
31
|
};
|
|
30
|
-
const Loader = (
|
|
32
|
+
const Loader = (props) => {
|
|
33
|
+
const defaultProps = useLoaderDefaultProps();
|
|
34
|
+
const { size = 16, 'aria-label': ariaLabel = 'loading', color, mode = 'default' } = { ...defaultProps, ...props };
|
|
31
35
|
const Element = ICON_BY_SIZE[mode][size];
|
|
32
36
|
if (!Element) {
|
|
33
37
|
return null;
|
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 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
|
|
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 { useLoaderDefaultProps } from '@hh.ru/magritte-ui-loader/defaultProps';\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> = (props) => {\n const defaultProps = useLoaderDefaultProps();\n const { size = 16, 'aria-label': ariaLabel = 'loading', color, mode = 'default' } = { ...defaultProps, ...props };\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":";;;;;;;;AAwBA,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;AAEW,MAAA,MAAM,GAAoB,CAAC,KAAK,KAAI;AAC7C,IAAA,MAAM,YAAY,GAAG,qBAAqB,EAAE,CAAC;IAC7C,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE,YAAY,EAAE,SAAS,GAAG,SAAS,EAAE,KAAK,EAAE,IAAI,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,GAAG,KAAK,EAAE,CAAC;IAElH,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;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LoaderProps } from '@hh.ru/magritte-ui-loader/types';
|
|
2
|
+
/**
|
|
3
|
+
* Провайдер дефолтных пропсов для лоадеров в поддереве.
|
|
4
|
+
* Заданные пропсы применяются ко всем лоадерам внутри как дефолтные — явные пропсы на самом лоадере побеждают.
|
|
5
|
+
*/
|
|
6
|
+
export declare const LoaderDefaultPropsContext: import("react").FC<import("@hh.ru/magritte-internal-default-props-context").BoundDefaultPropsContextProps<LoaderProps>>;
|
|
7
|
+
/** Внутренний хук чтения дефолтов лоадера из ближайшего `LoaderDefaultPropsContext`. */
|
|
8
|
+
export declare const useLoaderDefaultProps: () => Partial<LoaderProps>;
|
package/defaultProps.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { createDefaultPropsContext } from '@hh.ru/magritte-internal-default-props-context';
|
|
3
|
+
|
|
4
|
+
const { DefaultPropsContext, useDefaultProps } = createDefaultPropsContext('Loader');
|
|
5
|
+
/**
|
|
6
|
+
* Провайдер дефолтных пропсов для лоадеров в поддереве.
|
|
7
|
+
* Заданные пропсы применяются ко всем лоадерам внутри как дефолтные — явные пропсы на самом лоадере побеждают.
|
|
8
|
+
*/
|
|
9
|
+
const LoaderDefaultPropsContext = DefaultPropsContext;
|
|
10
|
+
/** Внутренний хук чтения дефолтов лоадера из ближайшего `LoaderDefaultPropsContext`. */
|
|
11
|
+
const useLoaderDefaultProps = useDefaultProps;
|
|
12
|
+
|
|
13
|
+
export { LoaderDefaultPropsContext, useLoaderDefaultProps };
|
|
14
|
+
//# sourceMappingURL=defaultProps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultProps.js","sources":["src/defaultProps.ts"],"sourcesContent":["import { createDefaultPropsContext } from '@hh.ru/magritte-internal-default-props-context';\nimport type { LoaderProps } from '@hh.ru/magritte-ui-loader/types';\n\nconst { DefaultPropsContext, useDefaultProps } = createDefaultPropsContext<LoaderProps>('Loader');\n\n/**\n * Провайдер дефолтных пропсов для лоадеров в поддереве.\n * Заданные пропсы применяются ко всем лоадерам внутри как дефолтные — явные пропсы на самом лоадере побеждают.\n */\nexport const LoaderDefaultPropsContext = DefaultPropsContext;\n\n/** Внутренний хук чтения дефолтов лоадера из ближайшего `LoaderDefaultPropsContext`. */\nexport const useLoaderDefaultProps = useDefaultProps;\n"],"names":[],"mappings":";;AAGA,MAAM,EAAE,mBAAmB,EAAE,eAAe,EAAE,GAAG,yBAAyB,CAAc,QAAQ,CAAC,CAAC;AAElG;;;AAGG;AACI,MAAM,yBAAyB,GAAG,oBAAoB;AAE7D;AACO,MAAM,qBAAqB,GAAG;;;;"}
|
package/index.css
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
.magritte-loader___GSe1a_4-0
|
|
1
|
+
.magritte-loader___GSe1a_4-1-0{
|
|
2
2
|
display:inline-flex;
|
|
3
3
|
height:max-content;
|
|
4
4
|
width:max-content;
|
|
5
5
|
}
|
|
6
|
-
.magritte-loader-color-override___-ttHq_4-0
|
|
6
|
+
.magritte-loader-color-override___-ttHq_4-1-0{
|
|
7
7
|
--magritte-ui-icon-color-override:var(--magritte-ui-loader-color-override);
|
|
8
8
|
}
|
|
9
|
-
.magritte-stars___NlDEc_4-0
|
|
9
|
+
.magritte-stars___NlDEc_4-1-0{
|
|
10
10
|
display:inline-block;
|
|
11
11
|
position:relative;
|
|
12
|
+
line-height:0;
|
|
12
13
|
}
|
|
13
|
-
.magritte-star-1-position-animation___YJawa_4-0
|
|
14
|
+
.magritte-star-1-position-animation___YJawa_4-1-0{
|
|
14
15
|
position:absolute;
|
|
15
16
|
width:100%;
|
|
16
17
|
height:100%;
|
|
17
18
|
}
|
|
18
19
|
@media (prefers-reduced-motion: no-preference){
|
|
19
|
-
.magritte-star-1-position-animation___YJawa_4-0
|
|
20
|
+
.magritte-star-1-position-animation___YJawa_4-1-0{
|
|
20
21
|
top:-50%;
|
|
21
22
|
left:-50%;
|
|
22
|
-
animation:magritte-star-1-position-animation___YJawa_4-0
|
|
23
|
+
animation:magritte-star-1-position-animation___YJawa_4-1-0 3s linear infinite;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
@keyframes magritte-star-1-position-animation___YJawa_4-0
|
|
26
|
+
@keyframes magritte-star-1-position-animation___YJawa_4-1-0{
|
|
26
27
|
0%{
|
|
27
28
|
transform:translate(50%, 50%);
|
|
28
29
|
}
|
|
@@ -60,17 +61,17 @@
|
|
|
60
61
|
transform:translate(0%, 50%);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
.magritte-star-1-scale-animation___s3pjV_4-0
|
|
64
|
+
.magritte-star-1-scale-animation___s3pjV_4-1-0{
|
|
64
65
|
position:absolute;
|
|
65
66
|
width:100%;
|
|
66
67
|
height:100%;
|
|
67
68
|
}
|
|
68
69
|
@media (prefers-reduced-motion: no-preference){
|
|
69
|
-
.magritte-star-1-scale-animation___s3pjV_4-0
|
|
70
|
-
animation:magritte-star-1-scale-animation___s3pjV_4-0
|
|
70
|
+
.magritte-star-1-scale-animation___s3pjV_4-1-0{
|
|
71
|
+
animation:magritte-star-1-scale-animation___s3pjV_4-1-0 3s linear infinite;
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
@keyframes magritte-star-1-scale-animation___s3pjV_4-0
|
|
74
|
+
@keyframes magritte-star-1-scale-animation___s3pjV_4-1-0{
|
|
74
75
|
0%{
|
|
75
76
|
scale:100%;
|
|
76
77
|
}
|
|
@@ -108,19 +109,19 @@
|
|
|
108
109
|
scale:0%;
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
.magritte-star-2-position-animation___a7b4H_4-0
|
|
112
|
+
.magritte-star-2-position-animation___a7b4H_4-1-0{
|
|
112
113
|
position:absolute;
|
|
113
114
|
width:100%;
|
|
114
115
|
height:100%;
|
|
115
116
|
}
|
|
116
117
|
@media (prefers-reduced-motion: no-preference){
|
|
117
|
-
.magritte-star-2-position-animation___a7b4H_4-0
|
|
118
|
+
.magritte-star-2-position-animation___a7b4H_4-1-0{
|
|
118
119
|
top:-50%;
|
|
119
120
|
left:-50%;
|
|
120
|
-
animation:magritte-star-2-position-animation___a7b4H_4-0
|
|
121
|
+
animation:magritte-star-2-position-animation___a7b4H_4-1-0 3s linear infinite;
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
@keyframes magritte-star-2-position-animation___a7b4H_4-0
|
|
124
|
+
@keyframes magritte-star-2-position-animation___a7b4H_4-1-0{
|
|
124
125
|
0%{
|
|
125
126
|
transform:translate(100%, 50%);
|
|
126
127
|
}
|
|
@@ -158,17 +159,17 @@
|
|
|
158
159
|
transform:translate(50%, 50%);
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
|
-
.magritte-star-2-scale-animation___EFKyj_4-0
|
|
162
|
+
.magritte-star-2-scale-animation___EFKyj_4-1-0{
|
|
162
163
|
position:absolute;
|
|
163
164
|
width:100%;
|
|
164
165
|
height:100%;
|
|
165
166
|
}
|
|
166
167
|
@media (prefers-reduced-motion: no-preference){
|
|
167
|
-
.magritte-star-2-scale-animation___EFKyj_4-0
|
|
168
|
-
animation:magritte-star-2-scale-animation___EFKyj_4-0
|
|
168
|
+
.magritte-star-2-scale-animation___EFKyj_4-1-0{
|
|
169
|
+
animation:magritte-star-2-scale-animation___EFKyj_4-1-0 3s linear infinite;
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
|
-
@keyframes magritte-star-2-scale-animation___EFKyj_4-0
|
|
172
|
+
@keyframes magritte-star-2-scale-animation___EFKyj_4-1-0{
|
|
172
173
|
0%{
|
|
173
174
|
scale:0%;
|
|
174
175
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
+
export { LoaderDefaultPropsContext } from './defaultProps.js';
|
|
2
3
|
export { Loader } from './Loader.js';
|
|
4
|
+
import '@hh.ru/magritte-internal-default-props-context';
|
|
3
5
|
import 'react/jsx-runtime';
|
|
4
6
|
import 'classnames';
|
|
5
7
|
import '@hh.ru/magritte-ui-icon/icon';
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/index.mock.d.ts
CHANGED
package/index.mock.js
CHANGED
package/index.mock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mock.js","sources":["src/index.mock.ts"],"sourcesContent":["import { ForwardRefExoticComponent } from 'react';\n\nimport { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport const Loader: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent('Loader');\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mock.js","sources":["src/index.mock.ts"],"sourcesContent":["import { ForwardRefExoticComponent } from 'react';\n\nimport { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport const Loader: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent('Loader');\n\nexport { LoaderDefaultPropsContext } from '@hh.ru/magritte-ui-loader/defaultProps';\n"],"names":[],"mappings":";;;;MAIa,MAAM,GAAuD,aAAa,CAAC,QAAQ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-loader",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@hh.ru/magritte-design-tokens": "25.0.1",
|
|
27
|
+
"@hh.ru/magritte-internal-default-props-context": "1.0.2",
|
|
27
28
|
"@hh.ru/magritte-ui-icon": "15.0.3",
|
|
28
29
|
"@hh.ru/magritte-ui-mock-component": "1.1.7"
|
|
29
30
|
},
|
|
@@ -34,5 +35,5 @@
|
|
|
34
35
|
"publishConfig": {
|
|
35
36
|
"access": "public"
|
|
36
37
|
},
|
|
37
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "654e4a7ad4debb3463a3c37b316fbdc7571e9dff"
|
|
38
39
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
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
|
+
/**
|
|
5
|
+
* Свойство для изменения размеров SVG-иконки
|
|
6
|
+
* @default 16
|
|
7
|
+
*/
|
|
5
8
|
size?: LoaderSize;
|
|
6
9
|
/** Цвет иконки */
|
|
7
10
|
color?: IconColor;
|
|
@@ -9,7 +12,11 @@ export interface LoaderProps {
|
|
|
9
12
|
* Задает иконку, анимации и цвет по умолчанию:
|
|
10
13
|
* `default` — спиннер, цвет по умолчанию `accent`
|
|
11
14
|
* `hyperstar` — две сменяющиеся звезды, цвет по умолчанию `tertiary`
|
|
15
|
+
* @default default
|
|
12
16
|
*/
|
|
13
17
|
mode?: 'default' | 'hyperstar';
|
|
18
|
+
/**
|
|
19
|
+
* @default loading
|
|
20
|
+
*/
|
|
14
21
|
'aria-label'?: string;
|
|
15
22
|
}
|