@platformatic/ui-components 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.fcbe6de7.js +797 -0
- package/dist/index.html +2 -2
- package/dist/main.css +16 -27
- package/dist/platformatic-ui.css +1 -0
- package/index.js +2 -0
- package/package.json +1 -1
- package/src/components/ApiSummary.jsx +2 -2
- package/src/components/PullRequest.jsx +54 -19
- package/src/components/PullRequest.module.css +17 -2
- package/src/components/Status.jsx +26 -0
- package/src/lib/utils.js +3 -0
- package/src/stories/BorderedBox.stories.jsx +11 -2
- package/src/stories/PullRequest.stories.jsx +31 -5
- package/src/stories/Status.stories.jsx +31 -0
- package/dist/assets/index.03c3e650.js +0 -797
- package/dist/assets/index.2277ba1a.css +0 -1
- package/src/components/Api/Status.jsx +0 -20
- package/storybook-static/0.53758dff751ed2733218.manager.bundle.js +0 -2
- package/storybook-static/0.53758dff751ed2733218.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/1.9d13fd5be5dcb92d80a6.manager.bundle.js +0 -1
- package/storybook-static/5.410945cbec993452eed2.manager.bundle.js +0 -2
- package/storybook-static/5.410945cbec993452eed2.manager.bundle.js.LICENSE.txt +0 -31
- package/storybook-static/6.9ef90ca53c7deb768ec6.manager.bundle.js +0 -1
- package/storybook-static/7.47a294f1c5761295c4cb.manager.bundle.js +0 -1
- package/storybook-static/8.35b89a87599812bb0515.manager.bundle.js +0 -2
- package/storybook-static/8.35b89a87599812bb0515.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/9.d19ea1957ceb9893827c.manager.bundle.js +0 -1
- package/storybook-static/api-icon-closed.svg +0 -6
- package/storybook-static/api-icon.svg +0 -9
- package/storybook-static/assets/BorderedBox.stories.8d7654fe.css +0 -1
- package/storybook-static/assets/BorderedBox.stories.f9bbae3a.js +0 -26
- package/storybook-static/assets/BorderedBox.stories.f9bbae3a.js.map +0 -1
- package/storybook-static/assets/Button.7e305135.js +0 -2
- package/storybook-static/assets/Button.7e305135.js.map +0 -1
- package/storybook-static/assets/Button.bc1a867b.css +0 -1
- package/storybook-static/assets/Button.stories.8d745781.js +0 -42
- package/storybook-static/assets/Button.stories.8d745781.js.map +0 -1
- package/storybook-static/assets/Color-f953d088.a38b7cbd.js +0 -3
- package/storybook-static/assets/Color-f953d088.a38b7cbd.js.map +0 -1
- package/storybook-static/assets/GlobalScrollAreaStyles-8793ce4a.cf1537f5.js +0 -2
- package/storybook-static/assets/GlobalScrollAreaStyles-8793ce4a.cf1537f5.js.map +0 -1
- package/storybook-static/assets/Header.4fc7684b.css +0 -1
- package/storybook-static/assets/Header.cf6306b0.js +0 -2
- package/storybook-static/assets/Header.cf6306b0.js.map +0 -1
- package/storybook-static/assets/Header.stories.17ffb615.js +0 -26
- package/storybook-static/assets/Header.stories.17ffb615.js.map +0 -1
- package/storybook-static/assets/Introduction.stories.bc0afbca.js +0 -105
- package/storybook-static/assets/Introduction.stories.bc0afbca.js.map +0 -1
- package/storybook-static/assets/LoginButton.stories.10ae424d.js +0 -776
- package/storybook-static/assets/LoginButton.stories.10ae424d.js.map +0 -1
- package/storybook-static/assets/LoginButton.stories.edf744f1.css +0 -1
- package/storybook-static/assets/OverlayScrollbars-1355f44c.fce02603.js +0 -18
- package/storybook-static/assets/OverlayScrollbars-1355f44c.fce02603.js.map +0 -1
- package/storybook-static/assets/Page.stories.0913ba40.css +0 -1
- package/storybook-static/assets/Page.stories.76f6205c.js +0 -84
- package/storybook-static/assets/Page.stories.76f6205c.js.map +0 -1
- package/storybook-static/assets/Props.8d39388f.js +0 -187
- package/storybook-static/assets/Props.8d39388f.js.map +0 -1
- package/storybook-static/assets/WithTooltip-167e9982.ebb6fc8d.js +0 -11
- package/storybook-static/assets/WithTooltip-167e9982.ebb6fc8d.js.map +0 -1
- package/storybook-static/assets/client.177c4b3e.js +0 -2
- package/storybook-static/assets/client.177c4b3e.js.map +0 -1
- package/storybook-static/assets/code-brackets.9ef6443e.svg +0 -1
- package/storybook-static/assets/colors.ac9401f3.svg +0 -1
- package/storybook-static/assets/comments.f15a6837.svg +0 -1
- package/storybook-static/assets/config.3c15c657.js +0 -74
- package/storybook-static/assets/config.3c15c657.js.map +0 -1
- package/storybook-static/assets/config.be729574.js +0 -2
- package/storybook-static/assets/config.be729574.js.map +0 -1
- package/storybook-static/assets/direction.94a9917f.svg +0 -1
- package/storybook-static/assets/es.map.constructor.bc2f31bd.js +0 -2
- package/storybook-static/assets/es.map.constructor.bc2f31bd.js.map +0 -1
- package/storybook-static/assets/es.number.to-fixed.db152345.js +0 -2
- package/storybook-static/assets/es.number.to-fixed.db152345.js.map +0 -1
- package/storybook-static/assets/es.regexp.flags.ebae2243.js +0 -2
- package/storybook-static/assets/es.regexp.flags.ebae2243.js.map +0 -1
- package/storybook-static/assets/es.string.from-code-point.e6202842.js +0 -2
- package/storybook-static/assets/es.string.from-code-point.e6202842.js.map +0 -1
- package/storybook-static/assets/flow.275142c6.svg +0 -1
- package/storybook-static/assets/formatter-0d5cb0eb.aebafedb.js +0 -297
- package/storybook-static/assets/formatter-0d5cb0eb.aebafedb.js.map +0 -1
- package/storybook-static/assets/iframe.aab06436.js +0 -153
- package/storybook-static/assets/iframe.aab06436.js.map +0 -1
- package/storybook-static/assets/index.7df59845.js +0 -2
- package/storybook-static/assets/index.7df59845.js.map +0 -1
- package/storybook-static/assets/index.814c1dee.js +0 -9
- package/storybook-static/assets/index.814c1dee.js.map +0 -1
- package/storybook-static/assets/index.c7ae27b6.js +0 -25
- package/storybook-static/assets/index.c7ae27b6.js.map +0 -1
- package/storybook-static/assets/index.f76a1af3.js +0 -2
- package/storybook-static/assets/index.f76a1af3.js.map +0 -1
- package/storybook-static/assets/instrumenter.3eab649e.js +0 -4
- package/storybook-static/assets/instrumenter.3eab649e.js.map +0 -1
- package/storybook-static/assets/jsx-runtime.e2ea81d7.js +0 -18
- package/storybook-static/assets/jsx-runtime.e2ea81d7.js.map +0 -1
- package/storybook-static/assets/make-decorator.7fb2aeb9.js +0 -3
- package/storybook-static/assets/make-decorator.7fb2aeb9.js.map +0 -1
- package/storybook-static/assets/plugin.57148314.svg +0 -1
- package/storybook-static/assets/preview.0975d66e.js +0 -3
- package/storybook-static/assets/preview.0975d66e.js.map +0 -1
- package/storybook-static/assets/preview.38b4e44b.js +0 -14
- package/storybook-static/assets/preview.38b4e44b.js.map +0 -1
- package/storybook-static/assets/preview.4099ceae.js +0 -2
- package/storybook-static/assets/preview.4099ceae.js.map +0 -1
- package/storybook-static/assets/preview.43118df9.js +0 -26
- package/storybook-static/assets/preview.43118df9.js.map +0 -1
- package/storybook-static/assets/preview.4dfec941.js +0 -2
- package/storybook-static/assets/preview.4dfec941.js.map +0 -1
- package/storybook-static/assets/preview.b37e665b.js +0 -397
- package/storybook-static/assets/preview.b37e665b.js.map +0 -1
- package/storybook-static/assets/preview.b8ebcf81.css +0 -1
- package/storybook-static/assets/preview.cc910bd3.js +0 -2
- package/storybook-static/assets/preview.cc910bd3.js.map +0 -1
- package/storybook-static/assets/preview.f14efd1d.js +0 -3
- package/storybook-static/assets/preview.f14efd1d.js.map +0 -1
- package/storybook-static/assets/renderDocs.4312919d.js +0 -2
- package/storybook-static/assets/renderDocs.4312919d.js.map +0 -1
- package/storybook-static/assets/repo.fb4ece47.svg +0 -1
- package/storybook-static/assets/stackalt.2ad81543.svg +0 -1
- package/storybook-static/assets/string.6cc73134.js +0 -2
- package/storybook-static/assets/string.6cc73134.js.map +0 -1
- package/storybook-static/assets/syntaxhighlighter-b07b042a.04697fcf.js +0 -16
- package/storybook-static/assets/syntaxhighlighter-b07b042a.04697fcf.js.map +0 -1
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +0 -486
- package/storybook-static/index.html +0 -59
- package/storybook-static/main.1e2c996516b3b52674de.manager.bundle.js +0 -1
- package/storybook-static/project.json +0 -1
- package/storybook-static/runtime~main.904779a78e0adff8f659.manager.bundle.js +0 -1
- package/storybook-static/stories.json +0 -1
- package/storybook-static/vendors~main.ab297a8d7023057bddf0.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.ab297a8d7023057bddf0.manager.bundle.js.LICENSE.txt +0 -107
- package/storybook-static/vite.svg +0 -1
package/dist/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Platformatic UI Components</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index.
|
|
8
|
-
<link rel="stylesheet" href="/
|
|
7
|
+
<script type="module" crossorigin src="/assets/index.fcbe6de7.js"></script>
|
|
8
|
+
<link rel="stylesheet" href="/platformatic-ui.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/dist/main.css
CHANGED
|
@@ -559,10 +559,6 @@ video {
|
|
|
559
559
|
margin-bottom: 1.25rem;
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
.mr-2 {
|
|
563
|
-
margin-right: 0.5rem;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
562
|
.mr-5 {
|
|
567
563
|
margin-right: 1.25rem;
|
|
568
564
|
}
|
|
@@ -571,6 +567,10 @@ video {
|
|
|
571
567
|
margin-left: 1rem;
|
|
572
568
|
}
|
|
573
569
|
|
|
570
|
+
.mr-2 {
|
|
571
|
+
margin-right: 0.5rem;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
574
|
.mr-1 {
|
|
575
575
|
margin-right: 0.25rem;
|
|
576
576
|
}
|
|
@@ -587,10 +587,6 @@ video {
|
|
|
587
587
|
display: contents;
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
-
.h-screen {
|
|
591
|
-
height: 100vh;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
590
|
.w-full {
|
|
595
591
|
width: 100%;
|
|
596
592
|
}
|
|
@@ -623,14 +619,14 @@ video {
|
|
|
623
619
|
justify-content: space-around;
|
|
624
620
|
}
|
|
625
621
|
|
|
626
|
-
.gap-2 {
|
|
627
|
-
gap: 0.5rem;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
622
|
.gap-4 {
|
|
631
623
|
gap: 1rem;
|
|
632
624
|
}
|
|
633
625
|
|
|
626
|
+
.gap-2 {
|
|
627
|
+
gap: 0.5rem;
|
|
628
|
+
}
|
|
629
|
+
|
|
634
630
|
.gap-10 {
|
|
635
631
|
gap: 2.5rem;
|
|
636
632
|
}
|
|
@@ -640,6 +636,10 @@ video {
|
|
|
640
636
|
column-gap: 1rem;
|
|
641
637
|
}
|
|
642
638
|
|
|
639
|
+
.rounded-full {
|
|
640
|
+
border-radius: 9999px;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
643
|
.border {
|
|
644
644
|
border-width: 1px;
|
|
645
645
|
}
|
|
@@ -654,6 +654,10 @@ video {
|
|
|
654
654
|
border-color: rgb(33 250 144 / var(--tw-border-opacity));
|
|
655
655
|
}
|
|
656
656
|
|
|
657
|
+
.p-2 {
|
|
658
|
+
padding: 0.5rem;
|
|
659
|
+
}
|
|
660
|
+
|
|
657
661
|
.px-4 {
|
|
658
662
|
padding-left: 1rem;
|
|
659
663
|
padding-right: 1rem;
|
|
@@ -674,21 +678,6 @@ video {
|
|
|
674
678
|
line-height: 1.75rem;
|
|
675
679
|
}
|
|
676
680
|
|
|
677
|
-
.text-3xl {
|
|
678
|
-
font-size: 1.875rem;
|
|
679
|
-
line-height: 2.25rem;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
.text-4xl {
|
|
683
|
-
font-size: 2.25rem;
|
|
684
|
-
line-height: 2.5rem;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
.text-6xl {
|
|
688
|
-
font-size: 3.75rem;
|
|
689
|
-
line-height: 1;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
681
|
.font-semibold {
|
|
693
682
|
font-weight: 600;
|
|
694
683
|
}
|
|
@@ -0,0 +1 @@
|
|
|
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_1atg3_1{padding:.625rem .5rem}._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))}._main_sk3z1_1{display:flex;align-items:center;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._data_sk3z1_5{display:flex;width:100%;flex-direction:column}._stats-header_19k8x_1{display:flex;align-items:center;justify-content:space-between;font-weight:700}._stats-main-stat_19k8x_4{display:flex;align-items:center;justify-content:center;gap:1rem}._tabbed-container_129x6_1{--tw-bg-opacity: 1;background-color:rgb(0 40 61 / var(--tw-bg-opacity))}._tabs-header_129x6_5{margin-bottom:1rem;display:flex;height:4rem;justify-content:space-between;text-transform:uppercase;letter-spacing:.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._tabs-header_129x6_5:hover{cursor:pointer}._selected-tab_129x6_8{font-weight:700;--tw-text-opacity: 1;color:rgb(33 250 144 / var(--tw-text-opacity));text-decoration-line:underline;text-underline-offset:8px}*,: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}}.m-3{margin:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mr-5{margin-right:1.25rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mr-1{margin-right:.25rem}.flex{display:flex}.grid{display:grid}.contents{display:contents}.w-full{width:100%}.w-9{width:2.25rem}.grow{flex-grow:1}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-4{gap:1rem}.gap-2{gap:.5rem}.gap-10{gap:2.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.rounded-full{border-radius:9999px}.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))}.p-2{padding:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-xl{font-size:1.25rem;line-height:1.75rem}.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-dark-green{--tw-text-opacity: 1;color:rgb(2 120 63 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / 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/static/Montserrat-Light.ttf) format("truetype");font-weight:300}@font-face{font-family:Montserrat;src:local("Montserrat"),url(./fonts/Montserrat/static/Montserrat-Regular.ttf) format("truetype");font-weight:500}@font-face{font-family:Montserrat;src:local("Montserrat"),url(./fonts/Montserrat/static/Montserrat-Bold.ttf) format("truetype");font-weight:700}: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))}.bordered{box-sizing:border-box;border-radius:.375rem;border-width:1px;border-style:solid}.padded{padding:.625rem .5rem}.api-footer{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))}.api-status{justify-self:end}.bordered-box{margin-bottom:1rem;flex:1 1 0%;row-gap:1rem;--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));box-sizing:border-box;border-radius:.375rem;border-width:1px;border-style:solid}input{background-color:transparent}.hover\:cursor-pointer:hover{cursor:pointer}
|
package/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import TwoColumnsLayout from './src/components/layouts/TwoColumnsLayout'
|
|
|
12
12
|
import Playground from './src/components/Playground'
|
|
13
13
|
import PullRequest from './src/components/PullRequest'
|
|
14
14
|
import SearchBar from './src/components/SearchBar'
|
|
15
|
+
import Status from './src/components/Status'
|
|
15
16
|
import TabbedWindow from './src/components/TabbedWindow'
|
|
16
17
|
import TextWithLabel from './src/components/TextWithLabel'
|
|
17
18
|
import Versions from './src/components/Versions'
|
|
@@ -29,6 +30,7 @@ export {
|
|
|
29
30
|
Playground,
|
|
30
31
|
PullRequest,
|
|
31
32
|
SearchBar,
|
|
33
|
+
Status,
|
|
32
34
|
TabbedWindow,
|
|
33
35
|
TextWithLabel,
|
|
34
36
|
Versions,
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import ApiIcon from './icons/ApiIcon'
|
|
|
8
8
|
import ApiIconClosed from './icons/ApiIconClosed'
|
|
9
9
|
import VerticalSeparator from './VerticalSeparator'
|
|
10
10
|
import TextWithLabel from './TextWithLabel'
|
|
11
|
-
import
|
|
11
|
+
import Status from './Status'
|
|
12
12
|
import BorderedBox from './BorderedBox'
|
|
13
13
|
import HorizontalSeparator from './HorizontalSeparator'
|
|
14
14
|
import styles from './Api.module.css'
|
|
@@ -41,7 +41,7 @@ export default function ApiSummary (props) {
|
|
|
41
41
|
<ApiVersion version={version} />
|
|
42
42
|
</div>
|
|
43
43
|
<div className={styles.status}>
|
|
44
|
-
<
|
|
44
|
+
<Status color={color} status={online ? 'online' : 'offline'} />
|
|
45
45
|
</div>
|
|
46
46
|
|
|
47
47
|
</div>
|
|
@@ -6,26 +6,61 @@ import PullRequestIcon from './icons/PullRequestIcon'
|
|
|
6
6
|
import styles from './PullRequest.module.css'
|
|
7
7
|
import TextWithLabel from './TextWithLabel'
|
|
8
8
|
import VerticalSeparator from './VerticalSeparator'
|
|
9
|
-
|
|
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
|
+
}
|
|
10
32
|
return (
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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>
|
|
20
64
|
|
|
21
|
-
<HorizontalSeparator />
|
|
22
|
-
<div className={styles.footer}>
|
|
23
|
-
<TextWithLabel label='Last commit by' text={lastCommit.author} />
|
|
24
|
-
<VerticalSeparator />
|
|
25
|
-
<TextWithLabel label='Commit SHA' text={lastCommit.sha} />
|
|
26
|
-
<VerticalSeparator />
|
|
27
|
-
<TextWithLabel label='Last Update' text={lastCommit.date} />
|
|
28
|
-
</div>
|
|
29
|
-
</BorderedBox>
|
|
30
65
|
)
|
|
31
66
|
}
|
|
@@ -5,8 +5,23 @@
|
|
|
5
5
|
@apply text-xl text-main-green font-semibold;
|
|
6
6
|
}
|
|
7
7
|
.header {
|
|
8
|
-
@apply flex items-center
|
|
8
|
+
@apply flex items-center justify-between mb-4;
|
|
9
|
+
}
|
|
10
|
+
.title {
|
|
11
|
+
@apply flex items-center gap-x-4;
|
|
9
12
|
}
|
|
10
13
|
.footer {
|
|
11
|
-
@apply flex items-center
|
|
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;
|
|
12
27
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
4
|
+
import { faCircle } from '@fortawesome/free-solid-svg-icons'
|
|
5
|
+
export default function Status (props) {
|
|
6
|
+
const { color, status } = props
|
|
7
|
+
|
|
8
|
+
function getColorClass (color) {
|
|
9
|
+
switch (color) {
|
|
10
|
+
case 'green':
|
|
11
|
+
return 'text-main-green'
|
|
12
|
+
case 'red':
|
|
13
|
+
return 'text-error-red'
|
|
14
|
+
case 'white':
|
|
15
|
+
default:
|
|
16
|
+
return 'text-white'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const colorClass = getColorClass(color)
|
|
20
|
+
return (
|
|
21
|
+
<div className={colorClass}>
|
|
22
|
+
<FontAwesomeIcon icon={faCircle} size='2xs' className={`text-${colorClass} mr-2`} />
|
|
23
|
+
{status}
|
|
24
|
+
</div>
|
|
25
|
+
)
|
|
26
|
+
}
|
package/src/lib/utils.js
CHANGED
|
@@ -5,7 +5,10 @@ export default {
|
|
|
5
5
|
component: BorderedBox,
|
|
6
6
|
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
7
7
|
argTypes: {
|
|
8
|
-
color: {
|
|
8
|
+
color: {
|
|
9
|
+
options: ['green', 'red', 'white'],
|
|
10
|
+
control: { type: ' radio' }
|
|
11
|
+
}
|
|
9
12
|
}
|
|
10
13
|
}
|
|
11
14
|
|
|
@@ -13,7 +16,7 @@ export default {
|
|
|
13
16
|
const Template = (args) => <BorderedBox {...args}>Hello Platformatic</BorderedBox>
|
|
14
17
|
|
|
15
18
|
export const Green = Template.bind({})
|
|
16
|
-
|
|
19
|
+
|
|
17
20
|
Green.args = {
|
|
18
21
|
color: 'green'
|
|
19
22
|
}
|
|
@@ -22,3 +25,9 @@ export const Red = Template.bind({})
|
|
|
22
25
|
Red.args = {
|
|
23
26
|
color: 'red'
|
|
24
27
|
}
|
|
28
|
+
|
|
29
|
+
export const White = Template.bind({})
|
|
30
|
+
|
|
31
|
+
White.args = {
|
|
32
|
+
color: 'white'
|
|
33
|
+
}
|
|
@@ -4,14 +4,13 @@ export default {
|
|
|
4
4
|
title: 'Platformatic/PullRequest',
|
|
5
5
|
component: PullRequest,
|
|
6
6
|
argTypes: {
|
|
7
|
-
color: { control: 'color' }
|
|
8
7
|
}
|
|
9
8
|
}
|
|
10
9
|
|
|
11
|
-
const Template = (args) => <PullRequest {...args}
|
|
10
|
+
const Template = (args) => <PullRequest {...args} />
|
|
12
11
|
|
|
13
|
-
export const
|
|
14
|
-
|
|
12
|
+
export const Available = Template.bind({})
|
|
13
|
+
Available.args = {
|
|
15
14
|
id: '88',
|
|
16
15
|
title: 'doc: host => hostname, binded to 0.0.0.0 to be more container friendly',
|
|
17
16
|
url: 'http://example.com',
|
|
@@ -19,5 +18,32 @@ Standard.args = {
|
|
|
19
18
|
sha: 'bgb3ffe3',
|
|
20
19
|
author: 'Foobar',
|
|
21
20
|
date: '2022-10-11'
|
|
22
|
-
}
|
|
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'
|
|
23
49
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
import Status from '../components/Status'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Platformatic/Status',
|
|
6
|
+
component: Status,
|
|
7
|
+
argTypes: {}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const Template = (args) => <Status {...args} />
|
|
11
|
+
|
|
12
|
+
export const White = Template.bind({})
|
|
13
|
+
|
|
14
|
+
White.args = {
|
|
15
|
+
color: 'white',
|
|
16
|
+
status: 'available'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const Green = Template.bind({})
|
|
20
|
+
|
|
21
|
+
Green.args = {
|
|
22
|
+
color: 'green',
|
|
23
|
+
status: 'online'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const Red = Template.bind({})
|
|
27
|
+
|
|
28
|
+
Red.args = {
|
|
29
|
+
color: 'red',
|
|
30
|
+
status: 'offline'
|
|
31
|
+
}
|