@platformatic/ui-components 0.7.1 → 0.7.3

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.
@@ -0,0 +1,102 @@
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 ScalerHistoryIcon = ({
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
+ ><path d='M7.99996 7L5.21537 8.60769V11.8231L7.99996 13.4307L10.7846 11.8231V8.60769L7.99996 7Z' stroke='none' strokeLinejoin='round' />
32
+ <path d='M11.2154 7L14 8.60769V11.8231L11.2154 13.4307' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
33
+ <path d='M10 6.8V3C10 2.44772 9.55228 2 9 2H3C2.44772 2 2 2.44771 2 3V10.6C2 11.1523 2.44772 11.6 3 11.6H4' stroke='none' strokeLinecap='round' />
34
+ <path d='M4 4H8.44444' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
35
+ <path d='M4 6H7' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
36
+ <path d='M4 9H5' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
37
+ </svg>
38
+ )
39
+ break
40
+ case MEDIUM:
41
+ icon = (
42
+ <svg
43
+ width={24}
44
+ height={24}
45
+ viewBox='0 0 24 24'
46
+ fill='none'
47
+ xmlns='http://www.w3.org/2000/svg'
48
+ className={className}
49
+ ><path d='M11.9999 10.5L7.82305 12.9115V17.7346L11.9999 20.1461L16.1768 17.7346V12.9115L11.9999 10.5Z' stroke='none' strokeWidth={1.5} strokeLinejoin='round' />
50
+ <path d='M16.8231 10.5L21 12.9115V17.7346L16.8231 20.1461' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
51
+ <path d='M15 10.2V4C15 3.44772 14.5523 3 14 3H4C3.44772 3 3 3.44772 3 4V16.4C3 16.9523 3.44772 17.4 4 17.4H6' stroke='none' strokeWidth={1.5} strokeLinecap='round' />
52
+ <path d='M6 6H12.6667' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
53
+ <path d='M6 9H10.5' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
54
+ <path d='M6 13.5H7.5' stroke='none' strokeWidth={1.5} strokeLinecap='round' strokeLinejoin='round' />
55
+ </svg>
56
+ )
57
+ break
58
+ case LARGE:
59
+ icon = (
60
+ <svg
61
+ width={40}
62
+ height={40}
63
+ viewBox='0 0 40 40'
64
+ fill='none'
65
+ xmlns='http://www.w3.org/2000/svg'
66
+ className={className}
67
+ ><path d='M20.0001 17.5L13.0387 21.5192V29.5576L20.0001 33.5769L26.9616 29.5576V21.5192L20.0001 17.5Z' stroke='none' strokeWidth={2} strokeLinejoin='round' />
68
+ <path d='M28.0388 17.5L35.0002 21.5192V29.5576L28.0388 33.5769' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
69
+ <path d='M25 17V6C25 5.44772 24.5523 5 24 5H6C5.44772 5 5 5.44772 5 6V28C5 28.5523 5.44772 29 6 29H10' stroke='none' strokeWidth={2} strokeLinecap='round' />
70
+ <path d='M10 10H21.1111' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
71
+ <path d='M10 15H17.5' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
72
+ <path d='M10 22.5H12.5' stroke='none' strokeWidth={2} strokeLinecap='round' strokeLinejoin='round' />
73
+ </svg>
74
+ )
75
+ break
76
+
77
+ default:
78
+ break
79
+ }
80
+ return icon
81
+ }
82
+
83
+ ScalerHistoryIcon.propTypes = {
84
+ /**
85
+ * color of text, icon and borders
86
+ */
87
+ color: PropTypes.oneOf(COLORS_ICON),
88
+ /**
89
+ * Size
90
+ */
91
+ size: PropTypes.oneOf(SIZES),
92
+ /**
93
+ * disabled
94
+ */
95
+ disabled: PropTypes.bool,
96
+ /**
97
+ * inactive
98
+ */
99
+ inactive: PropTypes.bool
100
+ }
101
+
102
+ export default ScalerHistoryIcon
@@ -171,6 +171,11 @@ import ZoomInIcon from './ZoomInIcon'
171
171
  import ZoomOutIcon from './ZoomOutIcon'
172
172
  import SortUpArrowAndBarIcon from './SortUpArrowAndBarIcon'
173
173
  import SortDownArrowAndBarIcon from './SortDownArrowAndBarIcon'
174
+ import HorizontalPodAutoscalerIcon from './HorizontalPodAutoscalerIcon'
175
+ import PodMetricsIcon from './PodMetricsIcon'
176
+ import PodPerformanceIcon from './PodPerformanceIcon'
177
+ import ScalerDetailsIcon from './ScalerDetailsIcon'
178
+ import ScalerHistoryIcon from './ScalerHistoryIcon'
174
179
 
175
180
  export default {
176
181
  AddIcon,
@@ -263,6 +268,7 @@ export default {
263
268
  GitHubRepo2Icon,
264
269
  GraphQLIcon,
265
270
  GraphQLEditsIcon,
271
+ HorizontalPodAutoscalerIcon,
266
272
  ImportAppIcon,
267
273
  InfrastructureIcon,
268
274
  InternetIcon,
@@ -295,6 +301,8 @@ export default {
295
301
  PlatformaticRuntimeIcon,
296
302
  PlatformaticServiceIcon,
297
303
  PlayIcon,
304
+ PodPerformanceIcon,
305
+ PodMetricsIcon,
298
306
  PreviewPRIcon,
299
307
  PullRequestIcon,
300
308
  PullRequestLoadingIcon,
@@ -304,6 +312,8 @@ export default {
304
312
  RestartIcon,
305
313
  RocketIcon,
306
314
  RunningIcon,
315
+ ScalerDetailsIcon,
316
+ ScalerHistoryIcon,
307
317
  SendIcon,
308
318
  ServiceIcon,
309
319
  ServicesWorkingIcon,