@platformatic/ui-components 0.10.1 → 0.12.0
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/.nvmrc +1 -1
- package/dist/assets/index-DdZDgVK5.js +49 -0
- package/dist/assets/{index-6PMGR_jN.css → index-lxtoGZUQ.css} +1 -1
- package/dist/index.html +2 -2
- package/dist/main.css +44 -0
- package/index.js +0 -2
- package/package.json +2 -2
- package/postcss.config.cjs +0 -2
- package/src/components/BorderedBox.jsx +1 -2
- package/src/components/Box.jsx +0 -2
- package/src/components/Button.jsx +0 -1
- package/src/components/ButtonFullRounded.jsx +0 -1
- package/src/components/ButtonOnlyIcon.jsx +0 -1
- package/src/components/Checkbox.jsx +0 -1
- package/src/components/CopyAndPaste.jsx +0 -1
- package/src/components/DetailedMetric.jsx +0 -2
- package/src/components/DropDown.jsx +0 -1
- package/src/components/HorizontalSeparator.jsx +0 -1
- package/src/components/InfoBox.jsx +1 -2
- package/src/components/LoadingSpinnerV2.jsx +0 -1
- package/src/components/LogoDropDown.jsx +0 -1
- package/src/components/Main.jsx +0 -2
- package/src/components/MetricValue.jsx +0 -1
- package/src/components/Modal.jsx +1 -2
- package/src/components/ModalDirectional.jsx +1 -2
- package/src/components/ModalStepsForward.jsx +0 -1
- package/src/components/PlatformaticIcon.jsx +0 -1
- package/src/components/Playground.jsx +0 -1
- package/src/components/Report.jsx +40 -0
- package/src/components/SearchBar.jsx +0 -1
- package/src/components/SearchBarV2.jsx +0 -1
- package/src/components/SimpleMetric.jsx +0 -2
- package/src/components/SplashScreen.jsx +64 -0
- package/src/components/SplashScreen.module.css +19 -0
- package/src/components/Status.jsx +0 -1
- package/src/components/TabbedWindow.jsx +0 -1
- package/src/components/Tag.jsx +0 -1
- package/src/components/TextWithLabel.jsx +1 -1
- package/src/components/Tooltip.jsx +1 -2
- package/src/components/TooltipAbsolute.jsx +1 -2
- package/src/components/Versions.jsx +0 -1
- package/src/components/VerticalSeparator.jsx +0 -1
- package/src/components/backgrounds/AppBackgroundIcon.jsx +0 -2
- package/src/components/backgrounds/LensBackgroundIcon.jsx +0 -2
- package/src/components/backgrounds/TimerBackgroundIcon.jsx +0 -2
- package/src/components/forms/Field.jsx +1 -1
- package/src/components/forms/Input.jsx +0 -1
- package/src/components/forms/InputFileUpload.jsx +0 -1
- package/src/components/forms/InputWithSeparator.jsx +0 -1
- package/src/components/forms/Password.jsx +0 -1
- package/src/components/forms/Preview.jsx +1 -1
- package/src/components/forms/RadioGroup.jsx +0 -1
- package/src/components/forms/Select.jsx +0 -1
- package/src/components/forms/SelectWithInput.jsx +0 -1
- package/src/components/forms/TextArea.jsx +0 -1
- package/src/components/forms/ToggleSwitch.jsx +0 -1
- package/src/components/icons/CollapseSquareIcon.jsx +97 -0
- package/src/components/icons/ExpandSquadreIcon.jsx +97 -0
- package/src/components/icons/InfoCircleIcon.jsx +97 -0
- package/src/components/icons/index.js +8 -2
- package/src/components/layouts/Layout.jsx +0 -1
- package/src/components/layouts/TwoColumnsLayout.jsx +0 -1
- package/src/components/loaders/SpinnerCircular.jsx +0 -1
- package/src/lib/utils.js +0 -2
- package/src/stories/BorderedBox.stories.jsx +1 -1
- package/src/stories/Button.stories.jsx +0 -1
- package/src/stories/ButtonFullRounded.stories.jsx +0 -1
- package/src/stories/ButtonOnlyIcon.stories.jsx +0 -1
- package/src/stories/Checkbox.stories.jsx +0 -1
- package/src/stories/DetailedMetric.stories.jsx +0 -2
- package/src/stories/DropDown.stories.jsx +0 -1
- package/src/stories/LogoDropDown.stories.jsx +0 -1
- package/src/stories/Modal.stories.jsx +27 -22
- package/src/stories/Report.stories.jsx +24 -0
- package/src/stories/SearchBar.stories.jsx +0 -1
- package/src/stories/SearchBarV2.stories.jsx +0 -1
- package/src/stories/Sidebar.stories.jsx +0 -1
- package/src/stories/SimpleMetric.stories.jsx +0 -2
- package/src/stories/SplashScreen.stories.jsx +111 -0
- package/src/stories/Status.stories.jsx +0 -1
- package/src/stories/TabbedWindow.stories.jsx +0 -1
- package/src/stories/Tag.stories.jsx +0 -1
- package/src/stories/TextWithLabel.stories.jsx +0 -2
- package/src/stories/Tooltip.stories.jsx +0 -1
- package/src/stories/TwoColumnsLayout.stories.jsx +0 -1
- package/src/stories/backgrounds/AppBackgroundIcon.stories.jsx +0 -1
- package/src/stories/backgrounds/LensBackgroundIcon.stories.jsx +0 -1
- package/src/stories/backgrounds/TimerBackgroundIcon.stories.jsx +0 -1
- package/src/stories/forms/Field.stories.jsx +0 -1
- package/src/stories/forms/Input.stories.jsx +0 -1
- package/src/stories/forms/InputFileUpload.stories.jsx +0 -1
- package/src/stories/forms/InputWithSeparator.stories.jsx +0 -1
- package/src/stories/forms/Password.stories.jsx +0 -1
- package/src/stories/forms/Preview.stories.jsx +0 -1
- package/src/stories/forms/RadioGroup.stories.jsx +0 -1
- package/src/stories/forms/Select.stories.jsx +0 -1
- package/src/stories/forms/SelectWithInput.stories.jsx +0 -1
- package/src/stories/forms/TextArea.stories.jsx +0 -1
- package/src/stories/forms/ToggleSwitch.stories.jsx +0 -1
- package/src/stories/icons/Icons.stories.jsx +10 -2
- package/dist/assets/index-HrNbJmEz.js +0 -49
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import SplashScreen from '../components/SplashScreen'
|
|
3
|
+
import { ERROR_RED, MAIN_GREEN, RICH_BLACK, WHITE } from '../components/constants'
|
|
4
|
+
import Button from '../components/Button'
|
|
5
|
+
import Report from '../components/Report'
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Platformatic/Splash Screen',
|
|
8
|
+
component: SplashScreen
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const Template = (args) => {
|
|
12
|
+
const {
|
|
13
|
+
timeout = 5000
|
|
14
|
+
} = args
|
|
15
|
+
const [showSplashScreen, setShowSplashScreen] = useState(false)
|
|
16
|
+
const [splashOptions, setSplashOptions] = useState({})
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (Object.keys(splashOptions).length > 0) {
|
|
20
|
+
setShowSplashScreen(true)
|
|
21
|
+
}
|
|
22
|
+
}, [splashOptions])
|
|
23
|
+
|
|
24
|
+
function getReportSteps () {
|
|
25
|
+
const steps = [
|
|
26
|
+
{ type: 'success', label: 'Removed from Main Taxonomy' },
|
|
27
|
+
{ type: 'success', label: 'Removed from Preview Taxonomy' },
|
|
28
|
+
{ type: 'success', label: 'API Key Invalidated' },
|
|
29
|
+
{ type: 'success', label: 'Secrets removed' },
|
|
30
|
+
{ type: 'success', label: 'All pods removed' }
|
|
31
|
+
]
|
|
32
|
+
return steps
|
|
33
|
+
}
|
|
34
|
+
return (
|
|
35
|
+
<div style={{ height: '100vh' }}>
|
|
36
|
+
<div className='flex flex-col gap-y-2 w-1/4'>
|
|
37
|
+
<Button
|
|
38
|
+
color={MAIN_GREEN}
|
|
39
|
+
backgroundColor={RICH_BLACK}
|
|
40
|
+
onClick={() => {
|
|
41
|
+
setSplashOptions({
|
|
42
|
+
message: 'This is a success message',
|
|
43
|
+
success: true,
|
|
44
|
+
title: 'Operation Completed!',
|
|
45
|
+
timeout
|
|
46
|
+
})
|
|
47
|
+
}}
|
|
48
|
+
label='Success'
|
|
49
|
+
/>
|
|
50
|
+
|
|
51
|
+
<Button
|
|
52
|
+
color={ERROR_RED}
|
|
53
|
+
backgroundColor={RICH_BLACK}
|
|
54
|
+
onClick={() => {
|
|
55
|
+
setSplashOptions({
|
|
56
|
+
title: 'The application wad deleted',
|
|
57
|
+
success: false,
|
|
58
|
+
message: 'The application you are looking for was deleted on YYYY-MM-DD [HH:MM:SS]',
|
|
59
|
+
timeout
|
|
60
|
+
})
|
|
61
|
+
}}
|
|
62
|
+
label='Failure'
|
|
63
|
+
/>
|
|
64
|
+
|
|
65
|
+
<Button
|
|
66
|
+
color={WHITE}
|
|
67
|
+
backgroundColor={RICH_BLACK}
|
|
68
|
+
onClick={() => {
|
|
69
|
+
setSplashOptions({
|
|
70
|
+
title: 'The application wad deleted',
|
|
71
|
+
success: false,
|
|
72
|
+
message: 'The application you are looking for was deleted on YYYY-MM-DD [HH:MM:SS]',
|
|
73
|
+
timeout,
|
|
74
|
+
blur: true
|
|
75
|
+
})
|
|
76
|
+
}}
|
|
77
|
+
label='With Blur'
|
|
78
|
+
/>
|
|
79
|
+
|
|
80
|
+
<Button
|
|
81
|
+
color={WHITE}
|
|
82
|
+
backgroundColor={RICH_BLACK}
|
|
83
|
+
onClick={() => {
|
|
84
|
+
setSplashOptions({
|
|
85
|
+
title: 'Application deleted successfully',
|
|
86
|
+
success: true,
|
|
87
|
+
message: 'You successfully delete this application.',
|
|
88
|
+
timeout,
|
|
89
|
+
children: (
|
|
90
|
+
<Report steps={getReportSteps()} />
|
|
91
|
+
)
|
|
92
|
+
})
|
|
93
|
+
}}
|
|
94
|
+
label='With report'
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
{showSplashScreen && (
|
|
99
|
+
<SplashScreen
|
|
100
|
+
{...splashOptions}
|
|
101
|
+
onDestroyed={() => setShowSplashScreen(false)}
|
|
102
|
+
>{splashOptions.children}
|
|
103
|
+
</SplashScreen>
|
|
104
|
+
)}
|
|
105
|
+
</div>
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export const Samples = {
|
|
110
|
+
render: () => <Template timeout={5000000} />
|
|
111
|
+
}
|
|
@@ -5,7 +5,7 @@ import CircleCloseIcon from '../../components/icons/CircleCloseIcon'
|
|
|
5
5
|
import WorkspaceStaticIcon from '../../components/icons/WorkspaceStaticIcon'
|
|
6
6
|
import UpgradeIcon from '../../components/icons/UpgradeIcon'
|
|
7
7
|
import WorkspaceDynamicIcon from '../../components/icons/WorkspaceDynamicIcon'
|
|
8
|
-
import { COLORS_ICON } from '../../components/constants'
|
|
8
|
+
import { COLORS_ICON, MAIN_GREEN, RICH_BLACK } from '../../components/constants'
|
|
9
9
|
import icons from '../../components/icons/index.js'
|
|
10
10
|
|
|
11
11
|
const divStyle = {
|
|
@@ -98,7 +98,10 @@ LargeIconsDefault.args = {}
|
|
|
98
98
|
|
|
99
99
|
const AllSizesIcons = (Icon) => () => {
|
|
100
100
|
const icons = ['small', 'medium', 'large'].map((size) => (
|
|
101
|
-
<
|
|
101
|
+
<div key={size} className='antani' style={{ backgroundColor: RICH_BLACK }}>
|
|
102
|
+
<Icon size={size} color={MAIN_GREEN} />
|
|
103
|
+
</div>
|
|
104
|
+
|
|
102
105
|
))
|
|
103
106
|
return icons
|
|
104
107
|
}
|
|
@@ -110,3 +113,8 @@ export const AppOptimizedIcons = AllSizesIcons(icons.AppOptimizedIcon).bind({})
|
|
|
110
113
|
export const AWSIcons = AllSizesIcons(icons.AWSIcon).bind({})
|
|
111
114
|
export const ImportIcons = AllSizesIcons(icons.ImportIcon).bind({})
|
|
112
115
|
export const ExportIcons = AllSizesIcons(icons.ExportIcon).bind({})
|
|
116
|
+
export const InfoCircleIcons = AllSizesIcons(icons.InfoCircleIcon).bind({})
|
|
117
|
+
export const CollapseSquareIcons = AllSizesIcons(icons.CollapseSquareIcon).bind({})
|
|
118
|
+
export const ExpandSquareIcon = AllSizesIcons(icons.ExpandSquareIcon).bind({})
|
|
119
|
+
export const EntrypointIcon = AllSizesIcons(icons.EntrypointIcon).bind({})
|
|
120
|
+
export const AlertIcon = AllSizesIcons(icons.AlertIcon).bind({})
|