@platformatic/ui-components 0.1.80 → 0.1.82
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.5afee9ab.js +40 -0
- package/dist/assets/index.b15f7bcc.css +1 -0
- package/dist/index.html +2 -2
- package/dist/main.css +4 -0
- package/package.json +1 -1
- package/src/components/Button.jsx +23 -4
- package/src/components/ButtonFullRounded.jsx +22 -3
- package/src/components/Common.module.css +27 -0
- package/src/components/DropDown.module.css +2 -2
- package/src/components/Sidebar.jsx +1 -1
- package/src/components/Sidebar.module.css +4 -1
- package/src/components/Status.jsx +12 -6
- package/src/components/TabbedWindow.module.css +2 -3
- package/src/components/constants.js +2 -1
- package/src/components/icons/AppWorkspace.jsx +94 -0
- package/src/components/icons/CircleFullIcon.jsx +18 -4
- package/src/components/icons/GenerationLoadingIcon.jsx +56 -0
- package/src/components/icons/PullRequestLoadingIcon.jsx +60 -0
- package/src/components/icons/index.js +6 -0
- package/src/stories/Button.stories.jsx +3 -0
- package/src/stories/ButtonFullRounded.stories.jsx +59 -25
- package/src/stories/PlatformaticIcon.stories.jsx +8 -5
- package/src/stories/TabbedWindow.stories.jsx +28 -0
- package/dist/assets/index.34b55a44.js +0 -40
- package/dist/assets/index.8666e478.css +0 -1
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import ButtonFullRounded from '../components/ButtonFullRounded'
|
|
3
|
-
import { COLORS_ICON, SIZES } from '../components/constants'
|
|
3
|
+
import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE } from '../components/constants'
|
|
4
|
+
import Icons from '../components/icons'
|
|
5
|
+
|
|
6
|
+
const divStyle = {
|
|
7
|
+
width: '100%'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const row = {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
width: '100%',
|
|
13
|
+
columnGap: '1rem',
|
|
14
|
+
alignItems: 'center'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const col = {
|
|
18
|
+
flex: 1
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const paragraph = {
|
|
22
|
+
color: 'white',
|
|
23
|
+
fontSize: '12px'
|
|
24
|
+
}
|
|
4
25
|
|
|
5
26
|
export default {
|
|
6
27
|
title: 'Platformatic/ButtonFullRounded',
|
|
@@ -13,49 +34,62 @@ export default {
|
|
|
13
34
|
bold: {
|
|
14
35
|
type: 'boolean'
|
|
15
36
|
},
|
|
16
|
-
|
|
37
|
+
iconColor: {
|
|
17
38
|
type: 'string',
|
|
18
39
|
control: {
|
|
19
40
|
type: 'radio',
|
|
20
41
|
options: COLORS_ICON
|
|
21
42
|
}
|
|
22
43
|
},
|
|
23
|
-
|
|
44
|
+
iconSize: {
|
|
24
45
|
type: 'string',
|
|
25
46
|
control: {
|
|
26
47
|
type: 'radio',
|
|
27
48
|
options: SIZES
|
|
28
49
|
}
|
|
50
|
+
},
|
|
51
|
+
selected: {
|
|
52
|
+
type: 'boolean'
|
|
29
53
|
}
|
|
30
54
|
}
|
|
31
55
|
}
|
|
32
56
|
|
|
33
57
|
const Template = (args) => <ButtonFullRounded {...args} />
|
|
34
58
|
|
|
35
|
-
export const
|
|
36
|
-
|
|
37
|
-
iconName: 'PlayIcon'
|
|
38
|
-
iconSize: 'large'
|
|
59
|
+
export const SingleButton = Template.bind({})
|
|
60
|
+
SingleButton.args = {
|
|
61
|
+
iconName: 'PlayIcon'
|
|
39
62
|
}
|
|
40
63
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
iconName: 'StopIcon',
|
|
44
|
-
iconColor: 'main-green',
|
|
45
|
-
iconSize: 'small'
|
|
46
|
-
}
|
|
64
|
+
const AllCircleButtonsTemplate = (args) => {
|
|
65
|
+
const icons = Object.values(Icons).filter(icon => icon.name.indexOf('Circle') > -1)
|
|
47
66
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
67
|
+
return (
|
|
68
|
+
<>
|
|
69
|
+
<div style={divStyle}>
|
|
70
|
+
<p style={paragraph}>All Buttons with Circle Icons: {icons.length} </p>
|
|
71
|
+
{icons.map((IconComponent, index) => (
|
|
72
|
+
<div style={row} key={index}>
|
|
73
|
+
<div style={col}>
|
|
74
|
+
<p style={paragraph}>#{index + 1}: {IconComponent.name}</p>
|
|
75
|
+
</div>
|
|
76
|
+
<div style={col}>
|
|
77
|
+
<ButtonFullRounded key={IconComponent.name} iconName={IconComponent.name} iconSize={SMALL} {...args} />
|
|
78
|
+
</div>
|
|
79
|
+
<div style={col}>
|
|
80
|
+
<ButtonFullRounded key={IconComponent.name} iconName={IconComponent.name} iconSize={MEDIUM} {...args} />
|
|
81
|
+
</div>
|
|
82
|
+
<div style={col}>
|
|
83
|
+
<ButtonFullRounded key={IconComponent.name} iconName={IconComponent.name} iconSize={LARGE} {...args} />
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
))}
|
|
87
|
+
</div>
|
|
88
|
+
</>
|
|
89
|
+
)
|
|
53
90
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
iconName: 'StopIcon',
|
|
59
|
-
iconColor: 'error-red',
|
|
60
|
-
disabled: true
|
|
91
|
+
export const AllButtonFullRounded = AllCircleButtonsTemplate.bind({})
|
|
92
|
+
AllButtonFullRounded.args = {
|
|
93
|
+
iconColor: 'white',
|
|
94
|
+
onClick: null
|
|
61
95
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PlatformaticIcon from '../components/PlatformaticIcon'
|
|
3
3
|
import Icons from '../components/icons'
|
|
4
|
-
import { COLORS_ICON } from '../components/constants'
|
|
4
|
+
import { COLORS_ICON, EXTRA_LARGE, EXTRA_SMALL, LARGE, MEDIUM, SMALL } from '../components/constants'
|
|
5
5
|
|
|
6
6
|
const divStyle = {
|
|
7
7
|
width: '100%'
|
|
@@ -64,16 +64,19 @@ const AllIconsTemplate = (args) => {
|
|
|
64
64
|
<p style={paragraph}>#{index + 1}: {IconComponent.name}</p>
|
|
65
65
|
</div>
|
|
66
66
|
<div style={col}>
|
|
67
|
-
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size=
|
|
67
|
+
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={EXTRA_SMALL} {...args} />
|
|
68
68
|
</div>
|
|
69
69
|
<div style={col}>
|
|
70
|
-
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size=
|
|
70
|
+
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={SMALL} {...args} />
|
|
71
71
|
</div>
|
|
72
72
|
<div style={col}>
|
|
73
|
-
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size=
|
|
73
|
+
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={MEDIUM} {...args} />
|
|
74
74
|
</div>
|
|
75
75
|
<div style={col}>
|
|
76
|
-
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size=
|
|
76
|
+
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={LARGE} {...args} />
|
|
77
|
+
</div>
|
|
78
|
+
<div style={col}>
|
|
79
|
+
<PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={EXTRA_LARGE} {...args} />
|
|
77
80
|
</div>
|
|
78
81
|
</div>
|
|
79
82
|
))}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
import TabbedWindow from '../components/TabbedWindow'
|
|
3
|
+
import TextWithLabel from '../components/TextWithLabel'
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Platformatic/TabbedWindow',
|
|
6
|
+
component: TabbedWindow
|
|
7
|
+
}
|
|
8
|
+
const Template = (args) => {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<TabbedWindow {...args} />
|
|
12
|
+
</>
|
|
13
|
+
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
export const Default = Template.bind({})
|
|
17
|
+
Default.args = {
|
|
18
|
+
tabs: [{
|
|
19
|
+
label: 'First',
|
|
20
|
+
component: () => <TextWithLabel label='First component' text='Lorem ipsum dolor sit amet, consectetur adipiscing elit.' />
|
|
21
|
+
}, {
|
|
22
|
+
label: 'Second',
|
|
23
|
+
component: () => <TextWithLabel label='Second component' text='Sed et dui facilisis, molestie urna sed, volutpat nibh' />
|
|
24
|
+
}, {
|
|
25
|
+
label: 'Third',
|
|
26
|
+
component: () => <TextWithLabel label='Third component' text='ivamus est nisl, maximus aliquet urna eu, consequat semper nisi' />
|
|
27
|
+
}]
|
|
28
|
+
}
|