Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/arc 1417 #689

Merged
merged 5 commits into from Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,149 changes: 1,064 additions & 85 deletions package-lock.json

Large diffs are not rendered by default.

Expand Up @@ -27,7 +27,7 @@ const dropdownCls = (...classNames: string[]) => {

const linkClasses = linkCls(
'u-color-black',
'u-color-white:md',
'u-color-white:xxl',
'u-whitespace-nowrap',
styles['c-navigation__link--dropdown']
);
Expand Down Expand Up @@ -152,7 +152,7 @@ const getVisitorSpacesDropdown = (
),
ROUTES.bezoek,
{
className: dropdownCls('u-display-none', 'u-display-block:md'),
className: dropdownCls('u-display-none', 'u-display-block:xxl'),
}
),
id: 'all-visitor-spaces',
Expand All @@ -176,7 +176,7 @@ const getVisitorSpacesDropdown = (
'u-font-size-24',
'u-text-left',
'u-visibility-hidden',
'u-visibility-visible:md',
'u-visibility-visible:xxl',
styles['c-navigation__dropdown-icon--end']
)}
name={IconNamesLight.AngleRight}
Expand Down
48 changes: 24 additions & 24 deletions src/modules/navigation/components/Navigation/Navigation.module.scss
Expand Up @@ -58,7 +58,7 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
background-color: $black;
color: $white;

@include respond-at(md) {
@include respond-at(xxl) {
min-height: $c-navigation-height;
padding: 0 3.2rem;
}
Expand All @@ -74,7 +74,7 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
background-color: $shade;
opacity: 0.64;

@include respond-at(md) {
@include respond-at(xxl) {
left: 3.2rem;
right: 3.2rem;
}
Expand Down Expand Up @@ -107,12 +107,12 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
padding: 1.2rem 0 0.65rem;
}

@include respond-at(md) {
@include respond-at(xxl) {
z-index: get-z-layer("nav-dropdown"); // above overlay
}

&--open {
@include respond-to(md) {
@include respond-to(xxl) {
z-index: get-z-layer("nav-dropdown"); // under overlay
}
}
Expand All @@ -123,12 +123,12 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
display: flex;
}

@include respond-at(md) {
@include respond-at(xxl) {
z-index: get-z-layer("nav-hamburger"); // above all
}

&--open {
@include respond-to(md) {
@include respond-to(xxl) {
z-index: get-z-layer("nav-dropdown"); // under overlay
}
}
Expand Down Expand Up @@ -189,14 +189,14 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
height: $c-navigation-divider-size;
background-color: $silver;

@include respond-at(md) {
@include respond-at(xxl) {
left: 0;
right: 0;
}
}

&\:md {
@include respond-to(md) {
@include respond-to(xxl) {
margin-bottom: 0;

&::before {
Expand All @@ -211,7 +211,7 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
position: absolute;
padding-top: $c-navigation-height-md;

@include respond-at(md) {
@include respond-at(xxl) {
padding-top: $c-navigation-height;
}
}
Expand Down Expand Up @@ -246,15 +246,15 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
color: $black;

// Overwrite popper element styles
@include respond-to(md) {
@include respond-to(xxl) {
inset: $c-navigation-height-md 0 0 0 !important;
top: $c-navigation-height-md !important;
right: 0 !important;
bottom: 0 !important;
left: 0 !important;
transform: translate(0) !important;
}
@include respond-at(md) {
@include respond-at(xxl) {
min-width: 26.6rem !important;
}
}
Expand All @@ -266,17 +266,17 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
text-decoration: none;
border-bottom: $c-navigation-border-height solid transparent;

@include respond-to(md) {
@include respond-to(xxl) {
border-bottom: none;
font-size: $font-size-sm;
}
@include respond-at(md) {
@include respond-at(xxl) {
display: inline-block;
padding: 1.2rem 0 0.95rem;
}

&--dropdown:hover {
@include respond-to(md) {
@include respond-to(xxl) {
background-color: $silver;
}
}
Expand Down Expand Up @@ -319,7 +319,7 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
align-items: center;
transition: border-color $animate-md-out, color $animate-md-out;

@include respond-at(md) {
@include respond-at(xxl) {
margin-bottom: $c-navigation-divider-size;
position: relative;
height: $c-navigation-height - $c-navigation-divider-size;
Expand All @@ -345,14 +345,14 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
&--divider {
margin-left: $c-navigation-item-spacing;

@include respond-at(lg) {
@include respond-at(xxl) {
margin-right: 0;
}

&:not(:last-child) {
margin-right: 0;

@include respond-at(lg) {
@include respond-at(xxl) {
margin-right: 0;
}
}
Expand All @@ -373,7 +373,7 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
z-index: get-z-layer("nav-dropdown");
font-weight: 800;

@include respond-to("md") {
@include respond-to(xxl) {
> :global(.c-dropdown-menu__item) {
font-weight: 700;
}
Expand Down Expand Up @@ -453,12 +453,12 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
content: none;
}

@include respond-to(md) {
@include respond-to(xxl) {
min-height: $c-navigation-height-contextual-md;
}

.c-navigation__title {
@include respond-to(md) {
@include respond-to(xxl) {
font-size: $font-size-base;
}
}
Expand All @@ -470,25 +470,25 @@ $c-navigation-dropdown-item-spacer: 1.2rem;
}

.c-navigation--responsive {
@include respond-to(md) {
@include respond-to(xxl) {
grid-template-columns: auto;
}

.c-navigation__section {
:global(.c-badge) {
@include respond-to(md) {
@include respond-to(xxl) {
margin-left: $spacer-xs;
}
}

&--responsive-desktop {
@include respond-to(md) {
@include respond-to(xxl) {
display: none;
}
}

&--responsive-mobile {
@include respond-to(md) {
@include respond-to(xxl) {
display: flex;
justify-self: center;
}
Expand Down
Expand Up @@ -2,7 +2,7 @@ import { Button } from '@meemoo/react-components';
import clsx from 'clsx';
import { FC, Fragment, useState } from 'react';

import { Icon, IconProps, Overlay } from '@shared/components';
import { Icon, IconNamesLight, IconProps, Overlay } from '@shared/components';

import styles from '../Navigation.module.scss';
import { NavigationDropdown } from '../NavigationDropdown';
Expand Down Expand Up @@ -61,12 +61,8 @@ const NavigationSection: FC<NavigationSectionProps> = ({
)}
name={
isHamburgerMenuOpen
? hamburgerProps?.openIcon
? hamburgerProps?.openIcon
: ('times' as IconProps['name'])
: hamburgerProps?.closedIcon
? hamburgerProps?.closedIcon
: ('menu' as IconProps['name'])
? hamburgerProps?.openIcon || IconNamesLight.Times
: hamburgerProps?.closedIcon || IconNamesLight.Menu
}
/>
}
Expand Down
Expand Up @@ -64,7 +64,7 @@ export const MOCK_ITEMS_LEFT: NavigationItem[] = [
badge: <Badge text="2" />,
className: linkCls(
'u-color-black',
'u-color-white:md',
'u-color-white:xxl',
'u-whitespace-nowrap',
styles['c-navigation__link--dropdown']
),
Expand All @@ -75,7 +75,7 @@ export const MOCK_ITEMS_LEFT: NavigationItem[] = [
children: [
{
node: renderLink('Alle bezoekersruimtes', '/', {
className: dropdownCls('u-display-none', 'u-display-block:md'),
className: dropdownCls('u-display-none', 'u-display-block:xxl'),
}),
id: 'alle bezoekersruimtes',
isDivider: 'md',
Expand All @@ -89,7 +89,7 @@ export const MOCK_ITEMS_LEFT: NavigationItem[] = [
'u-font-size-24',
'u-text-left',
'u-visibility-hidden',
'u-visibility-visible:md',
'u-visibility-visible:xxl',
styles['c-navigation__dropdown-icon--end']
)}
name={IconNamesLight.AngleRight}
Expand All @@ -108,7 +108,7 @@ export const MOCK_ITEMS_LEFT: NavigationItem[] = [
'u-font-size-24',
'u-text-left',
'u-visibility-hidden',
'u-visibility-visible:md',
'u-visibility-visible:xxl',
styles['c-navigation__dropdown-icon--end']
)}
name={IconNamesLight.AngleRight}
Expand All @@ -125,7 +125,7 @@ export const MOCK_ITEMS_LEFT: NavigationItem[] = [
node: renderLink('Over de bezoekersruimtes', '#', {
className: linkCls(
'u-color-black',
'u-color-white:md',
'u-color-white:xxl',
styles['c-navigation__link--dropdown']
),
}),
Expand All @@ -136,7 +136,7 @@ export const MOCK_ITEMS_LEFT: NavigationItem[] = [
node: renderLink('Vaak gestelde vragen', '#', {
className: linkCls(
'u-color-black',
'u-color-white:md',
'u-color-white:xxl',
styles['c-navigation__link--dropdown']
),
}),
Expand All @@ -147,7 +147,7 @@ export const MOCK_ITEMS_LEFT: NavigationItem[] = [
node: renderLink('Beheer', '', {
className: linkCls(
'u-color-black',
'u-color-white:md',
'u-color-white:xxl',
styles['c-navigation__link--dropdown']
),
}),
Expand Down
Expand Up @@ -23,7 +23,7 @@ $component: "c-list-navigation";
&:hover {
cursor: pointer;

@include respond-at("md") {
@include respond-at(xxl) {
background-color: $silver;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/modules/shared/layouts/AppLayout/AppLayout.tsx
Expand Up @@ -73,7 +73,7 @@ const AppLayout: FC = ({ children }) => {
const showNotificationsCenter = useSelector(selectShowNotificationsCenter);
const hasUnreadNotifications = useSelector(selectHasUnreadNotifications);
const windowSize = useWindowSize();
const isMobile = !!(windowSize.width && windowSize.width < Breakpoints.md);
const isMobile = !!(windowSize.width && windowSize.width < Breakpoints.xxl);
const showBorder = useSelector(selectShowNavigationBorder);
const { data: accessibleVisitorSpaces } = useGetAccessibleVisitorSpaces();
const history = useSelector(selectHistory);
Expand Down Expand Up @@ -233,13 +233,13 @@ const AppLayout: FC = ({ children }) => {

return [...staticItems, ...dynamicItems];
}, [
accessibleVisitorSpaces,
asPath,
isMobile,
linkedSpaceSlug,
accessibleVisitorSpaces,
navigationItems,
showLinkedSpaceAsHomepage,
user?.permissions,
showLinkedSpaceAsHomepage,
linkedSpaceOrId,
isMobile,
isLoggedIn,
]);

Expand Down
1 change: 1 addition & 0 deletions src/modules/shared/types/index.ts
Expand Up @@ -55,6 +55,7 @@ export enum Breakpoints {
md = 768,
lg = 992,
xl = 1200,
xxl = 1400,
}

export type AnimationTypes =
Expand Down
1 change: 1 addition & 0 deletions src/styles/abstracts/_variables.scss
Expand Up @@ -106,6 +106,7 @@ $breakpoints: (
"md": 768px,
"lg": 992px,
"xl": 1200px,
"xxl": 1400px,
);

/**
Expand Down
4 changes: 2 additions & 2 deletions src/styles/components/_navigation.scss
Expand Up @@ -15,14 +15,14 @@
&--list {
margin: 1rem 6rem 1rem 0;

@include respond-to(md) {
@include respond-to(xxl) {
margin: 3.5rem 0 3.5rem $spacer-md;
}
}
}

&__auth {
@include respond-to(md) {
@include respond-to(xxl) {
padding: 0;
margin: 0;

Expand Down
2 changes: 1 addition & 1 deletion src/styles/utilities/_colors.scss
Expand Up @@ -10,4 +10,4 @@ $color: (
"neutral": $neutral,
"teal": $teal,
);
@include generate-utils("color", "color", $color, ("md"));
@include generate-utils("color", "color", $color, ("md", "lg", "xxl"));
4 changes: 2 additions & 2 deletions src/styles/utilities/_visibility.scss
Expand Up @@ -8,7 +8,7 @@ $visibility: (
"hidden": hidden,
"visible": visible,
);
@include generate-utils("visibility", "visibility", $visibility, ("md"));
@include generate-utils("visibility", "visibility", $visibility, ("md", "xxl"));

/**
* Display
Expand All @@ -19,4 +19,4 @@ $display: (
"block": block,
"inline-block": inline-block,
);
@include generate-utils("display", "display", $display, ("md", "lg"));
@include generate-utils("display", "display", $display, ("md", "lg", "xxl"));