@hh.ru/magritte-ui-link 6.0.17 → 6.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/Link.js +1 -1
- package/VerticallyCenteredIcon.js +1 -1
- package/index.css +1240 -1043
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +5 -5
- package/types.d.ts +2 -1
- package/types.js +2 -1
- package/types.js.map +1 -1
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from '@hh.ru/magritte-ui-link/Link';
|
|
2
|
-
export { type LinkStyle, type LinkProps, isLinkComponent } from '@hh.ru/magritte-ui-link/types';
|
|
2
|
+
export { type LinkStyle, type LinkProps, isLinkComponent, LINK_STYLES } from '@hh.ru/magritte-ui-link/types';
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-link",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@hh.ru/magritte-common-keyboard": "4.1.3",
|
|
23
23
|
"@hh.ru/magritte-common-use-disabled": "1.0.13",
|
|
24
|
-
"@hh.ru/magritte-design-tokens": "
|
|
24
|
+
"@hh.ru/magritte-design-tokens": "24.0.0",
|
|
25
25
|
"@hh.ru/magritte-types": "5.0.5",
|
|
26
|
-
"@hh.ru/magritte-ui-icon": "13.2.
|
|
27
|
-
"@hh.ru/magritte-ui-typography": "4.2.
|
|
26
|
+
"@hh.ru/magritte-ui-icon": "13.2.1",
|
|
27
|
+
"@hh.ru/magritte-ui-typography": "4.2.7"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"classnames": ">=2.3.2",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "2d36fc4bfdcb463606afab1541531d8ebf916d67"
|
|
37
37
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { TextTypography, HeadersTypography } from '@hh.ru/magritte-ui-typography';
|
|
3
|
-
export
|
|
3
|
+
export declare const LINK_STYLES: readonly ["neutral", "accent", "positive", "negative", "warning", "special", "contrast"];
|
|
4
|
+
export type LinkStyle = (typeof LINK_STYLES)[number];
|
|
4
5
|
export type LinkMode = 'primary' | 'secondary' | 'tertiary';
|
|
5
6
|
export interface LinkProps {
|
|
6
7
|
children?: React.ReactNode;
|
package/types.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { isValidElement } from 'react';
|
|
3
3
|
|
|
4
|
+
const LINK_STYLES = ['neutral', 'accent', 'positive', 'negative', 'warning', 'special', 'contrast'];
|
|
4
5
|
const isLinkComponent = (component) => {
|
|
5
6
|
return isValidElement(component) && typeof component.type !== 'string' && 'isLink' in component?.type;
|
|
6
7
|
};
|
|
7
8
|
|
|
8
|
-
export { isLinkComponent };
|
|
9
|
+
export { LINK_STYLES, isLinkComponent };
|
|
9
10
|
//# sourceMappingURL=types.js.map
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
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 const LINK_STYLES = ['neutral', 'accent', 'positive', 'negative', 'warning', 'special', 'contrast'] as const;\n\nexport type LinkStyle = (typeof LINK_STYLES)[number];\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 /** Значение CSS-свойства overflow-wrap */\n overflowWrap?: 'anywhere' | 'normal' | 'break-word';\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":";;AAIa,MAAA,WAAW,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAW;AAqCvG,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;;;;"}
|