@vinyasa/typography 1.0.24 → 1.0.25

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 (50) hide show
  1. package/README.md +77 -2
  2. package/dist/cjs/caption.cjs +76 -12
  3. package/dist/cjs/caption.css +90 -0
  4. package/dist/cjs/heading.cjs +76 -12
  5. package/dist/cjs/heading.css +90 -0
  6. package/dist/cjs/highlight.cjs +700 -0
  7. package/dist/cjs/highlight.css +197 -0
  8. package/dist/cjs/index.cjs +583 -14
  9. package/dist/cjs/index.css +158 -0
  10. package/dist/cjs/label.cjs +76 -12
  11. package/dist/cjs/label.css +90 -0
  12. package/dist/cjs/link.cjs +76 -12
  13. package/dist/cjs/link.css +90 -0
  14. package/dist/cjs/list.cjs +431 -0
  15. package/dist/cjs/list.css +60 -0
  16. package/dist/cjs/mark.cjs +246 -0
  17. package/dist/cjs/mark.css +8 -0
  18. package/dist/cjs/markdown-renderer.cjs +76 -12
  19. package/dist/cjs/markdown-renderer.css +90 -0
  20. package/dist/cjs/paragraph.cjs +76 -12
  21. package/dist/cjs/paragraph.css +90 -0
  22. package/dist/cjs/text.cjs +76 -12
  23. package/dist/cjs/text.css +90 -0
  24. package/dist/esm/191.css +90 -0
  25. package/dist/esm/191.js +67 -11
  26. package/dist/esm/227.css +7 -0
  27. package/dist/esm/227.js +39 -0
  28. package/dist/esm/513.css +60 -0
  29. package/dist/esm/513.js +126 -0
  30. package/dist/esm/767.js +33 -0
  31. package/dist/esm/components/highlight/Highlight.d.ts +14 -0
  32. package/dist/esm/components/highlight/index.d.ts +1 -0
  33. package/dist/esm/components/list/List.css.d.ts +47 -0
  34. package/dist/esm/components/list/List.d.ts +52 -0
  35. package/dist/esm/components/list/index.d.ts +1 -0
  36. package/dist/esm/components/mark/Mark.css.d.ts +1 -0
  37. package/dist/esm/components/mark/Mark.d.ts +5 -0
  38. package/dist/esm/components/mark/index.d.ts +1 -0
  39. package/dist/esm/components/text/Text.css.d.ts +85 -1
  40. package/dist/esm/components/text/Text.d.ts +55 -9
  41. package/dist/esm/highlight.d.ts +2 -0
  42. package/dist/esm/highlight.js +1 -0
  43. package/dist/esm/index.d.ts +4 -0
  44. package/dist/esm/index.js +26 -0
  45. package/dist/esm/list.d.ts +2 -0
  46. package/dist/esm/list.js +1 -0
  47. package/dist/esm/mark.d.ts +2 -0
  48. package/dist/esm/mark.js +1 -0
  49. package/dist/esm/useIsTruncated.d.ts +15 -0
  50. package/package.json +25 -5
@@ -130,9 +130,99 @@
130
130
  ._4sie9wn {
131
131
  text-overflow: ellipsis;
132
132
  white-space: nowrap;
133
+ max-width: 100%;
134
+ display: inline-block;
133
135
  overflow: hidden;
134
136
  }
135
137
 
138
+ ._4sie9wo {
139
+ text-overflow: ellipsis;
140
+ white-space: nowrap;
141
+ text-align: left;
142
+ direction: rtl;
143
+ max-width: 100%;
144
+ display: inline-block;
145
+ overflow: hidden;
146
+ }
147
+
148
+ ._4sie9wp {
149
+ font-style: italic;
150
+ }
151
+
152
+ ._4sie9wq {
153
+ text-transform: uppercase;
154
+ }
155
+
156
+ ._4sie9wr {
157
+ text-transform: lowercase;
158
+ }
159
+
160
+ ._4sie9ws {
161
+ text-transform: capitalize;
162
+ }
163
+
164
+ ._4sie9wt {
165
+ text-transform: none;
166
+ }
167
+
168
+ ._4sie9wu {
169
+ text-decoration: underline;
170
+ }
171
+
172
+ ._4sie9wv {
173
+ text-decoration: line-through;
174
+ }
175
+
176
+ ._4sie9ww {
177
+ text-decoration: none;
178
+ }
179
+
180
+ ._4sie9wx {
181
+ letter-spacing: var(--vinyasa-letter-spacing-tight);
182
+ }
183
+
184
+ ._4sie9wy {
185
+ letter-spacing: var(--vinyasa-letter-spacing-normal);
186
+ }
187
+
188
+ ._4sie9wz {
189
+ letter-spacing: var(--vinyasa-letter-spacing-wide);
190
+ }
191
+
192
+ ._4sie9w10 {
193
+ line-height: var(--vinyasa-line-height-tight);
194
+ }
195
+
196
+ ._4sie9w11 {
197
+ line-height: var(--vinyasa-line-height-normal);
198
+ }
199
+
200
+ ._4sie9w12 {
201
+ line-height: var(--vinyasa-line-height-loose);
202
+ }
203
+
204
+ ._4sie9w13 {
205
+ text-wrap: wrap;
206
+ }
207
+
208
+ ._4sie9w14 {
209
+ text-wrap: balance;
210
+ }
211
+
212
+ ._4sie9w15 {
213
+ text-wrap: pretty;
214
+ }
215
+
216
+ ._4sie9w16 {
217
+ text-wrap: nowrap;
218
+ }
219
+
220
+ ._4sie9w17 {
221
+ color: rgba(0, 0, 0, 0);
222
+ -webkit-background-clip: text;
223
+ background-clip: text;
224
+ }
225
+
136
226
  ._15gjhvw0 {
137
227
  font-family: var(--vinyasa-font-family-mono);
138
228
  font-size: var(--vinyasa-font-size-sm);
@@ -154,6 +244,14 @@
154
244
  display: inline;
155
245
  }
156
246
 
247
+ .x8q83o0 {
248
+ background-color: var(--vinyasa-status-warning-bg);
249
+ color: var(--vinyasa-status-warning-text);
250
+ border-radius: var(--vinyasa-radius-sm);
251
+ padding-left: .2em;
252
+ padding-right: .2em;
253
+ }
254
+
157
255
  ._18ahdyj0 {
158
256
  font-family: var(--vinyasa-font-family-mono);
159
257
  font-size: var(--vinyasa-font-size-sm);
@@ -175,3 +273,63 @@
175
273
  text-decoration: underline;
176
274
  }
177
275
 
276
+ ._1ohxnc10 {
277
+ font-family: var(--vinyasa-font-family-sans);
278
+ font-size: var(--vinyasa-font-size-md);
279
+ color: var(--vinyasa-text-default);
280
+ flex-direction: column;
281
+ margin: 0;
282
+ display: flex;
283
+ }
284
+
285
+ ._1ohxnc11 {
286
+ gap: var(--vinyasa-space1);
287
+ }
288
+
289
+ ._1ohxnc12 {
290
+ gap: var(--vinyasa-space2);
291
+ }
292
+
293
+ ._1ohxnc13 {
294
+ gap: var(--vinyasa-space3);
295
+ }
296
+
297
+ ._1ohxnc14 {
298
+ gap: var(--vinyasa-space4);
299
+ }
300
+
301
+ ._1ohxnc15 {
302
+ gap: var(--vinyasa-space5);
303
+ }
304
+
305
+ ._1ohxnc16 {
306
+ gap: var(--vinyasa-space6);
307
+ }
308
+
309
+ ._1ohxnc17 {
310
+ padding-left: var(--vinyasa-space5);
311
+ }
312
+
313
+ ._1ohxnc18 {
314
+ padding-left: 0;
315
+ list-style: none;
316
+ }
317
+
318
+ ._1ohxnc1a {
319
+ align-items: flex-start;
320
+ gap: var(--vinyasa-space2);
321
+ list-style: none;
322
+ display: flex;
323
+ }
324
+
325
+ ._1ohxnc1b {
326
+ align-items: center;
327
+ }
328
+
329
+ ._1ohxnc1c {
330
+ flex-shrink: 0;
331
+ align-items: center;
332
+ line-height: 1;
333
+ display: inline-flex;
334
+ }
335
+
@@ -227,7 +227,41 @@ var Text_css_text = createRuntimeFn({
227
227
  error: '_4sie9wm'
228
228
  },
229
229
  truncate: {
230
- true: '_4sie9wn'
230
+ end: '_4sie9wn',
231
+ start: '_4sie9wo'
232
+ },
233
+ italic: {
234
+ true: '_4sie9wp'
235
+ },
236
+ textTransform: {
237
+ uppercase: '_4sie9wq',
238
+ lowercase: '_4sie9wr',
239
+ capitalize: '_4sie9ws',
240
+ none: '_4sie9wt'
241
+ },
242
+ decoration: {
243
+ underline: '_4sie9wu',
244
+ 'line-through': '_4sie9wv',
245
+ none: '_4sie9ww'
246
+ },
247
+ letterSpacing: {
248
+ tight: '_4sie9wx',
249
+ normal: '_4sie9wy',
250
+ wide: '_4sie9wz'
251
+ },
252
+ lineHeight: {
253
+ tight: '_4sie9w10',
254
+ normal: '_4sie9w11',
255
+ loose: '_4sie9w12'
256
+ },
257
+ textWrap: {
258
+ wrap: '_4sie9w13',
259
+ balance: '_4sie9w14',
260
+ pretty: '_4sie9w15',
261
+ nowrap: '_4sie9w16'
262
+ },
263
+ variant: {
264
+ gradient: '_4sie9w17'
231
265
  }
232
266
  },
233
267
  defaultVariants: {
@@ -319,13 +353,23 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
319
353
  let _ref = [
320
354
  _0,
321
355
  _1
322
- ], [_ref1, ..._rest] = _ref, { as: Component = 'span', size, weight, align, color, truncate, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = _object_without_properties(_ref1, [
356
+ ], [_ref1, ..._rest] = _ref, { as: Component = 'span', size, weight, align, color, truncate, italic, textTransform, decoration, letterSpacing, lineHeight, textWrap, variant, lineClamp, inherit, gradient, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = _object_without_properties(_ref1, [
323
357
  "as",
324
358
  "size",
325
359
  "weight",
326
360
  "align",
327
361
  "color",
328
362
  "truncate",
363
+ "italic",
364
+ "textTransform",
365
+ "decoration",
366
+ "letterSpacing",
367
+ "lineHeight",
368
+ "textWrap",
369
+ "variant",
370
+ "lineClamp",
371
+ "inherit",
372
+ "gradient",
329
373
  "m",
330
374
  "mt",
331
375
  "mr",
@@ -344,20 +388,24 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
344
388
  "style",
345
389
  "children"
346
390
  ]), [ref] = _rest;
391
+ var _gradient_deg;
347
392
  const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
348
- const classes = className ? `${Text_css_text({
393
+ const normalizedTruncate = true === truncate ? 'end' : false === truncate ? void 0 : truncate;
394
+ const variantArgs = {
349
395
  size,
350
396
  weight,
351
397
  align,
352
398
  color,
353
- truncate
354
- })} ${className}` : Text_css_text({
355
- size,
356
- weight,
357
- align,
358
- color,
359
- truncate
360
- });
399
+ truncate: normalizedTruncate,
400
+ italic,
401
+ textTransform,
402
+ decoration,
403
+ letterSpacing,
404
+ lineHeight,
405
+ textWrap,
406
+ variant
407
+ };
408
+ const classes = className ? `${Text_css_text(variantArgs)} ${className}` : Text_css_text(variantArgs);
361
409
  const spacingStyle = resolveSpacingStyle({
362
410
  m,
363
411
  mt,
@@ -374,10 +422,26 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
374
422
  px,
375
423
  py
376
424
  });
425
+ const inheritStyle = inherit ? {
426
+ fontFamily: 'inherit',
427
+ fontSize: 'inherit',
428
+ fontWeight: 'inherit',
429
+ color: 'inherit',
430
+ lineHeight: 'inherit'
431
+ } : void 0;
432
+ const gradientStyle = 'gradient' === variant && gradient ? {
433
+ backgroundImage: `linear-gradient(${String(null != (_gradient_deg = gradient.deg) ? _gradient_deg : 45)}deg, ${gradient.from}, ${gradient.to})`
434
+ } : void 0;
435
+ const lineClampStyle = void 0 !== lineClamp ? {
436
+ display: '-webkit-box',
437
+ WebkitLineClamp: lineClamp,
438
+ WebkitBoxOrient: 'vertical',
439
+ overflow: 'hidden'
440
+ } : void 0;
377
441
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, _object_spread_props(_object_spread({
378
442
  ref: themedRef,
379
443
  className: classes,
380
- style: _object_spread({}, spacingStyle, style)
444
+ style: _object_spread({}, spacingStyle, inheritStyle, gradientStyle, lineClampStyle, style)
381
445
  }, rest), {
382
446
  children: children
383
447
  }));
@@ -94,6 +94,96 @@
94
94
  ._4sie9wn {
95
95
  text-overflow: ellipsis;
96
96
  white-space: nowrap;
97
+ max-width: 100%;
98
+ display: inline-block;
97
99
  overflow: hidden;
98
100
  }
99
101
 
102
+ ._4sie9wo {
103
+ text-overflow: ellipsis;
104
+ white-space: nowrap;
105
+ text-align: left;
106
+ direction: rtl;
107
+ max-width: 100%;
108
+ display: inline-block;
109
+ overflow: hidden;
110
+ }
111
+
112
+ ._4sie9wp {
113
+ font-style: italic;
114
+ }
115
+
116
+ ._4sie9wq {
117
+ text-transform: uppercase;
118
+ }
119
+
120
+ ._4sie9wr {
121
+ text-transform: lowercase;
122
+ }
123
+
124
+ ._4sie9ws {
125
+ text-transform: capitalize;
126
+ }
127
+
128
+ ._4sie9wt {
129
+ text-transform: none;
130
+ }
131
+
132
+ ._4sie9wu {
133
+ text-decoration: underline;
134
+ }
135
+
136
+ ._4sie9wv {
137
+ text-decoration: line-through;
138
+ }
139
+
140
+ ._4sie9ww {
141
+ text-decoration: none;
142
+ }
143
+
144
+ ._4sie9wx {
145
+ letter-spacing: var(--vinyasa-letter-spacing-tight);
146
+ }
147
+
148
+ ._4sie9wy {
149
+ letter-spacing: var(--vinyasa-letter-spacing-normal);
150
+ }
151
+
152
+ ._4sie9wz {
153
+ letter-spacing: var(--vinyasa-letter-spacing-wide);
154
+ }
155
+
156
+ ._4sie9w10 {
157
+ line-height: var(--vinyasa-line-height-tight);
158
+ }
159
+
160
+ ._4sie9w11 {
161
+ line-height: var(--vinyasa-line-height-normal);
162
+ }
163
+
164
+ ._4sie9w12 {
165
+ line-height: var(--vinyasa-line-height-loose);
166
+ }
167
+
168
+ ._4sie9w13 {
169
+ text-wrap: wrap;
170
+ }
171
+
172
+ ._4sie9w14 {
173
+ text-wrap: balance;
174
+ }
175
+
176
+ ._4sie9w15 {
177
+ text-wrap: pretty;
178
+ }
179
+
180
+ ._4sie9w16 {
181
+ text-wrap: nowrap;
182
+ }
183
+
184
+ ._4sie9w17 {
185
+ color: rgba(0, 0, 0, 0);
186
+ -webkit-background-clip: text;
187
+ background-clip: text;
188
+ }
189
+
package/dist/cjs/link.cjs CHANGED
@@ -227,7 +227,41 @@ var Text_css_text = createRuntimeFn({
227
227
  error: '_4sie9wm'
228
228
  },
229
229
  truncate: {
230
- true: '_4sie9wn'
230
+ end: '_4sie9wn',
231
+ start: '_4sie9wo'
232
+ },
233
+ italic: {
234
+ true: '_4sie9wp'
235
+ },
236
+ textTransform: {
237
+ uppercase: '_4sie9wq',
238
+ lowercase: '_4sie9wr',
239
+ capitalize: '_4sie9ws',
240
+ none: '_4sie9wt'
241
+ },
242
+ decoration: {
243
+ underline: '_4sie9wu',
244
+ 'line-through': '_4sie9wv',
245
+ none: '_4sie9ww'
246
+ },
247
+ letterSpacing: {
248
+ tight: '_4sie9wx',
249
+ normal: '_4sie9wy',
250
+ wide: '_4sie9wz'
251
+ },
252
+ lineHeight: {
253
+ tight: '_4sie9w10',
254
+ normal: '_4sie9w11',
255
+ loose: '_4sie9w12'
256
+ },
257
+ textWrap: {
258
+ wrap: '_4sie9w13',
259
+ balance: '_4sie9w14',
260
+ pretty: '_4sie9w15',
261
+ nowrap: '_4sie9w16'
262
+ },
263
+ variant: {
264
+ gradient: '_4sie9w17'
231
265
  }
232
266
  },
233
267
  defaultVariants: {
@@ -319,13 +353,23 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
319
353
  let _ref = [
320
354
  _0,
321
355
  _1
322
- ], [_ref1, ..._rest] = _ref, { as: Component = 'span', size, weight, align, color, truncate, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = _object_without_properties(_ref1, [
356
+ ], [_ref1, ..._rest] = _ref, { as: Component = 'span', size, weight, align, color, truncate, italic, textTransform, decoration, letterSpacing, lineHeight, textWrap, variant, lineClamp, inherit, gradient, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = _object_without_properties(_ref1, [
323
357
  "as",
324
358
  "size",
325
359
  "weight",
326
360
  "align",
327
361
  "color",
328
362
  "truncate",
363
+ "italic",
364
+ "textTransform",
365
+ "decoration",
366
+ "letterSpacing",
367
+ "lineHeight",
368
+ "textWrap",
369
+ "variant",
370
+ "lineClamp",
371
+ "inherit",
372
+ "gradient",
329
373
  "m",
330
374
  "mt",
331
375
  "mr",
@@ -344,20 +388,24 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
344
388
  "style",
345
389
  "children"
346
390
  ]), [ref] = _rest;
391
+ var _gradient_deg;
347
392
  const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
348
- const classes = className ? `${Text_css_text({
393
+ const normalizedTruncate = true === truncate ? 'end' : false === truncate ? void 0 : truncate;
394
+ const variantArgs = {
349
395
  size,
350
396
  weight,
351
397
  align,
352
398
  color,
353
- truncate
354
- })} ${className}` : Text_css_text({
355
- size,
356
- weight,
357
- align,
358
- color,
359
- truncate
360
- });
399
+ truncate: normalizedTruncate,
400
+ italic,
401
+ textTransform,
402
+ decoration,
403
+ letterSpacing,
404
+ lineHeight,
405
+ textWrap,
406
+ variant
407
+ };
408
+ const classes = className ? `${Text_css_text(variantArgs)} ${className}` : Text_css_text(variantArgs);
361
409
  const spacingStyle = resolveSpacingStyle({
362
410
  m,
363
411
  mt,
@@ -374,10 +422,26 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
374
422
  px,
375
423
  py
376
424
  });
425
+ const inheritStyle = inherit ? {
426
+ fontFamily: 'inherit',
427
+ fontSize: 'inherit',
428
+ fontWeight: 'inherit',
429
+ color: 'inherit',
430
+ lineHeight: 'inherit'
431
+ } : void 0;
432
+ const gradientStyle = 'gradient' === variant && gradient ? {
433
+ backgroundImage: `linear-gradient(${String(null != (_gradient_deg = gradient.deg) ? _gradient_deg : 45)}deg, ${gradient.from}, ${gradient.to})`
434
+ } : void 0;
435
+ const lineClampStyle = void 0 !== lineClamp ? {
436
+ display: '-webkit-box',
437
+ WebkitLineClamp: lineClamp,
438
+ WebkitBoxOrient: 'vertical',
439
+ overflow: 'hidden'
440
+ } : void 0;
377
441
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, _object_spread_props(_object_spread({
378
442
  ref: themedRef,
379
443
  className: classes,
380
- style: _object_spread({}, spacingStyle, style)
444
+ style: _object_spread({}, spacingStyle, inheritStyle, gradientStyle, lineClampStyle, style)
381
445
  }, rest), {
382
446
  children: children
383
447
  }));
package/dist/cjs/link.css CHANGED
@@ -94,9 +94,99 @@
94
94
  ._4sie9wn {
95
95
  text-overflow: ellipsis;
96
96
  white-space: nowrap;
97
+ max-width: 100%;
98
+ display: inline-block;
97
99
  overflow: hidden;
98
100
  }
99
101
 
102
+ ._4sie9wo {
103
+ text-overflow: ellipsis;
104
+ white-space: nowrap;
105
+ text-align: left;
106
+ direction: rtl;
107
+ max-width: 100%;
108
+ display: inline-block;
109
+ overflow: hidden;
110
+ }
111
+
112
+ ._4sie9wp {
113
+ font-style: italic;
114
+ }
115
+
116
+ ._4sie9wq {
117
+ text-transform: uppercase;
118
+ }
119
+
120
+ ._4sie9wr {
121
+ text-transform: lowercase;
122
+ }
123
+
124
+ ._4sie9ws {
125
+ text-transform: capitalize;
126
+ }
127
+
128
+ ._4sie9wt {
129
+ text-transform: none;
130
+ }
131
+
132
+ ._4sie9wu {
133
+ text-decoration: underline;
134
+ }
135
+
136
+ ._4sie9wv {
137
+ text-decoration: line-through;
138
+ }
139
+
140
+ ._4sie9ww {
141
+ text-decoration: none;
142
+ }
143
+
144
+ ._4sie9wx {
145
+ letter-spacing: var(--vinyasa-letter-spacing-tight);
146
+ }
147
+
148
+ ._4sie9wy {
149
+ letter-spacing: var(--vinyasa-letter-spacing-normal);
150
+ }
151
+
152
+ ._4sie9wz {
153
+ letter-spacing: var(--vinyasa-letter-spacing-wide);
154
+ }
155
+
156
+ ._4sie9w10 {
157
+ line-height: var(--vinyasa-line-height-tight);
158
+ }
159
+
160
+ ._4sie9w11 {
161
+ line-height: var(--vinyasa-line-height-normal);
162
+ }
163
+
164
+ ._4sie9w12 {
165
+ line-height: var(--vinyasa-line-height-loose);
166
+ }
167
+
168
+ ._4sie9w13 {
169
+ text-wrap: wrap;
170
+ }
171
+
172
+ ._4sie9w14 {
173
+ text-wrap: balance;
174
+ }
175
+
176
+ ._4sie9w15 {
177
+ text-wrap: pretty;
178
+ }
179
+
180
+ ._4sie9w16 {
181
+ text-wrap: nowrap;
182
+ }
183
+
184
+ ._4sie9w17 {
185
+ color: rgba(0, 0, 0, 0);
186
+ -webkit-background-clip: text;
187
+ background-clip: text;
188
+ }
189
+
100
190
  ._1laoo9r0 {
101
191
  text-decoration: none;
102
192
  }