Skip to content

Commit 4d55656

Browse files
committed
chore: make upgrade-html-deps
1 parent 5df316f commit 4d55656

File tree

10 files changed

+117
-65
lines changed

10 files changed

+117
-65
lines changed
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
{
2-
<<<<<<< HEAD
32
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
43
"shiny_version": "1.8.1.9001 (rstudio/shiny@0b7fda707e4846d2de06f63db312ac35dacf503a)",
5-
"bslib_version": "0.7.0.9000 (rstudio/bslib@c5244cfae75c434e5fae6091820c13b62de53fd7)",
4+
"bslib_version": "0.7.0.9000 (rstudio/bslib@cfe1ecfbf7f1e5d832ec195c6d3851f91f893bac)",
65
"htmltools_version": "0.5.8.9000 (rstudio/htmltools@487aa0bed7313d7597b6edd5810e53cab0061198)",
7-
=======
8-
"note!": "This file is auto-generated by scripts/htmlDependencies.R",
9-
"shiny_version": "Github (rstudio/shiny@e689cdc522c65da37342d9348266f50c8d4b3949)",
10-
"bslib_version": "Github (rstudio/bslib@55b90f8d335388f24bf9db2cf63236d4b67e693c)",
11-
"htmltools_version": "Github (rstudio/htmltools@487aa0bed7313d7597b6edd5810e53cab0061198)",
12-
>>>>>>> c4960b7d (deps: update blisb)
136
"bootstrap_version": "5.3.1"
147
}

shiny/www/shared/bootstrap/bootstrap.min.css

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
33
"package": "bslib",
4-
<<<<<<< HEAD
5-
"version": "0.7.0.9000 (rstudio/bslib@c5244cfae75c434e5fae6091820c13b62de53fd7)"
6-
=======
7-
"version": "Github (rstudio/bslib@55b90f8d335388f24bf9db2cf63236d4b67e693c)"
8-
>>>>>>> c4960b7d (deps: update blisb)
4+
"version": "0.7.0.9000 (rstudio/bslib@cfe1ecfbf7f1e5d832ec195c6d3851f91f893bac)"
95
}

shiny/www/shared/bslib/components/components.css

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/shared/sass/bslib/builtin/bs5/shiny/_rules.scss

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,22 +148,32 @@ $bslib-checkbox-radio-margin-right: 0.35em !default;
148148
// color of the card header, giving us the white card headers we want, without also
149149
// blocking inheritence via `.text-bg-{theme}` classes or others.
150150
--#{$prefix}card-cap-bg: ;
151-
.card-header, .card-footer {
151+
152+
.card-header,
153+
.card-footer {
152154
font-size: 0.9rem;
153155
}
156+
154157
.card-header {
155158
font-weight: var(--bslib-dashboard-card-header-font-weight);
156159
line-height: 1.375rem;
157160
}
158161
}
159162

160-
// Set the background color of page dashboard class...
161-
.bslib-page-dashboard,
162-
// or of global main content area in a page_navbar() with a global sidebar
163-
.main:has(.tab-content > .bslib-page-dashboard.active) {
163+
// Set the background color of page dashboard class with a sidebar layout...
164+
.bslib-sidebar-layout {
165+
&:has(> .bslib-page-dashboard),
166+
// or of global main content area in a page_navbar() with a global sidebar
167+
&:has(.tab-content > .bslib-page-dashboard.active) {
168+
// or of main area of a page_sidebar()
169+
--_main-bg: var(--bslib-dashboard-main-bg);
170+
;
171+
}
172+
}
173+
174+
// ... or `page_navbar(nav_panel(class = "bslib-page-dashboard"), sidebar = NULL)`
175+
.bslib-page-navbar .tab-content > .bslib-page-dashboard.active {
164176
background-color: var(--bslib-dashboard-main-bg);
165-
// or of main area of a page_sidebar()
166-
--_main-bg: var(--bslib-dashboard-main-bg);
167177
}
168178

169179
.bslib-page-navbar, .bslib-page-dashboard {
@@ -288,6 +298,7 @@ $icon-classes: ("bi", "fa", "fas", "far", "fab", "material-icons") !default;
288298
#shiny-modal-wrapper:has( ~ .modal-backdrop) .modal {
289299
// Blur the background when the modal has a backdrop
290300
backdrop-filter: blur(2px);
301+
-webkit-backdrop-filter: blur(2px);
291302
}
292303

293304
// Progress Bars & Notifications

shiny/www/shared/sass/bslib/components/scss/page_fillable.scss

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,6 @@
3030
> .main > .html-fill-item {
3131
flex: 0 0 auto;
3232
}
33-
34-
&:not(.sidebar-right) {
35-
> .main {
36-
padding-left: var(--_padding-icon);
37-
padding-top: var(--_padding);
38-
}
39-
> .collapse-toggle {
40-
left: calc(var(--_icon-size) / 2);
41-
}
42-
}
43-
&.sidebar-right {
44-
> .main {
45-
padding-right: var(--_padding-icon);
46-
}
47-
> .collapse-toggle {
48-
right: calc(var(--_icon-size) / 2);
49-
}
50-
}
5133
}
5234
}
5335
}

shiny/www/shared/sass/bslib/components/scss/page_sidebar.scss

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,40 @@ $bslib-sidebar-padding: $spacer * 1.5 !default;
2121
margin-bottom: 0;
2222
line-height: var(--#{$prefix}body-line-height);
2323
}
24+
}
25+
26+
@include media-breakpoint-down(lg) {
27+
// Remove symmetrical icon gutter from page-sidebar, i.e. show the gutter on
28+
// the sidebar side only to make room for content.
29+
.bslib-page-sidebar,
30+
.bslib-page-navbar>div {
31+
>.bslib-sidebar-layout.sidebar-collapsed {
32+
&:not(.sidebar-right)>.main {
33+
padding-right: var(--_padding);
34+
}
2435

36+
&.sidebar-right>.main {
37+
padding-left: var(--_padding);
38+
}
39+
}
40+
}
2541
}
2642

2743
@include media-breakpoint-up(sm) {
28-
.bslib-page-main {
29-
min-width: var(--bslib-page-main-min-width, #{$bslib-page-main-min-width});
30-
min-height: var(--bslib-page-main-min-height, #{$bslib-page-main-min-height});
31-
}
44+
// Ensure the page-level main area has a minimum height and width to prevent
45+
// overly squished content in small screens, like IDE preview panels.
46+
.bslib-sidebar-layout {
47+
.bslib-page-main {
48+
min-height: var(--bslib-page-main-min-height, #{$bslib-page-main-min-height});
49+
}
50+
51+
// But only apply the width constraint when the sidebar expanded (i.e.
52+
// not collapsed or in transition) to prevent overlap with toggle button.
53+
&:not(.sidebar-collapsed),
54+
&.transitioning {
55+
.bslib-page-main {
56+
min-width: var(--bslib-page-main-min-width, #{$bslib-page-main-min-width});
57+
}
58+
}
59+
}
3260
}

shiny/www/shared/sass/bslib/components/scss/sidebar.scss

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// User-facing variables, use for theming
22
$bslib-sidebar-bg: rgba(var(--bs-emphasis-color-rgb, 0,0,0), 0.05) !default;
3-
$bslib-sidebar-fg: null !default;
3+
$bslib-sidebar-fg: var(--_main-fg) !default;
44
$bslib-sidebar-toggle-bg: rgba(var(--bs-emphasis-color-rgb, 0,0,0), 0.1) !default;
55
$bslib-sidebar-border: var(--bs-card-border-width, #{$card-border-width}) solid var(--bs-card-border-color, #{$card-border-color}) !default;
66

@@ -33,6 +33,7 @@ $bslib-sidebar-column-sidebar: Min(calc(100% - var(--_padding-icon)), var(--_sid
3333
--_toggle-position-x: calc(-2.5 * var(--_icon-size) - var(--bs-card-border-width, 1px));
3434
--_mobile-max-height: var(--bslib-sidebar-mobile-max-height, var(--bslib-sidebar-max-height-mobile));
3535
--_sidebar-mobile-opacity: var(--bslib-sidebar-mobile-opacity);
36+
--_main-mobile-expanded-opacity: var(--bslib-sidebar-main-mobile-expanded-opacity, 0);
3637
--_sidebar-mobile-max-width: var(--bslib-sidebar-mobile-max-width);
3738
--_sidebar-mobile-box-shadow: var(--bslib-sidebar-mobile-box-shadow);
3839
--_column-main: minmax(0, 1fr);
@@ -47,7 +48,10 @@ $bslib-sidebar-column-sidebar: Min(calc(100% - var(--_padding-icon)), var(--_sid
4748
grid-template-columns: $bslib-sidebar-column-sidebar var(--_column-main);
4849
position: relative;
4950

50-
@include transition(grid-template-columns ease-in-out var(--_transition-duration));
51+
@include transition(
52+
grid-template-columns ease-in-out var(--_transition-duration),
53+
background-color linear var(--_transition-duration)
54+
);
5155

5256
border: var(--_border);
5357
border-radius: var(--_border-radius);
@@ -89,7 +93,6 @@ $bslib-sidebar-column-sidebar: Min(calc(100% - var(--_padding-icon)), var(--_sid
8993
border-bottom-right-radius: 0;
9094
color: var(--_sidebar-fg);
9195
background-color: var(--_sidebar-bg);
92-
backdrop-filter: blur(5px);
9396

9497
> .sidebar-content {
9598
display: flex;
@@ -110,7 +113,7 @@ $bslib-sidebar-column-sidebar: Min(calc(100% - var(--_padding-icon)), var(--_sid
110113
margin-left: calc(-1 * var(--_padding));
111114
margin-right: calc(-1 * var(--_padding));
112115
&:last-child {
113-
margin-bottom: calc(-1 * var(--_padding));
116+
margin-bottom: calc(-1 * var(--_padding));
114117
}
115118
&:not(:last-child) {
116119
margin-bottom: $spacer;
@@ -315,28 +318,66 @@ $bslib-sidebar-column-sidebar: Min(calc(100% - var(--_padding-icon)), var(--_sid
315318
}
316319

317320
&[data-collapsible-mobile="true"] {
321+
// On mobile, when the sidebar is collapsible, we add an additional row
322+
// for the collapse toggle. This avoid overlapping the toggle and the
323+
// main content when the sidebar is collapsed. When the sidebar expands,
324+
// it takes up the entire layout area.
325+
grid-template-rows: calc(var(--_icon-button-size) + var(--_padding)) 1fr;
326+
> .collapse-toggle {
327+
grid-row: 1 / 2; // top row
328+
}
329+
> .main {
330+
grid-row: 2 / 3; // bottom row
331+
}
332+
> .sidebar {
333+
grid-row: 1 / 3; // whole layout
334+
}
318335
// Sidebar layer has to be lifted up to cover other (nested) sidebars
319-
&:not(.sidebar-collapsed), &.transitioning {
320-
> .sidebar { z-index: $zindex-offcanvas; }
321-
> .collapse-toggle { z-index: $zindex-offcanvas; }
336+
&:not(.sidebar-collapsed),
337+
&.transitioning {
338+
> .sidebar {
339+
z-index: $zindex-offcanvas;
340+
}
341+
> .collapse-toggle {
342+
z-index: $zindex-offcanvas;
343+
}
322344
}
323345

346+
> .collapse-toggle {
347+
top: unset;
348+
position: relative;
349+
align-self: center;
350+
}
351+
324352
// Keep toggle on sidebar side when expanded on mobile
325353
&:not(.sidebar-right) > .collapse-toggle {
326354
left: var(--_icon-size);
327355
right: unset;
356+
justify-self: left;
328357
}
329358

330359
&.sidebar-right > .collapse-toggle {
331360
right: var(--_icon-size);
332361
left: unset;
362+
justify-self: right;
333363
}
334364

335365
> .sidebar {
336366
opacity: var(--_sidebar-mobile-opacity, 1);
337367
max-width: var(--_sidebar-mobile-max-width, 100%);
338368
box-shadow: var(--_sidebar-mobile-box-shadow);
369+
}
370+
371+
// Move scrollable region to .sidebar-content to avoid scrolling sidebar
372+
// elements underneath the collapse toggle
373+
> .sidebar {
339374
margin: 0;
375+
padding-top: var(--_padding-icon);
376+
}
377+
> .sidebar > .sidebar-content {
378+
padding-top: 0;
379+
height: 100%;
380+
overflow-y: auto;
340381
}
341382

342383
// When `max-width` is less than 100%, push it to the appropriate side
@@ -362,21 +403,30 @@ $bslib-sidebar-column-sidebar: Min(calc(100% - var(--_padding-icon)), var(--_sid
362403
}
363404
}
364405

365-
// Set padding on main area to account for toggle button
406+
// Padding appears in collapse toggle grid region
366407
> .main {
367-
padding-top: var(--_toggle-collective-height);
408+
padding-top: 1px;
368409
padding-left: var(--_padding);
369410
padding-right: var(--_padding);
370411
}
371412

372-
// Soften main area when sidebar is expanded over content
413+
// Hide (or soften) main area when sidebar is expanded over content
373414
> .main {
374-
opacity: 0.33;
415+
opacity: var(--_main-mobile-expanded-opacity);
375416
transition: opacity var(--_transition-easing-x) var(--_transition-duration);
376417
}
377418
&.sidebar-collapsed > .main {
378419
opacity: 1;
379420
}
421+
422+
// Move main bg to layout container so that the collapse toggle grid
423+
// region has the same background as the main area
424+
> .main {
425+
background-color: none;
426+
}
427+
&, &.sidebar-collapsed {
428+
background-color: var(--_main-bg);
429+
}
380430
}
381431
}
382432
}

shiny/www/shared/sass/preset/bootstrap/bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/shared/sass/preset/shiny/bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)