@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.
Files changed (126) hide show
  1. package/.nvmrc +1 -1
  2. package/dist/assets/index-68be35eb.js +206 -0
  3. package/dist/assets/{index.f8753767.css → index-6fadf156.css} +1 -1
  4. package/dist/index.html +2 -2
  5. package/index.js +2 -0
  6. package/package.json +20 -20
  7. package/src/components/ModalStepsForward.jsx +90 -0
  8. package/src/components/ModalStepsForward.module.css +32 -0
  9. package/src/components/PlatformaticIcon.jsx +4 -4
  10. package/src/components/constants.js +2 -0
  11. package/src/components/forms/Field.jsx +1 -1
  12. package/src/components/forms/Field.module.css +1 -1
  13. package/src/components/forms/Input.jsx +9 -7
  14. package/src/components/forms/Input.module.css +19 -5
  15. package/src/components/forms/Password.jsx +79 -0
  16. package/src/components/forms/Password.module.css +34 -0
  17. package/src/components/forms/RadioGroup.jsx +72 -0
  18. package/src/components/forms/RadioGroup.module.css +37 -0
  19. package/src/components/forms/Select.jsx +125 -0
  20. package/src/components/forms/Select.module.css +23 -0
  21. package/src/components/forms/TextArea.jsx +83 -0
  22. package/src/components/forms/TextArea.module.css +16 -0
  23. package/src/components/forms/index.js +13 -1
  24. package/src/components/icons/AddIcon.jsx +6 -6
  25. package/src/components/icons/AlertIcon.jsx +6 -6
  26. package/src/components/icons/AllInOneIcon.jsx +6 -6
  27. package/src/components/icons/ApiCloudIcon.jsx +6 -6
  28. package/src/components/icons/ApiEmptyIcon.jsx +4 -4
  29. package/src/components/icons/ApiIcon.jsx +6 -6
  30. package/src/components/icons/AppEmptyIcon.jsx +4 -4
  31. package/src/components/icons/AppIcon.jsx +6 -6
  32. package/src/components/icons/AppListIcon.jsx +4 -4
  33. package/src/components/icons/ArrowDownFullIcon.jsx +6 -6
  34. package/src/components/icons/ArrowDownIcon.jsx +6 -6
  35. package/src/components/icons/ArrowLeftIcon.jsx +6 -6
  36. package/src/components/icons/ArrowRightIcon.jsx +6 -6
  37. package/src/components/icons/ArrowUpIcon.jsx +6 -6
  38. package/src/components/icons/BellIcon.jsx +6 -6
  39. package/src/components/icons/BillingIcon.jsx +6 -6
  40. package/src/components/icons/Calendar1DayIcon.jsx +6 -6
  41. package/src/components/icons/Calendar7DaysIcon.jsx +6 -6
  42. package/src/components/icons/CalendarIcon.jsx +6 -6
  43. package/src/components/icons/ChatGPTIcon.jsx +77 -0
  44. package/src/components/icons/CheckListIcon.jsx +6 -6
  45. package/src/components/icons/CircleAddIcon.jsx +6 -6
  46. package/src/components/icons/CircleArrowLeftIcon.jsx +6 -6
  47. package/src/components/icons/CircleArrowRightIcon.jsx +6 -6
  48. package/src/components/icons/CircleCheckMarkFullIcon.jsx +50 -0
  49. package/src/components/icons/CircleCheckMarkIcon.jsx +6 -6
  50. package/src/components/icons/CircleCloseHoverIcon.jsx +4 -4
  51. package/src/components/icons/CircleCloseIcon.jsx +5 -5
  52. package/src/components/icons/CircleExclamationIcon.jsx +6 -6
  53. package/src/components/icons/CircleFullIcon.jsx +3 -3
  54. package/src/components/icons/CircleGearIcon.jsx +6 -6
  55. package/src/components/icons/CircleTwoArrowsDownIcon.jsx +6 -6
  56. package/src/components/icons/CircleTwoArrowsUpIcon.jsx +6 -6
  57. package/src/components/icons/CloseIcon.jsx +6 -6
  58. package/src/components/icons/ConfigureDatabaseIcon.jsx +89 -0
  59. package/src/components/icons/CopyPasteIcon.jsx +6 -6
  60. package/src/components/icons/CreatingAppIcon.jsx +95 -0
  61. package/src/components/icons/CreditCardIcon.jsx +6 -6
  62. package/src/components/icons/DatabaseIcon.jsx +6 -6
  63. package/src/components/icons/DatabaseMigrationIcon.jsx +86 -0
  64. package/src/components/icons/EditIcon.jsx +6 -6
  65. package/src/components/icons/EnlargeIcon.jsx +6 -6
  66. package/src/components/icons/EntryIcon.jsx +6 -6
  67. package/src/components/icons/ExploreDocIcon.jsx +6 -6
  68. package/src/components/icons/EyeClosedIcon.jsx +51 -0
  69. package/src/components/icons/EyeOpenedIcon.jsx +49 -0
  70. package/src/components/icons/GearIcon.jsx +6 -6
  71. package/src/components/icons/GenerationLoadingIcon.jsx +3 -3
  72. package/src/components/icons/GitHubRepoIcon.jsx +108 -0
  73. package/src/components/icons/GiveOwnershipIcon.jsx +6 -6
  74. package/src/components/icons/GraphQLIcon.jsx +6 -6
  75. package/src/components/icons/KeyIcon.jsx +6 -6
  76. package/src/components/icons/LabelIcon.jsx +3 -3
  77. package/src/components/icons/LayersIcon.jsx +6 -6
  78. package/src/components/icons/LensIcon.jsx +6 -6
  79. package/src/components/icons/LiveIcon.jsx +6 -6
  80. package/src/components/icons/LoadingAppIcon.jsx +5 -5
  81. package/src/components/icons/LogOutIcon.jsx +6 -6
  82. package/src/components/icons/MetricsIcon.jsx +6 -6
  83. package/src/components/icons/MetricsLoadingIcon.jsx +3 -3
  84. package/src/components/icons/NameAppIcon.jsx +90 -0
  85. package/src/components/icons/OrganizationIcon.jsx +6 -6
  86. package/src/components/icons/PlayIcon.jsx +6 -6
  87. package/src/components/icons/PullRequestIcon.jsx +6 -6
  88. package/src/components/icons/PullRequestLoadingIcon.jsx +4 -4
  89. package/src/components/icons/RequestOwnershipIcon.jsx +6 -6
  90. package/src/components/icons/RestartIcon.jsx +6 -6
  91. package/src/components/icons/RocketIcon.jsx +6 -6
  92. package/src/components/icons/RunningIcon.jsx +83 -0
  93. package/src/components/icons/SendIcon.jsx +6 -6
  94. package/src/components/icons/ServiceIcon.jsx +6 -6
  95. package/src/components/icons/SlotIcon.jsx +6 -6
  96. package/src/components/icons/SocialDiscordIcon.jsx +6 -6
  97. package/src/components/icons/SocialGitHubIcon.jsx +6 -6
  98. package/src/components/icons/SocialGitLabIcon.jsx +9 -9
  99. package/src/components/icons/SocialLinkedInIcon.jsx +6 -6
  100. package/src/components/icons/SocialNPMIcon.jsx +6 -6
  101. package/src/components/icons/SocialTwitterIcon.jsx +6 -6
  102. package/src/components/icons/StopIcon.jsx +6 -6
  103. package/src/components/icons/SwitchIcon.jsx +6 -6
  104. package/src/components/icons/TeamsIcon.jsx +6 -6
  105. package/src/components/icons/TerminalIcon.jsx +6 -6
  106. package/src/components/icons/TwoUsersIcon.jsx +6 -6
  107. package/src/components/icons/UpgradeIcon.jsx +7 -7
  108. package/src/components/icons/UserIcon.jsx +6 -6
  109. package/src/components/icons/UserRemoveIcon.jsx +6 -6
  110. package/src/components/icons/UserRoleIcon.jsx +6 -6
  111. package/src/components/icons/WorkspaceDynamicIcon.jsx +6 -6
  112. package/src/components/icons/WorkspaceEmptyIcon.jsx +4 -4
  113. package/src/components/icons/WorkspaceFailIcon.jsx +7 -7
  114. package/src/components/icons/WorkspaceGitHubIcon.jsx +7 -7
  115. package/src/components/icons/WorkspaceLoadingIcon.jsx +4 -4
  116. package/src/components/icons/WorkspaceReadyIcon.jsx +7 -7
  117. package/src/components/icons/WorkspaceStaticIcon.jsx +6 -6
  118. package/src/components/icons/index.js +20 -0
  119. package/src/stories/ModalStepsForward.stories.jsx +60 -0
  120. package/src/stories/PlatformaticIcon.stories.jsx +32 -26
  121. package/src/stories/forms/Password.stories.jsx +63 -0
  122. package/src/stories/forms/RadioGroup.stories.jsx +77 -0
  123. package/src/stories/forms/Select.stories.jsx +71 -0
  124. package/src/stories/forms/TextArea.stories.jsx +73 -0
  125. package/dist/assets/index.605a6a5e.js +0 -206
  126. /package/dist/assets/{Montserrat-Regular.dcfe8df2.ttf → Montserrat-Regular-dcfe8df2.ttf} +0 -0
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import styles from './Icons.module.css'
4
- import { COLORS_ICON, SIZES } from '../constants'
4
+ import { COLORS_ICON, SIZES, MEDIUM, EXTRA_LARGE, MAIN_DARK_BLUE } from '../constants'
5
5
 
6
6
  const WorkspaceEmptyIcon = ({ color, size }) => {
7
7
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
8
8
  let icon = <></>
9
9
 
10
10
  switch (size) {
11
- case 'extra-large':
11
+ case EXTRA_LARGE:
12
12
  icon = (
13
13
  <svg width={104} height={105} viewBox='0 0 104 105' fill='none' xmlns='http://www.w3.org/2000/svg' className={className}>
14
14
  <path d='M29.8467 60.0705V87.4275C29.8467 87.9797 30.2944 88.4275 30.8467 88.4275H73.1544C73.7067 88.4275 74.1544 87.9797 74.1544 87.4275V60.0705' stroke='none' strokeWidth={3} strokeLinecap='round' />
@@ -48,8 +48,8 @@ WorkspaceEmptyIcon.propTypes = {
48
48
  }
49
49
 
50
50
  WorkspaceEmptyIcon.defaultProps = {
51
- color: 'main-dark-blue',
52
- size: 'medium'
51
+ color: MAIN_DARK_BLUE,
52
+ size: MEDIUM
53
53
  }
54
54
 
55
55
  export default WorkspaceEmptyIcon
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import styles from './Icons.module.css'
4
- import { COLORS_ICON, SIZES } from '../constants'
4
+ import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, EXTRA_LARGE, MAIN_DARK_BLUE } from '../constants'
5
5
 
6
6
  const WorkspaceFailIcon = ({ color, size }) => {
7
7
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
8
8
  let icon = <></>
9
9
 
10
10
  switch (size) {
11
- case 'small':
11
+ case SMALL:
12
12
  icon = (
13
13
  <svg
14
14
  width={16}
@@ -28,7 +28,7 @@ const WorkspaceFailIcon = ({ color, size }) => {
28
28
  </svg>
29
29
  )
30
30
  break
31
- case 'medium':
31
+ case MEDIUM:
32
32
  icon = (
33
33
  <svg
34
34
  width={24}
@@ -47,7 +47,7 @@ const WorkspaceFailIcon = ({ color, size }) => {
47
47
  </svg>
48
48
  )
49
49
  break
50
- case 'large':
50
+ case LARGE:
51
51
  icon = (
52
52
  <svg
53
53
  width={40}
@@ -67,7 +67,7 @@ const WorkspaceFailIcon = ({ color, size }) => {
67
67
  )
68
68
  break
69
69
 
70
- case 'extra-large':
70
+ case EXTRA_LARGE:
71
71
  icon = (
72
72
  <svg
73
73
  width={120}
@@ -106,8 +106,8 @@ WorkspaceFailIcon.propTypes = {
106
106
  }
107
107
 
108
108
  WorkspaceFailIcon.defaultProps = {
109
- color: 'main-dark-blue',
110
- size: 'medium'
109
+ color: MAIN_DARK_BLUE,
110
+ size: MEDIUM
111
111
  }
112
112
 
113
113
  export default WorkspaceFailIcon
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import styles from './Icons.module.css'
4
- import { COLORS_ICON, SIZES } from '../constants'
4
+ import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, EXTRA_LARGE, MAIN_DARK_BLUE } from '../constants'
5
5
 
6
6
  const WorkspaceGitHubIcon = ({ color, size }) => {
7
7
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
@@ -9,7 +9,7 @@ const WorkspaceGitHubIcon = ({ color, size }) => {
9
9
  let icon = <></>
10
10
 
11
11
  switch (size) {
12
- case 'small':
12
+ case SMALL:
13
13
  icon = (
14
14
  <svg
15
15
  width={16}
@@ -33,7 +33,7 @@ const WorkspaceGitHubIcon = ({ color, size }) => {
33
33
  </svg>
34
34
  )
35
35
  break
36
- case 'medium':
36
+ case MEDIUM:
37
37
  icon = (
38
38
  <svg
39
39
  width={24}
@@ -57,7 +57,7 @@ const WorkspaceGitHubIcon = ({ color, size }) => {
57
57
  </svg>
58
58
  )
59
59
  break
60
- case 'large':
60
+ case LARGE:
61
61
  icon = (
62
62
  <svg
63
63
  width={40}
@@ -82,7 +82,7 @@ const WorkspaceGitHubIcon = ({ color, size }) => {
82
82
  )
83
83
  break
84
84
 
85
- case 'extra-large':
85
+ case EXTRA_LARGE:
86
86
  icon = (
87
87
  <svg
88
88
  width={120}
@@ -125,8 +125,8 @@ WorkspaceGitHubIcon.propTypes = {
125
125
  }
126
126
 
127
127
  WorkspaceGitHubIcon.defaultProps = {
128
- color: 'main-dark-blue',
129
- size: 'medium'
128
+ color: MAIN_DARK_BLUE,
129
+ size: MEDIUM
130
130
  }
131
131
 
132
132
  export default WorkspaceGitHubIcon
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import styles from './Icons.module.css'
4
- import { COLORS_ICON, SIZES } from '../constants'
4
+ import { COLORS_ICON, SIZES, EXTRA_LARGE, MEDIUM, MAIN_DARK_BLUE } from '../constants'
5
5
 
6
6
  const WorkspaceLoadingIcon = ({ color, size }) => {
7
7
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
@@ -10,7 +10,7 @@ const WorkspaceLoadingIcon = ({ color, size }) => {
10
10
  let icon = <></>
11
11
 
12
12
  switch (size) {
13
- case 'extra-large':
13
+ case EXTRA_LARGE:
14
14
  icon = (
15
15
  <svg
16
16
  width={105}
@@ -50,8 +50,8 @@ WorkspaceLoadingIcon.propTypes = {
50
50
  }
51
51
 
52
52
  WorkspaceLoadingIcon.defaultProps = {
53
- color: 'main-dark-blue',
54
- size: 'medium'
53
+ color: MAIN_DARK_BLUE,
54
+ size: MEDIUM
55
55
  }
56
56
 
57
57
  export default WorkspaceLoadingIcon
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import styles from './Icons.module.css'
4
- import { COLORS_ICON, SIZES } from '../constants'
4
+ import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, EXTRA_LARGE, MAIN_DARK_BLUE } from '../constants'
5
5
 
6
6
  const WorkspaceReadyIcon = ({ color, size }) => {
7
7
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
8
8
  let icon = <></>
9
9
 
10
10
  switch (size) {
11
- case 'small':
11
+ case SMALL:
12
12
  icon = (
13
13
  <svg
14
14
  width={16}
@@ -27,7 +27,7 @@ const WorkspaceReadyIcon = ({ color, size }) => {
27
27
  </svg>
28
28
  )
29
29
  break
30
- case 'medium':
30
+ case MEDIUM:
31
31
  icon = (
32
32
  <svg
33
33
  width={24}
@@ -45,7 +45,7 @@ const WorkspaceReadyIcon = ({ color, size }) => {
45
45
  </svg>
46
46
  )
47
47
  break
48
- case 'large':
48
+ case LARGE:
49
49
  icon = (
50
50
  <svg
51
51
  width={40}
@@ -64,7 +64,7 @@ const WorkspaceReadyIcon = ({ color, size }) => {
64
64
  </svg>
65
65
  )
66
66
  break
67
- case 'extra-large':
67
+ case EXTRA_LARGE:
68
68
  icon = (
69
69
  <svg
70
70
  width={120}
@@ -138,8 +138,8 @@ WorkspaceReadyIcon.propTypes = {
138
138
  }
139
139
 
140
140
  WorkspaceReadyIcon.defaultProps = {
141
- color: 'main-dark-blue',
142
- size: 'medium'
141
+ color: MAIN_DARK_BLUE,
142
+ size: MEDIUM
143
143
  }
144
144
 
145
145
  export default WorkspaceReadyIcon
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import styles from './Icons.module.css'
4
- import { COLORS_ICON, SIZES } from '../constants'
4
+ import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, MAIN_DARK_BLUE } from '../constants'
5
5
 
6
6
  const WorkspaceStaticIcon = ({ color, size }) => {
7
7
  const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
8
8
  let icon = <></>
9
9
 
10
10
  switch (size) {
11
- case 'small':
11
+ case SMALL:
12
12
  icon = (
13
13
  <svg
14
14
  width={16}
@@ -25,7 +25,7 @@ const WorkspaceStaticIcon = ({ color, size }) => {
25
25
  </svg>
26
26
  )
27
27
  break
28
- case 'medium':
28
+ case MEDIUM:
29
29
  icon = (
30
30
  <svg
31
31
  width={24}
@@ -42,7 +42,7 @@ const WorkspaceStaticIcon = ({ color, size }) => {
42
42
  </svg>
43
43
  )
44
44
  break
45
- case 'large':
45
+ case LARGE:
46
46
  icon = (
47
47
  <svg
48
48
  width={40}
@@ -78,8 +78,8 @@ WorkspaceStaticIcon.propTypes = {
78
78
  }
79
79
 
80
80
  WorkspaceStaticIcon.defaultProps = {
81
- color: 'main-dark-blue',
82
- size: 'medium'
81
+ color: MAIN_DARK_BLUE,
82
+ size: MEDIUM
83
83
  }
84
84
 
85
85
  export default WorkspaceStaticIcon
@@ -19,11 +19,13 @@ import BillingIcon from './BillingIcon'
19
19
  import CalendarIcon from './CalendarIcon'
20
20
  import Calendar1DayIcon from './Calendar1DayIcon'
21
21
  import Calendar7DaysIcon from './Calendar7DaysIcon'
22
+ import ChatGPTIcon from './ChatGPTIcon'
22
23
  import CheckListIcon from './CheckListIcon'
23
24
  import CircleAddIcon from './CircleAddIcon'
24
25
  import CircleArrowLeftIcon from './CircleArrowLeftIcon'
25
26
  import CircleArrowRightIcon from './CircleArrowRightIcon'
26
27
  import CircleCheckMarkIcon from './CircleCheckMarkIcon'
28
+ import CircleCheckMarkFullIcon from './CircleCheckMarkFullIcon'
27
29
  import CircleCloseIcon from './CircleCloseIcon'
28
30
  import CircleCloseHoverIcon from './CircleCloseHoverIcon'
29
31
  import CircleExclamationIcon from './CircleExclamationIcon'
@@ -34,7 +36,12 @@ import CircleTwoArrowsUpIcon from './CircleTwoArrowsUpIcon'
34
36
  import CloseIcon from './CloseIcon'
35
37
  import CreditCardIcon from './CreditCardIcon'
36
38
  import CopyPasteIcon from './CopyPasteIcon'
39
+ import ConfigureDatabaseIcon from './ConfigureDatabaseIcon'
40
+ import CreatingAppIcon from './CreatingAppIcon'
37
41
  import DatabaseIcon from './DatabaseIcon'
42
+ import DatabaseMigrationIcon from './DatabaseMigrationIcon'
43
+ import EyeClosedIcon from './EyeClosedIcon'
44
+ import EyeOpenedIcon from './EyeOpenedIcon'
38
45
  import EditIcon from './EditIcon'
39
46
  import ExploreDocIcon from './ExploreDocIcon'
40
47
  import EnlargeIcon from './EnlargeIcon'
@@ -42,6 +49,7 @@ import EntryIcon from './EntryIcon'
42
49
  import GearIcon from './GearIcon'
43
50
  import GenerationLoadingIcon from './GenerationLoadingIcon'
44
51
  import GiveOwnershipIcon from './GiveOwnershipIcon'
52
+ import GitHubRepoIcon from './GitHubRepoIcon'
45
53
  import GraphQLIcon from './GraphQLIcon'
46
54
  import KeyIcon from './KeyIcon'
47
55
  import LabelIcon from './LabelIcon'
@@ -52,6 +60,7 @@ import LoadingAppIcon from './LoadingAppIcon'
52
60
  import LogOutIcon from './LogOutIcon'
53
61
  import MetricsIcon from './MetricsIcon'
54
62
  import MetricsLoadingIcon from './MetricsLoadingIcon'
63
+ import NameAppIcon from './NameAppIcon'
55
64
  import OrganizationIcon from './OrganizationIcon'
56
65
  import PlayIcon from './PlayIcon'
57
66
  import PullRequestIcon from './PullRequestIcon'
@@ -59,6 +68,7 @@ import PullRequestLoadingIcon from './PullRequestLoadingIcon'
59
68
  import RequestOwnershipIcon from './RequestOwnershipIcon'
60
69
  import RestartIcon from './RestartIcon'
61
70
  import RocketIcon from './RocketIcon'
71
+ import RunningIcon from './RunningIcon'
62
72
  import SendIcon from './SendIcon'
63
73
  import ServiceIcon from './ServiceIcon'
64
74
  import SlotIcon from './SlotIcon'
@@ -107,11 +117,13 @@ export default {
107
117
  CalendarIcon,
108
118
  Calendar1DayIcon,
109
119
  Calendar7DaysIcon,
120
+ ChatGPTIcon,
110
121
  CheckListIcon,
111
122
  CircleAddIcon,
112
123
  CircleArrowLeftIcon,
113
124
  CircleArrowRightIcon,
114
125
  CircleCheckMarkIcon,
126
+ CircleCheckMarkFullIcon,
115
127
  CircleExclamationIcon,
116
128
  CircleCloseIcon,
117
129
  CircleCloseHoverIcon,
@@ -122,14 +134,20 @@ export default {
122
134
  CloseIcon,
123
135
  CreditCardIcon,
124
136
  CopyPasteIcon,
137
+ ConfigureDatabaseIcon,
138
+ CreatingAppIcon,
125
139
  DatabaseIcon,
140
+ DatabaseMigrationIcon,
126
141
  EditIcon,
142
+ EyeClosedIcon,
143
+ EyeOpenedIcon,
127
144
  ExploreDocIcon,
128
145
  EnlargeIcon,
129
146
  EntryIcon,
130
147
  GearIcon,
131
148
  GenerationLoadingIcon,
132
149
  GiveOwnershipIcon,
150
+ GitHubRepoIcon,
133
151
  GraphQLIcon,
134
152
  KeyIcon,
135
153
  LabelIcon,
@@ -140,6 +158,7 @@ export default {
140
158
  LogOutIcon,
141
159
  MetricsIcon,
142
160
  MetricsLoadingIcon,
161
+ NameAppIcon,
143
162
  OrganizationIcon,
144
163
  PlayIcon,
145
164
  PullRequestIcon,
@@ -147,6 +166,7 @@ export default {
147
166
  RequestOwnershipIcon,
148
167
  RestartIcon,
149
168
  RocketIcon,
169
+ RunningIcon,
150
170
  SendIcon,
151
171
  ServiceIcon,
152
172
  StopIcon,
@@ -0,0 +1,60 @@
1
+ import React, { useState } from 'react'
2
+ import ModalStepsForward from '../components/ModalStepsForward'
3
+ import Button from '../components/Button'
4
+ import { MAIN_DARK_BLUE, MAIN_GREEN, MODAL_LAYOUTS, MODAL_SIZES } from '../components/constants'
5
+ export default {
6
+ title: 'Platformatic/ModalStepsForward',
7
+ component: ModalStepsForward,
8
+ argTypes: {
9
+ layout: {
10
+ type: 'string',
11
+ control: {
12
+ type: 'radio',
13
+ options: MODAL_LAYOUTS
14
+ }
15
+ },
16
+ size: {
17
+ type: 'string',
18
+ control: {
19
+ type: 'radio',
20
+ options: MODAL_SIZES
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ const Template = (args) => {
27
+ const [isOpen, setIsOpen] = useState(false)
28
+ const { text, ...rest } = args
29
+ return (
30
+ <main>
31
+ <Button color={MAIN_GREEN} backgroundColor={MAIN_DARK_BLUE} onClick={() => setIsOpen(true)} label='Open Modal' bold />
32
+ {isOpen && <ModalStepsForward setIsOpen={setIsOpen} {...rest}>{text}</ModalStepsForward>}
33
+ </main>
34
+ )
35
+ }
36
+
37
+ export const Default = Template.bind({})
38
+ Default.args = {}
39
+
40
+ export const SmallContentLeft = Template.bind({})
41
+ SmallContentLeft.args = {
42
+ left: <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin iaculis, elit aliquam ullamcorper consectetur, nunc erat blandit turpis, dignissim efficitur risus eros a erat. Vestibulum rutrum odio turpis, vel mollis neque ullamcorper at. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin accumsan leo sed nunc tristique tempor. Duis sit amet viverra nunc. Aliquam vehicula elit ut sodales pharetra. Sed imperdiet tempor urna id porta. Nullam ante velit, aliquet a eleifend quis, vulputate sit amet metus. Nullam faucibus libero at velit mattis tempus. Suspendisse potenti. Sed vitae enim ut magna rutrum volutpat at sed augue. Sed sed neque porttitor, gravida lorem vitae, semper felis.</div>
43
+ }
44
+
45
+ export const LongContentLeft = Template.bind({})
46
+ LongContentLeft.args = {
47
+ left: (
48
+ <div>
49
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin iaculis, elit aliquam ullamcorper consectetur, nunc erat blandit turpis, dignissim efficitur risus eros a erat. Vestibulum rutrum odio turpis, vel mollis neque ullamcorper at. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin accumsan leo sed nunc tristique tempor. Duis sit amet viverra nunc. Aliquam vehicula elit ut sodales pharetra. Sed imperdiet tempor urna id porta. Nullam ante velit, aliquet a eleifend quis, vulputate sit amet metus. Nullam faucibus libero at velit mattis tempus. Suspendisse potenti. Sed vitae enim ut magna rutrum volutpat at sed augue. Sed sed neque porttitor, gravida lorem vitae, semper felis.
50
+ <br /><br />
51
+ Mauris eget ultrices eros. Maecenas condimentum tristique odio, sit amet pellentesque lacus pretium sit amet. Etiam sed egestas nibh. Curabitur auctor posuere ante vel tempor. Etiam a vehicula erat. Cras aliquet eros ut magna vestibulum rhoncus. Sed sed vestibulum metus. Nam sed magna velit. Sed sit amet fermentum libero. Maecenas et faucibus elit. Integer ligula magna, congue et posuere nec, lobortis sed dui. Suspendisse potenti. Cras vestibulum nunc non volutpat tempus. In ultrices elementum consectetur. Vestibulum justo risus, rutrum et augue ac, suscipit lobortis erat. Sed rutrum sem at tortor molestie, tempus sagittis diam pulvinar.
52
+ <br /><br />
53
+ Nullam lacinia tortor ipsum. Curabitur nec nulla ut orci volutpat pulvinar ac ut sapien. Vestibulum aliquet ultricies leo, in cursus nibh cursus nec. In eget faucibus lorem. Sed fringilla efficitur tellus. Cras faucibus mauris eget dolor vehicula auctor. Vestibulum dignissim orci id fringilla bibendum.
54
+ <br /><br />
55
+ Morbi maximus sem ac nulla bibendum, eleifend blandit nunc sodales. Quisque maximus dapibus diam eu condimentum. Aenean ac justo viverra, pellentesque eros id, porta lectus. In ac risus orci. Fusce eleifend sollicitudin pellentesque. Nulla facilisi. Aenean nec nunc ut felis bibendum bibendum. Sed quam neque, scelerisque nec luctus a, facilisis non ante.
56
+ <br /><br />
57
+ Nullam id mauris vitae mi dignissim consequat eget sed leo. Maecenas venenatis orci sed blandit lobortis. Donec a purus risus. Phasellus mollis sem a ipsum cursus ultricies. Sed malesuada sit amet mi a ullamcorper. Mauris sodales eget nulla at porttitor. Etiam arcu mi, efficitur hendrerit metus ut, blandit molestie sapien. Nunc commodo justo nec mi volutpat, sit amet cursus tortor eleifend. Pellentesque tincidunt ac mauris at faucibus. Quisque sed purus quis nibh aliquet ullamcorper. Nunc est sem, accumsan eu pellentesque non, volutpat a nisl. Proin eu dolor ac quam dictum lobortis at ut elit. Aenean nec dui orci. Praesent aliquet eget metus vel elementum.
58
+ </div>
59
+ )
60
+ }
@@ -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, EXTRA_LARGE, EXTRA_SMALL, LARGE, MEDIUM, SMALL } from '../components/constants'
4
+ import { COLORS_ICON, EXTRA_LARGE, EXTRA_SMALL, LARGE, MEDIUM, SIZES, SMALL, WHITE } from '../components/constants'
5
5
 
6
6
  const divStyle = {
7
7
  width: '100%'
@@ -27,25 +27,28 @@ export default {
27
27
  title: 'Platformatic/PlatformaticIcon',
28
28
  component: PlatformaticIcon,
29
29
  argTypes: {
30
- color: {
31
- type: 'string',
32
- control: {
33
- type: 'radio',
34
- options: COLORS_ICON
35
- }
36
- },
37
- size: {
38
- type: 'string',
39
- control: {
40
- type: 'radio',
41
- options: ['small', 'medium', 'large', 'extra-large']
42
- }
43
- },
44
30
  checked: {
45
31
  type: 'boolean',
46
32
  control: {
47
33
  type: 'boolean'
48
34
  }
35
+ },
36
+ classes: {
37
+ type: 'string'
38
+ },
39
+ color: {
40
+ options: COLORS_ICON,
41
+ control: { type: 'radio' }
42
+ },
43
+ onClick: {
44
+ type: 'function'
45
+ },
46
+ size: {
47
+ options: SIZES,
48
+ control: { type: 'radio' }
49
+ },
50
+ tip: {
51
+ type: 'string'
49
52
  }
50
53
  }
51
54
  }
@@ -58,40 +61,43 @@ PlatformaticIconDefault.args = {
58
61
  }
59
62
 
60
63
  const AllIconsTemplate = (args) => {
61
- const icons = Object.values(Icons)
64
+ const icons = Object.keys(Icons)
62
65
 
63
66
  return (
64
67
  <>
65
68
  <div style={divStyle}>
66
69
  <p style={paragraph}> All Platformatic Icons: {icons.length} </p>
67
- {icons.map((IconComponent, index) => (
70
+ {icons.map((icon, index) => (
68
71
  <div style={row} key={index}>
69
72
  <div style={col}>
70
- <p style={paragraph}>#{index + 1}: {IconComponent.name}</p>
73
+ <p style={paragraph}>#{index + 1}: {icon}</p>
71
74
  </div>
72
75
  <div style={col}>
73
- <PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={EXTRA_SMALL} {...args} />
76
+ <PlatformaticIcon key={icon} iconName={icon} size={EXTRA_SMALL} {...args} />
74
77
  </div>
75
78
  <div style={col}>
76
- <PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={SMALL} {...args} />
79
+ <PlatformaticIcon key={icon} iconName={icon} size={SMALL} {...args} />
77
80
  </div>
78
81
  <div style={col}>
79
- <PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={MEDIUM} {...args} />
82
+ <PlatformaticIcon key={icon} iconName={icon} size={MEDIUM} {...args} />
80
83
  </div>
81
84
  <div style={col}>
82
- <PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={LARGE} {...args} />
85
+ <PlatformaticIcon key={icon} iconName={icon} size={LARGE} {...args} />
83
86
  </div>
84
87
  <div style={col}>
85
- <PlatformaticIcon key={IconComponent.name} iconName={IconComponent.name} size={EXTRA_LARGE} {...args} />
88
+ <PlatformaticIcon key={icon} iconName={icon} size={EXTRA_LARGE} {...args} />
86
89
  </div>
87
90
  </div>
88
- ))}
91
+ )
92
+ )}
89
93
  </div>
90
94
  </>
91
95
  )
92
96
  }
93
97
  export const PlatformaticIconAll = AllIconsTemplate.bind({})
94
98
  PlatformaticIconAll.args = {
95
- color: 'white',
96
- onClick: null
99
+ color: WHITE,
100
+ classes: '',
101
+ onClick: null,
102
+ tip: ''
97
103
  }
@@ -0,0 +1,63 @@
1
+ 'use strict'
2
+ import React, { useState } from 'react'
3
+ import Password from '../../components/forms/Password'
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/Password',
14
+ component: Password,
15
+ decorators: [
16
+ (Story) => (
17
+ <div style={divStyle}>
18
+ <Story />
19
+ </div>
20
+ )
21
+ ]
22
+ }
23
+
24
+ const Template = (args) => {
25
+ const [value, setValue] = useState('')
26
+
27
+ function handleChange (event) {
28
+ setValue(event.target.value)
29
+ }
30
+
31
+ return (
32
+ <>
33
+ <p>Value of the input {value}</p>
34
+ <Password {...args} value={value} onChange={handleChange} />
35
+ </>
36
+ )
37
+ }
38
+
39
+ export const Default = Template.bind({})
40
+
41
+ Default.args = {
42
+ name: 'test',
43
+ placeholder: 'Platformatic'
44
+ }
45
+
46
+ const TemplateBorderMainDarkBlue = (args) => <div style={{ backgroundColor: 'white', padding: '2px' }}><Password {...args} /></div>
47
+
48
+ export const BorderMainDarkBlue = TemplateBorderMainDarkBlue.bind({})
49
+
50
+ BorderMainDarkBlue.args = {
51
+ name: 'test',
52
+ placeholder: 'Platformatic',
53
+ borderColor: 'main-dark-blue'
54
+ }
55
+
56
+ export const DefaultInvalid = Template.bind({})
57
+
58
+ DefaultInvalid.args = {
59
+ name: 'test',
60
+ placeholder: 'Platformatic',
61
+ borderColor: 'main-dark-blue',
62
+ errorMessage: 'This is an error message'
63
+ }
@@ -0,0 +1,77 @@
1
+ 'use strict'
2
+ import React, { useState } from 'react'
3
+ import RadioGroup from '../../components/forms/RadioGroup'
4
+
5
+ const divStyle = {
6
+ width: '100%',
7
+ height: 'auto',
8
+ padding: '20px',
9
+ backgroundColor: 'white'
10
+ }
11
+
12
+ const radios = [{ label: 'One', value: '1' }, { label: 'Two', value: '2' }, { label: 'Three', value: '3' }]
13
+
14
+ export default {
15
+ title: 'Platformatic/Forms/RadioGroup',
16
+ component: RadioGroup,
17
+ decorators: [
18
+ (Story) => (
19
+ <div style={divStyle}>
20
+ <Story />
21
+ </div>
22
+ )
23
+ ]
24
+ }
25
+
26
+ const Template = (args) => {
27
+ const [value, setValue] = useState(args.value || '')
28
+
29
+ function handleChange (event) {
30
+ setValue(event.target.value)
31
+ }
32
+
33
+ return (
34
+ <>
35
+ <p>Value of the radio {value}</p>
36
+ <RadioGroup {...args} value={value} onChange={handleChange} />
37
+ </>
38
+ )
39
+ }
40
+
41
+ export const Default = Template.bind({})
42
+
43
+ Default.args = {
44
+ name: 'test',
45
+ radios
46
+ }
47
+
48
+ export const DefaultInvalid = Template.bind({})
49
+
50
+ DefaultInvalid.args = {
51
+ name: 'test',
52
+ radios,
53
+ errorMessage: 'This is an error message'
54
+ }
55
+
56
+ export const Disabled = Template.bind({})
57
+
58
+ Disabled.args = {
59
+ name: 'test',
60
+ radios,
61
+ disabled: true
62
+ }
63
+
64
+ export const Empty = Template.bind({})
65
+
66
+ Empty.args = {
67
+ name: 'test',
68
+ radios: []
69
+ }
70
+
71
+ export const ValueSelected = Template.bind({})
72
+
73
+ ValueSelected.args = {
74
+ name: 'test',
75
+ radios,
76
+ value: '3'
77
+ }