@platformatic/ui-components 0.7.3 → 0.7.4
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/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
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-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-D1klFHIw.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-BUMVjZ-U.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/package.json
CHANGED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import styles from './Icons.module.css'
|
|
4
|
+
import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, MAIN_DARK_BLUE } from '../constants'
|
|
5
|
+
|
|
6
|
+
const DocumentIcon = ({
|
|
7
|
+
color = MAIN_DARK_BLUE,
|
|
8
|
+
size = MEDIUM,
|
|
9
|
+
disabled = false,
|
|
10
|
+
inactive = false
|
|
11
|
+
}) => {
|
|
12
|
+
let className = `${styles.svgClassName} ` + styles[`${color}`]
|
|
13
|
+
if (disabled) {
|
|
14
|
+
className += ` ${styles.iconDisabled}`
|
|
15
|
+
}
|
|
16
|
+
if (inactive) {
|
|
17
|
+
className += ` ${styles.iconInactive}`
|
|
18
|
+
}
|
|
19
|
+
let icon = <></>
|
|
20
|
+
|
|
21
|
+
switch (size) {
|
|
22
|
+
case SMALL:
|
|
23
|
+
icon = (
|
|
24
|
+
<svg
|
|
25
|
+
width={16}
|
|
26
|
+
height={16}
|
|
27
|
+
viewBox='0 0 16 16'
|
|
28
|
+
fill='none'
|
|
29
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
30
|
+
className={className}
|
|
31
|
+
>
|
|
32
|
+
<rect x='3' y='2' width='10' height='12' rx='1' stroke='none' />
|
|
33
|
+
<path d='M5.08325 5.33325H10.6388' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
34
|
+
<path d='M5.08325 8H10.6388' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
35
|
+
<path d='M5.08325 10.6667H10.6388' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
36
|
+
</svg>
|
|
37
|
+
)
|
|
38
|
+
break
|
|
39
|
+
case MEDIUM:
|
|
40
|
+
icon = (
|
|
41
|
+
<svg
|
|
42
|
+
width={24}
|
|
43
|
+
height={24}
|
|
44
|
+
viewBox='0 0 24 24'
|
|
45
|
+
fill='none'
|
|
46
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
47
|
+
className={className}
|
|
48
|
+
>
|
|
49
|
+
<rect x='4.5' y='3' width='15' height='18' rx='1' stroke='none' strokeWidth={1.5} />
|
|
50
|
+
<path d='M7.625 8H15.9583' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
51
|
+
<path d='M7.625 12H15.9583' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
52
|
+
<path d='M7.625 16H15.9583' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
53
|
+
</svg>
|
|
54
|
+
)
|
|
55
|
+
break
|
|
56
|
+
case LARGE:
|
|
57
|
+
icon = (
|
|
58
|
+
<svg
|
|
59
|
+
width={40}
|
|
60
|
+
height={40}
|
|
61
|
+
viewBox='0 0 40 40'
|
|
62
|
+
fill='none'
|
|
63
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
64
|
+
className={className}
|
|
65
|
+
>
|
|
66
|
+
<rect x='7.5' y='5' width='25' height='30' rx='1' stroke='none' strokeWidth={2} />
|
|
67
|
+
<path d='M12.7083 13.3333H26.5971' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
68
|
+
<path d='M12.7083 20H26.5971' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
69
|
+
<path d='M12.7083 26.6667H26.5971' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
70
|
+
</svg>
|
|
71
|
+
)
|
|
72
|
+
break
|
|
73
|
+
|
|
74
|
+
default:
|
|
75
|
+
break
|
|
76
|
+
}
|
|
77
|
+
return icon
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
DocumentIcon.propTypes = {
|
|
81
|
+
/**
|
|
82
|
+
* color of text, icon and borders
|
|
83
|
+
*/
|
|
84
|
+
color: PropTypes.oneOf(COLORS_ICON),
|
|
85
|
+
/**
|
|
86
|
+
* Size
|
|
87
|
+
*/
|
|
88
|
+
size: PropTypes.oneOf(SIZES),
|
|
89
|
+
/**
|
|
90
|
+
* disabled
|
|
91
|
+
*/
|
|
92
|
+
disabled: PropTypes.bool,
|
|
93
|
+
/**
|
|
94
|
+
* inactive
|
|
95
|
+
*/
|
|
96
|
+
inactive: PropTypes.bool
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export default DocumentIcon
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import styles from './Icons.module.css'
|
|
4
|
+
import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, MAIN_DARK_BLUE } from '../constants'
|
|
5
|
+
|
|
6
|
+
const RequestsIcon = ({
|
|
7
|
+
color = MAIN_DARK_BLUE,
|
|
8
|
+
size = MEDIUM,
|
|
9
|
+
disabled = false,
|
|
10
|
+
inactive = false
|
|
11
|
+
}) => {
|
|
12
|
+
let className = `${styles.svgClassName} ` + styles[`${color}`]
|
|
13
|
+
if (disabled) {
|
|
14
|
+
className += ` ${styles.iconDisabled}`
|
|
15
|
+
}
|
|
16
|
+
if (inactive) {
|
|
17
|
+
className += ` ${styles.iconInactive}`
|
|
18
|
+
}
|
|
19
|
+
let icon = <></>
|
|
20
|
+
const filledClassName = styles[`filled-${color}`]
|
|
21
|
+
|
|
22
|
+
switch (size) {
|
|
23
|
+
case SMALL:
|
|
24
|
+
icon = (
|
|
25
|
+
<svg
|
|
26
|
+
width={16}
|
|
27
|
+
height={16}
|
|
28
|
+
viewBox='0 0 16 16'
|
|
29
|
+
fill='none'
|
|
30
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
31
|
+
className={className}
|
|
32
|
+
>
|
|
33
|
+
<rect x='2' y='2' width='12' height='12' rx='1' stroke='none' />
|
|
34
|
+
<path d='M14 5.5C14.2761 5.5 14.5 5.27614 14.5 5C14.5 4.72386 14.2761 4.5 14 4.5V5.5ZM2 5.5H14V4.5H2V5.5Z' fill='none' className={filledClassName} />
|
|
35
|
+
<circle cx='3.5' cy='3.5' r='0.5' fill='none' className={filledClassName} />
|
|
36
|
+
<circle cx='5' cy='3.5' r='0.5' fill='none' className={filledClassName} />
|
|
37
|
+
<circle cx='6.5' cy='3.5' r='0.5' fill='none' className={filledClassName} />
|
|
38
|
+
<path d='M6.5 12V7M6.5 7L5 8M6.5 7L8 8' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
39
|
+
<path d='M9.5 7L9.5 12M9.5 12L11 11M9.5 12L8 11' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
|
|
40
|
+
</svg>
|
|
41
|
+
)
|
|
42
|
+
break
|
|
43
|
+
case MEDIUM:
|
|
44
|
+
icon = (
|
|
45
|
+
<svg
|
|
46
|
+
width={24}
|
|
47
|
+
height={24}
|
|
48
|
+
viewBox='0 0 24 24'
|
|
49
|
+
fill='none'
|
|
50
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
51
|
+
className={className}
|
|
52
|
+
>
|
|
53
|
+
<rect x='3' y='3' width='18' height='18' rx='1' stroke='none' strokeWidth={1.5} />
|
|
54
|
+
<path d='M21 8.25C21.4142 8.25 21.75 7.91421 21.75 7.5C21.75 7.08579 21.4142 6.75 21 6.75V8.25ZM3 8.25H21V6.75H3V8.25Z' fill='none' className={filledClassName} />
|
|
55
|
+
<circle cx='5.25' cy='5.25' r='0.75' fill='none' className={filledClassName} />
|
|
56
|
+
<circle cx='7.5' cy='5.25' r='0.75' fill='none' className={filledClassName} />
|
|
57
|
+
<circle cx='9.75' cy='5.25' r='0.75' fill='none' className={filledClassName} />
|
|
58
|
+
<path d='M9.75 18V10.5M9.75 10.5L7.5 12M9.75 10.5L12 12' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
59
|
+
<path d='M14.25 10.5L14.25 18M14.25 18L16.5 16.5M14.25 18L12 16.5' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
|
|
60
|
+
</svg>
|
|
61
|
+
)
|
|
62
|
+
break
|
|
63
|
+
case LARGE:
|
|
64
|
+
icon = (
|
|
65
|
+
<svg
|
|
66
|
+
width={40}
|
|
67
|
+
height={40}
|
|
68
|
+
viewBox='0 0 40 40'
|
|
69
|
+
fill='none'
|
|
70
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
71
|
+
className={className}
|
|
72
|
+
>
|
|
73
|
+
<rect x='5' y='5' width='30' height='30' rx='1' stroke='none' strokeWidth={2} />
|
|
74
|
+
<path d='M35 13.5C35.5523 13.5 36 13.0523 36 12.5C36 11.9477 35.5523 11.5 35 11.5V13.5ZM5 13.5H35V11.5H5V13.5Z' fill='none' className={filledClassName} />
|
|
75
|
+
<circle cx='8.75' cy='8.75' r='1.25' fill='none' className={filledClassName} />
|
|
76
|
+
<circle cx='12.5' cy='8.75' r='1.25' fill='none' className={filledClassName} />
|
|
77
|
+
<circle cx='16.25' cy='8.75' r='1.25' fill='none' className={filledClassName} />
|
|
78
|
+
<path d='M16.25 30V17.5M16.25 17.5L12.5 20M16.25 17.5L20 20' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
79
|
+
<path d='M23.75 17.5L23.75 30M23.75 30L27.5 27.5M23.75 30L20 27.5' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
|
|
80
|
+
</svg>
|
|
81
|
+
)
|
|
82
|
+
break
|
|
83
|
+
|
|
84
|
+
default:
|
|
85
|
+
break
|
|
86
|
+
}
|
|
87
|
+
return icon
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
RequestsIcon.propTypes = {
|
|
91
|
+
/**
|
|
92
|
+
* color of text, icon and borders
|
|
93
|
+
*/
|
|
94
|
+
color: PropTypes.oneOf(COLORS_ICON),
|
|
95
|
+
/**
|
|
96
|
+
* Size
|
|
97
|
+
*/
|
|
98
|
+
size: PropTypes.oneOf(SIZES),
|
|
99
|
+
/**
|
|
100
|
+
* disabled
|
|
101
|
+
*/
|
|
102
|
+
disabled: PropTypes.bool,
|
|
103
|
+
/**
|
|
104
|
+
* inactive
|
|
105
|
+
*/
|
|
106
|
+
inactive: PropTypes.bool
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export default RequestsIcon
|
|
@@ -124,6 +124,7 @@ import PreviewPRIcon from './PreviewPRIcon'
|
|
|
124
124
|
import PullRequestIcon from './PullRequestIcon'
|
|
125
125
|
import PullRequestLoadingIcon from './PullRequestLoadingIcon'
|
|
126
126
|
import RequestOwnershipIcon from './RequestOwnershipIcon'
|
|
127
|
+
import RequestsIcon from './RequestsIcon'
|
|
127
128
|
import RecentAppsIcon from './RecentAppsIcon'
|
|
128
129
|
import ResourceIcon from './ResourceIcon'
|
|
129
130
|
import RestartIcon from './RestartIcon'
|
|
@@ -176,6 +177,7 @@ import PodMetricsIcon from './PodMetricsIcon'
|
|
|
176
177
|
import PodPerformanceIcon from './PodPerformanceIcon'
|
|
177
178
|
import ScalerDetailsIcon from './ScalerDetailsIcon'
|
|
178
179
|
import ScalerHistoryIcon from './ScalerHistoryIcon'
|
|
180
|
+
import DocumentIcon from './DocumentIcon'
|
|
179
181
|
|
|
180
182
|
export default {
|
|
181
183
|
AddIcon,
|
|
@@ -249,6 +251,7 @@ export default {
|
|
|
249
251
|
DepencenciesReloadIcon,
|
|
250
252
|
DeploymentHistoryIcon,
|
|
251
253
|
DownloadIcon,
|
|
254
|
+
DocumentIcon,
|
|
252
255
|
EditDocumentIcon,
|
|
253
256
|
EditIcon,
|
|
254
257
|
EntrypointIcon,
|
|
@@ -307,6 +310,7 @@ export default {
|
|
|
307
310
|
PullRequestIcon,
|
|
308
311
|
PullRequestLoadingIcon,
|
|
309
312
|
RequestOwnershipIcon,
|
|
313
|
+
RequestsIcon,
|
|
310
314
|
RecentAppsIcon,
|
|
311
315
|
ResourceIcon,
|
|
312
316
|
RestartIcon,
|