@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.
- package/README.md +77 -2
- package/dist/cjs/blockquote.cjs +3 -2
- package/dist/cjs/caption.cjs +82 -14
- package/dist/cjs/caption.css +104 -2
- package/dist/cjs/code.cjs +4 -3
- package/dist/cjs/heading.cjs +82 -14
- package/dist/cjs/heading.css +104 -2
- package/dist/cjs/highlight.cjs +700 -0
- package/dist/cjs/highlight.css +197 -0
- package/dist/cjs/index.cjs +597 -21
- package/dist/cjs/index.css +172 -2
- package/dist/cjs/kbd.cjs +3 -2
- package/dist/cjs/label.cjs +82 -14
- package/dist/cjs/label.css +104 -2
- package/dist/cjs/link.cjs +82 -14
- package/dist/cjs/link.css +104 -2
- package/dist/cjs/list.cjs +431 -0
- package/dist/cjs/list.css +60 -0
- package/dist/cjs/mark.cjs +246 -0
- package/dist/cjs/mark.css +8 -0
- package/dist/cjs/markdown-renderer.cjs +87 -17
- package/dist/cjs/markdown-renderer.css +104 -2
- package/dist/cjs/paragraph.cjs +82 -14
- package/dist/cjs/paragraph.css +104 -2
- package/dist/cjs/text.cjs +83 -15
- package/dist/cjs/text.css +104 -2
- package/dist/esm/191.css +104 -2
- package/dist/esm/191.js +74 -13
- package/dist/esm/227.css +7 -0
- package/dist/esm/227.js +39 -0
- package/dist/esm/513.css +60 -0
- package/dist/esm/513.js +126 -0
- package/dist/esm/651.js +4 -2
- package/dist/esm/767.js +33 -0
- package/dist/esm/783.js +3 -1
- package/dist/esm/919.js +3 -1
- package/dist/esm/components/highlight/Highlight.d.ts +14 -0
- package/dist/esm/components/highlight/index.d.ts +1 -0
- package/dist/esm/components/list/List.css.d.ts +47 -0
- package/dist/esm/components/list/List.d.ts +52 -0
- package/dist/esm/components/list/index.d.ts +1 -0
- package/dist/esm/components/mark/Mark.css.d.ts +1 -0
- package/dist/esm/components/mark/Mark.d.ts +5 -0
- package/dist/esm/components/mark/index.d.ts +1 -0
- package/dist/esm/components/text/Text.css.d.ts +94 -1
- package/dist/esm/components/text/Text.d.ts +55 -9
- package/dist/esm/highlight.d.ts +2 -0
- package/dist/esm/highlight.js +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/list.d.ts +2 -0
- package/dist/esm/list.js +1 -0
- package/dist/esm/mark.d.ts +2 -0
- package/dist/esm/mark.js +1 -0
- package/dist/esm/useIsTruncated.d.ts +15 -0
- package/package.json +25 -5
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
default: ()=>mark_Mark
|
|
32
|
+
});
|
|
33
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
|
+
const tokens_namespaceObject = require("@vinyasa/tokens");
|
|
35
|
+
const external_react_namespaceObject = require("react");
|
|
36
|
+
const space = {
|
|
37
|
+
1: tokens_namespaceObject.themeContract.space1,
|
|
38
|
+
2: tokens_namespaceObject.themeContract.space2,
|
|
39
|
+
3: tokens_namespaceObject.themeContract.space3,
|
|
40
|
+
4: tokens_namespaceObject.themeContract.space4,
|
|
41
|
+
5: tokens_namespaceObject.themeContract.space5,
|
|
42
|
+
6: tokens_namespaceObject.themeContract.space6
|
|
43
|
+
};
|
|
44
|
+
const spacingPropertyMap = [
|
|
45
|
+
[
|
|
46
|
+
'm',
|
|
47
|
+
'margin'
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
'mx',
|
|
51
|
+
'marginInline'
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
'my',
|
|
55
|
+
'marginBlock'
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
'mt',
|
|
59
|
+
'marginTop'
|
|
60
|
+
],
|
|
61
|
+
[
|
|
62
|
+
'mr',
|
|
63
|
+
'marginRight'
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
'mb',
|
|
67
|
+
'marginBottom'
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
'ml',
|
|
71
|
+
'marginLeft'
|
|
72
|
+
],
|
|
73
|
+
[
|
|
74
|
+
'p',
|
|
75
|
+
'padding'
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
'px',
|
|
79
|
+
'paddingInline'
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
'py',
|
|
83
|
+
'paddingBlock'
|
|
84
|
+
],
|
|
85
|
+
[
|
|
86
|
+
'pt',
|
|
87
|
+
'paddingTop'
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
'pr',
|
|
91
|
+
'paddingRight'
|
|
92
|
+
],
|
|
93
|
+
[
|
|
94
|
+
'pb',
|
|
95
|
+
'paddingBottom'
|
|
96
|
+
],
|
|
97
|
+
[
|
|
98
|
+
'pl',
|
|
99
|
+
'paddingLeft'
|
|
100
|
+
]
|
|
101
|
+
];
|
|
102
|
+
const resolveSpacingStyle = (props)=>{
|
|
103
|
+
const style = {};
|
|
104
|
+
for (const [propKey, cssProperty] of spacingPropertyMap){
|
|
105
|
+
const value = props[propKey];
|
|
106
|
+
if (void 0 !== value) style[cssProperty] = space[value];
|
|
107
|
+
}
|
|
108
|
+
return style;
|
|
109
|
+
};
|
|
110
|
+
var mark = 'x8q83o0';
|
|
111
|
+
function _define_property(obj, key, value) {
|
|
112
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
113
|
+
value: value,
|
|
114
|
+
enumerable: true,
|
|
115
|
+
configurable: true,
|
|
116
|
+
writable: true
|
|
117
|
+
});
|
|
118
|
+
else obj[key] = value;
|
|
119
|
+
return obj;
|
|
120
|
+
}
|
|
121
|
+
function _object_spread(target) {
|
|
122
|
+
for(var i = 1; i < arguments.length; i++){
|
|
123
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
124
|
+
var ownKeys = Object.keys(source);
|
|
125
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
126
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
127
|
+
}));
|
|
128
|
+
ownKeys.forEach(function(key) {
|
|
129
|
+
_define_property(target, key, source[key]);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return target;
|
|
133
|
+
}
|
|
134
|
+
function Mark_ownKeys(object, enumerableOnly) {
|
|
135
|
+
var keys = Object.keys(object);
|
|
136
|
+
if (Object.getOwnPropertySymbols) {
|
|
137
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
138
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
139
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
140
|
+
});
|
|
141
|
+
keys.push.apply(keys, symbols);
|
|
142
|
+
}
|
|
143
|
+
return keys;
|
|
144
|
+
}
|
|
145
|
+
function _object_spread_props(target, source) {
|
|
146
|
+
source = null != source ? source : {};
|
|
147
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
148
|
+
else Mark_ownKeys(Object(source)).forEach(function(key) {
|
|
149
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
150
|
+
});
|
|
151
|
+
return target;
|
|
152
|
+
}
|
|
153
|
+
function _object_without_properties(source, excluded) {
|
|
154
|
+
if (null == source) return {};
|
|
155
|
+
var target = {}, sourceKeys, key, i;
|
|
156
|
+
if ("u" > typeof Reflect && Reflect.ownKeys) {
|
|
157
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
158
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
159
|
+
key = sourceKeys[i];
|
|
160
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
161
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return target;
|
|
165
|
+
}
|
|
166
|
+
target = _object_without_properties_loose(source, excluded);
|
|
167
|
+
if (Object.getOwnPropertySymbols) {
|
|
168
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
169
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
170
|
+
key = sourceKeys[i];
|
|
171
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
172
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return target;
|
|
177
|
+
}
|
|
178
|
+
function _object_without_properties_loose(source, excluded) {
|
|
179
|
+
if (null == source) return {};
|
|
180
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
181
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
182
|
+
key = sourceKeys[i];
|
|
183
|
+
if (!(excluded.indexOf(key) >= 0)) {
|
|
184
|
+
if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return target;
|
|
188
|
+
}
|
|
189
|
+
const Mark = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _1)=>{
|
|
190
|
+
let _ref = [
|
|
191
|
+
_0,
|
|
192
|
+
_1
|
|
193
|
+
], [_ref1, ..._rest] = _ref, { m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, className, style, children } = _ref1, rest = _object_without_properties(_ref1, [
|
|
194
|
+
"m",
|
|
195
|
+
"mt",
|
|
196
|
+
"mr",
|
|
197
|
+
"mb",
|
|
198
|
+
"ml",
|
|
199
|
+
"mx",
|
|
200
|
+
"my",
|
|
201
|
+
"p",
|
|
202
|
+
"pt",
|
|
203
|
+
"pr",
|
|
204
|
+
"pb",
|
|
205
|
+
"pl",
|
|
206
|
+
"px",
|
|
207
|
+
"py",
|
|
208
|
+
"className",
|
|
209
|
+
"style",
|
|
210
|
+
"children"
|
|
211
|
+
]), [ref] = _rest;
|
|
212
|
+
const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
|
|
213
|
+
const classes = className ? `${mark} ${className}` : mark;
|
|
214
|
+
const computedStyle = _object_spread({}, resolveSpacingStyle({
|
|
215
|
+
m,
|
|
216
|
+
mt,
|
|
217
|
+
mr,
|
|
218
|
+
mb,
|
|
219
|
+
ml,
|
|
220
|
+
mx,
|
|
221
|
+
my,
|
|
222
|
+
p,
|
|
223
|
+
pt,
|
|
224
|
+
pr,
|
|
225
|
+
pb,
|
|
226
|
+
pl,
|
|
227
|
+
px,
|
|
228
|
+
py
|
|
229
|
+
}), style);
|
|
230
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("mark", _object_spread_props(_object_spread({
|
|
231
|
+
ref: themedRef,
|
|
232
|
+
className: classes,
|
|
233
|
+
style: computedStyle
|
|
234
|
+
}, rest), {
|
|
235
|
+
children: children
|
|
236
|
+
}));
|
|
237
|
+
});
|
|
238
|
+
Mark.displayName = 'Mark';
|
|
239
|
+
const mark_Mark = Mark;
|
|
240
|
+
exports["default"] = __webpack_exports__["default"];
|
|
241
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
242
|
+
"default"
|
|
243
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
244
|
+
Object.defineProperty(exports, '__esModule', {
|
|
245
|
+
value: true
|
|
246
|
+
});
|
|
@@ -222,6 +222,7 @@ const Blockquote = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
|
|
|
222
222
|
"style",
|
|
223
223
|
"children"
|
|
224
224
|
]), [ref] = _rest;
|
|
225
|
+
const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
|
|
225
226
|
const classes = className ? `${blockquote} ${className}` : blockquote;
|
|
226
227
|
const computedStyle = _object_spread({}, resolveSpacingStyle({
|
|
227
228
|
m,
|
|
@@ -240,7 +241,7 @@ const Blockquote = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
|
|
|
240
241
|
py
|
|
241
242
|
}), style);
|
|
242
243
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("blockquote", _object_spread_props(_object_spread({
|
|
243
|
-
ref:
|
|
244
|
+
ref: themedRef,
|
|
244
245
|
className: classes,
|
|
245
246
|
style: computedStyle
|
|
246
247
|
}, rest), {
|
|
@@ -450,6 +451,7 @@ const Code = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
|
|
|
450
451
|
"style",
|
|
451
452
|
"children"
|
|
452
453
|
]), [ref] = _rest;
|
|
454
|
+
const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
|
|
453
455
|
const classes = className ? `${code({
|
|
454
456
|
block
|
|
455
457
|
})} ${className}` : code({
|
|
@@ -472,7 +474,7 @@ const Code = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
|
|
|
472
474
|
py
|
|
473
475
|
}), style);
|
|
474
476
|
if (block) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", Code_object_spread_props(Code_object_spread({
|
|
475
|
-
ref:
|
|
477
|
+
ref: themedRef,
|
|
476
478
|
className: classes,
|
|
477
479
|
style: computedStyle
|
|
478
480
|
}, rest), {
|
|
@@ -481,7 +483,7 @@ const Code = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
|
|
|
481
483
|
})
|
|
482
484
|
}));
|
|
483
485
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("code", Code_object_spread_props(Code_object_spread({
|
|
484
|
-
ref:
|
|
486
|
+
ref: themedRef,
|
|
485
487
|
className: classes,
|
|
486
488
|
style: computedStyle
|
|
487
489
|
}, rest), {
|
|
@@ -518,10 +520,47 @@ var Text_css_text = createRuntimeFn({
|
|
|
518
520
|
default: '_4sie9wg',
|
|
519
521
|
muted: '_4sie9wh',
|
|
520
522
|
primary: '_4sie9wi',
|
|
521
|
-
|
|
523
|
+
info: '_4sie9wj',
|
|
524
|
+
success: '_4sie9wk',
|
|
525
|
+
warning: '_4sie9wl',
|
|
526
|
+
error: '_4sie9wm'
|
|
522
527
|
},
|
|
523
528
|
truncate: {
|
|
524
|
-
|
|
529
|
+
end: '_4sie9wn',
|
|
530
|
+
start: '_4sie9wo'
|
|
531
|
+
},
|
|
532
|
+
italic: {
|
|
533
|
+
true: '_4sie9wp'
|
|
534
|
+
},
|
|
535
|
+
textTransform: {
|
|
536
|
+
uppercase: '_4sie9wq',
|
|
537
|
+
lowercase: '_4sie9wr',
|
|
538
|
+
capitalize: '_4sie9ws',
|
|
539
|
+
none: '_4sie9wt'
|
|
540
|
+
},
|
|
541
|
+
decoration: {
|
|
542
|
+
underline: '_4sie9wu',
|
|
543
|
+
'line-through': '_4sie9wv',
|
|
544
|
+
none: '_4sie9ww'
|
|
545
|
+
},
|
|
546
|
+
letterSpacing: {
|
|
547
|
+
tight: '_4sie9wx',
|
|
548
|
+
normal: '_4sie9wy',
|
|
549
|
+
wide: '_4sie9wz'
|
|
550
|
+
},
|
|
551
|
+
lineHeight: {
|
|
552
|
+
tight: '_4sie9w10',
|
|
553
|
+
normal: '_4sie9w11',
|
|
554
|
+
loose: '_4sie9w12'
|
|
555
|
+
},
|
|
556
|
+
textWrap: {
|
|
557
|
+
wrap: '_4sie9w13',
|
|
558
|
+
balance: '_4sie9w14',
|
|
559
|
+
pretty: '_4sie9w15',
|
|
560
|
+
nowrap: '_4sie9w16'
|
|
561
|
+
},
|
|
562
|
+
variant: {
|
|
563
|
+
gradient: '_4sie9w17'
|
|
525
564
|
}
|
|
526
565
|
},
|
|
527
566
|
defaultVariants: {
|
|
@@ -613,13 +652,23 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
|
|
|
613
652
|
let _ref = [
|
|
614
653
|
_0,
|
|
615
654
|
_1
|
|
616
|
-
], [_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 = Text_object_without_properties(_ref1, [
|
|
655
|
+
], [_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 = Text_object_without_properties(_ref1, [
|
|
617
656
|
"as",
|
|
618
657
|
"size",
|
|
619
658
|
"weight",
|
|
620
659
|
"align",
|
|
621
660
|
"color",
|
|
622
661
|
"truncate",
|
|
662
|
+
"italic",
|
|
663
|
+
"textTransform",
|
|
664
|
+
"decoration",
|
|
665
|
+
"letterSpacing",
|
|
666
|
+
"lineHeight",
|
|
667
|
+
"textWrap",
|
|
668
|
+
"variant",
|
|
669
|
+
"lineClamp",
|
|
670
|
+
"inherit",
|
|
671
|
+
"gradient",
|
|
623
672
|
"m",
|
|
624
673
|
"mt",
|
|
625
674
|
"mr",
|
|
@@ -638,19 +687,24 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
|
|
|
638
687
|
"style",
|
|
639
688
|
"children"
|
|
640
689
|
]), [ref] = _rest;
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
color,
|
|
646
|
-
truncate
|
|
647
|
-
})} ${className}` : Text_css_text({
|
|
690
|
+
var _gradient_deg;
|
|
691
|
+
const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
|
|
692
|
+
const normalizedTruncate = true === truncate ? 'end' : false === truncate ? void 0 : truncate;
|
|
693
|
+
const variantArgs = {
|
|
648
694
|
size,
|
|
649
695
|
weight,
|
|
650
696
|
align,
|
|
651
697
|
color,
|
|
652
|
-
truncate
|
|
653
|
-
|
|
698
|
+
truncate: normalizedTruncate,
|
|
699
|
+
italic,
|
|
700
|
+
textTransform,
|
|
701
|
+
decoration,
|
|
702
|
+
letterSpacing,
|
|
703
|
+
lineHeight,
|
|
704
|
+
textWrap,
|
|
705
|
+
variant
|
|
706
|
+
};
|
|
707
|
+
const classes = className ? `${Text_css_text(variantArgs)} ${className}` : Text_css_text(variantArgs);
|
|
654
708
|
const spacingStyle = resolveSpacingStyle({
|
|
655
709
|
m,
|
|
656
710
|
mt,
|
|
@@ -667,10 +721,26 @@ const Text = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((_0, _
|
|
|
667
721
|
px,
|
|
668
722
|
py
|
|
669
723
|
});
|
|
724
|
+
const inheritStyle = inherit ? {
|
|
725
|
+
fontFamily: 'inherit',
|
|
726
|
+
fontSize: 'inherit',
|
|
727
|
+
fontWeight: 'inherit',
|
|
728
|
+
color: 'inherit',
|
|
729
|
+
lineHeight: 'inherit'
|
|
730
|
+
} : void 0;
|
|
731
|
+
const gradientStyle = 'gradient' === variant && gradient ? {
|
|
732
|
+
backgroundImage: `linear-gradient(${String(null != (_gradient_deg = gradient.deg) ? _gradient_deg : 45)}deg, ${gradient.from}, ${gradient.to})`
|
|
733
|
+
} : void 0;
|
|
734
|
+
const lineClampStyle = void 0 !== lineClamp ? {
|
|
735
|
+
display: '-webkit-box',
|
|
736
|
+
WebkitLineClamp: lineClamp,
|
|
737
|
+
WebkitBoxOrient: 'vertical',
|
|
738
|
+
overflow: 'hidden'
|
|
739
|
+
} : void 0;
|
|
670
740
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, Text_object_spread_props(Text_object_spread({
|
|
671
|
-
ref:
|
|
741
|
+
ref: themedRef,
|
|
672
742
|
className: classes,
|
|
673
|
-
style: Text_object_spread({}, spacingStyle, style)
|
|
743
|
+
style: Text_object_spread({}, spacingStyle, inheritStyle, gradientStyle, lineClampStyle, style)
|
|
674
744
|
}, rest), {
|
|
675
745
|
children: children
|
|
676
746
|
}));
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
._4sie9wg {
|
|
124
|
-
color: var(--vinyasa-
|
|
124
|
+
color: var(--vinyasa-text-default);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
._4sie9wh {
|
|
@@ -133,15 +133,117 @@
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
._4sie9wj {
|
|
136
|
-
color: var(--vinyasa-
|
|
136
|
+
color: var(--vinyasa-status-info-text);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
._4sie9wk {
|
|
140
|
+
color: var(--vinyasa-status-success-text);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
._4sie9wl {
|
|
144
|
+
color: var(--vinyasa-status-warning-text);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
._4sie9wm {
|
|
148
|
+
color: var(--vinyasa-status-error-text);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
._4sie9wn {
|
|
140
152
|
text-overflow: ellipsis;
|
|
141
153
|
white-space: nowrap;
|
|
154
|
+
max-width: 100%;
|
|
155
|
+
display: inline-block;
|
|
142
156
|
overflow: hidden;
|
|
143
157
|
}
|
|
144
158
|
|
|
159
|
+
._4sie9wo {
|
|
160
|
+
text-overflow: ellipsis;
|
|
161
|
+
white-space: nowrap;
|
|
162
|
+
text-align: left;
|
|
163
|
+
direction: rtl;
|
|
164
|
+
max-width: 100%;
|
|
165
|
+
display: inline-block;
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
._4sie9wp {
|
|
170
|
+
font-style: italic;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
._4sie9wq {
|
|
174
|
+
text-transform: uppercase;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
._4sie9wr {
|
|
178
|
+
text-transform: lowercase;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
._4sie9ws {
|
|
182
|
+
text-transform: capitalize;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
._4sie9wt {
|
|
186
|
+
text-transform: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
._4sie9wu {
|
|
190
|
+
text-decoration: underline;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
._4sie9wv {
|
|
194
|
+
text-decoration: line-through;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
._4sie9ww {
|
|
198
|
+
text-decoration: none;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
._4sie9wx {
|
|
202
|
+
letter-spacing: var(--vinyasa-letter-spacing-tight);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
._4sie9wy {
|
|
206
|
+
letter-spacing: var(--vinyasa-letter-spacing-normal);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
._4sie9wz {
|
|
210
|
+
letter-spacing: var(--vinyasa-letter-spacing-wide);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
._4sie9w10 {
|
|
214
|
+
line-height: var(--vinyasa-line-height-tight);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
._4sie9w11 {
|
|
218
|
+
line-height: var(--vinyasa-line-height-normal);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
._4sie9w12 {
|
|
222
|
+
line-height: var(--vinyasa-line-height-loose);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
._4sie9w13 {
|
|
226
|
+
text-wrap: wrap;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
._4sie9w14 {
|
|
230
|
+
text-wrap: balance;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
._4sie9w15 {
|
|
234
|
+
text-wrap: pretty;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
._4sie9w16 {
|
|
238
|
+
text-wrap: nowrap;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
._4sie9w17 {
|
|
242
|
+
color: rgba(0, 0, 0, 0);
|
|
243
|
+
-webkit-background-clip: text;
|
|
244
|
+
background-clip: text;
|
|
245
|
+
}
|
|
246
|
+
|
|
145
247
|
._1laoo9r0 {
|
|
146
248
|
text-decoration: none;
|
|
147
249
|
}
|
package/dist/cjs/paragraph.cjs
CHANGED
|
@@ -221,10 +221,47 @@ var Text_css_text = createRuntimeFn({
|
|
|
221
221
|
default: '_4sie9wg',
|
|
222
222
|
muted: '_4sie9wh',
|
|
223
223
|
primary: '_4sie9wi',
|
|
224
|
-
|
|
224
|
+
info: '_4sie9wj',
|
|
225
|
+
success: '_4sie9wk',
|
|
226
|
+
warning: '_4sie9wl',
|
|
227
|
+
error: '_4sie9wm'
|
|
225
228
|
},
|
|
226
229
|
truncate: {
|
|
227
|
-
|
|
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
|
-
|
|
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
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
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:
|
|
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
|
}));
|