Skip to content

Commit f02f005

Browse files
committed
fix: issue with drawer and sub-navigation
1 parent badc28f commit f02f005

File tree

5 files changed

+67
-17
lines changed

5 files changed

+67
-17
lines changed

packages/components/src/components/control-panel-mobile/control-panel-mobile.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@
5959

6060
.db-drawer {
6161
--db-drawer-content-padding-inline: 0;
62-
--db-drawer-max-width: variables.$db-container-xs;
62+
--db-drawer-max-width: #{variables.$db-container-xs};
6363
--db-drawer-max-height: 63vh;
64+
--db-drawer-min-width: #{variables.$db-container-xs};
65+
--db-drawer-min-height: 63vh;
6466

6567
> .db-drawer-container {
6668
> .db-drawer-content {

packages/components/src/components/shell/model.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ import {
55
ShellControlPanelMobilePositionType
66
} from '../../shared/model';
77

8-
export const ShellSubNavigationMobilePosition = ['top', 'bottom'] as const;
8+
export const ShellSubNavigationMobilePosition = [
9+
'top',
10+
'bottom',
11+
'none'
12+
] as const;
913
export type ShellSubNavigationMobilePositionType =
1014
(typeof ShellSubNavigationMobilePosition)[number];
1115

packages/components/src/components/shell/shell-mobile.scss

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@
1515
) {
1616
&[data-control-panel-mobile-position="top"] {
1717
&:not([data-sub-navigation-mobile-position]),
18+
&[data-sub-navigation-mobile-position="none"] {
19+
grid-template-areas:
20+
"control-panel"
21+
"main";
22+
grid-template-rows:
23+
[control-panel] auto
24+
[main] 1fr;
25+
26+
#{string.unquote(custom-elements.$shell-sub-navigation)} {
27+
display: none;
28+
}
29+
}
30+
1831
&[data-sub-navigation-mobile-position="top"] {
1932
grid-template-areas:
2033
"control-panel"
@@ -47,17 +60,34 @@
4760
}
4861

4962
&[data-control-panel-mobile-position="bottom"] {
50-
grid-template-areas:
51-
"sub-navigation"
52-
"main"
53-
"control-panel";
54-
grid-template-rows:
55-
[control-panel] auto
56-
[main] 1fr
57-
[control-panel] auto;
58-
59-
#{string.unquote(custom-elements.$shell-sub-navigation)} {
60-
@include helpers.divider("bottom");
63+
&:not([data-sub-navigation-mobile-position]),
64+
&[data-sub-navigation-mobile-position="bottom"],
65+
&[data-sub-navigation-mobile-position="none"] {
66+
grid-template-areas:
67+
"main"
68+
"control-panel";
69+
grid-template-rows:
70+
[main] 1fr
71+
[control-panel] auto;
72+
73+
#{string.unquote(custom-elements.$shell-sub-navigation)} {
74+
display: none;
75+
}
76+
}
77+
78+
&[data-sub-navigation-mobile-position="top"] {
79+
grid-template-areas:
80+
"sub-navigation"
81+
"main"
82+
"control-panel";
83+
grid-template-rows:
84+
[sub-navigation] auto
85+
[main] 1fr
86+
[control-panel] auto;
87+
88+
#{string.unquote(custom-elements.$shell-sub-navigation)} {
89+
@include helpers.divider("bottom");
90+
}
6191
}
6292
}
6393

@@ -73,7 +103,7 @@
73103
display: none !important;
74104
}
75105

76-
.db-navigation{
106+
.db-navigation {
77107
--db-overflow-scroll-button-inset-block: #{variables.$db-spacing-fixed-xs};
78108
--db-overflow-scroll-button-inset-inline-start: 0;
79109

packages/foundations/dev/icons.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,20 @@
330330
>
331331
</div>
332332

333+
<div data-spacing="small" class="db-card">
334+
<span
335+
aria-hidden="true"
336+
class="db-icon"
337+
data-icon="intermediary_stop"
338+
>intermediary_stop</span
339+
><span
340+
class="db-infotext"
341+
data-icon="none"
342+
data-semantic="informational"
343+
>intermediary_stop</span
344+
>
345+
</div>
346+
333347
<div data-spacing="small" class="db-card">
334348
<span
335349
aria-hidden="true"

showcases/shared/default-component-data.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export type DefaultSettings = {
3838
controlPanelDesktopPosition: 'top' | 'left';
3939
controlPanelMobilePosition: 'bottom' | 'top';
4040
subNavigationDesktopPosition: 'top' | 'left';
41-
subNavigationMobilePosition: 'top' | 'bottom';
41+
subNavigationMobilePosition: 'top' | 'bottom' | 'none';
4242
subNavigation: 'true' | 'false';
4343
subNavigationVariant: 'tree' | 'popover';
4444
navigationDesktopVariant: 'tree' | 'popover';
@@ -52,15 +52,15 @@ export const defaultSettingsMapping = {
5252
navigationMobileVariant: ['tree', 'popover'],
5353
subNavigation: ['true', 'false'],
5454
subNavigationDesktopPosition: ['top', 'left'],
55-
subNavigationMobilePosition: ['top', 'bottom'],
55+
subNavigationMobilePosition: ['top', 'bottom', 'none'],
5656
subNavigationVariant: ['tree', 'popover']
5757
};
5858

5959
export const defaultSettings: DefaultSettings = {
6060
navigationMobileVariant: 'popover',
6161
subNavigation: 'false',
6262
subNavigationDesktopPosition: 'top',
63-
subNavigationMobilePosition: 'top',
63+
subNavigationMobilePosition: 'none',
6464
subNavigationVariant: 'tree',
6565
controlPanelDesktopPosition: 'top',
6666
controlPanelMobilePosition: 'top',

0 commit comments

Comments
 (0)