@hh.ru/magritte-ui-text-list 1.1.23 → 1.1.24

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/TextList.js CHANGED
@@ -4,7 +4,7 @@ import { Children, cloneElement } from 'react';
4
4
  import classnames from 'classnames';
5
5
  import { Text, isTextElement } from '@hh.ru/magritte-ui-typography';
6
6
 
7
- var styles = {"list":"magritte-list___cNNtz_1-1-23","paragraph-1-regular":"magritte-paragraph-1-regular___et3fO_1-1-23","paragraph1Regular":"magritte-paragraph-1-regular___et3fO_1-1-23","paragraph-2-regular":"magritte-paragraph-2-regular___KBhHQ_1-1-23","paragraph2Regular":"magritte-paragraph-2-regular___KBhHQ_1-1-23","paragraph-3-regular":"magritte-paragraph-3-regular___eyi5y_1-1-23","paragraph3Regular":"magritte-paragraph-3-regular___eyi5y_1-1-23","paragraph-4-regular":"magritte-paragraph-4-regular___zftoT_1-1-23","paragraph4Regular":"magritte-paragraph-4-regular___zftoT_1-1-23","numbered":"magritte-numbered___J770f_1-1-23","item":"magritte-item___kn-Qh_1-1-23","marker":"magritte-marker___r-3yT_1-1-23","marked":"magritte-marked___Fsh2t_1-1-23","content":"magritte-content___Zt8a6_1-1-23"};
7
+ var styles = {"list":"magritte-list___cNNtz_1-1-24","paragraph-1-regular":"magritte-paragraph-1-regular___et3fO_1-1-24","paragraph1Regular":"magritte-paragraph-1-regular___et3fO_1-1-24","paragraph-2-regular":"magritte-paragraph-2-regular___KBhHQ_1-1-24","paragraph2Regular":"magritte-paragraph-2-regular___KBhHQ_1-1-24","paragraph-3-regular":"magritte-paragraph-3-regular___eyi5y_1-1-24","paragraph3Regular":"magritte-paragraph-3-regular___eyi5y_1-1-24","paragraph-4-regular":"magritte-paragraph-4-regular___zftoT_1-1-24","paragraph4Regular":"magritte-paragraph-4-regular___zftoT_1-1-24","numbered":"magritte-numbered___J770f_1-1-24","item":"magritte-item___kn-Qh_1-1-24","marker":"magritte-marker___r-3yT_1-1-24","marked":"magritte-marked___Fsh2t_1-1-24","content":"magritte-content___Zt8a6_1-1-24"};
8
8
 
9
9
  const TextList = ({ Element = 'ul', children, typography = 'paragraph-2-regular' }) => {
10
10
  return (jsx(Element, { className: classnames(styles.list, styles[typography], {
package/TextList.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"TextList.js","sources":["../src/TextList.tsx"],"sourcesContent":["import { Children, cloneElement } from 'react';\nimport classnames from 'classnames';\n\nimport { Text, TextTypography, isTextElement } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './text-list.less';\n\ntype Paragraph<Typography> = Typography extends `paragraph-${string}` ? Typography : never;\n\nexport interface TextListProps {\n Element?: 'ul' | 'ol';\n typography?: Paragraph<TextTypography>;\n}\n\nexport const TextList: React.FC<\n React.PropsWithChildren<TextListProps & JSX.IntrinsicElements[Required<TextListProps>['Element']]>\n> = ({ Element = 'ul', children, typography = 'paragraph-2-regular' }) => {\n return (\n <Element\n className={classnames(styles.list, styles[typography], {\n [styles.marked]: Element === 'ul',\n [styles.numbered]: Element === 'ol',\n })}\n >\n {Children.map(children, (child) => {\n return (\n <li className={styles.item}>\n <Text typography={typography}>\n <div className={styles.marker} />\n </Text>\n <div className={styles.content}>\n {isTextElement(child) && !('typography' in child.props)\n ? cloneElement(child, { typography })\n : child}\n </div>\n </li>\n );\n })}\n </Element>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;AAca,MAAA,QAAQ,GAEjB,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,UAAU,GAAG,qBAAqB,EAAE,KAAI;AACrE,IAAA,QACIA,GAAC,CAAA,OAAO,EACJ,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE;AACnD,YAAA,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO,KAAK,IAAI;AACjC,YAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,OAAO,KAAK,IAAI;SACtC,CAAC,EAAA,QAAA,EAED,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAI;AAC9B,YAAA,QACIC,IAAI,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,QAAA,EAAA,CAAAD,GAAA,CAAC,IAAI,EAAC,EAAA,UAAU,EAAE,UAAU,EAAA,QAAA,EACxBA,aAAK,SAAS,EAAE,MAAM,CAAC,MAAM,GAAI,EAC9B,CAAA,EACPA,aAAK,SAAS,EAAE,MAAM,CAAC,OAAO,YACzB,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY,IAAI,KAAK,CAAC,KAAK,CAAC;8BACjD,YAAY,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC;AACrC,8BAAE,KAAK,EACT,CAAA,CAAA,EAAA,CACL,EACP;SACL,CAAC,EACI,CAAA,EACZ;AACN;;;;"}
1
+ {"version":3,"file":"TextList.js","sources":["src/TextList.tsx"],"sourcesContent":["import { Children, cloneElement } from 'react';\nimport classnames from 'classnames';\n\nimport { Text, TextTypography, isTextElement } from '@hh.ru/magritte-ui-typography';\n\nimport styles from './text-list.less';\n\ntype Paragraph<Typography> = Typography extends `paragraph-${string}` ? Typography : never;\n\nexport interface TextListProps {\n Element?: 'ul' | 'ol';\n typography?: Paragraph<TextTypography>;\n}\n\nexport const TextList: React.FC<\n React.PropsWithChildren<TextListProps & JSX.IntrinsicElements[Required<TextListProps>['Element']]>\n> = ({ Element = 'ul', children, typography = 'paragraph-2-regular' }) => {\n return (\n <Element\n className={classnames(styles.list, styles[typography], {\n [styles.marked]: Element === 'ul',\n [styles.numbered]: Element === 'ol',\n })}\n >\n {Children.map(children, (child) => {\n return (\n <li className={styles.item}>\n <Text typography={typography}>\n <div className={styles.marker} />\n </Text>\n <div className={styles.content}>\n {isTextElement(child) && !('typography' in child.props)\n ? cloneElement(child, { typography })\n : child}\n </div>\n </li>\n );\n })}\n </Element>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;AAca,MAAA,QAAQ,GAEjB,CAAC,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,UAAU,GAAG,qBAAqB,EAAE,KAAI;AACrE,IAAA,QACIA,GAAC,CAAA,OAAO,EACJ,EAAA,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE;AACnD,YAAA,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO,KAAK,IAAI;AACjC,YAAA,CAAC,MAAM,CAAC,QAAQ,GAAG,OAAO,KAAK,IAAI;SACtC,CAAC,EAAA,QAAA,EAED,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAI;AAC9B,YAAA,QACIC,IAAI,CAAA,IAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,IAAI,EACtB,QAAA,EAAA,CAAAD,GAAA,CAAC,IAAI,EAAC,EAAA,UAAU,EAAE,UAAU,EAAA,QAAA,EACxBA,aAAK,SAAS,EAAE,MAAM,CAAC,MAAM,GAAI,EAC9B,CAAA,EACPA,aAAK,SAAS,EAAE,MAAM,CAAC,OAAO,YACzB,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY,IAAI,KAAK,CAAC,KAAK,CAAC;8BACjD,YAAY,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC;AACrC,8BAAE,KAAK,EACT,CAAA,CAAA,EAAA,CACL,EACP;SACL,CAAC,EACI,CAAA,EACZ;AACN;;;;"}
package/index.css CHANGED
@@ -1,52 +1,52 @@
1
- .magritte-list___cNNtz_1-1-23{
1
+ .magritte-list___cNNtz_1-1-24{
2
2
  display:grid;
3
3
  grid-template-columns:min-content auto;
4
4
  list-style-type:none;
5
5
  }
6
- .magritte-paragraph-1-regular___et3fO_1-1-23{
6
+ .magritte-paragraph-1-regular___et3fO_1-1-24{
7
7
  gap:12px 0;
8
8
  }
9
- .magritte-paragraph-2-regular___KBhHQ_1-1-23{
9
+ .magritte-paragraph-2-regular___KBhHQ_1-1-24{
10
10
  gap:8px 0;
11
11
  }
12
- .magritte-paragraph-3-regular___eyi5y_1-1-23{
12
+ .magritte-paragraph-3-regular___eyi5y_1-1-24{
13
13
  gap:8px 0;
14
14
  }
15
- .magritte-paragraph-4-regular___zftoT_1-1-23{
15
+ .magritte-paragraph-4-regular___zftoT_1-1-24{
16
16
  gap:8px 0;
17
17
  }
18
- .magritte-numbered___J770f_1-1-23{
18
+ .magritte-numbered___J770f_1-1-24{
19
19
  counter-set:list-counter;
20
20
  }
21
- .magritte-item___kn-Qh_1-1-23{
21
+ .magritte-item___kn-Qh_1-1-24{
22
22
  display:contents;
23
23
  }
24
- .magritte-marker___r-3yT_1-1-23{
24
+ .magritte-marker___r-3yT_1-1-24{
25
25
  display:block;
26
26
  text-align:right;
27
27
  padding:0 var(--list-marker-padding);
28
28
  }
29
- .magritte-marked___Fsh2t_1-1-23 .magritte-marker___r-3yT_1-1-23::before{
29
+ .magritte-marked___Fsh2t_1-1-24 .magritte-marker___r-3yT_1-1-24::before{
30
30
  content:'•';
31
31
  }
32
- .magritte-numbered___J770f_1-1-23 .magritte-marker___r-3yT_1-1-23{
32
+ .magritte-numbered___J770f_1-1-24 .magritte-marker___r-3yT_1-1-24{
33
33
  counter-increment:list-counter;
34
34
  }
35
- .magritte-numbered___J770f_1-1-23 .magritte-marker___r-3yT_1-1-23::before{
35
+ .magritte-numbered___J770f_1-1-24 .magritte-marker___r-3yT_1-1-24::before{
36
36
  content:counter(list-counter) '.';
37
37
  }
38
- .magritte-paragraph-1-regular___et3fO_1-1-23 .magritte-marker___r-3yT_1-1-23{
38
+ .magritte-paragraph-1-regular___et3fO_1-1-24 .magritte-marker___r-3yT_1-1-24{
39
39
  padding:0 10px;
40
40
  }
41
- .magritte-paragraph-2-regular___KBhHQ_1-1-23 .magritte-marker___r-3yT_1-1-23{
41
+ .magritte-paragraph-2-regular___KBhHQ_1-1-24 .magritte-marker___r-3yT_1-1-24{
42
42
  padding:0 9px;
43
43
  }
44
- .magritte-paragraph-3-regular___eyi5y_1-1-23 .magritte-marker___r-3yT_1-1-23{
44
+ .magritte-paragraph-3-regular___eyi5y_1-1-24 .magritte-marker___r-3yT_1-1-24{
45
45
  padding:0 8px;
46
46
  }
47
- .magritte-paragraph-4-regular___zftoT_1-1-23 .magritte-marker___r-3yT_1-1-23{
47
+ .magritte-paragraph-4-regular___zftoT_1-1-24 .magritte-marker___r-3yT_1-1-24{
48
48
  padding:0 7px;
49
49
  }
50
- .magritte-content___Zt8a6_1-1-23{
50
+ .magritte-content___Zt8a6_1-1-24{
51
51
  display:block;
52
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-text-list",
3
- "version": "1.1.23",
3
+ "version": "1.1.24",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -19,8 +19,8 @@
19
19
  "watch": "yarn root:watch $(pwd)"
20
20
  },
21
21
  "dependencies": {
22
- "@hh.ru/magritte-ui-mock-component": "1.1.6",
23
- "@hh.ru/magritte-ui-typography": "4.5.1"
22
+ "@hh.ru/magritte-ui-mock-component": "1.1.7",
23
+ "@hh.ru/magritte-ui-typography": "4.5.2"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "classnames": ">=2.3.2",
@@ -29,5 +29,5 @@
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
- "gitHead": "dbdbcad65f9d7dc14f074ed3e1e83a48d1ef832c"
32
+ "gitHead": "ec7d56f576ca5581c2acb5010b53bbfb8da52962"
33
33
  }