@alfalab/core-components-typography 2.0.0 → 2.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +32 -9
  2. package/dist/colors.css +13 -13
  3. package/dist/{colors.module-9d3e0282.d.ts → colors.module-35c48cf7.d.ts} +0 -0
  4. package/dist/{colors.module-9d3e0282.js → colors.module-35c48cf7.js} +1 -1
  5. package/dist/common.module-8f8baeca.js +6 -0
  6. package/dist/component.js +2 -2
  7. package/dist/cssm/index.d.ts +2 -0
  8. package/dist/cssm/text/component.d.ts +40 -2
  9. package/dist/cssm/text/component.js +4 -4
  10. package/dist/cssm/text/index.module.css +4 -0
  11. package/dist/cssm/title/component.d.ts +39 -1
  12. package/dist/cssm/title/component.js +3 -3
  13. package/dist/esm/colors.css +13 -13
  14. package/dist/esm/{colors.module-afa89fff.d.ts → colors.module-2c206829.d.ts} +0 -0
  15. package/dist/esm/{colors.module-afa89fff.js → colors.module-2c206829.js} +1 -1
  16. package/dist/esm/common.module-c6bc7a27.js +4 -0
  17. package/dist/esm/component.js +2 -2
  18. package/dist/esm/index.d.ts +2 -0
  19. package/dist/esm/index.js +2 -2
  20. package/dist/esm/text/component.d.ts +40 -2
  21. package/dist/esm/text/component.js +7 -7
  22. package/dist/esm/text/index.css +17 -13
  23. package/dist/esm/text/index.js +1 -1
  24. package/dist/esm/title/common.css +5 -5
  25. package/dist/esm/title/component.d.ts +39 -1
  26. package/dist/esm/title/component.js +5 -5
  27. package/dist/esm/title/index.css +19 -19
  28. package/dist/esm/title/index.js +3 -3
  29. package/dist/esm/title-responsive/component.js +3 -3
  30. package/dist/esm/title-responsive/index.css +46 -46
  31. package/dist/esm/title-responsive/index.js +2 -2
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.js +2 -2
  34. package/dist/modern/colors.css +13 -13
  35. package/dist/modern/colors.module-148ba739.js +4 -0
  36. package/dist/modern/common.module-c6bc7a27.js +4 -0
  37. package/dist/modern/component.js +2 -2
  38. package/dist/modern/index.d.ts +2 -0
  39. package/dist/modern/index.js +2 -2
  40. package/dist/modern/text/component.d.ts +40 -2
  41. package/dist/modern/text/component.js +4 -4
  42. package/dist/modern/text/index.css +17 -13
  43. package/dist/modern/text/index.js +1 -1
  44. package/dist/modern/title/common.css +5 -5
  45. package/dist/modern/title/component.d.ts +39 -1
  46. package/dist/modern/title/component.js +3 -3
  47. package/dist/modern/title/index.css +19 -19
  48. package/dist/modern/title/index.js +3 -3
  49. package/dist/modern/title-responsive/component.js +3 -3
  50. package/dist/modern/title-responsive/index.css +46 -46
  51. package/dist/modern/title-responsive/index.js +2 -2
  52. package/dist/text/component.d.ts +40 -2
  53. package/dist/text/component.js +6 -6
  54. package/dist/text/index.css +17 -13
  55. package/dist/text/index.js +1 -1
  56. package/dist/title/common.css +5 -5
  57. package/dist/title/component.d.ts +39 -1
  58. package/dist/title/component.js +4 -4
  59. package/dist/title/index.css +19 -19
  60. package/dist/title/index.js +3 -3
  61. package/dist/title-responsive/component.js +3 -3
  62. package/dist/title-responsive/index.css +46 -46
  63. package/dist/title-responsive/index.js +2 -2
  64. package/package.json +2 -2
  65. package/dist/common.module-d3c5fce9.js +0 -6
  66. package/dist/esm/common.module-a42136b2.js +0 -4
  67. package/dist/modern/colors.module-8212a0a2.js +0 -4
  68. package/dist/modern/common.module-a42136b2.js +0 -4
@@ -1,4 +1,4 @@
1
- /* hash: 1mwax */
1
+ /* hash: 1awxd */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -18,83 +18,83 @@
18
18
  'Helvetica Neue', Helvetica, sans-serif;
19
19
  }
20
20
  /* TODO: поменять медиа-запросы на миксины */
21
- .typography__styrene-xlarge_1mwax {
21
+ .typography__styrene-xlarge_1467o {
22
22
  font-size: 32px;
23
23
  line-height: 40px;
24
24
  font-weight: 500;
25
25
  font-feature-settings: 'ss01';
26
26
  font-family: var(--font-family-styrene);
27
27
  }
28
- .typography__styrene-large_1mwax {
28
+ .typography__styrene-large_1467o {
29
29
  font-size: 24px;
30
30
  line-height: 32px;
31
31
  font-weight: 500;
32
32
  font-feature-settings: 'ss01';
33
33
  font-family: var(--font-family-styrene);
34
34
  }
35
- .typography__styrene-medium_1mwax {
35
+ .typography__styrene-medium_1467o {
36
36
  font-size: 20px;
37
37
  line-height: 24px;
38
38
  font-weight: 500;
39
39
  font-feature-settings: 'ss01';
40
40
  font-family: var(--font-family-styrene);
41
41
  }
42
- .typography__styrene-small_1mwax {
42
+ .typography__styrene-small_1467o {
43
43
  font-size: 20px;
44
44
  line-height: 24px;
45
45
  font-weight: 500;
46
46
  font-feature-settings: 'ss01';
47
47
  font-family: var(--font-family-styrene);
48
48
  }
49
- .typography__styrene-xsmall_1mwax {
49
+ .typography__styrene-xsmall_1467o {
50
50
  font-size: 20px;
51
51
  line-height: 24px;
52
52
  font-weight: 500;
53
53
  font-feature-settings: 'ss01';
54
54
  font-family: var(--font-family-styrene);
55
55
  }
56
- .typography__system-xlarge_1mwax {
56
+ .typography__system-xlarge_1467o {
57
57
  font-size: 30px;
58
58
  line-height: 36px;
59
59
  font-weight: 700;
60
60
  }
61
- .typography__system-large_1mwax {
61
+ .typography__system-large_1467o {
62
62
  font-size: 22px;
63
63
  line-height: 26px;
64
64
  font-weight: 700;
65
65
  }
66
- .typography__system-medium_1mwax {
66
+ .typography__system-medium_1467o {
67
67
  font-size: 18px;
68
68
  line-height: 22px;
69
69
  font-weight: 700;
70
70
  }
71
- .typography__system-small_1mwax {
71
+ .typography__system-small_1467o {
72
72
  font-size: 18px;
73
73
  line-height: 22px;
74
74
  font-weight: 700;
75
75
  }
76
- .typography__system-xsmall_1mwax {
76
+ .typography__system-xsmall_1467o {
77
77
  font-size: 18px;
78
78
  line-height: 22px;
79
79
  font-weight: 700;
80
80
  }
81
- .typography__margins-xlarge_1mwax {
81
+ .typography__margins-xlarge_1467o {
82
82
  margin: 0 0 var(--gap-xl);
83
83
  }
84
- .typography__margins-large_1mwax {
84
+ .typography__margins-large_1467o {
85
85
  margin: var(--gap-3xl) 0 var(--gap-m);
86
86
  }
87
- .typography__margins-medium_1mwax {
87
+ .typography__margins-medium_1467o {
88
88
  margin: var(--gap-3xl) 0 var(--gap-m);
89
89
  }
90
- .typography__margins-small_1mwax {
90
+ .typography__margins-small_1467o {
91
91
  margin: var(--gap-3xl) 0 var(--gap-m);
92
92
  }
93
- .typography__margins-xsmall_1mwax {
93
+ .typography__margins-xsmall_1467o {
94
94
  margin: var(--gap-3xl) 0 var(--gap-m);
95
95
  }
96
96
  @media screen and (min-width: 600px) {
97
- .typography__styrene-xlarge_1mwax {
97
+ .typography__styrene-xlarge_1467o {
98
98
  font-size: 40px;
99
99
  line-height: 48px;
100
100
  font-weight: 500;
@@ -102,7 +102,7 @@
102
102
  font-family: var(--font-family-styrene);
103
103
  }
104
104
 
105
- .typography__styrene-large_1mwax {
105
+ .typography__styrene-large_1467o {
106
106
  font-size: 32px;
107
107
  line-height: 40px;
108
108
  font-weight: 500;
@@ -110,7 +110,7 @@
110
110
  font-family: var(--font-family-styrene);
111
111
  }
112
112
 
113
- .typography__styrene-medium_1mwax {
113
+ .typography__styrene-medium_1467o {
114
114
  font-size: 24px;
115
115
  line-height: 32px;
116
116
  font-weight: 500;
@@ -118,7 +118,7 @@
118
118
  font-family: var(--font-family-styrene);
119
119
  }
120
120
 
121
- .typography__styrene-small_1mwax {
121
+ .typography__styrene-small_1467o {
122
122
  font-size: 24px;
123
123
  line-height: 32px;
124
124
  font-weight: 500;
@@ -126,7 +126,7 @@
126
126
  font-family: var(--font-family-styrene);
127
127
  }
128
128
 
129
- .typography__styrene-xsmall_1mwax {
129
+ .typography__styrene-xsmall_1467o {
130
130
  font-size: 20px;
131
131
  line-height: 24px;
132
132
  font-weight: 500;
@@ -134,58 +134,58 @@
134
134
  font-family: var(--font-family-styrene);
135
135
  }
136
136
 
137
- .typography__system-xlarge_1mwax {
137
+ .typography__system-xlarge_1467o {
138
138
  font-size: 40px;
139
139
  line-height: 48px;
140
140
  font-weight: 700;
141
141
  }
142
142
 
143
- .typography__system-large_1mwax {
143
+ .typography__system-large_1467o {
144
144
  font-size: 30px;
145
145
  line-height: 36px;
146
146
  font-weight: 700;
147
147
  }
148
148
 
149
- .typography__system-medium_1mwax {
149
+ .typography__system-medium_1467o {
150
150
  font-size: 22px;
151
151
  line-height: 26px;
152
152
  font-weight: 700;
153
153
  }
154
154
 
155
- .typography__system-small_1mwax {
155
+ .typography__system-small_1467o {
156
156
  font-size: 22px;
157
157
  line-height: 26px;
158
158
  font-weight: 700;
159
159
  }
160
160
 
161
- .typography__system-xsmall_1mwax {
161
+ .typography__system-xsmall_1467o {
162
162
  font-size: 18px;
163
163
  line-height: 22px;
164
164
  font-weight: 700;
165
165
  }
166
166
 
167
- .typography__margins-xlarge_1mwax {
167
+ .typography__margins-xlarge_1467o {
168
168
  margin: 0 0 var(--gap-xl);
169
169
  }
170
170
 
171
- .typography__margins-large_1mwax {
171
+ .typography__margins-large_1467o {
172
172
  margin: var(--gap-4xl) 0 var(--gap-xl);
173
173
  }
174
174
 
175
- .typography__margins-medium_1mwax {
175
+ .typography__margins-medium_1467o {
176
176
  margin: var(--gap-3xl) 0 var(--gap-m);
177
177
  }
178
178
 
179
- .typography__margins-small_1mwax {
179
+ .typography__margins-small_1467o {
180
180
  margin: var(--gap-3xl) 0 var(--gap-m);
181
181
  }
182
182
 
183
- .typography__margins-xsmall_1mwax {
183
+ .typography__margins-xsmall_1467o {
184
184
  margin: var(--gap-3xl) 0 var(--gap-m);
185
185
  }
186
186
  }
187
187
  @media screen and (min-width: 1024px) {
188
- .typography__styrene-xlarge_1mwax {
188
+ .typography__styrene-xlarge_1467o {
189
189
  font-size: 48px;
190
190
  line-height: 64px;
191
191
  font-weight: 500;
@@ -193,7 +193,7 @@
193
193
  font-family: var(--font-family-styrene);
194
194
  }
195
195
 
196
- .typography__styrene-large_1mwax {
196
+ .typography__styrene-large_1467o {
197
197
  font-size: 40px;
198
198
  line-height: 48px;
199
199
  font-weight: 500;
@@ -201,7 +201,7 @@
201
201
  font-family: var(--font-family-styrene);
202
202
  }
203
203
 
204
- .typography__styrene-medium_1mwax {
204
+ .typography__styrene-medium_1467o {
205
205
  font-size: 32px;
206
206
  line-height: 40px;
207
207
  font-weight: 500;
@@ -209,7 +209,7 @@
209
209
  font-family: var(--font-family-styrene);
210
210
  }
211
211
 
212
- .typography__styrene-small_1mwax {
212
+ .typography__styrene-small_1467o {
213
213
  font-size: 24px;
214
214
  line-height: 32px;
215
215
  font-weight: 500;
@@ -217,7 +217,7 @@
217
217
  font-family: var(--font-family-styrene);
218
218
  }
219
219
 
220
- .typography__styrene-xsmall_1mwax {
220
+ .typography__styrene-xsmall_1467o {
221
221
  font-size: 20px;
222
222
  line-height: 24px;
223
223
  font-weight: 500;
@@ -225,53 +225,53 @@
225
225
  font-family: var(--font-family-styrene);
226
226
  }
227
227
 
228
- .typography__system-xlarge_1mwax {
228
+ .typography__system-xlarge_1467o {
229
229
  font-size: 48px;
230
230
  line-height: 52px;
231
231
  font-weight: 700;
232
232
  }
233
233
 
234
- .typography__system-large_1mwax {
234
+ .typography__system-large_1467o {
235
235
  font-size: 40px;
236
236
  line-height: 48px;
237
237
  font-weight: 700;
238
238
  }
239
239
 
240
- .typography__system-medium_1mwax {
240
+ .typography__system-medium_1467o {
241
241
  font-size: 30px;
242
242
  line-height: 36px;
243
243
  font-weight: 700;
244
244
  }
245
245
 
246
- .typography__system-small_1mwax {
246
+ .typography__system-small_1467o {
247
247
  font-size: 22px;
248
248
  line-height: 26px;
249
249
  font-weight: 700;
250
250
  }
251
251
 
252
- .typography__system-xsmall_1mwax {
252
+ .typography__system-xsmall_1467o {
253
253
  font-size: 18px;
254
254
  line-height: 22px;
255
255
  font-weight: 700;
256
256
  }
257
257
 
258
- .typography__margins-xlarge_1mwax {
258
+ .typography__margins-xlarge_1467o {
259
259
  margin: 0 0 var(--gap-xl);
260
260
  }
261
261
 
262
- .typography__margins-large_1mwax {
262
+ .typography__margins-large_1467o {
263
263
  margin: var(--gap-4xl) 0 var(--gap-xl);
264
264
  }
265
265
 
266
- .typography__margins-medium_1mwax {
266
+ .typography__margins-medium_1467o {
267
267
  margin: var(--gap-4xl) 0 var(--gap-xl);
268
268
  }
269
269
 
270
- .typography__margins-small_1mwax {
270
+ .typography__margins-small_1467o {
271
271
  margin: var(--gap-3xl) 0 var(--gap-m);
272
272
  }
273
273
 
274
- .typography__margins-xsmall_1mwax {
274
+ .typography__margins-xsmall_1467o {
275
275
  margin: var(--gap-3xl) 0 var(--gap-m);
276
276
  }
277
277
  }
@@ -1,6 +1,6 @@
1
1
  import 'react';
2
2
  import 'classnames';
3
- import '../colors.module-8212a0a2.js';
3
+ import '../colors.module-148ba739.js';
4
4
  import '../title/component.js';
5
- import '../common.module-a42136b2.js';
5
+ import '../common.module-c6bc7a27.js';
6
6
  export { TitleResponsive } from './component.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { HTMLAttributes, FC } from "react";
3
+ import { HTMLAttributes } from "react";
4
4
  import { Color } from "../colors";
5
5
  type NativeProps = HTMLAttributes<HTMLSpanElement>;
6
6
  type TextProps = Omit<NativeProps, 'color'> & {
@@ -16,6 +16,10 @@ type TextProps = Omit<NativeProps, 'color'> & {
16
16
  * Толщина шрифта
17
17
  */
18
18
  weight?: 'regular' | 'medium' | 'bold';
19
+ /**
20
+ * Делает цифры моноширинными
21
+ */
22
+ monospaceNumbers?: boolean;
19
23
  /**
20
24
  * HTML тег
21
25
  */
@@ -33,5 +37,39 @@ type TextProps = Omit<NativeProps, 'color'> & {
33
37
  */
34
38
  children?: React.ReactNode;
35
39
  };
36
- declare const Text: FC<TextProps>;
40
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
41
+ declare const Text: React.ForwardRefExoticComponent<Pick<NativeProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
42
+ /**
43
+ * [Вариант начертания](https://alfa-laboratory.github.io/core-components/master/?path=/docs/гайдлайны-типографика--page)
44
+ */
45
+ view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps" | undefined;
46
+ /**
47
+ * Цвет текста
48
+ */
49
+ color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | undefined;
50
+ /**
51
+ * Толщина шрифта
52
+ */
53
+ weight?: "regular" | "medium" | "bold" | undefined;
54
+ /**
55
+ * Делает цифры моноширинными
56
+ */
57
+ monospaceNumbers?: boolean | undefined;
58
+ /**
59
+ * HTML тег
60
+ */
61
+ tag?: "p" | "span" | "div" | undefined;
62
+ /**
63
+ * Css-класс для стилизации (native prop)
64
+ */
65
+ className?: string | undefined;
66
+ /**
67
+ * Id компонента для тестов
68
+ */
69
+ dataTestId?: string | undefined;
70
+ /**
71
+ * Контент (native prop)
72
+ */
73
+ children?: React.ReactNode;
74
+ } & React.RefAttributes<TextElementType>>;
37
75
  export { TextProps, Text };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var colors_module = require('../colors.module-9d3e0282.js');
5
+ var colors_module = require('../colors.module-35c48cf7.js');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
 
@@ -11,13 +11,13 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
13
13
 
14
- var styles = {"paragraph":"typography__paragraph_1ihwl","primary-large":"typography__primary-large_1ihwl","primary-medium":"typography__primary-medium_1ihwl","primary-small":"typography__primary-small_1ihwl","secondary-large":"typography__secondary-large_1ihwl","secondary-medium":"typography__secondary-medium_1ihwl","secondary-small":"typography__secondary-small_1ihwl","component":"typography__component_1ihwl","caps":"typography__caps_1ihwl","bold":"typography__bold_1ihwl","medium":"typography__medium_1ihwl","regular":"typography__regular_1ihwl"};
14
+ var styles = {"paragraph":"typography__paragraph_15q31","primary-large":"typography__primary-large_15q31","primary-medium":"typography__primary-medium_15q31","primary-small":"typography__primary-small_15q31","secondary-large":"typography__secondary-large_15q31","secondary-medium":"typography__secondary-medium_15q31","secondary-small":"typography__secondary-small_15q31","component":"typography__component_15q31","caps":"typography__caps_15q31","bold":"typography__bold_15q31","medium":"typography__medium_15q31","regular":"typography__regular_15q31","monospace":"typography__monospace_15q31"};
15
15
  require('./index.css')
16
16
 
17
- var Text = function (_a) {
17
+ var Text = React.forwardRef(function (_a, ref) {
18
18
  var _b;
19
- var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, _e = _a.weight, weight = _e === void 0 ? 'regular' : _e, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, restProps = colors_module.__rest(_a, ["view", "tag", "weight", "color", "className", "dataTestId", "children"]);
20
- return (React__default['default'].createElement(Component, colors_module.__assign({ className: cn__default['default']((_b = {}, _b[styles.paragraph] = Component === 'p', _b), className, color && colors_module.colors[color], styles[view], styles[weight]), "data-test-id": dataTestId }, restProps), children));
21
- };
19
+ var _c = _a.view, view = _c === void 0 ? 'primary-medium' : _c, _d = _a.tag, Component = _d === void 0 ? 'span' : _d, _e = _a.weight, weight = _e === void 0 ? 'regular' : _e, _f = _a.monospaceNumbers, monospaceNumbers = _f === void 0 ? false : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, restProps = colors_module.__rest(_a, ["view", "tag", "weight", "monospaceNumbers", "color", "className", "dataTestId", "children"]);
20
+ return (React__default['default'].createElement(Component, colors_module.__assign({ className: cn__default['default']((_b = {}, _b[styles.paragraph] = Component === 'p', _b[styles.monospace] = monospaceNumbers, _b), className, color && colors_module.colors[color], styles[view], styles[weight]), "data-test-id": dataTestId, ref: ref }, restProps), children));
21
+ });
22
22
 
23
23
  exports.Text = Text;
@@ -1,4 +1,4 @@
1
- /* hash: 1ihwl */
1
+ /* hash: 1o3ta */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -13,58 +13,62 @@
13
13
  :root {
14
14
  --text-paragraph-margin-bottom: 0 0 var(--gap-s);
15
15
  }
16
- .typography__paragraph_1ihwl {
16
+ .typography__paragraph_15q31 {
17
17
  margin: var(--text-paragraph-margin-bottom);
18
18
  padding: 0;
19
19
  }
20
- .typography__primary-large_1ihwl {
20
+ .typography__primary-large_15q31 {
21
21
  font-size: 18px;
22
22
  line-height: 24px;
23
23
  font-weight: 400;
24
24
  }
25
- .typography__primary-medium_1ihwl {
25
+ .typography__primary-medium_15q31 {
26
26
  font-size: 16px;
27
27
  line-height: 24px;
28
28
  font-weight: 400;
29
29
  }
30
- .typography__primary-small_1ihwl {
30
+ .typography__primary-small_15q31 {
31
31
  font-size: 14px;
32
32
  line-height: 20px;
33
33
  font-weight: 400;
34
34
  }
35
- .typography__secondary-large_1ihwl {
35
+ .typography__secondary-large_15q31 {
36
36
  font-size: 13px;
37
37
  line-height: 16px;
38
38
  font-weight: 400;
39
39
  }
40
- .typography__secondary-medium_1ihwl {
40
+ .typography__secondary-medium_15q31 {
41
41
  font-size: 12px;
42
42
  line-height: 16px;
43
43
  font-weight: 400;
44
44
  }
45
- .typography__secondary-small_1ihwl {
45
+ .typography__secondary-small_15q31 {
46
46
  font-size: 11px;
47
47
  line-height: 16px;
48
48
  font-weight: 400;
49
49
  }
50
- .typography__component_1ihwl {
50
+ .typography__component_15q31 {
51
51
  font-size: 16px;
52
52
  line-height: 20px;
53
53
  font-weight: 400;
54
54
  }
55
- .typography__caps_1ihwl {
55
+ .typography__caps_15q31 {
56
56
  font-size: 12px;
57
57
  line-height: 16px;
58
58
  font-weight: 500;
59
59
  letter-spacing: 1.25px;
60
60
  text-transform: uppercase;
61
61
  }
62
- .typography__bold_1ihwl {
62
+ .typography__bold_15q31 {
63
63
  font-weight: bold;
64
64
  }
65
- .typography__medium_1ihwl {
65
+ .typography__medium_15q31 {
66
66
  font-weight: 500;
67
67
  }
68
- .typography__regular_1ihwl {
68
+ .typography__regular_15q31 {
69
69
  font-weight: normal;
70
70
  }
71
+ .typography__monospace_15q31 {
72
+ font-feature-settings: "tnum";
73
+ font-variant-numeric: tabular-nums;
74
+ }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../colors.module-9d3e0282.js');
5
+ require('../colors.module-35c48cf7.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  var text_component = require('./component.js');
@@ -1,17 +1,17 @@
1
- /* hash: 1njcy */
2
- .typography__component_1njcy {
1
+ /* hash: t6jlg */
2
+ .typography__component_1mh7d {
3
3
  margin: 0;
4
4
  padding: 0;
5
5
  }
6
6
 
7
- .typography__bold_1njcy {
7
+ .typography__bold_1mh7d {
8
8
  font-weight: bold;
9
9
  }
10
10
 
11
- .typography__medium_1njcy {
11
+ .typography__medium_1mh7d {
12
12
  font-weight: 500;
13
13
  }
14
14
 
15
- .typography__regular_1njcy {
15
+ .typography__regular_1mh7d {
16
16
  font-weight: normal;
17
17
  }
@@ -46,5 +46,43 @@ type Styles = {
46
46
  [key: string]: string;
47
47
  };
48
48
  };
49
- declare const Title: React.FC<TitleProps & Styles>;
49
+ type TitleElementType = HTMLHeadingElement | HTMLDivElement;
50
+ declare const Title: React.ForwardRefExoticComponent<Pick<NativeProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
51
+ /**
52
+ * HTML тег
53
+ */
54
+ tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
55
+ /**
56
+ * [Вариант начертания](https://alfa-laboratory.github.io/core-components/master/?path=/docs/гайдлайны-типографика--page)
57
+ */
58
+ view?: "medium" | "small" | "xlarge" | "large" | "xsmall" | undefined;
59
+ /**
60
+ * Цвет текста
61
+ */
62
+ color?: "tertiary" | "disabled" | "accent" | "primary" | "attention" | "positive" | "secondary" | "tertiary-inverted" | "primary-inverted" | "secondary-inverted" | "link" | "negative" | undefined;
63
+ /**
64
+ * Толщина шрифта
65
+ */
66
+ weight?: "regular" | "medium" | "bold" | undefined;
67
+ /**
68
+ * Шрифт текста
69
+ */
70
+ font?: "styrene" | "system" | undefined;
71
+ /**
72
+ * Добавляет отступы
73
+ */
74
+ defaultMargins?: boolean | undefined;
75
+ /**
76
+ * Css-класс для стилизации (native prop)
77
+ */
78
+ className?: string | undefined;
79
+ /**
80
+ * Id компонента для тестов
81
+ */
82
+ dataTestId?: string | undefined;
83
+ /**
84
+ * Контент (native prop)
85
+ */
86
+ children?: React.ReactNode;
87
+ } & Styles & React.RefAttributes<TitleElementType>>;
50
88
  export { TitleProps, Title };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var colors_module = require('../colors.module-9d3e0282.js');
5
+ var colors_module = require('../colors.module-35c48cf7.js');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
 
@@ -11,9 +11,9 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
11
11
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
12
  var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
13
13
 
14
- var Title = function (_a) {
14
+ var Title = React.forwardRef(function (_a, ref) {
15
15
  var _b = _a.tag, Component = _b === void 0 ? 'div' : _b, _c = _a.view, view = _c === void 0 ? 'medium' : _c, _d = _a.font, font = _d === void 0 ? 'styrene' : _d, _e = _a.weight, weight = _e === void 0 ? font === 'styrene' ? 'medium' : 'bold' : _e, _f = _a.defaultMargins, defaultMargins = _f === void 0 ? false : _f, color = _a.color, className = _a.className, dataTestId = _a.dataTestId, children = _a.children, styles = _a.styles, restProps = colors_module.__rest(_a, ["tag", "view", "font", "weight", "defaultMargins", "color", "className", "dataTestId", "children", "styles"]);
16
- return (React__default['default'].createElement(Component, colors_module.__assign({ className: cn__default['default'](styles.component, className, styles[font + "-" + view], defaultMargins && styles["margins-" + view], styles[weight], color && colors_module.colors[color]), "data-test-id": dataTestId }, restProps), children));
17
- };
16
+ return (React__default['default'].createElement(Component, colors_module.__assign({ className: cn__default['default'](styles.component, className, styles[font + "-" + view], defaultMargins && styles["margins-" + view], styles[weight], color && colors_module.colors[color]), "data-test-id": dataTestId, ref: ref }, restProps), children));
17
+ });
18
18
 
19
19
  exports.Title = Title;