Skip to content

Commit 52bff76

Browse files
fix: updating all the icons
Signed-off-by: Antonio Sonis <[email protected]>
1 parent 3ceaed1 commit 52bff76

File tree

171 files changed

+1043
-1402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+1043
-1402
lines changed

index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import Status from './src/components/Status'
3939
import Tooltip from './src/components/Tooltip'
4040
import TooltipAbsolute from './src/components/TooltipAbsolute'
4141
import TabbedWindow from './src/components/TabbedWindow'
42-
import TabbedWindowV2 from './src/components/TabbedWindowV2'
4342
import Tag from './src/components/Tag'
4443
import TextWithLabel from './src/components/TextWithLabel'
4544
import TwoColumnsLayout from './src/components/layouts/TwoColumnsLayout'
@@ -84,7 +83,6 @@ export {
8483
SimpleMetric,
8584
Status,
8685
TabbedWindow,
87-
TabbedWindowV2,
8886
Tag,
8987
TextWithLabel,
9088
Tooltip,

setupTests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import "@testing-library/jest-dom/vitest";
1+
import '@testing-library/jest-dom/vitest'

src/components/BorderedBox.jsx

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ import PropTypes from 'prop-types'
33
import styles from './BorderedBox.module.css'
44
import commonStyles from './Common.module.css'
55
import React from 'react'
6-
import { COLORS_BORDERED_BOX } from './constants'
6+
import { COLORS_BORDERED_BOX, DARK_BLUE, MAIN_GREEN, OPACITY_100 } from './constants'
77
function BorderedBox ({
8-
classes,
9-
color,
10-
children,
11-
backgroundColor,
12-
backgroundColorOpacity,
13-
borderColorOpacity,
14-
clickable,
15-
onClick
8+
classes = '',
9+
color = MAIN_GREEN,
10+
children = null,
11+
backgroundColor = DARK_BLUE,
12+
backgroundColorOpacity = OPACITY_100,
13+
borderColorOpacity = OPACITY_100,
14+
clickable = false,
15+
onClick = () => {}
1616
}) {
1717
const borderColor = commonStyles[`bordered--${color}-${borderColorOpacity}`]
1818
const styledBackgroundColor = commonStyles[`background-color-${backgroundColor}`]
@@ -62,15 +62,4 @@ BorderedBox.propTypes = {
6262
onClick: PropTypes.func
6363
}
6464

65-
BorderedBox.defaultProps = {
66-
children: null,
67-
color: 'main-green',
68-
backgroundColor: 'dark-blue',
69-
classes: '',
70-
backgroundColorOpacity: 100,
71-
borderColorOpacity: 100,
72-
clickable: false,
73-
onClick: () => {}
74-
}
75-
7665
export default BorderedBox

src/components/Button.jsx

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ import {
2020
} from './constants'
2121
// ${inactive ? styles.inactive : styles.active}
2222
function Button ({
23-
textClass,
24-
paddingClass,
25-
label,
26-
color,
27-
backgroundColor,
28-
size,
29-
disabled,
30-
hoverEffect,
31-
hoverEffectProperties,
32-
bordered,
33-
fullWidth,
34-
platformaticIcon,
35-
platformaticIconAfter,
36-
selected,
23+
textClass = '',
24+
paddingClass = '',
25+
label = '',
26+
color = MAIN_DARK_BLUE,
27+
backgroundColor = TRANSPARENT,
28+
size = LARGE,
29+
disabled = false,
30+
hoverEffect = DULLS_BACKGROUND_COLOR,
31+
hoverEffectProperties = {},
32+
bordered = true,
33+
fullWidth = false,
34+
platformaticIcon = null,
35+
platformaticIconAfter = null,
36+
selected = false,
3737
...rest
3838
}) {
3939
let buttonClassName = textClass
@@ -178,20 +178,4 @@ Button.propTypes = {
178178
selected: PropTypes.bool
179179
}
180180

181-
Button.defaultProps = {
182-
textClass: '',
183-
paddingClass: '',
184-
label: '',
185-
color: MAIN_DARK_BLUE,
186-
backgroundColor: TRANSPARENT,
187-
disabled: false,
188-
size: LARGE,
189-
hoverEffect: DULLS_BACKGROUND_COLOR,
190-
hoverEffectProperties: {},
191-
bordered: true,
192-
fullWidth: false,
193-
platformaticIcon: null,
194-
selected: false
195-
}
196-
197181
export default Button

src/components/ButtonFullRounded.jsx

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ import styles from './ButtonFullRounded.module.css'
66
import PlatformaticIcon from './PlatformaticIcon'
77
import { COLORS_ICON, SIZES, DULLS_BACKGROUND_COLOR, PADDING_SIZES, SMALL, WHITE, NONE } from './constants'
88
function ButtonFullRounded ({
9-
className,
10-
iconName,
11-
iconSize,
12-
iconColor,
13-
disabled,
14-
paddingSize,
15-
alt,
16-
onClick,
17-
hoverEffect,
18-
bordered,
19-
tip,
20-
selected,
21-
buttonClassName,
22-
internalOverHandling
9+
className = '',
10+
iconName = '',
11+
iconSize = SMALL,
12+
iconColor = WHITE,
13+
disabled = false,
14+
paddingSize = NONE,
15+
alt = 'ButtonFullRounded',
16+
onClick = () => {},
17+
hoverEffect = '',
18+
bordered = false,
19+
tip = '',
20+
selected = false,
21+
buttonClassName = ''
2322
}) {
2423
const padding = commonStyles[`padding--${paddingSize}`]
2524
const containerClassName = `${className} border-0 ${styles.roundedFull}`
@@ -106,21 +105,4 @@ ButtonFullRounded.propTypes = {
106105
internalOverHandling: PropTypes.bool
107106
}
108107

109-
ButtonFullRounded.defaultProps = {
110-
className: '',
111-
iconName: '',
112-
iconColor: WHITE,
113-
iconSize: SMALL,
114-
disabled: false,
115-
paddingSize: NONE,
116-
alt: 'ButtonFullRounded',
117-
onClick: () => {},
118-
hoverEffect: '',
119-
bordered: false,
120-
tip: '',
121-
selected: false,
122-
buttonClassName: '',
123-
internalOverHandling: false
124-
}
125-
126108
export default ButtonFullRounded

src/components/ButtonOnlyIcon.jsx

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ import PropTypes from 'prop-types'
44
import styles from './Button.module.css'
55
import commonStyles from './Common.module.css'
66
import PlatformaticIcon from './PlatformaticIcon'
7-
import { SIZES, COLORS_BUTTON, BOX_SHADOW, UNDERLINE, HOVER_EFFECTS_BUTTONS, DULLS_BACKGROUND_COLOR, MAIN_DARK_BLUE, LARGE, MEDIUM } from './constants'
7+
import { SIZES, COLORS_BUTTON, BOX_SHADOW, UNDERLINE, HOVER_EFFECTS_BUTTONS, DULLS_BACKGROUND_COLOR, MAIN_DARK_BLUE, LARGE, MEDIUM, TRANSPARENT } from './constants'
88

99
function ButtonOnlyIcon ({
10-
textClass,
11-
paddingClass,
12-
altLabel,
13-
color,
14-
backgroundColor,
15-
size,
16-
disabled,
17-
hoverEffect,
18-
bordered,
19-
fullWidth,
20-
platformaticIcon,
21-
platformaticIconAfter,
22-
selected,
10+
textClass = '',
11+
paddingClass = '',
12+
altLabel = '',
13+
color = MAIN_DARK_BLUE,
14+
backgroundColor = TRANSPARENT,
15+
size = LARGE,
16+
disabled = false,
17+
hoverEffect = DULLS_BACKGROUND_COLOR,
18+
bordered = true,
19+
fullWidth = false,
20+
platformaticIcon = null,
21+
selected = false,
2322
...rest
2423
}) {
2524
let contentClassName = `${styles.content} `
@@ -139,32 +138,10 @@ ButtonOnlyIcon.propTypes = {
139138
iconName: PropTypes.string,
140139
color: PropTypes.string
141140
}),
142-
/**
143-
* platformaticIconAfter: should be removed
144-
*/
145-
platformaticIconAfter: PropTypes.shape({
146-
iconName: PropTypes.string,
147-
color: PropTypes.string
148-
}),
149141
/**
150142
* Selected: default false
151143
*/
152144
selected: PropTypes.bool
153145
}
154146

155-
ButtonOnlyIcon.defaultProps = {
156-
textClass: '',
157-
paddingClass: '',
158-
altLabel: '',
159-
color: MAIN_DARK_BLUE,
160-
backgroundColor: 'transparent',
161-
disabled: false,
162-
size: LARGE,
163-
hoverEffect: DULLS_BACKGROUND_COLOR,
164-
bordered: true,
165-
fullWidth: false,
166-
platformaticIcon: null,
167-
selected: false
168-
}
169-
170147
export default ButtonOnlyIcon

src/components/Checkbox.jsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import React from 'react'
33
import PropTypes from 'prop-types'
44
import styles from './Checkbox.module.css'
55
import { MAIN_DARK_BLUE, RICH_BLACK, WHITE } from './constants'
6-
function Checkbox ({ disabled, color, ...rest }) {
6+
function Checkbox ({
7+
disabled = false,
8+
color = MAIN_DARK_BLUE,
9+
...rest
10+
}) {
711
let className = `${styles.checkbox} `
812
className += styles[`checkbox--${color}`]
913
if (disabled) className += ` ${styles.disabled}`
@@ -23,9 +27,4 @@ Checkbox.propTypes = {
2327
color: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE, RICH_BLACK])
2428
}
2529

26-
Checkbox.defaultProps = {
27-
disabled: false,
28-
color: MAIN_DARK_BLUE
29-
}
30-
3130
export default Checkbox

src/components/CopyAndPaste.jsx

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
'use strict'
22
import React, { useState } from 'react'
33
import PropTypes from 'prop-types'
4-
import { COLORS_ICON, DIRECTION_TOP, MEDIUM, SIZES, POSITIONS, POSITION_CENTER } from './constants'
4+
import { COLORS_ICON, DIRECTION_TOP, MEDIUM, SIZES, POSITIONS, POSITION_CENTER, MAIN_DARK_BLUE } from './constants'
55
import PlatformaticIcon from './PlatformaticIcon'
66
import TooltipAbsolute from './TooltipAbsolute'
77

88
function CopyAndPaste ({
9-
value,
10-
tooltipLabel,
11-
color,
12-
timeout,
13-
size,
14-
tooltipClassName,
15-
position
16-
9+
value = 'app',
10+
tooltipLabel = 'Create your app now',
11+
color = MAIN_DARK_BLUE,
12+
timeout = 1500,
13+
size = MEDIUM,
14+
tooltipClassName = '',
15+
position = POSITION_CENTER
1716
}) {
1817
const [copied, setCopied] = useState(false)
1918

@@ -74,14 +73,4 @@ CopyAndPaste.propTypes = {
7473
position: PropTypes.oneOf(POSITIONS)
7574
}
7675

77-
CopyAndPaste.defaultProps = {
78-
value: 'app',
79-
tooltipLabel: 'Create your app now',
80-
color: 'main-dark-blue',
81-
timeout: 1500,
82-
size: MEDIUM,
83-
tooltipClassName: '',
84-
position: POSITION_CENTER
85-
}
86-
8776
export default CopyAndPaste

src/components/HorizontalSeparator.jsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import PropTypes from 'prop-types'
44
import commonStyles from './Common.module.css'
55
import { DARK_GREEN, MAIN_DARK_BLUE, WHITE } from './constants'
66
import styles from './HorizontalSeparator.module.css'
7-
function HorizontalSeparator ({ marginTop, marginBottom, color, opacity }) {
7+
function HorizontalSeparator ({
8+
marginTop = 4,
9+
marginBottom = 4,
10+
color = DARK_GREEN,
11+
opacity = 1
12+
}) {
813
function getClassName () {
914
let className = `${styles.style} `
1015
className += commonStyles[`text--${color}`] + ' '
@@ -37,11 +42,4 @@ HorizontalSeparator.propTypes = {
3742
opacity: PropTypes.number
3843
}
3944

40-
HorizontalSeparator.defaultProps = {
41-
marginTop: 4,
42-
marginBottom: 4,
43-
color: DARK_GREEN,
44-
opacity: 1
45-
}
46-
4745
export default HorizontalSeparator

src/components/LoadingSpinnerV2.jsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import styles from './LoadingSpinnerV2.module.css'
55
import { SpinnerCircular } from 'spinners-react'
66

77
function LoadingSpinnerV2 ({
8-
loading,
9-
applySentences,
10-
color,
11-
containerClassName
8+
loading = false,
9+
applySentences = {},
10+
color = '#FFFFFF',
11+
containerClassName = ''
1212
}) {
1313
const defaultContainerClassName = containerClassName || `${styles.container}`
1414
// If null then loading not started, if true then loading, if false then done loading
@@ -46,11 +46,4 @@ LoadingSpinnerV2.propTypes = {
4646
containerClassName: PropTypes.string
4747
}
4848

49-
LoadingSpinnerV2.defaultProps = {
50-
loading: false,
51-
applySentences: {},
52-
color: '#FFFFFF',
53-
containerClassName: ''
54-
}
55-
5649
export default LoadingSpinnerV2

0 commit comments

Comments
 (0)