@platformatic/ui-components 0.1.85 → 0.1.87
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.2c94de34.js +206 -0
- package/dist/assets/index.bbcc19d7.css +1 -0
- package/dist/index.html +2 -2
- package/dist/main.css +4 -4
- package/index.js +1 -0
- package/package.json +1 -1
- package/src/components/BorderedBox.jsx +1 -1
- package/src/components/Button.jsx +15 -13
- package/src/components/Checkbox.jsx +23 -3
- package/src/components/Checkbox.module.css +14 -2
- package/src/components/Common.module.css +14 -1
- package/src/components/HorizontalSeparator.jsx +33 -2
- package/src/components/Modal.jsx +0 -1
- package/src/components/Modal.module.css +0 -3
- package/src/components/PlatformaticIcon.jsx +7 -1
- package/src/components/Sidebar.jsx +1 -1
- package/src/components/SimpleMetric.jsx +10 -14
- package/src/components/TextWithLabel.jsx +39 -2
- package/src/components/TextWithLabel.module.css +0 -3
- package/src/components/VerticalSeparator.jsx +20 -2
- package/src/components/constants.js +12 -1
- package/src/components/forms/Field.module.css +1 -1
- package/src/components/forms/Input.jsx +13 -4
- package/src/components/forms/Input.module.css +3 -0
- package/src/components/icons/CreditCardIcon.jsx +85 -0
- package/src/components/icons/GiveOwnershipIcon.jsx +84 -0
- package/src/components/icons/LogOutIcon.jsx +11 -3
- package/src/components/icons/OrganizationIcon.jsx +90 -0
- package/src/components/icons/RequestOwnershipIcon.jsx +84 -0
- package/src/components/icons/UserIcon.jsx +80 -0
- package/src/components/icons/UserRemoveIcon.jsx +97 -0
- package/src/components/icons/UserRoleIcon.jsx +96 -0
- package/src/components/icons/index.js +14 -0
- package/src/stories/Checkbox.stories.jsx +19 -0
- package/src/stories/forms/Input.stories.jsx +9 -0
- package/tailwind.config.cjs +1 -0
- package/dist/assets/index.a6b7ebf4.css +0 -1
- package/dist/assets/index.bd06830c.js +0 -40
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._input_1k1s3_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-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._onFocus_1k1s3_4{--tw-border-opacity: 1;border-color:rgb(33 250 144 / var(--tw-border-opacity))}._onBlur_1k1s3_7{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}._fillGreen_1k1s3_10{fill:#21fa90}._fillWhite_1k1s3_13{fill:#fff}._input_1k1s3_1>input:focus{outline:2px solid transparent;outline-offset:2px}._title_1k1s3_19{padding-bottom:1rem;font-size:1.875rem;line-height:2.25rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._bordered_1vc1b_1{box-sizing:border-box;border-radius:.375rem;border-width:1px;border-style:solid}._bordered--main-green_1vc1b_4{--tw-border-opacity: 1;border-color:rgb(33 250 144 / var(--tw-border-opacity))}._bordered--main-dark-blue_1vc1b_7{--tw-border-opacity: 1;border-color:rgb(0 40 61 / var(--tw-border-opacity))}._bordered--error-red_1vc1b_10{--tw-border-opacity: 1;border-color:rgb(250 33 33 / var(--tw-border-opacity))}._bordered--warning-yellow_1vc1b_13{--tw-border-opacity: 1;border-color:rgb(254 185 40 / var(--tw-border-opacity))}._bordered--dark-blue_1vc1b_16{--tw-border-opacity: 1;border-color:rgb(0 52 79 / var(--tw-border-opacity))}._bordered--white_1vc1b_19{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}._error-message_1vc1b_23{position:absolute;bottom:-1.25rem;padding-left:.5rem;padding-right:.5rem;font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(250 33 33 / var(--tw-text-opacity))}._padded_1vc1b_27{padding:.625rem .5rem}._text--error-red_1vc1b_31{--tw-text-opacity: 1;color:rgb(250 33 33 / var(--tw-text-opacity))}._text--white_1vc1b_34{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._text--dark-green_1vc1b_37{--tw-text-opacity: 1;color:rgb(2 120 63 / var(--tw-text-opacity))}._text--main-green_1vc1b_40{--tw-text-opacity: 1;color:rgb(33 250 144 / var(--tw-text-opacity))}._text--main-dark-blue_1vc1b_43{--tw-text-opacity: 1;color:rgb(0 40 61 / var(--tw-text-opacity))}._text--base_1vc1b_47{font-size:1rem;line-height:1.5rem}._text--xs_1vc1b_50{font-size:.75rem;line-height:1rem}._background-color-main-green_1vc1b_54{--tw-bg-opacity: 1 !important;background-color:rgb(33 250 144 / var(--tw-bg-opacity))!important}._background-color-light-green_1vc1b_57{--tw-bg-opacity: 1 !important;background-color:rgb(33 241 144 / var(--tw-bg-opacity))!important}._background-color-dark-green_1vc1b_60{--tw-bg-opacity: 1 !important;background-color:rgb(2 120 63 / var(--tw-bg-opacity))!important}._background-color-main-dark-blue_1vc1b_63{--tw-bg-opacity: 1 !important;background-color:rgb(0 40 61 / var(--tw-bg-opacity))!important}._background-color-dark-blue_1vc1b_66{--tw-bg-opacity: 1 !important;background-color:rgb(0 52 79 / var(--tw-bg-opacity))!important}._background-color-light-blue_1vc1b_69{--tw-bg-opacity: 1 !important;background-color:rgb(233 247 255 / var(--tw-bg-opacity))!important}._background-color-white_1vc1b_72{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}._background-color-error-red_1vc1b_75{--tw-bg-opacity: 1 !important;background-color:rgb(250 33 33 / var(--tw-bg-opacity))!important}._background-color-tertiary-blue_1vc1b_78{--tw-bg-opacity: 1 !important;background-color:rgb(37 136 228 / var(--tw-bg-opacity))!important}._background-color-warning-yellow_1vc1b_81{--tw-bg-opacity: 1 !important;background-color:rgb(254 185 40 / var(--tw-bg-opacity))!important}._background-color-transparent_1vc1b_84{background-color:transparent}._background-color-opaque-100_1vc1b_87{--tw-bg-opacity: 1 !important}._background-color-opaque-60_1vc1b_90{--tw-bg-opacity: .6 !important}._background-color-opaque-30_1vc1b_93{--tw-bg-opacity: .3 !important}._background-color-opaque-20_1vc1b_96{--tw-bg-opacity: .2 !important}._background-color-opaque-10_1vc1b_87{--tw-bg-opacity: .1 !important}._apply-opacity-30_1vc1b_102{opacity:.3}._padding--none_1vc1b_105{padding:0}._padding--small_1vc1b_108{padding:.25rem}._padding--medium_1vc1b_111{padding:.5rem}._padding--large_1vc1b_114{padding:1rem}._padding--extra-large_1vc1b_117{padding:1.5rem}._hover-background-color-opaque-main-green_1vc1b_120:hover{background-color:rgb(33 250 144 / var(--tw-bg-opacity));--tw-bg-opacity: .15 }._hover-background-color-opaque-light-green_1vc1b_123:hover{background-color:rgb(33 241 144 / var(--tw-bg-opacity));--tw-bg-opacity: .15 }._hover-background-color-opaque-dark-green_1vc1b_126:hover{background-color:rgb(2 120 63 / var(--tw-bg-opacity));--tw-bg-opacity: .15 }._hover-background-color-opaque-main-dark-blue_1vc1b_129:hover{background-color:rgb(0 40 61 / var(--tw-bg-opacity));--tw-bg-opacity: .1 }._hover-background-color-opaque-dark-blue_1vc1b_132:hover{background-color:rgb(0 52 79 / var(--tw-bg-opacity));--tw-bg-opacity: .15 }._hover-background-color-opaque-light-blue_1vc1b_135:hover{background-color:rgb(233 247 255 / var(--tw-bg-opacity));--tw-bg-opacity: .15 }._hover-background-color-opaque-white_1vc1b_138:hover{background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-bg-opacity: .15 }._hover-background-color-opaque-error-red_1vc1b_141:hover{background-color:rgb(250 33 33 / var(--tw-bg-opacity));--tw-bg-opacity: .15 }._hover-background-color-opaque-tertiary-blue_1vc1b_144:hover{background-color:rgb(37 136 228 / var(--tw-bg-opacity));--tw-bg-opacity: .15 }._selected-background-color-main-green_1vc1b_147{background-color:rgb(33 250 144 / var(--tw-bg-opacity))!important;--tw-bg-opacity: .15 !important}._selected-background-color-light-green_1vc1b_150{background-color:rgb(33 241 144 / var(--tw-bg-opacity))!important;--tw-bg-opacity: .15 !important}._selected-background-color-dark-green_1vc1b_153{background-color:rgb(2 120 63 / var(--tw-bg-opacity))!important;--tw-bg-opacity: .15 !important}._selected-background-color-main-dark-blue_1vc1b_156{background-color:rgb(0 40 61 / var(--tw-bg-opacity))!important;--tw-bg-opacity: .1 }._selected-background-color-dark-blue_1vc1b_159{background-color:rgb(0 52 79 / var(--tw-bg-opacity))!important;--tw-bg-opacity: .15 }._selected-background-color-light-blue_1vc1b_162{background-color:rgb(233 247 255 / var(--tw-bg-opacity))!important;--tw-bg-opacity: .15 }._selected-background-color-white_1vc1b_165{background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important;--tw-bg-opacity: .15 }._selected-background-color-error-red_1vc1b_168{background-color:rgb(250 33 33 / var(--tw-bg-opacity))!important;--tw-bg-opacity: .15 }._selected-background-color-tertiary-blue_1vc1b_171{background-color:rgb(37 136 228 / var(--tw-bg-opacity))!important;--tw-bg-opacity: .15 }._main-green_s6yir_1>circle,._main-green_s6yir_1>ellipse,._main-green_s6yir_1>rect,._main-green_s6yir_1>line,._main-green_s6yir_1>path{stroke:#21fa90}._error-red_s6yir_10>circle,._error-red_s6yir_10>ellipse,._error-red_s6yir_10>rect,._error-red_s6yir_10>line,._error-red_s6yir_10>path{stroke:#fa2121}._white_s6yir_18>circle,._white_s6yir_18>ellipse,._white_s6yir_18>rect,._white_s6yir_18>line,._white_s6yir_18>path{stroke:#fff}._main-dark-blue_s6yir_25>circle,._main-dark-blue_s6yir_25>ellipse,._main-dark-blue_s6yir_25>rect,._main-dark-blue_s6yir_25>line,._main-dark-blue_s6yir_25>path{stroke:#00283d}._warning-yellow_s6yir_32>circle,._warning-yellow_s6yir_32>ellipse,._warning-yellow_s6yir_32>rect,._warning-yellow_s6yir_32>line,._warning-yellow_s6yir_32>path{stroke:#feb928}._filled-white_s6yir_40{fill:#fff}._filled-error-red_s6yir_43{fill:#fa2121}._filled-main-dark-blue_s6yir_46{fill:#00283d}._filled-main-green_s6yir_49{fill:#21fa90}._filled-warning-yellow_s6yir_52{fill:#feb928}._fill-circle-green_s6yir_56>circle{fill:#fff}._fill-circle-main-dark-blue_s6yir_59>circle{fill:#00283d}._noShrinkForFlex_s6yir_63{flex-shrink:0}._cursorPointer_ydxr1_1{cursor:pointer}._tabbed-container_b09u0_1{--tw-bg-opacity: 1;background-color:rgb(0 40 61 / var(--tw-bg-opacity))}._tabs-header_b09u0_4{margin-bottom:1rem;display:flex;height:2rem;justify-content:flex-start;text-transform:uppercase;letter-spacing:.25em;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}._tabs-header_b09u0_4:hover{cursor:pointer}._tab_b09u0_1{margin-left:2rem;margin-right:2rem;min-width:105px;text-align:center;font-size:.875rem;line-height:1.25rem}._tab_b09u0_1:first-child{margin-left:0}._tab_b09u0_1:last-child{margin-right:0}._tab_b09u0_1:hover{font-weight:600}._selected-tab_b09u0_10{font-weight:600;--tw-text-opacity: 1;color:rgb(33 250 144 / var(--tw-text-opacity));text-decoration-line:underline;text-underline-offset:8px}._tabs-content_b09u0_14{min-height:100vh}._borderedBox_170cy_1{flex:1 1 0%;row-gap:1rem;border-radius:.375rem;padding:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}*,: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: 1280px){.container{max-width:1280px}}@media (min-width: 1440px){.container{max-width:1440px}}@media (min-width: 1536px){.container{max-width:1536px}}.relative{position:relative}.my-auto{margin-top:auto;margin-bottom:auto}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.ml-2{margin-left:.5rem}.mt-4{margin-top:1rem}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-screen{height:100vh}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-2{gap:.5rem}.gap-10{gap:2.5rem}.border{border-width:1px}.px-5{padding-left:1.25rem;padding-right:1.25rem}.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-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-error-red{--tw-text-opacity: 1;color:rgb(250 33 33 / 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-main-green{--tw-text-opacity: 1;color:rgb(33 250 144 / var(--tw-text-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@font-face{font-family:Montserrat;src:url(/assets/Montserrat-Regular.dcfe8df2.ttf) format("truetype");font-weight:400;font-style:normal}: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="/assets/index.
|
|
7
|
+
<script type="module" crossorigin src="/assets/index.2c94de34.js"></script>
|
|
8
|
+
<link rel="stylesheet" href="/assets/index.bbcc19d7.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/dist/main.css
CHANGED
|
@@ -669,14 +669,14 @@ video {
|
|
|
669
669
|
color: rgb(33 250 144 / var(--tw-text-opacity));
|
|
670
670
|
}
|
|
671
671
|
|
|
672
|
-
.text-
|
|
672
|
+
.text-error-red {
|
|
673
673
|
--tw-text-opacity: 1;
|
|
674
|
-
color: rgb(
|
|
674
|
+
color: rgb(250 33 33 / var(--tw-text-opacity));
|
|
675
675
|
}
|
|
676
676
|
|
|
677
|
-
.text-
|
|
677
|
+
.text-dark-green {
|
|
678
678
|
--tw-text-opacity: 1;
|
|
679
|
-
color: rgb(
|
|
679
|
+
color: rgb(2 120 63 / var(--tw-text-opacity));
|
|
680
680
|
}
|
|
681
681
|
|
|
682
682
|
.blur {
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import PlatformaticIcon from './PlatformaticIcon'
|
|
|
7
7
|
import { SIZES, COLORS_BUTTON, BOX_SHADOW, UNDERLINE, HOVER_EFFECTS_BUTTONS, BACKGROUND_COLOR_OPAQUE, MAIN_DARK_BLUE, LARGE } from './constants'
|
|
8
8
|
|
|
9
9
|
function Button ({
|
|
10
|
-
|
|
10
|
+
classes,
|
|
11
11
|
label,
|
|
12
12
|
color,
|
|
13
13
|
backgroundColor,
|
|
@@ -21,30 +21,31 @@ function Button ({
|
|
|
21
21
|
selected,
|
|
22
22
|
...rest
|
|
23
23
|
}) {
|
|
24
|
-
let
|
|
25
|
-
|
|
24
|
+
let buttonClassName = classes
|
|
25
|
+
buttonClassName += ` ${styles.button} ${commonStyles['background-color-' + backgroundColor]} ${styles['color-' + color]} ${styles['button-' + size]}`
|
|
26
|
+
if (!bordered) buttonClassName += ` ${styles['no-border']}`
|
|
26
27
|
if (disabled) {
|
|
27
|
-
|
|
28
|
+
buttonClassName += ` ${styles.disabled}`
|
|
28
29
|
} else {
|
|
29
30
|
switch (hoverEffect) {
|
|
30
31
|
case BACKGROUND_COLOR_OPAQUE:
|
|
31
|
-
|
|
32
|
+
buttonClassName += ' ' + commonStyles[`hover-${BACKGROUND_COLOR_OPAQUE}-${color}`]
|
|
32
33
|
break
|
|
33
34
|
case BOX_SHADOW:
|
|
34
|
-
|
|
35
|
+
buttonClassName += ' ' + styles[`hover-${BOX_SHADOW}-${backgroundColor}`]
|
|
35
36
|
break
|
|
36
37
|
case UNDERLINE:
|
|
37
|
-
|
|
38
|
+
buttonClassName += ` ${styles['underline-effect']}`
|
|
38
39
|
break
|
|
39
40
|
default:
|
|
40
41
|
break
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
if (bold)
|
|
44
|
-
if (fullWidth)
|
|
45
|
-
if (selected)
|
|
44
|
+
if (bold) buttonClassName += ` ${styles.fontBold}`
|
|
45
|
+
if (fullWidth) buttonClassName += ` ${styles.fullWidth}`
|
|
46
|
+
if (selected) buttonClassName += ' ' + commonStyles[`selected-background-color-${color}`]
|
|
46
47
|
return (
|
|
47
|
-
<button className={
|
|
48
|
+
<button className={buttonClassName} disabled={disabled} alt={label} {...rest}>
|
|
48
49
|
{platformaticIcon ? <PlatformaticIcon iconName={platformaticIcon.iconName} color={platformaticIcon.color} data-testid='button-icon' onClick={null} /> : null}
|
|
49
50
|
<span className={styles.label}>{label}</span>
|
|
50
51
|
</button>
|
|
@@ -53,9 +54,9 @@ function Button ({
|
|
|
53
54
|
|
|
54
55
|
Button.propTypes = {
|
|
55
56
|
/**
|
|
56
|
-
*
|
|
57
|
+
* classes
|
|
57
58
|
*/
|
|
58
|
-
|
|
59
|
+
classes: PropTypes.string,
|
|
59
60
|
/**
|
|
60
61
|
* label
|
|
61
62
|
*/
|
|
@@ -106,6 +107,7 @@ Button.propTypes = {
|
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
Button.defaultProps = {
|
|
110
|
+
classes: '',
|
|
109
111
|
label: '',
|
|
110
112
|
color: MAIN_DARK_BLUE,
|
|
111
113
|
backgroundColor: 'transparent',
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import PropTypes from 'prop-types'
|
|
3
4
|
import styles from './Checkbox.module.css'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let className = `${styles.checkbox}`
|
|
5
|
+
import { MAIN_DARK_BLUE, WHITE } from './constants'
|
|
6
|
+
function Checkbox ({ disabled, color, ...rest }) {
|
|
7
|
+
let className = `${styles.checkbox} `
|
|
8
|
+
className += styles[`checkbox--${color}`]
|
|
7
9
|
if (disabled) className += ` ${styles.disabled}`
|
|
8
10
|
return (
|
|
9
11
|
<input type='checkbox' className={className} disabled={disabled} {...rest} />
|
|
10
12
|
)
|
|
11
13
|
}
|
|
14
|
+
|
|
15
|
+
Checkbox.propTypes = {
|
|
16
|
+
/**
|
|
17
|
+
* disabled
|
|
18
|
+
*/
|
|
19
|
+
disabled: PropTypes.bool,
|
|
20
|
+
/**
|
|
21
|
+
* color
|
|
22
|
+
*/
|
|
23
|
+
color: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE])
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Checkbox.defaultProps = {
|
|
27
|
+
disabled: false,
|
|
28
|
+
color: MAIN_DARK_BLUE
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default Checkbox
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
.checkbox {
|
|
2
|
-
@apply border
|
|
2
|
+
@apply border p-2 rounded-sm relative inline-block h-2 w-2;
|
|
3
3
|
-webkit-appearance: none;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.checkbox
|
|
6
|
+
.checkbox--main-dark-blue {
|
|
7
|
+
@apply border-light-green bg-main-dark-blue
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.checkbox--white {
|
|
11
|
+
@apply border-main-dark-blue bg-white
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.checkbox--white:checked {
|
|
15
|
+
@apply bg-main-dark-blue text-white;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.checkbox--main-dark-blue:checked {
|
|
7
19
|
@apply bg-light-green text-main-dark-blue;
|
|
8
20
|
}
|
|
9
21
|
|
|
@@ -34,13 +34,23 @@
|
|
|
34
34
|
.text--white {
|
|
35
35
|
@apply text-white
|
|
36
36
|
}
|
|
37
|
+
.text--dark-green {
|
|
38
|
+
@apply text-dark-green;
|
|
39
|
+
}
|
|
37
40
|
.text--main-green {
|
|
38
|
-
@apply text-main-green
|
|
41
|
+
@apply text-main-green;
|
|
39
42
|
}
|
|
40
43
|
.text--main-dark-blue {
|
|
41
44
|
@apply text-main-dark-blue;
|
|
42
45
|
}
|
|
43
46
|
|
|
47
|
+
.text--base {
|
|
48
|
+
@apply text-base
|
|
49
|
+
}
|
|
50
|
+
.text--xs {
|
|
51
|
+
@apply text-xs
|
|
52
|
+
}
|
|
53
|
+
|
|
44
54
|
.background-color-main-green {
|
|
45
55
|
@apply bg-main-green !important;
|
|
46
56
|
}
|
|
@@ -86,6 +96,9 @@
|
|
|
86
96
|
.background-color-opaque-20 {
|
|
87
97
|
@apply bg-opacity-20 !important;
|
|
88
98
|
}
|
|
99
|
+
.background-color-opaque-10 {
|
|
100
|
+
@apply bg-opacity-10 !important;
|
|
101
|
+
}
|
|
89
102
|
.apply-opacity-30 {
|
|
90
103
|
@apply opacity-30;
|
|
91
104
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import React from 'react'
|
|
3
|
+
import PropTypes from 'prop-types'
|
|
4
|
+
import commonStyles from './Common.module.css'
|
|
5
|
+
import { DARK_GREEN, MAIN_DARK_BLUE } from './constants'
|
|
3
6
|
import styles from './HorizontalSeparator.module.css'
|
|
4
|
-
|
|
7
|
+
function HorizontalSeparator ({ marginTop, marginBottom, color, opacity }) {
|
|
5
8
|
function getClassName () {
|
|
6
|
-
let className = `text
|
|
9
|
+
let className = commonStyles[`text--${color}`] + ' '
|
|
7
10
|
// margin
|
|
8
11
|
className += (marginTop === marginBottom ? `${styles['marginY-' + marginTop]}` : `${styles['marginT-' + marginTop]} ${styles['marginB-' + marginBottom]}`)
|
|
9
12
|
// opacity
|
|
@@ -13,3 +16,31 @@ export default function HorizontalSeparator ({ marginTop = 4, marginBottom = 4,
|
|
|
13
16
|
|
|
14
17
|
return <hr className={getClassName()} />
|
|
15
18
|
}
|
|
19
|
+
|
|
20
|
+
HorizontalSeparator.propTypes = {
|
|
21
|
+
/**
|
|
22
|
+
* marginTop
|
|
23
|
+
*/
|
|
24
|
+
marginTop: PropTypes.number,
|
|
25
|
+
/**
|
|
26
|
+
* marginBottom
|
|
27
|
+
*/
|
|
28
|
+
marginBottom: PropTypes.number,
|
|
29
|
+
/**
|
|
30
|
+
* color
|
|
31
|
+
*/
|
|
32
|
+
color: PropTypes.oneOf([DARK_GREEN, MAIN_DARK_BLUE]),
|
|
33
|
+
/**
|
|
34
|
+
* opacity
|
|
35
|
+
*/
|
|
36
|
+
opacity: PropTypes.number
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
HorizontalSeparator.defaultProps = {
|
|
40
|
+
marginTop: 4,
|
|
41
|
+
marginBottom: 4,
|
|
42
|
+
color: DARK_GREEN,
|
|
43
|
+
opacity: 1
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default HorizontalSeparator
|
package/src/components/Modal.jsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
|
+
import ReactTooltip from 'react-tooltip'
|
|
4
5
|
import Icons from './icons'
|
|
5
6
|
import styles from './PlatformaticIcon.module.css'
|
|
6
7
|
import { COLORS_ICON, SIZES } from './constants'
|
|
@@ -19,7 +20,12 @@ function PlatformaticIcon ({ iconName, color, onClick, size, classes, tip }) {
|
|
|
19
20
|
icon = (<span className={className} onClick={onClick}>{icon}</span>)
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
return
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
{icon}
|
|
26
|
+
{tip && <ReactTooltip place='top' type='info' />}
|
|
27
|
+
</>
|
|
28
|
+
)
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
PlatformaticIcon.propTypes = {
|
|
@@ -111,7 +111,7 @@ function Sidebar (props) {
|
|
|
111
111
|
{!collapsed && <span className={styles.item}>{addTitle}</span>}
|
|
112
112
|
</button>
|
|
113
113
|
</div>
|
|
114
|
-
<HorizontalSeparator marginBottom=
|
|
114
|
+
<HorizontalSeparator marginBottom={2} marginTop={2} />
|
|
115
115
|
|
|
116
116
|
<div className={styles.bottom}>
|
|
117
117
|
<Button label={labelButtonSettings} color={WHITE} onClick={onClickSettings} platformaticIcon={{ iconName: 'GearIcon', color: WHITE }} fullWidth bold size={MEDIUM} hoverEffect={BACKGROUND_COLOR_OPAQUE} />
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
|
-
import ReactTooltip from 'react-tooltip'
|
|
5
4
|
import BorderedBox from './BorderedBox'
|
|
6
5
|
import styles from './SimpleMetric.module.css'
|
|
7
6
|
import MetricValue from './MetricValue'
|
|
@@ -11,18 +10,15 @@ import { BACKGROUND_COLOR_OPAQUE, MEDIUM, WHITE } from './constants'
|
|
|
11
10
|
export default function SimpleMetric ({ title, pre, color, unit, value, tooltip, children }) {
|
|
12
11
|
const withoutChildrenSingleMetric = !children ? styles.centerMetric : ''
|
|
13
12
|
return (
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</BorderedBox>
|
|
25
|
-
<ReactTooltip place='top' type='info' />
|
|
26
|
-
</>
|
|
13
|
+
<BorderedBox>
|
|
14
|
+
<div className={styles.header}>
|
|
15
|
+
<span className={styles.title}>{title}</span>
|
|
16
|
+
<ButtonFullRounded hoverEffect={BACKGROUND_COLOR_OPAQUE} iconColor={WHITE} iconSize={MEDIUM} iconName='CircleExclamationIcon' tip={tooltip} onClick={() => {}} />
|
|
17
|
+
</div>
|
|
18
|
+
<div className={withoutChildrenSingleMetric}>
|
|
19
|
+
<MetricValue pre={pre} color={color} unit={unit} value={value} fontValue='large' />
|
|
20
|
+
{children}
|
|
21
|
+
</div>
|
|
22
|
+
</BorderedBox>
|
|
27
23
|
)
|
|
28
24
|
}
|
|
@@ -1,11 +1,48 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import { FONT_BASE, FONT_XS, MAIN_DARK_BLUE, WHITE } from './constants'
|
|
4
|
+
import commonStyles from './Common.module.css'
|
|
2
5
|
import styles from './TextWithLabel.module.css'
|
|
3
|
-
|
|
6
|
+
function TextWithLabel ({ label, text, children, color, fontSize }) {
|
|
7
|
+
const className = commonStyles[`text--${color}`] + ' ' + commonStyles[`text--${fontSize}`]
|
|
4
8
|
return (
|
|
5
|
-
<div className={
|
|
9
|
+
<div className={className}>
|
|
6
10
|
<span className={styles.label}>{label}:</span>
|
|
7
11
|
{text && <span className={styles.text}>{text}</span>}
|
|
8
12
|
{children && <span>{children}</span>}
|
|
9
13
|
</div>
|
|
10
14
|
)
|
|
11
15
|
}
|
|
16
|
+
|
|
17
|
+
TextWithLabel.propTypes = {
|
|
18
|
+
/**
|
|
19
|
+
* label
|
|
20
|
+
*/
|
|
21
|
+
label: PropTypes.string,
|
|
22
|
+
/**
|
|
23
|
+
* text
|
|
24
|
+
*/
|
|
25
|
+
text: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
26
|
+
/**
|
|
27
|
+
* children
|
|
28
|
+
*/
|
|
29
|
+
children: PropTypes.node,
|
|
30
|
+
/**
|
|
31
|
+
* white
|
|
32
|
+
*/
|
|
33
|
+
color: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE]),
|
|
34
|
+
/**
|
|
35
|
+
* Font Size
|
|
36
|
+
*/
|
|
37
|
+
fontSize: PropTypes.oneOf([FONT_BASE, FONT_XS])
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
TextWithLabel.defaultProps = {
|
|
41
|
+
label: '',
|
|
42
|
+
text: '',
|
|
43
|
+
children: null,
|
|
44
|
+
color: WHITE,
|
|
45
|
+
fontSize: FONT_BASE
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default TextWithLabel
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import React from 'react'
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import PropTypes from 'prop-types'
|
|
4
|
+
import { DARK_GREEN, MAIN_DARK_BLUE } from './constants'
|
|
5
|
+
import commonStyles from './Common.module.css'
|
|
6
|
+
|
|
7
|
+
function VerticalSeparator ({ color }) {
|
|
8
|
+
const className = commonStyles[`text--${color}`] + ' my-auto mx-5'
|
|
9
|
+
return <span className={className}> | </span>
|
|
5
10
|
}
|
|
11
|
+
|
|
12
|
+
VerticalSeparator.propTypes = {
|
|
13
|
+
/**
|
|
14
|
+
* color
|
|
15
|
+
*/
|
|
16
|
+
color: PropTypes.oneOf([DARK_GREEN, MAIN_DARK_BLUE])
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
VerticalSeparator.defaultProps = {
|
|
20
|
+
color: DARK_GREEN
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default VerticalSeparator
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const WHITE = 'white'
|
|
2
2
|
export const MAIN_DARK_BLUE = 'main-dark-blue'
|
|
3
|
+
export const DARK_GREEN = 'dark-green'
|
|
3
4
|
export const MAIN_GREEN = 'main-green'
|
|
4
5
|
export const ERROR_RED = 'error-red'
|
|
5
6
|
export const WARNING_YELLOW = 'warning-yellow'
|
|
@@ -20,7 +21,7 @@ export const MODAL_SIZES = [SMALL, MEDIUM, FULL_WIDTH]
|
|
|
20
21
|
|
|
21
22
|
export const COLORS_ICON = [MAIN_GREEN, WHITE, MAIN_DARK_BLUE, ERROR_RED, WARNING_YELLOW]
|
|
22
23
|
export const COLORS_BUTTON = [MAIN_GREEN, 'dark-green', 'light-green', MAIN_DARK_BLUE, 'dark-blue', 'light-blue', WHITE, ERROR_RED, 'tertiary-blue', 'transparent']
|
|
23
|
-
export const COLORS_BORDERED_BOX = [MAIN_GREEN, ERROR_RED, WHITE, 'dark-blue', WARNING_YELLOW, 'transparent']
|
|
24
|
+
export const COLORS_BORDERED_BOX = [MAIN_GREEN, ERROR_RED, WHITE, 'dark-blue', MAIN_DARK_BLUE, WARNING_YELLOW, 'transparent']
|
|
24
25
|
|
|
25
26
|
export const MODAL_POPUP = 'popup'
|
|
26
27
|
export const MODAL_COVER = 'cover'
|
|
@@ -29,3 +30,13 @@ export const MODAL_LAYOUTS = [MODAL_POPUP, MODAL_COVER]
|
|
|
29
30
|
export const FREE = 'free'
|
|
30
31
|
export const BASIC = 'basic'
|
|
31
32
|
export const PROFILE = ['', FREE, BASIC]
|
|
33
|
+
|
|
34
|
+
export const FONT_BASE = 'base'
|
|
35
|
+
export const FONT_XS = 'xs'
|
|
36
|
+
|
|
37
|
+
export const ROLE_ADMIN = 'admin'
|
|
38
|
+
export const ROLE_USER = 'user'
|
|
39
|
+
export const ROLE_OWNER = 'owner'
|
|
40
|
+
|
|
41
|
+
export const MARGIN_10 = 10
|
|
42
|
+
export const MARGIN_0 = 0
|
|
@@ -4,14 +4,16 @@ import PropTypes from 'prop-types'
|
|
|
4
4
|
import styles from './Input.module.css'
|
|
5
5
|
import commonStyles from '../Common.module.css'
|
|
6
6
|
import PlatformaticIcon from '../PlatformaticIcon'
|
|
7
|
+
import { MAIN_GREEN } from '../constants'
|
|
8
|
+
import BorderedBox from '../BorderedBox'
|
|
7
9
|
|
|
8
|
-
function Input ({ placeholder, value, name, borderColor, errorMessage, onChange, disabled, beforeIcon, afterIcon }) {
|
|
10
|
+
function Input ({ placeholder, value, name, borderColor, errorMessage, onChange, disabled, beforeIcon, afterIcon, focused }) {
|
|
9
11
|
let className = styles.inputContainer + ' ' + commonStyles[`bordered--${borderColor}`] + ' ' + commonStyles[`text--${borderColor}`] + ' ' + commonStyles.padded
|
|
10
12
|
const showError = errorMessage.length > 0
|
|
11
13
|
if (showError) className += ' ' + commonStyles['bordered--error-red']
|
|
12
14
|
if (disabled) className += ' ' + commonStyles['apply-opacity-30']
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
const cmp = (
|
|
15
17
|
<div className={styles.container}>
|
|
16
18
|
<div className={className}>
|
|
17
19
|
{beforeIcon && <PlatformaticIcon iconName={beforeIcon.iconName} classes={styles.beforeInputIcon} size='small' data-testid='before-icon' color={beforeIcon.color} onClick={() => beforeIcon.onClick()} />}
|
|
@@ -21,6 +23,8 @@ function Input ({ placeholder, value, name, borderColor, errorMessage, onChange,
|
|
|
21
23
|
{showError && <span className={commonStyles['error-message']}>{errorMessage}</span>}
|
|
22
24
|
</div>
|
|
23
25
|
)
|
|
26
|
+
|
|
27
|
+
return focused ? (<BorderedBox classes={styles.paddingFocused} color={MAIN_GREEN} backgroundColor={MAIN_GREEN} opaque={10}>{cmp}</BorderedBox>) : cmp
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
Input.propTypes = {
|
|
@@ -63,7 +67,11 @@ Input.propTypes = {
|
|
|
63
67
|
iconName: PropTypes.string,
|
|
64
68
|
color: PropTypes.string,
|
|
65
69
|
onClick: PropTypes.func
|
|
66
|
-
})
|
|
70
|
+
}),
|
|
71
|
+
/**
|
|
72
|
+
* addFocus
|
|
73
|
+
*/
|
|
74
|
+
focused: PropTypes.bool
|
|
67
75
|
}
|
|
68
76
|
|
|
69
77
|
Input.defaultProps = {
|
|
@@ -75,7 +83,8 @@ Input.defaultProps = {
|
|
|
75
83
|
onChange: () => {},
|
|
76
84
|
disabled: false,
|
|
77
85
|
beforeIcon: null,
|
|
78
|
-
afterIcon: null
|
|
86
|
+
afterIcon: null,
|
|
87
|
+
focused: false
|
|
79
88
|
}
|
|
80
89
|
|
|
81
90
|
export default Input
|