@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.
Files changed (101) hide show
  1. package/.nvmrc +1 -1
  2. package/dist/assets/index-DdZDgVK5.js +49 -0
  3. package/dist/assets/{index-6PMGR_jN.css → index-lxtoGZUQ.css} +1 -1
  4. package/dist/index.html +2 -2
  5. package/dist/main.css +44 -0
  6. package/index.js +0 -2
  7. package/package.json +2 -2
  8. package/postcss.config.cjs +0 -2
  9. package/src/components/BorderedBox.jsx +1 -2
  10. package/src/components/Box.jsx +0 -2
  11. package/src/components/Button.jsx +0 -1
  12. package/src/components/ButtonFullRounded.jsx +0 -1
  13. package/src/components/ButtonOnlyIcon.jsx +0 -1
  14. package/src/components/Checkbox.jsx +0 -1
  15. package/src/components/CopyAndPaste.jsx +0 -1
  16. package/src/components/DetailedMetric.jsx +0 -2
  17. package/src/components/DropDown.jsx +0 -1
  18. package/src/components/HorizontalSeparator.jsx +0 -1
  19. package/src/components/InfoBox.jsx +1 -2
  20. package/src/components/LoadingSpinnerV2.jsx +0 -1
  21. package/src/components/LogoDropDown.jsx +0 -1
  22. package/src/components/Main.jsx +0 -2
  23. package/src/components/MetricValue.jsx +0 -1
  24. package/src/components/Modal.jsx +1 -2
  25. package/src/components/ModalDirectional.jsx +1 -2
  26. package/src/components/ModalStepsForward.jsx +0 -1
  27. package/src/components/PlatformaticIcon.jsx +0 -1
  28. package/src/components/Playground.jsx +0 -1
  29. package/src/components/Report.jsx +40 -0
  30. package/src/components/SearchBar.jsx +0 -1
  31. package/src/components/SearchBarV2.jsx +0 -1
  32. package/src/components/SimpleMetric.jsx +0 -2
  33. package/src/components/SplashScreen.jsx +64 -0
  34. package/src/components/SplashScreen.module.css +19 -0
  35. package/src/components/Status.jsx +0 -1
  36. package/src/components/TabbedWindow.jsx +0 -1
  37. package/src/components/Tag.jsx +0 -1
  38. package/src/components/TextWithLabel.jsx +1 -1
  39. package/src/components/Tooltip.jsx +1 -2
  40. package/src/components/TooltipAbsolute.jsx +1 -2
  41. package/src/components/Versions.jsx +0 -1
  42. package/src/components/VerticalSeparator.jsx +0 -1
  43. package/src/components/backgrounds/AppBackgroundIcon.jsx +0 -2
  44. package/src/components/backgrounds/LensBackgroundIcon.jsx +0 -2
  45. package/src/components/backgrounds/TimerBackgroundIcon.jsx +0 -2
  46. package/src/components/forms/Field.jsx +1 -1
  47. package/src/components/forms/Input.jsx +0 -1
  48. package/src/components/forms/InputFileUpload.jsx +0 -1
  49. package/src/components/forms/InputWithSeparator.jsx +0 -1
  50. package/src/components/forms/Password.jsx +0 -1
  51. package/src/components/forms/Preview.jsx +1 -1
  52. package/src/components/forms/RadioGroup.jsx +0 -1
  53. package/src/components/forms/Select.jsx +0 -1
  54. package/src/components/forms/SelectWithInput.jsx +0 -1
  55. package/src/components/forms/TextArea.jsx +0 -1
  56. package/src/components/forms/ToggleSwitch.jsx +0 -1
  57. package/src/components/icons/CollapseSquareIcon.jsx +97 -0
  58. package/src/components/icons/ExpandSquadreIcon.jsx +97 -0
  59. package/src/components/icons/InfoCircleIcon.jsx +97 -0
  60. package/src/components/icons/index.js +8 -2
  61. package/src/components/layouts/Layout.jsx +0 -1
  62. package/src/components/layouts/TwoColumnsLayout.jsx +0 -1
  63. package/src/components/loaders/SpinnerCircular.jsx +0 -1
  64. package/src/lib/utils.js +0 -2
  65. package/src/stories/BorderedBox.stories.jsx +1 -1
  66. package/src/stories/Button.stories.jsx +0 -1
  67. package/src/stories/ButtonFullRounded.stories.jsx +0 -1
  68. package/src/stories/ButtonOnlyIcon.stories.jsx +0 -1
  69. package/src/stories/Checkbox.stories.jsx +0 -1
  70. package/src/stories/DetailedMetric.stories.jsx +0 -2
  71. package/src/stories/DropDown.stories.jsx +0 -1
  72. package/src/stories/LogoDropDown.stories.jsx +0 -1
  73. package/src/stories/Modal.stories.jsx +27 -22
  74. package/src/stories/Report.stories.jsx +24 -0
  75. package/src/stories/SearchBar.stories.jsx +0 -1
  76. package/src/stories/SearchBarV2.stories.jsx +0 -1
  77. package/src/stories/Sidebar.stories.jsx +0 -1
  78. package/src/stories/SimpleMetric.stories.jsx +0 -2
  79. package/src/stories/SplashScreen.stories.jsx +111 -0
  80. package/src/stories/Status.stories.jsx +0 -1
  81. package/src/stories/TabbedWindow.stories.jsx +0 -1
  82. package/src/stories/Tag.stories.jsx +0 -1
  83. package/src/stories/TextWithLabel.stories.jsx +0 -2
  84. package/src/stories/Tooltip.stories.jsx +0 -1
  85. package/src/stories/TwoColumnsLayout.stories.jsx +0 -1
  86. package/src/stories/backgrounds/AppBackgroundIcon.stories.jsx +0 -1
  87. package/src/stories/backgrounds/LensBackgroundIcon.stories.jsx +0 -1
  88. package/src/stories/backgrounds/TimerBackgroundIcon.stories.jsx +0 -1
  89. package/src/stories/forms/Field.stories.jsx +0 -1
  90. package/src/stories/forms/Input.stories.jsx +0 -1
  91. package/src/stories/forms/InputFileUpload.stories.jsx +0 -1
  92. package/src/stories/forms/InputWithSeparator.stories.jsx +0 -1
  93. package/src/stories/forms/Password.stories.jsx +0 -1
  94. package/src/stories/forms/Preview.stories.jsx +0 -1
  95. package/src/stories/forms/RadioGroup.stories.jsx +0 -1
  96. package/src/stories/forms/Select.stories.jsx +0 -1
  97. package/src/stories/forms/SelectWithInput.stories.jsx +0 -1
  98. package/src/stories/forms/TextArea.stories.jsx +0 -1
  99. package/src/stories/forms/ToggleSwitch.stories.jsx +0 -1
  100. package/src/stories/icons/Icons.stories.jsx +10 -2
  101. package/dist/assets/index-HrNbJmEz.js +0 -49
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import { useState } from 'react'
3
2
  import Sidebar from '../components/Sidebar'
4
3
  import BorderedBox from '../components/BorderedBox'
@@ -1,5 +1,3 @@
1
- 'use strict'
2
-
3
1
  import { ERROR_RED, MAIN_GREEN } from '../components/constants'
4
2
  import SimpleMetric from '../components/SimpleMetric'
5
3
 
@@ -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
+ }
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import Status from '../components/Status'
3
2
 
4
3
  export default {
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import TabbedWindow from '../components/TabbedWindow'
3
2
  import TextWithLabel from '../components/TextWithLabel'
4
3
  export default {
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import Tag from '../components/Tag'
3
2
  import { ELECTRIC_PURPLE, ERROR_RED, MAIN_GREEN, OPACITY_30, SMALL, TERTIARY_BLUE, WARNING_YELLOW, WHITE } from '../components/constants'
4
3
  export default {
@@ -1,5 +1,3 @@
1
- 'use strict'
2
-
3
1
  import TextWithLabel from '../components/TextWithLabel'
4
2
  export default {
5
3
  title: 'Platformatic/TextWithLabel',
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React from 'react'
3
2
  import Tooltip from '../components/Tooltip'
4
3
  import {
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import TwoColumnsLayout from '../components/layouts/TwoColumnsLayout'
3
2
  import BorderedBox from '../components/BorderedBox'
4
3
  export default {
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React from 'react'
3
2
  import AppBackgroundIcon from '../../components/backgrounds/AppBackgroundIcon'
4
3
 
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React from 'react'
3
2
  import LensBackgroundIcon from '../../components/backgrounds/LensBackgroundIcon'
4
3
 
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React from 'react'
3
2
  import TimerBackgroundIcon from '../../components/backgrounds/TimerBackgroundIcon'
4
3
 
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import Field from '../../components/forms/Field'
3
2
  import Button from '../../components/Button'
4
3
  import Input from '../../components/forms/Input'
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React, { useState } from 'react'
3
2
  import Input from '../../components/forms/Input'
4
3
  import { ERROR_RED } from '../../components/constants'
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React from 'react'
3
2
  import InputFileUpload from '../../components/forms/InputFileUpload'
4
3
  import { RICH_BLACK } from '../../components/constants'
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React, { useState } from 'react'
3
2
  import { ERROR_RED, MAIN_GREEN, MEDIUM } from '../../components/constants'
4
3
  import InputWithSeparator from '../../components/forms/InputWithSeparator'
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React, { useState } from 'react'
3
2
  import Password from '../../components/forms/Password'
4
3
 
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import Preview from '../../components/forms/Preview'
3
2
 
4
3
  const divStyle = {
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React, { useState } from 'react'
3
2
  import RadioGroup from '../../components/forms/RadioGroup'
4
3
 
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React, { useState } from 'react'
3
2
  import Select from '../../components/forms/Select'
4
3
  import {
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React, { useState } from 'react'
3
2
  import SelectWithInput from '../../components/forms/SelectWithInput'
4
3
  import {
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React, { useState } from 'react'
3
2
  import TextArea from '../../components/forms/TextArea'
4
3
 
@@ -1,4 +1,3 @@
1
- 'use strict'
2
1
  import React, { useState } from 'react'
3
2
  import ToggleSwitch from '../../components/forms/ToggleSwitch'
4
3
  export default {
@@ -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
- <Icon key={size} size={size} />
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({})