@platformatic/ui-components 0.1.105 → 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 (96) hide show
  1. package/dist/assets/index-68be35eb.js +206 -0
  2. package/dist/index.html +1 -1
  3. package/package.json +1 -1
  4. package/src/components/PlatformaticIcon.jsx +4 -4
  5. package/src/components/forms/RadioGroup.jsx +1 -1
  6. package/src/components/forms/TextArea.jsx +1 -1
  7. package/src/components/icons/AddIcon.jsx +6 -6
  8. package/src/components/icons/AlertIcon.jsx +6 -6
  9. package/src/components/icons/AllInOneIcon.jsx +6 -6
  10. package/src/components/icons/ApiCloudIcon.jsx +6 -6
  11. package/src/components/icons/ApiEmptyIcon.jsx +4 -4
  12. package/src/components/icons/ApiIcon.jsx +6 -6
  13. package/src/components/icons/AppEmptyIcon.jsx +4 -4
  14. package/src/components/icons/AppIcon.jsx +6 -6
  15. package/src/components/icons/AppListIcon.jsx +4 -4
  16. package/src/components/icons/ArrowDownFullIcon.jsx +6 -6
  17. package/src/components/icons/ArrowDownIcon.jsx +6 -6
  18. package/src/components/icons/ArrowLeftIcon.jsx +6 -6
  19. package/src/components/icons/ArrowRightIcon.jsx +6 -6
  20. package/src/components/icons/ArrowUpIcon.jsx +6 -6
  21. package/src/components/icons/BellIcon.jsx +6 -6
  22. package/src/components/icons/BillingIcon.jsx +6 -6
  23. package/src/components/icons/Calendar1DayIcon.jsx +6 -6
  24. package/src/components/icons/Calendar7DaysIcon.jsx +6 -6
  25. package/src/components/icons/CalendarIcon.jsx +6 -6
  26. package/src/components/icons/ChatGPTIcon.jsx +77 -0
  27. package/src/components/icons/CheckListIcon.jsx +6 -6
  28. package/src/components/icons/CircleAddIcon.jsx +6 -6
  29. package/src/components/icons/CircleArrowLeftIcon.jsx +6 -6
  30. package/src/components/icons/CircleArrowRightIcon.jsx +6 -6
  31. package/src/components/icons/CircleCheckMarkFullIcon.jsx +4 -4
  32. package/src/components/icons/CircleCheckMarkIcon.jsx +6 -6
  33. package/src/components/icons/CircleCloseHoverIcon.jsx +4 -4
  34. package/src/components/icons/CircleCloseIcon.jsx +5 -5
  35. package/src/components/icons/CircleExclamationIcon.jsx +6 -6
  36. package/src/components/icons/CircleFullIcon.jsx +3 -3
  37. package/src/components/icons/CircleGearIcon.jsx +6 -6
  38. package/src/components/icons/CircleTwoArrowsDownIcon.jsx +6 -6
  39. package/src/components/icons/CircleTwoArrowsUpIcon.jsx +6 -6
  40. package/src/components/icons/CloseIcon.jsx +6 -6
  41. package/src/components/icons/CopyPasteIcon.jsx +6 -6
  42. package/src/components/icons/CreditCardIcon.jsx +6 -6
  43. package/src/components/icons/DatabaseIcon.jsx +6 -6
  44. package/src/components/icons/EditIcon.jsx +6 -6
  45. package/src/components/icons/EnlargeIcon.jsx +6 -6
  46. package/src/components/icons/EntryIcon.jsx +6 -6
  47. package/src/components/icons/ExploreDocIcon.jsx +6 -6
  48. package/src/components/icons/GearIcon.jsx +6 -6
  49. package/src/components/icons/GenerationLoadingIcon.jsx +3 -3
  50. package/src/components/icons/GiveOwnershipIcon.jsx +6 -6
  51. package/src/components/icons/GraphQLIcon.jsx +6 -6
  52. package/src/components/icons/KeyIcon.jsx +6 -6
  53. package/src/components/icons/LabelIcon.jsx +3 -3
  54. package/src/components/icons/LayersIcon.jsx +6 -6
  55. package/src/components/icons/LensIcon.jsx +6 -6
  56. package/src/components/icons/LiveIcon.jsx +6 -6
  57. package/src/components/icons/LoadingAppIcon.jsx +5 -5
  58. package/src/components/icons/LogOutIcon.jsx +6 -6
  59. package/src/components/icons/MetricsIcon.jsx +6 -6
  60. package/src/components/icons/MetricsLoadingIcon.jsx +3 -3
  61. package/src/components/icons/OrganizationIcon.jsx +6 -6
  62. package/src/components/icons/PlayIcon.jsx +6 -6
  63. package/src/components/icons/PullRequestIcon.jsx +6 -6
  64. package/src/components/icons/PullRequestLoadingIcon.jsx +4 -4
  65. package/src/components/icons/RequestOwnershipIcon.jsx +6 -6
  66. package/src/components/icons/RestartIcon.jsx +6 -6
  67. package/src/components/icons/RocketIcon.jsx +6 -6
  68. package/src/components/icons/RunningIcon.jsx +6 -6
  69. package/src/components/icons/SendIcon.jsx +6 -6
  70. package/src/components/icons/ServiceIcon.jsx +6 -6
  71. package/src/components/icons/SlotIcon.jsx +6 -6
  72. package/src/components/icons/SocialDiscordIcon.jsx +6 -6
  73. package/src/components/icons/SocialGitHubIcon.jsx +6 -6
  74. package/src/components/icons/SocialGitLabIcon.jsx +6 -6
  75. package/src/components/icons/SocialLinkedInIcon.jsx +6 -6
  76. package/src/components/icons/SocialNPMIcon.jsx +6 -6
  77. package/src/components/icons/SocialTwitterIcon.jsx +6 -6
  78. package/src/components/icons/StopIcon.jsx +6 -6
  79. package/src/components/icons/SwitchIcon.jsx +6 -6
  80. package/src/components/icons/TeamsIcon.jsx +6 -6
  81. package/src/components/icons/TerminalIcon.jsx +6 -6
  82. package/src/components/icons/TwoUsersIcon.jsx +6 -6
  83. package/src/components/icons/UpgradeIcon.jsx +7 -7
  84. package/src/components/icons/UserIcon.jsx +6 -6
  85. package/src/components/icons/UserRemoveIcon.jsx +6 -6
  86. package/src/components/icons/UserRoleIcon.jsx +6 -6
  87. package/src/components/icons/WorkspaceDynamicIcon.jsx +6 -6
  88. package/src/components/icons/WorkspaceEmptyIcon.jsx +4 -4
  89. package/src/components/icons/WorkspaceFailIcon.jsx +7 -7
  90. package/src/components/icons/WorkspaceGitHubIcon.jsx +7 -7
  91. package/src/components/icons/WorkspaceLoadingIcon.jsx +4 -4
  92. package/src/components/icons/WorkspaceReadyIcon.jsx +7 -7
  93. package/src/components/icons/WorkspaceStaticIcon.jsx +6 -6
  94. package/src/components/icons/index.js +2 -0
  95. package/src/stories/PlatformaticIcon.stories.jsx +32 -26
  96. package/dist/assets/index-3e148026.js +0 -206
@@ -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 TwoUsersIcon = ({ 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 TwoUsersIcon = ({ 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 TwoUsersIcon = ({ 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 @@ TwoUsersIcon.propTypes = {
78
78
  }
79
79
 
80
80
  TwoUsersIcon.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 TwoUsersIcon
@@ -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 UpgradeIcon = ({ 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 UpgradeIcon = ({ 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}
@@ -41,7 +41,7 @@ const UpgradeIcon = ({ color, size }) => {
41
41
  </svg>
42
42
  )
43
43
  break
44
- case 'large':
44
+ case LARGE:
45
45
  icon = (
46
46
  <svg
47
47
  width={40}
@@ -58,7 +58,7 @@ const UpgradeIcon = ({ color, size }) => {
58
58
  )
59
59
  break
60
60
 
61
- case 'extra-large':
61
+ case EXTRA_LARGE:
62
62
  icon = (
63
63
  <svg
64
64
  width={120}
@@ -111,8 +111,8 @@ UpgradeIcon.propTypes = {
111
111
  }
112
112
 
113
113
  UpgradeIcon.defaultProps = {
114
- color: 'main-dark-blue',
115
- size: 'medium'
114
+ color: MAIN_DARK_BLUE,
115
+ size: MEDIUM
116
116
  }
117
117
 
118
118
  export default UpgradeIcon
@@ -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 UserIcon = ({ 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}
@@ -24,7 +24,7 @@ const UserIcon = ({ color, size }) => {
24
24
  </svg>
25
25
  )
26
26
  break
27
- case 'medium':
27
+ case MEDIUM:
28
28
  icon = (
29
29
  <svg
30
30
  width={24}
@@ -39,7 +39,7 @@ const UserIcon = ({ color, size }) => {
39
39
  </svg>
40
40
  )
41
41
  break
42
- case 'large':
42
+ case LARGE:
43
43
  icon = (
44
44
  <svg
45
45
  width={40}
@@ -73,8 +73,8 @@ UserIcon.propTypes = {
73
73
  }
74
74
 
75
75
  UserIcon.defaultProps = {
76
- color: 'main-dark-blue',
77
- size: 'medium'
76
+ color: MAIN_DARK_BLUE,
77
+ size: MEDIUM
78
78
  }
79
79
 
80
80
  export default UserIcon
@@ -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 UserRemoveIcon = ({ color, size, tip }) => {
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 UserRemoveIcon = ({ color, size, tip }) => {
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 UserRemoveIcon = ({ color, size, tip }) => {
47
47
  </svg>
48
48
  )
49
49
  break
50
- case 'large':
50
+ case LARGE:
51
51
  icon = (
52
52
  <svg
53
53
  width={40}
@@ -89,8 +89,8 @@ UserRemoveIcon.propTypes = {
89
89
  }
90
90
 
91
91
  UserRemoveIcon.defaultProps = {
92
- color: 'main-dark-blue',
93
- size: 'medium',
92
+ color: MAIN_DARK_BLUE,
93
+ size: MEDIUM,
94
94
  tip: ''
95
95
  }
96
96
 
@@ -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 UserRoleIcon = ({ color, size, tip }) => {
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 UserRoleIcon = ({ color, size, tip }) => {
27
27
  </svg>
28
28
  )
29
29
  break
30
- case 'medium':
30
+ case MEDIUM:
31
31
  icon = (
32
32
  <svg
33
33
  width={24}
@@ -46,7 +46,7 @@ const UserRoleIcon = ({ color, size, tip }) => {
46
46
  </svg>
47
47
  )
48
48
  break
49
- case 'large':
49
+ case LARGE:
50
50
  icon = (
51
51
  <svg
52
52
  width={40}
@@ -88,8 +88,8 @@ UserRoleIcon.propTypes = {
88
88
  }
89
89
 
90
90
  UserRoleIcon.defaultProps = {
91
- color: 'main-dark-blue',
92
- size: 'medium',
91
+ color: MAIN_DARK_BLUE,
92
+ size: MEDIUM,
93
93
  tip: ''
94
94
  }
95
95
 
@@ -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 WorkspaceDynamicIcon = ({ 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}
@@ -26,7 +26,7 @@ const WorkspaceDynamicIcon = ({ color, size }) => {
26
26
  </svg>
27
27
  )
28
28
  break
29
- case 'medium':
29
+ case MEDIUM:
30
30
  icon = (
31
31
  <svg
32
32
  width={24}
@@ -44,7 +44,7 @@ const WorkspaceDynamicIcon = ({ color, size }) => {
44
44
  </svg>
45
45
  )
46
46
  break
47
- case 'large':
47
+ case LARGE:
48
48
  icon = (
49
49
  <svg
50
50
  width={40}
@@ -81,8 +81,8 @@ WorkspaceDynamicIcon.propTypes = {
81
81
  }
82
82
 
83
83
  WorkspaceDynamicIcon.defaultProps = {
84
- color: 'main-dark-blue',
85
- size: 'medium'
84
+ color: MAIN_DARK_BLUE,
85
+ size: MEDIUM
86
86
  }
87
87
 
88
88
  export default WorkspaceDynamicIcon
@@ -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,6 +19,7 @@ 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'
@@ -116,6 +117,7 @@ export default {
116
117
  CalendarIcon,
117
118
  Calendar1DayIcon,
118
119
  Calendar7DaysIcon,
120
+ ChatGPTIcon,
119
121
  CheckListIcon,
120
122
  CircleAddIcon,
121
123
  CircleArrowLeftIcon,
@@ -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
  }