@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.
- package/dist/assets/index-BeInQDZN.js +49 -0
- package/dist/assets/{index-DMinbJlj.css → index-DE70C3KG.css} +1 -1
- package/dist/index.html +2 -2
- package/dist/main.css +60 -4
- package/package.json +2 -1
- package/src/components/ArcMetric.jsx +145 -0
- package/src/components/ArcMetric.module.css +31 -0
- package/src/components/BorderedBox.jsx +1 -37
- package/src/components/Button.jsx +0 -72
- package/src/components/ButtonFullRounded.jsx +1 -57
- package/src/components/ButtonOnlyIcon.jsx +1 -57
- package/src/components/Checkbox.jsx +1 -17
- package/src/components/CopyAndPaste.jsx +1 -41
- package/src/components/DropDown.jsx +2 -53
- package/src/components/FollowUs.jsx +1 -36
- package/src/components/HorizontalSeparator.jsx +2 -21
- package/src/components/InfoBox.jsx +1 -32
- package/src/components/ListElement.jsx +1 -32
- package/src/components/LoadingSpinner.jsx +0 -8
- package/src/components/LoadingSpinnerV2.jsx +0 -25
- package/src/components/LogoDropDown.jsx +0 -28
- package/src/components/MetricInfoBox.jsx +80 -0
- package/src/components/MetricInfoBox.module.css +42 -0
- package/src/components/Modal.jsx +0 -59
- package/src/components/ModalDirectional.jsx +0 -28
- package/src/components/ModalStepsForward.jsx +1 -21
- package/src/components/PlatformaticIcon.jsx +1 -41
- package/src/components/SearchBarV2.jsx +1 -45
- package/src/components/Sidebar.jsx +0 -53
- package/src/components/Status.jsx +1 -18
- package/src/components/TabbedWindow.jsx +1 -33
- package/src/components/Tag.jsx +1 -44
- package/src/components/TextWithLabel.jsx +1 -25
- package/src/components/Tooltip.jsx +3 -47
- package/src/components/TooltipAbsolute.jsx +1 -41
- package/src/components/TrendLine.jsx +146 -0
- package/src/components/VerticalSeparator.jsx +1 -22
- package/src/components/forms/Field.jsx +1 -37
- package/src/components/forms/Input.jsx +1 -85
- package/src/components/forms/InputFileUpload.jsx +1 -101
- package/src/components/forms/InputWithSeparator.jsx +1 -74
- package/src/components/forms/Password.jsx +3 -43
- package/src/components/forms/Preview.jsx +1 -51
- package/src/components/forms/RadioGroup.jsx +0 -35
- package/src/components/forms/Select.jsx +1 -110
- package/src/components/forms/SelectWithInput.jsx +1 -111
- package/src/components/forms/TextArea.jsx +1 -53
- package/src/components/forms/ToggleSwitch.jsx +1 -42
- package/src/components/icons/APIDocsIcon.jsx +1 -21
- package/src/components/icons/APIKeyIcon.jsx +1 -21
- package/src/components/icons/AWSIcon.jsx +1 -21
- package/src/components/icons/AddEnvVariableIcon.jsx +1 -17
- package/src/components/icons/AddIcon.jsx +1 -21
- package/src/components/icons/AddRouteIcon.jsx +1 -17
- package/src/components/icons/AddUserIcon.jsx +1 -21
- package/src/components/icons/AlertIcon.jsx +1 -21
- package/src/components/icons/AllAppsIcon.jsx +1 -21
- package/src/components/icons/AllInOneIcon.jsx +1 -21
- package/src/components/icons/ApiCloudIcon.jsx +1 -21
- package/src/components/icons/ApiEmptyIcon.jsx +1 -21
- package/src/components/icons/ApiIcon.jsx +1 -21
- package/src/components/icons/ApiIconClosed.jsx +1 -17
- package/src/components/icons/ApiPerformanceIcon.jsx +1 -21
- package/src/components/icons/AppConfigurationIcon.jsx +1 -21
- package/src/components/icons/AppDetailsIcon.jsx +1 -21
- package/src/components/icons/AppEditIcon.jsx +1 -21
- package/src/components/icons/AppEmptyIcon.jsx +1 -21
- package/src/components/icons/AppIcon.jsx +1 -21
- package/src/components/icons/AppListIcon.jsx +1 -21
- package/src/components/icons/AppMissingIcon.jsx +1 -21
- package/src/components/icons/AppOptimizedIcon.jsx +1 -21
- package/src/components/icons/AppSettingsIcon.jsx +1 -21
- package/src/components/icons/AppStoppedIcon.jsx +1 -21
- package/src/components/icons/AppWorkspace.jsx +1 -13
- package/src/components/icons/ApplicationTypeIcon.jsx +1 -21
- package/src/components/icons/ArrowDownFullIcon.jsx +1 -21
- package/src/components/icons/ArrowDownIcon.jsx +1 -21
- package/src/components/icons/ArrowLeftIcon.jsx +1 -21
- package/src/components/icons/ArrowLongDownIcon.jsx +1 -21
- package/src/components/icons/ArrowLongLeftIcon.jsx +1 -21
- package/src/components/icons/ArrowLongRightIcon.jsx +1 -21
- package/src/components/icons/ArrowLongUpIcon.jsx +1 -21
- package/src/components/icons/ArrowRightIcon.jsx +1 -21
- package/src/components/icons/ArrowUpIcon.jsx +1 -21
- package/src/components/icons/BellIcon.jsx +1 -21
- package/src/components/icons/BillingIcon.jsx +1 -21
- package/src/components/icons/BranchIcon.jsx +1 -21
- package/src/components/icons/BuiltInLoggingIcon.jsx +1 -21
- package/src/components/icons/CLIIcon.jsx +1 -21
- package/src/components/icons/CacheRecommendationIcon.jsx +1 -21
- package/src/components/icons/CachingIcon.jsx +1 -21
- package/src/components/icons/Calendar1DayIcon.jsx +1 -21
- package/src/components/icons/Calendar7DaysIcon.jsx +1 -21
- package/src/components/icons/CalendarIcon.jsx +1 -21
- package/src/components/icons/CheckListIcon.jsx +1 -21
- package/src/components/icons/CheckListReviewIcon.jsx +1 -21
- package/src/components/icons/CircleAddIcon.jsx +1 -21
- package/src/components/icons/CircleArrowLeftIcon.jsx +2 -22
- package/src/components/icons/CircleArrowRightIcon.jsx +1 -21
- package/src/components/icons/CircleCheckMarkButtonIcon.jsx +1 -13
- package/src/components/icons/CircleCheckMarkFullIcon.jsx +1 -21
- package/src/components/icons/CircleCheckMarkIcon.jsx +1 -21
- package/src/components/icons/CircleCloseHoverIcon.jsx +1 -21
- package/src/components/icons/CircleCloseIcon.jsx +1 -21
- package/src/components/icons/CircleCopyPasteIcon.jsx +1 -21
- package/src/components/icons/CircleDownloadIcon.jsx +1 -21
- package/src/components/icons/CircleEditIcon.jsx +1 -21
- package/src/components/icons/CircleExclamationIcon.jsx +1 -17
- package/src/components/icons/CircleFullIcon.jsx +1 -21
- package/src/components/icons/CircleGearIcon.jsx +1 -21
- package/src/components/icons/CirclePlayIcon.jsx +1 -21
- package/src/components/icons/CircleRestartIcon.jsx +1 -21
- package/src/components/icons/CircleStopIcon.jsx +1 -21
- package/src/components/icons/CircleSubtractIcon.jsx +1 -21
- package/src/components/icons/CircleTwoArrowsDownIcon.jsx +1 -21
- package/src/components/icons/CircleTwoArrowsUpIcon.jsx +1 -21
- package/src/components/icons/CloseIcon.jsx +1 -21
- package/src/components/icons/CloudIcon.jsx +1 -21
- package/src/components/icons/CodeTestingIcon.jsx +1 -21
- package/src/components/icons/CollapseIcon.jsx +1 -21
- package/src/components/icons/CollapseSquareIcon.jsx +1 -21
- package/src/components/icons/ComputerIcon.jsx +1 -21
- package/src/components/icons/ComputerInIcon.jsx +1 -21
- package/src/components/icons/ComputerOutIcon.jsx +1 -21
- package/src/components/icons/ConfigureDatabaseIcon.jsx +1 -21
- package/src/components/icons/CopyPasteIcon.jsx +1 -21
- package/src/components/icons/CreateAppIcon.jsx +1 -21
- package/src/components/icons/CreatingAppIcon.jsx +1 -21
- package/src/components/icons/CreditCardIcon.jsx +1 -21
- package/src/components/icons/DatabaseEditIcon.jsx +1 -21
- package/src/components/icons/DatabaseIcon.jsx +1 -21
- package/src/components/icons/DatabaseMigrationIcon.jsx +1 -21
- package/src/components/icons/DepencenciesReloadIcon.jsx +1 -21
- package/src/components/icons/DeploymentHistoryIcon.jsx +1 -21
- package/src/components/icons/DocumentIcon.jsx +1 -21
- package/src/components/icons/DownloadIcon.jsx +1 -21
- package/src/components/icons/EditDocumentIcon.jsx +1 -21
- package/src/components/icons/EditIcon.jsx +1 -21
- package/src/components/icons/EnlargeIcon.jsx +1 -21
- package/src/components/icons/EntryIcon.jsx +1 -21
- package/src/components/icons/EntrypointIcon.jsx +1 -25
- package/src/components/icons/EnvVariableszIcon.jsx +1 -21
- package/src/components/icons/ExpandIcon.jsx +1 -25
- package/src/components/icons/ExpandSquadreIcon.jsx +1 -21
- package/src/components/icons/ExploreDocIcon.jsx +1 -21
- package/src/components/icons/ExportIcon.jsx +1 -21
- package/src/components/icons/EyeClosedIcon.jsx +1 -21
- package/src/components/icons/EyeOpenedIcon.jsx +1 -21
- package/src/components/icons/FailureRateIcon.jsx +1 -21
- package/src/components/icons/FolderIcon.jsx +1 -21
- package/src/components/icons/FoldersIcon.jsx +1 -21
- package/src/components/icons/GearIcon.jsx +1 -21
- package/src/components/icons/GenerationLoadingIcon.jsx +1 -21
- package/src/components/icons/GitHubRepo2Icon.jsx +1 -21
- package/src/components/icons/GitHubRepoIcon.jsx +1 -21
- package/src/components/icons/GiveOwnershipIcon.jsx +2 -22
- package/src/components/icons/GraphQLEditsIcon.jsx +1 -21
- package/src/components/icons/GraphQLIcon.jsx +1 -21
- package/src/components/icons/HorizontalPodAutoscalerIcon.jsx +1 -21
- package/src/components/icons/HourglassIcon.jsx +1 -21
- package/src/components/icons/ImportAppIcon.jsx +1 -21
- package/src/components/icons/ImportIcon.jsx +1 -21
- package/src/components/icons/InfoCircleIcon.jsx +1 -21
- package/src/components/icons/InfrastructureIcon.jsx +1 -21
- package/src/components/icons/IngressControllIcon.jsx +1 -21
- package/src/components/icons/InternalLinkIcon.jsx +1 -25
- package/src/components/icons/InternetIcon.jsx +1 -25
- package/src/components/icons/K8SIcon.jsx +1 -21
- package/src/components/icons/K8SMetricsIcon.jsx +4 -24
- package/src/components/icons/KeyIcon.jsx +1 -21
- package/src/components/icons/LabelIcon.jsx +1 -21
- package/src/components/icons/LayersIcon.jsx +1 -21
- package/src/components/icons/LensIcon.jsx +1 -21
- package/src/components/icons/LiveIcon.jsx +1 -21
- package/src/components/icons/LoadingAppIcon.jsx +1 -21
- package/src/components/icons/LogOutIcon.jsx +1 -17
- package/src/components/icons/LogsRiskIcon.jsx +1 -21
- package/src/components/icons/MailIcon.jsx +1 -21
- package/src/components/icons/MetricsIcon.jsx +1 -21
- package/src/components/icons/MetricsLoadingIcon.jsx +1 -21
- package/src/components/icons/MetricsLogsIcon.jsx +1 -21
- package/src/components/icons/MissingTemplateIcon.jsx +1 -21
- package/src/components/icons/NameAppIcon.jsx +1 -21
- package/src/components/icons/NextJSIcon.jsx +1 -25
- package/src/components/icons/NoActivitiesIcon.jsx +1 -21
- package/src/components/icons/NoDeploymentsIcon.jsx +1 -21
- package/src/components/icons/NoMetricsIcon.jsx +1 -21
- package/src/components/icons/NoResultsIcon.jsx +1 -21
- package/src/components/icons/NodeJSIcon.jsx +1 -21
- package/src/components/icons/NodeJSMetricsIcon.jsx +1 -21
- package/src/components/icons/NotCompliantServiceIcon.jsx +1 -25
- package/src/components/icons/OpenAPIEditsIcon.jsx +1 -21
- package/src/components/icons/OrganizationIcon.jsx +1 -21
- package/src/components/icons/OtherLogosGoogleIcon.jsx +1 -21
- package/src/components/icons/OutOfBoxGraphQLIcon.jsx +1 -21
- package/src/components/icons/OutdatedServiceIcon.jsx +1 -25
- package/src/components/icons/PlatformaticComposerIcon.jsx +1 -21
- package/src/components/icons/PlatformaticDBIcon.jsx +1 -21
- package/src/components/icons/PlatformaticRuntimeIcon.jsx +1 -21
- package/src/components/icons/PlatformaticServiceIcon.jsx +1 -21
- package/src/components/icons/PlayIcon.jsx +1 -21
- package/src/components/icons/PodDetailsIcon.jsx +1 -21
- package/src/components/icons/PodLogsIcon.jsx +1 -21
- package/src/components/icons/PodMetricsIcon.jsx +1 -21
- package/src/components/icons/PodPerformanceIcon.jsx +1 -21
- package/src/components/icons/PodServicesIcon.jsx +1 -21
- package/src/components/icons/PodSettingsIcon.jsx +1 -21
- package/src/components/icons/PodhealthIcon.jsx +1 -21
- package/src/components/icons/PreviewPRIcon.jsx +1 -21
- package/src/components/icons/PullRequestIcon.jsx +1 -21
- package/src/components/icons/PullRequestLoadingIcon.jsx +1 -21
- package/src/components/icons/RecentAppsIcon.jsx +1 -21
- package/src/components/icons/RemoveAppIcon.jsx +1 -21
- package/src/components/icons/RemoveIcon.jsx +1 -21
- package/src/components/icons/RequestOwnershipIcon.jsx +1 -21
- package/src/components/icons/RequestsIcon.jsx +1 -21
- package/src/components/icons/ResourceIcon.jsx +1 -21
- package/src/components/icons/RestartIcon.jsx +1 -21
- package/src/components/icons/RocketIcon.jsx +1 -21
- package/src/components/icons/RouteEditIcon.jsx +1 -21
- package/src/components/icons/RouteHistoryIcon.jsx +1 -21
- package/src/components/icons/RoutingIcon.jsx +1 -21
- package/src/components/icons/RunningAppIcon.jsx +1 -21
- package/src/components/icons/RunningIcon.jsx +1 -21
- package/src/components/icons/ScalerDetailsIcon.jsx +1 -21
- package/src/components/icons/ScalerHistoryIcon.jsx +1 -21
- package/src/components/icons/ScheduledJobSettingsIcon.jsx +1 -21
- package/src/components/icons/ScheduledJobsAppIcon.jsx +1 -21
- package/src/components/icons/ScheduledJobsCreateIcon.jsx +1 -21
- package/src/components/icons/ScheduledJobsDetailIcon.jsx +1 -21
- package/src/components/icons/ScheduledJobsIcon.jsx +1 -21
- package/src/components/icons/ScheduledJobsSuspendIcon.jsx +1 -21
- package/src/components/icons/SendIcon.jsx +1 -21
- package/src/components/icons/ServiceIcon.jsx +1 -21
- package/src/components/icons/ServicesWorkingIcon.jsx +1 -21
- package/src/components/icons/SlotIcon.jsx +1 -21
- package/src/components/icons/SocialDiscordIcon.jsx +1 -21
- package/src/components/icons/SocialGitHubIcon.jsx +1 -21
- package/src/components/icons/SocialGitLabIcon.jsx +1 -21
- package/src/components/icons/SocialLinkedInIcon.jsx +1 -21
- package/src/components/icons/SocialNPMIcon.jsx +1 -21
- package/src/components/icons/SocialXIcon.jsx +1 -21
- package/src/components/icons/SortDownArrowAndBarIcon.jsx +1 -21
- package/src/components/icons/SortDownIcon.jsx +1 -21
- package/src/components/icons/SortIcon.jsx +1 -21
- package/src/components/icons/SortUpArrowAndBarIcon.jsx +1 -21
- package/src/components/icons/SortUpIcon.jsx +1 -21
- package/src/components/icons/SortableIcon.jsx +1 -21
- package/src/components/icons/StackablesIcon.jsx +1 -21
- package/src/components/icons/StackablesPluginIcon.jsx +1 -21
- package/src/components/icons/StackablesTemplateIcon.jsx +1 -21
- package/src/components/icons/StopIcon.jsx +1 -21
- package/src/components/icons/SuspendIcon.jsx +1 -21
- package/src/components/icons/SwitchIcon.jsx +1 -21
- package/src/components/icons/TableIcon.jsx +1 -21
- package/src/components/icons/TaxonomyIcon.jsx +1 -21
- package/src/components/icons/TeamsIcon.jsx +1 -21
- package/src/components/icons/TerminalIcon.jsx +1 -21
- package/src/components/icons/TrashIcon.jsx +1 -21
- package/src/components/icons/TrendDownIcon.jsx +41 -0
- package/src/components/icons/TrendUpIcon.jsx +43 -0
- package/src/components/icons/TwoUsersIcon.jsx +1 -21
- package/src/components/icons/UpgradeIcon.jsx +1 -21
- package/src/components/icons/UploadFileIcon.jsx +1 -21
- package/src/components/icons/UserComputerIcon.jsx +1 -21
- package/src/components/icons/UserIcon.jsx +1 -21
- package/src/components/icons/UserRemoveIcon.jsx +1 -17
- package/src/components/icons/UserRoleIcon.jsx +1 -17
- package/src/components/icons/WorkspaceDynamicIcon.jsx +1 -21
- package/src/components/icons/WorkspaceEmptyIcon.jsx +1 -21
- package/src/components/icons/WorkspaceFailIcon.jsx +1 -21
- package/src/components/icons/WorkspaceGitHubIcon.jsx +1 -21
- package/src/components/icons/WorkspaceLoadingIcon.jsx +1 -21
- package/src/components/icons/WorkspaceReadyIcon.jsx +1 -21
- package/src/components/icons/WorkspaceStaticIcon.jsx +1 -21
- package/src/components/icons/ZoomInIcon.jsx +2 -22
- package/src/components/icons/ZoomOutIcon.jsx +1 -21
- package/src/components/icons/index.js +4 -0
- package/src/components/layouts/Layout.jsx +0 -12
- package/src/components/loaders/SpinnerCircular.jsx +1 -21
- package/src/components/logos/AdvancedLogo.jsx +0 -16
- package/src/components/logos/BasicLogo.jsx +0 -16
- package/src/components/logos/FreeLogo.jsx +0 -16
- package/src/components/logos/ProLogo.jsx +0 -16
- package/src/stories/ArcMetric.stories.jsx +17 -0
- package/src/stories/MetricInfoBox.stories.jsx +39 -0
- package/src/stories/TrendLine.stories.jsx +20 -0
- package/dist/assets/index-4liAiWzS.js +0 -49
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import React, { useRef, useEffect, useState } from 'react'
|
|
2
|
+
import * as d3 from 'd3'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* TrendLine component
|
|
6
|
+
* @param {Object} props
|
|
7
|
+
* @param {number[]} props.yValues - Array of y-values (equally spaced on x-axis)
|
|
8
|
+
* @param {number} [props.width=400] - Width of the SVG
|
|
9
|
+
* @param {number} [props.height=120] - Height of the SVG
|
|
10
|
+
*/
|
|
11
|
+
function TrendLine ({ yValues }) {
|
|
12
|
+
const ref = useRef(null)
|
|
13
|
+
const containerRef = useRef(null)
|
|
14
|
+
/** @type {React.RefObject<HTMLDivElement>} */
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
const typedContainerRef = containerRef
|
|
17
|
+
const [dimensions, setDimensions] = useState({ width: 400, height: 120 })
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (!typedContainerRef.current) return
|
|
21
|
+
// Initial set
|
|
22
|
+
const bounding = typedContainerRef.current.getBoundingClientRect()
|
|
23
|
+
if (bounding) {
|
|
24
|
+
setDimensions({ width: bounding.width, height: bounding.height })
|
|
25
|
+
}
|
|
26
|
+
// Resize observer
|
|
27
|
+
const resizeObserver = new window.ResizeObserver(entries => {
|
|
28
|
+
for (const entry of entries) {
|
|
29
|
+
if (entry.target === typedContainerRef.current) {
|
|
30
|
+
const { width, height } = entry.contentRect
|
|
31
|
+
setDimensions({ width, height })
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
resizeObserver.observe(typedContainerRef.current)
|
|
36
|
+
return () => resizeObserver.disconnect()
|
|
37
|
+
}, [])
|
|
38
|
+
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
const { width, height } = dimensions
|
|
41
|
+
if (!yValues || yValues.length === 0) return
|
|
42
|
+
// Limit to max 5 points by downsampling if needed
|
|
43
|
+
let limitedYValues = yValues
|
|
44
|
+
if (yValues.length > 5) {
|
|
45
|
+
const step = (yValues.length - 1) / 4
|
|
46
|
+
limitedYValues = Array.from({ length: 5 }, (_, i) => yValues[Math.round(i * step)])
|
|
47
|
+
}
|
|
48
|
+
const svg = d3.select(ref.current)
|
|
49
|
+
svg.selectAll('*').remove() // Clear previous
|
|
50
|
+
|
|
51
|
+
// Margins for padding
|
|
52
|
+
// const margin = { top: 10, right: 10, bottom: 10, left: 10 }
|
|
53
|
+
const margin = { top: 0, right: 0, bottom: 0, left: 0 }
|
|
54
|
+
const w = width - margin.left - margin.right
|
|
55
|
+
const h = height - margin.top - margin.bottom
|
|
56
|
+
|
|
57
|
+
// Ensure yValues is a number[] and filter out undefined/null
|
|
58
|
+
const cleanYValues = limitedYValues.filter(v => typeof v === 'number' && !isNaN(v))
|
|
59
|
+
if (cleanYValues.length === 0) return
|
|
60
|
+
|
|
61
|
+
// Helper to ensure [number, number][]
|
|
62
|
+
function toXYPairs (arr) {
|
|
63
|
+
const out = []
|
|
64
|
+
for (let i = 0; i < arr.length; i++) {
|
|
65
|
+
const x = i
|
|
66
|
+
const y = arr[i]
|
|
67
|
+
if (typeof x === 'number' && typeof y === 'number' && Number.isFinite(x) && Number.isFinite(y)) {
|
|
68
|
+
out.push([x, y])
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return out
|
|
72
|
+
}
|
|
73
|
+
const points = toXYPairs(cleanYValues)
|
|
74
|
+
if (points.length < 2) return
|
|
75
|
+
|
|
76
|
+
// X and Y scales
|
|
77
|
+
const x = d3.scaleLinear()
|
|
78
|
+
.domain([0, points.length - 1])
|
|
79
|
+
.range([0, w])
|
|
80
|
+
const y = d3.scaleLinear()
|
|
81
|
+
.domain([
|
|
82
|
+
Number(d3.max(cleanYValues) ?? 1),
|
|
83
|
+
Number(d3.min(cleanYValues) ?? 0)
|
|
84
|
+
]) // Invert so higher values are up
|
|
85
|
+
.range([margin.top, h + margin.top])
|
|
86
|
+
|
|
87
|
+
// Line generator for [x, y] pairs
|
|
88
|
+
const line = d3.line()
|
|
89
|
+
.x(d => x(d[0]) + margin.left)
|
|
90
|
+
.y(d => y(d[1]))
|
|
91
|
+
.curve(d3.curveCatmullRom.alpha(0.5))
|
|
92
|
+
|
|
93
|
+
// Area generator for [x, y] pairs
|
|
94
|
+
const area = d3.area()
|
|
95
|
+
.x(d => x(d[0]) + margin.left)
|
|
96
|
+
.y0(h + margin.top)
|
|
97
|
+
.y1(d => y(d[1]))
|
|
98
|
+
.curve(d3.curveCatmullRom.alpha(0.5))
|
|
99
|
+
|
|
100
|
+
// Draw area (shadow/fill)
|
|
101
|
+
svg.append('path')
|
|
102
|
+
// @ts-ignore
|
|
103
|
+
.attr('d', area(points))
|
|
104
|
+
.attr('fill', 'url(#trend-gradient)')
|
|
105
|
+
.attr('opacity', 1)
|
|
106
|
+
|
|
107
|
+
// Draw line
|
|
108
|
+
svg.append('path')
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
.attr('d', line(points))
|
|
111
|
+
.attr('fill', 'none')
|
|
112
|
+
.attr('stroke', '#BFC3C7')
|
|
113
|
+
.attr('stroke-width', 2)
|
|
114
|
+
.attr('stroke-linecap', 'round')
|
|
115
|
+
|
|
116
|
+
// Gradient for area
|
|
117
|
+
const defs = svg.append('defs')
|
|
118
|
+
const gradient = defs.append('linearGradient')
|
|
119
|
+
.attr('id', 'trend-gradient')
|
|
120
|
+
.attr('x1', '0%')
|
|
121
|
+
.attr('y1', '0%')
|
|
122
|
+
.attr('x2', '0%')
|
|
123
|
+
.attr('y2', '100%')
|
|
124
|
+
gradient.append('stop')
|
|
125
|
+
.attr('offset', '0%')
|
|
126
|
+
.attr('stop-color', '#BFC3C7')
|
|
127
|
+
.attr('stop-opacity', 0.12)
|
|
128
|
+
gradient.append('stop')
|
|
129
|
+
.attr('offset', '100%')
|
|
130
|
+
.attr('stop-color', '#BFC3C7')
|
|
131
|
+
.attr('stop-opacity', 0)
|
|
132
|
+
}, [yValues, dimensions])
|
|
133
|
+
|
|
134
|
+
return (
|
|
135
|
+
<div className='w-full h-full' ref={typedContainerRef} style={{ position: 'relative' }}>
|
|
136
|
+
<svg
|
|
137
|
+
ref={ref}
|
|
138
|
+
width='100%'
|
|
139
|
+
height='100%'
|
|
140
|
+
style={{ display: 'block', background: '#0B1016', borderRadius: 6 }}
|
|
141
|
+
/>
|
|
142
|
+
</div>
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export default TrendLine
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import
|
|
3
|
-
import { DARK_GREEN, MAIN_DARK_BLUE, OPACITY_10, OPACITY_20, OPACITY_30, OPACITY_60, OPACITY_100, WHITE } from './constants'
|
|
2
|
+
import { DARK_GREEN, OPACITY_100 } from './constants'
|
|
4
3
|
import commonStyles from './Common.module.css'
|
|
5
4
|
import styles from './VerticalSeparator.module.css'
|
|
6
5
|
|
|
@@ -15,24 +14,4 @@ function VerticalSeparator ({
|
|
|
15
14
|
return <div className={className} />
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
VerticalSeparator.propTypes = {
|
|
19
|
-
/**
|
|
20
|
-
* color
|
|
21
|
-
*/
|
|
22
|
-
color: PropTypes.oneOf([DARK_GREEN, MAIN_DARK_BLUE, WHITE]),
|
|
23
|
-
/**
|
|
24
|
-
* backgroundColorOpacity
|
|
25
|
-
*/
|
|
26
|
-
backgroundColorOpacity: PropTypes.oneOf([OPACITY_10,
|
|
27
|
-
OPACITY_20,
|
|
28
|
-
OPACITY_30,
|
|
29
|
-
OPACITY_60,
|
|
30
|
-
OPACITY_100]),
|
|
31
|
-
/**
|
|
32
|
-
* backgroundColorOpacity
|
|
33
|
-
*/
|
|
34
|
-
classes: PropTypes.string
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
17
|
export default VerticalSeparator
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
import styles from './Field.module.css'
|
|
4
|
-
import {
|
|
3
|
+
import { MAIN_DARK_BLUE } from '../constants'
|
|
5
4
|
|
|
6
5
|
function Field ({
|
|
7
6
|
title = '',
|
|
@@ -31,39 +30,4 @@ function Field ({
|
|
|
31
30
|
)
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
Field.propTypes = {
|
|
35
|
-
/**
|
|
36
|
-
* title
|
|
37
|
-
*/
|
|
38
|
-
title: PropTypes.string,
|
|
39
|
-
/**
|
|
40
|
-
* titleColor
|
|
41
|
-
*/
|
|
42
|
-
titleColor: PropTypes.oneOf([ERROR_RED, MAIN_DARK_BLUE, WHITE]),
|
|
43
|
-
/**
|
|
44
|
-
* helper
|
|
45
|
-
*/
|
|
46
|
-
helper: PropTypes.string,
|
|
47
|
-
/**
|
|
48
|
-
* color of border
|
|
49
|
-
*/
|
|
50
|
-
children: PropTypes.node,
|
|
51
|
-
/**
|
|
52
|
-
* disabled
|
|
53
|
-
*/
|
|
54
|
-
disabled: PropTypes.bool,
|
|
55
|
-
/**
|
|
56
|
-
* required
|
|
57
|
-
*/
|
|
58
|
-
required: PropTypes.bool,
|
|
59
|
-
/**
|
|
60
|
-
* titleClassName
|
|
61
|
-
*/
|
|
62
|
-
titleClassName: PropTypes.string,
|
|
63
|
-
/**
|
|
64
|
-
* titleClassName
|
|
65
|
-
*/
|
|
66
|
-
helperClassName: PropTypes.string
|
|
67
|
-
}
|
|
68
|
-
|
|
69
33
|
export default Field
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
import styles from './Input.module.css'
|
|
4
3
|
import commonStyles from '../Common.module.css'
|
|
5
4
|
import PlatformaticIcon from '../PlatformaticIcon'
|
|
6
|
-
import { ERROR_RED,
|
|
5
|
+
import { ERROR_RED, MAIN_GREEN, WHITE } from '../constants'
|
|
7
6
|
|
|
8
7
|
function Input ({
|
|
9
8
|
placeholder = '',
|
|
@@ -85,87 +84,4 @@ function Input ({
|
|
|
85
84
|
)
|
|
86
85
|
}
|
|
87
86
|
|
|
88
|
-
Input.propTypes = {
|
|
89
|
-
/**
|
|
90
|
-
* placeholder
|
|
91
|
-
*/
|
|
92
|
-
placeholder: PropTypes.string,
|
|
93
|
-
/**
|
|
94
|
-
* value
|
|
95
|
-
*/
|
|
96
|
-
value: PropTypes.string,
|
|
97
|
-
/**
|
|
98
|
-
* name
|
|
99
|
-
*/
|
|
100
|
-
name: PropTypes.string,
|
|
101
|
-
/**
|
|
102
|
-
* color of border
|
|
103
|
-
*/
|
|
104
|
-
borderColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE, RICH_BLACK]),
|
|
105
|
-
/**
|
|
106
|
-
* color of border
|
|
107
|
-
*/
|
|
108
|
-
backgroundColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE, RICH_BLACK, TRANSPARENT]),
|
|
109
|
-
/**
|
|
110
|
-
* onChange
|
|
111
|
-
*/
|
|
112
|
-
onChange: PropTypes.func,
|
|
113
|
-
/**
|
|
114
|
-
* Disabled
|
|
115
|
-
*/
|
|
116
|
-
disabled: PropTypes.bool,
|
|
117
|
-
/**
|
|
118
|
-
* beforeIcon: PlatformaticIcon props
|
|
119
|
-
*/
|
|
120
|
-
beforeIcon: PropTypes.shape({
|
|
121
|
-
iconName: PropTypes.string,
|
|
122
|
-
color: PropTypes.string,
|
|
123
|
-
onClick: PropTypes.func
|
|
124
|
-
}),
|
|
125
|
-
/**
|
|
126
|
-
* afterIcon: PlatformaticIcon props
|
|
127
|
-
*/
|
|
128
|
-
afterIcon: PropTypes.shape({
|
|
129
|
-
iconName: PropTypes.string,
|
|
130
|
-
color: PropTypes.string,
|
|
131
|
-
onClick: PropTypes.func
|
|
132
|
-
}),
|
|
133
|
-
/**
|
|
134
|
-
* placeholderApart
|
|
135
|
-
*/
|
|
136
|
-
placeholderApart: PropTypes.bool,
|
|
137
|
-
/**
|
|
138
|
-
* backgroundTransparent
|
|
139
|
-
*/
|
|
140
|
-
backgroundTransparent: PropTypes.bool,
|
|
141
|
-
/**
|
|
142
|
-
* inputTextClassName
|
|
143
|
-
*/
|
|
144
|
-
inputTextClassName: PropTypes.string,
|
|
145
|
-
/**
|
|
146
|
-
* verticalPaddingClassName
|
|
147
|
-
*/
|
|
148
|
-
verticalPaddingClassName: PropTypes.string,
|
|
149
|
-
/**
|
|
150
|
-
* dataAttrName
|
|
151
|
-
*/
|
|
152
|
-
dataAttrName: PropTypes.string,
|
|
153
|
-
/**
|
|
154
|
-
* dataAttrValue
|
|
155
|
-
*/
|
|
156
|
-
dataAttrValue: PropTypes.string,
|
|
157
|
-
/**
|
|
158
|
-
* readOnly
|
|
159
|
-
*/
|
|
160
|
-
readOnly: PropTypes.bool,
|
|
161
|
-
/**
|
|
162
|
-
* errorMessage
|
|
163
|
-
*/
|
|
164
|
-
errorMessage: PropTypes.string,
|
|
165
|
-
/**
|
|
166
|
-
* errorMessageTextClassName
|
|
167
|
-
*/
|
|
168
|
-
errorMessageTextClassName: PropTypes.string
|
|
169
|
-
}
|
|
170
|
-
|
|
171
87
|
export default Input
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
import styles from './InputFileUpload.module.css'
|
|
4
3
|
import commonStyles from '../Common.module.css'
|
|
5
4
|
import PlatformaticIcon from '../PlatformaticIcon'
|
|
6
5
|
import Button from '../Button'
|
|
7
|
-
import { ACTIVE_AND_INACTIVE_STATUS, ERROR_RED,
|
|
6
|
+
import { ACTIVE_AND_INACTIVE_STATUS, ERROR_RED, MAIN_GREEN, WHITE } from '../constants'
|
|
8
7
|
|
|
9
8
|
function InputFileUpload ({
|
|
10
9
|
idInputFile = 'fileUpload',
|
|
@@ -139,103 +138,4 @@ function InputFileUpload ({
|
|
|
139
138
|
)
|
|
140
139
|
}
|
|
141
140
|
|
|
142
|
-
InputFileUpload.propTypes = {
|
|
143
|
-
/**
|
|
144
|
-
* idInputFile
|
|
145
|
-
*/
|
|
146
|
-
idInputFile: PropTypes.string,
|
|
147
|
-
/**
|
|
148
|
-
* placeholder
|
|
149
|
-
*/
|
|
150
|
-
placeholder: PropTypes.string,
|
|
151
|
-
/**
|
|
152
|
-
* color of border
|
|
153
|
-
*/
|
|
154
|
-
borderColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE, RICH_BLACK]),
|
|
155
|
-
/**
|
|
156
|
-
* color of border
|
|
157
|
-
*/
|
|
158
|
-
backgroundColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE, RICH_BLACK, TRANSPARENT]),
|
|
159
|
-
/**
|
|
160
|
-
* onFileSelect
|
|
161
|
-
*/
|
|
162
|
-
onFileSelect: PropTypes.func,
|
|
163
|
-
/**
|
|
164
|
-
* Disabled
|
|
165
|
-
*/
|
|
166
|
-
disabled: PropTypes.bool,
|
|
167
|
-
/**
|
|
168
|
-
* beforeIcon: PlatformaticIcon props
|
|
169
|
-
*/
|
|
170
|
-
beforeIcon: PropTypes.shape({
|
|
171
|
-
iconName: PropTypes.string,
|
|
172
|
-
color: PropTypes.string,
|
|
173
|
-
onClick: PropTypes.func
|
|
174
|
-
}),
|
|
175
|
-
/**
|
|
176
|
-
* afterIcon: PlatformaticIcon props
|
|
177
|
-
*/
|
|
178
|
-
afterIcon: PropTypes.shape({
|
|
179
|
-
iconName: PropTypes.string,
|
|
180
|
-
color: PropTypes.string,
|
|
181
|
-
onClick: PropTypes.func
|
|
182
|
-
}),
|
|
183
|
-
/**
|
|
184
|
-
* backgroundTransparent
|
|
185
|
-
*/
|
|
186
|
-
backgroundTransparent: PropTypes.bool,
|
|
187
|
-
/**
|
|
188
|
-
* inputTextClassName
|
|
189
|
-
*/
|
|
190
|
-
inputTextClassName: PropTypes.string,
|
|
191
|
-
/**
|
|
192
|
-
* detailTextClassName
|
|
193
|
-
*/
|
|
194
|
-
detailTextClassName: PropTypes.string,
|
|
195
|
-
/**
|
|
196
|
-
* accept
|
|
197
|
-
*/
|
|
198
|
-
accept: PropTypes.string,
|
|
199
|
-
/**
|
|
200
|
-
* verticalPaddingClassName
|
|
201
|
-
*/
|
|
202
|
-
verticalPaddingClassName: PropTypes.string,
|
|
203
|
-
/**
|
|
204
|
-
* dataAttrName
|
|
205
|
-
*/
|
|
206
|
-
dataAttrName: PropTypes.string,
|
|
207
|
-
/**
|
|
208
|
-
* dataAttrValue
|
|
209
|
-
*/
|
|
210
|
-
dataAttrValue: PropTypes.string,
|
|
211
|
-
/**
|
|
212
|
-
* readOnly
|
|
213
|
-
*/
|
|
214
|
-
readOnly: PropTypes.bool,
|
|
215
|
-
/**
|
|
216
|
-
* errorMessage
|
|
217
|
-
*/
|
|
218
|
-
errorMessage: PropTypes.string,
|
|
219
|
-
/**
|
|
220
|
-
* errorMessageTextClassName
|
|
221
|
-
*/
|
|
222
|
-
errorMessageTextClassName: PropTypes.string,
|
|
223
|
-
/**
|
|
224
|
-
* removeFileButton
|
|
225
|
-
*/
|
|
226
|
-
removeFileButton: PropTypes.object,
|
|
227
|
-
/**
|
|
228
|
-
* showDetailButton
|
|
229
|
-
*/
|
|
230
|
-
showDetailButton: PropTypes.bool,
|
|
231
|
-
/**
|
|
232
|
-
* detailFileButton
|
|
233
|
-
*/
|
|
234
|
-
detailFileButton: PropTypes.object,
|
|
235
|
-
/**
|
|
236
|
-
* onClickDetail
|
|
237
|
-
*/
|
|
238
|
-
onClickDetail: PropTypes.func
|
|
239
|
-
}
|
|
240
|
-
|
|
241
141
|
export default InputFileUpload
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
import inputStyles from './Input.module.css'
|
|
4
3
|
import styles from './InputWithSeparator.module.css'
|
|
5
4
|
import commonStyles from '../Common.module.css'
|
|
6
|
-
import { DULLS_BACKGROUND_COLOR, ERROR_RED,
|
|
5
|
+
import { DULLS_BACKGROUND_COLOR, ERROR_RED, MAIN_GREEN, MEDIUM, OPACITY_30, SMALL, TRANSPARENT, WHITE } from '../constants'
|
|
7
6
|
import BorderedBox from '../BorderedBox'
|
|
8
7
|
import ButtonFullRounded from '../ButtonFullRounded'
|
|
9
8
|
import PlatformaticIcon from '../PlatformaticIcon'
|
|
@@ -182,76 +181,4 @@ function InputWithSeparator ({
|
|
|
182
181
|
)
|
|
183
182
|
}
|
|
184
183
|
|
|
185
|
-
InputWithSeparator.propTypes = {
|
|
186
|
-
/**
|
|
187
|
-
* placeholder
|
|
188
|
-
*/
|
|
189
|
-
placeholder: PropTypes.string,
|
|
190
|
-
/**
|
|
191
|
-
* name
|
|
192
|
-
*/
|
|
193
|
-
name: PropTypes.string,
|
|
194
|
-
/**
|
|
195
|
-
* value
|
|
196
|
-
*/
|
|
197
|
-
value: PropTypes.string,
|
|
198
|
-
/**
|
|
199
|
-
* defaultValue
|
|
200
|
-
*/
|
|
201
|
-
defaultValue: PropTypes.string,
|
|
202
|
-
/**
|
|
203
|
-
* defaultValueSeparator
|
|
204
|
-
*/
|
|
205
|
-
defaultValueSeparator: PropTypes.string,
|
|
206
|
-
/**
|
|
207
|
-
* separators
|
|
208
|
-
*/
|
|
209
|
-
separators: PropTypes.arrayOf(PropTypes.string),
|
|
210
|
-
/**
|
|
211
|
-
* inputTextClassName
|
|
212
|
-
*/
|
|
213
|
-
inputTextClassName: PropTypes.string,
|
|
214
|
-
/**
|
|
215
|
-
* color of border
|
|
216
|
-
*/
|
|
217
|
-
borderColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE, RICH_BLACK]),
|
|
218
|
-
/**
|
|
219
|
-
* color of border
|
|
220
|
-
*/
|
|
221
|
-
backgroundColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE, RICH_BLACK, TRANSPARENT]),
|
|
222
|
-
/**
|
|
223
|
-
* onChange
|
|
224
|
-
*/
|
|
225
|
-
onChange: PropTypes.func,
|
|
226
|
-
/**
|
|
227
|
-
* Disabled
|
|
228
|
-
*/
|
|
229
|
-
disabled: PropTypes.bool,
|
|
230
|
-
/**
|
|
231
|
-
* afterIcon: PlatformaticIcon props
|
|
232
|
-
*/
|
|
233
|
-
afterIcon: PropTypes.shape({
|
|
234
|
-
iconName: PropTypes.string,
|
|
235
|
-
color: PropTypes.string,
|
|
236
|
-
handleClick: PropTypes.func,
|
|
237
|
-
disabled: PropTypes.bool
|
|
238
|
-
}),
|
|
239
|
-
/**
|
|
240
|
-
* beforeIcon: PlatformaticIcon props
|
|
241
|
-
*/
|
|
242
|
-
beforeIcon: PropTypes.shape({
|
|
243
|
-
iconName: PropTypes.string,
|
|
244
|
-
color: PropTypes.string,
|
|
245
|
-
size: PropTypes.oneOf(SIZES)
|
|
246
|
-
}),
|
|
247
|
-
/**
|
|
248
|
-
* errorMessage
|
|
249
|
-
*/
|
|
250
|
-
errorMessage: PropTypes.string,
|
|
251
|
-
/**
|
|
252
|
-
* errorMessageTextClassName
|
|
253
|
-
*/
|
|
254
|
-
errorMessageTextClassName: PropTypes.string
|
|
255
|
-
}
|
|
256
|
-
|
|
257
184
|
export default InputWithSeparator
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
import styles from './Password.module.css'
|
|
4
3
|
import commonStyles from '../Common.module.css'
|
|
5
4
|
import PlatformaticIcon from '../PlatformaticIcon'
|
|
6
|
-
import { MAIN_DARK_BLUE
|
|
5
|
+
import { MAIN_DARK_BLUE } from '../constants'
|
|
7
6
|
|
|
8
|
-
function
|
|
7
|
+
function Password ({
|
|
9
8
|
placeholder = '',
|
|
10
9
|
value = '',
|
|
11
10
|
name = '',
|
|
@@ -38,43 +37,4 @@ function Input ({
|
|
|
38
37
|
)
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* placeholder
|
|
44
|
-
*/
|
|
45
|
-
placeholder: PropTypes.string,
|
|
46
|
-
/**
|
|
47
|
-
* value
|
|
48
|
-
*/
|
|
49
|
-
value: PropTypes.string,
|
|
50
|
-
/**
|
|
51
|
-
* name
|
|
52
|
-
*/
|
|
53
|
-
name: PropTypes.string,
|
|
54
|
-
/**
|
|
55
|
-
* color of border
|
|
56
|
-
*/
|
|
57
|
-
borderColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE]),
|
|
58
|
-
/**
|
|
59
|
-
* onChange
|
|
60
|
-
*/
|
|
61
|
-
onChange: PropTypes.func,
|
|
62
|
-
/**
|
|
63
|
-
* Disabled
|
|
64
|
-
*/
|
|
65
|
-
disabled: PropTypes.bool,
|
|
66
|
-
/**
|
|
67
|
-
* placeholderApart
|
|
68
|
-
*/
|
|
69
|
-
placeholderApart: PropTypes.bool,
|
|
70
|
-
/**
|
|
71
|
-
* errorMessage
|
|
72
|
-
*/
|
|
73
|
-
errorMessage: PropTypes.string,
|
|
74
|
-
/**
|
|
75
|
-
* errorMessageTextClassName
|
|
76
|
-
*/
|
|
77
|
-
errorMessageTextClassName: PropTypes.string
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default Input
|
|
40
|
+
export default Password
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
import styles from './Preview.module.css'
|
|
4
3
|
import PlatformaticIcon from '../PlatformaticIcon'
|
|
5
4
|
import CopyAndPaste from '../CopyAndPaste'
|
|
6
|
-
import {
|
|
5
|
+
import {} from '../constants'
|
|
7
6
|
|
|
8
7
|
function renderLink (value) {
|
|
9
8
|
return (<a className={styles.link} href={value} target='_blank' rel='noreferrer'>{value}</a>)
|
|
@@ -41,53 +40,4 @@ function Preview ({
|
|
|
41
40
|
)
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
Preview.propTypes = {
|
|
45
|
-
/**
|
|
46
|
-
* title
|
|
47
|
-
*/
|
|
48
|
-
title: PropTypes.string,
|
|
49
|
-
/**
|
|
50
|
-
* value
|
|
51
|
-
*/
|
|
52
|
-
value: PropTypes.oneOfType([
|
|
53
|
-
PropTypes.string,
|
|
54
|
-
PropTypes.number
|
|
55
|
-
]),
|
|
56
|
-
/**
|
|
57
|
-
* isLink
|
|
58
|
-
*/
|
|
59
|
-
isLink: PropTypes.bool,
|
|
60
|
-
/**
|
|
61
|
-
* color of border
|
|
62
|
-
*/
|
|
63
|
-
children: PropTypes.node,
|
|
64
|
-
/**
|
|
65
|
-
* useCopyAndPaste
|
|
66
|
-
*/
|
|
67
|
-
useCopyAndPaste: PropTypes.bool,
|
|
68
|
-
/**
|
|
69
|
-
* copyAndPaste
|
|
70
|
-
*/
|
|
71
|
-
copyAndPaste: PropTypes.shape({
|
|
72
|
-
value: PropTypes.string,
|
|
73
|
-
tooltipLabel: PropTypes.string,
|
|
74
|
-
iconSize: PropTypes.oneOf(SIZES),
|
|
75
|
-
iconColor: PropTypes.oneOf(COLORS_ICON),
|
|
76
|
-
timeout: PropTypes.number
|
|
77
|
-
}),
|
|
78
|
-
/**
|
|
79
|
-
* usePlatformaticIcon
|
|
80
|
-
*/
|
|
81
|
-
usePlatformaticIcon: PropTypes.bool,
|
|
82
|
-
/**
|
|
83
|
-
* platformaticIcon
|
|
84
|
-
*/
|
|
85
|
-
platformaticIcon: PropTypes.shape({
|
|
86
|
-
iconName: PropTypes.string.isRequired,
|
|
87
|
-
color: PropTypes.oneOf(COLORS_ICON),
|
|
88
|
-
size: PropTypes.oneOf(SIZES),
|
|
89
|
-
onClick: PropTypes.func
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
|
|
93
43
|
export default Preview
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
import styles from './RadioGroup.module.css'
|
|
4
3
|
import commonStyles from '../Common.module.css'
|
|
5
4
|
|
|
@@ -33,38 +32,4 @@ function RadioGroup ({
|
|
|
33
32
|
)
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
RadioGroup.propTypes = {
|
|
37
|
-
/**
|
|
38
|
-
* name
|
|
39
|
-
*/
|
|
40
|
-
name: PropTypes.string,
|
|
41
|
-
/**
|
|
42
|
-
* radios
|
|
43
|
-
*/
|
|
44
|
-
radios: PropTypes.arrayOf(PropTypes.shape({
|
|
45
|
-
value: PropTypes.string,
|
|
46
|
-
label: PropTypes.string
|
|
47
|
-
})),
|
|
48
|
-
/**
|
|
49
|
-
* errorMessage
|
|
50
|
-
*/
|
|
51
|
-
errorMessage: PropTypes.string,
|
|
52
|
-
/**
|
|
53
|
-
* errorMessageTextClassName
|
|
54
|
-
*/
|
|
55
|
-
errorMessageTextClassName: PropTypes.string,
|
|
56
|
-
/**
|
|
57
|
-
* onChange
|
|
58
|
-
*/
|
|
59
|
-
onChange: PropTypes.func,
|
|
60
|
-
/**
|
|
61
|
-
* Disabled
|
|
62
|
-
*/
|
|
63
|
-
disabled: PropTypes.bool,
|
|
64
|
-
/**
|
|
65
|
-
* value
|
|
66
|
-
*/
|
|
67
|
-
value: PropTypes.string
|
|
68
|
-
}
|
|
69
|
-
|
|
70
35
|
export default RadioGroup
|