@hyphen/hyphen-components 4.2.0 → 4.3.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/css/index.css +1 -0
- package/dist/hyphen-components.cjs.development.js +119 -118
- package/dist/hyphen-components.cjs.development.js.map +1 -1
- package/dist/hyphen-components.cjs.production.min.js +1 -1
- package/dist/hyphen-components.cjs.production.min.js.map +1 -1
- package/dist/hyphen-components.esm.js +119 -118
- package/dist/hyphen-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Sidebar/Sidebar.module.scss +9 -0
- package/src/components/Sidebar/Sidebar.tsx +10 -12
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@ import { useIsMobile } from '../../hooks/useIsMobile/useIsMobile';
|
|
|
13
13
|
import { Box } from '../Box/Box';
|
|
14
14
|
import { IconName } from 'src/types';
|
|
15
15
|
import { Icon } from '../Icon/Icon';
|
|
16
|
+
import styles from './Sidebar.module.scss';
|
|
16
17
|
|
|
17
18
|
const SIDEBAR_COOKIE_NAME = 'sidebar:state';
|
|
18
19
|
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -104,10 +105,7 @@ const SidebarProvider = forwardRef<
|
|
|
104
105
|
// Keydown event handler for toggling sidebar
|
|
105
106
|
useEffect(() => {
|
|
106
107
|
const handleKeyDown = (event: KeyboardEvent) => {
|
|
107
|
-
if (
|
|
108
|
-
event.key === SIDEBAR_KEYBOARD_SHORTCUT &&
|
|
109
|
-
(event.metaKey || event.ctrlKey)
|
|
110
|
-
) {
|
|
108
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT) {
|
|
111
109
|
event.preventDefault();
|
|
112
110
|
toggleSidebar();
|
|
113
111
|
}
|
|
@@ -548,9 +546,10 @@ const SidebarRail = React.forwardRef<
|
|
|
548
546
|
aria-label="Toggle Sidebar"
|
|
549
547
|
tabIndex={-1}
|
|
550
548
|
onClick={toggleSidebar}
|
|
551
|
-
title="Toggle Sidebar"
|
|
549
|
+
title="Toggle Sidebar ["
|
|
552
550
|
className={classNames(
|
|
553
|
-
|
|
551
|
+
styles.rail,
|
|
552
|
+
'hover-show-child background-color-transparent display-flex p-top-5xl p-left-xl p-right-0 justify-content-center position-absolute',
|
|
554
553
|
{
|
|
555
554
|
'cursor-w-resize': open,
|
|
556
555
|
'cursor-e-resize': !open,
|
|
@@ -558,11 +557,10 @@ const SidebarRail = React.forwardRef<
|
|
|
558
557
|
className
|
|
559
558
|
)}
|
|
560
559
|
style={{
|
|
561
|
-
top: '
|
|
562
|
-
bottom: '
|
|
563
|
-
right: '-
|
|
564
|
-
width: '
|
|
565
|
-
zIndex: '-1',
|
|
560
|
+
top: '20px',
|
|
561
|
+
bottom: '20px',
|
|
562
|
+
right: '-14px',
|
|
563
|
+
width: '10px',
|
|
566
564
|
}}
|
|
567
565
|
{...props}
|
|
568
566
|
>
|
|
@@ -572,7 +570,7 @@ const SidebarRail = React.forwardRef<
|
|
|
572
570
|
color="secondary"
|
|
573
571
|
borderWidth="sm"
|
|
574
572
|
padding="xs"
|
|
575
|
-
margin="0
|
|
573
|
+
margin="0"
|
|
576
574
|
shadow="xs"
|
|
577
575
|
className={classNames(
|
|
578
576
|
'hover-child',
|