@vinyasa/typography 1.0.23 → 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 (56) hide show
  1. package/README.md +77 -2
  2. package/dist/cjs/blockquote.cjs +3 -2
  3. package/dist/cjs/caption.cjs +82 -14
  4. package/dist/cjs/caption.css +104 -2
  5. package/dist/cjs/code.cjs +4 -3
  6. package/dist/cjs/heading.cjs +82 -14
  7. package/dist/cjs/heading.css +104 -2
  8. package/dist/cjs/highlight.cjs +700 -0
  9. package/dist/cjs/highlight.css +197 -0
  10. package/dist/cjs/index.cjs +597 -21
  11. package/dist/cjs/index.css +172 -2
  12. package/dist/cjs/kbd.cjs +3 -2
  13. package/dist/cjs/label.cjs +82 -14
  14. package/dist/cjs/label.css +104 -2
  15. package/dist/cjs/link.cjs +82 -14
  16. package/dist/cjs/link.css +104 -2
  17. package/dist/cjs/list.cjs +431 -0
  18. package/dist/cjs/list.css +60 -0
  19. package/dist/cjs/mark.cjs +246 -0
  20. package/dist/cjs/mark.css +8 -0
  21. package/dist/cjs/markdown-renderer.cjs +87 -17
  22. package/dist/cjs/markdown-renderer.css +104 -2
  23. package/dist/cjs/paragraph.cjs +82 -14
  24. package/dist/cjs/paragraph.css +104 -2
  25. package/dist/cjs/text.cjs +83 -15
  26. package/dist/cjs/text.css +104 -2
  27. package/dist/esm/191.css +104 -2
  28. package/dist/esm/191.js +74 -13
  29. package/dist/esm/227.css +7 -0
  30. package/dist/esm/227.js +39 -0
  31. package/dist/esm/513.css +60 -0
  32. package/dist/esm/513.js +126 -0
  33. package/dist/esm/651.js +4 -2
  34. package/dist/esm/767.js +33 -0
  35. package/dist/esm/783.js +3 -1
  36. package/dist/esm/919.js +3 -1
  37. package/dist/esm/components/highlight/Highlight.d.ts +14 -0
  38. package/dist/esm/components/highlight/index.d.ts +1 -0
  39. package/dist/esm/components/list/List.css.d.ts +47 -0
  40. package/dist/esm/components/list/List.d.ts +52 -0
  41. package/dist/esm/components/list/index.d.ts +1 -0
  42. package/dist/esm/components/mark/Mark.css.d.ts +1 -0
  43. package/dist/esm/components/mark/Mark.d.ts +5 -0
  44. package/dist/esm/components/mark/index.d.ts +1 -0
  45. package/dist/esm/components/text/Text.css.d.ts +94 -1
  46. package/dist/esm/components/text/Text.d.ts +55 -9
  47. package/dist/esm/highlight.d.ts +2 -0
  48. package/dist/esm/highlight.js +1 -0
  49. package/dist/esm/index.d.ts +4 -0
  50. package/dist/esm/index.js +26 -0
  51. package/dist/esm/list.d.ts +2 -0
  52. package/dist/esm/list.js +1 -0
  53. package/dist/esm/mark.d.ts +2 -0
  54. package/dist/esm/mark.js +1 -0
  55. package/dist/esm/useIsTruncated.d.ts +15 -0
  56. package/package.json +25 -5
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vinyasa/typography
2
2
 
3
- 10 typography primitives: Text, Heading, Paragraph, Label, Caption, Link, Code, Kbd, Blockquote, MarkdownRenderer.
3
+ 13 typography primitives: Text, Heading, Paragraph, Label, Caption, Link, Code, Kbd, Blockquote, Mark, Highlight, List, MarkdownRenderer.
4
4
 
5
5
  ## Installation
6
6
 
@@ -39,7 +39,44 @@ The one real recipe every other component in this package builds on.
39
39
  </Text>
40
40
  ```
41
41
 
42
- `size`: `xs`/`sm`/`md`/`lg`/`xl`/`2xl`/`3xl`/`4xl`. `weight`: `regular`/`medium`/`semibold`/`bold`. `align`: `left`/`center`/`right`. `color`: `default`/`muted`/`primary`/`error`. `truncate`: boolean.
42
+ `size`: `xs`/`sm`/`md`/`lg`/`xl`/`2xl`/`3xl`/`4xl`. `weight`: `regular`/`medium`/`semibold`/`bold`. `align`: `left`/`center`/`right`. `color`: `default`/`muted`/`primary`/`info`/`success`/`warning`/`error`.
43
+
44
+ Other props: `italic` (boolean), `textTransform` (`uppercase`/`lowercase`/`capitalize`/`none`), `decoration` (`underline`/`line-through`/`none`), `letterSpacing`/`lineHeight` (`tight`/`normal`/`wide` and `tight`/`normal`/`loose` respectively, off the shared spacing tokens), `textWrap` (`wrap`/`balance`/`pretty`/`nowrap`), `lineClamp` (number of lines before an ellipsis), `inherit` (boolean — skip Text's own font-size/weight/color/line-height and pick up the closest styled ancestor's instead), and `variant="gradient"` + `gradient={{ from, to, deg? }}` for gradient text.
45
+
46
+ `truncate`: `boolean | 'start' | 'end'` — `true` is an alias for `'end'` (clips the end with an ellipsis); `'start'` clips the beginning instead, for cases like a long file path where the filename at the end matters most.
47
+
48
+ ```tsx
49
+ <Text truncate="start" style={{ width: '12rem' }}>
50
+ /Users/rohit/projects/vinyasa/report-final.pdf
51
+ </Text>
52
+ ```
53
+
54
+ #### Showing the full text on hover when truncated
55
+
56
+ `truncate`/`lineClamp` only clip visually — they don't add any hover affordance on their own. Pair `Text` with `@vinyasa/typography`'s `useIsTruncated` hook and `@vinyasa/overlay`'s `Tooltip` to show the full content only when it's actually overflowing, not on every hover:
57
+
58
+ ```tsx
59
+ import { Text, useIsTruncated } from '@vinyasa/typography';
60
+ import { Tooltip } from '@vinyasa/overlay';
61
+ import { useState } from 'react';
62
+
63
+ const TruncatedLabel = ({ text }: { text: string }) => {
64
+ const [ref, isTruncated] = useIsTruncated<HTMLSpanElement>([text]);
65
+ const [open, setOpen] = useState(false);
66
+
67
+ return (
68
+ <Tooltip label={text} open={isTruncated && open} onOpenChange={setOpen}>
69
+ <Text ref={ref} truncate="end" style={{ maxWidth: '12rem' }}>
70
+ {text}
71
+ </Text>
72
+ </Tooltip>
73
+ );
74
+ };
75
+ ```
76
+
77
+ `useIsTruncated` returns a ref (attach it to the truncated element) and a boolean, re-checked on every resize of that element via `ResizeObserver`. Pass the truncated content itself as the hook's `deps` argument (as above) so a content change with no resize still re-checks. `@vinyasa/typography` itself stays free of any dependency on `@vinyasa/overlay` — the hook only measures overflow; wiring it to a `Tooltip` is left to the consumer, same as this example.
78
+
79
+ `Tooltip` stays mounted unconditionally, with `open` mirrored into local state via `onOpenChange` and forced closed whenever `isTruncated` is false — conditionally rendering the `Tooltip` wrapper only once truncated would remount `Text`'s DOM node (it moves one level deeper, under `Tooltip.Trigger`'s Slot), detaching `useIsTruncated`'s `ResizeObserver` from the live element in the process.
43
80
 
44
81
  ### Heading
45
82
 
@@ -90,6 +127,44 @@ Real anchor props (`href`, `target`, `rel`), plus `size`/`weight`/`truncate` fro
90
127
  <Blockquote>Design is not just what it looks like. Design is how it works.</Blockquote>
91
128
  ```
92
129
 
130
+ ### Mark
131
+
132
+ Native `<mark>`, styled off the existing `statusWarning` tokens (no new tokens needed).
133
+
134
+ ```tsx
135
+ <Text>
136
+ The quick brown fox <Mark>jumps over</Mark> the lazy dog.
137
+ </Text>
138
+ ```
139
+
140
+ ### Highlight
141
+
142
+ Wraps every case-insensitive occurrence of `highlight` in `Mark`. `highlight` takes one term or a list. `children` must be a plain string — rich content can't be reliably split and re-wrapped.
143
+
144
+ ```tsx
145
+ <Highlight highlight={['React', 'vanilla-extract']}>
146
+ This design system is built with React and vanilla-extract
147
+ </Highlight>
148
+ ```
149
+
150
+ ### List
151
+
152
+ `List`/`List.Item` — no simple non-compound form, since composing `.Item` children _is_ the natural simple form for a list.
153
+
154
+ ```tsx
155
+ <List type="ordered" spacing={2}>
156
+ <List.Item>Write the contract</List.Item>
157
+ <List.Item>Stabilize tokens and layout</List.Item>
158
+ </List>
159
+
160
+ <List icon={<CheckIcon />} withPadding={false}>
161
+ <List.Item>Consistent spacing scale</List.Item>
162
+ <List.Item icon={<WarningIcon />}>One item with its own override icon</List.Item>
163
+ </List>
164
+ ```
165
+
166
+ `type`: `unordered` (default, `<ul>`) / `ordered` (`<ol>`). `icon` on `List` sets every item's default icon; an item's own `icon` overrides it. `withPadding` (default `true`) keeps the browser's list indent — turn it off once every item has an `icon`, which already replaces the native marker.
167
+
93
168
  ### MarkdownRenderer
94
169
 
95
170
  Wraps [`react-markdown`](https://github.com/remarkjs/react-markdown), mapping every markdown element to this package's own components (headings → `Heading`, paragraphs → `Paragraph`, links → `Link`, code → `Code`, blockquotes → `Blockquote`) so rendered markdown automatically picks up your theme.
@@ -31,8 +31,8 @@ __webpack_require__.d(__webpack_exports__, {
31
31
  default: ()=>blockquote_Blockquote
32
32
  });
33
33
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
34
- const external_react_namespaceObject = require("react");
35
34
  const tokens_namespaceObject = require("@vinyasa/tokens");
35
+ const external_react_namespaceObject = require("react");
36
36
  const space = {
37
37
  1: tokens_namespaceObject.themeContract.space1,
38
38
  2: tokens_namespaceObject.themeContract.space2,
@@ -209,6 +209,7 @@ const Blockquote = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
209
209
  "style",
210
210
  "children"
211
211
  ]), [ref] = _rest;
212
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
212
213
  const classes = className ? `${blockquote} ${className}` : blockquote;
213
214
  const computedStyle = _object_spread({}, resolveSpacingStyle({
214
215
  m,
@@ -227,7 +228,7 @@ const Blockquote = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
227
228
  py
228
229
  }), style);
229
230
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("blockquote", _object_spread_props(_object_spread({
230
- ref: ref,
231
+ ref: themedRef,
231
232
  className: classes,
232
233
  style: computedStyle
233
234
  }, rest), {
@@ -221,10 +221,47 @@ var Text_css_text = createRuntimeFn({
221
221
  default: '_4sie9wg',
222
222
  muted: '_4sie9wh',
223
223
  primary: '_4sie9wi',
224
- error: '_4sie9wj'
224
+ info: '_4sie9wj',
225
+ success: '_4sie9wk',
226
+ warning: '_4sie9wl',
227
+ error: '_4sie9wm'
225
228
  },
226
229
  truncate: {
227
- true: '_4sie9wk'
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'
228
265
  }
229
266
  },
230
267
  defaultVariants: {
@@ -316,13 +353,23 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
316
353
  let _ref = [
317
354
  _0,
318
355
  _1
319
- ], [_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, [
320
357
  "as",
321
358
  "size",
322
359
  "weight",
323
360
  "align",
324
361
  "color",
325
362
  "truncate",
363
+ "italic",
364
+ "textTransform",
365
+ "decoration",
366
+ "letterSpacing",
367
+ "lineHeight",
368
+ "textWrap",
369
+ "variant",
370
+ "lineClamp",
371
+ "inherit",
372
+ "gradient",
326
373
  "m",
327
374
  "mt",
328
375
  "mr",
@@ -341,19 +388,24 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
341
388
  "style",
342
389
  "children"
343
390
  ]), [ref] = _rest;
344
- const classes = className ? `${Text_css_text({
391
+ var _gradient_deg;
392
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
393
+ const normalizedTruncate = true === truncate ? 'end' : false === truncate ? void 0 : truncate;
394
+ const variantArgs = {
345
395
  size,
346
396
  weight,
347
397
  align,
348
398
  color,
349
- truncate
350
- })} ${className}` : Text_css_text({
351
- size,
352
- weight,
353
- align,
354
- color,
355
- truncate
356
- });
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);
357
409
  const spacingStyle = resolveSpacingStyle({
358
410
  m,
359
411
  mt,
@@ -370,10 +422,26 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
370
422
  px,
371
423
  py
372
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;
373
441
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, _object_spread_props(_object_spread({
374
- ref: ref,
442
+ ref: themedRef,
375
443
  className: classes,
376
- style: _object_spread({}, spacingStyle, style)
444
+ style: _object_spread({}, spacingStyle, inheritStyle, gradientStyle, lineClampStyle, style)
377
445
  }, rest), {
378
446
  children: children
379
447
  }));
@@ -64,7 +64,7 @@
64
64
  }
65
65
 
66
66
  ._4sie9wg {
67
- color: var(--vinyasa-on-secondary);
67
+ color: var(--vinyasa-text-default);
68
68
  }
69
69
 
70
70
  ._4sie9wh {
@@ -76,12 +76,114 @@
76
76
  }
77
77
 
78
78
  ._4sie9wj {
79
- color: var(--vinyasa-error);
79
+ color: var(--vinyasa-status-info-text);
80
80
  }
81
81
 
82
82
  ._4sie9wk {
83
+ color: var(--vinyasa-status-success-text);
84
+ }
85
+
86
+ ._4sie9wl {
87
+ color: var(--vinyasa-status-warning-text);
88
+ }
89
+
90
+ ._4sie9wm {
91
+ color: var(--vinyasa-status-error-text);
92
+ }
93
+
94
+ ._4sie9wn {
83
95
  text-overflow: ellipsis;
84
96
  white-space: nowrap;
97
+ max-width: 100%;
98
+ display: inline-block;
85
99
  overflow: hidden;
86
100
  }
87
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/code.cjs CHANGED
@@ -31,8 +31,8 @@ __webpack_require__.d(__webpack_exports__, {
31
31
  default: ()=>code_Code
32
32
  });
33
33
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
34
- const external_react_namespaceObject = require("react");
35
34
  const tokens_namespaceObject = require("@vinyasa/tokens");
35
+ const external_react_namespaceObject = require("react");
36
36
  const space = {
37
37
  1: tokens_namespaceObject.themeContract.space1,
38
38
  2: tokens_namespaceObject.themeContract.space2,
@@ -308,6 +308,7 @@ const Code = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
308
308
  "style",
309
309
  "children"
310
310
  ]), [ref] = _rest;
311
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
311
312
  const classes = className ? `${code({
312
313
  block
313
314
  })} ${className}` : code({
@@ -330,7 +331,7 @@ const Code = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
330
331
  py
331
332
  }), style);
332
333
  if (block) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", _object_spread_props(_object_spread({
333
- ref: ref,
334
+ ref: themedRef,
334
335
  className: classes,
335
336
  style: computedStyle
336
337
  }, rest), {
@@ -339,7 +340,7 @@ const Code = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
339
340
  })
340
341
  }));
341
342
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("code", _object_spread_props(_object_spread({
342
- ref: ref,
343
+ ref: themedRef,
343
344
  className: classes,
344
345
  style: computedStyle
345
346
  }, rest), {
@@ -221,10 +221,47 @@ var Text_css_text = createRuntimeFn({
221
221
  default: '_4sie9wg',
222
222
  muted: '_4sie9wh',
223
223
  primary: '_4sie9wi',
224
- error: '_4sie9wj'
224
+ info: '_4sie9wj',
225
+ success: '_4sie9wk',
226
+ warning: '_4sie9wl',
227
+ error: '_4sie9wm'
225
228
  },
226
229
  truncate: {
227
- true: '_4sie9wk'
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'
228
265
  }
229
266
  },
230
267
  defaultVariants: {
@@ -316,13 +353,23 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
316
353
  let _ref = [
317
354
  _0,
318
355
  _1
319
- ], [_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, [
320
357
  "as",
321
358
  "size",
322
359
  "weight",
323
360
  "align",
324
361
  "color",
325
362
  "truncate",
363
+ "italic",
364
+ "textTransform",
365
+ "decoration",
366
+ "letterSpacing",
367
+ "lineHeight",
368
+ "textWrap",
369
+ "variant",
370
+ "lineClamp",
371
+ "inherit",
372
+ "gradient",
326
373
  "m",
327
374
  "mt",
328
375
  "mr",
@@ -341,19 +388,24 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
341
388
  "style",
342
389
  "children"
343
390
  ]), [ref] = _rest;
344
- const classes = className ? `${Text_css_text({
391
+ var _gradient_deg;
392
+ const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
393
+ const normalizedTruncate = true === truncate ? 'end' : false === truncate ? void 0 : truncate;
394
+ const variantArgs = {
345
395
  size,
346
396
  weight,
347
397
  align,
348
398
  color,
349
- truncate
350
- })} ${className}` : Text_css_text({
351
- size,
352
- weight,
353
- align,
354
- color,
355
- truncate
356
- });
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);
357
409
  const spacingStyle = resolveSpacingStyle({
358
410
  m,
359
411
  mt,
@@ -370,10 +422,26 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
370
422
  px,
371
423
  py
372
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;
373
441
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, _object_spread_props(_object_spread({
374
- ref: ref,
442
+ ref: themedRef,
375
443
  className: classes,
376
- style: _object_spread({}, spacingStyle, style)
444
+ style: _object_spread({}, spacingStyle, inheritStyle, gradientStyle, lineClampStyle, style)
377
445
  }, rest), {
378
446
  children: children
379
447
  }));
@@ -64,7 +64,7 @@
64
64
  }
65
65
 
66
66
  ._4sie9wg {
67
- color: var(--vinyasa-on-secondary);
67
+ color: var(--vinyasa-text-default);
68
68
  }
69
69
 
70
70
  ._4sie9wh {
@@ -76,12 +76,114 @@
76
76
  }
77
77
 
78
78
  ._4sie9wj {
79
- color: var(--vinyasa-error);
79
+ color: var(--vinyasa-status-info-text);
80
80
  }
81
81
 
82
82
  ._4sie9wk {
83
+ color: var(--vinyasa-status-success-text);
84
+ }
85
+
86
+ ._4sie9wl {
87
+ color: var(--vinyasa-status-warning-text);
88
+ }
89
+
90
+ ._4sie9wm {
91
+ color: var(--vinyasa-status-error-text);
92
+ }
93
+
94
+ ._4sie9wn {
83
95
  text-overflow: ellipsis;
84
96
  white-space: nowrap;
97
+ max-width: 100%;
98
+ display: inline-block;
85
99
  overflow: hidden;
86
100
  }
87
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
+