@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.
- package/{cssm/src/Component.d.ts → Component-0887e7cb.d.ts} +10 -8
- package/{cssm/src/components/item/Component.d.ts → Component-a387f320.d.ts} +6 -3
- package/Component-a387f320.js +66 -0
- package/Component.d.ts +0 -0
- package/Component.js +7 -33
- package/components/item/Component.d.ts +0 -0
- package/components/item/Component.js +5 -33
- package/components/item/index.css +35 -14
- package/components/item/index.d.ts +1 -0
- package/components/item/index.js +2 -3
- package/{esm/src/Component.d.ts → cssm/Component-0887e7cb.d.ts} +10 -8
- package/{esm/src/components/item/Component.d.ts → cssm/Component-dea45fc5.d.ts} +6 -3
- package/cssm/Component-dea45fc5.js +64 -0
- package/cssm/Component.d.ts +0 -0
- package/cssm/Component.js +8 -34
- package/cssm/components/item/Component.d.ts +0 -0
- package/cssm/components/item/Component.js +6 -34
- package/cssm/components/item/index.d.ts +1 -0
- package/cssm/components/item/index.js +2 -3
- package/cssm/components/item/index.module.css +25 -5
- package/cssm/index.d.ts +2 -0
- package/cssm/index.js +3 -4
- package/cssm/index.module.css +24 -4
- package/cssm/{src/presets.d.ts → presets.d.ts} +2 -1
- package/cssm/presets.js +0 -1
- package/cssm/utils.d.ts +5 -0
- package/cssm/utils.js +0 -1
- package/{modern/src/Component.d.ts → esm/Component-0887e7cb.d.ts} +10 -8
- package/{modern/src/components/item/Component.d.ts → esm/Component-14899c73.d.ts} +6 -3
- package/esm/Component-14899c73.js +57 -0
- package/esm/Component.d.ts +0 -0
- package/esm/Component.js +5 -30
- package/esm/components/item/Component.d.ts +0 -0
- package/esm/components/item/Component.js +4 -31
- package/esm/components/item/index.css +35 -14
- package/esm/components/item/index.d.ts +1 -0
- package/esm/components/item/index.js +1 -2
- package/esm/index.css +29 -8
- package/esm/index.d.ts +2 -0
- package/esm/index.js +1 -2
- package/esm/{src/presets.d.ts → presets.d.ts} +2 -1
- package/esm/presets.js +0 -1
- package/esm/utils.d.ts +5 -0
- package/esm/utils.js +0 -1
- package/index.css +29 -8
- package/index.d.ts +2 -0
- package/index.js +3 -4
- package/{moderncssm/src/Component.d.ts → modern/Component-0887e7cb.d.ts} +10 -8
- package/{moderncssm/src/components/item/Component.d.ts → modern/Component-868a7c71.d.ts} +6 -3
- package/modern/Component-868a7c71.js +52 -0
- package/modern/Component.d.ts +0 -0
- package/modern/Component.js +4 -27
- package/modern/components/item/Component.d.ts +0 -0
- package/modern/components/item/Component.js +4 -29
- package/modern/components/item/index.css +35 -14
- package/modern/components/item/index.d.ts +1 -0
- package/modern/components/item/index.js +1 -2
- package/modern/index.css +29 -8
- package/modern/index.d.ts +2 -0
- package/modern/index.js +1 -2
- package/modern/{src/presets.d.ts → presets.d.ts} +2 -1
- package/modern/presets.js +0 -1
- package/modern/utils.d.ts +5 -0
- package/modern/utils.js +0 -1
- package/moderncssm/Component-0887e7cb.d.ts +72 -0
- package/moderncssm/Component-2bbdf461.d.ts +23 -0
- package/moderncssm/Component-2bbdf461.js +48 -0
- package/moderncssm/Component.d.ts +0 -0
- package/moderncssm/Component.js +5 -27
- package/moderncssm/components/item/Component.d.ts +0 -0
- package/moderncssm/components/item/Component.js +5 -29
- package/moderncssm/components/item/index.d.ts +1 -0
- package/moderncssm/components/item/index.js +1 -2
- package/moderncssm/components/item/index.module.css +2 -0
- package/moderncssm/index.d.ts +2 -0
- package/moderncssm/index.js +1 -2
- package/moderncssm/index.module.css +2 -0
- package/moderncssm/{src/presets.d.ts → presets.d.ts} +2 -1
- package/moderncssm/presets.js +0 -1
- package/moderncssm/utils.d.ts +5 -0
- package/moderncssm/utils.js +0 -1
- package/package.json +4 -4
- package/presets.d.ts +7 -0
- package/presets.js +0 -1
- package/utils.d.ts +5 -0
- package/utils.js +0 -1
- package/Component.js.map +0 -1
- package/components/item/Component.js.map +0 -1
- package/components/item/index.js.map +0 -1
- package/components/item/index.module.css.js +0 -8
- package/components/item/index.module.css.js.map +0 -1
- package/cssm/Component.js.map +0 -1
- package/cssm/components/item/Component.js.map +0 -1
- package/cssm/components/item/index.js.map +0 -1
- package/cssm/index.js.map +0 -1
- package/cssm/presets.js.map +0 -1
- package/cssm/src/components/item/index.d.ts +0 -1
- package/cssm/src/index.d.ts +0 -2
- package/cssm/src/utils.d.ts +0 -3
- package/cssm/utils.js.map +0 -1
- package/esm/Component.js.map +0 -1
- package/esm/components/item/Component.js.map +0 -1
- package/esm/components/item/index.js.map +0 -1
- package/esm/components/item/index.module.css.js +0 -6
- package/esm/components/item/index.module.css.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/index.module.css.js +0 -6
- package/esm/index.module.css.js.map +0 -1
- package/esm/presets.js.map +0 -1
- package/esm/src/components/item/index.d.ts +0 -1
- package/esm/src/index.d.ts +0 -2
- package/esm/src/utils.d.ts +0 -3
- package/esm/utils.js.map +0 -1
- package/index.js.map +0 -1
- package/index.module.css.js +0 -8
- package/index.module.css.js.map +0 -1
- package/modern/Component.js.map +0 -1
- package/modern/components/item/Component.js.map +0 -1
- package/modern/components/item/index.js.map +0 -1
- package/modern/components/item/index.module.css.js +0 -6
- package/modern/components/item/index.module.css.js.map +0 -1
- package/modern/index.js.map +0 -1
- package/modern/index.module.css.js +0 -6
- package/modern/index.module.css.js.map +0 -1
- package/modern/presets.js.map +0 -1
- package/modern/src/components/item/index.d.ts +0 -1
- package/modern/src/index.d.ts +0 -2
- package/modern/src/utils.d.ts +0 -3
- package/modern/utils.js.map +0 -1
- package/moderncssm/Component.js.map +0 -1
- package/moderncssm/components/item/Component.js.map +0 -1
- package/moderncssm/components/item/index.js.map +0 -1
- package/moderncssm/index.js.map +0 -1
- package/moderncssm/presets.js.map +0 -1
- package/moderncssm/src/components/item/index.d.ts +0 -1
- package/moderncssm/src/index.d.ts +0 -2
- package/moderncssm/src/utils.d.ts +0 -3
- package/moderncssm/utils.js.map +0 -1
- package/presets.js.map +0 -1
- package/src/Component.d.ts +0 -70
- package/src/components/item/Component.d.ts +0 -20
- package/src/components/item/index.d.ts +0 -1
- package/src/index.d.ts +0 -2
- package/src/presets.d.ts +0 -6
- package/src/utils.d.ts +0 -3
- package/utils.js.map +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
|
|
3
|
-
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"};
|
|
4
|
-
|
|
5
|
-
export { styles as default };
|
|
6
|
-
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["../../src/components/item/index.module.css"],"sourcesContent":["@import '../../../../vars/src/index.css';\n\n:root {\n --list-marker-color: var(--color-light-text-primary);\n --list-item-margin: var(--gap-12);\n}\n\n.item {\n margin-top: var(--list-item-margin);\n display: flex;\n\n &:first-child {\n margin-top: var(--gap-0);\n }\n\n &.reversed:first-child {\n margin-top: var(--list-item-margin);\n }\n\n &.reversed:last-child {\n margin-top: var(--gap-0);\n }\n\n &.unorderedItem {\n display: list-item;\n }\n}\n\n.slot {\n min-width: 20px;\n display: flex;\n box-sizing: border-box;\n justify-content: start;\n padding-right: var(--gap-4);\n flex-shrink: 0;\n\n &.defaultColor {\n color: var(--list-marker-color);\n }\n\n &.disc {\n justify-content: center;\n padding: var(--gap-0) var(--gap-4);\n }\n}\n\n.caption {\n margin-top: var(--gap-2);\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,MAAM,CAAC,kBAAkB,CAAC,UAAU,CAAC,sBAAsB,CAAC,eAAe,CAAC,2BAA2B,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,0BAA0B,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,qBAAqB,CAAC;;;;"}
|
package/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/esm/index.module.css.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '../../vars/src/index.css';\n\n.list {\n margin: var(--gap-0);\n padding: var(--gap-0);\n color: var(--color-light-text-primary);\n\n @mixin paragraph_primary_medium;\n}\n\n.lowerAlpha {\n list-style-type: lower-alpha;\n padding-left: var(--gap-20);\n}\n\n.decimal {\n list-style-type: decimal;\n}\n\nol.list {\n display: flex;\n flex-direction: column;\n\n &.reversed {\n flex-direction: column-reverse;\n }\n}\n"],"names":[],"mappings":";;AAEgB,aAAe,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,wBAAwB,CAAC,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,sBAAsB,CAAC;;;;"}
|
package/esm/presets.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presets.js","sources":["../../src/presets.ts"],"sourcesContent":["export const listPresets = {\n mobile: {\n tag: 'ul',\n marker: '–',\n },\n};\n"],"names":[],"mappings":"AAAa,IAAA,WAAW,GAAG;AACvB,IAAA,MAAM,EAAE;AACJ,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,MAAM,EAAE,GAAG;AACd,KAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
package/esm/src/index.d.ts
DELETED
package/esm/src/utils.d.ts
DELETED
package/esm/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":[],"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,OAAA,cAAc,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC;AAAzD;;;;"}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/index.module.css.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('./index.css');
|
|
4
|
-
|
|
5
|
-
var styles = {"list":"list__list_7qun8","lowerAlpha":"list__lowerAlpha_7qun8","decimal":"list__decimal_7qun8","reversed":"list__reversed_7qun8"};
|
|
6
|
-
|
|
7
|
-
module.exports = styles;
|
|
8
|
-
//# sourceMappingURL=index.module.css.js.map
|
package/index.module.css.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '../../vars/src/index.css';\n\n.list {\n margin: var(--gap-0);\n padding: var(--gap-0);\n color: var(--color-light-text-primary);\n\n @mixin paragraph_primary_medium;\n}\n\n.lowerAlpha {\n list-style-type: lower-alpha;\n padding-left: var(--gap-20);\n}\n\n.decimal {\n list-style-type: decimal;\n}\n\nol.list {\n display: flex;\n flex-direction: column;\n\n &.reversed {\n flex-direction: column-reverse;\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,wBAAwB,CAAC,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,sBAAsB,CAAC;;;;"}
|
package/modern/Component.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/Component.tsx"],"sourcesContent":["import React, { Children, ReactNode } from 'react';\nimport cn from 'classnames';\n\nimport { Item } from './components/item';\nimport { isItem } from './utils';\n\nimport styles from './index.module.css';\n\nexport type TListContext = {\n /**\n * Упорядоченный список\n */\n orderedList?: boolean;\n\n /**\n * Маркер\n * @default '—' for ul and 'decimal' for ol\n */\n markerType?: 'lower-alpha' | 'decimal' | string | ReactNode;\n\n /**\n * Цвет маркера\n */\n colorMarker?: ColorMarkerType;\n\n /**\n * Список обратного счета\n */\n reversed?: boolean;\n\n /**\n * Номер пункта\n */\n index?: number;\n\n /**\n * Начало отсчета элементов списка\n */\n start?: number;\n};\n\nexport const ListContext = React.createContext<TListContext>({});\n\ntype ColorMarkerType =\n | 'tertiary'\n | 'accent'\n | 'primary'\n | 'attention'\n | 'positive'\n | 'secondary'\n | 'tertiary-inverted'\n | 'primary-inverted'\n | 'secondary-inverted'\n | 'link'\n | 'negative';\n\nexport type ListProps = {\n /**\n * HTML тег\n * @default 'ul'\n */\n tag?: 'ul' | 'ol';\n\n /**\n * Маркер\n * @default '—' for ul and 'decimal' for ol\n */\n marker?: 'lower-alpha' | 'decimal' | string | ReactNode;\n\n /**\n * Css-класс для стилизации\n */\n className?: string;\n\n /**\n * Цвет маркера\n */\n colorMarker?: ColorMarkerType;\n\n /**\n * Список обратного счета\n */\n reversed?: boolean;\n\n /**\n * Начало отсчета элементов списка\n */\n start?: number;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Дочерние элементы\n */\n children?: ReactNode;\n} & Omit<React.OlHTMLAttributes<HTMLOListElement>, 'type'>;\n\nconst ListComponent: React.FC<ListProps> = ({\n tag = 'ul',\n marker,\n className,\n dataTestId,\n colorMarker,\n children,\n reversed,\n start,\n ...restProps\n}) => {\n const markerType = marker || (tag === 'ul' ? '—' : 'decimal');\n const alphaMarker = markerType === 'lower-alpha';\n const decimalMarker = markerType === 'decimal';\n const Component = tag === 'ul' || alphaMarker ? 'ul' : 'ol';\n\n const orderedList = Component === 'ol';\n\n const listClassNames = cn(\n styles.list,\n {\n [styles.lowerAlpha]: alphaMarker,\n [styles.decimal]: decimalMarker,\n [styles.reversed]: reversed,\n },\n className,\n );\n\n /* eslint-disable react/jsx-no-constructed-context-values */\n return (\n <Component className={listClassNames} data-test-id={dataTestId} {...restProps}>\n {Children.map(children, (child, index) => (\n <ListContext.Provider\n value={{ orderedList, markerType, colorMarker, reversed, index, start }}\n >\n {isItem(child) ? child : <Item>{child}</Item>}\n </ListContext.Provider>\n ))}\n </Component>\n );\n};\n\nexport const List = Object.assign(ListComponent, {\n Item,\n});\n"],"names":[],"mappings":";;;;;;AAyCa,MAAA,WAAW,GAAG,KAAK,CAAC,aAAa,CAAe,EAAE;AA2D/D,MAAM,aAAa,GAAwB,CAAC,EACxC,GAAG,GAAG,IAAI,EACV,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,UAAU,GAAG,MAAM,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,GAAG,SAAS,CAAC;AAC7D,IAAA,MAAM,WAAW,GAAG,UAAU,KAAK,aAAa;AAChD,IAAA,MAAM,aAAa,GAAG,UAAU,KAAK,SAAS;AAC9C,IAAA,MAAM,SAAS,GAAG,GAAG,KAAK,IAAI,IAAI,WAAW,GAAG,IAAI,GAAG,IAAI;AAE3D,IAAA,MAAM,WAAW,GAAG,SAAS,KAAK,IAAI;AAEtC,IAAA,MAAM,cAAc,GAAG,EAAE,CACrB,MAAM,CAAC,IAAI,EACX;AACI,QAAA,CAAC,MAAM,CAAC,UAAU,GAAG,WAAW;AAChC,QAAA,CAAC,MAAM,CAAC,OAAO,GAAG,aAAa;AAC/B,QAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ;KAC9B,EACD,SAAS,CACZ;;AAGD,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,SAAS,EAAE,cAAc,EAAgB,cAAA,EAAA,UAAU,EAAM,GAAA,SAAS,EACxE,EAAA,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,MACjC,KAAA,CAAA,aAAA,CAAC,WAAW,CAAC,QAAQ,EAAA,EACjB,KAAK,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAA,EAEtE,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,oBAAC,IAAI,EAAA,IAAA,EAAE,KAAK,CAAQ,CAC1B,CAC1B,CAAC,CACM;AAEpB,CAAC;MAEY,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;IAC7C,IAAI;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,MAAM,IAAI,GAAwB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,KAAI;IAC3F,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;AAEjF,IAAA,QACI,KAAI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAA;AAC5B,QAAA,CAAC,gBAAgB,KACd,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,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,CACJ,CACV;AACD,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACI,KAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,gBAAgB,EAChC,EAAA,QAAQ,CACN;AACN,YAAA,OAAO,KACJ,KAAC,CAAA,aAAA,CAAA,IAAI,EACD,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAE,MAAM,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,6 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
|
|
3
|
-
const 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"};
|
|
4
|
-
|
|
5
|
-
export { styles as default };
|
|
6
|
-
//# 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,eAAe,CAAC,MAAM,CAAC,kBAAkB,CAAC,UAAU,CAAC,sBAAsB,CAAC,eAAe,CAAC,2BAA2B,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,CAAC,0BAA0B,CAAC,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,qBAAqB,CAAC;;;;"}
|
package/modern/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '../../vars/src/index.css';\n\n.list {\n margin: var(--gap-0);\n padding: var(--gap-0);\n color: var(--color-light-text-primary);\n\n @mixin paragraph_primary_medium;\n}\n\n.lowerAlpha {\n list-style-type: lower-alpha;\n padding-left: var(--gap-20);\n}\n\n.decimal {\n list-style-type: decimal;\n}\n\nol.list {\n display: flex;\n flex-direction: column;\n\n &.reversed {\n flex-direction: column-reverse;\n }\n}\n"],"names":[],"mappings":";;AAEgB,eAAe,CAAC,MAAM,CAAC,kBAAkB,CAAC,YAAY,CAAC,wBAAwB,CAAC,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,sBAAsB,CAAC;;;;"}
|
package/modern/presets.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presets.js","sources":["../../src/presets.ts"],"sourcesContent":["export const listPresets = {\n mobile: {\n tag: 'ul',\n marker: '–',\n },\n};\n"],"names":[],"mappings":"AAAa,MAAA,WAAW,GAAG;AACvB,IAAA,MAAM,EAAE;AACJ,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,MAAM,EAAE,GAAG;AACd,KAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
package/modern/src/index.d.ts
DELETED
package/modern/src/utils.d.ts
DELETED
package/modern/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":[],"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,KACnC,cAAc,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,UAAU;;;;"}
|
|
@@ -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,MAAA,WAAW,GAAG,KAAK,CAAC,aAAa,CAAe,EAAE;AA2D/D,MAAM,aAAa,GAAwB,CAAC,EACxC,GAAG,GAAG,IAAI,EACV,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,GAAG,SAAS,EACf,KAAI;AACD,IAAA,MAAM,UAAU,GAAG,MAAM,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG,GAAG,SAAS,CAAC;AAC7D,IAAA,MAAM,WAAW,GAAG,UAAU,KAAK,aAAa;AAChD,IAAA,MAAM,aAAa,GAAG,UAAU,KAAK,SAAS;AAC9C,IAAA,MAAM,SAAS,GAAG,GAAG,KAAK,IAAI,IAAI,WAAW,GAAG,IAAI,GAAG,IAAI;AAE3D,IAAA,MAAM,WAAW,GAAG,SAAS,KAAK,IAAI;AAEtC,IAAA,MAAM,cAAc,GAAG,EAAE,CACrB,MAAM,CAAC,IAAI,EACX;AACI,QAAA,CAAC,MAAM,CAAC,UAAU,GAAG,WAAW;AAChC,QAAA,CAAC,MAAM,CAAC,OAAO,GAAG,aAAa;AAC/B,QAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ;KAC9B,EACD,SAAS,CACZ;;AAGD,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,SAAS,EAAE,cAAc,EAAgB,cAAA,EAAA,UAAU,EAAM,GAAA,SAAS,EACxE,EAAA,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,MACjC,KAAA,CAAA,aAAA,CAAC,WAAW,CAAC,QAAQ,EAAA,EACjB,KAAK,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAA,EAEtE,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,oBAAC,IAAI,EAAA,IAAA,EAAE,KAAK,CAAQ,CAC1B,CAC1B,CAAC,CACM;AAEpB,CAAC;MAEY,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE;IAC7C,IAAI;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,MAAM,IAAI,GAAwB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,KAAI;IAC3F,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;AAEjF,IAAA,QACI,KAAI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAA;AAC5B,QAAA,CAAC,gBAAgB,KACd,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EACD,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,CACJ,CACV;AACD,QAAA,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;YACI,KAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,GAAG,EAAC,KAAK,EAAC,IAAI,EAAC,gBAAgB,EAChC,EAAA,QAAQ,CACN;AACN,YAAA,OAAO,KACJ,KAAC,CAAA,aAAA,CAAA,IAAI,EACD,EAAA,GAAG,EAAC,KAAK,EACT,IAAI,EAAC,eAAe,EACpB,KAAK,EAAC,WAAW,EACjB,SAAS,EAAE,MAAM,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/moderncssm/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,MAAA,WAAW,GAAG;AACvB,IAAA,MAAM,EAAE;AACJ,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,MAAM,EAAE,GAAG;AACd,KAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
package/moderncssm/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":[],"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,KACnC,cAAc,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,EAAE,UAAU;;;;"}
|
package/presets.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"presets.js","sources":["../src/presets.ts"],"sourcesContent":["export const listPresets = {\n mobile: {\n tag: 'ul',\n marker: '–',\n },\n};\n"],"names":[],"mappings":";;;;AAAa,IAAA,WAAW,GAAG;AACvB,IAAA,MAAM,EAAE;AACJ,QAAA,GAAG,EAAE,IAAI;AACT,QAAA,MAAM,EAAE,GAAG;AACd,KAAA;;;;;"}
|
package/src/Component.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
export declare type TListContext = {
|
|
3
|
-
/**
|
|
4
|
-
* Упорядоченный список
|
|
5
|
-
*/
|
|
6
|
-
orderedList?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Маркер
|
|
9
|
-
* @default '—' for ul and 'decimal' for ol
|
|
10
|
-
*/
|
|
11
|
-
markerType?: 'lower-alpha' | 'decimal' | string | ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Цвет маркера
|
|
14
|
-
*/
|
|
15
|
-
colorMarker?: ColorMarkerType;
|
|
16
|
-
/**
|
|
17
|
-
* Список обратного счета
|
|
18
|
-
*/
|
|
19
|
-
reversed?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Номер пункта
|
|
22
|
-
*/
|
|
23
|
-
index?: number;
|
|
24
|
-
/**
|
|
25
|
-
* Начало отсчета элементов списка
|
|
26
|
-
*/
|
|
27
|
-
start?: number;
|
|
28
|
-
};
|
|
29
|
-
export declare const ListContext: React.Context<TListContext>;
|
|
30
|
-
declare type ColorMarkerType = 'tertiary' | 'accent' | 'primary' | 'attention' | 'positive' | 'secondary' | 'tertiary-inverted' | 'primary-inverted' | 'secondary-inverted' | 'link' | 'negative';
|
|
31
|
-
export declare type ListProps = {
|
|
32
|
-
/**
|
|
33
|
-
* HTML тег
|
|
34
|
-
* @default 'ul'
|
|
35
|
-
*/
|
|
36
|
-
tag?: 'ul' | 'ol';
|
|
37
|
-
/**
|
|
38
|
-
* Маркер
|
|
39
|
-
* @default '—' for ul and 'decimal' for ol
|
|
40
|
-
*/
|
|
41
|
-
marker?: 'lower-alpha' | 'decimal' | string | ReactNode;
|
|
42
|
-
/**
|
|
43
|
-
* Css-класс для стилизации
|
|
44
|
-
*/
|
|
45
|
-
className?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Цвет маркера
|
|
48
|
-
*/
|
|
49
|
-
colorMarker?: ColorMarkerType;
|
|
50
|
-
/**
|
|
51
|
-
* Список обратного счета
|
|
52
|
-
*/
|
|
53
|
-
reversed?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Начало отсчета элементов списка
|
|
56
|
-
*/
|
|
57
|
-
start?: number;
|
|
58
|
-
/**
|
|
59
|
-
* Id компонента для тестов
|
|
60
|
-
*/
|
|
61
|
-
dataTestId?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Дочерние элементы
|
|
64
|
-
*/
|
|
65
|
-
children?: ReactNode;
|
|
66
|
-
} & Omit<React.OlHTMLAttributes<HTMLOListElement>, 'type'>;
|
|
67
|
-
export declare const List: React.FC<ListProps> & {
|
|
68
|
-
Item: React.FC<import("./components/item").ItemProps>;
|
|
69
|
-
};
|
|
70
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
export declare type ItemProps = {
|
|
3
|
-
/**
|
|
4
|
-
* Дополнительный текст
|
|
5
|
-
*/
|
|
6
|
-
caption?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Дочерние элементы.
|
|
9
|
-
*/
|
|
10
|
-
children?: ReactNode;
|
|
11
|
-
/**
|
|
12
|
-
* Дополнительный класс
|
|
13
|
-
*/
|
|
14
|
-
className?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Дополнительный класс для маркера
|
|
17
|
-
*/
|
|
18
|
-
markerClassName?: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const Item: React.FC<ItemProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Component';
|
package/src/index.d.ts
DELETED
package/src/presets.d.ts
DELETED
package/src/utils.d.ts
DELETED
package/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;;;;;"}
|