@platformatic/ui-components 0.1.53 → 0.1.55
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/package.json +1 -1
- package/renovate.json +6 -0
- package/src/components/Modal.jsx +1 -1
- package/src/components/Sidebar.jsx +12 -5
- package/src/components/Sidebar.module.css +1 -1
- package/src/components/SimpleMetric.jsx +1 -1
- package/src/components/forms/Preview.jsx +1 -1
- package/src/components/icons/AlertIcon.jsx +1 -1
- package/src/components/icons/ApiEmptyIcon.jsx +140 -106
- package/src/components/icons/ApiIconClosed.jsx +51 -18
- package/src/components/icons/AppEmptyIcon.jsx +126 -93
- package/src/components/icons/AppListIcon.jsx +101 -71
- package/src/components/icons/BellIcon.jsx +78 -0
- package/src/components/icons/BillingIcon.jsx +98 -0
- package/src/components/icons/CircleArrowLeftIcon.jsx +95 -0
- package/src/components/icons/CircleArrowRightIcon.jsx +98 -0
- package/src/components/icons/CircleCheckMarkIcon.jsx +41 -29
- package/src/components/icons/CircleCloseHoverIcon.jsx +62 -36
- package/src/components/icons/CircleCloseIcon.jsx +52 -26
- package/src/components/icons/CircleExclamationIcon.jsx +87 -24
- package/src/components/icons/CircleTwoArrowsDownIcon.jsx +84 -0
- package/src/components/icons/CircleTwoArrowsUpIcon.jsx +87 -0
- package/src/components/icons/EnlargeIcon.jsx +85 -0
- package/src/components/icons/EntryIcon.jsx +82 -0
- package/src/components/icons/ExploreDocIcon.jsx +95 -0
- package/src/components/icons/GearIcon.jsx +2 -2
- package/src/components/icons/GraphQLIcon.jsx +98 -0
- package/src/components/icons/Icons.module.css +6 -0
- package/src/components/icons/KeyIcon.jsx +85 -0
- package/src/components/icons/LayersIcon.jsx +81 -0
- package/src/components/icons/LensIcon.jsx +79 -0
- package/src/components/icons/LiveIcon.jsx +60 -18
- package/src/components/icons/LogOutIcon.jsx +81 -0
- package/src/components/icons/MetricsIcon.jsx +80 -47
- package/src/components/icons/PlayIcon.jsx +57 -2
- package/src/components/icons/PullRequestIcon.jsx +87 -30
- package/src/components/icons/SendIcon.jsx +75 -0
- package/src/components/icons/SocialDiscordIcon.jsx +79 -0
- package/src/components/icons/SocialGitHubIcon.jsx +98 -0
- package/src/components/icons/SocialGitLabIcon.jsx +122 -0
- package/src/components/icons/SocialLinkedInIcon.jsx +85 -0
- package/src/components/icons/SocialNPMIcon.jsx +77 -0
- package/src/components/icons/SocialTwitterIcon.jsx +77 -0
- package/src/components/icons/StopIcon.jsx +59 -2
- package/src/components/icons/TerminalIcon.jsx +62 -2
- package/src/components/icons/{Users2Icon.jsx → TwoUsersIcon.jsx} +4 -4
- package/src/components/icons/UpgradeIcon.jsx +70 -1
- package/src/components/icons/WorkspaceFailIcon.jsx +112 -0
- package/src/components/icons/index.js +47 -5
- package/src/stories/PlatformaticIcon.stories.jsx +58 -26
- package/src/components/icons/CircleBackIcon.jsx +0 -51
|
@@ -1,21 +1,78 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
2
3
|
import styles from './Icons.module.css'
|
|
3
|
-
|
|
4
|
+
|
|
5
|
+
const StopIcon = ({ color, size }) => {
|
|
4
6
|
const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
|
|
5
7
|
let icon = <></>
|
|
8
|
+
|
|
6
9
|
switch (size) {
|
|
7
10
|
case 'small':
|
|
8
11
|
icon = (
|
|
9
|
-
<svg
|
|
12
|
+
<svg
|
|
13
|
+
width={16}
|
|
14
|
+
height={16}
|
|
15
|
+
viewBox='0 0 16 16'
|
|
16
|
+
fill='none'
|
|
17
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
18
|
+
className={className}
|
|
19
|
+
>
|
|
10
20
|
<circle cx={8} cy={8} r={6} stroke='none' />
|
|
11
21
|
<path d='M3.5 12L12 3.5' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
12
22
|
</svg>
|
|
13
23
|
)
|
|
14
24
|
break
|
|
25
|
+
case 'medium':
|
|
26
|
+
icon = (
|
|
27
|
+
<svg
|
|
28
|
+
width={24}
|
|
29
|
+
height={24}
|
|
30
|
+
viewBox='0 0 24 24'
|
|
31
|
+
fill='none'
|
|
32
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
33
|
+
className={className}
|
|
34
|
+
>
|
|
35
|
+
<circle cx={12} cy={12} r={9} stroke='none' strokeWidth={1.5} />
|
|
36
|
+
<path d='M5.25 18L18 5.25' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
37
|
+
</svg>
|
|
38
|
+
)
|
|
39
|
+
break
|
|
40
|
+
case 'large':
|
|
41
|
+
icon = (
|
|
42
|
+
<svg
|
|
43
|
+
width={40}
|
|
44
|
+
height={40}
|
|
45
|
+
viewBox='0 0 40 40'
|
|
46
|
+
fill='none'
|
|
47
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
48
|
+
className={className}
|
|
49
|
+
>
|
|
50
|
+
<circle cx={20} cy={20} r={15} stroke='none' strokeWidth={2} />
|
|
51
|
+
<path d='M8.75 30L30 8.75' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
52
|
+
</svg>
|
|
53
|
+
)
|
|
54
|
+
break
|
|
55
|
+
|
|
15
56
|
default:
|
|
16
57
|
break
|
|
17
58
|
}
|
|
18
59
|
return icon
|
|
19
60
|
}
|
|
20
61
|
|
|
62
|
+
StopIcon.propTypes = {
|
|
63
|
+
/**
|
|
64
|
+
* color of text, icon and borders
|
|
65
|
+
*/
|
|
66
|
+
color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
|
|
67
|
+
/**
|
|
68
|
+
* Size
|
|
69
|
+
*/
|
|
70
|
+
size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
StopIcon.defaultProps = {
|
|
74
|
+
color: 'main-dark-blue',
|
|
75
|
+
size: 'medium'
|
|
76
|
+
}
|
|
77
|
+
|
|
21
78
|
export default StopIcon
|
|
@@ -1,22 +1,82 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
2
3
|
import styles from './Icons.module.css'
|
|
3
|
-
|
|
4
|
+
|
|
5
|
+
const TerminalIcon = ({ color, size }) => {
|
|
4
6
|
const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
|
|
5
7
|
let icon = <></>
|
|
8
|
+
|
|
6
9
|
switch (size) {
|
|
7
10
|
case 'small':
|
|
8
11
|
icon = (
|
|
9
|
-
<svg
|
|
12
|
+
<svg
|
|
13
|
+
width={16}
|
|
14
|
+
height={16}
|
|
15
|
+
viewBox='0 0 16 16'
|
|
16
|
+
fill='none'
|
|
17
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
18
|
+
className={className}
|
|
19
|
+
>
|
|
10
20
|
<rect x={2} y={2} width={12} height={12} rx={1} stroke='none' />
|
|
11
21
|
<path d='M4 9L6 7L4 5' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
12
22
|
<path d='M7 11H11.5' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
13
23
|
</svg>
|
|
14
24
|
)
|
|
15
25
|
break
|
|
26
|
+
case 'medium':
|
|
27
|
+
icon = (
|
|
28
|
+
<svg
|
|
29
|
+
width={24}
|
|
30
|
+
height={24}
|
|
31
|
+
viewBox='0 0 24 24'
|
|
32
|
+
fill='none'
|
|
33
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
34
|
+
className={className}
|
|
35
|
+
>
|
|
36
|
+
<rect x={3} y={3} width={18} height={18} rx={1} stroke='none' strokeWidth={1.5} />
|
|
37
|
+
<path d='M6 13.5L9 10.5L6 7.5' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
38
|
+
<path d='M10.5 16.5H17.25' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
39
|
+
|
|
40
|
+
</svg>
|
|
41
|
+
)
|
|
42
|
+
break
|
|
43
|
+
case 'large':
|
|
44
|
+
icon = (
|
|
45
|
+
<svg
|
|
46
|
+
width={40}
|
|
47
|
+
height={40}
|
|
48
|
+
viewBox='0 0 40 40'
|
|
49
|
+
fill='none'
|
|
50
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
51
|
+
className={className}
|
|
52
|
+
>
|
|
53
|
+
<rect x={5} y={5} width={30} height={30} rx={1} stroke='none' strokeWidth={2} />
|
|
54
|
+
<path d='M10 22.5L15 17.5L10 12.5' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
55
|
+
<path d='M17.5 27.5H28.75' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
56
|
+
</svg>
|
|
57
|
+
)
|
|
58
|
+
break
|
|
59
|
+
|
|
16
60
|
default:
|
|
17
61
|
break
|
|
18
62
|
}
|
|
19
63
|
return icon
|
|
20
64
|
}
|
|
21
65
|
|
|
66
|
+
TerminalIcon.propTypes = {
|
|
67
|
+
/**
|
|
68
|
+
* color of text, icon and borders
|
|
69
|
+
*/
|
|
70
|
+
color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
|
|
71
|
+
/**
|
|
72
|
+
* Size
|
|
73
|
+
*/
|
|
74
|
+
size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
TerminalIcon.defaultProps = {
|
|
78
|
+
color: 'main-dark-blue',
|
|
79
|
+
size: 'medium'
|
|
80
|
+
}
|
|
81
|
+
|
|
22
82
|
export default TerminalIcon
|
|
@@ -2,7 +2,7 @@ import * as React from 'react'
|
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import styles from './Icons.module.css'
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const TwoUsersIcon = ({ color, size }) => {
|
|
6
6
|
const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
|
|
7
7
|
let icon = <></>
|
|
8
8
|
|
|
@@ -65,7 +65,7 @@ const Users2Icon = ({ color, size }) => {
|
|
|
65
65
|
return icon
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
TwoUsersIcon.propTypes = {
|
|
69
69
|
/**
|
|
70
70
|
* color of text, icon and borders
|
|
71
71
|
*/
|
|
@@ -76,9 +76,9 @@ Users2Icon.propTypes = {
|
|
|
76
76
|
size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
TwoUsersIcon.defaultProps = {
|
|
80
80
|
color: 'main-dark-blue',
|
|
81
81
|
size: 'medium'
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
export default
|
|
84
|
+
export default TwoUsersIcon
|
|
@@ -1,10 +1,62 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
2
3
|
import styles from './Icons.module.css'
|
|
3
4
|
|
|
4
|
-
const UpgradeIcon = ({ color
|
|
5
|
+
const UpgradeIcon = ({ color, size }) => {
|
|
5
6
|
const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
|
|
6
7
|
let icon = <></>
|
|
8
|
+
|
|
7
9
|
switch (size) {
|
|
10
|
+
case 'small':
|
|
11
|
+
icon = (
|
|
12
|
+
<svg
|
|
13
|
+
width={16}
|
|
14
|
+
height={16}
|
|
15
|
+
viewBox='0 0 16 16'
|
|
16
|
+
fill='none'
|
|
17
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
18
|
+
className={className}
|
|
19
|
+
>
|
|
20
|
+
<path d='M9.80918 9.49998C9.39943 9.9934 8.7836 10.3072 8.09498 10.3072C7.37145 10.3072 6.72827 9.96077 6.32007 9.42357' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
21
|
+
<path d='M3.1061 6.85057L2.34803 6.85057C2.15566 6.85057 2 7.00735 2 7.2011L2 8.91548C2 9.10922 2.15566 9.26601 2.34803 9.26601L3.1061 9.26601C3.25037 9.26601 3.38072 9.3565 3.43134 9.49289L3.79709 10.4667C3.84645 10.5993 3.81228 10.7497 3.7085 10.8466L3.20987 11.3143C3.06307 11.452 3.06307 11.6865 3.20861 11.8255L4.3957 12.9548C4.52731 13.081 4.73487 13.0823 4.86901 12.9586L5.52457 12.357C5.62835 12.2627 5.77768 12.2385 5.9055 12.2984L6.77874 12.7062C6.90276 12.7636 6.98123 12.8885 6.98123 13.0249L6.98123 13.6495C6.98123 13.8432 7.13689 14 7.32926 14L8.79477 14C8.98713 14 9.1428 13.8432 9.1428 13.6495L9.1428 12.9943C9.1428 12.8426 9.24024 12.7075 9.38325 12.6604L10.3919 12.329C10.5109 12.2907 10.6412 12.3188 10.7336 12.4029L11.3246 12.9421C11.4689 13.0733 11.6929 13.0606 11.8207 12.9127L12.9002 11.67C13.0243 11.5272 13.0129 11.3105 12.8749 11.1818L12.4117 10.7484C12.3092 10.6541 12.2738 10.5075 12.3193 10.3762L12.6332 9.47122C12.6826 9.32974 12.8142 9.23541 12.9622 9.23541L13.652 9.23541C13.8443 9.23541 14 9.07863 14 8.88489L14 7.23296C14 7.03922 13.8443 6.88244 13.652 6.88244L12.9622 6.88244' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
22
|
+
<path d='M7.88912 2.04607L5.00001 4.90712L6.50001 4.90713L6.50001 8.02304L9.5 8.02304L9.5 5.03457L11 5.03456L7.88912 2.04607Z' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
23
|
+
|
|
24
|
+
</svg>
|
|
25
|
+
)
|
|
26
|
+
break
|
|
27
|
+
case 'medium':
|
|
28
|
+
icon = (
|
|
29
|
+
<svg
|
|
30
|
+
width={24}
|
|
31
|
+
height={24}
|
|
32
|
+
viewBox='0 0 24 24'
|
|
33
|
+
fill='none'
|
|
34
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
35
|
+
className={className}
|
|
36
|
+
>
|
|
37
|
+
<path d='M14.7139 14.25C14.0993 14.9901 13.1755 15.4609 12.1426 15.4609C11.0573 15.4609 10.0925 14.9412 9.48022 14.1354' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
38
|
+
<path d='M4.65914 10.2759L3.52204 10.2759C3.23349 10.2759 3 10.511 3 10.8016L3 13.3732C3 13.6638 3.23349 13.899 3.52204 13.899L4.65914 13.899C4.87555 13.899 5.07108 14.0348 5.14702 14.2393L5.69563 15.7001C5.76967 15.8989 5.71841 16.1245 5.56275 16.2698L4.81481 16.9715C4.5946 17.178 4.5946 17.5298 4.81291 17.7382L6.59355 19.4322C6.79097 19.6215 7.1023 19.6234 7.30352 19.4379L8.28686 18.5355C8.44252 18.394 8.66653 18.3577 8.85826 18.4475L10.1681 19.0594C10.3541 19.1454 10.4718 19.3328 10.4718 19.5374L10.4718 20.4742C10.4718 20.7648 10.7053 21 10.9939 21L13.1922 21C13.4807 21 13.7142 20.7648 13.7142 20.4742L13.7142 19.4915C13.7142 19.2639 13.8604 19.0613 14.0749 18.9905L15.5879 18.4934C15.7663 18.4361 15.9618 18.4781 16.1004 18.6043L16.9869 19.4131C17.2033 19.61 17.5393 19.5909 17.7311 19.3691L19.3503 17.5049C19.5364 17.2908 19.5193 16.9658 19.3124 16.7727L18.6176 16.1226C18.4638 15.9811 18.4107 15.7612 18.479 15.5643L18.9498 14.2068C19.0238 13.9946 19.2213 13.8531 19.4434 13.8531L20.478 13.8531C20.7665 13.8531 21 13.618 21 13.3273L21 10.8494C21 10.5588 20.7665 10.3237 20.478 10.3237L19.4434 10.3237' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
39
|
+
<path d='M11.8337 3.0691L7.50001 7.36067L9.75001 7.36068L9.75001 12.0346L14.25 12.0345L14.25 7.55184L16.5 7.55183L11.8337 3.0691Z' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
40
|
+
</svg>
|
|
41
|
+
)
|
|
42
|
+
break
|
|
43
|
+
case 'large':
|
|
44
|
+
icon = (
|
|
45
|
+
<svg
|
|
46
|
+
width={40}
|
|
47
|
+
height={40}
|
|
48
|
+
viewBox='0 0 40 40'
|
|
49
|
+
fill='none'
|
|
50
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
51
|
+
className={className}
|
|
52
|
+
>
|
|
53
|
+
<path d='M24.5231 23.75C23.4987 24.9835 21.9591 25.7681 20.2376 25.7681C18.4288 25.7681 16.8208 24.9019 15.8003 23.5589' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
54
|
+
<path d='M7.76524 17.1264L5.87007 17.1264C5.38916 17.1264 5 17.5184 5 18.0027L5 22.2887C5 22.7731 5.38916 23.165 5.87007 23.165L7.76524 23.165C8.12592 23.165 8.4518 23.3913 8.57836 23.7322L9.49272 26.1668C9.61611 26.4982 9.53069 26.8742 9.27125 27.1164L8.02468 28.2859C7.65767 28.63 7.65767 29.2163 8.02151 29.5637L10.9892 32.387C11.3183 32.7025 11.8372 32.7057 12.1725 32.3966L13.8114 30.8925C14.0709 30.6567 14.4442 30.5961 14.7638 30.7459L16.9468 31.7656C17.2569 31.909 17.4531 32.2213 17.4531 32.5623L17.4531 34.1237C17.4531 34.608 17.8422 35 18.3231 35L21.9869 35C22.4678 35 22.857 34.608 22.857 34.1237L22.857 32.4858C22.857 32.1066 23.1006 31.7688 23.4581 31.6509L25.9798 30.8224C26.2772 30.7268 26.603 30.7969 26.834 31.0072L28.3115 32.3551C28.6722 32.6833 29.2322 32.6515 29.5518 32.2818L32.2506 29.1749C32.5606 28.818 32.5322 28.2763 32.1873 27.9545L31.0293 26.871C30.773 26.6352 30.6845 26.2687 30.7984 25.9405L31.583 23.6781C31.7064 23.3243 32.0354 23.0885 32.4056 23.0885L34.1299 23.0885C34.6108 23.0885 35 22.6966 35 22.2122L35 18.0824C35 17.598 34.6108 17.2061 34.1299 17.2061L32.4056 17.2061' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
55
|
+
<path d='M19.7228 5.11517L12.5 12.2678L16.25 12.2678L16.25 20.0576L23.75 20.0576L23.75 12.5864L27.5 12.5864L19.7228 5.11517Z' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
56
|
+
</svg>
|
|
57
|
+
)
|
|
58
|
+
break
|
|
59
|
+
|
|
8
60
|
case 'extra-large':
|
|
9
61
|
icon = (
|
|
10
62
|
<svg
|
|
@@ -39,10 +91,27 @@ const UpgradeIcon = ({ color = 'green', size = 'normal' }) => {
|
|
|
39
91
|
</svg>
|
|
40
92
|
)
|
|
41
93
|
break
|
|
94
|
+
|
|
42
95
|
default:
|
|
43
96
|
break
|
|
44
97
|
}
|
|
45
98
|
return icon
|
|
46
99
|
}
|
|
47
100
|
|
|
101
|
+
UpgradeIcon.propTypes = {
|
|
102
|
+
/**
|
|
103
|
+
* color of text, icon and borders
|
|
104
|
+
*/
|
|
105
|
+
color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
|
|
106
|
+
/**
|
|
107
|
+
* Size
|
|
108
|
+
*/
|
|
109
|
+
size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
UpgradeIcon.defaultProps = {
|
|
113
|
+
color: 'main-dark-blue',
|
|
114
|
+
size: 'medium'
|
|
115
|
+
}
|
|
116
|
+
|
|
48
117
|
export default UpgradeIcon
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import styles from './Icons.module.css'
|
|
4
|
+
|
|
5
|
+
const WorkspaceFailIcon = ({ color, size }) => {
|
|
6
|
+
const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
|
|
7
|
+
let icon = <></>
|
|
8
|
+
|
|
9
|
+
switch (size) {
|
|
10
|
+
case 'small':
|
|
11
|
+
icon = (
|
|
12
|
+
<svg
|
|
13
|
+
width={16}
|
|
14
|
+
height={16}
|
|
15
|
+
viewBox='0 0 16 16'
|
|
16
|
+
fill='none'
|
|
17
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
18
|
+
className={className}
|
|
19
|
+
>
|
|
20
|
+
<rect x={2} y={2} width={5} height={5} rx={1} stroke='none' />
|
|
21
|
+
<rect x={6} y={14} width={4} height='5.03496' rx={1} transform='rotate(-180 6 14)' stroke='none' />
|
|
22
|
+
<rect x={14} y={14} width={6} height='5.03497' rx={1} transform='rotate(-180 14 14)' stroke='none' />
|
|
23
|
+
<circle cx={11.5} cy={4.5} r={2.5} stroke='none' />
|
|
24
|
+
<path d='M10.9624 5.23332L12.1707 3.89999' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
25
|
+
<path d='M12.2332 5.17081L10.8999 3.96247' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
26
|
+
|
|
27
|
+
</svg>
|
|
28
|
+
)
|
|
29
|
+
break
|
|
30
|
+
case 'medium':
|
|
31
|
+
icon = (
|
|
32
|
+
<svg
|
|
33
|
+
width={24}
|
|
34
|
+
height={24}
|
|
35
|
+
viewBox='0 0 24 24'
|
|
36
|
+
fill='none'
|
|
37
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
38
|
+
className={className}
|
|
39
|
+
>
|
|
40
|
+
<rect x={3} y={3} width={7.5} height={7.5} rx={1} stroke='none' strokeWidth={1.5} />
|
|
41
|
+
<rect x={9} y={21} width={6} height={7.55245} rx={1} transform='rotate(-180 9 21)' stroke='none' strokeWidth={1.5} />
|
|
42
|
+
<rect x={21} y={21} width={9} height={7.55245} rx={1} transform='rotate(-180 21 21)' stroke='none' strokeWidth={1.5} />
|
|
43
|
+
<circle cx={17.25} cy={6.75} r={3.75} stroke='none' strokeWidth={1.5} />
|
|
44
|
+
<path d='M16.4436 7.84999L18.2561 5.85001' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
45
|
+
<path d='M18.3498 7.75623L16.3499 5.94373' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
46
|
+
</svg>
|
|
47
|
+
)
|
|
48
|
+
break
|
|
49
|
+
case 'large':
|
|
50
|
+
icon = (
|
|
51
|
+
<svg
|
|
52
|
+
width={40}
|
|
53
|
+
height={40}
|
|
54
|
+
viewBox='0 0 40 40'
|
|
55
|
+
fill='none'
|
|
56
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
57
|
+
className={className}
|
|
58
|
+
>
|
|
59
|
+
<rect x={5} y={5} width={12.5} height={12.5} rx={1} stroke='none' strokeWidth={2} />
|
|
60
|
+
<rect x={15} y={35} width={10} height={12.5874} rx={1} transform='rotate(-180 15 35)' stroke='none' strokeWidth={2} />
|
|
61
|
+
<rect x={35} y={35} width={15} height={12.5874} rx={1} transform='rotate(-180 35 35)' stroke='none' strokeWidth={2} />
|
|
62
|
+
<circle cx={28.75} cy={11.25} r={6.25} stroke='none' strokeWidth={2} />
|
|
63
|
+
<path d='M27.4062 13.0833L30.4271 9.75' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
64
|
+
<path d='M30.5833 12.927L27.25 9.9062' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
65
|
+
</svg>
|
|
66
|
+
)
|
|
67
|
+
break
|
|
68
|
+
|
|
69
|
+
case 'extra-large':
|
|
70
|
+
icon = (
|
|
71
|
+
<svg
|
|
72
|
+
width={120}
|
|
73
|
+
height={120}
|
|
74
|
+
viewBox='0 0 120 120'
|
|
75
|
+
fill='none'
|
|
76
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
77
|
+
className={className}
|
|
78
|
+
>
|
|
79
|
+
<rect x={15} y={15} width={37.5} height={37.5} rx={1} stroke='none' stroke-width={6} />
|
|
80
|
+
<rect x={45} y={105} width={30} height={37.7622} rx={1} transform='rotate(-180 45 105)' stroke='none' stroke-width={6} />
|
|
81
|
+
<rect x={105} y={105} width={45} height={37.7622} rx={1} transform='rotate(-180 105 105)' stroke='none' stroke-width={6} />
|
|
82
|
+
<circle cx={86.25} cy={33.75} r={18.75} stroke='none' stroke-width={6} />
|
|
83
|
+
<path d='M82.2188 39.2499L91.2812 29.25' stroke='none' stroke-width={6} strokeLinecap='round' strokeLinejoin='round' />
|
|
84
|
+
<path d='M91.7499 38.781L81.75 29.7185' stroke='none' stroke-width={6} strokeLinecap='round' strokeLinejoin='round' />
|
|
85
|
+
|
|
86
|
+
</svg>
|
|
87
|
+
)
|
|
88
|
+
break
|
|
89
|
+
|
|
90
|
+
default:
|
|
91
|
+
break
|
|
92
|
+
}
|
|
93
|
+
return icon
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
WorkspaceFailIcon.propTypes = {
|
|
97
|
+
/**
|
|
98
|
+
* color of text, icon and borders
|
|
99
|
+
*/
|
|
100
|
+
color: PropTypes.oneOf(['green', 'white', 'main-dark-blue', 'red']),
|
|
101
|
+
/**
|
|
102
|
+
* Size
|
|
103
|
+
*/
|
|
104
|
+
size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large'])
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
WorkspaceFailIcon.defaultProps = {
|
|
108
|
+
color: 'main-dark-blue',
|
|
109
|
+
size: 'medium'
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export default WorkspaceFailIcon
|
|
@@ -13,29 +13,50 @@ import ArrowDownIcon from './ArrowDownIcon'
|
|
|
13
13
|
import ArrowLeftIcon from './ArrowLeftIcon'
|
|
14
14
|
import ArrowRightIcon from './ArrowRightIcon'
|
|
15
15
|
import ArrowUpIcon from './ArrowUpIcon'
|
|
16
|
+
import BellIcon from './BellIcon'
|
|
17
|
+
import BillingIcon from './BillingIcon'
|
|
16
18
|
import CalendarIcon from './CalendarIcon'
|
|
17
19
|
import Calendar1DayIcon from './Calendar1DayIcon'
|
|
18
20
|
import Calendar7DaysIcon from './Calendar7DaysIcon'
|
|
19
21
|
import CircleAddIcon from './CircleAddIcon'
|
|
20
|
-
import
|
|
22
|
+
import CircleArrowLeftIcon from './CircleArrowLeftIcon'
|
|
23
|
+
import CircleArrowRightIcon from './CircleArrowRightIcon'
|
|
21
24
|
import CircleExclamationIcon from './CircleExclamationIcon'
|
|
22
25
|
import CircleCheckMarkIcon from './CircleCheckMarkIcon'
|
|
23
26
|
import CircleCloseIcon from './CircleCloseIcon'
|
|
24
27
|
import CircleCloseHoverIcon from './CircleCloseHoverIcon'
|
|
28
|
+
import CircleTwoArrowsDownIcon from './CircleTwoArrowsDownIcon'
|
|
29
|
+
import CircleTwoArrowsUpIcon from './CircleTwoArrowsUpIcon'
|
|
25
30
|
import CloseIcon from './CloseIcon'
|
|
26
31
|
import CopyPasteIcon from './CopyPasteIcon'
|
|
27
32
|
import DatabaseIcon from './DatabaseIcon'
|
|
28
33
|
import EditIcon from './EditIcon'
|
|
34
|
+
import ExploreDocIcon from './ExploreDocIcon'
|
|
35
|
+
import EnlargeIcon from './EnlargeIcon'
|
|
36
|
+
import EntryIcon from './EntryIcon'
|
|
29
37
|
import GearIcon from './GearIcon'
|
|
38
|
+
import GraphQLIcon from './GraphQLIcon'
|
|
39
|
+
import KeyIcon from './KeyIcon'
|
|
40
|
+
import LayersIcon from './LayersIcon'
|
|
41
|
+
import LensIcon from './LensIcon'
|
|
30
42
|
import LiveIcon from './LiveIcon'
|
|
43
|
+
import LogOutIcon from './LogOutIcon'
|
|
31
44
|
import MetricsIcon from './MetricsIcon'
|
|
32
45
|
import PlayIcon from './PlayIcon'
|
|
33
46
|
import PullRequestIcon from './PullRequestIcon'
|
|
47
|
+
import SendIcon from './SendIcon'
|
|
48
|
+
import SocialDiscordIcon from './SocialDiscordIcon'
|
|
49
|
+
import SocialGitHubIcon from './SocialGitHubIcon'
|
|
50
|
+
import SocialGitLabIcon from './SocialGitLabIcon'
|
|
51
|
+
import SocialLinkedInIcon from './SocialLinkedInIcon'
|
|
52
|
+
import SocialNPMIcon from './SocialNPMIcon'
|
|
53
|
+
import SocialTwitterIcon from './SocialTwitterIcon'
|
|
34
54
|
import StopIcon from './StopIcon'
|
|
35
55
|
import TerminalIcon from './TerminalIcon'
|
|
36
|
-
import
|
|
56
|
+
import TwoUsersIcon from './TwoUsersIcon'
|
|
37
57
|
import UpgradeIcon from './UpgradeIcon'
|
|
38
58
|
import WorkspaceDynamicIcon from './WorkspaceDynamicIcon'
|
|
59
|
+
import WorkspaceFailIcon from './WorkspaceFailIcon'
|
|
39
60
|
import WorkspaceReadyIcon from './WorkspaceReadyIcon'
|
|
40
61
|
import WorkspaceStaticIcon from './WorkspaceStaticIcon'
|
|
41
62
|
|
|
@@ -55,29 +76,50 @@ export default {
|
|
|
55
76
|
ArrowLeftIcon,
|
|
56
77
|
ArrowRightIcon,
|
|
57
78
|
ArrowUpIcon,
|
|
79
|
+
BellIcon,
|
|
80
|
+
BillingIcon,
|
|
58
81
|
CalendarIcon,
|
|
59
82
|
Calendar1DayIcon,
|
|
60
83
|
Calendar7DaysIcon,
|
|
61
84
|
CircleAddIcon,
|
|
62
|
-
|
|
85
|
+
CircleArrowLeftIcon,
|
|
86
|
+
CircleArrowRightIcon,
|
|
63
87
|
CircleCheckMarkIcon,
|
|
64
88
|
CircleExclamationIcon,
|
|
65
89
|
CircleCloseIcon,
|
|
66
90
|
CircleCloseHoverIcon,
|
|
91
|
+
CircleTwoArrowsDownIcon,
|
|
92
|
+
CircleTwoArrowsUpIcon,
|
|
67
93
|
CloseIcon,
|
|
68
94
|
CopyPasteIcon,
|
|
69
95
|
DatabaseIcon,
|
|
70
|
-
GearIcon,
|
|
71
96
|
EditIcon,
|
|
97
|
+
ExploreDocIcon,
|
|
98
|
+
EnlargeIcon,
|
|
99
|
+
EntryIcon,
|
|
100
|
+
GearIcon,
|
|
101
|
+
GraphQLIcon,
|
|
102
|
+
KeyIcon,
|
|
103
|
+
LayersIcon,
|
|
104
|
+
LensIcon,
|
|
72
105
|
LiveIcon,
|
|
106
|
+
LogOutIcon,
|
|
73
107
|
MetricsIcon,
|
|
74
108
|
PlayIcon,
|
|
75
109
|
PullRequestIcon,
|
|
110
|
+
SendIcon,
|
|
76
111
|
StopIcon,
|
|
112
|
+
SocialDiscordIcon,
|
|
113
|
+
SocialGitHubIcon,
|
|
114
|
+
SocialGitLabIcon,
|
|
115
|
+
SocialLinkedInIcon,
|
|
116
|
+
SocialNPMIcon,
|
|
117
|
+
SocialTwitterIcon,
|
|
77
118
|
TerminalIcon,
|
|
78
119
|
UpgradeIcon,
|
|
79
|
-
|
|
120
|
+
TwoUsersIcon,
|
|
80
121
|
WorkspaceDynamicIcon,
|
|
122
|
+
WorkspaceFailIcon,
|
|
81
123
|
WorkspaceReadyIcon,
|
|
82
124
|
WorkspaceStaticIcon
|
|
83
125
|
}
|
|
@@ -2,15 +2,47 @@ import React from 'react'
|
|
|
2
2
|
import PlatformaticIcon from '../components/PlatformaticIcon'
|
|
3
3
|
import Icons from '../components/icons'
|
|
4
4
|
|
|
5
|
+
const colors = ['green', 'white', 'red', 'main-dark-blue']
|
|
6
|
+
|
|
5
7
|
const divStyle = {
|
|
6
|
-
width: '100%'
|
|
8
|
+
width: '100%'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const row = {
|
|
7
12
|
display: 'flex',
|
|
8
|
-
|
|
13
|
+
width: '100%',
|
|
14
|
+
columnGap: '1rem',
|
|
15
|
+
alignItems: 'center'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const col = {
|
|
19
|
+
flex: 1
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const paragraph = {
|
|
23
|
+
color: 'white',
|
|
24
|
+
fontSize: '12px'
|
|
9
25
|
}
|
|
10
26
|
|
|
11
27
|
export default {
|
|
12
28
|
title: 'Platformatic/PlatformaticIcon',
|
|
13
|
-
component: PlatformaticIcon
|
|
29
|
+
component: PlatformaticIcon,
|
|
30
|
+
argTypes: {
|
|
31
|
+
color: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
control: {
|
|
34
|
+
type: 'radio',
|
|
35
|
+
options: colors
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
size: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
control: {
|
|
41
|
+
type: 'radio',
|
|
42
|
+
options: ['small', 'medium', 'large', 'extra-large']
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
14
46
|
}
|
|
15
47
|
|
|
16
48
|
const Template = (args) => <PlatformaticIcon {...args} />
|
|
@@ -22,36 +54,36 @@ PlatformaticIconDefault.args = {
|
|
|
22
54
|
|
|
23
55
|
const AllIconsTemplate = (args) => {
|
|
24
56
|
const icons = Object.values(Icons)
|
|
57
|
+
|
|
25
58
|
return (
|
|
26
59
|
<>
|
|
27
|
-
<p className='text-white'> Platformatic all icons size {args.size}</p>
|
|
28
60
|
<div style={divStyle}>
|
|
29
|
-
|
|
61
|
+
<p style={paragraph}> All Platformatic Icons: {icons.length} </p>
|
|
62
|
+
{icons.map((IconComponent, index) => (
|
|
63
|
+
<div style={row} key={index}>
|
|
64
|
+
<div style={col}>
|
|
65
|
+
<p style={paragraph}>#{index + 1}: {IconComponent.name}</p>
|
|
66
|
+
</div>
|
|
67
|
+
<div style={col}>
|
|
68
|
+
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size='small' {...args} />
|
|
69
|
+
</div>
|
|
70
|
+
<div style={col}>
|
|
71
|
+
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size='medium' {...args} />
|
|
72
|
+
</div>
|
|
73
|
+
<div style={col}>
|
|
74
|
+
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size='large' {...args} />
|
|
75
|
+
</div>
|
|
76
|
+
<div style={col}>
|
|
77
|
+
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size='extra-large' {...args} />
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
))}
|
|
30
81
|
</div>
|
|
31
82
|
</>
|
|
32
83
|
)
|
|
33
84
|
}
|
|
34
|
-
export const
|
|
35
|
-
|
|
85
|
+
export const PlatformaticIconAll = AllIconsTemplate.bind({})
|
|
86
|
+
PlatformaticIconAll.args = {
|
|
36
87
|
color: 'white',
|
|
37
|
-
size: 'small',
|
|
38
88
|
onClick: null
|
|
39
89
|
}
|
|
40
|
-
|
|
41
|
-
export const PlatformaticIconNormal = AllIconsTemplate.bind({})
|
|
42
|
-
PlatformaticIconNormal.args = {
|
|
43
|
-
color: 'white',
|
|
44
|
-
size: 'medium'
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export const PlatformaticIconLarge = AllIconsTemplate.bind({})
|
|
48
|
-
PlatformaticIconLarge.args = {
|
|
49
|
-
color: 'green',
|
|
50
|
-
size: 'large'
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export const PlatformaticIconExtraLarge = AllIconsTemplate.bind({})
|
|
54
|
-
PlatformaticIconExtraLarge.args = {
|
|
55
|
-
color: 'green',
|
|
56
|
-
size: 'extra-large'
|
|
57
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import * as React from 'react'
|
|
2
|
-
import styles from './Icons.module.css'
|
|
3
|
-
|
|
4
|
-
const CircleBackIcon = ({ color = 'green', size = 'normal' }) => {
|
|
5
|
-
const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
|
|
6
|
-
let icon = (
|
|
7
|
-
<svg
|
|
8
|
-
width={26}
|
|
9
|
-
height={26}
|
|
10
|
-
viewBox='0 0 26 26'
|
|
11
|
-
fill='none'
|
|
12
|
-
xmlns='http://www.w3.org/2000/svg'
|
|
13
|
-
className={className}
|
|
14
|
-
>
|
|
15
|
-
<circle cx={13} cy={13} r={12} fill='none' stroke='none' />
|
|
16
|
-
<path
|
|
17
|
-
d='M14.5 7L8.5 13L14.5 19'
|
|
18
|
-
stroke='none'
|
|
19
|
-
strokeLinecap='round'
|
|
20
|
-
strokeLinejoin='round'
|
|
21
|
-
/>
|
|
22
|
-
</svg>
|
|
23
|
-
)
|
|
24
|
-
switch (size) {
|
|
25
|
-
case 'small':
|
|
26
|
-
icon = (
|
|
27
|
-
<svg
|
|
28
|
-
width={18}
|
|
29
|
-
height={18}
|
|
30
|
-
viewBox='0 0 18 18'
|
|
31
|
-
fill='none'
|
|
32
|
-
xmlns='http://www.w3.org/2000/svg'
|
|
33
|
-
className={className}
|
|
34
|
-
>
|
|
35
|
-
<circle cx={9} cy={9} r={8} stroke='none' />
|
|
36
|
-
<path
|
|
37
|
-
d='M10 5L6 9L10 13'
|
|
38
|
-
stroke='none'
|
|
39
|
-
strokeLinecap='round'
|
|
40
|
-
strokeLinejoin='round'
|
|
41
|
-
/>
|
|
42
|
-
</svg>
|
|
43
|
-
)
|
|
44
|
-
break
|
|
45
|
-
default:
|
|
46
|
-
break
|
|
47
|
-
}
|
|
48
|
-
return icon
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export default CircleBackIcon
|