@platformatic/ui-components 0.1.17 → 0.1.18

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.
@@ -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))}._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}
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.fcbe6de7.js"></script>
8
- <link rel="stylesheet" href="/platformatic-ui.css">
7
+ <script type="module" crossorigin src="/assets/index.d77cda9b.js"></script>
8
+ <link rel="stylesheet" href="/assets/index.f6d5761c.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="root"></div>
package/dist/main.css CHANGED
@@ -540,6 +540,10 @@ video {
540
540
  }
541
541
  }
542
542
 
543
+ .static {
544
+ position: static;
545
+ }
546
+
543
547
  .m-3 {
544
548
  margin: 0.75rem;
545
549
  }
@@ -549,6 +553,11 @@ video {
549
553
  margin-bottom: 1rem;
550
554
  }
551
555
 
556
+ .my-8 {
557
+ margin-top: 2rem;
558
+ margin-bottom: 2rem;
559
+ }
560
+
552
561
  .mx-auto {
553
562
  margin-left: auto;
554
563
  margin-right: auto;
@@ -559,6 +568,10 @@ video {
559
568
  margin-bottom: 1.25rem;
560
569
  }
561
570
 
571
+ .mr-2 {
572
+ margin-right: 0.5rem;
573
+ }
574
+
562
575
  .mr-5 {
563
576
  margin-right: 1.25rem;
564
577
  }
@@ -567,12 +580,12 @@ video {
567
580
  margin-left: 1rem;
568
581
  }
569
582
 
570
- .mr-2 {
571
- margin-right: 0.5rem;
583
+ .mt-24 {
584
+ margin-top: 6rem;
572
585
  }
573
586
 
574
- .mr-1 {
575
- margin-right: 0.25rem;
587
+ .mb-16 {
588
+ margin-bottom: 4rem;
576
589
  }
577
590
 
578
591
  .flex {
@@ -583,8 +596,8 @@ video {
583
596
  display: grid;
584
597
  }
585
598
 
586
- .contents {
587
- display: contents;
599
+ .h-screen {
600
+ height: 100vh;
588
601
  }
589
602
 
590
603
  .w-full {
@@ -595,6 +608,10 @@ video {
595
608
  width: 2.25rem;
596
609
  }
597
610
 
611
+ .w-80 {
612
+ width: 20rem;
613
+ }
614
+
598
615
  .grow {
599
616
  flex-grow: 1;
600
617
  }
@@ -607,6 +624,10 @@ video {
607
624
  flex-direction: column;
608
625
  }
609
626
 
627
+ .place-items-center {
628
+ place-items: center;
629
+ }
630
+
610
631
  .items-center {
611
632
  align-items: center;
612
633
  }
@@ -615,18 +636,14 @@ video {
615
636
  justify-content: space-between;
616
637
  }
617
638
 
618
- .justify-around {
619
- justify-content: space-around;
639
+ .gap-2 {
640
+ gap: 0.5rem;
620
641
  }
621
642
 
622
643
  .gap-4 {
623
644
  gap: 1rem;
624
645
  }
625
646
 
626
- .gap-2 {
627
- gap: 0.5rem;
628
- }
629
-
630
647
  .gap-10 {
631
648
  gap: 2.5rem;
632
649
  }
@@ -636,10 +653,6 @@ video {
636
653
  column-gap: 1rem;
637
654
  }
638
655
 
639
- .rounded-full {
640
- border-radius: 9999px;
641
- }
642
-
643
656
  .border {
644
657
  border-width: 1px;
645
658
  }
@@ -654,10 +667,6 @@ video {
654
667
  border-color: rgb(33 250 144 / var(--tw-border-opacity));
655
668
  }
656
669
 
657
- .p-2 {
658
- padding: 0.5rem;
659
- }
660
-
661
670
  .px-4 {
662
671
  padding-left: 1rem;
663
672
  padding-right: 1rem;
@@ -673,9 +682,19 @@ video {
673
682
  line-height: 1;
674
683
  }
675
684
 
676
- .text-xl {
677
- font-size: 1.25rem;
678
- line-height: 1.75rem;
685
+ .text-4xl {
686
+ font-size: 2.25rem;
687
+ line-height: 2.5rem;
688
+ }
689
+
690
+ .text-3xl {
691
+ font-size: 1.875rem;
692
+ line-height: 2.25rem;
693
+ }
694
+
695
+ .text-6xl {
696
+ font-size: 3.75rem;
697
+ line-height: 1;
679
698
  }
680
699
 
681
700
  .font-semibold {
@@ -695,14 +714,14 @@ video {
695
714
  color: rgb(33 250 144 / var(--tw-text-opacity));
696
715
  }
697
716
 
698
- .text-dark-green {
717
+ .text-white {
699
718
  --tw-text-opacity: 1;
700
- color: rgb(2 120 63 / var(--tw-text-opacity));
719
+ color: rgb(255 255 255 / var(--tw-text-opacity));
701
720
  }
702
721
 
703
- .text-white {
722
+ .text-dark-green {
704
723
  --tw-text-opacity: 1;
705
- color: rgb(255 255 255 / var(--tw-text-opacity));
724
+ color: rgb(2 120 63 / var(--tw-text-opacity));
706
725
  }
707
726
 
708
727
  .text-error-red {
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.17",
4
+ "version": "0.1.18",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "scripts": {
@@ -26,6 +26,7 @@
26
26
  "postcss": "^8.4.17",
27
27
  "react": "^18.2.0",
28
28
  "react-dom": "^18.2.0",
29
+ "react-tooltip": "^4.4.3",
29
30
  "storybook-tailwind-foundations": "^1.1.2"
30
31
  },
31
32
  "devDependencies": {
@@ -4,7 +4,6 @@ import Endpoints from './Api/Endpoints'
4
4
  import BorderedBox from './BorderedBox'
5
5
  import BorderedText from './BorderedText'
6
6
  import HorizontalSeparator from './HorizontalSeparator'
7
- import TwoColumnsLayout from './layouts/TwoColumnsLayout'
8
7
  import TextWithLabel from './TextWithLabel'
9
8
  import VerticalSeparator from './VerticalSeparator'
10
9
  import React from 'react'
@@ -35,14 +34,6 @@ export default function ApiDetails (props) {
35
34
  <span className='mr-2'>Endpoints: </span><Endpoints graphql={graphql} openapi={openapi} />
36
35
  </div>
37
36
  </BorderedBox>
38
- <TwoColumnsLayout>
39
- <BorderedBox>
40
- Connected Clients
41
- </BorderedBox>
42
- <BorderedBox>
43
- Failure Rate
44
- </BorderedBox>
45
- </TwoColumnsLayout>
46
37
  </>
47
38
 
48
39
  )
@@ -2,22 +2,31 @@
2
2
 
3
3
  import React from 'react'
4
4
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
5
- import { faCircleInfo } from '@fortawesome/free-solid-svg-icons'
5
+ // The icon that is in design is not in the free version of fontawesome
6
+ // Temporary using this one
7
+ import { faCircleExclamation } from '@fortawesome/free-solid-svg-icons'
8
+ import ReactTooltip from 'react-tooltip'
6
9
  import BorderedBox from './BorderedBox'
7
10
  import styles from './SimpleMetric.module.css'
8
11
  import MetricValue from './MetricValue'
9
12
 
10
- export default function SimpleMetric ({ title, pre, color, unit, value, children }) {
13
+ export default function SimpleMetric ({ title, pre, color, unit, value, tooltip, children }) {
11
14
  return (
12
- <BorderedBox>
13
- <div className={styles.header}>
14
- <span className={styles.title}>{title}</span>
15
- <FontAwesomeIcon icon={faCircleInfo} className='text-white' />
16
- </div>
17
- <div>
18
- <MetricValue pre={pre} color={color} unit={unit} value={value} />
19
- {children}
20
- </div>
21
- </BorderedBox>
15
+ <>
16
+ <BorderedBox>
17
+ <div className={styles.header}>
18
+ <span className={styles.title}>{title}</span>
19
+ <FontAwesomeIcon
20
+ icon={faCircleExclamation}
21
+ data-tip={tooltip}
22
+ />
23
+ </div>
24
+ <div>
25
+ <MetricValue pre={pre} color={color} unit={unit} value={value} />
26
+ {children}
27
+ </div>
28
+ </BorderedBox>
29
+ <ReactTooltip />
30
+ </>
22
31
  )
23
32
  }
@@ -16,6 +16,8 @@ Default.args = {
16
16
  color: 'green',
17
17
  unit: 'ms',
18
18
  value: 120,
19
+ pre: 'P90',
20
+ tooltip: 'This is a tooltip for the metric',
19
21
  leftDetail: {
20
22
  value: 600,
21
23
  unit: 'ms',
@@ -29,22 +31,3 @@ Default.args = {
29
31
  pre: 'P95'
30
32
  }
31
33
  }
32
-
33
- // export const Red = Template.bind({})
34
-
35
- // Red.args = {
36
- // title: 'Requests',
37
- // color: 'red',
38
- // unit: 'ms',
39
- // value: 120
40
- // }
41
-
42
- // export const WithPrefix = Template.bind({})
43
-
44
- // WithPrefix.args = {
45
- // title: 'Requests',
46
- // color: 'green',
47
- // unit: 'ms',
48
- // value: 120,
49
- // pre: 'P90'
50
- // }
@@ -15,7 +15,8 @@ Green.args = {
15
15
  title: 'Requests',
16
16
  color: 'green',
17
17
  unit: 'ms',
18
- value: 120
18
+ value: 120,
19
+ tooltip: 'This is a tooltip for the metric'
19
20
  }
20
21
 
21
22
  export const Red = Template.bind({})
@@ -24,7 +25,8 @@ Red.args = {
24
25
  title: 'Requests',
25
26
  color: 'red',
26
27
  unit: 'ms',
27
- value: 120
28
+ value: 120,
29
+ tooltip: 'This is a tooltip for the metric'
28
30
  }
29
31
 
30
32
  export const WithPrefix = Template.bind({})
@@ -34,5 +36,6 @@ WithPrefix.args = {
34
36
  color: 'green',
35
37
  unit: 'ms',
36
38
  value: 120,
37
- pre: 'P90'
39
+ pre: 'P90',
40
+ tooltip: 'This is a tooltip for the metric'
38
41
  }