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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-6a4d58fc.d.ts} +6 -3
  3. package/Component-6a4d58fc.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-74208e9c.d.ts} +6 -3
  30. package/esm/Component-74208e9c.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-55c0657f.d.ts} +6 -3
  50. package/modern/Component-55c0657f.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
@@ -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":";"}
@@ -1,6 +0,0 @@
1
- import './index.css';
2
-
3
- var styles = {"list":"list__list_7qun8","lowerAlpha":"list__lowerAlpha_7qun8","decimal":"list__decimal_7qun8","reversed":"list__reversed_7qun8"};
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/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;;;;"}
@@ -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/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":";;;;;;;;;;;"}
@@ -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
@@ -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;;;;"}
@@ -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;;;;"}
@@ -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 = {"list":"list__list_7qun8","lowerAlpha":"list__lowerAlpha_7qun8","decimal":"list__decimal_7qun8","reversed":"list__reversed_7qun8"};
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/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;;;;"}
@@ -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';
@@ -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;
@@ -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":""}
@@ -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';
@@ -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;
@@ -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;;;;;"}
@@ -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
@@ -1,2 +0,0 @@
1
- export * from './Component';
2
- export * from './presets';
package/src/presets.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export declare const listPresets: {
2
- mobile: {
3
- tag: string;
4
- marker: string;
5
- };
6
- };
package/src/utils.d.ts DELETED
@@ -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/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;;;;;"}