Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
3d8548d
Rename filter controls with `filter_` prefix
gadenbuie Mar 6, 2023
21efc6c
remove trailing invisible space
gadenbuie Mar 6, 2023
9491964
Ignore rendered vignette html files
gadenbuie Mar 6, 2023
143e9bd
Consolidate iframe rendering in a knitr option hook
gadenbuie Mar 6, 2023
105cb03
Use html_document with BS5 for local editing
gadenbuie Mar 6, 2023
1340c7d
Fix base heading level
gadenbuie Mar 6, 2023
0c00864
Add global/local sidebar grid
gadenbuie Mar 6, 2023
586c5d2
Reword footnote
gadenbuie Mar 6, 2023
7412ee5
Merge 'origin/main' into branch 'garrick/sidebar-article-edits'
gadenbuie Mar 7, 2023
bb7b6f4
rewrite showcase
gadenbuie Mar 7, 2023
47643df
Suppress headroom on `page_navbar()` example
gadenbuie Mar 7, 2023
4ce38ae
Add callout styles and use callout for global sidebar warning
gadenbuie Mar 7, 2023
fd09115
wording tweak
gadenbuie Mar 7, 2023
ea0ce14
wip consistently use and expose fill/fillable as controls to fill-ite…
cpsievert Mar 6, 2023
98497f3
`devtools::document()` (GitHub Actions)
cpsievert Mar 7, 2023
7ea8707
Give `h2` a little more breathing room
gadenbuie Mar 7, 2023
e45a57b
diamonds is from {ggplot2}
gadenbuie Mar 7, 2023
318bc13
edit setup code introduction
gadenbuie Mar 7, 2023
5d023f7
global -> shared and shared first
gadenbuie Mar 7, 2023
2c3701c
Move "dynamic sidebars" to Shiny section
gadenbuie Mar 7, 2023
a89c185
Simplify sidebar state observer code
gadenbuie Mar 7, 2023
f5f3d8a
Rewrite navbar page section
gadenbuie Mar 7, 2023
476eecf
Deprecate page_fill() in favor of page_fillable()
cpsievert Mar 7, 2023
806264e
Change default card_body() behavior for the better
cpsievert Mar 7, 2023
f0acc39
`devtools::document()` (GitHub Actions)
cpsievert Mar 7, 2023
c30138a
Update website deps (GitHub Action)
cpsievert Mar 7, 2023
292edb5
fixup shared- and local-sidebar IDs
gadenbuie Mar 8, 2023
51501d1
Render iframe examples into `examples/sidebars` directory
gadenbuie Mar 8, 2023
59563e6
Consolidate page layouts
gadenbuie Mar 8, 2023
f4f48b4
small edits
gadenbuie Mar 8, 2023
e823362
Give iframes a big bottom margin
gadenbuie Mar 8, 2023
6adb547
Minor edits in fillable layouts section
gadenbuie Mar 8, 2023
7b1f4b3
Move other page layouts to the end of the section
gadenbuie Mar 8, 2023
c7b11ac
card_body_fill -> card_body_fillable
cpsievert Mar 8, 2023
6448fc0
Bring back layout_column_wrap()'s fill
cpsievert Mar 8, 2023
35c4f29
Rewrite examples in scrolling layout
gadenbuie Mar 8, 2023
b27bd88
Big content re-org
gadenbuie Mar 8, 2023
bb687f3
`devtools::document()` (GitHub Actions)
cpsievert Mar 8, 2023
04ff050
Resave data (GitHub Action)
cpsievert Mar 8, 2023
2fbd3d0
Optimize plot histograms
gadenbuie Mar 8, 2023
2e80f1a
Update section heading names
gadenbuie Mar 8, 2023
9f38482
Hide callout heading from toc
gadenbuie Mar 8, 2023
aa42500
Note that shared/local is just about UI layout
gadenbuie Mar 8, 2023
9e6260c
Minor edits to local sidebar intro
gadenbuie Mar 8, 2023
e3d74ff
Include Atkinson Hyperligible 700 weight
gadenbuie Mar 8, 2023
037d7ee
Transition -> scrolling
gadenbuie Mar 8, 2023
ab74570
Transition out of filling layout
gadenbuie Mar 8, 2023
2091087
Update page sidebars
gadenbuie Mar 8, 2023
d71c3d3
Update cards
gadenbuie Mar 8, 2023
48f132c
Clear shared data group in scrolling layout section
gadenbuie Mar 8, 2023
1e85167
Lazy load iframes if possible
gadenbuie Mar 8, 2023
9f9d214
Merge branch 'garrick/sidebar-article-edits' into fillable-api
gadenbuie Mar 8, 2023
b84160e
Update website deps (GitHub Action)
gadenbuie Mar 8, 2023
9a385c8
Edit sidebars in cards with tabs section
gadenbuie Mar 9, 2023
ed24aa6
Rewrite Shiny section with dynamic sidebar examples
gadenbuie Mar 9, 2023
7cfd6a3
Resave data (GitHub Action)
gadenbuie Mar 9, 2023
c29ef7b
Update accordians and nested sidebars
gadenbuie Mar 9, 2023
836c4ee
Edit "styling and customization"
gadenbuie Mar 9, 2023
6c48d8b
page_fill -> page_fillable
gadenbuie Mar 9, 2023
04f92e5
remove lorem ipsum from testing
gadenbuie Mar 9, 2023
b1140e0
Clean up deprecations
cpsievert Mar 10, 2023
0a43b5e
Add fill and max_height to card()
cpsievert Mar 10, 2023
0557a68
Add fill and max_height to value_box(); use consistent wording in docs
cpsievert Mar 10, 2023
62d8634
Add fill to card_image()
cpsievert Mar 10, 2023
03f641e
Add gap argument to page_fillable(); and add padding/gap non-zero def…
cpsievert Mar 10, 2023
2e18944
Update news
cpsievert Mar 10, 2023
6a84fb3
1st draft of filling article; group articles into categories
cpsievert Mar 10, 2023
5814a46
card_body_fill() -> card_body_fillable()
gadenbuie Mar 10, 2023
e71b93f
`devtools::document()` (GitHub Actions)
gadenbuie Mar 10, 2023
e1deb17
Resave distributed files (GitHub Action)
gadenbuie Mar 10, 2023
8352eca
intro links and edits
gadenbuie Mar 10, 2023
fb0869a
Minor edits
gadenbuie Mar 10, 2023
1939857
Link to dynamic sidebar via footnotes
gadenbuie Mar 10, 2023
591cc09
Apply some changes from @cpsievert's review
gadenbuie Mar 10, 2023
8a23f8b
Apply more suggestions from @cpsievert's review
gadenbuie Mar 10, 2023
0ed7d7e
Apply suggestions from code review
cpsievert Mar 10, 2023
eef4074
Update vignettes/cards.Rmd
cpsievert Mar 10, 2023
04597f6
Update vignettes/cards.Rmd
cpsievert Mar 10, 2023
14f0da5
Update vignettes/cards.Rmd
cpsievert Mar 10, 2023
00360b1
Update vignettes/cards.Rmd
cpsievert Mar 10, 2023
0b8134c
Update vignettes/cards.Rmd
cpsievert Mar 10, 2023
8698297
Update vignettes/sidebars.Rmd
cpsievert Mar 10, 2023
ee4ee29
Update vignettes/cards.Rmd
cpsievert Mar 10, 2023
eb21a63
Update vignettes/cards.Rmd
cpsievert Mar 10, 2023
826e35a
Update vignettes/cards.Rmd
cpsievert Mar 10, 2023
7636084
Update vignettes/cards.Rmd
cpsievert Mar 10, 2023
1bb52a3
`devtools::document()` (GitHub Actions)
cpsievert Mar 10, 2023
c1393e1
page_navbar(fillable) shouldn't include padding/gap
cpsievert Mar 10, 2023
8a848a9
Prevent collapsed sidebar from having a non-zero height
cpsievert Mar 15, 2023
8ded96b
Resave distributed files (GitHub Action)
cpsievert Mar 15, 2023
f9e80e2
Resave data (GitHub Action)
cpsievert Mar 15, 2023
2e0732a
Merge branch 'main' into fillable-api
cpsievert Mar 20, 2023
73b2e82
Resave data (GitHub Action)
cpsievert Mar 20, 2023
d064d19
wip another pass at sidebar article and other articles
cpsievert Mar 13, 2023
9a7c46d
wip have card_body() default to fillable container; add utilities for…
cpsievert Mar 27, 2023
9c609ec
A numeric value for value_box()'s title/value is now wrapped in a hea…
cpsievert Mar 22, 2023
bd33cd6
Make the CSS selector for adding margin between the navbar and it's c…
cpsievert Mar 27, 2023
b1b80a8
Improve sidebar transition and collapsed state (#523)
gadenbuie Mar 31, 2023
0465eab
Adjust sidebar function signature and require `sidebar` argument (#525)
gadenbuie Mar 31, 2023
190b593
Apply sidebar transition fix on non-mobile widths only (#527)
gadenbuie Mar 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ inst/yarn.lock

inst/rmarkdown/templates/*/skeleton/skeleton.html

vignettes/navbar-global
vignettes/navbar-global-fillable
vignettes/navbar-local-scroll
vignettes/navbar-local-fill
vignettes/page-scroll
vignettes/page-fill
vignettes/page-fill-double
vignettes/*.html
# rendered examples that appear in iframes
vignettes/examples
3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Collate:
'card.R'
'deprecated.R'
'files.R'
'fill.R'
'imports.R'
'layout.R'
'nav-items.R'
Expand Down Expand Up @@ -89,9 +90,11 @@ Config/Needs/website:
crosstalk,
dplyr,
DT,
ggplot2,
glue,
htmlwidgets,
leaflet,
lorem,
plotly,
purrr,
rprojroot,
Expand Down
12 changes: 12 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Generated by roxygen2: do not edit by hand

S3method(is_fill,default)
S3method(is_fill,htmlwidget)
S3method(is_fillable,default)
S3method(is_fillable,htmlwidget)
S3method(print,bslib_fragment)
S3method(print,bslib_page)
export(accordion)
Expand All @@ -11,6 +15,9 @@ export(accordion_panel_remove)
export(accordion_panel_set)
export(accordion_panel_update)
export(as.card_item)
export(as_fill)
export(as_fill_carrier)
export(as_fillable)
export(bootstrap)
export(bootstrap_sass)
export(bootswatch_themes)
Expand Down Expand Up @@ -63,6 +70,9 @@ export(font_google)
export(font_link)
export(is.card_item)
export(is_bs_theme)
export(is_fill)
export(is_fill_carrier)
export(is_fillable)
export(layout_column_wrap)
export(layout_sidebar)
export(nav)
Expand All @@ -86,6 +96,7 @@ export(navs_tab)
export(navs_tab_card)
export(page)
export(page_fill)
export(page_fillable)
export(page_fixed)
export(page_fluid)
export(page_navbar)
Expand All @@ -98,6 +109,7 @@ export(sidebar_close)
export(sidebar_open)
export(theme_bootswatch)
export(theme_version)
export(undo_fill)
export(value_box)
export(version_default)
export(versions)
Expand Down
26 changes: 21 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
# bslib 0.4.2.9000

This major release adds [sidebar layouts](https://rstudio.github.io/bslib/articles/sidebars.html), [accordions](https://rstudio.github.io/bslib/articles/sidebars.html#sidebar-accordions), and makes many improvements to support for [filling layouts](https://rstudio.github.io/bslib/articles/filling.html).

Although `{bslib}` is still maturing, and will continue to receiving new UI features, we now see it as a viable replacement for `{shinydashboard}`.

## Breaking changes

* `page_fill()` now produces a `<body>` tag with `display:flex` (instead of `display:block`). It also no longer fills the windows height on mobile (i.e., narrow screens) by default. If this breaks existing behavior, consider using `shiny::fillPage(theme = bslib::bs_theme(), ...)` instead of `page_fill()`. (#479)
* `page_navbar()` (and consequently `shiny::navbarPage()`) no longer implicitly wrap `header` and `footer` in an additional `shiny::fluidRow()` container for Bootstrap 5+ (i.e., `theme = bs_theme()`). Similarly, `navs_bar()` no longer does this (for any version of Bootstrap). If this breaks existing behavior, consider wrapping the `header` and `footer` value(s) with `shiny::fluidRow()`). (#479)
* `card_body()` now provides the same behavior as `card_body_fill()` (i.e., it is both a fillable container and fill item) by default. And, now, since `card_body()` can do everything `card_body_fill()` can do, `card_body_fill()` has been deprecated. The main benefit of this change is that `card(full_screen = TRUE, ...)` with output(s) passed to `...` "just works" in an intuitive way. To revert to the previous behavior, set `fillable = FALSE` and `fill = FALSE` in calls to `card_body()` and set `wrapper = function(x) card_body(x, fillable = FALSE, fill = FALSE)` in calls to `card()`. (#498)
* `layout_column_wrap()`'s `fill` argument now controls whether or not the _layout container_ is allowed to grow/shrink to fit a fillable container (e.g., `page_fillable()`). It also gains a new `fillable` argument for controlling whether _UI elements_ are allowed to fill their row height. This is more consistent with the meaning of `fill` in other functions, like `card()`, `card_body()`, `layout_sidebar()`, etc. (#498)
* `page_fill()` (now called `page_fillable()`) had several breaking changes (listed below). If this breaks existing behavior, consider using `shiny::fillPage(theme = bslib::bs_theme(), ...)` instead of `page_fill()`.
* `page_fill()` now produces a `<body>` tag with `display:flex` (instead of `display:block`).
* `page_fill()` no longer fills the windows height on mobile (i.e., narrow screens) by default (set `fill_mobile = TRUE` to restore the old behavior).
* `page_fill()` now adds `padding` and `gap` by default, set `padding = 0` and `gap = 0` to restore the old behavior.
* `page_navbar()` (and consequently `shiny::navbarPage()`) no longer implicitly wrap `header` and `footer` in an additional `shiny::fluidRow()` container for Bootstrap 5+ (i.e., `theme = bs_theme()`) usage. Similarly, `navs_bar()` no longer does this (for any version of Bootstrap). If this breaks existing behavior, consider wrapping the `header` and `footer` value(s) with `shiny::fluidRow()`). (#479)
* Defaults for the following Bootstrap 5 Sass variables were changed to `null`: `$accordion-button-active-bg`, `$accordion-button-active-color`, and `$accordion-icon-active-color`. To restore the old behavior, do `bs_add_variables(theme, "accordion-button-active-bg" = "tint-color($component-active-bg, 90%)", "accordion-button-active-color" = "shade-color($primary, 10%)", "accordion-icon-active-color" = "$accordion-button-active-color", .where = "declarations")`. (#475)

## New features

* Added a `sidebar()` API for creating sidebar layouts in various contexts. See [the article](https://rstudio.github.io/bslib/articles/sidebars.html) to learn more. (#479)
* Adds a new `accordion()` API. See `help(accordion)` for examples and details. Note also `accordion()` is designed to [work well inside a `sidebar()`](https://rstudio.github.io/bslib/articles/sidebars.html#accordions). (#475)
* Adds a new `accordion()` API. See `help(accordion)` for examples and details. Note also `accordion()` is designed to [work well inside a `sidebar()`](https://rstudio.github.io/bslib/articles/sidebars.html#sidebar-accordions). (#475)
* `page_navbar()`, `navs_tab_card()`, and ` navs_pill_card()` gain a `sidebar` argument for putting a `sidebar()` on every page/tab/pill. (#479)
* `page_navbar()` gains a `fillable` argument to make the content of particular page(s) fit the window/card. (#479)
* `page_fill()` is now considered a `fillable` container, meaning that `fill` items like `card()`, `layout_column_wrap()`, and `layout_sidebar()` now grow/shrink to fit the window's height when they appear as a direct child of `page_fill()`. (#479)
* `page_navbar()` and `page_fill()` gain `fill_mobile` arguments to control whether the page should grow/shrink to fit the viewport on mobile. (#479)
* `page_fillable()` (aka, `page_fill()`) is now considered a `fillable` container, meaning that `fill` items like `card()`, `layout_column_wrap()`, and `layout_sidebar()` now grow/shrink to fit the window's height when they appear as a direct child of `page_fillable()`. (#479)
* `page_navbar()` and `page_fillable()` gain `fill_mobile` arguments to control whether the page should grow/shrink to fit the viewport on mobile. (#479)
* `card()`, `value_box()`, and `card_image()` gain `max_height` and `fill` arguments. (#498)
* Added new `as_fill()`, `as_fillable()`, `as_fill_carrier()`, `is_fill()`, and `is_fillable()` for testing and coercing potential to fill. (#498)

## Deprecations

* `card_body_fill()` has been deprecated in favor of `card_body()`. (#498)
* `page_fill()` has been deprecated in favor of `page_fillable()`. (#498)


# bslib 0.4.2
Expand Down
106 changes: 46 additions & 60 deletions R/card.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@
#' tag][htmltools::tags] (which includes card items such as [card_body()].
#' Named arguments become HTML attributes on returned UI element.
#' @param full_screen If `TRUE`, an icon will appear when hovering over the card
#' body. Clicking the icon expands the card to fit viewport size. Consider
#' pairing this feature with [card_body_fill()] to get output that responds to
#' changes in the size of the card.
#' body. Clicking the icon expands the card to fit viewport size.
#' @param height Any valid [CSS unit][htmltools::validateCssUnit] (e.g.,
#' `height="200px"`).
#' `height="200px"`). Doesn't apply when a card is made `full_screen`
#' (in this case, consider setting a `height` in [card_body()]).
#' @param max_height Any valid [CSS unit][htmltools::validateCssUnit] (e.g.,
#' `max_height="200px"`). Doesn't apply when a card is made `full_screen`
#' (in this case, consider setting a `max_height` in [card_body()]).
#' @param fill Whether or not to allow the card to grow/shrink to fit a
#' fillable container with an opinionated height (e.g., `page_fillable()`).
#' @param class Additional CSS classes for the returned UI element.
#' @param wrapper A function (which returns a UI element) to call on unnamed
#' arguments in `...` which are not already card item(s) (like
#' [card_header()], [card_body()], etc.). Note that non-card items are grouped
#' together into one `wrapper` call (e.g. given `card("a", "b",
#' card_body("c"), "d")`, `wrapper` would be called twice, once with `"a"` and
#' `"b"` and once with `"d"`). Consider setting `wrapper` to [card_body_fill]
#' if the entire card wants responsive sizing or `NULL` to avoid wrapping
#' altogether
#' `"b"` and once with `"d"`).
#'
#' @return A [htmltools::div()] tag.
#'
Expand Down Expand Up @@ -50,7 +52,7 @@
#' )
#' }
#'
card <- function(..., full_screen = FALSE, height = NULL, class = NULL, wrapper = card_body) {
card <- function(..., full_screen = FALSE, height = NULL, max_height = NULL, fill = TRUE, class = NULL, wrapper = card_body) {

args <- rlang::list2(...)
argnames <- rlang::names2(args)
Expand All @@ -60,13 +62,16 @@ card <- function(..., full_screen = FALSE, height = NULL, class = NULL, wrapper

tag <- div(
class = "card bslib-card",
style = css(height = validateCssUnit(height)),
style = css(
height = validateCssUnit(height),
max_height = validateCssUnit(max_height)
),
!!!attribs,
!!!children,
if (full_screen) full_screen_toggle()
)

tag <- bindFillRole(tag, container = TRUE, item = TRUE)
tag <- bindFillRole(tag, container = TRUE, item = fill)
tag <- tagAppendAttributes(tag, class = class)

as_fragment(
Expand Down Expand Up @@ -113,8 +118,14 @@ as_card_items <- function(children, wrapper) {
#' @param ... Unnamed arguments can be any valid child of an [htmltools
#' tag][htmltools::tags]. Named arguments become HTML attributes on returned
#' UI element.
#' @param fill whether to allow the `card_body()` to grow and shrink to fit its
#' `card()`.
#' @param min_height,max_height,max_height_full_screen Any valid [CSS length
#' unit][htmltools::validateCssUnit()].
#' @param fillable Whether or not the card item should be a fillable (i.e.
#' flexbox) container.
#' @param fill Whether to allow this element to grow/shrink to fit its `card()`
#' container.
#' @param gap A [CSS length unit][htmltools::validateCssUnit()] defining the
#' `gap` (i.e., spacing) between elements provided to `...`.
#' @inheritParams card
#'
#' @return An [htmltools::div()] tag.
Expand All @@ -126,43 +137,38 @@ as_card_items <- function(children, wrapper) {
#' columns inside a card).
#'
#' @describeIn card_body A general container for the "main content" of a [card()].
card_body <- function(..., fill = FALSE, height = NULL, class = NULL) {
card_body_(
fill_item = fill,
height = height,
class = class,
...
)
}
card_body <- function(..., fillable = TRUE, min_height = NULL, max_height = NULL, max_height_full_screen = max_height, height = NULL, gap = NULL, fill = TRUE, class = NULL) {

#' @describeIn card_body Similar to `card_body(fill = TRUE)`, but also marks the
#' return element as a "fill container" (via [htmltools::bindFillRole()]) so
#' that its immediate children are allowed to grow and shrink to fit.
#' @param gap A [CSS length unit][htmltools::validateCssUnit()] defining the
#' `gap` (i.e., spacing) between elements provided to `...`.
#' @param max_height,max_height_full_screen,min_height Any valid [CSS length unit][htmltools::validateCssUnit()].
#' @export
card_body_fill <- function(..., gap = NULL, max_height = NULL, max_height_full_screen = max_height, min_height = NULL, class = NULL) {

register_runtime_package_check("`card_body_fill()`", "shiny", "1.7.3.9001")
register_runtime_package_check("`card_body_fill()`", "htmlwidgets", "1.5.4.9001")
if (fillable) {
register_runtime_package_check("`card_body()`", "shiny", "1.7.4")
register_runtime_package_check("`card_body()`", "htmlwidgets", "1.6.0")
}

card_body_(
fill_item = TRUE,
fill_container = TRUE,
class = class,
style = htmltools::css(
gap = validateCssUnit(gap),
tag <- div(
class = "card-body",
style = css(
min_height = validateCssUnit(min_height),
"--bslib-card-body-max-height" = validateCssUnit(max_height),
"--bslib-card-body-max-height-full-screen" = validateCssUnit(max_height_full_screen),
margin_top = "auto",
margin_bottom = "auto"
margin_bottom = "auto",
# .card-body already adds `flex: 1 1 auto` so make sure to override it
flex = if (fill) "1 1 auto" else "0 0 auto",
gap = validateCssUnit(gap),
height = validateCssUnit(height)
),
...
)

tag <- bindFillRole(tag, item = fill, container = fillable)

# Make sure user has the opportunity to override the classes added by bindFillRole()
tag <- tagAppendAttributes(tag, class = class)

as.card_item(tag)
}


#' @describeIn card_body Similar to `card_header()` but without the border and background color.
#' @param container a function to generate an HTML element.
#' @export
Expand All @@ -172,26 +178,6 @@ card_title <- function(..., container = htmltools::h5) {
)
}

card_body_ <- function(..., fill_item = FALSE, fill_container = FALSE, height = NULL, class = NULL, container = htmltools::div) {

tag <- container(
class = "card-body",
style = css(
height = validateCssUnit(height),
# .card-body already adds `flex: 1 1 auto` so make sure to override it
flex = if (fill_item) "1 1 auto" else "0 0 auto"
),
...
)

tag <- bindFillRole(tag, item = fill_item, container = fill_container)

# Make sure user has the opportunity to override the classes added by bindFillRole()
tag <- tagAppendAttributes(tag, class = class)

as.card_item(tag)
}


#' @describeIn card_body A header (with border and background color) for the `card()`. Typically appears before a `card_body()`.
#' @param container a function that generates an [htmltools tag][htmltools::tags].
Expand Down Expand Up @@ -222,7 +208,7 @@ card_footer <- function(..., class = NULL) {
#' @export
card_image <- function(
file, ..., href = NULL, border_radius = c("top", "bottom", "all", "none"),
mime_type = NULL, class = NULL, height = NULL, width = NULL, container = card_body_fill) {
mime_type = NULL, class = NULL, height = NULL, fill = TRUE, width = NULL, container = card_body) {

src <- NULL
if (length(file) > 0) {
Expand All @@ -248,7 +234,7 @@ card_image <- function(
...
)

image <- bindFillRole(image, item = TRUE)
image <- bindFillRole(image, item = fill)
image <- tagAppendAttributes(image, class = class)

if (!is.null(href)) {
Expand Down
15 changes: 15 additions & 0 deletions R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,18 @@ bs_add_declarations <- function(theme, declarations) {
.Deprecated("bs_add_mixins")
bs_bundle(theme, sass_layer(declarations = declarations))
}


#' @rdname deprecated
#' @export
card_body_fill <- function(...) {
.Deprecated("card_body", old = "card_body_fill")
card_body(...)
}

#' @rdname deprecated
#' @export
page_fill <- function(...) {
.Deprecated("page_fillable", old = "page_fill")
page_fillable(...)
}
Loading