@platformatic/ui-components 0.1.123 → 0.1.125
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-78f54889.js +206 -0
- package/dist/assets/index-89e9ad97.css +1 -0
- package/dist/index.html +2 -2
- package/dist/main.css +0 -10
- package/fonts/Inter/Inter-VariableFont_slnt,wght.ttf +0 -0
- package/fonts/Inter/OFL.txt +93 -0
- package/fonts/Inter/README.txt +72 -0
- package/fonts/Inter/static/Inter-Black.ttf +0 -0
- package/fonts/Inter/static/Inter-Bold.ttf +0 -0
- package/fonts/Inter/static/Inter-ExtraBold.ttf +0 -0
- package/fonts/Inter/static/Inter-ExtraLight.ttf +0 -0
- package/fonts/Inter/static/Inter-Light.ttf +0 -0
- package/fonts/Inter/static/Inter-Medium.ttf +0 -0
- package/fonts/Inter/static/Inter-Regular.ttf +0 -0
- package/fonts/Inter/static/Inter-SemiBold.ttf +0 -0
- package/fonts/Inter/static/Inter-Thin.ttf +0 -0
- package/fonts/{Montserrat/fonts.css → fonts.css} +7 -0
- package/index.js +8 -0
- package/package.json +1 -1
- package/src/components/BorderedBox.jsx +25 -6
- package/src/components/BorderedBox.module.css +3 -0
- package/src/components/Common.module.css +34 -3
- package/src/components/HorizontalSeparator.jsx +2 -1
- package/src/components/HorizontalSeparator.module.css +19 -0
- package/src/components/LoadingSpinnerV2.jsx +45 -0
- package/src/components/LoadingSpinnerV2.module.css +8 -0
- package/src/components/Modal.jsx +36 -3
- package/src/components/Modal.module.css +9 -1
- package/src/components/ModalDirectional.jsx +83 -0
- package/src/components/ModalDirectional.module.css +38 -0
- package/src/components/PlatformaticIcon.jsx +20 -5
- package/src/components/SearchBarV2.jsx +120 -0
- package/src/components/SearchBarV2.module.css +28 -0
- package/src/components/Sidebar.jsx +91 -86
- package/src/components/Sidebar.module.css +4 -4
- package/src/components/TabbedWindowV2.jsx +82 -0
- package/src/components/TabbedWindowV2.module.css +17 -0
- package/src/components/VerticalSeparator.jsx +18 -6
- package/src/components/VerticalSeparator.module.css +3 -0
- package/src/components/constants.js +10 -2
- package/src/components/forms/Field.jsx +29 -8
- package/src/components/forms/Field.module.css +7 -1
- package/src/components/forms/Input.jsx +73 -8
- package/src/components/forms/Input.module.css +8 -3
- package/src/components/forms/Select.jsx +98 -20
- package/src/components/forms/Select.module.css +17 -6
- package/src/components/forms/ToggleSwitch.jsx +11 -5
- package/src/components/forms/ToggleSwitch.module.css +2 -2
- package/src/components/icons/AddIcon.jsx +12 -5
- package/src/components/icons/AlertIcon.jsx +12 -5
- package/src/components/icons/AllInOneIcon.jsx +12 -5
- package/src/components/icons/ApiCloudIcon.jsx +12 -5
- package/src/components/icons/ApiEmptyIcon.jsx +12 -5
- package/src/components/icons/ApiIcon.jsx +12 -5
- package/src/components/icons/ApiIconClosed.jsx +10 -4
- package/src/components/icons/ApiPerformanceIcon.jsx +12 -5
- package/src/components/icons/AppEmptyIcon.jsx +12 -5
- package/src/components/icons/AppIcon.jsx +12 -5
- package/src/components/icons/AppListIcon.jsx +12 -5
- package/src/components/icons/AppWorkspace.jsx +5 -2
- package/src/components/icons/ApplicationTypeIcon.jsx +12 -5
- package/src/components/icons/ArrowDownFullIcon.jsx +12 -5
- package/src/components/icons/ArrowDownIcon.jsx +12 -5
- package/src/components/icons/ArrowLeftIcon.jsx +12 -5
- package/src/components/icons/ArrowLongLeftIcon.jsx +84 -0
- package/src/components/icons/ArrowLongRightIcon.jsx +12 -5
- package/src/components/icons/ArrowRightIcon.jsx +12 -5
- package/src/components/icons/ArrowUpIcon.jsx +12 -5
- package/src/components/icons/BellIcon.jsx +12 -5
- package/src/components/icons/BillingIcon.jsx +12 -5
- package/src/components/icons/Calendar1DayIcon.jsx +12 -5
- package/src/components/icons/Calendar7DaysIcon.jsx +12 -5
- package/src/components/icons/CalendarIcon.jsx +12 -5
- package/src/components/icons/CheckListIcon.jsx +12 -5
- package/src/components/icons/CircleAddIcon.jsx +12 -5
- package/src/components/icons/CircleArrowLeftIcon.jsx +12 -5
- package/src/components/icons/CircleArrowRightIcon.jsx +12 -5
- package/src/components/icons/CircleCheckMarkButtonIcon.jsx +7 -3
- package/src/components/icons/CircleCheckMarkFullIcon.jsx +12 -5
- package/src/components/icons/CircleCheckMarkIcon.jsx +10 -4
- package/src/components/icons/CircleCloseHoverIcon.jsx +12 -5
- package/src/components/icons/CircleCloseIcon.jsx +12 -5
- package/src/components/icons/CircleCopyPasteIcon.jsx +12 -5
- package/src/components/icons/CircleDownloadIcon.jsx +12 -5
- package/src/components/icons/CircleEditIcon.jsx +12 -5
- package/src/components/icons/CircleExclamationIcon.jsx +5 -2
- package/src/components/icons/CircleFullIcon.jsx +12 -5
- package/src/components/icons/CircleGearIcon.jsx +12 -5
- package/src/components/icons/CircleRestartIcon.jsx +12 -5
- package/src/components/icons/CircleSubtractIcon.jsx +12 -5
- package/src/components/icons/CircleTwoArrowsDownIcon.jsx +12 -5
- package/src/components/icons/CircleTwoArrowsUpIcon.jsx +12 -5
- package/src/components/icons/CloseIcon.jsx +12 -5
- package/src/components/icons/CloudIcon.jsx +12 -5
- package/src/components/icons/ConfigureDatabaseIcon.jsx +12 -5
- package/src/components/icons/CopyPasteIcon.jsx +12 -5
- package/src/components/icons/CreatingAppIcon.jsx +12 -5
- package/src/components/icons/CreditCardIcon.jsx +12 -5
- package/src/components/icons/DatabaseIcon.jsx +12 -5
- package/src/components/icons/DatabaseMigrationIcon.jsx +12 -5
- package/src/components/icons/DepencenciesReloadIcon.jsx +12 -5
- package/src/components/icons/EditDocumentIcon.jsx +12 -5
- package/src/components/icons/EditIcon.jsx +12 -5
- package/src/components/icons/EnlargeIcon.jsx +12 -5
- package/src/components/icons/EntryIcon.jsx +12 -5
- package/src/components/icons/ExpandIcon.jsx +92 -0
- package/src/components/icons/ExploreDocIcon.jsx +12 -5
- package/src/components/icons/EyeClosedIcon.jsx +12 -5
- package/src/components/icons/EyeOpenedIcon.jsx +12 -5
- package/src/components/icons/FolderIcon.jsx +83 -0
- package/src/components/icons/FoldersIcon.jsx +86 -0
- package/src/components/icons/GearIcon.jsx +12 -5
- package/src/components/icons/GenerationLoadingIcon.jsx +12 -5
- package/src/components/icons/GitHubRepo2Icon.jsx +12 -5
- package/src/components/icons/GitHubRepoIcon.jsx +12 -5
- package/src/components/icons/GiveOwnershipIcon.jsx +12 -5
- package/src/components/icons/GraphQLIcon.jsx +12 -5
- package/src/components/icons/Icons.module.css +7 -2
- package/src/components/icons/ImportApplicationIcon.jsx +12 -5
- package/src/components/icons/KeyIcon.jsx +12 -5
- package/src/components/icons/LabelIcon.jsx +12 -5
- package/src/components/icons/LayersIcon.jsx +12 -5
- package/src/components/icons/LensIcon.jsx +12 -5
- package/src/components/icons/LiveIcon.jsx +12 -5
- package/src/components/icons/LoadingAppIcon.jsx +12 -5
- package/src/components/icons/LogOutIcon.jsx +5 -2
- package/src/components/icons/MetricsIcon.jsx +12 -5
- package/src/components/icons/MetricsLoadingIcon.jsx +12 -5
- package/src/components/icons/NameAppIcon.jsx +12 -5
- package/src/components/icons/OrganizationIcon.jsx +12 -5
- package/src/components/icons/OutOfBoxGraphQLIcon.jsx +12 -5
- package/src/components/icons/PlatformaticComposerIcon.jsx +12 -5
- package/src/components/icons/PlatformaticDBIcon.jsx +12 -5
- package/src/components/icons/PlatformaticRuntimeIcon.jsx +12 -5
- package/src/components/icons/PlatformaticServiceIcon.jsx +12 -5
- package/src/components/icons/PlayIcon.jsx +12 -5
- package/src/components/icons/PreviewPRIcon.jsx +12 -5
- package/src/components/icons/PullRequestIcon.jsx +12 -5
- package/src/components/icons/PullRequestLoadingIcon.jsx +12 -5
- package/src/components/icons/RequestOwnershipIcon.jsx +12 -5
- package/src/components/icons/RestartIcon.jsx +12 -5
- package/src/components/icons/RocketIcon.jsx +12 -5
- package/src/components/icons/RunningIcon.jsx +12 -5
- package/src/components/icons/SendIcon.jsx +12 -5
- package/src/components/icons/ServiceIcon.jsx +12 -5
- package/src/components/icons/SlotIcon.jsx +12 -5
- package/src/components/icons/SocialDiscordIcon.jsx +12 -5
- package/src/components/icons/SocialGitHubIcon.jsx +12 -5
- package/src/components/icons/SocialGitLabIcon.jsx +12 -5
- package/src/components/icons/SocialLinkedInIcon.jsx +12 -5
- package/src/components/icons/SocialNPMIcon.jsx +12 -5
- package/src/components/icons/SocialXIcon.jsx +12 -5
- package/src/components/icons/SortableIcon.jsx +93 -0
- package/src/components/icons/StackablesPluginIcon.jsx +134 -0
- package/src/components/icons/StackablesTemplateIcon.jsx +133 -0
- package/src/components/icons/StopIcon.jsx +12 -5
- package/src/components/icons/SwitchIcon.jsx +12 -5
- package/src/components/icons/TeamsIcon.jsx +12 -5
- package/src/components/icons/TerminalIcon.jsx +12 -5
- package/src/components/icons/TrashIcon.jsx +95 -0
- package/src/components/icons/TwoUsersIcon.jsx +12 -5
- package/src/components/icons/UpgradeIcon.jsx +12 -5
- package/src/components/icons/UserIcon.jsx +12 -5
- package/src/components/icons/UserRemoveIcon.jsx +5 -2
- package/src/components/icons/UserRoleIcon.jsx +5 -2
- package/src/components/icons/WorkspaceDynamicIcon.jsx +12 -5
- package/src/components/icons/WorkspaceEmptyIcon.jsx +12 -5
- package/src/components/icons/WorkspaceFailIcon.jsx +12 -5
- package/src/components/icons/WorkspaceGitHubIcon.jsx +12 -5
- package/src/components/icons/WorkspaceLoadingIcon.jsx +12 -5
- package/src/components/icons/WorkspaceReadyIcon.jsx +12 -5
- package/src/components/icons/WorkspaceStaticIcon.jsx +12 -5
- package/src/components/icons/index.js +23 -7
- package/src/stories/ModalDirectional.stories.jsx +45 -0
- package/src/stories/forms/Select.stories.jsx +33 -1
- package/tailwind.config.cjs +5 -2
- package/dist/assets/index-3a61658e.css +0 -1
- package/dist/assets/index-8f6ac36c.js +0 -206
|
@@ -9,6 +9,8 @@ export const TRANSPARENT = 'transparent'
|
|
|
9
9
|
export const TERTIARY_BLUE = 'tertiary-blue'
|
|
10
10
|
export const ERROR_RED = 'error-red'
|
|
11
11
|
export const WARNING_YELLOW = 'warning-yellow'
|
|
12
|
+
export const RICH_BLACK = 'rich-black'
|
|
13
|
+
|
|
12
14
|
export const NONE = 'none'
|
|
13
15
|
export const EXTRA_SMALL = 'extra-small'
|
|
14
16
|
export const SMALL = 'small'
|
|
@@ -26,14 +28,15 @@ export const HOVER_EFFECTS_BUTTONS = [BOX_SHADOW, BACKGROUND_COLOR_OPAQUE, UNDER
|
|
|
26
28
|
export const MODAL_SIZES = [SMALL, MEDIUM, FULL_WIDTH]
|
|
27
29
|
|
|
28
30
|
export const COLORS_ICON = [MAIN_GREEN, WHITE, MAIN_DARK_BLUE, ERROR_RED, WARNING_YELLOW, TERTIARY_BLUE]
|
|
29
|
-
export const COLORS_BUTTON = [MAIN_GREEN, DARK_GREEN, LIGHT_GREEN, MAIN_DARK_BLUE, DARK_BLUE, LIGHT_BLUE, WHITE, ERROR_RED, TERTIARY_BLUE, TRANSPARENT]
|
|
31
|
+
export const COLORS_BUTTON = [MAIN_GREEN, DARK_GREEN, LIGHT_GREEN, MAIN_DARK_BLUE, DARK_BLUE, LIGHT_BLUE, WHITE, ERROR_RED, TERTIARY_BLUE, TRANSPARENT, RICH_BLACK]
|
|
30
32
|
export const COLORS_BORDERED_BOX = [MAIN_GREEN, ERROR_RED, WHITE, DARK_BLUE, MAIN_DARK_BLUE, WARNING_YELLOW, TRANSPARENT, LIGHT_BLUE, TERTIARY_BLUE]
|
|
31
33
|
|
|
32
34
|
export const MODAL_POPUP = 'popup'
|
|
35
|
+
export const MODAL_POPUP_V2 = 'popup-v2'
|
|
33
36
|
export const MODAL_COVER = 'cover'
|
|
34
37
|
export const MODAL_FULL_DARK = 'full-dark'
|
|
35
38
|
export const MODAL_FULL_LIGHT = 'full-light'
|
|
36
|
-
export const MODAL_LAYOUTS = [MODAL_POPUP, MODAL_COVER, MODAL_FULL_DARK, MODAL_FULL_LIGHT]
|
|
39
|
+
export const MODAL_LAYOUTS = [MODAL_POPUP_V2, MODAL_POPUP, MODAL_COVER, MODAL_FULL_DARK, MODAL_FULL_LIGHT]
|
|
37
40
|
|
|
38
41
|
export const FREE = 'free'
|
|
39
42
|
export const BASIC = 'basic'
|
|
@@ -49,6 +52,11 @@ export const ROLE_USER = 'user'
|
|
|
49
52
|
export const ROLE_OWNER = 'owner'
|
|
50
53
|
|
|
51
54
|
export const MARGIN_10 = 10
|
|
55
|
+
export const MARGIN_8 = 8
|
|
52
56
|
export const MARGIN_0 = 0
|
|
53
57
|
|
|
58
|
+
export const OPACITY_10 = 10
|
|
54
59
|
export const OPACITY_20 = 20
|
|
60
|
+
export const OPACITY_30 = 30
|
|
61
|
+
export const OPACITY_60 = 60
|
|
62
|
+
export const OPACITY_100 = 100
|
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
3
|
import styles from './Field.module.css'
|
|
4
|
+
import { ERROR_RED, MAIN_DARK_BLUE, WHITE } from '../constants'
|
|
4
5
|
|
|
5
|
-
function Field ({
|
|
6
|
+
function Field ({
|
|
7
|
+
title,
|
|
8
|
+
titleColor,
|
|
9
|
+
helper,
|
|
10
|
+
children,
|
|
11
|
+
disabled,
|
|
12
|
+
required,
|
|
13
|
+
titleClassName,
|
|
14
|
+
helperClassName
|
|
15
|
+
}) {
|
|
6
16
|
let className = `${styles.container}`
|
|
7
17
|
if (disabled) className += ` ${styles.disabled}`
|
|
8
|
-
|
|
9
|
-
|
|
18
|
+
const styledTitle = titleClassName || (`${styles.title} ` + styles[`text-color-${titleColor}`])
|
|
19
|
+
let styledHelper = helperClassName || styles.helper
|
|
20
|
+
styledHelper += ` ${styles.helperPadding}`
|
|
10
21
|
let titleTmp = title
|
|
11
22
|
if (required) { titleTmp += ' *' }
|
|
12
23
|
|
|
13
24
|
return (
|
|
14
25
|
<div className={className}>
|
|
15
|
-
<p className={
|
|
16
|
-
{helper && <p className={
|
|
26
|
+
<p className={styledTitle}>{titleTmp}</p>
|
|
27
|
+
{helper && <p className={styledHelper}>{helper}</p>}
|
|
17
28
|
<div className={styles.content}>
|
|
18
29
|
{children}
|
|
19
30
|
</div>
|
|
@@ -29,7 +40,7 @@ Field.propTypes = {
|
|
|
29
40
|
/**
|
|
30
41
|
* titleColor
|
|
31
42
|
*/
|
|
32
|
-
titleColor: PropTypes.oneOf([
|
|
43
|
+
titleColor: PropTypes.oneOf([ERROR_RED, MAIN_DARK_BLUE, WHITE]),
|
|
33
44
|
/**
|
|
34
45
|
* helper
|
|
35
46
|
*/
|
|
@@ -45,7 +56,15 @@ Field.propTypes = {
|
|
|
45
56
|
/**
|
|
46
57
|
* required
|
|
47
58
|
*/
|
|
48
|
-
required: PropTypes.bool
|
|
59
|
+
required: PropTypes.bool,
|
|
60
|
+
/**
|
|
61
|
+
* titleClassName
|
|
62
|
+
*/
|
|
63
|
+
titleClassName: PropTypes.string,
|
|
64
|
+
/**
|
|
65
|
+
* titleClassName
|
|
66
|
+
*/
|
|
67
|
+
helperClassName: PropTypes.string
|
|
49
68
|
}
|
|
50
69
|
|
|
51
70
|
Field.defaultProps = {
|
|
@@ -54,7 +73,9 @@ Field.defaultProps = {
|
|
|
54
73
|
helper: '',
|
|
55
74
|
children: null,
|
|
56
75
|
disabled: false,
|
|
57
|
-
required: false
|
|
76
|
+
required: false,
|
|
77
|
+
titleClassName: '',
|
|
78
|
+
helperClassName: ''
|
|
58
79
|
}
|
|
59
80
|
|
|
60
81
|
export default Field
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.container {
|
|
2
|
-
@apply flex flex-col w-full;
|
|
2
|
+
@apply flex flex-col w-full gap-y-1;
|
|
3
3
|
}
|
|
4
4
|
.title {
|
|
5
5
|
@apply font-semibold pb-2;
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
.text-color-error-red {
|
|
11
11
|
@apply text-error-red;
|
|
12
12
|
}
|
|
13
|
+
.text-color-white {
|
|
14
|
+
@apply text-white;
|
|
15
|
+
}
|
|
13
16
|
.helper{
|
|
14
17
|
@apply text-sm pb-4;
|
|
15
18
|
}
|
|
@@ -21,4 +24,7 @@
|
|
|
21
24
|
}
|
|
22
25
|
.disabled {
|
|
23
26
|
@apply opacity-20;
|
|
27
|
+
}
|
|
28
|
+
.helperPadding {
|
|
29
|
+
@apply pb-3
|
|
24
30
|
}
|
|
@@ -4,12 +4,32 @@ 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_DARK_BLUE, MAIN_GREEN } from '../constants'
|
|
7
|
+
import { MAIN_DARK_BLUE, MAIN_GREEN, WHITE } from '../constants'
|
|
8
8
|
import BorderedBox from '../BorderedBox'
|
|
9
9
|
|
|
10
|
-
function Input ({
|
|
11
|
-
|
|
10
|
+
function Input ({
|
|
11
|
+
placeholder,
|
|
12
|
+
value,
|
|
13
|
+
name,
|
|
14
|
+
borderColor,
|
|
15
|
+
errorMessage,
|
|
16
|
+
onChange,
|
|
17
|
+
disabled,
|
|
18
|
+
beforeIcon,
|
|
19
|
+
afterIcon,
|
|
20
|
+
focused,
|
|
21
|
+
placeholderApart,
|
|
22
|
+
backgroundTransparent,
|
|
23
|
+
inputTextClassName,
|
|
24
|
+
verticalPaddingClassName,
|
|
25
|
+
dataAttrName,
|
|
26
|
+
dataAttrValue,
|
|
27
|
+
readOnly
|
|
28
|
+
}) {
|
|
29
|
+
let inputClassName = `${commonStyles.fullWidth} ${styles.input} ${inputTextClassName}`
|
|
30
|
+
inputClassName += verticalPaddingClassName || `${styles.inputDefaultVerticalPadding}`
|
|
12
31
|
inputClassName += commonStyles[`bordered--${borderColor}`] + ' ' + commonStyles[`text--${borderColor}`]
|
|
32
|
+
if (backgroundTransparent) inputClassName += ` ${commonStyles['background-color-transparent']}`
|
|
13
33
|
const showError = errorMessage.length > 0
|
|
14
34
|
if (showError) inputClassName += ' ' + commonStyles['bordered--error-red']
|
|
15
35
|
if (disabled) inputClassName += ' ' + commonStyles['apply-opacity-30']
|
|
@@ -17,11 +37,26 @@ function Input ({ placeholder, value, name, borderColor, errorMessage, onChange,
|
|
|
17
37
|
if (afterIcon) inputClassName += ' ' + styles.afterIconPadding
|
|
18
38
|
const inputPlaceholder = placeholderApart ? '' : placeholder
|
|
19
39
|
|
|
40
|
+
const dataProps = {}
|
|
41
|
+
if (dataAttrName && dataAttrValue) {
|
|
42
|
+
dataProps[`data-${dataAttrName}`] = dataAttrValue
|
|
43
|
+
}
|
|
44
|
+
|
|
20
45
|
const cmp = (
|
|
21
|
-
<div className={styles.container}>
|
|
46
|
+
<div className={styles.container} {...dataProps}>
|
|
22
47
|
<div className={styles.inputContainer}>
|
|
23
48
|
{beforeIcon && <div className={styles.beforeInputIcon}><PlatformaticIcon iconName={beforeIcon.iconName} size='small' data-testid='before-icon' color={beforeIcon.color} onClick={() => beforeIcon.onClick()} /></div>}
|
|
24
|
-
<input
|
|
49
|
+
<input
|
|
50
|
+
type='text'
|
|
51
|
+
name={name}
|
|
52
|
+
value={value}
|
|
53
|
+
className={inputClassName}
|
|
54
|
+
onChange={onChange}
|
|
55
|
+
disabled={disabled}
|
|
56
|
+
placeholder={inputPlaceholder}
|
|
57
|
+
readOnly={readOnly}
|
|
58
|
+
aria-readonly={readOnly}
|
|
59
|
+
/>
|
|
25
60
|
{placeholderApart && <p className={styles.placeholderAPart}>{placeholder}</p>}
|
|
26
61
|
{afterIcon && <div className={styles.afterInputIcon}><PlatformaticIcon iconName={afterIcon.iconName} color={afterIcon.color} data-testid='after-icon' onClick={null} /></div>}
|
|
27
62
|
</div>
|
|
@@ -48,7 +83,7 @@ Input.propTypes = {
|
|
|
48
83
|
/**
|
|
49
84
|
* color of border
|
|
50
85
|
*/
|
|
51
|
-
borderColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE]),
|
|
86
|
+
borderColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE]),
|
|
52
87
|
/**
|
|
53
88
|
* onChange
|
|
54
89
|
*/
|
|
@@ -80,7 +115,31 @@ Input.propTypes = {
|
|
|
80
115
|
/**
|
|
81
116
|
* placeholderApart
|
|
82
117
|
*/
|
|
83
|
-
placeholderApart: PropTypes.bool
|
|
118
|
+
placeholderApart: PropTypes.bool,
|
|
119
|
+
/**
|
|
120
|
+
* backgroundTransparent
|
|
121
|
+
*/
|
|
122
|
+
backgroundTransparent: PropTypes.bool,
|
|
123
|
+
/**
|
|
124
|
+
* inputTextClassName
|
|
125
|
+
*/
|
|
126
|
+
inputTextClassName: PropTypes.string,
|
|
127
|
+
/**
|
|
128
|
+
* verticalPaddingClassName
|
|
129
|
+
*/
|
|
130
|
+
verticalPaddingClassName: PropTypes.string,
|
|
131
|
+
/**
|
|
132
|
+
* dataAttrName
|
|
133
|
+
*/
|
|
134
|
+
dataAttrName: PropTypes.string,
|
|
135
|
+
/**
|
|
136
|
+
* dataAttrValue
|
|
137
|
+
*/
|
|
138
|
+
dataAttrValue: PropTypes.string,
|
|
139
|
+
/**
|
|
140
|
+
* readOnly
|
|
141
|
+
*/
|
|
142
|
+
readOnly: PropTypes.bool
|
|
84
143
|
}
|
|
85
144
|
|
|
86
145
|
Input.defaultProps = {
|
|
@@ -94,7 +153,13 @@ Input.defaultProps = {
|
|
|
94
153
|
beforeIcon: null,
|
|
95
154
|
afterIcon: null,
|
|
96
155
|
focused: false,
|
|
97
|
-
shadowPlaceholder: false
|
|
156
|
+
shadowPlaceholder: false,
|
|
157
|
+
backgroundTransparent: false,
|
|
158
|
+
inputTextClassName: '',
|
|
159
|
+
verticalPaddingClassName: '',
|
|
160
|
+
dataAttrName: '',
|
|
161
|
+
dataAttrValue: '',
|
|
162
|
+
readOnly: false
|
|
98
163
|
}
|
|
99
164
|
|
|
100
165
|
export default Input
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
@apply flex flex-col w-full relative;
|
|
3
3
|
}
|
|
4
4
|
.inputContainer {
|
|
5
|
-
@apply flex h-
|
|
5
|
+
@apply flex min-h-[2.5rem] relative z-20;
|
|
6
6
|
}
|
|
7
7
|
.input {
|
|
8
|
-
|
|
8
|
+
padding-block: 0px;
|
|
9
|
+
padding-inline: 0px;
|
|
10
|
+
@apply border border-solid box-border rounded-md px-2 z-10;
|
|
11
|
+
}
|
|
12
|
+
.inputDefaultVerticalPadding {
|
|
13
|
+
@apply py-2.5;
|
|
9
14
|
}
|
|
10
15
|
.afterInputIcon,
|
|
11
16
|
.beforeInputIcon {
|
|
@@ -42,4 +47,4 @@
|
|
|
42
47
|
.input:focus {
|
|
43
48
|
@apply shadow-main-dark-blue;
|
|
44
49
|
outline: none;
|
|
45
|
-
}
|
|
50
|
+
}
|
|
@@ -3,31 +3,68 @@ import React, { useState, useEffect, useRef } from 'react'
|
|
|
3
3
|
import PropTypes from 'prop-types'
|
|
4
4
|
import styles from './Select.module.css'
|
|
5
5
|
import commonStyles from '../Common.module.css'
|
|
6
|
-
import { MAIN_DARK_BLUE, MAIN_GREEN, SMALL } from '../constants'
|
|
6
|
+
import { MAIN_DARK_BLUE, MAIN_GREEN, RICH_BLACK, SMALL, WHITE } from '../constants'
|
|
7
7
|
import PlatformaticIcon from '../PlatformaticIcon'
|
|
8
8
|
|
|
9
9
|
function Select ({
|
|
10
|
+
defaultContainerClassName,
|
|
10
11
|
placeholder,
|
|
11
12
|
name,
|
|
12
13
|
value,
|
|
13
14
|
options,
|
|
15
|
+
defaultOptionsClassName,
|
|
16
|
+
optionsBorderedBottom,
|
|
14
17
|
borderColor,
|
|
18
|
+
borderListColor,
|
|
15
19
|
errorMessage,
|
|
16
20
|
onChange,
|
|
17
21
|
onSelect,
|
|
18
22
|
onClear,
|
|
19
23
|
disabled,
|
|
20
|
-
|
|
21
|
-
optionSelected
|
|
24
|
+
mainColor,
|
|
25
|
+
optionSelected,
|
|
26
|
+
dataAttrName,
|
|
27
|
+
dataAttrValue,
|
|
28
|
+
backgroundColor
|
|
29
|
+
|
|
22
30
|
}) {
|
|
23
31
|
const inputRef = useRef()
|
|
24
32
|
const [showOptions, setShowOptions] = useState(false)
|
|
25
33
|
const [isSelected, setIsSelected] = useState(false)
|
|
34
|
+
const [isOnFocus, setIsOnFocus] = useState(false)
|
|
26
35
|
const showError = errorMessage.length > 0
|
|
27
|
-
|
|
28
|
-
inputClassName
|
|
36
|
+
const containerClassName = `${styles.container} ${defaultContainerClassName} `
|
|
37
|
+
let inputClassName = `${commonStyles.fullWidth} ${styles.select}`
|
|
38
|
+
inputClassName += ' ' + styles[`select-${mainColor}`]
|
|
39
|
+
inputClassName += ' ' + commonStyles[`text--${borderColor}`]
|
|
40
|
+
let optionsClassName = `${styles.options} ${defaultOptionsClassName} `
|
|
29
41
|
if (showError) inputClassName += ' ' + commonStyles['bordered--error-red']
|
|
30
42
|
if (disabled) inputClassName += ' ' + commonStyles['apply-opacity-30']
|
|
43
|
+
inputClassName += ' ' + commonStyles[`background-color-${backgroundColor}`]
|
|
44
|
+
optionsClassName += commonStyles[`background-color-${backgroundColor}`]
|
|
45
|
+
|
|
46
|
+
if (borderListColor) {
|
|
47
|
+
optionsClassName += ' ' + styles['bordered-options']
|
|
48
|
+
optionsClassName += ' ' + commonStyles[`bordered--${borderListColor}-30`]
|
|
49
|
+
}
|
|
50
|
+
let singleOptionClassName = `${styles.option} ` + commonStyles[`bordered--${mainColor}-15`] + ' ' + commonStyles[`hover-background-color-opaque-${mainColor}`]
|
|
51
|
+
if (optionsBorderedBottom) {
|
|
52
|
+
singleOptionClassName += ` ${styles['bordered-bottom']}`
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const [wrapperClassName, setWrapperClassName] = useState(normalClassName())
|
|
56
|
+
function onFocusClassName () {
|
|
57
|
+
return inputClassName + ' ' + commonStyles[`bordered--${borderColor}-100`]
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function normalClassName () {
|
|
61
|
+
return inputClassName + ' ' + commonStyles[`bordered--${borderColor}-15`]
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const dataProps = {}
|
|
65
|
+
if (dataAttrName && dataAttrValue) {
|
|
66
|
+
dataProps[`data-${dataAttrName}`] = dataAttrValue
|
|
67
|
+
}
|
|
31
68
|
|
|
32
69
|
function handleNotSelectable (callback = () => {}) {
|
|
33
70
|
setIsSelected(true)
|
|
@@ -65,7 +102,7 @@ function Select ({
|
|
|
65
102
|
function renderLi (option, index) {
|
|
66
103
|
return (
|
|
67
104
|
<li
|
|
68
|
-
key={index} className={
|
|
105
|
+
key={index} className={singleOptionClassName} onClick={() => {
|
|
69
106
|
if (option.notSelectable) {
|
|
70
107
|
return handleNotSelectable(option.onClick && option.onClick())
|
|
71
108
|
}
|
|
@@ -73,8 +110,8 @@ function Select ({
|
|
|
73
110
|
}}
|
|
74
111
|
>
|
|
75
112
|
<div className={styles.liContent}>
|
|
76
|
-
{option.iconName && <PlatformaticIcon iconName={option.iconName} color={
|
|
77
|
-
<span>{option.label}</span>
|
|
113
|
+
{option.iconName && <PlatformaticIcon iconName={option.iconName} color={mainColor} size={SMALL} onClick={null} />}
|
|
114
|
+
<span className={commonStyles[`text--${mainColor}`]}>{option.label}</span>
|
|
78
115
|
</div>
|
|
79
116
|
</li>
|
|
80
117
|
)
|
|
@@ -83,8 +120,8 @@ function Select ({
|
|
|
83
120
|
function renderOptions () {
|
|
84
121
|
if (value.length === 0) {
|
|
85
122
|
return (
|
|
86
|
-
<ul className={
|
|
87
|
-
{options.length > 0 ? options.map((option, index) => renderLi(option, index)) : <li className={
|
|
123
|
+
<ul className={optionsClassName}>
|
|
124
|
+
{options.length > 0 ? options.map((option, index) => renderLi(option, index)) : <li className={singleOptionClassName}><div className={styles.liContent}><span className={commonStyles[`text--${mainColor}`]}>No data found</span></div></li>}
|
|
88
125
|
</ul>
|
|
89
126
|
)
|
|
90
127
|
}
|
|
@@ -92,8 +129,8 @@ function Select ({
|
|
|
92
129
|
const filteredOptions = options.filter(option => !option.notFilterable).filter(option => option.label.toLowerCase().includes(value.toLowerCase()))
|
|
93
130
|
|
|
94
131
|
return (
|
|
95
|
-
<ul className={
|
|
96
|
-
{filteredOptions.length > 0 ? filteredOptions.map((option, index) => renderLi(option, index)) : <li className={
|
|
132
|
+
<ul className={optionsClassName}>
|
|
133
|
+
{filteredOptions.length > 0 ? filteredOptions.map((option, index) => renderLi(option, index)) : <li className={singleOptionClassName}><div className={styles.liContent}><span className={commonStyles[`text--${mainColor}`]}>No data found</span></div></li>}
|
|
97
134
|
{notFilterableOptions.length > 0 && notFilterableOptions.map((option, index) => renderLi(option, index))}
|
|
98
135
|
</ul>
|
|
99
136
|
)
|
|
@@ -110,6 +147,10 @@ function Select ({
|
|
|
110
147
|
}
|
|
111
148
|
|
|
112
149
|
function handleFocus () {
|
|
150
|
+
if (!isOnFocus) {
|
|
151
|
+
setIsOnFocus(true)
|
|
152
|
+
setWrapperClassName(onFocusClassName())
|
|
153
|
+
}
|
|
113
154
|
setShowOptions(true)
|
|
114
155
|
}
|
|
115
156
|
|
|
@@ -118,14 +159,16 @@ function Select ({
|
|
|
118
159
|
setTimeout(() => {
|
|
119
160
|
if (showOptions) {
|
|
120
161
|
setShowOptions(false)
|
|
162
|
+
setIsOnFocus(false)
|
|
163
|
+
setWrapperClassName(normalClassName())
|
|
121
164
|
}
|
|
122
165
|
}, 250)
|
|
123
166
|
}
|
|
124
167
|
|
|
125
168
|
return (
|
|
126
|
-
<div className={
|
|
169
|
+
<div className={containerClassName} {...dataProps}>
|
|
127
170
|
<div className={styles.selectContainer}>
|
|
128
|
-
<input type='text' name={name} value={value} className={
|
|
171
|
+
<input type='text' name={name} value={value} className={wrapperClassName} ref={inputRef} onChange={onChange} disabled={disabled} placeholder={placeholder} onFocus={() => handleFocus()} onBlur={(e) => handleBlur(e)} />
|
|
129
172
|
<div className={styles.icons}>
|
|
130
173
|
{value?.length > 0 && <PlatformaticIcon iconName='CloseIcon' color={borderColor} onClick={() => clearValue()} />}
|
|
131
174
|
<PlatformaticIcon iconName={showOptions ? 'ArrowUpIcon' : 'ArrowDownIcon'} color={borderColor} onClick={() => disabled ? null : setShowOptions(!showOptions)} />
|
|
@@ -138,6 +181,10 @@ function Select ({
|
|
|
138
181
|
}
|
|
139
182
|
|
|
140
183
|
Select.propTypes = {
|
|
184
|
+
/**
|
|
185
|
+
* defaultContainerClassName
|
|
186
|
+
*/
|
|
187
|
+
defaultContainerClassName: PropTypes.string,
|
|
141
188
|
/**
|
|
142
189
|
* placeholder
|
|
143
190
|
*/
|
|
@@ -167,10 +214,22 @@ Select.propTypes = {
|
|
|
167
214
|
notFilterable: PropTypes.bool,
|
|
168
215
|
onClick: PropTypes.func
|
|
169
216
|
})),
|
|
217
|
+
/**
|
|
218
|
+
* defaultOptionsClassName
|
|
219
|
+
*/
|
|
220
|
+
defaultOptionsClassName: PropTypes.string,
|
|
221
|
+
/**
|
|
222
|
+
* optionsBorderedBottom
|
|
223
|
+
*/
|
|
224
|
+
optionsBorderedBottom: PropTypes.bool,
|
|
170
225
|
/**
|
|
171
226
|
* color of border
|
|
172
227
|
*/
|
|
173
|
-
borderColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE]),
|
|
228
|
+
borderColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE]),
|
|
229
|
+
/**
|
|
230
|
+
* color of border UL
|
|
231
|
+
*/
|
|
232
|
+
borderListColor: PropTypes.oneOf([MAIN_GREEN, MAIN_DARK_BLUE, WHITE]),
|
|
174
233
|
/**
|
|
175
234
|
* onChange
|
|
176
235
|
*/
|
|
@@ -188,9 +247,9 @@ Select.propTypes = {
|
|
|
188
247
|
*/
|
|
189
248
|
disabled: PropTypes.bool,
|
|
190
249
|
/**
|
|
191
|
-
*
|
|
250
|
+
* mainColor
|
|
192
251
|
*/
|
|
193
|
-
|
|
252
|
+
mainColor: PropTypes.oneOf([MAIN_DARK_BLUE, WHITE]),
|
|
194
253
|
/**
|
|
195
254
|
* optionSelected
|
|
196
255
|
*/
|
|
@@ -200,23 +259,42 @@ Select.propTypes = {
|
|
|
200
259
|
PropTypes.string,
|
|
201
260
|
PropTypes.number
|
|
202
261
|
])
|
|
203
|
-
})
|
|
262
|
+
}),
|
|
263
|
+
/**
|
|
264
|
+
* dataAttrName
|
|
265
|
+
*/
|
|
266
|
+
dataAttrName: PropTypes.string,
|
|
267
|
+
/**
|
|
268
|
+
* dataAttrValue
|
|
269
|
+
*/
|
|
270
|
+
dataAttrValue: PropTypes.string,
|
|
271
|
+
/**
|
|
272
|
+
* backgroundColor
|
|
273
|
+
*/
|
|
274
|
+
backgroundColor: PropTypes.oneOf([MAIN_DARK_BLUE, WHITE, RICH_BLACK])
|
|
204
275
|
}
|
|
205
276
|
|
|
206
277
|
Select.defaultProps = {
|
|
278
|
+
defaultContainerClassName: '',
|
|
207
279
|
placeholder: 'this is the default',
|
|
208
280
|
name: '',
|
|
209
281
|
value: '',
|
|
210
282
|
id: '',
|
|
211
283
|
options: [],
|
|
284
|
+
defaultOptionsClassName: '',
|
|
285
|
+
optionsBorderedBottom: true,
|
|
212
286
|
borderColor: MAIN_GREEN,
|
|
287
|
+
borderListColor: '',
|
|
213
288
|
errorMessage: '',
|
|
214
289
|
onChange: () => {},
|
|
215
290
|
onSelect: () => {},
|
|
216
291
|
onClear: () => {},
|
|
217
292
|
disabled: false,
|
|
218
|
-
|
|
219
|
-
optionSelected: null
|
|
293
|
+
mainColor: MAIN_DARK_BLUE,
|
|
294
|
+
optionSelected: null,
|
|
295
|
+
dataAttrName: '',
|
|
296
|
+
dataAttrValue: '',
|
|
297
|
+
backgroundColor: WHITE
|
|
220
298
|
}
|
|
221
299
|
|
|
222
300
|
export default Select
|
|
@@ -7,19 +7,30 @@
|
|
|
7
7
|
.select {
|
|
8
8
|
@apply px-2 h-full border border-solid box-border rounded-md ;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
.select
|
|
10
|
+
|
|
11
|
+
.select-main-dark-blue.active,
|
|
12
|
+
.select-main-dark-blue:focus {
|
|
12
13
|
@apply shadow-main-dark-blue outline-none;
|
|
13
14
|
}
|
|
15
|
+
.select-white.active,
|
|
16
|
+
.select-white:focus {
|
|
17
|
+
@apply shadow-white outline-none;
|
|
18
|
+
}
|
|
14
19
|
.options {
|
|
15
|
-
@apply absolute left-0 top-[42px]
|
|
16
|
-
|
|
20
|
+
@apply absolute left-0 top-[42px] w-full max-h-[216px] overflow-y-scroll z-20;
|
|
21
|
+
}
|
|
22
|
+
.bordered-options {
|
|
23
|
+
@apply border border-solid rounded-md
|
|
17
24
|
}
|
|
18
25
|
.option {
|
|
19
|
-
@apply w-full
|
|
26
|
+
@apply w-full font-light cursor-pointer z-10;
|
|
27
|
+
}
|
|
28
|
+
.bordered-bottom {
|
|
29
|
+
@apply border-b
|
|
20
30
|
}
|
|
21
31
|
.icons {
|
|
22
|
-
@apply absolute top-[50%] right-[0.5rem]
|
|
32
|
+
@apply absolute top-[50%] right-[0.5rem] flex gap-x-2;
|
|
33
|
+
transform: translateY(-50%);
|
|
23
34
|
}
|
|
24
35
|
.liContent {
|
|
25
36
|
@apply px-4 py-2 inline-flex items-center gap-x-1 relative z-[-1];
|
|
@@ -4,10 +4,10 @@ import PropTypes from 'prop-types'
|
|
|
4
4
|
import styles from './ToggleSwitch.module.css'
|
|
5
5
|
import commonStyles from '../Common.module.css'
|
|
6
6
|
|
|
7
|
-
function ToggleSwitch ({ name, label, errorMessage, onChange, checked, disabled }) {
|
|
7
|
+
function ToggleSwitch ({ name, label, labelClassName, errorMessage, onChange, checked, disabled }) {
|
|
8
8
|
let className = `${styles.switch} `
|
|
9
9
|
if (disabled) className += styles.disabled
|
|
10
|
-
|
|
10
|
+
const styleLabel = labelClassName || styles.defaultLabel
|
|
11
11
|
return (
|
|
12
12
|
<>
|
|
13
13
|
<div className={styles.container}>
|
|
@@ -15,7 +15,7 @@ function ToggleSwitch ({ name, label, errorMessage, onChange, checked, disabled
|
|
|
15
15
|
<input type='checkbox' name={name} onChange={onChange} checked={checked} disabled={disabled} />
|
|
16
16
|
<span className={`${styles.slider} ${styles.round}`} />
|
|
17
17
|
</label>
|
|
18
|
-
<span className={
|
|
18
|
+
<span className={styleLabel}>{label}</span>
|
|
19
19
|
</div>
|
|
20
20
|
{errorMessage.length > 0 && <span className={commonStyles['error-message']}>{errorMessage}</span>}
|
|
21
21
|
</>
|
|
@@ -46,7 +46,12 @@ ToggleSwitch.propTypes = {
|
|
|
46
46
|
/**
|
|
47
47
|
* onChange of border
|
|
48
48
|
*/
|
|
49
|
-
onChange: PropTypes.func
|
|
49
|
+
onChange: PropTypes.func,
|
|
50
|
+
/**
|
|
51
|
+
* labelClassName
|
|
52
|
+
*/
|
|
53
|
+
labelClassName: PropTypes.string
|
|
54
|
+
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
ToggleSwitch.defaultProps = {
|
|
@@ -55,7 +60,8 @@ ToggleSwitch.defaultProps = {
|
|
|
55
60
|
errorMessage: '',
|
|
56
61
|
checked: false,
|
|
57
62
|
disabled: false,
|
|
58
|
-
onChange: () => {}
|
|
63
|
+
onChange: () => {},
|
|
64
|
+
labelClassName: ''
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
export default ToggleSwitch
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.container {
|
|
2
|
-
@apply flex w-full h-10 items-center;
|
|
2
|
+
@apply flex w-full h-10 items-center gap-x-2;
|
|
3
3
|
}
|
|
4
4
|
.switch {
|
|
5
5
|
@apply relative inline-block w-[50px] h-[24px] cursor-pointer;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
-webkit-transition: .4s;
|
|
14
14
|
transition: .4s;
|
|
15
15
|
}
|
|
16
|
-
.
|
|
16
|
+
.defaultLabel {
|
|
17
17
|
@apply px-2 text-xs font-normal text-main-dark-blue;
|
|
18
18
|
}
|
|
19
19
|
.slider:before {
|
|
@@ -3,8 +3,11 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
import styles from './Icons.module.css'
|
|
4
4
|
import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, MAIN_DARK_BLUE } from '../constants'
|
|
5
5
|
|
|
6
|
-
const AddIcon = ({ color, size }) => {
|
|
7
|
-
|
|
6
|
+
const AddIcon = ({ color, size, disabled }) => {
|
|
7
|
+
let className = `${styles.svgClassName} ` + styles[`${color}`]
|
|
8
|
+
if (disabled) {
|
|
9
|
+
className += ` ${styles.iconDisabled}`
|
|
10
|
+
}
|
|
8
11
|
let icon = <></>
|
|
9
12
|
|
|
10
13
|
switch (size) {
|
|
@@ -68,12 +71,16 @@ AddIcon.propTypes = {
|
|
|
68
71
|
/**
|
|
69
72
|
* Size
|
|
70
73
|
*/
|
|
71
|
-
size: PropTypes.oneOf(SIZES)
|
|
74
|
+
size: PropTypes.oneOf(SIZES),
|
|
75
|
+
/**
|
|
76
|
+
* disabled
|
|
77
|
+
*/
|
|
78
|
+
disabled: PropTypes.bool
|
|
72
79
|
}
|
|
73
|
-
|
|
74
80
|
AddIcon.defaultProps = {
|
|
75
81
|
color: MAIN_DARK_BLUE,
|
|
76
|
-
size: MEDIUM
|
|
82
|
+
size: MEDIUM,
|
|
83
|
+
disabled: false
|
|
77
84
|
}
|
|
78
85
|
|
|
79
86
|
export default AddIcon
|
|
@@ -3,8 +3,11 @@ import PropTypes from 'prop-types'
|
|
|
3
3
|
import styles from './Icons.module.css'
|
|
4
4
|
import { COLORS_ICON, SIZES, SMALL, MEDIUM, LARGE, ERROR_RED } from '../constants'
|
|
5
5
|
|
|
6
|
-
const AlertIcon = ({ color, size }) => {
|
|
7
|
-
|
|
6
|
+
const AlertIcon = ({ color, size, disabled }) => {
|
|
7
|
+
let className = `${styles.svgClassName} ` + styles[`${color}`]
|
|
8
|
+
if (disabled) {
|
|
9
|
+
className += ` ${styles.iconDisabled}`
|
|
10
|
+
}
|
|
8
11
|
let icon = <></>
|
|
9
12
|
|
|
10
13
|
switch (size) {
|
|
@@ -71,12 +74,16 @@ AlertIcon.propTypes = {
|
|
|
71
74
|
/**
|
|
72
75
|
* Size
|
|
73
76
|
*/
|
|
74
|
-
size: PropTypes.oneOf(SIZES)
|
|
77
|
+
size: PropTypes.oneOf(SIZES),
|
|
78
|
+
/**
|
|
79
|
+
* disabled
|
|
80
|
+
*/
|
|
81
|
+
disabled: PropTypes.bool
|
|
75
82
|
}
|
|
76
|
-
|
|
77
83
|
AlertIcon.defaultProps = {
|
|
78
84
|
color: ERROR_RED,
|
|
79
|
-
size: MEDIUM
|
|
85
|
+
size: MEDIUM,
|
|
86
|
+
disabled: false
|
|
80
87
|
}
|
|
81
88
|
|
|
82
89
|
export default AlertIcon
|