@platformatic/ui-components 0.3.6 → 0.5.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 (213) hide show
  1. package/.nvmrc +1 -1
  2. package/dist/assets/index-BHLxMHb5.js +40 -0
  3. package/dist/assets/{index-BJ-rQoWR.css → index-Of0we_2v.css} +1 -1
  4. package/dist/index.html +2 -2
  5. package/dist/main.css +14 -4
  6. package/index.js +0 -2
  7. package/package.json +13 -12
  8. package/setupTests.js +1 -0
  9. package/src/components/BorderedBox.jsx +9 -20
  10. package/src/components/Button.jsx +14 -30
  11. package/src/components/ButtonFullRounded.jsx +13 -31
  12. package/src/components/ButtonOnlyIcon.jsx +13 -36
  13. package/src/components/Checkbox.jsx +5 -6
  14. package/src/components/CopyAndPaste.jsx +8 -19
  15. package/src/components/HorizontalSeparator.jsx +6 -8
  16. package/src/components/LoadingSpinnerV2.jsx +4 -11
  17. package/src/components/LoginButton.test.jsx +0 -1
  18. package/src/components/Modal.jsx +11 -25
  19. package/src/components/PlatformaticIcon.jsx +9 -21
  20. package/src/components/TabbedWindow.jsx +11 -10
  21. package/src/components/TabbedWindow.module.css +4 -4
  22. package/src/components/Tag.jsx +9 -11
  23. package/src/components/VerticalSeparator.jsx +6 -4
  24. package/src/components/icons/APIDocsIcon.jsx +6 -7
  25. package/src/components/icons/AddIcon.jsx +6 -7
  26. package/src/components/icons/AlertIcon.jsx +6 -7
  27. package/src/components/icons/AllAppsIcon.jsx +6 -7
  28. package/src/components/icons/AllInOneIcon.jsx +6 -7
  29. package/src/components/icons/ApiCloudIcon.jsx +6 -7
  30. package/src/components/icons/ApiEmptyIcon.jsx +6 -7
  31. package/src/components/icons/ApiIcon.jsx +6 -7
  32. package/src/components/icons/ApiIconClosed.jsx +10 -6
  33. package/src/components/icons/ApiPerformanceIcon.jsx +6 -7
  34. package/src/components/icons/AppConfigurationIcon.jsx +6 -7
  35. package/src/components/icons/AppDetailsIcon.jsx +6 -7
  36. package/src/components/icons/AppEditIcon.jsx +6 -7
  37. package/src/components/icons/AppEmptyIcon.jsx +6 -7
  38. package/src/components/icons/AppIcon.jsx +6 -7
  39. package/src/components/icons/AppListIcon.jsx +6 -7
  40. package/src/components/icons/AppSettingsIcon.jsx +6 -7
  41. package/src/components/icons/AppWorkspace.jsx +10 -7
  42. package/src/components/icons/ApplicationTypeIcon.jsx +6 -7
  43. package/src/components/icons/ArrowDownFullIcon.jsx +6 -7
  44. package/src/components/icons/ArrowDownIcon.jsx +6 -7
  45. package/src/components/icons/ArrowLeftIcon.jsx +6 -7
  46. package/src/components/icons/ArrowLongLeftIcon.jsx +6 -7
  47. package/src/components/icons/ArrowLongRightIcon.jsx +6 -7
  48. package/src/components/icons/ArrowRightIcon.jsx +6 -7
  49. package/src/components/icons/ArrowUpIcon.jsx +6 -7
  50. package/src/components/icons/BellIcon.jsx +6 -7
  51. package/src/components/icons/BillingIcon.jsx +6 -7
  52. package/src/components/icons/BuiltInLoggingIcon.jsx +6 -7
  53. package/src/components/icons/CLIIcon.jsx +6 -7
  54. package/src/components/icons/Calendar1DayIcon.jsx +6 -7
  55. package/src/components/icons/Calendar7DaysIcon.jsx +6 -7
  56. package/src/components/icons/CalendarIcon.jsx +6 -7
  57. package/src/components/icons/CheckListIcon.jsx +6 -7
  58. package/src/components/icons/CircleAddIcon.jsx +6 -7
  59. package/src/components/icons/CircleArrowLeftIcon.jsx +6 -7
  60. package/src/components/icons/CircleArrowRightIcon.jsx +6 -7
  61. package/src/components/icons/CircleCheckMarkButtonIcon.jsx +6 -8
  62. package/src/components/icons/CircleCheckMarkFullIcon.jsx +6 -7
  63. package/src/components/icons/CircleCheckMarkIcon.jsx +7 -6
  64. package/src/components/icons/CircleCloseHoverIcon.jsx +6 -7
  65. package/src/components/icons/CircleCloseIcon.jsx +6 -7
  66. package/src/components/icons/CircleCopyPasteIcon.jsx +6 -7
  67. package/src/components/icons/CircleDownloadIcon.jsx +6 -7
  68. package/src/components/icons/CircleEditIcon.jsx +6 -7
  69. package/src/components/icons/CircleExclamationIcon.jsx +7 -7
  70. package/src/components/icons/CircleFullIcon.jsx +6 -7
  71. package/src/components/icons/CircleGearIcon.jsx +6 -7
  72. package/src/components/icons/CirclePlayIcon.jsx +6 -7
  73. package/src/components/icons/CircleRestartIcon.jsx +6 -7
  74. package/src/components/icons/CircleStopIcon.jsx +6 -7
  75. package/src/components/icons/CircleSubtractIcon.jsx +6 -7
  76. package/src/components/icons/CircleTwoArrowsDownIcon.jsx +6 -7
  77. package/src/components/icons/CircleTwoArrowsUpIcon.jsx +6 -7
  78. package/src/components/icons/CloseIcon.jsx +6 -7
  79. package/src/components/icons/CloudIcon.jsx +6 -7
  80. package/src/components/icons/CodeTestingIcon.jsx +6 -7
  81. package/src/components/icons/ComputerIcon.jsx +6 -7
  82. package/src/components/icons/ConfigureDatabaseIcon.jsx +6 -7
  83. package/src/components/icons/CopyPasteIcon.jsx +6 -7
  84. package/src/components/icons/CreateAppIcon.jsx +6 -7
  85. package/src/components/icons/CreditCardIcon.jsx +6 -7
  86. package/src/components/icons/DatabaseIcon.jsx +6 -7
  87. package/src/components/icons/DatabaseMigrationIcon.jsx +6 -7
  88. package/src/components/icons/DepencenciesReloadIcon.jsx +6 -7
  89. package/src/components/icons/EditDocumentIcon.jsx +6 -7
  90. package/src/components/icons/EditIcon.jsx +6 -7
  91. package/src/components/icons/EnlargeIcon.jsx +6 -7
  92. package/src/components/icons/EntryIcon.jsx +6 -7
  93. package/src/components/icons/EntrypointIcon.jsx +6 -7
  94. package/src/components/icons/ExpandIcon.jsx +6 -7
  95. package/src/components/icons/ExploreDocIcon.jsx +6 -7
  96. package/src/components/icons/EyeClosedIcon.jsx +6 -7
  97. package/src/components/icons/EyeOpenedIcon.jsx +6 -7
  98. package/src/components/icons/FolderIcon.jsx +6 -7
  99. package/src/components/icons/FoldersIcon.jsx +6 -7
  100. package/src/components/icons/GearIcon.jsx +6 -7
  101. package/src/components/icons/GenerationLoadingIcon.jsx +6 -7
  102. package/src/components/icons/GitHubRepo2Icon.jsx +6 -7
  103. package/src/components/icons/GitHubRepoIcon.jsx +6 -7
  104. package/src/components/icons/GiveOwnershipIcon.jsx +6 -7
  105. package/src/components/icons/GraphQLIcon.jsx +6 -7
  106. package/src/components/icons/ImportAppIcon.jsx +6 -7
  107. package/src/components/icons/KeyIcon.jsx +6 -7
  108. package/src/components/icons/LabelIcon.jsx +6 -7
  109. package/src/components/icons/LayersIcon.jsx +6 -7
  110. package/src/components/icons/LensIcon.jsx +6 -7
  111. package/src/components/icons/LiveIcon.jsx +6 -7
  112. package/src/components/icons/LoadingAppIcon.jsx +6 -7
  113. package/src/components/icons/LogOutIcon.jsx +7 -7
  114. package/src/components/icons/LogsRiskIcon.jsx +6 -7
  115. package/src/components/icons/MetricsIcon.jsx +6 -7
  116. package/src/components/icons/MetricsLoadingIcon.jsx +6 -7
  117. package/src/components/icons/MissingTemplateIcon.jsx +6 -7
  118. package/src/components/icons/NameAppIcon.jsx +6 -7
  119. package/src/components/icons/NoMetricsIcon.jsx +6 -7
  120. package/src/components/icons/OrganizationIcon.jsx +6 -7
  121. package/src/components/icons/OutOfBoxGraphQLIcon.jsx +6 -7
  122. package/src/components/icons/PlatformaticComposerIcon.jsx +6 -7
  123. package/src/components/icons/PlatformaticDBIcon.jsx +6 -7
  124. package/src/components/icons/PlatformaticRuntimeIcon.jsx +6 -7
  125. package/src/components/icons/PlatformaticServiceIcon.jsx +6 -7
  126. package/src/components/icons/PlayIcon.jsx +6 -7
  127. package/src/components/icons/PreviewPRIcon.jsx +6 -7
  128. package/src/components/icons/PullRequestIcon.jsx +6 -7
  129. package/src/components/icons/PullRequestLoadingIcon.jsx +6 -7
  130. package/src/components/icons/RecentAppsIcon.jsx +6 -7
  131. package/src/components/icons/RequestOwnershipIcon.jsx +6 -7
  132. package/src/components/icons/RestartIcon.jsx +6 -7
  133. package/src/components/icons/RocketIcon.jsx +6 -7
  134. package/src/components/icons/RunningAppIcon.jsx +6 -7
  135. package/src/components/icons/RunningIcon.jsx +6 -7
  136. package/src/components/icons/SendIcon.jsx +6 -7
  137. package/src/components/icons/ServiceIcon.jsx +6 -7
  138. package/src/components/icons/SlotIcon.jsx +6 -7
  139. package/src/components/icons/SocialDiscordIcon.jsx +6 -7
  140. package/src/components/icons/SocialGitHubIcon.jsx +6 -7
  141. package/src/components/icons/SocialGitLabIcon.jsx +6 -7
  142. package/src/components/icons/SocialLinkedInIcon.jsx +6 -7
  143. package/src/components/icons/SocialNPMIcon.jsx +6 -7
  144. package/src/components/icons/SocialXIcon.jsx +6 -7
  145. package/src/components/icons/SortDownIcon.jsx +6 -7
  146. package/src/components/icons/SortIcon.jsx +6 -7
  147. package/src/components/icons/SortUpIcon.jsx +6 -7
  148. package/src/components/icons/SortableIcon.jsx +6 -7
  149. package/src/components/icons/StackablesIcon.jsx +6 -7
  150. package/src/components/icons/StackablesPluginIcon.jsx +6 -7
  151. package/src/components/icons/StackablesTemplateIcon.jsx +6 -7
  152. package/src/components/icons/StopIcon.jsx +6 -7
  153. package/src/components/icons/StoppedAppIcon.jsx +6 -7
  154. package/src/components/icons/SwitchIcon.jsx +6 -7
  155. package/src/components/icons/TeamsIcon.jsx +6 -7
  156. package/src/components/icons/TerminalIcon.jsx +6 -7
  157. package/src/components/icons/TrashIcon.jsx +6 -8
  158. package/src/components/icons/TwoUsersIcon.jsx +6 -7
  159. package/src/components/icons/UpgradeIcon.jsx +6 -7
  160. package/src/components/icons/UserComputerIcon.jsx +6 -7
  161. package/src/components/icons/UserIcon.jsx +6 -7
  162. package/src/components/icons/UserRemoveIcon.jsx +7 -7
  163. package/src/components/icons/UserRoleIcon.jsx +7 -7
  164. package/src/components/icons/WorkspaceDynamicIcon.jsx +6 -7
  165. package/src/components/icons/WorkspaceEmptyIcon.jsx +6 -7
  166. package/src/components/icons/WorkspaceFailIcon.jsx +6 -7
  167. package/src/components/icons/WorkspaceGitHubIcon.jsx +6 -7
  168. package/src/components/icons/WorkspaceLoadingIcon.jsx +6 -7
  169. package/src/components/icons/WorkspaceReadyIcon.jsx +6 -7
  170. package/src/components/icons/WorkspaceStaticIcon.jsx +6 -7
  171. package/src/components/layouts/Layout.jsx +4 -6
  172. package/src/components/logos/AdvancedLogo.jsx +5 -7
  173. package/src/components/logos/BasicLogo.jsx +5 -7
  174. package/src/components/logos/FreeLogo.jsx +5 -7
  175. package/src/components/logos/ProLogo.jsx +5 -7
  176. package/src/stories/BorderedBox.stories.jsx +3 -1
  177. package/src/stories/Button.stories.jsx +224 -47
  178. package/src/stories/ButtonFullRounded.stories.jsx +31 -6
  179. package/src/stories/ButtonOnlyIcon.stories.jsx +13 -3
  180. package/src/stories/DropDown.stories.jsx +43 -20
  181. package/src/stories/InfoBox.stories.jsx +12 -3
  182. package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +115 -117
  183. package/src/stories/List.stories.jsx +28 -5
  184. package/src/stories/ListElement.stories.jsx +2 -1
  185. package/src/stories/Loadable.stories.jsx +6 -5
  186. package/src/stories/LoadingSpinner.stories.jsx +4 -2
  187. package/src/stories/LogoDropDown.stories.jsx +38 -24
  188. package/src/stories/Modal.stories.jsx +72 -17
  189. package/src/stories/ModalDirectional.stories.jsx +12 -2
  190. package/src/stories/ModalStepsForward.stories.jsx +82 -13
  191. package/src/stories/PlatformaticIcon.stories.jsx +44 -9
  192. package/src/stories/SearchBar.stories.jsx +0 -1
  193. package/src/stories/SearchBarV2.stories.jsx +0 -1
  194. package/src/stories/Sidebar.stories.jsx +41 -10
  195. package/src/stories/TabbedWindow.stories.jsx +71 -31
  196. package/src/stories/TextWithLabel.stories.jsx +5 -1
  197. package/src/stories/Tooltip.stories.jsx +10 -2
  198. package/src/stories/TwoColumnsLayout.stories.jsx +7 -2
  199. package/src/stories/forms/Field.stories.jsx +53 -15
  200. package/src/stories/forms/Input.stories.jsx +8 -2
  201. package/src/stories/forms/InputWithSeparator.stories.jsx +31 -9
  202. package/src/stories/forms/Password.stories.jsx +5 -1
  203. package/src/stories/forms/Preview.stories.jsx +6 -1
  204. package/src/stories/forms/RadioGroup.stories.jsx +5 -1
  205. package/src/stories/forms/Select.stories.jsx +60 -38
  206. package/src/stories/forms/SelectWithInput.stories.jsx +78 -41
  207. package/src/stories/forms/ToggleSwitch.stories.jsx +14 -4
  208. package/src/stories/icons/Icons.stories.jsx +40 -13
  209. package/src/stories/logos/Logos.stories.jsx +9 -2
  210. package/vitest.config.js +2 -1
  211. package/dist/assets/index-YI7s19_T.js +0 -40
  212. package/src/components/TabbedWindowV2.jsx +0 -82
  213. package/src/components/TabbedWindowV2.module.css +0 -17
@@ -4,7 +4,17 @@ import Button from '../components/Button'
4
4
  import BorderedBox from '../components/BorderedBox'
5
5
  import DropDown from '../components/DropDown'
6
6
  import HorizontalSeparator from '../components/HorizontalSeparator'
7
- import { FULL_WIDTH, MAIN_DARK_BLUE, MAIN_GREEN, MODAL_COVER, MODAL_FULL_DARK, MODAL_FULL_LIGHT, MODAL_LAYOUTS, MODAL_POPUP_V2, MODAL_SIZES } from '../components/constants'
7
+ import {
8
+ FULL_WIDTH,
9
+ MAIN_DARK_BLUE,
10
+ MAIN_GREEN,
11
+ MODAL_COVER,
12
+ MODAL_FULL_DARK,
13
+ MODAL_FULL_LIGHT,
14
+ MODAL_LAYOUTS,
15
+ MODAL_POPUP_V2,
16
+ MODAL_SIZES
17
+ } from '../components/constants'
8
18
  export default {
9
19
  title: 'Platformatic/Modal',
10
20
  component: Modal,
@@ -33,14 +43,32 @@ const Template = (args) => {
33
43
  return (
34
44
  <main style={{ height: '1440px', overflow: 'scroll' }}>
35
45
  <BorderedBox>This Is another Content</BorderedBox>
36
- <Button color={MAIN_GREEN} backgroundColor={MAIN_DARK_BLUE} onClick={() => setIsOpen(true)} label='Open Modal' />
37
- {isOpen && <Modal setIsOpen={setIsOpen} {...rest}>{text}</Modal>}
46
+ <Button
47
+ color={MAIN_GREEN}
48
+ backgroundColor={MAIN_DARK_BLUE}
49
+ onClick={() => setIsOpen(true)}
50
+ label='Open Modal'
51
+ />
52
+ {isOpen && (
53
+ <Modal setIsOpen={setIsOpen} {...rest}>
54
+ {text}
55
+ </Modal>
56
+ )}
38
57
 
39
58
  <BorderedBox style={{ position: 'relative' }}>
40
59
  <p>This Is another Component with Modal inside</p>
41
60
 
42
- <Button color={MAIN_GREEN} backgroundColor={MAIN_DARK_BLUE} onClick={() => setIsOpenInside(true)} label='Open Modal Inside' />
43
- {isOpenInside && <Modal setIsOpen={setIsOpenInside} {...rest}>{text}</Modal>}
61
+ <Button
62
+ color={MAIN_GREEN}
63
+ backgroundColor={MAIN_DARK_BLUE}
64
+ onClick={() => setIsOpenInside(true)}
65
+ label='Open Modal Inside'
66
+ />
67
+ {isOpenInside && (
68
+ <Modal setIsOpen={setIsOpenInside} {...rest}>
69
+ {text}
70
+ </Modal>
71
+ )}
44
72
  </BorderedBox>
45
73
  </main>
46
74
  )
@@ -49,7 +77,11 @@ const Template = (args) => {
49
77
  const ContentThatLoads = () => {
50
78
  const [content, setContent] = useState(null)
51
79
  setTimeout(() => {
52
- setContent(<div className='mt-4'><BorderedBox>This is a Future Component</BorderedBox></div>)
80
+ setContent(
81
+ <div className='mt-4'>
82
+ <BorderedBox>This is a Future Component</BorderedBox>
83
+ </div>
84
+ )
53
85
  }, 1000)
54
86
 
55
87
  return content
@@ -75,14 +107,26 @@ const MenuTemplate = () => {
75
107
  const dropDownArgs = {
76
108
  header: 'My Menu',
77
109
  items: [
78
- <span className='hover:cursor-pointer' key='2' onClick={() => setIsOpen(true)}>Show Modal</span>
110
+ <span
111
+ className='hover:cursor-pointer'
112
+ key='2'
113
+ onClick={() => setIsOpen(true)}
114
+ >
115
+ Show Modal
116
+ </span>
79
117
  ]
80
118
  }
81
119
  return (
82
120
  <div>
83
- <div className='text-white'><DropDown {...dropDownArgs} /></div>
121
+ <div className='text-white'>
122
+ <DropDown {...dropDownArgs} />
123
+ </div>
84
124
  <HorizontalSeparator />
85
- {isOpen && <Modal setIsOpen={setIsOpen} title='Modal Title'>Hello world!</Modal>}
125
+ {isOpen && (
126
+ <Modal setIsOpen={setIsOpen} title='Modal Title'>
127
+ Hello world!
128
+ </Modal>
129
+ )}
86
130
  <ContentThatLoads />
87
131
  </div>
88
132
  )
@@ -115,15 +159,21 @@ const NestedModalsTemplate = () => {
115
159
 
116
160
  return (
117
161
  <main style={{ height: '1440px', overflow: 'scroll' }}>
118
- <Button color={MAIN_GREEN} backgroundColor={MAIN_DARK_BLUE} onClick={() => setIsOpen1(true)} label='Open 1st Modal' />
162
+ <Button
163
+ color={MAIN_GREEN}
164
+ backgroundColor={MAIN_DARK_BLUE}
165
+ onClick={() => setIsOpen1(true)}
166
+ label='Open 1st Modal'
167
+ />
119
168
  {isOpen1 && (
120
- <Modal
121
- setIsOpen={setIsOpen1}
122
- title='Fist One'
123
- layout={MODAL_POPUP_V2}
124
- >
169
+ <Modal setIsOpen={setIsOpen1} title='Fist One' layout={MODAL_POPUP_V2}>
125
170
  <p style={{ color: 'white' }}>This Is the first</p>
126
- <Button color={MAIN_GREEN} backgroundColor={MAIN_DARK_BLUE} onClick={() => setIsOpen2(true)} label='Open 2nd Modal' />
171
+ <Button
172
+ color={MAIN_GREEN}
173
+ backgroundColor={MAIN_DARK_BLUE}
174
+ onClick={() => setIsOpen2(true)}
175
+ label='Open 2nd Modal'
176
+ />
127
177
  {isOpen2 && (
128
178
  <Modal
129
179
  setIsOpen={setIsOpen2}
@@ -131,7 +181,12 @@ const NestedModalsTemplate = () => {
131
181
  layout={MODAL_POPUP_V2}
132
182
  >
133
183
  <p style={{ color: 'white' }}>This Is the second</p>
134
- <Button color={MAIN_GREEN} backgroundColor={MAIN_DARK_BLUE} onClick={() => setIsOpen3(true)} label='Open 3rd Modal' />
184
+ <Button
185
+ color={MAIN_GREEN}
186
+ backgroundColor={MAIN_DARK_BLUE}
187
+ onClick={() => setIsOpen3(true)}
188
+ label='Open 3rd Modal'
189
+ />
135
190
  {isOpen3 && (
136
191
  <Modal
137
192
  setIsOpen={setIsOpen3}
@@ -32,9 +32,19 @@ const Template = (args) => {
32
32
  return (
33
33
  <div style={divStyle}>
34
34
  <div>
35
- <Button type='button' color={MAIN_GREEN} backgroundColor={MAIN_DARK_BLUE} onClick={() => setIsOpen(true)} label='Open Modal' />
35
+ <Button
36
+ type='button'
37
+ color={MAIN_GREEN}
38
+ backgroundColor={MAIN_DARK_BLUE}
39
+ onClick={() => setIsOpen(true)}
40
+ label='Open Modal'
41
+ />
36
42
  </div>
37
- {isOpen && <ModalDirectional setIsOpen={setIsOpen} {...rest}>{text}</ModalDirectional>}
43
+ {isOpen && (
44
+ <ModalDirectional setIsOpen={setIsOpen} {...rest}>
45
+ {text}
46
+ </ModalDirectional>
47
+ )}
38
48
  </div>
39
49
  )
40
50
  }
@@ -1,7 +1,12 @@
1
1
  import React, { useState } from 'react'
2
2
  import ModalStepsForward from '../components/ModalStepsForward'
3
3
  import Button from '../components/Button'
4
- import { MAIN_DARK_BLUE, MAIN_GREEN, MODAL_LAYOUTS, MODAL_SIZES } from '../components/constants'
4
+ import {
5
+ MAIN_DARK_BLUE,
6
+ MAIN_GREEN,
7
+ MODAL_LAYOUTS,
8
+ MODAL_SIZES
9
+ } from '../components/constants'
5
10
  export default {
6
11
  title: 'Platformatic/ModalStepsForward',
7
12
  component: ModalStepsForward,
@@ -28,8 +33,18 @@ const Template = (args) => {
28
33
  const { text, ...rest } = args
29
34
  return (
30
35
  <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>}
36
+ <Button
37
+ color={MAIN_GREEN}
38
+ backgroundColor={MAIN_DARK_BLUE}
39
+ onClick={() => setIsOpen(true)}
40
+ label='Open Modal'
41
+ bold
42
+ />
43
+ {isOpen && (
44
+ <ModalStepsForward setIsOpen={setIsOpen} {...rest}>
45
+ {text}
46
+ </ModalStepsForward>
47
+ )}
33
48
  </main>
34
49
  )
35
50
  }
@@ -39,22 +54,76 @@ Default.args = {}
39
54
 
40
55
  export const SmallContentLeft = Template.bind({})
41
56
  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>
57
+ left: (
58
+ <div>
59
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin iaculis,
60
+ elit aliquam ullamcorper consectetur, nunc erat blandit turpis, dignissim
61
+ efficitur risus eros a erat. Vestibulum rutrum odio turpis, vel mollis
62
+ neque ullamcorper at. Orci varius natoque penatibus et magnis dis
63
+ parturient montes, nascetur ridiculus mus. Proin accumsan leo sed nunc
64
+ tristique tempor. Duis sit amet viverra nunc. Aliquam vehicula elit ut
65
+ sodales pharetra. Sed imperdiet tempor urna id porta. Nullam ante velit,
66
+ aliquet a eleifend quis, vulputate sit amet metus. Nullam faucibus libero
67
+ at velit mattis tempus. Suspendisse potenti. Sed vitae enim ut magna
68
+ rutrum volutpat at sed augue. Sed sed neque porttitor, gravida lorem
69
+ vitae, semper felis.
70
+ </div>
71
+ )
43
72
  }
44
73
 
45
74
  export const LongContentLeft = Template.bind({})
46
75
  LongContentLeft.args = {
47
76
  left: (
48
77
  <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.
78
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin iaculis,
79
+ elit aliquam ullamcorper consectetur, nunc erat blandit turpis, dignissim
80
+ efficitur risus eros a erat. Vestibulum rutrum odio turpis, vel mollis
81
+ neque ullamcorper at. Orci varius natoque penatibus et magnis dis
82
+ parturient montes, nascetur ridiculus mus. Proin accumsan leo sed nunc
83
+ tristique tempor. Duis sit amet viverra nunc. Aliquam vehicula elit ut
84
+ sodales pharetra. Sed imperdiet tempor urna id porta. Nullam ante velit,
85
+ aliquet a eleifend quis, vulputate sit amet metus. Nullam faucibus libero
86
+ at velit mattis tempus. Suspendisse potenti. Sed vitae enim ut magna
87
+ rutrum volutpat at sed augue. Sed sed neque porttitor, gravida lorem
88
+ vitae, semper felis.
89
+ <br />
90
+ <br />
91
+ Mauris eget ultrices eros. Maecenas condimentum tristique odio, sit amet
92
+ pellentesque lacus pretium sit amet. Etiam sed egestas nibh. Curabitur
93
+ auctor posuere ante vel tempor. Etiam a vehicula erat. Cras aliquet eros
94
+ ut magna vestibulum rhoncus. Sed sed vestibulum metus. Nam sed magna
95
+ velit. Sed sit amet fermentum libero. Maecenas et faucibus elit. Integer
96
+ ligula magna, congue et posuere nec, lobortis sed dui. Suspendisse
97
+ potenti. Cras vestibulum nunc non volutpat tempus. In ultrices elementum
98
+ consectetur. Vestibulum justo risus, rutrum et augue ac, suscipit lobortis
99
+ erat. Sed rutrum sem at tortor molestie, tempus sagittis diam pulvinar.
100
+ <br />
101
+ <br />
102
+ Nullam lacinia tortor ipsum. Curabitur nec nulla ut orci volutpat pulvinar
103
+ ac ut sapien. Vestibulum aliquet ultricies leo, in cursus nibh cursus nec.
104
+ In eget faucibus lorem. Sed fringilla efficitur tellus. Cras faucibus
105
+ mauris eget dolor vehicula auctor. Vestibulum dignissim orci id fringilla
106
+ bibendum.
107
+ <br />
108
+ <br />
109
+ Morbi maximus sem ac nulla bibendum, eleifend blandit nunc sodales.
110
+ Quisque maximus dapibus diam eu condimentum. Aenean ac justo viverra,
111
+ pellentesque eros id, porta lectus. In ac risus orci. Fusce eleifend
112
+ sollicitudin pellentesque. Nulla facilisi. Aenean nec nunc ut felis
113
+ bibendum bibendum. Sed quam neque, scelerisque nec luctus a, facilisis non
114
+ ante.
115
+ <br />
116
+ <br />
117
+ Nullam id mauris vitae mi dignissim consequat eget sed leo. Maecenas
118
+ venenatis orci sed blandit lobortis. Donec a purus risus. Phasellus mollis
119
+ sem a ipsum cursus ultricies. Sed malesuada sit amet mi a ullamcorper.
120
+ Mauris sodales eget nulla at porttitor. Etiam arcu mi, efficitur hendrerit
121
+ metus ut, blandit molestie sapien. Nunc commodo justo nec mi volutpat, sit
122
+ amet cursus tortor eleifend. Pellentesque tincidunt ac mauris at faucibus.
123
+ Quisque sed purus quis nibh aliquet ullamcorper. Nunc est sem, accumsan eu
124
+ pellentesque non, volutpat a nisl. Proin eu dolor ac quam dictum lobortis
125
+ at ut elit. Aenean nec dui orci. Praesent aliquet eget metus vel
126
+ elementum.
58
127
  </div>
59
128
  )
60
129
  }
@@ -1,7 +1,16 @@
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, SIZES, SMALL, WHITE } from '../components/constants'
4
+ import {
5
+ COLORS_ICON,
6
+ EXTRA_LARGE,
7
+ EXTRA_SMALL,
8
+ LARGE,
9
+ MEDIUM,
10
+ SIZES,
11
+ SMALL,
12
+ WHITE
13
+ } from '../components/constants'
5
14
 
6
15
  const divStyle = {
7
16
  width: '100%'
@@ -67,26 +76,52 @@ const AllIconsTemplate = (args) => {
67
76
  {icons.map((icon, index) => (
68
77
  <div style={row} key={index}>
69
78
  <div style={col}>
70
- <p style={paragraph}>#{index + 1}: {icon}</p>
79
+ <p style={paragraph}>
80
+ #{index + 1}: {icon}
81
+ </p>
71
82
  </div>
72
83
  <div style={col}>
73
- <PlatformaticIcon key={icon} iconName={icon} size={EXTRA_SMALL} {...args} />
84
+ <PlatformaticIcon
85
+ key={icon}
86
+ iconName={icon}
87
+ size={EXTRA_SMALL}
88
+ {...args}
89
+ />
74
90
  </div>
75
91
  <div style={col}>
76
- <PlatformaticIcon key={icon} iconName={icon} size={SMALL} {...args} />
92
+ <PlatformaticIcon
93
+ key={icon}
94
+ iconName={icon}
95
+ size={SMALL}
96
+ {...args}
97
+ />
77
98
  </div>
78
99
  <div style={col}>
79
- <PlatformaticIcon key={icon} iconName={icon} size={MEDIUM} {...args} />
100
+ <PlatformaticIcon
101
+ key={icon}
102
+ iconName={icon}
103
+ size={MEDIUM}
104
+ {...args}
105
+ />
80
106
  </div>
81
107
  <div style={col}>
82
- <PlatformaticIcon key={icon} iconName={icon} size={LARGE} {...args} />
108
+ <PlatformaticIcon
109
+ key={icon}
110
+ iconName={icon}
111
+ size={LARGE}
112
+ {...args}
113
+ />
83
114
  </div>
84
115
  <div style={col}>
85
- <PlatformaticIcon key={icon} iconName={icon} size={EXTRA_LARGE} {...args} />
116
+ <PlatformaticIcon
117
+ key={icon}
118
+ iconName={icon}
119
+ size={EXTRA_LARGE}
120
+ {...args}
121
+ />
86
122
  </div>
87
123
  </div>
88
- )
89
- )}
124
+ ))}
90
125
  </div>
91
126
  </>
92
127
  )
@@ -14,7 +14,6 @@ const Template = (args) => {
14
14
  <>
15
15
  <SearchBar {...args}>Hello Platformatic</SearchBar>
16
16
  </>
17
-
18
17
  )
19
18
  }
20
19
  export const Standard = Template.bind({})
@@ -9,7 +9,6 @@ const Template = (args) => {
9
9
  <>
10
10
  <SearchBarV2 {...args} />
11
11
  </>
12
-
13
12
  )
14
13
  }
15
14
  export const Standard = Template.bind({})
@@ -17,7 +17,15 @@ export default {
17
17
  (Story) => (
18
18
  <div style={divStyle}>
19
19
  <Story />
20
- <BorderedBox>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</BorderedBox>
20
+ <BorderedBox>
21
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
22
+ eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
23
+ minim veniam, quis nostrud exercitation ullamco laboris nisi ut
24
+ aliquip ex ea commodo consequat. Duis aute irure dolor in
25
+ reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
26
+ pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
27
+ culpa qui officia deserunt mollit anim id est laborum.
28
+ </BorderedBox>
21
29
  </div>
22
30
  )
23
31
  ]
@@ -36,19 +44,27 @@ EmptySidebar.args = {
36
44
 
37
45
  const FullSidebarTemplate = (args) => {
38
46
  const [items, setItems] = useState([
39
- { id: '1', iconName: 'WorkspaceStaticIcon', subTitle: 'Subtitle', title: 'a very very very very very long title 1' },
47
+ {
48
+ id: '1',
49
+ iconName: 'WorkspaceStaticIcon',
50
+ subTitle: 'Subtitle',
51
+ title: 'a very very very very very long title 1'
52
+ },
40
53
  { id: '2', title: 'Title number 2', subTitle: 'Subtitle 2' },
41
- { id: '3', title: 'Another Title', subTitle: 'Subtitle 3', iconName: 'WorkspaceDynamicIcon' }
54
+ {
55
+ id: '3',
56
+ title: 'Another Title',
57
+ subTitle: 'Subtitle 3',
58
+ iconName: 'WorkspaceDynamicIcon'
59
+ }
42
60
  ])
43
61
  function onClickAdd () {
44
- const tmpItem = items.map(item => item)
62
+ const tmpItem = items.map((item) => item)
45
63
  tmpItem.push('Title number ' + (items.length + 1))
46
64
  setItems(tmpItem)
47
65
  }
48
66
 
49
- return (
50
- <Sidebar items={items} onClickAdd={() => onClickAdd()} {...args} />
51
- )
67
+ return <Sidebar items={items} onClickAdd={() => onClickAdd()} {...args} />
52
68
  }
53
69
 
54
70
  export const FullSidebar = FullSidebarTemplate.bind({})
@@ -68,9 +84,24 @@ AlreadySelected.args = {
68
84
  addTitle: 'Create',
69
85
  defaultSelected: '3',
70
86
  items: [
71
- { id: '1', iconName: 'WorkspaceStaticIcon', title: 'Static 1', subTitle: 'Subtitle 1' },
72
- { id: '2', iconName: 'WorkspaceStaticIcon', title: 'Static 2', subTitle: 'Subtitle 2' },
73
- { id: '3', iconName: 'WorkspaceDynamicIcon', title: 'Dynamic', subTitle: 'Subtitle 3' }
87
+ {
88
+ id: '1',
89
+ iconName: 'WorkspaceStaticIcon',
90
+ title: 'Static 1',
91
+ subTitle: 'Subtitle 1'
92
+ },
93
+ {
94
+ id: '2',
95
+ iconName: 'WorkspaceStaticIcon',
96
+ title: 'Static 2',
97
+ subTitle: 'Subtitle 2'
98
+ },
99
+ {
100
+ id: '3',
101
+ iconName: 'WorkspaceDynamicIcon',
102
+ title: 'Dynamic',
103
+ subTitle: 'Subtitle 3'
104
+ }
74
105
  ],
75
106
  onClickItemSelected: (index) => alert('selected: ' + index),
76
107
  onClickSettings: () => alert('settings')
@@ -10,45 +10,85 @@ const Template = (args) => {
10
10
  <>
11
11
  <TabbedWindow {...args} />
12
12
  </>
13
-
14
13
  )
15
14
  }
16
15
  export const Default = Template.bind({})
17
16
 
18
17
  Default.args = {
19
- tabs: [{
20
- label: 'First',
21
- key: 'first',
22
- component: () => <TextWithLabel label='First component' text='Lorem ipsum dolor sit amet, consectetur adipiscing elit.' />
23
- }, {
24
- label: 'Second',
25
- key: 'second',
26
- component: () => <TextWithLabel label='Second component' text='Sed et dui facilisis, molestie urna sed, volutpat nibh' />
27
- }, {
28
- label: 'Third Third Third',
29
- key: 'third',
30
- component: () => <TextWithLabel label='Third component' text='ivamus est nisl, maximus aliquet urna eu, consequat semper nisi' />
31
- }, {
32
- label: 'Fourth',
33
- key: 'fourth',
34
- component: () => <TextWithLabel label='Fourth component' text='Ipse dixit' />
35
- }]
18
+ tabs: [
19
+ {
20
+ label: 'First',
21
+ key: 'first',
22
+ component: () => (
23
+ <TextWithLabel
24
+ label='First component'
25
+ text='Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
26
+ />
27
+ )
28
+ },
29
+ {
30
+ label: 'Second',
31
+ key: 'second',
32
+ component: () => (
33
+ <TextWithLabel
34
+ label='Second component'
35
+ text='Sed et dui facilisis, molestie urna sed, volutpat nibh'
36
+ />
37
+ )
38
+ },
39
+ {
40
+ label: 'Third Third Third',
41
+ key: 'third',
42
+ component: () => (
43
+ <TextWithLabel
44
+ label='Third component'
45
+ text='ivamus est nisl, maximus aliquet urna eu, consequat semper nisi'
46
+ />
47
+ )
48
+ },
49
+ {
50
+ label: 'Fourth',
51
+ key: 'fourth',
52
+ component: () => (
53
+ <TextWithLabel label='Fourth component' text='Ipse dixit' />
54
+ )
55
+ }
56
+ ]
36
57
  }
37
58
 
38
59
  export const DefaultSelected = Template.bind({})
39
60
  DefaultSelected.args = {
40
- tabs: [{
41
- label: 'First',
42
- key: 'first',
43
- component: () => <TextWithLabel label='First component' text='Lorem ipsum dolor sit amet, consectetur adipiscing elit.' />
44
- }, {
45
- label: 'Second',
46
- key: 'second',
47
- component: () => <TextWithLabel label='Second component' text='Sed et dui facilisis, molestie urna sed, volutpat nibh' />
48
- }, {
49
- label: 'Third',
50
- key: 'third',
51
- component: () => <TextWithLabel label='Third component' text='ivamus est nisl, maximus aliquet urna eu, consequat semper nisi' />
52
- }],
61
+ tabs: [
62
+ {
63
+ label: 'First',
64
+ key: 'first',
65
+ component: () => (
66
+ <TextWithLabel
67
+ label='First component'
68
+ text='Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
69
+ />
70
+ )
71
+ },
72
+ {
73
+ label: 'Second',
74
+ key: 'second',
75
+ component: () => (
76
+ <TextWithLabel
77
+ label='Second component'
78
+ text='Sed et dui facilisis, molestie urna sed, volutpat nibh'
79
+ />
80
+ )
81
+ },
82
+ {
83
+ label: 'Third',
84
+ key: 'third',
85
+ component: () => (
86
+ <TextWithLabel
87
+ label='Third component'
88
+ text='ivamus est nisl, maximus aliquet urna eu, consequat semper nisi'
89
+ />
90
+ )
91
+ }
92
+ ],
53
93
  keySelected: 'second'
54
94
  }
@@ -18,7 +18,11 @@ Standard.args = {
18
18
  text: 'Platformatic Team'
19
19
  }
20
20
 
21
- export const WithLink = (args) => <TextWithLabel {...args}><a href='https://example.com'>Standard Link</a></TextWithLabel>
21
+ export const WithLink = (args) => (
22
+ <TextWithLabel {...args}>
23
+ <a href='https://example.com'>Standard Link</a>
24
+ </TextWithLabel>
25
+ )
22
26
 
23
27
  WithLink.args = {
24
28
  label: 'External Link'
@@ -1,7 +1,15 @@
1
1
  'use strict'
2
2
  import React from 'react'
3
3
  import Tooltip from '../components/Tooltip'
4
- import { ANTI_FLASH_WHITE, CHANGE_BACKGROUND_COLOR, COLORS_BUTTON, HOVER_EFFECTS_BUTTONS, RICH_BLACK, SIZES, WHITE } from '../components/constants'
4
+ import {
5
+ ANTI_FLASH_WHITE,
6
+ CHANGE_BACKGROUND_COLOR,
7
+ COLORS_BUTTON,
8
+ HOVER_EFFECTS_BUTTONS,
9
+ RICH_BLACK,
10
+ SIZES,
11
+ WHITE
12
+ } from '../components/constants'
5
13
  import Button from '../components/Button'
6
14
 
7
15
  const divStyle = {
@@ -79,7 +87,7 @@ const TemplateWithButton = (args) => (
79
87
  export const TooltipBase = TemplateWithButton.bind({})
80
88
  // More on args: https://storybook.js.org/docs/react/writing-stories/args
81
89
  TooltipBase.args = {
82
- content: (<span>I'm a tooltip over a button</span>),
90
+ content: <span>I'm a tooltip over a button</span>,
83
91
  delay: 100,
84
92
  offset: 44
85
93
  }
@@ -17,11 +17,16 @@ export default {
17
17
  }
18
18
 
19
19
  // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
20
- const Template = (args) => <TwoColumnsLayout {...args}><BorderedBox>1st</BorderedBox><BorderedBox>2nd</BorderedBox></TwoColumnsLayout>
20
+ const Template = (args) => (
21
+ <TwoColumnsLayout {...args}>
22
+ <BorderedBox>1st</BorderedBox>
23
+ <BorderedBox>2nd</BorderedBox>
24
+ </TwoColumnsLayout>
25
+ )
21
26
 
22
27
  export const Default = Template.bind({})
23
28
 
24
- Default.args = { }
29
+ Default.args = {}
25
30
 
26
31
  export const Columns = Template.bind({})
27
32