@platformatic/ui-components 0.1.148 → 0.1.149
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/package.json
CHANGED
package/src/components/Modal.jsx
CHANGED
|
@@ -22,7 +22,9 @@ import {
|
|
|
22
22
|
BASIC,
|
|
23
23
|
MODAL_FULL_DARK,
|
|
24
24
|
MODAL_FULL_LIGHT,
|
|
25
|
-
|
|
25
|
+
MODAL_FULL_RICH_BLACK,
|
|
26
|
+
WHITE,
|
|
27
|
+
RICH_BLACK
|
|
26
28
|
} from './constants'
|
|
27
29
|
import PlatformaticIcon from './PlatformaticIcon'
|
|
28
30
|
|
|
@@ -62,6 +64,13 @@ function Modal ({
|
|
|
62
64
|
case MODAL_FULL_LIGHT:
|
|
63
65
|
modalCoverClassName += commonStyles['background-color-light-blue']
|
|
64
66
|
break
|
|
67
|
+
case MODAL_FULL_RICH_BLACK:
|
|
68
|
+
contentFullscreen = styles[`content--${layout}`]
|
|
69
|
+
modalCoverClassName += commonStyles[`background-color-${RICH_BLACK}`]
|
|
70
|
+
modalCoverClassName += ` ${backgroundClassName}`
|
|
71
|
+
buttonFullRoundedClassName = `${styles['close--cover']} `
|
|
72
|
+
buttonFullRoundedClassName += commonStyles[`background-color-${RICH_BLACK}`]
|
|
73
|
+
break
|
|
65
74
|
|
|
66
75
|
default:
|
|
67
76
|
break
|
|
@@ -129,7 +138,7 @@ function Modal ({
|
|
|
129
138
|
<div className={modalCoverClassName}>
|
|
130
139
|
<div className={headerClassName}>
|
|
131
140
|
<ButtonFullRounded
|
|
132
|
-
|
|
141
|
+
buttonClassName={buttonFullRoundedClassName}
|
|
133
142
|
iconName='CircleCloseIcon'
|
|
134
143
|
iconSize={LARGE}
|
|
135
144
|
iconColor={MAIN_DARK_BLUE}
|
|
@@ -172,6 +181,31 @@ function Modal ({
|
|
|
172
181
|
)
|
|
173
182
|
break
|
|
174
183
|
|
|
184
|
+
case MODAL_FULL_RICH_BLACK:
|
|
185
|
+
whichModal = (
|
|
186
|
+
<div className={modalCoverClassName}>
|
|
187
|
+
<div className={headerClassName}>
|
|
188
|
+
<ButtonFullRounded
|
|
189
|
+
buttonClassName={buttonFullRoundedClassName}
|
|
190
|
+
iconName='CircleCloseIcon'
|
|
191
|
+
iconSize={LARGE}
|
|
192
|
+
iconColor={WHITE}
|
|
193
|
+
hoverEffect={BACKGROUND_COLOR_OPAQUE}
|
|
194
|
+
onClick={() => { setIsOpen(false) }}
|
|
195
|
+
bordered={false}
|
|
196
|
+
alt='Close'
|
|
197
|
+
/>
|
|
198
|
+
</div>
|
|
199
|
+
<div className={contentFullscreen}>
|
|
200
|
+
<div className={titleFullscreen}>
|
|
201
|
+
<Logo width={70} heigth={56} color={WHITE} />
|
|
202
|
+
</div>
|
|
203
|
+
<div>{children}</div>
|
|
204
|
+
</div>
|
|
205
|
+
</div>
|
|
206
|
+
)
|
|
207
|
+
break
|
|
208
|
+
|
|
175
209
|
default:
|
|
176
210
|
break
|
|
177
211
|
}
|
|
@@ -32,12 +32,13 @@
|
|
|
32
32
|
@apply bg-light-blue;
|
|
33
33
|
}
|
|
34
34
|
.fullscreen {
|
|
35
|
-
@apply fixed top-0 left-0 h-screen w-full min-h-screen min-w-full
|
|
35
|
+
@apply fixed top-0 left-0 h-screen w-full min-h-screen min-w-full overflow-y-auto;
|
|
36
36
|
}
|
|
37
37
|
.header--popup-v2,
|
|
38
38
|
.header--popup {
|
|
39
39
|
@apply flex justify-between items-center;
|
|
40
40
|
}
|
|
41
|
+
.header--full-rich-black,
|
|
41
42
|
.header--full-dark,
|
|
42
43
|
.header--full-light,
|
|
43
44
|
.header--cover {
|
|
@@ -49,10 +50,11 @@
|
|
|
49
50
|
.title {
|
|
50
51
|
@apply font-bold text-[20px];
|
|
51
52
|
}
|
|
53
|
+
.content--full-rich-black,
|
|
52
54
|
.content--full-dark,
|
|
53
55
|
.header--full-light,
|
|
54
56
|
.content--cover {
|
|
55
|
-
@apply h-auto w-
|
|
57
|
+
@apply h-auto w-auto p-4 md:pt-4 md:pb-10 md:px-40;
|
|
56
58
|
}
|
|
57
59
|
.title--cover {
|
|
58
60
|
@apply inline-flex items-center;
|
|
@@ -14,11 +14,13 @@ function ModalDirectional ({
|
|
|
14
14
|
title,
|
|
15
15
|
titleClassName,
|
|
16
16
|
children,
|
|
17
|
-
smallLayout
|
|
17
|
+
smallLayout,
|
|
18
|
+
classNameModalLefty
|
|
18
19
|
}) {
|
|
19
20
|
const className = `${styles.container} ${styles.modalLeftCover} ${smallLayout ? styles.smallLayout : styles.normalLayout}`
|
|
20
21
|
const [modalClassName] = useState(className)
|
|
21
22
|
const [variantModalClassName, setVariantModalClassName] = useState(`${styles.container} ${styles.modalLeftCover}`)
|
|
23
|
+
const classNameLefty = classNameModalLefty || styles.modalLefty
|
|
22
24
|
|
|
23
25
|
useEffect(() => {
|
|
24
26
|
setVariantModalClassName(`${modalClassName} ${styles.modalLeftCoverEntering}`)
|
|
@@ -37,7 +39,7 @@ function ModalDirectional ({
|
|
|
37
39
|
<>
|
|
38
40
|
<div className={styles.blur} onClick={() => closeModal()} />
|
|
39
41
|
<div className={variantModalClassName}>
|
|
40
|
-
<div className={
|
|
42
|
+
<div className={classNameLefty}>
|
|
41
43
|
<div className={styles.headerClassName}>
|
|
42
44
|
<PlatformaticIcon iconName='ArrowLongLeftIcon' color={WHITE} size={SMALL} onClick={() => closeModal()} />
|
|
43
45
|
<span className={titleClassName}>{title}</span>
|
|
@@ -69,7 +71,11 @@ ModalDirectional.propTypes = {
|
|
|
69
71
|
/**
|
|
70
72
|
* smallLayout
|
|
71
73
|
*/
|
|
72
|
-
smallLayout: PropTypes.bool
|
|
74
|
+
smallLayout: PropTypes.bool,
|
|
75
|
+
/**
|
|
76
|
+
* classNameLefty
|
|
77
|
+
*/
|
|
78
|
+
classNameLefty: PropTypes.string
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
ModalDirectional.defaultProps = {
|
|
@@ -77,7 +83,8 @@ ModalDirectional.defaultProps = {
|
|
|
77
83
|
setIsOpen: () => {},
|
|
78
84
|
title: '',
|
|
79
85
|
titleClassName: '',
|
|
80
|
-
smallLayout: false
|
|
86
|
+
smallLayout: false,
|
|
87
|
+
classNameLefty: ''
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
export default ModalDirectional
|
|
@@ -36,7 +36,9 @@ export const MODAL_POPUP_V2 = 'popup-v2'
|
|
|
36
36
|
export const MODAL_COVER = 'cover'
|
|
37
37
|
export const MODAL_FULL_DARK = 'full-dark'
|
|
38
38
|
export const MODAL_FULL_LIGHT = 'full-light'
|
|
39
|
-
export const
|
|
39
|
+
export const MODAL_FULL_RICH_BLACK = 'full-rich-black'
|
|
40
|
+
|
|
41
|
+
export const MODAL_LAYOUTS = [MODAL_POPUP_V2, MODAL_POPUP, MODAL_COVER, MODAL_FULL_DARK, MODAL_FULL_LIGHT, MODAL_FULL_RICH_BLACK]
|
|
40
42
|
|
|
41
43
|
export const FREE = 'free'
|
|
42
44
|
export const BASIC = 'basic'
|