@rescui/typography 0.16.4 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/create-text-cn.d.ts +0 -2
- package/lib/create-text-cn.js +5 -4
- package/lib/index-moduled.css +1252 -0
- package/lib/index-moduled.p.module.css.js +118 -0
- package/lib/index.css +13 -64
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -1
- package/lib/mixins.p.css +155 -316
- package/lib/mixins.pcss +155 -316
- package/lib/public-api.p.css +7 -92
- package/lib/public-api.pcss +7 -92
- package/package.json +6 -6
- package/lib/any.d.ts +0 -1
package/lib/create-text-cn.d.ts
CHANGED
package/lib/create-text-cn.js
CHANGED
|
@@ -2,6 +2,7 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/ins
|
|
|
2
2
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
3
3
|
import { useThemeWithUndefined } from '@rescui/ui-contexts';
|
|
4
4
|
import cn from 'classnames';
|
|
5
|
+
import styles from './index-moduled.p.module.css.js';
|
|
5
6
|
var TEXT_BASES = ['rs-digits-1', 'rs-digits-2', 'rs-super-hero', 'rs-middle-hero', 'rs-hero', 'rs-subtitle-1', 'rs-subtitle-2', 'rs-h1', 'rs-h2', 'rs-h3', 'rs-h4', 'rs-h5', 'rs-overline', 'rs-text-1', 'rs-text-2', 'rs-text-3'];
|
|
6
7
|
var TEXTS = ['rs-text-1', 'rs-text-2', 'rs-text-3'];
|
|
7
8
|
|
|
@@ -31,20 +32,20 @@ function createTextCn(theme) {
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
if (_includesInstanceProperty(TEXT_BASES).call(TEXT_BASES, type)) {
|
|
34
|
-
return cn(type, theme && "rs-typography_theme_".concat(theme), hardness ? "rs-text_hardness_".concat(hardness) : _includesInstanceProperty(TEXTS).call(TEXTS, type) && "rs-text_hardness_average", paragraphOffsetAuto && 'rs-text_paragraph-offset-auto');
|
|
35
|
+
return cn(styles[type], theme && styles["rs-typography_theme_".concat(theme)], hardness ? styles["rs-text_hardness_".concat(hardness)] : _includesInstanceProperty(TEXTS).call(TEXTS, type) && styles["rs-text_hardness_average"], paragraphOffsetAuto && styles['rs-text_paragraph-offset-auto']);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
if (type === 'rs-link') {
|
|
38
|
-
return cn(type, "rs-link_mode_".concat(mode), hardness && "rs-link_hardness_".concat(hardness), external && "rs-link_external", theme && "rs-typography_theme_".concat(theme));
|
|
39
|
+
return cn(styles[type], styles["rs-link_mode_".concat(mode)], hardness && styles["rs-link_hardness_".concat(hardness)], external && styles["rs-link_external"], theme && styles["rs-typography_theme_".concat(theme)]);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
if (type === 'rs-ul' || type === 'rs-ol') {
|
|
42
43
|
var _context;
|
|
43
44
|
|
|
44
|
-
return cn(type, alpha && "rs-ol_alpha_".concat(alpha), offsetItems && _concatInstanceProperty(_context = "".concat(type, "_offset-items_")).call(_context, offsetItems));
|
|
45
|
+
return cn(styles[type], alpha && styles["rs-ol_alpha_".concat(alpha)], offsetItems && styles[_concatInstanceProperty(_context = "".concat(type, "_offset-items_")).call(_context, offsetItems)]);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
return cn(type, theme && "rs-typography_theme_".concat(theme));
|
|
48
|
+
return cn(styles[type], theme && styles["rs-typography_theme_".concat(theme)]);
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
return textCn;
|