@alfalab/core-components-list 5.0.10 → 5.0.11-alfasans
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/components/item/Component.js +1 -1
- package/components/item/Component.js.map +1 -1
- package/components/item/index.css +9 -9
- package/components/item/index.module.css.js +1 -1
- package/cssm/components/item/Component.js +1 -1
- package/cssm/components/item/Component.js.map +1 -1
- package/cssm/index.module.css +6 -3
- package/cssm/utils.js +1 -3
- package/cssm/utils.js.map +1 -1
- package/esm/components/item/Component.js +1 -1
- package/esm/components/item/Component.js.map +1 -1
- package/esm/components/item/index.css +9 -9
- package/esm/components/item/index.module.css.js +1 -1
- package/esm/index.css +11 -8
- package/esm/index.module.css.js +1 -1
- package/esm/utils.js +1 -3
- package/esm/utils.js.map +1 -1
- package/index.css +11 -8
- package/index.module.css.js +1 -1
- package/modern/components/item/Component.js +1 -1
- package/modern/components/item/Component.js.map +1 -1
- package/modern/components/item/index.css +9 -9
- package/modern/components/item/index.module.css.js +1 -1
- package/modern/index.css +11 -8
- package/modern/index.module.css.js +1 -1
- package/modern/utils.js +1 -1
- package/modern/utils.js.map +1 -1
- package/moderncssm/components/item/Component.js +1 -1
- package/moderncssm/components/item/Component.js.map +1 -1
- package/moderncssm/index.module.css +3 -1
- package/moderncssm/utils.js +1 -1
- package/moderncssm/utils.js.map +1 -1
- package/package.json +4 -4
- package/src/components/item/Component.tsx +1 -1
- package/src/utils.ts +1 -2
- package/utils.js +1 -3
- package/utils.js.map +1 -1
|
@@ -34,7 +34,7 @@ var Item = function (_a) {
|
|
|
34
34
|
React__default.default.createElement(coreComponentsTypography.TypographyText, { tag: 'div', view: 'primary-medium' }, children),
|
|
35
35
|
caption && (React__default.default.createElement(coreComponentsTypography.TypographyText, { tag: 'div', view: 'primary-small', color: 'secondary', className: index_module.caption }, caption)))));
|
|
36
36
|
};
|
|
37
|
-
Item.displayName = '
|
|
37
|
+
Item.displayName = 'Item';
|
|
38
38
|
|
|
39
39
|
exports.Item = Item;
|
|
40
40
|
//# sourceMappingURL=Component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = '
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = 'Item';\n"],"names":["useContext","ListContext","cn","styles","React","TypographyText"],"mappings":";;;;;;;;;;;;;;;AAoCO,IAAM,IAAI,GAAwB,UAAC,EAMzC,EAAA;;AALG,IAAA,IAAA,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,UAAU,GAAA,EAAA,CAAA,UAAA;AAEJ,IAAA,IAAA,EAOF,GAAAA,gBAAU,CAACC,mBAAW,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;IAEjF,QACIC,6CAAI,SAAS,EAAEF,mBAAE,CAAC,cAAc,CAAC,EAAA,cAAA,EAAgB,UAAU,EAAA;AACtD,QAAA,CAAC,gBAAgB,KACdE,sBAAA,CAAA,aAAA,CAACC,uCAAc,EAAA,EACX,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,CACM,CACpB;AACD,QAAAC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACIA,sBAAC,CAAA,aAAA,CAAAC,uCAAc,EAAC,EAAA,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,gBAAgB,EAC1C,EAAA,QAAQ,CACI;AAChB,YAAA,OAAO,KACJD,sBAAC,CAAA,aAAA,CAAAC,uCAAc,EACX,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAEF,YAAM,CAAC,OAAO,EAExB,EAAA,OAAO,CACK,CACpB,CACC,CACL;AAEb;AAEA,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
--list-marker-color: var(--color-light-text-primary);
|
|
12
12
|
--list-item-margin: var(--gap-12);
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
.list__item_10gf3 {
|
|
15
15
|
margin-top: var(--list-item-margin);
|
|
16
16
|
display: flex;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.list__item_10gf3:first-child {
|
|
19
19
|
margin-top: var(--gap-0);
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.list__item_10gf3.list__reversed_10gf3:first-child {
|
|
22
22
|
margin-top: var(--list-item-margin);
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.list__item_10gf3.list__reversed_10gf3:last-child {
|
|
25
25
|
margin-top: var(--gap-0);
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.list__item_10gf3.list__unorderedItem_10gf3 {
|
|
28
28
|
display: list-item;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.list__slot_10gf3 {
|
|
31
31
|
min-width: 20px;
|
|
32
32
|
display: flex;
|
|
33
33
|
box-sizing: border-box;
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
padding-right: var(--gap-4);
|
|
36
36
|
flex-shrink: 0;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.list__slot_10gf3.list__defaultColor_10gf3 {
|
|
39
39
|
color: var(--list-marker-color);
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.list__slot_10gf3.list__disc_10gf3 {
|
|
42
42
|
justify-content: center;
|
|
43
43
|
padding: var(--gap-0) var(--gap-4);
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
.list__caption_10gf3 {
|
|
46
46
|
margin-top: var(--gap-2);
|
|
47
47
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"item":"
|
|
5
|
+
var styles = {"item":"list__item_10gf3","reversed":"list__reversed_10gf3","unorderedItem":"list__unorderedItem_10gf3","slot":"list__slot_10gf3","defaultColor":"list__defaultColor_10gf3","disc":"list__disc_10gf3","caption":"list__caption_10gf3"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -35,7 +35,7 @@ var Item = function (_a) {
|
|
|
35
35
|
React__default.default.createElement(cssm.TypographyText, { tag: 'div', view: 'primary-medium' }, children),
|
|
36
36
|
caption && (React__default.default.createElement(cssm.TypographyText, { tag: 'div', view: 'primary-small', color: 'secondary', className: styles__default.default.caption }, caption)))));
|
|
37
37
|
};
|
|
38
|
-
Item.displayName = '
|
|
38
|
+
Item.displayName = 'Item';
|
|
39
39
|
|
|
40
40
|
exports.Item = Item;
|
|
41
41
|
//# sourceMappingURL=Component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = '
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = 'Item';\n"],"names":["useContext","ListContext","cn","styles","React","TypographyText"],"mappings":";;;;;;;;;;;;;;;;AAoCO,IAAM,IAAI,GAAwB,UAAC,EAMzC,EAAA;;AALG,IAAA,IAAA,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,UAAU,GAAA,EAAA,CAAA,UAAA;AAEJ,IAAA,IAAA,EAOF,GAAAA,gBAAU,CAACC,mBAAW,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;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;IAEjF,QACIC,6CAAI,SAAS,EAAEF,mBAAE,CAAC,cAAc,CAAC,EAAA,cAAA,EAAgB,UAAU,EAAA;AACtD,QAAA,CAAC,gBAAgB,KACdE,sBAAA,CAAA,aAAA,CAACC,mBAAc,EAAA,EACX,GAAG,EAAC,KAAK,EACT,KAAK,EAAE,WAAW,EAClB,gBAAgB,EAAE,IAAI,EACtB,IAAI,EAAC,gBAAgB,EACrB,SAAS,EAAEH,mBAAE,CAACC,uBAAM,CAAC,IAAI,EAAE,eAAe,GAAA,EAAA,GAAA,EAAA;AACtC,gBAAA,EAAA,CAACA,uBAAM,CAAC,IAAI,IAAG,MAAM,IAAI,CAAC,WAAW;AACrC,gBAAA,EAAA,CAACA,uBAAM,CAAC,YAAY,CAAA,GAAG,CAAC,WAAW;oBACrC,EAED,EAAA,MAAM,CACM,CACpB;AACD,QAAAC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACIA,sBAAC,CAAA,aAAA,CAAAC,mBAAc,EAAC,EAAA,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,gBAAgB,EAC1C,EAAA,QAAQ,CACI;AAChB,YAAA,OAAO,KACJD,sBAAC,CAAA,aAAA,CAAAC,mBAAc,EACX,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAEF,uBAAM,CAAC,OAAO,EAExB,EAAA,OAAO,CACK,CACpB,CACC,CACL;AAEb;AAEA,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
package/cssm/index.module.css
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
--gap-20: 20px;
|
|
7
7
|
}
|
|
8
8
|
:root {
|
|
9
|
-
--font-family-
|
|
10
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
9
|
+
--font-family-alfasans:
|
|
10
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
11
|
+
Helvetica, sans-serif;
|
|
11
12
|
}
|
|
12
13
|
.list {
|
|
13
14
|
margin: var(--gap-0);
|
|
@@ -20,7 +21,9 @@
|
|
|
20
21
|
|
|
21
22
|
font-weight: 400;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
letter-spacing: -0.24px;
|
|
25
|
+
|
|
26
|
+
font-family: var(--font-family-alfasans);
|
|
24
27
|
}
|
|
25
28
|
.lowerAlpha {
|
|
26
29
|
list-style-type: lower-alpha;
|
package/cssm/utils.js
CHANGED
|
@@ -7,9 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var isItemElement = function (obj, name) {
|
|
8
8
|
return typeof obj === 'object' && obj.type.displayName === name;
|
|
9
9
|
};
|
|
10
|
-
var isItem = function (child) {
|
|
11
|
-
return React.isValidElement(child) && isItemElement(child, 'ListItem');
|
|
12
|
-
};
|
|
10
|
+
var isItem = function (child) { return React.isValidElement(child) && isItemElement(child, 'Item'); };
|
|
13
11
|
|
|
14
12
|
exports.isItem = isItem;
|
|
15
13
|
exports.isItemElement = isItemElement;
|
package/cssm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { isValidElement, type 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)
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { isValidElement, type 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) => isValidElement(child) && isItemElement(child, 'Item');\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;IAES,MAAM,GAAG,UAAC,KAAgB,EAAA,EAAK,OAAAA,oBAAc,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAArD;;;;;"}
|
|
@@ -25,7 +25,7 @@ var Item = function (_a) {
|
|
|
25
25
|
React.createElement(TypographyText, { tag: 'div', view: 'primary-medium' }, children),
|
|
26
26
|
caption && (React.createElement(TypographyText, { tag: 'div', view: 'primary-small', color: 'secondary', className: styles.caption }, caption)))));
|
|
27
27
|
};
|
|
28
|
-
Item.displayName = '
|
|
28
|
+
Item.displayName = 'Item';
|
|
29
29
|
|
|
30
30
|
export { Item };
|
|
31
31
|
//# sourceMappingURL=Component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = '
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = 'Item';\n"],"names":[],"mappings":";;;;;;AAoCO,IAAM,IAAI,GAAwB,UAAC,EAMzC,EAAA;;AALG,IAAA,IAAA,OAAO,GAAA,EAAA,CAAA,OAAA,EACP,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,eAAe,GAAA,EAAA,CAAA,eAAA,EACf,UAAU,GAAA,EAAA,CAAA,UAAA;AAEJ,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,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,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;AAC5C,QAAA,EAAA,CAAC,MAAM,CAAC,aAAa,CAAA,GAAG,gBAAgB;AACxC,QAAA,EAAA,CAAC,MAAM,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;IAEjF,QACI,4BAAI,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAA,cAAA,EAAgB,UAAU,EAAA;AACtD,QAAA,CAAC,gBAAgB,KACd,KAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EACX,GAAG,EAAC,KAAK,EACT,KAAK,EAAE,WAAW,EAClB,gBAAgB,EAAE,IAAI,EACtB,IAAI,EAAC,gBAAgB,EACrB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,GAAA,EAAA,GAAA,EAAA;AACtC,gBAAA,EAAA,CAAC,MAAM,CAAC,IAAI,IAAG,MAAM,IAAI,CAAC,WAAW;AACrC,gBAAA,EAAA,CAAC,MAAM,CAAC,YAAY,CAAA,GAAG,CAAC,WAAW;oBACrC,EAED,EAAA,MAAM,CACM,CACpB;AACD,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACI,KAAC,CAAA,aAAA,CAAA,cAAc,EAAC,EAAA,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,gBAAgB,EAC1C,EAAA,QAAQ,CACI;AAChB,YAAA,OAAO,KACJ,KAAC,CAAA,aAAA,CAAA,cAAc,EACX,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAE,MAAM,CAAC,OAAO,EAExB,EAAA,OAAO,CACK,CACpB,CACC,CACL;AAEb;AAEA,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
--list-marker-color: var(--color-light-text-primary);
|
|
12
12
|
--list-item-margin: var(--gap-12);
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
.list__item_10gf3 {
|
|
15
15
|
margin-top: var(--list-item-margin);
|
|
16
16
|
display: flex;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.list__item_10gf3:first-child {
|
|
19
19
|
margin-top: var(--gap-0);
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.list__item_10gf3.list__reversed_10gf3:first-child {
|
|
22
22
|
margin-top: var(--list-item-margin);
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.list__item_10gf3.list__reversed_10gf3:last-child {
|
|
25
25
|
margin-top: var(--gap-0);
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.list__item_10gf3.list__unorderedItem_10gf3 {
|
|
28
28
|
display: list-item;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.list__slot_10gf3 {
|
|
31
31
|
min-width: 20px;
|
|
32
32
|
display: flex;
|
|
33
33
|
box-sizing: border-box;
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
padding-right: var(--gap-4);
|
|
36
36
|
flex-shrink: 0;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.list__slot_10gf3.list__defaultColor_10gf3 {
|
|
39
39
|
color: var(--list-marker-color);
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.list__slot_10gf3.list__disc_10gf3 {
|
|
42
42
|
justify-content: center;
|
|
43
43
|
padding: var(--gap-0) var(--gap-4);
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
.list__caption_10gf3 {
|
|
46
46
|
margin-top: var(--gap-2);
|
|
47
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"item":"
|
|
3
|
+
var styles = {"item":"list__item_10gf3","reversed":"list__reversed_10gf3","unorderedItem":"list__unorderedItem_10gf3","slot":"list__slot_10gf3","defaultColor":"list__defaultColor_10gf3","disc":"list__disc_10gf3","caption":"list__caption_10gf3"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
package/esm/index.css
CHANGED
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
--gap-20: 20px;
|
|
7
7
|
}
|
|
8
8
|
:root {
|
|
9
|
-
--font-family-
|
|
10
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
9
|
+
--font-family-alfasans:
|
|
10
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
11
|
+
Helvetica, sans-serif;
|
|
11
12
|
}
|
|
12
|
-
.
|
|
13
|
+
.list__list_w6yj5 {
|
|
13
14
|
margin: var(--gap-0);
|
|
14
15
|
padding: var(--gap-0);
|
|
15
16
|
color: var(--color-light-text-primary);
|
|
@@ -20,19 +21,21 @@
|
|
|
20
21
|
|
|
21
22
|
font-weight: 400;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
letter-spacing: -0.24px;
|
|
25
|
+
|
|
26
|
+
font-family: var(--font-family-alfasans);
|
|
24
27
|
}
|
|
25
|
-
.
|
|
28
|
+
.list__lowerAlpha_w6yj5 {
|
|
26
29
|
list-style-type: lower-alpha;
|
|
27
30
|
padding-left: var(--gap-20);
|
|
28
31
|
}
|
|
29
|
-
.
|
|
32
|
+
.list__decimal_w6yj5 {
|
|
30
33
|
list-style-type: decimal;
|
|
31
34
|
}
|
|
32
|
-
ol.
|
|
35
|
+
ol.list__list_w6yj5 {
|
|
33
36
|
display: flex;
|
|
34
37
|
flex-direction: column;
|
|
35
38
|
}
|
|
36
|
-
ol.
|
|
39
|
+
ol.list__list_w6yj5.list__reversed_w6yj5 {
|
|
37
40
|
flex-direction: column-reverse;
|
|
38
41
|
}
|
package/esm/index.module.css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"list":"
|
|
3
|
+
var styles = {"list":"list__list_w6yj5","lowerAlpha":"list__lowerAlpha_w6yj5","decimal":"list__decimal_w6yj5","reversed":"list__reversed_w6yj5"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
package/esm/utils.js
CHANGED
|
@@ -3,9 +3,7 @@ import { isValidElement } from 'react';
|
|
|
3
3
|
var isItemElement = function (obj, name) {
|
|
4
4
|
return typeof obj === 'object' && obj.type.displayName === name;
|
|
5
5
|
};
|
|
6
|
-
var isItem = function (child) {
|
|
7
|
-
return isValidElement(child) && isItemElement(child, 'ListItem');
|
|
8
|
-
};
|
|
6
|
+
var isItem = function (child) { return isValidElement(child) && isItemElement(child, 'Item'); };
|
|
9
7
|
|
|
10
8
|
export { isItem, isItemElement };
|
|
11
9
|
//# sourceMappingURL=utils.js.map
|
package/esm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { isValidElement, type 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)
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { isValidElement, type 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) => isValidElement(child) && isItemElement(child, 'Item');\n"],"names":[],"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;IAES,MAAM,GAAG,UAAC,KAAgB,EAAA,EAAK,OAAA,cAAc,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAArD;;;;"}
|
package/index.css
CHANGED
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
--gap-20: 20px;
|
|
7
7
|
}
|
|
8
8
|
:root {
|
|
9
|
-
--font-family-
|
|
10
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
9
|
+
--font-family-alfasans:
|
|
10
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
11
|
+
Helvetica, sans-serif;
|
|
11
12
|
}
|
|
12
|
-
.
|
|
13
|
+
.list__list_w6yj5 {
|
|
13
14
|
margin: var(--gap-0);
|
|
14
15
|
padding: var(--gap-0);
|
|
15
16
|
color: var(--color-light-text-primary);
|
|
@@ -20,19 +21,21 @@
|
|
|
20
21
|
|
|
21
22
|
font-weight: 400;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
letter-spacing: -0.24px;
|
|
25
|
+
|
|
26
|
+
font-family: var(--font-family-alfasans);
|
|
24
27
|
}
|
|
25
|
-
.
|
|
28
|
+
.list__lowerAlpha_w6yj5 {
|
|
26
29
|
list-style-type: lower-alpha;
|
|
27
30
|
padding-left: var(--gap-20);
|
|
28
31
|
}
|
|
29
|
-
.
|
|
32
|
+
.list__decimal_w6yj5 {
|
|
30
33
|
list-style-type: decimal;
|
|
31
34
|
}
|
|
32
|
-
ol.
|
|
35
|
+
ol.list__list_w6yj5 {
|
|
33
36
|
display: flex;
|
|
34
37
|
flex-direction: column;
|
|
35
38
|
}
|
|
36
|
-
ol.
|
|
39
|
+
ol.list__list_w6yj5.list__reversed_w6yj5 {
|
|
37
40
|
flex-direction: column-reverse;
|
|
38
41
|
}
|
package/index.module.css.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"list":"
|
|
5
|
+
var styles = {"list":"list__list_w6yj5","lowerAlpha":"list__lowerAlpha_w6yj5","decimal":"list__decimal_w6yj5","reversed":"list__reversed_w6yj5"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -23,7 +23,7 @@ const Item = ({ caption, children, className, markerClassName, dataTestId, }) =>
|
|
|
23
23
|
React.createElement(TypographyText, { tag: 'div', view: 'primary-medium' }, children),
|
|
24
24
|
caption && (React.createElement(TypographyText, { tag: 'div', view: 'primary-small', color: 'secondary', className: styles.caption }, caption)))));
|
|
25
25
|
};
|
|
26
|
-
Item.displayName = '
|
|
26
|
+
Item.displayName = 'Item';
|
|
27
27
|
|
|
28
28
|
export { Item };
|
|
29
29
|
//# sourceMappingURL=Component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = '
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = 'Item';\n"],"names":[],"mappings":";;;;;;AAoCa,MAAA,IAAI,GAAwB,CAAC,EACtC,OAAO,EACP,QAAQ,EACR,SAAS,EACT,eAAe,EACf,UAAU,GACb,KAAI;IACD,MAAM,EACF,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,KAAK,GAAG,CAAC,EACT,KAAK,GAAG,CAAC,GACZ,GAAG,UAAU,CAAC,WAAW,CAAC;AAE3B,IAAA,MAAM,gBAAgB,GAAG,UAAU,KAAK,aAAa;IAErD,MAAM,cAAc,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE;AAC9C,QAAA,CAAC,MAAM,CAAC,aAAa,GAAG,gBAAgB;AACxC,QAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ;AAC9B,KAAA,CAAC;AAEF,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,GAAG;AAEjC,IAAA,MAAM,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK;AACrD,IAAA,MAAM,MAAM,GAAG,WAAW,IAAI,UAAU,KAAK,SAAS,GAAG,GAAG,KAAK,CAAA,CAAA,CAAG,GAAG,UAAU;IAEjF,QACI,4BAAI,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAA,cAAA,EAAgB,UAAU,EAAA;AACtD,QAAA,CAAC,gBAAgB,KACd,KAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EACX,GAAG,EAAC,KAAK,EACT,KAAK,EAAE,WAAW,EAClB,gBAAgB,EAAE,IAAI,EACtB,IAAI,EAAC,gBAAgB,EACrB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE;gBACxC,CAAC,MAAM,CAAC,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW;AACrC,gBAAA,CAAC,MAAM,CAAC,YAAY,GAAG,CAAC,WAAW;aACtC,CAAC,EAAA,EAED,MAAM,CACM,CACpB;AACD,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACI,KAAC,CAAA,aAAA,CAAA,cAAc,EAAC,EAAA,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,gBAAgB,EAC1C,EAAA,QAAQ,CACI;AAChB,YAAA,OAAO,KACJ,KAAC,CAAA,aAAA,CAAA,cAAc,EACX,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAE,MAAM,CAAC,OAAO,EAExB,EAAA,OAAO,CACK,CACpB,CACC,CACL;AAEb;AAEA,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
--list-marker-color: var(--color-light-text-primary);
|
|
12
12
|
--list-item-margin: var(--gap-12);
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
.list__item_10gf3 {
|
|
15
15
|
margin-top: var(--list-item-margin);
|
|
16
16
|
display: flex;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.list__item_10gf3:first-child {
|
|
19
19
|
margin-top: var(--gap-0);
|
|
20
20
|
}
|
|
21
|
-
.
|
|
21
|
+
.list__item_10gf3.list__reversed_10gf3:first-child {
|
|
22
22
|
margin-top: var(--list-item-margin);
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.list__item_10gf3.list__reversed_10gf3:last-child {
|
|
25
25
|
margin-top: var(--gap-0);
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.list__item_10gf3.list__unorderedItem_10gf3 {
|
|
28
28
|
display: list-item;
|
|
29
29
|
}
|
|
30
|
-
.
|
|
30
|
+
.list__slot_10gf3 {
|
|
31
31
|
min-width: 20px;
|
|
32
32
|
display: flex;
|
|
33
33
|
box-sizing: border-box;
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
padding-right: var(--gap-4);
|
|
36
36
|
flex-shrink: 0;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.list__slot_10gf3.list__defaultColor_10gf3 {
|
|
39
39
|
color: var(--list-marker-color);
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.list__slot_10gf3.list__disc_10gf3 {
|
|
42
42
|
justify-content: center;
|
|
43
43
|
padding: var(--gap-0) var(--gap-4);
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
.list__caption_10gf3 {
|
|
46
46
|
margin-top: var(--gap-2);
|
|
47
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"item":"
|
|
3
|
+
const styles = {"item":"list__item_10gf3","reversed":"list__reversed_10gf3","unorderedItem":"list__unorderedItem_10gf3","slot":"list__slot_10gf3","defaultColor":"list__defaultColor_10gf3","disc":"list__disc_10gf3","caption":"list__caption_10gf3"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
package/modern/index.css
CHANGED
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
--gap-20: 20px;
|
|
7
7
|
}
|
|
8
8
|
:root {
|
|
9
|
-
--font-family-
|
|
10
|
-
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
9
|
+
--font-family-alfasans:
|
|
10
|
+
'Alfa Interface Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
11
|
+
Helvetica, sans-serif;
|
|
11
12
|
}
|
|
12
|
-
.
|
|
13
|
+
.list__list_w6yj5 {
|
|
13
14
|
margin: var(--gap-0);
|
|
14
15
|
padding: var(--gap-0);
|
|
15
16
|
color: var(--color-light-text-primary);
|
|
@@ -20,19 +21,21 @@
|
|
|
20
21
|
|
|
21
22
|
font-weight: 400;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
letter-spacing: -0.24px;
|
|
25
|
+
|
|
26
|
+
font-family: var(--font-family-alfasans);
|
|
24
27
|
}
|
|
25
|
-
.
|
|
28
|
+
.list__lowerAlpha_w6yj5 {
|
|
26
29
|
list-style-type: lower-alpha;
|
|
27
30
|
padding-left: var(--gap-20);
|
|
28
31
|
}
|
|
29
|
-
.
|
|
32
|
+
.list__decimal_w6yj5 {
|
|
30
33
|
list-style-type: decimal;
|
|
31
34
|
}
|
|
32
|
-
ol.
|
|
35
|
+
ol.list__list_w6yj5 {
|
|
33
36
|
display: flex;
|
|
34
37
|
flex-direction: column;
|
|
35
38
|
}
|
|
36
|
-
ol.
|
|
39
|
+
ol.list__list_w6yj5.list__reversed_w6yj5 {
|
|
37
40
|
flex-direction: column-reverse;
|
|
38
41
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
const styles = {"list":"
|
|
3
|
+
const styles = {"list":"list__list_w6yj5","lowerAlpha":"list__lowerAlpha_w6yj5","decimal":"list__decimal_w6yj5","reversed":"list__reversed_w6yj5"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
package/modern/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isValidElement } from 'react';
|
|
2
2
|
|
|
3
3
|
const isItemElement = (obj, name) => typeof obj === 'object' && obj.type.displayName === name;
|
|
4
|
-
const isItem = (child) => isValidElement(child) && isItemElement(child, '
|
|
4
|
+
const isItem = (child) => isValidElement(child) && isItemElement(child, 'Item');
|
|
5
5
|
|
|
6
6
|
export { isItem, isItemElement };
|
|
7
7
|
//# sourceMappingURL=utils.js.map
|
package/modern/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { isValidElement, type 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)
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { isValidElement, type 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) => isValidElement(child) && isItemElement(child, 'Item');\n"],"names":[],"mappings":";;MAEa,aAAa,GAAG,CAAC,GAAgB,EAAE,IAAa,KACzD,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK;MAE3C,MAAM,GAAG,CAAC,KAAgB,KAAK,cAAc,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,MAAM;;;;"}
|
|
@@ -23,7 +23,7 @@ const Item = ({ caption, children, className, markerClassName, dataTestId, }) =>
|
|
|
23
23
|
React.createElement(TypographyText, { tag: 'div', view: 'primary-medium' }, children),
|
|
24
24
|
caption && (React.createElement(TypographyText, { tag: 'div', view: 'primary-small', color: 'secondary', className: styles.caption }, caption)))));
|
|
25
25
|
};
|
|
26
|
-
Item.displayName = '
|
|
26
|
+
Item.displayName = 'Item';
|
|
27
27
|
|
|
28
28
|
export { Item };
|
|
29
29
|
//# sourceMappingURL=Component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = '
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/item/Component.tsx"],"sourcesContent":["import React, { type ReactNode, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TypographyText } from '@alfalab/core-components-typography';\n\nimport { ListContext } from '../../context';\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 /**\n * Дополнительный класс для маркера\n */\n dataTestId?: string;\n};\n\nexport const Item: React.FC<ItemProps> = ({\n caption,\n children,\n className,\n markerClassName,\n dataTestId,\n}) => {\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)} data-test-id={dataTestId}>\n {!markerLowerAlpha && (\n <TypographyText\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 </TypographyText>\n )}\n <div>\n <TypographyText tag='div' view='primary-medium'>\n {children}\n </TypographyText>\n {caption && (\n <TypographyText\n tag='div'\n view='primary-small'\n color='secondary'\n className={styles.caption}\n >\n {caption}\n </TypographyText>\n )}\n </div>\n </li>\n );\n};\n\nItem.displayName = 'Item';\n"],"names":[],"mappings":";;;;;;AAoCa,MAAA,IAAI,GAAwB,CAAC,EACtC,OAAO,EACP,QAAQ,EACR,SAAS,EACT,eAAe,EACf,UAAU,GACb,KAAI;IACD,MAAM,EACF,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,KAAK,GAAG,CAAC,EACT,KAAK,GAAG,CAAC,GACZ,GAAG,UAAU,CAAC,WAAW,CAAC;AAE3B,IAAA,MAAM,gBAAgB,GAAG,UAAU,KAAK,aAAa;IAErD,MAAM,cAAc,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE;AAC9C,QAAA,CAAC,MAAM,CAAC,aAAa,GAAG,gBAAgB;AACxC,QAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ;AAC9B,KAAA,CAAC;AAEF,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,GAAG;AAEjC,IAAA,MAAM,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK;AACrD,IAAA,MAAM,MAAM,GAAG,WAAW,IAAI,UAAU,KAAK,SAAS,GAAG,GAAG,KAAK,CAAA,CAAA,CAAG,GAAG,UAAU;IAEjF,QACI,4BAAI,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAA,cAAA,EAAgB,UAAU,EAAA;AACtD,QAAA,CAAC,gBAAgB,KACd,KAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EACX,GAAG,EAAC,KAAK,EACT,KAAK,EAAE,WAAW,EAClB,gBAAgB,EAAE,IAAI,EACtB,IAAI,EAAC,gBAAgB,EACrB,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE;gBACxC,CAAC,MAAM,CAAC,IAAI,GAAG,MAAM,IAAI,CAAC,WAAW;AACrC,gBAAA,CAAC,MAAM,CAAC,YAAY,GAAG,CAAC,WAAW;aACtC,CAAC,EAAA,EAED,MAAM,CACM,CACpB;AACD,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACI,KAAC,CAAA,aAAA,CAAA,cAAc,EAAC,EAAA,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,gBAAgB,EAC1C,EAAA,QAAQ,CACI;AAChB,YAAA,OAAO,KACJ,KAAC,CAAA,aAAA,CAAA,cAAc,EACX,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAE,MAAM,CAAC,OAAO,EAExB,EAAA,OAAO,CACK,CACpB,CACC,CACL;AAEb;AAEA,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
package/moderncssm/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isValidElement } from 'react';
|
|
2
2
|
|
|
3
3
|
const isItemElement = (obj, name) => typeof obj === 'object' && obj.type.displayName === name;
|
|
4
|
-
const isItem = (child) => isValidElement(child) && isItemElement(child, '
|
|
4
|
+
const isItem = (child) => isValidElement(child) && isItemElement(child, 'Item');
|
|
5
5
|
|
|
6
6
|
export { isItem, isItemElement };
|
|
7
7
|
//# sourceMappingURL=utils.js.map
|
package/moderncssm/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { isValidElement, type 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)
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { isValidElement, type 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) => isValidElement(child) && isItemElement(child, 'Item');\n"],"names":[],"mappings":";;MAEa,aAAa,GAAG,CAAC,GAAgB,EAAE,IAAa,KACzD,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK;MAE3C,MAAM,GAAG,CAAC,KAAgB,KAAK,cAAc,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,MAAM;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-list",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.11-alfasans",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build": "rollup -c ../../tools/rollup/rollup.config.mjs --silent"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@alfalab/core-components-typography": "
|
|
16
|
+
"@alfalab/core-components-typography": "6.0.10-alfasans",
|
|
17
17
|
"classnames": "^2.5.1",
|
|
18
18
|
"tslib": "^2.4.0"
|
|
19
19
|
},
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"access": "public",
|
|
26
26
|
"directory": "dist"
|
|
27
27
|
},
|
|
28
|
-
"themesVersion": "15.2.1",
|
|
29
|
-
"varsVersion": "11.2.1"
|
|
28
|
+
"themesVersion": "15.2.1-alfasans",
|
|
29
|
+
"varsVersion": "11.2.1-alfasans"
|
|
30
30
|
}
|
package/src/utils.ts
CHANGED
|
@@ -3,5 +3,4 @@ import { isValidElement, type ReactNode } from 'react';
|
|
|
3
3
|
export const isItemElement = (obj: JSX.Element, name?: string): boolean =>
|
|
4
4
|
typeof obj === 'object' && obj.type.displayName === name;
|
|
5
5
|
|
|
6
|
-
export const isItem = (child: ReactNode) =>
|
|
7
|
-
isValidElement(child) && isItemElement(child, 'ListItem');
|
|
6
|
+
export const isItem = (child: ReactNode) => isValidElement(child) && isItemElement(child, 'Item');
|
package/utils.js
CHANGED
|
@@ -7,9 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var isItemElement = function (obj, name) {
|
|
8
8
|
return typeof obj === 'object' && obj.type.displayName === name;
|
|
9
9
|
};
|
|
10
|
-
var isItem = function (child) {
|
|
11
|
-
return React.isValidElement(child) && isItemElement(child, 'ListItem');
|
|
12
|
-
};
|
|
10
|
+
var isItem = function (child) { return React.isValidElement(child) && isItemElement(child, 'Item'); };
|
|
13
11
|
|
|
14
12
|
exports.isItem = isItem;
|
|
15
13
|
exports.isItemElement = isItemElement;
|
package/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["src/utils.ts"],"sourcesContent":["import { isValidElement, type 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)
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["src/utils.ts"],"sourcesContent":["import { isValidElement, type 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) => isValidElement(child) && isItemElement(child, 'Item');\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;IAES,MAAM,GAAG,UAAC,KAAgB,EAAA,EAAK,OAAAA,oBAAc,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAArD;;;;;"}
|