@hh.ru/magritte-ui-link 4.3.22 → 5.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/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": "4.3.22",
3
+ "version": "5.0.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -22,11 +22,11 @@
22
22
  "dependencies": {
23
23
  "@hh.ru/magritte-common-keyboard": "4.0.4",
24
24
  "@hh.ru/magritte-common-use-disabled": "1.0.10",
25
- "@hh.ru/magritte-design-tokens": "21.0.0",
25
+ "@hh.ru/magritte-design-tokens": "21.1.0",
26
26
  "@hh.ru/magritte-types": "5.0.1",
27
- "@hh.ru/magritte-ui-icon": "7.9.11",
28
- "@hh.ru/magritte-ui-theme-provider": "1.1.36",
29
- "@hh.ru/magritte-ui-typography": "3.0.26"
27
+ "@hh.ru/magritte-ui-icon": "7.9.12",
28
+ "@hh.ru/magritte-ui-theme-provider": "1.1.37",
29
+ "@hh.ru/magritte-ui-typography": "3.0.27"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "classnames": ">=2.3.2",
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "75a6b12c08b7ca443e43da143a22adfc91282816"
38
+ "gitHead": "572442a5ac2e879ddabd8900547ca51fd2529cf3"
39
39
  }
package/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { type IconWrapperComponentSize16, type IconWrapperComponentSize24 } from '@hh.ru/magritte-ui-icon/src/iconTypes';
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?: IconWrapperComponentSize16 | IconWrapperComponentSize24;
16
+ iconLeft?: ReactElement;
14
17
  /** Отображение иконки с правой стороны ссылки */
15
- iconRight?: IconWrapperComponentSize16 | IconWrapperComponentSize24;
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 {\n type IconWrapperComponentSize16,\n type IconWrapperComponentSize24,\n} from '@hh.ru/magritte-ui-icon/src/iconTypes';\nimport { TextTypography, HeadersTypography } from '@hh.ru/magritte-ui-typography';\n\nexport type LinkStyle = 'neutral' | 'accent' | 'positive' | 'negative' | 'warning' | 'contrast';\n\nexport interface LinkProps {\n children?: React.ReactNode;\n /** Кастомный элемент для линка */\n Element: 'a' | 'button';\n /** Расположение ссылки в тексте */\n inline?: boolean;\n /** Стиль компонента в зависимости от назначения */\n style?: LinkStyle;\n /** Отображение иконки с левой стороны ссылки */\n iconLeft?: IconWrapperComponentSize16 | IconWrapperComponentSize24;\n /** Отображение иконки с правой стороны ссылки */\n iconRight?: IconWrapperComponentSize16 | IconWrapperComponentSize24;\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":";;AAsCa,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;;;;"}
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;;;;"}