@platformatic/ui-components 0.1.48 → 0.1.50
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/.github/workflows/ci.yml +26 -26
- package/.nvmrc +1 -1
- package/LICENSE +201 -201
- package/README.md +30 -30
- package/fonts/Montserrat/README.txt +81 -81
- package/index.html +12 -12
- package/index.js +71 -71
- package/package.json +76 -76
- package/postcss.config.cjs +8 -8
- package/public/api-icon-closed.svg +6 -6
- package/public/api-icon.svg +9 -9
- package/src/App.jsx +12 -12
- package/src/components/BorderedBox.jsx +18 -18
- package/src/components/BorderedBox.module.css +8 -8
- package/src/components/BorderedText.jsx +8 -8
- package/src/components/BorderedText.module.css +2 -2
- package/src/components/Box.jsx +14 -14
- package/src/components/Box.module.css +7 -7
- package/src/components/Button.jsx +95 -95
- package/src/components/Button.module.css +127 -127
- package/src/components/ButtonFullRounded.jsx +17 -17
- package/src/components/ButtonFullRounded.module.css +28 -28
- package/src/components/Checkbox.jsx +11 -11
- package/src/components/Checkbox.module.css +18 -18
- package/src/components/Common.module.css +28 -28
- package/src/components/DetailedMetric.jsx +32 -32
- package/src/components/DetailedMetric.module.css +2 -2
- package/src/components/DropDown.jsx +36 -36
- package/src/components/DropDown.module.css +27 -27
- package/src/components/FollowUs.jsx +35 -35
- package/src/components/FollowUs.module.css +11 -11
- package/src/components/GHLoginButton.jsx +14 -14
- package/src/components/HorizontalSeparator.jsx +15 -15
- package/src/components/HorizontalSeparator.module.css +26 -26
- package/src/components/InfoBox.jsx +50 -50
- package/src/components/InfoBox.module.css +5 -5
- package/src/components/List.jsx +20 -20
- package/src/components/List.module.css +11 -11
- package/src/components/ListElement.jsx +23 -23
- package/src/components/ListElement.module.css +23 -23
- package/src/components/Loadable.jsx +34 -34
- package/src/components/Loadable.module.css +13 -13
- package/src/components/Loader.jsx +22 -22
- package/src/components/Loader.module.css +13 -13
- package/src/components/LoginButton.jsx +17 -17
- package/src/components/LoginButton.module.css +7 -7
- package/src/components/LoginButton.test.jsx +25 -25
- package/src/components/Logo.jsx +62 -62
- package/src/components/Logo.module.css +5 -5
- package/src/components/Main.jsx +33 -33
- package/src/components/MetricValue.jsx +15 -15
- package/src/components/MetricValue.module.css +9 -9
- package/src/components/Modal.jsx +93 -93
- package/src/components/Modal.module.css +50 -50
- package/src/components/PlatformaticIcon.jsx +57 -57
- package/src/components/PlatformaticIcon.module.css +2 -2
- package/src/components/Playground.jsx +9 -9
- package/src/components/SearchBar.jsx +63 -63
- package/src/components/SearchBar.module.css +20 -20
- package/src/components/Sidebar.jsx +153 -153
- package/src/components/Sidebar.module.css +66 -66
- package/src/components/SimpleMetric.jsx +28 -28
- package/src/components/SimpleMetric.module.css +6 -6
- package/src/components/Status.jsx +26 -26
- package/src/components/TabbedWindow.jsx +39 -39
- package/src/components/TabbedWindow.module.css +16 -16
- package/src/components/TextWithLabel.jsx +11 -11
- package/src/components/TextWithLabel.module.css +8 -8
- package/src/components/Versions.jsx +9 -9
- package/src/components/VerticalSeparator.jsx +5 -5
- package/src/components/forms/Field.jsx +53 -20
- package/src/components/forms/Field.module.css +23 -17
- package/src/components/forms/Input.jsx +80 -87
- package/src/components/forms/Input.module.css +28 -28
- package/src/components/forms/Preview.jsx +75 -77
- package/src/components/forms/Preview.module.css +14 -14
- package/src/components/forms/ToggleSwitch.jsx +18 -18
- package/src/components/forms/ToggleSwitch.module.css +42 -42
- package/src/components/forms/index.js +8 -8
- package/src/components/icons/ApiEmptyIcon.jsx +107 -107
- package/src/components/icons/ApiIcon.jsx +29 -29
- package/src/components/icons/ApiIconClosed.jsx +19 -19
- package/src/components/icons/AppEmptyIcon.jsx +94 -94
- package/src/components/icons/AppIcon.jsx +38 -38
- package/src/components/icons/AppListIcon.jsx +73 -73
- package/src/components/icons/Calendar1Icon.jsx +54 -54
- package/src/components/icons/Calendar7Icon.jsx +55 -55
- package/src/components/icons/CalendarIcon.jsx +56 -56
- package/src/components/icons/CircleAddIcon.jsx +40 -40
- package/src/components/icons/CircleBackIcon.jsx +51 -51
- package/src/components/icons/CircleCheckMarkIcon.jsx +66 -0
- package/src/components/icons/CircleCloseHoverIcon.jsx +42 -42
- package/src/components/icons/CircleCloseIcon.jsx +32 -32
- package/src/components/icons/CircleExclamationIcon.jsx +29 -29
- package/src/components/icons/CloseIcon.jsx +31 -31
- package/src/components/icons/CopyIcon.jsx +75 -46
- package/src/components/icons/CreatedWorkspaceIcon.jsx +70 -70
- package/src/components/icons/DynamicWorkspaceIcon.jsx +125 -125
- package/src/components/icons/EditIcon.jsx +38 -0
- package/src/components/icons/GearIcon.jsx +40 -40
- package/src/components/icons/Icons.module.css +29 -29
- package/src/components/icons/LiveIcon.jsx +43 -43
- package/src/components/icons/MetricsIcon.jsx +52 -52
- package/src/components/icons/PlayIcon.jsx +20 -20
- package/src/components/icons/PullRequestIcon.jsx +35 -35
- package/src/components/icons/StaticWorkspaceIcon.jsx +119 -119
- package/src/components/icons/StopIcon.jsx +21 -21
- package/src/components/icons/TerminalIcon.jsx +22 -22
- package/src/components/icons/TriangleExclamationIcon.jsx +26 -26
- package/src/components/icons/UpgradeIcon.jsx +48 -48
- package/src/components/icons/index.js +63 -59
- package/src/components/layouts/Layout.jsx +11 -11
- package/src/components/layouts/TwoColumnsLayout.jsx +12 -12
- package/src/components/layouts/TwoColumnsLayout.module.css +9 -9
- package/src/hooks/useEscapeKey.js +20 -20
- package/src/lib/utils.js +23 -23
- package/src/main.jsx +9 -9
- package/src/stories/BorderedBox.stories.jsx +33 -33
- package/src/stories/BorderedText.stories.jsx +24 -24
- package/src/stories/Button.stories.jsx +114 -114
- package/src/stories/ButtonFullRounded.stories.jsx +61 -61
- package/src/stories/Checkbox.stories.jsx +27 -27
- package/src/stories/DetailedMetric.stories.jsx +33 -33
- package/src/stories/DropDown.stories.jsx +62 -62
- package/src/stories/FollowUs.stories.jsx +14 -14
- package/src/stories/GHLoginButton.stories.jsx +14 -14
- package/src/stories/HorizontalSeparator.stories.jsx +12 -12
- package/src/stories/InfoBox.stories.jsx +46 -46
- package/src/stories/Introduction.stories.mdx +211 -211
- package/src/stories/List.stories.jsx +29 -29
- package/src/stories/ListElement.stories.jsx +15 -15
- package/src/stories/Loadable.stories.jsx +75 -75
- package/src/stories/Loader.stories.jsx +44 -44
- package/src/stories/LoginButton.stories.jsx +15 -15
- package/src/stories/Logo.stories.jsx +17 -17
- package/src/stories/Modal.stories.jsx +100 -100
- package/src/stories/PlatformaticIcon.stories.jsx +51 -35
- package/src/stories/SearchBar.stories.jsx +28 -28
- package/src/stories/Sidebar.stories.jsx +61 -61
- package/src/stories/SimpleMetric.stories.jsx +41 -41
- package/src/stories/Status.stories.jsx +31 -31
- package/src/stories/TextWithLabel.stories.jsx +25 -25
- package/src/stories/TwoColumnsLayout.stories.jsx +42 -42
- package/src/stories/forms/Field.stories.jsx +89 -81
- package/src/stories/forms/Input.stories.jsx +89 -69
- package/src/stories/forms/Preview.stories.jsx +57 -57
- package/src/stories/forms/ToggleSwitch.stories.jsx +15 -15
- package/src/stories/icons/Icons.stories.jsx +74 -74
- package/src/styles/main.css +15 -15
- package/tailwind.config.cjs +60 -60
- package/vite.config.js +6 -6
- package/vitest.config.js +14 -14
package/src/components/Box.jsx
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import styles from './Box.module.css'
|
|
4
|
-
import React from 'react'
|
|
5
|
-
export default function Box ({ justifyCentered, children }) {
|
|
6
|
-
let className = `${styles.box}`
|
|
7
|
-
if (justifyCentered) className += ` ${styles.justifyCentered}`
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<div className={className}>
|
|
11
|
-
{children}
|
|
12
|
-
</div>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import styles from './Box.module.css'
|
|
4
|
+
import React from 'react'
|
|
5
|
+
export default function Box ({ justifyCentered, children }) {
|
|
6
|
+
let className = `${styles.box}`
|
|
7
|
+
if (justifyCentered) className += ` ${styles.justifyCentered}`
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className={className}>
|
|
11
|
+
{children}
|
|
12
|
+
</div>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.box {
|
|
2
|
-
@apply p-5 m-0 md:px-24 md:py-56 flex flex-col;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.justifyCentered {
|
|
6
|
-
@apply justify-center;
|
|
7
|
-
}
|
|
1
|
+
.box {
|
|
2
|
+
@apply p-5 m-0 md:px-24 md:py-56 flex flex-col;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.justifyCentered {
|
|
6
|
+
@apply justify-center;
|
|
7
|
+
}
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import PropTypes from 'prop-types'
|
|
4
|
-
import styles from './Button.module.css'
|
|
5
|
-
import PlatformaticIcon from './PlatformaticIcon'
|
|
6
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
7
|
-
|
|
8
|
-
function Button (props) {
|
|
9
|
-
const { icon, label, color, backgroundColor, size, disabled, bold, hoverEffect, bordered, fullWidth, platformaticIcon, ...rest } = props
|
|
10
|
-
let className = `${styles.button} ${styles['background-color-' + backgroundColor]} ${styles['color-' + color]} ${styles['button-' + size]}`
|
|
11
|
-
if (!bordered) className += ` ${styles['no-border']}`
|
|
12
|
-
if (disabled) {
|
|
13
|
-
className += ` ${styles.disabled}`
|
|
14
|
-
} else {
|
|
15
|
-
if (hoverEffect === 'hover') {
|
|
16
|
-
className += ` ${styles['hover-' + backgroundColor]}`
|
|
17
|
-
} else {
|
|
18
|
-
className += ` ${styles['underline-effect']}`
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (bold) className += ` ${styles.fontBold}`
|
|
22
|
-
if (fullWidth) className += ` ${styles.fullWidth}`
|
|
23
|
-
return (
|
|
24
|
-
<button className={className} disabled={disabled} alt={label} {...rest}>
|
|
25
|
-
{icon ? <FontAwesomeIcon icon={icon} className={`${styles['margin-right-' + size]}`} data-testid='button-icon' /> : null}
|
|
26
|
-
{platformaticIcon ? <PlatformaticIcon iconName={platformaticIcon.iconName} color={platformaticIcon.color} data-testid='button-icon' onClick={null} /> : null}
|
|
27
|
-
<span>{label}</span>
|
|
28
|
-
</button>
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
Button.propTypes = {
|
|
33
|
-
/**
|
|
34
|
-
* Icon
|
|
35
|
-
*/
|
|
36
|
-
icon: PropTypes.object,
|
|
37
|
-
/**
|
|
38
|
-
* label
|
|
39
|
-
*/
|
|
40
|
-
label: PropTypes.string,
|
|
41
|
-
/**
|
|
42
|
-
* color of text, icon and borders
|
|
43
|
-
*/
|
|
44
|
-
color: PropTypes.oneOf(['main-green', 'dark-green', 'light-green', 'main-dark-blue', 'dark-blue', 'light-blue', 'white', 'error-red', 'tertiary-blue', 'transparent']),
|
|
45
|
-
/**
|
|
46
|
-
* background color of the button
|
|
47
|
-
*/
|
|
48
|
-
backgroundColor: PropTypes.oneOf(['main-green', 'dark-green', 'light-green', 'main-dark-blue', 'dark-blue', 'light-blue', 'white', 'error-red', 'tertiary-blue', 'transparent']),
|
|
49
|
-
/**
|
|
50
|
-
* Size
|
|
51
|
-
*/
|
|
52
|
-
size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large']),
|
|
53
|
-
/**
|
|
54
|
-
* Disabled
|
|
55
|
-
*/
|
|
56
|
-
disabled: PropTypes.bool,
|
|
57
|
-
/**
|
|
58
|
-
* Bold
|
|
59
|
-
*/
|
|
60
|
-
bold: PropTypes.bool,
|
|
61
|
-
/**
|
|
62
|
-
* Effect on hover
|
|
63
|
-
*/
|
|
64
|
-
hoverEffect: PropTypes.oneOf(['hover', 'underline']),
|
|
65
|
-
/**
|
|
66
|
-
* Apply border: default true
|
|
67
|
-
*/
|
|
68
|
-
bordered: PropTypes.bool,
|
|
69
|
-
/**
|
|
70
|
-
* Full Width: default false
|
|
71
|
-
*/
|
|
72
|
-
fullWidth: PropTypes.bool,
|
|
73
|
-
/**
|
|
74
|
-
* platformaticIcon: should be removed once we use totally our icons
|
|
75
|
-
*/
|
|
76
|
-
platformaticIcon: PropTypes.shape({
|
|
77
|
-
iconName: PropTypes.string,
|
|
78
|
-
color: PropTypes.string
|
|
79
|
-
})
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
Button.defaultProps = {
|
|
83
|
-
label: '',
|
|
84
|
-
color: 'main-dark-blue',
|
|
85
|
-
backgroundColor: 'transparent',
|
|
86
|
-
disabled: false,
|
|
87
|
-
size: 'large',
|
|
88
|
-
bold: false,
|
|
89
|
-
hoverEffect: 'hover',
|
|
90
|
-
bordered: true,
|
|
91
|
-
fullWidth: false,
|
|
92
|
-
platformaticIcon: null
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export default Button
|
|
1
|
+
'use strict'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import PropTypes from 'prop-types'
|
|
4
|
+
import styles from './Button.module.css'
|
|
5
|
+
import PlatformaticIcon from './PlatformaticIcon'
|
|
6
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
7
|
+
|
|
8
|
+
function Button (props) {
|
|
9
|
+
const { icon, label, color, backgroundColor, size, disabled, bold, hoverEffect, bordered, fullWidth, platformaticIcon, ...rest } = props
|
|
10
|
+
let className = `${styles.button} ${styles['background-color-' + backgroundColor]} ${styles['color-' + color]} ${styles['button-' + size]}`
|
|
11
|
+
if (!bordered) className += ` ${styles['no-border']}`
|
|
12
|
+
if (disabled) {
|
|
13
|
+
className += ` ${styles.disabled}`
|
|
14
|
+
} else {
|
|
15
|
+
if (hoverEffect === 'hover') {
|
|
16
|
+
className += ` ${styles['hover-' + backgroundColor]}`
|
|
17
|
+
} else {
|
|
18
|
+
className += ` ${styles['underline-effect']}`
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
if (bold) className += ` ${styles.fontBold}`
|
|
22
|
+
if (fullWidth) className += ` ${styles.fullWidth}`
|
|
23
|
+
return (
|
|
24
|
+
<button className={className} disabled={disabled} alt={label} {...rest}>
|
|
25
|
+
{icon ? <FontAwesomeIcon icon={icon} className={`${styles['margin-right-' + size]}`} data-testid='button-icon' /> : null}
|
|
26
|
+
{platformaticIcon ? <PlatformaticIcon iconName={platformaticIcon.iconName} color={platformaticIcon.color} data-testid='button-icon' onClick={null} /> : null}
|
|
27
|
+
<span>{label}</span>
|
|
28
|
+
</button>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
Button.propTypes = {
|
|
33
|
+
/**
|
|
34
|
+
* Icon
|
|
35
|
+
*/
|
|
36
|
+
icon: PropTypes.object,
|
|
37
|
+
/**
|
|
38
|
+
* label
|
|
39
|
+
*/
|
|
40
|
+
label: PropTypes.string,
|
|
41
|
+
/**
|
|
42
|
+
* color of text, icon and borders
|
|
43
|
+
*/
|
|
44
|
+
color: PropTypes.oneOf(['main-green', 'dark-green', 'light-green', 'main-dark-blue', 'dark-blue', 'light-blue', 'white', 'error-red', 'tertiary-blue', 'transparent']),
|
|
45
|
+
/**
|
|
46
|
+
* background color of the button
|
|
47
|
+
*/
|
|
48
|
+
backgroundColor: PropTypes.oneOf(['main-green', 'dark-green', 'light-green', 'main-dark-blue', 'dark-blue', 'light-blue', 'white', 'error-red', 'tertiary-blue', 'transparent']),
|
|
49
|
+
/**
|
|
50
|
+
* Size
|
|
51
|
+
*/
|
|
52
|
+
size: PropTypes.oneOf(['small', 'medium', 'large', 'extra-large']),
|
|
53
|
+
/**
|
|
54
|
+
* Disabled
|
|
55
|
+
*/
|
|
56
|
+
disabled: PropTypes.bool,
|
|
57
|
+
/**
|
|
58
|
+
* Bold
|
|
59
|
+
*/
|
|
60
|
+
bold: PropTypes.bool,
|
|
61
|
+
/**
|
|
62
|
+
* Effect on hover
|
|
63
|
+
*/
|
|
64
|
+
hoverEffect: PropTypes.oneOf(['hover', 'underline']),
|
|
65
|
+
/**
|
|
66
|
+
* Apply border: default true
|
|
67
|
+
*/
|
|
68
|
+
bordered: PropTypes.bool,
|
|
69
|
+
/**
|
|
70
|
+
* Full Width: default false
|
|
71
|
+
*/
|
|
72
|
+
fullWidth: PropTypes.bool,
|
|
73
|
+
/**
|
|
74
|
+
* platformaticIcon: should be removed once we use totally our icons
|
|
75
|
+
*/
|
|
76
|
+
platformaticIcon: PropTypes.shape({
|
|
77
|
+
iconName: PropTypes.string,
|
|
78
|
+
color: PropTypes.string
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
Button.defaultProps = {
|
|
83
|
+
label: '',
|
|
84
|
+
color: 'main-dark-blue',
|
|
85
|
+
backgroundColor: 'transparent',
|
|
86
|
+
disabled: false,
|
|
87
|
+
size: 'large',
|
|
88
|
+
bold: false,
|
|
89
|
+
hoverEffect: 'hover',
|
|
90
|
+
bordered: true,
|
|
91
|
+
fullWidth: false,
|
|
92
|
+
platformaticIcon: null
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export default Button
|
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
.button {
|
|
2
|
-
@apply rounded text-center cursor-pointer font-normal rounded-md border border-solid box-border flex items-center justify-center gap-x-2;
|
|
3
|
-
}
|
|
4
|
-
.fontBold {
|
|
5
|
-
@apply font-semibold;
|
|
6
|
-
}
|
|
7
|
-
.button-small {
|
|
8
|
-
@apply p-1 text-sm;
|
|
9
|
-
}
|
|
10
|
-
.button-medium {
|
|
11
|
-
@apply p-1;
|
|
12
|
-
}
|
|
13
|
-
.button-large {
|
|
14
|
-
@apply p-2;
|
|
15
|
-
}
|
|
16
|
-
.button-extra-large {
|
|
17
|
-
@apply p-2 md:p-2.5;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.margin-right-medium,
|
|
21
|
-
.margin-right-small {
|
|
22
|
-
@apply mr-1;
|
|
23
|
-
}
|
|
24
|
-
.margin-right-large {
|
|
25
|
-
@apply mr-2;
|
|
26
|
-
}
|
|
27
|
-
.margin-right-extra-large {
|
|
28
|
-
@apply mr-3;
|
|
29
|
-
}
|
|
30
|
-
.background-color-main-green {
|
|
31
|
-
@apply bg-main-green !important;
|
|
32
|
-
}
|
|
33
|
-
.background-color-light-green {
|
|
34
|
-
@apply bg-light-green !important;
|
|
35
|
-
}
|
|
36
|
-
.background-color-dark-green {
|
|
37
|
-
@apply bg-dark-green !important;
|
|
38
|
-
}
|
|
39
|
-
.background-color-main-dark-blue{
|
|
40
|
-
@apply bg-main-dark-blue !important;
|
|
41
|
-
}
|
|
42
|
-
.background-color-dark-blue {
|
|
43
|
-
@apply bg-dark-blue !important;
|
|
44
|
-
}
|
|
45
|
-
.background-color-light-blue {
|
|
46
|
-
@apply bg-light-blue !important;
|
|
47
|
-
}
|
|
48
|
-
.background-color-white{
|
|
49
|
-
@apply bg-white !important;
|
|
50
|
-
}
|
|
51
|
-
.background-color-error-red{
|
|
52
|
-
@apply bg-error-red !important;
|
|
53
|
-
}
|
|
54
|
-
.background-color-tertiary-blue{
|
|
55
|
-
@apply bg-tertiary-blue !important;
|
|
56
|
-
}
|
|
57
|
-
.background-color-transparent{
|
|
58
|
-
@apply bg-transparent;
|
|
59
|
-
}
|
|
60
|
-
.color-main-green {
|
|
61
|
-
@apply text-main-green border-main-green;
|
|
62
|
-
}
|
|
63
|
-
.color-light-green {
|
|
64
|
-
@apply text-light-green border-light-green;
|
|
65
|
-
}
|
|
66
|
-
.color-dark-green {
|
|
67
|
-
@apply text-dark-green border-dark-green;
|
|
68
|
-
}
|
|
69
|
-
.color-main-dark-blue {
|
|
70
|
-
@apply text-main-dark-blue border-main-dark-blue;
|
|
71
|
-
}
|
|
72
|
-
.color-dark-blue{
|
|
73
|
-
@apply text-dark-blue border-dark-blue;
|
|
74
|
-
}
|
|
75
|
-
.color-light-blue{
|
|
76
|
-
@apply text-light-blue border-light-blue;
|
|
77
|
-
}
|
|
78
|
-
.color-white{
|
|
79
|
-
@apply text-white border-white;
|
|
80
|
-
}
|
|
81
|
-
.color-error-red{
|
|
82
|
-
@apply text-error-red border-error-red;
|
|
83
|
-
}
|
|
84
|
-
.color-tertiary-blue{
|
|
85
|
-
@apply text-tertiary-blue border-tertiary-blue;
|
|
86
|
-
}
|
|
87
|
-
.color-transparent{
|
|
88
|
-
@apply text-transparent border-transparent;
|
|
89
|
-
}
|
|
90
|
-
.no-border {
|
|
91
|
-
@apply border-0;
|
|
92
|
-
}
|
|
93
|
-
.disabled {
|
|
94
|
-
@apply opacity-30 cursor-default;
|
|
95
|
-
}
|
|
96
|
-
.hover-main-green {
|
|
97
|
-
@apply hover:shadow-main-green;
|
|
98
|
-
}
|
|
99
|
-
.hover-light-green {
|
|
100
|
-
@apply hover:shadow-light-green;
|
|
101
|
-
}
|
|
102
|
-
.hover-dark-green {
|
|
103
|
-
@apply hover:shadow-dark-green;
|
|
104
|
-
}
|
|
105
|
-
.hover-main-dark-blue {
|
|
106
|
-
@apply hover:shadow-main-dark-blue;
|
|
107
|
-
}
|
|
108
|
-
.hover-dark-blue {
|
|
109
|
-
@apply hover:shadow-dark-blue;
|
|
110
|
-
}
|
|
111
|
-
.hover-light-blue {
|
|
112
|
-
@apply hover:shadow-light-blue;
|
|
113
|
-
}
|
|
114
|
-
.hover-white{
|
|
115
|
-
@apply hover:shadow-wrap;
|
|
116
|
-
}
|
|
117
|
-
.hover-error-red {
|
|
118
|
-
@apply hover:shadow-error-red;
|
|
119
|
-
}
|
|
120
|
-
.hover-tertiary-blue {
|
|
121
|
-
@apply hover:shadow-tertiary-blue;
|
|
122
|
-
}
|
|
123
|
-
.underline-effect {
|
|
124
|
-
@apply hover:underline;
|
|
125
|
-
}
|
|
126
|
-
.fullWidth {
|
|
127
|
-
@apply w-full;
|
|
1
|
+
.button {
|
|
2
|
+
@apply rounded text-center cursor-pointer font-normal rounded-md border border-solid box-border flex items-center justify-center gap-x-2;
|
|
3
|
+
}
|
|
4
|
+
.fontBold {
|
|
5
|
+
@apply font-semibold;
|
|
6
|
+
}
|
|
7
|
+
.button-small {
|
|
8
|
+
@apply p-1 text-sm;
|
|
9
|
+
}
|
|
10
|
+
.button-medium {
|
|
11
|
+
@apply p-1;
|
|
12
|
+
}
|
|
13
|
+
.button-large {
|
|
14
|
+
@apply p-2;
|
|
15
|
+
}
|
|
16
|
+
.button-extra-large {
|
|
17
|
+
@apply p-2 md:p-2.5;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.margin-right-medium,
|
|
21
|
+
.margin-right-small {
|
|
22
|
+
@apply mr-1;
|
|
23
|
+
}
|
|
24
|
+
.margin-right-large {
|
|
25
|
+
@apply mr-2;
|
|
26
|
+
}
|
|
27
|
+
.margin-right-extra-large {
|
|
28
|
+
@apply mr-3;
|
|
29
|
+
}
|
|
30
|
+
.background-color-main-green {
|
|
31
|
+
@apply bg-main-green !important;
|
|
32
|
+
}
|
|
33
|
+
.background-color-light-green {
|
|
34
|
+
@apply bg-light-green !important;
|
|
35
|
+
}
|
|
36
|
+
.background-color-dark-green {
|
|
37
|
+
@apply bg-dark-green !important;
|
|
38
|
+
}
|
|
39
|
+
.background-color-main-dark-blue{
|
|
40
|
+
@apply bg-main-dark-blue !important;
|
|
41
|
+
}
|
|
42
|
+
.background-color-dark-blue {
|
|
43
|
+
@apply bg-dark-blue !important;
|
|
44
|
+
}
|
|
45
|
+
.background-color-light-blue {
|
|
46
|
+
@apply bg-light-blue !important;
|
|
47
|
+
}
|
|
48
|
+
.background-color-white{
|
|
49
|
+
@apply bg-white !important;
|
|
50
|
+
}
|
|
51
|
+
.background-color-error-red{
|
|
52
|
+
@apply bg-error-red !important;
|
|
53
|
+
}
|
|
54
|
+
.background-color-tertiary-blue{
|
|
55
|
+
@apply bg-tertiary-blue !important;
|
|
56
|
+
}
|
|
57
|
+
.background-color-transparent{
|
|
58
|
+
@apply bg-transparent;
|
|
59
|
+
}
|
|
60
|
+
.color-main-green {
|
|
61
|
+
@apply text-main-green border-main-green;
|
|
62
|
+
}
|
|
63
|
+
.color-light-green {
|
|
64
|
+
@apply text-light-green border-light-green;
|
|
65
|
+
}
|
|
66
|
+
.color-dark-green {
|
|
67
|
+
@apply text-dark-green border-dark-green;
|
|
68
|
+
}
|
|
69
|
+
.color-main-dark-blue {
|
|
70
|
+
@apply text-main-dark-blue border-main-dark-blue;
|
|
71
|
+
}
|
|
72
|
+
.color-dark-blue{
|
|
73
|
+
@apply text-dark-blue border-dark-blue;
|
|
74
|
+
}
|
|
75
|
+
.color-light-blue{
|
|
76
|
+
@apply text-light-blue border-light-blue;
|
|
77
|
+
}
|
|
78
|
+
.color-white{
|
|
79
|
+
@apply text-white border-white;
|
|
80
|
+
}
|
|
81
|
+
.color-error-red{
|
|
82
|
+
@apply text-error-red border-error-red;
|
|
83
|
+
}
|
|
84
|
+
.color-tertiary-blue{
|
|
85
|
+
@apply text-tertiary-blue border-tertiary-blue;
|
|
86
|
+
}
|
|
87
|
+
.color-transparent{
|
|
88
|
+
@apply text-transparent border-transparent;
|
|
89
|
+
}
|
|
90
|
+
.no-border {
|
|
91
|
+
@apply border-0;
|
|
92
|
+
}
|
|
93
|
+
.disabled {
|
|
94
|
+
@apply opacity-30 cursor-default;
|
|
95
|
+
}
|
|
96
|
+
.hover-main-green {
|
|
97
|
+
@apply hover:shadow-main-green;
|
|
98
|
+
}
|
|
99
|
+
.hover-light-green {
|
|
100
|
+
@apply hover:shadow-light-green;
|
|
101
|
+
}
|
|
102
|
+
.hover-dark-green {
|
|
103
|
+
@apply hover:shadow-dark-green;
|
|
104
|
+
}
|
|
105
|
+
.hover-main-dark-blue {
|
|
106
|
+
@apply hover:shadow-main-dark-blue;
|
|
107
|
+
}
|
|
108
|
+
.hover-dark-blue {
|
|
109
|
+
@apply hover:shadow-dark-blue;
|
|
110
|
+
}
|
|
111
|
+
.hover-light-blue {
|
|
112
|
+
@apply hover:shadow-light-blue;
|
|
113
|
+
}
|
|
114
|
+
.hover-white{
|
|
115
|
+
@apply hover:shadow-wrap;
|
|
116
|
+
}
|
|
117
|
+
.hover-error-red {
|
|
118
|
+
@apply hover:shadow-error-red;
|
|
119
|
+
}
|
|
120
|
+
.hover-tertiary-blue {
|
|
121
|
+
@apply hover:shadow-tertiary-blue;
|
|
122
|
+
}
|
|
123
|
+
.underline-effect {
|
|
124
|
+
@apply hover:underline;
|
|
125
|
+
}
|
|
126
|
+
.fullWidth {
|
|
127
|
+
@apply w-full;
|
|
128
128
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import styles from './ButtonFullRounded.module.css'
|
|
4
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
5
|
-
export default function ButtonFullRounded (props) {
|
|
6
|
-
// colorClass: white
|
|
7
|
-
// size: small|medium|large
|
|
8
|
-
const { icon, color = 'white', disabled, size = 'small' } = props
|
|
9
|
-
let className = `${styles.buttonRoundedFull} ${styles[color]} ${styles['button-' + size]}`
|
|
10
|
-
if (disabled) className += ` ${styles.disabled}`
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<button className={className} disabled={disabled} {...props}>
|
|
14
|
-
<FontAwesomeIcon icon={icon} data-testid='button-icon' />
|
|
15
|
-
</button>
|
|
16
|
-
)
|
|
17
|
-
}
|
|
1
|
+
'use strict'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import styles from './ButtonFullRounded.module.css'
|
|
4
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
|
5
|
+
export default function ButtonFullRounded (props) {
|
|
6
|
+
// colorClass: white
|
|
7
|
+
// size: small|medium|large
|
|
8
|
+
const { icon, color = 'white', disabled, size = 'small' } = props
|
|
9
|
+
let className = `${styles.buttonRoundedFull} ${styles[color]} ${styles['button-' + size]}`
|
|
10
|
+
if (disabled) className += ` ${styles.disabled}`
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<button className={className} disabled={disabled} {...props}>
|
|
14
|
+
<FontAwesomeIcon icon={icon} data-testid='button-icon' />
|
|
15
|
+
</button>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
.buttonRoundedFull {
|
|
2
|
-
@apply rounded-full flex justify-center cursor-pointer font-normal bg-main-dark-blue border items-center;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
.button-small {
|
|
7
|
-
@apply p-0 text-sm h-5 w-5;
|
|
8
|
-
}
|
|
9
|
-
.button-medium {
|
|
10
|
-
@apply p-1 h-6 w-6;
|
|
11
|
-
}
|
|
12
|
-
.button-large {
|
|
13
|
-
@apply p-2 h-7 w-7;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.green {
|
|
17
|
-
@apply border-light-green text-light-green ;
|
|
18
|
-
}
|
|
19
|
-
.red {
|
|
20
|
-
@apply border-error-red text-error-red;
|
|
21
|
-
}
|
|
22
|
-
.white {
|
|
23
|
-
@apply border-white text-white;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.disabled {
|
|
27
|
-
@apply bg-opacity-30 cursor-default;
|
|
28
|
-
}
|
|
1
|
+
.buttonRoundedFull {
|
|
2
|
+
@apply rounded-full flex justify-center cursor-pointer font-normal bg-main-dark-blue border items-center;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
.button-small {
|
|
7
|
+
@apply p-0 text-sm h-5 w-5;
|
|
8
|
+
}
|
|
9
|
+
.button-medium {
|
|
10
|
+
@apply p-1 h-6 w-6;
|
|
11
|
+
}
|
|
12
|
+
.button-large {
|
|
13
|
+
@apply p-2 h-7 w-7;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.green {
|
|
17
|
+
@apply border-light-green text-light-green ;
|
|
18
|
+
}
|
|
19
|
+
.red {
|
|
20
|
+
@apply border-error-red text-error-red;
|
|
21
|
+
}
|
|
22
|
+
.white {
|
|
23
|
+
@apply border-white text-white;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.disabled {
|
|
27
|
+
@apply bg-opacity-30 cursor-default;
|
|
28
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import styles from './Checkbox.module.css'
|
|
4
|
-
export default function Checkbox (props) {
|
|
5
|
-
const { disabled, ...rest } = props
|
|
6
|
-
let className = `${styles.checkbox}`
|
|
7
|
-
if (disabled) className += ` ${styles.disabled}`
|
|
8
|
-
return (
|
|
9
|
-
<input type='checkbox' className={className} disabled={disabled} {...rest} />
|
|
10
|
-
)
|
|
11
|
-
}
|
|
1
|
+
'use strict'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import styles from './Checkbox.module.css'
|
|
4
|
+
export default function Checkbox (props) {
|
|
5
|
+
const { disabled, ...rest } = props
|
|
6
|
+
let className = `${styles.checkbox}`
|
|
7
|
+
if (disabled) className += ` ${styles.disabled}`
|
|
8
|
+
return (
|
|
9
|
+
<input type='checkbox' className={className} disabled={disabled} {...rest} />
|
|
10
|
+
)
|
|
11
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
.checkbox {
|
|
2
|
-
@apply border border-light-green p-2 rounded-sm bg-main-dark-blue relative inline-block h-2 w-2;
|
|
3
|
-
-webkit-appearance: none;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.checkbox:checked {
|
|
7
|
-
@apply bg-light-green text-main-dark-blue;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.checkbox:checked:after {
|
|
11
|
-
@apply absolute top-[-2px] left-[1px] h-full w-full;
|
|
12
|
-
content: '\2714';
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.disabled {
|
|
16
|
-
@apply border-white;
|
|
17
|
-
}
|
|
18
|
-
|
|
1
|
+
.checkbox {
|
|
2
|
+
@apply border border-light-green p-2 rounded-sm bg-main-dark-blue relative inline-block h-2 w-2;
|
|
3
|
+
-webkit-appearance: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.checkbox:checked {
|
|
7
|
+
@apply bg-light-green text-main-dark-blue;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.checkbox:checked:after {
|
|
11
|
+
@apply absolute top-[-2px] left-[1px] h-full w-full;
|
|
12
|
+
content: '\2714';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.disabled {
|
|
16
|
+
@apply border-white;
|
|
17
|
+
}
|
|
18
|
+
|