@semcore/typography 5.54.0-prerelease.1 → 5.54.0-prerelease.5

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 (70) hide show
  1. package/lib/cjs/components/Blockquote/Blockquote.js +37 -0
  2. package/lib/cjs/components/Blockquote/Blockquote.js.map +1 -0
  3. package/lib/cjs/components/Blockquote/Blockquote.type.js +2 -0
  4. package/lib/cjs/components/Blockquote/Blockquote.type.js.map +1 -0
  5. package/lib/cjs/{List.js → components/List/List.js} +26 -36
  6. package/lib/cjs/components/List/List.js.map +1 -0
  7. package/lib/cjs/components/List/List.type.js +2 -0
  8. package/lib/cjs/components/List/List.type.js.map +1 -0
  9. package/lib/cjs/components/Text/Text.js +185 -0
  10. package/lib/cjs/components/Text/Text.js.map +1 -0
  11. package/lib/cjs/components/Text/Text.type.js +2 -0
  12. package/lib/cjs/components/Text/Text.type.js.map +1 -0
  13. package/lib/cjs/index.js +45 -11
  14. package/lib/cjs/index.js.map +1 -1
  15. package/lib/cjs/style/text.shadow.css +367 -1
  16. package/lib/es6/components/Blockquote/Blockquote.js +32 -0
  17. package/lib/es6/components/Blockquote/Blockquote.js.map +1 -0
  18. package/lib/es6/components/Blockquote/Blockquote.type.js +2 -0
  19. package/lib/es6/components/Blockquote/Blockquote.type.js.map +1 -0
  20. package/lib/es6/{List.js → components/List/List.js} +22 -29
  21. package/lib/es6/components/List/List.js.map +1 -0
  22. package/lib/es6/components/List/List.type.js +2 -0
  23. package/lib/es6/components/List/List.type.js.map +1 -0
  24. package/lib/es6/components/Text/Text.js +180 -0
  25. package/lib/es6/components/Text/Text.js.map +1 -0
  26. package/lib/es6/components/Text/Text.type.js +2 -0
  27. package/lib/es6/components/Text/Text.type.js.map +1 -0
  28. package/lib/es6/index.js +6 -4
  29. package/lib/es6/index.js.map +1 -1
  30. package/lib/es6/style/text.shadow.css +367 -1
  31. package/lib/esm/components/Blockquote/Blockquote.mjs +36 -0
  32. package/lib/esm/components/Blockquote/Blockquote.type.mjs +1 -0
  33. package/lib/esm/{List.mjs → components/List/List.mjs} +30 -37
  34. package/lib/esm/components/List/List.type.mjs +1 -0
  35. package/lib/esm/components/Text/Text.mjs +172 -0
  36. package/lib/esm/components/Text/Text.type.mjs +1 -0
  37. package/lib/esm/index.mjs +6 -5
  38. package/lib/esm/style/text.shadow.css +367 -1
  39. package/lib/types/components/Blockquote/Blockquote.d.ts +3 -0
  40. package/lib/types/components/Blockquote/Blockquote.type.d.ts +12 -0
  41. package/lib/types/components/List/List.d.ts +3 -0
  42. package/lib/types/components/List/List.type.d.ts +34 -0
  43. package/lib/types/components/Text/Text.d.ts +3 -0
  44. package/lib/types/components/Text/Text.type.d.ts +82 -0
  45. package/lib/types/index.d.ts +6 -117
  46. package/package.json +5 -5
  47. package/lib/cjs/Blockquote.js +0 -38
  48. package/lib/cjs/Blockquote.js.map +0 -1
  49. package/lib/cjs/Hint.js +0 -89
  50. package/lib/cjs/Hint.js.map +0 -1
  51. package/lib/cjs/List.js.map +0 -1
  52. package/lib/cjs/Text.js +0 -80
  53. package/lib/cjs/Text.js.map +0 -1
  54. package/lib/cjs/index.d.js +0 -2
  55. package/lib/cjs/index.d.js.map +0 -1
  56. package/lib/cjs/style/hint.shadow.css +0 -51
  57. package/lib/es6/Blockquote.js +0 -31
  58. package/lib/es6/Blockquote.js.map +0 -1
  59. package/lib/es6/Hint.js +0 -83
  60. package/lib/es6/Hint.js.map +0 -1
  61. package/lib/es6/List.js.map +0 -1
  62. package/lib/es6/Text.js +0 -73
  63. package/lib/es6/Text.js.map +0 -1
  64. package/lib/es6/index.d.js +0 -2
  65. package/lib/es6/index.d.js.map +0 -1
  66. package/lib/es6/style/hint.shadow.css +0 -51
  67. package/lib/esm/Blockquote.mjs +0 -37
  68. package/lib/esm/Hint.mjs +0 -81
  69. package/lib/esm/Text.mjs +0 -78
  70. package/lib/esm/style/hint.shadow.css +0 -51
@@ -1,21 +1,379 @@
1
1
  SText {
2
2
  padding: 0;
3
3
  margin: 0;
4
+
5
+ &[formatTags] {
6
+
7
+ & abbr {
8
+ color: var(--intergalactic-text-secondary, oklch(0.088 0.026 147.7 / 0.583));
9
+ text-decoration: underline dashed var(--intergalactic-text-secondary, oklch(0.088 0.026 147.7 / 0.583));
10
+
11
+ &:active,
12
+ &:hover,
13
+ &:focus {
14
+ outline: none;
15
+ color: var(--intergalactic-text-hint-hover-active, oklch(0.086 0.026 145.8 / 0.605));
16
+ text-decoration: underline dashed var(--intergalactic-text-hint-hover-active, oklch(0.086 0.026 145.8 / 0.605));
17
+ }
18
+ }
19
+
20
+ & a {
21
+ display: inline;
22
+ background: none;
23
+ outline: none;
24
+ text-decoration: none;
25
+ color: var(--intergalactic-text-link, oklch(0.53 0.21 263));
26
+ border-bottom-width: 1px;
27
+ border-bottom-style: solid;
28
+ border-color: transparent;
29
+
30
+ &:active,
31
+ &:hover {
32
+ outline: none;
33
+ text-decoration: none;
34
+ color: var(--intergalactic-text-link-hover-active, oklch(0.51 0.202 263));
35
+ border-color: var(--intergalactic-text-link-hover-active, oklch(0.51 0.202 263));
36
+ }
37
+
38
+ &:focus {
39
+ @mixin focus-outline-mixin;
40
+ }
41
+ }
42
+
43
+ & code,
44
+ & pre {
45
+ font-family: Consolas, 'Roboto Mono', Menlo, Courier, monospace;
46
+ }
47
+
48
+ & blockquote {
49
+ position: relative;
50
+ /* disable-tokens-validator */
51
+ padding-left: 51px;
52
+ font-size: var(--intergalactic-fs-400, 20px);
53
+ line-height: var(--intergalactic-lh-400, 120%);
54
+ font-style: italic;
55
+
56
+ &:before {
57
+ content: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNyIgaGVpZ2h0PSIxOSIgdmlld0JveD0iMCAwIDI3IDE5IiBmaWxsPSJub25lIj4KPHBhdGggZD0iTTguODI0MjIgMC45NDcyNjZWMi4zMDg1OUM2Ljg3NjMgMy4zMjY4MiA1LjQ4MTc3IDQuMzg5MzIgNC42NDA2MiA1LjQ5NjA5QzMuNzk5NDggNi42MDI4NiAzLjM3ODkxIDcuODA5MjQgMy4zNzg5MSA5LjExNTIzQzMuMzc4OTEgOS44ODk5NyAzLjQ4OTU4IDEwLjQyMTIgMy43MTA5NCAxMC43MDlDMy45MTAxNiAxMS4wMTg5IDQuMTUzNjUgMTEuMTczOCA0LjQ0MTQxIDExLjE3MzhDNC43MjkxNyAxMS4xNzM4IDUuMTE2NTQgMTEuMDk2NCA1LjYwMzUyIDEwLjk0MTRDNi4wOTA0OSAxMC43NjQzIDYuNTMzMiAxMC42NzU4IDYuOTMxNjQgMTAuNjc1OEM3LjgzOTE5IDEwLjY3NTggOC42MjUgMTEuMDE4OSA5LjI4OTA2IDExLjcwNTFDOS45NzUyNiAxMi4zNjkxIDEwLjMxODQgMTMuMTg4MiAxMC4zMTg0IDE0LjE2MjFDMTAuMzE4NCAxNS4yMjQ2IDkuOTA4ODUgMTYuMTQzMiA5LjA4OTg0IDE2LjkxOEM4LjI3MDgzIDE3LjY3MDYgNy4yNTI2IDE4LjA0NjkgNi4wMzUxNiAxOC4wNDY5QzQuNTUyMDggMTguMDQ2OSAzLjIxMjg5IDE3LjQwNDkgMi4wMTc1OCAxNi4xMjExQzAuODIyMjY2IDE0LjgzNzIgMC4yMjQ2MDkgMTMuMjU0NiAwLjIyNDYwOSAxMS4zNzNDMC4yMjQ2MDkgOS4xNTk1MSAwLjk1NTA3OCA3LjEwMDkxIDIuNDE2MDIgNS4xOTcyN0MzLjg5OTA5IDMuMjcxNDggNi4wMzUxNiAxLjg1NDgyIDguODI0MjIgMC45NDcyNjZaTTI0LjY2MjEgMS4wNDY4OFYyLjMwODU5QzIyLjQyNjQgMy41OTI0NSAyMC45NTQ0IDQuNzQzNDkgMjAuMjQ2MSA1Ljc2MTcyQzE5LjUzNzggNi43Nzk5NSAxOS4xODM2IDcuOTc1MjYgMTkuMTgzNiA5LjM0NzY2QzE5LjE4MzYgOS45Njc0NSAxOS4zMDUzIDEwLjQzMjMgMTkuNTQ4OCAxMC43NDIyQzE5Ljc5MjMgMTEuMDUyMSAyMC4wNDY5IDExLjIwNyAyMC4zMTI1IDExLjIwN0MyMC41NTYgMTEuMjA3IDIwLjkyMTIgMTEuMTE4NSAyMS40MDgyIDEwLjk0MTRDMjEuODk1MiAxMC43NjQzIDIyLjM4MjIgMTAuNjc1OCAyMi44NjkxIDEwLjY3NThDMjMuNzc2NyAxMC42NzU4IDI0LjU2MjUgMTEuMDA3OCAyNS4yMjY2IDExLjY3MTlDMjUuOTEyOCAxMi4zMTM4IDI2LjI1NTkgMTMuMTEwNyAyNi4yNTU5IDE0LjA2MjVDMjYuMjU1OSAxNS4xNDcxIDI1LjgyNDIgMTYuMDg3OSAyNC45NjA5IDE2Ljg4NDhDMjQuMTE5OCAxNy42ODE2IDIzLjA3OTQgMTguMDgwMSAyMS44Mzk4IDE4LjA4MDFDMjAuMzc4OSAxOC4wODAxIDE5LjA2MTggMTcuNDQ5MiAxNy44ODg3IDE2LjE4NzVDMTYuNzE1NSAxNC45MjU4IDE2LjEyODkgMTMuMzU0MiAxNi4xMjg5IDExLjQ3MjdDMTYuMTI4OSA5LjE0ODQ0IDE2Ljg3MDQgNy4wMzQ1MSAxOC4zNTM1IDUuMTMwODZDMTkuODM2NiAzLjIwNTA4IDIxLjkzOTUgMS44NDM3NSAyNC42NjIxIDEuMDQ2ODhaIiBmaWxsPSIjQTlBQkI2Ii8+Cjwvc3ZnPg==);
58
+ display: inline-block;
59
+ position: absolute;
60
+ left: 0;
61
+ color: var(--intergalactic-icon-secondary-neutral, oklch(0.104 0.023 162.3 / 0.385));
62
+ font-family: Georgia, Times, 'Times New Roman', serif;
63
+ }
64
+
65
+ & cite {
66
+ display: block;
67
+ font-style: normal;
68
+ margin-top: var(--intergalactic-spacing-4x, 16px);
69
+ color: var(--intergalactic-text-secondary, oklch(0.088 0.026 147.7 / 0.583));
70
+ font-size: var(--intergalactic-fs-300, 16px);
71
+ line-height: var(--intergalactic-lh-300, 150%);
72
+ }
73
+ }
74
+
75
+ & ol:not(ol[start], ol[reversed], ol[type]),
76
+ & ul:not(ul[start], ul[reversed], ul[type]) {
77
+ margin: var(--intergalactic-spacing-2x, 8px) 0;
78
+ padding: 0;
79
+ list-style: none;
80
+ position: relative;
81
+
82
+ & li:not(SText) {
83
+ &:before {
84
+ position: absolute;
85
+ left: 0;
86
+ color: var(--intergalactic-text-secondary, oklch(0.088 0.026 147.7 / 0.583));
87
+ }
88
+ }
89
+
90
+ & li:not(SText) + li:not(SText) {
91
+ margin: var(--intergalactic-spacing-2x, 8px) 0 0 0;
92
+ }
93
+ }
94
+
95
+ & ol:not(ol[start], ol[reversed], ol[type]) {
96
+ counter-reset: item 0;
97
+
98
+ & li:not(SText):before {
99
+ counter-increment: item;
100
+ content: counters(item, '.');
101
+ }
102
+ }
103
+
104
+ & ul:not(ul[start], ul[reversed], ul[type]) li:not(SText):before {
105
+ content: '';
106
+ background-color: var(--intergalactic-icon-primary-neutral, oklch(0.092 0.024 152.2 / 0.526));
107
+ }
108
+
109
+ & ol:not(ol[start], ol[reversed], ol[type]):has(+ p),
110
+ & ul:not(ul[start], ul[reversed], ul[type]):has(+ p) {
111
+ margin-bottom: var(--intergalactic-spacing-4x, 16px);
112
+ }
113
+
114
+ & h1 {
115
+ font-size: var(--intergalactic-fs-800, 48px);
116
+ line-height: var(--intergalactic-lh-800, 117%);
117
+ font-weight: var(--intergalactic-semi-bold, 600);
118
+ margin: 0 0 var(--intergalactic-spacing-6x, 24px) 0;
119
+
120
+ &:only-child {
121
+ margin-bottom: 0;
122
+ }
123
+ }
124
+
125
+ & h2 {
126
+ font-size: var(--intergalactic-fs-700, 36px);
127
+ line-height: var(--intergalactic-lh-700, 110%);
128
+ font-weight: var(--intergalactic-semi-bold, 600);
129
+ margin: 0 0 var(--intergalactic-spacing-4x, 16px) 0;
130
+
131
+ &:only-child {
132
+ margin-bottom: 0;
133
+ }
134
+ }
135
+
136
+ & h3 {
137
+ font-size: var(--intergalactic-fs-600, 32px);
138
+ line-height: var(--intergalactic-lh-600, 125%);
139
+ font-weight: var(--intergalactic-semi-bold, 600);
140
+ margin: 0 0 var(--intergalactic-spacing-4x, 16px) 0;
141
+
142
+ &:only-child {
143
+ margin-bottom: 0;
144
+ }
145
+ }
146
+
147
+ & h4 {
148
+ font-size: var(--intergalactic-fs-500, 24px);
149
+ line-height: var(--intergalactic-lh-500, 117%);
150
+ font-weight: var(--intergalactic-semi-bold, 600);
151
+ margin: 0 0 var(--intergalactic-spacing-3x, 12px) 0;
152
+
153
+ &:only-child {
154
+ margin-bottom: 0;
155
+ }
156
+ }
157
+
158
+ & h5 {
159
+ font-size: var(--intergalactic-fs-400, 20px);
160
+ line-height: var(--intergalactic-lh-400, 120%);
161
+ font-weight: var(--intergalactic-semi-bold, 600);
162
+ margin: 0 0 var(--intergalactic-spacing-2x, 8px) 0;
163
+
164
+ &:only-child {
165
+ margin-bottom: 0;
166
+ }
167
+ }
168
+
169
+ & h6 {
170
+ font-size: var(--intergalactic-fs-300, 16px);
171
+ line-height: var(--intergalactic-lh-300, 150%);
172
+ font-weight: var(--intergalactic-bold, 700);
173
+ margin: 0 0 var(--intergalactic-spacing-1x, 4px) 0;
174
+
175
+ &:only-child {
176
+ margin-bottom: 0;
177
+ }
178
+ }
179
+
180
+ & h1,
181
+ & h2,
182
+ & h3,
183
+ & h4,
184
+ & h5,
185
+ & h6 {
186
+ & small {
187
+ color: var(--intergalactic-text-secondary, oklch(0.088 0.026 147.7 / 0.583));
188
+ font-weight: 300;
189
+ font-size: 100%;
190
+ }
191
+ }
192
+
193
+ & p,
194
+ & li {
195
+ font-size: var(--intergalactic-fs-200, 14px);
196
+ line-height: var(--intergalactic-lh-200, 142%);
197
+ }
198
+
199
+ & p {
200
+ margin: 0 0 var(--intergalactic-spacing-4x, 16px) 0;
201
+
202
+ &:last-child {
203
+ margin-bottom: 0;
204
+ }
205
+ }
206
+
207
+ & li {
208
+ padding-left: calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px));
209
+ }
210
+
211
+ & ol ol li {
212
+ padding-left: calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-05x, 2px));
213
+ }
214
+
215
+ & ol ol ol li {
216
+ padding-left: calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-1x, 4px) + var(--intergalactic-spacing-05x, 2px));
217
+ }
218
+
219
+ & ul li:before {
220
+ width: 4px;
221
+ height: 4px;
222
+ border-radius: 50%;
223
+ /* disable-tokens-validator */
224
+ margin-top: calc(var(--intergalactic-spacing-2x, 8px) - 1px);
225
+ margin-left: var(--intergalactic-spacing-05x, 2px);
226
+ }
227
+ }
228
+ }
229
+
230
+ SText[ellipsis] {
231
+ overflow: hidden;
232
+ text-overflow: ellipsis;
233
+ white-space: pre;
234
+ display: inline-block;
235
+ line-height: unset;
236
+ vertical-align: top;
237
+
238
+ &[trim='end'][isEllipsized]::after {
239
+ content: '';
240
+ display: block;
241
+ }
242
+
243
+ &[maxLine] {
244
+ -webkit-line-clamp: var(--maxLine);
245
+ display: -webkit-box;
246
+ -webkit-box-orient: vertical;
247
+ white-space: normal;
248
+ overflow-wrap: break-word;
249
+ }
250
+ &[trim='middle'] {
251
+ text-overflow: unset;
252
+ }
4
253
  }
5
254
 
6
255
  SText[size='100'] {
7
256
  font-size: var(--intergalactic-fs-100, 12px);
8
257
  line-height: var(--intergalactic-lh-100, 133%);
258
+
259
+ &[formatTags] {
260
+ & p,
261
+ & li {
262
+ font-size: var(--intergalactic-fs-100, 12px);
263
+ line-height: var(--intergalactic-lh-100, 133%);
264
+ }
265
+
266
+ & p {
267
+ margin: 0 0 calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px)) 0;
268
+
269
+ &:last-child {
270
+ margin-bottom: 0;
271
+ }
272
+ }
273
+
274
+ & li {
275
+ padding-left: calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px));
276
+ }
277
+
278
+ & ol ol li {
279
+ padding-left: calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-05x, 2px));
280
+ }
281
+
282
+ & ol ol ol li {
283
+ padding-left: calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-1x, 4px) + var(--intergalactic-spacing-05x, 2px));
284
+ }
285
+
286
+ & ul li:before {
287
+ width: 3px;
288
+ height: 3px;
289
+ border-radius: 50%;
290
+ margin-top: var(--intergalactic-spacing-2x, 8px);
291
+ margin-left: var(--intergalactic-spacing-05x, 2px);
292
+ }
293
+ }
9
294
  }
10
295
 
11
296
  SText[size='200'] {
12
297
  font-size: var(--intergalactic-fs-200, 14px);
13
298
  line-height: var(--intergalactic-lh-200, 142%);
299
+
300
+ &[formatTags] {
301
+ & p,
302
+ & li {
303
+ font-size: var(--intergalactic-fs-200, 14px);
304
+ line-height: var(--intergalactic-lh-200, 142%);
305
+ }
306
+
307
+ & p {
308
+ margin: 0 0 var(--intergalactic-spacing-3x, 12px) 0;
309
+
310
+ &:last-child {
311
+ margin-bottom: 0;
312
+ }
313
+ }
314
+
315
+ & li {
316
+ padding-left: calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px));
317
+ }
318
+
319
+ & ol ol li {
320
+ padding-left: calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-05x, 2px));
321
+ }
322
+
323
+ & ol ol ol li {
324
+ padding-left: calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-1x, 4px) + var(--intergalactic-spacing-05x, 2px));
325
+ }
326
+
327
+ & ul li:before {
328
+ width: 4px;
329
+ height: 4px;
330
+ border-radius: 50%;
331
+ /* disable-tokens-validator */
332
+ margin-top: calc(var(--intergalactic-spacing-2x, 8px) - 1px);
333
+ margin-left: var(--intergalactic-spacing-05x, 2px);
334
+ }
335
+ }
14
336
  }
15
337
 
16
338
  SText[size='300'] {
17
339
  font-size: var(--intergalactic-fs-300, 16px);
18
340
  line-height: var(--intergalactic-lh-300, 150%);
341
+
342
+ &[formatTags] {
343
+ & p,
344
+ & li {
345
+ font-size: var(--intergalactic-fs-300, 16px);
346
+ line-height: var(--intergalactic-lh-300, 150%);
347
+ }
348
+
349
+ & p {
350
+ margin: 0 0 var(--intergalactic-spacing-4x, 16px) 0;
351
+
352
+ &:last-child {
353
+ margin-bottom: 0;
354
+ }
355
+ }
356
+
357
+ & li {
358
+ padding-left: calc(var(--intergalactic-spacing-4x, 16px) + var(--intergalactic-spacing-05x, 2px));
359
+ }
360
+
361
+ & ol ol li {
362
+ padding-left: calc(var(--intergalactic-spacing-6x, 24px) + var(--intergalactic-spacing-05x, 2px));
363
+ }
364
+
365
+ & ol ol ol li {
366
+ padding-left: calc(var(--intergalactic-spacing-8x, 32px) + var(--intergalactic-spacing-1x, 4px) + var(--intergalactic-spacing-05x, 2px));
367
+ }
368
+
369
+ & ul li:before {
370
+ width: 5px;
371
+ height: 5px;
372
+ border-radius: 50%;
373
+ margin-top: calc(var(--intergalactic-spacing-2x, 8px) + var(--intergalactic-spacing-05x, 2px));
374
+ margin-left: var(--intergalactic-spacing-05x, 2px);
375
+ }
376
+ }
19
377
  }
20
378
 
21
379
  SText[size='400'] {
@@ -115,4 +473,12 @@ SText[use='secondary'] {
115
473
 
116
474
  SText[disabled] {
117
475
  opacity: var(--intergalactic-disabled-opacity, 0.4);
118
- }
476
+ }
477
+
478
+ @media (prefers-reduced-motion) {
479
+ SText {
480
+ & a {
481
+ transition: none;
482
+ }
483
+ }
484
+ }
@@ -0,0 +1,3 @@
1
+ import type { NSBlockquote } from './Blockquote.type';
2
+ declare const Blockquote: NSBlockquote.Component;
3
+ export default Blockquote;
@@ -0,0 +1,12 @@
1
+ import type { BoxProps } from '@semcore/base-components';
2
+ import type { Intergalactic } from '@semcore/core';
3
+ declare namespace NSBlockquote {
4
+ type Props = BoxProps & {
5
+ /** Source of the quote */
6
+ author?: React.ReactNode;
7
+ };
8
+ type Component = Intergalactic.Component<'blockquote', Props>;
9
+ }
10
+ /** @deprecated It will be removed in v18. */
11
+ export type BlockquoteProps = NSBlockquote.Props;
12
+ export type { NSBlockquote };
@@ -0,0 +1,3 @@
1
+ import type { NSList } from './List.type';
2
+ declare const List: NSList.Component;
3
+ export default List;
@@ -0,0 +1,34 @@
1
+ import type { Flex, FlexProps } from '@semcore/base-components';
2
+ import type { Intergalactic } from '@semcore/core';
3
+ import type React from 'react';
4
+ import type { NSText } from '../Text/Text.type';
5
+ declare namespace NSList {
6
+ type Props = NSText.Props & {
7
+ /** Marker of the entire list
8
+ * @default • */
9
+ marker?: React.ReactNode;
10
+ };
11
+ namespace Item {
12
+ type Props = NSText.Props & {
13
+ /** Individual marker of a list item */
14
+ marker?: React.ReactNode;
15
+ };
16
+ namespace Content {
17
+ type Props = FlexProps;
18
+ type Component = Intergalactic.Component<typeof Flex, Props>;
19
+ }
20
+ type Component = Intergalactic.Component<'li', Props> & {
21
+ Content: Content.Component;
22
+ };
23
+ }
24
+ type Component = Intergalactic.Component<'ul', Props> & {
25
+ Item: Item.Component;
26
+ };
27
+ }
28
+ /** @deprecated It will be removed in v18. */
29
+ export type ListItemProps = NSList.Item.Props;
30
+ /** @deprecated It will be removed in v18. */
31
+ export type ListItemContentProps = NSList.Item.Content.Props;
32
+ /** @deprecated It will be removed in v18. */
33
+ export type ListProps = NSList.Props;
34
+ export type { NSList };
@@ -0,0 +1,3 @@
1
+ import type { NSText } from './Text.type';
2
+ declare const Text: NSText.Component;
3
+ export default Text;
@@ -0,0 +1,82 @@
1
+ import type { BoxProps, EllipsisSettings, SimpleHintPopperProps, Ellipsis as EllipsisInstance } from '@semcore/base-components';
2
+ import type { Intergalactic } from '@semcore/core';
3
+ import type { Property } from 'csstype';
4
+ declare namespace NSText {
5
+ type BaseProps = {
6
+ /** Font size and line-heights */
7
+ size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
8
+ /**
9
+ * The text will not be wrapped on a new line and will be cut off with ellipsis
10
+ * @deprecated use ellipsis prop instead
11
+ **/
12
+ noWrap?: boolean;
13
+ /** CSS property `font-weight: 700;` */
14
+ bold?: boolean;
15
+ /** CSS property `font-weight: 600;` */
16
+ semibold?: boolean;
17
+ /** CSS property `font-weight: 500;` */
18
+ medium?: boolean;
19
+ /** Italicized text */
20
+ italic?: boolean;
21
+ /** Underlined text */
22
+ underline?: boolean;
23
+ /** CSS property `font-family: monospace;` */
24
+ monospace?: boolean;
25
+ /** Strikethrough text */
26
+ lineThrough?: boolean;
27
+ /** Uppercase text */
28
+ uppercase?: boolean;
29
+ /** Lowercase text */
30
+ lowercase?: boolean;
31
+ /** Capitalized text */
32
+ capitalize?: boolean;
33
+ /** Text color **/
34
+ color?: string;
35
+ /** Custom `font-size` */
36
+ fontSize?: Property.FontSize<any>;
37
+ /** Custom `line-height` */
38
+ lineHeight?: Property.LineHeight<any>;
39
+ /** Custom `font-weight` */
40
+ fontWeight?: Property.FontWeight;
41
+ /** Text alignment */
42
+ textAlign?: Property.TextAlign;
43
+ /** Enforces text color */
44
+ use?: 'primary' | 'secondary';
45
+ /** Makes text semi-transparent to indicate disabled state */
46
+ disabled?: boolean;
47
+ };
48
+ type HintProps = {
49
+ /** Manually enabled/disabled Hint */
50
+ hint?: boolean;
51
+ } & {
52
+ [K in keyof SimpleHintPopperProps as `hint:${string & K}`]?: SimpleHintPopperProps[K];
53
+ };
54
+ type EllipsisProps = {
55
+ /** Manually enabled/disabled Ellipsis or provide an instance of it. */
56
+ ellipsis?: boolean | EllipsisInstance;
57
+ } & {
58
+ [K in keyof EllipsisSettings as `ellipsis:${string & K}`]?: EllipsisSettings[K];
59
+ };
60
+ type Props = BoxProps & NSText.BaseProps & ({
61
+ /** Enable formatting/styling for all nested HTML tags with our default styles for them */
62
+ formatTags?: boolean;
63
+ ellipsis?: never;
64
+ ellipsisProps?: never;
65
+ hint?: never;
66
+ hintProps?: never;
67
+ } | ({
68
+ formatTags?: never;
69
+ } & NSText.HintProps & NSText.EllipsisProps));
70
+ type Component = Intergalactic.Component<'span', Props>;
71
+ }
72
+ /** @deprecated It will be removed in v18. */
73
+ export type TextHintProps = NSText.HintProps;
74
+ /** @deprecated It will be removed in v18. */
75
+ export type TextEllipsisProps = NSText.EllipsisProps;
76
+ /** @deprecated It will be removed in v18. */
77
+ export type BaseTextProps = NSText.BaseProps;
78
+ /** @deprecated It will be removed in v18. */
79
+ export type TextProps = NSText.Props;
80
+ /** @deprecated It will be removed in v18. */
81
+ export type TextComponent = NSText.Component;
82
+ export type { NSText };
@@ -1,117 +1,6 @@
1
- import React from 'react';
2
- import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
3
-
4
- import { Property } from 'csstype';
5
- import { Box, BoxProps, Flex, FlexProps } from '@semcore/flex-box';
6
- import { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
7
-
8
- /** @deprecated */
9
- export interface ITextProps extends TextProps, UnknownProperties {}
10
- export type TextProps = BoxProps & {
11
- /** Font size and line-heights */
12
- size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
13
- /** The text will not be wrapped on a new line and will be cut off with ellipsis */
14
- noWrap?: boolean;
15
- /** CSS property `font-weight: 700;` */
16
- bold?: boolean;
17
- /** CSS property `font-weight: 600;` */
18
- semibold?: boolean;
19
- /** CSS property `font-weight: 500;` */
20
- medium?: boolean;
21
- /** Italicized text */
22
- italic?: boolean;
23
- /** Underlined text */
24
- underline?: boolean;
25
- /** CSS property `font-family: monospace;` */
26
- monospace?: boolean;
27
- /** Strikethrough text */
28
- lineThrough?: boolean;
29
- /** Uppercase text */
30
- uppercase?: boolean;
31
- /** Lowercase text */
32
- lowercase?: boolean;
33
- /** Capitalized text */
34
- capitalize?: boolean;
35
- /** Text color **/
36
- color?: string;
37
- /** Custom `font-size` */
38
- fontSize?: Property.FontSize<any>;
39
- /** Custom `line-height` */
40
- lineHeight?: Property.LineHeight<any>;
41
- /** Custom `font-weight` */
42
- fontWeight?: Property.FontWeight;
43
- /** Text alignment */
44
- textAlign?: Property.TextAlign;
45
- /** Enforces text color */
46
- use?: 'primary' | 'secondary';
47
- /** Makes text semi-transparent to indicate disabled state */
48
- disabled?: boolean;
49
- };
50
-
51
- /** @deprecated */
52
- export interface IListProps extends ListProps, UnknownProperties {}
53
- export type ListProps = TextProps & {
54
- /** Marker of the entire list
55
- * @default • */
56
- marker?: React.ReactNode;
57
- };
58
-
59
- /** @deprecated */
60
- export interface IListItemProps extends ListItemProps, UnknownProperties {}
61
- export type ListItemProps = TextProps & {
62
- /** Individual marker of a list item */
63
- marker?: React.ReactNode;
64
- };
65
-
66
- export type ListItemContentProps = FlexProps;
67
-
68
- /** @deprecated */
69
- export interface IListContext extends ListContext, UnknownProperties {}
70
- export type ListContext = {
71
- getItemProps: PropGetterFn;
72
- };
73
-
74
- /** @deprecated */
75
- export interface IHintProps extends HintProps, UnknownProperties {}
76
- export type TypographyHintProps = TextProps &
77
- KeyboardFocusProps & {
78
- /** The value responsible for the activity of the element
79
- * @default false
80
- */
81
- disabled?: boolean;
82
- /** Enable `active` state */
83
- active?: boolean;
84
- /** Left addon hint */
85
- addonLeft?: React.ElementType;
86
- /** Right addon hint */
87
- addonRight?: React.ElementType;
88
- };
89
-
90
- /** @deprecated use `TypographyHintProps` instead */
91
- export type HintProps = TypographyHintProps;
92
-
93
- /** @deprecated */
94
- export interface IBlockquoteProps extends BlockquoteProps, UnknownProperties {}
95
- export type BlockquoteProps = BoxProps & {
96
- /** Source of the quote */
97
- author?: React.ReactNode;
98
- };
99
-
100
- declare const Hint: Intergalactic.Component<'abbr', HintProps> & {
101
- Addon: typeof Box;
102
- Text: typeof Box;
103
- };
104
-
105
- declare const Item: Intergalactic.Component<'li', ListItemProps> & {
106
- Content: Intergalactic.Component<typeof Flex, ListItemContentProps>;
107
- };
108
-
109
- declare const List: Intergalactic.Component<'ul', ListProps> & {
110
- Item: typeof Item;
111
- };
112
-
113
- declare const Text: Intergalactic.Component<'span', TextProps>;
114
-
115
- declare const Blockquote: Intergalactic.Component<'blockquote', BlockquoteProps>;
116
-
117
- export { Text, List, Hint, Blockquote };
1
+ export { default as Text } from './components/Text/Text';
2
+ export { default as Blockquote } from './components/Blockquote/Blockquote';
3
+ export { default as List } from './components/List/List';
4
+ export * from './components/Text/Text.type';
5
+ export * from './components/Blockquote/Blockquote.type';
6
+ export * from './components/List/List.type';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/typography",
3
3
  "description": "Semrush Typography Component",
4
- "version": "5.54.0-prerelease.1",
4
+ "version": "5.54.0-prerelease.5",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,13 +14,13 @@
14
14
  "types": "./lib/types/index.d.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/utils": "4.49.0-prerelease.1",
18
- "@semcore/flex-box": "5.42.0-prerelease.1",
19
- "@semcore/icon": "4.63.0-prerelease.1",
17
+ "@semcore/utils": "4.49.0-prerelease.5",
18
+ "@semcore/flex-box": "5.42.0-prerelease.5",
19
+ "@semcore/icon": "4.63.0-prerelease.5",
20
20
  "csstype": "3.0.8"
21
21
  },
22
22
  "peerDependencies": {
23
- "@semcore/core": "^2.40.0-prerelease.1",
23
+ "@semcore/core": "^2.40.0-prerelease.5",
24
24
  "react": "16.8 - 18",
25
25
  "react-dom": "16.8 - 18"
26
26
  },