@platformatic/ui-components 0.1.104 → 0.1.106
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-68be35eb.js +206 -0
- package/dist/assets/{index.f8753767.css → index-6fadf156.css} +1 -1
- package/dist/index.html +2 -2
- package/index.js +2 -0
- package/package.json +20 -20
- package/src/components/ModalStepsForward.jsx +90 -0
- package/src/components/ModalStepsForward.module.css +32 -0
- package/src/components/PlatformaticIcon.jsx +4 -4
- package/src/components/constants.js +2 -0
- package/src/components/forms/Field.jsx +1 -1
- package/src/components/forms/Field.module.css +1 -1
- package/src/components/forms/Input.jsx +9 -7
- package/src/components/forms/Input.module.css +19 -5
- package/src/components/forms/Password.jsx +79 -0
- package/src/components/forms/Password.module.css +34 -0
- package/src/components/forms/RadioGroup.jsx +72 -0
- package/src/components/forms/RadioGroup.module.css +37 -0
- package/src/components/forms/Select.jsx +125 -0
- package/src/components/forms/Select.module.css +23 -0
- package/src/components/forms/TextArea.jsx +83 -0
- package/src/components/forms/TextArea.module.css +16 -0
- package/src/components/forms/index.js +13 -1
- package/src/components/icons/AddIcon.jsx +6 -6
- package/src/components/icons/AlertIcon.jsx +6 -6
- package/src/components/icons/AllInOneIcon.jsx +6 -6
- package/src/components/icons/ApiCloudIcon.jsx +6 -6
- package/src/components/icons/ApiEmptyIcon.jsx +4 -4
- package/src/components/icons/ApiIcon.jsx +6 -6
- package/src/components/icons/AppEmptyIcon.jsx +4 -4
- package/src/components/icons/AppIcon.jsx +6 -6
- package/src/components/icons/AppListIcon.jsx +4 -4
- package/src/components/icons/ArrowDownFullIcon.jsx +6 -6
- package/src/components/icons/ArrowDownIcon.jsx +6 -6
- package/src/components/icons/ArrowLeftIcon.jsx +6 -6
- package/src/components/icons/ArrowRightIcon.jsx +6 -6
- package/src/components/icons/ArrowUpIcon.jsx +6 -6
- package/src/components/icons/BellIcon.jsx +6 -6
- package/src/components/icons/BillingIcon.jsx +6 -6
- package/src/components/icons/Calendar1DayIcon.jsx +6 -6
- package/src/components/icons/Calendar7DaysIcon.jsx +6 -6
- package/src/components/icons/CalendarIcon.jsx +6 -6
- package/src/components/icons/ChatGPTIcon.jsx +77 -0
- package/src/components/icons/CheckListIcon.jsx +6 -6
- package/src/components/icons/CircleAddIcon.jsx +6 -6
- package/src/components/icons/CircleArrowLeftIcon.jsx +6 -6
- package/src/components/icons/CircleArrowRightIcon.jsx +6 -6
- package/src/components/icons/CircleCheckMarkFullIcon.jsx +50 -0
- package/src/components/icons/CircleCheckMarkIcon.jsx +6 -6
- package/src/components/icons/CircleCloseHoverIcon.jsx +4 -4
- package/src/components/icons/CircleCloseIcon.jsx +5 -5
- package/src/components/icons/CircleExclamationIcon.jsx +6 -6
- package/src/components/icons/CircleFullIcon.jsx +3 -3
- package/src/components/icons/CircleGearIcon.jsx +6 -6
- package/src/components/icons/CircleTwoArrowsDownIcon.jsx +6 -6
- package/src/components/icons/CircleTwoArrowsUpIcon.jsx +6 -6
- package/src/components/icons/CloseIcon.jsx +6 -6
- package/src/components/icons/ConfigureDatabaseIcon.jsx +89 -0
- package/src/components/icons/CopyPasteIcon.jsx +6 -6
- package/src/components/icons/CreatingAppIcon.jsx +95 -0
- package/src/components/icons/CreditCardIcon.jsx +6 -6
- package/src/components/icons/DatabaseIcon.jsx +6 -6
- package/src/components/icons/DatabaseMigrationIcon.jsx +86 -0
- package/src/components/icons/EditIcon.jsx +6 -6
- package/src/components/icons/EnlargeIcon.jsx +6 -6
- package/src/components/icons/EntryIcon.jsx +6 -6
- package/src/components/icons/ExploreDocIcon.jsx +6 -6
- package/src/components/icons/EyeClosedIcon.jsx +51 -0
- package/src/components/icons/EyeOpenedIcon.jsx +49 -0
- package/src/components/icons/GearIcon.jsx +6 -6
- package/src/components/icons/GenerationLoadingIcon.jsx +3 -3
- package/src/components/icons/GitHubRepoIcon.jsx +108 -0
- package/src/components/icons/GiveOwnershipIcon.jsx +6 -6
- package/src/components/icons/GraphQLIcon.jsx +6 -6
- package/src/components/icons/KeyIcon.jsx +6 -6
- package/src/components/icons/LabelIcon.jsx +3 -3
- package/src/components/icons/LayersIcon.jsx +6 -6
- package/src/components/icons/LensIcon.jsx +6 -6
- package/src/components/icons/LiveIcon.jsx +6 -6
- package/src/components/icons/LoadingAppIcon.jsx +5 -5
- package/src/components/icons/LogOutIcon.jsx +6 -6
- package/src/components/icons/MetricsIcon.jsx +6 -6
- package/src/components/icons/MetricsLoadingIcon.jsx +3 -3
- package/src/components/icons/NameAppIcon.jsx +90 -0
- package/src/components/icons/OrganizationIcon.jsx +6 -6
- package/src/components/icons/PlayIcon.jsx +6 -6
- package/src/components/icons/PullRequestIcon.jsx +6 -6
- package/src/components/icons/PullRequestLoadingIcon.jsx +4 -4
- package/src/components/icons/RequestOwnershipIcon.jsx +6 -6
- package/src/components/icons/RestartIcon.jsx +6 -6
- package/src/components/icons/RocketIcon.jsx +6 -6
- package/src/components/icons/RunningIcon.jsx +83 -0
- package/src/components/icons/SendIcon.jsx +6 -6
- package/src/components/icons/ServiceIcon.jsx +6 -6
- package/src/components/icons/SlotIcon.jsx +6 -6
- package/src/components/icons/SocialDiscordIcon.jsx +6 -6
- package/src/components/icons/SocialGitHubIcon.jsx +6 -6
- package/src/components/icons/SocialGitLabIcon.jsx +9 -9
- package/src/components/icons/SocialLinkedInIcon.jsx +6 -6
- package/src/components/icons/SocialNPMIcon.jsx +6 -6
- package/src/components/icons/SocialTwitterIcon.jsx +6 -6
- package/src/components/icons/StopIcon.jsx +6 -6
- package/src/components/icons/SwitchIcon.jsx +6 -6
- package/src/components/icons/TeamsIcon.jsx +6 -6
- package/src/components/icons/TerminalIcon.jsx +6 -6
- package/src/components/icons/TwoUsersIcon.jsx +6 -6
- package/src/components/icons/UpgradeIcon.jsx +7 -7
- package/src/components/icons/UserIcon.jsx +6 -6
- package/src/components/icons/UserRemoveIcon.jsx +6 -6
- package/src/components/icons/UserRoleIcon.jsx +6 -6
- package/src/components/icons/WorkspaceDynamicIcon.jsx +6 -6
- package/src/components/icons/WorkspaceEmptyIcon.jsx +4 -4
- package/src/components/icons/WorkspaceFailIcon.jsx +7 -7
- package/src/components/icons/WorkspaceGitHubIcon.jsx +7 -7
- package/src/components/icons/WorkspaceLoadingIcon.jsx +4 -4
- package/src/components/icons/WorkspaceReadyIcon.jsx +7 -7
- package/src/components/icons/WorkspaceStaticIcon.jsx +6 -6
- package/src/components/icons/index.js +20 -0
- package/src/stories/ModalStepsForward.stories.jsx +60 -0
- package/src/stories/PlatformaticIcon.stories.jsx +32 -26
- package/src/stories/forms/Password.stories.jsx +63 -0
- package/src/stories/forms/RadioGroup.stories.jsx +77 -0
- package/src/stories/forms/Select.stories.jsx +71 -0
- package/src/stories/forms/TextArea.stories.jsx +73 -0
- package/dist/assets/index.605a6a5e.js +0 -206
- /package/dist/assets/{Montserrat-Regular.dcfe8df2.ttf → Montserrat-Regular-dcfe8df2.ttf} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
import React, { useState } from 'react'
|
|
3
|
+
import Select from '../../components/forms/Select'
|
|
4
|
+
import { MAIN_DARK_BLUE, MAIN_GREEN } from '../../components/constants'
|
|
5
|
+
|
|
6
|
+
const divStyle = {
|
|
7
|
+
width: '100%',
|
|
8
|
+
height: 'auto',
|
|
9
|
+
padding: '20px',
|
|
10
|
+
backgroundColor: 'transparent'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Platformatic/Forms/Select',
|
|
15
|
+
component: Select,
|
|
16
|
+
decorators: [
|
|
17
|
+
(Story) => (
|
|
18
|
+
<div style={divStyle}>
|
|
19
|
+
<Story />
|
|
20
|
+
</div>
|
|
21
|
+
)
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const Template = (args) => <Select {...args} />
|
|
26
|
+
|
|
27
|
+
export const Default = Template.bind({})
|
|
28
|
+
|
|
29
|
+
Default.args = {
|
|
30
|
+
name: 'test',
|
|
31
|
+
placeholder: 'Platformatic empty select',
|
|
32
|
+
borderColor: MAIN_GREEN
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const TemplateBorderMainDarkBlue = (args) => {
|
|
36
|
+
const [value, setValue] = useState('')
|
|
37
|
+
|
|
38
|
+
function handleChange (event) {
|
|
39
|
+
setValue(event.target.value)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function handleSelect (event) {
|
|
43
|
+
setValue(event.detail.label)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div style={{ backgroundColor: 'white', padding: '20px 10px' }}>
|
|
48
|
+
<p>Value of the input {value}</p>
|
|
49
|
+
<Select {...args} value={value} onChange={handleChange} onSelect={handleSelect} />
|
|
50
|
+
</div>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const BorderMainDarkBlue = TemplateBorderMainDarkBlue.bind({})
|
|
55
|
+
|
|
56
|
+
BorderMainDarkBlue.args = {
|
|
57
|
+
name: 'test',
|
|
58
|
+
placeholder: 'Defaul option',
|
|
59
|
+
options: [...Array(20).keys()].map(ele => ({ label: `Option ${ele}`, value: `Value${ele}` })),
|
|
60
|
+
borderColor: MAIN_DARK_BLUE
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const DefaultInvalid = TemplateBorderMainDarkBlue.bind({})
|
|
64
|
+
|
|
65
|
+
DefaultInvalid.args = {
|
|
66
|
+
name: 'test',
|
|
67
|
+
placeholder: 'Platformatic empty select',
|
|
68
|
+
options: [{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }, { label: 'Option 3', value: '3' }],
|
|
69
|
+
borderColor: MAIN_GREEN,
|
|
70
|
+
errorMessage: 'This is an error message'
|
|
71
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
import React, { useState } from 'react'
|
|
3
|
+
import TextArea from '../../components/forms/TextArea'
|
|
4
|
+
|
|
5
|
+
const divStyle = {
|
|
6
|
+
width: '100%',
|
|
7
|
+
height: 'auto',
|
|
8
|
+
padding: '20px',
|
|
9
|
+
backgroundColor: 'white'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Platformatic/Forms/TextArea',
|
|
14
|
+
component: TextArea,
|
|
15
|
+
decorators: [
|
|
16
|
+
(Story) => (
|
|
17
|
+
<div style={divStyle}>
|
|
18
|
+
<Story />
|
|
19
|
+
</div>
|
|
20
|
+
)
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const Template = (args) => <TextArea {...args} />
|
|
25
|
+
|
|
26
|
+
export const Default = Template.bind({})
|
|
27
|
+
|
|
28
|
+
Default.args = {
|
|
29
|
+
name: 'test',
|
|
30
|
+
placeholder: 'Platformatic'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const DefaultInvalid = Template.bind({})
|
|
34
|
+
|
|
35
|
+
DefaultInvalid.args = {
|
|
36
|
+
name: 'test',
|
|
37
|
+
placeholder: 'Platformatic',
|
|
38
|
+
borderColor: 'main-dark-blue',
|
|
39
|
+
errorMessage: 'This is an error message'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const TemplateValuedAndAlertChange = (args) => {
|
|
43
|
+
const [value, setValue] = useState('')
|
|
44
|
+
|
|
45
|
+
function handleChange (event) {
|
|
46
|
+
setValue(event.target.value)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<>
|
|
51
|
+
<p>Value of the input {value}</p>
|
|
52
|
+
<TextArea {...args} value={value} onChange={handleChange} />
|
|
53
|
+
</>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const ValuedAndAlertChange = TemplateValuedAndAlertChange.bind({})
|
|
58
|
+
|
|
59
|
+
ValuedAndAlertChange.args = {
|
|
60
|
+
name: 'test',
|
|
61
|
+
placeholder: 'Platformatic'
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const IconAfter = Template.bind({})
|
|
65
|
+
|
|
66
|
+
IconAfter.args = {
|
|
67
|
+
name: 'test',
|
|
68
|
+
placeholder: 'Platformatic',
|
|
69
|
+
afterIcon: {
|
|
70
|
+
iconName: 'CircleAddIcon',
|
|
71
|
+
color: 'error-red'
|
|
72
|
+
}
|
|
73
|
+
}
|