Skip to content

Commit

Permalink
[SPA-310]Updated Icons and missing classname support in css-modules (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fifijo committed Jan 29, 2022
1 parent 4e612db commit 9c24e43
Show file tree
Hide file tree
Showing 184 changed files with 1,025 additions and 1,404 deletions.
9 changes: 0 additions & 9 deletions config/packages/package.dependencies.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
module.exports = {
productionDependencies: {
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/free-solid-svg-icons": "5.15.4",
"@fortawesome/react-fontawesome": "0.1.15",
"@u-wave/react-vimeo": "0.9.5",
"classnames": "2.3.1",
"date-fns": "2.24.0",
Expand All @@ -25,9 +22,6 @@ module.exports = {
"react-color": "2.19.3",
},
documentationDependencies: {
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/free-solid-svg-icons": "5.15.4",
"@fortawesome/react-fontawesome": "0.1.15",
"@u-wave/react-vimeo": "0.9.5",
"classnames": "2.3.1",
"date-fns": "2.24.0",
Expand All @@ -52,9 +46,6 @@ module.exports = {
"react-color": "2.19.3",
},
testingDependencies: {
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/free-solid-svg-icons": "5.15.4",
"@fortawesome/react-fontawesome": "0.1.15",
"@u-wave/react-vimeo": "0.9.5",
"classnames": "2.3.1",
"date-fns": "2.24.0",
Expand Down
2 changes: 1 addition & 1 deletion coverage/badge-branches.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion coverage/badge-functions.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion coverage/badge-lines.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion coverage/badge-statements.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dist/app-uikit.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/app-uikit.js

Large diffs are not rendered by default.

11 changes: 3 additions & 8 deletions dist/app-uikit.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@
*/

/*!
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/

/*!
* weakmap-polyfill v2.0.1 - ECMAScript6 WeakMap polyfill
* weakmap-polyfill v2.0.4 - ECMAScript6 WeakMap polyfill
* https://github.com/polygonplanet/weakmap-polyfill
* Copyright (c) 2015-2020 Polygon Planet <polygon.planet.aqua@gmail.com>
* Copyright (c) 2015-2021 polygonplanet <polygon.planet.aqua@gmail.com>
* @license MIT
*/

Expand Down Expand Up @@ -48,7 +43,7 @@ and limitations under the License.

/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */

/*! @vimeo/player v2.16.1 | (c) 2021 Vimeo | MIT License | https://github.com/vimeo/player.js */
/*! @vimeo/player v2.16.2 | (c) 2021 Vimeo | MIT License | https://github.com/vimeo/player.js */

/*! Native Promise Only
v0.8.1 (c) Kyle Simpson
Expand Down
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@landingi/landingi-ui-kit",
"version": "1.3.149",
"version": "1.3.150",
"description": "Landingi UI-Kit",
"main": "dist/app-uikit.js",
"private": true,
Expand All @@ -26,17 +26,16 @@
"release-it": "yarn version --patch && yarn test:badges && yarn build"
},
"devDependencies": {
"@babel/core": "7.15.5",
"@babel/core": "7.16.7",
"@babel/eslint-parser": "7.15.7",
"@babel/eslint-plugin": "7.14.5",
"@babel/plugin-proposal-class-properties": "7.14.5",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-transform-runtime": "7.15.0",
"@babel/preset-env": "7.15.6",
"@babel/preset-react": "7.14.5",
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/free-solid-svg-icons": "5.15.4",
"@fortawesome/react-fontawesome": "0.1.15",
"@babel/runtime": "7.16.7",
"@babel/traverse": "7.16.7",
"@testing-library/jest-dom": "5.16.1",
"@testing-library/react": "12.1.2",
"@testing-library/react-hooks": "7.0.2",
Expand Down Expand Up @@ -110,10 +109,7 @@
"npm": ">=7.0.0"
},
"dependencies": {
"@babel/runtime": "7.15.4",
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/free-solid-svg-icons": "5.15.4",
"@fortawesome/react-fontawesome": "0.1.15",
"@babel/runtime": "7.16.7",
"@u-wave/react-vimeo": "0.9.5",
"classnames": "2.3.1",
"date-fns": "2.24.0",
Expand All @@ -135,5 +131,8 @@
"react-uuid": "1.0.2",
"simple-flexbox": "2.3.3",
"tiny-emitter": "2.1.0"
},
"resolutions": {
"@babel/traverse": "7.16.7"
}
}
3 changes: 2 additions & 1 deletion src/shared/components/global/Headline/Headline.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import scss from './Headline.scss'

const cssClass = styles(scss)

//TODO Headline css, mdx, test
/**
* Headline page - stateless presentational component
* Headline - stateless presentational component
* @param {object} props - props
* @param {string|array} props.className - list of class names, default: page__headline
* @param {string} props.title - data
Expand Down
14 changes: 3 additions & 11 deletions src/shared/components/global/Html/Html.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
import { styles } from '@helpers/css'
import PropTypes from 'prop-types'
import React from 'react'
import createDOMPurify from 'dompurify'
import scss from './Html.scss'

const isBrowser = typeof window !== 'undefined'

const DOMPurify = isBrowser && createDOMPurify(window)

const cssClass = styles(scss)

const Html = ({ className, value }) => (
//TODO Html mdx, test
const Html = ({ value }) => (
<span
className={cssClass(className)}
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(value)
}}
/>
)

Html.displayName = 'HTML element'

Html.defaultProps = {
className: 'html'
}
Html.displayName = 'HTML'

Html.propTypes = {
className: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
Expand Down
19 changes: 0 additions & 19 deletions src/shared/components/global/Html/Html.scss

This file was deleted.

4 changes: 2 additions & 2 deletions src/shared/components/global/ScrollSpy/MainItem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { scrollSpyShape } from '@shapes'
import Button from '@components/ui/Button'
import Icon from '@components/ui/Icon'
import Item from './Item'
import ListItem from '@components/ui/List/Item'
import PropTypes from 'prop-types'
Expand All @@ -22,7 +22,7 @@ const MainItem = ({ item, onClick }) => {
return (
<ListItem variant='menu'>
<Button onClick={onClick}>
<FontAwesomeIcon icon={icon} size='1x' />
<Icon icon={icon} />

<span>{title}</span>
</Button>
Expand Down
1 change: 1 addition & 0 deletions src/shared/components/global/ScrollSpy/ScrollSpy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import React, { useCallback, useRef } from 'react'
import useScrollSpy from '@helpers/hooks/useScrollSpy'
import uuid from 'react-uuid'

//TODO ScrollSpy css, mdx, test
/**
* ScrollSpy - stateless presentational component
* @param {object} props - props
Expand Down
3 changes: 0 additions & 3 deletions src/shared/components/global/ScrollSpy/ScrollSpy.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import React from 'react'
import ScrollSpy from '@components/global/ScrollSpy'
import { mount } from 'enzyme'
import registerIcons from '@helpers/icons'

registerIcons()

const mockedOnClick = jest.fn()

Expand Down
1 change: 1 addition & 0 deletions src/shared/components/global/Searcher/Searcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
import React, { memo, useCallback } from 'react'
import Search from '@components/ui/Search'

//TODO Searcher test, mdx
/**
* Searcher - stateful presentational component
* @param {object} props - props
Expand Down
3 changes: 0 additions & 3 deletions src/shared/components/global/Searcher/Searcher.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import React from 'react'
import Searcher from '@components/global/Searcher'
import Search from '@components/global/Searcher'
import { mountWithIntl } from '@jestutils'
import registerIcons from '@helpers/icons'

registerIcons()

const mockedSearchFunction = jest.fn()
const mockedSetSearchResult = jest.fn()
Expand Down
4 changes: 3 additions & 1 deletion src/shared/components/global/TimingToast/TimingToast.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import styles from './TimingToast.module.scss'
import { useStyles } from '@helpers/hooks/useStyles'
import PropTypes from 'prop-types'

//TODO TimingToast replace react-pose with framer-motion library
/**
* Toast Animation, exports React-pose animations
* @see {@link https://popmotion.io/pose/api/} for further information.
Expand All @@ -23,6 +24,7 @@ const toastProps = {

const TimingToastAnimation = posed.div(toastProps)

//TODO TimingToast test
/**
* TimingToast - stateless presentational component
* @param {object} props - props
Expand Down Expand Up @@ -82,7 +84,7 @@ const TimingToast = ({ className }) => {
)
}

TimingToast.displayName = 'Timing Toast'
TimingToast.displayName = 'TimingToast'

TimingToast.propTypes = {
className: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
Expand Down
3 changes: 0 additions & 3 deletions src/shared/components/global/TimingToast/TimingToast.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import React from 'react'
import TimingToast from '@components/global/TimingToast'
import { mount } from 'enzyme'
import registerIcons from '@helpers/icons'
import { emitTimingToastToggle } from '@events/toast'
import { act } from 'react-dom/test-utils'

registerIcons()

const component = <TimingToast />

describe('<TimingToast/> mount', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/shared/components/global/Toast/Toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import scss from './Toast.scss'

const cssClass = styles(scss)

//TODO TimingToast replace react-pose with framer-motion library
/**
* Toast Animation, exports React-pose animations
* @see {@link https://popmotion.io/pose/api/} for further information.
Expand All @@ -31,6 +32,7 @@ const toastProps = {

const ToastAnimation = posed.div(toastProps)

//TODO Toast test, css, mdx
/**
* Toast stateful container component
* @param {object} props
Expand Down
3 changes: 0 additions & 3 deletions src/shared/components/global/Toast/Toast.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import React from 'react'
import Toast from '@components/global/Toast'
import Notification from '@components/ui/Notification'
import { mount } from 'enzyme'
import registerIcons from '@helpers/icons'
import { emitToastToggle } from '@events/toast'
import { act } from 'react-dom/test-utils'

registerIcons()

const props = {
message: 'jestem tekstem do komponentu Notification'
}
Expand Down
13 changes: 5 additions & 8 deletions src/shared/components/ui/Accordion/Accordion.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { Playground, Props } from 'docz'
import Accordion from '@components/ui/Accordion'
import RegisterIcons from '@helpers/RegisterIcons'

# Accordion

<Props of={Accordion} />

<Playground>
<RegisterIcons>
<Accordion>
<div label='label 1'>children 1</div>
<div label='label 2'>children 2</div>
<div label='label 3'>children 3</div>
</Accordion>
</RegisterIcons>
<Accordion>
<div label='label 1'>children 1</div>
<div label='label 2'>children 2</div>
<div label='label 3'>children 3</div>
</Accordion>
</Playground>
4 changes: 3 additions & 1 deletion src/shared/components/ui/Accordion/Accordion.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
font-size: 18px;
border-bottom: 1px solid $color-5;
padding: 8px 0;
display: flex;
justify-content: space-between;

&-arrow {
margin: 0 5px;
font-size: 14px;

svg {
i {
margin-right: 5px;
font-size: 14px;
}
Expand Down

0 comments on commit 9c24e43

Please sign in to comment.