@platformatic/ui-components 0.1.41 → 0.1.43
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/index.js +1 -1
- package/package.json +1 -1
- package/src/components/BorderedBox.jsx +4 -2
- package/src/components/BorderedBox.module.css +7 -1
- package/src/components/Common.module.css +4 -1
- package/src/components/DropDown.module.css +1 -1
- package/src/components/MetricValue.jsx +2 -2
- package/src/components/MetricValue.module.css +6 -4
- package/src/components/Modal.jsx +5 -3
- package/src/components/Modal.module.css +7 -2
- package/src/components/Sidebar.jsx +98 -20
- package/src/components/Sidebar.module.css +24 -8
- package/src/components/SimpleMetric.jsx +2 -6
- package/src/components/SimpleMetric.module.css +1 -1
- package/src/components/forms/Input.jsx +13 -5
- package/src/components/forms/Input.module.css +3 -0
- package/src/components/icons/AppListIcon.jsx +73 -0
- package/src/components/icons/CircleExclamationIcon.jsx +29 -0
- package/src/components/icons/GearIcon.jsx +40 -0
- package/src/components/icons/PuzzleDynamicIcon.jsx +23 -23
- package/src/components/icons/PuzzleIcon.jsx +20 -20
- package/src/components/icons/index.js +6 -0
- package/src/stories/DetailedMetric.stories.jsx +1 -1
- package/src/stories/Sidebar.stories.jsx +5 -1
- package/src/stories/SimpleMetric.stories.jsx +1 -1
- package/src/stories/forms/Input.stories.jsx +1 -0
- package/tailwind.config.cjs +4 -4
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -5,11 +5,13 @@ import styles from './BorderedBox.module.css'
|
|
|
5
5
|
import commonStyles from './Common.module.css'
|
|
6
6
|
import React from 'react'
|
|
7
7
|
export default function BorderedBox (props) {
|
|
8
|
-
const { classes, color, children } = props
|
|
8
|
+
const { classes, color, children, backgroundColor = 'dark-blue' } = props
|
|
9
9
|
const borderColor = getColor('border', color)
|
|
10
|
+
const styledBackgroundColor = styles[`background-color-${backgroundColor}`]
|
|
11
|
+
const className = `${styles.borderedBox} ${commonStyles.bordered} ${classes} ${borderColor} ${styledBackgroundColor}`
|
|
10
12
|
|
|
11
13
|
return (
|
|
12
|
-
<div className={
|
|
14
|
+
<div className={className}>
|
|
13
15
|
{children}
|
|
14
16
|
</div>
|
|
15
17
|
)
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
.borderedBox {
|
|
2
|
-
@apply rounded-md p-5
|
|
2
|
+
@apply rounded-md p-5 text-white flex-1 gap-y-4;
|
|
3
|
+
}
|
|
4
|
+
.background-color-dark-blue{
|
|
5
|
+
@apply bg-dark-blue !important;
|
|
6
|
+
}
|
|
7
|
+
.background-color-transparent{
|
|
8
|
+
@apply bg-transparent ;
|
|
3
9
|
}
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
@apply border border-solid box-border rounded-md;
|
|
3
3
|
}
|
|
4
4
|
.bordered--main-green {
|
|
5
|
-
@apply border-main-green
|
|
5
|
+
@apply border-main-green;
|
|
6
6
|
}
|
|
7
7
|
.bordered--main-dark-blue {
|
|
8
8
|
@apply border-main-dark-blue;
|
|
9
9
|
}
|
|
10
|
+
.bordered--error-red {
|
|
11
|
+
@apply border-error-red;
|
|
12
|
+
}
|
|
10
13
|
|
|
11
14
|
.error-message {
|
|
12
15
|
@apply absolute -bottom-5 text-error-red text-xs px-2;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
@apply border border-transparent rounded-full mr-2;
|
|
20
20
|
}
|
|
21
21
|
.menu {
|
|
22
|
-
@apply absolute border-solid border border-white px-0 py-1 bg-light-blue mt-8 rounded-md z-
|
|
22
|
+
@apply absolute border-solid border border-white px-0 py-1 bg-light-blue mt-8 rounded-md z-10 text-sm min-w-[175px];
|
|
23
23
|
}
|
|
24
24
|
.item {
|
|
25
25
|
@apply py-3 px-3 text-main-dark-blue first:border-t-0 text-sm uppercase hover:font-semibold hover:cursor-pointer tracking-more-widest;
|
|
@@ -5,11 +5,11 @@ import { getColor } from '../lib/utils'
|
|
|
5
5
|
export default function MetricValue ({ pre, color, value, unit }) {
|
|
6
6
|
return (
|
|
7
7
|
<div className={styles.metric}>
|
|
8
|
-
{pre && <span>{pre}</span>}
|
|
8
|
+
{pre && <span className={styles.pre}>{pre}</span>}
|
|
9
9
|
<span className={`${styles.value} ${getColor('text', color)}`}>
|
|
10
10
|
{value}
|
|
11
11
|
</span>
|
|
12
|
-
<span>{unit}</span>
|
|
12
|
+
<span className={styles.unit}>{unit}</span>
|
|
13
13
|
</div>
|
|
14
14
|
)
|
|
15
15
|
}
|
package/src/components/Modal.jsx
CHANGED
|
@@ -8,11 +8,13 @@ import HorizontalSeparator from './HorizontalSeparator'
|
|
|
8
8
|
import styles from './Modal.module.css'
|
|
9
9
|
|
|
10
10
|
export default function Modal (props) {
|
|
11
|
-
const { setIsOpen, title, layout = 'info' } = props
|
|
11
|
+
const { setIsOpen, title, layout = 'info', maxWidth = 50 } = props
|
|
12
12
|
const [isHoverCloseModal, setIsHoverCloseModal] = useState(false)
|
|
13
13
|
useEscapeKey(() => setIsOpen(false))
|
|
14
|
-
|
|
14
|
+
const styledMaxWidth = styles[`maxW${maxWidth}`]
|
|
15
|
+
const classNameFullScreen = `${styles.contentFullscreen} ${styledMaxWidth}`
|
|
15
16
|
let whichModal = <></>
|
|
17
|
+
|
|
16
18
|
switch (layout) {
|
|
17
19
|
case 'info':
|
|
18
20
|
whichModal = (
|
|
@@ -74,7 +76,7 @@ export default function Modal (props) {
|
|
|
74
76
|
{isHoverCloseModal ? <RoundCloseHoverIcon color='main-dark-blue' /> : <RoundCloseIcon color='main-dark-blue' />}
|
|
75
77
|
</div>
|
|
76
78
|
</div>
|
|
77
|
-
<div className={
|
|
79
|
+
<div className={classNameFullScreen}>
|
|
78
80
|
<div className={styles.titleFullscreen}>
|
|
79
81
|
<Logo width={100} heigth={80} color='main-dark-blue' />
|
|
80
82
|
<h3>PLATFORMATIC</h3>
|
|
@@ -39,9 +39,14 @@
|
|
|
39
39
|
@apply font-bold text-lg text-main-green text-center;
|
|
40
40
|
}
|
|
41
41
|
.contentFullscreen {
|
|
42
|
-
@apply h-auto
|
|
42
|
+
@apply h-auto w-full pt-4;
|
|
43
|
+
}
|
|
44
|
+
.maxW50 {
|
|
45
|
+
@apply max-w-[50%];
|
|
46
|
+
}
|
|
47
|
+
.maxW70 {
|
|
48
|
+
@apply max-w-[70%];
|
|
43
49
|
}
|
|
44
|
-
|
|
45
50
|
.titleFullscreen {
|
|
46
51
|
@apply inline-flex items-center;
|
|
47
52
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import
|
|
2
|
+
import Icons from './icons'
|
|
3
3
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
4
|
-
import { faChevronLeft, faPlusCircle
|
|
4
|
+
import { faChevronLeft, faPlusCircle } from '@fortawesome/free-solid-svg-icons'
|
|
5
5
|
import styles from './Sidebar.module.css'
|
|
6
6
|
import ReactTooltip from 'react-tooltip'
|
|
7
|
-
import Button from './Button'
|
|
8
7
|
import HorizontalSeparator from './HorizontalSeparator'
|
|
8
|
+
import PropTypes from 'prop-types'
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
function Sidebar (props) {
|
|
11
11
|
const {
|
|
12
12
|
title,
|
|
13
|
-
defaultSelected
|
|
14
|
-
onClickItemSelectedParent
|
|
15
|
-
items
|
|
16
|
-
onClickAdd
|
|
17
|
-
addTitle
|
|
18
|
-
onClickSettings
|
|
13
|
+
defaultSelected,
|
|
14
|
+
onClickItemSelectedParent,
|
|
15
|
+
items,
|
|
16
|
+
onClickAdd,
|
|
17
|
+
addTitle,
|
|
18
|
+
onClickSettings
|
|
19
19
|
} = props
|
|
20
20
|
const [collapsed, setCollapsed] = useState(false)
|
|
21
21
|
const [selectedItem, setSelectedItem] = useState(defaultSelected)
|
|
@@ -25,15 +25,37 @@ export default function Sidebar (props) {
|
|
|
25
25
|
onClickItemSelectedParent(index)
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
function renderItemIcon (iconName, title, isSelected) {
|
|
29
|
+
if (iconName) {
|
|
30
|
+
return React.createElement(Icons[`${iconName}`], {
|
|
31
|
+
size: 'small',
|
|
32
|
+
color: isSelected ? 'green' : 'white',
|
|
33
|
+
tip: title
|
|
34
|
+
})
|
|
35
|
+
}
|
|
36
|
+
return (<></>)
|
|
37
|
+
}
|
|
38
|
+
|
|
28
39
|
return (
|
|
29
40
|
<div className={`${styles.container} ${collapsed && styles.collapsed}`}>
|
|
30
41
|
{collapsed
|
|
31
42
|
? (
|
|
32
43
|
<>
|
|
33
|
-
<button type='button' className={styles.
|
|
34
|
-
<PuzzleIcon
|
|
44
|
+
<button type='button' className={styles.buttonExpand} onClick={() => { setCollapsed(false) }}>
|
|
45
|
+
<Icons.PuzzleIcon color='white' />
|
|
35
46
|
</button>
|
|
36
|
-
<
|
|
47
|
+
<div className={styles.titleCollapsed} data-testid='lateral-bar-title'>
|
|
48
|
+
{title}
|
|
49
|
+
</div>
|
|
50
|
+
<HorizontalSeparator marginBottom={2} marginTop={2} />
|
|
51
|
+
<div className={styles.bottom}>
|
|
52
|
+
<button type='button' className={styles.buttonSettings} onClick={onClickSettings}>
|
|
53
|
+
<Icons.GearIcon color='white' />
|
|
54
|
+
</button>
|
|
55
|
+
<div className={styles.titleCollapsed} data-testid='lateral-bar-title'>
|
|
56
|
+
Settings
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
37
59
|
</>
|
|
38
60
|
)
|
|
39
61
|
: (
|
|
@@ -50,8 +72,11 @@ export default function Sidebar (props) {
|
|
|
50
72
|
return (
|
|
51
73
|
<React.Fragment key={index}>
|
|
52
74
|
<button className={`${styles.buttonItem} ${collapsed && styles.buttonItemCollapsed}`} type='button' onClick={() => onClickItemSelected(index)}>
|
|
53
|
-
|
|
54
|
-
<
|
|
75
|
+
{renderItemIcon(item.iconName, item.title, isSelected)}
|
|
76
|
+
<div className={`${styles.item} ${isSelected ? styles.itemSelected : ''}`}>
|
|
77
|
+
<span className={styles.itemSubTitle}>{item.subTitle}</span>
|
|
78
|
+
<span className={styles.itemTitle}>{item.title}</span>
|
|
79
|
+
</div>
|
|
55
80
|
</button>
|
|
56
81
|
<ReactTooltip />
|
|
57
82
|
</React.Fragment>
|
|
@@ -63,13 +88,66 @@ export default function Sidebar (props) {
|
|
|
63
88
|
{!collapsed && <span className={styles.item}>{addTitle}</span>}
|
|
64
89
|
</button>
|
|
65
90
|
</div>
|
|
91
|
+
<HorizontalSeparator marginBottom='2' marginTop='2' />
|
|
92
|
+
|
|
93
|
+
<div className={styles.bottom}>
|
|
94
|
+
<button type='button' className={`${styles.buttonSettings} ${styles.buttonSettingsExpanded}`} onClick={onClickSettings}>
|
|
95
|
+
<Icons.GearIcon color='white' size='small' /> <span className={styles.titleSettings}>Settings</span>
|
|
96
|
+
</button>
|
|
97
|
+
</div>
|
|
66
98
|
</>
|
|
67
99
|
)}
|
|
68
|
-
<HorizontalSeparator marginBottom={2} marginTop={2} />
|
|
69
|
-
|
|
70
|
-
<div className={styles.bottom}>
|
|
71
|
-
<Button color='white' label='Settings' type='button' onClick={() => onClickSettings()} icon={faGear} />
|
|
72
|
-
</div>
|
|
73
100
|
</div>
|
|
74
101
|
)
|
|
75
102
|
}
|
|
103
|
+
|
|
104
|
+
Sidebar.propTypes = {
|
|
105
|
+
/**
|
|
106
|
+
* title
|
|
107
|
+
*/
|
|
108
|
+
title: PropTypes.string,
|
|
109
|
+
/**
|
|
110
|
+
* defaultSelected
|
|
111
|
+
*/
|
|
112
|
+
defaultSelected: PropTypes.number,
|
|
113
|
+
/**
|
|
114
|
+
* addTitle
|
|
115
|
+
*/
|
|
116
|
+
addTitle: PropTypes.string,
|
|
117
|
+
/**
|
|
118
|
+
* items: array with keys
|
|
119
|
+
* title: name to display
|
|
120
|
+
* subtitle: secondary title
|
|
121
|
+
* icon: what Icon
|
|
122
|
+
*/
|
|
123
|
+
items: PropTypes.arrayOf(PropTypes.shape({
|
|
124
|
+
title: PropTypes.string,
|
|
125
|
+
subtitle: PropTypes.string,
|
|
126
|
+
iconName: PropTypes.string
|
|
127
|
+
})),
|
|
128
|
+
/**
|
|
129
|
+
* Apply onClickItemSelectedParent
|
|
130
|
+
*/
|
|
131
|
+
onClickItemSelectedParent: PropTypes.func,
|
|
132
|
+
/**
|
|
133
|
+
* Apply onClickAdd: function called clicking on plus button
|
|
134
|
+
*/
|
|
135
|
+
onClickAdd: PropTypes.func,
|
|
136
|
+
/**
|
|
137
|
+
* Apply onClickSettings: function called clicking on Settings button
|
|
138
|
+
*/
|
|
139
|
+
onClickSettings: PropTypes.func
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
Sidebar.defaultProps = {
|
|
144
|
+
title: '',
|
|
145
|
+
defaultSelected: 0,
|
|
146
|
+
onClickItemSelectedParent: () => {},
|
|
147
|
+
items: [],
|
|
148
|
+
onClickAdd: () => {},
|
|
149
|
+
addTitle: 'Add',
|
|
150
|
+
onClickSettings: () => {}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export default Sidebar
|
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
.collapsed {
|
|
6
6
|
@apply max-w-[96px] text-center;
|
|
7
7
|
}
|
|
8
|
-
.
|
|
9
|
-
@apply border-
|
|
8
|
+
.buttonExpand {
|
|
9
|
+
@apply border rounded-md p-1 border-white;
|
|
10
|
+
}
|
|
11
|
+
.buttonSettings {
|
|
12
|
+
@apply border rounded-md p-1 border-white;
|
|
10
13
|
}
|
|
11
14
|
.buttonCollapse {
|
|
12
15
|
@apply absolute border border-white rounded-full h-6 w-6 right-[-0.875rem];
|
|
@@ -17,15 +20,26 @@
|
|
|
17
20
|
.title {
|
|
18
21
|
@apply text-white font-bold py-3;
|
|
19
22
|
}
|
|
23
|
+
.titleCollapsed {
|
|
24
|
+
@apply text-white text-[10px];
|
|
25
|
+
}
|
|
20
26
|
.buttonItem {
|
|
21
|
-
@apply flex items-center border-0 w-full
|
|
27
|
+
@apply flex items-center justify-start border-0 w-full;
|
|
22
28
|
}
|
|
23
29
|
.buttonItemCollapsed {
|
|
24
|
-
@apply w-auto
|
|
30
|
+
@apply w-auto;
|
|
25
31
|
}
|
|
26
32
|
.item {
|
|
27
|
-
@apply text-
|
|
33
|
+
@apply text-white ml-2 grow-0 text-left flex flex-col;
|
|
34
|
+
width: calc(100% - 28px)
|
|
35
|
+
}
|
|
36
|
+
.itemSubTitle {
|
|
37
|
+
@apply text-[10px] leading-[10px];
|
|
38
|
+
}
|
|
39
|
+
.itemTitle{
|
|
40
|
+
@apply text-xs text-ellipsis overflow-hidden whitespace-nowrap;
|
|
28
41
|
}
|
|
42
|
+
|
|
29
43
|
.itemSelected {
|
|
30
44
|
@apply text-light-green;
|
|
31
45
|
}
|
|
@@ -35,9 +49,11 @@
|
|
|
35
49
|
.bottom {
|
|
36
50
|
@apply absolute left-0 bottom-[1rem] w-full px-4;
|
|
37
51
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
.titleSettings {
|
|
53
|
+
@apply text-white font-semibold ml-3;
|
|
54
|
+
}
|
|
55
|
+
.buttonSettingsExpanded {
|
|
56
|
+
@apply flex items-center justify-center w-full;
|
|
41
57
|
}
|
|
42
58
|
|
|
43
59
|
@keyframes fadeIn {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
5
4
|
// The icon that is in design is not in the free version of fontawesome
|
|
6
5
|
// Temporary using this one
|
|
7
|
-
import { faCircleExclamation } from '@fortawesome/free-solid-svg-icons'
|
|
8
6
|
import ReactTooltip from 'react-tooltip'
|
|
9
7
|
import BorderedBox from './BorderedBox'
|
|
10
8
|
import styles from './SimpleMetric.module.css'
|
|
11
9
|
import MetricValue from './MetricValue'
|
|
10
|
+
import Icons from './icons'
|
|
12
11
|
|
|
13
12
|
export default function SimpleMetric ({ title, pre, color, unit, value, tooltip, children }) {
|
|
14
13
|
return (
|
|
@@ -16,10 +15,7 @@ export default function SimpleMetric ({ title, pre, color, unit, value, tooltip,
|
|
|
16
15
|
<BorderedBox>
|
|
17
16
|
<div className={styles.header}>
|
|
18
17
|
<span className={styles.title}>{title}</span>
|
|
19
|
-
<
|
|
20
|
-
icon={faCircleExclamation}
|
|
21
|
-
data-tip={tooltip}
|
|
22
|
-
/>
|
|
18
|
+
<Icons.CircleExclamationIcon tip={tooltip} />
|
|
23
19
|
</div>
|
|
24
20
|
<div>
|
|
25
21
|
<MetricValue pre={pre} color={color} unit={unit} value={value} />
|
|
@@ -5,16 +5,19 @@ import styles from './Input.module.css'
|
|
|
5
5
|
import commonStyles from '../Common.module.css'
|
|
6
6
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
7
7
|
|
|
8
|
-
function Input ({ placeholder, value, name, borderColor, errorMessage, onChange, disabled, beforeInputIcon, afterInputIcon, afterInputIconColor, onClickBeforeIcon }) {
|
|
9
|
-
|
|
8
|
+
function Input ({ placeholder, value, name, borderColor, errorMessage, onChange, disabled, beforeInputIcon, beforeInputIconColor, afterInputIcon, afterInputIconColor, onClickBeforeIcon }) {
|
|
9
|
+
let className = styles.inputContainer + ' ' + commonStyles[`bordered--${borderColor}`] + ' ' + commonStyles[`text--${borderColor}`] + ' ' + commonStyles.padded
|
|
10
|
+
const showError = errorMessage.length > 0
|
|
11
|
+
if (showError) className += ' ' + commonStyles['bordered--error-red']
|
|
12
|
+
const classNameBeforeInput = `${styles.beforeInputIcon} ` + styles[`color-${beforeInputIconColor}`]
|
|
10
13
|
return (
|
|
11
14
|
<div className={styles.container}>
|
|
12
15
|
<div className={className}>
|
|
13
|
-
{beforeInputIcon && <FontAwesomeIcon icon={beforeInputIcon} className={
|
|
16
|
+
{beforeInputIcon && <FontAwesomeIcon icon={beforeInputIcon} className={classNameBeforeInput} data-testid='before-icon' color='white' onClick={() => onClickBeforeIcon()} />}
|
|
14
17
|
<input type='text' name={name} value={value} placeholder={placeholder} className={styles.fullWidth} onChange={onChange} disabled={disabled} />
|
|
15
18
|
{afterInputIcon && <FontAwesomeIcon icon={afterInputIcon} className={styles[`color-${afterInputIconColor}`]} data-testid='after-icon' />}
|
|
16
19
|
</div>
|
|
17
|
-
{
|
|
20
|
+
{showError && <span className={commonStyles['error-message']}>{errorMessage}</span>}
|
|
18
21
|
</div>
|
|
19
22
|
)
|
|
20
23
|
}
|
|
@@ -48,6 +51,10 @@ Input.propTypes = {
|
|
|
48
51
|
* beforeInputIcon
|
|
49
52
|
*/
|
|
50
53
|
beforeInputIcon: PropTypes.object,
|
|
54
|
+
/**
|
|
55
|
+
* beforeInputIconColor
|
|
56
|
+
*/
|
|
57
|
+
beforeInputIconColor: PropTypes.oneOf(['error-red', 'main-dark-blue', 'white']),
|
|
51
58
|
/**
|
|
52
59
|
* afterInputIcon
|
|
53
60
|
*/
|
|
@@ -55,7 +62,7 @@ Input.propTypes = {
|
|
|
55
62
|
/**
|
|
56
63
|
* afterInputIconColor
|
|
57
64
|
*/
|
|
58
|
-
afterInputIconColor: PropTypes.oneOf(['error-red', 'main-dark-blue']),
|
|
65
|
+
afterInputIconColor: PropTypes.oneOf(['error-red', 'main-dark-blue', 'white']),
|
|
59
66
|
/**
|
|
60
67
|
* onClickBeforeIcon
|
|
61
68
|
*/
|
|
@@ -71,6 +78,7 @@ Input.defaultProps = {
|
|
|
71
78
|
onChange: () => {},
|
|
72
79
|
disabled: false,
|
|
73
80
|
beforeInputIcon: null,
|
|
81
|
+
beforeInputIconColor: 'main-dark-blue',
|
|
74
82
|
afterInputIcon: null,
|
|
75
83
|
onClickBeforeIcon: () => {},
|
|
76
84
|
afterInputIconColor: 'main-dark-blue'
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import styles from './Icons.module.css'
|
|
3
|
+
export default function AppListIcon ({ color = 'white' }) {
|
|
4
|
+
const className = styles[`${color}`]
|
|
5
|
+
return (
|
|
6
|
+
<svg
|
|
7
|
+
width={49}
|
|
8
|
+
height={67}
|
|
9
|
+
viewBox='0 0 49 67'
|
|
10
|
+
fill='none'
|
|
11
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
12
|
+
className={className}
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
d='M19.6628 38.0801H11.9961C11.4438 38.0801 10.9961 38.5278 10.9961 39.0801V53.7201C10.9961 54.2724 11.4438 54.7201 11.9961 54.7201H35.9961C36.5484 54.7201 36.9961 54.2724 36.9961 53.7201V39.0801C36.9961 38.5278 36.5484 38.0801 35.9961 38.0801H28.3294'
|
|
16
|
+
stroke='none'
|
|
17
|
+
strokeWidth={2}
|
|
18
|
+
strokeLinecap='round'
|
|
19
|
+
/>
|
|
20
|
+
<rect
|
|
21
|
+
x={19.6631}
|
|
22
|
+
y={54.72}
|
|
23
|
+
width={8.66667}
|
|
24
|
+
height={4.16}
|
|
25
|
+
stroke='white'
|
|
26
|
+
strokeWidth={2}
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d='M15.3291 59.8799C15.3291 59.3276 15.7768 58.8799 16.3291 58.8799H31.6624C32.2147 58.8799 32.6624 59.3276 32.6624 59.8799V61.9999H15.3291V59.8799Z'
|
|
30
|
+
stroke='white'
|
|
31
|
+
strokeWidth={2}
|
|
32
|
+
/>
|
|
33
|
+
<path
|
|
34
|
+
d='M23.9958 36L25.9416 41.749H32.2383L27.1441 45.302L29.0899 51.051L23.9958 47.498L18.9016 51.051L20.8474 45.302L15.7533 41.749H22.05L23.9958 36Z'
|
|
35
|
+
stroke='white'
|
|
36
|
+
strokeWidth={2}
|
|
37
|
+
strokeLinejoin='round'
|
|
38
|
+
/>
|
|
39
|
+
<path
|
|
40
|
+
d='M20.9961 34H15.9961V25H13.9961'
|
|
41
|
+
stroke='white'
|
|
42
|
+
strokeWidth={2}
|
|
43
|
+
strokeLinecap='round'
|
|
44
|
+
strokeLinejoin='round'
|
|
45
|
+
/>
|
|
46
|
+
<path
|
|
47
|
+
d='M19.9961 29.5V9'
|
|
48
|
+
stroke='white'
|
|
49
|
+
strokeWidth={2}
|
|
50
|
+
strokeLinecap='round'
|
|
51
|
+
strokeLinejoin='round'
|
|
52
|
+
/>
|
|
53
|
+
<path
|
|
54
|
+
d='M27.9961 35H32V27H38.9961V19'
|
|
55
|
+
stroke='white'
|
|
56
|
+
strokeWidth={2}
|
|
57
|
+
strokeLinecap='round'
|
|
58
|
+
strokeLinejoin='round'
|
|
59
|
+
/>
|
|
60
|
+
<path
|
|
61
|
+
d='M26 31.5V22H30.9961V14.5'
|
|
62
|
+
stroke='white'
|
|
63
|
+
strokeWidth={2}
|
|
64
|
+
strokeLinecap='round'
|
|
65
|
+
strokeLinejoin='round'
|
|
66
|
+
/>
|
|
67
|
+
<circle cx={11.9961} cy={25} r={2} stroke='white' strokeWidth={2} />
|
|
68
|
+
<circle cx={19.9961} cy={7} r={2} stroke='white' strokeWidth={2} />
|
|
69
|
+
<circle cx={30.9961} cy={12} r={2} stroke='white' strokeWidth={2} />
|
|
70
|
+
<circle cx={38.9961} cy={17} r={2} stroke='white' strokeWidth={2} />
|
|
71
|
+
</svg>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import styles from './Icons.module.css'
|
|
3
|
+
const CircleExclamationIcon = ({ color = 'white', tip = '' }) => {
|
|
4
|
+
const className = styles[`${color}`]
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
width={24}
|
|
9
|
+
height={24}
|
|
10
|
+
viewBox='0 0 24 24'
|
|
11
|
+
fill='none'
|
|
12
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
13
|
+
className={className}
|
|
14
|
+
data-tip={tip}
|
|
15
|
+
>
|
|
16
|
+
<circle cx={12} cy={12} r={9} stroke='none' strokeWidth={1.5} />
|
|
17
|
+
<path
|
|
18
|
+
d='M12 8.25V13.5'
|
|
19
|
+
stroke='none'
|
|
20
|
+
strokeWidth={1.5}
|
|
21
|
+
strokeLinecap='round'
|
|
22
|
+
strokeLinejoin='round'
|
|
23
|
+
/>
|
|
24
|
+
<circle cx={12} cy={15.75} r={0.75} fill='none' />
|
|
25
|
+
</svg>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default CircleExclamationIcon
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import styles from './Icons.module.css'
|
|
3
|
+
const GearIcon = ({ color = 'green', size = 'normal' }) => {
|
|
4
|
+
const className = styles[`${color}`]
|
|
5
|
+
let dimension = 33
|
|
6
|
+
switch (size) {
|
|
7
|
+
case 'small':
|
|
8
|
+
dimension = 16
|
|
9
|
+
break
|
|
10
|
+
default:
|
|
11
|
+
break
|
|
12
|
+
}
|
|
13
|
+
return (
|
|
14
|
+
<svg
|
|
15
|
+
width={dimension}
|
|
16
|
+
height={dimension}
|
|
17
|
+
viewBox='0 0 33 32'
|
|
18
|
+
fill='none'
|
|
19
|
+
xmlns='http://www.w3.org/2000/svg'
|
|
20
|
+
className={className}
|
|
21
|
+
>
|
|
22
|
+
<path
|
|
23
|
+
d='M16.5016 20.6575C19.011 20.6575 21.0452 18.6574 21.0452 16.1901C21.0452 13.7228 19.011 11.7227 16.5016 11.7227C13.9922 11.7227 11.958 13.7228 11.958 16.1901C11.958 18.6574 13.9922 20.6575 16.5016 20.6575Z'
|
|
24
|
+
stroke='none'
|
|
25
|
+
strokeWidth={1.5}
|
|
26
|
+
strokeLinecap='round'
|
|
27
|
+
strokeLinejoin='round'
|
|
28
|
+
/>
|
|
29
|
+
<path
|
|
30
|
+
d='M18.9391 4.69606V6.21219C18.9391 6.50074 19.1219 6.76144 19.3974 6.86269L21.3641 7.59418C21.6318 7.69289 21.9356 7.62455 22.1312 7.417L23.076 6.41974C23.354 6.12613 23.8277 6.1236 24.1083 6.41721L26.3891 8.79139C26.6439 9.05716 26.6465 9.46973 26.3968 9.73803L25.1818 11.0491C24.9887 11.2567 24.9423 11.5579 25.0633 11.811L25.8871 13.5575C26.003 13.803 26.2552 13.9625 26.5307 13.9625H27.7921C28.1834 13.9625 28.5 14.2738 28.5 14.6585V17.5895C28.5 17.9743 28.1834 18.2856 27.7921 18.2856H26.4663C26.16 18.2856 25.8871 18.4805 25.7919 18.7665L25.1225 20.7838C25.0427 21.0217 25.0994 21.2824 25.2719 21.4672L26.3608 22.6492C26.6259 22.9378 26.6002 23.3858 26.3016 23.6414L23.7916 25.8005C23.5033 26.0485 23.0657 26.0257 22.8057 25.7498L21.9304 24.8235C21.7399 24.621 21.4439 24.5476 21.1788 24.6387L19.351 25.2664C19.0653 25.3651 18.8748 25.6283 18.8748 25.9245V27.3039C18.8748 27.6887 18.5581 28 18.1668 28H14.8306C14.4393 28 14.1227 27.6887 14.1227 27.3039V25.9245C14.1227 25.6283 13.9322 25.3651 13.6464 25.2664L11.8187 24.6387C11.5535 24.5476 11.2575 24.6184 11.067 24.8235L10.1917 25.7498C9.93173 26.0257 9.4941 26.0485 9.20578 25.8005L6.69586 23.6414C6.39724 23.3858 6.3715 22.9378 6.63665 22.6492L7.72557 21.4672C7.89547 21.2824 7.95211 21.0217 7.87488 20.7838L7.20557 18.7665C7.11032 18.4805 6.83745 18.2856 6.53111 18.2856H5.20793C4.81664 18.2856 4.5 17.9743 4.5 17.5895V14.6585C4.5 14.2738 4.81664 13.9625 5.20793 13.9625H6.46932C6.74477 13.9625 6.99705 13.8055 7.11289 13.5575L7.93666 11.811C8.05765 11.5554 8.00874 11.2567 7.81825 11.0491L6.60319 9.73803C6.35348 9.46973 6.35605 9.05463 6.61091 8.79139L8.89172 6.41721C9.17232 6.12613 9.64598 6.12613 9.92401 6.41974L10.8688 7.417C11.0644 7.62455 11.3682 7.69289 11.6359 7.59418L13.6026 6.86269C13.8781 6.76144 14.0609 6.50074 14.0609 6.21219V4.69606C14.0609 4.31133 14.3775 4 14.7688 4H18.2312C18.6225 4 18.9391 4.31133 18.9391 4.69606Z'
|
|
31
|
+
stroke='none'
|
|
32
|
+
strokeWidth={1.5}
|
|
33
|
+
strokeLinecap='round'
|
|
34
|
+
strokeLinejoin='round'
|
|
35
|
+
/>
|
|
36
|
+
</svg>
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default GearIcon
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import styles from './Icons.module.css'
|
|
3
|
-
const PuzzleDynamicIcon = ({ color = 'green', size = 'normal'
|
|
3
|
+
const PuzzleDynamicIcon = ({ color = 'green', size = 'normal' }) => {
|
|
4
4
|
const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
|
|
5
|
-
let dimension =
|
|
5
|
+
let dimension = 33
|
|
6
6
|
switch (size) {
|
|
7
7
|
case 'small':
|
|
8
8
|
dimension = 24
|
|
@@ -14,49 +14,49 @@ const PuzzleDynamicIcon = ({ color = 'green', size = 'normal', tip = '' }) => {
|
|
|
14
14
|
<svg
|
|
15
15
|
width={dimension}
|
|
16
16
|
height={dimension}
|
|
17
|
-
viewBox='0 0
|
|
17
|
+
viewBox='0 0 32 33'
|
|
18
18
|
fill='none'
|
|
19
19
|
xmlns='http://www.w3.org/2000/svg'
|
|
20
20
|
className={className}
|
|
21
21
|
>
|
|
22
22
|
<rect
|
|
23
|
-
x={
|
|
24
|
-
y={
|
|
25
|
-
width={
|
|
26
|
-
height={
|
|
23
|
+
x={4}
|
|
24
|
+
y={4.83325}
|
|
25
|
+
width={8}
|
|
26
|
+
height={10.0699}
|
|
27
27
|
rx={1}
|
|
28
28
|
stroke='none'
|
|
29
29
|
strokeWidth={1.5}
|
|
30
30
|
/>
|
|
31
31
|
<path
|
|
32
|
-
d='
|
|
32
|
+
d='M16 4.83325L22 9.83325L16 14.8333V4.83325Z'
|
|
33
33
|
stroke='none'
|
|
34
|
-
strokeWidth={
|
|
34
|
+
strokeWidth={2}
|
|
35
35
|
strokeLinecap='round'
|
|
36
36
|
strokeLinejoin='round'
|
|
37
37
|
/>
|
|
38
38
|
<rect
|
|
39
|
-
x={
|
|
40
|
-
y={
|
|
41
|
-
width={
|
|
42
|
-
height={
|
|
39
|
+
x={28}
|
|
40
|
+
y={28.8333}
|
|
41
|
+
width={8}
|
|
42
|
+
height={10.0699}
|
|
43
43
|
rx={1}
|
|
44
|
-
transform='rotate(-180
|
|
44
|
+
transform='rotate(-180 28 28.8333)'
|
|
45
45
|
stroke='none'
|
|
46
|
-
|
|
46
|
+
strokeWidth={1.5}
|
|
47
47
|
/>
|
|
48
48
|
<rect
|
|
49
|
-
x={
|
|
50
|
-
y={
|
|
51
|
-
width={
|
|
52
|
-
height={
|
|
49
|
+
x={16}
|
|
50
|
+
y={28.8333}
|
|
51
|
+
width={12}
|
|
52
|
+
height={10.0699}
|
|
53
53
|
rx={1}
|
|
54
|
-
transform='rotate(-180
|
|
55
|
-
stroke='
|
|
56
|
-
|
|
54
|
+
transform='rotate(-180 16 28.8333)'
|
|
55
|
+
stroke='none'
|
|
56
|
+
strokeWidth={1.5}
|
|
57
57
|
/>
|
|
58
58
|
<path
|
|
59
|
-
d='
|
|
59
|
+
d='M22 12.8333V14.8333L28 9.83325L22 4.83325V6.83325'
|
|
60
60
|
stroke='none'
|
|
61
61
|
strokeWidth={1.5}
|
|
62
62
|
strokeLinecap='round'
|
|
@@ -2,7 +2,7 @@ import * as React from 'react'
|
|
|
2
2
|
import styles from './Icons.module.css'
|
|
3
3
|
const PuzzleIcon = ({ color = 'green', size = 'normal', tip = '' }) => {
|
|
4
4
|
const className = `${styles.noShrinkForFlex} ` + styles[`${color}`]
|
|
5
|
-
let dimension =
|
|
5
|
+
let dimension = 33
|
|
6
6
|
switch (size) {
|
|
7
7
|
case 'small':
|
|
8
8
|
dimension = 24
|
|
@@ -14,47 +14,47 @@ const PuzzleIcon = ({ color = 'green', size = 'normal', tip = '' }) => {
|
|
|
14
14
|
<svg
|
|
15
15
|
width={dimension}
|
|
16
16
|
height={dimension}
|
|
17
|
-
viewBox='0 0
|
|
17
|
+
viewBox='0 0 33 32'
|
|
18
18
|
fill='none'
|
|
19
19
|
xmlns='http://www.w3.org/2000/svg'
|
|
20
20
|
className={className}
|
|
21
21
|
data-tip={tip}
|
|
22
22
|
>
|
|
23
23
|
<rect
|
|
24
|
-
x={5}
|
|
25
|
-
y={
|
|
26
|
-
width={
|
|
27
|
-
height={
|
|
24
|
+
x={4.5}
|
|
25
|
+
y={4}
|
|
26
|
+
width={8}
|
|
27
|
+
height={10.0699}
|
|
28
28
|
rx={1}
|
|
29
29
|
stroke='none'
|
|
30
30
|
strokeWidth={1.5}
|
|
31
31
|
/>
|
|
32
32
|
<rect
|
|
33
|
-
x={
|
|
34
|
-
y={
|
|
35
|
-
width={
|
|
36
|
-
height={
|
|
33
|
+
x={16.5}
|
|
34
|
+
y={4}
|
|
35
|
+
width={12}
|
|
36
|
+
height={10.0699}
|
|
37
37
|
rx={1}
|
|
38
38
|
stroke='none'
|
|
39
39
|
strokeWidth={1.5}
|
|
40
40
|
/>
|
|
41
41
|
<rect
|
|
42
|
-
x={
|
|
43
|
-
y={
|
|
44
|
-
width={
|
|
45
|
-
height={
|
|
42
|
+
x={28.5}
|
|
43
|
+
y={28}
|
|
44
|
+
width={8}
|
|
45
|
+
height={10.0699}
|
|
46
46
|
rx={1}
|
|
47
|
-
transform='rotate(-180
|
|
47
|
+
transform='rotate(-180 28.5 28)'
|
|
48
48
|
stroke='none'
|
|
49
49
|
strokeWidth={1.5}
|
|
50
50
|
/>
|
|
51
51
|
<rect
|
|
52
|
-
x={
|
|
53
|
-
y={
|
|
54
|
-
width={
|
|
55
|
-
height={
|
|
52
|
+
x={16.5}
|
|
53
|
+
y={28}
|
|
54
|
+
width={12}
|
|
55
|
+
height={10.0699}
|
|
56
56
|
rx={1}
|
|
57
|
-
transform='rotate(-180
|
|
57
|
+
transform='rotate(-180 16.5 28)'
|
|
58
58
|
stroke='none'
|
|
59
59
|
strokeWidth={1.5}
|
|
60
60
|
/>
|
|
@@ -2,8 +2,11 @@ import ApiIcon from './ApiIcon'
|
|
|
2
2
|
import ApiIconClosed from './ApiIconClosed'
|
|
3
3
|
import ApiEmptyIcon from './ApiEmptyIcon'
|
|
4
4
|
import AppIcon from './AppIcon'
|
|
5
|
+
import AppListIcon from './AppListIcon'
|
|
5
6
|
import AppEmptyIcon from './AppEmptyIcon'
|
|
7
|
+
import CircleExclamationIcon from './CircleExclamationIcon'
|
|
6
8
|
import CloseModalIcon from './CloseModalIcon'
|
|
9
|
+
import GearIcon from './GearIcon'
|
|
7
10
|
import RoundCloseIcon from './RoundCloseIcon'
|
|
8
11
|
import RoundCloseHoverIcon from './RoundCloseHoverIcon'
|
|
9
12
|
import MetricsIcon from './MetricsIcon'
|
|
@@ -16,8 +19,11 @@ export default {
|
|
|
16
19
|
ApiIconClosed,
|
|
17
20
|
ApiEmptyIcon,
|
|
18
21
|
AppIcon,
|
|
22
|
+
AppListIcon,
|
|
19
23
|
AppEmptyIcon,
|
|
24
|
+
CircleExclamationIcon,
|
|
20
25
|
CloseModalIcon,
|
|
26
|
+
GearIcon,
|
|
21
27
|
RoundCloseIcon,
|
|
22
28
|
RoundCloseHoverIcon,
|
|
23
29
|
MetricsIcon,
|
|
@@ -35,7 +35,11 @@ EmptySidebar.args = {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const FullSidebarTemplate = (args) => {
|
|
38
|
-
const [items, setItems] = useState([
|
|
38
|
+
const [items, setItems] = useState([
|
|
39
|
+
{ iconName: 'PuzzleIcon', subTitle: 'Subtitle', title: 'a very very very very very long title 1' },
|
|
40
|
+
{ title: 'Title number 2', subTitle: 'Subtitle 2' },
|
|
41
|
+
{ title: 'Another Title', subTitle: 'Subtitle 3', iconName: 'PuzzleDynamicIcon' }
|
|
42
|
+
])
|
|
39
43
|
function onClickAdd () {
|
|
40
44
|
const tmpItem = items.map(item => item)
|
|
41
45
|
tmpItem.push('Title number ' + (items.length + 1))
|
package/tailwind.config.cjs
CHANGED
|
@@ -7,11 +7,11 @@ module.exports = {
|
|
|
7
7
|
},
|
|
8
8
|
extend: {
|
|
9
9
|
screens: {
|
|
10
|
-
|
|
10
|
+
lg: '1440px'
|
|
11
11
|
// => @media (min-width: 1440px) { ... }
|
|
12
12
|
},
|
|
13
13
|
boxShadow: {
|
|
14
|
-
|
|
14
|
+
wrap: '0px 0px 20px rgba(0, 0, 0, 0.6)'
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
colors: {
|
|
@@ -24,7 +24,7 @@ module.exports = {
|
|
|
24
24
|
white: '#FFFFFF',
|
|
25
25
|
'error-red': '#FA2121',
|
|
26
26
|
'tertiary-blue': '#2588E4',
|
|
27
|
-
|
|
27
|
+
transparent: 'transparent'
|
|
28
28
|
},
|
|
29
29
|
fontFamily: {
|
|
30
30
|
sans: ['Montserrat']
|
|
@@ -37,7 +37,7 @@ module.exports = {
|
|
|
37
37
|
wider: '.05em',
|
|
38
38
|
widest: '.1em',
|
|
39
39
|
'more-widest': '.15em',
|
|
40
|
-
'super-widest': '.25em'
|
|
40
|
+
'super-widest': '.25em'
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
safelist: [
|