@platformatic/ui-components 0.1.58 → 0.1.59
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/dist/assets/index.0de95a32.css +1 -0
- package/dist/assets/index.d6543e3d.js +40 -0
- package/dist/index.html +2 -2
- package/dist/main.css +10 -20
- package/package.json +1 -1
- package/src/components/BorderedBox.jsx +34 -6
- package/src/components/BorderedBox.module.css +0 -6
- package/src/components/Button.jsx +6 -6
- package/src/components/Button.module.css +0 -30
- package/src/components/ButtonFullRounded.jsx +53 -8
- package/src/components/ButtonFullRounded.module.css +1 -23
- package/src/components/Common.module.css +56 -0
- package/src/components/FollowUs.jsx +5 -6
- package/src/components/GHLoginButton.jsx +1 -2
- package/src/components/InfoBox.jsx +4 -3
- package/src/components/ListElement.jsx +1 -1
- package/src/components/LoginButton.jsx +3 -12
- package/src/components/LoginButton.test.jsx +4 -5
- package/src/components/Modal.jsx +1 -1
- package/src/components/PlatformaticIcon.jsx +4 -3
- package/src/components/SearchBar.jsx +2 -7
- package/src/components/Sidebar.jsx +1 -1
- package/src/components/SimpleMetric.jsx +0 -2
- package/src/components/Status.jsx +26 -19
- package/src/components/constants.js +4 -0
- package/src/components/forms/Input.jsx +1 -0
- package/src/components/icons/AddIcon.jsx +3 -2
- package/src/components/icons/AlertIcon.jsx +4 -3
- package/src/components/icons/AllInOneIcon.jsx +3 -2
- package/src/components/icons/ApiCloudIcon.jsx +3 -2
- package/src/components/icons/ApiEmptyIcon.jsx +3 -2
- package/src/components/icons/ApiIcon.jsx +3 -2
- package/src/components/icons/ApiIconClosed.jsx +3 -2
- package/src/components/icons/AppEmptyIcon.jsx +3 -2
- package/src/components/icons/AppIcon.jsx +3 -2
- package/src/components/icons/AppListIcon.jsx +3 -2
- package/src/components/icons/ArrowDownFullIcon.jsx +3 -2
- package/src/components/icons/ArrowDownIcon.jsx +3 -2
- package/src/components/icons/ArrowLeftIcon.jsx +3 -2
- package/src/components/icons/ArrowRightIcon.jsx +3 -2
- package/src/components/icons/ArrowUpIcon.jsx +3 -2
- package/src/components/icons/BellIcon.jsx +3 -2
- package/src/components/icons/BillingIcon.jsx +3 -2
- package/src/components/icons/Calendar1DayIcon.jsx +3 -2
- package/src/components/icons/Calendar7DaysIcon.jsx +3 -2
- package/src/components/icons/CalendarIcon.jsx +3 -2
- package/src/components/icons/CircleAddIcon.jsx +3 -2
- package/src/components/icons/CircleArrowLeftIcon.jsx +3 -2
- package/src/components/icons/CircleArrowRightIcon.jsx +3 -2
- package/src/components/icons/CircleCheckMarkIcon.jsx +3 -2
- package/src/components/icons/CircleCloseHoverIcon.jsx +3 -2
- package/src/components/icons/CircleCloseIcon.jsx +3 -2
- package/src/components/icons/CircleExclamationIcon.jsx +3 -2
- package/src/components/icons/CircleFullIcon.jsx +77 -0
- package/src/components/icons/CircleTwoArrowsDownIcon.jsx +3 -2
- package/src/components/icons/CircleTwoArrowsUpIcon.jsx +3 -2
- package/src/components/icons/CloseIcon.jsx +3 -2
- package/src/components/icons/CopyPasteIcon.jsx +3 -2
- package/src/components/icons/DatabaseIcon.jsx +3 -2
- package/src/components/icons/EditIcon.jsx +3 -2
- package/src/components/icons/EnlargeIcon.jsx +3 -2
- package/src/components/icons/EntryIcon.jsx +3 -2
- package/src/components/icons/ExploreDocIcon.jsx +3 -2
- package/src/components/icons/GearIcon.jsx +3 -2
- package/src/components/icons/GraphQLIcon.jsx +3 -2
- package/src/components/icons/Icons.module.css +24 -12
- package/src/components/icons/KeyIcon.jsx +3 -2
- package/src/components/icons/LayersIcon.jsx +3 -2
- package/src/components/icons/LensIcon.jsx +3 -2
- package/src/components/icons/LiveIcon.jsx +3 -2
- package/src/components/icons/LogOutIcon.jsx +3 -2
- package/src/components/icons/MetricsIcon.jsx +3 -2
- package/src/components/icons/PlayIcon.jsx +3 -2
- package/src/components/icons/PullRequestIcon.jsx +3 -2
- package/src/components/icons/SendIcon.jsx +3 -2
- package/src/components/icons/SocialDiscordIcon.jsx +3 -2
- package/src/components/icons/SocialGitHubIcon.jsx +3 -2
- package/src/components/icons/SocialGitLabIcon.jsx +3 -2
- package/src/components/icons/SocialLinkedInIcon.jsx +3 -2
- package/src/components/icons/SocialNPMIcon.jsx +3 -2
- package/src/components/icons/SocialTwitterIcon.jsx +3 -2
- package/src/components/icons/StopIcon.jsx +3 -2
- package/src/components/icons/TerminalIcon.jsx +3 -2
- package/src/components/icons/TwoUsersIcon.jsx +3 -2
- package/src/components/icons/UpgradeIcon.jsx +3 -2
- package/src/components/icons/WorkspaceDynamicIcon.jsx +3 -2
- package/src/components/icons/WorkspaceFailIcon.jsx +3 -2
- package/src/components/icons/WorkspaceReadyIcon.jsx +3 -2
- package/src/components/icons/WorkspaceStaticIcon.jsx +3 -2
- package/src/components/icons/index.js +2 -0
- package/src/stories/BorderedBox.stories.jsx +5 -5
- package/src/stories/Button.stories.jsx +4 -5
- package/src/stories/ButtonFullRounded.stories.jsx +11 -11
- package/src/stories/InfoBox.stories.jsx +1 -2
- package/src/stories/Modal.stories.jsx +2 -2
- package/src/stories/PlatformaticIcon.stories.jsx +2 -3
- package/src/stories/Status.stories.jsx +2 -2
- package/src/stories/forms/Input.stories.jsx +1 -1
- package/src/stories/forms/Preview.stories.jsx +1 -1
- package/src/stories/icons/Icons.stories.jsx +5 -4
- package/tailwind.config.cjs +11 -11
- package/dist/assets/index.691ca940.css +0 -1
- package/dist/assets/index.ff0dadfc.js +0 -797
package/dist/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Platformatic UI Components</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index.
|
|
8
|
-
<link rel="stylesheet" href="/assets/index.
|
|
7
|
+
<script type="module" crossorigin src="/assets/index.d6543e3d.js"></script>
|
|
8
|
+
<link rel="stylesheet" href="/assets/index.0de95a32.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/dist/main.css
CHANGED
|
@@ -558,12 +558,8 @@ video {
|
|
|
558
558
|
margin-bottom: 1.25rem;
|
|
559
559
|
}
|
|
560
560
|
|
|
561
|
-
.
|
|
562
|
-
margin-
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
.mr-2 {
|
|
566
|
-
margin-right: 0.5rem;
|
|
561
|
+
.ml-2 {
|
|
562
|
+
margin-left: 0.5rem;
|
|
567
563
|
}
|
|
568
564
|
|
|
569
565
|
.ml-4 {
|
|
@@ -578,6 +574,10 @@ video {
|
|
|
578
574
|
display: flex;
|
|
579
575
|
}
|
|
580
576
|
|
|
577
|
+
.inline-flex {
|
|
578
|
+
display: inline-flex;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
581
|
.h-screen {
|
|
582
582
|
height: 100vh;
|
|
583
583
|
}
|
|
@@ -606,16 +606,6 @@ video {
|
|
|
606
606
|
border-width: 1px;
|
|
607
607
|
}
|
|
608
608
|
|
|
609
|
-
.border-error-red {
|
|
610
|
-
--tw-border-opacity: 1;
|
|
611
|
-
border-color: rgb(250 33 33 / var(--tw-border-opacity));
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
.border-main-green {
|
|
615
|
-
--tw-border-opacity: 1;
|
|
616
|
-
border-color: rgb(33 250 144 / var(--tw-border-opacity));
|
|
617
|
-
}
|
|
618
|
-
|
|
619
609
|
.px-5 {
|
|
620
610
|
padding-left: 1.25rem;
|
|
621
611
|
padding-right: 1.25rem;
|
|
@@ -665,14 +655,14 @@ video {
|
|
|
665
655
|
color: rgb(33 250 144 / var(--tw-text-opacity));
|
|
666
656
|
}
|
|
667
657
|
|
|
668
|
-
.text-
|
|
658
|
+
.text-dark-green {
|
|
669
659
|
--tw-text-opacity: 1;
|
|
670
|
-
color: rgb(
|
|
660
|
+
color: rgb(2 120 63 / var(--tw-text-opacity));
|
|
671
661
|
}
|
|
672
662
|
|
|
673
|
-
.text-
|
|
663
|
+
.text-error-red {
|
|
674
664
|
--tw-text-opacity: 1;
|
|
675
|
-
color: rgb(
|
|
665
|
+
color: rgb(250 33 33 / var(--tw-text-opacity));
|
|
676
666
|
}
|
|
677
667
|
|
|
678
668
|
.underline {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
-
|
|
3
|
-
import { getColor } from '../lib/utils'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
4
3
|
import styles from './BorderedBox.module.css'
|
|
5
4
|
import commonStyles from './Common.module.css'
|
|
6
5
|
import React from 'react'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
6
|
+
import { COLORS_BORDERED_BOX } from './constants'
|
|
7
|
+
function BorderedBox (props) {
|
|
8
|
+
const { classes, color, children, backgroundColor } = props
|
|
9
|
+
const borderColor = commonStyles[`bordered--${color}`]
|
|
10
|
+
const styledBackgroundColor = commonStyles[`background-color-${backgroundColor}`]
|
|
11
11
|
const className = `${styles.borderedBox} ${commonStyles.bordered} ${classes} ${borderColor} ${styledBackgroundColor}`
|
|
12
12
|
|
|
13
13
|
return (
|
|
@@ -16,3 +16,31 @@ export default function BorderedBox (props) {
|
|
|
16
16
|
</div>
|
|
17
17
|
)
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
BorderedBox.propTypes = {
|
|
21
|
+
/**
|
|
22
|
+
* children
|
|
23
|
+
*/
|
|
24
|
+
children: PropTypes.node,
|
|
25
|
+
/**
|
|
26
|
+
* color of text, icon and borders
|
|
27
|
+
*/
|
|
28
|
+
color: PropTypes.oneOf(COLORS_BORDERED_BOX),
|
|
29
|
+
/**
|
|
30
|
+
* background color of the button
|
|
31
|
+
*/
|
|
32
|
+
backgroundColor: PropTypes.oneOf(COLORS_BORDERED_BOX),
|
|
33
|
+
/**
|
|
34
|
+
* classes
|
|
35
|
+
*/
|
|
36
|
+
classes: PropTypes.string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
BorderedBox.defaultProps = {
|
|
40
|
+
children: null,
|
|
41
|
+
color: 'main-green',
|
|
42
|
+
backgroundColor: 'dark-blue',
|
|
43
|
+
classes: ''
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default BorderedBox
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import styles from './Button.module.css'
|
|
5
|
+
import commonStyles from './Common.module.css'
|
|
5
6
|
import PlatformaticIcon from './PlatformaticIcon'
|
|
6
|
-
import {
|
|
7
|
+
import { SIZES, COLORS_BUTTON } from './constants'
|
|
7
8
|
|
|
8
9
|
function Button (props) {
|
|
9
10
|
const { icon, label, color, backgroundColor, size, disabled, bold, hoverEffect, bordered, fullWidth, platformaticIcon, ...rest } = props
|
|
10
|
-
let className = `${styles.button} ${
|
|
11
|
+
let className = `${styles.button} ${commonStyles['background-color-' + backgroundColor]} ${styles['color-' + color]} ${styles['button-' + size]}`
|
|
11
12
|
if (!bordered) className += ` ${styles['no-border']}`
|
|
12
13
|
if (disabled) {
|
|
13
14
|
className += ` ${styles.disabled}`
|
|
@@ -22,7 +23,6 @@ function Button (props) {
|
|
|
22
23
|
if (fullWidth) className += ` ${styles.fullWidth}`
|
|
23
24
|
return (
|
|
24
25
|
<button className={className} disabled={disabled} alt={label} {...rest}>
|
|
25
|
-
{icon ? <FontAwesomeIcon icon={icon} className={`${styles['margin-right-' + size]}`} data-testid='button-icon' /> : null}
|
|
26
26
|
{platformaticIcon ? <PlatformaticIcon iconName={platformaticIcon.iconName} color={platformaticIcon.color} data-testid='button-icon' onClick={null} /> : null}
|
|
27
27
|
<span>{label}</span>
|
|
28
28
|
</button>
|
|
@@ -41,15 +41,15 @@ Button.propTypes = {
|
|
|
41
41
|
/**
|
|
42
42
|
* color of text, icon and borders
|
|
43
43
|
*/
|
|
44
|
-
color: PropTypes.oneOf(
|
|
44
|
+
color: PropTypes.oneOf(COLORS_BUTTON),
|
|
45
45
|
/**
|
|
46
46
|
* background color of the button
|
|
47
47
|
*/
|
|
48
|
-
backgroundColor: PropTypes.oneOf(
|
|
48
|
+
backgroundColor: PropTypes.oneOf(COLORS_BUTTON),
|
|
49
49
|
/**
|
|
50
50
|
* Size
|
|
51
51
|
*/
|
|
52
|
-
size: PropTypes.oneOf(
|
|
52
|
+
size: PropTypes.oneOf(SIZES),
|
|
53
53
|
/**
|
|
54
54
|
* Disabled
|
|
55
55
|
*/
|
|
@@ -27,36 +27,6 @@
|
|
|
27
27
|
.margin-right-extra-large {
|
|
28
28
|
@apply mr-3;
|
|
29
29
|
}
|
|
30
|
-
.background-color-main-green {
|
|
31
|
-
@apply bg-main-green !important;
|
|
32
|
-
}
|
|
33
|
-
.background-color-light-green {
|
|
34
|
-
@apply bg-light-green !important;
|
|
35
|
-
}
|
|
36
|
-
.background-color-dark-green {
|
|
37
|
-
@apply bg-dark-green !important;
|
|
38
|
-
}
|
|
39
|
-
.background-color-main-dark-blue{
|
|
40
|
-
@apply bg-main-dark-blue !important;
|
|
41
|
-
}
|
|
42
|
-
.background-color-dark-blue {
|
|
43
|
-
@apply bg-dark-blue !important;
|
|
44
|
-
}
|
|
45
|
-
.background-color-light-blue {
|
|
46
|
-
@apply bg-light-blue !important;
|
|
47
|
-
}
|
|
48
|
-
.background-color-white{
|
|
49
|
-
@apply bg-white !important;
|
|
50
|
-
}
|
|
51
|
-
.background-color-error-red{
|
|
52
|
-
@apply bg-error-red !important;
|
|
53
|
-
}
|
|
54
|
-
.background-color-tertiary-blue{
|
|
55
|
-
@apply bg-tertiary-blue !important;
|
|
56
|
-
}
|
|
57
|
-
.background-color-transparent{
|
|
58
|
-
@apply bg-transparent;
|
|
59
|
-
}
|
|
60
30
|
.color-main-green {
|
|
61
31
|
@apply text-main-green border-main-green;
|
|
62
32
|
}
|
|
@@ -1,17 +1,62 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import PropTypes from 'prop-types'
|
|
4
|
+
import commonStyles from './Common.module.css'
|
|
3
5
|
import styles from './ButtonFullRounded.module.css'
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
let className = `${styles.buttonRoundedFull} ${
|
|
6
|
+
import PlatformaticIcon from './PlatformaticIcon'
|
|
7
|
+
import { COLORS_ICON, SIZES } from './constants'
|
|
8
|
+
function ButtonFullRounded ({ iconName, iconSize, iconColor, disabled, paddingSize, alt, onClick }) {
|
|
9
|
+
const borderColor = commonStyles[`bordered--${iconColor}`]
|
|
10
|
+
const padding = commonStyles[`padding--${paddingSize}`]
|
|
11
|
+
let className = `${styles.buttonRoundedFull} ${borderColor} ${padding}`
|
|
10
12
|
if (disabled) className += ` ${styles.disabled}`
|
|
11
13
|
|
|
12
14
|
return (
|
|
13
|
-
<button className={className} disabled={disabled} {
|
|
14
|
-
<
|
|
15
|
+
<button className={className} disabled={disabled} onClick={onClick} alt={alt}>
|
|
16
|
+
<PlatformaticIcon iconName={iconName} size={iconSize} color={iconColor} data-testid='button-icon' onClick={null} />
|
|
15
17
|
</button>
|
|
16
18
|
)
|
|
17
19
|
}
|
|
20
|
+
|
|
21
|
+
ButtonFullRounded.propTypes = {
|
|
22
|
+
/**
|
|
23
|
+
* iconName
|
|
24
|
+
*/
|
|
25
|
+
iconName: PropTypes.string,
|
|
26
|
+
/**
|
|
27
|
+
* iconColor
|
|
28
|
+
*/
|
|
29
|
+
iconColor: PropTypes.oneOf(COLORS_ICON),
|
|
30
|
+
/**
|
|
31
|
+
* iconColor
|
|
32
|
+
*/
|
|
33
|
+
iconSize: PropTypes.oneOf(SIZES),
|
|
34
|
+
/**
|
|
35
|
+
* disabled
|
|
36
|
+
*/
|
|
37
|
+
disabled: PropTypes.bool,
|
|
38
|
+
/**
|
|
39
|
+
* paddingSize
|
|
40
|
+
*/
|
|
41
|
+
paddingSize: PropTypes.oneOf(SIZES),
|
|
42
|
+
/**
|
|
43
|
+
* alt
|
|
44
|
+
*/
|
|
45
|
+
alt: PropTypes.string,
|
|
46
|
+
/**
|
|
47
|
+
* onClick
|
|
48
|
+
*/
|
|
49
|
+
onClick: PropTypes.func
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
ButtonFullRounded.defaultProps = {
|
|
53
|
+
iconName: '',
|
|
54
|
+
iconColor: 'white',
|
|
55
|
+
iconSize: 'small',
|
|
56
|
+
disabled: false,
|
|
57
|
+
paddingSize: 'small',
|
|
58
|
+
alt: 'ButtonFullRounded',
|
|
59
|
+
onClick: () => {}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export default ButtonFullRounded
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
.buttonRoundedFull {
|
|
2
|
-
@apply rounded-full flex justify-center cursor-pointer
|
|
2
|
+
@apply rounded-full flex justify-center cursor-pointer bg-main-dark-blue border items-center;
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.button-small {
|
|
7
|
-
@apply p-0 text-sm h-5 w-5;
|
|
8
|
-
}
|
|
9
|
-
.button-medium {
|
|
10
|
-
@apply p-1 h-6 w-6;
|
|
11
|
-
}
|
|
12
|
-
.button-large {
|
|
13
|
-
@apply p-2 h-7 w-7;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.green {
|
|
17
|
-
@apply border-light-green text-light-green ;
|
|
18
|
-
}
|
|
19
|
-
.red {
|
|
20
|
-
@apply border-error-red text-error-red;
|
|
21
|
-
}
|
|
22
|
-
.white {
|
|
23
|
-
@apply border-white text-white;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
4
|
.disabled {
|
|
27
5
|
@apply bg-opacity-30 cursor-default;
|
|
28
6
|
}
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
.bordered--error-red {
|
|
11
11
|
@apply border-error-red;
|
|
12
12
|
}
|
|
13
|
+
.bordered--warning-yellow {
|
|
14
|
+
@apply border-warning-yellow;
|
|
15
|
+
}
|
|
16
|
+
.bordered--dark-blue {
|
|
17
|
+
@apply border-dark-blue;
|
|
18
|
+
}
|
|
19
|
+
.bordered--white {
|
|
20
|
+
@apply border-white;
|
|
21
|
+
}
|
|
13
22
|
|
|
14
23
|
.error-message {
|
|
15
24
|
@apply absolute -bottom-5 text-error-red text-xs px-2;
|
|
@@ -26,3 +35,50 @@
|
|
|
26
35
|
@apply text-main-dark-blue;
|
|
27
36
|
}
|
|
28
37
|
|
|
38
|
+
.background-color-main-green {
|
|
39
|
+
@apply bg-main-green !important;
|
|
40
|
+
}
|
|
41
|
+
.background-color-light-green {
|
|
42
|
+
@apply bg-light-green !important;
|
|
43
|
+
}
|
|
44
|
+
.background-color-dark-green {
|
|
45
|
+
@apply bg-dark-green !important;
|
|
46
|
+
}
|
|
47
|
+
.background-color-main-dark-blue{
|
|
48
|
+
@apply bg-main-dark-blue !important;
|
|
49
|
+
}
|
|
50
|
+
.background-color-dark-blue {
|
|
51
|
+
@apply bg-dark-blue !important;
|
|
52
|
+
}
|
|
53
|
+
.background-color-light-blue {
|
|
54
|
+
@apply bg-light-blue !important;
|
|
55
|
+
}
|
|
56
|
+
.background-color-white{
|
|
57
|
+
@apply bg-white !important;
|
|
58
|
+
}
|
|
59
|
+
.background-color-error-red{
|
|
60
|
+
@apply bg-error-red !important;
|
|
61
|
+
}
|
|
62
|
+
.background-color-tertiary-blue{
|
|
63
|
+
@apply bg-tertiary-blue !important;
|
|
64
|
+
}
|
|
65
|
+
.background-color-transparent{
|
|
66
|
+
@apply bg-transparent;
|
|
67
|
+
}
|
|
68
|
+
.apply-opacity-30 {
|
|
69
|
+
@apply opacity-30;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.padding--small {
|
|
73
|
+
@apply p-1 ;
|
|
74
|
+
}
|
|
75
|
+
.padding--medium {
|
|
76
|
+
@apply p-2;
|
|
77
|
+
}
|
|
78
|
+
.padding--large {
|
|
79
|
+
@apply p-4;
|
|
80
|
+
}
|
|
81
|
+
.padding--extra-large {
|
|
82
|
+
@apply p-6;
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import styles from './FollowUs.module.css'
|
|
3
|
-
import
|
|
4
|
-
import { faGithub, faTwitter, faLinkedin, faDiscord } from '@fortawesome/free-brands-svg-icons'
|
|
3
|
+
import Icons from './icons'
|
|
5
4
|
|
|
6
5
|
export default function FollowUs ({ label = 'FOLLOW US ON' }) {
|
|
7
6
|
return (
|
|
@@ -11,22 +10,22 @@ export default function FollowUs ({ label = 'FOLLOW US ON' }) {
|
|
|
11
10
|
</div>
|
|
12
11
|
<div className={styles.icon}>
|
|
13
12
|
<a href='https://twitter.com/platformatic' target='_blank' rel='noopener noreferrer'>
|
|
14
|
-
<
|
|
13
|
+
<Icons.SocialTwitterIcon color='white' size='medium' />
|
|
15
14
|
</a>
|
|
16
15
|
</div>
|
|
17
16
|
<div className={styles.icon}>
|
|
18
17
|
<a href='https://www.linkedin.com/company/platformatic/' target='_blank' rel='noopener noreferrer'>
|
|
19
|
-
<
|
|
18
|
+
<Icons.SocialLinkedInIcon color='white' size='medium' />
|
|
20
19
|
</a>
|
|
21
20
|
</div>
|
|
22
21
|
<div className={styles.icon}>
|
|
23
22
|
<a href='https://github.com/platformatic' target='_blank' rel='noopener noreferrer'>
|
|
24
|
-
<
|
|
23
|
+
<Icons.SocialGitHubIcon color='white' size='medium' />
|
|
25
24
|
</a>
|
|
26
25
|
</div>
|
|
27
26
|
<div className={styles.icon}>
|
|
28
27
|
<a href='https://discord.gg/platformatic' target='_blank' rel='noopener noreferrer'>
|
|
29
|
-
<
|
|
28
|
+
<Icons.SocialDiscordIcon color='white' size='medium' />
|
|
30
29
|
</a>
|
|
31
30
|
</div>
|
|
32
31
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import LoginButton from './LoginButton'
|
|
3
|
-
import { faGithub } from '@fortawesome/free-brands-svg-icons'
|
|
4
3
|
|
|
5
4
|
export default function GHLoginButton ({ onClick, ...props }) {
|
|
6
5
|
return (
|
|
7
6
|
<LoginButton
|
|
8
7
|
label='Continue with Github'
|
|
9
8
|
onClick={onClick}
|
|
10
|
-
|
|
9
|
+
iconName='SocialGitHubIcon'
|
|
11
10
|
{...props}
|
|
12
11
|
/>
|
|
13
12
|
)
|
|
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types'
|
|
|
4
4
|
import styles from './InfoBox.module.css'
|
|
5
5
|
import Button from './Button'
|
|
6
6
|
import PlatformaticIcon from './PlatformaticIcon'
|
|
7
|
+
import { COLORS_BUTTON, COLORS_ICON } from './constants'
|
|
7
8
|
|
|
8
9
|
function InfoBox ({ children, iconName, iconColor, helpText, buttonProps }) {
|
|
9
10
|
return (
|
|
@@ -28,7 +29,7 @@ InfoBox.propTypes = {
|
|
|
28
29
|
/**
|
|
29
30
|
* iconColor
|
|
30
31
|
*/
|
|
31
|
-
iconColor: PropTypes.oneOf([
|
|
32
|
+
iconColor: PropTypes.oneOf([COLORS_ICON]),
|
|
32
33
|
/**
|
|
33
34
|
* helpText
|
|
34
35
|
*/
|
|
@@ -39,7 +40,7 @@ InfoBox.propTypes = {
|
|
|
39
40
|
buttonProps: PropTypes.shape({
|
|
40
41
|
label: PropTypes.string,
|
|
41
42
|
backgroundColor: PropTypes.string,
|
|
42
|
-
color: PropTypes.
|
|
43
|
+
color: PropTypes.oneOf([COLORS_BUTTON]),
|
|
43
44
|
onClick: PropTypes.func
|
|
44
45
|
})
|
|
45
46
|
}
|
|
@@ -47,7 +48,7 @@ InfoBox.propTypes = {
|
|
|
47
48
|
InfoBox.defaultProps = {
|
|
48
49
|
children: null,
|
|
49
50
|
iconName: '',
|
|
50
|
-
iconColor: 'green',
|
|
51
|
+
iconColor: 'main-green',
|
|
51
52
|
helpText: '',
|
|
52
53
|
buttonProps: null
|
|
53
54
|
}
|
|
@@ -13,7 +13,7 @@ function List ({ title, detail, marginSize, titleAspect }) {
|
|
|
13
13
|
return (
|
|
14
14
|
<div className={className}>
|
|
15
15
|
<div className={styles.row}>
|
|
16
|
-
<PlatformaticIcon iconName='CircleCheckMarkIcon' color='green' data-testid='list-element-title-icon' onClick={null} />
|
|
16
|
+
<PlatformaticIcon iconName='CircleCheckMarkIcon' color='main-green' data-testid='list-element-title-icon' onClick={null} size='medium' />
|
|
17
17
|
<div className={classNameTitle} data-testid='list-element-title'>
|
|
18
18
|
{title}
|
|
19
19
|
</div>
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import
|
|
3
|
-
import styles from './LoginButton.module.css'
|
|
2
|
+
import Button from './Button'
|
|
4
3
|
|
|
5
|
-
export default function LoginButton ({
|
|
4
|
+
export default function LoginButton ({ iconName, label, onClick, ...props }) {
|
|
6
5
|
return (
|
|
7
|
-
<
|
|
8
|
-
<div
|
|
9
|
-
className={styles.button}
|
|
10
|
-
data-testid='login-button'
|
|
11
|
-
{...props}
|
|
12
|
-
>
|
|
13
|
-
{icon ? <FontAwesomeIcon icon={icon} className='mr-2' data-testid='login-button-icon' /> : null} {label}
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
6
|
+
<Button backgroundColor='main-green' alt={label} label={label} platformaticIcon={{ iconName, size: 'medium', color: 'main-dark-blue' }} data-testid='login-button' size='extra-large' onClick={onClick} {...props} bold />
|
|
16
7
|
)
|
|
17
8
|
}
|
|
@@ -2,7 +2,6 @@ import React from 'react'
|
|
|
2
2
|
import { render, screen } from '@testing-library/react'
|
|
3
3
|
import '@testing-library/jest-dom/extend-expect'
|
|
4
4
|
import LoginButton from './LoginButton'
|
|
5
|
-
import { faTwitter } from '@fortawesome/free-brands-svg-icons'
|
|
6
5
|
|
|
7
6
|
test('<LoginButton /> with label', () => {
|
|
8
7
|
const label = 'My Button'
|
|
@@ -11,15 +10,15 @@ test('<LoginButton /> with label', () => {
|
|
|
11
10
|
)
|
|
12
11
|
expect(screen.getByTestId('login-button')).toHaveTextContent(label)
|
|
13
12
|
const icon = screen.queryByTestId('login-button-icon')
|
|
14
|
-
expect(icon).
|
|
13
|
+
expect(icon).toBeFalsy()
|
|
15
14
|
})
|
|
16
15
|
|
|
17
|
-
test('<LoginButton /> with label and twitter icon', () => {
|
|
16
|
+
test.skip('<LoginButton /> with label and twitter icon', () => {
|
|
18
17
|
const label = 'My Twitter Button'
|
|
19
18
|
render(
|
|
20
|
-
<LoginButton label={label}
|
|
19
|
+
<LoginButton label={label} iconName='CircleFullIcon' />
|
|
21
20
|
)
|
|
22
21
|
expect(screen.getByTestId('login-button')).toHaveTextContent(label)
|
|
23
22
|
const icon = screen.queryByTestId('login-button-icon')
|
|
24
|
-
expect(icon).
|
|
23
|
+
expect(icon).toBeTruthy()
|
|
25
24
|
})
|
package/src/components/Modal.jsx
CHANGED
|
@@ -47,7 +47,7 @@ export default function Modal (props) {
|
|
|
47
47
|
onMouseEnter={() => setIsHoverCloseModal(true)}
|
|
48
48
|
onMouseLeave={() => setIsHoverCloseModal(false)}
|
|
49
49
|
>
|
|
50
|
-
{isHoverCloseModal ? <CircleCloseHoverIcon color='green' /> : <CircleCloseIcon color='green' />}
|
|
50
|
+
{isHoverCloseModal ? <CircleCloseHoverIcon color='main-green' /> : <CircleCloseIcon color='main-green' />}
|
|
51
51
|
</div>
|
|
52
52
|
</div>
|
|
53
53
|
<p className={styles.titleInvite}>{title}</p>
|
|
@@ -3,6 +3,7 @@ import React from 'react'
|
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import Icons from './icons'
|
|
5
5
|
import styles from './PlatformaticIcon.module.css'
|
|
6
|
+
import { COLORS_ICON, SIZES } from './constants'
|
|
6
7
|
|
|
7
8
|
function PlatformaticIcon ({ iconName, color, onClick, size, classes, tip }) {
|
|
8
9
|
let icon = <></>
|
|
@@ -29,11 +30,11 @@ PlatformaticIcon.propTypes = {
|
|
|
29
30
|
/**
|
|
30
31
|
* color
|
|
31
32
|
*/
|
|
32
|
-
color: PropTypes.
|
|
33
|
+
color: PropTypes.oneOf(COLORS_ICON),
|
|
33
34
|
/**
|
|
34
35
|
* size
|
|
35
36
|
*/
|
|
36
|
-
size: PropTypes.
|
|
37
|
+
size: PropTypes.oneOf(SIZES),
|
|
37
38
|
/**
|
|
38
39
|
* onClick
|
|
39
40
|
*/
|
|
@@ -50,7 +51,7 @@ PlatformaticIcon.propTypes = {
|
|
|
50
51
|
|
|
51
52
|
PlatformaticIcon.defaultProps = {
|
|
52
53
|
iconName: '',
|
|
53
|
-
color: 'green',
|
|
54
|
+
color: 'main-green',
|
|
54
55
|
size: 'small',
|
|
55
56
|
onClick: () => {},
|
|
56
57
|
classes: null,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import React, { useRef, useState } from 'react'
|
|
3
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
4
|
-
import { faSearch } from '@fortawesome/free-solid-svg-icons'
|
|
5
3
|
import styles from './SearchBar.module.css'
|
|
6
4
|
import commonStyles from './Common.module.css'
|
|
5
|
+
import PlatformaticIcon from './PlatformaticIcon'
|
|
7
6
|
export default function SearchBar (props) {
|
|
8
7
|
const inputRef = useRef()
|
|
9
8
|
const [wrapperClassName, setWrapperClassName] = useState(normalClassName())
|
|
@@ -44,17 +43,13 @@ export default function SearchBar (props) {
|
|
|
44
43
|
return `${styles.input} ${commonStyles.padded} ${styles.onBlur}`
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
function iconClassName () {
|
|
48
|
-
return isOnFocus ? 'text-main-green' : 'text-white'
|
|
49
|
-
}
|
|
50
|
-
|
|
51
46
|
return (
|
|
52
47
|
<div>
|
|
53
48
|
{title && <h1 className={styles.title}>{title}</h1>}
|
|
54
49
|
<div className={wrapperClassName}>
|
|
55
50
|
<input type='text' placeholder='Search' className='grow' ref={inputRef} onChange={handleChange} onFocus={onFocus} onBlur={onBlur} />
|
|
56
51
|
<button onClick={handleSearch} onFocus={onFocus} onBlur={onBlur}>
|
|
57
|
-
<
|
|
52
|
+
<PlatformaticIcon iconName='LensIcon' color={isOnFocus ? 'main-green' : 'white'} size='medium' />
|
|
58
53
|
</button>
|
|
59
54
|
</div>
|
|
60
55
|
</div>
|
|
@@ -74,7 +74,7 @@ function Sidebar (props) {
|
|
|
74
74
|
<button className={`${styles.buttonItem} ${collapsed && styles.buttonItemCollapsed}`} type='button' onClick={() => onClickItemSelected(item)}>
|
|
75
75
|
{item.iconName && (<PlatformaticIcon
|
|
76
76
|
iconName={item.iconName}
|
|
77
|
-
color={isSelected ? 'green' : 'white'}
|
|
77
|
+
color={isSelected ? 'main-green' : 'white'}
|
|
78
78
|
tip={item.title}
|
|
79
79
|
size='medium'
|
|
80
80
|
/>)}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
|
-
// The icon that is in design is not in the free version of fontawesome
|
|
5
|
-
// Temporary using this one
|
|
6
4
|
import ReactTooltip from 'react-tooltip'
|
|
7
5
|
import BorderedBox from './BorderedBox'
|
|
8
6
|
import styles from './SimpleMetric.module.css'
|