@platformatic/ui-components 0.15.5 → 0.17.1

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.
Files changed (288) hide show
  1. package/dist/assets/index-BeInQDZN.js +49 -0
  2. package/dist/assets/{index-DMinbJlj.css → index-DE70C3KG.css} +1 -1
  3. package/dist/index.html +2 -2
  4. package/dist/main.css +60 -4
  5. package/package.json +2 -1
  6. package/src/components/ArcMetric.jsx +145 -0
  7. package/src/components/ArcMetric.module.css +31 -0
  8. package/src/components/BorderedBox.jsx +1 -37
  9. package/src/components/Button.jsx +0 -72
  10. package/src/components/ButtonFullRounded.jsx +1 -57
  11. package/src/components/ButtonOnlyIcon.jsx +1 -57
  12. package/src/components/Checkbox.jsx +1 -17
  13. package/src/components/CopyAndPaste.jsx +1 -41
  14. package/src/components/DropDown.jsx +2 -53
  15. package/src/components/FollowUs.jsx +1 -36
  16. package/src/components/HorizontalSeparator.jsx +2 -21
  17. package/src/components/InfoBox.jsx +1 -32
  18. package/src/components/ListElement.jsx +1 -32
  19. package/src/components/LoadingSpinner.jsx +0 -8
  20. package/src/components/LoadingSpinnerV2.jsx +0 -25
  21. package/src/components/LogoDropDown.jsx +0 -28
  22. package/src/components/MetricInfoBox.jsx +80 -0
  23. package/src/components/MetricInfoBox.module.css +42 -0
  24. package/src/components/Modal.jsx +0 -59
  25. package/src/components/ModalDirectional.jsx +0 -28
  26. package/src/components/ModalStepsForward.jsx +1 -21
  27. package/src/components/PlatformaticIcon.jsx +1 -41
  28. package/src/components/SearchBarV2.jsx +1 -45
  29. package/src/components/Sidebar.jsx +0 -53
  30. package/src/components/Status.jsx +1 -18
  31. package/src/components/TabbedWindow.jsx +1 -33
  32. package/src/components/Tag.jsx +1 -44
  33. package/src/components/TextWithLabel.jsx +1 -25
  34. package/src/components/Tooltip.jsx +3 -47
  35. package/src/components/TooltipAbsolute.jsx +1 -41
  36. package/src/components/TrendLine.jsx +146 -0
  37. package/src/components/VerticalSeparator.jsx +1 -22
  38. package/src/components/forms/Field.jsx +1 -37
  39. package/src/components/forms/Input.jsx +1 -85
  40. package/src/components/forms/InputFileUpload.jsx +1 -101
  41. package/src/components/forms/InputWithSeparator.jsx +1 -74
  42. package/src/components/forms/Password.jsx +3 -43
  43. package/src/components/forms/Preview.jsx +1 -51
  44. package/src/components/forms/RadioGroup.jsx +0 -35
  45. package/src/components/forms/Select.jsx +1 -110
  46. package/src/components/forms/SelectWithInput.jsx +1 -111
  47. package/src/components/forms/TextArea.jsx +1 -53
  48. package/src/components/forms/ToggleSwitch.jsx +1 -42
  49. package/src/components/icons/APIDocsIcon.jsx +1 -21
  50. package/src/components/icons/APIKeyIcon.jsx +1 -21
  51. package/src/components/icons/AWSIcon.jsx +1 -21
  52. package/src/components/icons/AddEnvVariableIcon.jsx +1 -17
  53. package/src/components/icons/AddIcon.jsx +1 -21
  54. package/src/components/icons/AddRouteIcon.jsx +1 -17
  55. package/src/components/icons/AddUserIcon.jsx +1 -21
  56. package/src/components/icons/AlertIcon.jsx +1 -21
  57. package/src/components/icons/AllAppsIcon.jsx +1 -21
  58. package/src/components/icons/AllInOneIcon.jsx +1 -21
  59. package/src/components/icons/ApiCloudIcon.jsx +1 -21
  60. package/src/components/icons/ApiEmptyIcon.jsx +1 -21
  61. package/src/components/icons/ApiIcon.jsx +1 -21
  62. package/src/components/icons/ApiIconClosed.jsx +1 -17
  63. package/src/components/icons/ApiPerformanceIcon.jsx +1 -21
  64. package/src/components/icons/AppConfigurationIcon.jsx +1 -21
  65. package/src/components/icons/AppDetailsIcon.jsx +1 -21
  66. package/src/components/icons/AppEditIcon.jsx +1 -21
  67. package/src/components/icons/AppEmptyIcon.jsx +1 -21
  68. package/src/components/icons/AppIcon.jsx +1 -21
  69. package/src/components/icons/AppListIcon.jsx +1 -21
  70. package/src/components/icons/AppMissingIcon.jsx +1 -21
  71. package/src/components/icons/AppOptimizedIcon.jsx +1 -21
  72. package/src/components/icons/AppSettingsIcon.jsx +1 -21
  73. package/src/components/icons/AppStoppedIcon.jsx +1 -21
  74. package/src/components/icons/AppWorkspace.jsx +1 -13
  75. package/src/components/icons/ApplicationTypeIcon.jsx +1 -21
  76. package/src/components/icons/ArrowDownFullIcon.jsx +1 -21
  77. package/src/components/icons/ArrowDownIcon.jsx +1 -21
  78. package/src/components/icons/ArrowLeftIcon.jsx +1 -21
  79. package/src/components/icons/ArrowLongDownIcon.jsx +1 -21
  80. package/src/components/icons/ArrowLongLeftIcon.jsx +1 -21
  81. package/src/components/icons/ArrowLongRightIcon.jsx +1 -21
  82. package/src/components/icons/ArrowLongUpIcon.jsx +1 -21
  83. package/src/components/icons/ArrowRightIcon.jsx +1 -21
  84. package/src/components/icons/ArrowUpIcon.jsx +1 -21
  85. package/src/components/icons/BellIcon.jsx +1 -21
  86. package/src/components/icons/BillingIcon.jsx +1 -21
  87. package/src/components/icons/BranchIcon.jsx +1 -21
  88. package/src/components/icons/BuiltInLoggingIcon.jsx +1 -21
  89. package/src/components/icons/CLIIcon.jsx +1 -21
  90. package/src/components/icons/CacheRecommendationIcon.jsx +1 -21
  91. package/src/components/icons/CachingIcon.jsx +1 -21
  92. package/src/components/icons/Calendar1DayIcon.jsx +1 -21
  93. package/src/components/icons/Calendar7DaysIcon.jsx +1 -21
  94. package/src/components/icons/CalendarIcon.jsx +1 -21
  95. package/src/components/icons/CheckListIcon.jsx +1 -21
  96. package/src/components/icons/CheckListReviewIcon.jsx +1 -21
  97. package/src/components/icons/CircleAddIcon.jsx +1 -21
  98. package/src/components/icons/CircleArrowLeftIcon.jsx +2 -22
  99. package/src/components/icons/CircleArrowRightIcon.jsx +1 -21
  100. package/src/components/icons/CircleCheckMarkButtonIcon.jsx +1 -13
  101. package/src/components/icons/CircleCheckMarkFullIcon.jsx +1 -21
  102. package/src/components/icons/CircleCheckMarkIcon.jsx +1 -21
  103. package/src/components/icons/CircleCloseHoverIcon.jsx +1 -21
  104. package/src/components/icons/CircleCloseIcon.jsx +1 -21
  105. package/src/components/icons/CircleCopyPasteIcon.jsx +1 -21
  106. package/src/components/icons/CircleDownloadIcon.jsx +1 -21
  107. package/src/components/icons/CircleEditIcon.jsx +1 -21
  108. package/src/components/icons/CircleExclamationIcon.jsx +1 -17
  109. package/src/components/icons/CircleFullIcon.jsx +1 -21
  110. package/src/components/icons/CircleGearIcon.jsx +1 -21
  111. package/src/components/icons/CirclePlayIcon.jsx +1 -21
  112. package/src/components/icons/CircleRestartIcon.jsx +1 -21
  113. package/src/components/icons/CircleStopIcon.jsx +1 -21
  114. package/src/components/icons/CircleSubtractIcon.jsx +1 -21
  115. package/src/components/icons/CircleTwoArrowsDownIcon.jsx +1 -21
  116. package/src/components/icons/CircleTwoArrowsUpIcon.jsx +1 -21
  117. package/src/components/icons/CloseIcon.jsx +1 -21
  118. package/src/components/icons/CloudIcon.jsx +1 -21
  119. package/src/components/icons/CodeTestingIcon.jsx +1 -21
  120. package/src/components/icons/CollapseIcon.jsx +1 -21
  121. package/src/components/icons/CollapseSquareIcon.jsx +1 -21
  122. package/src/components/icons/ComputerIcon.jsx +1 -21
  123. package/src/components/icons/ComputerInIcon.jsx +1 -21
  124. package/src/components/icons/ComputerOutIcon.jsx +1 -21
  125. package/src/components/icons/ConfigureDatabaseIcon.jsx +1 -21
  126. package/src/components/icons/CopyPasteIcon.jsx +1 -21
  127. package/src/components/icons/CreateAppIcon.jsx +1 -21
  128. package/src/components/icons/CreatingAppIcon.jsx +1 -21
  129. package/src/components/icons/CreditCardIcon.jsx +1 -21
  130. package/src/components/icons/DatabaseEditIcon.jsx +1 -21
  131. package/src/components/icons/DatabaseIcon.jsx +1 -21
  132. package/src/components/icons/DatabaseMigrationIcon.jsx +1 -21
  133. package/src/components/icons/DepencenciesReloadIcon.jsx +1 -21
  134. package/src/components/icons/DeploymentHistoryIcon.jsx +1 -21
  135. package/src/components/icons/DocumentIcon.jsx +1 -21
  136. package/src/components/icons/DownloadIcon.jsx +1 -21
  137. package/src/components/icons/EditDocumentIcon.jsx +1 -21
  138. package/src/components/icons/EditIcon.jsx +1 -21
  139. package/src/components/icons/EnlargeIcon.jsx +1 -21
  140. package/src/components/icons/EntryIcon.jsx +1 -21
  141. package/src/components/icons/EntrypointIcon.jsx +1 -25
  142. package/src/components/icons/EnvVariableszIcon.jsx +1 -21
  143. package/src/components/icons/ExpandIcon.jsx +1 -25
  144. package/src/components/icons/ExpandSquadreIcon.jsx +1 -21
  145. package/src/components/icons/ExploreDocIcon.jsx +1 -21
  146. package/src/components/icons/ExportIcon.jsx +1 -21
  147. package/src/components/icons/EyeClosedIcon.jsx +1 -21
  148. package/src/components/icons/EyeOpenedIcon.jsx +1 -21
  149. package/src/components/icons/FailureRateIcon.jsx +1 -21
  150. package/src/components/icons/FolderIcon.jsx +1 -21
  151. package/src/components/icons/FoldersIcon.jsx +1 -21
  152. package/src/components/icons/GearIcon.jsx +1 -21
  153. package/src/components/icons/GenerationLoadingIcon.jsx +1 -21
  154. package/src/components/icons/GitHubRepo2Icon.jsx +1 -21
  155. package/src/components/icons/GitHubRepoIcon.jsx +1 -21
  156. package/src/components/icons/GiveOwnershipIcon.jsx +2 -22
  157. package/src/components/icons/GraphQLEditsIcon.jsx +1 -21
  158. package/src/components/icons/GraphQLIcon.jsx +1 -21
  159. package/src/components/icons/HorizontalPodAutoscalerIcon.jsx +1 -21
  160. package/src/components/icons/HourglassIcon.jsx +1 -21
  161. package/src/components/icons/ImportAppIcon.jsx +1 -21
  162. package/src/components/icons/ImportIcon.jsx +1 -21
  163. package/src/components/icons/InfoCircleIcon.jsx +1 -21
  164. package/src/components/icons/InfrastructureIcon.jsx +1 -21
  165. package/src/components/icons/IngressControllIcon.jsx +1 -21
  166. package/src/components/icons/InternalLinkIcon.jsx +1 -25
  167. package/src/components/icons/InternetIcon.jsx +1 -25
  168. package/src/components/icons/K8SIcon.jsx +1 -21
  169. package/src/components/icons/K8SMetricsIcon.jsx +4 -24
  170. package/src/components/icons/KeyIcon.jsx +1 -21
  171. package/src/components/icons/LabelIcon.jsx +1 -21
  172. package/src/components/icons/LayersIcon.jsx +1 -21
  173. package/src/components/icons/LensIcon.jsx +1 -21
  174. package/src/components/icons/LiveIcon.jsx +1 -21
  175. package/src/components/icons/LoadingAppIcon.jsx +1 -21
  176. package/src/components/icons/LogOutIcon.jsx +1 -17
  177. package/src/components/icons/LogsRiskIcon.jsx +1 -21
  178. package/src/components/icons/MailIcon.jsx +1 -21
  179. package/src/components/icons/MetricsIcon.jsx +1 -21
  180. package/src/components/icons/MetricsLoadingIcon.jsx +1 -21
  181. package/src/components/icons/MetricsLogsIcon.jsx +1 -21
  182. package/src/components/icons/MissingTemplateIcon.jsx +1 -21
  183. package/src/components/icons/NameAppIcon.jsx +1 -21
  184. package/src/components/icons/NextJSIcon.jsx +1 -25
  185. package/src/components/icons/NoActivitiesIcon.jsx +1 -21
  186. package/src/components/icons/NoDeploymentsIcon.jsx +1 -21
  187. package/src/components/icons/NoMetricsIcon.jsx +1 -21
  188. package/src/components/icons/NoResultsIcon.jsx +1 -21
  189. package/src/components/icons/NodeJSIcon.jsx +1 -21
  190. package/src/components/icons/NodeJSMetricsIcon.jsx +1 -21
  191. package/src/components/icons/NotCompliantServiceIcon.jsx +1 -25
  192. package/src/components/icons/OpenAPIEditsIcon.jsx +1 -21
  193. package/src/components/icons/OrganizationIcon.jsx +1 -21
  194. package/src/components/icons/OtherLogosGoogleIcon.jsx +1 -21
  195. package/src/components/icons/OutOfBoxGraphQLIcon.jsx +1 -21
  196. package/src/components/icons/OutdatedServiceIcon.jsx +1 -25
  197. package/src/components/icons/PlatformaticComposerIcon.jsx +1 -21
  198. package/src/components/icons/PlatformaticDBIcon.jsx +1 -21
  199. package/src/components/icons/PlatformaticRuntimeIcon.jsx +1 -21
  200. package/src/components/icons/PlatformaticServiceIcon.jsx +1 -21
  201. package/src/components/icons/PlayIcon.jsx +1 -21
  202. package/src/components/icons/PodDetailsIcon.jsx +1 -21
  203. package/src/components/icons/PodLogsIcon.jsx +1 -21
  204. package/src/components/icons/PodMetricsIcon.jsx +1 -21
  205. package/src/components/icons/PodPerformanceIcon.jsx +1 -21
  206. package/src/components/icons/PodServicesIcon.jsx +1 -21
  207. package/src/components/icons/PodSettingsIcon.jsx +1 -21
  208. package/src/components/icons/PodhealthIcon.jsx +1 -21
  209. package/src/components/icons/PreviewPRIcon.jsx +1 -21
  210. package/src/components/icons/PullRequestIcon.jsx +1 -21
  211. package/src/components/icons/PullRequestLoadingIcon.jsx +1 -21
  212. package/src/components/icons/RecentAppsIcon.jsx +1 -21
  213. package/src/components/icons/RemoveAppIcon.jsx +1 -21
  214. package/src/components/icons/RemoveIcon.jsx +1 -21
  215. package/src/components/icons/RequestOwnershipIcon.jsx +1 -21
  216. package/src/components/icons/RequestsIcon.jsx +1 -21
  217. package/src/components/icons/ResourceIcon.jsx +1 -21
  218. package/src/components/icons/RestartIcon.jsx +1 -21
  219. package/src/components/icons/RocketIcon.jsx +1 -21
  220. package/src/components/icons/RouteEditIcon.jsx +1 -21
  221. package/src/components/icons/RouteHistoryIcon.jsx +1 -21
  222. package/src/components/icons/RoutingIcon.jsx +1 -21
  223. package/src/components/icons/RunningAppIcon.jsx +1 -21
  224. package/src/components/icons/RunningIcon.jsx +1 -21
  225. package/src/components/icons/ScalerDetailsIcon.jsx +1 -21
  226. package/src/components/icons/ScalerHistoryIcon.jsx +1 -21
  227. package/src/components/icons/ScheduledJobSettingsIcon.jsx +1 -21
  228. package/src/components/icons/ScheduledJobsAppIcon.jsx +1 -21
  229. package/src/components/icons/ScheduledJobsCreateIcon.jsx +1 -21
  230. package/src/components/icons/ScheduledJobsDetailIcon.jsx +1 -21
  231. package/src/components/icons/ScheduledJobsIcon.jsx +1 -21
  232. package/src/components/icons/ScheduledJobsSuspendIcon.jsx +1 -21
  233. package/src/components/icons/SendIcon.jsx +1 -21
  234. package/src/components/icons/ServiceIcon.jsx +1 -21
  235. package/src/components/icons/ServicesWorkingIcon.jsx +1 -21
  236. package/src/components/icons/SlotIcon.jsx +1 -21
  237. package/src/components/icons/SocialDiscordIcon.jsx +1 -21
  238. package/src/components/icons/SocialGitHubIcon.jsx +1 -21
  239. package/src/components/icons/SocialGitLabIcon.jsx +1 -21
  240. package/src/components/icons/SocialLinkedInIcon.jsx +1 -21
  241. package/src/components/icons/SocialNPMIcon.jsx +1 -21
  242. package/src/components/icons/SocialXIcon.jsx +1 -21
  243. package/src/components/icons/SortDownArrowAndBarIcon.jsx +1 -21
  244. package/src/components/icons/SortDownIcon.jsx +1 -21
  245. package/src/components/icons/SortIcon.jsx +1 -21
  246. package/src/components/icons/SortUpArrowAndBarIcon.jsx +1 -21
  247. package/src/components/icons/SortUpIcon.jsx +1 -21
  248. package/src/components/icons/SortableIcon.jsx +1 -21
  249. package/src/components/icons/StackablesIcon.jsx +1 -21
  250. package/src/components/icons/StackablesPluginIcon.jsx +1 -21
  251. package/src/components/icons/StackablesTemplateIcon.jsx +1 -21
  252. package/src/components/icons/StopIcon.jsx +1 -21
  253. package/src/components/icons/SuspendIcon.jsx +1 -21
  254. package/src/components/icons/SwitchIcon.jsx +1 -21
  255. package/src/components/icons/TableIcon.jsx +1 -21
  256. package/src/components/icons/TaxonomyIcon.jsx +1 -21
  257. package/src/components/icons/TeamsIcon.jsx +1 -21
  258. package/src/components/icons/TerminalIcon.jsx +1 -21
  259. package/src/components/icons/TrashIcon.jsx +1 -21
  260. package/src/components/icons/TrendDownIcon.jsx +41 -0
  261. package/src/components/icons/TrendUpIcon.jsx +43 -0
  262. package/src/components/icons/TwoUsersIcon.jsx +1 -21
  263. package/src/components/icons/UpgradeIcon.jsx +1 -21
  264. package/src/components/icons/UploadFileIcon.jsx +1 -21
  265. package/src/components/icons/UserComputerIcon.jsx +1 -21
  266. package/src/components/icons/UserIcon.jsx +1 -21
  267. package/src/components/icons/UserRemoveIcon.jsx +1 -17
  268. package/src/components/icons/UserRoleIcon.jsx +1 -17
  269. package/src/components/icons/WorkspaceDynamicIcon.jsx +1 -21
  270. package/src/components/icons/WorkspaceEmptyIcon.jsx +1 -21
  271. package/src/components/icons/WorkspaceFailIcon.jsx +1 -21
  272. package/src/components/icons/WorkspaceGitHubIcon.jsx +1 -21
  273. package/src/components/icons/WorkspaceLoadingIcon.jsx +1 -21
  274. package/src/components/icons/WorkspaceReadyIcon.jsx +1 -21
  275. package/src/components/icons/WorkspaceStaticIcon.jsx +1 -21
  276. package/src/components/icons/ZoomInIcon.jsx +2 -22
  277. package/src/components/icons/ZoomOutIcon.jsx +1 -21
  278. package/src/components/icons/index.js +4 -0
  279. package/src/components/layouts/Layout.jsx +0 -12
  280. package/src/components/loaders/SpinnerCircular.jsx +1 -21
  281. package/src/components/logos/AdvancedLogo.jsx +0 -16
  282. package/src/components/logos/BasicLogo.jsx +0 -16
  283. package/src/components/logos/FreeLogo.jsx +0 -16
  284. package/src/components/logos/ProLogo.jsx +0 -16
  285. package/src/stories/ArcMetric.stories.jsx +17 -0
  286. package/src/stories/MetricInfoBox.stories.jsx +39 -0
  287. package/src/stories/TrendLine.stories.jsx +20 -0
  288. package/dist/assets/index-4liAiWzS.js +0 -49
@@ -1,9 +1,8 @@
1
1
  import React from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import commonStyles from './Common.module.css'
4
3
  import styles from './ButtonFullRounded.module.css'
5
4
  import PlatformaticIcon from './PlatformaticIcon'
6
- import { COLORS_ICON, SIZES, DULLS_BACKGROUND_COLOR, PADDING_SIZES, SMALL, WHITE, NONE } from './constants'
5
+ import { DULLS_BACKGROUND_COLOR, SMALL, WHITE, NONE } from './constants'
7
6
  function ButtonFullRounded ({
8
7
  className = '',
9
8
  iconName = '',
@@ -49,59 +48,4 @@ function ButtonFullRounded ({
49
48
  )
50
49
  }
51
50
 
52
- ButtonFullRounded.propTypes = {
53
- /**
54
- * iconName
55
- */
56
- iconName: PropTypes.string,
57
- /**
58
- * iconColor
59
- */
60
- iconColor: PropTypes.oneOf(COLORS_ICON),
61
- /**
62
- * iconColor
63
- */
64
- iconSize: PropTypes.oneOf(SIZES),
65
- /**
66
- * disabled
67
- */
68
- disabled: PropTypes.bool,
69
- /**
70
- * paddingSize
71
- */
72
- paddingSize: PropTypes.oneOf(PADDING_SIZES),
73
- /**
74
- * alt
75
- */
76
- alt: PropTypes.string,
77
- /**
78
- * onClick
79
- */
80
- onClick: PropTypes.func,
81
- /**
82
- * Effect on hover
83
- */
84
- hoverEffect: PropTypes.oneOf(['', DULLS_BACKGROUND_COLOR]),
85
- /**
86
- * bordered
87
- */
88
- bordered: PropTypes.bool,
89
- /**
90
- * tip
91
- */
92
- tip: PropTypes.string,
93
- /**
94
- * Selected: default false
95
- */
96
- selected: PropTypes.bool,
97
- /**
98
- * buttonClassName
99
- */
100
- buttonClassName: PropTypes.string,
101
- /**
102
- * internalOverHandling
103
- */
104
- internalOverHandling: PropTypes.bool
105
- }
106
-
107
51
  export default ButtonFullRounded
@@ -1,9 +1,8 @@
1
1
  import React, { useEffect, useState } from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import styles from './ButtonOnlyIcon.module.css'
4
3
  import commonStyles from './Common.module.css'
5
4
  import PlatformaticIcon from './PlatformaticIcon'
6
- import { SIZES, COLORS_BUTTON, BOX_SHADOW, UNDERLINE, HOVER_EFFECTS_BUTTONS, DULLS_BACKGROUND_COLOR, MAIN_DARK_BLUE, LARGE, MEDIUM, TRANSPARENT } from './constants'
5
+ import { BOX_SHADOW, UNDERLINE, DULLS_BACKGROUND_COLOR, MAIN_DARK_BLUE, LARGE, MEDIUM, TRANSPARENT } from './constants'
7
6
 
8
7
  function ButtonOnlyIcon ({
9
8
  textClass = '',
@@ -94,59 +93,4 @@ function ButtonOnlyIcon ({
94
93
  )
95
94
  }
96
95
 
97
- ButtonOnlyIcon.propTypes = {
98
- /**
99
- * textClass
100
- */
101
- textClass: PropTypes.string,
102
- /**
103
- * paddingClass
104
- */
105
- paddingClass: PropTypes.string,
106
- /**
107
- * altLabel
108
- */
109
- altLabel: PropTypes.string,
110
- /**
111
- * color of text, icon and borders
112
- */
113
- color: PropTypes.oneOf(COLORS_BUTTON),
114
- /**
115
- * background color of the button
116
- */
117
- backgroundColor: PropTypes.oneOf(COLORS_BUTTON),
118
- /**
119
- * Size
120
- */
121
- size: PropTypes.oneOf(SIZES),
122
- /**
123
- * Disabled
124
- */
125
- disabled: PropTypes.bool,
126
- /**
127
- * Effect on hover
128
- */
129
- hoverEffect: PropTypes.oneOf(HOVER_EFFECTS_BUTTONS),
130
- /**
131
- * Apply border: default true
132
- */
133
- bordered: PropTypes.bool,
134
- /**
135
- * Full Width: default false
136
- */
137
- fullWidth: PropTypes.bool,
138
- /**
139
- * platformaticIcon: should be removed
140
- */
141
- platformaticIcon: PropTypes.shape({
142
- iconName: PropTypes.string,
143
- color: PropTypes.string,
144
- size: PropTypes.string
145
- }),
146
- /**
147
- * Selected: default false
148
- */
149
- selected: PropTypes.bool
150
- }
151
-
152
96
  export default ButtonOnlyIcon
@@ -1,7 +1,6 @@
1
1
  import React from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import styles from './Checkbox.module.css'
4
- import { MAIN_DARK_BLUE, MEDIUM, RICH_BLACK, SMALL, WHITE } from './constants'
3
+ import { MAIN_DARK_BLUE, MEDIUM } from './constants'
5
4
  function Checkbox ({
6
5
  disabled = false,
7
6
  color = MAIN_DARK_BLUE,
@@ -17,19 +16,4 @@ function Checkbox ({
17
16
  )
18
17
  }
19
18
 
20
- Checkbox.propTypes = {
21
- /**
22
- * disabled
23
- */
24
- disabled: PropTypes.bool,
25
- /**
26
- * color
27
- */
28
- color: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE, RICH_BLACK]),
29
- /**
30
- * size
31
- */
32
- size: PropTypes.oneOf([SMALL, MEDIUM])
33
- }
34
-
35
19
  export default Checkbox
@@ -1,6 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import PropTypes from 'prop-types'
3
- import { COLORS_ICON, DIRECTION_TOP, MEDIUM, SIZES, POSITIONS, POSITION_CENTER, MAIN_DARK_BLUE } from './constants'
2
+ import { DIRECTION_TOP, MEDIUM, POSITION_CENTER, MAIN_DARK_BLUE } from './constants'
4
3
  import PlatformaticIcon from './PlatformaticIcon'
5
4
  import TooltipAbsolute from './TooltipAbsolute'
6
5
  import Tooltip from './Tooltip'
@@ -74,43 +73,4 @@ function CopyAndPaste ({
74
73
  return renderTooltip()
75
74
  }
76
75
 
77
- CopyAndPaste.propTypes = {
78
- /**
79
- * value
80
- */
81
- value: PropTypes.string,
82
- /**
83
- * tooltipLabel
84
- */
85
- tooltipLabel: PropTypes.string,
86
- /**
87
- * size
88
- */
89
- size: PropTypes.oneOf(SIZES),
90
- /**
91
- * color
92
- */
93
- color: PropTypes.oneOf(COLORS_ICON),
94
- /**
95
- * timeout
96
- */
97
- timeout: PropTypes.number,
98
- /**
99
- * internalOverHandling
100
- */
101
- internalOverHandling: PropTypes.bool,
102
- /**
103
- * timeout
104
- */
105
- tooltipClassName: PropTypes.string,
106
- /**
107
- * position
108
- */
109
- position: PropTypes.oneOf(POSITIONS),
110
- /**
111
- * tooltipFixed
112
- */
113
- tooltipFixed: PropTypes.bool
114
- }
115
-
116
76
  export default CopyAndPaste
@@ -1,9 +1,9 @@
1
1
  import React, { useEffect, useRef, useState } from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import styles from './DropDown.module.css'
4
3
  import commonStyles from './Common.module.css'
5
4
  import PlatformaticIcon from './PlatformaticIcon'
6
- import { DARK_BLUE, LIGHT_BLUE, MAIN_DARK_BLUE, RICH_BLACK, WHITE } from './constants'
5
+ import { DARK_BLUE, MAIN_DARK_BLUE, RICH_BLACK, WHITE } from './constants'
6
+
7
7
  function DropDown ({
8
8
  pictureUrl = '',
9
9
  header = '',
@@ -89,55 +89,4 @@ function DropDown ({
89
89
  )
90
90
  }
91
91
 
92
- DropDown.propTypes = {
93
- /**
94
- * pictureUrl
95
- */
96
- pictureUrl: PropTypes.string,
97
- /**
98
- * header
99
- */
100
- header: PropTypes.string,
101
- /**
102
- * headerClassName
103
- */
104
- headerClassName: PropTypes.string,
105
- /**
106
- * align
107
- */
108
- align: PropTypes.string,
109
- /**
110
- * items
111
- */
112
- items: PropTypes.array,
113
- /**
114
- * backgroundColor
115
- */
116
- backgroundColor: PropTypes.oneOf([DARK_BLUE, LIGHT_BLUE, RICH_BLACK]),
117
- /**
118
- * textColor
119
- */
120
- textColor: PropTypes.oneOf([MAIN_DARK_BLUE, LIGHT_BLUE, WHITE]),
121
- /**
122
- * borderColor
123
- */
124
- borderColor: PropTypes.oneOf([MAIN_DARK_BLUE, WHITE, RICH_BLACK]),
125
- /**
126
- * headerColor
127
- */
128
- headerColor: PropTypes.oneOf([MAIN_DARK_BLUE, WHITE, RICH_BLACK]),
129
- /**
130
- * lastButton
131
- */
132
- lastButton: PropTypes.node,
133
- /**
134
- * menuCustomClassName
135
- */
136
- menuCustomClassName: PropTypes.string,
137
- /**
138
- * handleClickOutside
139
- */
140
- handleClickOutside: PropTypes.bool
141
- }
142
-
143
92
  export default DropDown
@@ -1,8 +1,7 @@
1
1
  import React, { useState } from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import styles from './FollowUs.module.css'
4
3
  import Icons from './icons'
5
- import { MAIN_GREEN, WHITE, MEDIUM, SMALL, MAIN_DARK_BLUE, LIGHT_GREEN } from './constants'
4
+ import { WHITE, MEDIUM } from './constants'
6
5
 
7
6
  function SocialElement ({ href, iconName, iconClassName, iconColor, iconSize }) {
8
7
  const [hover, setHover] = useState(false)
@@ -67,38 +66,4 @@ function FollowUs ({
67
66
  )
68
67
  }
69
68
 
70
- FollowUs.propTypes = {
71
- /**
72
- * label
73
- */
74
- label: PropTypes.string,
75
- /**
76
- * labelClassName
77
- */
78
- labelClassName: PropTypes.string,
79
- /**
80
- * frontPageAspect
81
- */
82
- frontPageAspect: PropTypes.bool,
83
- /**
84
- * labelColor
85
- */
86
- labelColor: PropTypes.oneOf([LIGHT_GREEN, WHITE, MAIN_DARK_BLUE]),
87
- /**
88
- * iconColor
89
- */
90
- iconColor: PropTypes.oneOf([MAIN_DARK_BLUE, WHITE, MAIN_GREEN]),
91
- /**
92
- * iconSize
93
- */
94
- iconSize: PropTypes.oneOf([MEDIUM, SMALL]),
95
- /**
96
- * socialElements
97
- */
98
- socialElements: PropTypes.arrayOf(PropTypes.shape({
99
- link: PropTypes.string.isRequired,
100
- iconName: PropTypes.string.isRequired
101
- }))
102
- }
103
-
104
69
  export default FollowUs
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import commonStyles from './Common.module.css'
4
- import { DARK_GREEN, MAIN_DARK_BLUE, WHITE, MARGIN_4 } from './constants'
3
+ import { DARK_GREEN, MARGIN_4 } from './constants'
5
4
  import styles from './HorizontalSeparator.module.css'
5
+
6
6
  function HorizontalSeparator ({
7
7
  marginTop = MARGIN_4,
8
8
  marginBottom = MARGIN_4,
@@ -22,23 +22,4 @@ function HorizontalSeparator ({
22
22
  return <hr className={getClassName()} />
23
23
  }
24
24
 
25
- HorizontalSeparator.propTypes = {
26
- /**
27
- * marginTop
28
- */
29
- marginTop: PropTypes.number,
30
- /**
31
- * marginBottom
32
- */
33
- marginBottom: PropTypes.number,
34
- /**
35
- * color
36
- */
37
- color: PropTypes.oneOf([DARK_GREEN, MAIN_DARK_BLUE, WHITE]),
38
- /**
39
- * opacity
40
- */
41
- opacity: PropTypes.number
42
- }
43
-
44
25
  export default HorizontalSeparator
@@ -1,9 +1,8 @@
1
1
  import React from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import styles from './InfoBox.module.css'
4
3
  import Button from './Button'
5
4
  import PlatformaticIcon from './PlatformaticIcon'
6
- import { COLORS_BUTTON, COLORS_ICON, HOVER_EFFECTS_BUTTONS, MAIN_GREEN } from './constants'
5
+ import { MAIN_GREEN } from './constants'
7
6
 
8
7
  function InfoBox (props) {
9
8
  const {
@@ -24,34 +23,4 @@ function InfoBox (props) {
24
23
  )
25
24
  }
26
25
 
27
- InfoBox.propTypes = {
28
- /**
29
- * children
30
- */
31
- children: PropTypes.node,
32
- /**
33
- * iconName
34
- */
35
- iconName: PropTypes.string,
36
- /**
37
- * iconColor
38
- */
39
- iconColor: PropTypes.oneOf(COLORS_ICON),
40
- /**
41
- * helpText
42
- */
43
- helpText: PropTypes.string,
44
- /**
45
- * background color of the button
46
- */
47
- buttonProps: PropTypes.shape({
48
- label: PropTypes.string,
49
- backgroundColor: PropTypes.string,
50
- color: PropTypes.oneOf(COLORS_BUTTON),
51
- hoverEffect: PropTypes.oneOf(HOVER_EFFECTS_BUTTONS),
52
- bordered: PropTypes.bool,
53
- onClick: PropTypes.func
54
- })
55
- }
56
-
57
26
  export default InfoBox
@@ -1,9 +1,8 @@
1
1
  import React from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import PlatformaticIcon from './PlatformaticIcon'
4
3
  import commonStyles from './Common.module.css'
5
4
  import styles from './ListElement.module.css'
6
- import { MAIN_DARK_BLUE, MEDIUM, SMALL, WHITE, MAIN_GREEN } from './constants'
5
+ import { MEDIUM, WHITE, MAIN_GREEN } from './constants'
7
6
 
8
7
  function List ({
9
8
  title = '',
@@ -40,35 +39,5 @@ function List ({
40
39
  </div>
41
40
  )
42
41
  }
43
- List.propTypes = {
44
- /**
45
- * title
46
- */
47
- title: PropTypes.string,
48
- /**
49
- * detail
50
- */
51
- detail: PropTypes.string,
52
- /**
53
- * marginSize
54
- */
55
- marginSize: PropTypes.oneOf([SMALL, MEDIUM]),
56
- /**
57
- * color
58
- */
59
- titleColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE]),
60
- /**
61
- * color
62
- */
63
- iconColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE]),
64
- /**
65
- * titleColor
66
- */
67
- detailColor: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE]),
68
- /**
69
- * semiBold
70
- */
71
- semiBold: PropTypes.bool
72
- }
73
42
 
74
43
  export default List
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import styles from './LoadingSpinner.module.css'
4
3
  import SpinnerCircular from './loaders/SpinnerCircular'
5
4
 
@@ -16,11 +15,4 @@ function LoadingSpinner ({ loading = false }) {
16
15
  : <></>
17
16
  }
18
17
 
19
- LoadingSpinner.propTypes = {
20
- /**
21
- * loading
22
- */
23
- loading: PropTypes.bool
24
- }
25
-
26
18
  export default LoadingSpinner
@@ -1,5 +1,4 @@
1
1
  import React from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import styles from './LoadingSpinnerV2.module.css'
4
3
  import SpinnerCircular from './loaders/SpinnerCircular'
5
4
 
@@ -26,28 +25,4 @@ function LoadingSpinnerV2 ({
26
25
  : <></>
27
26
  }
28
27
 
29
- LoadingSpinnerV2.propTypes = {
30
- /**
31
- * loading
32
- */
33
- loading: PropTypes.bool,
34
- /**
35
- * applySentences
36
- */
37
- applySentences: PropTypes.object,
38
- /**
39
- * spinnerProps
40
- */
41
- spinnerProps: PropTypes.shape({
42
- className: PropTypes.string,
43
- color: PropTypes.string,
44
- size: PropTypes.number,
45
- thickness: PropTypes.number
46
- }),
47
- /**
48
- * containerClassName
49
- */
50
- containerClassName: PropTypes.string
51
- }
52
-
53
28
  export default LoadingSpinnerV2
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from 'react'
2
- import PropTypes from 'prop-types'
3
2
  import styles from './LogoDropDown.module.css'
4
3
  import PlatformaticIcon from './PlatformaticIcon'
5
4
  import { MAIN_DARK_BLUE, SMALL, WHITE } from './constants'
@@ -60,31 +59,4 @@ function LogoDropDown ({
60
59
  )
61
60
  }
62
61
 
63
- LogoDropDown.propTypes = {
64
- /**
65
- * width
66
- */
67
- width: PropTypes.number,
68
- /**
69
- * height
70
- */
71
- height: PropTypes.number,
72
- /**
73
- * itemSelected
74
- */
75
- itemSelected: PropTypes.string,
76
- /**
77
- * items
78
- */
79
- items: PropTypes.arrayOf(PropTypes.shape({
80
- id: PropTypes.string.isRequired,
81
- name: PropTypes.string,
82
- handleClick: PropTypes.func
83
- })),
84
- /**
85
- * onClickItemSelected
86
- */
87
- onClickItemSelected: PropTypes.func
88
- }
89
-
90
62
  export default LogoDropDown
@@ -0,0 +1,80 @@
1
+ import React, { useState } from 'react'
2
+ import styles from './MetricInfoBox.module.css'
3
+ import TrendDownIcon from './icons/TrendDownIcon'
4
+ import TrendUpIcon from './icons/TrendUpIcon'
5
+ import TrendLine from './TrendLine'
6
+ import Tooltip from './Tooltip'
7
+ import { DIRECTION_TOP, POSITION_CENTER, MEDIUM, WHITE } from './constants'
8
+ import PlatformaticIcon from './PlatformaticIcon'
9
+
10
+ export default function MetricInfoBox ({
11
+ title,
12
+ value,
13
+ unit,
14
+ data = [],
15
+ helper,
16
+ tooltip,
17
+ showGraph = false
18
+ }) {
19
+ // set trend variable up or down, depending on the first and last value of the data array
20
+ const trend = data[0] > data[data.length - 1] ? 'up' : 'down'
21
+ const [tooltipVisible, setTooltipVisible] = useState(false)
22
+
23
+ return (
24
+ <div className={styles.container}>
25
+ <div className={styles.headerRow}>
26
+ <span className={styles.title}>{title}</span>
27
+ {/* on hover show tooltip */}
28
+ {tooltip && (
29
+ <div
30
+ className={styles.infoIcon}
31
+ onMouseEnter={() => setTooltipVisible(true)}
32
+ onMouseLeave={() => setTooltipVisible(false)}
33
+ >
34
+ <Tooltip
35
+ content={<span>{tooltip}</span>}
36
+ visible={tooltipVisible}
37
+ direction={DIRECTION_TOP}
38
+ position={POSITION_CENTER}
39
+ offset={24}
40
+ delay={100}
41
+ activeDependsOnVisible
42
+ >
43
+ <PlatformaticIcon
44
+ size={MEDIUM}
45
+ iconName='InfoCircleIcon'
46
+ color={WHITE}
47
+
48
+ />
49
+ </Tooltip>
50
+ </div>
51
+ )}
52
+ </div>
53
+ <div className={styles.content}>
54
+ <div className={styles.contentText}>
55
+ <div>
56
+ <div className={styles.value}>
57
+ <span className={styles.valueNumber}>{value}</span>
58
+ <span className={styles.valueUnit}>{unit}</span>
59
+ <div className={styles.trend}>
60
+ {trend === 'up' ? <TrendUpIcon color='white' /> : <TrendDownIcon color='white' />}
61
+ </div>
62
+ </div>
63
+
64
+ </div>
65
+ <div className={styles.helperBox}>
66
+ {helper}
67
+ </div>
68
+
69
+ </div>
70
+
71
+ {showGraph && (
72
+ <div className={styles.contentGraph}>
73
+ <TrendLine yValues={data} />
74
+ </div>
75
+ )}
76
+ </div>
77
+
78
+ </div>
79
+ )
80
+ }
@@ -0,0 +1,42 @@
1
+ .container {
2
+ @apply bg-black-russian rounded-lg p-4 box-border flex flex-col w-full gap-4;
3
+ }
4
+
5
+ .headerRow {
6
+ @apply flex justify-between items-center mb-4;
7
+ }
8
+
9
+ .title {
10
+ @apply text-[24px] font-semibold text-white;
11
+ }
12
+
13
+ .infoIcon {
14
+ @apply text-white/70 cursor-pointer text-[16px];
15
+ }
16
+
17
+ .content {
18
+ @apply flex items-center justify-center gap-4;
19
+ }
20
+
21
+ .contentText {
22
+ @apply flex flex-col gap-2 items-center justify-center;
23
+ }
24
+ .value {
25
+ @apply flex gap-4 items-center justify-center;
26
+ }
27
+
28
+ .valueNumber {
29
+ @apply text-[24px] font-semibold text-white;
30
+ }
31
+
32
+ .valueUnit {
33
+ @apply text-[16px] font-normal text-white/70;
34
+ }
35
+
36
+ .helperBox {
37
+ @apply text-[14px] font-normal text-white/70;
38
+ }
39
+
40
+ .contentGraph {
41
+ @apply w-[210px] h-[60px];
42
+ }