@hh.ru/magritte-ui-title 8.1.8 → 8.3.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.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { Title } from '@hh.ru/magritte-ui-title/Title';
2
+ export { TitleDefaultPropsContext } from '@hh.ru/magritte-ui-title/defaultProps';
2
3
  export { type TitleProps } from '@hh.ru/magritte-ui-title/types';
3
4
  export { type TextStyle } from '@hh.ru/magritte-ui-typography';
package/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  import './index.css';
2
2
  export { Title } from './Title.js';
3
+ export { TitleDefaultPropsContext } from './defaultProps.js';
3
4
  import 'react/jsx-runtime';
4
5
  import 'classnames';
5
6
  import '@hh.ru/magritte-common-use-disabled';
6
7
  import '@hh.ru/magritte-internal-accessible-region';
7
8
  import '@hh.ru/magritte-ui-breakpoint';
8
9
  import '@hh.ru/magritte-ui-typography';
10
+ import '@hh.ru/magritte-internal-default-props-context';
9
11
  //# 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/index.mock.d.ts CHANGED
@@ -2,3 +2,4 @@ import { ForwardRefExoticComponent } from 'react';
2
2
  export * from '@hh.ru/magritte-ui-title/types';
3
3
  export { type TextStyle } from '@hh.ru/magritte-ui-typography';
4
4
  export declare const Title: ForwardRefExoticComponent<Record<string, unknown>>;
5
+ export { TitleDefaultPropsContext } from '@hh.ru/magritte-ui-title/defaultProps';
package/index.mock.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import './index.css';
2
2
  import { mockComponent } from '@hh.ru/magritte-ui-mock-component';
3
+ export { TitleDefaultPropsContext } from './defaultProps.js';
4
+ import '@hh.ru/magritte-internal-default-props-context';
3
5
 
4
6
  const Title = mockComponent('Title', undefined, {
5
7
  withChildren: true,
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 * from '@hh.ru/magritte-ui-title/types';\nexport { type TextStyle } from '@hh.ru/magritte-ui-typography';\n\nexport const Title: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent('Title', undefined, {\n withChildren: true,\n});\n"],"names":[],"mappings":";;MAOa,KAAK,GAAuD,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE;AACvG,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA;;;;"}
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 * from '@hh.ru/magritte-ui-title/types';\nexport { type TextStyle } from '@hh.ru/magritte-ui-typography';\n\nexport const Title: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent('Title', undefined, {\n withChildren: true,\n});\n\nexport { TitleDefaultPropsContext } from '@hh.ru/magritte-ui-title/defaultProps';\n"],"names":[],"mappings":";;;;MAOa,KAAK,GAAuD,aAAa,CAAC,OAAO,EAAE,SAAS,EAAE;AACvG,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-title",
3
- "version": "8.1.8",
3
+ "version": "8.3.0",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -21,7 +21,8 @@
21
21
  "dependencies": {
22
22
  "@hh.ru/magritte-common-use-disabled": "1.0.15",
23
23
  "@hh.ru/magritte-design-tokens": "24.7.1",
24
- "@hh.ru/magritte-internal-accessible-region": "1.0.1",
24
+ "@hh.ru/magritte-internal-accessible-region": "1.0.2",
25
+ "@hh.ru/magritte-internal-default-props-context": "1.0.2",
25
26
  "@hh.ru/magritte-ui-breakpoint": "6.1.1",
26
27
  "@hh.ru/magritte-ui-mock-component": "1.1.7",
27
28
  "@hh.ru/magritte-ui-typography": "5.3.4"
@@ -33,5 +34,5 @@
33
34
  "publishConfig": {
34
35
  "access": "public"
35
36
  },
36
- "gitHead": "c2e9387335f39da7c8daf951f8dbee7c7eb3914c"
37
+ "gitHead": "573faba7b94110c97e71efc35a954dd11440f973"
37
38
  }
package/types.d.ts CHANGED
@@ -7,11 +7,17 @@ export interface TitlePropsBase {
7
7
  * @default primary
8
8
  */
9
9
  style?: TokenColorText;
10
- /** Размер */
10
+ /** Размер
11
+ * @default extra-large
12
+ */
11
13
  size?: TitleSizeOptions;
12
- /** Низлежащий HTML элемент для семантики */
14
+ /** Низлежащий HTML элемент для семантики
15
+ * @default h1
16
+ */
13
17
  Element: keyof JSX.IntrinsicElements & HeadingElement;
14
- /** Выравнивание содержимого */
18
+ /** Выравнивание содержимого
19
+ * @default left
20
+ */
15
21
  alignment?: 'center' | 'left';
16
22
  /** Максимальное кол-во строк перед обрезкой их многоточием */
17
23
  maxLines?: number;
@@ -29,6 +35,12 @@ export interface TitlePropsBase {
29
35
  * id аттрибут для aria-labeled-by
30
36
  */
31
37
  id?: string;
38
+ /**
39
+ * Позволяет отключить автоматическую регистрацию заголовка и подзаголовка в качестве
40
+ * метки (aria-label) и описания (aria-description) доступной области (accessible region).
41
+ * Полезно, когда заголовок дублирует уже размеченный на странице заголовок региона.
42
+ */
43
+ notRegionTitle?: boolean;
32
44
  dataQaTitle?: string;
33
45
  'data-qa'?: string;
34
46
  }