@alfalab/core-components-list 3.5.3-snapshot-1393ffa → 3.5.3

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.
Files changed (146) hide show
  1. package/{cssm/src/Component.d.ts → Component-0887e7cb.d.ts} +10 -8
  2. package/{cssm/src/components/item/Component.d.ts → Component-a387f320.d.ts} +6 -3
  3. package/Component-a387f320.js +66 -0
  4. package/Component.d.ts +0 -0
  5. package/Component.js +7 -33
  6. package/components/item/Component.d.ts +0 -0
  7. package/components/item/Component.js +5 -33
  8. package/components/item/index.css +35 -14
  9. package/components/item/index.d.ts +1 -0
  10. package/components/item/index.js +2 -3
  11. package/{esm/src/Component.d.ts → cssm/Component-0887e7cb.d.ts} +10 -8
  12. package/{esm/src/components/item/Component.d.ts → cssm/Component-dea45fc5.d.ts} +6 -3
  13. package/cssm/Component-dea45fc5.js +64 -0
  14. package/cssm/Component.d.ts +0 -0
  15. package/cssm/Component.js +8 -34
  16. package/cssm/components/item/Component.d.ts +0 -0
  17. package/cssm/components/item/Component.js +6 -34
  18. package/cssm/components/item/index.d.ts +1 -0
  19. package/cssm/components/item/index.js +2 -3
  20. package/cssm/components/item/index.module.css +25 -5
  21. package/cssm/index.d.ts +2 -0
  22. package/cssm/index.js +3 -4
  23. package/cssm/index.module.css +24 -4
  24. package/cssm/{src/presets.d.ts → presets.d.ts} +2 -1
  25. package/cssm/presets.js +0 -1
  26. package/cssm/utils.d.ts +5 -0
  27. package/cssm/utils.js +0 -1
  28. package/{modern/src/Component.d.ts → esm/Component-0887e7cb.d.ts} +10 -8
  29. package/{modern/src/components/item/Component.d.ts → esm/Component-14899c73.d.ts} +6 -3
  30. package/esm/Component-14899c73.js +57 -0
  31. package/esm/Component.d.ts +0 -0
  32. package/esm/Component.js +5 -30
  33. package/esm/components/item/Component.d.ts +0 -0
  34. package/esm/components/item/Component.js +4 -31
  35. package/esm/components/item/index.css +35 -14
  36. package/esm/components/item/index.d.ts +1 -0
  37. package/esm/components/item/index.js +1 -2
  38. package/esm/index.css +29 -8
  39. package/esm/index.d.ts +2 -0
  40. package/esm/index.js +1 -2
  41. package/esm/{src/presets.d.ts → presets.d.ts} +2 -1
  42. package/esm/presets.js +0 -1
  43. package/esm/utils.d.ts +5 -0
  44. package/esm/utils.js +0 -1
  45. package/index.css +29 -8
  46. package/index.d.ts +2 -0
  47. package/index.js +3 -4
  48. package/{moderncssm/src/Component.d.ts → modern/Component-0887e7cb.d.ts} +10 -8
  49. package/{moderncssm/src/components/item/Component.d.ts → modern/Component-868a7c71.d.ts} +6 -3
  50. package/modern/Component-868a7c71.js +52 -0
  51. package/modern/Component.d.ts +0 -0
  52. package/modern/Component.js +4 -27
  53. package/modern/components/item/Component.d.ts +0 -0
  54. package/modern/components/item/Component.js +4 -29
  55. package/modern/components/item/index.css +35 -14
  56. package/modern/components/item/index.d.ts +1 -0
  57. package/modern/components/item/index.js +1 -2
  58. package/modern/index.css +29 -8
  59. package/modern/index.d.ts +2 -0
  60. package/modern/index.js +1 -2
  61. package/modern/{src/presets.d.ts → presets.d.ts} +2 -1
  62. package/modern/presets.js +0 -1
  63. package/modern/utils.d.ts +5 -0
  64. package/modern/utils.js +0 -1
  65. package/moderncssm/Component-0887e7cb.d.ts +72 -0
  66. package/moderncssm/Component-2bbdf461.d.ts +23 -0
  67. package/moderncssm/Component-2bbdf461.js +48 -0
  68. package/moderncssm/Component.d.ts +0 -0
  69. package/moderncssm/Component.js +5 -27
  70. package/moderncssm/components/item/Component.d.ts +0 -0
  71. package/moderncssm/components/item/Component.js +5 -29
  72. package/moderncssm/components/item/index.d.ts +1 -0
  73. package/moderncssm/components/item/index.js +1 -2
  74. package/moderncssm/components/item/index.module.css +2 -0
  75. package/moderncssm/index.d.ts +2 -0
  76. package/moderncssm/index.js +1 -2
  77. package/moderncssm/index.module.css +2 -0
  78. package/moderncssm/{src/presets.d.ts → presets.d.ts} +2 -1
  79. package/moderncssm/presets.js +0 -1
  80. package/moderncssm/utils.d.ts +5 -0
  81. package/moderncssm/utils.js +0 -1
  82. package/package.json +4 -4
  83. package/presets.d.ts +7 -0
  84. package/presets.js +0 -1
  85. package/utils.d.ts +5 -0
  86. package/utils.js +0 -1
  87. package/Component.js.map +0 -1
  88. package/components/item/Component.js.map +0 -1
  89. package/components/item/index.js.map +0 -1
  90. package/components/item/index.module.css.js +0 -8
  91. package/components/item/index.module.css.js.map +0 -1
  92. package/cssm/Component.js.map +0 -1
  93. package/cssm/components/item/Component.js.map +0 -1
  94. package/cssm/components/item/index.js.map +0 -1
  95. package/cssm/index.js.map +0 -1
  96. package/cssm/presets.js.map +0 -1
  97. package/cssm/src/components/item/index.d.ts +0 -1
  98. package/cssm/src/index.d.ts +0 -2
  99. package/cssm/src/utils.d.ts +0 -3
  100. package/cssm/utils.js.map +0 -1
  101. package/esm/Component.js.map +0 -1
  102. package/esm/components/item/Component.js.map +0 -1
  103. package/esm/components/item/index.js.map +0 -1
  104. package/esm/components/item/index.module.css.js +0 -6
  105. package/esm/components/item/index.module.css.js.map +0 -1
  106. package/esm/index.js.map +0 -1
  107. package/esm/index.module.css.js +0 -6
  108. package/esm/index.module.css.js.map +0 -1
  109. package/esm/presets.js.map +0 -1
  110. package/esm/src/components/item/index.d.ts +0 -1
  111. package/esm/src/index.d.ts +0 -2
  112. package/esm/src/utils.d.ts +0 -3
  113. package/esm/utils.js.map +0 -1
  114. package/index.js.map +0 -1
  115. package/index.module.css.js +0 -8
  116. package/index.module.css.js.map +0 -1
  117. package/modern/Component.js.map +0 -1
  118. package/modern/components/item/Component.js.map +0 -1
  119. package/modern/components/item/index.js.map +0 -1
  120. package/modern/components/item/index.module.css.js +0 -6
  121. package/modern/components/item/index.module.css.js.map +0 -1
  122. package/modern/index.js.map +0 -1
  123. package/modern/index.module.css.js +0 -6
  124. package/modern/index.module.css.js.map +0 -1
  125. package/modern/presets.js.map +0 -1
  126. package/modern/src/components/item/index.d.ts +0 -1
  127. package/modern/src/index.d.ts +0 -2
  128. package/modern/src/utils.d.ts +0 -3
  129. package/modern/utils.js.map +0 -1
  130. package/moderncssm/Component.js.map +0 -1
  131. package/moderncssm/components/item/Component.js.map +0 -1
  132. package/moderncssm/components/item/index.js.map +0 -1
  133. package/moderncssm/index.js.map +0 -1
  134. package/moderncssm/presets.js.map +0 -1
  135. package/moderncssm/src/components/item/index.d.ts +0 -1
  136. package/moderncssm/src/index.d.ts +0 -2
  137. package/moderncssm/src/utils.d.ts +0 -3
  138. package/moderncssm/utils.js.map +0 -1
  139. package/presets.js.map +0 -1
  140. package/src/Component.d.ts +0 -70
  141. package/src/components/item/Component.d.ts +0 -20
  142. package/src/components/item/index.d.ts +0 -1
  143. package/src/index.d.ts +0 -2
  144. package/src/presets.d.ts +0 -6
  145. package/src/utils.d.ts +0 -3
  146. package/utils.js.map +0 -1
package/modern/index.css CHANGED
@@ -1,10 +1,31 @@
1
- :root {
2
- --color-light-text-primary: rgba(3, 3, 6, 0.88);
1
+ /* hash: 12g4k */
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
- --gap-l: 20px;
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
- } .list__list_7qun8 {
26
+ } :root {
27
+ } /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
28
+ } /* сбрасывает синюю подсветку при нажатии */ .list__list_1c1hz {
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
- } .list__lowerAlpha_7qun8 {
38
+ } .list__lowerAlpha_1c1hz {
18
39
  list-style-type: lower-alpha;
19
40
  padding-left: var(--gap-20);
20
- } .list__decimal_7qun8 {
41
+ } .list__decimal_1c1hz {
21
42
  list-style-type: decimal;
22
- } ol.list__list_7qun8 {
43
+ } ol.list__list_1c1hz {
23
44
  display: flex;
24
45
  flex-direction: column
25
- } ol.list__list_7qun8.list__reversed_7qun8 {
46
+ } ol.list__list_1c1hz.list__reversed_1c1hz {
26
47
  flex-direction: column-reverse;
27
48
  }
@@ -0,0 +1,2 @@
1
+ export * from "./Component-0887e7cb";
2
+ export * from "./presets";
package/modern/index.js CHANGED
@@ -1,3 +1,2 @@
1
- export { List, ListContext } from './Component.js';
1
+ export { a as List, L as ListContext } from './Component-868a7c71.js';
2
2
  export { listPresets } from './presets.js';
3
- //# sourceMappingURL=index.js.map
@@ -1,6 +1,7 @@
1
- export declare const listPresets: {
1
+ declare const listPresets: {
2
2
  mobile: {
3
3
  tag: string;
4
4
  marker: string;
5
5
  };
6
6
  };
7
+ export { listPresets };
package/modern/presets.js CHANGED
@@ -6,4 +6,3 @@ const listPresets = {
6
6
  };
7
7
 
8
8
  export { listPresets };
9
- //# sourceMappingURL=presets.js.map
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ReactNode } from 'react';
3
+ declare const isItemElement: (obj: JSX.Element, name?: string) => boolean;
4
+ declare const isItem: (child: ReactNode) => boolean;
5
+ export { isItemElement, isItem };
package/modern/utils.js CHANGED
@@ -4,4 +4,3 @@ const isItemElement = (obj, name) => typeof obj === 'object' && obj.type.display
4
4
  const isItem = (child) => isValidElement(child) && isItemElement(child, 'ListItem');
5
5
 
6
6
  export { isItem, isItemElement };
7
- //# sourceMappingURL=utils.js.map
@@ -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
@@ -1,27 +1,5 @@
1
- import React, { Children } from 'react';
2
- import cn from 'classnames';
3
- import { Item } from './components/item/Component.js';
4
- import { isItem } from './utils.js';
5
- import styles from './index.module.css';
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 React, { useContext } from 'react';
2
- import cn from 'classnames';
3
- import { Text } from '@alfalab/core-components-typography/moderncssm';
4
- import { ListContext } from '../../Component.js';
5
- import styles from './index.module.css';
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 './Component.js';
2
- //# sourceMappingURL=index.js.map
1
+ export { I as Item } from '../../Component-2bbdf461.js';
@@ -1,3 +1,5 @@
1
+ /* */
2
+
1
3
  :root {
2
4
  --list-marker-color: var(--color-light-text-primary);
3
5
  --list-item-margin: var(--gap-12);
@@ -0,0 +1,2 @@
1
+ export * from "./Component-0887e7cb";
2
+ export * from "./presets";
@@ -1,3 +1,2 @@
1
- export { List, ListContext } from './Component.js';
1
+ export { a as List, L as ListContext } from './Component-2bbdf461.js';
2
2
  export { listPresets } from './presets.js';
3
- //# sourceMappingURL=index.js.map
@@ -1,3 +1,5 @@
1
+ /* */
2
+
1
3
  .list {
2
4
  margin: var(--gap-0);
3
5
  padding: var(--gap-0);
@@ -1,6 +1,7 @@
1
- export declare const listPresets: {
1
+ declare const listPresets: {
2
2
  mobile: {
3
3
  tag: string;
4
4
  marker: string;
5
5
  };
6
6
  };
7
+ export { listPresets };
@@ -6,4 +6,3 @@ const listPresets = {
6
6
  };
7
7
 
8
8
  export { listPresets };
9
- //# sourceMappingURL=presets.js.map
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ReactNode } from 'react';
3
+ declare const isItemElement: (obj: JSX.Element, name?: string) => boolean;
4
+ declare const isItem: (child: ReactNode) => boolean;
5
+ export { isItemElement, isItem };
@@ -4,4 +4,3 @@ const isItemElement = (obj, name) => typeof obj === 'object' && obj.type.display
4
4
  const isItem = (child) => isValidElement(child) && isItemElement(child, 'ListItem');
5
5
 
6
6
  export { isItem, isItemElement };
7
- //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-list",
3
- "version": "3.5.3-snapshot-1393ffa",
3
+ "version": "3.5.3",
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.13.1-snapshot-1393ffa",
18
+ "@alfalab/core-components-typography": "^4.13.1",
19
19
  "classnames": "^2.5.1",
20
20
  "tslib": "^2.4.0"
21
21
  },
22
- "themesVersion": "14.0.0-snapshot-1393ffa",
23
- "varsVersion": "9.20.1-snapshot-1393ffa"
22
+ "themesVersion": "13.7.3",
23
+ "varsVersion": "9.20.0"
24
24
  }
package/presets.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ declare const listPresets: {
2
+ mobile: {
3
+ tag: string;
4
+ marker: string;
5
+ };
6
+ };
7
+ export { listPresets };
package/presets.js CHANGED
@@ -10,4 +10,3 @@ var listPresets = {
10
10
  };
11
11
 
12
12
  exports.listPresets = listPresets;
13
- //# sourceMappingURL=presets.js.map
package/utils.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { ReactNode } from 'react';
3
+ declare const isItemElement: (obj: JSX.Element, name?: string) => boolean;
4
+ declare const isItem: (child: ReactNode) => boolean;
5
+ export { isItemElement, isItem };
package/utils.js CHANGED
@@ -13,4 +13,3 @@ var isItem = function (child) {
13
13
 
14
14
  exports.isItem = isItem;
15
15
  exports.isItemElement = isItemElement;
16
- //# sourceMappingURL=utils.js.map
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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,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,YAAM,CAAC,IAAI,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;AAC5C,QAAA,EAAA,CAACA,YAAM,CAAC,aAAa,CAAA,GAAG,gBAAgB;AACxC,QAAA,EAAA,CAACA,YAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;YAC7B;AAEF,IAAA,IAAM,MAAM,GAAG,UAAU,KAAK,GAAG;AAEjC,IAAA,IAAM,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK;AACrD,IAAA,IAAM,MAAM,GAAG,WAAW,IAAI,UAAU,KAAK,SAAS,GAAG,UAAG,KAAK,EAAA,GAAA,CAAG,GAAG,UAAU;AAEjF,IAAA,QACIC,sBAAI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAEF,mBAAE,CAAC,cAAc,CAAC,EAAA;AAC5B,QAAA,CAAC,gBAAgB,KACdE,sBAAA,CAAA,aAAA,CAACC,6BAAI,EAAA,EACD,GAAG,EAAC,KAAK,EACT,KAAK,EAAE,WAAW,EAClB,gBAAgB,EAAE,IAAI,EACtB,IAAI,EAAC,gBAAgB,EACrB,SAAS,EAAEH,mBAAE,CAACC,YAAM,CAAC,IAAI,EAAE,eAAe,GAAA,EAAA,GAAA,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;;;;"}
@@ -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;AAC9C,IAAA,IAAMC,WAAS,GAAG,GAAG,KAAK,IAAI,IAAI,WAAW,GAAG,IAAI,GAAG,IAAI;AAE3D,IAAA,IAAM,WAAW,GAAGA,WAAS,KAAK,IAAI;AAEtC,IAAA,IAAM,cAAc,GAAGC,mBAAE,CACrBC,uBAAM,CAAC,IAAI,GAAA,EAAA,GAAA,EAAA;AAEP,QAAA,EAAA,CAACA,uBAAM,CAAC,UAAU,CAAA,GAAG,WAAW;AAChC,QAAA,EAAA,CAACA,uBAAM,CAAC,OAAO,CAAA,GAAG,aAAa;AAC/B,QAAA,EAAA,CAACA,uBAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAE/B,QAAA,EAAA,GAAA,SAAS,CACZ;;AAGD,IAAA,QACIJ,sBAAA,CAAA,aAAA,CAACE,WAAS,EAAAG,cAAA,CAAA,EAAC,SAAS,EAAE,cAAc,EAAgB,cAAA,EAAA,UAAU,IAAM,SAAS,CAAA,EACxEC,cAAQ,CAAC,GAAG,CAAC,QAAQ,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,CA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AgB,EAChC,EAAA,QAAQ,CACN;AACN,YAAA,OAAO,KACJD,sBAAC,CAAA,aAAA,CAAAC,SAAI,EACD,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAEF,uBAAM,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":";;;;;;;;"}
package/cssm/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -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';
@@ -1,2 +0,0 @@
1
- export * from './Component';
2
- export * from './presets';
@@ -1,3 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare const isItemElement: (obj: JSX.Element, name?: string) => boolean;
3
- export declare const isItem: (child: ReactNode) => boolean;
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;;;;;"}
@@ -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,UAA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AAa,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,CA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