@platformatic/ui-components 0.1.9 → 0.1.11
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.03c3e650.js +797 -0
- package/dist/assets/index.2277ba1a.css +1 -0
- package/dist/index.html +2 -2
- package/dist/main.css +27 -16
- package/index.js +9 -7
- package/package.json +17 -4
- package/src/components/ApiDetail.jsx +14 -10
- package/src/components/ApiDetail.module.css +3 -0
- package/src/components/ApiSummary.jsx +6 -5
- package/src/components/GHLoginButton.jsx +0 -1
- package/src/components/LoginButton.jsx +2 -2
- package/src/components/LoginButton.test.jsx +25 -0
- package/src/components/Main.jsx +2 -2
- package/src/components/PullRequest.jsx +6 -11
- package/src/components/PullRequest.module.css +2 -8
- package/src/components/TextWithLabel.jsx +11 -0
- package/src/components/TextWithLabel.module.css +9 -0
- package/src/stories/Button.jsx +11 -11
- package/src/stories/Button.stories.jsx +5 -5
- package/src/stories/SearchBar.stories.jsx +2 -1
- package/src/stories/TesxtWithLabel.stories.jsx +25 -0
- package/storybook-static/0.53758dff751ed2733218.manager.bundle.js +2 -0
- package/storybook-static/0.53758dff751ed2733218.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/1.9d13fd5be5dcb92d80a6.manager.bundle.js +1 -0
- package/storybook-static/5.410945cbec993452eed2.manager.bundle.js +2 -0
- package/storybook-static/5.410945cbec993452eed2.manager.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/6.9ef90ca53c7deb768ec6.manager.bundle.js +1 -0
- package/storybook-static/7.47a294f1c5761295c4cb.manager.bundle.js +1 -0
- package/storybook-static/8.35b89a87599812bb0515.manager.bundle.js +2 -0
- package/storybook-static/8.35b89a87599812bb0515.manager.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/9.d19ea1957ceb9893827c.manager.bundle.js +1 -0
- package/storybook-static/api-icon-closed.svg +6 -0
- package/storybook-static/api-icon.svg +9 -0
- package/storybook-static/assets/BorderedBox.stories.8d7654fe.css +1 -0
- package/storybook-static/assets/BorderedBox.stories.f9bbae3a.js +26 -0
- package/storybook-static/assets/BorderedBox.stories.f9bbae3a.js.map +1 -0
- package/storybook-static/assets/Button.7e305135.js +2 -0
- package/storybook-static/assets/Button.7e305135.js.map +1 -0
- package/storybook-static/assets/Button.bc1a867b.css +1 -0
- package/storybook-static/assets/Button.stories.8d745781.js +42 -0
- package/storybook-static/assets/Button.stories.8d745781.js.map +1 -0
- package/storybook-static/assets/Color-f953d088.a38b7cbd.js +3 -0
- package/storybook-static/assets/Color-f953d088.a38b7cbd.js.map +1 -0
- package/storybook-static/assets/GlobalScrollAreaStyles-8793ce4a.cf1537f5.js +2 -0
- package/storybook-static/assets/GlobalScrollAreaStyles-8793ce4a.cf1537f5.js.map +1 -0
- package/storybook-static/assets/Header.4fc7684b.css +1 -0
- package/storybook-static/assets/Header.cf6306b0.js +2 -0
- package/storybook-static/assets/Header.cf6306b0.js.map +1 -0
- package/storybook-static/assets/Header.stories.17ffb615.js +26 -0
- package/storybook-static/assets/Header.stories.17ffb615.js.map +1 -0
- package/storybook-static/assets/Introduction.stories.bc0afbca.js +105 -0
- package/storybook-static/assets/Introduction.stories.bc0afbca.js.map +1 -0
- package/storybook-static/assets/LoginButton.stories.10ae424d.js +776 -0
- package/storybook-static/assets/LoginButton.stories.10ae424d.js.map +1 -0
- package/storybook-static/assets/LoginButton.stories.edf744f1.css +1 -0
- package/storybook-static/assets/OverlayScrollbars-1355f44c.fce02603.js +18 -0
- package/storybook-static/assets/OverlayScrollbars-1355f44c.fce02603.js.map +1 -0
- package/storybook-static/assets/Page.stories.0913ba40.css +1 -0
- package/storybook-static/assets/Page.stories.76f6205c.js +84 -0
- package/storybook-static/assets/Page.stories.76f6205c.js.map +1 -0
- package/storybook-static/assets/Props.8d39388f.js +187 -0
- package/storybook-static/assets/Props.8d39388f.js.map +1 -0
- package/storybook-static/assets/WithTooltip-167e9982.ebb6fc8d.js +11 -0
- package/storybook-static/assets/WithTooltip-167e9982.ebb6fc8d.js.map +1 -0
- package/storybook-static/assets/client.177c4b3e.js +2 -0
- package/storybook-static/assets/client.177c4b3e.js.map +1 -0
- package/storybook-static/assets/code-brackets.9ef6443e.svg +1 -0
- package/storybook-static/assets/colors.ac9401f3.svg +1 -0
- package/storybook-static/assets/comments.f15a6837.svg +1 -0
- package/storybook-static/assets/config.3c15c657.js +74 -0
- package/storybook-static/assets/config.3c15c657.js.map +1 -0
- package/storybook-static/assets/config.be729574.js +2 -0
- package/storybook-static/assets/config.be729574.js.map +1 -0
- package/storybook-static/assets/direction.94a9917f.svg +1 -0
- package/storybook-static/assets/es.map.constructor.bc2f31bd.js +2 -0
- package/storybook-static/assets/es.map.constructor.bc2f31bd.js.map +1 -0
- package/storybook-static/assets/es.number.to-fixed.db152345.js +2 -0
- package/storybook-static/assets/es.number.to-fixed.db152345.js.map +1 -0
- package/storybook-static/assets/es.regexp.flags.ebae2243.js +2 -0
- package/storybook-static/assets/es.regexp.flags.ebae2243.js.map +1 -0
- package/storybook-static/assets/es.string.from-code-point.e6202842.js +2 -0
- package/storybook-static/assets/es.string.from-code-point.e6202842.js.map +1 -0
- package/storybook-static/assets/flow.275142c6.svg +1 -0
- package/storybook-static/assets/formatter-0d5cb0eb.aebafedb.js +297 -0
- package/storybook-static/assets/formatter-0d5cb0eb.aebafedb.js.map +1 -0
- package/storybook-static/assets/iframe.aab06436.js +153 -0
- package/storybook-static/assets/iframe.aab06436.js.map +1 -0
- package/storybook-static/assets/index.7df59845.js +2 -0
- package/storybook-static/assets/index.7df59845.js.map +1 -0
- package/storybook-static/assets/index.814c1dee.js +9 -0
- package/storybook-static/assets/index.814c1dee.js.map +1 -0
- package/storybook-static/assets/index.c7ae27b6.js +25 -0
- package/storybook-static/assets/index.c7ae27b6.js.map +1 -0
- package/storybook-static/assets/index.f76a1af3.js +2 -0
- package/storybook-static/assets/index.f76a1af3.js.map +1 -0
- package/storybook-static/assets/instrumenter.3eab649e.js +4 -0
- package/storybook-static/assets/instrumenter.3eab649e.js.map +1 -0
- package/storybook-static/assets/jsx-runtime.e2ea81d7.js +18 -0
- package/storybook-static/assets/jsx-runtime.e2ea81d7.js.map +1 -0
- package/storybook-static/assets/make-decorator.7fb2aeb9.js +3 -0
- package/storybook-static/assets/make-decorator.7fb2aeb9.js.map +1 -0
- package/storybook-static/assets/plugin.57148314.svg +1 -0
- package/storybook-static/assets/preview.0975d66e.js +3 -0
- package/storybook-static/assets/preview.0975d66e.js.map +1 -0
- package/storybook-static/assets/preview.38b4e44b.js +14 -0
- package/storybook-static/assets/preview.38b4e44b.js.map +1 -0
- package/storybook-static/assets/preview.4099ceae.js +2 -0
- package/storybook-static/assets/preview.4099ceae.js.map +1 -0
- package/storybook-static/assets/preview.43118df9.js +26 -0
- package/storybook-static/assets/preview.43118df9.js.map +1 -0
- package/storybook-static/assets/preview.4dfec941.js +2 -0
- package/storybook-static/assets/preview.4dfec941.js.map +1 -0
- package/storybook-static/assets/preview.b37e665b.js +397 -0
- package/storybook-static/assets/preview.b37e665b.js.map +1 -0
- package/storybook-static/assets/preview.b8ebcf81.css +1 -0
- package/storybook-static/assets/preview.cc910bd3.js +2 -0
- package/storybook-static/assets/preview.cc910bd3.js.map +1 -0
- package/storybook-static/assets/preview.f14efd1d.js +3 -0
- package/storybook-static/assets/preview.f14efd1d.js.map +1 -0
- package/storybook-static/assets/renderDocs.4312919d.js +2 -0
- package/storybook-static/assets/renderDocs.4312919d.js.map +1 -0
- package/storybook-static/assets/repo.fb4ece47.svg +1 -0
- package/storybook-static/assets/stackalt.2ad81543.svg +1 -0
- package/storybook-static/assets/string.6cc73134.js +2 -0
- package/storybook-static/assets/string.6cc73134.js.map +1 -0
- package/storybook-static/assets/syntaxhighlighter-b07b042a.04697fcf.js +16 -0
- package/storybook-static/assets/syntaxhighlighter-b07b042a.04697fcf.js.map +1 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +486 -0
- package/storybook-static/index.html +59 -0
- package/storybook-static/main.1e2c996516b3b52674de.manager.bundle.js +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.904779a78e0adff8f659.manager.bundle.js +1 -0
- package/storybook-static/stories.json +1 -0
- package/storybook-static/vendors~main.ab297a8d7023057bddf0.manager.bundle.js +2 -0
- package/storybook-static/vendors~main.ab297a8d7023057bddf0.manager.bundle.js.LICENSE.txt +107 -0
- package/storybook-static/vite.svg +1 -0
- package/vitest.config.js +14 -0
- package/dist/assets/index.fcbe6de7.js +0 -797
- package/dist/platformatic-ui.css +0 -1
|
@@ -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_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))}._stats-header_w45a1_1{display:flex;align-items:center;justify-content:space-between;font-weight:700}._stats-main-stat_w45a1_4{display:flex;align-items:center;justify-content:center;gap:1rem}._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_s2cim_1{display:flex;flex-direction:column}._id_s2cim_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_s2cim_7{margin-bottom:1rem;display:flex;align-items:center;-moz-column-gap:1rem;column-gap:1rem}._footer_s2cim_10{display:flex;align-items:center}*,: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-2{margin-right:.5rem}.mr-5{margin-right:1.25rem}.ml-4{margin-left:1rem}.mr-1{margin-right:.25rem}.flex{display:flex}.grid{display:grid}.contents{display:contents}.h-screen{height:100vh}.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-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}.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/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}
|
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.03c3e650.js"></script>
|
|
8
|
+
<link rel="stylesheet" href="/assets/index.2277ba1a.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/dist/main.css
CHANGED
|
@@ -559,6 +559,10 @@ video {
|
|
|
559
559
|
margin-bottom: 1.25rem;
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
+
.mr-2 {
|
|
563
|
+
margin-right: 0.5rem;
|
|
564
|
+
}
|
|
565
|
+
|
|
562
566
|
.mr-5 {
|
|
563
567
|
margin-right: 1.25rem;
|
|
564
568
|
}
|
|
@@ -567,10 +571,6 @@ video {
|
|
|
567
571
|
margin-left: 1rem;
|
|
568
572
|
}
|
|
569
573
|
|
|
570
|
-
.mr-2 {
|
|
571
|
-
margin-right: 0.5rem;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
574
|
.mr-1 {
|
|
575
575
|
margin-right: 0.25rem;
|
|
576
576
|
}
|
|
@@ -587,6 +587,10 @@ video {
|
|
|
587
587
|
display: contents;
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
+
.h-screen {
|
|
591
|
+
height: 100vh;
|
|
592
|
+
}
|
|
593
|
+
|
|
590
594
|
.w-full {
|
|
591
595
|
width: 100%;
|
|
592
596
|
}
|
|
@@ -619,14 +623,14 @@ video {
|
|
|
619
623
|
justify-content: space-around;
|
|
620
624
|
}
|
|
621
625
|
|
|
622
|
-
.gap-4 {
|
|
623
|
-
gap: 1rem;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
626
|
.gap-2 {
|
|
627
627
|
gap: 0.5rem;
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
+
.gap-4 {
|
|
631
|
+
gap: 1rem;
|
|
632
|
+
}
|
|
633
|
+
|
|
630
634
|
.gap-10 {
|
|
631
635
|
gap: 2.5rem;
|
|
632
636
|
}
|
|
@@ -636,10 +640,6 @@ video {
|
|
|
636
640
|
column-gap: 1rem;
|
|
637
641
|
}
|
|
638
642
|
|
|
639
|
-
.rounded-full {
|
|
640
|
-
border-radius: 9999px;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
643
|
.border {
|
|
644
644
|
border-width: 1px;
|
|
645
645
|
}
|
|
@@ -654,10 +654,6 @@ 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
|
-
|
|
661
657
|
.px-4 {
|
|
662
658
|
padding-left: 1rem;
|
|
663
659
|
padding-right: 1rem;
|
|
@@ -678,6 +674,21 @@ video {
|
|
|
678
674
|
line-height: 1.75rem;
|
|
679
675
|
}
|
|
680
676
|
|
|
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
|
+
|
|
681
692
|
.font-semibold {
|
|
682
693
|
font-weight: 600;
|
|
683
694
|
}
|
package/index.js
CHANGED
|
@@ -5,30 +5,32 @@ import ApiDetails from './src/components/ApiDetail'
|
|
|
5
5
|
import BorderedBox from './src/components/BorderedBox'
|
|
6
6
|
import BorderedText from './src/components/BorderedText'
|
|
7
7
|
import HorizontalSeparator from './src/components/HorizontalSeparator'
|
|
8
|
+
import GHLoginButton from './src/components/GHLoginButton'
|
|
8
9
|
import Layout from './src/components/layouts/Layout'
|
|
10
|
+
import LoginButton from './src/components/LoginButton'
|
|
9
11
|
import TwoColumnsLayout from './src/components/layouts/TwoColumnsLayout'
|
|
10
12
|
import Playground from './src/components/Playground'
|
|
11
|
-
import
|
|
13
|
+
import PullRequest from './src/components/PullRequest'
|
|
12
14
|
import SearchBar from './src/components/SearchBar'
|
|
13
15
|
import TabbedWindow from './src/components/TabbedWindow'
|
|
16
|
+
import TextWithLabel from './src/components/TextWithLabel'
|
|
14
17
|
import Versions from './src/components/Versions'
|
|
15
18
|
import VerticalSeparator from './src/components/VerticalSeparator'
|
|
16
|
-
import LoginButton from './src/components/LoginButton'
|
|
17
|
-
import GHLoginButton from './src/components/GHLoginButton'
|
|
18
19
|
export {
|
|
19
20
|
ApiSummary,
|
|
20
21
|
ApiDetails,
|
|
21
22
|
BorderedBox,
|
|
22
23
|
BorderedText,
|
|
24
|
+
GHLoginButton,
|
|
23
25
|
HorizontalSeparator,
|
|
24
26
|
Layout,
|
|
27
|
+
LoginButton,
|
|
25
28
|
TwoColumnsLayout,
|
|
26
29
|
Playground,
|
|
27
|
-
|
|
30
|
+
PullRequest,
|
|
28
31
|
SearchBar,
|
|
29
32
|
TabbedWindow,
|
|
33
|
+
TextWithLabel,
|
|
30
34
|
Versions,
|
|
31
|
-
VerticalSeparator
|
|
32
|
-
LoginButton,
|
|
33
|
-
GHLoginButton
|
|
35
|
+
VerticalSeparator
|
|
34
36
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/ui-components",
|
|
3
3
|
"description": "Platformatic UI Components",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.11",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"scripts": {
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
"build-storybook": "NODE_OPTIONS='--openssl-legacy-provider' build-storybook",
|
|
13
13
|
"tailwind:watch": "tailwindcss -i ./src/styles/main.css -o ./dist/main.css --watch",
|
|
14
14
|
"tailwind": "tailwindcss -i ./src/styles/main.css -o ./dist/main.css",
|
|
15
|
-
"lint": "standard
|
|
15
|
+
"lint": "standard src | snazzy",
|
|
16
|
+
"lint:fix": "standard src --fix",
|
|
17
|
+
"test": "vitest run"
|
|
16
18
|
},
|
|
17
19
|
"dependencies": {
|
|
18
20
|
"@fortawesome/fontawesome-svg-core": "^6.2.0",
|
|
@@ -34,17 +36,28 @@
|
|
|
34
36
|
"@storybook/builder-vite": "^0.2.4",
|
|
35
37
|
"@storybook/react": "^6.5.12",
|
|
36
38
|
"@storybook/testing-library": "^0.0.13",
|
|
39
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
40
|
+
"@testing-library/react": "^13.4.0",
|
|
37
41
|
"@types/react": "^18.0.17",
|
|
38
42
|
"@types/react-dom": "^18.0.6",
|
|
39
43
|
"@vitejs/plugin-react": "^2.1.0",
|
|
40
44
|
"babel-loader": "^8.2.5",
|
|
45
|
+
"jsdom": "^20.0.1",
|
|
46
|
+
"react-test-renderer": "^18.2.0",
|
|
47
|
+
"snazzy": "^9.0.0",
|
|
41
48
|
"standard": "^17.0.0",
|
|
42
49
|
"tailwindcss": "^3.1.8",
|
|
43
|
-
"vite": "^3.1.0"
|
|
50
|
+
"vite": "^3.1.0",
|
|
51
|
+
"vitest": "^0.24.3"
|
|
44
52
|
},
|
|
45
53
|
"standard": {
|
|
46
|
-
"
|
|
54
|
+
"globals": [
|
|
55
|
+
"expect",
|
|
56
|
+
"test",
|
|
47
57
|
"alert"
|
|
58
|
+
],
|
|
59
|
+
"ignore": [
|
|
60
|
+
"/dist"
|
|
48
61
|
]
|
|
49
62
|
}
|
|
50
63
|
}
|
|
@@ -6,8 +6,10 @@ import BorderedText from './BorderedText'
|
|
|
6
6
|
import HorizontalSeparator from './HorizontalSeparator'
|
|
7
7
|
import TwoColumnsLayout from './layouts/TwoColumnsLayout'
|
|
8
8
|
import StatsView from './StatsView'
|
|
9
|
+
import TextWithLabel from './TextWithLabel'
|
|
9
10
|
import VerticalSeparator from './VerticalSeparator'
|
|
10
11
|
import React from 'react'
|
|
12
|
+
import styles from './ApiDetail.module.css'
|
|
11
13
|
export default function ApiDetails (props) {
|
|
12
14
|
const { url, repository, version, openapi, graphql, source, lastDeploy } = props
|
|
13
15
|
const requestStats = {
|
|
@@ -55,20 +57,22 @@ export default function ApiDetails (props) {
|
|
|
55
57
|
return (
|
|
56
58
|
<>
|
|
57
59
|
<BorderedBox classes='api-data'>
|
|
58
|
-
<div>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
<div className={styles.main}>
|
|
61
|
+
<div>
|
|
62
|
+
Preview/Staging URL: <a href={url}>{url}</a>
|
|
63
|
+
</div>
|
|
64
|
+
<div>
|
|
65
|
+
Repository: <a href={`https://github.com/${repository}`}>{repository}</a>
|
|
66
|
+
</div>
|
|
67
|
+
<div>
|
|
68
|
+
Version: <BorderedText text={`v${version}`} />
|
|
69
|
+
</div>
|
|
66
70
|
</div>
|
|
67
71
|
<HorizontalSeparator />
|
|
68
72
|
<div className='flex gap-2 items-center'>
|
|
69
|
-
<
|
|
73
|
+
<TextWithLabel label='Generated With' text={source} />
|
|
70
74
|
<VerticalSeparator />
|
|
71
|
-
<
|
|
75
|
+
<TextWithLabel label='Last deployed' text={lastDeploy} />
|
|
72
76
|
</div>
|
|
73
77
|
<div className='flex items-center'>
|
|
74
78
|
<span className='mr-2'>Endpoints: </span><Endpoints graphql={graphql} openapi={openapi} />
|
|
@@ -5,8 +5,9 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
|
5
5
|
import { faLink } from '@fortawesome/free-solid-svg-icons'
|
|
6
6
|
import ApiVersion from './Api/Version'
|
|
7
7
|
import ApiIcon from './icons/ApiIcon'
|
|
8
|
-
import ApiIconClosed from './
|
|
9
|
-
import
|
|
8
|
+
import ApiIconClosed from './icons/ApiIconClosed'
|
|
9
|
+
import VerticalSeparator from './VerticalSeparator'
|
|
10
|
+
import TextWithLabel from './TextWithLabel'
|
|
10
11
|
import ApiStatus from './Api/Status'
|
|
11
12
|
import BorderedBox from './BorderedBox'
|
|
12
13
|
import HorizontalSeparator from './HorizontalSeparator'
|
|
@@ -46,9 +47,9 @@ export default function ApiSummary (props) {
|
|
|
46
47
|
</div>
|
|
47
48
|
|
|
48
49
|
<div className='flex gap-2 items-center'>
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
<
|
|
50
|
+
<TextWithLabel label='Generated With' text={source} />
|
|
51
|
+
<VerticalSeparator />
|
|
52
|
+
<TextWithLabel label='Last deployed' text={lastDeploy} />
|
|
52
53
|
</div>
|
|
53
54
|
</div>
|
|
54
55
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
4
3
|
import styles from './LoginButton.module.css'
|
|
5
4
|
|
|
@@ -8,9 +7,10 @@ export default function LoginButton ({ icon, label, onClick, ...props }) {
|
|
|
8
7
|
<div className={styles.container} onClick={onClick}>
|
|
9
8
|
<div
|
|
10
9
|
className={styles.button}
|
|
10
|
+
data-testid='login-button'
|
|
11
11
|
{...props}
|
|
12
12
|
>
|
|
13
|
-
{icon ? <FontAwesomeIcon icon={icon} className='mr-2' /> : null} {label}
|
|
13
|
+
{icon ? <FontAwesomeIcon icon={icon} className='mr-2' data-testid='login-button-icon' /> : null} {label}
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { render, screen } from '@testing-library/react'
|
|
3
|
+
import '@testing-library/jest-dom/extend-expect'
|
|
4
|
+
import LoginButton from './LoginButton'
|
|
5
|
+
import { faTwitter } from '@fortawesome/free-brands-svg-icons'
|
|
6
|
+
|
|
7
|
+
test('<LoginButton /> with label', () => {
|
|
8
|
+
const label = 'My Button'
|
|
9
|
+
render(
|
|
10
|
+
<LoginButton label={label} />
|
|
11
|
+
)
|
|
12
|
+
expect(screen.getByTestId('login-button')).toHaveTextContent(label)
|
|
13
|
+
const icon = screen.queryByTestId('login-button-icon')
|
|
14
|
+
expect(icon).not.toBeInTheDocument()
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
test('<LoginButton /> with label and twitter icon', () => {
|
|
18
|
+
const label = 'My Twitter Button'
|
|
19
|
+
render(
|
|
20
|
+
<LoginButton label={label} icon={faTwitter} />
|
|
21
|
+
)
|
|
22
|
+
expect(screen.getByTestId('login-button')).toHaveTextContent(label)
|
|
23
|
+
const icon = screen.queryByTestId('login-button-icon')
|
|
24
|
+
expect(icon).toBeInTheDocument()
|
|
25
|
+
})
|
package/src/components/Main.jsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import SearchBar from './SearchBar'
|
|
4
|
-
import Api from './Api'
|
|
5
4
|
import ApiDetails from './ApiDetail'
|
|
5
|
+
import ApiSummary from './ApiSummary'
|
|
6
6
|
import TabbedWindow from './TabbedWindow'
|
|
7
7
|
import Prs from './PullRequest'
|
|
8
8
|
import Playground from './Playground'
|
|
@@ -63,7 +63,7 @@ export default function Main () {
|
|
|
63
63
|
<TabbedWindow
|
|
64
64
|
tabs={tabs}
|
|
65
65
|
/>
|
|
66
|
-
{apis.map((api) => { return (<
|
|
66
|
+
{apis.map((api) => { return (<ApiSummary key={api.id} data={api} />) })}
|
|
67
67
|
</>
|
|
68
68
|
)
|
|
69
69
|
}
|
|
@@ -4,6 +4,7 @@ import BorderedBox from './BorderedBox'
|
|
|
4
4
|
import HorizontalSeparator from './HorizontalSeparator'
|
|
5
5
|
import PullRequestIcon from './icons/PullRequestIcon'
|
|
6
6
|
import styles from './PullRequest.module.css'
|
|
7
|
+
import TextWithLabel from './TextWithLabel'
|
|
7
8
|
import VerticalSeparator from './VerticalSeparator'
|
|
8
9
|
export default function PullRequest ({ id, title, lastCommit, url }) {
|
|
9
10
|
return (
|
|
@@ -14,22 +15,16 @@ export default function PullRequest ({ id, title, lastCommit, url }) {
|
|
|
14
15
|
<span><a href={url} target='_blank' rel='noreferrer'>{url}</a></span>
|
|
15
16
|
</div>
|
|
16
17
|
<div className={styles.content}>
|
|
17
|
-
<
|
|
18
|
-
<span className={styles.label}>PR Title: </span>
|
|
19
|
-
<span className={styles.value}>{title}</span>
|
|
20
|
-
</div>
|
|
18
|
+
<TextWithLabel label='PR Title' text={title} />
|
|
21
19
|
</div>
|
|
22
20
|
|
|
23
21
|
<HorizontalSeparator />
|
|
24
|
-
<div>
|
|
25
|
-
<
|
|
26
|
-
<span className={styles.value}>{lastCommit.author}</span>
|
|
22
|
+
<div className={styles.footer}>
|
|
23
|
+
<TextWithLabel label='Last commit by' text={lastCommit.author} />
|
|
27
24
|
<VerticalSeparator />
|
|
28
|
-
<
|
|
29
|
-
<span className={styles.value}>{lastCommit.sha}</span>
|
|
25
|
+
<TextWithLabel label='Commit SHA' text={lastCommit.sha} />
|
|
30
26
|
<VerticalSeparator />
|
|
31
|
-
<
|
|
32
|
-
<span className={styles.value}>{lastCommit.date}</span>
|
|
27
|
+
<TextWithLabel label='Last Update' text={lastCommit.date} />
|
|
33
28
|
</div>
|
|
34
29
|
</BorderedBox>
|
|
35
30
|
)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import styles from './TextWithLabel.module.css'
|
|
3
|
+
export default function TextWithLabel ({ label, text, children }) {
|
|
4
|
+
return (
|
|
5
|
+
<div className={styles.container}>
|
|
6
|
+
<span className={styles.label}>{label}:</span>
|
|
7
|
+
{text && <span className={styles.text}>{text}</span>}
|
|
8
|
+
{children && <span>{children}</span>}
|
|
9
|
+
</div>
|
|
10
|
+
)
|
|
11
|
+
}
|
package/src/stories/Button.jsx
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import PropTypes from 'prop-types'
|
|
3
|
-
import './button.css'
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import './button.css'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Primary UI component for user interaction
|
|
7
7
|
*/
|
|
8
8
|
export const Button = ({ primary, backgroundColor, size, label, ...props }) => {
|
|
9
|
-
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'
|
|
9
|
+
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'
|
|
10
10
|
return (
|
|
11
11
|
<button
|
|
12
|
-
type=
|
|
12
|
+
type='button'
|
|
13
13
|
className={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
|
|
14
14
|
style={backgroundColor && { backgroundColor }}
|
|
15
15
|
{...props}
|
|
16
16
|
>
|
|
17
17
|
{label}
|
|
18
18
|
</button>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
21
|
|
|
22
22
|
Button.propTypes = {
|
|
23
23
|
/**
|
|
@@ -39,12 +39,12 @@ Button.propTypes = {
|
|
|
39
39
|
/**
|
|
40
40
|
* Optional click handler
|
|
41
41
|
*/
|
|
42
|
-
onClick: PropTypes.func
|
|
43
|
-
}
|
|
42
|
+
onClick: PropTypes.func
|
|
43
|
+
}
|
|
44
44
|
|
|
45
45
|
Button.defaultProps = {
|
|
46
46
|
backgroundColor: null,
|
|
47
47
|
primary: false,
|
|
48
48
|
size: 'medium',
|
|
49
|
-
onClick: undefined
|
|
50
|
-
}
|
|
49
|
+
onClick: undefined
|
|
50
|
+
}
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
10
10
|
argTypes: {
|
|
11
11
|
backgroundColor: { control: 'color' }
|
|
12
|
-
}
|
|
12
|
+
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
|
|
@@ -20,21 +20,21 @@ export const Primary = Template.bind({})
|
|
|
20
20
|
Primary.args = {
|
|
21
21
|
primary: true,
|
|
22
22
|
label: 'Button'
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
export const Secondary = Template.bind({})
|
|
26
26
|
Secondary.args = {
|
|
27
27
|
label: 'Button'
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
|
|
30
30
|
export const Large = Template.bind({})
|
|
31
31
|
Large.args = {
|
|
32
32
|
size: 'large',
|
|
33
33
|
label: 'Button'
|
|
34
|
-
}
|
|
34
|
+
}
|
|
35
35
|
|
|
36
36
|
export const Small = Template.bind({})
|
|
37
37
|
Small.args = {
|
|
38
38
|
size: 'small',
|
|
39
39
|
label: 'Button'
|
|
40
|
-
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import TextWithLabel from '../components/TextWithLabel'
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Platformatic/TextWithLabel',
|
|
6
|
+
component: TextWithLabel,
|
|
7
|
+
argTypes: {
|
|
8
|
+
label: { control: 'text' },
|
|
9
|
+
text: { control: 'text' }
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const Template = (args) => <TextWithLabel {...args} />
|
|
13
|
+
|
|
14
|
+
export const Standard = Template.bind({})
|
|
15
|
+
|
|
16
|
+
Standard.args = {
|
|
17
|
+
label: 'Created By',
|
|
18
|
+
text: 'Platformatic Team'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const WithLink = (args) => <TextWithLabel {...args}><a href='https://example.com'>Standard Link</a></TextWithLabel>
|
|
22
|
+
|
|
23
|
+
WithLink.args = {
|
|
24
|
+
label: 'External Link'
|
|
25
|
+
}
|