@alfalab/core-components-list 3.5.3-snapshot-1393ffa → 3.5.4
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/{cssm/src/Component.d.ts → Component-0887e7cb.d.ts} +10 -8
- package/{cssm/src/components/item/Component.d.ts → Component-6a4d58fc.d.ts} +6 -3
- package/Component-6a4d58fc.js +66 -0
- package/Component.d.ts +0 -0
- package/Component.js +7 -33
- package/components/item/Component.d.ts +0 -0
- package/components/item/Component.js +5 -33
- package/components/item/index.css +35 -14
- package/components/item/index.d.ts +1 -0
- package/components/item/index.js +2 -3
- package/{esm/src/Component.d.ts → cssm/Component-0887e7cb.d.ts} +10 -8
- package/{esm/src/components/item/Component.d.ts → cssm/Component-dea45fc5.d.ts} +6 -3
- package/cssm/Component-dea45fc5.js +64 -0
- package/cssm/Component.d.ts +0 -0
- package/cssm/Component.js +8 -34
- package/cssm/components/item/Component.d.ts +0 -0
- package/cssm/components/item/Component.js +6 -34
- package/cssm/components/item/index.d.ts +1 -0
- package/cssm/components/item/index.js +2 -3
- package/cssm/components/item/index.module.css +25 -5
- package/cssm/index.d.ts +2 -0
- package/cssm/index.js +3 -4
- package/cssm/index.module.css +24 -4
- package/cssm/{src/presets.d.ts → presets.d.ts} +2 -1
- package/cssm/presets.js +0 -1
- package/cssm/utils.d.ts +5 -0
- package/cssm/utils.js +0 -1
- package/{modern/src/Component.d.ts → esm/Component-0887e7cb.d.ts} +10 -8
- package/{modern/src/components/item/Component.d.ts → esm/Component-74208e9c.d.ts} +6 -3
- package/esm/Component-74208e9c.js +57 -0
- package/esm/Component.d.ts +0 -0
- package/esm/Component.js +5 -30
- package/esm/components/item/Component.d.ts +0 -0
- package/esm/components/item/Component.js +4 -31
- package/esm/components/item/index.css +35 -14
- package/esm/components/item/index.d.ts +1 -0
- package/esm/components/item/index.js +1 -2
- package/esm/index.css +29 -8
- package/esm/index.d.ts +2 -0
- package/esm/index.js +1 -2
- package/esm/{src/presets.d.ts → presets.d.ts} +2 -1
- package/esm/presets.js +0 -1
- package/esm/utils.d.ts +5 -0
- package/esm/utils.js +0 -1
- package/index.css +29 -8
- package/index.d.ts +2 -0
- package/index.js +3 -4
- package/{moderncssm/src/Component.d.ts → modern/Component-0887e7cb.d.ts} +10 -8
- package/{moderncssm/src/components/item/Component.d.ts → modern/Component-55c0657f.d.ts} +6 -3
- package/modern/Component-55c0657f.js +52 -0
- package/modern/Component.d.ts +0 -0
- package/modern/Component.js +4 -27
- package/modern/components/item/Component.d.ts +0 -0
- package/modern/components/item/Component.js +4 -29
- package/modern/components/item/index.css +35 -14
- package/modern/components/item/index.d.ts +1 -0
- package/modern/components/item/index.js +1 -2
- package/modern/index.css +29 -8
- package/modern/index.d.ts +2 -0
- package/modern/index.js +1 -2
- package/modern/{src/presets.d.ts → presets.d.ts} +2 -1
- package/modern/presets.js +0 -1
- package/modern/utils.d.ts +5 -0
- package/modern/utils.js +0 -1
- package/moderncssm/Component-0887e7cb.d.ts +72 -0
- package/moderncssm/Component-2bbdf461.d.ts +23 -0
- package/moderncssm/Component-2bbdf461.js +48 -0
- package/moderncssm/Component.d.ts +0 -0
- package/moderncssm/Component.js +5 -27
- package/moderncssm/components/item/Component.d.ts +0 -0
- package/moderncssm/components/item/Component.js +5 -29
- package/moderncssm/components/item/index.d.ts +1 -0
- package/moderncssm/components/item/index.js +1 -2
- package/moderncssm/components/item/index.module.css +2 -0
- package/moderncssm/index.d.ts +2 -0
- package/moderncssm/index.js +1 -2
- package/moderncssm/index.module.css +2 -0
- package/moderncssm/{src/presets.d.ts → presets.d.ts} +2 -1
- package/moderncssm/presets.js +0 -1
- package/moderncssm/utils.d.ts +5 -0
- package/moderncssm/utils.js +0 -1
- package/package.json +4 -4
- package/presets.d.ts +7 -0
- package/presets.js +0 -1
- package/utils.d.ts +5 -0
- package/utils.js +0 -1
- package/Component.js.map +0 -1
- package/components/item/Component.js.map +0 -1
- package/components/item/index.js.map +0 -1
- package/components/item/index.module.css.js +0 -8
- package/components/item/index.module.css.js.map +0 -1
- package/cssm/Component.js.map +0 -1
- package/cssm/components/item/Component.js.map +0 -1
- package/cssm/components/item/index.js.map +0 -1
- package/cssm/index.js.map +0 -1
- package/cssm/presets.js.map +0 -1
- package/cssm/src/components/item/index.d.ts +0 -1
- package/cssm/src/index.d.ts +0 -2
- package/cssm/src/utils.d.ts +0 -3
- package/cssm/utils.js.map +0 -1
- package/esm/Component.js.map +0 -1
- package/esm/components/item/Component.js.map +0 -1
- package/esm/components/item/index.js.map +0 -1
- package/esm/components/item/index.module.css.js +0 -6
- package/esm/components/item/index.module.css.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/index.module.css.js +0 -6
- package/esm/index.module.css.js.map +0 -1
- package/esm/presets.js.map +0 -1
- package/esm/src/components/item/index.d.ts +0 -1
- package/esm/src/index.d.ts +0 -2
- package/esm/src/utils.d.ts +0 -3
- package/esm/utils.js.map +0 -1
- package/index.js.map +0 -1
- package/index.module.css.js +0 -8
- package/index.module.css.js.map +0 -1
- package/modern/Component.js.map +0 -1
- package/modern/components/item/Component.js.map +0 -1
- package/modern/components/item/index.js.map +0 -1
- package/modern/components/item/index.module.css.js +0 -6
- package/modern/components/item/index.module.css.js.map +0 -1
- package/modern/index.js.map +0 -1
- package/modern/index.module.css.js +0 -6
- package/modern/index.module.css.js.map +0 -1
- package/modern/presets.js.map +0 -1
- package/modern/src/components/item/index.d.ts +0 -1
- package/modern/src/index.d.ts +0 -2
- package/modern/src/utils.d.ts +0 -3
- package/modern/utils.js.map +0 -1
- package/moderncssm/Component.js.map +0 -1
- package/moderncssm/components/item/Component.js.map +0 -1
- package/moderncssm/components/item/index.js.map +0 -1
- package/moderncssm/index.js.map +0 -1
- package/moderncssm/presets.js.map +0 -1
- package/moderncssm/src/components/item/index.d.ts +0 -1
- package/moderncssm/src/index.d.ts +0 -2
- package/moderncssm/src/utils.d.ts +0 -3
- package/moderncssm/utils.js.map +0 -1
- package/presets.js.map +0 -1
- package/src/Component.d.ts +0 -70
- package/src/components/item/Component.d.ts +0 -20
- package/src/components/item/index.d.ts +0 -1
- package/src/index.d.ts +0 -2
- package/src/presets.d.ts +0 -6
- package/src/utils.d.ts +0 -3
- package/utils.js.map +0 -1
package/modern/index.css
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
|
-
:
|
|
2
|
-
|
|
1
|
+
/* hash: qv8g5 */
|
|
2
|
+
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
|
+
} /* deprecated */ :root {
|
|
4
|
+
--color-light-text-primary: rgba(3, 3, 6, 0.88); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
6
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
7
|
} :root {
|
|
4
|
-
|
|
8
|
+
|
|
9
|
+
/* Hard */
|
|
10
|
+
|
|
11
|
+
/* Up */
|
|
12
|
+
|
|
13
|
+
/* Hard up */
|
|
14
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
15
|
+
|
|
16
|
+
/* новые значения, используйте их */
|
|
17
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
18
|
+
--gap-l: 20px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
19
|
+
|
|
20
|
+
/* новые значения, используйте их */
|
|
21
|
+
|
|
22
|
+
/* no-unit может приводить к проблемам в calc (#1559) */
|
|
23
|
+
/* stylelint-disable-next-line length-zero-no-unit */
|
|
5
24
|
--gap-0: 0px;
|
|
6
25
|
--gap-20: var(--gap-l);
|
|
7
|
-
}
|
|
26
|
+
} :root {
|
|
27
|
+
} /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
|
|
28
|
+
} /* сбрасывает синюю подсветку при нажатии */ .list__list_uygu5 {
|
|
8
29
|
margin: var(--gap-0);
|
|
9
30
|
padding: var(--gap-0);
|
|
10
31
|
color: var(--color-light-text-primary);
|
|
@@ -14,14 +35,14 @@
|
|
|
14
35
|
line-height: 24px;
|
|
15
36
|
|
|
16
37
|
font-weight: 400;
|
|
17
|
-
} .
|
|
38
|
+
} .list__lowerAlpha_uygu5 {
|
|
18
39
|
list-style-type: lower-alpha;
|
|
19
40
|
padding-left: var(--gap-20);
|
|
20
|
-
} .
|
|
41
|
+
} .list__decimal_uygu5 {
|
|
21
42
|
list-style-type: decimal;
|
|
22
|
-
} ol.
|
|
43
|
+
} ol.list__list_uygu5 {
|
|
23
44
|
display: flex;
|
|
24
45
|
flex-direction: column
|
|
25
|
-
} ol.
|
|
46
|
+
} ol.list__list_uygu5.list__reversed_uygu5 {
|
|
26
47
|
flex-direction: column-reverse;
|
|
27
48
|
}
|
package/modern/index.js
CHANGED
package/modern/presets.js
CHANGED
package/modern/utils.js
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
type TListContext = {
|
|
5
|
+
/**
|
|
6
|
+
* Упорядоченный список
|
|
7
|
+
*/
|
|
8
|
+
orderedList?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Маркер
|
|
11
|
+
* @default '—' for ul and 'decimal' for ol
|
|
12
|
+
*/
|
|
13
|
+
markerType?: 'lower-alpha' | 'decimal' | string | ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Цвет маркера
|
|
16
|
+
*/
|
|
17
|
+
colorMarker?: ColorMarkerType;
|
|
18
|
+
/**
|
|
19
|
+
* Список обратного счета
|
|
20
|
+
*/
|
|
21
|
+
reversed?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Номер пункта
|
|
24
|
+
*/
|
|
25
|
+
index?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Начало отсчета элементов списка
|
|
28
|
+
*/
|
|
29
|
+
start?: number;
|
|
30
|
+
};
|
|
31
|
+
declare const ListContext: React.Context<TListContext>;
|
|
32
|
+
type ColorMarkerType = 'tertiary' | 'accent' | 'primary' | 'attention' | 'positive' | 'secondary' | 'tertiary-inverted' | 'primary-inverted' | 'secondary-inverted' | 'link' | 'negative';
|
|
33
|
+
type ListProps = {
|
|
34
|
+
/**
|
|
35
|
+
* HTML тег
|
|
36
|
+
* @default 'ul'
|
|
37
|
+
*/
|
|
38
|
+
tag?: 'ul' | 'ol';
|
|
39
|
+
/**
|
|
40
|
+
* Маркер
|
|
41
|
+
* @default '—' for ul and 'decimal' for ol
|
|
42
|
+
*/
|
|
43
|
+
marker?: 'lower-alpha' | 'decimal' | string | ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Css-класс для стилизации
|
|
46
|
+
*/
|
|
47
|
+
className?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Цвет маркера
|
|
50
|
+
*/
|
|
51
|
+
colorMarker?: ColorMarkerType;
|
|
52
|
+
/**
|
|
53
|
+
* Список обратного счета
|
|
54
|
+
*/
|
|
55
|
+
reversed?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Начало отсчета элементов списка
|
|
58
|
+
*/
|
|
59
|
+
start?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Id компонента для тестов
|
|
62
|
+
*/
|
|
63
|
+
dataTestId?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Дочерние элементы
|
|
66
|
+
*/
|
|
67
|
+
children?: ReactNode;
|
|
68
|
+
} & Omit<React.OlHTMLAttributes<HTMLOListElement>, 'type'>;
|
|
69
|
+
declare const List: React.FC<ListProps> & {
|
|
70
|
+
Item: React.FC<import("./components/item/index").ItemProps>;
|
|
71
|
+
};
|
|
72
|
+
export { TListContext, ListContext, ListProps, List };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
type ItemProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Дополнительный текст
|
|
7
|
+
*/
|
|
8
|
+
caption?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Дочерние элементы.
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Дополнительный класс
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Дополнительный класс для маркера
|
|
19
|
+
*/
|
|
20
|
+
markerClassName?: string;
|
|
21
|
+
};
|
|
22
|
+
declare const Item: React.FC<ItemProps>;
|
|
23
|
+
export { ItemProps, Item };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { useContext, Children } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Text } from '@alfalab/core-components-typography/moderncssm';
|
|
4
|
+
import { isItem } from './utils.js';
|
|
5
|
+
import styles$1 from './index.module.css';
|
|
6
|
+
import styles from './components/item/index.module.css';
|
|
7
|
+
|
|
8
|
+
const Item = ({ caption, children, className, markerClassName }) => {
|
|
9
|
+
const { orderedList, markerType, colorMarker, reversed, index = 0, start = 0, } = useContext(ListContext);
|
|
10
|
+
const markerLowerAlpha = markerType === 'lower-alpha';
|
|
11
|
+
const itemClassNames = cn(styles.item, className, {
|
|
12
|
+
[styles.unorderedItem]: markerLowerAlpha,
|
|
13
|
+
[styles.reversed]: reversed,
|
|
14
|
+
});
|
|
15
|
+
const isDisc = markerType === '•';
|
|
16
|
+
const count = start === 0 ? index + 1 : start + index;
|
|
17
|
+
const marker = orderedList || markerType === 'decimal' ? `${count}.` : markerType;
|
|
18
|
+
return (React.createElement("li", { className: cn(itemClassNames) },
|
|
19
|
+
!markerLowerAlpha && (React.createElement(Text, { tag: 'div', color: colorMarker, monospaceNumbers: true, view: 'primary-medium', className: cn(styles.slot, markerClassName, {
|
|
20
|
+
[styles.disc]: isDisc && !orderedList,
|
|
21
|
+
[styles.defaultColor]: !colorMarker,
|
|
22
|
+
}) }, marker)),
|
|
23
|
+
React.createElement("div", null,
|
|
24
|
+
React.createElement(Text, { tag: 'div', view: 'primary-medium' }, children),
|
|
25
|
+
caption && (React.createElement(Text, { tag: 'div', view: 'primary-small', color: 'secondary', className: styles.caption }, caption)))));
|
|
26
|
+
};
|
|
27
|
+
Item.displayName = 'ListItem';
|
|
28
|
+
|
|
29
|
+
const ListContext = React.createContext({});
|
|
30
|
+
const ListComponent = ({ tag = 'ul', marker, className, dataTestId, colorMarker, children, reversed, start, ...restProps }) => {
|
|
31
|
+
const markerType = marker || (tag === 'ul' ? '—' : 'decimal');
|
|
32
|
+
const alphaMarker = markerType === 'lower-alpha';
|
|
33
|
+
const decimalMarker = markerType === 'decimal';
|
|
34
|
+
const Component = tag === 'ul' || alphaMarker ? 'ul' : 'ol';
|
|
35
|
+
const orderedList = Component === 'ol';
|
|
36
|
+
const listClassNames = cn(styles$1.list, {
|
|
37
|
+
[styles$1.lowerAlpha]: alphaMarker,
|
|
38
|
+
[styles$1.decimal]: decimalMarker,
|
|
39
|
+
[styles$1.reversed]: reversed,
|
|
40
|
+
}, className);
|
|
41
|
+
/* eslint-disable react/jsx-no-constructed-context-values */
|
|
42
|
+
return (React.createElement(Component, { className: listClassNames, "data-test-id": dataTestId, ...restProps }, Children.map(children, (child, index) => (React.createElement(ListContext.Provider, { value: { orderedList, markerType, colorMarker, reversed, index, start } }, isItem(child) ? child : React.createElement(Item, null, child))))));
|
|
43
|
+
};
|
|
44
|
+
const List = Object.assign(ListComponent, {
|
|
45
|
+
Item,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export { Item as I, ListContext as L, List as a };
|
|
File without changes
|
package/moderncssm/Component.js
CHANGED
|
@@ -1,27 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const ListContext = React.createContext({});
|
|
8
|
-
const ListComponent = ({ tag = 'ul', marker, className, dataTestId, colorMarker, children, reversed, start, ...restProps }) => {
|
|
9
|
-
const markerType = marker || (tag === 'ul' ? '—' : 'decimal');
|
|
10
|
-
const alphaMarker = markerType === 'lower-alpha';
|
|
11
|
-
const decimalMarker = markerType === 'decimal';
|
|
12
|
-
const Component = tag === 'ul' || alphaMarker ? 'ul' : 'ol';
|
|
13
|
-
const orderedList = Component === 'ol';
|
|
14
|
-
const listClassNames = cn(styles.list, {
|
|
15
|
-
[styles.lowerAlpha]: alphaMarker,
|
|
16
|
-
[styles.decimal]: decimalMarker,
|
|
17
|
-
[styles.reversed]: reversed,
|
|
18
|
-
}, className);
|
|
19
|
-
/* eslint-disable react/jsx-no-constructed-context-values */
|
|
20
|
-
return (React.createElement(Component, { className: listClassNames, "data-test-id": dataTestId, ...restProps }, Children.map(children, (child, index) => (React.createElement(ListContext.Provider, { value: { orderedList, markerType, colorMarker, reversed, index, start } }, isItem(child) ? child : React.createElement(Item, null, child))))));
|
|
21
|
-
};
|
|
22
|
-
const List = Object.assign(ListComponent, {
|
|
23
|
-
Item,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export { List, ListContext };
|
|
27
|
-
//# sourceMappingURL=Component.js.map
|
|
1
|
+
import 'react';
|
|
2
|
+
import 'classnames';
|
|
3
|
+
export { a as List, L as ListContext } from './Component-2bbdf461.js';
|
|
4
|
+
import './utils.js';
|
|
5
|
+
import './index.module.css';
|
|
File without changes
|
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const Item = ({ caption, children, className, markerClassName }) => {
|
|
8
|
-
const { orderedList, markerType, colorMarker, reversed, index = 0, start = 0, } = useContext(ListContext);
|
|
9
|
-
const markerLowerAlpha = markerType === 'lower-alpha';
|
|
10
|
-
const itemClassNames = cn(styles.item, className, {
|
|
11
|
-
[styles.unorderedItem]: markerLowerAlpha,
|
|
12
|
-
[styles.reversed]: reversed,
|
|
13
|
-
});
|
|
14
|
-
const isDisc = markerType === '•';
|
|
15
|
-
const count = start === 0 ? index + 1 : start + index;
|
|
16
|
-
const marker = orderedList || markerType === 'decimal' ? `${count}.` : markerType;
|
|
17
|
-
return (React.createElement("li", { className: cn(itemClassNames) },
|
|
18
|
-
!markerLowerAlpha && (React.createElement(Text, { tag: 'div', color: colorMarker, monospaceNumbers: true, view: 'primary-medium', className: cn(styles.slot, markerClassName, {
|
|
19
|
-
[styles.disc]: isDisc && !orderedList,
|
|
20
|
-
[styles.defaultColor]: !colorMarker,
|
|
21
|
-
}) }, marker)),
|
|
22
|
-
React.createElement("div", null,
|
|
23
|
-
React.createElement(Text, { tag: 'div', view: 'primary-medium' }, children),
|
|
24
|
-
caption && (React.createElement(Text, { tag: 'div', view: 'primary-small', color: 'secondary', className: styles.caption }, caption)))));
|
|
25
|
-
};
|
|
26
|
-
Item.displayName = 'ListItem';
|
|
27
|
-
|
|
28
|
-
export { Item };
|
|
29
|
-
//# sourceMappingURL=Component.js.map
|
|
1
|
+
import 'react';
|
|
2
|
+
import 'classnames';
|
|
3
|
+
import '@alfalab/core-components-typography/moderncssm';
|
|
4
|
+
export { I as Item } from '../../Component-2bbdf461.js';
|
|
5
|
+
import './index.module.css';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../Component-2bbdf461";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { Item } from '
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { I as Item } from '../../Component-2bbdf461.js';
|
package/moderncssm/index.js
CHANGED
package/moderncssm/presets.js
CHANGED
package/moderncssm/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-list",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-typography": "4.
|
|
18
|
+
"@alfalab/core-components-typography": "^4.14.0",
|
|
19
19
|
"classnames": "^2.5.1",
|
|
20
20
|
"tslib": "^2.4.0"
|
|
21
21
|
},
|
|
22
|
-
"themesVersion": "
|
|
23
|
-
"varsVersion": "9.20.
|
|
22
|
+
"themesVersion": "13.7.3",
|
|
23
|
+
"varsVersion": "9.20.0"
|
|
24
24
|
}
|
package/presets.d.ts
ADDED
package/presets.js
CHANGED
package/utils.d.ts
ADDED
package/utils.js
CHANGED
package/Component.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../src/Component.tsx"],"sourcesContent":["import React, { Children, ReactNode } from 'react';\nimport cn from 'classnames';\n\nimport { Item } from './components/item';\nimport { isItem } from './utils';\n\nimport styles from './index.module.css';\n\nexport type TListContext = {\n /**\n * Упорядоченный список\n */\n orderedList?: boolean;\n\n /**\n * Маркер\n * @default '—' for ul and 'decimal' for ol\n */\n markerType?: 'lower-alpha' | 'decimal' | string | ReactNode;\n\n /**\n * Цвет маркера\n */\n colorMarker?: ColorMarkerType;\n\n /**\n * Список обратного счета\n */\n reversed?: boolean;\n\n /**\n * Номер пункта\n */\n index?: number;\n\n /**\n * Начало отсчета элементов списка\n */\n start?: number;\n};\n\nexport const ListContext = React.createContext<TListContext>({});\n\ntype ColorMarkerType =\n | 'tertiary'\n | 'accent'\n | 'primary'\n | 'attention'\n | 'positive'\n | 'secondary'\n | 'tertiary-inverted'\n | 'primary-inverted'\n | 'secondary-inverted'\n | 'link'\n | 'negative';\n\nexport type ListProps = {\n /**\n * HTML тег\n * @default 'ul'\n */\n tag?: 'ul' | 'ol';\n\n /**\n * Маркер\n * @default '—' for ul and 'decimal' for ol\n */\n marker?: 'lower-alpha' | 'decimal' | string | ReactNode;\n\n /**\n * Css-класс для стилизации\n */\n className?: string;\n\n /**\n * Цвет маркера\n */\n colorMarker?: ColorMarkerType;\n\n /**\n * Список обратного счета\n */\n reversed?: boolean;\n\n /**\n * Начало отсчета элементов списка\n */\n start?: number;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Дочерние элементы\n */\n children?: ReactNode;\n} & Omit<React.OlHTMLAttributes<HTMLOListElement>, 'type'>;\n\nconst ListComponent: React.FC<ListProps> = ({\n tag = 'ul',\n marker,\n className,\n dataTestId,\n colorMarker,\n children,\n reversed,\n start,\n ...restProps\n}) => {\n const markerType = marker || (tag === 'ul' ? '—' : 'decimal');\n const alphaMarker = markerType === 'lower-alpha';\n const decimalMarker = markerType === 'decimal';\n const Component = tag === 'ul' || alphaMarker ? 'ul' : 'ol';\n\n const orderedList = Component === 'ol';\n\n const listClassNames = cn(\n styles.list,\n {\n [styles.lowerAlpha]: alphaMarker,\n [styles.decimal]: decimalMarker,\n [styles.reversed]: reversed,\n },\n className,\n );\n\n /* eslint-disable react/jsx-no-constructed-context-values */\n return (\n <Component className={listClassNames} data-test-id={dataTestId} {...restProps}>\n {Children.map(children, (child, index) => (\n <ListContext.Provider\n value={{ orderedList, markerType, colorMarker, reversed, index, start }}\n >\n {isItem(child) ? child : <Item>{child}</Item>}\n </ListContext.Provider>\n ))}\n </Component>\n );\n};\n\nexport const List = Object.assign(ListComponent, {\n Item,\n});\n"],"names":["React","__rest","Component","cn","styles","__assign","Children","isItem","Item"],"mappings":";;;;;;;;;;;;;;;;AAyCa,IAAA,WAAW,GAAGA,sBAAK,CAAC,aAAa,CAAe,EAAE;AA2D/D,IAAM,aAAa,GAAwB,UAAC,EAU3C,EAAA;;AATG,IAAA,IAAA,EAAU,GAAA,EAAA,CAAA,GAAA,EAAV,GAAG,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EACV,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,KAAK,GAAA,EAAA,CAAA,KAAA,EACF,SAAS,GAAAC,YAAA,CAAA,EAAA,EAT4B,4FAU3C,CADe;AAEZ,IAAA,IAAM,UAAU,GAAG,MAAM,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,GAAG,SAAS,CAAC;AAC7D,IAAA,IAAM,WAAW,GAAG,UAAU,KAAK,aAAa;AAChD,IAAA,IAAM,aAAa,GAAG,UAAU,KAAK,SAAS;AAC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":["import React, { ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../Component';\n\nimport styles from './index.module.css';\n\nexport type ItemProps = {\n /**\n * Дополнительный текст\n */\n caption?: string;\n\n /**\n * Дочерние элементы.\n */\n children?: ReactNode;\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дополнительный класс для маркера\n */\n markerClassName?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({ caption, children, className, markerClassName }) => {\n const {\n orderedList,\n markerType,\n colorMarker,\n reversed,\n index = 0,\n start = 0,\n } = useContext(ListContext);\n\n const markerLowerAlpha = markerType === 'lower-alpha';\n\n const itemClassNames = cn(styles.item, className, {\n [styles.unorderedItem]: markerLowerAlpha,\n [styles.reversed]: reversed,\n });\n\n const isDisc = markerType === '•';\n\n const count = start === 0 ? index + 1 : start + index;\n const marker = orderedList || markerType === 'decimal' ? `${count}.` : markerType;\n\n return (\n <li className={cn(itemClassNames)}>\n {!markerLowerAlpha && (\n <Text\n tag='div'\n color={colorMarker}\n monospaceNumbers={true}\n view='primary-medium'\n className={cn(styles.slot, markerClassName, {\n [styles.disc]: isDisc && !orderedList,\n [styles.defaultColor]: !colorMarker,\n })}\n >\n {marker}\n </Text>\n )}\n <div>\n <Text tag='div' view='primary-medium'>\n {children}\n </Text>\n {caption && (\n <Text\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </Text>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = 'ListItem';\n"],"names":["useContext","ListContext","cn","styles","React","Text"],"mappings":";;;;;;;;;;;;;;;AA+BO,IAAM,IAAI,GAAwB,UAAC,EAAiD,EAAA;;QAA/C,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,eAAe,GAAA,EAAA,CAAA,eAAA;AAC/E,IAAA,IAA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A,EAAA;AACtC,gBAAA,EAAA,CAACA,YAAM,CAAC,IAAI,IAAG,MAAM,IAAI,CAAC,WAAW;AACrC,gBAAA,EAAA,CAACA,YAAM,CAAC,YAAY,CAAA,GAAG,CAAC,WAAW;oBACrC,EAED,EAAA,MAAM,CACJ,CACV;AACD,QAAAC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACIA,sBAAC,CAAA,aAAA,CAAAC,6BAAI,EAAC,EAAA,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,gBAAgB,EAChC,EAAA,QAAQ,CACN;AACN,YAAA,OAAO,KACJD,sBAAC,CAAA,aAAA,CAAAC,6BAAI,EACD,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAEF,YAAM,CAAC,OAAO,EAExB,EAAA,OAAO,CACL,CACV,CACC,CACL;AAEb;AAEA,IAAI,CAAC,WAAW,GAAG,UAAU;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('./index.css');
|
|
4
|
-
|
|
5
|
-
var styles = {"item":"list__item_11eb2","reversed":"list__reversed_11eb2","unorderedItem":"list__unorderedItem_11eb2","slot":"list__slot_11eb2","defaultColor":"list__defaultColor_11eb2","disc":"list__disc_11eb2","caption":"list__caption_11eb2"};
|
|
6
|
-
|
|
7
|
-
module.exports = styles;
|
|
8
|
-
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/item/index.module.css"],"sourcesContent":["@import '../../../../vars/src/index.css';\n\n:root {\n --list-marker-color: var(--color-light-text-primary);\n --list-item-margin: var(--gap-12);\n}\n\n.item {\n margin-top: var(--list-item-margin);\n display: flex;\n\n &:first-child {\n margin-top: var(--gap-0);\n }\n\n &.reversed:first-child {\n margin-top: var(--list-item-margin);\n }\n\n &.reversed:last-child {\n margin-top: var(--gap-0);\n }\n\n &.unorderedItem {\n display: list-item;\n }\n}\n\n.slot {\n min-width: 20px;\n display: flex;\n box-sizing: border-box;\n justify-content: start;\n padding-right: var(--gap-4);\n flex-shrink: 0;\n\n &.defaultColor {\n color: var(--list-marker-color);\n }\n\n &.disc {\n justify-content: center;\n padding: var(--gap-0) var(--gap-4);\n }\n}\n\n.caption {\n margin-top: var(--gap-2);\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,MAAM,CAAC,kBAAkB,CAAC,UAAU,CAAC,sBAAsB,CAAC,eAAe,CAAC,2BAA2B,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,0BAA0B,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,qBAAqB,CAAC;;;;"}
|
package/cssm/Component.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/Component.tsx"],"sourcesContent":["import React, { Children, ReactNode } from 'react';\nimport cn from 'classnames';\n\nimport { Item } from './components/item';\nimport { isItem } from './utils';\n\nimport styles from './index.module.css';\n\nexport type TListContext = {\n /**\n * Упорядоченный список\n */\n orderedList?: boolean;\n\n /**\n * Маркер\n * @default '—' for ul and 'decimal' for ol\n */\n markerType?: 'lower-alpha' | 'decimal' | string | ReactNode;\n\n /**\n * Цвет маркера\n */\n colorMarker?: ColorMarkerType;\n\n /**\n * Список обратного счета\n */\n reversed?: boolean;\n\n /**\n * Номер пункта\n */\n index?: number;\n\n /**\n * Начало отсчета элементов списка\n */\n start?: number;\n};\n\nexport const ListContext = React.createContext<TListContext>({});\n\ntype ColorMarkerType =\n | 'tertiary'\n | 'accent'\n | 'primary'\n | 'attention'\n | 'positive'\n | 'secondary'\n | 'tertiary-inverted'\n | 'primary-inverted'\n | 'secondary-inverted'\n | 'link'\n | 'negative';\n\nexport type ListProps = {\n /**\n * HTML тег\n * @default 'ul'\n */\n tag?: 'ul' | 'ol';\n\n /**\n * Маркер\n * @default '—' for ul and 'decimal' for ol\n */\n marker?: 'lower-alpha' | 'decimal' | string | ReactNode;\n\n /**\n * Css-класс для стилизации\n */\n className?: string;\n\n /**\n * Цвет маркера\n */\n colorMarker?: ColorMarkerType;\n\n /**\n * Список обратного счета\n */\n reversed?: boolean;\n\n /**\n * Начало отсчета элементов списка\n */\n start?: number;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Дочерние элементы\n */\n children?: ReactNode;\n} & Omit<React.OlHTMLAttributes<HTMLOListElement>, 'type'>;\n\nconst ListComponent: React.FC<ListProps> = ({\n tag = 'ul',\n marker,\n className,\n dataTestId,\n colorMarker,\n children,\n reversed,\n start,\n ...restProps\n}) => {\n const markerType = marker || (tag === 'ul' ? '—' : 'decimal');\n const alphaMarker = markerType === 'lower-alpha';\n const decimalMarker = markerType === 'decimal';\n const Component = tag === 'ul' || alphaMarker ? 'ul' : 'ol';\n\n const orderedList = Component === 'ol';\n\n const listClassNames = cn(\n styles.list,\n {\n [styles.lowerAlpha]: alphaMarker,\n [styles.decimal]: decimalMarker,\n [styles.reversed]: reversed,\n },\n className,\n );\n\n /* eslint-disable react/jsx-no-constructed-context-values */\n return (\n <Component className={listClassNames} data-test-id={dataTestId} {...restProps}>\n {Children.map(children, (child, index) => (\n <ListContext.Provider\n value={{ orderedList, markerType, colorMarker, reversed, index, start }}\n >\n {isItem(child) ? child : <Item>{child}</Item>}\n </ListContext.Provider>\n ))}\n </Component>\n );\n};\n\nexport const List = Object.assign(ListComponent, {\n Item,\n});\n"],"names":["React","__rest","Component","cn","styles","__assign","Children","isItem","Item"],"mappings":";;;;;;;;;;;;;;;;;AAyCa,IAAA,WAAW,GAAGA,sBAAK,CAAC,aAAa,CAAe,EAAE;AA2D/D,IAAM,aAAa,GAAwB,UAAC,EAU3C,EA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,EAAE,UAAC,KAAK,EAAE,KAAK,EAAK,EAAA,QACtCN,sBAAC,CAAA,aAAA,CAAA,WAAW,CAAC,QAAQ,IACjB,KAAK,EAAE,EAAE,WAAW,aAAA,EAAE,UAAU,EAAA,UAAA,EAAE,WAAW,EAAA,WAAA,EAAE,QAAQ,EAAA,QAAA,EAAE,KAAK,EAAA,KAAA,EAAE,KAAK,OAAA,EAAE,EAAA,EAEtEO,YAAM,CAAC,KAAK,CAAC,GAAG,KAAK,GAAGP,sBAAA,CAAA,aAAA,CAACQ,cAAI,EAAE,IAAA,EAAA,KAAK,CAAQ,CAC1B,EALe,EAMzC,CAAC,CACM;AAEpB,CAAC;IAEY,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;AAC7C,IAAA,IAAI,EAAAA,cAAA;AACP,CAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../Component';\n\nimport styles from './index.module.css';\n\nexport type ItemProps = {\n /**\n * Дополнительный текст\n */\n caption?: string;\n\n /**\n * Дочерние элементы.\n */\n children?: ReactNode;\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дополнительный класс для маркера\n */\n markerClassName?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({ caption, children, className, markerClassName }) => {\n const {\n orderedList,\n markerType,\n colorMarker,\n reversed,\n index = 0,\n start = 0,\n } = useContext(ListContext);\n\n const markerLowerAlpha = markerType === 'lower-alpha';\n\n const itemClassNames = cn(styles.item, className, {\n [styles.unorderedItem]: markerLowerAlpha,\n [styles.reversed]: reversed,\n });\n\n const isDisc = markerType === '•';\n\n const count = start === 0 ? index + 1 : start + index;\n const marker = orderedList || markerType === 'decimal' ? `${count}.` : markerType;\n\n return (\n <li className={cn(itemClassNames)}>\n {!markerLowerAlpha && (\n <Text\n tag='div'\n color={colorMarker}\n monospaceNumbers={true}\n view='primary-medium'\n className={cn(styles.slot, markerClassName, {\n [styles.disc]: isDisc && !orderedList,\n [styles.defaultColor]: !colorMarker,\n })}\n >\n {marker}\n </Text>\n )}\n <div>\n <Text tag='div' view='primary-medium'>\n {children}\n </Text>\n {caption && (\n <Text\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </Text>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = 'ListItem';\n"],"names":["useContext","ListContext","cn","styles","React","Text"],"mappings":";;;;;;;;;;;;;;;;AA+BO,IAAM,IAAI,GAAwB,UAAC,EAAiD,EAAA;;QAA/C,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,eAAe,GAAA,EAAA,CAAA,eAAA;AAC/E,IAAA,IAAA,EAOF,GAAAA,gBAAU,CAACC,qBAAW,CAAC,EANvB,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,EAAA,GAAA,EAAA,CAAA,KAAS,EAAT,KAAK,mBAAG,CAAC,GAAA,EAAA,EACT,EAAA,GAAA,EAAA,CAAA,KAAS,EAAT,KAAK,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,KACc;AAE3B,IAAA,IAAM,gBAAgB,GAAG,UAAU,KAAK,aAAa;IAErD,IAAM,cAAc,GAAGC,mBAAE,CAACC,uBAAM,CAAC,IAAI,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;AAC5C,QAAA,EAAA,CAACA,uBAAM,CAAC,aAAa,CAAA,GAAG,gBAAgB;AACxC,QAAA,EAAA,CAACA,uBAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/cssm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/cssm/presets.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presets.js","sources":["../../src/presets.ts"],"sourcesContent":["export const listPresets = {\n mobile: {\n tag: 'ul',\n marker: '–',\n },\n};\n"],"names":[],"mappings":";;;;AAAa,IAAA,WAAW,GAAG;AACvB,IAAA,MAAM,EAAE;AACJ,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,MAAM,EAAE,GAAG;AACd,KAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
package/cssm/src/index.d.ts
DELETED
package/cssm/src/utils.d.ts
DELETED
package/cssm/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../src/utils.ts"],"sourcesContent":["import { isValidElement, ReactNode } from 'react';\n\nexport const isItemElement = (obj: JSX.Element, name?: string): boolean =>\n typeof obj === 'object' && obj.type.displayName === name;\n\nexport const isItem = (child: ReactNode) =>\n isValidElement(child) && isItemElement(child, 'ListItem');\n"],"names":["isValidElement"],"mappings":";;;;;;AAEa,IAAA,aAAa,GAAG,UAAC,GAAgB,EAAE,IAAa,EAAA;IACzD,OAAA,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI;AAAxD;AAEG,IAAM,MAAM,GAAG,UAAC,KAAgB,EAAA;IACnC,OAAAA,oBAAc,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC;AAAzD;;;;;"}
|
package/esm/Component.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/Component.tsx"],"sourcesContent":["import React, { Children, ReactNode } from 'react';\nimport cn from 'classnames';\n\nimport { Item } from './components/item';\nimport { isItem } from './utils';\n\nimport styles from './index.module.css';\n\nexport type TListContext = {\n /**\n * Упорядоченный список\n */\n orderedList?: boolean;\n\n /**\n * Маркер\n * @default '—' for ul and 'decimal' for ol\n */\n markerType?: 'lower-alpha' | 'decimal' | string | ReactNode;\n\n /**\n * Цвет маркера\n */\n colorMarker?: ColorMarkerType;\n\n /**\n * Список обратного счета\n */\n reversed?: boolean;\n\n /**\n * Номер пункта\n */\n index?: number;\n\n /**\n * Начало отсчета элементов списка\n */\n start?: number;\n};\n\nexport const ListContext = React.createContext<TListContext>({});\n\ntype ColorMarkerType =\n | 'tertiary'\n | 'accent'\n | 'primary'\n | 'attention'\n | 'positive'\n | 'secondary'\n | 'tertiary-inverted'\n | 'primary-inverted'\n | 'secondary-inverted'\n | 'link'\n | 'negative';\n\nexport type ListProps = {\n /**\n * HTML тег\n * @default 'ul'\n */\n tag?: 'ul' | 'ol';\n\n /**\n * Маркер\n * @default '—' for ul and 'decimal' for ol\n */\n marker?: 'lower-alpha' | 'decimal' | string | ReactNode;\n\n /**\n * Css-класс для стилизации\n */\n className?: string;\n\n /**\n * Цвет маркера\n */\n colorMarker?: ColorMarkerType;\n\n /**\n * Список обратного счета\n */\n reversed?: boolean;\n\n /**\n * Начало отсчета элементов списка\n */\n start?: number;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Дочерние элементы\n */\n children?: ReactNode;\n} & Omit<React.OlHTMLAttributes<HTMLOListElement>, 'type'>;\n\nconst ListComponent: React.FC<ListProps> = ({\n tag = 'ul',\n marker,\n className,\n dataTestId,\n colorMarker,\n children,\n reversed,\n start,\n ...restProps\n}) => {\n const markerType = marker || (tag === 'ul' ? '—' : 'decimal');\n const alphaMarker = markerType === 'lower-alpha';\n const decimalMarker = markerType === 'decimal';\n const Component = tag === 'ul' || alphaMarker ? 'ul' : 'ol';\n\n const orderedList = Component === 'ol';\n\n const listClassNames = cn(\n styles.list,\n {\n [styles.lowerAlpha]: alphaMarker,\n [styles.decimal]: decimalMarker,\n [styles.reversed]: reversed,\n },\n className,\n );\n\n /* eslint-disable react/jsx-no-constructed-context-values */\n return (\n <Component className={listClassNames} data-test-id={dataTestId} {...restProps}>\n {Children.map(children, (child, index) => (\n <ListContext.Provider\n value={{ orderedList, markerType, colorMarker, reversed, index, start }}\n >\n {isItem(child) ? child : <Item>{child}</Item>}\n </ListContext.Provider>\n ))}\n </Component>\n );\n};\n\nexport const List = Object.assign(ListComponent, {\n Item,\n});\n"],"names":[],"mappings":";;;;;;;AAyCa,IAAA,WAAW,GAAG,KAAK,CAAC,aAAa,CAAe,EAAE;AA2D/D,IAAM,aAAa,GAAwB,UAAC,EAU3C,EAAA;;AATG,IAAA,IAAA,EAAU,GAAA,EAAA,CAAA,GAAA,EAAV,GAAG,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EACV,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,KAAK,GAAA,EAAA,CAAA,KAAA,EACF,SAAS,GAAA,MAAA,CAAA,EAAA,EAT4B,4FAU3C,CADe;AAEZ,IAAA,IAAM,UAAU,GAAG,MAAM,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,GAAG,SAAS,CAAC;AAC7D,IAAA,IAAM,WAAW,GAAG,UAAU,KAAK,aAAa;AAChD,IAAA,IAAM,aAAa,GAAG,UAAU,KAAK,SAAS;AAC9C,IAAA,IAAM,SAAS,GAAG,GAAG,KAAK,IAAI,IAAI,WAAW,GAAG,IAAI,GAAG,IAAI;AAE3D,IAAA,IAAM,WAAW,GAAG,SAAS,KAAK,IAAI;AAEtC,IAAA,IAAM,cAAc,GAAG,EAAE,CACrB,MAAM,CAAC,IAAI,GAAA,EAAA,GAAA,EAAA;AAEP,QAAA,EAAA,CAAC,MAAM,CAAC,UAAU,CAAA,GAAG,WAAW;AAChC,QAAA,EAAA,CAAC,MAAM,CAAC,OAAO,CAAA,GAAG,aAAa;AAC/B,QAAA,EAAA,CAAC,MAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAE/B,QAAA,EAAA,GAAA,SAAS,CACZ;;AAGD,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,QAAA,CAAA,EAAC,SAAS,EAAE,cAAc,EAAgB,cAAA,EAAA,UAAU,IAAM,SAAS,CAAA,EACxE,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAE,KAAK,EAAK,EAAA,QACtC,KAAC,CAAA,aAAA,CAAA,WAAW,CAAC,QAAQ,IACjB,KAAK,EAAE,EAAE,WAAW,aAAA,EAAE,UAAU,EAAA,UAAA,EAAE,WAAW,EAAA,WAAA,EAAE,QAAQ,EAAA,QAAA,EAAE,KAAK,EAAA,KAAA,EAAE,KAAK,OAAA,EAAE,EAAA,EAEtE,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,KAAA,CAAA,aAAA,CAAC,IAAI,EAAE,IAAA,EAAA,KAAK,CAAQ,CAC1B,EALe,EAMzC,CAAC,CACM;AAEpB,CAAC;IAEY,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;AAC7C,IAAA,IAAI,EAAA,IAAA;AACP,CAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { Text } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../Component';\n\nimport styles from './index.module.css';\n\nexport type ItemProps = {\n /**\n * Дополнительный текст\n */\n caption?: string;\n\n /**\n * Дочерние элементы.\n */\n children?: ReactNode;\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дополнительный класс для маркера\n */\n markerClassName?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({ caption, children, className, markerClassName }) => {\n const {\n orderedList,\n markerType,\n colorMarker,\n reversed,\n index = 0,\n start = 0,\n } = useContext(ListContext);\n\n const markerLowerAlpha = markerType === 'lower-alpha';\n\n const itemClassNames = cn(styles.item, className, {\n [styles.unorderedItem]: markerLowerAlpha,\n [styles.reversed]: reversed,\n });\n\n const isDisc = markerType === '•';\n\n const count = start === 0 ? index + 1 : start + index;\n const marker = orderedList || markerType === 'decimal' ? `${count}.` : markerType;\n\n return (\n <li className={cn(itemClassNames)}>\n {!markerLowerAlpha && (\n <Text\n tag='div'\n color={colorMarker}\n monospaceNumbers={true}\n view='primary-medium'\n className={cn(styles.slot, markerClassName, {\n [styles.disc]: isDisc && !orderedList,\n [styles.defaultColor]: !colorMarker,\n })}\n >\n {marker}\n </Text>\n )}\n <div>\n <Text tag='div' view='primary-medium'>\n {children}\n </Text>\n {caption && (\n <Text\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </Text>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = 'ListItem';\n"],"names":[],"mappings":";;;;;;AA+BO,IAAM,IAAI,GAAwB,UAAC,EAAiD,EAAA;;QAA/C,OAAO,GAAA,EAAA,CAAA,OAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,eAAe,GAAA,EAAA,CAAA,eAAA;AAC/E,IAAA,IAAA,EAOF,GAAA,UAAU,CAAC,WAAW,CAAC,EANvB,WAAW,GAAA,EAAA,CAAA,WAAA,EACX,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,WAAW,GAAA,EAAA,CAAA,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