@hh.ru/magritte-ui-link 4.3.23 → 5.0.1
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/CustomElementExample.d.ts +2 -3
- package/CustomElementExample.js +5 -3
- package/CustomElementExample.js.map +1 -1
- package/Link.js +19 -8
- package/Link.js.map +1 -1
- package/VerticallyCenteredIcon.d.ts +2 -3
- package/VerticallyCenteredIcon.js +5 -3
- package/VerticallyCenteredIcon.js.map +1 -1
- package/index.css +904 -159
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/types.d.ts +6 -3
- package/types.js.map +1 -1
package/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import 'react';
|
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import '@hh.ru/magritte-common-keyboard';
|
|
9
9
|
import '@hh.ru/magritte-common-use-disabled';
|
|
10
|
+
import '@hh.ru/magritte-ui-icon';
|
|
10
11
|
import './VerticallyCenteredIcon.js';
|
|
11
12
|
import '@hh.ru/magritte-ui-typography';
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-link",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"watch": "yarn root:watch $(pwd)"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@hh.ru/magritte-common-keyboard": "4.0
|
|
23
|
+
"@hh.ru/magritte-common-keyboard": "4.1.0",
|
|
24
24
|
"@hh.ru/magritte-common-use-disabled": "1.0.10",
|
|
25
25
|
"@hh.ru/magritte-design-tokens": "21.1.0",
|
|
26
26
|
"@hh.ru/magritte-types": "5.0.1",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "d271475c7ce8c1d6fc8b33ed345f1d9a6dcd8835"
|
|
39
39
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { TextTypography, HeadersTypography } from '@hh.ru/magritte-ui-typography';
|
|
3
3
|
export type LinkStyle = 'neutral' | 'accent' | 'positive' | 'negative' | 'warning' | 'contrast';
|
|
4
|
+
export type LinkMode = 'primary' | 'secondary' | 'tertiary';
|
|
4
5
|
export interface LinkProps {
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
/** Кастомный элемент для линка */
|
|
@@ -9,10 +10,12 @@ export interface LinkProps {
|
|
|
9
10
|
inline?: boolean;
|
|
10
11
|
/** Стиль компонента в зависимости от назначения */
|
|
11
12
|
style?: LinkStyle;
|
|
13
|
+
/** Режим заливки цветом */
|
|
14
|
+
mode?: LinkMode;
|
|
12
15
|
/** Отображение иконки с левой стороны ссылки */
|
|
13
|
-
iconLeft?:
|
|
16
|
+
iconLeft?: ReactElement;
|
|
14
17
|
/** Отображение иконки с правой стороны ссылки */
|
|
15
|
-
iconRight?:
|
|
18
|
+
iconRight?: ReactElement;
|
|
16
19
|
/** Ссылка перестает реагировать на любое взаимодействие */
|
|
17
20
|
disabled?: boolean;
|
|
18
21
|
/** Типография */
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import { isValidElement } from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import { isValidElement, ReactElement } from 'react';\n\nimport { TextTypography, HeadersTypography } from '@hh.ru/magritte-ui-typography';\n\nexport type LinkStyle = 'neutral' | 'accent' | 'positive' | 'negative' | 'warning' | 'contrast';\nexport type LinkMode = 'primary' | 'secondary' | 'tertiary';\n\nexport interface LinkProps {\n children?: React.ReactNode;\n /** Кастомный элемент для линка */\n Element: 'a' | 'button';\n /** Расположение ссылки в тексте */\n inline?: boolean;\n /** Стиль компонента в зависимости от назначения */\n style?: LinkStyle;\n /** Режим заливки цветом */\n mode?: LinkMode;\n /** Отображение иконки с левой стороны ссылки */\n iconLeft?: ReactElement;\n /** Отображение иконки с правой стороны ссылки */\n iconRight?: ReactElement;\n /** Ссылка перестает реагировать на любое взаимодействие */\n disabled?: boolean;\n /** Типография */\n typography?: TextTypography | HeadersTypography;\n /** Ссылка */\n href?: string;\n /** Кастомный data-qa для тестирования */\n 'data-qa'?: string;\n /** Вспомогательный лейбл для скринридеров */\n 'aria-label'?: string;\n /** Флаг включения visited состояния */\n enableVisited?: boolean;\n /** Включает подчеркивание */\n underlined?: boolean;\n}\n\nexport const isLinkComponent = (component: React.ReactElement): component is React.ReactElement<LinkProps> => {\n return isValidElement(component) && typeof component.type !== 'string' && 'isLink' in component?.type;\n};\n"],"names":[],"mappings":";;AAqCa,MAAA,eAAe,GAAG,CAAC,SAA6B,KAAgD;AACzG,IAAA,OAAO,cAAc,CAAC,SAAS,CAAC,IAAI,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,IAAI,SAAS,EAAE,IAAI,CAAC;AAC1G;;;;"}
|