@infonomic/uikit 2.5.0 → 2.7.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/avatar/avatar_module.css +2 -2
- package/dist/components/overlay/overlay.d.ts.map +1 -1
- package/dist/components/overlay/overlay.js +16 -12
- package/package.json +1 -1
- package/src/components/avatar/avatar.module.css +2 -2
- package/src/components/avatar/avatar.stories.tsx +11 -1
- package/src/components/overlay/overlay.tsx +21 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/components/overlay/overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,KAAK,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA;AAC/D,MAAM,WAAW,YAAa,SAAQ,qBAAqB;IACzD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/components/overlay/overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,KAAK,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA;AAC/D,MAAM,WAAW,YAAa,SAAQ,qBAAqB;IACzD,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAsCD,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiB9D"}
|
|
@@ -5,24 +5,28 @@ import classnames from "classnames";
|
|
|
5
5
|
import overlay_module from "./overlay.module.js";
|
|
6
6
|
const BodyLock = ()=>{
|
|
7
7
|
useEffect(()=>{
|
|
8
|
-
const mediaMatch = window.matchMedia('(min-width:
|
|
8
|
+
const mediaMatch = window.matchMedia('(min-width: 768px)');
|
|
9
9
|
let appBar;
|
|
10
|
+
const classList = document.body.classList;
|
|
11
|
+
appBar = document.getElementById('app-bar');
|
|
12
|
+
classList.add('overlay-shown');
|
|
13
|
+
if (null != appBar) appBar.classList.add('app-bar-overlay-shown');
|
|
10
14
|
if (mediaMatch.matches) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
appBar = document.getElementById('app-bar');
|
|
14
|
-
if (null != appBar) appBar.style.cssText = 'padding-right: 9px';
|
|
15
|
+
classList.add('overlay-shown--desktop');
|
|
16
|
+
if (null != appBar) appBar.classList.add('app-bar-overlay-shown--desktop');
|
|
15
17
|
} else {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
classList.add('overlay-shown--mobile');
|
|
19
|
+
if (null != appBar) appBar.classList.add('app-bar-overlay-shown--mobile');
|
|
18
20
|
}
|
|
19
21
|
return ()=>{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
overflow: overlay;
|
|
23
|
-
`;
|
|
22
|
+
classList.remove('overlay-shown');
|
|
23
|
+
if (null != appBar) appBar.classList.remove('app-bar-overlay-shown');
|
|
24
24
|
if (mediaMatch.matches) {
|
|
25
|
-
|
|
25
|
+
classList.remove('overlay-shown--desktop');
|
|
26
|
+
if (null != appBar) appBar.classList.remove('app-bar-overlay-shown app-bar-overlay-shown--desktop');
|
|
27
|
+
} else {
|
|
28
|
+
classList.remove('overlay-shown--mobile');
|
|
29
|
+
if (null != appBar) appBar.classList.remove('app-bar-overlay-shown--mobile');
|
|
26
30
|
}
|
|
27
31
|
};
|
|
28
32
|
}, []);
|
package/package.json
CHANGED
|
@@ -20,9 +20,19 @@ export const Avatar = (): React.JSX.Element => (
|
|
|
20
20
|
maxWidth: '300px',
|
|
21
21
|
marginBottom: '24px',
|
|
22
22
|
display: 'flex',
|
|
23
|
+
gap: '24px',
|
|
24
|
+
alignItems: 'center',
|
|
23
25
|
justifyContent: 'center',
|
|
24
26
|
}}
|
|
25
27
|
>
|
|
26
|
-
<
|
|
28
|
+
<div style={{ height: '28px', width: '28px' }}>
|
|
29
|
+
<AvatarComponent initials="AB" />
|
|
30
|
+
</div>
|
|
31
|
+
<div style={{ height: '34px', width: '34px' }}>
|
|
32
|
+
<AvatarComponent initials="AB" />
|
|
33
|
+
</div>
|
|
34
|
+
<div style={{ height: '40px', width: '40px' }}>
|
|
35
|
+
<AvatarComponent initials="AB" />
|
|
36
|
+
</div>
|
|
27
37
|
</div>
|
|
28
38
|
)
|
|
@@ -16,24 +16,32 @@ export interface OverlayProps extends OverlayIntrinsicProps {
|
|
|
16
16
|
const BodyLock = (): null => {
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
// a one off mediaMedia here is fine - no need to listen to events
|
|
19
|
-
const mediaMatch = window.matchMedia('(min-width:
|
|
19
|
+
const mediaMatch = window.matchMedia('(min-width: 768px)')
|
|
20
20
|
let appBar: HTMLElement | null
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const classList = document.body.classList
|
|
22
|
+
appBar = document.getElementById('app-bar')
|
|
23
|
+
classList.add('overlay-shown')
|
|
24
|
+
if(appBar != null) appBar.classList.add('app-bar-overlay-shown')
|
|
25
|
+
if (mediaMatch.matches) {
|
|
26
|
+
classList.add('overlay-shown--desktop')
|
|
27
|
+
if (appBar != null) {
|
|
28
|
+
appBar.classList.add('app-bar-overlay-shown--desktop')
|
|
29
|
+
}
|
|
26
30
|
} else {
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
classList.add('overlay-shown--mobile')
|
|
32
|
+
if (appBar != null) {
|
|
33
|
+
appBar.classList.add('app-bar-overlay-shown--mobile')
|
|
34
|
+
}
|
|
29
35
|
}
|
|
30
36
|
return () => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
overflow: overlay;
|
|
34
|
-
`
|
|
37
|
+
classList.remove('overlay-shown')
|
|
38
|
+
if(appBar != null) appBar.classList.remove('app-bar-overlay-shown')
|
|
35
39
|
if (mediaMatch.matches) {
|
|
36
|
-
|
|
40
|
+
classList.remove('overlay-shown--desktop')
|
|
41
|
+
if (appBar != null) appBar.classList.remove('app-bar-overlay-shown app-bar-overlay-shown--desktop')
|
|
42
|
+
} else {
|
|
43
|
+
classList.remove('overlay-shown--mobile')
|
|
44
|
+
if (appBar != null) appBar.classList.remove('app-bar-overlay-shown--mobile')
|
|
37
45
|
}
|
|
38
46
|
}
|
|
39
47
|
}, [])
|