@platformatic/ui-components 0.8.9 → 0.8.10
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/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
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-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CIB0_B4X.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-Bj5xxPry.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/package.json
CHANGED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import PropTypes from 'prop-types'
|
|
3
|
+
import styles from './Icons.module.css'
|
|
4
|
+
import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, MAIN_DARK_BLUE } from '../constants'
|
|
5
|
+
|
|
6
|
+
const NextJSIcon = ({
|
|
7
|
+
color = MAIN_DARK_BLUE,
|
|
8
|
+
size = MEDIUM,
|
|
9
|
+
disabled = false,
|
|
10
|
+
inactive = false,
|
|
11
|
+
addImportantToColor = false
|
|
12
|
+
}) => {
|
|
13
|
+
let className = `${styles.svgClassName} `
|
|
14
|
+
// this will be useful if the css is used inside some integrated part, like using icons inside other svg generator
|
|
15
|
+
if (!addImportantToColor) {
|
|
16
|
+
className += styles[`${color}`]
|
|
17
|
+
} else {
|
|
18
|
+
className += styles[`important-${color}`]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (disabled) {
|
|
22
|
+
className += ` ${styles.iconDisabled}`
|
|
23
|
+
}
|
|
24
|
+
if (inactive) {
|
|
25
|
+
className += ` ${styles.iconInactive}`
|
|
26
|
+
}
|
|
27
|
+
let icon = <></>
|
|
28
|
+
|
|
29
|
+
switch (size) {
|
|
30
|
+
case SMALL:
|
|
31
|
+
icon = (
|
|
32
|
+
<svg
|
|
33
|
+
width={16}
|
|
34
|
+
height={16}
|
|
35
|
+
viewBox='0 0 16 16'
|
|
36
|
+
fill='none'
|
|
37
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
38
|
+
className={className}
|
|
39
|
+
>
|
|
40
|
+
<path d='M7.60695 2.00311C7.58114 2.00546 7.49902 2.01367 7.42511 2.01953C5.7208 2.17308 4.12429 3.09269 3.11318 4.50589C2.5502 5.29178 2.19005 6.18312 2.05396 7.12725C2.00587 7.45686 2 7.55421 2 8.00112C2 8.44802 2.00587 8.54538 2.05396 8.87486C2.38009 11.1279 3.98352 13.021 6.15837 13.7223C6.54785 13.8478 6.95832 13.9334 7.42523 13.985C7.60706 14.005 8.39294 14.005 8.57477 13.985C9.38059 13.8959 10.0633 13.6965 10.7366 13.3529C10.8398 13.3001 10.8598 13.2861 10.8457 13.2743C10.8363 13.2673 10.3964 12.6773 9.86861 11.9642L8.90911 10.6682L7.70678 8.88894C7.04525 7.9108 6.50092 7.11083 6.49623 7.11083C6.49154 7.10966 6.48685 7.90012 6.4845 8.86548C6.48098 10.5556 6.47981 10.6237 6.45869 10.6635C6.42819 10.721 6.40473 10.7445 6.35546 10.7703C6.31792 10.789 6.28507 10.7926 6.10793 10.7926H5.90498L5.85101 10.7585C5.81582 10.7363 5.79001 10.7069 5.77241 10.6729L5.74778 10.6201L5.75012 8.26855L5.75364 5.9158L5.79001 5.87006C5.80878 5.84542 5.84867 5.81375 5.87682 5.79851C5.92492 5.77505 5.94369 5.7727 6.14664 5.7727C6.38596 5.7727 6.42584 5.78208 6.48802 5.85012C6.50562 5.86888 7.15658 6.84937 7.93554 8.03044C8.71449 9.21151 9.77945 10.8242 10.3027 11.6159L11.2528 13.055L11.3009 13.0233C11.7267 12.7465 12.1771 12.3525 12.5337 11.942C13.2926 11.0706 13.7818 10.008 13.946 8.87498C13.9941 8.54538 14 8.44802 14 8.00123C14 7.55445 13.9941 7.45697 13.946 7.12748C13.6199 4.87444 12.0165 2.98137 9.84163 2.28005C9.45802 2.15572 9.04989 2.07009 8.59237 2.01848C8.47975 2.00675 7.70443 1.99385 7.60706 2.00323L7.60695 2.00311ZM10.0632 5.63194C10.1195 5.66009 10.1653 5.71405 10.1817 5.77035C10.1911 5.80085 10.1934 6.45291 10.1911 7.92253L10.1876 10.0313L9.8157 9.46123L9.44265 8.89117V7.35821C9.44265 6.36716 9.44734 5.81 9.45438 5.78302C9.47315 5.71733 9.51421 5.66572 9.57052 5.63523C9.61862 5.61059 9.63621 5.60825 9.8204 5.60825C9.99402 5.60825 10.0245 5.61059 10.0632 5.63171V5.63194Z' fill='none' />
|
|
41
|
+
</svg>
|
|
42
|
+
)
|
|
43
|
+
break
|
|
44
|
+
case MEDIUM:
|
|
45
|
+
icon = (
|
|
46
|
+
<svg
|
|
47
|
+
width={24}
|
|
48
|
+
height={24}
|
|
49
|
+
viewBox='0 0 24 24'
|
|
50
|
+
fill='none'
|
|
51
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
52
|
+
className={className}
|
|
53
|
+
>
|
|
54
|
+
<path d='M11.4104 3.00467C11.3717 3.00819 11.2485 3.0205 11.1377 3.0293C8.58119 3.25961 6.18644 4.63903 4.66977 6.75883C3.82529 7.93767 3.28507 9.27468 3.08095 10.6909C3.0088 11.1853 3 11.3313 3 12.0017C3 12.672 3.0088 12.8181 3.08095 13.3123C3.57014 16.6919 5.97528 19.5315 9.23756 20.5834C9.82177 20.7717 10.4375 20.9002 11.1378 20.9776C11.4106 21.0075 12.5894 21.0075 12.8622 20.9776C14.0709 20.8438 15.095 20.5447 16.1049 20.0294C16.2598 19.9502 16.2897 19.9291 16.2686 19.9115C16.2545 19.901 15.5946 19.0159 14.8029 17.9464L13.3637 16.0023L11.5602 13.3334C10.5679 11.8662 9.75139 10.6662 9.74435 10.6662C9.73731 10.6645 9.73027 11.8502 9.72675 13.2982C9.72147 15.8334 9.71971 15.9355 9.68804 15.9953C9.64229 16.0815 9.60709 16.1167 9.53318 16.1554C9.47687 16.1836 9.4276 16.1888 9.16189 16.1888H8.85747L8.77652 16.1378C8.72373 16.1044 8.68502 16.0604 8.65862 16.0094L8.62167 15.9302L8.62519 12.4028L8.63047 8.8737L8.68502 8.80508C8.71317 8.76814 8.773 8.72063 8.81523 8.69776C8.88738 8.66257 8.91553 8.65905 9.21996 8.65905C9.57894 8.65905 9.63877 8.67312 9.73203 8.77517C9.75842 8.80332 10.7349 10.2741 11.9033 12.0457C13.0717 13.8173 14.6692 16.2363 15.454 17.4238L16.8792 19.5825L16.9513 19.535C17.5901 19.1198 18.2656 18.5287 18.8006 17.9129C19.9389 16.6058 20.6727 15.0119 20.9191 13.3125C20.9912 12.8181 21 12.672 21 12.0019C21 11.3317 20.9912 11.1855 20.9191 10.6912C20.4299 7.31165 18.0247 4.47206 14.7624 3.42008C14.187 3.23357 13.5748 3.10513 12.8886 3.02772C12.7196 3.01012 11.5566 2.99077 11.4106 3.00484L11.4104 3.00467ZM15.0948 8.44791C15.1793 8.49014 15.2479 8.57108 15.2726 8.65553C15.2867 8.70128 15.2902 9.67936 15.2867 11.8838L15.2814 15.047L14.7236 14.1919L14.164 13.3368V11.0373C14.164 9.55074 14.171 8.715 14.1816 8.67453C14.2097 8.576 14.2713 8.49859 14.3558 8.45284C14.4279 8.41589 14.4543 8.41237 14.7306 8.41237C14.991 8.41237 15.0368 8.41589 15.0948 8.44756V8.44791Z' fill='none' />
|
|
55
|
+
</svg>
|
|
56
|
+
)
|
|
57
|
+
break
|
|
58
|
+
case LARGE:
|
|
59
|
+
icon = (
|
|
60
|
+
<svg
|
|
61
|
+
width={40}
|
|
62
|
+
height={40}
|
|
63
|
+
viewBox='0 0 40 40'
|
|
64
|
+
fill='none'
|
|
65
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
66
|
+
className={className}
|
|
67
|
+
>
|
|
68
|
+
<path d='M19.0174 5.00778C18.9528 5.01365 18.7475 5.03417 18.5628 5.04883C14.302 5.43269 10.3107 7.73172 7.78294 11.2647C6.37549 13.2295 5.47512 15.4578 5.13491 17.8181C5.01466 18.6421 5 18.8855 5 20.0028C5 21.12 5.01466 21.3634 5.13491 22.1872C5.95023 27.8198 9.95879 32.5524 15.3959 34.3057C16.3696 34.6195 17.3958 34.8336 18.5631 34.9626C19.0177 35.0125 20.9823 35.0125 21.4369 34.9626C23.4515 34.7397 25.1584 34.2412 26.8415 33.3823C27.0996 33.2504 27.1495 33.2152 27.1143 33.1858C27.0908 33.1683 25.991 31.6932 24.6715 29.9106L22.2728 26.6706L19.2669 22.2224C17.6131 19.777 16.2523 17.7771 16.2406 17.7771C16.2288 17.7741 16.2171 19.7503 16.2113 22.1637C16.2025 26.389 16.1995 26.5591 16.1467 26.6588C16.0705 26.8025 16.0118 26.8612 15.8886 26.9257C15.7948 26.9726 15.7127 26.9814 15.2698 26.9814H14.7624L14.6275 26.8964C14.5395 26.8406 14.475 26.7673 14.431 26.6823L14.3694 26.5503L14.3753 20.6714L14.3841 14.7895L14.475 14.6751C14.522 14.6136 14.6217 14.5344 14.6921 14.4963C14.8123 14.4376 14.8592 14.4317 15.3666 14.4317C15.9649 14.4317 16.0646 14.4552 16.22 14.6253C16.264 14.6722 17.8915 17.1234 19.8388 20.0761C21.7862 23.0288 24.4486 27.0606 25.7567 29.0397L28.1319 32.6375L28.2522 32.5583C29.3168 31.8663 30.4427 30.8812 31.3343 29.8549C33.2315 27.6764 34.4545 25.0199 34.8651 22.1875C34.9853 21.3634 35 21.12 35 20.0031C35 18.8861 34.9853 18.6424 34.8651 17.8187C34.0498 12.1861 30.0412 7.45343 24.6041 5.70013C23.645 5.38929 22.6247 5.17522 21.4809 5.0462C21.1994 5.01687 19.2611 4.98461 19.0177 5.00807L19.0174 5.00778ZM25.1581 14.0799C25.2989 14.1502 25.4132 14.2851 25.4543 14.4259C25.4778 14.5021 25.4836 16.1323 25.4778 19.8063L25.469 25.0783L24.5393 23.6531L23.6066 22.2279V18.3955C23.6066 15.9179 23.6184 14.525 23.636 14.4576C23.6829 14.2933 23.7855 14.1643 23.9263 14.0881C24.0465 14.0265 24.0905 14.0206 24.551 14.0206C24.985 14.0206 25.0613 14.0265 25.1581 14.0793V14.0799Z' fill='none' />
|
|
69
|
+
</svg>
|
|
70
|
+
)
|
|
71
|
+
break
|
|
72
|
+
|
|
73
|
+
default:
|
|
74
|
+
break
|
|
75
|
+
}
|
|
76
|
+
return icon
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
NextJSIcon.propTypes = {
|
|
80
|
+
/**
|
|
81
|
+
* color of text, icon and borders
|
|
82
|
+
*/
|
|
83
|
+
color: PropTypes.oneOf(COLORS_ICON),
|
|
84
|
+
/**
|
|
85
|
+
* Size
|
|
86
|
+
*/
|
|
87
|
+
size: PropTypes.oneOf(SIZES),
|
|
88
|
+
/**
|
|
89
|
+
* disabled
|
|
90
|
+
*/
|
|
91
|
+
disabled: PropTypes.bool,
|
|
92
|
+
/**
|
|
93
|
+
* inactive
|
|
94
|
+
*/
|
|
95
|
+
inactive: PropTypes.bool,
|
|
96
|
+
/**
|
|
97
|
+
* addImportantToColor
|
|
98
|
+
*/
|
|
99
|
+
addImportantToColor: PropTypes.bool
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export default NextJSIcon
|
|
@@ -124,6 +124,7 @@ import MetricsLoadingIcon from './MetricsLoadingIcon'
|
|
|
124
124
|
import MetricsLogsIcon from './MetricsLogsIcon'
|
|
125
125
|
import MissingTemplateIcon from './MissingTemplateIcon'
|
|
126
126
|
import NameAppIcon from './NameAppIcon'
|
|
127
|
+
import NextJSIcon from './NextJSIcon'
|
|
127
128
|
import NodeJSMetricsIcon from './NodeJSMetricsIcon'
|
|
128
129
|
import NoActivitiesIcon from './NoActivitiesIcon'
|
|
129
130
|
import NoDeploymentsIcon from './NoDeploymentsIcon'
|
|
@@ -332,6 +333,7 @@ export default {
|
|
|
332
333
|
MetricsLogsIcon,
|
|
333
334
|
MissingTemplateIcon,
|
|
334
335
|
NameAppIcon,
|
|
336
|
+
NextJSIcon,
|
|
335
337
|
NodeJSIcon,
|
|
336
338
|
NodeJSMetricsIcon,
|
|
337
339
|
NoActivitiesIcon,
|