Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPA-310]Updated Icons and missing classname support in css-modules #169

Merged
merged 76 commits into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
8ded97e
initial commit
fifijo Jan 28, 2022
865d73e
[SPA-310]Accordion icons
fifijo Jan 28, 2022
5a4c164
Accordion missing props
fifijo Jan 28, 2022
83906a3
Accordion2
fifijo Jan 28, 2022
716a685
Alert
fifijo Jan 28, 2022
6e40017
Alert
fifijo Jan 28, 2022
21e0e02
Avatar
fifijo Jan 28, 2022
1714814
Back
fifijo Jan 28, 2022
3994703
Back remove register icons
fifijo Jan 28, 2022
d091e6c
Backdrop add missing prop zIndex
fifijo Jan 28, 2022
522de2e
Badge fix className
fifijo Jan 28, 2022
b07888f
BlockSection className fix
fifijo Jan 28, 2022
00d4c83
BoxBackground fix className
fifijo Jan 28, 2022
a28f22b
BoxOutline todo info
fifijo Jan 28, 2022
d0c8ba8
Spinner css modules
fifijo Jan 28, 2022
0eda3a8
Card css modules
fifijo Jan 28, 2022
c530a85
Icon fix className
fifijo Jan 28, 2022
113a166
Checkbox TODO info
fifijo Jan 28, 2022
ef78ede
Colorline className fix and added TODO to components
fifijo Jan 28, 2022
43702e1
ColorNumber className fix
fifijo Jan 28, 2022
08e74e7
Colorpicker todo and CustomLink prop className
fifijo Jan 28, 2022
b081cb8
Date time picker TODO info
fifijo Jan 28, 2022
326bc72
Divider className fix and TODO info
fifijo Jan 28, 2022
c3a4b5d
Dropdown TODO info
fifijo Jan 28, 2022
901d67e
DropdownSelect TODO info
fifijo Jan 28, 2022
3e5679e
Filter format code, remove unused scss file
fifijo Jan 28, 2022
400106d
Form TODO info
fifijo Jan 28, 2022
28842ce
Spinner update test
fifijo Jan 28, 2022
d6ccf5e
Update tests
fifijo Jan 28, 2022
3502ba6
Headline className fix
fifijo Jan 28, 2022
d314126
Heading/Icon TODO info
fifijo Jan 28, 2022
298489e
Image format code, InfinityScroll TODO info
fifijo Jan 28, 2022
5b338f7
Infobar TODO info
fifijo Jan 28, 2022
01d8427
InfoSection TODO info
fifijo Jan 28, 2022
d3ca829
Input className fix and TODO info
fifijo Jan 28, 2022
9b54ee3
InputMasked TODO
fifijo Jan 28, 2022
a373c85
Leged className fix and Label TODO info
fifijo Jan 28, 2022
56266e6
Limit icon
fifijo Jan 28, 2022
6942329
LimitSmall className fix
fifijo Jan 28, 2022
a90e3fd
Loader and List TODO info
fifijo Jan 28, 2022
51a7e9a
Message className fix and TODO info
fifijo Jan 28, 2022
dfd48a2
Modal add Icon components and TODO info
fifijo Jan 28, 2022
7be17df
MonthRangePicker add Icon component and TODO info
fifijo Jan 28, 2022
1e06fe2
OverflowTooltip code readability, mdx fontawesome to icon and TODO info
fifijo Jan 28, 2022
d9470a2
Paragraph TODO info
fifijo Jan 28, 2022
b172aa4
ProgressBar comments clean up and added TODO info
fifijo Jan 28, 2022
b4dff35
Search code readablility and TODO info
fifijo Jan 28, 2022
605899b
Section className prop placement
fifijo Jan 28, 2022
78f30c3
SectionTile comments cleanup and added TODO info
fifijo Jan 28, 2022
17f8696
Select and Option TODO info
fifijo Jan 28, 2022
dcbab94
Separator className fix and dynamic props
fifijo Jan 28, 2022
bd5d164
ShowPassword TODO info
fifijo Jan 28, 2022
ed3a159
Skeleton update mdx file
fifijo Jan 28, 2022
bc6af20
Spacer removed className prop comment
fifijo Jan 28, 2022
712981b
Spreader code format and TODO info
fifijo Jan 28, 2022
7558050
StatsBadge clean up unused fontawesome import in mdx and comment in scss
fifijo Jan 28, 2022
a884814
StatsBadge removed unused Icon import in mdx file
fifijo Jan 28, 2022
482616c
StatusIcon add Icon
fifijo Jan 28, 2022
e15503d
StepNumber TODO info
fifijo Jan 28, 2022
f548b03
Steps TODO info
fifijo Jan 28, 2022
65c79ed
Tabs TODO info
fifijo Jan 28, 2022
8f3cbb7
TODO info TextArea, TimeSelect, Tooltip
fifijo Jan 28, 2022
8c3c75e
TimeSelect change file names and add TODO info
fifijo Jan 28, 2022
450bded
Global components TODO info, HTML removed className
fifijo Jan 28, 2022
77569b2
Update FontAwesome with Icon comp and removed registerIcons
fifijo Jan 28, 2022
f2723e1
remove fontawesome package
fifijo Jan 28, 2022
f424ffc
remove Fontawesome from packages
fifijo Jan 28, 2022
cbbf490
update yarn
fifijo Jan 28, 2022
12bb2c9
update errors in tests
fifijo Jan 28, 2022
68179e1
Fix import file name in TineSelect
fifijo Jan 28, 2022
5dac8c6
Fix JSX issue in mdx files by changing @babel version
fifijo Jan 29, 2022
cd034f7
lint fixes
fifijo Jan 29, 2022
6980a73
lint fixes
fifijo Jan 29, 2022
6dcf0dc
Add icon-remove in Search
fifijo Jan 29, 2022
8d1d98e
v1.3.150
fifijo Jan 29, 2022
8190f05
Build
fifijo Jan 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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