@rescui/typography 0.9.0 → 0.10.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 +7 -0
- package/lib/create-text-cn.js +6 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -4
- package/lib/index.js +1 -2
- package/lib/mixins.p.css +1 -1
- package/lib/mixins.pcss +1 -1
- package/package.json +4 -4
- package/lib/hooks.d.ts +0 -7
- package/lib/hooks.js +0 -8
package/lib/create-text-cn.d.ts
CHANGED
|
@@ -52,3 +52,10 @@ export declare function createTextCn(theme: Theme): {
|
|
|
52
52
|
(type: UnorderedList, params?: UnorderedListParams): string;
|
|
53
53
|
(type: Others): string;
|
|
54
54
|
};
|
|
55
|
+
export declare const useTextStyles: () => {
|
|
56
|
+
(type: Texts, params?: TextsParams): string;
|
|
57
|
+
(type: Link, params?: LinkParams): string;
|
|
58
|
+
(type: OrderedList, params?: OrderedListParams): string;
|
|
59
|
+
(type: UnorderedList, params?: UnorderedListParams): string;
|
|
60
|
+
(type: Others): string;
|
|
61
|
+
};
|
package/lib/create-text-cn.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
2
|
+
import { useTheme } from '@rescui/ui-contexts';
|
|
2
3
|
import bemCnFast from 'bem-cn-fast';
|
|
3
4
|
var THEMED_TYPES = ['rs-super-hero', 'rs-digits-1', 'rs-digits-2', 'rs-hero', 'rs-subtitle-1', 'rs-h1', 'rs-subtitle-2', 'rs-h2', 'rs-h3', 'rs-h4', 'rs-h5', 'rs-overline', 'rs-pre', 'rs-code', 'rs-link', 'rs-article', 'rs-text-1', 'rs-text-2', 'rs-text-3', 'rs-link'];
|
|
4
5
|
|
|
@@ -44,4 +45,8 @@ function createTextCn(theme) {
|
|
|
44
45
|
return textCn;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
var useTextStyles = function useTextStyles() {
|
|
49
|
+
return createTextCn(useTheme());
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export { createTextCn, useTextStyles };
|
package/lib/index.css
CHANGED
|
@@ -625,7 +625,7 @@
|
|
|
625
625
|
padding-left:28px;
|
|
626
626
|
}
|
|
627
627
|
.rs-ul > li::before{
|
|
628
|
-
content:'
|
|
628
|
+
content:'\2022';
|
|
629
629
|
}
|
|
630
630
|
.rs-ol{
|
|
631
631
|
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import './styles';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export { createTextCn } from './create-text-cn';
|
|
5
|
-
export { useTextStyles } from './hooks';
|
|
2
|
+
export { createTextCn, useTextStyles } from './create-text-cn';
|
|
3
|
+
export type { TextsParams, LinkParams, OrderedListParams, UnorderedListParams, Texts, Link, OrderedList, UnorderedList, Others, Hardness, Mode, Alpha, OffsetItems } from './create-text-cn';
|
|
6
4
|
export * from './text-color-utils';
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
export { useTextStyles } from './
|
|
3
|
-
export { createTextCn } from './create-text-cn.js';
|
|
2
|
+
export { createTextCn, useTextStyles } from './create-text-cn.js';
|
|
4
3
|
export { resetTypographyColorVariables, typographyDark, typographyLight } from './text-color-utils.js';
|
package/lib/mixins.p.css
CHANGED
package/lib/mixins.pcss
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/typography",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@babel/runtime-corejs3": "^7.14.0",
|
|
22
|
-
"@rescui/colors": "^0.1.
|
|
22
|
+
"@rescui/colors": "^0.1.6",
|
|
23
23
|
"bem-cn-fast": "^1.0.2",
|
|
24
24
|
"inter-ui": "^3.15.1"
|
|
25
25
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@rescui/postcss-preset-library": "^0.1.0",
|
|
32
|
-
"@rescui/scripts": "^0.
|
|
32
|
+
"@rescui/scripts": "^0.2.0",
|
|
33
33
|
"@rescui/visual-regression": "^0.0.4",
|
|
34
34
|
"case": "^1.6.3",
|
|
35
35
|
"fs-extra": "^7.0.1",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"build": "rescui-scripts build --no-css-modules && yarn run build-mixins && shx cp src/font-*.css lib",
|
|
41
41
|
"build-mixins": "rescui-scripts postcss --glob mixins.p.css --config ./.postcssrc-mixins.js --no-clean-out && shx mv lib/mixins.css lib/mixins.p.css && shx cp lib/mixins.p.css lib/mixins.pcss && shx rm lib/mixins.css.map"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "c87adfdebe07392a0aa67ce434ce465762d8fa95"
|
|
44
44
|
}
|
package/lib/hooks.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const useTextStyles: () => {
|
|
2
|
-
(type: import("./create-text-cn").Texts, params?: import("./create-text-cn").TextsParams): string;
|
|
3
|
-
(type: "rs-link", params?: import("./create-text-cn").LinkParams): string;
|
|
4
|
-
(type: "rs-ol", params?: import("./create-text-cn").OrderedListParams): string;
|
|
5
|
-
(type: "rs-ul", params?: import("./create-text-cn").UnorderedListParams): string;
|
|
6
|
-
(type: import("./create-text-cn").Others): string;
|
|
7
|
-
};
|