@rescui/typography 0.24.4 → 0.25.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.
@@ -41,16 +41,24 @@ export declare type LinkParams = {
41
41
  mode?: Mode;
42
42
  };
43
43
  export declare type Alpha = 'lower' | 'upper';
44
- export declare type OffsetItems = 8 | 12 | 16 | 24;
44
+ export declare type OffsetItems = 4 | 8 | 12 | 16 | 24;
45
45
  export declare type OrderedListParams = {
46
46
  /**
47
47
  * @default null
48
48
  */
49
49
  alpha?: Alpha;
50
50
  offsetItems?: OffsetItems;
51
+ /**
52
+ * @default false
53
+ */
54
+ compact?: boolean;
51
55
  };
52
56
  export declare type UnorderedListParams = {
53
57
  offsetItems?: OffsetItems;
58
+ /**
59
+ * @default false
60
+ */
61
+ compact?: boolean;
54
62
  };
55
63
  declare type MapParams<Types extends string, Params extends Record<string, unknown>> = {
56
64
  [T in Types]: Params;
@@ -13,8 +13,10 @@ function createTextCn(theme) {
13
13
  external = false,
14
14
  mode = 'classic',
15
15
  alpha = undefined,
16
- offsetItems = undefined
17
- } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16
+ offsetItems = undefined,
17
+ compact = false
18
+ } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+ {};
18
20
 
19
21
  if (type === 'rs-digits') {
20
22
  // eslint-disable-next-line no-param-reassign
@@ -31,7 +33,7 @@ function createTextCn(theme) {
31
33
  }
32
34
 
33
35
  if (type === 'rs-ul' || type === 'rs-ol') {
34
- return cn(styles[type], alpha && styles[`rs-ol_alpha_${alpha}`], offsetItems && styles[`${type}_offset-items_${offsetItems}`]);
36
+ return cn(styles[type], alpha && styles[`rs-ol_alpha_${alpha}`], offsetItems && styles[`${type}_offset-items_${offsetItems}`], compact && styles[`${type}_compact`]);
35
37
  }
36
38
 
37
39
  return cn(styles[type], theme && styles[`rs-typography_theme_${theme}`]);