@rescui/typography 0.24.5-RUI-280-Update-select-component-downshift-2f40ef205.67 → 0.25.1-RUI-291-Update-next-js-to-the-latest-version-8f54dec0a.66
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 +98 -98
- package/lib/create-text-cn.js +1 -1
- package/lib/index-moduled.css +174 -120
- package/lib/index-moduled.p.module.css.js +128 -124
- package/lib/index.css +60 -6
- package/lib/index.d.ts +4 -4
- package/lib/mixins.p.css +157 -4
- package/lib/mixins.pcss +157 -4
- package/lib/public-api.p.css +212 -9
- package/lib/public-api.pcss +212 -9
- package/lib/text-color-utils.d.ts +15 -15
- package/lib/text-color-utils.js +9 -9
- package/lib/use-text-styles.d.ts +9 -9
- package/package.json +3 -3
package/lib/create-text-cn.d.ts
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
import { Theme } from '@rescui/ui-contexts';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
/**
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
paragraphOffsetAuto?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* @default average
|
|
19
|
-
*/
|
|
20
|
-
hardness?: Hardness;
|
|
21
|
-
};
|
|
22
|
-
export
|
|
23
|
-
/**
|
|
24
|
-
* @default hard
|
|
25
|
-
*/
|
|
26
|
-
hardness?: Hardness;
|
|
27
|
-
};
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
/**
|
|
31
|
-
* @default false
|
|
32
|
-
*/
|
|
33
|
-
external?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* @default null
|
|
36
|
-
*/
|
|
37
|
-
hardness?: Hardness;
|
|
38
|
-
/**
|
|
39
|
-
* @default classic
|
|
40
|
-
*/
|
|
41
|
-
mode?: Mode;
|
|
42
|
-
};
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
/**
|
|
47
|
-
* @default null
|
|
48
|
-
*/
|
|
49
|
-
alpha?: Alpha;
|
|
50
|
-
offsetItems?: OffsetItems;
|
|
51
|
-
/**
|
|
52
|
-
* @default false
|
|
53
|
-
*/
|
|
54
|
-
compact?: boolean;
|
|
55
|
-
};
|
|
56
|
-
export
|
|
57
|
-
offsetItems?: OffsetItems;
|
|
58
|
-
/**
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
compact?: boolean;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
[T in Types]: Params;
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* The example of the map content:
|
|
68
|
-
* ```
|
|
69
|
-
* {
|
|
70
|
-
* 'rs-text-1': TextsParams,
|
|
71
|
-
* 'rs-text-2': TextsParams,
|
|
72
|
-
* 'rs-text-3': TextsParams,
|
|
73
|
-
* 'rs-subtitle-1': SubtitlesAndDigitsParams,
|
|
74
|
-
* // ...
|
|
75
|
-
* }
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
export
|
|
79
|
-
export declare function createTextCn(theme?: Theme): {
|
|
80
|
-
<T extends
|
|
81
|
-
(type: Texts, params?: TextsParams): string;
|
|
82
|
-
(type: SubtitlesAndDigits, params?: SubtitlesAndDigitsParams): string;
|
|
83
|
-
(type: Link, params?: LinkParams): string;
|
|
84
|
-
(type: OrderedList, params?: OrderedListParams): string;
|
|
85
|
-
(type: UnorderedList, params?: UnorderedListParams): string;
|
|
86
|
-
(type: Others): string;
|
|
87
|
-
};
|
|
88
|
-
export declare const textCn: {
|
|
89
|
-
<T extends
|
|
90
|
-
(type: Texts, params?: TextsParams): string;
|
|
91
|
-
(type: SubtitlesAndDigits, params?: SubtitlesAndDigitsParams): string;
|
|
92
|
-
(type: Link, params?: LinkParams): string;
|
|
93
|
-
(type: OrderedList, params?: OrderedListParams): string;
|
|
94
|
-
(type: UnorderedList, params?: UnorderedListParams): string;
|
|
95
|
-
(type: Others): string;
|
|
96
|
-
};
|
|
97
|
-
export declare const colorCn: (color: Hardness |
|
|
98
|
-
export {};
|
|
1
|
+
import { Theme } from '@rescui/ui-contexts';
|
|
2
|
+
export type Texts = 'rs-text-1' | 'rs-text-2' | 'rs-text-3';
|
|
3
|
+
export type Link = 'rs-link';
|
|
4
|
+
export type OrderedList = 'rs-ol';
|
|
5
|
+
export type UnorderedList = 'rs-ul';
|
|
6
|
+
export type Subtitles = 'rs-subtitle-1' | 'rs-subtitle-2';
|
|
7
|
+
export type Digits = 'rs-digits-1' | 'rs-digits-2';
|
|
8
|
+
export type SubtitlesAndDigits = Subtitles | Digits;
|
|
9
|
+
export type Others = 'rs-super-hero' | 'rs-middle-hero' | 'rs-hero' | 'rs-h1' | 'rs-h2' | 'rs-h3-plus' | 'rs-h3' | 'rs-h4' | 'rs-h5' | 'rs-overline' | 'rs-pre' | 'rs-code';
|
|
10
|
+
export type Type = Texts | Link | OrderedList | UnorderedList | SubtitlesAndDigits | Others;
|
|
11
|
+
export type Hardness = 'average' | 'hard' | 'pale';
|
|
12
|
+
export type TextsParams = {
|
|
13
|
+
/**
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
paragraphOffsetAuto?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @default average
|
|
19
|
+
*/
|
|
20
|
+
hardness?: Hardness;
|
|
21
|
+
};
|
|
22
|
+
export type SubtitlesAndDigitsParams = {
|
|
23
|
+
/**
|
|
24
|
+
* @default hard
|
|
25
|
+
*/
|
|
26
|
+
hardness?: Hardness;
|
|
27
|
+
};
|
|
28
|
+
export type Mode = 'classic' | 'rock' | 'clear' | 'standalone';
|
|
29
|
+
export type LinkParams = {
|
|
30
|
+
/**
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
external?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @default null
|
|
36
|
+
*/
|
|
37
|
+
hardness?: Hardness;
|
|
38
|
+
/**
|
|
39
|
+
* @default classic
|
|
40
|
+
*/
|
|
41
|
+
mode?: Mode;
|
|
42
|
+
};
|
|
43
|
+
export type Alpha = 'lower' | 'upper';
|
|
44
|
+
export type OffsetItems = 4 | 8 | 12 | 16 | 24;
|
|
45
|
+
export type OrderedListParams = {
|
|
46
|
+
/**
|
|
47
|
+
* @default null
|
|
48
|
+
*/
|
|
49
|
+
alpha?: Alpha;
|
|
50
|
+
offsetItems?: OffsetItems;
|
|
51
|
+
/**
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
compact?: boolean;
|
|
55
|
+
};
|
|
56
|
+
export type UnorderedListParams = {
|
|
57
|
+
offsetItems?: OffsetItems;
|
|
58
|
+
/**
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
compact?: boolean;
|
|
62
|
+
};
|
|
63
|
+
type MapParams<Types extends string, Params extends Record<string, unknown>> = {
|
|
64
|
+
[T in Types]: Params;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The example of the map content:
|
|
68
|
+
* ```
|
|
69
|
+
* {
|
|
70
|
+
* 'rs-text-1': TextsParams,
|
|
71
|
+
* 'rs-text-2': TextsParams,
|
|
72
|
+
* 'rs-text-3': TextsParams,
|
|
73
|
+
* 'rs-subtitle-1': SubtitlesAndDigitsParams,
|
|
74
|
+
* // ...
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export type TypeToParams = MapParams<Texts, TextsParams> & MapParams<SubtitlesAndDigits, SubtitlesAndDigitsParams> & MapParams<Link, LinkParams> & MapParams<OrderedList, OrderedListParams> & MapParams<UnorderedList, UnorderedListParams> & MapParams<Others, never>;
|
|
79
|
+
export declare function createTextCn(theme?: Theme): {
|
|
80
|
+
<T extends keyof TypeToParams>(type: T, params?: TypeToParams[T]): string;
|
|
81
|
+
(type: Texts, params?: TextsParams): string;
|
|
82
|
+
(type: SubtitlesAndDigits, params?: SubtitlesAndDigitsParams): string;
|
|
83
|
+
(type: Link, params?: LinkParams): string;
|
|
84
|
+
(type: OrderedList, params?: OrderedListParams): string;
|
|
85
|
+
(type: UnorderedList, params?: UnorderedListParams): string;
|
|
86
|
+
(type: Others): string;
|
|
87
|
+
};
|
|
88
|
+
export declare const textCn: {
|
|
89
|
+
<T extends keyof TypeToParams>(type: T, params?: TypeToParams[T]): string;
|
|
90
|
+
(type: Texts, params?: TextsParams): string;
|
|
91
|
+
(type: SubtitlesAndDigits, params?: SubtitlesAndDigitsParams): string;
|
|
92
|
+
(type: Link, params?: LinkParams): string;
|
|
93
|
+
(type: OrderedList, params?: OrderedListParams): string;
|
|
94
|
+
(type: UnorderedList, params?: UnorderedListParams): string;
|
|
95
|
+
(type: Others): string;
|
|
96
|
+
};
|
|
97
|
+
export declare const colorCn: (color: Hardness | "base") => any;
|
|
98
|
+
export {};
|
package/lib/create-text-cn.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import styles from './index-moduled.p.module.css.js';
|
|
4
|
-
const 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'];
|
|
4
|
+
const 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-plus', 'rs-h3', 'rs-h4', 'rs-h5', 'rs-overline', 'rs-text-1', 'rs-text-2', 'rs-text-3'];
|
|
5
5
|
|
|
6
6
|
function createTextCn(theme) {
|
|
7
7
|
// eslint-disable-next-line complexity
|