@carbonorm/carbonreact 3.0.7 → 3.1.0
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/components/Popup/Popup.d.ts +2 -2
- package/dist/index.esm.css +2 -2
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/{index.cjs.css → index.umd.css} +3 -3
- package/dist/{index.cjs.css.map → index.umd.css.map} +1 -1
- package/dist/index.umd.js +4496 -0
- package/dist/{index.cjs.js.map → index.umd.js.map} +1 -1
- package/package.json +3 -2
- package/src/components/Popup/Popup.tsx +4 -6
- package/src/style.module.css +2 -2
- package/src/style.module.css.d.ts +3 -3
- package/src/style.module.scss +1 -1
- package/src/style.module.scss.d.ts +3 -3
- package/dist/index.cjs.js +0 -4499
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbonorm/carbonreact",
|
|
3
|
-
"version": "3.0
|
|
4
|
-
"
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"browser": "dist/index.umd.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
|
+
"main": "dist/index.esm.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
7
8
|
"type": "module",
|
|
8
9
|
"dependencies": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import classNames from "classnames";
|
|
2
2
|
import OutsideClickHandler from 'react-outside-click-handler';
|
|
3
3
|
import getStyles from "hoc/getStyles";
|
|
4
|
+
import {PropsWithChildren} from "react";
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
interface iPopupProperties {
|
|
7
8
|
open?: boolean;
|
|
8
9
|
handleClose: () => any;
|
|
9
|
-
children: any;
|
|
10
10
|
minWidth?: string;
|
|
11
11
|
maxWidth?: string;
|
|
12
12
|
|
|
@@ -18,23 +18,22 @@ export default function Popup({
|
|
|
18
18
|
handleClose,
|
|
19
19
|
children,
|
|
20
20
|
maxWidth,
|
|
21
|
-
}: iPopupProperties) {
|
|
21
|
+
}: PropsWithChildren<iPopupProperties>) {
|
|
22
22
|
|
|
23
23
|
if (false === open) {
|
|
24
24
|
|
|
25
|
+
// @link https://legacy.reactjs.org/docs/conditional-rendering.html#preventing-component-from-rendering
|
|
25
26
|
return null;
|
|
26
27
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
const dig = getStyles()
|
|
30
31
|
|
|
31
|
-
return
|
|
32
|
-
<div className={classNames(dig.modal, dig.fade, dig.show, dig.dBlock)}
|
|
32
|
+
return <div className={classNames(dig.modal, dig.fade, dig.show, dig.dBlock)}
|
|
33
33
|
style={{backgroundColor: "rgba(0,0,0,0.8)"}}
|
|
34
34
|
id="exampleModalCenter"
|
|
35
35
|
tabIndex={-1} aria-labelledby="exampleModalCenterTitle"
|
|
36
36
|
aria-modal="true" role="dialog">
|
|
37
|
-
|
|
38
37
|
<div
|
|
39
38
|
style={{maxWidth: maxWidth}}
|
|
40
39
|
className={classNames(
|
|
@@ -49,7 +48,6 @@ export default function Popup({
|
|
|
49
48
|
</div>
|
|
50
49
|
|
|
51
50
|
</div>
|
|
52
|
-
</>
|
|
53
51
|
|
|
54
52
|
}
|
|
55
53
|
|
package/src/style.module.css
CHANGED
|
@@ -168,11 +168,11 @@ a {
|
|
|
168
168
|
max-height: calc(100vh - 60px);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.
|
|
171
|
+
.secondaryHeader {
|
|
172
172
|
height: 60px;
|
|
173
173
|
list-style: none;
|
|
174
174
|
}
|
|
175
|
-
.
|
|
175
|
+
.secondaryHeader:hover {
|
|
176
176
|
background-color: var(--neutral7);
|
|
177
177
|
transition: all 1s ease;
|
|
178
178
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
'container': string;
|
|
3
|
-
'dig_secondary_header': string;
|
|
4
|
-
'dig-secondary-header': string;
|
|
5
|
-
'digSecondaryHeader': string;
|
|
6
3
|
'floating_chat_icon': string;
|
|
7
4
|
'floating-chat-icon': string;
|
|
8
5
|
'floatingChatIcon': string;
|
|
@@ -35,6 +32,9 @@ export type Styles = {
|
|
|
35
32
|
'problem_box': string;
|
|
36
33
|
'problem-box': string;
|
|
37
34
|
'problemBox': string;
|
|
35
|
+
'secondary_header': string;
|
|
36
|
+
'secondary-header': string;
|
|
37
|
+
'secondaryHeader': string;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export type ClassNames = keyof Styles;
|
package/src/style.module.scss
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
'container': string;
|
|
3
|
-
'dig_secondary_header': string;
|
|
4
|
-
'dig-secondary-header': string;
|
|
5
|
-
'digSecondaryHeader': string;
|
|
6
3
|
'floating_chat_icon': string;
|
|
7
4
|
'floating-chat-icon': string;
|
|
8
5
|
'floatingChatIcon': string;
|
|
@@ -35,6 +32,9 @@ export type Styles = {
|
|
|
35
32
|
'problem_box': string;
|
|
36
33
|
'problem-box': string;
|
|
37
34
|
'problemBox': string;
|
|
35
|
+
'secondary_header': string;
|
|
36
|
+
'secondary-header': string;
|
|
37
|
+
'secondaryHeader': string;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export type ClassNames = keyof Styles;
|