@meduza/ui-kit-2 0.1.8 → 0.1.10

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 (153) hide show
  1. package/dist/Footnote/Footnote.stories.d.ts +10 -0
  2. package/dist/Footnote/Footnote.types.d.ts +5 -0
  3. package/dist/Footnote/index.d.ts +3 -0
  4. package/dist/Image/Image.types.d.ts +2 -2
  5. package/dist/MaterialNote/MaterialNote.stories.d.ts +2 -1
  6. package/dist/MaterialNote/MaterialNote.types.d.ts +2 -1
  7. package/dist/index.d.ts +1 -0
  8. package/dist/ui-kit-2.cjs.development.js +238 -210
  9. package/dist/ui-kit-2.cjs.development.js.map +1 -1
  10. package/dist/ui-kit-2.cjs.production.min.js +1 -1
  11. package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
  12. package/dist/ui-kit-2.esm.js +238 -211
  13. package/dist/ui-kit-2.esm.js.map +1 -1
  14. package/dist/ui-kit.css +684 -577
  15. package/dist/utils/makeClassName.d.ts +2 -1
  16. package/dist/utils/makeStyleContext.d.ts +2 -1
  17. package/package.json +12 -4
  18. package/src/BookmarkButton/BookmarkButton.stories.tsx +1 -1
  19. package/src/BookmarkButton/index.tsx +2 -4
  20. package/src/Button/Button.stories.tsx +2 -2
  21. package/src/Button/Button.test.tsx +3 -3
  22. package/src/Button/index.tsx +3 -3
  23. package/src/CardTitle/CardTitle.stories.tsx +1 -1
  24. package/src/CardTitle/CardTitle.test.tsx +1 -1
  25. package/src/CardTitle/index.tsx +1 -2
  26. package/src/ChapterBlock/ChapterBlock.stories.tsx +1 -1
  27. package/src/ChapterBlock/ChapterBlock.test.tsx +1 -1
  28. package/src/ChapterBlock/index.tsx +1 -2
  29. package/src/Cover/Cover.stories.tsx +1 -1
  30. package/src/Cover/Cover.test.tsx +1 -1
  31. package/src/Cover/index.tsx +5 -6
  32. package/src/DocumentItemsCount/DocumentItemsCount.stories.tsx +1 -1
  33. package/src/DocumentItemsCount/DocumentItemsCount.test.tsx +1 -1
  34. package/src/DocumentItemsCount/index.tsx +0 -1
  35. package/src/DotsOnImage/DotsOnImage.module.css +13 -9
  36. package/src/DotsOnImage/DotsOnImage.stories.tsx +1 -1
  37. package/src/DotsOnImage/DotsOnImage.test.tsx +2 -1
  38. package/src/DotsOnImage/index.tsx +29 -17
  39. package/src/DotsOnImage/mock.json +4 -4
  40. package/src/Dropdown/index.tsx +2 -2
  41. package/src/EmbedBlock/EmbedBlock.module.css +1 -1
  42. package/src/EmbedBlock/EmbedBlock.stories.tsx +2 -2
  43. package/src/EmbedBlock/EmbedBlock.test.tsx +1 -1
  44. package/src/EmbedBlock/EmbedBlock.tsx +3 -8
  45. package/src/EmbedBlock/EmbedGif.tsx +0 -3
  46. package/src/EmbedBlock/IframeBlock.tsx +0 -1
  47. package/src/EmbedBlock/index.tsx +0 -1
  48. package/src/Footnote/Footnote.module.css +70 -0
  49. package/src/Footnote/Footnote.stories.module.css +5 -0
  50. package/src/Footnote/Footnote.stories.tsx +43 -0
  51. package/src/Footnote/Footnote.test.tsx +20 -0
  52. package/src/Footnote/Footnote.types.ts +5 -0
  53. package/src/Footnote/index.tsx +26 -0
  54. package/src/GroupedBlock/GroupedBlock.stories.tsx +1 -1
  55. package/src/GroupedBlock/GroupedBlock.test.tsx +1 -1
  56. package/src/GroupedBlock/index.tsx +4 -6
  57. package/src/HalfBlock/HalfBlock.stories.tsx +1 -1
  58. package/src/HalfBlock/HalfBlock.test.tsx +1 -1
  59. package/src/HalfBlock/index.tsx +3 -5
  60. package/src/Image/Image.stories.tsx +1 -1
  61. package/src/Image/Image.test.tsx +1 -1
  62. package/src/Image/Image.types.ts +2 -2
  63. package/src/Image/RenderPicture.tsx +1 -2
  64. package/src/Image/index.tsx +1 -4
  65. package/src/ImportantLead/ImportantLead.stories.tsx +1 -1
  66. package/src/ImportantLead/ImportantLead.test.tsx +1 -1
  67. package/src/ImportantLead/index.tsx +3 -5
  68. package/src/Lazy/Lazy.stories.tsx +3 -2
  69. package/src/Lazy/Lazy.test.tsx +1 -1
  70. package/src/Lazy/index.tsx +2 -4
  71. package/src/ListBlock/ListBlock.stories.tsx +2 -2
  72. package/src/ListBlock/ListBlock.test.tsx +1 -1
  73. package/src/ListBlock/index.tsx +2 -3
  74. package/src/MaterialNote/MaterialNote.stories.tsx +4 -3
  75. package/src/MaterialNote/MaterialNote.test.tsx +1 -1
  76. package/src/MaterialNote/MaterialNote.types.ts +2 -1
  77. package/src/MaterialNote/index.tsx +3 -3
  78. package/src/MaterialTitle/MaterialTitle.stories.tsx +1 -1
  79. package/src/MaterialTitle/MaterialTitle.test.tsx +1 -1
  80. package/src/MediaCaption/MediaCaption.stories.tsx +1 -1
  81. package/src/MediaCaption/MediaCaption.test.tsx +1 -1
  82. package/src/MediaCaption/index.tsx +2 -2
  83. package/src/Meta/Meta.stories.tsx +1 -1
  84. package/src/Meta/Meta.test.tsx +1 -1
  85. package/src/Meta/MetaContainer.tsx +2 -4
  86. package/src/Meta/index.tsx +2 -3
  87. package/src/MetaItem/MetaItem.stories.tsx +2 -2
  88. package/src/MetaItem/MetaItem.test.tsx +1 -1
  89. package/src/MetaItem/index.tsx +1 -3
  90. package/src/MetaItemLive/MetaItemLive.stories.tsx +2 -2
  91. package/src/MetaItemLive/MetaItemLive.test.tsx +1 -1
  92. package/src/MetaItemLive/index.tsx +1 -3
  93. package/src/Popover/Popover.module.css +36 -2
  94. package/src/Popover/Popover.stories.tsx +1 -1
  95. package/src/Popover/Popover.test.tsx +1 -1
  96. package/src/Popover/index.tsx +2 -3
  97. package/src/QuoteBlock/QuoteBlock.stories.tsx +1 -1
  98. package/src/QuoteBlock/QuoteBlock.test.tsx +1 -1
  99. package/src/QuoteBlock/index.tsx +2 -3
  100. package/src/RawHtmlBlock/RawHtmlBlock.stories.tsx +2 -2
  101. package/src/RawHtmlBlock/RawHtmlBlock.test.tsx +1 -1
  102. package/src/RawHtmlBlock/index.tsx +0 -2
  103. package/src/RelatedBlock/RelatedBlock.stories.tsx +1 -1
  104. package/src/RelatedBlock/RelatedBlock.test.tsx +1 -1
  105. package/src/RelatedBlock/index.tsx +2 -3
  106. package/src/RenderBlocks/RenderBlocks.stories.tsx +1 -1
  107. package/src/RenderBlocks/RenderBlocks.test.tsx +1 -1
  108. package/src/RenderBlocks/index.tsx +0 -1
  109. package/src/RichTitle/RichTitle.stories.tsx +1 -1
  110. package/src/RichTitle/RichTitle.test.tsx +1 -1
  111. package/src/RichTitle/index.tsx +2 -3
  112. package/src/SimpleBlock/FootnoteLink.css +7 -0
  113. package/src/SimpleBlock/SimpleBlock.stories.tsx +2 -2
  114. package/src/SimpleBlock/SimpleBlock.test.tsx +1 -1
  115. package/src/SimpleBlock/index.tsx +2 -3
  116. package/src/SimpleTitle/SimpleTitle.stories.tsx +1 -1
  117. package/src/SimpleTitle/SimpleTitle.test.tsx +1 -1
  118. package/src/SimpleTitle/index.tsx +2 -2
  119. package/src/SourceBlock/SourceBlock.stories.tsx +6 -6
  120. package/src/SourceBlock/SourceBlock.test.tsx +1 -1
  121. package/src/SourceBlock/index.tsx +6 -4
  122. package/src/SourceBlock/mock.json +15 -0
  123. package/src/Spoiler/Spoiler.stories.tsx +1 -1
  124. package/src/Spoiler/Spoiler.test.tsx +1 -1
  125. package/src/Spoiler/index.tsx +4 -5
  126. package/src/SvgSymbol/SvgSymbol.stories.tsx +6 -6
  127. package/src/SvgSymbol/SvgSymbol.test.tsx +1 -1
  128. package/src/SvgSymbol/index.tsx +2 -2
  129. package/src/Switcher/Switcher.stories.tsx +4 -4
  130. package/src/Switcher/Switcher.test.tsx +1 -1
  131. package/src/Switcher/index.tsx +1 -2
  132. package/src/Table/Table.stories.tsx +1 -1
  133. package/src/Table/Table.test.tsx +1 -1
  134. package/src/Table/index.tsx +2 -2
  135. package/src/Tag/Tag.stories.tsx +1 -3
  136. package/src/Tag/Tag.test.tsx +4 -4
  137. package/src/Tag/index.tsx +2 -2
  138. package/src/Timestamp/Timestamp.stories.tsx +1 -1
  139. package/src/Timestamp/Timestamp.test.tsx +1 -1
  140. package/src/Timestamp/index.tsx +0 -2
  141. package/src/Toolbar/Toolbar.stories.tsx +0 -1
  142. package/src/Toolbar/Toolbar.test.tsx +1 -1
  143. package/src/Toolbar/index.tsx +2 -3
  144. package/src/ToolbarButton/ToolbarButton.stories.tsx +2 -2
  145. package/src/ToolbarButton/ToolbarButton.test.tsx +1 -1
  146. package/src/ToolbarButton/index.tsx +2 -3
  147. package/src/_storybook/PreviewWrapper/index.tsx +1 -1
  148. package/src/index.tsx +1 -0
  149. package/src/utils/DangerousHtml.tsx +5 -7
  150. package/src/utils/generateGradient.ts +1 -1
  151. package/src/utils/makeClassName.ts +3 -1
  152. package/src/utils/makeStyleContext.ts +8 -4
  153. package/src/utils/toCamel.ts +1 -1
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react'
2
-
3
2
  import { Switcher } from './'
4
3
  import { PreviewWrapper } from '../_storybook/PreviewWrapper'
4
+
5
5
  import styles from './Switcher.stories.module.css'
6
6
 
7
7
  export default {
@@ -24,7 +24,7 @@ const Example: React.FC = () => {
24
24
  <Switcher
25
25
  enabled={enabledOne}
26
26
  styleContext="isInPanel"
27
- onChange={e => setEnabledOne(e.target.checked)}
27
+ onChange={(e) => setEnabledOne(e.target.checked)}
28
28
  >
29
29
  <span>Показывать по порядку</span>
30
30
  </Switcher>
@@ -34,7 +34,7 @@ const Example: React.FC = () => {
34
34
  <Switcher
35
35
  enabled={enabledTwo}
36
36
  styleContext="isInMenu"
37
- onChange={e => setEnabledTwo(e.target.checked)}
37
+ onChange={(e) => setEnabledTwo(e.target.checked)}
38
38
  theme="dark"
39
39
  >
40
40
  <span>Показывать по порядку</span>
@@ -45,7 +45,7 @@ const Example: React.FC = () => {
45
45
  <Switcher
46
46
  enabled={enabledThree}
47
47
  styleContext="isInLive"
48
- onChange={e => setEnabledThree(e.target.checked)}
48
+ onChange={(e) => setEnabledThree(e.target.checked)}
49
49
  childrenPosition="right"
50
50
  >
51
51
  <span>Перевернуть трансляцию</span>
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
2
  import { render, fireEvent, RenderResult } from '@testing-library/react'
3
-
4
3
  import { Switcher } from './'
5
4
  import { SwitcherProps } from './Switcher.types'
5
+
6
6
  import styles from './Switcher.module.css'
7
7
 
8
8
  describe('Switcher', () => {
@@ -1,7 +1,6 @@
1
1
  import React from 'react'
2
2
  import { SwitcherProps } from './Switcher.types'
3
- import makeClassName from '../utils/makeClassName'
4
-
3
+ import { makeClassName } from '../utils/makeClassName'
5
4
  import styles from './Switcher.module.css'
6
5
 
7
6
  export const Switcher: React.FC<SwitcherProps> = ({
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
-
3
2
  import { Table } from './'
4
3
  import { PreviewWrapper } from '../_storybook/PreviewWrapper'
4
+
5
5
  import styles from './Table.stories.module.css'
6
6
 
7
7
  import mock from './mock.json'
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
-
4
3
  import { Table } from './'
5
4
  import { TableProps } from './Table.types'
5
+
6
6
  import styles from './Table.module.css'
7
7
 
8
8
  describe('Table', () => {
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { TableProps } from './Table.types'
3
3
  import makeStyleContext from '../utils/makeStyleContext'
4
- import makeClassName from '../utils/makeClassName'
4
+ import { makeClassName, ClassNames } from '../utils/makeClassName'
5
5
 
6
6
  import { MediaCaption } from '../MediaCaption'
7
7
 
@@ -28,7 +28,7 @@ export const Table: React.FC<TableProps> = ({
28
28
  '#f4f0f8': 'violet'
29
29
  }
30
30
 
31
- let classNames: (string[] | string | boolean)[][] = [
31
+ let classNames: ClassNames = [
32
32
  [styles.root, true],
33
33
  [styles[display], !!display && !!styles[display]]
34
34
  ]
@@ -1,8 +1,6 @@
1
1
  import React from 'react'
2
-
3
2
  import { Tag } from './'
4
3
  import { PreviewWrapper } from '../_storybook/PreviewWrapper'
5
-
6
4
  import { TagSizes, TagThemes } from './Tag.types'
7
5
 
8
6
  import styles from './Tag.stories.module.css'
@@ -29,7 +27,7 @@ const Example: React.FC = () => {
29
27
  return (
30
28
  <>
31
29
  <div className={styles.root}>
32
- {tags.map(tag => (
30
+ {tags.map((tag) => (
33
31
  <div key={`tagSize-${tag.theme}-${tag.size}`}>
34
32
  <Tag size={tag.size} theme={tag.theme} styleContext="rich">
35
33
  {tag.title}
@@ -1,14 +1,14 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
-
4
3
  import { Tag } from './'
5
- // import { TagProps } from './Tag.types'
4
+ import { TagProps } from './Tag.types'
5
+
6
6
  import styles from './Tag.module.css'
7
7
 
8
8
  describe('Tag', () => {
9
- // let props: TagProps
9
+ let props: TagProps
10
10
 
11
- const renderComponent = () => render(<Tag>Tag name</Tag>)
11
+ const renderComponent = () => render(<Tag {...props}>Tag name</Tag>)
12
12
 
13
13
  it('should have root style', () => {
14
14
  const { getByTestId } = renderComponent()
package/src/Tag/index.tsx CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { TagProps } from './Tag.types'
3
3
  import makeStyleContext from '../utils/makeStyleContext'
4
- import makeClassName from '../utils/makeClassName'
4
+ import { makeClassName, ClassNames } from '../utils/makeClassName'
5
5
 
6
6
  import styles from './Tag.module.css'
7
7
 
@@ -13,7 +13,7 @@ export const Tag: React.FC<TagProps> = ({
13
13
  correlation,
14
14
  onlyOn
15
15
  }) => {
16
- let classNames: (string[] | string | boolean)[][] = [
16
+ let classNames: ClassNames = [
17
17
  [styles.root, true],
18
18
  [styles[size], !!size && !!styles[size]],
19
19
  [styles[theme], !!theme && !!styles[theme]],
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
-
3
2
  import { Timestamp } from './'
4
3
  import { PreviewWrapper } from '../_storybook/PreviewWrapper'
4
+
5
5
  import styles from './Timestamp.stories.module.css'
6
6
 
7
7
  export default {
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
-
4
3
  import { Timestamp } from './'
5
4
  import { TimestampProps } from './Timestamp.types'
5
+
6
6
  import styles from './Timestamp.module.css'
7
7
 
8
8
  describe('Timestamp', () => {
@@ -1,9 +1,7 @@
1
1
  import React from 'react'
2
2
  import { TimestampProps } from './Timestamp.types'
3
-
4
3
  import dayjs from 'dayjs'
5
4
  import 'dayjs/locale/ru'
6
-
7
5
  import relativeTime from 'dayjs/plugin/relativeTime'
8
6
 
9
7
  import styles from './Timestamp.module.css'
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from 'react'
2
-
3
2
  import { Toolbar } from './'
4
3
  import { ToolbarButton } from '../ToolbarButton'
5
4
  import { ToolbarButtonTypes } from '../ToolbarButton/ToolbarButton.types'
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
-
4
3
  import { Toolbar } from './'
5
4
  import { ToolbarProps } from './Toolbar.types'
5
+
6
6
  import styles from './Toolbar.module.css'
7
7
 
8
8
  describe('Toolbar', () => {
@@ -1,13 +1,12 @@
1
1
  import React, { Children } from 'react'
2
2
  import { ToolbarProps } from './Toolbar.types'
3
-
4
3
  import makeStyleContext from '../utils/makeStyleContext'
5
- import makeClassName from '../utils/makeClassName'
4
+ import { makeClassName, ClassNames } from '../utils/makeClassName'
6
5
 
7
6
  import styles from './Toolbar.module.css'
8
7
 
9
8
  export const Toolbar: React.FC<ToolbarProps> = ({ children, styleContext }) => {
10
- let classNames: (string[] | string | boolean)[][] = [[styles.root, true]]
9
+ let classNames: ClassNames = [[styles.root, true]]
11
10
 
12
11
  if (styleContext) {
13
12
  classNames = makeStyleContext(classNames, styleContext, styles)
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
-
3
2
  import { ToolbarButton } from './'
4
- import { PreviewWrapper } from '_storybook/PreviewWrapper'
3
+ import { PreviewWrapper } from '../_storybook/PreviewWrapper'
4
+
5
5
  import styles from './ToolbarButton.stories.module.css'
6
6
 
7
7
  export default {
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react'
3
-
4
3
  import { ToolbarButton } from './'
5
4
  import { ToolbarButtonProps } from './ToolbarButton.types'
5
+
6
6
  import styles from './ToolbarButton.module.css'
7
7
 
8
8
  describe('Toolbar Button', () => {
@@ -1,8 +1,7 @@
1
1
  import React from 'react'
2
2
  import { ToolbarButtonProps } from './ToolbarButton.types'
3
-
4
3
  import { SvgSymbol } from '../SvgSymbol/'
5
- import makeClassName from '../utils/makeClassName'
4
+ import { makeClassName, ClassNames } from '../utils/makeClassName'
6
5
 
7
6
  import styles from './ToolbarButton.module.css'
8
7
 
@@ -13,7 +12,7 @@ export const ToolbarButton: React.FC<ToolbarButtonProps> = ({
13
12
  isActive,
14
13
  onClick
15
14
  }) => {
16
- const classNames: (string[] | string | boolean)[][] = [
15
+ const classNames: ClassNames = [
17
16
  [styles.root, true],
18
17
  [styles[type], !!styles[type]],
19
18
  [styles[theme], !!styles[theme] && !!theme],
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
- import makeClassName from 'utils/makeClassName'
3
2
  import styles from './PreviewWrapper.module.css'
3
+ import makeClassName from '../../utils/makeClassName'
4
4
 
5
5
  export interface PreviewWrapperProps {
6
6
  theme: 'light' | 'dark'
package/src/index.tsx CHANGED
@@ -36,4 +36,5 @@ export * from './MetaItem'
36
36
  export * from './MetaItemLive'
37
37
  export * from './DocumentItemsCount'
38
38
  export * from './ToolbarButton'
39
+ export * from './Footnote'
39
40
  // /* PLOP_INJECT_LINK */ //
@@ -18,16 +18,14 @@ const DangerousHTML: React.FC<DangerousHtmlProps> = ({
18
18
  setCanRenderHtml(true)
19
19
  }, [])
20
20
 
21
- const replaceScriptElementsRecursive = useCallback(node => {
21
+ const replaceScriptElementsRecursive = useCallback((node) => {
22
22
  if (
23
23
  node.tagName === 'SCRIPT' &&
24
24
  (!node.id || node.id.indexOf('script-') !== 0)
25
25
  ) {
26
26
  const script = document.createElement('script')
27
27
 
28
- script.id = `script-${Math.random()
29
- .toString(16)
30
- .slice(2)}`
28
+ script.id = `script-${Math.random().toString(16).slice(2)}`
31
29
  script.innerHTML = node.innerHTML
32
30
 
33
31
  const attrs = node.attributes
@@ -53,7 +51,7 @@ const DangerousHTML: React.FC<DangerousHtmlProps> = ({
53
51
  const prepareAnchors = useCallback(() => {
54
52
  const anchors = Array.from(element.current.querySelectorAll('a'))
55
53
 
56
- anchors.forEach(a => {
54
+ anchors.forEach((a) => {
57
55
  a.setAttribute('target', '_blank')
58
56
  })
59
57
  }, [])
@@ -62,10 +60,10 @@ const DangerousHTML: React.FC<DangerousHtmlProps> = ({
62
60
  if (
63
61
  canRenderHtml &&
64
62
  html.indexOf('script') > -1 &&
65
- element.current.firstChild
63
+ element.current.firstElementChild
66
64
  ) {
67
65
  element.current.firstElementChild.innerHTML = html
68
- replaceScriptElementsRecursive(element.current.firstChild)
66
+ replaceScriptElementsRecursive(element.current.firstElementChild)
69
67
  prepareAnchors()
70
68
  }
71
69
  }, [
@@ -13,7 +13,7 @@ const generateGradient = (color: string): string => {
13
13
  [1, 82]
14
14
  ]
15
15
 
16
- const gradient = gradientSteps.map(i => `rgba(${color}, ${i[0]}) ${i[1]}%`)
16
+ const gradient = gradientSteps.map((i) => `rgba(${color}, ${i[0]}) ${i[1]}%`)
17
17
 
18
18
  return `linear-gradient(-180deg, ${gradient})`
19
19
  }
@@ -1,4 +1,6 @@
1
- const makeClassName = (list: (string[] | string | boolean)[][]): string => {
1
+ export type ClassNames = (string[] | string | boolean)[][]
2
+
3
+ export const makeClassName = (list: ClassNames): string => {
2
4
  return list
3
5
  .filter(([, active]) => active)
4
6
  .map(([className]) => className)
@@ -1,10 +1,14 @@
1
+ import { ClassNames } from './makeClassName'
2
+
1
3
  const makeStyleContext = (
2
- classNames: (string[] | string | boolean)[][],
4
+ classNames: ClassNames,
3
5
  styleContext: string[] | string,
4
- styles
5
- ): (string[] | string | boolean)[][] => {
6
+ styles: Record<string, string>
7
+ ): ClassNames => {
6
8
  const context = Array.isArray(styleContext)
7
- ? styleContext.filter(ctx => styles[ctx]).map(ctx => [[styles[ctx]], true])
9
+ ? styleContext
10
+ .filter((ctx) => styles[ctx])
11
+ .map((ctx) => [[styles[ctx]], true])
8
12
  : [[styles[styleContext], !!styleContext && !!styles[styleContext]]]
9
13
 
10
14
  return classNames.concat(context)
@@ -1,2 +1,2 @@
1
1
  export const toCamel = (s: string): string =>
2
- s.replace(/([_][a-z])/gi, str => str.toUpperCase().replace('_', ''))
2
+ s.replace(/([_][a-z])/gi, (str) => str.toUpperCase().replace('_', ''))