@platformatic/ui-components 0.1.18 → 0.1.21

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 (36) hide show
  1. package/.nvmrc +1 -0
  2. package/dist/assets/index.5ac5acb7.js +797 -0
  3. package/dist/assets/index.e8f4b797.css +1 -0
  4. package/dist/index.html +2 -2
  5. package/dist/main.css +13 -86
  6. package/index.js +4 -8
  7. package/package.json +2 -1
  8. package/src/components/DropDown.jsx +35 -0
  9. package/src/components/DropDown.module.css +23 -0
  10. package/src/components/ListElement.module.css +2 -2
  11. package/src/components/Loadable.jsx +34 -0
  12. package/src/components/Loadable.module.css +13 -0
  13. package/src/components/Main.jsx +0 -36
  14. package/src/components/icons/index.js +7 -0
  15. package/src/stories/DropDown.stories.jsx +43 -0
  16. package/src/stories/Loadable.stories.jsx +75 -0
  17. package/src/styles/main.css +0 -6
  18. package/dist/assets/index.d77cda9b.js +0 -797
  19. package/dist/assets/index.f6d5761c.css +0 -1
  20. package/src/components/Api/Endpoints.jsx +0 -14
  21. package/src/components/Api/Footer.jsx +0 -25
  22. package/src/components/Api/Footer.module.css +0 -3
  23. package/src/components/Api/Version.jsx +0 -8
  24. package/src/components/Api.module.css +0 -11
  25. package/src/components/ApiDetail.jsx +0 -40
  26. package/src/components/ApiDetail.module.css +0 -3
  27. package/src/components/ApiSummary.jsx +0 -77
  28. package/src/components/FrontpageBackground.jsx +0 -11
  29. package/src/components/FrontpageBackground.module.css +0 -10
  30. package/src/components/PullRequest.jsx +0 -66
  31. package/src/components/PullRequest.module.css +0 -27
  32. package/src/stories/ApiDetail.stories.jsx +0 -43
  33. package/src/stories/ApiSummary.stories.jsx +0 -43
  34. package/src/stories/Frontpage.stories.jsx +0 -42
  35. package/src/stories/FrontpageBackground.stories.jsx +0 -17
  36. package/src/stories/PullRequest.stories.jsx +0 -49
@@ -1 +0,0 @@
1
- ._input_1v03r_1{box-sizing:border-box;display:flex;height:2.5rem;width:100%;justify-content:space-between;border-radius:.375rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(33 250 144 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._input_1v03r_1>input:focus{outline:2px solid transparent;outline-offset:2px}._padded_650jz_1{padding:.625rem .5rem}._bordered_650jz_5{box-sizing:border-box;border-radius:.375rem;border-width:1px;border-style:solid}._bordered_1ece3_1{border-radius:.375rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity));padding:.25rem .5rem;letter-spacing:.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._borderedBox_1fd0d_1{margin-bottom:1rem;flex:1 1 0%;row-gap:1rem;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(0 52 79 / var(--tw-bg-opacity));padding:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._container_pqngl_1{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._label_pqngl_4{margin-right:.5rem;font-weight:100}._text_pqngl_7{font-weight:600}._main_172rv_1{display:flex;flex-direction:column;row-gap:1rem}._footer_kawbk_1{margin-left:2.25rem;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem .5rem .5rem 1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._main_1uwu5_1{display:flex;align-items:center;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._data_1uwu5_5{display:flex;width:100%;flex-direction:column}._status_1uwu5_9{justify-self:end}._tabbed-container_1r9tv_1{--tw-bg-opacity: 1;background-color:rgb(0 40 61 / var(--tw-bg-opacity))}._tabs-header_1r9tv_5{margin-bottom:1rem;display:flex;height:2rem;justify-content:flex-start;text-transform:uppercase;letter-spacing:.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._tabs-header_1r9tv_5:hover{cursor:pointer}._tab_1r9tv_1{margin-right:1rem;min-width:105px;text-align:center}._selected-tab_1r9tv_11{font-weight:700;--tw-text-opacity: 1;color:rgb(33 250 144 / var(--tw-text-opacity));text-decoration-line:underline;text-underline-offset:8px}._tabs-content_1r9tv_15{height:100vh}._container_sn6pf_1{display:flex;flex-direction:column}._id_sn6pf_4{font-size:1.25rem;line-height:1.75rem;font-weight:600;--tw-text-opacity: 1;color:rgb(33 250 144 / var(--tw-text-opacity))}._header_sn6pf_7{margin-bottom:1rem;display:flex;align-items:center;justify-content:space-between}._title_sn6pf_10{display:flex;align-items:center;-moz-column-gap:1rem;column-gap:1rem}._footer_sn6pf_13,._status_sn6pf_16{display:flex;align-items:center}._unavailable_sn6pf_19{opacity:.3}._icons_sn6pf_22{display:flex;justify-content:space-between;-moz-column-gap:.5rem;column-gap:.5rem}._icons_sn6pf_22>*:hover{cursor:pointer}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Montserrat}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%;margin-right:auto;margin-left:auto}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.static{position:static}.m-3{margin:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mx-auto{margin-left:auto;margin-right:auto}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mr-2{margin-right:.5rem}.mr-5{margin-right:1.25rem}.ml-4{margin-left:1rem}.mt-24{margin-top:6rem}.mb-16{margin-bottom:4rem}.flex{display:flex}.grid{display:grid}.h-screen{height:100vh}.w-full{width:100%}.w-9{width:2.25rem}.w-80{width:20rem}.grow{flex-grow:1}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.place-items-center{place-items:center}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-10{gap:2.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.border{border-width:1px}.border-error-red{--tw-border-opacity: 1;border-color:rgb(250 33 33 / var(--tw-border-opacity))}.border-main-green{--tw-border-opacity: 1;border-color:rgb(33 250 144 / var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-2xl{font-size:1.5rem;line-height:2rem}.font-semibold{font-weight:600}.font-bold{font-weight:700}.font-light{font-weight:300}.text-main-green{--tw-text-opacity: 1;color:rgb(33 250 144 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-dark-green{--tw-text-opacity: 1;color:rgb(2 120 63 / var(--tw-text-opacity))}.text-error-red{--tw-text-opacity: 1;color:rgb(250 33 33 / var(--tw-text-opacity))}@font-face{font-family:Montserrat;src:local("Montserrat"),url(./fonts/Montserrat/Montserrat-VariableFont_wght.ttf) format("truetype");font-weight:100 900}:root{--tw-bg-opacity: 1;background-color:rgb(0 40 61 / var(--tw-bg-opacity));font-family:Montserrat}a{--tw-text-opacity: 1;color:rgb(37 136 228 / var(--tw-text-opacity))}input{background-color:transparent}.hover\:cursor-pointer:hover{cursor:pointer}
@@ -1,14 +0,0 @@
1
- 'use strict'
2
- import React from 'react'
3
- import BorderedText from '../BorderedText'
4
-
5
- export default function Endpoints (props) {
6
- const { openapi, graphql } = props
7
-
8
- return (
9
- <span className='flex gap-2'>
10
- {graphql && (<BorderedText text='GraphQL' />)}
11
- {openapi && (<BorderedText text='REST' />)}
12
- </span>
13
- )
14
- }
@@ -1,25 +0,0 @@
1
- 'use strict'
2
- import Separator from '../VerticalSeparator'
3
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
4
- import { faDatabase, faFileLines, faGear } from '@fortawesome/free-solid-svg-icons'
5
- import BorderedText from '../BorderedText'
6
- import styles from './Footer.module.css'
7
- import React from 'react'
8
- export default function ApiFooter (props) {
9
- const { graphql, openapi, db } = props
10
- return (
11
- <div className={styles.footer}>
12
- <div className='flex gap-2'>
13
- {graphql && (<BorderedText text='GraphQL' />)}
14
- {openapi && (<BorderedText text='REST' />)}
15
- </div>
16
- <div>
17
- <span><FontAwesomeIcon icon={faGear} /> Configs</span>
18
- <Separator />
19
- <span><FontAwesomeIcon icon={faFileLines} /> API Docs</span>
20
- <Separator />
21
- <span><FontAwesomeIcon icon={faDatabase} /> {db}</span>
22
- </div>
23
- </div>
24
- )
25
- }
@@ -1,3 +0,0 @@
1
- .footer {
2
- @apply flex justify-between items-center gap-2 text-white p-2 ml-9 pl-5;
3
- }
@@ -1,8 +0,0 @@
1
- 'use strict'
2
- import React from 'react'
3
- import BorderedText from '../BorderedText'
4
-
5
- export default function ApiVersion (props) {
6
- const { version } = props
7
- return (<div className='font-light'><BorderedText text={`v${version}`} /></div>)
8
- }
@@ -1,11 +0,0 @@
1
- .main {
2
- @apply flex items-center text-white;
3
- }
4
-
5
- .data {
6
- @apply flex flex-col w-full;
7
- }
8
-
9
- .status {
10
- @apply justify-self-end;
11
- }
@@ -1,40 +0,0 @@
1
- 'use strict'
2
-
3
- import Endpoints from './Api/Endpoints'
4
- import BorderedBox from './BorderedBox'
5
- import BorderedText from './BorderedText'
6
- import HorizontalSeparator from './HorizontalSeparator'
7
- import TextWithLabel from './TextWithLabel'
8
- import VerticalSeparator from './VerticalSeparator'
9
- import React from 'react'
10
- import styles from './ApiDetail.module.css'
11
- export default function ApiDetails (props) {
12
- const { url, repository, version, openapi, graphql, source, lastDeploy } = props
13
- return (
14
- <>
15
- <BorderedBox classes='api-data'>
16
- <div className={styles.main}>
17
- <div>
18
- Preview/Staging URL: <a href={url}>{url}</a>
19
- </div>
20
- <div>
21
- Repository: <a href={`https://github.com/${repository}`}>{repository}</a>
22
- </div>
23
- <div>
24
- Version: <BorderedText text={`v${version}`} />
25
- </div>
26
- </div>
27
- <HorizontalSeparator />
28
- <div className='flex gap-2 items-center'>
29
- <TextWithLabel label='Generated With' text={source} />
30
- <VerticalSeparator />
31
- <TextWithLabel label='Last deployed' text={lastDeploy} />
32
- </div>
33
- <div className='flex items-center'>
34
- <span className='mr-2'>Endpoints: </span><Endpoints graphql={graphql} openapi={openapi} />
35
- </div>
36
- </BorderedBox>
37
- </>
38
-
39
- )
40
- }
@@ -1,3 +0,0 @@
1
- .main {
2
- @apply flex flex-col gap-y-4;
3
- }
@@ -1,77 +0,0 @@
1
- 'use strict'
2
-
3
- import ApiFooter from './Api/Footer'
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
5
- import { faLink } from '@fortawesome/free-solid-svg-icons'
6
- import ApiVersion from './Api/Version'
7
- import ApiIcon from './icons/ApiIcon'
8
- import ApiIconClosed from './icons/ApiIconClosed'
9
- import VerticalSeparator from './VerticalSeparator'
10
- import TextWithLabel from './TextWithLabel'
11
- import Status from './Status'
12
- import BorderedBox from './BorderedBox'
13
- import HorizontalSeparator from './HorizontalSeparator'
14
- import styles from './Api.module.css'
15
- import React, { useState } from 'react'
16
-
17
- function ApiName (props) {
18
- const { name } = props
19
- return (
20
- <span className='text-main-green font-semibold text-2xl'>{name}</span>
21
- )
22
- }
23
- export default function ApiSummary (props) {
24
- const [isOpen, setIsOpen] = useState(true)
25
- const { name, version, source, lastDeploy, graphql, openapi, online, db } = props
26
- const color = online ? 'green' : 'red'
27
- return (
28
- <BorderedBox
29
- color={color}
30
- >
31
- {isOpen && (
32
- <>
33
- <div className={styles.main}>
34
- <div className='flex w-full'>
35
- <div className='w-9 mr-5'><ApiIcon /></div>
36
- <div className={styles.data}>
37
- <div className='flex items-center justify-between'>
38
- <div className='flex items-center justify-between gap-4'>
39
- <ApiName name={name} />
40
- <span><FontAwesomeIcon color='white' icon={faLink} /></span>
41
- <ApiVersion version={version} />
42
- </div>
43
- <div className={styles.status}>
44
- <Status color={color} status={online ? 'online' : 'offline'} />
45
- </div>
46
-
47
- </div>
48
-
49
- <div className='flex gap-2 items-center'>
50
- <TextWithLabel label='Generated With' text={source} />
51
- <VerticalSeparator />
52
- <TextWithLabel label='Last deployed' text={lastDeploy} />
53
- </div>
54
- </div>
55
-
56
- </div>
57
-
58
- </div>
59
- <HorizontalSeparator />
60
- <ApiFooter
61
- graphql={graphql}
62
- openapi={openapi}
63
- db={db}
64
- />
65
- </>
66
- )}
67
- {!isOpen && (
68
- <div className='flex items-center'>
69
- <img className='w-9 mr-5' src={<ApiIconClosed />} />
70
- <ApiName name={name} />
71
- <span onClick={() => { setIsOpen(!isOpen) }} className='ml-4 hover:cursor-pointer'>Click here to set up your api</span>
72
- </div>
73
-
74
- )}
75
- </BorderedBox>
76
- )
77
- }
@@ -1,11 +0,0 @@
1
- import React from 'react'
2
- import styles from './FrontpageBackground.module.css'
3
-
4
- export default function FrontpageBackgound ({ label = 'platformatic', ...props }) {
5
- return (
6
- <div className={styles.bg}>
7
- <div className={styles.label}> {label} </div>
8
- {props.children}
9
- </div>
10
- )
11
- }
@@ -1,10 +0,0 @@
1
- /* let's use some direct CSS here, with tailwind is quite convoluted to obtain the correct radial gradient */
2
- .bg {
3
- background: radial-gradient(circle at 0% 0%, rgba(33, 250, 144, 0.4) 0%, rgba(6, 31, 55, 0.4) 35%);
4
- }
5
-
6
- .label {
7
- @apply text-light-green font-semibold w-full text-left uppercase px-8 py-4 text-clip
8
- }
9
-
10
-
@@ -1,66 +0,0 @@
1
- 'use strict'
2
- import React from 'react'
3
- import BorderedBox from './BorderedBox'
4
- import HorizontalSeparator from './HorizontalSeparator'
5
- import PullRequestIcon from './icons/PullRequestIcon'
6
- import styles from './PullRequest.module.css'
7
- import TextWithLabel from './TextWithLabel'
8
- import VerticalSeparator from './VerticalSeparator'
9
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
10
- import { faStopCircle, faRotateRight } from '@fortawesome/free-solid-svg-icons'
11
- import Status from './Status'
12
- export default function PullRequest ({ id, title, lastCommit, url, status, onStop, onReload }) {
13
- let prStatusColor
14
- if (status === 'available') {
15
- prStatusColor = 'white'
16
- } else if (status === 'running') {
17
- prStatusColor = 'green'
18
- } else if (status === 'unavailable') {
19
- prStatusColor = 'white'
20
- }
21
-
22
- function handleStop () {
23
- if (onStop) {
24
- onStop()
25
- }
26
- }
27
- function handleReload () {
28
- if (onReload) {
29
- onReload()
30
- }
31
- }
32
- return (
33
- <div className={status === 'unavailable' ? styles.unavailable : null}>
34
- <BorderedBox color={prStatusColor}>
35
- <div className={styles.header}>
36
- <div className={styles.title}>
37
- <PullRequestIcon />
38
- <span className={styles.id}>#{id}</span>
39
- <span><a href={url} target='_blank' rel='noreferrer'>{url}</a></span>
40
- </div>
41
- <div className={styles.status}>
42
- <Status color={prStatusColor} status={status} />
43
- <VerticalSeparator />
44
- <div className={styles.icons}>
45
- <FontAwesomeIcon icon={faStopCircle} mask={['circle']} onClick={handleStop} />
46
- <FontAwesomeIcon icon={faRotateRight} mask={['circle']} onClick={handleReload} />
47
- </div>
48
- </div>
49
- </div>
50
- <div className={styles.content}>
51
- <TextWithLabel label='PR Title' text={title} />
52
- </div>
53
-
54
- <HorizontalSeparator />
55
- <div className={styles.footer}>
56
- <TextWithLabel label='Last commit by' text={lastCommit.author} />
57
- <VerticalSeparator />
58
- <TextWithLabel label='Commit SHA' text={lastCommit.sha} />
59
- <VerticalSeparator />
60
- <TextWithLabel label='Last Update' text={lastCommit.date} />
61
- </div>
62
- </BorderedBox>
63
- </div>
64
-
65
- )
66
- }
@@ -1,27 +0,0 @@
1
- .container {
2
- @apply flex flex-col;
3
- }
4
- .id {
5
- @apply text-xl text-main-green font-semibold;
6
- }
7
- .header {
8
- @apply flex items-center justify-between mb-4;
9
- }
10
- .title {
11
- @apply flex items-center gap-x-4;
12
- }
13
- .footer {
14
- @apply flex items-center;
15
- }
16
- .status {
17
- @apply flex items-center;
18
- }
19
- .unavailable {
20
- @apply opacity-30;
21
- }
22
- .icons {
23
- @apply flex justify-between gap-x-2;
24
- }
25
- .icons > *:hover {
26
- @apply cursor-pointer;
27
- }
@@ -1,43 +0,0 @@
1
- 'use strict'
2
- import ApiDetail from '../components/ApiDetail'
3
- export default {
4
- title: 'Platformatic/ApiDetail',
5
- component: ApiDetail,
6
- argTypes: {
7
- text: { control: 'string' }
8
- }
9
- }
10
-
11
- const Template = (args) => <ApiDetail {...args} />
12
-
13
- export const Online = Template.bind({})
14
-
15
- Online.args = {
16
- id: 1,
17
- name: 'api-online',
18
- version: '1.2.3',
19
- source: 'Platformatic DB',
20
- lastDeploy: '2022-10-10',
21
- graphql: true,
22
- openapi: true,
23
- online: true,
24
- url: 'https://example.com',
25
- repository: 'platformatic/example',
26
- db: 'SQLite'
27
- }
28
-
29
- export const Offline = Template.bind({})
30
-
31
- Offline.args = {
32
- id: 1,
33
- name: 'api-offline',
34
- version: '1.2.3',
35
- source: 'Platformatic DB',
36
- lastDeploy: '2022-10-10',
37
- graphql: true,
38
- openapi: true,
39
- online: false,
40
- url: 'https://example.com',
41
- repository: 'platformatic/example',
42
- db: 'PostgreSQL'
43
- }
@@ -1,43 +0,0 @@
1
- 'use strict'
2
- import ApiSummary from '../components/ApiSummary'
3
- export default {
4
- title: 'Platformatic/ApiSummary',
5
- component: ApiSummary,
6
- argTypes: {
7
- text: { control: 'string' }
8
- }
9
- }
10
-
11
- const Template = (args) => <ApiSummary {...args} />
12
-
13
- export const Online = Template.bind({})
14
-
15
- Online.args = {
16
- id: 1,
17
- name: 'api-online',
18
- version: '1.2.3',
19
- source: 'Platformatic DB',
20
- lastDeploy: '2022-10-10',
21
- graphql: true,
22
- openapi: true,
23
- online: true,
24
- url: 'https://example.com',
25
- repository: 'platformatic/example',
26
- db: 'SQLite'
27
- }
28
-
29
- export const Offline = Template.bind({})
30
-
31
- Offline.args = {
32
- id: 1,
33
- name: 'api-offline',
34
- version: '1.2.3',
35
- source: 'Platformatic DB',
36
- lastDeploy: '2022-10-10',
37
- graphql: true,
38
- openapi: true,
39
- online: false,
40
- url: 'https://example.com',
41
- repository: 'platformatic/example',
42
- db: 'PostgreSQL'
43
- }
@@ -1,42 +0,0 @@
1
-
2
- import React from 'react'
3
- import FrontpageBackground from '../components/FrontpageBackground'
4
- import TwoColumnsLayout from '../components/layouts/TwoColumnsLayout'
5
- import Box from '../components/Box'
6
- import GHLoginButton from '../components/GHLoginButton'
7
- import Logo from '../components/Logo'
8
- import List from '../components/List'
9
- import ListElement from '../components/ListElement'
10
- import HorizontalSeparator from '../components/HorizontalSeparator'
11
- import FollowUs from '../components/FollowUs'
12
-
13
- export default {
14
- title: 'Platformatic/Frontpage'
15
- }
16
-
17
- const Template = (args) =>
18
- <FrontpageBackground>
19
-
20
- <TwoColumnsLayout>
21
- <Box>
22
- <Logo width={80} />
23
- <List title='platformatic'>
24
- <ListElement title='Instant edge deploy' detail='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.' />
25
- <ListElement title='Collaborate with previews' detail='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.' />
26
- <ListElement title='Turn static to dynamic' detail='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.' />
27
- <ListElement title='Ship directly to the edge' detail='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et dui facilisis, molestie urna sed, volutpat nibh.' />
28
- </List>
29
- <HorizontalSeparator />
30
- <FollowUs />
31
- </Box>
32
- <Box>
33
- <p className='text-5xl text-main-green font-bold mt-24 mb-16'>Join the best backend teams</p>
34
- <GHLoginButton />
35
- <p className='text-white my-8 w-80'> by clicking continue, you agree to our <a href="javascript:alert('todo')">Terms of Service</a> and <a href="javascript:alert('todo')">Privacy policy.</a> </p>
36
- <HorizontalSeparator />
37
- </Box>
38
- </TwoColumnsLayout>
39
- </FrontpageBackground>
40
-
41
- export const Frontpage = Template.bind({})
42
- Frontpage.args = {}
@@ -1,17 +0,0 @@
1
- import React from 'react'
2
- import FrontpageBackground from '../components/FrontpageBackground'
3
-
4
- export default {
5
- title: 'Platformatic/FrontpageBackground',
6
- component: FrontpageBackground
7
- }
8
-
9
- const Template = (args) =>
10
- <FrontpageBackground>
11
- <div className='grid h-screen place-items-center'>
12
- <p className='text-main-green text-4xl'>Frontpage Background</p>
13
- </div>
14
- </FrontpageBackground>
15
-
16
- export const FrontpageBackgroundDefault = Template.bind({})
17
- FrontpageBackgroundDefault.args = {}
@@ -1,49 +0,0 @@
1
- 'use strict'
2
- import PullRequest from '../components/PullRequest'
3
- export default {
4
- title: 'Platformatic/PullRequest',
5
- component: PullRequest,
6
- argTypes: {
7
- }
8
- }
9
-
10
- const Template = (args) => <PullRequest {...args} />
11
-
12
- export const Available = Template.bind({})
13
- Available.args = {
14
- id: '88',
15
- title: 'doc: host => hostname, binded to 0.0.0.0 to be more container friendly',
16
- url: 'http://example.com',
17
- lastCommit: {
18
- sha: 'bgb3ffe3',
19
- author: 'Foobar',
20
- date: '2022-10-11'
21
- },
22
- status: 'available'
23
- }
24
-
25
- export const Running = Template.bind({})
26
- Running.args = {
27
- id: '88',
28
- title: 'doc: host => hostname, binded to 0.0.0.0 to be more container friendly',
29
- url: 'http://example.com',
30
- lastCommit: {
31
- sha: 'bgb3ffe3',
32
- author: 'Foobar',
33
- date: '2022-10-11'
34
- },
35
- status: 'running'
36
- }
37
-
38
- export const Unavailable = Template.bind({})
39
- Unavailable.args = {
40
- id: '88',
41
- title: 'doc: host => hostname, binded to 0.0.0.0 to be more container friendly',
42
- url: 'http://example.com',
43
- lastCommit: {
44
- sha: 'bgb3ffe3',
45
- author: 'Foobar',
46
- date: '2022-10-11'
47
- },
48
- status: 'unavailable'
49
- }